@beeq/core 1.12.2-beta.0 → 1.12.3-beta.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 (640) hide show
  1. package/dist/beeq/beeq.esm.js +1 -44
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/index.esm.js +1 -69
  4. package/dist/beeq/p-026cfacc.entry.js +6 -0
  5. package/dist/beeq/p-026cfacc.entry.js.map +1 -0
  6. package/dist/beeq/p-061d53de.entry.js +6 -0
  7. package/dist/beeq/p-061d53de.entry.js.map +1 -0
  8. package/dist/beeq/{p-9a78587d.entry.js → p-08fef3d3.entry.js} +2 -134
  9. package/dist/beeq/p-08fef3d3.entry.js.map +1 -0
  10. package/dist/beeq/p-12d9420b.entry.js +6 -0
  11. package/dist/beeq/p-12d9420b.entry.js.map +1 -0
  12. package/dist/beeq/p-17454929.entry.js +6 -0
  13. package/dist/beeq/p-17454929.entry.js.map +1 -0
  14. package/dist/beeq/{p-ff327b98.entry.js → p-1bce390d.entry.js} +2 -116
  15. package/dist/beeq/p-1bce390d.entry.js.map +1 -0
  16. package/dist/beeq/p-1c09c7c0.entry.js +6 -0
  17. package/dist/beeq/p-1c09c7c0.entry.js.map +1 -0
  18. package/dist/beeq/p-1f819545.entry.js +6 -0
  19. package/dist/beeq/p-1f819545.entry.js.map +1 -0
  20. package/dist/beeq/p-292a8a40.entry.js +6 -0
  21. package/dist/beeq/p-292a8a40.entry.js.map +1 -0
  22. package/dist/beeq/p-2ec4fbf0.entry.js +6 -0
  23. package/dist/beeq/p-2ec4fbf0.entry.js.map +1 -0
  24. package/dist/beeq/p-34125078.entry.js +6 -0
  25. package/dist/beeq/p-34125078.entry.js.map +1 -0
  26. package/dist/beeq/{p-6b68123f.entry.js → p-36e8e717.entry.js} +2 -246
  27. package/dist/beeq/p-36e8e717.entry.js.map +1 -0
  28. package/dist/beeq/p-37f739f5.entry.js +6 -0
  29. package/dist/beeq/p-37f739f5.entry.js.map +1 -0
  30. package/dist/beeq/p-38a7015c.entry.js +6 -0
  31. package/dist/{components/p-CXLw0i9p.js.map → beeq/p-38a7015c.entry.js.map} +1 -1
  32. package/dist/beeq/p-4aa539d7.entry.js +6 -0
  33. package/dist/beeq/p-4aa539d7.entry.js.map +1 -0
  34. package/dist/beeq/p-51074699.entry.js +6 -0
  35. package/dist/beeq/p-51074699.entry.js.map +1 -0
  36. package/dist/beeq/p-64123cb2.entry.js +6 -0
  37. package/dist/beeq/p-64123cb2.entry.js.map +1 -0
  38. package/dist/beeq/{p-426fd908.entry.js → p-6a70511e.entry.js} +2 -211
  39. package/dist/beeq/p-6a70511e.entry.js.map +1 -0
  40. package/dist/beeq/{p-1011ae42.entry.js → p-7c9c6561.entry.js} +2 -89
  41. package/dist/beeq/p-7c9c6561.entry.js.map +1 -0
  42. package/dist/beeq/p-7e73ea84.entry.js +6 -0
  43. package/dist/beeq/p-7e73ea84.entry.js.map +1 -0
  44. package/dist/beeq/p-84db8789.entry.js +6 -0
  45. package/dist/beeq/p-84db8789.entry.js.map +1 -0
  46. package/dist/beeq/p-85af346a.entry.js +6 -0
  47. package/dist/beeq/p-85af346a.entry.js.map +1 -0
  48. package/dist/beeq/p-B4sM1t6Z.js +1 -8
  49. package/dist/beeq/p-BNvWMggA.js +1 -23
  50. package/dist/beeq/p-BRMw_HGf.js +1 -8
  51. package/dist/beeq/p-BRbYDZoo.js +1 -10
  52. package/dist/beeq/p-BcPwGxIn.js +1 -9
  53. package/dist/beeq/p-BsSDkLU5.js +1 -26
  54. package/dist/beeq/p-CCNjsDdb.js +1 -88
  55. package/dist/beeq/p-CVw85-WU.js +1 -64
  56. package/dist/beeq/p-Cau9SvT4.js +1 -12
  57. package/dist/beeq/p-CmKvDWiL.js +1 -1782
  58. package/dist/beeq/p-CpKQ7XUL.js +1 -284
  59. package/dist/beeq/p-D1A0LpG_.js +1 -10
  60. package/dist/beeq/p-DdvbF5yL.js +1 -119
  61. package/dist/beeq/p-DnkZCdMA.js +1 -8
  62. package/dist/beeq/p-Ds7rcaFH.js +1 -65
  63. package/dist/beeq/p-Dx-CEPSQ.js +1 -13
  64. package/dist/beeq/p-XbB3xSTR.js +7 -0
  65. package/dist/beeq/p-XbB3xSTR.js.map +1 -0
  66. package/dist/beeq/p-_RvVpeh2.js +1 -29
  67. package/dist/beeq/p-a4e6c238.entry.js +6 -0
  68. package/dist/beeq/p-a4e6c238.entry.js.map +1 -0
  69. package/dist/beeq/p-ab690c8e.entry.js +6 -0
  70. package/dist/beeq/p-ab690c8e.entry.js.map +1 -0
  71. package/dist/beeq/p-ad86b7ee.entry.js +6 -0
  72. package/dist/beeq/p-ad86b7ee.entry.js.map +1 -0
  73. package/dist/beeq/p-b31ab8df.entry.js +6 -0
  74. package/dist/beeq/p-b31ab8df.entry.js.map +1 -0
  75. package/dist/beeq/p-b4f1b67f.entry.js +6 -0
  76. package/dist/beeq/p-b4f1b67f.entry.js.map +1 -0
  77. package/dist/beeq/{p-8b5934a3.entry.js → p-bcd26036.entry.js} +2 -154
  78. package/dist/beeq/p-bcd26036.entry.js.map +1 -0
  79. package/dist/beeq/{p-11671252.entry.js → p-c08c4c7b.entry.js} +2 -124
  80. package/dist/beeq/p-c08c4c7b.entry.js.map +1 -0
  81. package/dist/{components/p-CXLw0i9p.js → beeq/p-c3013171.entry.js} +2 -291
  82. package/dist/beeq/p-c3013171.entry.js.map +1 -0
  83. package/dist/beeq/p-ce975008.entry.js +6 -0
  84. package/dist/beeq/p-ce975008.entry.js.map +1 -0
  85. package/dist/beeq/{p-db09cc1e.entry.js → p-cf843f3a.entry.js} +2 -83
  86. package/dist/beeq/p-cf843f3a.entry.js.map +1 -0
  87. package/dist/beeq/p-d1f4ce2e.entry.js +6 -0
  88. package/dist/beeq/p-d1f4ce2e.entry.js.map +1 -0
  89. package/dist/beeq/p-d6edf4cb.entry.js +6 -0
  90. package/dist/beeq/p-d6edf4cb.entry.js.map +1 -0
  91. package/dist/beeq/p-e38637a0.entry.js +6 -0
  92. package/dist/beeq/p-e38637a0.entry.js.map +1 -0
  93. package/dist/beeq/p-ec4c7f14.entry.js +6 -0
  94. package/dist/beeq/p-ec4c7f14.entry.js.map +1 -0
  95. package/dist/beeq/p-f3c8eda1.entry.js +6 -0
  96. package/dist/beeq/p-f3c8eda1.entry.js.map +1 -0
  97. package/dist/beeq/{p-1aba3eec.entry.js → p-f86bbd71.entry.js} +2 -146
  98. package/dist/beeq/p-f86bbd71.entry.js.map +1 -0
  99. package/dist/beeq/p-ff68b62f.entry.js +6 -0
  100. package/dist/beeq/p-ff68b62f.entry.js.map +1 -0
  101. package/dist/beeq/p-lysmVw2n.js +1 -12
  102. package/dist/beeq/p-uqkxeAeG.js +1 -88
  103. package/dist/beeq/p-zh4P02Kn.js +1 -21
  104. package/dist/beeq/scripts/esm-loader.js +24 -0
  105. package/dist/beeq/scripts/zeroheight-svg-loader.js +22 -0
  106. package/dist/beeq.html-custom-data.json +198 -198
  107. package/dist/cjs/beeq.cjs.js +2 -3
  108. package/dist/cjs/beeq.cjs.js.map +1 -1
  109. package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -3
  110. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  111. package/dist/cjs/bq-accordion.cjs.entry.js +14 -15
  112. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  113. package/dist/cjs/bq-alert.cjs.entry.js +14 -15
  114. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  115. package/dist/cjs/bq-avatar.cjs.entry.js +13 -14
  116. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  117. package/dist/cjs/bq-badge.cjs.entry.js +9 -10
  118. package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
  119. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -3
  120. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  121. package/dist/cjs/bq-breadcrumb.cjs.entry.js +7 -8
  122. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  123. package/dist/cjs/bq-button_2.cjs.entry.js +19 -20
  124. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  125. package/dist/cjs/bq-card.cjs.entry.js +7 -8
  126. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  127. package/dist/cjs/bq-checkbox.cjs.entry.js +5 -6
  128. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  129. package/dist/cjs/bq-date-picker.cjs.entry.js +20 -21
  130. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  131. package/dist/cjs/bq-dialog.cjs.entry.js +15 -16
  132. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  133. package/dist/cjs/bq-divider.cjs.entry.js +15 -16
  134. package/dist/cjs/bq-divider.cjs.entry.js.map +1 -1
  135. package/dist/cjs/bq-drawer.cjs.entry.js +19 -20
  136. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  137. package/dist/cjs/bq-dropdown_2.cjs.entry.js +7 -8
  138. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  139. package/dist/cjs/bq-empty-state.cjs.entry.js +26 -27
  140. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  141. package/dist/cjs/bq-input.cjs.entry.js +22 -23
  142. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  143. package/dist/cjs/bq-notification.cjs.entry.js +12 -13
  144. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  145. package/dist/cjs/bq-option-group.cjs.entry.js +2 -3
  146. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  147. package/dist/cjs/bq-option-list_2.cjs.entry.js +11 -12
  148. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  149. package/dist/cjs/bq-option.cjs.entry.js +15 -16
  150. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  151. package/dist/cjs/bq-page-title.cjs.entry.js +11 -12
  152. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  153. package/dist/cjs/bq-progress.cjs.entry.js +13 -14
  154. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  155. package/dist/cjs/bq-radio-group.cjs.entry.js +2 -3
  156. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  157. package/dist/cjs/bq-radio.cjs.entry.js +9 -10
  158. package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
  159. package/dist/cjs/bq-select.cjs.entry.js +31 -32
  160. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  161. package/dist/cjs/bq-side-menu-item.cjs.entry.js +6 -7
  162. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  163. package/dist/cjs/bq-side-menu.cjs.entry.js +4 -5
  164. package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
  165. package/dist/cjs/bq-slider.cjs.entry.js +23 -24
  166. package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
  167. package/dist/cjs/bq-spinner.cjs.entry.js +10 -11
  168. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  169. package/dist/cjs/bq-status.cjs.entry.js +2 -3
  170. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  171. package/dist/cjs/bq-step-item.cjs.entry.js +17 -18
  172. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  173. package/dist/cjs/bq-steps.cjs.entry.js +3 -4
  174. package/dist/cjs/bq-steps.cjs.entry.js.map +1 -1
  175. package/dist/cjs/bq-switch.cjs.entry.js +10 -11
  176. package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
  177. package/dist/cjs/bq-tab-group.cjs.entry.js +8 -9
  178. package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -1
  179. package/dist/cjs/bq-tab.cjs.entry.js +5 -6
  180. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  181. package/dist/cjs/bq-textarea.cjs.entry.js +16 -17
  182. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  183. package/dist/cjs/bq-toast.cjs.entry.js +2 -3
  184. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  185. package/dist/cjs/bq-tooltip.cjs.entry.js +9 -10
  186. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  187. package/dist/cjs/{index-BwvwUnfB.js → index-Bp6IQmE_.js} +68 -22
  188. package/dist/cjs/index-Bp6IQmE_.js.map +1 -0
  189. package/dist/cjs/loader.cjs.js +2 -3
  190. package/dist/cjs/loader.cjs.js.map +1 -1
  191. package/dist/collection/components/accordion/bq-accordion.js +14 -14
  192. package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
  193. package/dist/collection/components/accordion-group/bq-accordion-group.js +2 -2
  194. package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
  195. package/dist/collection/components/alert/bq-alert.js +14 -15
  196. package/dist/collection/components/alert/bq-alert.js.map +1 -1
  197. package/dist/collection/components/avatar/bq-avatar.js +13 -14
  198. package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
  199. package/dist/collection/components/badge/bq-badge.js +9 -10
  200. package/dist/collection/components/badge/bq-badge.js.map +1 -1
  201. package/dist/collection/components/breadcrumb/bq-breadcrumb.js +6 -7
  202. package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
  203. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +2 -2
  204. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  205. package/dist/collection/components/button/bq-button.js +18 -19
  206. package/dist/collection/components/button/bq-button.js.map +1 -1
  207. package/dist/collection/components/card/bq-card.js +7 -8
  208. package/dist/collection/components/card/bq-card.js.map +1 -1
  209. package/dist/collection/components/checkbox/bq-checkbox.js +5 -5
  210. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  211. package/dist/collection/components/date-picker/bq-date-picker.js +20 -20
  212. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  213. package/dist/collection/components/dialog/bq-dialog.js +15 -15
  214. package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
  215. package/dist/collection/components/divider/bq-divider.js +15 -16
  216. package/dist/collection/components/divider/bq-divider.js.map +1 -1
  217. package/dist/collection/components/drawer/bq-drawer.js +19 -20
  218. package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
  219. package/dist/collection/components/dropdown/bq-dropdown.js +2 -2
  220. package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
  221. package/dist/collection/components/empty-state/bq-empty-state.js +26 -26
  222. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  223. package/dist/collection/components/icon/bq-icon.js +2 -3
  224. package/dist/collection/components/icon/bq-icon.js.map +1 -1
  225. package/dist/collection/components/input/bq-input.js +22 -22
  226. package/dist/collection/components/input/bq-input.js.map +1 -1
  227. package/dist/collection/components/notification/bq-notification.js +12 -13
  228. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  229. package/dist/collection/components/option/bq-option.js +15 -16
  230. package/dist/collection/components/option/bq-option.js.map +1 -1
  231. package/dist/collection/components/option-group/bq-option-group.js +2 -2
  232. package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
  233. package/dist/collection/components/option-list/bq-option-list.js +2 -2
  234. package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
  235. package/dist/collection/components/page-title/bq-page-title.js +11 -11
  236. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  237. package/dist/collection/components/panel/bq-panel.js +3 -3
  238. package/dist/collection/components/panel/bq-panel.js.map +1 -1
  239. package/dist/collection/components/progress/bq-progress.js +13 -14
  240. package/dist/collection/components/progress/bq-progress.js.map +1 -1
  241. package/dist/collection/components/radio/bq-radio.js +9 -10
  242. package/dist/collection/components/radio/bq-radio.js.map +1 -1
  243. package/dist/collection/components/radio-group/bq-radio-group.js +2 -3
  244. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  245. package/dist/collection/components/select/bq-select.js +27 -27
  246. package/dist/collection/components/select/bq-select.js.map +1 -1
  247. package/dist/collection/components/select/scss/bq-select.css +1 -1
  248. package/dist/collection/components/side-menu/bq-side-menu.js +4 -4
  249. package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
  250. package/dist/collection/components/side-menu-item/bq-side-menu-item.js +6 -6
  251. package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
  252. package/dist/collection/components/slider/bq-slider.js +23 -23
  253. package/dist/collection/components/slider/bq-slider.js.map +1 -1
  254. package/dist/collection/components/spinner/bq-spinner.js +10 -10
  255. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  256. package/dist/collection/components/status/bq-status.js +2 -2
  257. package/dist/collection/components/status/bq-status.js.map +1 -1
  258. package/dist/collection/components/step-item/bq-step-item.js +16 -16
  259. package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
  260. package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
  261. package/dist/collection/components/steps/bq-steps.js +3 -3
  262. package/dist/collection/components/steps/bq-steps.js.map +1 -1
  263. package/dist/collection/components/switch/bq-switch.js +10 -11
  264. package/dist/collection/components/switch/bq-switch.js.map +1 -1
  265. package/dist/collection/components/tab/bq-tab.js +5 -5
  266. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  267. package/dist/collection/components/tab-group/bq-tab-group.js +8 -9
  268. package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
  269. package/dist/collection/components/tag/bq-tag.js +10 -11
  270. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  271. package/dist/collection/components/tag/scss/bq-tag.css +1 -1
  272. package/dist/collection/components/textarea/bq-textarea.js +16 -16
  273. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  274. package/dist/collection/components/toast/bq-toast.js +2 -3
  275. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  276. package/dist/collection/components/tooltip/bq-tooltip.js +8 -8
  277. package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
  278. package/dist/collection/global/scripts/esm-loader.js +23 -6
  279. package/dist/collection/scripts/esm-loader.js +24 -0
  280. package/dist/collection/scripts/zeroheight-svg-loader.js +22 -0
  281. package/dist/components/bq-accordion-group.js +1 -157
  282. package/dist/components/bq-accordion-group.js.map +1 -1
  283. package/dist/components/bq-accordion.js +1 -444
  284. package/dist/components/bq-accordion.js.map +1 -1
  285. package/dist/components/bq-alert.js +1 -354
  286. package/dist/components/bq-alert.js.map +1 -1
  287. package/dist/components/bq-avatar.js +1 -206
  288. package/dist/components/bq-avatar.js.map +1 -1
  289. package/dist/components/bq-badge.js +1 -8
  290. package/dist/components/bq-breadcrumb-item.js +1 -129
  291. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  292. package/dist/components/bq-breadcrumb.js +1 -138
  293. package/dist/components/bq-breadcrumb.js.map +1 -1
  294. package/dist/components/bq-button.js +1 -8
  295. package/dist/components/bq-card.js +1 -118
  296. package/dist/components/bq-card.js.map +1 -1
  297. package/dist/components/bq-checkbox.js +1 -314
  298. package/dist/components/bq-checkbox.js.map +1 -1
  299. package/dist/components/bq-date-picker.js +1 -1113
  300. package/dist/components/bq-date-picker.js.map +1 -1
  301. package/dist/components/bq-dialog.js +1 -347
  302. package/dist/components/bq-dialog.js.map +1 -1
  303. package/dist/components/bq-divider.js +1 -8
  304. package/dist/components/bq-drawer.js +1 -356
  305. package/dist/components/bq-drawer.js.map +1 -1
  306. package/dist/components/bq-dropdown.js +1 -8
  307. package/dist/components/bq-empty-state.js +1 -192
  308. package/dist/components/bq-empty-state.js.map +1 -1
  309. package/dist/components/bq-icon.js +1 -8
  310. package/dist/components/bq-input.js +1 -502
  311. package/dist/components/bq-input.js.map +1 -1
  312. package/dist/components/bq-notification.js +1 -381
  313. package/dist/components/bq-notification.js.map +1 -1
  314. package/dist/components/bq-option-group.js +1 -104
  315. package/dist/components/bq-option-group.js.map +1 -1
  316. package/dist/components/bq-option-list.js +1 -8
  317. package/dist/components/bq-option.js +1 -200
  318. package/dist/components/bq-option.js.map +1 -1
  319. package/dist/components/bq-page-title.js +1 -150
  320. package/dist/components/bq-page-title.js.map +1 -1
  321. package/dist/components/bq-panel.js +1 -8
  322. package/dist/components/bq-progress.js +1 -220
  323. package/dist/components/bq-progress.js.map +1 -1
  324. package/dist/components/bq-radio-group.js +1 -457
  325. package/dist/components/bq-radio-group.js.map +1 -1
  326. package/dist/components/bq-radio.js +1 -219
  327. package/dist/components/bq-radio.js.map +1 -1
  328. package/dist/components/bq-select.js +1 -794
  329. package/dist/components/bq-select.js.map +1 -1
  330. package/dist/components/bq-side-menu-item.js +1 -181
  331. package/dist/components/bq-side-menu-item.js.map +1 -1
  332. package/dist/components/bq-side-menu.js +1 -200
  333. package/dist/components/bq-side-menu.js.map +1 -1
  334. package/dist/components/bq-slider.js +1 -443
  335. package/dist/components/bq-slider.js.map +1 -1
  336. package/dist/components/bq-spinner.js +1 -248
  337. package/dist/components/bq-spinner.js.map +1 -1
  338. package/dist/components/bq-status.js +1 -119
  339. package/dist/components/bq-status.js.map +1 -1
  340. package/dist/components/bq-step-item.js +1 -236
  341. package/dist/components/bq-step-item.js.map +1 -1
  342. package/dist/components/bq-steps.js +1 -175
  343. package/dist/components/bq-steps.js.map +1 -1
  344. package/dist/components/bq-switch.js +1 -330
  345. package/dist/components/bq-switch.js.map +1 -1
  346. package/dist/components/bq-tab-group.js +1 -273
  347. package/dist/components/bq-tab-group.js.map +1 -1
  348. package/dist/components/bq-tab.js +1 -248
  349. package/dist/components/bq-tab.js.map +1 -1
  350. package/dist/components/bq-tag.js +1 -8
  351. package/dist/components/bq-textarea.js +1 -393
  352. package/dist/components/bq-textarea.js.map +1 -1
  353. package/dist/components/bq-toast.js +1 -281
  354. package/dist/components/bq-toast.js.map +1 -1
  355. package/dist/components/bq-tooltip.js +1 -8
  356. package/dist/components/index.js +1 -149
  357. package/dist/components/index.js.map +1 -1
  358. package/dist/components/p-4z5qnOaY.js +6 -0
  359. package/dist/components/p-4z5qnOaY.js.map +1 -0
  360. package/dist/components/p-8mobOXPw.js +6 -0
  361. package/dist/components/p-8mobOXPw.js.map +1 -0
  362. package/dist/components/p-B4sM1t6Z.js +1 -8
  363. package/dist/components/p-B4sM1t6Z.js.map +1 -1
  364. package/dist/components/p-BHxv_w2i.js +6 -0
  365. package/dist/components/p-BHxv_w2i.js.map +1 -0
  366. package/dist/components/p-BRMw_HGf.js +1 -8
  367. package/dist/components/p-BRMw_HGf.js.map +1 -1
  368. package/dist/components/p-BRbYDZoo.js +1 -10
  369. package/dist/components/p-BRbYDZoo.js.map +1 -1
  370. package/dist/components/p-BcPwGxIn.js +1 -9
  371. package/dist/components/p-BcPwGxIn.js.map +1 -1
  372. package/dist/components/{p-C8_OKNHL.js → p-Br5pwRAS.js} +2 -221
  373. package/dist/components/p-Br5pwRAS.js.map +1 -0
  374. package/dist/components/p-BsSDkLU5.js +1 -26
  375. package/dist/components/p-BsSDkLU5.js.map +1 -1
  376. package/dist/components/p-C4FuG35Q.js +6 -0
  377. package/dist/components/p-C4FuG35Q.js.map +1 -0
  378. package/dist/components/p-CVw85-WU.js +1 -64
  379. package/dist/components/p-CVw85-WU.js.map +1 -1
  380. package/dist/components/p-CmKvDWiL.js +1 -1782
  381. package/dist/components/p-CmKvDWiL.js.map +1 -1
  382. package/dist/components/p-D1A0LpG_.js +1 -10
  383. package/dist/components/p-D1A0LpG_.js.map +1 -1
  384. package/dist/components/p-D97CZ-cz.js +6 -0
  385. package/dist/components/p-D97CZ-cz.js.map +1 -0
  386. package/dist/components/p-DDVIIUm1.js +6 -0
  387. package/dist/components/p-DDVIIUm1.js.map +1 -0
  388. package/dist/components/p-DSdUt2Ay.js +6 -0
  389. package/dist/components/p-DSdUt2Ay.js.map +1 -0
  390. package/dist/components/p-DdvbF5yL.js +1 -119
  391. package/dist/components/p-DdvbF5yL.js.map +1 -1
  392. package/dist/components/p-Dla7kvqV.js +6 -0
  393. package/dist/components/p-Dla7kvqV.js.map +1 -0
  394. package/dist/components/p-DnkZCdMA.js +1 -8
  395. package/dist/components/p-DnkZCdMA.js.map +1 -1
  396. package/dist/components/{p-YyF6_fWE.js → p-DoX6g7vo.js} +2 -381
  397. package/dist/components/p-DoX6g7vo.js.map +1 -0
  398. package/dist/components/p-Dx-CEPSQ.js +1 -13
  399. package/dist/components/p-Dx-CEPSQ.js.map +1 -1
  400. package/dist/components/p-_RvVpeh2.js +1 -29
  401. package/dist/components/p-_RvVpeh2.js.map +1 -1
  402. package/dist/components/p-lysmVw2n.js +1 -12
  403. package/dist/components/p-lysmVw2n.js.map +1 -1
  404. package/dist/components/p-uqkxeAeG.js +1 -88
  405. package/dist/components/p-uqkxeAeG.js.map +1 -1
  406. package/dist/components/p-zh4P02Kn.js +1 -21
  407. package/dist/components/p-zh4P02Kn.js.map +1 -1
  408. package/dist/custom-elements.json +5184 -5184
  409. package/dist/esm/beeq.js +2 -3
  410. package/dist/esm/beeq.js.map +1 -1
  411. package/dist/esm/bq-accordion-group.entry.js +2 -3
  412. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  413. package/dist/esm/bq-accordion.entry.js +14 -15
  414. package/dist/esm/bq-accordion.entry.js.map +1 -1
  415. package/dist/esm/bq-alert.entry.js +14 -15
  416. package/dist/esm/bq-alert.entry.js.map +1 -1
  417. package/dist/esm/bq-avatar.entry.js +13 -14
  418. package/dist/esm/bq-avatar.entry.js.map +1 -1
  419. package/dist/esm/bq-badge.entry.js +9 -10
  420. package/dist/esm/bq-badge.entry.js.map +1 -1
  421. package/dist/esm/bq-breadcrumb-item.entry.js +2 -3
  422. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  423. package/dist/esm/bq-breadcrumb.entry.js +7 -8
  424. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  425. package/dist/esm/bq-button_2.entry.js +19 -20
  426. package/dist/esm/bq-button_2.entry.js.map +1 -1
  427. package/dist/esm/bq-card.entry.js +7 -8
  428. package/dist/esm/bq-card.entry.js.map +1 -1
  429. package/dist/esm/bq-checkbox.entry.js +5 -6
  430. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  431. package/dist/esm/bq-date-picker.entry.js +20 -21
  432. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  433. package/dist/esm/bq-dialog.entry.js +15 -16
  434. package/dist/esm/bq-dialog.entry.js.map +1 -1
  435. package/dist/esm/bq-divider.entry.js +15 -16
  436. package/dist/esm/bq-divider.entry.js.map +1 -1
  437. package/dist/esm/bq-drawer.entry.js +19 -20
  438. package/dist/esm/bq-drawer.entry.js.map +1 -1
  439. package/dist/esm/bq-dropdown_2.entry.js +5 -6
  440. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  441. package/dist/esm/bq-empty-state.entry.js +26 -27
  442. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  443. package/dist/esm/bq-input.entry.js +22 -23
  444. package/dist/esm/bq-input.entry.js.map +1 -1
  445. package/dist/esm/bq-notification.entry.js +12 -13
  446. package/dist/esm/bq-notification.entry.js.map +1 -1
  447. package/dist/esm/bq-option-group.entry.js +2 -3
  448. package/dist/esm/bq-option-group.entry.js.map +1 -1
  449. package/dist/esm/bq-option-list_2.entry.js +11 -12
  450. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  451. package/dist/esm/bq-option.entry.js +15 -16
  452. package/dist/esm/bq-option.entry.js.map +1 -1
  453. package/dist/esm/bq-page-title.entry.js +11 -12
  454. package/dist/esm/bq-page-title.entry.js.map +1 -1
  455. package/dist/esm/bq-progress.entry.js +13 -14
  456. package/dist/esm/bq-progress.entry.js.map +1 -1
  457. package/dist/esm/bq-radio-group.entry.js +2 -3
  458. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  459. package/dist/esm/bq-radio.entry.js +9 -10
  460. package/dist/esm/bq-radio.entry.js.map +1 -1
  461. package/dist/esm/bq-select.entry.js +28 -29
  462. package/dist/esm/bq-select.entry.js.map +1 -1
  463. package/dist/esm/bq-side-menu-item.entry.js +6 -7
  464. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  465. package/dist/esm/bq-side-menu.entry.js +4 -5
  466. package/dist/esm/bq-side-menu.entry.js.map +1 -1
  467. package/dist/esm/bq-slider.entry.js +23 -24
  468. package/dist/esm/bq-slider.entry.js.map +1 -1
  469. package/dist/esm/bq-spinner.entry.js +10 -11
  470. package/dist/esm/bq-spinner.entry.js.map +1 -1
  471. package/dist/esm/bq-status.entry.js +2 -3
  472. package/dist/esm/bq-status.entry.js.map +1 -1
  473. package/dist/esm/bq-step-item.entry.js +17 -18
  474. package/dist/esm/bq-step-item.entry.js.map +1 -1
  475. package/dist/esm/bq-steps.entry.js +3 -4
  476. package/dist/esm/bq-steps.entry.js.map +1 -1
  477. package/dist/esm/bq-switch.entry.js +10 -11
  478. package/dist/esm/bq-switch.entry.js.map +1 -1
  479. package/dist/esm/bq-tab-group.entry.js +8 -9
  480. package/dist/esm/bq-tab-group.entry.js.map +1 -1
  481. package/dist/esm/bq-tab.entry.js +5 -6
  482. package/dist/esm/bq-tab.entry.js.map +1 -1
  483. package/dist/esm/bq-textarea.entry.js +16 -17
  484. package/dist/esm/bq-textarea.entry.js.map +1 -1
  485. package/dist/esm/bq-toast.entry.js +2 -3
  486. package/dist/esm/bq-toast.entry.js.map +1 -1
  487. package/dist/esm/bq-tooltip.entry.js +9 -10
  488. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  489. package/dist/esm/{index-D0hQxkOP.js → index-XbB3xSTR.js} +67 -23
  490. package/dist/esm/index-XbB3xSTR.js.map +1 -0
  491. package/dist/esm/loader.js +2 -3
  492. package/dist/esm/loader.js.map +1 -1
  493. package/dist/hydrate/index.js +413 -417
  494. package/dist/hydrate/index.mjs +413 -417
  495. package/dist/stencil.config.js +1 -1
  496. package/dist/stencil.config.js.map +1 -1
  497. package/dist/types/components/accordion/bq-accordion.d.ts +1 -1
  498. package/dist/types/components/accordion-group/bq-accordion-group.d.ts +1 -1
  499. package/dist/types/components/alert/bq-alert.d.ts +1 -1
  500. package/dist/types/components/avatar/bq-avatar.d.ts +1 -1
  501. package/dist/types/components/badge/bq-badge.d.ts +1 -1
  502. package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +1 -1
  503. package/dist/types/components/breadcrumb-item/bq-breadcrumb-item.d.ts +1 -1
  504. package/dist/types/components/button/bq-button.d.ts +1 -1
  505. package/dist/types/components/card/bq-card.d.ts +1 -1
  506. package/dist/types/components/checkbox/bq-checkbox.d.ts +1 -1
  507. package/dist/types/components/date-picker/bq-date-picker.d.ts +1 -1
  508. package/dist/types/components/dialog/bq-dialog.d.ts +1 -1
  509. package/dist/types/components/divider/bq-divider.d.ts +1 -1
  510. package/dist/types/components/drawer/bq-drawer.d.ts +1 -1
  511. package/dist/types/components/dropdown/bq-dropdown.d.ts +1 -1
  512. package/dist/types/components/empty-state/bq-empty-state.d.ts +1 -1
  513. package/dist/types/components/icon/bq-icon.d.ts +1 -1
  514. package/dist/types/components/input/bq-input.d.ts +1 -1
  515. package/dist/types/components/notification/bq-notification.d.ts +1 -1
  516. package/dist/types/components/option/bq-option.d.ts +1 -1
  517. package/dist/types/components/option-group/bq-option-group.d.ts +1 -1
  518. package/dist/types/components/option-list/bq-option-list.d.ts +1 -1
  519. package/dist/types/components/page-title/bq-page-title.d.ts +1 -1
  520. package/dist/types/components/panel/bq-panel.d.ts +1 -1
  521. package/dist/types/components/progress/bq-progress.d.ts +1 -1
  522. package/dist/types/components/radio/bq-radio.d.ts +1 -1
  523. package/dist/types/components/radio-group/bq-radio-group.d.ts +1 -1
  524. package/dist/types/components/select/bq-select.d.ts +1 -1
  525. package/dist/types/components/side-menu/bq-side-menu.d.ts +1 -1
  526. package/dist/types/components/side-menu-item/bq-side-menu-item.d.ts +1 -1
  527. package/dist/types/components/slider/bq-slider.d.ts +1 -1
  528. package/dist/types/components/spinner/bq-spinner.d.ts +1 -1
  529. package/dist/types/components/status/bq-status.d.ts +1 -1
  530. package/dist/types/components/step-item/bq-step-item.d.ts +1 -1
  531. package/dist/types/components/steps/bq-steps.d.ts +1 -1
  532. package/dist/types/components/switch/bq-switch.d.ts +1 -1
  533. package/dist/types/components/tab/bq-tab.d.ts +1 -1
  534. package/dist/types/components/tab-group/bq-tab-group.d.ts +1 -1
  535. package/dist/types/components/tag/bq-tag.d.ts +1 -1
  536. package/dist/types/components/textarea/bq-textarea.d.ts +1 -1
  537. package/dist/types/components/toast/bq-toast.d.ts +1 -1
  538. package/dist/types/components/tooltip/bq-tooltip.d.ts +1 -1
  539. package/package.json +1 -1
  540. package/dist/beeq/p-1011ae42.entry.js.map +0 -1
  541. package/dist/beeq/p-110c262d.entry.js +0 -173
  542. package/dist/beeq/p-110c262d.entry.js.map +0 -1
  543. package/dist/beeq/p-11671252.entry.js.map +0 -1
  544. package/dist/beeq/p-11fcb99b.entry.js +0 -281
  545. package/dist/beeq/p-11fcb99b.entry.js.map +0 -1
  546. package/dist/beeq/p-1aba3eec.entry.js.map +0 -1
  547. package/dist/beeq/p-20162842.entry.js +0 -151
  548. package/dist/beeq/p-20162842.entry.js.map +0 -1
  549. package/dist/beeq/p-3a4c4de9.entry.js +0 -188
  550. package/dist/beeq/p-3a4c4de9.entry.js.map +0 -1
  551. package/dist/beeq/p-426fd908.entry.js.map +0 -1
  552. package/dist/beeq/p-47571092.entry.js +0 -289
  553. package/dist/beeq/p-47571092.entry.js.map +0 -1
  554. package/dist/beeq/p-49e90223.entry.js +0 -86
  555. package/dist/beeq/p-49e90223.entry.js.map +0 -1
  556. package/dist/beeq/p-4b00a155.entry.js +0 -747
  557. package/dist/beeq/p-4b00a155.entry.js.map +0 -1
  558. package/dist/beeq/p-54ddd09f.entry.js +0 -392
  559. package/dist/beeq/p-54ddd09f.entry.js.map +0 -1
  560. package/dist/beeq/p-6b68123f.entry.js.map +0 -1
  561. package/dist/beeq/p-6d708caf.entry.js +0 -339
  562. package/dist/beeq/p-6d708caf.entry.js.map +0 -1
  563. package/dist/beeq/p-70607940.entry.js +0 -174
  564. package/dist/beeq/p-70607940.entry.js.map +0 -1
  565. package/dist/beeq/p-72c376a9.entry.js +0 -165
  566. package/dist/beeq/p-72c376a9.entry.js.map +0 -1
  567. package/dist/beeq/p-78bbd845.entry.js +0 -109
  568. package/dist/beeq/p-78bbd845.entry.js.map +0 -1
  569. package/dist/beeq/p-8012f01d.entry.js +0 -556
  570. package/dist/beeq/p-8012f01d.entry.js.map +0 -1
  571. package/dist/beeq/p-8b5934a3.entry.js.map +0 -1
  572. package/dist/beeq/p-94c2081a.entry.js +0 -681
  573. package/dist/beeq/p-94c2081a.entry.js.map +0 -1
  574. package/dist/beeq/p-95979cb0.entry.js +0 -289
  575. package/dist/beeq/p-95979cb0.entry.js.map +0 -1
  576. package/dist/beeq/p-978b2249.entry.js +0 -196
  577. package/dist/beeq/p-978b2249.entry.js.map +0 -1
  578. package/dist/beeq/p-9a78587d.entry.js.map +0 -1
  579. package/dist/beeq/p-BtYhUEAn.js +0 -9
  580. package/dist/beeq/p-BtYhUEAn.js.map +0 -1
  581. package/dist/beeq/p-C33fRBEf.js +0 -156
  582. package/dist/beeq/p-C33fRBEf.js.map +0 -1
  583. package/dist/beeq/p-D0hQxkOP.js +0 -2816
  584. package/dist/beeq/p-D0hQxkOP.js.map +0 -1
  585. package/dist/beeq/p-ac7cd72b.entry.js +0 -322
  586. package/dist/beeq/p-ac7cd72b.entry.js.map +0 -1
  587. package/dist/beeq/p-ae85a23a.entry.js +0 -408
  588. package/dist/beeq/p-ae85a23a.entry.js.map +0 -1
  589. package/dist/beeq/p-b0f9a0cb.entry.js +0 -296
  590. package/dist/beeq/p-b0f9a0cb.entry.js.map +0 -1
  591. package/dist/beeq/p-b194e120.entry.js +0 -293
  592. package/dist/beeq/p-b194e120.entry.js.map +0 -1
  593. package/dist/beeq/p-b2858324.entry.js +0 -210
  594. package/dist/beeq/p-b2858324.entry.js.map +0 -1
  595. package/dist/beeq/p-c34fc2c7.entry.js +0 -351
  596. package/dist/beeq/p-c34fc2c7.entry.js.map +0 -1
  597. package/dist/beeq/p-c630a8b8.entry.js +0 -442
  598. package/dist/beeq/p-c630a8b8.entry.js.map +0 -1
  599. package/dist/beeq/p-cb9b1edc.entry.js +0 -232
  600. package/dist/beeq/p-cb9b1edc.entry.js.map +0 -1
  601. package/dist/beeq/p-cc6b349e.entry.js +0 -172
  602. package/dist/beeq/p-cc6b349e.entry.js.map +0 -1
  603. package/dist/beeq/p-d0edfaa5.entry.js +0 -388
  604. package/dist/beeq/p-d0edfaa5.entry.js.map +0 -1
  605. package/dist/beeq/p-db09cc1e.entry.js.map +0 -1
  606. package/dist/beeq/p-f6d82c39.entry.js +0 -206
  607. package/dist/beeq/p-f6d82c39.entry.js.map +0 -1
  608. package/dist/beeq/p-f83010e9.entry.js +0 -118
  609. package/dist/beeq/p-f83010e9.entry.js.map +0 -1
  610. package/dist/beeq/p-f97c679f.entry.js +0 -233
  611. package/dist/beeq/p-f97c679f.entry.js.map +0 -1
  612. package/dist/beeq/p-ff327b98.entry.js.map +0 -1
  613. package/dist/beeq/p-ff73f344.entry.js +0 -396
  614. package/dist/beeq/p-ff73f344.entry.js.map +0 -1
  615. package/dist/cjs/app-globals-BY_z0SzA.js +0 -12
  616. package/dist/cjs/app-globals-BY_z0SzA.js.map +0 -1
  617. package/dist/cjs/index-BwvwUnfB.js.map +0 -1
  618. package/dist/cjs/index-C09ZVaB4.js +0 -154
  619. package/dist/cjs/index-C09ZVaB4.js.map +0 -1
  620. package/dist/components/p-C8_OKNHL.js.map +0 -1
  621. package/dist/components/p-C97BzPa8.js +0 -177
  622. package/dist/components/p-C97BzPa8.js.map +0 -1
  623. package/dist/components/p-CMejKLsB.js +0 -248
  624. package/dist/components/p-CMejKLsB.js.map +0 -1
  625. package/dist/components/p-DBPU_cIr.js +0 -338
  626. package/dist/components/p-DBPU_cIr.js.map +0 -1
  627. package/dist/components/p-DDCN9O42.js +0 -2669
  628. package/dist/components/p-DDCN9O42.js.map +0 -1
  629. package/dist/components/p-DHhUeR-_.js +0 -377
  630. package/dist/components/p-DHhUeR-_.js.map +0 -1
  631. package/dist/components/p-DSqLegVR.js +0 -100
  632. package/dist/components/p-DSqLegVR.js.map +0 -1
  633. package/dist/components/p-YyF6_fWE.js.map +0 -1
  634. package/dist/components/p-qOL6hl5s.js +0 -298
  635. package/dist/components/p-qOL6hl5s.js.map +0 -1
  636. package/dist/esm/app-globals-BtYhUEAn.js +0 -10
  637. package/dist/esm/app-globals-BtYhUEAn.js.map +0 -1
  638. package/dist/esm/index-C33fRBEf.js +0 -151
  639. package/dist/esm/index-C33fRBEf.js.map +0 -1
  640. package/dist/esm/index-D0hQxkOP.js.map +0 -1
@@ -2,1786 +2,5 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- /**
6
- * Custom positioning reference element.
7
- * @see https://floating-ui.com/docs/virtual-elements
8
- */
9
- const t = [ "top", "right", "bottom", "left" ];
10
-
11
- const e = Math.min;
12
-
13
- const n = Math.max;
14
-
15
- const o = Math.round;
16
-
17
- const i = Math.floor;
18
-
19
- const createCoords = t => ({
20
- x: t,
21
- y: t
22
- });
23
-
24
- const s = {
25
- left: "right",
26
- right: "left",
27
- bottom: "top",
28
- top: "bottom"
29
- };
30
-
31
- const r = {
32
- start: "end",
33
- end: "start"
34
- };
35
-
36
- function clamp(t, o, i) {
37
- return n(t, e(o, i));
38
- }
39
-
40
- function evaluate(t, e) {
41
- return typeof t === "function" ? t(e) : t;
42
- }
43
-
44
- function getSide(t) {
45
- return t.split("-")[0];
46
- }
47
-
48
- function getAlignment(t) {
49
- return t.split("-")[1];
50
- }
51
-
52
- function getOppositeAxis(t) {
53
- return t === "x" ? "y" : "x";
54
- }
55
-
56
- function getAxisLength(t) {
57
- return t === "y" ? "height" : "width";
58
- }
59
-
60
- const c = new Set([ "top", "bottom" ]);
61
-
62
- function getSideAxis(t) {
63
- return c.has(getSide(t)) ? "y" : "x";
64
- }
65
-
66
- function getAlignmentAxis(t) {
67
- return getOppositeAxis(getSideAxis(t));
68
- }
69
-
70
- function getAlignmentSides(t, e, n) {
71
- if (n === void 0) {
72
- n = false;
73
- }
74
- const o = getAlignment(t);
75
- const i = getAlignmentAxis(t);
76
- const s = getAxisLength(i);
77
- let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
78
- if (e.reference[s] > e.floating[s]) {
79
- r = getOppositePlacement(r);
80
- }
81
- return [ r, getOppositePlacement(r) ];
82
- }
83
-
84
- function getExpandedPlacements(t) {
85
- const e = getOppositePlacement(t);
86
- return [ getOppositeAlignmentPlacement(t), e, getOppositeAlignmentPlacement(e) ];
87
- }
88
-
89
- function getOppositeAlignmentPlacement(t) {
90
- return t.replace(/start|end/g, (t => r[t]));
91
- }
92
-
93
- const l = [ "left", "right" ];
94
-
95
- const a = [ "right", "left" ];
96
-
97
- const f = [ "top", "bottom" ];
98
-
99
- const u = [ "bottom", "top" ];
100
-
101
- function getSideList(t, e, n) {
102
- switch (t) {
103
- case "top":
104
- case "bottom":
105
- if (n) return e ? a : l;
106
- return e ? l : a;
107
-
108
- case "left":
109
- case "right":
110
- return e ? f : u;
111
-
112
- default:
113
- return [];
114
- }
115
- }
116
-
117
- function getOppositeAxisPlacements(t, e, n, o) {
118
- const i = getAlignment(t);
119
- let s = getSideList(getSide(t), n === "start", o);
120
- if (i) {
121
- s = s.map((t => t + "-" + i));
122
- if (e) {
123
- s = s.concat(s.map(getOppositeAlignmentPlacement));
124
- }
125
- }
126
- return s;
127
- }
128
-
129
- function getOppositePlacement(t) {
130
- return t.replace(/left|right|bottom|top/g, (t => s[t]));
131
- }
132
-
133
- function expandPaddingObject(t) {
134
- return {
135
- top: 0,
136
- right: 0,
137
- bottom: 0,
138
- left: 0,
139
- ...t
140
- };
141
- }
142
-
143
- function getPaddingObject(t) {
144
- return typeof t !== "number" ? expandPaddingObject(t) : {
145
- top: t,
146
- right: t,
147
- bottom: t,
148
- left: t
149
- };
150
- }
151
-
152
- function rectToClientRect(t) {
153
- const {x: e, y: n, width: o, height: i} = t;
154
- return {
155
- width: o,
156
- height: i,
157
- top: n,
158
- left: e,
159
- right: e + o,
160
- bottom: n + i,
161
- x: e,
162
- y: n
163
- };
164
- }
165
-
166
- function computeCoordsFromPlacement(t, e, n) {
167
- let {reference: o, floating: i} = t;
168
- const s = getSideAxis(e);
169
- const r = getAlignmentAxis(e);
170
- const c = getAxisLength(r);
171
- const l = getSide(e);
172
- const a = s === "y";
173
- const f = o.x + o.width / 2 - i.width / 2;
174
- const u = o.y + o.height / 2 - i.height / 2;
175
- const g = o[c] / 2 - i[c] / 2;
176
- let d;
177
- switch (l) {
178
- case "top":
179
- d = {
180
- x: f,
181
- y: o.y - i.height
182
- };
183
- break;
184
-
185
- case "bottom":
186
- d = {
187
- x: f,
188
- y: o.y + o.height
189
- };
190
- break;
191
-
192
- case "right":
193
- d = {
194
- x: o.x + o.width,
195
- y: u
196
- };
197
- break;
198
-
199
- case "left":
200
- d = {
201
- x: o.x - i.width,
202
- y: u
203
- };
204
- break;
205
-
206
- default:
207
- d = {
208
- x: o.x,
209
- y: o.y
210
- };
211
- }
212
- switch (getAlignment(e)) {
213
- case "start":
214
- d[r] -= g * (n && a ? -1 : 1);
215
- break;
216
-
217
- case "end":
218
- d[r] += g * (n && a ? -1 : 1);
219
- break;
220
- }
221
- return d;
222
- }
223
-
224
- /**
225
- * Resolves with an object of overflow side offsets that determine how much the
226
- * element is overflowing a given clipping boundary on each side.
227
- * - positive = overflowing the boundary by that number of pixels
228
- * - negative = how many pixels left before it will overflow
229
- * - 0 = lies flush with the boundary
230
- * @see https://floating-ui.com/docs/detectOverflow
231
- */ async function detectOverflow(t, e) {
232
- var n;
233
- if (e === void 0) {
234
- e = {};
235
- }
236
- const {x: o, y: i, platform: s, rects: r, elements: c, strategy: l} = t;
237
- const {boundary: a = "clippingAncestors", rootBoundary: f = "viewport", elementContext: u = "floating", altBoundary: g = false, padding: d = 0} = evaluate(e, t);
238
- const m = getPaddingObject(d);
239
- const p = u === "floating" ? "reference" : "floating";
240
- const h = c[g ? p : u];
241
- const w = rectToClientRect(await s.getClippingRect({
242
- element: ((n = await (s.isElement == null ? void 0 : s.isElement(h))) != null ? n : true) ? h : h.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
243
- boundary: a,
244
- rootBoundary: f,
245
- strategy: l
246
- }));
247
- const y = u === "floating" ? {
248
- x: o,
249
- y: i,
250
- width: r.floating.width,
251
- height: r.floating.height
252
- } : r.reference;
253
- const v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating));
254
- const x = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
255
- x: 1,
256
- y: 1
257
- } : {
258
- x: 1,
259
- y: 1
260
- };
261
- const b = rectToClientRect(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
262
- elements: c,
263
- rect: y,
264
- offsetParent: v,
265
- strategy: l
266
- }) : y);
267
- return {
268
- top: (w.top - b.top + m.top) / x.y,
269
- bottom: (b.bottom - w.bottom + m.bottom) / x.y,
270
- left: (w.left - b.left + m.left) / x.x,
271
- right: (b.right - w.right + m.right) / x.x
272
- };
273
- }
274
-
275
- /**
276
- * Computes the `x` and `y` coordinates that will place the floating element
277
- * next to a given reference element.
278
- *
279
- * This export does not have any `platform` interface logic. You will need to
280
- * write one for the platform you are using Floating UI with.
281
- */ const computePosition$1 = async (t, e, n) => {
282
- const {placement: o = "bottom", strategy: i = "absolute", middleware: s = [], platform: r} = n;
283
- const c = s.filter(Boolean);
284
- const l = await (r.isRTL == null ? void 0 : r.isRTL(e));
285
- let a = await r.getElementRects({
286
- reference: t,
287
- floating: e,
288
- strategy: i
289
- });
290
- let {x: f, y: u} = computeCoordsFromPlacement(a, o, l);
291
- let g = o;
292
- let d = {};
293
- let m = 0;
294
- for (let n = 0; n < c.length; n++) {
295
- var p;
296
- const {name: s, fn: h} = c[n];
297
- const {x: w, y, data: v, reset: x} = await h({
298
- x: f,
299
- y: u,
300
- initialPlacement: o,
301
- placement: g,
302
- strategy: i,
303
- middlewareData: d,
304
- rects: a,
305
- platform: {
306
- ...r,
307
- detectOverflow: (p = r.detectOverflow) != null ? p : detectOverflow
308
- },
309
- elements: {
310
- reference: t,
311
- floating: e
312
- }
313
- });
314
- f = w != null ? w : f;
315
- u = y != null ? y : u;
316
- d = {
317
- ...d,
318
- [s]: {
319
- ...d[s],
320
- ...v
321
- }
322
- };
323
- if (x && m <= 50) {
324
- m++;
325
- if (typeof x === "object") {
326
- if (x.placement) {
327
- g = x.placement;
328
- }
329
- if (x.rects) {
330
- a = x.rects === true ? await r.getElementRects({
331
- reference: t,
332
- floating: e,
333
- strategy: i
334
- }) : x.rects;
335
- }
336
- ({x: f, y: u} = computeCoordsFromPlacement(a, g, l));
337
- }
338
- n = -1;
339
- }
340
- }
341
- return {
342
- x: f,
343
- y: u,
344
- placement: g,
345
- strategy: i,
346
- middlewareData: d
347
- };
348
- };
349
-
350
- /**
351
- * Provides data to position an inner element of the floating element so that it
352
- * appears centered to the reference element.
353
- * @see https://floating-ui.com/docs/arrow
354
- */ const arrow$1 = t => ({
355
- name: "arrow",
356
- options: t,
357
- async fn(n) {
358
- const {x: o, y: i, placement: s, rects: r, platform: c, elements: l, middlewareData: a} = n;
359
- // Since `element` is required, we don't Partial<> the type.
360
- const {element: f, padding: u = 0} = evaluate(t, n) || {};
361
- if (f == null) {
362
- return {};
363
- }
364
- const g = getPaddingObject(u);
365
- const d = {
366
- x: o,
367
- y: i
368
- };
369
- const m = getAlignmentAxis(s);
370
- const p = getAxisLength(m);
371
- const h = await c.getDimensions(f);
372
- const w = m === "y";
373
- const y = w ? "top" : "left";
374
- const v = w ? "bottom" : "right";
375
- const x = w ? "clientHeight" : "clientWidth";
376
- const b = r.reference[p] + r.reference[m] - d[m] - r.floating[p];
377
- const A = d[m] - r.reference[m];
378
- const S = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(f));
379
- let O = S ? S[x] : 0;
380
- // DOM platform can return `window` as the `offsetParent`.
381
- if (!O || !await (c.isElement == null ? void 0 : c.isElement(S))) {
382
- O = l.floating[x] || r.floating[p];
383
- }
384
- const C = b / 2 - A / 2;
385
- // If the padding is large enough that it causes the arrow to no longer be
386
- // centered, modify the padding so that it is centered.
387
- const E = O / 2 - h[p] / 2 - 1;
388
- const R = e(g[y], E);
389
- const P = e(g[v], E);
390
- // Make sure the arrow doesn't overflow the floating element if the center
391
- // point is outside the floating element's bounds.
392
- const T = R;
393
- const L = O - h[p] - P;
394
- const N = O / 2 - h[p] / 2 + C;
395
- const W = clamp(T, N, L);
396
- // If the reference is small enough that the arrow's padding causes it to
397
- // to point to nothing for an aligned placement, adjust the offset of the
398
- // floating element itself. To ensure `shift()` continues to take action,
399
- // a single reset is performed when this is true.
400
- const F = !a.arrow && getAlignment(s) != null && N !== W && r.reference[p] / 2 - (N < T ? R : P) - h[p] / 2 < 0;
401
- const B = F ? N < T ? N - T : N - L : 0;
402
- return {
403
- [m]: d[m] + B,
404
- data: {
405
- [m]: W,
406
- centerOffset: N - W - B,
407
- ...F && {
408
- alignmentOffset: B
409
- }
410
- },
411
- reset: F
412
- };
413
- }
414
- })
415
- /**
416
- * Optimizes the visibility of the floating element by flipping the `placement`
417
- * in order to keep it in view when the preferred placement(s) will overflow the
418
- * clipping boundary. Alternative to `autoPlacement`.
419
- * @see https://floating-ui.com/docs/flip
420
- */;
421
-
422
- const flip$1 = function(t) {
423
- if (t === void 0) {
424
- t = {};
425
- }
426
- return {
427
- name: "flip",
428
- options: t,
429
- async fn(e) {
430
- var n, o;
431
- const {placement: i, middlewareData: s, rects: r, initialPlacement: c, platform: l, elements: a} = e;
432
- const {mainAxis: f = true, crossAxis: u = true, fallbackPlacements: g, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: p = true, ...h} = evaluate(t, e);
433
- // If a reset by the arrow was caused due to an alignment offset being
434
- // added, we should skip any logic now since `flip()` has already done its
435
- // work.
436
- // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
437
- if ((n = s.arrow) != null && n.alignmentOffset) {
438
- return {};
439
- }
440
- const w = getSide(i);
441
- const y = getSideAxis(c);
442
- const v = getSide(c) === c;
443
- const x = await (l.isRTL == null ? void 0 : l.isRTL(a.floating));
444
- const b = g || (v || !p ? [ getOppositePlacement(c) ] : getExpandedPlacements(c));
445
- const A = m !== "none";
446
- if (!g && A) {
447
- b.push(...getOppositeAxisPlacements(c, p, m, x));
448
- }
449
- const S = [ c, ...b ];
450
- const O = await l.detectOverflow(e, h);
451
- const C = [];
452
- let E = ((o = s.flip) == null ? void 0 : o.overflows) || [];
453
- if (f) {
454
- C.push(O[w]);
455
- }
456
- if (u) {
457
- const t = getAlignmentSides(i, r, x);
458
- C.push(O[t[0]], O[t[1]]);
459
- }
460
- E = [ ...E, {
461
- placement: i,
462
- overflows: C
463
- } ];
464
- // One or more sides is overflowing.
465
- if (!C.every((t => t <= 0))) {
466
- var R, P;
467
- const t = (((R = s.flip) == null ? void 0 : R.index) || 0) + 1;
468
- const e = S[t];
469
- if (e) {
470
- const n = u === "alignment" ? y !== getSideAxis(e) : false;
471
- if (!n ||
472
- // We leave the current main axis only if every placement on that axis
473
- // overflows the main axis.
474
- E.every((t => getSideAxis(t.placement) === y ? t.overflows[0] > 0 : true))) {
475
- // Try next placement and re-run the lifecycle.
476
- return {
477
- data: {
478
- index: t,
479
- overflows: E
480
- },
481
- reset: {
482
- placement: e
483
- }
484
- };
485
- }
486
- }
487
- // First, find the candidates that fit on the mainAxis side of overflow,
488
- // then find the placement that fits the best on the main crossAxis side.
489
- let n = (P = E.filter((t => t.overflows[0] <= 0)).sort(((t, e) => t.overflows[1] - e.overflows[1]))[0]) == null ? void 0 : P.placement;
490
- // Otherwise fallback.
491
- if (!n) {
492
- switch (d) {
493
- case "bestFit":
494
- {
495
- var T;
496
- const t = (T = E.filter((t => {
497
- if (A) {
498
- const e = getSideAxis(t.placement);
499
- return e === y ||
500
- // Create a bias to the `y` side axis due to horizontal
501
- // reading directions favoring greater width.
502
- e === "y";
503
- }
504
- return true;
505
- })).map((t => [ t.placement, t.overflows.filter((t => t > 0)).reduce(((t, e) => t + e), 0) ])).sort(((t, e) => t[1] - e[1]))[0]) == null ? void 0 : T[0];
506
- if (t) {
507
- n = t;
508
- }
509
- break;
510
- }
511
-
512
- case "initialPlacement":
513
- n = c;
514
- break;
515
- }
516
- }
517
- if (i !== n) {
518
- return {
519
- reset: {
520
- placement: n
521
- }
522
- };
523
- }
524
- }
525
- return {};
526
- }
527
- };
528
- };
529
-
530
- function getSideOffsets(t, e) {
531
- return {
532
- top: t.top - e.height,
533
- right: t.right - e.width,
534
- bottom: t.bottom - e.height,
535
- left: t.left - e.width
536
- };
537
- }
538
-
539
- function isAnySideFullyClipped(e) {
540
- return t.some((t => e[t] >= 0));
541
- }
542
-
543
- /**
544
- * Provides data to hide the floating element in applicable situations, such as
545
- * when it is not in the same clipping context as the reference element.
546
- * @see https://floating-ui.com/docs/hide
547
- */ const hide$1 = function(t) {
548
- if (t === void 0) {
549
- t = {};
550
- }
551
- return {
552
- name: "hide",
553
- options: t,
554
- async fn(e) {
555
- const {rects: n, platform: o} = e;
556
- const {strategy: i = "referenceHidden", ...s} = evaluate(t, e);
557
- switch (i) {
558
- case "referenceHidden":
559
- {
560
- const t = await o.detectOverflow(e, {
561
- ...s,
562
- elementContext: "reference"
563
- });
564
- const i = getSideOffsets(t, n.reference);
565
- return {
566
- data: {
567
- referenceHiddenOffsets: i,
568
- referenceHidden: isAnySideFullyClipped(i)
569
- }
570
- };
571
- }
572
-
573
- case "escaped":
574
- {
575
- const t = await o.detectOverflow(e, {
576
- ...s,
577
- altBoundary: true
578
- });
579
- const i = getSideOffsets(t, n.floating);
580
- return {
581
- data: {
582
- escapedOffsets: i,
583
- escaped: isAnySideFullyClipped(i)
584
- }
585
- };
586
- }
587
-
588
- default:
589
- {
590
- return {};
591
- }
592
- }
593
- }
594
- };
595
- };
596
-
597
- const g = new Set([ "left", "top" ]);
598
-
599
- // For type backwards-compatibility, the `OffsetOptions` type was also
600
- // Derivable.
601
- async function convertValueToCoords(t, e) {
602
- const {placement: n, platform: o, elements: i} = t;
603
- const s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating));
604
- const r = getSide(n);
605
- const c = getAlignment(n);
606
- const l = getSideAxis(n) === "y";
607
- const a = g.has(r) ? -1 : 1;
608
- const f = s && l ? -1 : 1;
609
- const u = evaluate(e, t);
610
- // eslint-disable-next-line prefer-const
611
- let {mainAxis: d, crossAxis: m, alignmentAxis: p} = typeof u === "number" ? {
612
- mainAxis: u,
613
- crossAxis: 0,
614
- alignmentAxis: null
615
- } : {
616
- mainAxis: u.mainAxis || 0,
617
- crossAxis: u.crossAxis || 0,
618
- alignmentAxis: u.alignmentAxis
619
- };
620
- if (c && typeof p === "number") {
621
- m = c === "end" ? p * -1 : p;
622
- }
623
- return l ? {
624
- x: m * f,
625
- y: d * a
626
- } : {
627
- x: d * a,
628
- y: m * f
629
- };
630
- }
631
-
632
- /**
633
- * Modifies the placement by translating the floating element along the
634
- * specified axes.
635
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
636
- * object may be passed.
637
- * @see https://floating-ui.com/docs/offset
638
- */ const offset$1 = function(t) {
639
- if (t === void 0) {
640
- t = 0;
641
- }
642
- return {
643
- name: "offset",
644
- options: t,
645
- async fn(e) {
646
- var n, o;
647
- const {x: i, y: s, placement: r, middlewareData: c} = e;
648
- const l = await convertValueToCoords(e, t);
649
- // If the placement is the same and the arrow caused an alignment offset
650
- // then we don't need to change the positioning coordinates.
651
- if (r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset) {
652
- return {};
653
- }
654
- return {
655
- x: i + l.x,
656
- y: s + l.y,
657
- data: {
658
- ...l,
659
- placement: r
660
- }
661
- };
662
- }
663
- };
664
- };
665
-
666
- /**
667
- * Optimizes the visibility of the floating element by shifting it in order to
668
- * keep it in view when it will overflow the clipping boundary.
669
- * @see https://floating-ui.com/docs/shift
670
- */ const shift$1 = function(t) {
671
- if (t === void 0) {
672
- t = {};
673
- }
674
- return {
675
- name: "shift",
676
- options: t,
677
- async fn(e) {
678
- const {x: n, y: o, placement: i, platform: s} = e;
679
- const {mainAxis: r = true, crossAxis: c = false, limiter: l = {
680
- fn: t => {
681
- let {x: e, y: n} = t;
682
- return {
683
- x: e,
684
- y: n
685
- };
686
- }
687
- }, ...a} = evaluate(t, e);
688
- const f = {
689
- x: n,
690
- y: o
691
- };
692
- const u = await s.detectOverflow(e, a);
693
- const g = getSideAxis(getSide(i));
694
- const d = getOppositeAxis(g);
695
- let m = f[d];
696
- let p = f[g];
697
- if (r) {
698
- const t = d === "y" ? "top" : "left";
699
- const e = d === "y" ? "bottom" : "right";
700
- const n = m + u[t];
701
- const o = m - u[e];
702
- m = clamp(n, m, o);
703
- }
704
- if (c) {
705
- const t = g === "y" ? "top" : "left";
706
- const e = g === "y" ? "bottom" : "right";
707
- const n = p + u[t];
708
- const o = p - u[e];
709
- p = clamp(n, p, o);
710
- }
711
- const h = l.fn({
712
- ...e,
713
- [d]: m,
714
- [g]: p
715
- });
716
- return {
717
- ...h,
718
- data: {
719
- x: h.x - n,
720
- y: h.y - o,
721
- enabled: {
722
- [d]: r,
723
- [g]: c
724
- }
725
- }
726
- };
727
- }
728
- };
729
- };
730
-
731
- /**
732
- * Provides data that allows you to change the size of the floating element —
733
- * for instance, prevent it from overflowing the clipping boundary or match the
734
- * width of the reference element.
735
- * @see https://floating-ui.com/docs/size
736
- */ const size$1 = function(t) {
737
- if (t === void 0) {
738
- t = {};
739
- }
740
- return {
741
- name: "size",
742
- options: t,
743
- async fn(o) {
744
- var i, s;
745
- const {placement: r, rects: c, platform: l, elements: a} = o;
746
- const {apply: f = () => {}, ...u} = evaluate(t, o);
747
- const g = await l.detectOverflow(o, u);
748
- const d = getSide(r);
749
- const m = getAlignment(r);
750
- const p = getSideAxis(r) === "y";
751
- const {width: h, height: w} = c.floating;
752
- let y;
753
- let v;
754
- if (d === "top" || d === "bottom") {
755
- y = d;
756
- v = m === (await (l.isRTL == null ? void 0 : l.isRTL(a.floating)) ? "start" : "end") ? "left" : "right";
757
- } else {
758
- v = d;
759
- y = m === "end" ? "top" : "bottom";
760
- }
761
- const x = w - g.top - g.bottom;
762
- const b = h - g.left - g.right;
763
- const A = e(w - g[y], x);
764
- const S = e(h - g[v], b);
765
- const O = !o.middlewareData.shift;
766
- let C = A;
767
- let E = S;
768
- if ((i = o.middlewareData.shift) != null && i.enabled.x) {
769
- E = b;
770
- }
771
- if ((s = o.middlewareData.shift) != null && s.enabled.y) {
772
- C = x;
773
- }
774
- if (O && !m) {
775
- const t = n(g.left, 0);
776
- const e = n(g.right, 0);
777
- const o = n(g.top, 0);
778
- const i = n(g.bottom, 0);
779
- if (p) {
780
- E = h - 2 * (t !== 0 || e !== 0 ? t + e : n(g.left, g.right));
781
- } else {
782
- C = w - 2 * (o !== 0 || i !== 0 ? o + i : n(g.top, g.bottom));
783
- }
784
- }
785
- await f({
786
- ...o,
787
- availableWidth: E,
788
- availableHeight: C
789
- });
790
- const R = await l.getDimensions(a.floating);
791
- if (h !== R.width || w !== R.height) {
792
- return {
793
- reset: {
794
- rects: true
795
- }
796
- };
797
- }
798
- return {};
799
- }
800
- };
801
- };
802
-
803
- function hasWindow() {
804
- return typeof window !== "undefined";
805
- }
806
-
807
- function getNodeName(t) {
808
- if (isNode(t)) {
809
- return (t.nodeName || "").toLowerCase();
810
- }
811
- // Mocked nodes in testing environments may not be instances of Node. By
812
- // returning `#document` an infinite loop won't occur.
813
- // https://github.com/floating-ui/floating-ui/issues/2317
814
- return "#document";
815
- }
816
-
817
- function getWindow(t) {
818
- var e;
819
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
820
- }
821
-
822
- function getDocumentElement(t) {
823
- var e;
824
- return (e = (isNode(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
825
- }
826
-
827
- function isNode(t) {
828
- if (!hasWindow()) {
829
- return false;
830
- }
831
- return t instanceof Node || t instanceof getWindow(t).Node;
832
- }
833
-
834
- function isElement(t) {
835
- if (!hasWindow()) {
836
- return false;
837
- }
838
- return t instanceof Element || t instanceof getWindow(t).Element;
839
- }
840
-
841
- function isHTMLElement(t) {
842
- if (!hasWindow()) {
843
- return false;
844
- }
845
- return t instanceof HTMLElement || t instanceof getWindow(t).HTMLElement;
846
- }
847
-
848
- function isShadowRoot(t) {
849
- if (!hasWindow() || typeof ShadowRoot === "undefined") {
850
- return false;
851
- }
852
- return t instanceof ShadowRoot || t instanceof getWindow(t).ShadowRoot;
853
- }
854
-
855
- const d = new Set([ "inline", "contents" ]);
856
-
857
- function isOverflowElement(t) {
858
- const {overflow: e, overflowX: n, overflowY: o, display: i} = getComputedStyle$1(t);
859
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !d.has(i);
860
- }
861
-
862
- const m = new Set([ "table", "td", "th" ]);
863
-
864
- function isTableElement(t) {
865
- return m.has(getNodeName(t));
866
- }
867
-
868
- const p = [ ":popover-open", ":modal" ];
869
-
870
- function isTopLayer(t) {
871
- return p.some((e => {
872
- try {
873
- return t.matches(e);
874
- } catch (t) {
875
- return false;
876
- }
877
- }));
878
- }
879
-
880
- const h = [ "transform", "translate", "scale", "rotate", "perspective" ];
881
-
882
- const w = [ "transform", "translate", "scale", "rotate", "perspective", "filter" ];
883
-
884
- const y = [ "paint", "layout", "strict", "content" ];
885
-
886
- function isContainingBlock(t) {
887
- const e = isWebKit();
888
- const n = isElement(t) ? getComputedStyle$1(t) : t;
889
- // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
890
- // https://drafts.csswg.org/css-transforms-2/#individual-transforms
891
- return h.some((t => n[t] ? n[t] !== "none" : false)) || (n.containerType ? n.containerType !== "normal" : false) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : false) || !e && (n.filter ? n.filter !== "none" : false) || w.some((t => (n.willChange || "").includes(t))) || y.some((t => (n.contain || "").includes(t)));
892
- }
893
-
894
- function getContainingBlock(t) {
895
- let e = getParentNode(t);
896
- while (isHTMLElement(e) && !isLastTraversableNode(e)) {
897
- if (isContainingBlock(e)) {
898
- return e;
899
- } else if (isTopLayer(e)) {
900
- return null;
901
- }
902
- e = getParentNode(e);
903
- }
904
- return null;
905
- }
906
-
907
- function isWebKit() {
908
- if (typeof CSS === "undefined" || !CSS.supports) return false;
909
- return CSS.supports("-webkit-backdrop-filter", "none");
910
- }
911
-
912
- const v = new Set([ "html", "body", "#document" ]);
913
-
914
- function isLastTraversableNode(t) {
915
- return v.has(getNodeName(t));
916
- }
917
-
918
- function getComputedStyle$1(t) {
919
- return getWindow(t).getComputedStyle(t);
920
- }
921
-
922
- function getNodeScroll(t) {
923
- if (isElement(t)) {
924
- return {
925
- scrollLeft: t.scrollLeft,
926
- scrollTop: t.scrollTop
927
- };
928
- }
929
- return {
930
- scrollLeft: t.scrollX,
931
- scrollTop: t.scrollY
932
- };
933
- }
934
-
935
- function getParentNode(t) {
936
- if (getNodeName(t) === "html") {
937
- return t;
938
- }
939
- const e =
940
- // Step into the shadow DOM of the parent of a slotted node.
941
- t.assignedSlot ||
942
- // DOM Element detected.
943
- t.parentNode ||
944
- // ShadowRoot detected.
945
- isShadowRoot(t) && t.host ||
946
- // Fallback.
947
- getDocumentElement(t);
948
- return isShadowRoot(e) ? e.host : e;
949
- }
950
-
951
- function getNearestOverflowAncestor(t) {
952
- const e = getParentNode(t);
953
- if (isLastTraversableNode(e)) {
954
- return t.ownerDocument ? t.ownerDocument.body : t.body;
955
- }
956
- if (isHTMLElement(e) && isOverflowElement(e)) {
957
- return e;
958
- }
959
- return getNearestOverflowAncestor(e);
960
- }
961
-
962
- function getOverflowAncestors(t, e, n) {
963
- var o;
964
- if (e === void 0) {
965
- e = [];
966
- }
967
- if (n === void 0) {
968
- n = true;
969
- }
970
- const i = getNearestOverflowAncestor(t);
971
- const s = i === ((o = t.ownerDocument) == null ? void 0 : o.body);
972
- const r = getWindow(i);
973
- if (s) {
974
- const t = getFrameElement(r);
975
- return e.concat(r, r.visualViewport || [], isOverflowElement(i) ? i : [], t && n ? getOverflowAncestors(t) : []);
976
- }
977
- return e.concat(i, getOverflowAncestors(i, [], n));
978
- }
979
-
980
- function getFrameElement(t) {
981
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
982
- }
983
-
984
- function getCssDimensions(t) {
985
- const e = getComputedStyle$1(t);
986
- // In testing environments, the `width` and `height` properties are empty
987
- // strings for SVG elements, returning NaN. Fallback to `0` in this case.
988
- let n = parseFloat(e.width) || 0;
989
- let i = parseFloat(e.height) || 0;
990
- const s = isHTMLElement(t);
991
- const r = s ? t.offsetWidth : n;
992
- const c = s ? t.offsetHeight : i;
993
- const l = o(n) !== r || o(i) !== c;
994
- if (l) {
995
- n = r;
996
- i = c;
997
- }
998
- return {
999
- width: n,
1000
- height: i,
1001
- $: l
1002
- };
1003
- }
1004
-
1005
- function unwrapElement(t) {
1006
- return !isElement(t) ? t.contextElement : t;
1007
- }
1008
-
1009
- function getScale(t) {
1010
- const e = unwrapElement(t);
1011
- if (!isHTMLElement(e)) {
1012
- return createCoords(1);
1013
- }
1014
- const n = e.getBoundingClientRect();
1015
- const {width: i, height: s, $: r} = getCssDimensions(e);
1016
- let c = (r ? o(n.width) : n.width) / i;
1017
- let l = (r ? o(n.height) : n.height) / s;
1018
- // 0, NaN, or Infinity should always fallback to 1.
1019
- if (!c || !Number.isFinite(c)) {
1020
- c = 1;
1021
- }
1022
- if (!l || !Number.isFinite(l)) {
1023
- l = 1;
1024
- }
1025
- return {
1026
- x: c,
1027
- y: l
1028
- };
1029
- }
1030
-
1031
- const x = createCoords(0);
1032
-
1033
- function getVisualOffsets(t) {
1034
- const e = getWindow(t);
1035
- if (!isWebKit() || !e.visualViewport) {
1036
- return x;
1037
- }
1038
- return {
1039
- x: e.visualViewport.offsetLeft,
1040
- y: e.visualViewport.offsetTop
1041
- };
1042
- }
1043
-
1044
- function shouldAddVisualOffsets(t, e, n) {
1045
- if (e === void 0) {
1046
- e = false;
1047
- }
1048
- if (!n || e && n !== getWindow(t)) {
1049
- return false;
1050
- }
1051
- return e;
1052
- }
1053
-
1054
- function getBoundingClientRect(t, e, n, o) {
1055
- if (e === void 0) {
1056
- e = false;
1057
- }
1058
- if (n === void 0) {
1059
- n = false;
1060
- }
1061
- const i = t.getBoundingClientRect();
1062
- const s = unwrapElement(t);
1063
- let r = createCoords(1);
1064
- if (e) {
1065
- if (o) {
1066
- if (isElement(o)) {
1067
- r = getScale(o);
1068
- }
1069
- } else {
1070
- r = getScale(t);
1071
- }
1072
- }
1073
- const c = shouldAddVisualOffsets(s, n, o) ? getVisualOffsets(s) : createCoords(0);
1074
- let l = (i.left + c.x) / r.x;
1075
- let a = (i.top + c.y) / r.y;
1076
- let f = i.width / r.x;
1077
- let u = i.height / r.y;
1078
- if (s) {
1079
- const t = getWindow(s);
1080
- const e = o && isElement(o) ? getWindow(o) : o;
1081
- let n = t;
1082
- let i = getFrameElement(n);
1083
- while (i && o && e !== n) {
1084
- const t = getScale(i);
1085
- const e = i.getBoundingClientRect();
1086
- const o = getComputedStyle$1(i);
1087
- const s = e.left + (i.clientLeft + parseFloat(o.paddingLeft)) * t.x;
1088
- const r = e.top + (i.clientTop + parseFloat(o.paddingTop)) * t.y;
1089
- l *= t.x;
1090
- a *= t.y;
1091
- f *= t.x;
1092
- u *= t.y;
1093
- l += s;
1094
- a += r;
1095
- n = getWindow(i);
1096
- i = getFrameElement(n);
1097
- }
1098
- }
1099
- return rectToClientRect({
1100
- width: f,
1101
- height: u,
1102
- x: l,
1103
- y: a
1104
- });
1105
- }
1106
-
1107
- // If <html> has a CSS width greater than the viewport, then this will be
1108
- // incorrect for RTL.
1109
- function getWindowScrollBarX(t, e) {
1110
- const n = getNodeScroll(t).scrollLeft;
1111
- if (!e) {
1112
- return getBoundingClientRect(getDocumentElement(t)).left + n;
1113
- }
1114
- return e.left + n;
1115
- }
1116
-
1117
- function getHTMLOffset(t, e) {
1118
- const n = t.getBoundingClientRect();
1119
- const o = n.left + e.scrollLeft - getWindowScrollBarX(t, n);
1120
- const i = n.top + e.scrollTop;
1121
- return {
1122
- x: o,
1123
- y: i
1124
- };
1125
- }
1126
-
1127
- function convertOffsetParentRelativeRectToViewportRelativeRect(t) {
1128
- let {elements: e, rect: n, offsetParent: o, strategy: i} = t;
1129
- const s = i === "fixed";
1130
- const r = getDocumentElement(o);
1131
- const c = e ? isTopLayer(e.floating) : false;
1132
- if (o === r || c && s) {
1133
- return n;
1134
- }
1135
- let l = {
1136
- scrollLeft: 0,
1137
- scrollTop: 0
1138
- };
1139
- let a = createCoords(1);
1140
- const f = createCoords(0);
1141
- const u = isHTMLElement(o);
1142
- if (u || !u && !s) {
1143
- if (getNodeName(o) !== "body" || isOverflowElement(r)) {
1144
- l = getNodeScroll(o);
1145
- }
1146
- if (isHTMLElement(o)) {
1147
- const t = getBoundingClientRect(o);
1148
- a = getScale(o);
1149
- f.x = t.x + o.clientLeft;
1150
- f.y = t.y + o.clientTop;
1151
- }
1152
- }
1153
- const g = r && !u && !s ? getHTMLOffset(r, l) : createCoords(0);
1154
- return {
1155
- width: n.width * a.x,
1156
- height: n.height * a.y,
1157
- x: n.x * a.x - l.scrollLeft * a.x + f.x + g.x,
1158
- y: n.y * a.y - l.scrollTop * a.y + f.y + g.y
1159
- };
1160
- }
1161
-
1162
- function getClientRects(t) {
1163
- return Array.from(t.getClientRects());
1164
- }
1165
-
1166
- // Gets the entire size of the scrollable document area, even extending outside
1167
- // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1168
- function getDocumentRect(t) {
1169
- const e = getDocumentElement(t);
1170
- const o = getNodeScroll(t);
1171
- const i = t.ownerDocument.body;
1172
- const s = n(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth);
1173
- const r = n(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
1174
- let c = -o.scrollLeft + getWindowScrollBarX(t);
1175
- const l = -o.scrollTop;
1176
- if (getComputedStyle$1(i).direction === "rtl") {
1177
- c += n(e.clientWidth, i.clientWidth) - s;
1178
- }
1179
- return {
1180
- width: s,
1181
- height: r,
1182
- x: c,
1183
- y: l
1184
- };
1185
- }
1186
-
1187
- // Safety check: ensure the scrollbar space is reasonable in case this
1188
- // calculation is affected by unusual styles.
1189
- // Most scrollbars leave 15-18px of space.
1190
- const b = 25;
1191
-
1192
- function getViewportRect(t, e) {
1193
- const n = getWindow(t);
1194
- const o = getDocumentElement(t);
1195
- const i = n.visualViewport;
1196
- let s = o.clientWidth;
1197
- let r = o.clientHeight;
1198
- let c = 0;
1199
- let l = 0;
1200
- if (i) {
1201
- s = i.width;
1202
- r = i.height;
1203
- const t = isWebKit();
1204
- if (!t || t && e === "fixed") {
1205
- c = i.offsetLeft;
1206
- l = i.offsetTop;
1207
- }
1208
- }
1209
- const a = getWindowScrollBarX(o);
1210
- // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1211
- // visual width of the <html> but this is not considered in the size
1212
- // of `html.clientWidth`.
1213
- if (a <= 0) {
1214
- const t = o.ownerDocument;
1215
- const e = t.body;
1216
- const n = getComputedStyle(e);
1217
- const i = t.compatMode === "CSS1Compat" ? parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0 : 0;
1218
- const r = Math.abs(o.clientWidth - e.clientWidth - i);
1219
- if (r <= b) {
1220
- s -= r;
1221
- }
1222
- } else if (a <= b) {
1223
- // If the <body> scrollbar is on the left, the width needs to be extended
1224
- // by the scrollbar amount so there isn't extra space on the right.
1225
- s += a;
1226
- }
1227
- return {
1228
- width: s,
1229
- height: r,
1230
- x: c,
1231
- y: l
1232
- };
1233
- }
1234
-
1235
- const A = new Set([ "absolute", "fixed" ]);
1236
-
1237
- // Returns the inner client rect, subtracting scrollbars if present.
1238
- function getInnerBoundingClientRect(t, e) {
1239
- const n = getBoundingClientRect(t, true, e === "fixed");
1240
- const o = n.top + t.clientTop;
1241
- const i = n.left + t.clientLeft;
1242
- const s = isHTMLElement(t) ? getScale(t) : createCoords(1);
1243
- const r = t.clientWidth * s.x;
1244
- const c = t.clientHeight * s.y;
1245
- const l = i * s.x;
1246
- const a = o * s.y;
1247
- return {
1248
- width: r,
1249
- height: c,
1250
- x: l,
1251
- y: a
1252
- };
1253
- }
1254
-
1255
- function getClientRectFromClippingAncestor(t, e, n) {
1256
- let o;
1257
- if (e === "viewport") {
1258
- o = getViewportRect(t, n);
1259
- } else if (e === "document") {
1260
- o = getDocumentRect(getDocumentElement(t));
1261
- } else if (isElement(e)) {
1262
- o = getInnerBoundingClientRect(e, n);
1263
- } else {
1264
- const n = getVisualOffsets(t);
1265
- o = {
1266
- x: e.x - n.x,
1267
- y: e.y - n.y,
1268
- width: e.width,
1269
- height: e.height
1270
- };
1271
- }
1272
- return rectToClientRect(o);
1273
- }
1274
-
1275
- function hasFixedPositionAncestor(t, e) {
1276
- const n = getParentNode(t);
1277
- if (n === e || !isElement(n) || isLastTraversableNode(n)) {
1278
- return false;
1279
- }
1280
- return getComputedStyle$1(n).position === "fixed" || hasFixedPositionAncestor(n, e);
1281
- }
1282
-
1283
- // A "clipping ancestor" is an `overflow` element with the characteristic of
1284
- // clipping (or hiding) child elements. This returns all clipping ancestors
1285
- // of the given element up the tree.
1286
- function getClippingElementAncestors(t, e) {
1287
- const n = e.get(t);
1288
- if (n) {
1289
- return n;
1290
- }
1291
- let o = getOverflowAncestors(t, [], false).filter((t => isElement(t) && getNodeName(t) !== "body"));
1292
- let i = null;
1293
- const s = getComputedStyle$1(t).position === "fixed";
1294
- let r = s ? getParentNode(t) : t;
1295
- // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1296
- while (isElement(r) && !isLastTraversableNode(r)) {
1297
- const e = getComputedStyle$1(r);
1298
- const n = isContainingBlock(r);
1299
- if (!n && e.position === "fixed") {
1300
- i = null;
1301
- }
1302
- const c = s ? !n && !i : !n && e.position === "static" && !!i && A.has(i.position) || isOverflowElement(r) && !n && hasFixedPositionAncestor(t, r);
1303
- if (c) {
1304
- // Drop non-containing blocks.
1305
- o = o.filter((t => t !== r));
1306
- } else {
1307
- // Record last containing block for next iteration.
1308
- i = e;
1309
- }
1310
- r = getParentNode(r);
1311
- }
1312
- e.set(t, o);
1313
- return o;
1314
- }
1315
-
1316
- // Gets the maximum area that the element is visible in due to any number of
1317
- // clipping ancestors.
1318
- function getClippingRect(t) {
1319
- let {element: o, boundary: i, rootBoundary: s, strategy: r} = t;
1320
- const c = i === "clippingAncestors" ? isTopLayer(o) ? [] : getClippingElementAncestors(o, this._c) : [].concat(i);
1321
- const l = [ ...c, s ];
1322
- const a = l[0];
1323
- const f = l.reduce(((t, i) => {
1324
- const s = getClientRectFromClippingAncestor(o, i, r);
1325
- t.top = n(s.top, t.top);
1326
- t.right = e(s.right, t.right);
1327
- t.bottom = e(s.bottom, t.bottom);
1328
- t.left = n(s.left, t.left);
1329
- return t;
1330
- }), getClientRectFromClippingAncestor(o, a, r));
1331
- return {
1332
- width: f.right - f.left,
1333
- height: f.bottom - f.top,
1334
- x: f.left,
1335
- y: f.top
1336
- };
1337
- }
1338
-
1339
- function getDimensions(t) {
1340
- const {width: e, height: n} = getCssDimensions(t);
1341
- return {
1342
- width: e,
1343
- height: n
1344
- };
1345
- }
1346
-
1347
- function getRectRelativeToOffsetParent(t, e, n) {
1348
- const o = isHTMLElement(e);
1349
- const i = getDocumentElement(e);
1350
- const s = n === "fixed";
1351
- const r = getBoundingClientRect(t, true, s, e);
1352
- let c = {
1353
- scrollLeft: 0,
1354
- scrollTop: 0
1355
- };
1356
- const l = createCoords(0);
1357
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1358
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1359
- function setLeftRTLScrollbarOffset() {
1360
- l.x = getWindowScrollBarX(i);
1361
- }
1362
- if (o || !o && !s) {
1363
- if (getNodeName(e) !== "body" || isOverflowElement(i)) {
1364
- c = getNodeScroll(e);
1365
- }
1366
- if (o) {
1367
- const t = getBoundingClientRect(e, true, s, e);
1368
- l.x = t.x + e.clientLeft;
1369
- l.y = t.y + e.clientTop;
1370
- } else if (i) {
1371
- setLeftRTLScrollbarOffset();
1372
- }
1373
- }
1374
- if (s && !o && i) {
1375
- setLeftRTLScrollbarOffset();
1376
- }
1377
- const a = i && !o && !s ? getHTMLOffset(i, c) : createCoords(0);
1378
- const f = r.left + c.scrollLeft - l.x - a.x;
1379
- const u = r.top + c.scrollTop - l.y - a.y;
1380
- return {
1381
- x: f,
1382
- y: u,
1383
- width: r.width,
1384
- height: r.height
1385
- };
1386
- }
1387
-
1388
- function isStaticPositioned(t) {
1389
- return getComputedStyle$1(t).position === "static";
1390
- }
1391
-
1392
- function getTrueOffsetParent(t, e) {
1393
- if (!isHTMLElement(t) || getComputedStyle$1(t).position === "fixed") {
1394
- return null;
1395
- }
1396
- if (e) {
1397
- return e(t);
1398
- }
1399
- let n = t.offsetParent;
1400
- // Firefox returns the <html> element as the offsetParent if it's non-static,
1401
- // while Chrome and Safari return the <body> element. The <body> element must
1402
- // be used to perform the correct calculations even if the <html> element is
1403
- // non-static.
1404
- if (getDocumentElement(t) === n) {
1405
- n = n.ownerDocument.body;
1406
- }
1407
- return n;
1408
- }
1409
-
1410
- // Gets the closest ancestor positioned element. Handles some edge cases,
1411
- // such as table ancestors and cross browser bugs.
1412
- function getOffsetParent(t, e) {
1413
- const n = getWindow(t);
1414
- if (isTopLayer(t)) {
1415
- return n;
1416
- }
1417
- if (!isHTMLElement(t)) {
1418
- let e = getParentNode(t);
1419
- while (e && !isLastTraversableNode(e)) {
1420
- if (isElement(e) && !isStaticPositioned(e)) {
1421
- return e;
1422
- }
1423
- e = getParentNode(e);
1424
- }
1425
- return n;
1426
- }
1427
- let o = getTrueOffsetParent(t, e);
1428
- while (o && isTableElement(o) && isStaticPositioned(o)) {
1429
- o = getTrueOffsetParent(o, e);
1430
- }
1431
- if (o && isLastTraversableNode(o) && isStaticPositioned(o) && !isContainingBlock(o)) {
1432
- return n;
1433
- }
1434
- return o || getContainingBlock(t) || n;
1435
- }
1436
-
1437
- const getElementRects = async function(t) {
1438
- const e = this.getOffsetParent || getOffsetParent;
1439
- const n = this.getDimensions;
1440
- const o = await n(t.floating);
1441
- return {
1442
- reference: getRectRelativeToOffsetParent(t.reference, await e(t.floating), t.strategy),
1443
- floating: {
1444
- x: 0,
1445
- y: 0,
1446
- width: o.width,
1447
- height: o.height
1448
- }
1449
- };
1450
- };
1451
-
1452
- function isRTL(t) {
1453
- return getComputedStyle$1(t).direction === "rtl";
1454
- }
1455
-
1456
- const S = {
1457
- convertOffsetParentRelativeRectToViewportRelativeRect,
1458
- getDocumentElement,
1459
- getClippingRect,
1460
- getOffsetParent,
1461
- getElementRects,
1462
- getClientRects,
1463
- getDimensions,
1464
- getScale,
1465
- isElement,
1466
- isRTL
1467
- };
1468
-
1469
- function rectsAreEqual(t, e) {
1470
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1471
- }
1472
-
1473
- // https://samthor.au/2021/observing-dom/
1474
- function observeMove(t, o) {
1475
- let s = null;
1476
- let r;
1477
- const c = getDocumentElement(t);
1478
- function cleanup() {
1479
- var t;
1480
- clearTimeout(r);
1481
- (t = s) == null || t.disconnect();
1482
- s = null;
1483
- }
1484
- function refresh(l, a) {
1485
- if (l === void 0) {
1486
- l = false;
1487
- }
1488
- if (a === void 0) {
1489
- a = 1;
1490
- }
1491
- cleanup();
1492
- const f = t.getBoundingClientRect();
1493
- const {left: u, top: g, width: d, height: m} = f;
1494
- if (!l) {
1495
- o();
1496
- }
1497
- if (!d || !m) {
1498
- return;
1499
- }
1500
- const p = i(g);
1501
- const h = i(c.clientWidth - (u + d));
1502
- const w = i(c.clientHeight - (g + m));
1503
- const y = i(u);
1504
- const v = -p + "px " + -h + "px " + -w + "px " + -y + "px";
1505
- const x = {
1506
- rootMargin: v,
1507
- threshold: n(0, e(1, a)) || 1
1508
- };
1509
- let b = true;
1510
- function handleObserve(e) {
1511
- const n = e[0].intersectionRatio;
1512
- if (n !== a) {
1513
- if (!b) {
1514
- return refresh();
1515
- }
1516
- if (!n) {
1517
- // If the reference is clipped, the ratio is 0. Throttle the refresh
1518
- // to prevent an infinite loop of updates.
1519
- r = setTimeout((() => {
1520
- refresh(false, 1e-7);
1521
- }), 1e3);
1522
- } else {
1523
- refresh(false, n);
1524
- }
1525
- }
1526
- if (n === 1 && !rectsAreEqual(f, t.getBoundingClientRect())) {
1527
- // It's possible that even though the ratio is reported as 1, the
1528
- // element is not actually fully within the IntersectionObserver's root
1529
- // area anymore. This can happen under performance constraints. This may
1530
- // be a bug in the browser's IntersectionObserver implementation. To
1531
- // work around this, we compare the element's bounding rect now with
1532
- // what it was at the time we created the IntersectionObserver. If they
1533
- // are not equal then the element moved, so we refresh.
1534
- refresh();
1535
- }
1536
- b = false;
1537
- }
1538
- // Older browsers don't support a `document` as the root and will throw an
1539
- // error.
1540
- try {
1541
- s = new IntersectionObserver(handleObserve, {
1542
- ...x,
1543
- // Handle <iframe>s
1544
- root: c.ownerDocument
1545
- });
1546
- } catch (t) {
1547
- s = new IntersectionObserver(handleObserve, x);
1548
- }
1549
- s.observe(t);
1550
- }
1551
- refresh(true);
1552
- return cleanup;
1553
- }
1554
-
1555
- /**
1556
- * Automatically updates the position of the floating element when necessary.
1557
- * Should only be called when the floating element is mounted on the DOM or
1558
- * visible on the screen.
1559
- * @returns cleanup function that should be invoked when the floating element is
1560
- * removed from the DOM or hidden from the screen.
1561
- * @see https://floating-ui.com/docs/autoUpdate
1562
- */ function autoUpdate(t, e, n, o) {
1563
- if (o === void 0) {
1564
- o = {};
1565
- }
1566
- const {ancestorScroll: i = true, ancestorResize: s = true, elementResize: r = typeof ResizeObserver === "function", layoutShift: c = typeof IntersectionObserver === "function", animationFrame: l = false} = o;
1567
- const a = unwrapElement(t);
1568
- const f = i || s ? [ ...a ? getOverflowAncestors(a) : [], ...getOverflowAncestors(e) ] : [];
1569
- f.forEach((t => {
1570
- i && t.addEventListener("scroll", n, {
1571
- passive: true
1572
- });
1573
- s && t.addEventListener("resize", n);
1574
- }));
1575
- const u = a && c ? observeMove(a, n) : null;
1576
- let g = -1;
1577
- let d = null;
1578
- if (r) {
1579
- d = new ResizeObserver((t => {
1580
- let [o] = t;
1581
- if (o && o.target === a && d) {
1582
- // Prevent update loops when using the `size` middleware.
1583
- // https://github.com/floating-ui/floating-ui/issues/1740
1584
- d.unobserve(e);
1585
- cancelAnimationFrame(g);
1586
- g = requestAnimationFrame((() => {
1587
- var t;
1588
- (t = d) == null || t.observe(e);
1589
- }));
1590
- }
1591
- n();
1592
- }));
1593
- if (a && !l) {
1594
- d.observe(a);
1595
- }
1596
- d.observe(e);
1597
- }
1598
- let m;
1599
- let p = l ? getBoundingClientRect(t) : null;
1600
- if (l) {
1601
- frameLoop();
1602
- }
1603
- function frameLoop() {
1604
- const e = getBoundingClientRect(t);
1605
- if (p && !rectsAreEqual(p, e)) {
1606
- n();
1607
- }
1608
- p = e;
1609
- m = requestAnimationFrame(frameLoop);
1610
- }
1611
- n();
1612
- return () => {
1613
- var t;
1614
- f.forEach((t => {
1615
- i && t.removeEventListener("scroll", n);
1616
- s && t.removeEventListener("resize", n);
1617
- }));
1618
- u == null || u();
1619
- (t = d) == null || t.disconnect();
1620
- d = null;
1621
- if (l) {
1622
- cancelAnimationFrame(m);
1623
- }
1624
- };
1625
- }
1626
-
1627
- /**
1628
- * Modifies the placement by translating the floating element along the
1629
- * specified axes.
1630
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
1631
- * object may be passed.
1632
- * @see https://floating-ui.com/docs/offset
1633
- */ const O = offset$1;
1634
-
1635
- /**
1636
- * Optimizes the visibility of the floating element by shifting it in order to
1637
- * keep it in view when it will overflow the clipping boundary.
1638
- * @see https://floating-ui.com/docs/shift
1639
- */ const C = shift$1;
1640
-
1641
- /**
1642
- * Optimizes the visibility of the floating element by flipping the `placement`
1643
- * in order to keep it in view when the preferred placement(s) will overflow the
1644
- * clipping boundary. Alternative to `autoPlacement`.
1645
- * @see https://floating-ui.com/docs/flip
1646
- */ const E = flip$1;
1647
-
1648
- /**
1649
- * Provides data that allows you to change the size of the floating element —
1650
- * for instance, prevent it from overflowing the clipping boundary or match the
1651
- * width of the reference element.
1652
- * @see https://floating-ui.com/docs/size
1653
- */ const R = size$1;
1654
-
1655
- /**
1656
- * Provides data to hide the floating element in applicable situations, such as
1657
- * when it is not in the same clipping context as the reference element.
1658
- * @see https://floating-ui.com/docs/hide
1659
- */ const P = hide$1;
1660
-
1661
- /**
1662
- * Provides data to position an inner element of the floating element so that it
1663
- * appears centered to the reference element.
1664
- * @see https://floating-ui.com/docs/arrow
1665
- */ const T = arrow$1;
1666
-
1667
- /**
1668
- * Computes the `x` and `y` coordinates that will place the floating element
1669
- * next to a given reference element.
1670
- */ const computePosition = (t, e, n) => {
1671
- // This caches the expensive `getClippingElementAncestors` function so that
1672
- // multiple lifecycle resets re-use the same result. It only lives for a
1673
- // single call. If other functions become expensive, we can add them as well.
1674
- const o = new Map;
1675
- const i = {
1676
- platform: S,
1677
- ...n
1678
- };
1679
- const s = {
1680
- ...i.platform,
1681
- _c: o
1682
- };
1683
- return computePosition$1(t, e, {
1684
- ...i,
1685
- platform: s
1686
- });
1687
- };
1688
-
1689
- class L {
1690
- panel;
1691
- trigger;
1692
- options;
1693
- cleanUp;
1694
- constructor(t, e, n) {
1695
- this.trigger = t;
1696
- this.panel = e;
1697
- this.options = {
1698
- distance: 20,
1699
- placement: "bottom",
1700
- strategy: "fixed",
1701
- sameWidth: false,
1702
- ...n
1703
- };
1704
- this.init(n);
1705
- }
1706
- init(t) {
1707
- this.options = Object.assign(this.options, t);
1708
- this.update();
1709
- }
1710
- update() {
1711
- this.cleanUp = autoUpdate(this.trigger, this.panel, (() => {
1712
- (async () => {
1713
- const {x: t, y: e, placement: n, middlewareData: o} = await computePosition(this.trigger, this.panel, {
1714
- placement: this.options.placement,
1715
- strategy: this.options.strategy,
1716
- middleware: [ O({
1717
- mainAxis: this.options.distance,
1718
- crossAxis: this.options.skidding
1719
- }), E(), C(), R(this.options.sameWidth && {
1720
- apply({rects: t, elements: e}) {
1721
- Object.assign(e.floating.style, {
1722
- width: `${t.reference.width}px`
1723
- });
1724
- }
1725
- }), T({
1726
- element: this.options.arrow || null
1727
- }), this.positionChange(), P() ]
1728
- });
1729
- this.applyPanelPosition(t, e);
1730
- this.applyArrowPosition(n, o);
1731
- this.applyVisibility(o);
1732
- })();
1733
- }));
1734
- }
1735
- destroy() {
1736
- if (!this.cleanUp) return;
1737
- this.cleanUp();
1738
- }
1739
- positionChange() {
1740
- return {
1741
- name: "positionChange",
1742
- fn: ({placement: t}) => {
1743
- if (typeof this.options.onPositionChange !== "function") return {};
1744
- this.options.onPositionChange(t);
1745
- return {};
1746
- }
1747
- };
1748
- }
1749
- applyPanelPosition(t, e) {
1750
- Object.assign(this.panel.style, {
1751
- top: "0",
1752
- left: "0",
1753
- transform: `translate(${this.roundByDPR(t)}px,${this.roundByDPR(e)}px)`
1754
- });
1755
- }
1756
- applyArrowPosition(t, e) {
1757
- if (!this.options.arrow) return;
1758
- const {x: n, y: o} = e.arrow;
1759
- const i = {
1760
- top: "bottom",
1761
- right: "left",
1762
- bottom: "top",
1763
- left: "right"
1764
- }[t.split("-")[0]];
1765
- Object.assign(this.options.arrow.style, {
1766
- left: n != null ? `${n}px` : "",
1767
- top: o != null ? `${o}px` : "",
1768
- right: "",
1769
- bottom: "",
1770
- [i]: "-4px"
1771
- });
1772
- }
1773
- applyVisibility(t) {
1774
- const {referenceHidden: e} = t.hide;
1775
- Object.assign(this.panel.style, {
1776
- visibility: e ? "hidden" : "visible"
1777
- });
1778
- }
1779
- roundByDPR(t) {
1780
- const e = window.devicePixelRatio || 1;
1781
- return Math.round(t * e) / e;
1782
- }
1783
- }
1784
-
1785
- export { L as F };
1786
- //# sourceMappingURL=p-CmKvDWiL.js.map
5
+ const t=["top","right","bottom","left"];const n=Math.min;const e=Math.max;const o=Math.round;const s=Math.floor;const i=t=>({x:t,y:t});const r={left:"right",right:"left",bottom:"top",top:"bottom"};const c={start:"end",end:"start"};function l(t,o,s){return e(t,n(o,s))}function a(t,n){return typeof t==="function"?t(n):t}function f(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function d(t){return t==="x"?"y":"x"}function h(t){return t==="y"?"height":"width"}const m=new Set(["top","bottom"]);function p(t){return m.has(f(t))?"y":"x"}function y(t){return d(p(t))}function w(t,n,e){if(e===void 0){e=false}const o=u(t);const s=y(t);const i=h(s);let r=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[i]>n.floating[i]){r=F(r)}return[r,F(r)]}function g(t){const n=F(t);return[x(t),n,x(n)]}function x(t){return t.replace(/start|end/g,(t=>c[t]))}const b=["left","right"];const v=["right","left"];const A=["top","bottom"];const S=["bottom","top"];function O(t,n,e){switch(t){case"top":case"bottom":if(e)return n?v:b;return n?b:v;case"left":case"right":return n?A:S;default:return[]}}function R(t,n,e,o){const s=u(t);let i=O(f(t),e==="start",o);if(s){i=i.map((t=>t+"-"+s));if(n){i=i.concat(i.map(x))}}return i}function F(t){return t.replace(/left|right|bottom|top/g,(t=>r[t]))}function k(t){return{top:0,right:0,bottom:0,left:0,...t}}function C(t){return typeof t!=="number"?k(t):{top:t,right:t,bottom:t,left:t}}function P(t){const{x:n,y:e,width:o,height:s}=t;return{width:o,height:s,top:e,left:n,right:n+o,bottom:e+s,x:n,y:e}}function D(t,n,e){let{reference:o,floating:s}=t;const i=p(n);const r=y(n);const c=h(r);const l=f(n);const a=i==="y";const d=o.x+o.width/2-s.width/2;const m=o.y+o.height/2-s.height/2;const w=o[c]/2-s[c]/2;let g;switch(l){case"top":g={x:d,y:o.y-s.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:m};break;case"left":g={x:o.x-s.width,y:m};break;default:g={x:o.x,y:o.y}}switch(u(n)){case"start":g[r]-=w*(e&&a?-1:1);break;case"end":g[r]+=w*(e&&a?-1:1);break}return g}async function M(t,n){var e;if(n===void 0){n={}}const{x:o,y:s,platform:i,rects:r,elements:c,strategy:l}=t;const{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=false,padding:m=0}=a(n,t);const p=C(m);const y=d==="floating"?"reference":"floating";const w=c[h?y:d];const g=P(await i.getClippingRect({element:((e=await(i.isElement==null?void 0:i.isElement(w)))!=null?e:true)?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:l}));const x=d==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference;const b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating));const v=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1};const A=P(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-A.top+p.top)/v.y,bottom:(A.bottom-g.bottom+p.bottom)/v.y,left:(g.left-A.left+p.left)/v.x,right:(A.right-g.right+p.right)/v.x}}const T=async(t,n,e)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=e;const c=i.filter(Boolean);const l=await(r.isRTL==null?void 0:r.isRTL(n));let a=await r.getElementRects({reference:t,floating:n,strategy:s});let{x:f,y:u}=D(a,o,l);let d=o;let h={};let m=0;for(let e=0;e<c.length;e++){var p;const{name:i,fn:y}=c[e];const{x:w,y:g,data:x,reset:b}=await y({x:f,y:u,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:a,platform:{...r,detectOverflow:(p=r.detectOverflow)!=null?p:M},elements:{reference:t,floating:n}});f=w!=null?w:f;u=g!=null?g:u;h={...h,[i]:{...h[i],...x}};if(b&&m<=50){m++;if(typeof b==="object"){if(b.placement){d=b.placement}if(b.rects){a=b.rects===true?await r.getElementRects({reference:t,floating:n,strategy:s}):b.rects}({x:f,y:u}=D(a,d,l))}e=-1}}return{x:f,y:u,placement:d,strategy:s,middlewareData:h}};const H=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:s,placement:i,rects:r,platform:c,elements:f,middlewareData:d}=e;const{element:m,padding:p=0}=a(t,e)||{};if(m==null){return{}}const w=C(p);const g={x:o,y:s};const x=y(i);const b=h(x);const v=await c.getDimensions(m);const A=x==="y";const S=A?"top":"left";const O=A?"bottom":"right";const R=A?"clientHeight":"clientWidth";const F=r.reference[b]+r.reference[x]-g[x]-r.floating[b];const k=g[x]-r.reference[x];const P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let D=P?P[R]:0;if(!D||!await(c.isElement==null?void 0:c.isElement(P))){D=f.floating[R]||r.floating[b]}const M=F/2-k/2;const T=D/2-v[b]/2-1;const H=n(w[S],T);const j=n(w[O],T);const z=H;const B=D-v[b]-j;const $=D/2-v[b]/2+M;const L=l(z,$,B);const E=!d.arrow&&u(i)!=null&&$!==L&&r.reference[b]/2-($<z?H:j)-v[b]/2<0;const I=E?$<z?$-z:$-B:0;return{[x]:g[x]+I,data:{[x]:L,centerOffset:$-L-I,...E&&{alignmentOffset:I}},reset:E}}});const j=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:l,elements:u}=n;const{mainAxis:d=true,crossAxis:h=true,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=true,...v}=a(t,n);if((e=i.arrow)!=null&&e.alignmentOffset){return{}}const A=f(s);const S=p(c);const O=f(c)===c;const k=await(l.isRTL==null?void 0:l.isRTL(u.floating));const C=m||(O||!b?[F(c)]:g(c));const P=x!=="none";if(!m&&P){C.push(...R(c,b,x,k))}const D=[c,...C];const M=await l.detectOverflow(n,v);const T=[];let H=((o=i.flip)==null?void 0:o.overflows)||[];if(d){T.push(M[A])}if(h){const t=w(s,r,k);T.push(M[t[0]],M[t[1]])}H=[...H,{placement:s,overflows:T}];if(!T.every((t=>t<=0))){var j,z;const t=(((j=i.flip)==null?void 0:j.index)||0)+1;const n=D[t];if(n){const e=h==="alignment"?S!==p(n):false;if(!e||H.every((t=>p(t.placement)===S?t.overflows[0]>0:true))){return{data:{index:t,overflows:H},reset:{placement:n}}}}let e=(z=H.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:z.placement;if(!e){switch(y){case"bestFit":{var B;const t=(B=H.filter((t=>{if(P){const n=p(t.placement);return n===S||n==="y"}return true})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:B[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(s!==e){return{reset:{placement:e}}}}return{}}}};function z(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function B(n){return t.some((t=>n[t]>=0))}const $=function(t){if(t===void 0){t={}}return{name:"hide",options:t,async fn(n){const{rects:e,platform:o}=n;const{strategy:s="referenceHidden",...i}=a(t,n);switch(s){case"referenceHidden":{const t=await o.detectOverflow(n,{...i,elementContext:"reference"});const s=z(t,e.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:B(s)}}}case"escaped":{const t=await o.detectOverflow(n,{...i,altBoundary:true});const s=z(t,e.floating);return{data:{escapedOffsets:s,escaped:B(s)}}}default:{return{}}}}}};const L=new Set(["left","top"]);async function E(t,n){const{placement:e,platform:o,elements:s}=t;const i=await(o.isRTL==null?void 0:o.isRTL(s.floating));const r=f(e);const c=u(e);const l=p(e)==="y";const d=L.has(r)?-1:1;const h=i&&l?-1:1;const m=a(n,t);let{mainAxis:y,crossAxis:w,alignmentAxis:g}=typeof m==="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};if(c&&typeof g==="number"){w=c==="end"?g*-1:g}return l?{x:w*h,y:y*d}:{x:y*d,y:w*h}}const I=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:s,y:i,placement:r,middlewareData:c}=n;const l=await E(n,t);if(r===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}};const N=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:s,platform:i}=n;const{mainAxis:r=true,crossAxis:c=false,limiter:u={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...h}=a(t,n);const m={x:e,y:o};const y=await i.detectOverflow(n,h);const w=p(f(s));const g=d(w);let x=m[g];let b=m[w];if(r){const t=g==="y"?"top":"left";const n=g==="y"?"bottom":"right";const e=x+y[t];const o=x-y[n];x=l(e,x,o)}if(c){const t=w==="y"?"top":"left";const n=w==="y"?"bottom":"right";const e=b+y[t];const o=b-y[n];b=l(e,b,o)}const v=u.fn({...n,[g]:x,[w]:b});return{...v,data:{x:v.x-e,y:v.y-o,enabled:{[g]:r,[w]:c}}}}}};const W=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(o){var s,i;const{placement:r,rects:c,platform:l,elements:d}=o;const{apply:h=()=>{},...m}=a(t,o);const y=await l.detectOverflow(o,m);const w=f(r);const g=u(r);const x=p(r)==="y";const{width:b,height:v}=c.floating;let A;let S;if(w==="top"||w==="bottom"){A=w;S=g===(await(l.isRTL==null?void 0:l.isRTL(d.floating))?"start":"end")?"left":"right"}else{S=w;A=g==="end"?"top":"bottom"}const O=v-y.top-y.bottom;const R=b-y.left-y.right;const F=n(v-y[A],O);const k=n(b-y[S],R);const C=!o.middlewareData.shift;let P=F;let D=k;if((s=o.middlewareData.shift)!=null&&s.enabled.x){D=R}if((i=o.middlewareData.shift)!=null&&i.enabled.y){P=O}if(C&&!g){const t=e(y.left,0);const n=e(y.right,0);const o=e(y.top,0);const s=e(y.bottom,0);if(x){D=b-2*(t!==0||n!==0?t+n:e(y.left,y.right))}else{P=v-2*(o!==0||s!==0?o+s:e(y.top,y.bottom))}}await h({...o,availableWidth:D,availableHeight:P});const M=await l.getDimensions(d.floating);if(b!==M.width||v!==M.height){return{reset:{rects:true}}}return{}}}};function q(){return typeof window!=="undefined"}function V(t){if(Y(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function U(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function X(t){var n;return(n=(Y(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Y(t){if(!q()){return false}return t instanceof Node||t instanceof U(t).Node}function _(t){if(!q()){return false}return t instanceof Element||t instanceof U(t).Element}function G(t){if(!q()){return false}return t instanceof HTMLElement||t instanceof U(t).HTMLElement}function J(t){if(!q()||typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof U(t).ShadowRoot}const K=new Set(["inline","contents"]);function Q(t){const{overflow:n,overflowX:e,overflowY:o,display:s}=ut(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!K.has(s)}const Z=new Set(["table","td","th"]);function tt(t){return Z.has(V(t))}const nt=[":popover-open",":modal"];function et(t){return nt.some((n=>{try{return t.matches(n)}catch(t){return false}}))}const ot=["transform","translate","scale","rotate","perspective"];const st=["transform","translate","scale","rotate","perspective","filter"];const it=["paint","layout","strict","content"];function rt(t){const n=lt();const e=_(t)?ut(t):t;return ot.some((t=>e[t]?e[t]!=="none":false))||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||st.some((t=>(e.willChange||"").includes(t)))||it.some((t=>(e.contain||"").includes(t)))}function ct(t){let n=ht(t);while(G(n)&&!ft(n)){if(rt(n)){return n}else if(et(n)){return null}n=ht(n)}return null}function lt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}const at=new Set(["html","body","#document"]);function ft(t){return at.has(V(t))}function ut(t){return U(t).getComputedStyle(t)}function dt(t){if(_(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ht(t){if(V(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||J(t)&&t.host||X(t);return J(n)?n.host:n}function mt(t){const n=ht(t);if(ft(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(G(n)&&Q(n)){return n}return mt(n)}function pt(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const s=mt(t);const i=s===((o=t.ownerDocument)==null?void 0:o.body);const r=U(s);if(i){const t=yt(r);return n.concat(r,r.visualViewport||[],Q(s)?s:[],t&&e?pt(t):[])}return n.concat(s,pt(s,[],e))}function yt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wt(t){const n=ut(t);let e=parseFloat(n.width)||0;let s=parseFloat(n.height)||0;const i=G(t);const r=i?t.offsetWidth:e;const c=i?t.offsetHeight:s;const l=o(e)!==r||o(s)!==c;if(l){e=r;s=c}return{width:e,height:s,$:l}}function gt(t){return!_(t)?t.contextElement:t}function xt(t){const n=gt(t);if(!G(n)){return i(1)}const e=n.getBoundingClientRect();const{width:s,height:r,$:c}=wt(n);let l=(c?o(e.width):e.width)/s;let a=(c?o(e.height):e.height)/r;if(!l||!Number.isFinite(l)){l=1}if(!a||!Number.isFinite(a)){a=1}return{x:l,y:a}}const bt=i(0);function vt(t){const n=U(t);if(!lt()||!n.visualViewport){return bt}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function At(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==U(t)){return false}return n}function St(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const s=t.getBoundingClientRect();const r=gt(t);let c=i(1);if(n){if(o){if(_(o)){c=xt(o)}}else{c=xt(t)}}const l=At(r,e,o)?vt(r):i(0);let a=(s.left+l.x)/c.x;let f=(s.top+l.y)/c.y;let u=s.width/c.x;let d=s.height/c.y;if(r){const t=U(r);const n=o&&_(o)?U(o):o;let e=t;let s=yt(e);while(s&&o&&n!==e){const t=xt(s);const n=s.getBoundingClientRect();const o=ut(s);const i=n.left+(s.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(s.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x;f*=t.y;u*=t.x;d*=t.y;a+=i;f+=r;e=U(s);s=yt(e)}}return P({width:u,height:d,x:a,y:f})}function Ot(t,n){const e=dt(t).scrollLeft;if(!n){return St(X(t)).left+e}return n.left+e}function Rt(t,n){const e=t.getBoundingClientRect();const o=e.left+n.scrollLeft-Ot(t,e);const s=e.top+n.scrollTop;return{x:o,y:s}}function Ft(t){let{elements:n,rect:e,offsetParent:o,strategy:s}=t;const r=s==="fixed";const c=X(o);const l=n?et(n.floating):false;if(o===c||l&&r){return e}let a={scrollLeft:0,scrollTop:0};let f=i(1);const u=i(0);const d=G(o);if(d||!d&&!r){if(V(o)!=="body"||Q(c)){a=dt(o)}if(G(o)){const t=St(o);f=xt(o);u.x=t.x+o.clientLeft;u.y=t.y+o.clientTop}}const h=c&&!d&&!r?Rt(c,a):i(0);return{width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-a.scrollLeft*f.x+u.x+h.x,y:e.y*f.y-a.scrollTop*f.y+u.y+h.y}}function kt(t){return Array.from(t.getClientRects())}function Ct(t){const n=X(t);const o=dt(t);const s=t.ownerDocument.body;const i=e(n.scrollWidth,n.clientWidth,s.scrollWidth,s.clientWidth);const r=e(n.scrollHeight,n.clientHeight,s.scrollHeight,s.clientHeight);let c=-o.scrollLeft+Ot(t);const l=-o.scrollTop;if(ut(s).direction==="rtl"){c+=e(n.clientWidth,s.clientWidth)-i}return{width:i,height:r,x:c,y:l}}const Pt=25;function Dt(t,n){const e=U(t);const o=X(t);const s=e.visualViewport;let i=o.clientWidth;let r=o.clientHeight;let c=0;let l=0;if(s){i=s.width;r=s.height;const t=lt();if(!t||t&&n==="fixed"){c=s.offsetLeft;l=s.offsetTop}}const a=Ot(o);if(a<=0){const t=o.ownerDocument;const n=t.body;const e=getComputedStyle(n);const s=t.compatMode==="CSS1Compat"?parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0:0;const r=Math.abs(o.clientWidth-n.clientWidth-s);if(r<=Pt){i-=r}}else if(a<=Pt){i+=a}return{width:i,height:r,x:c,y:l}}const Mt=new Set(["absolute","fixed"]);function Tt(t,n){const e=St(t,true,n==="fixed");const o=e.top+t.clientTop;const s=e.left+t.clientLeft;const r=G(t)?xt(t):i(1);const c=t.clientWidth*r.x;const l=t.clientHeight*r.y;const a=s*r.x;const f=o*r.y;return{width:c,height:l,x:a,y:f}}function Ht(t,n,e){let o;if(n==="viewport"){o=Dt(t,e)}else if(n==="document"){o=Ct(X(t))}else if(_(n)){o=Tt(n,e)}else{const e=vt(t);o={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return P(o)}function jt(t,n){const e=ht(t);if(e===n||!_(e)||ft(e)){return false}return ut(e).position==="fixed"||jt(e,n)}function zt(t,n){const e=n.get(t);if(e){return e}let o=pt(t,[],false).filter((t=>_(t)&&V(t)!=="body"));let s=null;const i=ut(t).position==="fixed";let r=i?ht(t):t;while(_(r)&&!ft(r)){const n=ut(r);const e=rt(r);if(!e&&n.position==="fixed"){s=null}const c=i?!e&&!s:!e&&n.position==="static"&&!!s&&Mt.has(s.position)||Q(r)&&!e&&jt(t,r);if(c){o=o.filter((t=>t!==r))}else{s=n}r=ht(r)}n.set(t,o);return o}function Bt(t){let{element:o,boundary:s,rootBoundary:i,strategy:r}=t;const c=s==="clippingAncestors"?et(o)?[]:zt(o,this._c):[].concat(s);const l=[...c,i];const a=l[0];const f=l.reduce(((t,s)=>{const i=Ht(o,s,r);t.top=e(i.top,t.top);t.right=n(i.right,t.right);t.bottom=n(i.bottom,t.bottom);t.left=e(i.left,t.left);return t}),Ht(o,a,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function $t(t){const{width:n,height:e}=wt(t);return{width:n,height:e}}function Lt(t,n,e){const o=G(n);const s=X(n);const r=e==="fixed";const c=St(t,true,r,n);let l={scrollLeft:0,scrollTop:0};const a=i(0);function f(){a.x=Ot(s)}if(o||!o&&!r){if(V(n)!=="body"||Q(s)){l=dt(n)}if(o){const t=St(n,true,r,n);a.x=t.x+n.clientLeft;a.y=t.y+n.clientTop}else if(s){f()}}if(r&&!o&&s){f()}const u=s&&!o&&!r?Rt(s,l):i(0);const d=c.left+l.scrollLeft-a.x-u.x;const h=c.top+l.scrollTop-a.y-u.y;return{x:d,y:h,width:c.width,height:c.height}}function Et(t){return ut(t).position==="static"}function It(t,n){if(!G(t)||ut(t).position==="fixed"){return null}if(n){return n(t)}let e=t.offsetParent;if(X(t)===e){e=e.ownerDocument.body}return e}function Nt(t,n){const e=U(t);if(et(t)){return e}if(!G(t)){let n=ht(t);while(n&&!ft(n)){if(_(n)&&!Et(n)){return n}n=ht(n)}return e}let o=It(t,n);while(o&&tt(o)&&Et(o)){o=It(o,n)}if(o&&ft(o)&&Et(o)&&!rt(o)){return e}return o||ct(t)||e}const Wt=async function(t){const n=this.getOffsetParent||Nt;const e=this.getDimensions;const o=await e(t.floating);return{reference:Lt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function qt(t){return ut(t).direction==="rtl"}const Vt={convertOffsetParentRelativeRectToViewportRelativeRect:Ft,getDocumentElement:X,getClippingRect:Bt,getOffsetParent:Nt,getElementRects:Wt,getClientRects:kt,getDimensions:$t,getScale:xt,isElement:_,isRTL:qt};function Ut(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function Xt(t,o){let i=null;let r;const c=X(t);function l(){var t;clearTimeout(r);(t=i)==null||t.disconnect();i=null}function a(f,u){if(f===void 0){f=false}if(u===void 0){u=1}l();const d=t.getBoundingClientRect();const{left:h,top:m,width:p,height:y}=d;if(!f){o()}if(!p||!y){return}const w=s(m);const g=s(c.clientWidth-(h+p));const x=s(c.clientHeight-(m+y));const b=s(h);const v=-w+"px "+-g+"px "+-x+"px "+-b+"px";const A={rootMargin:v,threshold:e(0,n(1,u))||1};let S=true;function O(n){const e=n[0].intersectionRatio;if(e!==u){if(!S){return a()}if(!e){r=setTimeout((()=>{a(false,1e-7)}),1e3)}else{a(false,e)}}if(e===1&&!Ut(d,t.getBoundingClientRect())){a()}S=false}try{i=new IntersectionObserver(O,{...A,root:c.ownerDocument})}catch(t){i=new IntersectionObserver(O,A)}i.observe(t)}a(true);return l}function Yt(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:s=true,ancestorResize:i=true,elementResize:r=typeof ResizeObserver==="function",layoutShift:c=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=gt(t);const f=s||i?[...a?pt(a):[],...pt(n)]:[];f.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:true});i&&t.addEventListener("resize",e)}));const u=a&&c?Xt(a,e):null;let d=-1;let h=null;if(r){h=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&h){h.unobserve(n);cancelAnimationFrame(d);d=requestAnimationFrame((()=>{var t;(t=h)==null||t.observe(n)}))}e()}));if(a&&!l){h.observe(a)}h.observe(n)}let m;let p=l?St(t):null;if(l){y()}function y(){const n=St(t);if(p&&!Ut(p,n)){e()}p=n;m=requestAnimationFrame(y)}e();return()=>{var t;f.forEach((t=>{s&&t.removeEventListener("scroll",e);i&&t.removeEventListener("resize",e)}));u==null||u();(t=h)==null||t.disconnect();h=null;if(l){cancelAnimationFrame(m)}}}const _t=I;const Gt=N;const Jt=j;const Kt=W;const Qt=$;const Zt=H;const tn=(t,n,e)=>{const o=new Map;const s={platform:Vt,...e};const i={...s.platform,_c:o};return T(t,n,{...s,platform:i})};class nn{panel;trigger;options;cleanUp;constructor(t,n,e){this.trigger=t;this.panel=n;this.options={distance:20,placement:"bottom",strategy:"fixed",sameWidth:false,...e};this.init(e)}init(t){this.options=Object.assign(this.options,t);this.update()}update(){this.cleanUp=Yt(this.trigger,this.panel,(()=>{(async()=>{const{x:t,y:n,placement:e,middlewareData:o}=await tn(this.trigger,this.panel,{placement:this.options.placement,strategy:this.options.strategy,middleware:[_t({mainAxis:this.options.distance,crossAxis:this.options.skidding}),Jt(),Gt(),Kt(this.options.sameWidth&&{apply({rects:t,elements:n}){Object.assign(n.floating.style,{width:`${t.reference.width}px`})}}),Zt({element:this.options.arrow||null}),this.positionChange(),Qt()]});this.applyPanelPosition(t,n);this.applyArrowPosition(e,o);this.applyVisibility(o)})()}))}destroy(){if(!this.cleanUp)return;this.cleanUp()}positionChange(){return{name:"positionChange",fn:({placement:t})=>{if(typeof this.options.onPositionChange!=="function")return{};this.options.onPositionChange(t);return{}}}}applyPanelPosition(t,n){Object.assign(this.panel.style,{top:"0",left:"0",transform:`translate(${this.roundByDPR(t)}px,${this.roundByDPR(n)}px)`})}applyArrowPosition(t,n){if(!this.options.arrow)return;const{x:e,y:o}=n.arrow;const s={top:"bottom",right:"left",bottom:"top",left:"right"}[t.split("-")[0]];Object.assign(this.options.arrow.style,{left:e!=null?`${e}px`:"",top:o!=null?`${o}px`:"",right:"",bottom:"",[s]:"-4px"})}applyVisibility(t){const{referenceHidden:n}=t.hide;Object.assign(this.panel.style,{visibility:n?"hidden":"visible"})}roundByDPR(t){const n=window.devicePixelRatio||1;return Math.round(t*n)/n}}export{nn as F};
1787
6
  //# sourceMappingURL=p-CmKvDWiL.js.map