@siemens/ix 0.0.0-pr-1974-20250627114851 → 0.0.0-pr-1974-20250627142646

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 (642) hide show
  1. package/components/custom-elements.d.ts +11 -0
  2. package/components/index.d.ts +33 -0
  3. package/components/index.js +122 -0
  4. package/components/index.js.map +1 -0
  5. package/components/ix-action-card.d.ts +11 -0
  6. package/components/ix-action-card.js +72 -0
  7. package/components/ix-action-card.js.map +1 -0
  8. package/components/ix-application-header.d.ts +11 -0
  9. package/components/ix-application-header.js +9 -0
  10. package/components/ix-application-header.js.map +1 -0
  11. package/components/ix-application-sidebar.d.ts +11 -0
  12. package/components/ix-application-sidebar.js +64 -0
  13. package/components/ix-application-sidebar.js.map +1 -0
  14. package/components/ix-application-switch-modal.d.ts +11 -0
  15. package/components/ix-application-switch-modal.js +106 -0
  16. package/components/ix-application-switch-modal.js.map +1 -0
  17. package/components/ix-application.d.ts +11 -0
  18. package/components/ix-application.js +148 -0
  19. package/components/ix-application.js.map +1 -0
  20. package/components/ix-avatar.d.ts +11 -0
  21. package/components/ix-avatar.js +9 -0
  22. package/components/ix-avatar.js.map +1 -0
  23. package/components/ix-basic-navigation.d.ts +11 -0
  24. package/components/ix-basic-navigation.js +154 -0
  25. package/components/ix-basic-navigation.js.map +1 -0
  26. package/components/ix-blind.d.ts +11 -0
  27. package/components/ix-blind.js +130 -0
  28. package/components/ix-blind.js.map +1 -0
  29. package/components/ix-breadcrumb-item.d.ts +11 -0
  30. package/components/ix-breadcrumb-item.js +9 -0
  31. package/components/ix-breadcrumb-item.js.map +1 -0
  32. package/components/ix-breadcrumb.d.ts +11 -0
  33. package/components/ix-breadcrumb.js +169 -0
  34. package/components/ix-breadcrumb.js.map +1 -0
  35. package/components/ix-button.d.ts +11 -0
  36. package/components/ix-button.js +9 -0
  37. package/components/ix-button.js.map +1 -0
  38. package/components/ix-card-accordion.d.ts +11 -0
  39. package/components/ix-card-accordion.js +9 -0
  40. package/components/ix-card-accordion.js.map +1 -0
  41. package/components/ix-card-content.d.ts +11 -0
  42. package/components/ix-card-content.js +9 -0
  43. package/components/ix-card-content.js.map +1 -0
  44. package/components/ix-card-list.d.ts +11 -0
  45. package/components/ix-card-list.js +256 -0
  46. package/components/ix-card-list.js.map +1 -0
  47. package/components/ix-card-title.d.ts +11 -0
  48. package/components/ix-card-title.js +9 -0
  49. package/components/ix-card-title.js.map +1 -0
  50. package/components/ix-card.d.ts +11 -0
  51. package/components/ix-card.js +9 -0
  52. package/components/ix-card.js.map +1 -0
  53. package/components/ix-category-filter.d.ts +11 -0
  54. package/components/ix-category-filter.js +600 -0
  55. package/components/ix-category-filter.js.map +1 -0
  56. package/components/ix-checkbox-group.d.ts +11 -0
  57. package/components/ix-checkbox-group.js +158 -0
  58. package/components/ix-checkbox-group.js.map +1 -0
  59. package/components/ix-checkbox.d.ts +11 -0
  60. package/components/ix-checkbox.js +163 -0
  61. package/components/ix-checkbox.js.map +1 -0
  62. package/components/ix-chip.d.ts +11 -0
  63. package/components/ix-chip.js +154 -0
  64. package/components/ix-chip.js.map +1 -0
  65. package/components/ix-col.d.ts +11 -0
  66. package/components/ix-col.js +9 -0
  67. package/components/ix-col.js.map +1 -0
  68. package/components/ix-content-header.d.ts +11 -0
  69. package/components/ix-content-header.js +73 -0
  70. package/components/ix-content-header.js.map +1 -0
  71. package/components/ix-content.d.ts +11 -0
  72. package/components/ix-content.js +49 -0
  73. package/components/ix-content.js.map +1 -0
  74. package/components/ix-css-grid-item.d.ts +11 -0
  75. package/components/ix-css-grid-item.js +40 -0
  76. package/components/ix-css-grid-item.js.map +1 -0
  77. package/components/ix-css-grid.d.ts +11 -0
  78. package/components/ix-css-grid.js +117 -0
  79. package/components/ix-css-grid.js.map +1 -0
  80. package/components/ix-custom-field.d.ts +11 -0
  81. package/components/ix-custom-field.js +112 -0
  82. package/components/ix-custom-field.js.map +1 -0
  83. package/components/ix-date-dropdown.d.ts +11 -0
  84. package/components/ix-date-dropdown.js +368 -0
  85. package/components/ix-date-dropdown.js.map +1 -0
  86. package/components/ix-date-input.d.ts +11 -0
  87. package/components/ix-date-input.js +393 -0
  88. package/components/ix-date-input.js.map +1 -0
  89. package/components/ix-date-picker.d.ts +11 -0
  90. package/components/ix-date-picker.js +9 -0
  91. package/components/ix-date-picker.js.map +1 -0
  92. package/components/ix-date-time-card.d.ts +11 -0
  93. package/components/ix-date-time-card.js +9 -0
  94. package/components/ix-date-time-card.js.map +1 -0
  95. package/components/ix-datetime-picker.d.ts +11 -0
  96. package/components/ix-datetime-picker.js +204 -0
  97. package/components/ix-datetime-picker.js.map +1 -0
  98. package/components/ix-divider.d.ts +11 -0
  99. package/components/ix-divider.js +9 -0
  100. package/components/ix-divider.js.map +1 -0
  101. package/components/ix-drawer.d.ts +11 -0
  102. package/components/ix-drawer.js +200 -0
  103. package/components/ix-drawer.js.map +1 -0
  104. package/components/ix-dropdown-button.d.ts +11 -0
  105. package/components/ix-dropdown-button.js +106 -0
  106. package/components/ix-dropdown-button.js.map +1 -0
  107. package/components/ix-dropdown-header.d.ts +11 -0
  108. package/components/ix-dropdown-header.js +44 -0
  109. package/components/ix-dropdown-header.js.map +1 -0
  110. package/components/ix-dropdown-item.d.ts +11 -0
  111. package/components/ix-dropdown-item.js +9 -0
  112. package/components/ix-dropdown-item.js.map +1 -0
  113. package/components/ix-dropdown-quick-actions.d.ts +11 -0
  114. package/components/ix-dropdown-quick-actions.js +36 -0
  115. package/components/ix-dropdown-quick-actions.js.map +1 -0
  116. package/components/ix-dropdown.d.ts +11 -0
  117. package/components/ix-dropdown.js +9 -0
  118. package/components/ix-dropdown.js.map +1 -0
  119. package/components/ix-empty-state.d.ts +11 -0
  120. package/components/ix-empty-state.js +65 -0
  121. package/components/ix-empty-state.js.map +1 -0
  122. package/components/ix-event-list-item.d.ts +11 -0
  123. package/components/ix-event-list-item.js +72 -0
  124. package/components/ix-event-list-item.js.map +1 -0
  125. package/components/ix-event-list.d.ts +11 -0
  126. package/components/ix-event-list.js +173 -0
  127. package/components/ix-event-list.js.map +1 -0
  128. package/components/ix-expanding-search.d.ts +11 -0
  129. package/components/ix-expanding-search.js +145 -0
  130. package/components/ix-expanding-search.js.map +1 -0
  131. package/components/ix-field-label.d.ts +11 -0
  132. package/components/ix-field-label.js +9 -0
  133. package/components/ix-field-label.js.map +1 -0
  134. package/components/ix-field-wrapper.d.ts +11 -0
  135. package/components/ix-field-wrapper.js +9 -0
  136. package/components/ix-field-wrapper.js.map +1 -0
  137. package/components/ix-filter-chip.d.ts +11 -0
  138. package/components/ix-filter-chip.js +9 -0
  139. package/components/ix-filter-chip.js.map +1 -0
  140. package/components/ix-flip-tile-content.d.ts +11 -0
  141. package/components/ix-flip-tile-content.js +44 -0
  142. package/components/ix-flip-tile-content.js.map +1 -0
  143. package/components/ix-flip-tile.d.ts +11 -0
  144. package/components/ix-flip-tile.js +153 -0
  145. package/components/ix-flip-tile.js.map +1 -0
  146. package/components/ix-group-context-menu.d.ts +11 -0
  147. package/components/ix-group-context-menu.js +9 -0
  148. package/components/ix-group-context-menu.js.map +1 -0
  149. package/components/ix-group-item.d.ts +11 -0
  150. package/components/ix-group-item.js +9 -0
  151. package/components/ix-group-item.js.map +1 -0
  152. package/components/ix-group.d.ts +11 -0
  153. package/components/ix-group.js +221 -0
  154. package/components/ix-group.js.map +1 -0
  155. package/components/ix-helper-text.d.ts +11 -0
  156. package/components/ix-helper-text.js +95 -0
  157. package/components/ix-helper-text.js.map +1 -0
  158. package/components/ix-icon-button.d.ts +11 -0
  159. package/components/ix-icon-button.js +9 -0
  160. package/components/ix-icon-button.js.map +1 -0
  161. package/components/ix-icon-toggle-button.d.ts +11 -0
  162. package/components/ix-icon-toggle-button.js +149 -0
  163. package/components/ix-icon-toggle-button.js.map +1 -0
  164. package/components/ix-input-group.d.ts +11 -0
  165. package/components/ix-input-group.js +152 -0
  166. package/components/ix-input-group.js.map +1 -0
  167. package/components/ix-input.d.ts +11 -0
  168. package/components/ix-input.js +248 -0
  169. package/components/ix-input.js.map +1 -0
  170. package/components/ix-key-value-list.d.ts +11 -0
  171. package/components/ix-key-value-list.js +42 -0
  172. package/components/ix-key-value-list.js.map +1 -0
  173. package/components/ix-key-value.d.ts +11 -0
  174. package/components/ix-key-value.js +48 -0
  175. package/components/ix-key-value.js.map +1 -0
  176. package/components/ix-kpi.d.ts +11 -0
  177. package/components/ix-kpi.js +74 -0
  178. package/components/ix-kpi.js.map +1 -0
  179. package/components/ix-layout-auto.d.ts +11 -0
  180. package/components/ix-layout-auto.js +113 -0
  181. package/components/ix-layout-auto.js.map +1 -0
  182. package/components/ix-layout-grid.d.ts +11 -0
  183. package/components/ix-layout-grid.js +9 -0
  184. package/components/ix-layout-grid.js.map +1 -0
  185. package/components/ix-link-button.d.ts +11 -0
  186. package/components/ix-link-button.js +57 -0
  187. package/components/ix-link-button.js.map +1 -0
  188. package/components/ix-map-navigation-overlay.d.ts +11 -0
  189. package/components/ix-map-navigation-overlay.js +9 -0
  190. package/components/ix-map-navigation-overlay.js.map +1 -0
  191. package/components/ix-map-navigation.d.ts +11 -0
  192. package/components/ix-map-navigation.js +240 -0
  193. package/components/ix-map-navigation.js.map +1 -0
  194. package/components/ix-menu-about-item.d.ts +11 -0
  195. package/components/ix-menu-about-item.js +51 -0
  196. package/components/ix-menu-about-item.js.map +1 -0
  197. package/components/ix-menu-about-news.d.ts +11 -0
  198. package/components/ix-menu-about-news.js +93 -0
  199. package/components/ix-menu-about-news.js.map +1 -0
  200. package/components/ix-menu-about.d.ts +11 -0
  201. package/components/ix-menu-about.js +89 -0
  202. package/components/ix-menu-about.js.map +1 -0
  203. package/components/ix-menu-avatar-item.d.ts +11 -0
  204. package/components/ix-menu-avatar-item.js +9 -0
  205. package/components/ix-menu-avatar-item.js.map +1 -0
  206. package/components/ix-menu-avatar.d.ts +11 -0
  207. package/components/ix-menu-avatar.js +115 -0
  208. package/components/ix-menu-avatar.js.map +1 -0
  209. package/components/ix-menu-category.d.ts +11 -0
  210. package/components/ix-menu-category.js +284 -0
  211. package/components/ix-menu-category.js.map +1 -0
  212. package/components/ix-menu-expand-icon.d.ts +11 -0
  213. package/components/ix-menu-expand-icon.js +9 -0
  214. package/components/ix-menu-expand-icon.js.map +1 -0
  215. package/components/ix-menu-item.d.ts +11 -0
  216. package/components/ix-menu-item.js +9 -0
  217. package/components/ix-menu-item.js.map +1 -0
  218. package/components/ix-menu-settings-item.d.ts +11 -0
  219. package/components/ix-menu-settings-item.js +51 -0
  220. package/components/ix-menu-settings-item.js.map +1 -0
  221. package/components/ix-menu-settings.d.ts +11 -0
  222. package/components/ix-menu-settings.js +9 -0
  223. package/components/ix-menu-settings.js.map +1 -0
  224. package/components/ix-menu.d.ts +11 -0
  225. package/components/ix-menu.js +590 -0
  226. package/components/ix-menu.js.map +1 -0
  227. package/components/ix-message-bar.d.ts +11 -0
  228. package/components/ix-message-bar.js +103 -0
  229. package/components/ix-message-bar.js.map +1 -0
  230. package/components/ix-modal-content.d.ts +11 -0
  231. package/components/ix-modal-content.js +9 -0
  232. package/components/ix-modal-content.js.map +1 -0
  233. package/components/ix-modal-footer.d.ts +11 -0
  234. package/components/ix-modal-footer.js +36 -0
  235. package/components/ix-modal-footer.js.map +1 -0
  236. package/components/ix-modal-header.d.ts +11 -0
  237. package/components/ix-modal-header.js +9 -0
  238. package/components/ix-modal-header.js.map +1 -0
  239. package/components/ix-modal-loading.d.ts +11 -0
  240. package/components/ix-modal-loading.js +42 -0
  241. package/components/ix-modal-loading.js.map +1 -0
  242. package/components/ix-modal.d.ts +11 -0
  243. package/components/ix-modal.js +241 -0
  244. package/components/ix-modal.js.map +1 -0
  245. package/components/ix-number-input.d.ts +11 -0
  246. package/components/ix-number-input.js +241 -0
  247. package/components/ix-number-input.js.map +1 -0
  248. package/components/ix-pagination.d.ts +11 -0
  249. package/components/ix-pagination.js +261 -0
  250. package/components/ix-pagination.js.map +1 -0
  251. package/components/ix-pane-layout.d.ts +11 -0
  252. package/components/ix-pane-layout.js +311 -0
  253. package/components/ix-pane-layout.js.map +1 -0
  254. package/components/ix-pane.d.ts +11 -0
  255. package/components/ix-pane.js +568 -0
  256. package/components/ix-pane.js.map +1 -0
  257. package/components/ix-pill.d.ts +11 -0
  258. package/components/ix-pill.js +127 -0
  259. package/components/ix-pill.js.map +1 -0
  260. package/components/ix-progress-indicator.d.ts +11 -0
  261. package/components/ix-progress-indicator.js +193 -0
  262. package/components/ix-progress-indicator.js.map +1 -0
  263. package/components/ix-push-card.d.ts +11 -0
  264. package/components/ix-push-card.js +82 -0
  265. package/components/ix-push-card.js.map +1 -0
  266. package/components/ix-radio-group.d.ts +11 -0
  267. package/components/ix-radio-group.js +195 -0
  268. package/components/ix-radio-group.js.map +1 -0
  269. package/components/ix-radio.d.ts +11 -0
  270. package/components/ix-radio.js +145 -0
  271. package/components/ix-radio.js.map +1 -0
  272. package/components/ix-row.d.ts +11 -0
  273. package/components/ix-row.js +9 -0
  274. package/components/ix-row.js.map +1 -0
  275. package/components/ix-select-item.d.ts +11 -0
  276. package/components/ix-select-item.js +9 -0
  277. package/components/ix-select-item.js.map +1 -0
  278. package/components/ix-select.d.ts +11 -0
  279. package/components/ix-select.js +9 -0
  280. package/components/ix-select.js.map +1 -0
  281. package/components/ix-slider.d.ts +11 -0
  282. package/components/ix-slider.js +255 -0
  283. package/components/ix-slider.js.map +1 -0
  284. package/components/ix-spinner.d.ts +11 -0
  285. package/components/ix-spinner.js +9 -0
  286. package/components/ix-spinner.js.map +1 -0
  287. package/components/ix-split-button.d.ts +11 -0
  288. package/components/ix-split-button.js +117 -0
  289. package/components/ix-split-button.js.map +1 -0
  290. package/components/ix-tab-item.d.ts +11 -0
  291. package/components/ix-tab-item.js +9 -0
  292. package/components/ix-tab-item.js.map +1 -0
  293. package/components/ix-tabs.d.ts +11 -0
  294. package/components/ix-tabs.js +9 -0
  295. package/components/ix-tabs.js.map +1 -0
  296. package/components/ix-textarea.d.ts +11 -0
  297. package/components/ix-textarea.js +192 -0
  298. package/components/ix-textarea.js.map +1 -0
  299. package/components/ix-tile.d.ts +11 -0
  300. package/components/ix-tile.js +63 -0
  301. package/components/ix-tile.js.map +1 -0
  302. package/components/ix-time-input.d.ts +11 -0
  303. package/components/ix-time-input.js +442 -0
  304. package/components/ix-time-input.js.map +1 -0
  305. package/components/ix-time-picker.d.ts +11 -0
  306. package/components/ix-time-picker.js +9 -0
  307. package/components/ix-time-picker.js.map +1 -0
  308. package/components/ix-toast-container.d.ts +11 -0
  309. package/components/ix-toast-container.js +143 -0
  310. package/components/ix-toast-container.js.map +1 -0
  311. package/components/ix-toast.d.ts +11 -0
  312. package/components/ix-toast.js +9 -0
  313. package/components/ix-toast.js.map +1 -0
  314. package/components/ix-toggle-button.d.ts +11 -0
  315. package/components/ix-toggle-button.js +128 -0
  316. package/components/ix-toggle-button.js.map +1 -0
  317. package/components/ix-toggle.d.ts +11 -0
  318. package/components/ix-toggle.js +188 -0
  319. package/components/ix-toggle.js.map +1 -0
  320. package/components/ix-tooltip.d.ts +11 -0
  321. package/components/ix-tooltip.js +9 -0
  322. package/components/ix-tooltip.js.map +1 -0
  323. package/components/ix-tree-item.d.ts +11 -0
  324. package/components/ix-tree-item.js +9 -0
  325. package/components/ix-tree-item.js.map +1 -0
  326. package/components/ix-tree.d.ts +11 -0
  327. package/components/ix-tree.js +610 -0
  328. package/components/ix-tree.js.map +1 -0
  329. package/components/ix-typography.d.ts +11 -0
  330. package/components/ix-typography.js +9 -0
  331. package/components/ix-typography.js.map +1 -0
  332. package/components/ix-upload.d.ts +11 -0
  333. package/components/ix-upload.js +234 -0
  334. package/components/ix-upload.js.map +1 -0
  335. package/components/ix-validation-tooltip.d.ts +11 -0
  336. package/components/ix-validation-tooltip.js +182 -0
  337. package/components/ix-validation-tooltip.js.map +1 -0
  338. package/components/ix-workflow-step.d.ts +11 -0
  339. package/components/ix-workflow-step.js +147 -0
  340. package/components/ix-workflow-step.js.map +1 -0
  341. package/components/ix-workflow-steps.d.ts +11 -0
  342. package/components/ix-workflow-steps.js +112 -0
  343. package/components/ix-workflow-steps.js.map +1 -0
  344. package/components/p--2LOMK-5.js +105 -0
  345. package/components/p--2LOMK-5.js.map +1 -0
  346. package/components/p-5uA5ifmT.js +72 -0
  347. package/components/p-5uA5ifmT.js.map +1 -0
  348. package/components/p-9dLpp1OQ.js +71 -0
  349. package/components/p-9dLpp1OQ.js.map +1 -0
  350. package/components/p-B1Gzt08S.js +51 -0
  351. package/components/p-B1Gzt08S.js.map +1 -0
  352. package/components/p-B3duqvjW.js +33 -0
  353. package/components/p-B3duqvjW.js.map +1 -0
  354. package/components/p-B6e7P4xT.js +42 -0
  355. package/components/p-B6e7P4xT.js.map +1 -0
  356. package/components/p-BGzrnl_l.js +21 -0
  357. package/components/p-BGzrnl_l.js.map +1 -0
  358. package/components/p-BH3f5fa3.js +37 -0
  359. package/components/p-BH3f5fa3.js.map +1 -0
  360. package/components/p-BJcX2_-N.js +110 -0
  361. package/components/p-BJcX2_-N.js.map +1 -0
  362. package/components/p-BMU8AlMD.js +107 -0
  363. package/components/p-BMU8AlMD.js.map +1 -0
  364. package/components/p-BNu7ac9R.js +79 -0
  365. package/components/p-BNu7ac9R.js.map +1 -0
  366. package/components/p-BP-8cvOJ.js +90 -0
  367. package/components/p-BP-8cvOJ.js.map +1 -0
  368. package/components/p-BQ6999e5.js +22 -0
  369. package/components/p-BQ6999e5.js.map +1 -0
  370. package/components/p-BXjBChze.js +130 -0
  371. package/components/p-BXjBChze.js.map +1 -0
  372. package/components/p-Bb7pDeaQ.js +144 -0
  373. package/components/p-Bb7pDeaQ.js.map +1 -0
  374. package/components/p-BcGAKMQ_.js +76 -0
  375. package/components/p-BcGAKMQ_.js.map +1 -0
  376. package/components/p-BdCnOrqW.js +47 -0
  377. package/components/p-BdCnOrqW.js.map +1 -0
  378. package/components/p-BedSAVZh.js +90 -0
  379. package/components/p-BedSAVZh.js.map +1 -0
  380. package/components/p-BhLbU_vK.js +129 -0
  381. package/components/p-BhLbU_vK.js.map +1 -0
  382. package/components/p-Bi1VyG64.js +46 -0
  383. package/components/p-Bi1VyG64.js.map +1 -0
  384. package/components/p-BkWbk29R.js +75 -0
  385. package/components/p-BkWbk29R.js.map +1 -0
  386. package/components/p-BmmgJGNd.js +64 -0
  387. package/components/p-BmmgJGNd.js.map +1 -0
  388. package/components/p-Bu-j8wxy.js +162 -0
  389. package/components/p-Bu-j8wxy.js.map +1 -0
  390. package/components/p-BuJ6BWIi.js +2042 -0
  391. package/components/p-BuJ6BWIi.js.map +1 -0
  392. package/components/p-Bvsx56zn.js +203 -0
  393. package/components/p-Bvsx56zn.js.map +1 -0
  394. package/components/p-BygLxZIM.js +54 -0
  395. package/components/p-BygLxZIM.js.map +1 -0
  396. package/components/p-Bzyt4nTL.js +110 -0
  397. package/components/p-Bzyt4nTL.js.map +1 -0
  398. package/components/p-C6o-AByw.js +33 -0
  399. package/components/p-C6o-AByw.js.map +1 -0
  400. package/components/p-CAqtPJ4-.js +1786 -0
  401. package/components/p-CAqtPJ4-.js.map +1 -0
  402. package/components/p-CGwHQeMX.js +54 -0
  403. package/components/p-CGwHQeMX.js.map +1 -0
  404. package/components/p-CKkTXQiw.js +164 -0
  405. package/components/p-CKkTXQiw.js.map +1 -0
  406. package/components/p-CX81WQtk.js +14 -0
  407. package/components/p-CX81WQtk.js.map +1 -0
  408. package/components/p-Cb-eBcUF.js +61 -0
  409. package/components/p-Cb-eBcUF.js.map +1 -0
  410. package/components/p-Cp5J1RZq.js +765 -0
  411. package/components/p-Cp5J1RZq.js.map +1 -0
  412. package/components/p-Cpxz1Kcs.js +19 -0
  413. package/components/p-Cpxz1Kcs.js.map +1 -0
  414. package/components/p-Cs8DEpjh.js +611 -0
  415. package/components/p-Cs8DEpjh.js.map +1 -0
  416. package/components/p-Cut5OrRw.js +461 -0
  417. package/components/p-Cut5OrRw.js.map +1 -0
  418. package/components/p-CvvOe8xV.js +151 -0
  419. package/components/p-CvvOe8xV.js.map +1 -0
  420. package/components/p-CyFFBc_G.js +100 -0
  421. package/components/p-CyFFBc_G.js.map +1 -0
  422. package/components/p-D3Aowo70.js +113 -0
  423. package/components/p-D3Aowo70.js.map +1 -0
  424. package/components/p-D3K9vmFp.js +157 -0
  425. package/components/p-D3K9vmFp.js.map +1 -0
  426. package/components/p-D6vSVaHq.js +26 -0
  427. package/components/p-D6vSVaHq.js.map +1 -0
  428. package/components/p-D9LaIICQ.js +118 -0
  429. package/components/p-D9LaIICQ.js.map +1 -0
  430. package/components/p-DCx3-1oU.js +310 -0
  431. package/components/p-DCx3-1oU.js.map +1 -0
  432. package/components/p-DDHkNPby.js +79 -0
  433. package/components/p-DDHkNPby.js.map +1 -0
  434. package/components/p-DJ7U7oUq.js +89 -0
  435. package/components/p-DJ7U7oUq.js.map +1 -0
  436. package/components/p-DMlmNp-B.js +33 -0
  437. package/components/p-DMlmNp-B.js.map +1 -0
  438. package/components/p-DWO4uklL.js +146 -0
  439. package/components/p-DWO4uklL.js.map +1 -0
  440. package/components/p-DaztMgDr.js +757 -0
  441. package/components/p-DaztMgDr.js.map +1 -0
  442. package/components/p-DbR-LZrk.js +33 -0
  443. package/components/p-DbR-LZrk.js.map +1 -0
  444. package/components/p-DfbCO042.js +207 -0
  445. package/components/p-DfbCO042.js.map +1 -0
  446. package/components/p-DkGdSI6e.js +103 -0
  447. package/components/p-DkGdSI6e.js.map +1 -0
  448. package/components/p-DojBQCbP.js +55 -0
  449. package/components/p-DojBQCbP.js.map +1 -0
  450. package/components/p-Dp15M30K.js +20 -0
  451. package/components/p-Dp15M30K.js.map +1 -0
  452. package/components/p-Dp4RJcgZ.js +125 -0
  453. package/components/p-Dp4RJcgZ.js.map +1 -0
  454. package/components/p-DyHdZRT0.js +359 -0
  455. package/components/p-DyHdZRT0.js.map +1 -0
  456. package/components/p-DyMgW0fR.js +65 -0
  457. package/components/p-DyMgW0fR.js.map +1 -0
  458. package/components/p-G0biE2Kx.js +33 -0
  459. package/components/p-G0biE2Kx.js.map +1 -0
  460. package/components/p-JJddxCCh.js +42 -0
  461. package/components/p-JJddxCCh.js.map +1 -0
  462. package/components/p-Ooq8eqJM.js +33 -0
  463. package/components/p-Ooq8eqJM.js.map +1 -0
  464. package/components/p-Ou74PMQs.js +1313 -0
  465. package/components/p-Ou74PMQs.js.map +1 -0
  466. package/components/p-PxA_udyJ.js +254 -0
  467. package/components/p-PxA_udyJ.js.map +1 -0
  468. package/components/p-TNoCM8Wi.js +83 -0
  469. package/components/p-TNoCM8Wi.js.map +1 -0
  470. package/components/p-UQa1aROL.js +23 -0
  471. package/components/p-UQa1aROL.js.map +1 -0
  472. package/components/p-bDicGJUN.js +7697 -0
  473. package/components/p-bDicGJUN.js.map +1 -0
  474. package/components/p-bcj7UEIC.js +24 -0
  475. package/components/p-bcj7UEIC.js.map +1 -0
  476. package/components/p-kY0vP3rC.js +122 -0
  477. package/components/p-kY0vP3rC.js.map +1 -0
  478. package/components/p-qauH9Ci4.js +54 -0
  479. package/components/p-qauH9Ci4.js.map +1 -0
  480. package/components/p-r63hglsv.js +90 -0
  481. package/components/p-r63hglsv.js.map +1 -0
  482. package/components/p-tH4n038Z.js +48 -0
  483. package/components/p-tH4n038Z.js.map +1 -0
  484. package/components/package.json +9 -0
  485. package/package.json +3 -2
  486. package/dist/collection/components/application-header/test/application-header.ct.js +0 -389
  487. package/dist/collection/components/application-header/test/application-header.ct.js.map +0 -1
  488. package/dist/collection/components/avatar/test/avatar.ct.js +0 -85
  489. package/dist/collection/components/avatar/test/avatar.ct.js.map +0 -1
  490. package/dist/collection/components/blind/test/blind.ct.js +0 -16
  491. package/dist/collection/components/blind/test/blind.ct.js.map +0 -1
  492. package/dist/collection/components/breadcrumb/test/breadcrumb.ct.js +0 -98
  493. package/dist/collection/components/breadcrumb/test/breadcrumb.ct.js.map +0 -1
  494. package/dist/collection/components/button/test/button.ct.js +0 -153
  495. package/dist/collection/components/button/test/button.ct.js.map +0 -1
  496. package/dist/collection/components/category-filter/test/category-filter.ct.js +0 -62
  497. package/dist/collection/components/category-filter/test/category-filter.ct.js.map +0 -1
  498. package/dist/collection/components/checkbox/tests/checkbox.ct.js +0 -86
  499. package/dist/collection/components/checkbox/tests/checkbox.ct.js.map +0 -1
  500. package/dist/collection/components/checkbox-group/test/checkbox-group.ct.js +0 -48
  501. package/dist/collection/components/checkbox-group/test/checkbox-group.ct.js.map +0 -1
  502. package/dist/collection/components/chip/test/chip.ct.js +0 -76
  503. package/dist/collection/components/chip/test/chip.ct.js.map +0 -1
  504. package/dist/collection/components/custom-field/tests/custom-field.ct.js +0 -68
  505. package/dist/collection/components/custom-field/tests/custom-field.ct.js.map +0 -1
  506. package/dist/collection/components/date-dropdown/test/date-dropdown.ct.js +0 -215
  507. package/dist/collection/components/date-dropdown/test/date-dropdown.ct.js.map +0 -1
  508. package/dist/collection/components/date-input/tests/date-input.ct.js +0 -117
  509. package/dist/collection/components/date-input/tests/date-input.ct.js.map +0 -1
  510. package/dist/collection/components/date-picker/test/date-picker.ct.js +0 -221
  511. package/dist/collection/components/date-picker/test/date-picker.ct.js.map +0 -1
  512. package/dist/collection/components/datetime-picker/test/datetime-picker.ct.js +0 -55
  513. package/dist/collection/components/datetime-picker/test/datetime-picker.ct.js.map +0 -1
  514. package/dist/collection/components/drawer/test/drawer.ct.js +0 -67
  515. package/dist/collection/components/drawer/test/drawer.ct.js.map +0 -1
  516. package/dist/collection/components/dropdown/test/dropdown.ct.js +0 -624
  517. package/dist/collection/components/dropdown/test/dropdown.ct.js.map +0 -1
  518. package/dist/collection/components/dropdown-button/dropdown-button.ct.js +0 -51
  519. package/dist/collection/components/dropdown-button/dropdown-button.ct.js.map +0 -1
  520. package/dist/collection/components/event-list/test/event-list.ct.js +0 -88
  521. package/dist/collection/components/event-list/test/event-list.ct.js.map +0 -1
  522. package/dist/collection/components/expanding-search/test/expanding-search.ct.js +0 -56
  523. package/dist/collection/components/expanding-search/test/expanding-search.ct.js.map +0 -1
  524. package/dist/collection/components/field-label/tests/field-label.ct.js +0 -121
  525. package/dist/collection/components/field-label/tests/field-label.ct.js.map +0 -1
  526. package/dist/collection/components/field-wrapper/tests/field-wrapper.ct.js +0 -63
  527. package/dist/collection/components/field-wrapper/tests/field-wrapper.ct.js.map +0 -1
  528. package/dist/collection/components/flip-tile/test/flip-tile.ct.js +0 -89
  529. package/dist/collection/components/flip-tile/test/flip-tile.ct.js.map +0 -1
  530. package/dist/collection/components/group/test/group.ct.js +0 -115
  531. package/dist/collection/components/group/test/group.ct.js.map +0 -1
  532. package/dist/collection/components/icon-button/test/icon-button.ct.js +0 -30
  533. package/dist/collection/components/icon-button/test/icon-button.ct.js.map +0 -1
  534. package/dist/collection/components/input/tests/form-ready.ct.js +0 -73
  535. package/dist/collection/components/input/tests/form-ready.ct.js.map +0 -1
  536. package/dist/collection/components/input/tests/validation.ct.js +0 -84
  537. package/dist/collection/components/input/tests/validation.ct.js.map +0 -1
  538. package/dist/collection/components/input-group/tests/input-group.ct.js +0 -161
  539. package/dist/collection/components/input-group/tests/input-group.ct.js.map +0 -1
  540. package/dist/collection/components/menu/test/menu.ct.js +0 -256
  541. package/dist/collection/components/menu/test/menu.ct.js.map +0 -1
  542. package/dist/collection/components/menu-about/test/menu-about.ct.js +0 -65
  543. package/dist/collection/components/menu-about/test/menu-about.ct.js.map +0 -1
  544. package/dist/collection/components/menu-avatar-item/test/menu-avatar-item.ct.js +0 -47
  545. package/dist/collection/components/menu-avatar-item/test/menu-avatar-item.ct.js.map +0 -1
  546. package/dist/collection/components/menu-category/test/menu-category.ct.js +0 -274
  547. package/dist/collection/components/menu-category/test/menu-category.ct.js.map +0 -1
  548. package/dist/collection/components/menu-item/test/menu-item.ct.js +0 -67
  549. package/dist/collection/components/menu-item/test/menu-item.ct.js.map +0 -1
  550. package/dist/collection/components/menu-settings/test/menu-settings.ct.js +0 -32
  551. package/dist/collection/components/menu-settings/test/menu-settings.ct.js.map +0 -1
  552. package/dist/collection/components/message-bar/test/message-bar.ct.js +0 -28
  553. package/dist/collection/components/message-bar/test/message-bar.ct.js.map +0 -1
  554. package/dist/collection/components/modal/test/modal.ct.js +0 -204
  555. package/dist/collection/components/modal/test/modal.ct.js.map +0 -1
  556. package/dist/collection/components/pagination/test/pagination.ct.js +0 -68
  557. package/dist/collection/components/pagination/test/pagination.ct.js.map +0 -1
  558. package/dist/collection/components/pane/test/panes.ct.js +0 -59
  559. package/dist/collection/components/pane/test/panes.ct.js.map +0 -1
  560. package/dist/collection/components/pane-layout/test/pane-layout.ct.js +0 -60
  561. package/dist/collection/components/pane-layout/test/pane-layout.ct.js.map +0 -1
  562. package/dist/collection/components/pill/test/pill.ct.js +0 -63
  563. package/dist/collection/components/pill/test/pill.ct.js.map +0 -1
  564. package/dist/collection/components/radio/test/radio.ct.js +0 -77
  565. package/dist/collection/components/radio/test/radio.ct.js.map +0 -1
  566. package/dist/collection/components/radio-group/test/radio-group.ct.js +0 -117
  567. package/dist/collection/components/radio-group/test/radio-group.ct.js.map +0 -1
  568. package/dist/collection/components/select/test/select-keyboard.ct.js +0 -380
  569. package/dist/collection/components/select/test/select-keyboard.ct.js.map +0 -1
  570. package/dist/collection/components/select/test/select.ct.js +0 -594
  571. package/dist/collection/components/select/test/select.ct.js.map +0 -1
  572. package/dist/collection/components/slider/test/slider.ct.js +0 -65
  573. package/dist/collection/components/slider/test/slider.ct.js.map +0 -1
  574. package/dist/collection/components/tabs/test/tabs.ct.js +0 -134
  575. package/dist/collection/components/tabs/test/tabs.ct.js.map +0 -1
  576. package/dist/collection/components/time-input/test/time-input.ct.js +0 -62
  577. package/dist/collection/components/time-input/test/time-input.ct.js.map +0 -1
  578. package/dist/collection/components/time-picker/test/time-picker.ct.js +0 -172
  579. package/dist/collection/components/time-picker/test/time-picker.ct.js.map +0 -1
  580. package/dist/collection/components/toggle/test/toggle.ct.js +0 -84
  581. package/dist/collection/components/toggle/test/toggle.ct.js.map +0 -1
  582. package/dist/collection/components/tooltip/test/tooltip.ct.js +0 -243
  583. package/dist/collection/components/tooltip/test/tooltip.ct.js.map +0 -1
  584. package/dist/collection/components/tree/test/tree.ct.js +0 -355
  585. package/dist/collection/components/tree/test/tree.ct.js.map +0 -1
  586. package/dist/collection/components/upload/test/upload.ct.js +0 -17
  587. package/dist/collection/components/upload/test/upload.ct.js.map +0 -1
  588. package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js +0 -74
  589. package/dist/collection/components/workflow-steps/test/workflow-steps.ct.js.map +0 -1
  590. package/dist/collection/tests/utils/test/matchMedia.mock.js +0 -22
  591. package/dist/types/components/application-header/test/application-header.ct.d.ts +0 -1
  592. package/dist/types/components/avatar/test/avatar.ct.d.ts +0 -1
  593. package/dist/types/components/blind/test/blind.ct.d.ts +0 -1
  594. package/dist/types/components/breadcrumb/test/breadcrumb.ct.d.ts +0 -1
  595. package/dist/types/components/button/test/button.ct.d.ts +0 -7
  596. package/dist/types/components/category-filter/test/category-filter.ct.d.ts +0 -1
  597. package/dist/types/components/checkbox/tests/checkbox.ct.d.ts +0 -1
  598. package/dist/types/components/checkbox-group/test/checkbox-group.ct.d.ts +0 -1
  599. package/dist/types/components/chip/test/chip.ct.d.ts +0 -1
  600. package/dist/types/components/custom-field/tests/custom-field.ct.d.ts +0 -1
  601. package/dist/types/components/date-dropdown/test/date-dropdown.ct.d.ts +0 -1
  602. package/dist/types/components/date-input/tests/date-input.ct.d.ts +0 -1
  603. package/dist/types/components/date-picker/test/date-picker.ct.d.ts +0 -1
  604. package/dist/types/components/datetime-picker/test/datetime-picker.ct.d.ts +0 -1
  605. package/dist/types/components/drawer/test/drawer.ct.d.ts +0 -1
  606. package/dist/types/components/dropdown/test/dropdown.ct.d.ts +0 -1
  607. package/dist/types/components/dropdown-button/dropdown-button.ct.d.ts +0 -1
  608. package/dist/types/components/event-list/test/event-list.ct.d.ts +0 -1
  609. package/dist/types/components/expanding-search/test/expanding-search.ct.d.ts +0 -1
  610. package/dist/types/components/field-label/tests/field-label.ct.d.ts +0 -1
  611. package/dist/types/components/field-wrapper/tests/field-wrapper.ct.d.ts +0 -1
  612. package/dist/types/components/flip-tile/test/flip-tile.ct.d.ts +0 -1
  613. package/dist/types/components/group/test/group.ct.d.ts +0 -1
  614. package/dist/types/components/icon-button/test/icon-button.ct.d.ts +0 -1
  615. package/dist/types/components/input/tests/form-ready.ct.d.ts +0 -1
  616. package/dist/types/components/input/tests/validation.ct.d.ts +0 -1
  617. package/dist/types/components/input-group/tests/input-group.ct.d.ts +0 -1
  618. package/dist/types/components/menu/test/menu.ct.d.ts +0 -1
  619. package/dist/types/components/menu-about/test/menu-about.ct.d.ts +0 -1
  620. package/dist/types/components/menu-avatar-item/test/menu-avatar-item.ct.d.ts +0 -1
  621. package/dist/types/components/menu-category/test/menu-category.ct.d.ts +0 -1
  622. package/dist/types/components/menu-item/test/menu-item.ct.d.ts +0 -1
  623. package/dist/types/components/menu-settings/test/menu-settings.ct.d.ts +0 -1
  624. package/dist/types/components/message-bar/test/message-bar.ct.d.ts +0 -1
  625. package/dist/types/components/modal/test/modal.ct.d.ts +0 -8
  626. package/dist/types/components/pagination/test/pagination.ct.d.ts +0 -1
  627. package/dist/types/components/pane/test/panes.ct.d.ts +0 -1
  628. package/dist/types/components/pane-layout/test/pane-layout.ct.d.ts +0 -1
  629. package/dist/types/components/pill/test/pill.ct.d.ts +0 -1
  630. package/dist/types/components/radio/test/radio.ct.d.ts +0 -1
  631. package/dist/types/components/radio-group/test/radio-group.ct.d.ts +0 -1
  632. package/dist/types/components/select/test/select-keyboard.ct.d.ts +0 -1
  633. package/dist/types/components/select/test/select.ct.d.ts +0 -1
  634. package/dist/types/components/slider/test/slider.ct.d.ts +0 -1
  635. package/dist/types/components/tabs/test/tabs.ct.d.ts +0 -1
  636. package/dist/types/components/time-input/test/time-input.ct.d.ts +0 -1
  637. package/dist/types/components/time-picker/test/time-picker.ct.d.ts +0 -1
  638. package/dist/types/components/toggle/test/toggle.ct.d.ts +0 -1
  639. package/dist/types/components/tooltip/test/tooltip.ct.d.ts +0 -1
  640. package/dist/types/components/tree/test/tree.ct.d.ts +0 -1
  641. package/dist/types/components/upload/test/upload.ct.d.ts +0 -1
  642. package/dist/types/components/workflow-steps/test/workflow-steps.ct.d.ts +0 -1
@@ -0,0 +1,1786 @@
1
+ /**
2
+ * Custom positioning reference element.
3
+ * @see https://floating-ui.com/docs/virtual-elements
4
+ */
5
+
6
+ const sides = ['top', 'right', 'bottom', 'left'];
7
+ const min = Math.min;
8
+ const max = Math.max;
9
+ const round = Math.round;
10
+ const floor = Math.floor;
11
+ const createCoords = v => ({
12
+ x: v,
13
+ y: v
14
+ });
15
+ const oppositeSideMap = {
16
+ left: 'right',
17
+ right: 'left',
18
+ bottom: 'top',
19
+ top: 'bottom'
20
+ };
21
+ const oppositeAlignmentMap = {
22
+ start: 'end',
23
+ end: 'start'
24
+ };
25
+ function clamp(start, value, end) {
26
+ return max(start, min(value, end));
27
+ }
28
+ function evaluate(value, param) {
29
+ return typeof value === 'function' ? value(param) : value;
30
+ }
31
+ function getSide(placement) {
32
+ return placement.split('-')[0];
33
+ }
34
+ function getAlignment(placement) {
35
+ return placement.split('-')[1];
36
+ }
37
+ function getOppositeAxis(axis) {
38
+ return axis === 'x' ? 'y' : 'x';
39
+ }
40
+ function getAxisLength(axis) {
41
+ return axis === 'y' ? 'height' : 'width';
42
+ }
43
+ function getSideAxis(placement) {
44
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
45
+ }
46
+ function getAlignmentAxis(placement) {
47
+ return getOppositeAxis(getSideAxis(placement));
48
+ }
49
+ function getAlignmentSides(placement, rects, rtl) {
50
+ if (rtl === void 0) {
51
+ rtl = false;
52
+ }
53
+ const alignment = getAlignment(placement);
54
+ const alignmentAxis = getAlignmentAxis(placement);
55
+ const length = getAxisLength(alignmentAxis);
56
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
57
+ if (rects.reference[length] > rects.floating[length]) {
58
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
59
+ }
60
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
61
+ }
62
+ function getExpandedPlacements(placement) {
63
+ const oppositePlacement = getOppositePlacement(placement);
64
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
65
+ }
66
+ function getOppositeAlignmentPlacement(placement) {
67
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
68
+ }
69
+ function getSideList(side, isStart, rtl) {
70
+ const lr = ['left', 'right'];
71
+ const rl = ['right', 'left'];
72
+ const tb = ['top', 'bottom'];
73
+ const bt = ['bottom', 'top'];
74
+ switch (side) {
75
+ case 'top':
76
+ case 'bottom':
77
+ if (rtl) return isStart ? rl : lr;
78
+ return isStart ? lr : rl;
79
+ case 'left':
80
+ case 'right':
81
+ return isStart ? tb : bt;
82
+ default:
83
+ return [];
84
+ }
85
+ }
86
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
87
+ const alignment = getAlignment(placement);
88
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
89
+ if (alignment) {
90
+ list = list.map(side => side + "-" + alignment);
91
+ if (flipAlignment) {
92
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
93
+ }
94
+ }
95
+ return list;
96
+ }
97
+ function getOppositePlacement(placement) {
98
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
99
+ }
100
+ function expandPaddingObject(padding) {
101
+ return {
102
+ top: 0,
103
+ right: 0,
104
+ bottom: 0,
105
+ left: 0,
106
+ ...padding
107
+ };
108
+ }
109
+ function getPaddingObject(padding) {
110
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
111
+ top: padding,
112
+ right: padding,
113
+ bottom: padding,
114
+ left: padding
115
+ };
116
+ }
117
+ function rectToClientRect(rect) {
118
+ const {
119
+ x,
120
+ y,
121
+ width,
122
+ height
123
+ } = rect;
124
+ return {
125
+ width,
126
+ height,
127
+ top: y,
128
+ left: x,
129
+ right: x + width,
130
+ bottom: y + height,
131
+ x,
132
+ y
133
+ };
134
+ }
135
+
136
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
137
+ let {
138
+ reference,
139
+ floating
140
+ } = _ref;
141
+ const sideAxis = getSideAxis(placement);
142
+ const alignmentAxis = getAlignmentAxis(placement);
143
+ const alignLength = getAxisLength(alignmentAxis);
144
+ const side = getSide(placement);
145
+ const isVertical = sideAxis === 'y';
146
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
147
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
148
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
149
+ let coords;
150
+ switch (side) {
151
+ case 'top':
152
+ coords = {
153
+ x: commonX,
154
+ y: reference.y - floating.height
155
+ };
156
+ break;
157
+ case 'bottom':
158
+ coords = {
159
+ x: commonX,
160
+ y: reference.y + reference.height
161
+ };
162
+ break;
163
+ case 'right':
164
+ coords = {
165
+ x: reference.x + reference.width,
166
+ y: commonY
167
+ };
168
+ break;
169
+ case 'left':
170
+ coords = {
171
+ x: reference.x - floating.width,
172
+ y: commonY
173
+ };
174
+ break;
175
+ default:
176
+ coords = {
177
+ x: reference.x,
178
+ y: reference.y
179
+ };
180
+ }
181
+ switch (getAlignment(placement)) {
182
+ case 'start':
183
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
184
+ break;
185
+ case 'end':
186
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
187
+ break;
188
+ }
189
+ return coords;
190
+ }
191
+
192
+ /**
193
+ * Computes the `x` and `y` coordinates that will place the floating element
194
+ * next to a given reference element.
195
+ *
196
+ * This export does not have any `platform` interface logic. You will need to
197
+ * write one for the platform you are using Floating UI with.
198
+ */
199
+ const computePosition$1 = async (reference, floating, config) => {
200
+ const {
201
+ placement = 'bottom',
202
+ strategy = 'absolute',
203
+ middleware = [],
204
+ platform
205
+ } = config;
206
+ const validMiddleware = middleware.filter(Boolean);
207
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
208
+ let rects = await platform.getElementRects({
209
+ reference,
210
+ floating,
211
+ strategy
212
+ });
213
+ let {
214
+ x,
215
+ y
216
+ } = computeCoordsFromPlacement(rects, placement, rtl);
217
+ let statefulPlacement = placement;
218
+ let middlewareData = {};
219
+ let resetCount = 0;
220
+ for (let i = 0; i < validMiddleware.length; i++) {
221
+ const {
222
+ name,
223
+ fn
224
+ } = validMiddleware[i];
225
+ const {
226
+ x: nextX,
227
+ y: nextY,
228
+ data,
229
+ reset
230
+ } = await fn({
231
+ x,
232
+ y,
233
+ initialPlacement: placement,
234
+ placement: statefulPlacement,
235
+ strategy,
236
+ middlewareData,
237
+ rects,
238
+ platform,
239
+ elements: {
240
+ reference,
241
+ floating
242
+ }
243
+ });
244
+ x = nextX != null ? nextX : x;
245
+ y = nextY != null ? nextY : y;
246
+ middlewareData = {
247
+ ...middlewareData,
248
+ [name]: {
249
+ ...middlewareData[name],
250
+ ...data
251
+ }
252
+ };
253
+ if (reset && resetCount <= 50) {
254
+ resetCount++;
255
+ if (typeof reset === 'object') {
256
+ if (reset.placement) {
257
+ statefulPlacement = reset.placement;
258
+ }
259
+ if (reset.rects) {
260
+ rects = reset.rects === true ? await platform.getElementRects({
261
+ reference,
262
+ floating,
263
+ strategy
264
+ }) : reset.rects;
265
+ }
266
+ ({
267
+ x,
268
+ y
269
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
270
+ }
271
+ i = -1;
272
+ }
273
+ }
274
+ return {
275
+ x,
276
+ y,
277
+ placement: statefulPlacement,
278
+ strategy,
279
+ middlewareData
280
+ };
281
+ };
282
+
283
+ /**
284
+ * Resolves with an object of overflow side offsets that determine how much the
285
+ * element is overflowing a given clipping boundary on each side.
286
+ * - positive = overflowing the boundary by that number of pixels
287
+ * - negative = how many pixels left before it will overflow
288
+ * - 0 = lies flush with the boundary
289
+ * @see https://floating-ui.com/docs/detectOverflow
290
+ */
291
+ async function detectOverflow(state, options) {
292
+ var _await$platform$isEle;
293
+ if (options === void 0) {
294
+ options = {};
295
+ }
296
+ const {
297
+ x,
298
+ y,
299
+ platform,
300
+ rects,
301
+ elements,
302
+ strategy
303
+ } = state;
304
+ const {
305
+ boundary = 'clippingAncestors',
306
+ rootBoundary = 'viewport',
307
+ elementContext = 'floating',
308
+ altBoundary = false,
309
+ padding = 0
310
+ } = evaluate(options, state);
311
+ const paddingObject = getPaddingObject(padding);
312
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
313
+ const element = elements[altBoundary ? altContext : elementContext];
314
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
315
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
316
+ boundary,
317
+ rootBoundary,
318
+ strategy
319
+ }));
320
+ const rect = elementContext === 'floating' ? {
321
+ x,
322
+ y,
323
+ width: rects.floating.width,
324
+ height: rects.floating.height
325
+ } : rects.reference;
326
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
327
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
328
+ x: 1,
329
+ y: 1
330
+ } : {
331
+ x: 1,
332
+ y: 1
333
+ };
334
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
335
+ elements,
336
+ rect,
337
+ offsetParent,
338
+ strategy
339
+ }) : rect);
340
+ return {
341
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
342
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
343
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
344
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
345
+ };
346
+ }
347
+
348
+ /**
349
+ * Provides data to position an inner element of the floating element so that it
350
+ * appears centered to the reference element.
351
+ * @see https://floating-ui.com/docs/arrow
352
+ */
353
+ const arrow$1 = options => ({
354
+ name: 'arrow',
355
+ options,
356
+ async fn(state) {
357
+ const {
358
+ x,
359
+ y,
360
+ placement,
361
+ rects,
362
+ platform,
363
+ elements,
364
+ middlewareData
365
+ } = state;
366
+ // Since `element` is required, we don't Partial<> the type.
367
+ const {
368
+ element,
369
+ padding = 0
370
+ } = evaluate(options, state) || {};
371
+ if (element == null) {
372
+ return {};
373
+ }
374
+ const paddingObject = getPaddingObject(padding);
375
+ const coords = {
376
+ x,
377
+ y
378
+ };
379
+ const axis = getAlignmentAxis(placement);
380
+ const length = getAxisLength(axis);
381
+ const arrowDimensions = await platform.getDimensions(element);
382
+ const isYAxis = axis === 'y';
383
+ const minProp = isYAxis ? 'top' : 'left';
384
+ const maxProp = isYAxis ? 'bottom' : 'right';
385
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
386
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
387
+ const startDiff = coords[axis] - rects.reference[axis];
388
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
389
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
390
+
391
+ // DOM platform can return `window` as the `offsetParent`.
392
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
393
+ clientSize = elements.floating[clientProp] || rects.floating[length];
394
+ }
395
+ const centerToReference = endDiff / 2 - startDiff / 2;
396
+
397
+ // If the padding is large enough that it causes the arrow to no longer be
398
+ // centered, modify the padding so that it is centered.
399
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
400
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
401
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
402
+
403
+ // Make sure the arrow doesn't overflow the floating element if the center
404
+ // point is outside the floating element's bounds.
405
+ const min$1 = minPadding;
406
+ const max = clientSize - arrowDimensions[length] - maxPadding;
407
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
408
+ const offset = clamp(min$1, center, max);
409
+
410
+ // If the reference is small enough that the arrow's padding causes it to
411
+ // to point to nothing for an aligned placement, adjust the offset of the
412
+ // floating element itself. To ensure `shift()` continues to take action,
413
+ // a single reset is performed when this is true.
414
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
415
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
416
+ return {
417
+ [axis]: coords[axis] + alignmentOffset,
418
+ data: {
419
+ [axis]: offset,
420
+ centerOffset: center - offset - alignmentOffset,
421
+ ...(shouldAddOffset && {
422
+ alignmentOffset
423
+ })
424
+ },
425
+ reset: shouldAddOffset
426
+ };
427
+ }
428
+ });
429
+
430
+ /**
431
+ * Optimizes the visibility of the floating element by flipping the `placement`
432
+ * in order to keep it in view when the preferred placement(s) will overflow the
433
+ * clipping boundary. Alternative to `autoPlacement`.
434
+ * @see https://floating-ui.com/docs/flip
435
+ */
436
+ const flip$1 = function (options) {
437
+ if (options === void 0) {
438
+ options = {};
439
+ }
440
+ return {
441
+ name: 'flip',
442
+ options,
443
+ async fn(state) {
444
+ var _middlewareData$arrow, _middlewareData$flip;
445
+ const {
446
+ placement,
447
+ middlewareData,
448
+ rects,
449
+ initialPlacement,
450
+ platform,
451
+ elements
452
+ } = state;
453
+ const {
454
+ mainAxis: checkMainAxis = true,
455
+ crossAxis: checkCrossAxis = true,
456
+ fallbackPlacements: specifiedFallbackPlacements,
457
+ fallbackStrategy = 'bestFit',
458
+ fallbackAxisSideDirection = 'none',
459
+ flipAlignment = true,
460
+ ...detectOverflowOptions
461
+ } = evaluate(options, state);
462
+
463
+ // If a reset by the arrow was caused due to an alignment offset being
464
+ // added, we should skip any logic now since `flip()` has already done its
465
+ // work.
466
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
467
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
468
+ return {};
469
+ }
470
+ const side = getSide(placement);
471
+ const initialSideAxis = getSideAxis(initialPlacement);
472
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
473
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
474
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
475
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
476
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
477
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
478
+ }
479
+ const placements = [initialPlacement, ...fallbackPlacements];
480
+ const overflow = await detectOverflow(state, detectOverflowOptions);
481
+ const overflows = [];
482
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
483
+ if (checkMainAxis) {
484
+ overflows.push(overflow[side]);
485
+ }
486
+ if (checkCrossAxis) {
487
+ const sides = getAlignmentSides(placement, rects, rtl);
488
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
489
+ }
490
+ overflowsData = [...overflowsData, {
491
+ placement,
492
+ overflows
493
+ }];
494
+
495
+ // One or more sides is overflowing.
496
+ if (!overflows.every(side => side <= 0)) {
497
+ var _middlewareData$flip2, _overflowsData$filter;
498
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
499
+ const nextPlacement = placements[nextIndex];
500
+ if (nextPlacement) {
501
+ // Try next placement and re-run the lifecycle.
502
+ return {
503
+ data: {
504
+ index: nextIndex,
505
+ overflows: overflowsData
506
+ },
507
+ reset: {
508
+ placement: nextPlacement
509
+ }
510
+ };
511
+ }
512
+
513
+ // First, find the candidates that fit on the mainAxis side of overflow,
514
+ // then find the placement that fits the best on the main crossAxis side.
515
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
516
+
517
+ // Otherwise fallback.
518
+ if (!resetPlacement) {
519
+ switch (fallbackStrategy) {
520
+ case 'bestFit':
521
+ {
522
+ var _overflowsData$filter2;
523
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
524
+ if (hasFallbackAxisSideDirection) {
525
+ const currentSideAxis = getSideAxis(d.placement);
526
+ return currentSideAxis === initialSideAxis ||
527
+ // Create a bias to the `y` side axis due to horizontal
528
+ // reading directions favoring greater width.
529
+ currentSideAxis === 'y';
530
+ }
531
+ return true;
532
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
533
+ if (placement) {
534
+ resetPlacement = placement;
535
+ }
536
+ break;
537
+ }
538
+ case 'initialPlacement':
539
+ resetPlacement = initialPlacement;
540
+ break;
541
+ }
542
+ }
543
+ if (placement !== resetPlacement) {
544
+ return {
545
+ reset: {
546
+ placement: resetPlacement
547
+ }
548
+ };
549
+ }
550
+ }
551
+ return {};
552
+ }
553
+ };
554
+ };
555
+
556
+ function getSideOffsets(overflow, rect) {
557
+ return {
558
+ top: overflow.top - rect.height,
559
+ right: overflow.right - rect.width,
560
+ bottom: overflow.bottom - rect.height,
561
+ left: overflow.left - rect.width
562
+ };
563
+ }
564
+ function isAnySideFullyClipped(overflow) {
565
+ return sides.some(side => overflow[side] >= 0);
566
+ }
567
+ /**
568
+ * Provides data to hide the floating element in applicable situations, such as
569
+ * when it is not in the same clipping context as the reference element.
570
+ * @see https://floating-ui.com/docs/hide
571
+ */
572
+ const hide$1 = function (options) {
573
+ if (options === void 0) {
574
+ options = {};
575
+ }
576
+ return {
577
+ name: 'hide',
578
+ options,
579
+ async fn(state) {
580
+ const {
581
+ rects
582
+ } = state;
583
+ const {
584
+ strategy = 'referenceHidden',
585
+ ...detectOverflowOptions
586
+ } = evaluate(options, state);
587
+ switch (strategy) {
588
+ case 'referenceHidden':
589
+ {
590
+ const overflow = await detectOverflow(state, {
591
+ ...detectOverflowOptions,
592
+ elementContext: 'reference'
593
+ });
594
+ const offsets = getSideOffsets(overflow, rects.reference);
595
+ return {
596
+ data: {
597
+ referenceHiddenOffsets: offsets,
598
+ referenceHidden: isAnySideFullyClipped(offsets)
599
+ }
600
+ };
601
+ }
602
+ case 'escaped':
603
+ {
604
+ const overflow = await detectOverflow(state, {
605
+ ...detectOverflowOptions,
606
+ altBoundary: true
607
+ });
608
+ const offsets = getSideOffsets(overflow, rects.floating);
609
+ return {
610
+ data: {
611
+ escapedOffsets: offsets,
612
+ escaped: isAnySideFullyClipped(offsets)
613
+ }
614
+ };
615
+ }
616
+ default:
617
+ {
618
+ return {};
619
+ }
620
+ }
621
+ }
622
+ };
623
+ };
624
+
625
+ function getBoundingRect(rects) {
626
+ const minX = min(...rects.map(rect => rect.left));
627
+ const minY = min(...rects.map(rect => rect.top));
628
+ const maxX = max(...rects.map(rect => rect.right));
629
+ const maxY = max(...rects.map(rect => rect.bottom));
630
+ return {
631
+ x: minX,
632
+ y: minY,
633
+ width: maxX - minX,
634
+ height: maxY - minY
635
+ };
636
+ }
637
+ function getRectsByLine(rects) {
638
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
639
+ const groups = [];
640
+ let prevRect = null;
641
+ for (let i = 0; i < sortedRects.length; i++) {
642
+ const rect = sortedRects[i];
643
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
644
+ groups.push([rect]);
645
+ } else {
646
+ groups[groups.length - 1].push(rect);
647
+ }
648
+ prevRect = rect;
649
+ }
650
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
651
+ }
652
+ /**
653
+ * Provides improved positioning for inline reference elements that can span
654
+ * over multiple lines, such as hyperlinks or range selections.
655
+ * @see https://floating-ui.com/docs/inline
656
+ */
657
+ const inline$1 = function (options) {
658
+ if (options === void 0) {
659
+ options = {};
660
+ }
661
+ return {
662
+ name: 'inline',
663
+ options,
664
+ async fn(state) {
665
+ const {
666
+ placement,
667
+ elements,
668
+ rects,
669
+ platform,
670
+ strategy
671
+ } = state;
672
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
673
+ // ClientRect's bounds, despite the event listener being triggered. A
674
+ // padding of 2 seems to handle this issue.
675
+ const {
676
+ padding = 2,
677
+ x,
678
+ y
679
+ } = evaluate(options, state);
680
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
681
+ const clientRects = getRectsByLine(nativeClientRects);
682
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
683
+ const paddingObject = getPaddingObject(padding);
684
+ function getBoundingClientRect() {
685
+ // There are two rects and they are disjoined.
686
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
687
+ // Find the first rect in which the point is fully inside.
688
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
689
+ }
690
+
691
+ // There are 2 or more connected rects.
692
+ if (clientRects.length >= 2) {
693
+ if (getSideAxis(placement) === 'y') {
694
+ const firstRect = clientRects[0];
695
+ const lastRect = clientRects[clientRects.length - 1];
696
+ const isTop = getSide(placement) === 'top';
697
+ const top = firstRect.top;
698
+ const bottom = lastRect.bottom;
699
+ const left = isTop ? firstRect.left : lastRect.left;
700
+ const right = isTop ? firstRect.right : lastRect.right;
701
+ const width = right - left;
702
+ const height = bottom - top;
703
+ return {
704
+ top,
705
+ bottom,
706
+ left,
707
+ right,
708
+ width,
709
+ height,
710
+ x: left,
711
+ y: top
712
+ };
713
+ }
714
+ const isLeftSide = getSide(placement) === 'left';
715
+ const maxRight = max(...clientRects.map(rect => rect.right));
716
+ const minLeft = min(...clientRects.map(rect => rect.left));
717
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
718
+ const top = measureRects[0].top;
719
+ const bottom = measureRects[measureRects.length - 1].bottom;
720
+ const left = minLeft;
721
+ const right = maxRight;
722
+ const width = right - left;
723
+ const height = bottom - top;
724
+ return {
725
+ top,
726
+ bottom,
727
+ left,
728
+ right,
729
+ width,
730
+ height,
731
+ x: left,
732
+ y: top
733
+ };
734
+ }
735
+ return fallback;
736
+ }
737
+ const resetRects = await platform.getElementRects({
738
+ reference: {
739
+ getBoundingClientRect
740
+ },
741
+ floating: elements.floating,
742
+ strategy
743
+ });
744
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
745
+ return {
746
+ reset: {
747
+ rects: resetRects
748
+ }
749
+ };
750
+ }
751
+ return {};
752
+ }
753
+ };
754
+ };
755
+
756
+ // For type backwards-compatibility, the `OffsetOptions` type was also
757
+ // Derivable.
758
+
759
+ async function convertValueToCoords(state, options) {
760
+ const {
761
+ placement,
762
+ platform,
763
+ elements
764
+ } = state;
765
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
766
+ const side = getSide(placement);
767
+ const alignment = getAlignment(placement);
768
+ const isVertical = getSideAxis(placement) === 'y';
769
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
770
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
771
+ const rawValue = evaluate(options, state);
772
+
773
+ // eslint-disable-next-line prefer-const
774
+ let {
775
+ mainAxis,
776
+ crossAxis,
777
+ alignmentAxis
778
+ } = typeof rawValue === 'number' ? {
779
+ mainAxis: rawValue,
780
+ crossAxis: 0,
781
+ alignmentAxis: null
782
+ } : {
783
+ mainAxis: 0,
784
+ crossAxis: 0,
785
+ alignmentAxis: null,
786
+ ...rawValue
787
+ };
788
+ if (alignment && typeof alignmentAxis === 'number') {
789
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
790
+ }
791
+ return isVertical ? {
792
+ x: crossAxis * crossAxisMulti,
793
+ y: mainAxis * mainAxisMulti
794
+ } : {
795
+ x: mainAxis * mainAxisMulti,
796
+ y: crossAxis * crossAxisMulti
797
+ };
798
+ }
799
+
800
+ /**
801
+ * Modifies the placement by translating the floating element along the
802
+ * specified axes.
803
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
804
+ * object may be passed.
805
+ * @see https://floating-ui.com/docs/offset
806
+ */
807
+ const offset$1 = function (options) {
808
+ if (options === void 0) {
809
+ options = 0;
810
+ }
811
+ return {
812
+ name: 'offset',
813
+ options,
814
+ async fn(state) {
815
+ var _middlewareData$offse, _middlewareData$arrow;
816
+ const {
817
+ x,
818
+ y,
819
+ placement,
820
+ middlewareData
821
+ } = state;
822
+ const diffCoords = await convertValueToCoords(state, options);
823
+
824
+ // If the placement is the same and the arrow caused an alignment offset
825
+ // then we don't need to change the positioning coordinates.
826
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
827
+ return {};
828
+ }
829
+ return {
830
+ x: x + diffCoords.x,
831
+ y: y + diffCoords.y,
832
+ data: {
833
+ ...diffCoords,
834
+ placement
835
+ }
836
+ };
837
+ }
838
+ };
839
+ };
840
+
841
+ /**
842
+ * Optimizes the visibility of the floating element by shifting it in order to
843
+ * keep it in view when it will overflow the clipping boundary.
844
+ * @see https://floating-ui.com/docs/shift
845
+ */
846
+ const shift$1 = function (options) {
847
+ if (options === void 0) {
848
+ options = {};
849
+ }
850
+ return {
851
+ name: 'shift',
852
+ options,
853
+ async fn(state) {
854
+ const {
855
+ x,
856
+ y,
857
+ placement
858
+ } = state;
859
+ const {
860
+ mainAxis: checkMainAxis = true,
861
+ crossAxis: checkCrossAxis = false,
862
+ limiter = {
863
+ fn: _ref => {
864
+ let {
865
+ x,
866
+ y
867
+ } = _ref;
868
+ return {
869
+ x,
870
+ y
871
+ };
872
+ }
873
+ },
874
+ ...detectOverflowOptions
875
+ } = evaluate(options, state);
876
+ const coords = {
877
+ x,
878
+ y
879
+ };
880
+ const overflow = await detectOverflow(state, detectOverflowOptions);
881
+ const crossAxis = getSideAxis(getSide(placement));
882
+ const mainAxis = getOppositeAxis(crossAxis);
883
+ let mainAxisCoord = coords[mainAxis];
884
+ let crossAxisCoord = coords[crossAxis];
885
+ if (checkMainAxis) {
886
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
887
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
888
+ const min = mainAxisCoord + overflow[minSide];
889
+ const max = mainAxisCoord - overflow[maxSide];
890
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
891
+ }
892
+ if (checkCrossAxis) {
893
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
894
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
895
+ const min = crossAxisCoord + overflow[minSide];
896
+ const max = crossAxisCoord - overflow[maxSide];
897
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
898
+ }
899
+ const limitedCoords = limiter.fn({
900
+ ...state,
901
+ [mainAxis]: mainAxisCoord,
902
+ [crossAxis]: crossAxisCoord
903
+ });
904
+ return {
905
+ ...limitedCoords,
906
+ data: {
907
+ x: limitedCoords.x - x,
908
+ y: limitedCoords.y - y
909
+ }
910
+ };
911
+ }
912
+ };
913
+ };
914
+
915
+ function hasWindow() {
916
+ return typeof window !== 'undefined';
917
+ }
918
+ function getNodeName(node) {
919
+ if (isNode(node)) {
920
+ return (node.nodeName || '').toLowerCase();
921
+ }
922
+ // Mocked nodes in testing environments may not be instances of Node. By
923
+ // returning `#document` an infinite loop won't occur.
924
+ // https://github.com/floating-ui/floating-ui/issues/2317
925
+ return '#document';
926
+ }
927
+ function getWindow(node) {
928
+ var _node$ownerDocument;
929
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
930
+ }
931
+ function getDocumentElement(node) {
932
+ var _ref;
933
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
934
+ }
935
+ function isNode(value) {
936
+ if (!hasWindow()) {
937
+ return false;
938
+ }
939
+ return value instanceof Node || value instanceof getWindow(value).Node;
940
+ }
941
+ function isElement(value) {
942
+ if (!hasWindow()) {
943
+ return false;
944
+ }
945
+ return value instanceof Element || value instanceof getWindow(value).Element;
946
+ }
947
+ function isHTMLElement(value) {
948
+ if (!hasWindow()) {
949
+ return false;
950
+ }
951
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
952
+ }
953
+ function isShadowRoot(value) {
954
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
955
+ return false;
956
+ }
957
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
958
+ }
959
+ function isOverflowElement(element) {
960
+ const {
961
+ overflow,
962
+ overflowX,
963
+ overflowY,
964
+ display
965
+ } = getComputedStyle(element);
966
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
967
+ }
968
+ function isTableElement(element) {
969
+ return ['table', 'td', 'th'].includes(getNodeName(element));
970
+ }
971
+ function isTopLayer(element) {
972
+ return [':popover-open', ':modal'].some(selector => {
973
+ try {
974
+ return element.matches(selector);
975
+ } catch (e) {
976
+ return false;
977
+ }
978
+ });
979
+ }
980
+ function isContainingBlock(elementOrCss) {
981
+ const webkit = isWebKit();
982
+ const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
983
+
984
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
985
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
986
+ return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
987
+ }
988
+ function getContainingBlock(element) {
989
+ let currentNode = getParentNode(element);
990
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
991
+ if (isContainingBlock(currentNode)) {
992
+ return currentNode;
993
+ } else if (isTopLayer(currentNode)) {
994
+ return null;
995
+ }
996
+ currentNode = getParentNode(currentNode);
997
+ }
998
+ return null;
999
+ }
1000
+ function isWebKit() {
1001
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
1002
+ return CSS.supports('-webkit-backdrop-filter', 'none');
1003
+ }
1004
+ function isLastTraversableNode(node) {
1005
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1006
+ }
1007
+ function getComputedStyle(element) {
1008
+ return getWindow(element).getComputedStyle(element);
1009
+ }
1010
+ function getNodeScroll(element) {
1011
+ if (isElement(element)) {
1012
+ return {
1013
+ scrollLeft: element.scrollLeft,
1014
+ scrollTop: element.scrollTop
1015
+ };
1016
+ }
1017
+ return {
1018
+ scrollLeft: element.scrollX,
1019
+ scrollTop: element.scrollY
1020
+ };
1021
+ }
1022
+ function getParentNode(node) {
1023
+ if (getNodeName(node) === 'html') {
1024
+ return node;
1025
+ }
1026
+ const result =
1027
+ // Step into the shadow DOM of the parent of a slotted node.
1028
+ node.assignedSlot ||
1029
+ // DOM Element detected.
1030
+ node.parentNode ||
1031
+ // ShadowRoot detected.
1032
+ isShadowRoot(node) && node.host ||
1033
+ // Fallback.
1034
+ getDocumentElement(node);
1035
+ return isShadowRoot(result) ? result.host : result;
1036
+ }
1037
+ function getNearestOverflowAncestor(node) {
1038
+ const parentNode = getParentNode(node);
1039
+ if (isLastTraversableNode(parentNode)) {
1040
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1041
+ }
1042
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1043
+ return parentNode;
1044
+ }
1045
+ return getNearestOverflowAncestor(parentNode);
1046
+ }
1047
+ function getOverflowAncestors(node, list, traverseIframes) {
1048
+ var _node$ownerDocument2;
1049
+ if (list === void 0) {
1050
+ list = [];
1051
+ }
1052
+ if (traverseIframes === void 0) {
1053
+ traverseIframes = true;
1054
+ }
1055
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1056
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1057
+ const win = getWindow(scrollableAncestor);
1058
+ if (isBody) {
1059
+ const frameElement = getFrameElement(win);
1060
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1061
+ }
1062
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1063
+ }
1064
+ function getFrameElement(win) {
1065
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1066
+ }
1067
+
1068
+ function getCssDimensions(element) {
1069
+ const css = getComputedStyle(element);
1070
+ // In testing environments, the `width` and `height` properties are empty
1071
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1072
+ let width = parseFloat(css.width) || 0;
1073
+ let height = parseFloat(css.height) || 0;
1074
+ const hasOffset = isHTMLElement(element);
1075
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1076
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1077
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1078
+ if (shouldFallback) {
1079
+ width = offsetWidth;
1080
+ height = offsetHeight;
1081
+ }
1082
+ return {
1083
+ width,
1084
+ height,
1085
+ $: shouldFallback
1086
+ };
1087
+ }
1088
+
1089
+ function unwrapElement(element) {
1090
+ return !isElement(element) ? element.contextElement : element;
1091
+ }
1092
+
1093
+ function getScale(element) {
1094
+ const domElement = unwrapElement(element);
1095
+ if (!isHTMLElement(domElement)) {
1096
+ return createCoords(1);
1097
+ }
1098
+ const rect = domElement.getBoundingClientRect();
1099
+ const {
1100
+ width,
1101
+ height,
1102
+ $
1103
+ } = getCssDimensions(domElement);
1104
+ let x = ($ ? round(rect.width) : rect.width) / width;
1105
+ let y = ($ ? round(rect.height) : rect.height) / height;
1106
+
1107
+ // 0, NaN, or Infinity should always fallback to 1.
1108
+
1109
+ if (!x || !Number.isFinite(x)) {
1110
+ x = 1;
1111
+ }
1112
+ if (!y || !Number.isFinite(y)) {
1113
+ y = 1;
1114
+ }
1115
+ return {
1116
+ x,
1117
+ y
1118
+ };
1119
+ }
1120
+
1121
+ const noOffsets = /*#__PURE__*/createCoords(0);
1122
+ function getVisualOffsets(element) {
1123
+ const win = getWindow(element);
1124
+ if (!isWebKit() || !win.visualViewport) {
1125
+ return noOffsets;
1126
+ }
1127
+ return {
1128
+ x: win.visualViewport.offsetLeft,
1129
+ y: win.visualViewport.offsetTop
1130
+ };
1131
+ }
1132
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1133
+ if (isFixed === void 0) {
1134
+ isFixed = false;
1135
+ }
1136
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1137
+ return false;
1138
+ }
1139
+ return isFixed;
1140
+ }
1141
+
1142
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1143
+ if (includeScale === void 0) {
1144
+ includeScale = false;
1145
+ }
1146
+ if (isFixedStrategy === void 0) {
1147
+ isFixedStrategy = false;
1148
+ }
1149
+ const clientRect = element.getBoundingClientRect();
1150
+ const domElement = unwrapElement(element);
1151
+ let scale = createCoords(1);
1152
+ if (includeScale) {
1153
+ if (offsetParent) {
1154
+ if (isElement(offsetParent)) {
1155
+ scale = getScale(offsetParent);
1156
+ }
1157
+ } else {
1158
+ scale = getScale(element);
1159
+ }
1160
+ }
1161
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1162
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1163
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1164
+ let width = clientRect.width / scale.x;
1165
+ let height = clientRect.height / scale.y;
1166
+ if (domElement) {
1167
+ const win = getWindow(domElement);
1168
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1169
+ let currentWin = win;
1170
+ let currentIFrame = getFrameElement(currentWin);
1171
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1172
+ const iframeScale = getScale(currentIFrame);
1173
+ const iframeRect = currentIFrame.getBoundingClientRect();
1174
+ const css = getComputedStyle(currentIFrame);
1175
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1176
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1177
+ x *= iframeScale.x;
1178
+ y *= iframeScale.y;
1179
+ width *= iframeScale.x;
1180
+ height *= iframeScale.y;
1181
+ x += left;
1182
+ y += top;
1183
+ currentWin = getWindow(currentIFrame);
1184
+ currentIFrame = getFrameElement(currentWin);
1185
+ }
1186
+ }
1187
+ return rectToClientRect({
1188
+ width,
1189
+ height,
1190
+ x,
1191
+ y
1192
+ });
1193
+ }
1194
+
1195
+ // If <html> has a CSS width greater than the viewport, then this will be
1196
+ // incorrect for RTL.
1197
+ function getWindowScrollBarX(element, rect) {
1198
+ const leftScroll = getNodeScroll(element).scrollLeft;
1199
+ if (!rect) {
1200
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1201
+ }
1202
+ return rect.left + leftScroll;
1203
+ }
1204
+
1205
+ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
1206
+ if (ignoreScrollbarX === void 0) {
1207
+ ignoreScrollbarX = false;
1208
+ }
1209
+ const htmlRect = documentElement.getBoundingClientRect();
1210
+ const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
1211
+ // RTL <body> scrollbar.
1212
+ getWindowScrollBarX(documentElement, htmlRect));
1213
+ const y = htmlRect.top + scroll.scrollTop;
1214
+ return {
1215
+ x,
1216
+ y
1217
+ };
1218
+ }
1219
+
1220
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1221
+ let {
1222
+ elements,
1223
+ rect,
1224
+ offsetParent,
1225
+ strategy
1226
+ } = _ref;
1227
+ const isFixed = strategy === 'fixed';
1228
+ const documentElement = getDocumentElement(offsetParent);
1229
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1230
+ if (offsetParent === documentElement || topLayer && isFixed) {
1231
+ return rect;
1232
+ }
1233
+ let scroll = {
1234
+ scrollLeft: 0,
1235
+ scrollTop: 0
1236
+ };
1237
+ let scale = createCoords(1);
1238
+ const offsets = createCoords(0);
1239
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1240
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1241
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1242
+ scroll = getNodeScroll(offsetParent);
1243
+ }
1244
+ if (isHTMLElement(offsetParent)) {
1245
+ const offsetRect = getBoundingClientRect(offsetParent);
1246
+ scale = getScale(offsetParent);
1247
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1248
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1249
+ }
1250
+ }
1251
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
1252
+ return {
1253
+ width: rect.width * scale.x,
1254
+ height: rect.height * scale.y,
1255
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1256
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1257
+ };
1258
+ }
1259
+
1260
+ function getClientRects(element) {
1261
+ return Array.from(element.getClientRects());
1262
+ }
1263
+
1264
+ // Gets the entire size of the scrollable document area, even extending outside
1265
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1266
+ function getDocumentRect(element) {
1267
+ const html = getDocumentElement(element);
1268
+ const scroll = getNodeScroll(element);
1269
+ const body = element.ownerDocument.body;
1270
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1271
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1272
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1273
+ const y = -scroll.scrollTop;
1274
+ if (getComputedStyle(body).direction === 'rtl') {
1275
+ x += max(html.clientWidth, body.clientWidth) - width;
1276
+ }
1277
+ return {
1278
+ width,
1279
+ height,
1280
+ x,
1281
+ y
1282
+ };
1283
+ }
1284
+
1285
+ function getViewportRect(element, strategy) {
1286
+ const win = getWindow(element);
1287
+ const html = getDocumentElement(element);
1288
+ const visualViewport = win.visualViewport;
1289
+ let width = html.clientWidth;
1290
+ let height = html.clientHeight;
1291
+ let x = 0;
1292
+ let y = 0;
1293
+ if (visualViewport) {
1294
+ width = visualViewport.width;
1295
+ height = visualViewport.height;
1296
+ const visualViewportBased = isWebKit();
1297
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
1298
+ x = visualViewport.offsetLeft;
1299
+ y = visualViewport.offsetTop;
1300
+ }
1301
+ }
1302
+ return {
1303
+ width,
1304
+ height,
1305
+ x,
1306
+ y
1307
+ };
1308
+ }
1309
+
1310
+ // Returns the inner client rect, subtracting scrollbars if present.
1311
+ function getInnerBoundingClientRect(element, strategy) {
1312
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1313
+ const top = clientRect.top + element.clientTop;
1314
+ const left = clientRect.left + element.clientLeft;
1315
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1316
+ const width = element.clientWidth * scale.x;
1317
+ const height = element.clientHeight * scale.y;
1318
+ const x = left * scale.x;
1319
+ const y = top * scale.y;
1320
+ return {
1321
+ width,
1322
+ height,
1323
+ x,
1324
+ y
1325
+ };
1326
+ }
1327
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1328
+ let rect;
1329
+ if (clippingAncestor === 'viewport') {
1330
+ rect = getViewportRect(element, strategy);
1331
+ } else if (clippingAncestor === 'document') {
1332
+ rect = getDocumentRect(getDocumentElement(element));
1333
+ } else if (isElement(clippingAncestor)) {
1334
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1335
+ } else {
1336
+ const visualOffsets = getVisualOffsets(element);
1337
+ rect = {
1338
+ x: clippingAncestor.x - visualOffsets.x,
1339
+ y: clippingAncestor.y - visualOffsets.y,
1340
+ width: clippingAncestor.width,
1341
+ height: clippingAncestor.height
1342
+ };
1343
+ }
1344
+ return rectToClientRect(rect);
1345
+ }
1346
+ function hasFixedPositionAncestor(element, stopNode) {
1347
+ const parentNode = getParentNode(element);
1348
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1349
+ return false;
1350
+ }
1351
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1352
+ }
1353
+
1354
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1355
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1356
+ // of the given element up the tree.
1357
+ function getClippingElementAncestors(element, cache) {
1358
+ const cachedResult = cache.get(element);
1359
+ if (cachedResult) {
1360
+ return cachedResult;
1361
+ }
1362
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1363
+ let currentContainingBlockComputedStyle = null;
1364
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
1365
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1366
+
1367
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1368
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1369
+ const computedStyle = getComputedStyle(currentNode);
1370
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1371
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1372
+ currentContainingBlockComputedStyle = null;
1373
+ }
1374
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1375
+ if (shouldDropCurrentNode) {
1376
+ // Drop non-containing blocks.
1377
+ result = result.filter(ancestor => ancestor !== currentNode);
1378
+ } else {
1379
+ // Record last containing block for next iteration.
1380
+ currentContainingBlockComputedStyle = computedStyle;
1381
+ }
1382
+ currentNode = getParentNode(currentNode);
1383
+ }
1384
+ cache.set(element, result);
1385
+ return result;
1386
+ }
1387
+
1388
+ // Gets the maximum area that the element is visible in due to any number of
1389
+ // clipping ancestors.
1390
+ function getClippingRect(_ref) {
1391
+ let {
1392
+ element,
1393
+ boundary,
1394
+ rootBoundary,
1395
+ strategy
1396
+ } = _ref;
1397
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1398
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1399
+ const firstClippingAncestor = clippingAncestors[0];
1400
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1401
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1402
+ accRect.top = max(rect.top, accRect.top);
1403
+ accRect.right = min(rect.right, accRect.right);
1404
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1405
+ accRect.left = max(rect.left, accRect.left);
1406
+ return accRect;
1407
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1408
+ return {
1409
+ width: clippingRect.right - clippingRect.left,
1410
+ height: clippingRect.bottom - clippingRect.top,
1411
+ x: clippingRect.left,
1412
+ y: clippingRect.top
1413
+ };
1414
+ }
1415
+
1416
+ function getDimensions(element) {
1417
+ const {
1418
+ width,
1419
+ height
1420
+ } = getCssDimensions(element);
1421
+ return {
1422
+ width,
1423
+ height
1424
+ };
1425
+ }
1426
+
1427
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1428
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1429
+ const documentElement = getDocumentElement(offsetParent);
1430
+ const isFixed = strategy === 'fixed';
1431
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1432
+ let scroll = {
1433
+ scrollLeft: 0,
1434
+ scrollTop: 0
1435
+ };
1436
+ const offsets = createCoords(0);
1437
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1438
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1439
+ scroll = getNodeScroll(offsetParent);
1440
+ }
1441
+ if (isOffsetParentAnElement) {
1442
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1443
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1444
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1445
+ } else if (documentElement) {
1446
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1447
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1448
+ offsets.x = getWindowScrollBarX(documentElement);
1449
+ }
1450
+ }
1451
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1452
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1453
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1454
+ return {
1455
+ x,
1456
+ y,
1457
+ width: rect.width,
1458
+ height: rect.height
1459
+ };
1460
+ }
1461
+
1462
+ function isStaticPositioned(element) {
1463
+ return getComputedStyle(element).position === 'static';
1464
+ }
1465
+
1466
+ function getTrueOffsetParent(element, polyfill) {
1467
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1468
+ return null;
1469
+ }
1470
+ if (polyfill) {
1471
+ return polyfill(element);
1472
+ }
1473
+ let rawOffsetParent = element.offsetParent;
1474
+
1475
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1476
+ // while Chrome and Safari return the <body> element. The <body> element must
1477
+ // be used to perform the correct calculations even if the <html> element is
1478
+ // non-static.
1479
+ if (getDocumentElement(element) === rawOffsetParent) {
1480
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1481
+ }
1482
+ return rawOffsetParent;
1483
+ }
1484
+
1485
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1486
+ // such as table ancestors and cross browser bugs.
1487
+ function getOffsetParent(element, polyfill) {
1488
+ const win = getWindow(element);
1489
+ if (isTopLayer(element)) {
1490
+ return win;
1491
+ }
1492
+ if (!isHTMLElement(element)) {
1493
+ let svgOffsetParent = getParentNode(element);
1494
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1495
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1496
+ return svgOffsetParent;
1497
+ }
1498
+ svgOffsetParent = getParentNode(svgOffsetParent);
1499
+ }
1500
+ return win;
1501
+ }
1502
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1503
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1504
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1505
+ }
1506
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1507
+ return win;
1508
+ }
1509
+ return offsetParent || getContainingBlock(element) || win;
1510
+ }
1511
+
1512
+ const getElementRects = async function (data) {
1513
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1514
+ const getDimensionsFn = this.getDimensions;
1515
+ const floatingDimensions = await getDimensionsFn(data.floating);
1516
+ return {
1517
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1518
+ floating: {
1519
+ x: 0,
1520
+ y: 0,
1521
+ width: floatingDimensions.width,
1522
+ height: floatingDimensions.height
1523
+ }
1524
+ };
1525
+ };
1526
+
1527
+ function isRTL(element) {
1528
+ return getComputedStyle(element).direction === 'rtl';
1529
+ }
1530
+
1531
+ const platform = {
1532
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1533
+ getDocumentElement,
1534
+ getClippingRect,
1535
+ getOffsetParent,
1536
+ getElementRects,
1537
+ getClientRects,
1538
+ getDimensions,
1539
+ getScale,
1540
+ isElement,
1541
+ isRTL
1542
+ };
1543
+
1544
+ function rectsAreEqual(a, b) {
1545
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1546
+ }
1547
+
1548
+ // https://samthor.au/2021/observing-dom/
1549
+ function observeMove(element, onMove) {
1550
+ let io = null;
1551
+ let timeoutId;
1552
+ const root = getDocumentElement(element);
1553
+ function cleanup() {
1554
+ var _io;
1555
+ clearTimeout(timeoutId);
1556
+ (_io = io) == null || _io.disconnect();
1557
+ io = null;
1558
+ }
1559
+ function refresh(skip, threshold) {
1560
+ if (skip === void 0) {
1561
+ skip = false;
1562
+ }
1563
+ if (threshold === void 0) {
1564
+ threshold = 1;
1565
+ }
1566
+ cleanup();
1567
+ const elementRectForRootMargin = element.getBoundingClientRect();
1568
+ const {
1569
+ left,
1570
+ top,
1571
+ width,
1572
+ height
1573
+ } = elementRectForRootMargin;
1574
+ if (!skip) {
1575
+ onMove();
1576
+ }
1577
+ if (!width || !height) {
1578
+ return;
1579
+ }
1580
+ const insetTop = floor(top);
1581
+ const insetRight = floor(root.clientWidth - (left + width));
1582
+ const insetBottom = floor(root.clientHeight - (top + height));
1583
+ const insetLeft = floor(left);
1584
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1585
+ const options = {
1586
+ rootMargin,
1587
+ threshold: max(0, min(1, threshold)) || 1
1588
+ };
1589
+ let isFirstUpdate = true;
1590
+ function handleObserve(entries) {
1591
+ const ratio = entries[0].intersectionRatio;
1592
+ if (ratio !== threshold) {
1593
+ if (!isFirstUpdate) {
1594
+ return refresh();
1595
+ }
1596
+ if (!ratio) {
1597
+ // If the reference is clipped, the ratio is 0. Throttle the refresh
1598
+ // to prevent an infinite loop of updates.
1599
+ timeoutId = setTimeout(() => {
1600
+ refresh(false, 1e-7);
1601
+ }, 1000);
1602
+ } else {
1603
+ refresh(false, ratio);
1604
+ }
1605
+ }
1606
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1607
+ // It's possible that even though the ratio is reported as 1, the
1608
+ // element is not actually fully within the IntersectionObserver's root
1609
+ // area anymore. This can happen under performance constraints. This may
1610
+ // be a bug in the browser's IntersectionObserver implementation. To
1611
+ // work around this, we compare the element's bounding rect now with
1612
+ // what it was at the time we created the IntersectionObserver. If they
1613
+ // are not equal then the element moved, so we refresh.
1614
+ refresh();
1615
+ }
1616
+ isFirstUpdate = false;
1617
+ }
1618
+
1619
+ // Older browsers don't support a `document` as the root and will throw an
1620
+ // error.
1621
+ try {
1622
+ io = new IntersectionObserver(handleObserve, {
1623
+ ...options,
1624
+ // Handle <iframe>s
1625
+ root: root.ownerDocument
1626
+ });
1627
+ } catch (e) {
1628
+ io = new IntersectionObserver(handleObserve, options);
1629
+ }
1630
+ io.observe(element);
1631
+ }
1632
+ refresh(true);
1633
+ return cleanup;
1634
+ }
1635
+
1636
+ /**
1637
+ * Automatically updates the position of the floating element when necessary.
1638
+ * Should only be called when the floating element is mounted on the DOM or
1639
+ * visible on the screen.
1640
+ * @returns cleanup function that should be invoked when the floating element is
1641
+ * removed from the DOM or hidden from the screen.
1642
+ * @see https://floating-ui.com/docs/autoUpdate
1643
+ */
1644
+ function autoUpdate(reference, floating, update, options) {
1645
+ if (options === void 0) {
1646
+ options = {};
1647
+ }
1648
+ const {
1649
+ ancestorScroll = true,
1650
+ ancestorResize = true,
1651
+ elementResize = typeof ResizeObserver === 'function',
1652
+ layoutShift = typeof IntersectionObserver === 'function',
1653
+ animationFrame = false
1654
+ } = options;
1655
+ const referenceEl = unwrapElement(reference);
1656
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
1657
+ ancestors.forEach(ancestor => {
1658
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1659
+ passive: true
1660
+ });
1661
+ ancestorResize && ancestor.addEventListener('resize', update);
1662
+ });
1663
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1664
+ let reobserveFrame = -1;
1665
+ let resizeObserver = null;
1666
+ if (elementResize) {
1667
+ resizeObserver = new ResizeObserver(_ref => {
1668
+ let [firstEntry] = _ref;
1669
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
1670
+ // Prevent update loops when using the `size` middleware.
1671
+ // https://github.com/floating-ui/floating-ui/issues/1740
1672
+ resizeObserver.unobserve(floating);
1673
+ cancelAnimationFrame(reobserveFrame);
1674
+ reobserveFrame = requestAnimationFrame(() => {
1675
+ var _resizeObserver;
1676
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1677
+ });
1678
+ }
1679
+ update();
1680
+ });
1681
+ if (referenceEl && !animationFrame) {
1682
+ resizeObserver.observe(referenceEl);
1683
+ }
1684
+ resizeObserver.observe(floating);
1685
+ }
1686
+ let frameId;
1687
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1688
+ if (animationFrame) {
1689
+ frameLoop();
1690
+ }
1691
+ function frameLoop() {
1692
+ const nextRefRect = getBoundingClientRect(reference);
1693
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
1694
+ update();
1695
+ }
1696
+ prevRefRect = nextRefRect;
1697
+ frameId = requestAnimationFrame(frameLoop);
1698
+ }
1699
+ update();
1700
+ return () => {
1701
+ var _resizeObserver2;
1702
+ ancestors.forEach(ancestor => {
1703
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1704
+ ancestorResize && ancestor.removeEventListener('resize', update);
1705
+ });
1706
+ cleanupIo == null || cleanupIo();
1707
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1708
+ resizeObserver = null;
1709
+ if (animationFrame) {
1710
+ cancelAnimationFrame(frameId);
1711
+ }
1712
+ };
1713
+ }
1714
+
1715
+ /**
1716
+ * Modifies the placement by translating the floating element along the
1717
+ * specified axes.
1718
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1719
+ * object may be passed.
1720
+ * @see https://floating-ui.com/docs/offset
1721
+ */
1722
+ const offset = offset$1;
1723
+
1724
+ /**
1725
+ * Optimizes the visibility of the floating element by shifting it in order to
1726
+ * keep it in view when it will overflow the clipping boundary.
1727
+ * @see https://floating-ui.com/docs/shift
1728
+ */
1729
+ const shift = shift$1;
1730
+
1731
+ /**
1732
+ * Optimizes the visibility of the floating element by flipping the `placement`
1733
+ * in order to keep it in view when the preferred placement(s) will overflow the
1734
+ * clipping boundary. Alternative to `autoPlacement`.
1735
+ * @see https://floating-ui.com/docs/flip
1736
+ */
1737
+ const flip = flip$1;
1738
+
1739
+ /**
1740
+ * Provides data to hide the floating element in applicable situations, such as
1741
+ * when it is not in the same clipping context as the reference element.
1742
+ * @see https://floating-ui.com/docs/hide
1743
+ */
1744
+ const hide = hide$1;
1745
+
1746
+ /**
1747
+ * Provides data to position an inner element of the floating element so that it
1748
+ * appears centered to the reference element.
1749
+ * @see https://floating-ui.com/docs/arrow
1750
+ */
1751
+ const arrow = arrow$1;
1752
+
1753
+ /**
1754
+ * Provides improved positioning for inline reference elements that can span
1755
+ * over multiple lines, such as hyperlinks or range selections.
1756
+ * @see https://floating-ui.com/docs/inline
1757
+ */
1758
+ const inline = inline$1;
1759
+
1760
+ /**
1761
+ * Computes the `x` and `y` coordinates that will place the floating element
1762
+ * next to a given reference element.
1763
+ */
1764
+ const computePosition = (reference, floating, options) => {
1765
+ // This caches the expensive `getClippingElementAncestors` function so that
1766
+ // multiple lifecycle resets re-use the same result. It only lives for a
1767
+ // single call. If other functions become expensive, we can add them as well.
1768
+ const cache = new Map();
1769
+ const mergedOptions = {
1770
+ platform,
1771
+ ...options
1772
+ };
1773
+ const platformWithCache = {
1774
+ ...mergedOptions.platform,
1775
+ _c: cache
1776
+ };
1777
+ return computePosition$1(reference, floating, {
1778
+ ...mergedOptions,
1779
+ platform: platformWithCache
1780
+ });
1781
+ };
1782
+
1783
+ export { autoUpdate as a, arrow as b, computePosition as c, flip as f, hide as h, inline as i, offset as o, shift as s };
1784
+ //# sourceMappingURL=p-CAqtPJ4-.js.map
1785
+
1786
+ //# sourceMappingURL=p-CAqtPJ4-.js.map