@baseline-ui/core 3.4.0 → 3.5.0

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 (265) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.mjs +1 -1
  3. package/dist/ActionGroup.mjs +1 -1
  4. package/dist/ActionIconButton.mjs +1 -1
  5. package/dist/Actionable.mjs +1 -1
  6. package/dist/AlertDialog.css +1 -1
  7. package/dist/AlertDialog.mjs +1 -1
  8. package/dist/AudioPlayer.css +1 -1
  9. package/dist/AudioPlayer.mjs +1 -1
  10. package/dist/Avatar.mjs +1 -1
  11. package/dist/ButtonSelect.mjs +1 -1
  12. package/dist/Calendar.mjs +1 -1
  13. package/dist/ColorInput.css +1 -1
  14. package/dist/ColorInput.mjs +1 -1
  15. package/dist/ColorSwatch.mjs +1 -1
  16. package/dist/ColorSwatchPicker.mjs +1 -1
  17. package/dist/ComboBox.mjs +1 -1
  18. package/dist/DateField.mjs +1 -1
  19. package/dist/Dialog.css +1 -1
  20. package/dist/Dialog.mjs +1 -1
  21. package/dist/Disclosure.mjs +1 -1
  22. package/dist/DomNodeRenderer.mjs +1 -1
  23. package/dist/Drawer.css +1 -1
  24. package/dist/Drawer.mjs +1 -1
  25. package/dist/Editor.css +1 -1
  26. package/dist/Editor.mjs +1 -1
  27. package/dist/FileInput.mjs +1 -1
  28. package/dist/FileList.mjs +1 -1
  29. package/dist/FileUploader.mjs +1 -1
  30. package/dist/FrameProvider.mjs +1 -1
  31. package/dist/FreehandCanvas.mjs +1 -1
  32. package/dist/GridList.mjs +1 -1
  33. package/dist/Icon.mjs +1 -1
  34. package/dist/ImageDropZone.mjs +1 -1
  35. package/dist/ImageGallery.css +1 -1
  36. package/dist/ImageGallery.mjs +1 -1
  37. package/dist/InlineAlert.mjs +1 -1
  38. package/dist/InlineToolbar.mjs +1 -1
  39. package/dist/Kbd.mjs +1 -1
  40. package/dist/Link.mjs +1 -1
  41. package/dist/ListBox.mjs +1 -1
  42. package/dist/Menu.mjs +1 -1
  43. package/dist/MessageFormat.mjs +1 -1
  44. package/dist/Modal.mjs +1 -1
  45. package/dist/NumberInput.mjs +1 -1
  46. package/dist/Pagination.mjs +1 -1
  47. package/dist/Panel.mjs +1 -1
  48. package/dist/PointPicker.mjs +1 -1
  49. package/dist/Popover.mjs +1 -1
  50. package/dist/Portal.mjs +1 -1
  51. package/dist/Preview.mjs +1 -1
  52. package/dist/RadioGroup.mjs +1 -1
  53. package/dist/ScrollControlButton.mjs +1 -1
  54. package/dist/SearchInput.mjs +1 -1
  55. package/dist/Select.mjs +1 -1
  56. package/dist/Slider.css +1 -1
  57. package/dist/Slider.mjs +1 -1
  58. package/dist/Stepper.mjs +1 -1
  59. package/dist/Table.css +1 -1
  60. package/dist/Table.mjs +1 -1
  61. package/dist/Tabs.mjs +1 -1
  62. package/dist/Tag.mjs +1 -1
  63. package/dist/TagGroup.mjs +1 -1
  64. package/dist/TaggedPagination.mjs +1 -1
  65. package/dist/TextInput.mjs +1 -1
  66. package/dist/ThemeProvider.mjs +1 -1
  67. package/dist/TimeField.mjs +1 -1
  68. package/dist/Toast.mjs +1 -1
  69. package/dist/ToggleButton.mjs +1 -1
  70. package/dist/ToggleIconButton.mjs +1 -1
  71. package/dist/Toolbar.mjs +1 -1
  72. package/dist/Tooltip.mjs +1 -1
  73. package/dist/TreeView.mjs +1 -1
  74. package/dist/UNSAFE_ListBox.mjs +1 -1
  75. package/dist/Virtualizer.mjs +1 -1
  76. package/dist/{chunk-LPI2NIDI.mjs → chunk-2AKHB7Y5.mjs} +1 -1
  77. package/dist/chunk-2M2LI4MI.mjs +10 -0
  78. package/dist/chunk-2WA3KB7H.mjs +10 -0
  79. package/dist/{chunk-KGS3UWPG.mjs → chunk-3KWSJRYK.mjs} +1 -1
  80. package/dist/{chunk-AM5FU4Y7.mjs → chunk-3M3WJHOI.mjs} +1 -1
  81. package/dist/{chunk-5KJF7IQN.mjs → chunk-3UC5V5E3.mjs} +1 -1
  82. package/dist/{chunk-QUQ4VYCN.mjs → chunk-43LOJ3SH.mjs} +1 -1
  83. package/dist/{chunk-MFB3SWO7.mjs → chunk-46RUOB4U.mjs} +11 -11
  84. package/dist/{chunk-AELTF2DE.mjs → chunk-4WVW4KEK.mjs} +1 -1
  85. package/dist/{chunk-BYDJXA5A.mjs → chunk-5G6JNQQR.mjs} +1 -1
  86. package/dist/{chunk-4EANTENO.mjs → chunk-5G7ABQYJ.mjs} +1 -1
  87. package/dist/{chunk-IUXXTORQ.mjs → chunk-5W67PVZQ.mjs} +1 -1
  88. package/dist/{chunk-CTSDHAAV.mjs → chunk-676DOXEK.mjs} +2 -2
  89. package/dist/{chunk-AD3MLX6G.mjs → chunk-6GMU63H2.mjs} +1 -1
  90. package/dist/chunk-6M7PJXEE.mjs +10 -0
  91. package/dist/chunk-6Q5PNIYZ.mjs +10 -0
  92. package/dist/{chunk-R7R7JDA3.mjs → chunk-7BE6MOPW.mjs} +1 -1
  93. package/dist/chunk-7EQIV4GX.mjs +10 -0
  94. package/dist/{chunk-DZDZZRWE.mjs → chunk-7MLFM55C.mjs} +1 -1
  95. package/dist/chunk-7XLBV46W.mjs +10 -0
  96. package/dist/{chunk-BHJCYKFJ.mjs → chunk-ABXTAFKP.mjs} +1 -1
  97. package/dist/{chunk-TUJLNJPJ.mjs → chunk-AFOW62QN.mjs} +2 -2
  98. package/dist/chunk-AMVX34SS.mjs +10 -0
  99. package/dist/{chunk-7TE4MFKC.mjs → chunk-AN26QORL.mjs} +1 -1
  100. package/dist/{chunk-OYSOPCTA.mjs → chunk-BA5OA5DY.mjs} +1 -1
  101. package/dist/{chunk-4W5VP4NV.mjs → chunk-BAIVRB2I.mjs} +1 -1
  102. package/dist/{chunk-K4TTZX4T.mjs → chunk-BET5GVGQ.mjs} +1 -1
  103. package/dist/{chunk-7L5UOGZA.mjs → chunk-BPW4QRPV.mjs} +2 -2
  104. package/dist/chunk-BSSLS6MF.mjs +10 -0
  105. package/dist/{chunk-UUTMZQQA.mjs → chunk-CENNHSIS.mjs} +3 -3
  106. package/dist/{chunk-W7OTSFZS.mjs → chunk-CTBCJZEG.mjs} +1 -1
  107. package/dist/chunk-D5VU5TED.mjs +11 -0
  108. package/dist/chunk-DAI7V4TE.mjs +10 -0
  109. package/dist/chunk-DO5YROCG.mjs +10 -0
  110. package/dist/{chunk-COHK4QQW.mjs → chunk-EGLD5KVP.mjs} +2 -2
  111. package/dist/{chunk-BXNNVZOQ.mjs → chunk-EL5OYHOX.mjs} +1 -1
  112. package/dist/{chunk-CLGLEEFO.mjs → chunk-FCKJCFMD.mjs} +1 -1
  113. package/dist/chunk-FGSVPRDN.mjs +10 -0
  114. package/dist/chunk-FNCHBVLF.mjs +10 -0
  115. package/dist/chunk-GFBRKKX4.mjs +10 -0
  116. package/dist/{chunk-QU34XSML.mjs → chunk-GLAMJIYO.mjs} +2 -2
  117. package/dist/{chunk-NRQSR3G7.mjs → chunk-HABKIEKC.mjs} +1 -1
  118. package/dist/{chunk-HI44JQA7.mjs → chunk-HPUUQKKH.mjs} +2 -2
  119. package/dist/chunk-HZM2XZP4.mjs +10 -0
  120. package/dist/{chunk-ZFGTKLCU.mjs → chunk-I7SMG6PT.mjs} +1 -1
  121. package/dist/{chunk-TH4XPZEO.mjs → chunk-IM3E5JL4.mjs} +1 -1
  122. package/dist/chunk-IROFSPEN.mjs +10 -0
  123. package/dist/chunk-JRCDMRIW.mjs +10 -0
  124. package/dist/{chunk-WHN2SEWO.mjs → chunk-KHDWTXGG.mjs} +2 -2
  125. package/dist/{chunk-SVTTHYTR.mjs → chunk-KW3BKIG4.mjs} +1 -1
  126. package/dist/{chunk-EUVUJQ2Z.mjs → chunk-LBHZV4BO.mjs} +1 -1
  127. package/dist/{chunk-QJYPCVSD.mjs → chunk-LKSUUT3M.mjs} +1 -1
  128. package/dist/chunk-LQ7PGSP4.mjs +10 -0
  129. package/dist/chunk-LQHFBXCW.mjs +10 -0
  130. package/dist/{chunk-MIF6BAPG.mjs → chunk-LSPDPDB6.mjs} +1 -1
  131. package/dist/chunk-MCN5JU6E.mjs +10 -0
  132. package/dist/chunk-MHAPHPNN.mjs +10 -0
  133. package/dist/{chunk-4AG2RUAZ.mjs → chunk-NMK4W6K3.mjs} +2 -2
  134. package/dist/chunk-O23QVPUT.mjs +10 -0
  135. package/dist/{chunk-WTAJLO6E.mjs → chunk-O6FPWOHR.mjs} +1 -1
  136. package/dist/chunk-OMWMNUTI.mjs +10 -0
  137. package/dist/{chunk-YU5NRJT6.mjs → chunk-ONBEVR2G.mjs} +1 -1
  138. package/dist/{chunk-XD43CVDT.mjs → chunk-OVJT5F2R.mjs} +1 -1
  139. package/dist/{chunk-YPEAGD2G.mjs → chunk-OWQRYRWF.mjs} +1 -1
  140. package/dist/{chunk-ZZIQF6XD.mjs → chunk-PLZ6ZFEO.mjs} +1 -1
  141. package/dist/{chunk-PD5ZXNGT.mjs → chunk-QMV2O57M.mjs} +2 -2
  142. package/dist/{chunk-C2VP5IEB.mjs → chunk-QWZBZ23U.mjs} +1 -1
  143. package/dist/{chunk-E22TWF63.mjs → chunk-QXXKOFWM.mjs} +2 -2
  144. package/dist/{chunk-SZN2J2ER.mjs → chunk-R6Q7UMQS.mjs} +1 -1
  145. package/dist/chunk-SI5WP6I7.mjs +10 -0
  146. package/dist/{chunk-36ZMHBG5.mjs → chunk-T6J7G3YL.mjs} +1 -1
  147. package/dist/chunk-TTVYMCU3.mjs +10 -0
  148. package/dist/chunk-TYKMNZJ4.mjs +11 -0
  149. package/dist/chunk-TZGK36KC.mjs +10 -0
  150. package/dist/chunk-UBLCUHRL.mjs +10 -0
  151. package/dist/{chunk-IVGNOQSQ.mjs → chunk-UH6QIGD3.mjs} +1 -1
  152. package/dist/chunk-UOWKAUCQ.mjs +10 -0
  153. package/dist/{chunk-OZMADP4Z.mjs → chunk-UPJHL37C.mjs} +2 -2
  154. package/dist/chunk-USUPPN73.mjs +10 -0
  155. package/dist/{chunk-XWJJ4V3O.mjs → chunk-UYAFH4CW.mjs} +2 -2
  156. package/dist/{chunk-KJ6ZSO3I.mjs → chunk-UYUYQFOW.mjs} +1 -1
  157. package/dist/chunk-VFO35ZLL.mjs +10 -0
  158. package/dist/chunk-VXZT2JR2.mjs +10 -0
  159. package/dist/{chunk-R3HHMCE5.mjs → chunk-WFYFHANE.mjs} +1 -1
  160. package/dist/{chunk-NYCG264A.mjs → chunk-X5ORCNAU.mjs} +2 -2
  161. package/dist/chunk-X5ZTXDQ4.mjs +10 -0
  162. package/dist/{chunk-BBYODNBO.mjs → chunk-X7CKWYUD.mjs} +1 -1
  163. package/dist/{chunk-6G7EUNZW.mjs → chunk-XAM3AXXK.mjs} +1 -1
  164. package/dist/{chunk-24R46WQW.mjs → chunk-XOS3JIQX.mjs} +1 -1
  165. package/dist/{chunk-TSHZ7JSR.mjs → chunk-XQC3DSTW.mjs} +1 -1
  166. package/dist/{chunk-VETO7WNN.mjs → chunk-Y3HXPORF.mjs} +2 -2
  167. package/dist/chunk-YDUKC7QS.mjs +10 -0
  168. package/dist/{chunk-P7BN7QDF.mjs → chunk-YFBMCK5O.mjs} +1 -1
  169. package/dist/{chunk-4RSUKS23.mjs → chunk-YYU46XNM.mjs} +2 -2
  170. package/dist/{chunk-Q6PGYMYI.mjs → chunk-Z3ZMWJSV.mjs} +1 -1
  171. package/dist/chunk-Z4QTH4TB.mjs +10 -0
  172. package/dist/{chunk-UNGYVWKZ.mjs → chunk-ZA2FH3MS.mjs} +1 -1
  173. package/dist/hooks/useContainerScopedRef.mjs +1 -1
  174. package/dist/hooks/useDevice.mjs +1 -1
  175. package/dist/hooks/useI18n.mjs +1 -1
  176. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  177. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  178. package/dist/hooks/useMedia.mjs +1 -1
  179. package/dist/hooks/useMutationObserver.mjs +1 -1
  180. package/dist/hooks/usePortalContainer.mjs +1 -1
  181. package/dist/hooks/usePreventFocus.mjs +1 -1
  182. package/dist/hooks/useResizeObserver.mjs +1 -1
  183. package/dist/hooks/useTextSelection.mjs +1 -1
  184. package/dist/index.css +1 -1
  185. package/dist/index.d.ts +65 -22
  186. package/dist/index.js +21 -21
  187. package/dist/index.mjs +1 -1
  188. package/dist/messageIds.mjs +1 -1
  189. package/dist/utils/colors.mjs +1 -1
  190. package/dist/utils/dom.mjs +1 -1
  191. package/dist/utils/isInShadowDOM.mjs +1 -1
  192. package/dist/utils/keyboards.mjs +1 -1
  193. package/dist/utils/strings.mjs +1 -1
  194. package/intl/ar.json +1 -0
  195. package/intl/cs.json +1 -0
  196. package/intl/cy.json +1 -0
  197. package/intl/da.json +1 -0
  198. package/intl/de.json +1 -0
  199. package/intl/el.json +1 -0
  200. package/intl/en-GB.json +1 -0
  201. package/intl/en.json +1 -0
  202. package/intl/es.json +1 -0
  203. package/intl/fi.json +1 -0
  204. package/intl/fr-CA.json +1 -0
  205. package/intl/fr.json +1 -0
  206. package/intl/he.json +1 -0
  207. package/intl/hr.json +1 -0
  208. package/intl/id.json +1 -0
  209. package/intl/it.json +1 -0
  210. package/intl/ja.json +1 -0
  211. package/intl/ko.json +1 -0
  212. package/intl/ms.json +1 -0
  213. package/intl/nb-NO.json +1 -0
  214. package/intl/nl.json +1 -0
  215. package/intl/pl.json +1 -0
  216. package/intl/pt-PT.json +1 -0
  217. package/intl/pt.json +1 -0
  218. package/intl/ru.json +1 -0
  219. package/intl/sk.json +1 -0
  220. package/intl/sl.json +1 -0
  221. package/intl/sv.json +1 -0
  222. package/intl/th.json +1 -0
  223. package/intl/tr.json +1 -0
  224. package/intl/uk.json +1 -0
  225. package/intl/zh-Hans.json +1 -0
  226. package/intl/zh-Hant.json +1 -0
  227. package/messages.json +4 -0
  228. package/package.json +4 -4
  229. package/sbom.json +6 -6
  230. package/dist/chunk-2F3CFR22.mjs +0 -10
  231. package/dist/chunk-2LFMBQKQ.mjs +0 -10
  232. package/dist/chunk-3BEG3MEX.mjs +0 -10
  233. package/dist/chunk-3BG6K2G2.mjs +0 -10
  234. package/dist/chunk-3KCSUNRV.mjs +0 -10
  235. package/dist/chunk-4JQUB53Q.mjs +0 -10
  236. package/dist/chunk-4MHBLLHV.mjs +0 -11
  237. package/dist/chunk-5BKC373Y.mjs +0 -10
  238. package/dist/chunk-5FK5AJ7A.mjs +0 -10
  239. package/dist/chunk-5SHHWKFM.mjs +0 -10
  240. package/dist/chunk-76DKF2SK.mjs +0 -10
  241. package/dist/chunk-7MMO7S3R.mjs +0 -10
  242. package/dist/chunk-AK7XHUQW.mjs +0 -10
  243. package/dist/chunk-DAS5QGJX.mjs +0 -10
  244. package/dist/chunk-DSV6CCI6.mjs +0 -10
  245. package/dist/chunk-F7PGMOQF.mjs +0 -10
  246. package/dist/chunk-FOKMDEP7.mjs +0 -10
  247. package/dist/chunk-FPFGTGUC.mjs +0 -10
  248. package/dist/chunk-IEOHIOGL.mjs +0 -10
  249. package/dist/chunk-IWZXZ5LU.mjs +0 -10
  250. package/dist/chunk-IXRSSEHQ.mjs +0 -10
  251. package/dist/chunk-J4OPD7OL.mjs +0 -10
  252. package/dist/chunk-K7VOXFSK.mjs +0 -10
  253. package/dist/chunk-MDE2FQHX.mjs +0 -10
  254. package/dist/chunk-MYJ733MN.mjs +0 -10
  255. package/dist/chunk-NJKSUI2F.mjs +0 -10
  256. package/dist/chunk-O4DA3TPW.mjs +0 -11
  257. package/dist/chunk-ONEE6UCM.mjs +0 -10
  258. package/dist/chunk-Q4SEEMIX.mjs +0 -10
  259. package/dist/chunk-R4MOUAJW.mjs +0 -10
  260. package/dist/chunk-U3T5JTZ7.mjs +0 -10
  261. package/dist/chunk-UDMNDUBO.mjs +0 -10
  262. package/dist/chunk-VGFPT43C.mjs +0 -10
  263. package/dist/chunk-VJUBKX3W.mjs +0 -10
  264. /package/dist/{chunk-RXSX2RKA.mjs → chunk-SBGZCLF4.mjs} +0 -0
  265. /package/dist/{chunk-DAN62T2M.mjs → chunk-TIGGKOJQ.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import {c as c$1,a as a$4,d,b as b$1,e}from'./chunk-X5Z54UUE.mjs';import {c as c$3,b as b$5}from'./chunk-ONEE6UCM.mjs';import {b as b$4}from'./chunk-6G7EUNZW.mjs';import {a as a$7}from'./chunk-CY6W27WG.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-GQIS4QBN.mjs';import {a as a$2}from'./chunk-SGZWUG3H.mjs';import {a}from'./chunk-STMDFIUL.mjs';import {c as c$4}from'./chunk-HH4VLTF3.mjs';import {b as b$6}from'./chunk-4S4GGUSH.mjs';import {j,f as f$1}from'./chunk-KUDCYGII.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c,b}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import f,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {c as c$1,a as a$4,d,b as b$2,e}from'./chunk-X5Z54UUE.mjs';import {c as c$4,b as b$6}from'./chunk-MHAPHPNN.mjs';import {b as b$5}from'./chunk-XAM3AXXK.mjs';import {a as a$7}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-7MLFM55C.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {b as b$4}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-GQIS4QBN.mjs';import {a as a$2}from'./chunk-SGZWUG3H.mjs';import {a}from'./chunk-STMDFIUL.mjs';import {c as c$5}from'./chunk-HH4VLTF3.mjs';import {b as b$7}from'./chunk-4S4GGUSH.mjs';import {j,f}from'./chunk-KUDCYGII.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import T,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {c as c$1,a as a$4,d,b as b$1,e}from'./chunk-X5Z54UUE.mjs';import {c as c
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var H=new WeakMap;function ge(i,e,a){let{direction:o}=b$3(),r=i.keyboardDelegate||new b$4({collection:e.collection,ref:a,orientation:"horizontal",direction:o,disabledKeys:e.disabledKeys,disabledBehavior:e.selectionManager.disabledBehavior}),{labelProps:p,fieldProps:t,descriptionProps:s,errorMessageProps:l}=a$7({...i,labelElementType:"span",ref:a}),{gridProps:u}=b$5({...i,...t,keyboardDelegate:r,shouldFocusWrap:true,linkBehavior:"override",keyboardNavigationBehavior:"tab"},e,a),[c$1,g]=useState(false),{focusWithinProps:m}=b$6({onFocusWithinChange:g}),b=a$6(i),n=useRef(e.collection.size);return useEffect(()=>{a.current&&n.current>0&&e.collection.size===0&&c$1&&a.current.focus(),n.current=e.collection.size;},[e.collection.size,c$1,a]),H.set(e,{onRemove:i.onRemove}),{gridProps:c(u,b,{role:e.collection.size?"grid":"group","aria-atomic":false,"aria-relevant":"additions","aria-live":c$1?"polite":"off",...m,...t}),labelProps:p,descriptionProps:s,errorMessageProps:l}}var ee={"ar-AE":{removeButtonLabel:"\u0625\u0632\u0627\u0644\u0629",removeDescription:"\u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D DELETE \u0644\u0625\u0632\u0627\u0644\u0629 \u0639\u0644\u0627\u0645\u0629."},"bg-BG":{removeButtonLabel:"\u041F\u0440\u0435\u043C\u0430\u0445\u0432\u0430\u043D\u0435",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Delete, \u0437\u0430 \u0434\u0430 \u043F\u0440\u0435\u043C\u0430\u0445\u043D\u0435\u0442\u0435 \u043C\u0430\u0440\u043A\u0435\u0440\u0430."},"cs-CZ":{removeButtonLabel:"Odebrat",removeDescription:"Stisknut\xEDm kl\xE1vesy Delete odeberete zna\u010Dku."},"da-DK":{removeButtonLabel:"Fjern",removeDescription:"Tryk p\xE5 Slet for at fjerne tag."},"de-DE":{removeButtonLabel:"Entfernen",removeDescription:"Auf \u201EL\xF6schen\u201C dr\xFCcken, um das Tag zu entfernen."},"el-GR":{removeButtonLabel:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7",removeDescription:"\u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BA\u03B1\u03C4\u03B1\u03C1\u03B3\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03C4\u03B9\u03BA\u03AD\u03C4\u03B1."},"en-US":{removeDescription:"Press Delete to remove tag.",removeButtonLabel:"Remove"},"es-ES":{removeButtonLabel:"Quitar",removeDescription:"Pulse Eliminar para quitar la etiqueta."},"et-EE":{removeButtonLabel:"Eemalda",removeDescription:"Sildi eemaldamiseks vajutage kustutusklahvi Delete."},"fi-FI":{removeButtonLabel:"Poista",removeDescription:"Poista tunniste painamalla Poista-painiketta."},"fr-FR":{removeButtonLabel:"Supprimer",removeDescription:"Appuyez sur Supprimer pour supprimer l\u2019\xE9tiquette."},"he-IL":{removeButtonLabel:"\u05D4\u05E1\u05E8",removeDescription:"\u05DC\u05D7\u05E5 \u05E2\u05DC \u05DE\u05D7\u05E7 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E1\u05D9\u05E8 \u05EA\u05D2."},"hr-HR":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Delete za uklanjanje oznake."},"hu-HU":{removeButtonLabel:"Elt\xE1vol\xEDt\xE1s",removeDescription:"Nyomja meg a Delete billenty\u0171t a c\xEDmke elt\xE1vol\xEDt\xE1s\xE1hoz."},"it-IT":{removeButtonLabel:"Rimuovi",removeDescription:"Premi Elimina per rimuovere il tag."},"ja-JP":{removeButtonLabel:"\u524A\u9664",removeDescription:"\u30BF\u30B0\u3092\u524A\u9664\u3059\u308B\u306B\u306F\u3001Delete \u30AD\u30FC\u3092\u62BC\u3057\u307E\u3059\u3002"},"ko-KR":{removeButtonLabel:"\uC81C\uAC70",removeDescription:"\uD0DC\uADF8\uB97C \uC81C\uAC70\uD558\uB824\uBA74 Delete \uD0A4\uB97C \uB204\uB974\uC2ED\uC2DC\uC624."},"lt-LT":{removeButtonLabel:"Pa\u0161alinti",removeDescription:"Nor\u0117dami pa\u0161alinti \u017Eym\u0105, paspauskite \u201EDelete\u201C klavi\u0161\u0105."},"lv-LV":{removeButtonLabel:"No\u0146emt",removeDescription:"Nospiediet Delete [Dz\u0113st], lai no\u0146emtu tagu."},"nb-NO":{removeButtonLabel:"Fjern",removeDescription:"Trykk p\xE5 Slett for \xE5 fjerne taggen."},"nl-NL":{removeButtonLabel:"Verwijderen",removeDescription:"Druk op Verwijderen om de tag te verwijderen."},"pl-PL":{removeButtonLabel:"Usu\u0144",removeDescription:"Naci\u015Bnij Usu\u0144, aby usun\u0105\u0107 znacznik."},"pt-BR":{removeButtonLabel:"Remover",removeDescription:"Pressione Delete para remover a tag."},"pt-PT":{removeButtonLabel:"Eliminar",removeDescription:"Prima Delete para eliminar a tag."},"ro-RO":{removeButtonLabel:"\xCEndep\u0103rta\u0163i",removeDescription:"Ap\u0103sa\u021Bi pe Delete (\u0218tergere) pentru a elimina eticheta."},"ru-RU":{removeButtonLabel:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",removeDescription:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 DELETE, \u0447\u0442\u043E\u0431\u044B \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u0435\u0433."},"sk-SK":{removeButtonLabel:"Odstr\xE1ni\u0165",removeDescription:"Ak chcete odstr\xE1ni\u0165 zna\u010Dku, stla\u010Dte kl\xE1ves Delete."},"sl-SI":{removeButtonLabel:"Odstrani",removeDescription:"Pritisnite Delete, da odstranite oznako."},"sr-SP":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Obri\u0161i da biste uklonili oznaku."},"sv-SE":{removeButtonLabel:"Ta bort",removeDescription:"Tryck p\xE5 Radera f\xF6r att ta bort taggen."},"tr-TR":{removeButtonLabel:"Kald\u0131r",removeDescription:"Etiketi kald\u0131rmak i\xE7in Sil tu\u015Funa bas\u0131n."},"uk-UA":{removeButtonLabel:"\u0412\u0438\u043B\u0443\u0447\u0438\u0442\u0438",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C Delete, \u0449\u043E\u0431 \u0432\u0438\u043B\u0443\u0447\u0438\u0442\u0438 \u0442\u0435\u0433."},"zh-CN":{removeButtonLabel:"\u5220\u9664",removeDescription:"\u6309\u4E0B\u201C\u5220\u9664\u201D\u4EE5\u5220\u9664\u6807\u8BB0\u3002"},"zh-TW":{removeButtonLabel:"\u79FB\u9664",removeDescription:"\u6309 Delete \u9375\u4EE5\u79FB\u9664\u6A19\u8A18\u3002"}};function I(i,e,a){let{item:o}=i,r=b$2(ee,"@react-aria/tag"),p=c$2(),{onRemove:t}=H.get(e)||{},{rowProps:s,gridCellProps:l,...u}=c$3({node:o},e,a),{descriptionProps:c$1,...g}=u,m=e.disabledKeys.has(o.key)||o.props.isDisabled,{keyboardProps:b}=j({isDisabled:m,shortcuts:{Delete:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));},Backspace:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));}},allowRepeats:true}),n=f$1();n==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(n="pointer");let T=t&&(n==="keyboard"||n==="virtual")?r.format("removeDescription"):"",P=d$1(T,a),D=o.key===e.selectionManager.focusedKey,L=e.selectionManager.focusedKey!=null,y=-1;!m&&(D||!L)&&(y=0);let k=a$6(o.props),B=q(o.props),{focusableProps:h}=c$4({...o.props,isDisabled:m},a);return {removeButtonProps:{"aria-label":r.format("removeButtonLabel"),"aria-labelledby":`${p} ${s.id}`,isDisabled:m,id:p,onPress:()=>t?t(new Set([o.key])):null},rowProps:c(h,s,k,B,{tabIndex:y,...t?b:{},"aria-describedby":P["aria-describedby"]}),gridCellProps:c(l,{"aria-errormessage":i["aria-errormessage"],"aria-label":i["aria-label"]}),...g,allowsRemoving:!!t}}var te=f.createContext(null),re=f.createContext(null);var ae=f.forwardRef((i,e)=>{let a=f.useContext(te),o=f.useContext(re);return a&&o?jsx(se,{...i,ref:e,groupCtx:a,itemCtx:o}):jsx(ie,{...i,ref:e})});ae.displayName="Tag";var ie=f.forwardRef(({children:i,variant:e="neutral",size:a$2="md",icon:o,isDisabled:r=false,isSelected:p=false,onRemove:t,className:s,style:l,"data-block-id":u,"data-block-class":c$1},g)=>{let{focusProps:m,isFocusVisible:b}=a({within:true}),{hoverProps:n,isHovered:T}=a$1({isDisabled:r}),{hoverProps:P,isHovered:D}=a$1({isDisabled:r}),L=!!t;return jsx(w,{ref:g,outerProps:c(m,P),variant:e,size:a$2,Icon:o,isDisabled:r,isSelected:p,isFocusVisible:b,isTagHovered:D,allowsRemoving:L,allowsSelection:false,removeButtonProps:n,defaultRemoveProps:{"aria-label":"Remove",disabled:r,onClick:t},isRemoveHovered:T,className:s,style:l,"data-block-id":u,"data-block-class":c$1,children:i})});ie.displayName="TagStandalone";var se=f.forwardRef(({groupCtx:i,itemCtx:e,variant:a$3,...o},r)=>{let{state:p,variant:t,size:s}=i,{item:l}=e,u=f.useRef(null),{rowProps:c$1,gridCellProps:g,removeButtonProps:m,allowsRemoving:b$1,isDisabled:n,isSelected:T,allowsSelection:P}=I({item:l},p,u),D=f.useRef(null),{buttonProps:L}=a$2({...m,excludeFromTabOrder:true},D),{focusProps:y,isFocusVisible:k}=a({within:true}),{hoverProps:B,isHovered:h}=a$1({isDisabled:n}),{hoverProps:ne,isHovered:le}=a$1({isDisabled:n}),me=l.value?.icon,pe=l.value?.data?.variant??a$3??t,ce=o.size??s??"md";return jsx(w,{ref:b(u,r),outerProps:c(c$1,y,ne),gridCellProps:g,variant:pe,size:ce,Icon:me,isDisabled:n,isSelected:T,isFocusVisible:k,isTagHovered:le,allowsRemoving:b$1,allowsSelection:P,removeButtonProps:c(L,B),isRemoveHovered:h,children:l.rendered})});se.displayName="TagInGroup";var w=f.forwardRef(({children:i,outerProps:e$1,gridCellProps:a,variant:o="neutral",size:r,Icon:p,isDisabled:t,isSelected:s,isFocusVisible:l,isTagHovered:u,allowsRemoving:c$2,allowsSelection:g,removeButtonProps:m,defaultRemoveProps:b,isRemoveHovered:n,className:T,style:P,"data-block-id":D,"data-block-class":L},y)=>{let k=r==="md"?XIcon:XIcon$1,B=r==="md"?CheckmarkIcon:CheckmarkIcon$1;return jsx("div",{...e$1,ref:y,"aria-disabled":t||void 0,className:a$3(b$1({isFocusVisible:l,variant:o,isDisabled:t,allowsRemoving:c$2,isSelected:s,allowsSelection:g,isHovered:u,size:r}),e({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag",T),style:P,"data-block-id":D,"data-block-class":L,children:jsxs("div",{...a,className:c$1,children:[s?jsx(B,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,!s&&p?jsx(p,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,jsx(a$5,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:i}),c$2?jsx("button",{type:"button",...c(m,b??{}),className:d({variant:o,isHovered:n}),children:jsx(k,{size:r==="md"?12:8})}):null]})})});w.displayName="TagView";export{ge as a,te as b,re as c,ae as d};
10
+ var H=new WeakMap;function fe(i,e,a){let{direction:o}=b$4(),r=i.keyboardDelegate||new b$5({collection:e.collection,ref:a,orientation:"horizontal",direction:o,disabledKeys:e.disabledKeys,disabledBehavior:e.selectionManager.disabledBehavior}),{labelProps:p,fieldProps:t,descriptionProps:s,errorMessageProps:l}=a$7({...i,labelElementType:"span",ref:a}),{gridProps:u}=b$6({...i,...t,keyboardDelegate:r,shouldFocusWrap:true,linkBehavior:"override",keyboardNavigationBehavior:"tab"},e,a),[c$1,g]=useState(false),{focusWithinProps:m}=b$7({onFocusWithinChange:g}),b=a$6(i),n=useRef(e.collection.size);return useEffect(()=>{a.current&&n.current>0&&e.collection.size===0&&c$1&&a.current.focus(),n.current=e.collection.size;},[e.collection.size,c$1,a]),H.set(e,{onRemove:i.onRemove}),{gridProps:c(u,b,{role:e.collection.size?"grid":"group","aria-atomic":false,"aria-relevant":"additions","aria-live":c$1?"polite":"off",...m,...t}),labelProps:p,descriptionProps:s,errorMessageProps:l}}var te={"ar-AE":{removeButtonLabel:"\u0625\u0632\u0627\u0644\u0629",removeDescription:"\u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D DELETE \u0644\u0625\u0632\u0627\u0644\u0629 \u0639\u0644\u0627\u0645\u0629."},"bg-BG":{removeButtonLabel:"\u041F\u0440\u0435\u043C\u0430\u0445\u0432\u0430\u043D\u0435",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Delete, \u0437\u0430 \u0434\u0430 \u043F\u0440\u0435\u043C\u0430\u0445\u043D\u0435\u0442\u0435 \u043C\u0430\u0440\u043A\u0435\u0440\u0430."},"cs-CZ":{removeButtonLabel:"Odebrat",removeDescription:"Stisknut\xEDm kl\xE1vesy Delete odeberete zna\u010Dku."},"da-DK":{removeButtonLabel:"Fjern",removeDescription:"Tryk p\xE5 Slet for at fjerne tag."},"de-DE":{removeButtonLabel:"Entfernen",removeDescription:"Auf \u201EL\xF6schen\u201C dr\xFCcken, um das Tag zu entfernen."},"el-GR":{removeButtonLabel:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7",removeDescription:"\u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BA\u03B1\u03C4\u03B1\u03C1\u03B3\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03C4\u03B9\u03BA\u03AD\u03C4\u03B1."},"en-US":{removeDescription:"Press Delete to remove tag.",removeButtonLabel:"Remove"},"es-ES":{removeButtonLabel:"Quitar",removeDescription:"Pulse Eliminar para quitar la etiqueta."},"et-EE":{removeButtonLabel:"Eemalda",removeDescription:"Sildi eemaldamiseks vajutage kustutusklahvi Delete."},"fi-FI":{removeButtonLabel:"Poista",removeDescription:"Poista tunniste painamalla Poista-painiketta."},"fr-FR":{removeButtonLabel:"Supprimer",removeDescription:"Appuyez sur Supprimer pour supprimer l\u2019\xE9tiquette."},"he-IL":{removeButtonLabel:"\u05D4\u05E1\u05E8",removeDescription:"\u05DC\u05D7\u05E5 \u05E2\u05DC \u05DE\u05D7\u05E7 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E1\u05D9\u05E8 \u05EA\u05D2."},"hr-HR":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Delete za uklanjanje oznake."},"hu-HU":{removeButtonLabel:"Elt\xE1vol\xEDt\xE1s",removeDescription:"Nyomja meg a Delete billenty\u0171t a c\xEDmke elt\xE1vol\xEDt\xE1s\xE1hoz."},"it-IT":{removeButtonLabel:"Rimuovi",removeDescription:"Premi Elimina per rimuovere il tag."},"ja-JP":{removeButtonLabel:"\u524A\u9664",removeDescription:"\u30BF\u30B0\u3092\u524A\u9664\u3059\u308B\u306B\u306F\u3001Delete \u30AD\u30FC\u3092\u62BC\u3057\u307E\u3059\u3002"},"ko-KR":{removeButtonLabel:"\uC81C\uAC70",removeDescription:"\uD0DC\uADF8\uB97C \uC81C\uAC70\uD558\uB824\uBA74 Delete \uD0A4\uB97C \uB204\uB974\uC2ED\uC2DC\uC624."},"lt-LT":{removeButtonLabel:"Pa\u0161alinti",removeDescription:"Nor\u0117dami pa\u0161alinti \u017Eym\u0105, paspauskite \u201EDelete\u201C klavi\u0161\u0105."},"lv-LV":{removeButtonLabel:"No\u0146emt",removeDescription:"Nospiediet Delete [Dz\u0113st], lai no\u0146emtu tagu."},"nb-NO":{removeButtonLabel:"Fjern",removeDescription:"Trykk p\xE5 Slett for \xE5 fjerne taggen."},"nl-NL":{removeButtonLabel:"Verwijderen",removeDescription:"Druk op Verwijderen om de tag te verwijderen."},"pl-PL":{removeButtonLabel:"Usu\u0144",removeDescription:"Naci\u015Bnij Usu\u0144, aby usun\u0105\u0107 znacznik."},"pt-BR":{removeButtonLabel:"Remover",removeDescription:"Pressione Delete para remover a tag."},"pt-PT":{removeButtonLabel:"Eliminar",removeDescription:"Prima Delete para eliminar a tag."},"ro-RO":{removeButtonLabel:"\xCEndep\u0103rta\u0163i",removeDescription:"Ap\u0103sa\u021Bi pe Delete (\u0218tergere) pentru a elimina eticheta."},"ru-RU":{removeButtonLabel:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",removeDescription:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 DELETE, \u0447\u0442\u043E\u0431\u044B \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u0435\u0433."},"sk-SK":{removeButtonLabel:"Odstr\xE1ni\u0165",removeDescription:"Ak chcete odstr\xE1ni\u0165 zna\u010Dku, stla\u010Dte kl\xE1ves Delete."},"sl-SI":{removeButtonLabel:"Odstrani",removeDescription:"Pritisnite Delete, da odstranite oznako."},"sr-SP":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Obri\u0161i da biste uklonili oznaku."},"sv-SE":{removeButtonLabel:"Ta bort",removeDescription:"Tryck p\xE5 Radera f\xF6r att ta bort taggen."},"tr-TR":{removeButtonLabel:"Kald\u0131r",removeDescription:"Etiketi kald\u0131rmak i\xE7in Sil tu\u015Funa bas\u0131n."},"uk-UA":{removeButtonLabel:"\u0412\u0438\u043B\u0443\u0447\u0438\u0442\u0438",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C Delete, \u0449\u043E\u0431 \u0432\u0438\u043B\u0443\u0447\u0438\u0442\u0438 \u0442\u0435\u0433."},"zh-CN":{removeButtonLabel:"\u5220\u9664",removeDescription:"\u6309\u4E0B\u201C\u5220\u9664\u201D\u4EE5\u5220\u9664\u6807\u8BB0\u3002"},"zh-TW":{removeButtonLabel:"\u79FB\u9664",removeDescription:"\u6309 Delete \u9375\u4EE5\u79FB\u9664\u6A19\u8A18\u3002"}};function I(i,e,a){let{item:o}=i,r=b$3(te,"@react-aria/tag"),p=c$3(),{onRemove:t}=H.get(e)||{},{rowProps:s,gridCellProps:l,...u}=c$4({node:o},e,a),{descriptionProps:c$1,...g}=u,m=e.disabledKeys.has(o.key)||o.props.isDisabled,{keyboardProps:b}=j({isDisabled:m,shortcuts:{Delete:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));},Backspace:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));}},allowRepeats:true}),n=f();n==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(n="pointer");let P=t&&(n==="keyboard"||n==="virtual")?r.format("removeDescription"):"",D=d$1(P,a),L=o.key===e.selectionManager.focusedKey,y=e.selectionManager.focusedKey!=null,f$1=-1;!m&&(L||!y)&&(f$1=0);let k=a$6(o.props),B=q(o.props),{focusableProps:h}=c$5({...o.props,isDisabled:m},a);return {removeButtonProps:{"aria-label":r.format("removeButtonLabel"),"aria-labelledby":`${p} ${s.id}`,isDisabled:m,id:p,onPress:()=>t?t(new Set([o.key])):null},rowProps:c(h,s,k,B,{tabIndex:f$1,...t?b:{},"aria-describedby":D["aria-describedby"]}),gridCellProps:c(l,{"aria-errormessage":i["aria-errormessage"],"aria-label":i["aria-label"]}),...g,allowsRemoving:!!t}}var ae=T.createContext(null),ie=T.createContext(null);var se=T.forwardRef((i,e)=>{let a=T.useContext(ae),o=T.useContext(ie);return a&&o?jsx(le,{...i,ref:e,groupCtx:a,itemCtx:o}):jsx(ne,{...i,ref:e})});se.displayName="Tag";var ne=T.forwardRef(({children:i,variant:e="neutral",size:a$2="md",icon:o,isDisabled:r=false,isSelected:p=false,onRemove:t,removeLabel:s,className:l,style:u,"data-block-id":c$1,"data-block-class":g},m)=>{let{formatMessage:b$1}=b(),{focusProps:n,isFocusVisible:P}=a({within:true}),{hoverProps:D,isHovered:L}=a$1({isDisabled:r}),{hoverProps:y,isHovered:f}=a$1({isDisabled:r}),k=!!t;return jsx(w,{ref:m,outerProps:c(n,y),variant:e,size:a$2,Icon:o,isDisabled:r,isSelected:p,isFocusVisible:P,isTagHovered:f,allowsRemoving:k,allowsSelection:false,removeButtonProps:D,defaultRemoveProps:{"aria-label":s??b$1(ye.remove),disabled:r,onClick:t},isRemoveHovered:L,className:l,style:u,"data-block-id":c$1,"data-block-class":g,children:i})});ne.displayName="TagStandalone";var le=T.forwardRef(({groupCtx:i,itemCtx:e,variant:a$3,...o},r)=>{let{state:p,variant:t,size:s}=i,{item:l}=e,u=T.useRef(null),{rowProps:c$1,gridCellProps:g,removeButtonProps:m,allowsRemoving:b,isDisabled:n,isSelected:P,allowsSelection:D}=I({item:l},p,u),L=T.useRef(null),{buttonProps:y}=a$2({...m,excludeFromTabOrder:true},L),{focusProps:f,isFocusVisible:k}=a({within:true}),{hoverProps:B,isHovered:h}=a$1({isDisabled:n}),{hoverProps:me,isHovered:pe}=a$1({isDisabled:n}),ce=l.value?.icon,ue=l.value?.data?.variant??a$3??t,de=o.size??s??"md";return jsx(w,{ref:b$1(u,r),outerProps:c(c$1,f,me),gridCellProps:g,variant:ue,size:de,Icon:ce,isDisabled:n,isSelected:P,isFocusVisible:k,isTagHovered:pe,allowsRemoving:b,allowsSelection:D,removeButtonProps:c(y,B),isRemoveHovered:h,children:l.rendered})});le.displayName="TagInGroup";var w=T.forwardRef(({children:i,outerProps:e$1,gridCellProps:a,variant:o="neutral",size:r,Icon:p,isDisabled:t,isSelected:s,isFocusVisible:l,isTagHovered:u,allowsRemoving:c$2,allowsSelection:g,removeButtonProps:m,defaultRemoveProps:b,isRemoveHovered:n,className:P,style:D,"data-block-id":L,"data-block-class":y},f)=>{let k=r==="md"?XIcon:XIcon$1,B=r==="md"?CheckmarkIcon:CheckmarkIcon$1;return jsx("div",{...e$1,ref:f,"aria-disabled":t||void 0,className:a$3(b$2({isFocusVisible:l,variant:o,isDisabled:t,allowsRemoving:c$2,isSelected:s,allowsSelection:g,isHovered:u,size:r}),e({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag",P),style:D,"data-block-id":L,"data-block-class":y,children:jsxs("div",{...a,className:c$1,children:[s?jsx(B,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,!s&&p?jsx(p,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,jsx(a$5,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:i}),c$2?jsx("button",{type:"button",...c(m,b??{}),className:d({variant:o,isHovered:n}),children:jsx(k,{size:r==="md"?12:8})}):null]})})});w.displayName="TagView";var ye=c$2({remove:{id:"bui.tag.remove",defaultMessage:"Remove"}});export{fe as a,ae as b,ie as c,se as d};
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-CU6D2EA6.mjs';import {e}from'./chunk-J4OPD7OL.mjs';import {a as a$2}from'./chunk-2VY4FAOY.mjs';import {j}from'./chunk-PPHSLODC.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {a,i,b as b$1,h,e as e$1,l}from'./chunk-SD43KVTU.mjs';import {useState,useRef,useEffect,useCallback}from'react';/**
1
+ import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-CU6D2EA6.mjs';import {e}from'./chunk-TZGK36KC.mjs';import {a as a$2}from'./chunk-2VY4FAOY.mjs';import {j}from'./chunk-PPHSLODC.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {a,i,b as b$1,h,e as e$1,l}from'./chunk-SD43KVTU.mjs';import {useState,useRef,useEffect,useCallback}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import r from'dompurify';/**
1
+ /**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import r from'dompurify';/**
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var s=t=>t.charAt(0).toUpperCase()+t.slice(1),i=t=>new DOMParser().parseFromString(r.sanitize(t),"text/html").body.textContent||"";export{s as a,i as b};
10
+ function n(e,t){return e===void 0||typeof e=="string"?void 0:{type:"button",disabled:t}}export{n as a};
@@ -0,0 +1,10 @@
1
+ import {e}from'./chunk-FCKJCFMD.mjs';import {a}from'./chunk-66CUIXA6.mjs';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function s(n){if(n===void 0)return null;try{return e(n)}catch{return null}}function l(n){return n.toString(16).padStart(2,"0")}function m(n,r){a(r>=0&&r<=100,"Percent must be between 0 and 100");let t=e(n).toFormat("rgb"),o=t.getChannelValue("red"),u=t.getChannelValue("green"),a$1=t.getChannelValue("blue"),g=Math.round(o+(255-o)*r/100),c=Math.round(u+(255-u)*r/100),d=Math.round(a$1+(255-a$1)*r/100);return `#${l(g)}${l(c)}${l(d)}`}function C(n,r){if(n===r)return true;let t=s(n),o=s(r);return t===null||o===null?false:t.toString("rgba")===o.toString("rgba")}export{m as a,C as b};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-TH4XPZEO.mjs';import {a as a$1}from'./chunk-ONEE6UCM.mjs';/**
1
+ import {a}from'./chunk-IM3E5JL4.mjs';import {a as a$1}from'./chunk-MHAPHPNN.mjs';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-COHK4QQW.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {c}from'./chunk-ETM4MNG4.mjs';/**
1
+ import {a}from'./chunk-EGLD5KVP.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {c}from'./chunk-ETM4MNG4.mjs';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {i}from'./chunk-MBRNO6IW.mjs';import {a as a$1}from'./chunk-VDUFLHKK.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$2}from'./chunk-SGZWUG3H.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c,b,a as a$6}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SD43KVTU.mjs';import R,{useState,useEffect,useContext}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function M(t,e){let o=t?.getRootNode();return (o&&"getElementById"in o?o:a(t)).getElementById(e)}function H(t,e){let o=e.split(/\s+/).filter(Boolean).map(n=>M(t,n)?.textContent).filter(n=>!!n);return o.length>0?o.join(" "):void 0}function d(t,e,o){let{isSelected:n}=e,{isPressed:s,buttonProps:r}=a$2({...t,onPress:a$6(e.toggle,t.onPress)},o);return {isPressed:s,isSelected:n,isDisabled:t.isDisabled||false,buttonProps:c(r,{"aria-pressed":n})}}function Z({tooltip:t,"aria-label":e,"aria-labelledby":o},n){let[s,r]=useState(e||"");useEffect(()=>{o?r(H(n.current,o)??e??""):e&&r(e);},[o,n,e]);let{tooltipProps:i}=a$1({label:s,tooltip:t});return {tooltipProps:i}}var _=t=>{let e=R.useRef(null),{ref:o,...n}=useContext(i),{buttonProps:s,isPressed:r}=a$2(c(t,n),e),{isFocusVisible:i$1,isFocused:l,focusProps:p}=a$3(),{hoverProps:c$1,isHovered:a}=a$4({isDisabled:t.isDisabled});return {buttonProps:c(a$5(t.elementType,t.isDisabled),s,p,c$1),isPressed:r,ref:b(e,o||null),isFocusVisible:i$1,isFocused:l,isHovered:a,uiStateOptions:{isHovered:a,isFocused:l,isPressed:r,isDisabled:t.isDisabled,isFocusVisible:i$1}}},$=(t,e)=>{let o=R.useRef(null),{ref:n,...s}=useContext(i),{buttonProps:r,isPressed:i$1}=d(c(t,s),e,o);(r.role==="radio"||r.role==="checkbox")&&(r["aria-pressed"]=void 0);let{isFocusVisible:l,isFocused:p,focusProps:c$1}=a$3(),{hoverProps:a,isHovered:A}=a$4({isDisabled:t.isDisabled});return {buttonProps:c(a$5(t.elementType,t.isDisabled),r,c$1,a),isPressed:i$1,ref:b(o,n||null),isFocusVisible:l,isFocused:p,isHovered:A,uiStateOptions:{isHovered:A,isFocused:p,isPressed:i$1,isDisabled:t.isDisabled,isFocusVisible:l,isSelected:e.isSelected}}};export{M as a,H as b,Z as c,_ as d,$ as e};
@@ -0,0 +1,10 @@
1
+ import {a as a$6}from'./chunk-3M3WJHOI.mjs';import {a as a$e}from'./chunk-LBHZV4BO.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-6GMU63H2.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-OMWMNUTI.mjs';import {p}from'./chunk-YQHHE5AT.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-X5ORCNAU.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-PLZ6ZFEO.mjs';import {a as a$d}from'./chunk-O6FPWOHR.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-7MLFM55C.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-AFOW62QN.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-VXZT2JR2.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var $=new WeakMap;function ue(t,e,a){let{keyboardDelegate:n,isDisabled:f,isRequired:y,name:c,form:S,validationBehavior:i="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:m,menuProps:s}=c$4({isDisabled:f,type:"listbox"},e,a),{keyboardProps:d}=j$1({shortcuts:{ArrowLeft:()=>{if(e.selectionManager.selectionMode==="multiple")return false;let u=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();u!=null&&e.setSelectedKey(u);},ArrowRight:()=>{if(e.selectionManager.selectionMode==="multiple")return false;let u=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();u!=null&&e.setSelectedKey(u);}},allowRepeats:true,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp}),{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(u){e.setSelectedKey(u);}}),{isInvalid:g,validationErrors:b,validationDetails:T}=e.displayValidation,{labelProps:O,fieldProps:r,descriptionProps:M,errorMessageProps:p}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,m,r),C=c$3();return $.set(e,{isDisabled:f,isRequired:y,name:c,form:S,validationBehavior:i}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:f,onKeyDown:a$o(P.onKeyDown,d.onKeyDown),onKeyUp:d.onKeyUp,"aria-labelledby":[C,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(u){e.isFocused||(t.onFocus&&t.onFocus(u),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(u){e.isOpen||(t.onBlur&&t.onBlur(u),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:C},menuProps:{...s,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:u=>{h$2(u.currentTarget,u.relatedTarget)||(t.onBlur&&t.onBlur(u),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[r["aria-labelledby"],P["aria-label"]&&!r["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:p,isInvalid:g,validationErrors:b,validationDetails:T,hiddenSelectProps:{isDisabled:f,name:c,label:t.label,state:e,triggerRef:a,form:S}}}function vt(t,e,a){let n=$.get(e)||{},{autoComplete:f,name:y=n.name,form:c=n.form,isDisabled:S=n.isDisabled}=t,{validationBehavior:i,isRequired:x}=n,{visuallyHiddenProps:l}=a$s({style:{position:"fixed",top:0,left:0}});a$t(t.selectRef,e.defaultValue,e.setValue),a$u({validationBehavior:i,focus:()=>a.current?.focus()},e,t.selectRef);let m=e.setValue,s=useCallback(d=>{let o=j$2(d);o.multiple?m(Array.from(o.selectedOptions,g=>g.value)):m(d.currentTarget.value);},[m]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:f,disabled:S,multiple:e.selectionManager.selectionMode==="multiple",required:i==="native"&&x,name:y,form:c,value:e.value??"",onChange:s,onInput:s}}}function me(t){let{state:e,triggerRef:a,label:n,name:f,form:y,isDisabled:c}=t,S=useRef(null),i=useRef(null),{containerProps:x,selectProps:l}=vt({...t,selectRef:e.collection.size<=300?S:i},e,a),m=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:S,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(s=>{let d=e.collection.getItem(s);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&f&&m.map((s,d)=>jsx("option",{value:s??""},d))]})]})});if(f){let s=$.get(e)||{},{validationBehavior:d}=s;m.length===0&&(m=[null]);let o=m.map((g,b)=>{let T={type:"hidden",autoComplete:l.autoComplete,name:f,form:y,disabled:c,value:g??""};return d==="native"?jsx("input",{...T,ref:b===0?i:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...T,ref:b===0?i:null},b)});return jsx(Fragment,{children:o})}return null}function fe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$q(t),[f,y]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),S=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[i,x]=a$r(S,c,t.onChange),l=e==="single"&&Array.isArray(i)?i[0]:i,m=r=>{if(e==="single"){let M=Array.isArray(r)?r[0]??null:r;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(r)?M=r:r!=null&&(M=[r]),x(M);}},s=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>It(l),[l]),onSelectionChange:r=>{if(r!=="all"){if(e==="single"){let M=r.values().next().value??null;m(M);}else m([...r]);a&&n.close(),g.commitValidation();}}}),d=s.selectionManager.firstSelectedKey,o=useMemo(()=>[...s.selectionManager.selectedKeys].map(r=>s.collection.getItem(r)).filter(r=>r!=null),[s.selectionManager.selectedKeys,s.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,T]=useState(false),[O]=useState(l);return {...g,...s,...n,value:l,defaultValue:c??O,setValue:m,selectedKey:d,setSelectedKey:m,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:f,open(r=null){(s.collection.size!==0||t.allowsEmptyCollection)&&(y(r),n.open());},toggle(r=null){(s.collection.size!==0||t.allowsEmptyCollection)&&(y(r),n.toggle());},isFocused:b,setFocused:T}}function It(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var q=W.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:f,style:y,value:c$2,"data-block-id":S,"data-block-class":i$1,fallbackValue:x,selectionMode:l="single",onRemove:m,maxCount:s=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),T=c$2?.[0]??null,O=T?.label??x,r=T?.icon??null,M=W.useRef(null),p=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:C,isHovered:u}=a$1({isDisabled:o.isDisabled}),{focusProps:D,isFocused:j$1,isFocusVisible:I}=a$2(),E=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let L=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":j$1,"data-focus-visible":I,"data-hovered":u,"data-pressed":P,"data-open":e,"data-block-id":S,"data-block-class":i$1}),F=o["aria-labelledby"]?.split(/\s+/).filter(R=>R&&R!==n?.id).join(" ")||void 0,ne=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let R=c$2.slice(0,s),k$1=c$2.slice(s),X=[...R,...k$1.length>0?[{label:(typeof d$1=="function"?d$1({count:k$1.length}):d$1)??b$2(Vt.more,{count:k$1.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:X,onRemove:o.isReadOnly?void 0:_=>{_.has("remaining-value")?m?.(new Set(k$1.map(N=>N.id))):m?.(_);},"aria-labelledby":F,className:k,isDisabled:o.isDisabled})},[c$2,s,b$2,d$1,F,o.isDisabled,m,o.isReadOnly]),U=l==="multiple";return jsxs("div",{...c$1(U?Object.fromEntries(Object.entries(B).filter(([R])=>R.startsWith("on"))):c$1(B,D),C,L),ref:U?g$1:b$1(g$1,M),className:a$8(i({isFocused:I,isDisabled:!!o.isDisabled,isOpen:e,isHovered:u,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:p}),h({variant:t,isHovered:u,isFocused:I,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),f,"BaselineUI-Select-Button"),"data-testid":"select-button",style:y,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?jsxs(Fragment,{children:[jsx("span",{...n,hidden:true,"aria-label":c$2.map(R=>R.label).join(", ")}),ne()]}):jsxs("span",{className:k,children:[r?jsx(r,{size:24}):null,jsx("span",{...n,children:O})]}),E?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j),children:jsx(E,{size:16})}):null]}),jsx("div",{...U?{...c$1(B,D),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});q.displayName="SelectButton";var Vt=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var Tt=W.createContext({state:null,popoverAnchorRef:null}),Se=W.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":f$2,"data-block-class":y,onTriggerPress:c,placement:S="bottom start",triggerClassName:i,triggerStyle:x,state:l,optionStyle:m,optionClassName:s,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:T,selectAllLabel:O,moreLabel:r,renderTrigger:M=({buttonProps:P,selectedValue:C,valueProps:u,isOpen:D,ref:j,selectionMode:I,onRemove:E,maxCount:L})=>jsx(q,{...P,className:i,style:x,isOpen:D,isReadOnly:p$1.isReadOnly,ref:j,variant:n,validationState:p$1.validationState,valueProps:u,value:C,fallbackValue:p$1.placeholder,selectionMode:I,onRemove:E,maxCount:L,moreLabel:r}),...p$1},B)=>{let{popoverAnchorRef:P}=useContext(Tt),C=W.useRef(null),{formatMessage:u}=b(),D=T??u(ye.search),j=useContext(a$9),{isVirtualized:I}=useContext(p),E=a$a(p$1.portalContainer),{labelProps:L,triggerProps:F,valueProps:ne,menuProps:U,descriptionProps:R,errorMessageProps:k}=ue({...a$b(p$1),validationState:p$1.validationState==="error"?"invalid":"valid"},l,C),X=c$3(),_=a$c(p$1)==="warningMessage",N=b$2({...p$1,descriptionProps:R,errorMessageProps:k,warningMessageProps:{id:X},labelPosition:a}),Kt=w=>{L.onClick?.(w),!(p$1.isDisabled||!F.id)&&a$p(C.current,F.id)?.focus();},Ot=l.selectedItems?.map(w=>w.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":f$2,"data-block-class":y,ref:B,children:[p$1.label||N?jsxs("div",{className:f({labelPosition:a,hasMessage:!!N}),children:[p$1.label?jsx("div",{...L,onClick:Kt,className:a$8(e,"BaselineUI-Select-Label"),children:p$1.label}):null,a==="start"&&N]}):null,jsx(me,{state:l,triggerRef:C,isDisabled:p$1.isDisabled,label:p$1.label,name:p$1.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":L.id},F,_?{"aria-describedby":[F["aria-describedby"],X].filter(Boolean).join(" ")}:null),selectedValue:Ot,valueProps:ne,isOpen:l.isOpen,ref:C,selectionMode:p$1.selectionMode??"single",onRemove:w=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ie=>!w.has(ie))));},maxCount:p$1.maxCount??2}),a==="top"&&N]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:S,state:l,portalContainer:E,offset:2,triggerRef:P||C,style:e$2,className:"BaselineUI-Select-Popover",...p$1,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[j?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":D,placeholder:D,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:U,children:jsx(q$1,{label:p$1.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:I}),optionStyle:m,optionClassName:s,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??u(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ie=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ie));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??u(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Ct=W.forwardRef(({collection:t,...e},a)=>{let n=fe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Ct.displayName="SelectStandalone";var oe=W.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},f)=>{let{state:y}=useContext(Tt);useEffect(()=>{a$5(y||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,y]);let c=useMemo(()=>({renderOption:(S,i)=>jsx(n,{...i,item:S,selectionIcon:i.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return y?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:f,state:y}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:S=>jsx(Ct,{collection:S,...n$1,ref:f})})});oe.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var ht=W.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,"data-block-class":f,icon:y,tooltip:c=true,iconTooltip:S=true,...i},x)=>{let l=W.useRef(null),{tooltipProps:m}=a$i({label:i["aria-label"],tooltip:c}),s=useCallback(({buttonProps:d,selectedValue:o,valueProps:g,isOpen:b,ref:T})=>jsx(a$j,{...m,children:jsx(q,{...d,className:i.triggerClassName,style:i.triggerStyle,isOpen:b,isReadOnly:i.isReadOnly,ref:T,variant:a,validationState:i.validationState,value:o,fallbackValue:i.placeholder,valueProps:g,moreLabel:i.moreLabel})}),[i,m,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,"data-block-class":f,style:e,ref:b$1(x,l),children:[y?jsx(a$k,{icon:y,label:i["aria-label"],tooltip:S,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(oe,{...i,renderTrigger:s})]})});ht.displayName="IconSelect";export{fe as a,Tt as b,oe as c,ht as d};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {d}from'./chunk-NJKSUI2F.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import D from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {e}from'./chunk-IROFSPEN.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {d}from'./chunk-NJKSUI2F.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var k=a({defaultClassName:"_5uw3kp0 oom8bs0 z9nup81",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true},"_5uw3kpa"],[{isSelected:true,isDisabled:true},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),v=a({defaultClassName:"_5uw3kpd _1yep5z6f9",variantClassNames:{isDisabled:{true:"_1yep5z611u"},isSelected:{true:"_1yep5z611w"}},defaultVariants:{},compoundVariants:[]});var z={sm:16,md:20,lg:24},w=D.forwardRef(({className:t,style:a,iconStart:u,size:s="md",elementType:r="button",variant:_="toolbar",...e},y)=>{let o=a$1(e),{buttonProps:h,isPressed:x,ref:B,isFocusVisible:l,isFocused:T,isHovered:n,uiStateOptions:d$1}=d({...e,elementType:r},o),S=r==="button"?void 0:{type:"button",disabled:e.isDisabled},C=a$2({"data-block-id":e["data-block-id"],"data-block-class":e["data-block-class"],"data-focused":T,"data-focus-visible":l,"data-disabled":e.isDisabled,"data-hovered":n,"data-pressed":x,"data-selected":o.isSelected});return jsxs(r,{...c(S,h,C),className:a$3(k({isHovered:n,isFocusVisible:l,isSelected:o.isSelected,size:s,isDisabled:e.isDisabled,variant:_}),"BaselineUI-ToggleButton",typeof t=="function"?t(d$1):t),style:typeof a=="function"?a(d$1):a,ref:b(B,y),children:[u?jsx(u,{size:z[s],className:v({isDisabled:e.isDisabled,isSelected:o.isSelected})}):null,e.label]})});w.displayName="ToggleButton";export{k as a,w as b};
10
+ var k=a({defaultClassName:"_5uw3kp0 oom8bs0 z9nup81",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true},"_5uw3kpa"],[{isSelected:true,isDisabled:true},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),v=a({defaultClassName:"_5uw3kpd _1yep5z6f9",variantClassNames:{isDisabled:{true:"_1yep5z611u"},isSelected:{true:"_1yep5z611w"}},defaultVariants:{},compoundVariants:[]});var z={sm:16,md:20,lg:24},w=C.forwardRef(({className:t,style:a,iconStart:i,size:u="md",elementType:s="button",variant:_="toolbar",...e$1},y)=>{let o=a$1(e$1),{buttonProps:h,isPressed:x,ref:B,isFocusVisible:l,isFocused:T,isHovered:n,uiStateOptions:p}=e({...e$1,elementType:s},o),S=a$2({"data-block-id":e$1["data-block-id"],"data-block-class":e$1["data-block-class"],"data-focused":T,"data-focus-visible":l,"data-disabled":e$1.isDisabled,"data-hovered":n,"data-pressed":x,"data-selected":o.isSelected});return jsxs(s,{...c(h,S),className:a$3(k({isHovered:n,isFocusVisible:l,isSelected:o.isSelected,size:u,isDisabled:e$1.isDisabled,variant:_}),"BaselineUI-ToggleButton",typeof t=="function"?t(p):t),style:typeof a=="function"?a(p):a,ref:b(B,y),children:[i?jsx(i,{size:z[u],className:v({isDisabled:e$1.isDisabled,isSelected:o.isSelected})}):null,e$1.label]})});w.displayName="ToggleButton";export{k as a,w as b};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-KVIV5RTE.mjs';import {q}from'./chunk-K7VOXFSK.mjs';import {b as b$2}from'./chunk-UO75BAPM.mjs';import {c,b}from'./chunk-DZDZZRWE.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-VGFPT43C.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {j}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import d from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-KVIV5RTE.mjs';import {q}from'./chunk-OMWMNUTI.mjs';import {b as b$2}from'./chunk-UO75BAPM.mjs';import {c,b}from'./chunk-7MLFM55C.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-DAI7V4TE.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {j}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import d from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-AMW7LGCF.mjs';import {c}from'./chunk-NYCG264A.mjs';import {a as a$8}from'./chunk-7SQRBY7N.mjs';import {a as a$5}from'./chunk-VGFPT43C.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {e}from'./chunk-AYQN3OH2.mjs';import {a as a$7}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$4}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/12';import {XIcon as XIcon$1}from'@baseline-ui/icons/16';import {SearchIcon as SearchIcon$1}from'@baseline-ui/icons/20';import {SearchIcon}from'@baseline-ui/icons/24';import O from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-AMW7LGCF.mjs';import {c}from'./chunk-X5ORCNAU.mjs';import {a as a$8}from'./chunk-7SQRBY7N.mjs';import {a as a$5}from'./chunk-DAI7V4TE.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {e}from'./chunk-AYQN3OH2.mjs';import {a as a$7}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$4}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/12';import {XIcon as XIcon$1}from'@baseline-ui/icons/16';import {SearchIcon as SearchIcon$1}from'@baseline-ui/icons/20';import {SearchIcon}from'@baseline-ui/icons/24';import O from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b,a as a$5}from'./chunk-7TE4MFKC.mjs';import {a as a$1,f as f$1}from'./chunk-AD3MLX6G.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-K7VOXFSK.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-WTAJLO6E.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-TUJLNJPJ.mjs';import {a as a$e}from'./chunk-3BG6K2G2.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {b,a as a$5}from'./chunk-AN26QORL.mjs';import {a as a$1,f as f$1}from'./chunk-6GMU63H2.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-OMWMNUTI.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-O6FPWOHR.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-AFOW62QN.mjs';import {a as a$e}from'./chunk-VXZT2JR2.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-O7IU5NHN.mjs';import {a as a$3}from'./chunk-3DWFAHR2.mjs';import {a}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import p from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var K="_1vghdeb0";var x=new Set(["\u2318","\u2325","\u21E7","\u21A9","\u2423","\u2303"]),l="+";function g(t){let s=t.endsWith(l),e=(s?t.slice(0,-1):t).split(l).map(r=>r.trim()).filter(Boolean);return s?[...e,l]:e}function R(t,s){if(s){let e=[],r="";for(let o of t)x.has(o)?(r&&e.push(r),e.push(o),r=""):r+=o;return r&&e.push(r),e.length===1&&e[0].includes("+")?g(e[0]):e}return g(t)}var m=p.forwardRef(({children:t,className:s,style:e},r)=>jsx(a,{elementType:"kbd",ref:r,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"xs",borderWidth:1,borderStyle:"solid",borderColor:"border.medium",backgroundColor:"background.primary.strong",color:"text.primary",typography:"label.md.medium",paddingX:"md",paddingY:"sm",className:a$1(K,"BaselineUI-Kbd-Key",s),style:e,children:t}));m.displayName="KbdKey";var u=p.forwardRef(({children:t,shouldUseSymbol:s=false,className:e,style:r},o)=>{let S=b()?t:a$2(t,s),i=R(S,s);return i.length===1?jsx(m,{ref:o,className:a$1("BaselineUI-Kbd",e),style:r,children:i[0]}):jsx(a,{elementType:"span",display:"inline-flex",alignItems:"center",gap:"md",ref:o,className:a$1("BaselineUI-Kbd",e),style:r,children:i.map((b,h)=>jsxs(p.Fragment,{children:[jsx(m,{children:b}),h<i.length-1?jsx(a$3,{type:"label",size:"sm",children:l}):null]},b))})});u.displayName="Kbd";export{u as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-BA5OA5DY.mjs';import {b as b$2}from'./chunk-BGQRLALS.mjs';import {b,c}from'./chunk-IHES52NR.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import C,{useContext}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var m=C.forwardRef(({className:i,style:n,children:p,"data-block-id":d,"data-block-class":P,portalContainer:f,...c$1},h)=>{let{theme:y,shouldHandleVirtualKeyboard:u}=useContext(b),v=a(),b$3=b$1();return jsx(b$2,{...c$1,portalContainer:b$3?void 0:f??v,children:jsx(c,{ref:h,theme:y,shouldHandleVirtualKeyboard:u,style:n,className:a$1("BaselineUI-Portal",i),"data-block-id":d,"data-block-class":P,children:p})})});m.displayName="Portal";export{m as a};
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-6G7EUNZW.mjs';import {c}from'./chunk-PD5ZXNGT.mjs';import {a}from'./chunk-USMC34OO.mjs';import {useMemo}from'react';/**
1
+ import {b}from'./chunk-XAM3AXXK.mjs';import {c}from'./chunk-QMV2O57M.mjs';import {a}from'./chunk-USMC34OO.mjs';import {useMemo}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-DAI7V4TE.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17de",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var N=H.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:m}=useContext(z),l=H.Children.toArray(a).filter(e=>H.isValidElement(e));useEffect(()=>{for(let e of o.keys())e>=l.length&&o.delete(e);},[o,l.length]);let{keyboardProps:_}=j({onKeyDown:e=>{let s=i(a$1(e.target)),c=[...o?.keys()||[]].findIndex(d=>{let y=o?.get(d)?.current;return y?y===s:false});if(!o?.get(c)){e.continuePropagation();return}let n=o?.size||0,v=new Set([...m??[]].map(String)),u=d=>{let y=o.get(d)?.current?.dataset.key;return y!==void 0&&v.has(y)},r=(d,y)=>{for(let g=1;g<=n;g++){let A=((d+y*g)%n+n)%n;if(!u(A)){o.get(A)?.current?.focus();return}}};switch(e.key){case "Home":{e.preventDefault(),r(-1,1);break}case "End":{e.preventDefault(),r(n,-1);break}case "ArrowDown":{e.preventDefault(),r(c,1);break}case "ArrowUp":{e.preventDefault(),r(c,-1);break}default:e.continuePropagation();}}});return jsx("div",{...b(_),style:p,className:a$2(X,i$1),ref:t,children:l.map((e,s)=>H.cloneElement(e,{index:s}))})});N.displayName="AccordionBase";var z=H.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=H.forwardRef(({children:a,disabledKeys:i,defaultExpandedKeys:p=new Set,expandedKeys:t,expansionMode:o="multiple",onChange:m,className:l,style:_},e)=>{let[s,c]=a$3(t,p,m),f=H.useRef(new Map).current,[n,v]=H.useState(o);useEffect(()=>{v(o);},[o]);let u=useMemo(()=>({expandedKeys:s,setExpandedKeys:c,disabledKeys:i,headers:f,expansionMode:n}),[s,c,i,f,n]);return jsx(z.Provider,{value:u,children:jsx(a$4,{children:jsx(N,{className:l,style:_,ref:e,children:a})})})});se.displayName="Accordion";var D=H.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:m,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let s=H.useRef(null),{expandedKeys:c$1,setExpandedKeys:f,expansionMode:n,disabledKeys:v,headers:u}=useContext(z),r=v?.has(t),d$1=b$1();a$5(d$1);let{focusNext:y,focusPrevious:g}=d$1,{direction:A}=b$2(),pe=A==="rtl"?"ArrowLeft":"ArrowRight",le=A==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?g({wrap:true}):x.continuePropagation();},isDisabled:r});useEffect(()=>{a$5(typeof m=="number","AccordionItem must have an index"),u?.set(m,s);},[m,u]);let F=()=>{f(x=>{let h=new Set(x);return h.has(t)?h.delete(t):(n==="single"&&h.clear(),h.add(t)),h});},{buttonProps:ue}=a$6({"aria-expanded":c$1.has(t),"aria-controls":p,onPress:F,isDisabled:r},s),{pressProps:ye}=d({onPress:F,isDisabled:r}),{focusProps:fe,isFocusVisible:ze}=a$7(),{hoverProps:_e,isHovered:L}=a$8({isDisabled:r}),{focusProps:ve,isFocusVisible:xe}=a$7({within:true}),he=c$1.has(t);return jsxs("h3",{...c(me,ye,_e,ve),className:oe({isFocusVisible:ze,isHovered:L,isDisabled:r}),ref:e,children:[jsxs("div",{className:re({isDisabled:!!r}),children:[jsx(ChevronRightIcon,{className:Z({isExpanded:he}),size:8}),jsx("button",{...c(ue,fe),id:o,"data-key":t,className:te,ref:s,children:a})]}),i?.length?jsx("div",{"data-testid":"action-buttons",className:Y({showActionsOnTriggerOnly:_,isTriggered:xe||L}),children:i.map((x,h)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:r,...x},h))}):null,l?jsx("div",{className:ee,children:l}):null]})});D.displayName="AccordionHeader";var Ke={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},Me=({isExpanded:a,...i})=>{let[p,t]=useState(!a);return a&&p&&t(false),jsx(motion.section,{...i,initial:false,animate:a?"open":"closed",onAnimationComplete:o=>{o==="closed"&&t(true);},hidden:p})},de=H.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:m,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:s},c)=>{let f=c$1(),n=c$1(),{expandedKeys:v}=useContext(z),u=v.has(t),r={role:"region","aria-labelledby":n,id:f,className:$,variants:Ke},d=jsx("div",{style:l,className:_,children:p});return jsxs(Fragment,{children:[jsx(a$4,{children:jsx(D,{value:t,actions:i,id:n,title:a,controlId:f,ref:c,index:o,subLabel:m,showActionsOnTriggerOnly:e})}),s?jsx(Me,{...r,isExpanded:u,children:d}):jsx(AnimatePresence,{initial:false,children:u?jsx(motion.section,{...r,initial:"closed",animate:"open",exit:"closed",children:d}):null})]})});de.displayName="AccordionItem";export{se as a,de as b};
@@ -0,0 +1,10 @@
1
+ import {c as c$1,b}from'./chunk-EGLD5KVP.mjs';import {a}from'./chunk-LSPDPDB6.mjs';import {d}from'./chunk-QMV2O57M.mjs';import {a as a$1}from'./chunk-D4NW56YQ.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {f,b as b$2}from'./chunk-GQIS4QBN.mjs';import {i as i$1,b as b$3}from'./chunk-KUDCYGII.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c as c$2,a as a$3}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-SVIYLH7R.mjs';import {c,e}from'./chunk-ETM4MNG4.mjs';import {m,i,a as a$4,h,j}from'./chunk-SD43KVTU.mjs';import {useRef}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var M=new WeakMap;function I(n,t){let{id:e}=M.get(n)??{};if(!e)throw new Error("Unknown list");return `${e}-${se(t)}`}function se(n){return typeof n=="string"?n.replace(/\s*/g,""):""+n}function Se(n,t,e){let{isVirtualized:i,keyboardDelegate:a$3,layoutDelegate:u,onAction:p,disallowTypeAhead:d,linkBehavior:y="action",keyboardNavigationBehavior:O="arrow",escapeKeyBehavior:b$1="clearSelection",shouldSelectOnPressUp:F}=n;!n["aria-label"]&&!n["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:w}=a({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:e,keyboardDelegate:a$3,layoutDelegate:u,isVirtualized:i,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:n.shouldFocusWrap,linkBehavior:y,disallowTypeAhead:d,autoFocus:n.autoFocus,escapeKeyBehavior:b$1,UNSTABLE_focusOnEntry:n.UNSTABLE_focusOnEntry}),k=c(n.id);M.set(t,{id:k,onAction:p,linkBehavior:y,keyboardNavigationBehavior:O,shouldSelectOnPressUp:F});let T=c$1({selectionManager:t.selectionManager,hasItemActions:!!p,ref:e}),x=a$1(e,{isDisabled:t.collection.size!==0}),g=a$2(n,{labelable:true}),E=c$2(g,{role:"grid",id:k,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:x?-1:0}:w,T);return i&&(E["aria-rowcount"]=t.collection.size,E["aria-colcount"]=1),b({},t),{gridProps:E}}var Y={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Ue(n,t,e$1){let{node:i$2,isVirtualized:a,focusMode:u="row",allowsArrowNavigation:p}=n,{direction:d$2}=b$1(),{onAction:y,linkBehavior:O,keyboardNavigationBehavior:b,shouldSelectOnPressUp:F}=M.get(t),w=e([],e$1),k=useRef(null),T=()=>{if(e$1.current!==null){if(u==="child"){if(m(e$1.current)&&e$1.current!==i(a$4(e$1.current)))return;let l=d$1(e$1.current,{tabbable:true}).firstChild();if(l){i$1(l),f(l,{containingElement:b$2(l)});return}}(k.current!=null&&i$2.key!==k.current||!m(e$1.current))&&i$1(e$1.current);}},x={},g=n.hasChildItems,E=t.selectionManager.isLink(i$2.key);if(i$2!=null&&"expandedKeys"in t){let r=t.collection.getChildren?.(i$2.key);g=g||[...r??[]].length>1,y==null&&!E&&t.selectionManager.selectionMode==="none"&&g&&(y=()=>t.toggleKey(i$2.key));let l=g?t.expandedKeys.has(i$2.key):void 0,o=1,c=i$2.index;if(i$2.level>=0&&i$2?.parentKey!=null){let s=t.collection.getItem(i$2.parentKey);if(s){let B=ue(s,t.collection);o=[...B].filter(ae=>ae.type==="item").length,c>0&&B[0].type!=="item"&&(c-=1);}}else o=[...t.collection].filter(s=>s.level===0&&s.type==="item").length;x={"aria-expanded":l,"aria-level":i$2.level+1,"aria-posinset":c+1,"aria-setsize":o};}let{itemProps:Z,...R}=d({selectionManager:t.selectionManager,key:i$2.key,ref:e$1,isVirtualized:a,shouldSelectOnPressUp:n.shouldSelectOnPressUp||F,onAction:y||i$2.props?.onAction?a$3(i$2.props?.onAction,y?()=>y(i$2.key):void 0):void 0,focus:T,linkBehavior:O}),ee=r=>{let l=i(a$4(e$1.current));if(!h(r.currentTarget,j(r))||!e$1.current||!l)return;let o=d$1(e$1.current);if(o.currentNode=l,!J(r,t,i$2,g,d$2,l,e$1.current,p))switch(r.key){case "ArrowLeft":{if(b==="arrow"){let c=d$2==="rtl"?o.nextNode():o.previousNode();if(c)r.preventDefault(),r.stopPropagation(),i$1(c),f(c,{containingElement:b$2(e$1.current)});else if(r.preventDefault(),r.stopPropagation(),d$2==="rtl")i$1(e$1.current),f(e$1.current,{containingElement:b$2(e$1.current)});else {o.currentNode=e$1.current;let s=Q(o);s&&(i$1(s),f(s,{containingElement:b$2(e$1.current)}));}}break}case "ArrowRight":{if(b==="arrow"){let c=d$2==="rtl"?o.previousNode():o.nextNode();if(c)r.preventDefault(),r.stopPropagation(),i$1(c),f(c,{containingElement:b$2(e$1.current)});else if(r.preventDefault(),r.stopPropagation(),d$2==="ltr")i$1(e$1.current),f(e$1.current,{containingElement:b$2(e$1.current)});else {o.currentNode=e$1.current;let s=Q(o);s&&(i$1(s),f(s,{containingElement:b$2(e$1.current)}));}}break}case "ArrowUp":case "ArrowDown":!r.altKey&&h(e$1.current,j(r))&&(r.stopPropagation(),r.preventDefault(),e$1.current.parentElement?.dispatchEvent(new KeyboardEvent(r.nativeEvent.type,r.nativeEvent)));break}},te=r=>{if(k.current=i$2.key,j(r)!==e$1.current){b$3()||t.selectionManager.setFocusedKey(i$2.key);return}u==="child"&&r.relatedTarget&&h(e$1.current,r.relatedTarget)||requestAnimationFrame(()=>{u==="child"&&i(a$4(e$1.current))===e$1.current&&T();});},re=r=>{let l=i(a$4(e$1.current));if(!(!h(r.currentTarget,j(r))||!e$1.current||!l)){if(b==="tab"){if(j(r)!==e$1.current&&r.key!=="Tab"){r.stopPropagation();return}if(J(r,t,i$2,g,d$2,l,e$1.current,p))return}switch(r.key){case "Tab":if(b==="tab"){let o=d$1(e$1.current,{tabbable:true});o.currentNode=l,(r.shiftKey?o.previousNode():o.nextNode())&&r.stopPropagation();}}}},ie=q(i$2.props),ne=R.hasAction?ie:{},K=c$2(Z,ne,{role:"row",onKeyDownCapture:b==="arrow"||p?ee:void 0,onFocus:te,"aria-label":i$2["aria-label"]||i$2.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(i$2.key)?t.selectionManager.isSelected(i$2.key):void 0,"aria-disabled":t.selectionManager.isDisabled(i$2.key)||void 0,"aria-labelledby":w&&(i$2["aria-label"]||i$2.textValue)?`${I(t,i$2.key)} ${w}`:void 0,id:I(t,i$2.key)});u==="child"&&p&&b==="tab"&&(K.tabIndex=-1);let oe=K.onKeyDown;if(K.onKeyDown=r=>{re(r),r.isPropagationStopped()||oe?.(r);},a){let{collection:r}=t,l=[...r];K["aria-rowindex"]=l.find(o=>o.type==="section")?[...r.getKeys()].filter(o=>r.getItem(o)?.type!=="section").findIndex(o=>o===i$2.key)+1:i$2.index+1;}let le={role:"gridcell","aria-colindex":1};return {rowProps:{...c$2(K,x)},gridCellProps:le,descriptionProps:{id:w},...R}}function J(n,t,e,i,a,u,p,d){if(!("expandedKeys"in t)||!d&&u!==p)return false;if(n.key===Y.expand[a]&&t.selectionManager.focusedKey===e.key&&i&&!t.expandedKeys.has(e.key))return t.toggleKey(e.key),n.stopPropagation(),true;if(n.key===Y.collapse[a]&&t.selectionManager.focusedKey===e.key){if(i&&t.expandedKeys.has(e.key))return t.toggleKey(e.key),n.stopPropagation(),true;if(!t.expandedKeys.has(e.key)&&e.parentKey&&t.collection.getItem(e.parentKey)?.type==="item")return t.selectionManager.setFocusedKey(e.parentKey),n.stopPropagation(),true}return false}function Q(n){let t=null,e=null;do e=n.lastChild(),e&&(t=e);while(e);return t}function ue(n,t){let e=t.getChildren?.(n.key),i=e?Array.from(e):[],a=i.length>0?i[0]:null,u=[];for(;a;)u.push(a),a=a.nextKey!=null?t.getItem(a.nextKey):null;return u}export{I as a,Se as b,Ue as c};
@@ -1,4 +1,4 @@
1
- import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-PD5ZXNGT.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-VGFPT43C.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-QMV2O57M.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-DAI7V4TE.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-PD5Z
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var I=new WeakMap;function P(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:s,shouldSelectOnPressUp:r$1}=a,{selectionManager:o,selectedKey:b}=e,p=i===b,l=s||e.isDisabled||e.selectionManager.isDisabled(i),d$1=e.collection.getItem(i),{itemProps:n,isPressed:m}=d({selectionManager:o,key:i,ref:t,isDisabled:l,shouldSelectOnPressUp:r$1??d$1?.props.href!=null,linkBehavior:"selection"}),h=P(e,i,"tab"),c$1=P(e,i,"tabpanel"),{tabIndex:_}=n,x=a$a(d$1?.props,{labelable:true});delete x.id;let v=r(d$1?.props),{focusableProps:K}=c$3({...d$1?.props,isDisabled:l},t);return {tabProps:c(x,K,v,n,{id:h,"aria-selected":p,"aria-disabled":l||void 0,"aria-controls":p?c$1:void 0,tabIndex:l?void 0:_,role:"tab"}),isSelected:p,isDisabled:l,isPressed:m}}function A(a,e,t){let i=a$b(t)?void 0:0,s=P(e,a.id??e?.selectedKey,"tabpanel"),r=a$9({...a,id:s,"aria-labelledby":P(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var L=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,s=new Set){this.collection=e,this.flipDirection=t==="rtl",this.disabledKeys=s,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:s="automatic"}=a,{collection:r,selectionManager:o,disabledKeys:b$1}=e,{direction:p}=b(),l=useMemo(()=>new L(r,p,i,b$1),[r,b$1,i,p]),{collectionProps:d}=c$1({ref:t,selectionManager:o,keyboardDelegate:l,selectOnFocus:s==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),n=c$2();I.set(e,n);let m=a$9({...a,id:n});return {tabListProps:{...c(d,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$8({...a,onSelectionChange:a.onSelectionChange?o=>{o!=null&&a.onSelectionChange?.(o);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:s}=e,r=useRef(s);return useEffect(()=>{let o=s;a.selectedKey==null&&(t.isEmpty||o==null||!i.getItem(o))&&(o=Z(i,e.disabledKeys),o!=null&&t.setSelectedKeys([o])),(o!=null&&t.focusedKey==null||!t.isFocused&&o!==r.current)&&t.setFocusedKey(o),r.current=o;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:s}=a,{focusProps:r,isFocusVisible:o}=a$5();if(!s?.value)return null;let{className:b,style:p,"data-block-id":l}=s.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:o},"Baseline-Tabs-TabPanel",b),"data-block-id":l,style:p,children:s?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:s="primary",actions:r,onRemove:o,"data-block-id":b,"data-block-class":p,...l},d)=>{let n=N({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),m=R.useRef(null),{tabListProps:h}=O({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},n,m);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:d,"data-block-id":b,"data-block-class":p,children:[jsxs("div",{className:a$3(se({variant:s}),i),style:t,children:[jsx("div",{...h,className:ae({variant:s}),ref:m,children:[...n.collection].map(c=>(a$1(c.value,"TabItem requires a value prop"),jsx(le,{item:c,state:n,onRemove:o,variant:s},c.key)))}),r?.map((c,_)=>jsx("div",{className:ee,children:jsx(a$2,{...c,variant:"secondary",size:"sm",className:a$3(ie,c.className)})},_))]}),jsx(oe,{state:n},n.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:s,value:r}=a,o=R.useRef(null),{tabProps:b,isSelected:p,isDisabled:l}=C({key:s},t,o),{hoverProps:d,isHovered:n}=a$4({});a$1(r,"TabButton requires a value prop");let{title:m,icon:h,titleStyle:c$1,titleClassName:_}=r,{focusProps:x,isFocusVisible:v,isFocused:K}=a$5(),{keyboardProps:de}=j({onKeyDown:w=>{w.key==="Backspace"&&e?e(s):w.continuePropagation();}}),ce=a$6({"data-selected":p,"data-disabled":l,"data-focused":K,"data-hovered":n,"data-focus-visible":v});return jsxs("div",{...c(de,b,d,x,ce),className:a$3(te({isHovered:n,isSelected:p,isFocusVisible:v,isDisabled:l,variant:i}),"BaselineUI-Tabs-TabButton",_),style:c$1,ref:o,children:[h?jsx(h,{size:20,className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(s);},excludeFromTabOrder:true,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:p||K||n?1:0},className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let s=useMemo(()=>R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value}).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:s,children:r=>jsx(a$7,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
10
+ var I=new WeakMap;function P(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:s,shouldSelectOnPressUp:r$1}=a,{selectionManager:o,selectedKey:b}=e,p=i===b,l=s||e.isDisabled||e.selectionManager.isDisabled(i),d$1=e.collection.getItem(i),{itemProps:n,isPressed:m}=d({selectionManager:o,key:i,ref:t,isDisabled:l,shouldSelectOnPressUp:r$1??d$1?.props.href!=null,linkBehavior:"selection"}),h=P(e,i,"tab"),c$1=P(e,i,"tabpanel"),{tabIndex:_}=n,x=a$a(d$1?.props,{labelable:true});delete x.id;let v=r(d$1?.props),{focusableProps:K}=c$3({...d$1?.props,isDisabled:l},t);return {tabProps:c(x,K,v,n,{id:h,"aria-selected":p,"aria-disabled":l||void 0,"aria-controls":p?c$1:void 0,tabIndex:l?void 0:_,role:"tab"}),isSelected:p,isDisabled:l,isPressed:m}}function A(a,e,t){let i=a$b(t)?void 0:0,s=P(e,a.id??e?.selectedKey,"tabpanel"),r=a$9({...a,id:s,"aria-labelledby":P(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var L=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,s=new Set){this.collection=e,this.flipDirection=t==="rtl",this.disabledKeys=s,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:s="automatic"}=a,{collection:r,selectionManager:o,disabledKeys:b$1}=e,{direction:p}=b(),l=useMemo(()=>new L(r,p,i,b$1),[r,b$1,i,p]),{collectionProps:d}=c$1({ref:t,selectionManager:o,keyboardDelegate:l,selectOnFocus:s==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),n=c$2();I.set(e,n);let m=a$9({...a,id:n});return {tabListProps:{...c(d,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$8({...a,onSelectionChange:a.onSelectionChange?o=>{o!=null&&a.onSelectionChange?.(o);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:s}=e,r=useRef(s);return useEffect(()=>{let o=s;a.selectedKey==null&&(t.isEmpty||o==null||!i.getItem(o))&&(o=Z(i,e.disabledKeys),o!=null&&t.setSelectedKeys([o])),(o!=null&&t.focusedKey==null||!t.isFocused&&o!==r.current)&&t.setFocusedKey(o),r.current=o;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:s}=a,{focusProps:r,isFocusVisible:o}=a$5();if(!s?.value)return null;let{className:b,style:p,"data-block-id":l}=s.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:o},"Baseline-Tabs-TabPanel",b),"data-block-id":l,style:p,children:s?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:s="primary",actions:r,onRemove:o,"data-block-id":b,"data-block-class":p,...l},d)=>{let n=N({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),m=R.useRef(null),{tabListProps:h}=O({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},n,m);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:d,"data-block-id":b,"data-block-class":p,children:[jsxs("div",{className:a$3(se({variant:s}),i),style:t,children:[jsx("div",{...h,className:ae({variant:s}),ref:m,children:[...n.collection].map(c=>(a$1(c.value,"TabItem requires a value prop"),jsx(le,{item:c,state:n,onRemove:o,variant:s},c.key)))}),r?.map((c,_)=>jsx("div",{className:ee,children:jsx(a$2,{...c,variant:"secondary",size:"sm",className:a$3(ie,c.className)})},_))]}),jsx(oe,{state:n},n.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:s,value:r}=a,o=R.useRef(null),{tabProps:b,isSelected:p,isDisabled:l}=C({key:s},t,o),{hoverProps:d,isHovered:n}=a$4({});a$1(r,"TabButton requires a value prop");let{title:m,icon:h,titleStyle:c$1,titleClassName:_}=r,{focusProps:x,isFocusVisible:v,isFocused:K}=a$5(),{keyboardProps:de}=j({onKeyDown:w=>{w.key==="Backspace"&&e?e(s):w.continuePropagation();}}),ce=a$6({"data-selected":p,"data-disabled":l,"data-focused":K,"data-hovered":n,"data-focus-visible":v});return jsxs("div",{...c(de,b,d,x,ce),className:a$3(te({isHovered:n,isSelected:p,isFocusVisible:v,isDisabled:l,variant:i}),"BaselineUI-Tabs-TabButton",_),style:c$1,ref:o,children:[h?jsx(h,{size:20,className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(s);},excludeFromTabOrder:true,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:p||K||n?1:0},className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let s=useMemo(()=>(R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value})??[]).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:s,children:r=>jsx(a$7,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-RMUV6NJJ.mjs';import f from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function i(r){let n=f.useRef(null),c=()=>({get current(){return n.current},set current(o){n.current=o;}}),t=b(),e=f.useRef({portalContainer:r,isSSR:t,ref:c()});return (e.current.portalContainer!==r||e.current.isSSR!==t)&&(e.current={portalContainer:r,isSSR:t,ref:c()}),e.current.ref}export{i as a};
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-4W5VP4NV.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-4RSUKS23.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$7}from'./chunk-3KCSUNRV.mjs';import {a as a$1}from'./chunk-OYSOPCTA.mjs';import {a as a$8}from'./chunk-BGQRLALS.mjs';import {b}from'./chunk-4JQUB53Q.mjs';import {h,g,f,e,a as a$9,c as c$3,d as d$1}from'./chunk-MBRNO6IW.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {c as c$2}from'./chunk-GQIS4QBN.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-ETM4MNG4.mjs';import {a as a$b,b as b$1}from'./chunk-SD43KVTU.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
1
+ import {a as a$2}from'./chunk-BAIVRB2I.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-YYU46XNM.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$7}from'./chunk-LQHFBXCW.mjs';import {a as a$1}from'./chunk-BA5OA5DY.mjs';import {a as a$8}from'./chunk-BGQRLALS.mjs';import {b}from'./chunk-YDUKC7QS.mjs';import {h,g,f,e,a as a$9,c as c$3,d as d$1}from'./chunk-MBRNO6IW.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {c as c$2}from'./chunk-GQIS4QBN.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-ETM4MNG4.mjs';import {a as a$b,b as b$1}from'./chunk-SD43KVTU.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$a}from'./chunk-KT4FTBJ2.mjs';import {j,c,i,l,p,r,s,m,x,u,v,k,f as f$2,e as e$1,y,d,q,a as a$h}from'./chunk-YQHHE5AT.mjs';import {a as a$e}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$5}from'./chunk-X5ORCNAU.mjs';import {c as c$8}from'./chunk-BROSGYL3.mjs';import {c as c$2,f as f$1,e as e$2,d as d$2}from'./chunk-WFYFHANE.mjs';import {a as a$f}from'./chunk-TAT552A5.mjs';import {a as a$l}from'./chunk-LSPDPDB6.mjs';import {b as b$3}from'./chunk-XAM3AXXK.mjs';import {d as d$3}from'./chunk-QMV2O57M.mjs';import {b,c as c$1}from'./chunk-DF2D7NE6.mjs';import {a as a$b,f as f$3}from'./chunk-ZQOR4LCM.mjs';import {f as f$4}from'./chunk-UZ672WDX.mjs';import {a as a$7,b as b$6}from'./chunk-UO75BAPM.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {b as b$9}from'./chunk-OQPYPKZV.mjs';import {a as a$3}from'./chunk-GMALMQWI.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$8}from'./chunk-KG2EHFYA.mjs';import {a as a$p}from'./chunk-Z4QTH4TB.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$o}from'./chunk-22MA6EYO.mjs';import {e,h,c as c$3,b as b$4,f,a as a$8,d as d$1,k as k$2}from'./chunk-AYQN3OH2.mjs';import {a as a$m}from'./chunk-22VRCVTH.mjs';import {a as a$g}from'./chunk-66CUIXA6.mjs';import {k as k$1,l as l$1,e as e$4}from'./chunk-TZGK36KC.mjs';import {a as a$k}from'./chunk-AI6WQPRX.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c as c$7}from'./chunk-HH4VLTF3.mjs';import {a as a$6}from'./chunk-4S4GGUSH.mjs';import {j as j$1,b as b$5,d as d$5,f as f$5}from'./chunk-KUDCYGII.mjs';import {a as a$5}from'./chunk-B3EZOXNU.mjs';import {d as d$4}from'./chunk-F7WPMQ3P.mjs';import {a as a$4}from'./chunk-RT4LMB6X.mjs';import {a as a$j,o,r as r$1,u as u$1,s as s$1,h as h$2,e as e$5}from'./chunk-PPHSLODC.mjs';import {c as c$4}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-SVIYLH7R.mjs';import {c as c$6,a as a$i,e as e$3}from'./chunk-ETM4MNG4.mjs';import {m as m$1,h as h$1,j as j$2,i as i$1,b as b$7,a as a$n}from'./chunk-SD43KVTU.mjs';import {a as a$9}from'./chunk-JQQGRJ5J.mjs';import {a as a$d}from'./chunk-4QEH5CGK.mjs';import Me,{createContext,forwardRef,useContext,useMemo,useRef,useEffect,useCallback,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightFilledIcon}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/24';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var Pe=createContext({}),Ge=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,Pe),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var Xe=createContext({});var pt=createContext(null),se=createContext(null),mt=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,pt);let o=useContext(se);return o?jsx(Ar,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(go,{props:e$1,listBoxRef:t,collection:n})})});function go({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Ar,{state:n,props:r,listBoxRef:e})}function Ar({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:c,selectionManager:u$1}=s$1,a$4=!!o?.useDraggableCollectionState,d=!!o?.useDroppableCollectionState,{direction:g}=b$2(),{disabledBehavior:p$1,disabledKeys:x$1}=u$1,y=a({usage:"search",sensitivity:"base"}),{isVirtualized:m$1,layoutDelegate:b,dropTargetDelegate:S,CollectionRoot:M}=useContext(p),R=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:c,collator:y,ref:t,disabledKeys:x$1,disabledBehavior:p$1,layout:n,orientation:i,direction:g,layoutDelegate:b}),[c,y,t,p$1,x$1,i,g,e$1.keyboardDelegate,n,b]),{listBoxProps:I}=c$2({...e$1,shouldSelectOnPressUp:a$4||e$1.shouldSelectOnPressUp,keyboardDelegate:R,isVirtualized:m$1},s$1,t),F=useRef(a$4),f=useRef(d);useEffect(()=>{process.env.NODE_ENV!=="production"&&(F.current!==a$4&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),f.current!==d&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[a$4,d]);let T,E,B,P=false,v$1=null,C=useRef(null);if(a$4&&o){T=o.useDraggableCollectionState({collection:c,selectionManager:u$1,preview:o.renderDragPreview?C:void 0}),o.useDraggableCollection({},T,t);let Y=o.DragPreview;v$1=o.renderDragPreview?jsx(Y,{ref:C,children:o.renderDragPreview}):null;}if(d&&o){E=o.useDroppableCollectionState({collection:c,selectionManager:u$1});let Y=o.dropTargetDelegate||S||new o.ListDropTargetDelegate(c,t,{orientation:i,layout:n,direction:g});B=o.useDroppableCollection({keyboardDelegate:R,dropTargetDelegate:Y},E,t),P=E.isDropTarget({type:"root"});}let{focusProps:_,isFocused:U,isFocusVisible:K}=a$1(),H=s$1.collection.size===0,X={isDropTarget:P,isEmpty:H,isFocused:U,isFocusVisible:K,layout:e$1.layout||"stack",orientation:i,state:s$1},ae=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:X}),oe=null;H&&e$1.renderEmptyState&&(oe=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(X)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,ae,I,_,B?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":P||void 0,"data-empty":H||void 0,"data-focused":U||void 0,"data-focus-visible":K||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[pt,e$1],[se,s$1],[r,{dragAndDropHooks:o,dragState:T,dropState:E}],[Xe,{elementType:"div"}],[s,{render:yo}],[m,{name:"ListBoxSection",render:Ir}]],children:jsx(x,{children:jsx(M,{collection:c,scrollRef:t,persistedKeys:v(u$1,o,E),renderDropIndicator:u(o,E)})})}),oe,v$1]})})}function Ir(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(se),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[c,u$1]=f(),{headingProps:a,groupProps:d}=f$1({heading:u$1,"aria-label":r$1["aria-label"]??void 0}),g=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),p$1=a$2(r$1,{global:true});return delete p$1.id,jsx(h.section,{...c$4(p$1,g,d),ref:e,children:jsx(Pe.Provider,{value:{...a,ref:c},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var ft=k(f$2,Ir),gt=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(se),{dragAndDropHooks:l,dragState:s,dropState:c}=useContext(r),u=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:a,labelProps:d,descriptionProps:g,...p}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x,isHovered:y$1}=a$5({isDisabled:!p.allowsSelection&&!p.hasAction&&!u,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:m}=j$1(e),{focusProps:b}=a$6(e),S=null;s&&l&&(S=l.useDraggableItem({key:o.key,hasAction:p.hasAction},s,n));let M=null;c&&l&&(M=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},c,n));let R=s&&s.isDragging(o.key),I=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...p,isHovered:y$1,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:R,isDropTarget:M?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let F=e.href?h.a:h.div,f=a$2(e,{global:true});return delete f.id,delete f.onClick,e.href&&a.tabIndex==null&&(a.tabIndex=-1),jsx(F,{...c$4(f,I,a,x,m,b,S?.dragProps,M?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":p.isSelected||void 0,"data-disabled":p.isDisabled||void 0,"data-hovered":y$1||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-dragging":R||void 0,"data-drop-target":M?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$7,{slots:{[a$8]:d,label:d,description:g}}],[y,{isSelected:p.isSelected}]],children:I.children})})});function yo(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(bo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function Po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var bo=forwardRef(Po);j(d,function(e,t,o){let n=useContext(se),{isLoading:i,onLoadMore:l,scrollOffset:s,...c}=e,u=useRef(null),a=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:u,scrollOffset:s}),[l,s,n?.collection]);k$1(a,u);let d=c$3({...c,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),g={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:l$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:u,style:{position:"absolute",height:1,width:1}})}),i&&d.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),g),...d,role:"option",ref:t,children:d.children})})]})});var $e=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var Si=a$9({defaultClassName:"_1fjxa6ld _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"},orientation:{vertical:"_1yep5z618m",horizontal:"_1yep5z618n"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6la _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Fr=a$9({defaultClassName:"_1fjxa6lb _1yep5z6ez _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6f2"}},defaultVariants:{},compoundVariants:[]}),Br=a$9({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6ey _1yep5z6lq _1yep5z6lt _1yep5z6m6 _1yep5z6m5 _1yep5z6m3 _1yep5z6m0",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t _1yep5z615c _1yep5z615d _1yep5z615e"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z612t",false:"_1yep5z612s"},isDisabled:{true:"z9nup82 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),Hr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",Nr="_1fjxa6l1",zr="_1fjxa6l2",_r="_1fjxa6l0";var Kr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function Vr(r){let{onContextMenu:e}=r,t=useRef(false),{longPressProps:o}=a$p({onLongPressStart(){t.current=false;},onLongPress(n){t.current?t.current=false:e?.({target:n.target,x:n.x,y:n.y});}});return e?{contextMenuProps:c$4(h$2()?o:{},{onContextMenu(n){n.stopPropagation(),n.preventDefault(),t.current=true;let i=n.currentTarget.getBoundingClientRect();e({target:n.currentTarget,x:n.clientX-i.x,y:n.clientY-i.y});},onKeyDown(n){if(e$5()&&n.ctrlKey&&n.key==="Enter"){t.current=false;let i=n.currentTarget;n.stopPropagation(),setTimeout(()=>{if(t.current)t.current=false;else {let l=i.getBoundingClientRect();e({target:i,x:l.width/2,y:l.height/2});}},10);}}})}:{contextMenuProps:{}}}function yt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$6(),{triggerProps:s,overlayProps:c}=a$o({type:o},e,t),u=(m,b,S="first")=>{if(!m||b.isDefaultPrevented())return false;e.toggle(S);},{keyboardProps:a}=j$1({isDisabled:n,shortcuts:{Enter:m=>u(i!=="longPress",m,"first")," ":m=>u(i!=="longPress",m,"first"),ArrowDown:m=>u(i!=="longPress",m,"first"),ArrowUp:m=>u(i!=="longPress",m,"last"),"Alt+Enter":m=>u(i==="longPress",m,"first"),"Alt+ ":m=>u(i==="longPress",m,"first"),"Alt+ArrowDown":m=>u(true,m,"first"),"Alt+ArrowUp":m=>u(true,m,"last")}}),d=b$8(Kr,"@react-aria/menu"),{longPressProps:g}=a$p({isDisabled:n||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),ref:t,onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),p={preventFocusOnPress:true,onPressStart(m){m.pointerType!=="touch"&&m.pointerType!=="keyboard"&&!n&&(a$j(m.target),e.open(m.pointerType==="virtual"?"first":null));},onPress(m){m.pointerType==="touch"&&!n&&(a$j(m.target),e.toggle());}};delete s.onPress;let{contextMenuProps:x}=Vr({onContextMenu(m){let b=m.target.getBoundingClientRect();e.setPoint({x:b.x+m.x,y:b.y+m.y}),e.open();}});useEffect(()=>{if(e.isOpen&&i==="contextMenu"){let m=b=>{(b.button===2||b.button===0&&b.ctrlKey===true)&&j$2(b)===document.body&&e.close();};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)}},[e,i]);let y;if(i==="press")y={...p,...a};else if(i==="longPress")y={...g,...a};else if(i==="contextMenu"){y=x;let{"aria-haspopup":m,"aria-expanded":b,"aria-controls":S,...M}=s;s=M;}return {menuTriggerProps:{...s,...y,id:l},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var Je=new WeakMap;function Pt(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:c}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return Je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{(u.key!=="Escape"||r.shouldUseVirtualFocus)&&c.onKeyDown?.(u);}})}}function bt(r,e,t){let{id:o$1,key:n,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":c,onPressStart:u,onPressUp:a,onPress:d,onPressChange:g,onPressEnd:p,onClick:x,onHoverStart:y,onHoverChange:m,onHoverEnd:b,onKeyDown:S,onKeyUp:M,onFocus:R,onFocusChange:I,onBlur:F,selectionManager:f=e.selectionManager}=r,T=!!c,E=T&&r["aria-expanded"]==="true",B=r.isDisabled??f.isDisabled(n),P=r.isSelected??f.isSelected(n),v=Je.get(e),C=e.collection.getItem(n),_=r.onClose||v.onClose,U=o(),K=()=>{if(!T&&(C?.props?.onAction?C.props.onAction():r.onAction&&r.onAction(n),v.onAction)){let h=v.onAction;h(n,C?.value);}},H="menuitem";T||(f.selectionMode==="single"?H="menuitemradio":f.selectionMode==="multiple"&&(H="menuitemcheckbox"));let X=e$3([],t),ae=e$3([],t),oe=e$3([],t),J={id:o$1,"aria-disabled":B||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":X,"aria-describedby":[r["aria-describedby"],ae,oe].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":c,"aria-expanded":r["aria-expanded"]};if(f.selectionMode!=="none"&&!T&&(J["aria-checked"]=P),s){let h=Number(C?.index);J["aria-posinset"]=Number.isNaN(h)?void 0:h+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),Re=h=>{g?.(h),Y.current=h;},Z=useRef(null),D=h=>{h.pointerType!=="keyboard"&&(Z.current={pointerType:h.pointerType}),h.pointerType==="mouse"&&(Y.current||h.target.click()),a?.(h);},de=h=>{x?.(h),K(),s$1(h,U,C.props.href,C?.props.routerOptions);let ce=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||f.selectionMode==="none"||f.isLink(n):f.selectionMode!=="multiple"||f.isLink(n);ce=l??i??ce,_&&!T&&ce&&_(),Z.current=null;},{itemProps:ne,isFocused:Ht}=d$3({id:o$1,selectionManager:f,key:n,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:v.shouldUseVirtualFocus}),{pressProps:io,isPressed:lo}=d$4({onPressStart:u,onPress:d,onPressUp:D,onPressChange:Re,onPressEnd:p,isDisabled:B}),{hoverProps:so}=a$5({isDisabled:B,onHoverStart(h){!b$5()&&!(E&&c)&&(f.setFocused(true),f.setFocusedKey(n)),y?.(h);},onHoverChange:m,onHoverEnd:b}),{keyboardProps:ao}=j$1({shortcuts:{" ":h=>{Z.current={pointerType:"keyboard",key:" "},j$2(h).click(),d$5("keyboard");},Enter:h=>{Z.current={pointerType:"keyboard",key:"Enter"};let ce=j$2(h);if(ce.tagName!=="A"){ce.click(),d$5("keyboard");return}return d$5("keyboard"),{shouldPreventDefault:false,shouldContinuePropagation:false}}},onKeyDown:S,onKeyUp:M}),{focusableProps:uo}=c$7({onBlur:F,onFocus:R,onFocusChange:I},t),Nt=a$2(C?.props);delete Nt.id;let co=r$1(C?.props);return {menuItemProps:{...J,...c$4(Nt,co,T?{onFocus:ne.onFocus,"data-collection":ne["data-collection"],"data-key":ne["data-key"]}:ne,io,so,ao,uo,v.shouldUseVirtualFocus||T?{onMouseDown:h=>h.preventDefault()}:void 0,B?void 0:{onClick:de}),tabIndex:ne.tabIndex!=null&&E&&!v.shouldUseVirtualFocus?-1:ne.tabIndex},labelProps:{id:X},descriptionProps:{id:ae},keyboardShortcutProps:{id:oe},isFocused:Ht,isFocusVisible:Ht&&f.isFocused&&b$5()&&!E,isSelected:P,isPressed:lo,isDisabled:B}}function xt(r){let{heading:e,"aria-label":t}=r,o=e$3([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ye=2,Co=50,ho=1e3,Ur=Math.PI/12;function Wr(r){let{menuRef:e,submenuRef:t,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),c=useRef(void 0),u=useRef(void 0),a=useRef(void 0),d=useRef(2),[g,p]=useState(false);e$4({ref:o?t:void 0,onResize:()=>{t.current&&(l.current=t.current.getBoundingClientRect(),a.current=void 0);}});let y=()=>{p(false),d.current=Ye,i.current=void 0;},m=f$5(),b=u$1(S=>{g&&S.preventDefault();});useEffect(()=>{g&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,g]),a$i(()=>{let S=t.current,M=e.current;if(n||!S||!o||m!=="pointer"||!M){y();return}l.current=S.getBoundingClientRect();let R=F=>{if(F.pointerType==="touch"||F.pointerType==="pen")return;let f=Date.now();if(f-s.current<Co)return;clearTimeout(c.current),clearTimeout(u.current);let{clientX:T,clientY:E}=F;if(!i.current){i.current={x:T,y:E};return}if(!l.current)return;if(a.current||(a.current=T>l.current.right?"left":"right"),T<M.getBoundingClientRect().left||T>M.getBoundingClientRect().right||E<M.getBoundingClientRect().top||E>M.getBoundingClientRect().bottom){y();return}let B=i.current.x,P=i.current.y,v=a.current==="right"?l.current.left-B:B-l.current.right,C=Math.atan2(P-l.current.top,v)+Ur,_=Math.atan2(P-l.current.bottom,v)-Ur,U=Math.atan2(P-E,a.current==="left"?-(T-B):T-B),K=U<C&&U>_;d.current=K?Math.min(d.current+1,Ye):Math.max(d.current-1,0),d.current>=Ye?p(true):p(false),s.current=f,i.current={x:T,y:E},K&&(c.current=setTimeout(()=>{y(),u.current=setTimeout(()=>{let H=a$n(M).elementFromPoint(T,E);H&&h$1(M,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},ho));},I=b$7(M);return I.addEventListener("pointermove",R),process.env.NODE_ENV!=="test"&&I.addEventListener("pointerdown",b,true),()=>{I.removeEventListener("pointermove",R),process.env.NODE_ENV!=="test"&&I.removeEventListener("pointerdown",b,true),clearTimeout(c.current),clearTimeout(u.current),d.current=Ye;}},[n,o,e,m,p,t]);}function Mt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:c}=r,u=c$6(),a=c$6(),{direction:d}=b$2(),g=useRef(void 0),p=useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=void 0);},[g]),x=useCallback(f=>{p(),e.open(f);},[e,p]),y=useCallback(()=>{p(),e.close();},[e,p]);a$i(()=>()=>{p();},[p]);let{keyboardProps:m}=j$1({shortcuts:{ArrowLeft:f=>{if(!m$1(f.currentTarget))return false;if(d==="ltr"&&h$1(f.currentTarget,j$2(f))){y(),!c&&t.current&&a$j(t.current);return}return false},ArrowRight:f=>{if(!m$1(f.currentTarget))return false;if(d==="rtl"&&h$1(f.currentTarget,j$2(f))){y(),!c&&t.current&&a$j(t.current);return}return false},Escape:f=>{if(!m$1(f.currentTarget))return false;if(h$1(n.current,j$2(f))){y(),!c&&t.current&&a$j(t.current);return}return false}}}),b={id:a,"aria-labelledby":u,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,...m}},{keyboardProps:S}=j$1({shortcuts:{ArrowRight:()=>{if(!l)if(d==="ltr"){e.isOpen||x("first"),i==="menu"&&n?.current&&i$1()===t?.current&&a$j(n.current);return}else if(e.isOpen){y();return}else return false;return false},ArrowLeft:()=>{if(!l)if(d==="rtl"){e.isOpen||x("first"),i==="menu"&&n?.current&&i$1()===t?.current&&a$j(n.current);return}else if(e.isOpen){y();return}else return false;return false}}}),M=f=>{!l&&(f.pointerType==="virtual"||f.pointerType==="keyboard")&&x("first");},R=f=>{!l&&(f.pointerType==="touch"||f.pointerType==="mouse")&&x();},I=f=>{l||(f&&!e.isOpen?g.current||(g.current=setTimeout(()=>{x();},s)):f||p());};a$k(o,"focusin",f=>{e.isOpen&&h$1(o.current,j$2(f))&&j$2(f)!==t.current&&y();});let F=f=>f!==t.current;return Wr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{onKeyDown:S.onKeyDown,onKeyUp:S.onKeyUp,id:u,"aria-controls":e.isOpen?a:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:M,onPress:R,onHoverChange:I,isOpen:e.isOpen},submenuProps:b,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:F}}}function Ze(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(u=null){o(u),e.open();},toggle(u=null){o(u),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(u,a)=>{i(d=>a>d.length?d:[...d.slice(0,a),u]);},closeSubmenu:(u,a)=>{i(d=>d[a]===u?d.slice(0,a):d);}}}function Tt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),c=useMemo(()=>o[s]===t,[o,t,s]),[u,a]=useState(null),d=useCallback(x=>{a(x??null),n(t,s);},[n,s,t]),g=useCallback(()=>{a(null),i(t,s);},[i,s,t]),p=useCallback(x=>{a(x??null),c?g():d(x);},[g,d,c]);return useMemo(()=>({focusStrategy:u,isOpen:c,open:d,close:g,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:p,point:null,setPoint:()=>{}}),[c,d,g,l,u,p,s])}var Ct=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Ct),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Io=createContext({}),cs=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Io);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var ht=createContext(null);createContext(null);createContext(null);var Dt=createContext(null);var tt=createContext(null),ve=createContext(null),Le=createContext(null),et=createContext(null);function Fo(r){let e=Ze(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=yt({...r,type:"menu"},e,t),i=useRef(null);return k$2()?null:jsx(b$4,{values:[[tt,{...n,ref:i}],[Dt,e],[Le,e],[ht,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"],offset:r.trigger==="contextMenu"?0:void 0}]],children:jsx(b$9,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Qr=createContext(null),Lt=class extends a$h{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Bo=k(Lt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(ve),i=useContext(Le),l=Tt({triggerKey:t.key},i),s=useRef(null),c=a$4(e),{parentMenuRef:u,shouldUseVirtualFocus:a}=useContext(Qr),{submenuTriggerProps:d,submenuProps:g,popoverProps:p$1}=Mt({parentMenuRef:u,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:a},l,c);return jsxs(b$4,{values:[[be,{...d,onAction:void 0,ref:c}],[tt,{ref:s,...g}],[Dt,l],[ht,{trigger:"SubmenuTrigger",triggerRef:c,placement:"end top","aria-labelledby":g["aria-labelledby"],...p$1}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ho=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,tt),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(No,{props:e$1,collection:o,menuRef:t})})});function No({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$a({...r,collection:i,children:void 0}),s=useContext(Le),{isVirtualized:c,CollectionRoot:u}=useContext(p),{menuProps:a}=Pt({...r,isVirtualized:c,onClose:r.onClose||s?.close},l,t),d=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),g=null;l.collection.size===0&&r.renderEmptyState&&(g=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let p$1=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(p$1,d,a),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[ve,l],[Xe,{elementType:"div"}],[m,{name:"MenuSection",render:eo}],[Qr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[be,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$5,null],[et,l.selectionManager],[Le,s??Ze({})]],children:jsx(x,{children:jsx(u,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),g]})})}var Rt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function eo(r,e,t,o="react-aria-MenuSection"){let n=useContext(ve),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:c,groupProps:u}=xt({heading:s,"aria-label":t.props["aria-label"]??void 0}),a=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),d=useContext(et),g=a$b(r),p$1=r.selectionMode!=null?new Rt(d,g):d,x=d$1(be)?.shouldCloseOnSelect,y=a$2(r,{global:true});return delete y.id,jsx(h.section,{...c$4(y,a,u),ref:e,children:jsx(b$4,{values:[[Pe,{...c,ref:l}],[et,p$1],[be,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Et=k(f$2,eo),be=createContext(null),Ot=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,be);let n=d$1(be)?.id,i=useContext(ve),l=a$4(t),s=useContext(et),{isVirtualized:c}=useContext(p),{menuItemProps:u,labelProps:a,descriptionProps:d,keyboardShortcutProps:g,...p$1}=bt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:c},i,l),{hoverProps:x,isHovered:y$1}=a$5({isDisabled:p$1.isDisabled}),m=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...p$1,isHovered:y$1,isFocusVisible:p$1.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),b=e$1.href?h.a:h.div,S=a$2(e$1,{global:true});return delete S.id,delete S.onClick,jsx(b,{...c$4(S,m,u,x),ref:l,"data-disabled":p$1.isDisabled||void 0,"data-hovered":y$1||void 0,"data-focused":p$1.isFocused||void 0,"data-focus-visible":p$1.isFocusVisible||void 0,"data-pressed":p$1.isPressed||void 0,"data-selected":p$1.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$7,{slots:{[a$8]:a,label:a,description:d}}],[Ct,g],[y,{isSelected:p$1.isSelected}]],children:m.children})})});j(d,function(e,t,o){let n=useContext(ve),{isLoading:i,onLoadMore:l,scrollOffset:s,...c}=e,u=useRef(null),a=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:u,scrollOffset:s}),[l,s,n?.collection]);k$1(a,u);let d=c$3({...c,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuLoadingIndicator",values:void 0}),g={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:l$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:u,style:{position:"absolute",height:1,width:1}})}),i&&d.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),g),...d,role:"menuitem",ref:t,children:d.children})})]})});var kt=Me.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:c,selectedKeys:u,defaultSelectedKeys:a,onSelectionChange:d,disabledKeys:g,disallowEmptySelection:p$1,...x},y)=>{let{isVirtualized:m}=useContext(p),b=o?.(r),S=s==="ListBox"?ft:Et,M=c==null?{}:{selectionMode:c,selectedKeys:u,defaultSelectedKeys:a,onSelectionChange:d,disabledKeys:g,disallowEmptySelection:p$1};return jsxs(S,{id:r.id,"aria-label":r.title,...M,className:a$d(`BaselineUI-${s}-Section`,Nr,m&&!e&&zr,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:y,children:[t?b?jsx(Ge,{className:`BaselineUI-${s}-SectionHeader`,children:b}):jsx(Ge,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$c,{className:a$d(Hr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:$e(x),children:R=>jsx(rt,{componentName:s,item:R,...x},R.id)})]})});kt.displayName="ListSection";var jo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$c,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Uo=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:c=false})=>{let u=r.icon,a=l!=="none",d=r.keyboardShortcut??r.description;return jsxs(a$c,{display:"flex",alignItems:"center",gap:"lg",className:a$d(Br({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$c,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[a&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,a&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$8({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,u?jsx(u,{size:24}):null,jsx(b$6,{slot:"label",elementType:"span",children:r.label})]}),c?jsx(jo,{componentName:s}):d?jsx(b$6,{slot:"description",className:a$d(Fr({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:d}):null]})},rt=Me.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:c}=useContext(oo);return jsx(n==="ListBox"?gt:Ot,{...c$4(a$e(i),{onPress:a=>s?.(a,r.id),onKeyDown:c?a=>{c(a,r.id),a.continuePropagation();}:void 0}),id:r.id,value:r,className:a=>a$d(_r,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,a):t),style:a=>typeof e=="function"?e(r,a):e,textValue:r.label,ref:l,children:a=>o?o(r,a):jsx(Uo,{componentName:n,...a,item:r})})});rt.displayName="ListOption";var no=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),oo=Me.createContext({}),Go=Me.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:c,dragAndDropHooks:u,listBoxHandle:a,"data-block-id":d,"data-block-class":g,...p$1},x)=>{let y=a$4(x),m=Me.useRef(false),b=Me.useRef(null),S=useContext(se),{isVirtualized:M,layoutDelegate:R}=useContext(p);useEffect(()=>{S&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[S,s,o,n,i,l,t]),a$f({ref:y,isDisabled:!u});let I=useCallback(P=>[...y.current?.querySelectorAll('[role="option"][data-key]')??[]].find(C=>C.dataset.key===String(P)),[y]);useEffect(()=>{if(!M)return;let P=y.current,v=P?.ownerDocument,C=v?.defaultView;if(P==null||v==null||C==null)return;let _=()=>{let D=f$4(P);return D==null||D===v.body||D===v.documentElement},U=()=>P.querySelector('[role="option"][tabindex="0"]')??P.querySelector('[role="option"][data-focused="true"]'),K=()=>{let D=f$4(P);return D!=null&&h$1(P,D)},H=D=>D.composedPath().some(de=>de instanceof C.Node&&h$1(P,de)),X=()=>{m.current=false;},ae=()=>{b.current!=null&&C.cancelAnimationFrame(b.current),b.current=C.requestAnimationFrame(()=>{if(b.current=null,K())return;if(!_()){X();return}let D=U();D?.focus({preventScroll:true});});},oe=D=>{no.has(D.key)&&(m.current=true);},J=D=>{!no.has(D.key)||!_()||!m.current||ae();},Y=D=>{H(D)||K()||X();},Re=D=>{H(D)||X();},Z=new MutationObserver(D=>{D.some(({addedNodes:de,removedNodes:ne})=>de.length>0||ne.length>0)&&m.current&&ae();});return P.addEventListener("keydown",oe),v.addEventListener("keydown",J,true),v.addEventListener("focusin",Y,true),v.addEventListener("pointerdown",Re,true),Z.observe(P,{childList:true,subtree:true}),()=>{P.removeEventListener("keydown",oe),v.removeEventListener("keydown",J,true),v.removeEventListener("focusin",Y,true),v.removeEventListener("pointerdown",Re,true),Z.disconnect(),b.current!=null&&C.cancelAnimationFrame(b.current),X(),b.current=null;}},[M,y]);let F=Me.useRef(null),f=useCallback(()=>{let P=F.current;P&&(P.ownerWindow.cancelAnimationFrame(P.frameId),F.current=null);},[]);useEffect(()=>f,[f]);let T=useCallback((P,v)=>{if(f(),!y.current)return;let C=()=>{let U=I(P);if(U)return U.scrollIntoView({block:"nearest",inline:"nearest",...v}),true;if(M&&R){let K=R.getItemRect(P);return K?(R.virtualizer.delegate.setVisibleRect(K),true):false}return false};if(C())return;let _=y.current.ownerDocument?.defaultView;_&&(F.current={ownerWindow:_,frameId:_.requestAnimationFrame(()=>{F.current=null,C();})});},[f,I,M,R,y]);useImperativeHandle(a,()=>({scrollIntoView:T,setFocusedKey:P=>{let v=I(P);!y.current||!v||(v.focus(),T(P));}}),[T,I,y]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},B=p$1.items?.[0]?.id;return jsx(mt,{...p$1,dependencies:[...p$1.dependencies??[],B,...$e(E)],"data-block-id":d,"data-block-class":g,dragAndDropHooks:u,ref:y,className:a$d(wr,"BaselineUI-ListBox",c),children:P=>jsx(qo,{item:P,isFirstCollectionItem:B===P.id,...E},P.id)})});Go.displayName="UNSAFE_ListBox";var Xo=Me.createContext({}),qo=r=>{let e=useContext(Xo),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$g(t,"Item is required"),"children"in t?jsx(kt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx(rt,{item:t,componentName:"ListBox",...l})};export{pt as a,se as b,yt as c,$e as d,Si as e,Io as f,cs as g,ht as h,Dt as i,Fo as j,Bo as k,Ho as l,kt as m,Uo as n,rt as o,oo as p,Go as q,qo as r};
@@ -1,4 +1,4 @@
1
- import {b as b$1,a as a$8}from'./chunk-WHN2SEWO.mjs';import {a,b as b$4,c}from'./chunk-IEOHIOGL.mjs';import {a as a$c}from'./chunk-AD3MLX6G.mjs';import {n,p}from'./chunk-K7VOXFSK.mjs';import {a as a$7}from'./chunk-E22TWF63.mjs';import {b,c as c$1}from'./chunk-DZDZZRWE.mjs';import {b as b$2}from'./chunk-TUJLNJPJ.mjs';import {a as a$b}from'./chunk-O7XK2WIX.mjs';import {a as a$6}from'./chunk-VGFPT43C.mjs';import {a as a$5}from'./chunk-3BG6K2G2.mjs';import {b as b$3}from'./chunk-OQPYPKZV.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {a as a$a}from'./chunk-RT4LMB6X.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import pe,{useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {b as b$1,a as a$8}from'./chunk-KHDWTXGG.mjs';import {a,b as b$4,c}from'./chunk-JRCDMRIW.mjs';import {a as a$c}from'./chunk-6GMU63H2.mjs';import {n,p}from'./chunk-OMWMNUTI.mjs';import {a as a$7}from'./chunk-QXXKOFWM.mjs';import {b,c as c$1}from'./chunk-7MLFM55C.mjs';import {b as b$2}from'./chunk-AFOW62QN.mjs';import {a as a$b}from'./chunk-O7XK2WIX.mjs';import {a as a$6}from'./chunk-DAI7V4TE.mjs';import {a as a$5}from'./chunk-VXZT2JR2.mjs';import {b as b$3}from'./chunk-OQPYPKZV.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {a as a$a}from'./chunk-RT4LMB6X.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import pe,{useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {g,e,d,f,h,b,a,c,i}from'./chunk-24R46WQW.mjs';import {y}from'./chunk-4MHBLLHV.mjs';import {useMemo}from'react';/**
1
+ import {g,e,d,f,h,b,a,c,i}from'./chunk-XOS3JIQX.mjs';import {y}from'./chunk-TYKMNZJ4.mjs';import {useMemo}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b as b$1,d,e,c as c$1}from'./chunk-UNGYVWKZ.mjs';import {a as a$2}from'./chunk-PYV5J322.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import E,{useMemo,useCallback}from'react';import {Time,toZoned,toTime,GregorianCalendar,toCalendarDateTime,today,getLocalTimeZone}from'@internationalized/date';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {b as b$1,d,e,c as c$1}from'./chunk-ZA2FH3MS.mjs';import {a as a$2}from'./chunk-PYV5J322.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import E,{useMemo,useCallback}from'react';import {Time,toZoned,toTime,GregorianCalendar,toCalendarDateTime,today,getLocalTimeZone}from'@internationalized/date';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW