@baseline-ui/core 3.3.0 → 3.4.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 (434) hide show
  1. package/dist/Accordion.css +1 -1
  2. package/dist/Accordion.mjs +1 -1
  3. package/dist/ActionButton.css +1 -1
  4. package/dist/ActionButton.mjs +1 -1
  5. package/dist/ActionGroup.css +1 -1
  6. package/dist/ActionGroup.mjs +1 -1
  7. package/dist/ActionIconButton.css +1 -1
  8. package/dist/ActionIconButton.mjs +1 -1
  9. package/dist/Actionable.mjs +1 -1
  10. package/dist/AlertDialog.css +1 -1
  11. package/dist/AlertDialog.mjs +1 -1
  12. package/dist/AudioPlayer.css +1 -1
  13. package/dist/AudioPlayer.mjs +1 -1
  14. package/dist/ButtonSelect.css +1 -1
  15. package/dist/ButtonSelect.mjs +1 -1
  16. package/dist/Calendar.css +1 -1
  17. package/dist/Calendar.mjs +1 -1
  18. package/dist/Checkbox.mjs +1 -1
  19. package/dist/ColorInput.css +1 -1
  20. package/dist/ColorInput.mjs +1 -1
  21. package/dist/ColorSwatch.mjs +1 -1
  22. package/dist/ColorSwatchPicker.mjs +1 -1
  23. package/dist/ComboBox.css +1 -1
  24. package/dist/ComboBox.mjs +1 -1
  25. package/dist/DateField.css +1 -1
  26. package/dist/DateField.mjs +1 -1
  27. package/dist/DateFormat.mjs +1 -1
  28. package/dist/Dialog.css +1 -1
  29. package/dist/Dialog.mjs +1 -1
  30. package/dist/Disclosure.mjs +1 -1
  31. package/dist/DomNodeRenderer.mjs +1 -1
  32. package/dist/Drawer.css +1 -1
  33. package/dist/Drawer.mjs +1 -1
  34. package/dist/Editor.css +1 -1
  35. package/dist/Editor.mjs +1 -1
  36. package/dist/FileInput.css +1 -1
  37. package/dist/FileInput.mjs +1 -1
  38. package/dist/FileList.css +1 -1
  39. package/dist/FileList.mjs +1 -1
  40. package/dist/FileUploader.css +1 -1
  41. package/dist/FileUploader.mjs +1 -1
  42. package/dist/FrameProvider.mjs +1 -1
  43. package/dist/FreehandCanvas.css +1 -1
  44. package/dist/FreehandCanvas.mjs +1 -1
  45. package/dist/GridList.mjs +1 -1
  46. package/dist/Group.mjs +1 -1
  47. package/dist/I18nProvider.mjs +1 -1
  48. package/dist/Icon.mjs +1 -1
  49. package/dist/ImageDropZone.css +1 -1
  50. package/dist/ImageDropZone.mjs +1 -1
  51. package/dist/ImageGallery.css +1 -1
  52. package/dist/ImageGallery.mjs +1 -1
  53. package/dist/InlineAlert.css +1 -1
  54. package/dist/InlineAlert.mjs +1 -1
  55. package/dist/InlineToolbar.mjs +2 -2
  56. package/dist/Kbd.mjs +1 -1
  57. package/dist/Link.mjs +1 -1
  58. package/dist/ListBox.mjs +1 -1
  59. package/dist/Menu.css +1 -1
  60. package/dist/Menu.mjs +1 -1
  61. package/dist/MessageFormat.mjs +1 -1
  62. package/dist/Modal.mjs +1 -1
  63. package/dist/NumberFormat.mjs +1 -1
  64. package/dist/NumberInput.css +1 -1
  65. package/dist/NumberInput.mjs +1 -1
  66. package/dist/Pagination.css +1 -1
  67. package/dist/Pagination.mjs +1 -1
  68. package/dist/Panel.mjs +1 -1
  69. package/dist/PointPicker.mjs +1 -1
  70. package/dist/Popover.mjs +1 -1
  71. package/dist/Portal.mjs +1 -1
  72. package/dist/Preview.css +1 -1
  73. package/dist/Preview.mjs +1 -1
  74. package/dist/ProgressBar.mjs +1 -1
  75. package/dist/ProgressSpinner.mjs +1 -1
  76. package/dist/RadioGroup.mjs +1 -1
  77. package/dist/Reaction.mjs +1 -1
  78. package/dist/ScrollControlButton.mjs +1 -1
  79. package/dist/SearchInput.css +1 -1
  80. package/dist/SearchInput.mjs +1 -1
  81. package/dist/Select.css +1 -1
  82. package/dist/Select.mjs +1 -1
  83. package/dist/Separator.mjs +1 -1
  84. package/dist/Slider.css +1 -1
  85. package/dist/Slider.mjs +1 -1
  86. package/dist/Stepper.mjs +1 -1
  87. package/dist/Switch.mjs +1 -1
  88. package/dist/Table.mjs +1 -1
  89. package/dist/Tabs.css +1 -1
  90. package/dist/Tabs.mjs +1 -1
  91. package/dist/Tag.mjs +1 -1
  92. package/dist/TagGroup.mjs +1 -1
  93. package/dist/TaggedPagination.css +1 -1
  94. package/dist/TaggedPagination.mjs +1 -1
  95. package/dist/Text.mjs +1 -1
  96. package/dist/TextInput.mjs +1 -1
  97. package/dist/ThemeProvider.mjs +1 -1
  98. package/dist/TimeField.mjs +1 -1
  99. package/dist/Toast.css +1 -1
  100. package/dist/Toast.mjs +1 -1
  101. package/dist/ToggleButton.css +1 -1
  102. package/dist/ToggleButton.mjs +1 -1
  103. package/dist/ToggleIconButton.mjs +1 -1
  104. package/dist/Toolbar.css +1 -1
  105. package/dist/Toolbar.mjs +1 -1
  106. package/dist/Tooltip.mjs +1 -1
  107. package/dist/TreeView.css +1 -1
  108. package/dist/TreeView.mjs +1 -1
  109. package/dist/UNSAFE_ListBox.mjs +1 -1
  110. package/dist/Virtualizer.mjs +1 -1
  111. package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
  112. package/dist/{chunk-4PYEGHW5.mjs → chunk-22VRCVTH.mjs} +2 -2
  113. package/dist/chunk-235S3EB7.mjs +10 -0
  114. package/dist/chunk-24R46WQW.mjs +10 -0
  115. package/dist/{chunk-5IXSPQRW.mjs → chunk-2F3CFR22.mjs} +2 -2
  116. package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
  117. package/dist/{chunk-KHOXLBPR.mjs → chunk-2LFMBQKQ.mjs} +2 -2
  118. package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
  119. package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
  120. package/dist/{chunk-QXOG2ISL.mjs → chunk-36ZMHBG5.mjs} +2 -2
  121. package/dist/chunk-3BEG3MEX.mjs +10 -0
  122. package/dist/chunk-3BG6K2G2.mjs +10 -0
  123. package/dist/{chunk-E5GYCA3P.mjs → chunk-3DWFAHR2.mjs} +1 -1
  124. package/dist/{chunk-YX2ASVM3.mjs → chunk-3KCSUNRV.mjs} +1 -1
  125. package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
  126. package/dist/chunk-4AG2RUAZ.mjs +10 -0
  127. package/dist/{chunk-RSTHM3ZF.mjs → chunk-4EANTENO.mjs} +1 -1
  128. package/dist/{chunk-TCCQDGMI.mjs → chunk-4EAXDHSV.mjs} +1 -1
  129. package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
  130. package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
  131. package/dist/chunk-4MHBLLHV.mjs +11 -0
  132. package/dist/chunk-4P247R4V.mjs +10 -0
  133. package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
  134. package/dist/chunk-4RSUKS23.mjs +10 -0
  135. package/dist/chunk-4S4GGUSH.mjs +10 -0
  136. package/dist/chunk-4W5VP4NV.mjs +10 -0
  137. package/dist/chunk-5BKC373Y.mjs +10 -0
  138. package/dist/chunk-5FK5AJ7A.mjs +10 -0
  139. package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
  140. package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
  141. package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
  142. package/dist/{chunk-UCPPKNGF.mjs → chunk-5VNC6UYE.mjs} +2 -2
  143. package/dist/chunk-5ZC64ZG7.mjs +10 -0
  144. package/dist/{chunk-NUYBQ7KP.mjs → chunk-6G7EUNZW.mjs} +1 -1
  145. package/dist/chunk-6QQEK5I6.mjs +10 -0
  146. package/dist/{chunk-B237CJT4.mjs → chunk-76DKF2SK.mjs} +1 -1
  147. package/dist/chunk-7MMO7S3R.mjs +10 -0
  148. package/dist/{chunk-6NQPENP4.mjs → chunk-7P7VZMTO.mjs} +1 -1
  149. package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
  150. package/dist/chunk-7SQRBY7N.mjs +10 -0
  151. package/dist/chunk-7TE4MFKC.mjs +10 -0
  152. package/dist/chunk-7XGNJE7J.mjs +10 -0
  153. package/dist/{chunk-VZFS4QRW.mjs → chunk-AD3MLX6G.mjs} +1 -1
  154. package/dist/chunk-AELTF2DE.mjs +10 -0
  155. package/dist/chunk-AI6WQPRX.mjs +10 -0
  156. package/dist/chunk-AK7XHUQW.mjs +10 -0
  157. package/dist/chunk-AM5FU4Y7.mjs +10 -0
  158. package/dist/chunk-AYQN3OH2.mjs +10 -0
  159. package/dist/chunk-B3EZOXNU.mjs +10 -0
  160. package/dist/chunk-BBYODNBO.mjs +10 -0
  161. package/dist/chunk-BGQRLALS.mjs +10 -0
  162. package/dist/chunk-BGRGRUG4.mjs +10 -0
  163. package/dist/chunk-BHJCYKFJ.mjs +11 -0
  164. package/dist/chunk-BTPAZDGG.mjs +10 -0
  165. package/dist/{chunk-HVKYWSRF.mjs → chunk-BXNNVZOQ.mjs} +1 -1
  166. package/dist/chunk-BYDJXA5A.mjs +10 -0
  167. package/dist/{chunk-ZLZAFTSD.mjs → chunk-C2VP5IEB.mjs} +1 -1
  168. package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
  169. package/dist/chunk-CIPPPD6E.mjs +10 -0
  170. package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
  171. package/dist/{chunk-QSSCSN5S.mjs → chunk-COHK4QQW.mjs} +2 -2
  172. package/dist/chunk-CTSDHAAV.mjs +10 -0
  173. package/dist/chunk-CU6D2EA6.mjs +10 -0
  174. package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
  175. package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
  176. package/dist/chunk-DAN62T2M.mjs +10 -0
  177. package/dist/{chunk-SYFSGF73.mjs → chunk-DAS5QGJX.mjs} +1 -1
  178. package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
  179. package/dist/{chunk-RJZZIVSY.mjs → chunk-DSV6CCI6.mjs} +1 -1
  180. package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
  181. package/dist/{chunk-NADBGP35.mjs → chunk-E22TWF63.mjs} +2 -2
  182. package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
  183. package/dist/chunk-ETM4MNG4.mjs +10 -0
  184. package/dist/chunk-EUVUJQ2Z.mjs +10 -0
  185. package/dist/chunk-F7WPMQ3P.mjs +16 -0
  186. package/dist/chunk-FOKMDEP7.mjs +10 -0
  187. package/dist/chunk-FPFGTGUC.mjs +10 -0
  188. package/dist/chunk-FPM5UJRF.mjs +10 -0
  189. package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
  190. package/dist/{chunk-N26C7NYZ.mjs → chunk-GCBMNOA6.mjs} +1 -1
  191. package/dist/chunk-GFKZXGWJ.mjs +10 -0
  192. package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
  193. package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
  194. package/dist/chunk-GMALMQWI.mjs +10 -0
  195. package/dist/chunk-GQIS4QBN.mjs +10 -0
  196. package/dist/chunk-GUPSQSPC.mjs +0 -0
  197. package/dist/chunk-HH4VLTF3.mjs +10 -0
  198. package/dist/chunk-I7LPPUZS.mjs +10 -0
  199. package/dist/chunk-IEOHIOGL.mjs +10 -0
  200. package/dist/chunk-IHES52NR.mjs +10 -0
  201. package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
  202. package/dist/chunk-IUXXTORQ.mjs +10 -0
  203. package/dist/{chunk-5K46OAX5.mjs → chunk-IVGNOQSQ.mjs} +1 -1
  204. package/dist/chunk-IWZXZ5LU.mjs +10 -0
  205. package/dist/chunk-J4OPD7OL.mjs +10 -0
  206. package/dist/{chunk-XUJJMAKM.mjs → chunk-JZXLV6JU.mjs} +1 -1
  207. package/dist/chunk-K4TTZX4T.mjs +10 -0
  208. package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
  209. package/dist/chunk-K7VOXFSK.mjs +10 -0
  210. package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
  211. package/dist/chunk-KGS3UWPG.mjs +10 -0
  212. package/dist/{chunk-6EFNC443.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
  213. package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
  214. package/dist/chunk-KUDCYGII.mjs +10 -0
  215. package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
  216. package/dist/chunk-KX7WG3L4.mjs +10 -0
  217. package/dist/chunk-LJZ7ZS4C.mjs +10 -0
  218. package/dist/{chunk-PNBYTIUO.mjs → chunk-LPI2NIDI.mjs} +1 -1
  219. package/dist/{chunk-L6S5GBKS.mjs → chunk-MBRNO6IW.mjs} +1 -1
  220. package/dist/chunk-MDE2FQHX.mjs +10 -0
  221. package/dist/chunk-MFB3SWO7.mjs +29 -0
  222. package/dist/{chunk-V37GPPZD.mjs → chunk-MIF6BAPG.mjs} +1 -1
  223. package/dist/chunk-MYJ733MN.mjs +10 -0
  224. package/dist/chunk-MZIQ27JP.mjs +10 -0
  225. package/dist/chunk-NJKSUI2F.mjs +10 -0
  226. package/dist/chunk-NKC4MIX3.mjs +10 -0
  227. package/dist/{chunk-GI2O6H4I.mjs → chunk-NMGKHMH3.mjs} +1 -1
  228. package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
  229. package/dist/chunk-NRQSR3G7.mjs +10 -0
  230. package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
  231. package/dist/chunk-NYCG264A.mjs +10 -0
  232. package/dist/chunk-NZNOHFLD.mjs +10 -0
  233. package/dist/chunk-O4DA3TPW.mjs +11 -0
  234. package/dist/{chunk-3UH5CQQF.mjs → chunk-O7IU5NHN.mjs} +2 -2
  235. package/dist/chunk-ONEE6UCM.mjs +10 -0
  236. package/dist/chunk-OQPYPKZV.mjs +10 -0
  237. package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
  238. package/dist/chunk-OZMADP4Z.mjs +10 -0
  239. package/dist/chunk-P7BN7QDF.mjs +10 -0
  240. package/dist/chunk-PD5ZXNGT.mjs +10 -0
  241. package/dist/chunk-PMDRFB75.mjs +10 -0
  242. package/dist/chunk-PPHSLODC.mjs +10 -0
  243. package/dist/chunk-PYV5J322.mjs +11 -0
  244. package/dist/{chunk-6V7BIFQD.mjs → chunk-Q4SEEMIX.mjs} +1 -1
  245. package/dist/{chunk-2EMOQIU7.mjs → chunk-Q6PGYMYI.mjs} +2 -2
  246. package/dist/chunk-QAAOC64D.mjs +10 -0
  247. package/dist/chunk-QJYPCVSD.mjs +10 -0
  248. package/dist/chunk-QU34XSML.mjs +10 -0
  249. package/dist/chunk-QUQ4VYCN.mjs +10 -0
  250. package/dist/chunk-R3HHMCE5.mjs +10 -0
  251. package/dist/chunk-R4MOUAJW.mjs +10 -0
  252. package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
  253. package/dist/{chunk-XEGXSFIP.mjs → chunk-R7R7JDA3.mjs} +2 -2
  254. package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
  255. package/dist/chunk-RXSX2RKA.mjs +10 -0
  256. package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
  257. package/dist/chunk-S4HLMIFK.mjs +10 -0
  258. package/dist/chunk-SD43KVTU.mjs +10 -0
  259. package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
  260. package/dist/chunk-SLFKSR3T.mjs +10 -0
  261. package/dist/chunk-SLSJEMQ4.mjs +10 -0
  262. package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
  263. package/dist/chunk-SVIYLH7R.mjs +10 -0
  264. package/dist/chunk-SVTTHYTR.mjs +10 -0
  265. package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
  266. package/dist/chunk-SZCVQU55.mjs +10 -0
  267. package/dist/{chunk-DMJHCNBU.mjs → chunk-SZN2J2ER.mjs} +1 -1
  268. package/dist/chunk-TAT552A5.mjs +10 -0
  269. package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
  270. package/dist/{chunk-NQO6OQT6.mjs → chunk-TH4XPZEO.mjs} +1 -1
  271. package/dist/chunk-TSHZ7JSR.mjs +10 -0
  272. package/dist/{chunk-AYBACQ6U.mjs → chunk-TUJLNJPJ.mjs} +2 -2
  273. package/dist/chunk-TUY23KMK.mjs +10 -0
  274. package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
  275. package/dist/chunk-UDMNDUBO.mjs +10 -0
  276. package/dist/chunk-UFN2OAM2.mjs +10 -0
  277. package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
  278. package/dist/chunk-UNGYVWKZ.mjs +10 -0
  279. package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
  280. package/dist/chunk-UUTMZQQA.mjs +15 -0
  281. package/dist/chunk-UZ672WDX.mjs +10 -0
  282. package/dist/chunk-VETO7WNN.mjs +10 -0
  283. package/dist/chunk-VGFPT43C.mjs +10 -0
  284. package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
  285. package/dist/{chunk-2TH2QRSV.mjs → chunk-W7OTSFZS.mjs} +1 -1
  286. package/dist/chunk-WHN2SEWO.mjs +10 -0
  287. package/dist/{chunk-UN7XC7QV.mjs → chunk-WTAJLO6E.mjs} +1 -1
  288. package/dist/chunk-XD43CVDT.mjs +10 -0
  289. package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
  290. package/dist/chunk-XMGPNXZH.mjs +10 -0
  291. package/dist/chunk-XWJJ4V3O.mjs +10 -0
  292. package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
  293. package/dist/chunk-YF63IQQR.mjs +10 -0
  294. package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
  295. package/dist/chunk-YMYMFVW4.mjs +10 -0
  296. package/dist/chunk-YPEAGD2G.mjs +10 -0
  297. package/dist/chunk-YQHHE5AT.mjs +10 -0
  298. package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
  299. package/dist/{chunk-Z4HTFTPM.mjs → chunk-YU5NRJT6.mjs} +2 -2
  300. package/dist/{chunk-IXK6S6IH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
  301. package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
  302. package/dist/{chunk-XJ2DFV56.mjs → chunk-ZZIQF6XD.mjs} +1 -1
  303. package/dist/hooks/useDevice.mjs +1 -1
  304. package/dist/hooks/useI18n.mjs +1 -1
  305. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  306. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  307. package/dist/hooks/useMedia.mjs +1 -1
  308. package/dist/hooks/useMutationObserver.mjs +1 -1
  309. package/dist/hooks/usePortalContainer.mjs +1 -1
  310. package/dist/hooks/usePreventFocus.mjs +1 -1
  311. package/dist/hooks/useResizeObserver.mjs +1 -1
  312. package/dist/hooks/useTextSelection.mjs +1 -1
  313. package/dist/hooks/useUndoRedo.mjs +1 -1
  314. package/dist/index.css +1 -1
  315. package/dist/index.d.ts +375 -166
  316. package/dist/index.js +21 -20
  317. package/dist/index.mjs +1 -1
  318. package/dist/react-aria.mjs +1 -1
  319. package/dist/react-stately.mjs +1 -1
  320. package/dist/utils/colors.mjs +1 -1
  321. package/dist/utils/dom.mjs +1 -1
  322. package/dist/utils/isInShadowDOM.mjs +1 -1
  323. package/dist/utils/keyboards.mjs +1 -1
  324. package/messages.json +1 -1
  325. package/package.json +4 -4
  326. package/sbom.json +6 -6
  327. package/dist/chunk-2BXXD6SW.mjs +0 -10
  328. package/dist/chunk-2V323KAD.mjs +0 -10
  329. package/dist/chunk-2YTKLY4F.mjs +0 -10
  330. package/dist/chunk-3FYY26ED.mjs +0 -10
  331. package/dist/chunk-3W6RWDIE.mjs +0 -10
  332. package/dist/chunk-4C6AJ3TZ.mjs +0 -10
  333. package/dist/chunk-5HK56IXH.mjs +0 -10
  334. package/dist/chunk-63KRQW56.mjs +0 -10
  335. package/dist/chunk-66NJ7EYY.mjs +0 -10
  336. package/dist/chunk-6JWACCHG.mjs +0 -10
  337. package/dist/chunk-6PXOVWVM.mjs +0 -10
  338. package/dist/chunk-6VXBFM6Q.mjs +0 -10
  339. package/dist/chunk-7MQBBSZ2.mjs +0 -10
  340. package/dist/chunk-7P322KP4.mjs +0 -10
  341. package/dist/chunk-7PRJIPFA.mjs +0 -10
  342. package/dist/chunk-A24DWFQ2.mjs +0 -10
  343. package/dist/chunk-AC7OXVHA.mjs +0 -10
  344. package/dist/chunk-AKES5B6C.mjs +0 -10
  345. package/dist/chunk-AQYBKDT2.mjs +0 -16
  346. package/dist/chunk-AUOQSTS5.mjs +0 -10
  347. package/dist/chunk-AW5WDI2U.mjs +0 -10
  348. package/dist/chunk-B6U6JHD4.mjs +0 -10
  349. package/dist/chunk-B7PSE5KC.mjs +0 -10
  350. package/dist/chunk-BBZ2I3RF.mjs +0 -10
  351. package/dist/chunk-BCENUHNO.mjs +0 -10
  352. package/dist/chunk-BGHBSM3K.mjs +0 -10
  353. package/dist/chunk-BGMVPFYK.mjs +0 -10
  354. package/dist/chunk-BJVFZYUV.mjs +0 -10
  355. package/dist/chunk-BU5H25MV.mjs +0 -10
  356. package/dist/chunk-C7AUJO36.mjs +0 -10
  357. package/dist/chunk-CAWUDHAE.mjs +0 -10
  358. package/dist/chunk-CCA2ABXO.mjs +0 -10
  359. package/dist/chunk-CUOTJ7AP.mjs +0 -10
  360. package/dist/chunk-CYTHB4M4.mjs +0 -10
  361. package/dist/chunk-D5EEZT5J.mjs +0 -10
  362. package/dist/chunk-DDLZ6CKC.mjs +0 -10
  363. package/dist/chunk-E3DMXJIC.mjs +0 -10
  364. package/dist/chunk-E3QDPL77.mjs +0 -10
  365. package/dist/chunk-EA6GA4WC.mjs +0 -10
  366. package/dist/chunk-EGXILQNX.mjs +0 -10
  367. package/dist/chunk-EX2LI2CV.mjs +0 -10
  368. package/dist/chunk-EYKIXVM3.mjs +0 -10
  369. package/dist/chunk-F2X474RV.mjs +0 -10
  370. package/dist/chunk-GVI6EBGJ.mjs +0 -10
  371. package/dist/chunk-HK3CZVHY.mjs +0 -10
  372. package/dist/chunk-HONWMHMX.mjs +0 -10
  373. package/dist/chunk-HZHAKW6I.mjs +0 -10
  374. package/dist/chunk-ILAQFMYD.mjs +0 -10
  375. package/dist/chunk-INDVRI57.mjs +0 -10
  376. package/dist/chunk-ITWJSFYK.mjs +0 -10
  377. package/dist/chunk-IVC2BJRU.mjs +0 -10
  378. package/dist/chunk-JDLUGVXG.mjs +0 -10
  379. package/dist/chunk-K6HE4Z2Y.mjs +0 -10
  380. package/dist/chunk-K73R5G6G.mjs +0 -10
  381. package/dist/chunk-KEAM6GSA.mjs +0 -10
  382. package/dist/chunk-KEVERVHK.mjs +0 -10
  383. package/dist/chunk-KPEONVLU.mjs +0 -10
  384. package/dist/chunk-KUEDQO7P.mjs +0 -10
  385. package/dist/chunk-KWHTLY23.mjs +0 -10
  386. package/dist/chunk-KY3JKXSX.mjs +0 -10
  387. package/dist/chunk-LZFTBNPW.mjs +0 -10
  388. package/dist/chunk-M5M3EPG5.mjs +0 -10
  389. package/dist/chunk-M7OLZJYB.mjs +0 -10
  390. package/dist/chunk-MHUFXHRU.mjs +0 -10
  391. package/dist/chunk-MONDDKB4.mjs +0 -10
  392. package/dist/chunk-MRJFGHFW.mjs +0 -10
  393. package/dist/chunk-MVK5CB64.mjs +0 -10
  394. package/dist/chunk-N6VKP3UH.mjs +0 -10
  395. package/dist/chunk-NZQVKNP4.mjs +0 -10
  396. package/dist/chunk-OAY74XPB.mjs +0 -10
  397. package/dist/chunk-OMT6ZWSV.mjs +0 -11
  398. package/dist/chunk-P37WUXAI.mjs +0 -10
  399. package/dist/chunk-P5LSMA24.mjs +0 -11
  400. package/dist/chunk-PA3THES4.mjs +0 -10
  401. package/dist/chunk-QDQPVCXN.mjs +0 -10
  402. package/dist/chunk-QYTY3KJR.mjs +0 -10
  403. package/dist/chunk-R2OV7FJO.mjs +0 -10
  404. package/dist/chunk-RCBUNCHV.mjs +0 -10
  405. package/dist/chunk-RFTDIXEG.mjs +0 -10
  406. package/dist/chunk-SHJ2TJYG.mjs +0 -10
  407. package/dist/chunk-SMAYNDQQ.mjs +0 -10
  408. package/dist/chunk-T4R3EXGI.mjs +0 -10
  409. package/dist/chunk-TBCZKWGQ.mjs +0 -10
  410. package/dist/chunk-TDXALNX3.mjs +0 -10
  411. package/dist/chunk-TKQOQVZD.mjs +0 -10
  412. package/dist/chunk-TTYRHIRQ.mjs +0 -10
  413. package/dist/chunk-UBFMOTBM.mjs +0 -10
  414. package/dist/chunk-UEDBY5JI.mjs +0 -10
  415. package/dist/chunk-UT2I4K7L.mjs +0 -10
  416. package/dist/chunk-V3L4SVVF.mjs +0 -10
  417. package/dist/chunk-VAFIUM63.mjs +0 -29
  418. package/dist/chunk-VIVNQZYK.mjs +0 -10
  419. package/dist/chunk-VOSSQAHC.mjs +0 -11
  420. package/dist/chunk-WWSGOGLA.mjs +0 -10
  421. package/dist/chunk-X3AXUU3H.mjs +0 -10
  422. package/dist/chunk-X6IJEPSH.mjs +0 -10
  423. package/dist/chunk-XF5UMU6D.mjs +0 -15
  424. package/dist/chunk-XTH6B5FE.mjs +0 -10
  425. package/dist/chunk-XWLESSHN.mjs +0 -10
  426. package/dist/chunk-Y3YZMICA.mjs +0 -10
  427. package/dist/chunk-Y4DRSGEJ.mjs +0 -10
  428. package/dist/chunk-YB3KW7JC.mjs +0 -10
  429. package/dist/chunk-YIGT3OP2.mjs +0 -10
  430. package/dist/chunk-YKMSINHH.mjs +0 -10
  431. package/dist/chunk-YWCU4PP7.mjs +0 -10
  432. package/dist/chunk-YWQXHVMW.mjs +0 -10
  433. package/dist/chunk-ZGRRD3TU.mjs +0 -10
  434. /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
@@ -1,10 +0,0 @@
1
- import {a as a$4}from'./chunk-7L5UOGZA.mjs';import {a as a$7,b as b$2}from'./chunk-XF5UMU6D.mjs';import {h,g}from'./chunk-AKES5B6C.mjs';import {a as a$8}from'./chunk-F2X474RV.mjs';import {a as a$5}from'./chunk-YX2ASVM3.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {c}from'./chunk-V3L4SVVF.mjs';import {b}from'./chunk-UT2I4K7L.mjs';import {b as b$1}from'./chunk-QR2AF3KT.mjs';import {a as a$1}from'./chunk-ZGRRD3TU.mjs';import {a as a$a}from'./chunk-UUBOEBYZ.mjs';import {a as a$9}from'./chunk-4PYEGHW5.mjs';import {a as a$2}from'./chunk-66CUIXA6.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {b as b$3,e,f}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import x,{useContext,useMemo,useEffect,useState,useRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';import {motion,AnimatePresence}from'motion/react';import {themeVars}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 P=x.createContext({state:null,triggerProps:{},overlayProps:{}}),Ee=({children:e,...t})=>{let o=a$9(t),{triggerProps:a,overlayProps:n}=a$a({type:"dialog"},o),l=useMemo(()=>({state:o,triggerProps:a,overlayProps:n}),[o,a,n]);return jsx(P.Provider,{value:l,children:e})};Ee.displayName="Modal";function A(e,t,o){let{overlayProps:a,underlayProps:n}=a$7({...e,isOpen:t.isOpen,onClose:t.close},o);return b$2({isDisabled:!t.isOpen,root:e.root},o),c(),useEffect(()=>{if(t.isOpen&&o.current)return a$8([o.current],{shouldUseInert:e.shouldUseInert??false,root:e.root})},[t.isOpen,o,e.root,e.shouldUseInert]),{modalProps:c$1(a),underlayProps:n}}function se(e$1,t,o){let[a,n]=useState({}),l=useRef(false),[g$1,b]=useState(null),{container:p,shouldContainOverlays:d,isContainerPositioned:v,containerHeight:c,portalContainer:h$1}=useContext(b$1);useEffect(()=>{if(!e$1)return;let r=b$3(e$1),m=r.visualViewport,y=()=>{let M=o?m?.height??r.innerHeight:r.innerHeight,O=r.innerHeight-M;if(l.current=o?O>60:false,l.current){let i=f(e$1.ownerDocument);i&&g(i)&&i.scrollIntoView({behavior:"smooth",block:"center"});}if(t)n({maxHeight:(M||0)*.8,bottom:O});else {let i=`${M||0}px`,f=d?`min(${i}, ${c?c+"px":i})`:i;n({maxHeight:`calc(${f} - (2 * ${themeVars.spacing.xl} + env(safe-area-inset-top) + env(safe-area-inset-bottom)))`,top:l.current?`calc(env(safe-area-inset-top) + ${themeVars.spacing.xl})`:void 0});}};return y(),m?.addEventListener("resize",y),r.addEventListener("resize",y),()=>{m?.removeEventListener("resize",y),r.removeEventListener("resize",y);}},[e$1,t,d,o,c]);let C=h$1&&!e(p,h$1);useEffect(()=>{if(!p||!d||v&&!C)return;let r=()=>{p&&b(h(p));};r();let m=new ResizeObserver(()=>{r();});return m.observe(p),()=>{m.disconnect();}},[p,d,v,C]);let u=useMemo(()=>({...a,overflow:"auto",position:"relative"}),[a]),R=useMemo(()=>{if(!t&&l.current)return {alignItems:"flex-start"};if(d&&(!v||C)){let r=g$1||(p?h(p):{x:0,y:0,height:0,width:0});return {position:"absolute",left:r.x,top:r.y,height:r.height,width:r.width}}return {}},[t,l.current,p,v,d,g$1,C]);return {dialogStyle:u,containerStyle:R}}var le="aml2vl8 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6iz _1yep5z6j0 _1yep5z6j1",pe="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",me=a({defaultClassName:"aml2vl3 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{enableDrawer:{false:"_1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",true:"aml2vl5"},shouldContainOverlays:{true:"aml2vl6",false:"aml2vl7"}},defaultVariants:{},compoundVariants:[]}),de=a({defaultClassName:"aml2vl0 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6gj",variantClassNames:{shouldContainOverlays:{true:"aml2vl1",false:"aml2vl2"}},defaultVariants:{},compoundVariants:[]});var L=x.forwardRef(({children:e,className:t,style:o,isDismissable:a=true,isKeyboardDismissDisabled:n=false,portalContainer:l,disableAnimation:g,enableDrawer:b$2=false,"data-block-id":p,"data-block-class":d,shouldCloseOnInteractOutside:v,UNSAFE_enableInert:c,disableFocusManagement:h},C)=>{let{state:u}=x.useContext(P),[R,r]=x.useState(true),m=x.useRef(null),[y,M]=x.useState(null),{shouldHandleVirtualKeyboard:O}=useContext(b),{shouldContainOverlays:i,container:f}=useContext(b$1),Ce=a$1(),s=typeof b$2=="boolean"&&b$2||b$2==="auto"&&Ce==="mobile";a$2(u,"ModalContent must be a child of Modal");let Me=typeof a=="function"?a(s):a,ge=typeof n=="function"?n(s):n,be=typeof c=="function"?c(s):c??false,z=a$3(l),k=a$4(z),Pe=useMemo(()=>i&&f?f:z?.ownerDocument?.body??f?.ownerDocument?.body??document.body,[i,f,z]),{modalProps:xe,underlayProps:he}=A({isDismissable:R&&Me,shouldCloseOnInteractOutside:E=>!f?.contains(E)&&i&&!z?.contains(E)?false:v?.(E)??true,isKeyboardDismissDisabled:ge,root:Pe,shouldUseInert:be},u,k),{dialogStyle:V,containerStyle:Oe}=se(y,s,O),ze=useMemo(()=>({isDrawer:s,closeDrawer:u.close,dialogStyle:V,dialogRef:m,setDialogElement:M,isWithinModal:true}),[s,u.close,V,m,M]),_e=useMemo(()=>({setIsPopoverSafelyClosed:r}),[r]),j={duration:.3,type:"tween",ease:"easeOut"},De={type:"spring",duration:.3},we={open:{opacity:1,transform:s?"translateY(0%)":"scale(1)"},closed:g?{opacity:1,transform:s?"translateY(0%)":"scale(1)"}:{opacity:0,transform:s?"translateY(100%)":"scale(0.95)"}};return jsx(ye.Provider,{value:ze,children:jsx(fe.Provider,{value:_e,children:jsxs(a$5,{className:a$6(me({enableDrawer:s,shouldContainOverlays:i}),t),"data-block-id":p,"data-block-class":d,style:{...o,...Oe},portalContainer:l,disableFocusManagement:h,ref:C,children:[jsx(motion.div,{...he,variants:{open:{opacity:1},closed:{opacity:g?1:0}},initial:"closed",animate:"open",exit:"closed","data-testid":"underlay",transition:j,className:a$6(de({shouldContainOverlays:i}),"BaselineUI-Modal-Underlay")}),jsx(motion.div,{...xe,ref:k,"data-drawer":s,className:a$6(s?le:pe,"BaselineUI-Modal-Content"),variants:we,transition:s?j:De,initial:"closed",animate:"open",exit:"closed",children:typeof e=="function"?e(u):e})]})})})});L.displayName="ModalContentCore";var ye=x.createContext({isDrawer:false,closeDrawer:()=>{},dialogStyle:{},setDialogElement:()=>{},isWithinModal:false}),fe=x.createContext({setIsPopoverSafelyClosed:()=>{}}),Ve=x.forwardRef(({shouldAnimateOnMount:e=true,disableAnimation:t,...o},a)=>{let{state:n}=x.useContext(P);return jsx(AnimatePresence,{initial:e&&!t,children:n?.isOpen?jsx(L,{...o,disableAnimation:t,ref:a}):null})});Ve.displayName="ModalContent";export{P as a,Ee as b,ye as c,fe as d,Ve as e};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-V37GPPZD.mjs';import {d}from'./chunk-UBFMOTBM.mjs';import {b as b$2}from'./chunk-DECHIERQ.mjs';import {a as a$2}from'./chunk-CGFLGZL4.mjs';import {b}from'./chunk-YB3KW7JC.mjs';import {b as b$1}from'./chunk-Y4DRSGEJ.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {q}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-KEVERVHK.mjs';import {c as c$1,e}from'./chunk-JDLUGVXG.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
- var c=new WeakMap;function R(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function N(e,o){let r=c.get(e);if(!r)throw new Error("Unknown list");return `${r.id}-option-${R(o)}`}function j(e,o,r){let t=a(e,{labelable:true}),i=e.selectionBehavior||"toggle",s=e.orientation||"vertical",n=e.linkBehavior||(i==="replace"?"action":"override");i==="toggle"&&n==="action"&&(n="override");let{listProps:d}=a$1({...e,ref:r,selectionManager:o.selectionManager,collection:o.collection,disabledKeys:o.disabledKeys,linkBehavior:n}),{focusWithinProps:p}=b({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),m=c$1(e.id);c.set(o,{id:m,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:n,UNSTABLE_itemBehavior:e.UNSTABLE_itemBehavior});let{labelProps:b$1,fieldProps:f}=a$2({...e,id:m,labelElementType:"span"});return {labelProps:b$1,listBoxProps:c$2(t,p,o.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox","aria-orientation":s,...c$2(f,d)})}}var K=new WeakMap;function B(e){let o=K.get(e);if(o!=null)return o;let r=0,t=i=>{for(let s of i)s.type==="section"?t(b$2(s,e)):s.type==="item"&&r++;};return t(e),K.set(e,r),r}function _(e$1,o,r){let{key:t}=e$1,i=c.get(o),s=e$1.isDisabled??o.selectionManager.isDisabled(t),n=e$1.isSelected??o.selectionManager.isSelected(t),d$1=e$1.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,p=e$1.shouldFocusOnHover??i?.shouldFocusOnHover,m=e$1.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,b=e$1.isVirtualized??i?.isVirtualized,f=e(void 0,r),g=e(void 0,r),h={role:"option","aria-disabled":s||void 0,"aria-selected":o.selectionManager.selectionMode!=="none"?n:void 0,"aria-label":e$1["aria-label"],"aria-labelledby":f,"aria-describedby":g},l=o.collection.getItem(t);if(b){let v=Number(l?.index);h["aria-posinset"]=Number.isNaN(v)?void 0:v+1,h["aria-setsize"]=B(o.collection);}let A=i?.onAction?()=>i?.onAction?.(t):void 0,L=N(o,t),{itemProps:w,isPressed:E,isFocused:O,hasAction:H,allowsSelection:z}=d({selectionManager:o.selectionManager,key:t,ref:r,shouldSelectOnPressUp:d$1,allowsDifferentPressOrigin:d$1&&p,isVirtualized:b,shouldUseVirtualFocus:m,isDisabled:s,onAction:A||l?.props?.onAction?a$3(l?.props?.onAction,A):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:L}),{hoverProps:C}=a$4({isDisabled:s||!p,onHoverStart(){b$1()||(o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(t));}}),S=a(l?.props);delete S.id;let W=q(l?.props);return {optionProps:{...h,...c$2(S,w,C,W),id:L},labelProps:{id:f},descriptionProps:{id:g},isFocused:O,isFocusVisible:O&&o.selectionManager.isFocused&&b$1(),isSelected:n,isDisabled:s,isPressed:E,allowsSelection:z,hasAction:H}}function $(e$1){let{heading:o,"aria-label":r}=e$1,t=e([!!o]);return {itemProps:{role:"presentation"},headingProps:o?{id:t,role:"presentation",onMouseDown:i=>{i.preventDefault();}}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":o?t:void 0}}}export{c as a,N as b,j as c,B as d,_ as e,$ as f};
@@ -1,10 +0,0 @@
1
- import {b,a as a$1}from'./chunk-AQYBKDT2.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-6ZQE5SHE.mjs';import {b as b$1,g}from'./chunk-AUOQSTS5.mjs';import {useRef,useCallback,useMemo}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 G(X){let{onMoveStart:b$2,onMove:K,onMoveEnd:M}=X,t$1=useRef({didMove:false,lastPosition:null,id:null}),{addGlobalListener:i,removeGlobalListener:u}=a(),Y=useCallback((r,p,f,o)=>{f===0&&o===0||(t$1.current.didMove||(t$1.current.didMove=true,b$2?.({type:"movestart",pointerType:p,shiftKey:r.shiftKey,metaKey:r.metaKey,ctrlKey:r.ctrlKey,altKey:r.altKey})),K?.({type:"move",pointerType:p,deltaX:f,deltaY:o,shiftKey:r.shiftKey,metaKey:r.metaKey,ctrlKey:r.ctrlKey,altKey:r.altKey}));},[b$2,K,t$1]),v=t(Y),R=useCallback((r,p)=>{b(),t$1.current.didMove&&M?.({type:"moveend",pointerType:p,shiftKey:r.shiftKey,metaKey:r.metaKey,ctrlKey:r.ctrlKey,altKey:r.altKey});},[M,t$1]),y=t(R);return {moveProps:useMemo(()=>{let r={},p=()=>{a$1(),t$1.current.didMove=false;};if(typeof PointerEvent>"u"&&process.env.NODE_ENV==="test"){let o=e=>{e.button===0&&(v(e,"mouse",e.pageX-(t$1.current.lastPosition?.pageX??0),e.pageY-(t$1.current.lastPosition?.pageY??0)),t$1.current.lastPosition={pageX:e.pageX,pageY:e.pageY});},c=e=>{if(e.button===0){y(e,"mouse");let l=b$1(g(e));u(l,"mousemove",o,false),u(l,"mouseup",c,false);}};r.onMouseDown=e=>{if(e.button===0){p(),e.stopPropagation(),e.preventDefault(),t$1.current.lastPosition={pageX:e.pageX,pageY:e.pageY};let l=b$1(g(e));i(l,"mousemove",o,false),i(l,"mouseup",c,false);}};let n=e=>{let l=[...e.changedTouches].findIndex(({identifier:s})=>s===t$1.current.id);if(l>=0){let{pageX:s,pageY:g}=e.changedTouches[l];v(e,"touch",s-(t$1.current.lastPosition?.pageX??0),g-(t$1.current.lastPosition?.pageY??0)),t$1.current.lastPosition={pageX:s,pageY:g};}},a=e=>{if([...e.changedTouches].findIndex(({identifier:s})=>s===t$1.current.id)>=0){y(e,"touch"),t$1.current.id=null;let s=b$1(g(e));u(s,"touchmove",n),u(s,"touchend",a),u(s,"touchcancel",a);}};r.onTouchStart=e=>{if(e.changedTouches.length===0||t$1.current.id!=null)return;let{pageX:l,pageY:s,identifier:g$1}=e.changedTouches[0];p(),e.stopPropagation(),e.preventDefault(),t$1.current.lastPosition={pageX:l,pageY:s},t$1.current.id=g$1;let h=b$1(g(e));i(h,"touchmove",n,false),i(h,"touchend",a,false),i(h,"touchcancel",a,false);};}else {let o=n=>{if(n.pointerId===t$1.current.id){let a=n.pointerType||"mouse";v(n,a,n.pageX-(t$1.current.lastPosition?.pageX??0),n.pageY-(t$1.current.lastPosition?.pageY??0)),t$1.current.lastPosition={pageX:n.pageX,pageY:n.pageY};}},c=n=>{if(n.pointerId===t$1.current.id){let a=n.pointerType||"mouse";y(n,a),t$1.current.id=null;let e=b$1(g(n));u(e,"pointermove",o,false),u(e,"pointerup",c,false),u(e,"pointercancel",c,false);}};r.onPointerDown=n=>{if(n.button===0&&t$1.current.id==null){p(),n.stopPropagation(),n.preventDefault(),t$1.current.lastPosition={pageX:n.pageX,pageY:n.pageY},t$1.current.id=n.pointerId;let a=b$1(g(n));i(a,"pointermove",o,false),i(a,"pointerup",c,false),i(a,"pointercancel",c,false);}};}let f=(o,c,n)=>{p(),v(o,"keyboard",c,n),y(o,"keyboard");};return r.onKeyDown=o=>{switch(o.key){case "Left":case "ArrowLeft":o.preventDefault(),o.stopPropagation(),f(o,-1,0);break;case "Right":case "ArrowRight":o.preventDefault(),o.stopPropagation(),f(o,1,0);break;case "Up":case "ArrowUp":o.preventDefault(),o.stopPropagation(),f(o,0,-1);break;case "Down":case "ArrowDown":o.preventDefault(),o.stopPropagation(),f(o,0,1);break}},r},[i,u,t$1])}}export{G as a};
@@ -1,10 +0,0 @@
1
- import {e}from'./chunk-KUEDQO7P.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-KEVERVHK.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {e as e$1,g,a as a$2,f}from'./chunk-AUOQSTS5.mjs';import {useState,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
- function E(u,n){let{"aria-label":c,"aria-labelledby":A,orientation:o="horizontal",isSingleTabStop:y=true}=u,[i,H]=useState(false);a(()=>{H(!!(n.current&&n.current.parentElement?.closest('[role="toolbar"]')));});let{direction:v}=b(),b$1=v==="rtl"&&o==="horizontal",t=e(n),M=e=>{if(e$1(e.currentTarget,g(e))){if(o==="horizontal"&&e.key==="ArrowRight"||o==="vertical"&&e.key==="ArrowDown")b$1?t.focusPrevious():t.focusNext();else if(o==="horizontal"&&e.key==="ArrowLeft"||o==="vertical"&&e.key==="ArrowUp")b$1?t.focusNext():t.focusPrevious();else if(e.key==="Tab"){if(!y)return;e.stopPropagation();let r=a$2(n.current);a$3.current=f(r),e.shiftKey?t.focusFirst():t.focusLast();return}else return;e.stopPropagation(),e.preventDefault();}},a$3=useRef(null),P=e=>{let r=e.relatedTarget;(r===null||!e$1(e.currentTarget,r))&&!a$3.current&&(a$3.current=g(e));},x=e=>{let r=e.relatedTarget,f=r===null||!e$1(e.currentTarget,r),w=e$1(n.current,g(e));a$3.current&&f&&w&&(a$3.current?.focus(),a$3.current=null);};return {toolbarProps:{...a$1(u,{labelable:true}),role:i?"group":"toolbar","aria-orientation":o,"aria-label":c,"aria-labelledby":c==null?A:void 0,onKeyDownCapture:i?void 0:M,onFocusCapture:i?void 0:x,onBlurCapture:i?void 0:P}}}export{E as a};
@@ -1,10 +0,0 @@
1
- import {e,h}from'./chunk-B7PSE5KC.mjs';import {createContext,forwardRef}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=createContext({}),R=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,m);let{elementType:n="span",...a}=e$1,x=h[n];return jsx(x,{className:"react-aria-Text",...a,ref:t})});export{m as a,R as b};
@@ -1,10 +0,0 @@
1
- import {a,b as b$1,c}from'./chunk-AUOQSTS5.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 w(t,e){if(!t)return null;if(typeof t=="string")return e.querySelector(t);if(t instanceof HTMLElement)return t;if("current"in t)return t.current}function m({text:t,fontSize:e=16,fontFamily:n="Arial",fontWeight:r="normal",fontStyle:c="normal",font:s,element:l}){let o=a(l).createElement("canvas").getContext("2d");if(!o)return {width:0,height:0};o.font=s||`${c} ${r} ${e}px ${n}`;let i=o.measureText(t);return {width:i.width,height:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent}}function T({text:t,maxWidth:e,initialFontSize:n=50,fontFamily:r="Arial",fontWeight:c="normal",fontStyle:s="normal",element:l}){let{width:u}=m({text:t,fontSize:n,fontFamily:r,fontWeight:c,fontStyle:s,element:l}),o=n,i=u;for(;i>e;)o-=.5,i=m({text:t,fontSize:o,fontFamily:r,fontWeight:c,fontStyle:s,element:l}).width;return Math.max(o,1)}var h=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'];function b(t){return h.some(e=>t.matches(e))}function L(t){return t.querySelectorAll(h.join(", "))}function E(t){return t.nodeType===Node.DOCUMENT_NODE||c(t)}function M(t=document.documentElement){let e=t.getRootNode();if(!E(e))return null;let n=e.activeElement;for(;n?.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;return n}var x=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function S(t){return t instanceof HTMLInputElement&&!x.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function p(t){let e=t.getBoundingClientRect(),n=b$1(t),r=t.getRootNode();if(r instanceof n.ShadowRoot){let s=r.host,l=0,u=0,o=t;for(;o&&o!==s;){l+=o.offsetLeft,u+=o.offsetTop;let i=o.offsetParent;if(!i||!s.contains(i))break;o=i;}return {x:l,y:u,width:e.width,height:e.height}}return {x:e.left+n.scrollX,y:e.top+n.scrollY,width:e.width,height:e.height}}function y(t,e){let n=p(t);return {x:n.x+(e?.x??0),y:n.y+(e?.y??0)}}export{w as a,m as b,T as c,b as d,L as e,M as f,S as g,p as h,y as i};
@@ -1,16 +0,0 @@
1
- import {b as b$1,a as a$2,e as e$1}from'./chunk-66NJ7EYY.mjs';import {a as a$4}from'./chunk-3W6RWDIE.mjs';import {g,s,t,m,a as a$3,l,o,d,u}from'./chunk-MRJFGHFW.mjs';import {c,a as a$5}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-6ZQE5SHE.mjs';import {b,a,e,g as g$1}from'./chunk-AUOQSTS5.mjs';import {flushSync}from'react-dom';import Ke,{useState,useRef,useCallback,useEffect,useMemo,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
- var R="default",q="",A=new WeakMap;function J(r){let s=b(r);if(g()){if(R==="default"){let i=a(r);q=i.documentElement.style.webkitUserSelect,i.documentElement.style.webkitUserSelect="none";}R="disabled";}else if(r instanceof s.HTMLElement||r instanceof s.SVGElement){let i="userSelect"in r.style?"userSelect":"webkitUserSelect";A.set(r,r.style[i]),r.style[i]="none";}}function B(r){let s$1=b(r);if(g()){if(R!=="disabled")return;R="restoring",setTimeout(()=>{s(()=>{if(R==="restoring"){let i=a(r);i.documentElement.style.webkitUserSelect==="none"&&(i.documentElement.style.webkitUserSelect=q||""),q="",R="default";}},r);},300);}else if((r instanceof s$1.HTMLElement||r instanceof s$1.SVGElement)&&r&&A.has(r)){let i=A.get(r),a="userSelect"in r.style?"userSelect":"webkitUserSelect";r.style[a]==="none"&&(r.style[a]=i),r.getAttribute("style")===""&&r.removeAttribute("style"),A.delete(r);}}var Q=Ke.createContext({register:()=>{}});Q.displayName="PressResponderContext";function Ie(r){let s=useContext(Q);if(s){let{register:i,ref:a,...d}=s;r=c(d,r),i();}return u(s,r.ref),r}var D=class{type;pointerType;target;shiftKey;ctrlKey;metaKey;altKey;x;y;key;#e=true;constructor(s,i,a,d){let P=(d?.target??a.currentTarget)?.getBoundingClientRect(),m,L=0,k,I=null;a.clientX!=null&&a.clientY!=null&&(k=a.clientX,I=a.clientY),P&&(k!=null&&I!=null?(m=k-P.left,L=I-P.top):(m=P.width/2,L=P.height/2)),this.type=s,this.pointerType=i,this.target=a.currentTarget,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.x=m,this.y=L,this.key=a.key;}continuePropagation(){this.#e=false;}get shouldStopPropagation(){return this.#e}},de=Symbol("linkClicked"),ge="react-aria-pressable-style",me="data-react-aria-pressable";function lt(r){let{onPress:s,onPressChange:i,onPressStart:a$6,onPressEnd:d$1,onPressUp:M,onClick:P,isDisabled:m$1,isPressed:L,preventFocusOnPress:k,shouldCancelOnPointerExit:I,allowTextSelectionOnPress:b$2,ref:Y,...ve}=Ie(r),[be,re]=useState(false),h=useRef({isPressed:false,ignoreEmulatedMouseEvents:false,didFirePressStart:false,isTriggeringEvent:false,activePointerId:null,target:null,isOverTarget:false,pointerType:null,disposables:[]}),{addGlobalListener:O,removeAllGlobalListeners:F}=a$1(),E=useCallback((e,o)=>{let g=h.current;if(m$1||g.didFirePressStart)return false;let n=true;if(g.isTriggeringEvent=true,a$6){let c=new D("pressstart",o,e);a$6(c),n=c.shouldStopPropagation;}return i&&i(true),g.isTriggeringEvent=false,g.didFirePressStart=true,re(true),n},[m$1,a$6,i]),X=useCallback((e,o,g=true)=>{let n=h.current;if(!n.didFirePressStart)return false;n.didFirePressStart=false,n.isTriggeringEvent=true;let c=true;if(d$1){let t=new D("pressend",o,e);d$1(t),c=t.shouldStopPropagation;}if(i&&i(false),re(false),s&&g&&!m$1){let t=new D("press",o,e);s(t),c&&=t.shouldStopPropagation;}return n.isTriggeringEvent=false,c},[m$1,d$1,i,s]),S=t(X),he=useCallback((e,o)=>{let g=h.current;if(m$1)return false;if(M){g.isTriggeringEvent=true;let n=new D("pressup",o,e);return M(n),g.isTriggeringEvent=false,n.shouldStopPropagation}return true},[m$1,M]),C=t(he),N=useCallback(e=>{let o=h.current;if(o.isPressed&&o.target){o.didFirePressStart&&o.pointerType!=null&&X(w(o.target,e),o.pointerType,false),o.isPressed=false,o.isOverTarget=false,o.activePointerId=null,o.pointerType=null,F(),b$2||B(o.target);for(let g of o.disposables)g();o.disposables=[];}},[b$2,F,X]),T=t(N);useEffect(()=>{m$1&&h.current.isPressed&&T({currentTarget:h.current.target,shiftKey:false,ctrlKey:false,metaKey:false,altKey:false});},[m$1]);let U=useCallback(e=>{I&&N(e);},[I,N]),V=useCallback(e=>{m$1||P?.(e);},[m$1,P]),W=useCallback((e,o)=>{if(!m$1&&P){let g=new MouseEvent("click",e);b$1(g,o),P(a$2(g));}},[m$1,P]),Se=useMemo(()=>{let e$2=h.current,o$1={onKeyDown(n){if(ee(n.nativeEvent,n.currentTarget)&&e(n.currentTarget,g$1(n))){ye(g$1(n),n.key)&&n.preventDefault();let c=true;!e$2.isPressed&&!n.repeat&&(e$2.target=n.currentTarget,e$2.isPressed=true,e$2.pointerType="keyboard",c=E(n,"keyboard"));let t=n.currentTarget,l=u=>{ee(u,t)&&!u.repeat&&e(t,g$1(u))&&e$2.target&&C(w(e$2.target,u),"keyboard");};O(a(n.currentTarget),"keyup",a$5(l,g),true),c&&n.stopPropagation(),n.metaKey&&d()&&e$2.metaKeyEvents?.set(n.key,n.nativeEvent);}else n.key==="Meta"&&(e$2.metaKeyEvents=new Map);},onClick(n){if(!(n&&!e(n.currentTarget,g$1(n)))&&n&&n.button===0&&!e$2.isTriggeringEvent&&!o.isOpening){let c=true;if(m$1&&n.preventDefault(),!e$2.ignoreEmulatedMouseEvents&&!e$2.isPressed&&(e$2.pointerType==="virtual"||l(n.nativeEvent))){let t=E(n,"virtual"),l=C(n,"virtual"),u=S(n,"virtual");V(n),c=t&&l&&u;}else if(e$2.isPressed&&e$2.pointerType!=="keyboard"){let t=e$2.pointerType||n.nativeEvent.pointerType||"virtual",l=C(w(n.currentTarget,n),t),u=S(w(n.currentTarget,n),t,true);c=l&&u,e$2.isOverTarget=false,V(n),T(n);}e$2.ignoreEmulatedMouseEvents=false,c&&n.stopPropagation();}}},g=n=>{if(e$2.isPressed&&e$2.target&&ee(n,e$2.target)){ye(g$1(n),n.key)&&n.preventDefault();let c=g$1(n),t=e(e$2.target,c);S(w(e$2.target,n),"keyboard",t),t&&W(n,e$2.target),F(),n.key!=="Enter"&&te(e$2.target)&&e(e$2.target,c)&&!n[de]&&(n[de]=true,o(e$2.target,n,false)),e$2.isPressed=false,e$2.metaKeyEvents?.delete(n.key);}else if(n.key==="Meta"&&e$2.metaKeyEvents?.size){let c=e$2.metaKeyEvents;e$2.metaKeyEvents=void 0;for(let t of c.values())e$2.target?.dispatchEvent(new KeyboardEvent("keyup",t));}};if(typeof PointerEvent<"u"){o$1.onPointerDown=t=>{if(t.button!==0||!e(t.currentTarget,g$1(t)))return;if(m(t.nativeEvent)){e$2.pointerType="virtual";return}e$2.pointerType=t.pointerType;let l=true;if(!e$2.isPressed){e$2.isPressed=true,e$2.isOverTarget=true,e$2.activePointerId=t.pointerId,e$2.target=t.currentTarget,b$2||J(e$2.target),l=E(t,e$2.pointerType);let u=g$1(t);"releasePointerCapture"in u&&("hasPointerCapture"in u?u.hasPointerCapture(t.pointerId)&&u.releasePointerCapture(t.pointerId):u.releasePointerCapture(t.pointerId)),O(a(t.currentTarget),"pointerup",n,false),O(a(t.currentTarget),"pointercancel",c,false);}l&&t.stopPropagation();},o$1.onMouseDown=t=>{if(e(t.currentTarget,g$1(t))&&t.button===0){if(k){let l=e$1(g$1(t));l&&e$2.disposables.push(l);}t.stopPropagation();}},o$1.onPointerUp=t=>{!e(t.currentTarget,g$1(t))||e$2.pointerType==="virtual"||t.button===0&&!e$2.isPressed&&C(t,e$2.pointerType||t.pointerType);},o$1.onPointerEnter=t=>{t.pointerId===e$2.activePointerId&&e$2.target&&!e$2.isOverTarget&&e$2.pointerType!=null&&(e$2.isOverTarget=true,E(w(e$2.target,t),e$2.pointerType));},o$1.onPointerLeave=t=>{t.pointerId===e$2.activePointerId&&e$2.target&&e$2.isOverTarget&&e$2.pointerType!=null&&(e$2.isOverTarget=false,S(w(e$2.target,t),e$2.pointerType,false),U(t));};let n=t=>{if(t.pointerId===e$2.activePointerId&&e$2.isPressed&&t.button===0&&e$2.target){if(e(e$2.target,g$1(t))&&e$2.pointerType!=null){let l=false,u=setTimeout(()=>{e$2.isPressed&&e$2.target instanceof b(e$2.target).HTMLElement&&(l?T(t):(a$3(e$2.target),e$2.target.click()));},80);O(t.currentTarget,"click",()=>l=true,true),e$2.disposables.push(()=>clearTimeout(u));}else T(t);e$2.isOverTarget=false;}},c=t=>{T(t);};o$1.onDragStart=t=>{e(t.currentTarget,g$1(t))&&T(t);};}else if(process.env.NODE_ENV==="test"){o$1.onMouseDown=t=>{if(t.button!==0||!e(t.currentTarget,g$1(t)))return;if(e$2.ignoreEmulatedMouseEvents){t.stopPropagation();return}if(e$2.isPressed=true,e$2.isOverTarget=true,e$2.target=t.currentTarget,e$2.pointerType=l(t.nativeEvent)?"virtual":"mouse",flushSync(()=>E(t,e$2.pointerType))&&t.stopPropagation(),k){let u=e$1(g$1(t));u&&e$2.disposables.push(u);}O(a(t.currentTarget),"mouseup",n,false);},o$1.onMouseEnter=t=>{if(!e(t.currentTarget,g$1(t)))return;let l=true;e$2.isPressed&&!e$2.ignoreEmulatedMouseEvents&&e$2.pointerType!=null&&(e$2.isOverTarget=true,l=E(t,e$2.pointerType)),l&&t.stopPropagation();},o$1.onMouseLeave=t=>{if(!e(t.currentTarget,g$1(t)))return;let l=true;e$2.isPressed&&!e$2.ignoreEmulatedMouseEvents&&e$2.pointerType!=null&&(e$2.isOverTarget=false,l=S(t,e$2.pointerType,false),U(t)),l&&t.stopPropagation();},o$1.onMouseUp=t=>{e(t.currentTarget,g$1(t))&&!e$2.ignoreEmulatedMouseEvents&&t.button===0&&!e$2.isPressed&&C(t,e$2.pointerType||"mouse");};let n=t=>{if(t.button===0){if(e$2.ignoreEmulatedMouseEvents){e$2.ignoreEmulatedMouseEvents=false;return}e$2.target&&e(e$2.target,g$1(t))&&e$2.pointerType!=null||T(t),e$2.isOverTarget=false;}};o$1.onTouchStart=t=>{if(!e(t.currentTarget,g$1(t)))return;let l=Ce(t.nativeEvent);if(!l)return;e$2.activePointerId=l.identifier,e$2.ignoreEmulatedMouseEvents=true,e$2.isOverTarget=true,e$2.isPressed=true,e$2.target=t.currentTarget,e$2.pointerType="touch",b$2||J(e$2.target),E(K(e$2.target,t),e$2.pointerType)&&t.stopPropagation(),O(b(t.currentTarget),"scroll",c,true);},o$1.onTouchMove=t=>{if(!e(t.currentTarget,g$1(t)))return;if(!e$2.isPressed){t.stopPropagation();return}let l=Pe(t.nativeEvent,e$2.activePointerId),u=true;l&&Te(l,t.currentTarget)?!e$2.isOverTarget&&e$2.pointerType!=null&&(e$2.isOverTarget=true,u=E(K(e$2.target,t),e$2.pointerType)):e$2.isOverTarget&&e$2.pointerType!=null&&(e$2.isOverTarget=false,u=S(K(e$2.target,t),e$2.pointerType,false),U(K(e$2.target,t))),u&&t.stopPropagation();},o$1.onTouchEnd=t=>{if(!e(t.currentTarget,g$1(t)))return;if(!e$2.isPressed){t.stopPropagation();return}let l=Pe(t.nativeEvent,e$2.activePointerId),u=true;l&&Te(l,t.currentTarget)&&e$2.pointerType!=null?(C(K(e$2.target,t),e$2.pointerType),u=S(K(e$2.target,t),e$2.pointerType),W(t.nativeEvent,e$2.target)):e$2.isOverTarget&&e$2.pointerType!=null&&(u=S(K(e$2.target,t),e$2.pointerType,false)),u&&t.stopPropagation(),e$2.isPressed=false,e$2.activePointerId=null,e$2.isOverTarget=false,e$2.ignoreEmulatedMouseEvents=true,e$2.target&&!b$2&&B(e$2.target),F();},o$1.onTouchCancel=t=>{e(t.currentTarget,g$1(t))&&(t.stopPropagation(),e$2.isPressed&&T(K(e$2.target,t)));};let c=t=>{e$2.isPressed&&e(g$1(t),e$2.target)&&T({currentTarget:e$2.target,shiftKey:false,ctrlKey:false,metaKey:false,altKey:false});};o$1.onDragStart=t=>{e(t.currentTarget,g$1(t))&&T(t);};}return o$1},[O,m$1,k,F,b$2,U,E,V,W]);return useEffect(()=>{if(!Y||process.env.NODE_ENV==="test")return;let e=a(Y.current);if(!e||!e.head||e.getElementById(ge))return;let o=e.createElement("style");o.id=ge;let g=a$4(e);g&&(o.nonce=g),o.textContent=`
11
- @layer {
12
- [${me}] {
13
- touch-action: pan-x pan-y pinch-zoom;
14
- }
15
- }
16
- `.trim(),e.head.prepend(o);},[Y]),useEffect(()=>{let e=h.current;return ()=>{b$2||B(e.target??void 0);for(let o of e.disposables)o();e.disposables=[];}},[b$2]),{isPressed:L||be,pressProps:c(ve,Se,{[me]:true})}}function te(r){return r.tagName==="A"&&r.hasAttribute("href")}function ee(r,s){let{key:i,code:a}=r,d=s,M=d.getAttribute("role");return (i==="Enter"||i===" "||i==="Spacebar"||a==="Space")&&!(d instanceof b(d).HTMLInputElement&&!Ee(d,i)||d instanceof b(d).HTMLTextAreaElement||d.isContentEditable)&&!((M==="link"||!M&&te(d))&&i!=="Enter")}function Ce(r){let{targetTouches:s}=r;return s.length>0?s[0]:null}function Pe(r,s){let i=r.changedTouches;for(let a=0;a<i.length;a++){let d=i[a];if(d.identifier===s)return d}return null}function K(r,s){let i=0,a=0;return s.targetTouches&&s.targetTouches.length===1&&(i=s.targetTouches[0].clientX,a=s.targetTouches[0].clientY),{currentTarget:r,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:i,clientY:a}}function w(r,s){let i=s.clientX,a=s.clientY;return {currentTarget:r,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:i,clientY:a,key:s.key}}function Re(r){let s=0,i=0;return r.width!==void 0?s=r.width/2:r.radiusX!==void 0&&(s=r.radiusX),r.height!==void 0?i=r.height/2:r.radiusY!==void 0&&(i=r.radiusY),{top:r.clientY-i,right:r.clientX+s,bottom:r.clientY+i,left:r.clientX-s}}function De(r,s){return !(r.left>s.right||s.left>r.right||r.top>s.bottom||s.top>r.bottom)}function Te(r,s){let i=s.getBoundingClientRect(),a=Re(r);return De(i,a)}function Le(r){let s=b(r);return r instanceof s.HTMLInputElement?false:r instanceof s.HTMLButtonElement?r.type!=="submit"&&r.type!=="reset":!te(r)}function ye(r,s){return r instanceof b(r).HTMLInputElement?!Ee(r,s):Le(r)}var Fe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ee(r,s){return r.type==="checkbox"||r.type==="radio"?s===" ":Fe.has(r.type)}export{J as a,B as b,Q as c,lt as d};
@@ -1,10 +0,0 @@
1
- /**
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 s=e=>e?.ownerDocument??document,a=e=>e&&"window"in e&&e.window===e?e:s(e).defaultView||window;function f(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function u(e){return f(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var c=true;function l(){return c}function b(e,t){if(!e||!t)return false;let o=t;for(;o!==null;){if(o===e)return true;let n=o.assignedSlot;n?o=n:u(o)?o=o.host:o=o.parentNode;}return false}var v=(e=document)=>{let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function D(e){let t=e.target;if(t&&"shadowRoot"in t&&t.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return t}function d(e,t=document){if(typeof t.getElementById=="function"){let n=t.getElementById(e);if(n)return n}let o=t.children||[];for(let n of o){if(n.getAttribute&&n.getAttribute("id")===e)return n;if(n.shadowRoot){let r=d(e,n.shadowRoot);if(r)return r}let i=d(e,n);if(i)return i}return null}function N(e){if(!e)return false;let t=e.getRootNode(),o=a(e);if(!(t instanceof o.Document||t instanceof o.ShadowRoot))return false;let n=t.activeElement;return n!=null&&e.contains(n)}export{s as a,a as b,u as c,l as d,b as e,v as f,D as g,d as h,N as i};
@@ -1,10 +0,0 @@
1
- import {g,e,d,f,h,b,a,c,i}from'./chunk-KEAM6GSA.mjs';import {y}from'./chunk-OMT6ZWSV.mjs';import {useMemo}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 k(o){return {dragAndDropHooks:useMemo(()=>{let{onDrop:m,onInsert:d$1,onItemDrop:C,onReorder:u,onMove:I,onRootDrop:f$1,getItems:T,renderDragPreview:S,renderDropIndicator:O,dropTargetDelegate:v}=o,E=!!T,A=!!(m||d$1||C||u||I||f$1),e$1={};return E&&(e$1.useDraggableCollectionState=function(r){return g({...r,...o})},e$1.useDraggableCollection=e,e$1.useDraggableItem=d,e$1.DragPreview=f,e$1.renderDragPreview=S,e$1.isVirtualDragging=y),A&&(e$1.useDroppableCollectionState=function(r){return h({...r,...o})},e$1.useDroppableItem=b,e$1.useDroppableCollection=function(r,P,R){return a({...r,...o},P,R)},e$1.useDropIndicator=c,e$1.renderDropIndicator=O,e$1.dropTargetDelegate=v,e$1.ListDropTargetDelegate=i),e$1},[o])}}export{k as a};
@@ -1,10 +0,0 @@
1
- import {i}from'./chunk-L6S5GBKS.mjs';import {a as a$1}from'./chunk-VDUFLHKK.mjs';import {a as a$2}from'./chunk-YS3Y5KGV.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {b,c,a as a$5}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-AUOQSTS5.mjs';import H,{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 B(t,e,n){let{isSelected:r}=e,{isPressed:s,buttonProps:o}=a$2({...t,onPress:a$5(e.toggle,t.onPress)},n);return {isPressed:s,isSelected:r,isDisabled:t.isDisabled||false,buttonProps:c(o,{"aria-pressed":r})}}function z({tooltip:t,"aria-label":e,"aria-labelledby":n},r){let[s,o]=useState(e||"");useEffect(()=>{if(n){let u=a(r.current).querySelector(`#${n}`);u&&o(u.textContent||"");}else e&&o(e);},[n,r,e]);let{tooltipProps:i}=a$1({label:s,tooltip:t});return {tooltipProps:i}}var G=t=>{let e=H.useRef(null),{ref:n,...r}=useContext(i)||{},{buttonProps:s,isPressed:o}=a$2({...t,...r},e),{isFocusVisible:i$1,isFocused:l,focusProps:u}=a$3(),{hoverProps:c$1,isHovered:a}=a$4({isDisabled:t.isDisabled});return {buttonProps:c(s,u,c$1),isPressed:o,ref:b(e,n||null),isFocusVisible:i$1,isFocused:l,isHovered:a,uiStateOptions:{isHovered:a,isFocused:l,isPressed:o,isDisabled:t.isDisabled,isFocusVisible:i$1}}},J=(t,e)=>{let n=H.useRef(null),{ref:r,...s}=useContext(i)||{},{buttonProps:o,isPressed:i$1}=B({...t,...s},e,n);(o.role==="radio"||o.role==="checkbox")&&(o["aria-pressed"]=void 0);let{isFocusVisible:l,isFocused:u,focusProps:c$1}=a$3(),{hoverProps:a,isHovered:d}=a$4({isDisabled:t.isDisabled});return {buttonProps:c(o,c$1,a),isPressed:i$1,ref:b(n,r||null),isFocusVisible:l,isFocused:u,isHovered:d,uiStateOptions:{isHovered:d,isFocused:u,isPressed:i$1,isDisabled:t.isDisabled,isFocusVisible:l,isSelected:e.isSelected}}};export{z as a,G as b,J as c};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {forwardRef,useRef,useMemo,useContext,useState,useCallback}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 D=Symbol("default");function U({values:t,children:r}){for(let[e,o]of t)r=jsx(e.Provider,{value:o,children:r});return r}function $(t){let{className:r,style:e,children:o,defaultClassName:l=void 0,defaultChildren:n=void 0,defaultStyle:a,values:i,render:d}=t;return useMemo(()=>{let c,s,u;return typeof r=="function"?c=r({...i,defaultClassName:l}):c=r,typeof e=="function"?s=e({...i,defaultStyle:a||{}}):s=e,typeof o=="function"?u=o({...i,defaultChildren:n}):o==null?u=n:u=o,{className:c??l,style:s||a?{...a,...s}:void 0,children:u??n,"data-rac":"",render:d?E=>d(E,i):void 0}},[r,e,o,l,n,a,i,d])}function h(t,r){let e=useContext(t);if(r===null)return null;if(e&&typeof e=="object"&&"slots"in e&&e.slots){let o=r||D;if(!e.slots[o]){let l=new Intl.ListFormat().format(Object.keys(e.slots).map(a=>`"${a}"`)),n=r?`Invalid slot "${r}".`:"A slot prop is required.";throw new Error(`${n} Valid slot names are ${l}.`)}return e.slots[o]}return e}function j(t,r,e){let o=h(e,t.slot)||{},{ref:l,...n}=o,a=a$1(useMemo(()=>b(r,l),[r,l])),i=c(n,t);return "style"in n&&n.style&&"style"in t&&t.style&&(typeof n.style=="function"||typeof t.style=="function"?i.style=d=>{let c=typeof n.style=="function"?n.style(d):n.style,s={...d.defaultStyle,...c},u=typeof t.style=="function"?t.style({...d,defaultStyle:s}):t.style;return {...s,...u}}:i.style={...n.style,...t.style}),[i,a]}function q(t=true){let[r,e]=useState(t),o=useRef(false),l=useCallback(n=>{o.current=true,e(!!n);},[]);return a(()=>{o.current||e(false);},[]),[l,r]}function W(t){let r=/^(data-.*)$/,e={};for(let o in t)r.test(o)||(e[o]=t[o]);return e}function A(t,r,e){let{render:o,...l}=r,n=useRef(null),a$1=useMemo(()=>b(e,n),[e,n]);a(()=>{process.env.NODE_ENV!=="production"&&o&&(n.current?n.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${n.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"));},[t,o]);let i={...l,ref:a$1};return o?o(i,void 0):jsx(t,{...i})}var y={},_=new Proxy({},{get(t,r){if(typeof r!="string")return;let e=y[r];return e||(e=forwardRef(A.bind(null,r)),y[r]=e),e}});export{D as a,U as b,$ as c,h as d,j as e,q as f,W as g,_ as h};
@@ -1,10 +0,0 @@
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-UEDBY5JI.mjs';import {b as b$4}from'./chunk-NUYBQ7KP.mjs';import {a as a$8}from'./chunk-SAZLJ66W.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-WL27JGVG.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {a as a$6}from'./chunk-XWLESSHN.mjs';import {a as a$2}from'./chunk-YS3Y5KGV.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {d as d$1}from'./chunk-BGMVPFYK.mjs';import {b as b$6}from'./chunk-YB3KW7JC.mjs';import {f as f$1}from'./chunk-Y4DRSGEJ.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {p}from'./chunk-MRJFGHFW.mjs';import {c,b}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.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';/**
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 I=new WeakMap;function ve(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$8({...i,labelElementType:"span",ref:a}),{gridProps:c$1}=b$5({...i,...t,keyboardDelegate:r,shouldFocusWrap:true,linkBehavior:"override",keyboardNavigationBehavior:"tab"},e,a),[u,g]=useState(false),{focusWithinProps:m}=b$6({onFocusWithinChange:g}),b=a$7(i),n=useRef(e.collection.size);return useEffect(()=>{a.current&&n.current>0&&e.collection.size===0&&u&&a.current.focus(),n.current=e.collection.size;},[e.collection.size,u,a]),I.set(e,{onRemove:i.onRemove}),{gridProps:c(c$1,b,{role:e.collection.size?"grid":"group","aria-atomic":false,"aria-relevant":"additions","aria-live":u?"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 A(i,e,a){let{item:o}=i,r=b$2(ee,"@react-aria/tag"),p$1=c$2(),{onRemove:t}=I.get(e)||{},{rowProps:s,gridCellProps:l,...c$1}=c$3({node:o},e,a),{descriptionProps:u,...g}=c$1,m=e.disabledKeys.has(o.key)||o.props.isDisabled,b=R=>{if(R.key==="Delete"||R.key==="Backspace"){if(m)return;R.preventDefault(),e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));}},n=f$1();n==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(n="pointer");let T=t&&(n==="keyboard"||n==="virtual")?r.format("removeDescription"):"",P=a$6(T,a),D=o.key===e.selectionManager.focusedKey,L=e.selectionManager.focusedKey!=null,y=-1;!m&&(D||!L)&&(y=0);let k=a$7(o.props),B=p(o.props),{focusableProps:h}=d$1({...o.props,isDisabled:m},a);return {removeButtonProps:{"aria-label":r.format("removeButtonLabel"),"aria-labelledby":`${p$1} ${s.id}`,isDisabled:m,id:p$1,onPress:()=>t?t(new Set([o.key])):null},rowProps:c(h,s,k,B,{tabIndex:y,onKeyDown:t?b:void 0,"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":c$1,"data-block-class":u},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":c$1,"data-block-class":u,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,c$1=f.useRef(null),{rowProps:u,gridCellProps:g,removeButtonProps:m,allowsRemoving:b$1,isDisabled:n,isSelected:T,allowsSelection:P}=A({item:l},p,c$1),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:R,isHovered:ne}=a$1({isDisabled:n}),le=l.value?.icon,me=l.value?.data?.variant??a$3??t,pe=o.size??s??"md";return jsx(w,{ref:b(c$1,r),outerProps:c(u,y,R),gridCellProps:g,variant:me,size:pe,Icon:le,isDisabled:n,isSelected:T,isFocusVisible:k,isTagHovered:ne,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:c$2,allowsRemoving:u,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:u,isSelected:s,allowsSelection:g,isHovered:c$2,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}),u?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{ve as a,te as b,re as c,ae as d};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-MHUFXHRU.mjs';import {a as a$3}from'./chunk-MONDDKB4.mjs';import {a as a$2}from'./chunk-NADBGP35.mjs';import {b,c}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {PauseIcon,PlayIcon}from'@baseline-ui/icons/24';import _ from'react';import {jsxs,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 g="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q",z="rta2n91 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z610h _1yep5z6w1 _1yep5z6w2 _1yep5z6w3 _1yep5z618m _1yep5z611i",f="rta2n90";var P=_.forwardRef(({className:h,style:k,size:v="lg",sources:j,playLabel:T,pauseLabel:I,audioTimelineLabel:x,playingLabel:A,pausedLabel:C,"data-block-id":S,"data-block-class":B,...M},w)=>{let t=_.useRef(null),{isPlaying:r,progress:U,duration:H,togglePlay:N,seek:R,formattedDuration:V,formattedCurrentTime:D,setProgress:E,setIsSliderDragging:s}=a(t,{playingLabel:A,pausedLabel:C}),{formatMessage:o}=b(),q=a$1({"data-block-id":S,"data-block-class":B,"data-state":r?"playing":"paused","data-loaded":H>0});return jsxs("div",{...q,...M,className:a$4(g,"BaselineUI-AudioPlayer",h),role:"group",style:k,ref:w,children:[jsx(b$1,{children:jsx("audio",{ref:t,children:j.map(({url:a,type:L})=>jsx("source",{src:a,type:L},a))})}),jsx(a$2,{icon:r?PauseIcon:PlayIcon,variant:"toolbar",isSelected:r,size:v,"aria-label":r?I??o(i.pause):T??o(i.play),style:{borderRadius:"50%"},onPress:N}),jsxs("div",{className:z,children:[jsx("span",{"aria-hidden":true,children:D}),jsx(a$3,{"aria-label":x??o(i.audioTimeline),value:U,minValue:0,maxValue:100,className:f,onChange:a=>{E(a),s(true);},onChangeEnd:a=>{R(a),s(false);}}),jsx("span",{"aria-hidden":true,children:V})]})]})});P.displayName="AudioPlayer";var i=c({play:{id:"bui.audioPlayer.play",defaultMessage:"Play"},pause:{id:"bui.audioPlayer.pause",defaultMessage:"Pause"},audioTimeline:{id:"bui.audioPlayer.audioTimeline",defaultMessage:"Audio timeline"}});export{P as a};
@@ -1,10 +0,0 @@
1
- import {b as b$1}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-2V323KAD.mjs';import {a as a$4,b as b$2}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-YS3Y5KGV.mjs';import {a as a$7}from'./chunk-K6X2BHPP.mjs';import {a as a$1}from'./chunk-BGMVPFYK.mjs';import {a as a$8}from'./chunk-3FYY26ED.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1}from'./chunk-JDLUGVXG.mjs';import {f,a as a$2}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import b,{useContext,useEffect,useMemo}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 J="_1yep5z6m3",U=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),X=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),G="_1kvz17de",Q="_1yep5z6ez _1yep5z6dy",W=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:[]}),Y="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Z=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var H=b.forwardRef(({children:f$1,className:p,style:z},e)=>{let{headers:r}=useContext(u),{disabledKeys:a}=useContext(u),{keyboardProps:y}=a$1({onKeyDown:t=>{let d=f(a$2(t.target)),s=[...r?.keys()||[]].findIndex(n=>{let o=r?.get(n)?.current;return o?o===d:false}),m=r?.get(s||0),i=r?.size||0,c=n=>{let o=r.get(n-1<0?i-1:n-1);a?.has(o?.current?.dataset.key||"")?c(n-1):o?.current?.focus();},l=n=>{let o=r.get((n+1)%i);a?.has(o?.current?.dataset.key||"")?l(n+1):o?.current?.focus();};if(m)switch(t.key){case "Home":{t.preventDefault(),l(-1);break}case "End":{t.preventDefault(),c(i);break}case "ArrowDown":{t.preventDefault(),l(s);break}case "ArrowUp":{t.preventDefault(),c(s);break}default:t.continuePropagation();}}});return jsx("div",{...b$1(y),style:z,className:a$3(J,p),ref:e,children:b.Children.map(f$1,(t,d)=>b.cloneElement(t,{index:d}))})});H.displayName="AccordionBase";var u=b.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),oe=b.forwardRef(({children:f,disabledKeys:p,defaultExpandedKeys:z=new Set,expandedKeys:e,expansionMode:r="multiple",onChange:a,className:y,style:t},d)=>{let[s,m]=b.useState(z),i=b.useRef(new Map).current,[c,l]=b.useState(r);useEffect(()=>{l(r);},[r]),useEffect(()=>{a?.(s);},[s,a]);let n=useMemo(()=>({expandedKeys:e||s,setExpandedKeys:e?()=>{}:m,disabledKeys:p,headers:i,expansionMode:c}),[e,s,p,i,c]);return jsx(u.Provider,{value:n,children:jsx(a$4,{children:jsx(H,{className:y,style:t,ref:d,children:f})})})});oe.displayName="Accordion";var K=b.forwardRef(({title:f,actions:p,controlId:z,value:e,id:r,index:a,subLabel:y,showActionsOnTriggerOnly:t},d$1)=>{let s=b.useRef(null),{expandedKeys:m,setExpandedKeys:i,expansionMode:c$1,disabledKeys:l,headers:n}=useContext(u),o=l?.has(e),S=b$2();a$5(S);let{focusNext:ne,focusPrevious:ae}=S,{keyboardProps:ie}=a$1({onKeyDown:_=>{_.key==="ArrowRight"?ne({wrap:true}):_.key==="ArrowLeft"?ae({wrap:true}):_.continuePropagation();},isDisabled:o});useEffect(()=>{a$5(typeof a=="number","AccordionItem must have an index"),n?.set(a,s);},[a,n]);let M=()=>{i(_=>{let v=new Set(_);return v.has(e)?v.delete(e):(c$1==="single"&&v.clear(),v.add(e)),v});},{buttonProps:ce}=a$6({"aria-expanded":m.has(e),"aria-controls":z,onPress:M,isDisabled:o},s),{pressProps:pe}=d({onPress:M,isDisabled:o}),{focusProps:de,isFocusVisible:me}=a$7(),{hoverProps:le,isHovered:I}=a$8({isDisabled:o}),{focusProps:ye,isFocusVisible:ue}=a$7({within:true}),fe=m.has(e);return jsxs("h3",{...c(ie,pe,le,ye),className:W({isFocusVisible:me,isHovered:I,isDisabled:o}),ref:d$1,children:[jsxs("div",{className:Z({isDisabled:!!o}),children:[jsx(ChevronRightIcon,{className:X({isExpanded:fe}),size:8}),jsx("button",{...c(ce,de),id:r,"data-key":e,className:Y,ref:s,children:f})]}),p?.length?jsx("div",{"data-testid":"action-buttons",className:U({showActionsOnTriggerOnly:t,isTriggered:ue||I}),children:p.map((_,v)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:o,..._},v))}):null,y?jsx("div",{className:Q,children:y}):null]})});K.displayName="AccordionHeader";var se=b.forwardRef(({title:f,actions:p,children:z,value:e,index:r,subLabel:a,style:y,className:t,showActionsOnTriggerOnly:d},s)=>{let m=c$1(),i=c$1(),{expandedKeys:c}=useContext(u),l=c.has(e);return jsxs(Fragment,{children:[jsx(a$4,{children:jsx(K,{value:e,actions:p,id:i,title:f,controlId:m,ref:s,index:r,subLabel:a,showActionsOnTriggerOnly:d})}),jsx(AnimatePresence,{initial:false,children:l?jsx(motion.section,{role:"region","aria-labelledby":i,id:m,className:G,variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",children:jsx("div",{style:y,className:t,children:z})}):null})]})});se.displayName="AccordionItem";export{oe as a,se as b};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-YB3KW7JC.mjs';import {i as i$1}from'./chunk-Y4DRSGEJ.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b as b$2,u}from'./chunk-MRJFGHFW.mjs';import {b as b$3,c}from'./chunk-TZ4MVY4E.mjs';import {b as b$1}from'./chunk-AUOQSTS5.mjs';import i,{forwardRef,useEffect,useRef,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
- function b(o){if(!o)return;let t=true;return r=>{let n={...r,preventDefault(){r.preventDefault();},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=true;},continuePropagation(){t=false,typeof r.continuePropagation=="function"&&r.continuePropagation();},isPropagationStopped(){return t}};o(n),t&&r.stopPropagation();}}function v(o){return {keyboardProps:o.isDisabled?{}:{onKeyDown:b(o.onKeyDown),onKeyUp:b(o.onKeyUp)}}}var E=i.createContext(null);function O(o){let t=useContext(E)||{};u(t,o);let{ref:r,...n}=t;return n}var Y=i.forwardRef(function(t,r){let{children:n,...l}=t,s=a(r),a$1={...l,ref:s};return jsx(E.Provider,{value:a$1,children:n})});function g(o,t){let{focusProps:r}=a$1(o),{keyboardProps:n}=v(o),l=c(r,n),s=O(t),a=o.isDisabled?{}:s,e=useRef(o.autoFocus);useEffect(()=>{e.current&&t.current&&i$1(t.current),e.current=false;},[t]);let f=o.excludeFromTabOrder?-1:0;return o.isDisabled&&(f=void 0),{focusableProps:c({...l,tabIndex:f},a)}}var $=forwardRef(({children:o,...t},r)=>{r=a(r);let{focusableProps:n}=g(t,r),l=i.Children.only(o);useEffect(()=>{if(process.env.NODE_ENV==="production")return;let a=r.current;if(!a||!(a instanceof b$1(a).Element)){console.error("<Focusable> child must forward its ref to a DOM element.");return}if(!t.isDisabled&&!b$2(a)){console.warn("<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(a.localName!=="button"&&a.localName!=="input"&&a.localName!=="select"&&a.localName!=="textarea"&&a.localName!=="a"&&a.localName!=="area"&&a.localName!=="summary"&&a.localName!=="img"&&a.localName!=="svg"){let e=a.getAttribute("role");e?e!=="application"&&e!=="button"&&e!=="checkbox"&&e!=="combobox"&&e!=="gridcell"&&e!=="link"&&e!=="menuitem"&&e!=="menuitemcheckbox"&&e!=="menuitemradio"&&e!=="option"&&e!=="radio"&&e!=="searchbox"&&e!=="separator"&&e!=="slider"&&e!=="spinbutton"&&e!=="switch"&&e!=="tab"&&e!=="tabpanel"&&e!=="textbox"&&e!=="treeitem"&&e!=="img"&&e!=="meter"&&e!=="progressbar"&&console.warn(`<Focusable> child must have an interactive ARIA role. Got "${e}".`):console.warn("<Focusable> child must have an interactive ARIA role.");}},[r,t.isDisabled]);let s=parseInt(i.version,10)<19?l.ref:l.props.ref;return i.cloneElement(l,{...c(n,l.props),ref:b$3(s,r)})});export{v as a,E as b,Y as c,g as d,$ as e};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-CGFLGZL4.mjs';import {a as a$2}from'./chunk-7PRJIPFA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$3}from'./chunk-2VY4FAOY.mjs';import {a as a$7}from'./chunk-545KDVGI.mjs';import {a as a$6,d as d$1}from'./chunk-BGMVPFYK.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-6ZQE5SHE.mjs';import {a as a$4,g,b as b$1}from'./chunk-AUOQSTS5.mjs';import {useRef,useCallback,useEffect}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 x=new WeakMap;function I(i,e){let r=x.get(i);if(!r)throw new Error("Unknown slider state");return `${r.id}-${e}`}function we(i,e,r){let{labelProps:T,fieldProps:R}=a(i),f=i.orientation==="vertical";x.set(e,{id:T.id??R.id,"aria-describedby":i["aria-describedby"],"aria-details":i["aria-details"]});let{direction:A}=b(),{addGlobalListener:a$5,removeGlobalListener:L}=a$1(),o=useRef(null),U=A==="rtl",s=useRef(null),{moveProps:D}=a$2({onMoveStart(){s.current=null;},onMove({deltaX:t,deltaY:b}){if(!r.current)return;let{height:g,width:E}=r.current.getBoundingClientRect(),u=f?g:E;s.current==null&&o.current!=null&&(s.current=e.getThumbPercent(o.current)*u);let c=f?b:t;if((f||U)&&(c=-c),s.current+=c,o.current!=null&&r.current){let S=a$3(s.current/u,0,1);e.setThumbPercent(o.current,S);}},onMoveEnd(){o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null);}}),O=useRef(void 0),v=(t,b,g,E)=>{if(r.current&&!i.isDisabled&&e.values.every((u,c)=>!e.isThumbDragging(c))){let u=b$1(t.currentTarget),{height:c,width:S,top:M,left:$}=r.current.getBoundingClientRect(),z=f?c:S,p=((f?E:g)-(f?M:$))/z;(A==="rtl"||f)&&(p=1-p);let P=e.getPercentValue(p),d,n=e.values.findIndex(l=>P-l<0);if(n===0)d=n;else if(n===-1)d=e.values.length-1;else {let l=e.values[n-1],h=e.values[n];Math.abs(l-P)<Math.abs(h-P)?d=n-1:d=n;}d>=0&&e.isThumbEditable(d)?(t.preventDefault(),o.current=d,e.setFocusedThumb(d),O.current=b,e.setThumbDragging(o.current,true),e.setThumbValue(d,P),a$5(u,"mouseup",m,false),a$5(u,"touchend",m,false),a$5(u,"pointerup",m,false)):o.current=null;}},m=t=>{let b=t.pointerId??t.changedTouches?.[0].identifier,g=b$1(t.currentTarget);b===O.current&&(o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null),L(g,"mouseup",m,false),L(g,"touchend",m,false),L(g,"pointerup",m,false));};return "htmlFor"in T&&T.htmlFor&&(delete T.htmlFor,T.onClick=t=>{a$4(t.currentTarget).getElementById(I(e,0))?.focus(),d("keyboard");}),{labelProps:T,groupProps:{role:"group",...R},trackProps:c({onMouseDown(t){t.button!==0||t.altKey||t.ctrlKey||t.metaKey||v(t,void 0,t.clientX,t.clientY);},onPointerDown(t){t.pointerType==="mouse"&&(t.button!==0||t.altKey||t.ctrlKey||t.metaKey)||v(t,t.pointerId,t.clientX,t.clientY);},onTouchStart(t){v(t,t.changedTouches[0].identifier,t.changedTouches[0].clientX,t.changedTouches[0].clientY);},style:{position:"relative",touchAction:"none"}},D),outputProps:{htmlFor:e.values.map((t,b)=>I(e,b)).join(" "),"aria-live":"off"}}}function qe(i,e){let{index:r=0,isRequired:T,validationState:R,isInvalid:f,trackRef:A,inputRef:a$4,orientation:L=e.orientation,name:o,form:U}=i,s=i.isDisabled||e.isDisabled,D=L==="vertical",{direction:O}=b(),{addGlobalListener:v,removeGlobalListener:m}=a$1(),t=x.get(e),{labelProps:b$2,fieldProps:g$1}=a({...i,id:I(e,r),"aria-labelledby":`${t.id} ${i["aria-labelledby"]??""}`.trim()}),E=e.values[r],u=useCallback(()=>{a$4.current&&a$5(a$4.current);},[a$4]),c$1=e.focusedThumb===r;useEffect(()=>{c$1&&u();},[c$1,u]);let S=O==="rtl",M=useRef(null),{keyboardProps:$}=a$6({onKeyDown(n){let{getThumbMaxValue:l,getThumbMinValue:h,decrementThumb:F,incrementThumb:X,setThumbValue:V,setThumbDragging:H,pageSize:K}=e;if(!/^(PageUp|PageDown|Home|End)$/.test(n.key)){n.continuePropagation();return}switch(n.preventDefault(),H(r,true),n.key){case "PageUp":X(r,K);break;case "PageDown":F(r,K);break;case "Home":V(r,h(r));break;case "End":V(r,l(r));break}H(r,false);}}),{moveProps:z}=a$2({onMoveStart(){M.current=null,e.setThumbDragging(r,true);},onMove({deltaX:n,deltaY:l,pointerType:h,shiftKey:F}){let{getThumbPercent:X,setThumbPercent:V,decrementThumb:H,incrementThumb:K,step:N,pageSize:Q}=e;if(!A.current)return;let{width:ae,height:se}=A.current.getBoundingClientRect(),Z=D?se:ae;if(M.current==null&&(M.current=X(r)*Z),h==="keyboard")n>0&&S||n<0&&!S||l>0?H(r,F?Q:N):K(r,F?Q:N);else {let Y=D?l:n;(D||S)&&(Y=-Y),M.current+=Y,V(r,a$3(M.current/Z,0,1));}},onMoveEnd(){e.setThumbDragging(r,false);}});e.setThumbEditable(r,!s);let{focusableProps:J}=d$1(c(i,{onFocus:()=>e.setFocusedThumb(r),onBlur:()=>e.setFocusedThumb(void 0)}),a$4),q=useRef(void 0),k=n=>{u(),q.current=n,e.setThumbDragging(r,true);let l=b$1(a$4.current);v(l,"mouseup",p,false),v(l,"touchend",p,false),v(l,"pointerup",p,false);},p=n=>{if((n.pointerId??n.changedTouches?.[0].identifier)===q.current){u(),e.setThumbDragging(r,false);let h=b$1(a$4.current);m(h,"mouseup",p,false),m(h,"touchend",p,false),m(h,"pointerup",p,false);}},P=e.getThumbPercent(r);(D||O==="rtl")&&(P=1-P);let d=s?{}:c($,z,{onMouseDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||k();},onPointerDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||k(n.pointerId);},onTouchStart:n=>{k(n.changedTouches[0].identifier);}});return a$7(a$4,e.defaultValues[r],n=>{e.setThumbValue(r,n);}),{inputProps:c(J,g$1,{type:"range",tabIndex:s?void 0:0,min:e.getThumbMinValue(r),max:e.getThumbMaxValue(r),step:e.step,value:E,name:o,form:U,disabled:s,"aria-orientation":L,"aria-valuetext":e.getThumbValueLabel(r),"aria-required":T||void 0,"aria-invalid":f||R==="invalid"||void 0,"aria-errormessage":i["aria-errormessage"],"aria-describedby":[t["aria-describedby"],i["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[t["aria-details"],i["aria-details"]].filter(Boolean).join(" "),onChange:n=>{e.setThumbValue(r,parseFloat(g(n).value));}}),thumbProps:{...d,style:{position:"absolute",[D?"top":"left"]:`${P*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:b$2,isDragging:e.isThumbDragging(r),isDisabled:s,isFocused:c$1}}export{we as a,qe as b};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {a as a$2}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-6ZQE5SHE.mjs';import {a as a$1,b}from'./chunk-AUOQSTS5.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 h=500;function G(f){let{isDisabled:r,onLongPressStart:n,onLongPressEnd:s,onLongPress:o,threshold:d$1=h,accessibilityDescription:L}=f,t=useRef(void 0),{addGlobalListener:i,removeGlobalListener:b$1}=a(),{pressProps:E}=d({isDisabled:r,onPressStart(e){if(e.continuePropagation(),(e.pointerType==="mouse"||e.pointerType==="touch")&&(n&&n({...e,type:"longpressstart"}),t.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:true})),a$1(e.target).activeElement!==e.target&&a$2(e.target),o&&o({...e,type:"longpress"}),t.current=void 0;},d$1),e.pointerType==="touch")){let p=T=>{T.preventDefault();},y=b(e.target);i(e.target,"contextmenu",p,{once:true}),i(y,"pointerup",()=>{setTimeout(()=>{b$1(e.target,"contextmenu",p);},30);},{once:true});}},onPressEnd(e){t.current&&clearTimeout(t.current),s&&(e.pointerType==="mouse"||e.pointerType==="touch")&&s({...e,type:"longpressend"});}}),v=a$3(o&&!r?L:void 0);return {longPressProps:c(E,v)}}export{G as a};
@@ -1,10 +0,0 @@
1
- import {a as a$9}from'./chunk-IXK6S6IH.mjs';import {a as a$3}from'./chunk-GXOXYPQQ.mjs';import {a as a$b,b as b$3}from'./chunk-ZNN43VZV.mjs';import {b as b$5,c as c$4}from'./chunk-UEDBY5JI.mjs';import {a as a$2}from'./chunk-AMYRLAIC.mjs';import {i,l,p,r,s,w,u,v,j,n,k,h as h$1,x,d as d$1,g,a as a$f}from'./chunk-SMAYNDQQ.mjs';import {b as b$1}from'./chunk-NUYBQ7KP.mjs';import {a as a$k}from'./chunk-X6IJEPSH.mjs';import {a as a$i}from'./chunk-NADBGP35.mjs';import {a as a$l}from'./chunk-E5GYCA3P.mjs';import {c as c$3,b as b$7}from'./chunk-GX2IOGYR.mjs';import {a as a$h}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-2V323KAD.mjs';import {a as a$6}from'./chunk-KUEDQO7P.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$6}from'./chunk-WL27JGVG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$a}from'./chunk-4ZJMZB5B.mjs';import {d}from'./chunk-RCBUNCHV.mjs';import {e,c,h,b as b$2,a as a$c}from'./chunk-B7PSE5KC.mjs';import {h as h$2,i as i$1}from'./chunk-SHJ2TJYG.mjs';import {a as a$g}from'./chunk-D3IZ4HBL.mjs';import {a as a$1}from'./chunk-X3AXUU3H.mjs';import {a as a$4}from'./chunk-K6X2BHPP.mjs';import {a as a$8}from'./chunk-3FYY26ED.mjs';import {a as a$7}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$4}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a as a$d}from'./chunk-JQQGRJ5J.mjs';import {a as a$e}from'./chunk-4QEH5CGK.mjs';import Kt,{createContext,forwardRef,useRef,useEffect,useContext,useState,useMemo,useCallback,isValidElement}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightIcon}from'@baseline-ui/icons/8';import {themeVars,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
- function ve(r,o,e){let{gridProps:t}=b$5(r,o,e);return t.role="treegrid",{gridProps:t}}var gt={"ar-AE":{collapse:"\u0637\u064A",expand:"\u062A\u0645\u062F\u064A\u062F"},"bg-BG":{collapse:"\u0421\u0432\u0438\u0432\u0430\u043D\u0435",expand:"\u0420\u0430\u0437\u0448\u0438\u0440\u044F\u0432\u0430\u043D\u0435"},"cs-CZ":{collapse:"Sbalit",expand:"Rozt\xE1hnout"},"da-DK":{collapse:"Skjul",expand:"Udvid"},"de-DE":{collapse:"Reduzieren",expand:"Erweitern"},"el-GR":{collapse:"\u03A3\u03CD\u03BC\u03C0\u03C4\u03C5\u03BE\u03B7",expand:"\u0391\u03BD\u03AC\u03C0\u03C4\u03C5\u03BE\u03B7"},"en-US":{expand:"Expand",collapse:"Collapse"},"es-ES":{collapse:"Contraer",expand:"Ampliar"},"et-EE":{collapse:"Ahenda",expand:"Laienda"},"fi-FI":{collapse:"Pienenn\xE4",expand:"Laajenna"},"fr-FR":{collapse:"R\xE9duire",expand:"D\xE9velopper"},"he-IL":{collapse:"\u05DB\u05D5\u05D5\u05E5",expand:"\u05D4\u05E8\u05D7\u05D1"},"hr-HR":{collapse:"Sa\u017Emi",expand:"Pro\u0161iri"},"hu-HU":{collapse:"\xD6sszecsuk\xE1s",expand:"Kibont\xE1s"},"it-IT":{collapse:"Comprimi",expand:"Espandi"},"ja-JP":{collapse:"\u6298\u308A\u305F\u305F\u3080",expand:"\u5C55\u958B"},"ko-KR":{collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},"lt-LT":{collapse:"Sutraukti",expand:"I\u0161skleisti"},"lv-LV":{collapse:"Sak\u013Caut",expand:"Izv\u0113rst"},"nb-NO":{collapse:"Skjul",expand:"Utvid"},"nl-NL":{collapse:"Samenvouwen",expand:"Uitvouwen"},"pl-PL":{collapse:"Zwi\u0144",expand:"Rozwi\u0144"},"pt-BR":{collapse:"Recolher",expand:"Expandir"},"pt-PT":{collapse:"Colapsar",expand:"Expandir"},"ro-RO":{collapse:"Restr\xE2nge\u021Bi",expand:"Extinde\u021Bi"},"ru-RU":{collapse:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C"},"sk-SK":{collapse:"Zbali\u0165",expand:"Rozbali\u0165"},"sl-SI":{collapse:"Strni",expand:"Raz\u0161iri"},"sr-SP":{collapse:" Skupi",expand:"Pro\u0161iri"},"sv-SE":{collapse:"D\xF6lj",expand:"Expandera"},"tr-TR":{collapse:"Daralt",expand:"Geni\u015Flet"},"uk-UA":{collapse:"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438",expand:"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438"},"zh-CN":{collapse:"\u6298\u53E0",expand:"\u6269\u5C55"},"zh-TW":{collapse:"\u6536\u5408",expand:"\u5C55\u958B"}};function se(r,o,e){let{node:t}=r,n=c$4(r,o,e),a=n.rowProps["aria-expanded"]===true,s=b$6(gt,"@react-aria/tree"),c=a$g({"aria-label":a?s.format("collapse"):s.format("expand"),"aria-labelledby":n.rowProps.id}),d={onPress:()=>{n.isDisabled||(o.toggleKey(t.key),o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(t.key));},excludeFromTabOrder:true,preventFocusOnPress:true,"data-react-aria-prevent-focus":true,...c};return {...n,expandButtonProps:d}}var be=class r extends g{expandedKeys=new Set;withExpandedKeys(o,e){let t=this.clone();return t.expandedKeys=e,r.cloneAncestorSections(e,o,t),r.cloneAncestorSections(o,e,t),t.frozen=this.frozen,t}static cloneAncestorSections(o,e,t){for(let n of o)if(!e.has(n)){let a=n;for(;a!=null;){let s=t.getItem(a);if(s?.type==="section"){t.keyMap.set(a,s.clone());break}else a=s?.parentKey??null;}}}*[Symbol.iterator](){let o=this.getFirstKey(),e=o!=null?this.getItem(o):null;for(;e;)if(yield e,e.type==="section")e=e.nextKey!=null?this.getItem(e.nextKey):null;else {let t=this.getKeyAfter(e.key);e=t!=null?this.getItem(t):null;}}getLastKey(){let o=this.lastKey;if(o==null)return null;let e=this.getItem(o);for(;e?.lastChildKey!=null&&(e.type!=="item"||this.expandedKeys.has(e.key));)e=this.getItem(e.lastChildKey);return e?.key}getKeyAfter(o){let e=this.getItem(o);if(!e)return null;if((this.expandedKeys.has(e.key)||e.type!=="item")&&e.firstChildKey!=null)return e.firstChildKey;for(;e;){if(e.nextKey!=null)return e.nextKey;if(e.parentKey!=null)e=this.getItem(e.parentKey);else return null}return null}getKeyBefore(o){let e=this.getItem(o);if(!e)return null;if(e.prevKey!=null){for(e=this.getItem(e.prevKey);e&&(e.type!=="item"||this.expandedKeys.has(e.key))&&e.lastChildKey!=null;)e=this.getItem(e.lastChildKey);return e?.key??null}return e.parentKey}getChildren(o){let e=this;return {*[Symbol.iterator](){let t=e.getItem(o),n=t?.firstChildKey!=null?e.getItem(t.firstChildKey):null;if(t&&t.type==="section"&&n)for(;n&&n.key!==t.nextKey;){yield e.getItem(n.key);let a=e.getKeyAfter(n.key);n=a!=null?e.getItem(a):null;}else for(;n;)yield n,n=n.nextKey!=null?e.getItem(n.nextKey):null;}}}getTextValue(o){let e=this.getItem(o);return e?e.textValue:""}},bt=createContext(null),ue=createContext(null),Ie=forwardRef(function(o,e$1){return [o,e$1]=e(o,e$1,bt),jsx(i,{content:jsx(l,{...o}),createCollection:()=>new be,children:t=>jsx(Ht,{props:o,collection:t,treeRef:e$1})})}),xt={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Ht({props:r$1,collection:o,treeRef:e}){let{dragAndDropHooks:t}=r$1,{direction:n}=b(),a$7=a({usage:"search",sensitivity:"base"}),s$1=!!t?.useDraggableCollectionState,c$2=!!t?.useDroppableCollectionState,d=useRef(s$1),C=useRef(c$2);useEffect(()=>{d.current!==s$1&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),C.current!==c$2&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");},[s$1,c$2]);let{selectionMode:T="none",expandedKeys:g,defaultExpandedKeys:u$1,onExpandedChange:b$3,disabledBehavior:m="all"}=r$1,{CollectionRoot:I,isVirtualized:f,layoutDelegate:y,dropTargetDelegate:x}=useContext(p),[v$1,K]=a$1(g?new Set(g):void 0,u$1?new Set(u$1):new Set,b$3),[R,M]=useState(o),[w$1,P]=useState(v$1),[i,h$1]=useState(()=>o.withExpandedKeys(w$1,v$1));(!Ft(w$1,v$1)||o!==R)&&(h$1(o.withExpandedKeys(w$1,v$1)),M(o),P(v$1));let l=a$2({...r$1,selectionMode:T,expandedKeys:v$1,onExpandedChange:K,collection:i,children:void 0,disabledBehavior:m}),{gridProps:H}=ve({...r$1,isVirtualized:f,layoutDelegate:y},l,e),S,E,j,V=false,U=null,Z=useRef(null);if(s$1&&t){S=t.useDraggableCollectionState({collection:l.collection,selectionManager:l.selectionManager,preview:t.renderDragPreview?Z:void 0}),t.useDraggableCollection({},S,e);let ee=t.DragPreview;U=t.renderDragPreview?jsx(ee,{ref:Z,children:t.renderDragPreview}):null;}let[q]=useState(()=>new a$3);if(c$2&&t){E=t.useDroppableCollectionState({collection:l.collection,selectionManager:l.selectionManager});let ee=t.dropTargetDelegate||x||new t.ListDropTargetDelegate(l.collection,e,{direction:n});q.setup(ee,l,n);let me=new b$1({collection:l.collection,collator:a$7,ref:e,disabledKeys:l.selectionManager.disabledKeys,disabledBehavior:l.selectionManager.disabledBehavior,direction:n,layoutDelegate:y});j=t.useDroppableCollection({keyboardDelegate:me,dropTargetDelegate:q,onDropActivate:N=>{if(N.target.type==="item"){let D=N.target.key,W=l.collection.getItem(D),kt=v$1.has(D);W&&W.hasChildNodes&&(!kt||t?.isVirtualDragging?.())&&l.toggleKey(D);}},onKeyDown:N=>{let D=E?.target;if(D&&D.type==="item"&&D.dropPosition==="on"){let W=l.collection.getItem(D.key);(N.key===xt.expand[n]&&W?.hasChildNodes&&!l.expandedKeys.has(D.key)||N.key===xt.collapse[n]&&W?.hasChildNodes&&l.expandedKeys.has(D.key))&&l.toggleKey(D.key);}}},E,e),V=E.isDropTarget({type:"root"});}let Y=!!(s$1&&!S?.isDisabled),{focusProps:Q,isFocused:z,isFocusVisible:O}=a$4(),Me={isEmpty:l.collection.size===0,isFocused:z,isFocusVisible:O,isDropTarget:V,selectionMode:l.selectionManager.selectionMode,allowsDragging:!!Y,state:l},Lt=c({...r$1,children:void 0,defaultClassName:"react-aria-Tree",values:Me}),ke=null;if(l.collection.size===0&&r$1.renderEmptyState){let{isEmpty:ee,...me}=Me,N=r$1.renderEmptyState({...me});ke=jsx("div",{role:"row",style:{display:"contents"},...{"aria-level":1},children:jsx("div",{role:"gridcell",style:{display:"contents"},children:N})});}let Mt=a$5(r$1,{global:true});return jsxs(Fragment,{children:[jsx(a$6,{children:jsxs(h.div,{...c$1(Mt,Lt,H,Q,j?.collectionProps),ref:e,slot:r$1.slot||void 0,"data-empty":l.collection.size===0||void 0,"data-focused":z||void 0,"data-drop-target":V||void 0,"data-focus-visible":O||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode,"data-allows-dragging":!!Y||void 0,children:[jsxs(b$2,{values:[[ue,l],[r,{dragAndDropHooks:t,dragState:S,dropState:E}],[s,{render:Nt}]],children:[c$2&&jsx(zt,{}),jsx(w,{children:jsx(I,{collection:l.collection,persistedKeys:v(l.selectionManager,t,E),scrollRef:e,renderDropIndicator:u(t,E)})})]}),ke]})}),U]})}var Pe=class extends a$f{static type="content"},Ce=j(Pe,function(o){let e=useContext(Pt),t=c({children:o.children,values:e});return jsx(p.Provider,{value:n,children:t.children})}),Pt=createContext(null),he=class extends a$f{static type="item"},Re=k(he,(r$1,o,e)=>{let t=useContext(ue);o=a$7(o);let{dragAndDropHooks:n,dragState:a,dropState:s}=useContext(r),c$3=a&&!(a.isDisabled||a.selectionManager.isDisabled(e.key)),{rowProps:d$1,gridCellProps:C,expandButtonProps:T,descriptionProps:g,...u}=se({node:e,shouldSelectOnPressUp:!!a},t,o),b=d$1["aria-expanded"]===true,m=r$1.hasChildItems||[...t.collection.getChildren(e.key)].length>1,I=d$1["aria-level"]||1,{hoverProps:f,isHovered:y}=a$8({isDisabled:!u.allowsSelection&&!u.hasAction&&!c$3,onHoverStart:r$1.onHoverStart,onHoverChange:r$1.onHoverChange,onHoverEnd:r$1.onHoverEnd}),{isFocusVisible:x$1,focusProps:v}=a$4(),{isFocusVisible:K,focusProps:R}=a$4({within:true}),{checkboxProps:M}=a$9({key:e.key},t),w=null;a&&n&&(w=n.useDraggableItem({key:e.key,hasDragButton:true},a,o));let P=null,i=useRef(null),h$2=useRef(null),l=useRef(null),{visuallyHiddenProps:H}=a$a();s&&n&&(P=n.useDropIndicator({target:{type:"item",key:e.key,dropPosition:"on"},activateButtonRef:l},s,h$2));let S=a&&a.isDragging(e.key),E=P?.isDropTarget,j=t.selectionManager.selectionMode,V=t.selectionManager.selectionBehavior,U=Kt.useMemo(()=>({...u,isHovered:y,isFocusVisible:x$1,isExpanded:b,hasChildItems:m,level:I,selectionMode:j,selectionBehavior:V,isFocusVisibleWithin:K,state:t,id:e.key,allowsDragging:!!a,isDragging:S,isDropTarget:E}),[u,y,x$1,b,m,I,K,t,e.key,a,S,E,V,j]),Z=c({...r$1,id:void 0,children:e.rendered,defaultClassName:"react-aria-TreeItem",defaultStyle:{"--tree-item-level":I},values:U});useEffect(()=>{!e.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.");},[e.textValue]),useEffect(()=>{m&&!i.current&&process.env.NODE_ENV!=="production"&&console.warn("Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.");},[]);let q=useRef(null);useEffect(()=>{a&&!q.current&&process.env.NODE_ENV!=="production"&&console.warn('Draggable items in a Tree must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');},[]);let Y=h$1({items:t.collection.getChildren(e.key),children:O=>{switch(O.type){case "content":return O.render(O);case "loader":case "item":return jsx(Fragment,{});default:throw new Error("Unsupported element type in TreeRow: "+O.type)}}}),Q=c$2(),z=a$5(r$1,{global:true});return delete z.id,delete z.onClick,jsxs(Fragment,{children:[P&&!P.isHidden&&jsx("div",{role:"row","aria-level":d$1["aria-level"],"aria-expanded":d$1["aria-expanded"],"aria-label":P.dropIndicatorProps["aria-label"],children:jsxs("div",{role:"gridcell","aria-colindex":1,style:{display:"contents"},children:[jsx("div",{role:"button",...H,...P.dropIndicatorProps,ref:h$2}),d$1["aria-expanded"]!=null?jsx("div",{role:"button",...H,id:Q,"aria-label":T["aria-label"],"aria-labelledby":`${Q} ${d$1.id}`,tabIndex:-1,ref:l}):null]})}),jsx(h.div,{...c$1(z,d$1,v,f,R,w?.dragProps),...Z,ref:o,"data-expanded":m&&b||void 0,"data-has-child-items":m||void 0,"data-level":I,"data-selected":u.isSelected||void 0,"data-disabled":u.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":u.isFocused||void 0,"data-focus-visible":x$1||void 0,"data-pressed":u.isPressed||void 0,"data-selection-mode":t.selectionManager.selectionMode==="none"?void 0:t.selectionManager.selectionMode,"data-allows-dragging":!!a||void 0,"data-dragging":S||void 0,"data-drop-target":E||void 0,children:jsx("div",{...C,style:{display:"contents"},children:jsx(b$2,{values:[[a$b,{slots:{selection:M}}],[b$3,{slots:{selection:M}}],[d,{slots:{[a$c]:{},chevron:{...T,ref:i},drag:{...w?.dragButtonProps,ref:q,style:{pointerEvents:"none"}}}}],[Pt,{...U}],[x,{isSelected:u.isSelected}]],children:Y})})})]})});j(d$1,function(o,e,t){let{isVirtualized:n}=useContext(p),a=useContext(ue),{isLoading:s,onLoadMore:c$2,scrollOffset:d,...C}=o,T=useRef(null),g=useMemo(()=>({onLoadMore:c$2,collection:a?.collection,sentinelRef:T,scrollOffset:d}),[c$2,d,a?.collection]);h$2(g,T),e=a$7(e);let{rowProps:u,gridCellProps:b}=se({node:t},a,e),m=u["aria-level"]||1,I={role:"row","aria-level":u["aria-level"]},f=c({...C,id:void 0,children:t.rendered,defaultClassName:"react-aria-TreeLoader",values:{level:m}}),y={};return n&&(y={display:"contents"}),jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:i$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:T,style:{position:"absolute",height:1,width:1}})}),s&&f.children&&jsx(h.div,{ref:e,...c$1(a$5(o),I),...f,"data-level":m,children:jsx("div",{...b,style:y,children:f.children})})]})});function Nt(r$1,o){o=a$7(o);let{dragAndDropHooks:e,dropState:t}=useContext(r),n=useRef(null),{dropIndicatorProps:a,isHidden:s,isDropTarget:c}=e.useDropIndicator(r$1,t,n);if(s)return null;let d=t&&r$1.target.type==="item"?(t.collection.getItem(r$1.target.key)?.level||0)+1:1;return jsx(Vt,{...r$1,dropIndicatorProps:a,isDropTarget:c,ref:o,buttonRef:n,level:d})}function Bt(r,o){let{dropIndicatorProps:e,isDropTarget:t,buttonRef:n,level:a,...s}=r,{visuallyHiddenProps:c$1}=a$a(),d=c({...s,defaultClassName:"react-aria-DropIndicator",defaultStyle:{position:"relative","--tree-item-level":a},values:{isDropTarget:t}});return jsx(h.div,{...d,role:"row","aria-level":a,ref:o,"data-drop-target":t||void 0,children:jsxs("div",{role:"gridcell",children:[jsx("div",{...c$1,role:"button",...e,ref:n}),d.children]})})}var Vt=forwardRef(Bt);function zt(){let{dragAndDropHooks:r$1,dropState:o}=useContext(r),e=useRef(null),{dropIndicatorProps:t}=r$1.useDropIndicator({target:{type:"root"}},o,e),n=o.isDropTarget({type:"root"}),{visuallyHiddenProps:a}=a$a();return !n&&t["aria-hidden"]?null:jsx("div",{role:"row","aria-hidden":t["aria-hidden"],style:{position:"absolute"},children:jsx("div",{role:"gridcell",children:jsx("div",{role:"button",...a,...t,ref:e})})})}function Ft(r,o){if(r.size!==o.size)return false;for(let e of r)if(!o.has(e))return false;return true}var ht=({actionsPosition:r,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:t,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:d,onRename:C,renameLabel:T,renderItemTitle:g})=>Object.values({actionsPosition:r,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:t,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:d,onRename:C,renameLabel:T,renderItemTitle:g});var Dt="_10dw1p96",It="_10dw1p95",Ct=a$d({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isSelected:{true:"_1yep5z612u"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isSelected:false,isRenaming:false},"_1yep5z61pc _1yep5z61rl _1yep5z61va _1yep5z61v9 _1yep5z61vd"]]});function St(r,o){if(typeof r=="function"&&!r.prototype?.isReactComponent){let e=r(o);return isValidElement(e)?r:e}return r}var Se=({item:r,...o})=>{let{onPrimaryAction:e,onSecondaryAction:t,actionsPosition:n,primaryActionIcon:a,secondaryActionIcon:s,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,expandLabel:C,collapseLabel:T,onRename:g,renameLabel:u,renderItemTitle:b}=o,{formatMessage:m}=b$7(),{renamingKey:I,setRenamingKey:f}=useContext(Ee),y=I===r.id,x=!!r.children?.length,v=r.icon,K=!!g,R=useRef(false),M=useMemo(()=>{let i=St(a,r.id),h=St(s,r.id),l=typeof c=="function"?c(r.id):c,H=typeof d=="function"?d(r.id):d;return i||h?jsxs(a$h,{display:"flex",flexDirection:"row",children:[i?jsx(a$i,{icon:i,"aria-label":l,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{e?.(r.id);},tooltip:true}):null,h?jsx(a$i,{icon:h,"aria-label":H,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{t?.(r.id);},tooltip:true}):null]}):null},[a,r.id,s,c,d,e,t]),w=useCallback(i=>{i.key==="Enter"?(R.current=true,g?.({key:r.id,value:i.target.value}),f(null)):i.key==="Escape"&&(R.current=true,f(null));},[r.id,g,f]),P=useCallback(()=>b?b(r):r.label,[b,r]);return jsxs(Re,{id:r.id,textValue:r.label,"data-key":r.id,className:i=>a$e(It,Ct({isHovered:i.isHovered,isSelected:i.isSelected,isFocusVisible:i.isFocusVisible,isRenaming:y}),"BaselineUI-TreeView-Row"),style:{justifyContent:n==="end"?"space-between":void 0},children:[jsx(Ce,{children:i=>{let h=i.level-1;return jsxs(Fragment,{children:[n==="start"?M:null,jsxs(a$h,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(a$h,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${h*2} * ${themeVars.spacing.lg})`},children:[jsx(a$j,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{i.state.toggleKey(i.id);},"aria-label":i.isExpanded?T??m(we.collapse):C??m(we.expand),style:{visibility:x?"visible":"hidden"},className:a$e(Dt,"BaselineUI-TreeView-ExpansionToggle")}),v?jsx(v,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(a$h,{paddingLeft:"sm",paddingY:y?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:l=>{K&&(l.stopPropagation(),l.preventDefault(),f(r.id));},children:[y?jsx("div",{onClick:l=>{l.stopPropagation();},children:jsx(a$k,{defaultValue:r.label,autoFocus:true,onBlur:l=>{if(R.current){R.current=false;return}g?.({key:r.id,value:l.target.value}),f(null);},"aria-label":u??m(we.rename),onKeyDown:w,className:"BaselineUI-TreeView-RenameInput"})}):jsx(a$l,{type:"label",size:"sm",className:a$e(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:P()}),r.description?jsx(a$l,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.description}):null]})]}),n==="end"?M:null]})}}),jsx(l,{items:r.children,children:i=>jsx(Se,{item:i,...o})})]})},we=c$3({expand:{id:"bui.treeView.expand",defaultMessage:"Expand"},collapse:{id:"bui.treeView.collapse",defaultMessage:"Collapse"},rename:{id:"bui.treeView.rename",defaultMessage:"Rename"}});var Ee=createContext({renamingKey:null,setRenamingKey:()=>{}}),Et=Kt.forwardRef(({className:r,style:o,"data-block-id":e,"data-block-class":t,items:n,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:d,primaryActionAriaLabel:C,secondaryActionAriaLabel:T,actionsPosition:g="start",expandLabel:u,collapseLabel:b,onRename:m,renameLabel:I,onAction:f,renderItemTitle:y,...x},v)=>{let K=useRef(null),[R,M]=useState(null);useEffect(()=>{let i=K.current;if(!i||!m)return;let h=l=>{if(l.key==="F2"){let S=i.querySelector("[data-focused='true']")?.dataset.key;S&&(l.preventDefault(),l.stopPropagation(),M(S));}};return i.addEventListener("keydown",h),()=>{i.removeEventListener("keydown",h);}},[m]);let w=useMemo(()=>({renamingKey:R,setRenamingKey:M}),[R]),P={actionsPosition:g,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:d,primaryActionAriaLabel:C,secondaryActionAriaLabel:T,expandLabel:u,collapseLabel:b,onRename:m,renameLabel:I,renderItemTitle:y};return jsx(Ee.Provider,{value:w,children:jsx(Ie,{ref:b$4(v,K),items:n.children||[],selectionMode:"multiple",expandedKeys:x.expandedKeys,defaultExpandedKeys:x.defaultExpandedKeys,onExpandedChange:x.onExpandedChange,selectedKeys:x.selectedKeys,onAction:f,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"data-block-id":e,"data-block-class":t,style:o,className:a$e(r,"BaselineUI-TreeView"),dependencies:ht(P),children:i=>jsx(Se,{item:i,...P})})})});Et.displayName="TreeView";export{Et as a};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-66CUIXA6.mjs';import {b as b$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-AUOQSTS5.mjs';import*as d from'dompurify';import c,{useId}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 b=(e,t)=>{e.setAttribute("height",typeof t=="number"?`${t}px`:t),e.setAttribute("width",typeof t=="number"?`${t}px`:t);},E=(e,t,n)=>{let o=e.querySelector("title"),i=a(e);if(o)o.textContent=t,o.setAttribute("id",n);else {let r=i.createElement("title");r.textContent=t,r.setAttribute("id",n),e.prepend(r);}},I=(e,t)=>{t&&e.classList.add(t);},T=(e,t)=>{let n=t.createElement("span");n.innerHTML=d.default.sanitize(e);let o=n.querySelector("svg");return a$1(o,"Icon: svg prop must be a valid svg string"),o},w=c.forwardRef(({size:e,title:t,className:n,style:o,color:i,...r},S)=>{let u=useId(),f=c.useRef(null),m="svg"in r?r.svg:void 0,l=c.useMemo(()=>{if(m){let y=a(f.current),s=T(m,y);return e&&b(s,e),t&&E(s,t,u),I(s,n),s.outerHTML}},[m,e,t,n,u]);return jsx("span",{className:n,ref:b$1(S,f),style:{display:"contents",...o,color:i},dangerouslySetInnerHTML:l?{__html:l}:void 0})});w.displayName="Icon";export{w as a};
@@ -1,10 +0,0 @@
1
- import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-HONWMHMX.mjs';import {e as e$1}from'./chunk-SHJ2TJYG.mjs';import {a as a$2}from'./chunk-2VY4FAOY.mjs';import {i}from'./chunk-MRJFGHFW.mjs';import {a as a$1}from'./chunk-JDLUGVXG.mjs';import {a,f,b as b$1,e}from'./chunk-AUOQSTS5.mjs';import {useState,useRef,useEffect,useCallback}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 $=1e7;function dt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var F={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Ct={top:"left",left:"top"},it={top:"height",left:"width"},Et={width:"totalWidth",height:"totalHeight"},J={};function Ot(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i$1=0,c=0,u=0,r={},a$1=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i$1=h.clientHeight,o=e?.width??s,n=e?.height??i$1,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=e.offsetTop,u=e.offsetLeft);}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i$1=n;return i()&&(t.tagName==="BODY"||t.tagName==="HTML")&&a$1&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i$1,scroll:r,top:c,left:u}}function Mt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[F[t]]+s,a=i[t]+o.scroll[F[t]]+u-s,h=e-c+o.scroll[F[t]]+i[t]-o[F[t]],d=e-c+l+o.scroll[F[t]]+i[t]-o[F[t]];return h<r?r-h:d>a?Math.max(a-d,r-h):0}function It(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=F[e]||"right",n=Ct[o];F[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,a){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:H,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,L=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,L),h===y){let W=c?a[H]:a[Et[H]];b[G[y]]=Math.floor(W-t[y]+n);}else b[y]=Math.floor(t[y]+t[H]+n);return b}function vt(t,e,l,o,n,s,i,c,u,r,a){let h=(t.top!=null?t.top:u[Et.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(a?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(a?.offsetTop??0)+(a?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function Pt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:a}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[a]+t[r]+(c?e[r]:0)-l[r]-l[a]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function St(t,e,l,o,n,s,i,c,u,r,a,h,d,y,f,H,w,b,E,L,W,_){let m=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=m,P=tt(e,c,l,m,a,h,r,d,f,H,u),S=a,k=E?$:Pt(c,r,e,n,s+a,m,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,a,h,r,d,f,H,u);Pt(c,r,e,n,s+a,j,u,w)>k&&(m=j,P=X,S=a);}if(_==="anchor"&&L&&(m.placement==="top"||m.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=m.crossPlacement==="center"?j>0?"left":"right":G[m.crossPlacement];if(X){let lt=rt(`${m.placement} ${X}`),pt=tt(e,c,l,lt,a,h,r,d,f,H,u),Lt=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Lt)<Math.abs(j)&&(m=lt,P=pt);}}}let I="bottom";m.axis==="top"?m.placement==="top"?I="top":m.placement==="bottom"&&(I="bottom"):m.crossAxis==="top"&&(m.crossPlacement==="top"?I="bottom":m.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&L&&(m.placement==="top"||m.placement==="bottom")&&m.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!W?void 0:vt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,m,S,h,r,d,f,H,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[F[p]],C=g+.5*e[R],D=f/2+H,B=F[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-B-f/2-H,ot=e[p]+f/2-(P[p]+n[F[p]]),Tt=e[p]+e[R]-f/2-(P[p]+n[F[p]]),yt=a$2(C,ot,Tt);v[p]=a$2(yt,D,N),{placement:M,crossPlacement:T}=m,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let at=M==="left"||M==="top"?l[A]:0,Ht={x:M==="top"||M==="bottom"?g:at,y:M==="left"||M==="right"?g:at};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ht}}function At(t){let{placement:e$1,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:a$1,crossOffset:h,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:H}=t,w=a(o),b=b$1(o),E=Ot(o),L=o instanceof b.HTMLElement?zt(o):w.documentElement,W=L===w.documentElement,_=b.getComputedStyle(L).position,m=!!_&&_!=="static",A=W?Z(l,false,H):xt(l,L,false,H);if(!W){let{marginTop:D,marginLeft:B}=b.getComputedStyle(l);A.top+=parseInt(D,10)||0,A.left+=parseInt(B,10)||0;}let p=Z(o,true),R=It(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=Mt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:dt("left",w,E),z=k?I:dt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(L,E);m&&!W&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:xt(P,L,false),C=!T&&e(P,L)&&L!==P;return St(e$1,A,p,M,R,s,i,x,v,g,a$1,h,m,d,y,f,C,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:a$1,clientLeft:h}=o.documentElement;return {top:n+u-a$1,left:s+r-h,width:i,height:c}}function xt(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function zt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!wt(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!wt(o);)o=o.parentElement;return o||e.documentElement}function wt(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function mt(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function te(t){let{direction:e$2}=b(),{arrowSize:l,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:a$2,boundaryAxis:h="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f$1=0,shouldUpdatePosition:H=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:L,arrowBoundaryOffset:W=0,getTargetRect:_}=t,m=a$2??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[H,c,n.current,o.current,s?.current,i.current,u,r,m,h,d,y,f$1,b$3,e$2,L,W,l],M=useRef(mt(n.current)?.scale);useEffect(()=>{b$3&&(M.current=mt(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(H===false||!b$3||!n.current||!o.current||m===void 0||mt(n.current)?.scale!==M.current)return;let z=a(n.current),x=f(z),v=b$1(z.body),g=null;if(i.current&&e(i.current,x)){let B=x?.getBoundingClientRect(),N=i.current.getBoundingClientRect();g={type:"top",offset:(B?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(B?.bottom??0)-N.bottom);}let C=n.current;!L&&n.current&&(C.style.top="0px",C.style.bottom="",C.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let D=At({placement:Wt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i.current||n.current,padding:u,shouldFlip:r,boundaryElement:m,boundaryAxis:h,horizontalBoundaryBehavior:d,offset:y,crossOffset:f$1,maxHeight:L,arrowSize:l??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:W,targetRect:_?.(o.current)});if(D.position){if(C.style.top="",C.style.bottom="",C.style.left="",C.style.right="",Object.keys(D.position).forEach(B=>C.style[B]=D.position[B]+"px"),C.style.maxHeight=D.maxHeight!=null?D.maxHeight+"px":"",g&&x&&i.current){let B=x.getBoundingClientRect(),N=i.current.getBoundingClientRect(),ot=B[g.type]-N[g.type];i.current.scrollTop+=ot-g.offset;}p(D);}},R);a$1(T,R);let P=m?b$1(m):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Bt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e$1({ref:n,onResize:k}),e$1({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,C=()=>{I.current&&x();};return g?.addEventListener("resize",x),g?.addEventListener("scroll",C),()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",C);}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Bt(t,e=window){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Wt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{te as a};