@opentiny/tiny-robot 0.5.1-alpha.1 → 0.5.1-alpha.14

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 (287) hide show
  1. package/dist/attachments/index.js +261 -258
  2. package/dist/dropdown-menu/index.js +1 -1
  3. package/dist/extension-manager/index.js +473 -0
  4. package/dist/floating-ui.dom.js +970 -0
  5. package/dist/index.d.ts +5949 -51
  6. package/dist/index.js +116 -103
  7. package/dist/index4.js +2 -2
  8. package/dist/index6.js +441 -431
  9. package/dist/index8.js +87 -102
  10. package/dist/layout/index.js +1 -1
  11. package/dist/model-selector/index.js +1002 -0
  12. package/dist/sender/index.js +1232 -2114
  13. package/dist/style.css +1 -1
  14. package/dist/suggestion-pills/index.js +1 -1
  15. package/dist/suggestion-popover/index.js +37 -36
  16. package/dist/theme-provider/index.js +41 -32
  17. package/dist/useSenderContentRegistration.js +8 -0
  18. package/dist/useSlotRefs.js +1 -1
  19. package/dist/useTeleportTarget.js +25 -0
  20. package/dist/utils.js +1 -1
  21. package/package.json +4 -23
  22. package/README.md +0 -192
  23. package/README.zh-CN.md +0 -192
  24. package/dist/action-group/ActionGroup.vue.d.ts +0 -26
  25. package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
  26. package/dist/action-group/index.d.ts +0 -12
  27. package/dist/action-group/index.type.d.ts +0 -17
  28. package/dist/anchor/components/AnchorItem.vue.d.ts +0 -24
  29. package/dist/anchor/components/AnchorList.vue.d.ts +0 -20
  30. package/dist/anchor/components/AnchorOverlay.vue.d.ts +0 -33
  31. package/dist/anchor/components/AnchorSearch.vue.d.ts +0 -7
  32. package/dist/anchor/composables/index.d.ts +0 -5
  33. package/dist/anchor/composables/useActiveSync.d.ts +0 -10
  34. package/dist/anchor/composables/useFloatingOffset.d.ts +0 -6
  35. package/dist/anchor/composables/useNavController.d.ts +0 -12
  36. package/dist/anchor/composables/useOverlayInteractions.d.ts +0 -6
  37. package/dist/anchor/composables/useTargetFeedback.d.ts +0 -5
  38. package/dist/anchor/defaults.d.ts +0 -16
  39. package/dist/anchor/index.d.ts +0 -7
  40. package/dist/anchor/index.type.d.ts +0 -60
  41. package/dist/anchor/index.vue.d.ts +0 -159
  42. package/dist/anchor/internal.type.d.ts +0 -103
  43. package/dist/anchor/utils/scroll.d.ts +0 -7
  44. package/dist/anchor/utils/target.d.ts +0 -6
  45. package/dist/attachments/components/FileCard.vue.d.ts +0 -18
  46. package/dist/attachments/components/ImagePreview.vue.d.ts +0 -17
  47. package/dist/attachments/components/index.d.ts +0 -2
  48. package/dist/attachments/composables/index.d.ts +0 -5
  49. package/dist/attachments/composables/useFileCard.d.ts +0 -15
  50. package/dist/attachments/composables/useFileType.d.ts +0 -20
  51. package/dist/attachments/composables/useImagePreview.d.ts +0 -18
  52. package/dist/attachments/composables/useListType.d.ts +0 -11
  53. package/dist/attachments/index.d.ts +0 -7
  54. package/dist/attachments/index.type.d.ts +0 -70
  55. package/dist/attachments/index.vue.d.ts +0 -27
  56. package/dist/attachments/utils.d.ts +0 -3
  57. package/dist/base-popper/components/Popper.vue.d.ts +0 -28
  58. package/dist/base-popper/index.d.ts +0 -2
  59. package/dist/base-popper/index.vue.d.ts +0 -41
  60. package/dist/bubble/Bubble.vue.d.ts +0 -47
  61. package/dist/bubble/BubbleBoxWrapper.vue.d.ts +0 -22
  62. package/dist/bubble/BubbleContentWrapper.vue.d.ts +0 -22
  63. package/dist/bubble/BubbleItem.vue.d.ts +0 -44
  64. package/dist/bubble/BubbleList.vue.d.ts +0 -43
  65. package/dist/bubble/BubbleProvider.vue.d.ts +0 -18
  66. package/dist/bubble/composables/index.d.ts +0 -11
  67. package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +0 -18
  68. package/dist/bubble/composables/useBubbleContentRenderer.d.ts +0 -18
  69. package/dist/bubble/composables/useBubbleEvent.d.ts +0 -3
  70. package/dist/bubble/composables/useBubbleStateChange.d.ts +0 -1
  71. package/dist/bubble/composables/useBubbleStore.d.ts +0 -16
  72. package/dist/bubble/composables/useContentResolver.d.ts +0 -5
  73. package/dist/bubble/composables/useCopyCleanup.d.ts +0 -6
  74. package/dist/bubble/composables/useMessageContent.d.ts +0 -5
  75. package/dist/bubble/composables/useMessageGroup.d.ts +0 -4
  76. package/dist/bubble/composables/useOmitMessageFields.d.ts +0 -12
  77. package/dist/bubble/composables/useToolCall.d.ts +0 -25
  78. package/dist/bubble/constants.d.ts +0 -42
  79. package/dist/bubble/index.d.ts +0 -19
  80. package/dist/bubble/index.type.d.ts +0 -185
  81. package/dist/bubble/renderers/Box.vue.d.ts +0 -18
  82. package/dist/bubble/renderers/Image.vue.d.ts +0 -4
  83. package/dist/bubble/renderers/Loading.vue.d.ts +0 -4
  84. package/dist/bubble/renderers/Markdown.vue.d.ts +0 -4
  85. package/dist/bubble/renderers/Reasoning.vue.d.ts +0 -9
  86. package/dist/bubble/renderers/Text.vue.d.ts +0 -4
  87. package/dist/bubble/renderers/Tool.vue.d.ts +0 -14
  88. package/dist/bubble/renderers/ToolRole.vue.d.ts +0 -4
  89. package/dist/bubble/renderers/Tools.vue.d.ts +0 -4
  90. package/dist/bubble/renderers/allRenderers.d.ts +0 -93
  91. package/dist/bubble/renderers/defaultRenderers.d.ts +0 -27
  92. package/dist/bubble/utils.d.ts +0 -7
  93. package/dist/chat/components/ChatConversation.vue.d.ts +0 -305
  94. package/dist/chat/components/ChatLauncherButton.vue.d.ts +0 -12
  95. package/dist/chat/components/ChatMcpTrigger.vue.d.ts +0 -30
  96. package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +0 -6
  97. package/dist/chat/components/ChatWelcome.vue.d.ts +0 -14
  98. package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +0 -7
  99. package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +0 -7
  100. package/dist/chat/components/icons/index.d.ts +0 -5
  101. package/dist/chat/composables/useChatConversation.d.ts +0 -37
  102. package/dist/chat/composables/useChatMcp.d.ts +0 -29
  103. package/dist/chat/composables/useChatModel.d.ts +0 -27
  104. package/dist/chat/index.d.ts +0 -9
  105. package/dist/chat/index.js +0 -13904
  106. package/dist/chat/index.type.d.ts +0 -92
  107. package/dist/chat/index.vue.d.ts +0 -51
  108. package/dist/chat/locale.d.ts +0 -12
  109. package/dist/chat/mcpServers.d.ts +0 -3
  110. package/dist/container/index.d.ts +0 -7
  111. package/dist/container/index.type.d.ts +0 -20
  112. package/dist/container/index.vue.d.ts +0 -32
  113. package/dist/conversations/index.d.ts +0 -7
  114. package/dist/conversations/index.vue.d.ts +0 -2
  115. package/dist/drag-overlay/constants.d.ts +0 -17
  116. package/dist/drag-overlay/directives/vDropzone.d.ts +0 -14
  117. package/dist/drag-overlay/index.d.ts +0 -7
  118. package/dist/drag-overlay/index.type.d.ts +0 -105
  119. package/dist/drag-overlay/index.vue.d.ts +0 -20
  120. package/dist/dropdown-menu/composables/usePopperHover.d.ts +0 -6
  121. package/dist/dropdown-menu/index.d.ts +0 -7
  122. package/dist/dropdown-menu/index.type.d.ts +0 -42
  123. package/dist/dropdown-menu/index.vue.d.ts +0 -217
  124. package/dist/feedback/components/SourceList.vue.d.ts +0 -11
  125. package/dist/feedback/components/index.d.ts +0 -1
  126. package/dist/feedback/index.d.ts +0 -7
  127. package/dist/feedback/index.type.d.ts +0 -25
  128. package/dist/feedback/index.vue.d.ts +0 -13
  129. package/dist/flow-layout-buttons/index.d.ts +0 -7
  130. package/dist/flow-layout-buttons/index.type.d.ts +0 -35
  131. package/dist/flow-layout-buttons/index.vue.d.ts +0 -22
  132. package/dist/history/components/Empty.vue.d.ts +0 -7
  133. package/dist/history/components/MenuList.vue.d.ts +0 -24
  134. package/dist/history/composables/useRenameEditor.d.ts +0 -22
  135. package/dist/history/constants.d.ts +0 -1
  136. package/dist/history/index.d.ts +0 -7
  137. package/dist/history/index.type.d.ts +0 -33
  138. package/dist/history/index.vue.d.ts +0 -18
  139. package/dist/icon-button/index.d.ts +0 -7
  140. package/dist/icon-button/index.type.d.ts +0 -7
  141. package/dist/icon-button/index.vue.d.ts +0 -6
  142. package/dist/layout/Layout.vue.d.ts +0 -246
  143. package/dist/layout/LayoutAsideToggle.vue.d.ts +0 -20
  144. package/dist/layout/LayoutProxyScrollbar.vue.d.ts +0 -6
  145. package/dist/layout/components/AsideContent.vue.d.ts +0 -35
  146. package/dist/layout/components/AsideResizeTrigger.vue.d.ts +0 -20
  147. package/dist/layout/components/FloatingDragBar.vue.d.ts +0 -18
  148. package/dist/layout/components/FloatingResizeTrigger.vue.d.ts +0 -17
  149. package/dist/layout/components/FloatingResizeTriggers.vue.d.ts +0 -14
  150. package/dist/layout/components/LayoutSurface.vue.d.ts +0 -41
  151. package/dist/layout/composables/useLayoutAsideStates.d.ts +0 -21
  152. package/dist/layout/composables/useLayoutContext.d.ts +0 -4
  153. package/dist/layout/composables/usePointerDrag.d.ts +0 -19
  154. package/dist/layout/index.d.ts +0 -22
  155. package/dist/layout/index.type.d.ts +0 -111
  156. package/dist/layout/internal.type.d.ts +0 -43
  157. package/dist/layout/utils/asideEventEmitters.d.ts +0 -6
  158. package/dist/layout/utils/asidePresets.d.ts +0 -5
  159. package/dist/layout/utils/cssLength.d.ts +0 -2
  160. package/dist/layout/utils/domInteraction.d.ts +0 -1
  161. package/dist/layout/utils/number.d.ts +0 -1
  162. package/dist/layout/utils/surfaceGeometry.d.ts +0 -87
  163. package/dist/layout/utils/surfaceResize.d.ts +0 -10
  164. package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +0 -9
  165. package/dist/mcp-add-form/components/FormEditor.vue.d.ts +0 -10
  166. package/dist/mcp-add-form/components/index.d.ts +0 -2
  167. package/dist/mcp-add-form/index.d.ts +0 -7
  168. package/dist/mcp-add-form/index.type.d.ts +0 -19
  169. package/dist/mcp-add-form/index.vue.d.ts +0 -13
  170. package/dist/mcp-server-picker/components/NoData.vue.d.ts +0 -7
  171. package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +0 -40
  172. package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +0 -15
  173. package/dist/mcp-server-picker/components/index.d.ts +0 -3
  174. package/dist/mcp-server-picker/index.d.ts +0 -7
  175. package/dist/mcp-server-picker/index.type.d.ts +0 -99
  176. package/dist/mcp-server-picker/index.vue.d.ts +0 -71
  177. package/dist/prompts/index.d.ts +0 -12
  178. package/dist/prompts/index.type.d.ts +0 -59
  179. package/dist/prompts/prompt.vue.d.ts +0 -5
  180. package/dist/prompts/prompts.vue.d.ts +0 -20
  181. package/dist/sender/components/editor-content/index.vue.d.ts +0 -4
  182. package/dist/sender/components/footer/index.vue.d.ts +0 -38
  183. package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +0 -43
  184. package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +0 -32
  185. package/dist/sender/composables/index.d.ts +0 -7
  186. package/dist/sender/composables/useAutoSize.d.ts +0 -5
  187. package/dist/sender/composables/useEditor.d.ts +0 -13
  188. package/dist/sender/composables/useKeyboardShortcuts.d.ts +0 -7
  189. package/dist/sender/composables/useModeSwitch.d.ts +0 -4
  190. package/dist/sender/composables/useSenderCore.d.ts +0 -31
  191. package/dist/sender/composables/useSlotScope.d.ts +0 -10
  192. package/dist/sender/context/index.d.ts +0 -6
  193. package/dist/sender/context/types.d.ts +0 -7
  194. package/dist/sender/extensions/constants.d.ts +0 -94
  195. package/dist/sender/extensions/index.d.ts +0 -12
  196. package/dist/sender/extensions/mention/commands.d.ts +0 -20
  197. package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +0 -18
  198. package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +0 -19
  199. package/dist/sender/extensions/mention/extension.d.ts +0 -6
  200. package/dist/sender/extensions/mention/index.d.ts +0 -22
  201. package/dist/sender/extensions/mention/plugin.d.ts +0 -16
  202. package/dist/sender/extensions/mention/types.d.ts +0 -126
  203. package/dist/sender/extensions/mention/utils.d.ts +0 -34
  204. package/dist/sender/extensions/suggestion/extension.d.ts +0 -8
  205. package/dist/sender/extensions/suggestion/index.d.ts +0 -20
  206. package/dist/sender/extensions/suggestion/plugin.d.ts +0 -21
  207. package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +0 -46
  208. package/dist/sender/extensions/suggestion/types.d.ts +0 -254
  209. package/dist/sender/extensions/suggestion/utils/filter.d.ts +0 -29
  210. package/dist/sender/extensions/suggestion/utils/highlight.d.ts +0 -73
  211. package/dist/sender/extensions/template/block/extension.d.ts +0 -6
  212. package/dist/sender/extensions/template/block/plugins.d.ts +0 -13
  213. package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +0 -14
  214. package/dist/sender/extensions/template/commands.d.ts +0 -31
  215. package/dist/sender/extensions/template/extension.d.ts +0 -6
  216. package/dist/sender/extensions/template/index.d.ts +0 -21
  217. package/dist/sender/extensions/template/select/dropdown-manager.d.ts +0 -23
  218. package/dist/sender/extensions/template/select/extension.d.ts +0 -5
  219. package/dist/sender/extensions/template/select/plugins.d.ts +0 -34
  220. package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +0 -20
  221. package/dist/sender/extensions/template/types.d.ts +0 -100
  222. package/dist/sender/extensions/template/utils.d.ts +0 -20
  223. package/dist/sender/extensions/utils/id-generator.d.ts +0 -16
  224. package/dist/sender/extensions/utils/index.d.ts +0 -7
  225. package/dist/sender/extensions/utils/keyboard.d.ts +0 -49
  226. package/dist/sender/extensions/utils/position.d.ts +0 -25
  227. package/dist/sender/index.d.ts +0 -139
  228. package/dist/sender/index.type.d.ts +0 -311
  229. package/dist/sender/index.vue.d.ts +0 -93
  230. package/dist/sender/types/base.d.ts +0 -239
  231. package/dist/sender/types/components.d.ts +0 -68
  232. package/dist/sender/types/composables.d.ts +0 -122
  233. package/dist/sender/types/context.d.ts +0 -138
  234. package/dist/sender/types/slots.d.ts +0 -67
  235. package/dist/sender/utils/countGraphemes.d.ts +0 -1
  236. package/dist/sender-actions/action-button/index.vue.d.ts +0 -23
  237. package/dist/sender-actions/clear-button/index.vue.d.ts +0 -2
  238. package/dist/sender-actions/clear-button/useClearButtonState.d.ts +0 -6
  239. package/dist/sender-actions/default-actions/index.vue.d.ts +0 -17
  240. package/dist/sender-actions/index.d.ts +0 -21
  241. package/dist/sender-actions/index.type.d.ts +0 -7
  242. package/dist/sender-actions/submit-button/index.vue.d.ts +0 -2
  243. package/dist/sender-actions/types/common.d.ts +0 -40
  244. package/dist/sender-actions/types/index.d.ts +0 -5
  245. package/dist/sender-actions/types/tooltip.d.ts +0 -7
  246. package/dist/sender-actions/upload-button/index.type.d.ts +0 -57
  247. package/dist/sender-actions/upload-button/index.vue.d.ts +0 -16
  248. package/dist/sender-actions/utils/tooltip.d.ts +0 -8
  249. package/dist/sender-actions/voice-button/index.type.d.ts +0 -78
  250. package/dist/sender-actions/voice-button/index.vue.d.ts +0 -43
  251. package/dist/sender-actions/voice-button/speech.types.d.ts +0 -40
  252. package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +0 -10
  253. package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +0 -40
  254. package/dist/sender-actions/word-counter/index.vue.d.ts +0 -2
  255. package/dist/sender-compat/index.d.ts +0 -7
  256. package/dist/sender-compat/index.type.d.ts +0 -91
  257. package/dist/sender-compat/index.vue.d.ts +0 -538
  258. package/dist/shared/composables/createTeleport.d.ts +0 -2
  259. package/dist/shared/composables/index.d.ts +0 -6
  260. package/dist/shared/composables/useAutoScroll.d.ts +0 -25
  261. package/dist/shared/composables/useControllableState.d.ts +0 -20
  262. package/dist/shared/composables/useSlotRefs.d.ts +0 -12
  263. package/dist/shared/composables/useTeleportTarget.d.ts +0 -11
  264. package/dist/shared/composables/useTouchDevice.d.ts +0 -3
  265. package/dist/shared/utils.d.ts +0 -7
  266. package/dist/suggestion-pills/components/PillButton.vue.d.ts +0 -16
  267. package/dist/suggestion-pills/components/index.d.ts +0 -1
  268. package/dist/suggestion-pills/index.d.ts +0 -13
  269. package/dist/suggestion-pills/index.type.d.ts +0 -45
  270. package/dist/suggestion-pills/index.vue.d.ts +0 -44
  271. package/dist/suggestion-popover/components/Backdrop.vue.d.ts +0 -5
  272. package/dist/suggestion-popover/components/Header.vue.d.ts +0 -4
  273. package/dist/suggestion-popover/components/Loading.vue.d.ts +0 -17
  274. package/dist/suggestion-popover/components/NoData.vue.d.ts +0 -17
  275. package/dist/suggestion-popover/components/Tooltip.vue.d.ts +0 -19
  276. package/dist/suggestion-popover/index.d.ts +0 -7
  277. package/dist/suggestion-popover/index.type.d.ts +0 -80
  278. package/dist/suggestion-popover/index.vue.d.ts +0 -262
  279. package/dist/theme-provider/constants.d.ts +0 -6
  280. package/dist/theme-provider/index.d.ts +0 -9
  281. package/dist/theme-provider/index.type.d.ts +0 -18
  282. package/dist/theme-provider/index.vue.d.ts +0 -32
  283. package/dist/theme-provider/useTheme.d.ts +0 -11
  284. package/dist/useTheme.js +0 -22
  285. package/dist/welcome/index.d.ts +0 -7
  286. package/dist/welcome/index.type.d.ts +0 -10
  287. package/dist/welcome/index.vue.d.ts +0 -18
@@ -0,0 +1,970 @@
1
+ const X = Math.min, D = Math.max, Q = Math.round, J = Math.floor, P = (t) => ({
2
+ x: t,
3
+ y: t
4
+ }), Mt = {
5
+ left: "right",
6
+ right: "left",
7
+ bottom: "top",
8
+ top: "bottom"
9
+ };
10
+ function Nt(t, e, n) {
11
+ return D(t, X(e, n));
12
+ }
13
+ function U(t, e) {
14
+ return typeof t == "function" ? t(e) : t;
15
+ }
16
+ function B(t) {
17
+ return t.split("-")[0];
18
+ }
19
+ function G(t) {
20
+ return t.split("-")[1];
21
+ }
22
+ function At(t) {
23
+ return t === "x" ? "y" : "x";
24
+ }
25
+ function Ct(t) {
26
+ return t === "y" ? "height" : "width";
27
+ }
28
+ function T(t) {
29
+ const e = t[0];
30
+ return e === "t" || e === "b" ? "y" : "x";
31
+ }
32
+ function Ot(t) {
33
+ return At(T(t));
34
+ }
35
+ function Vt(t, e, n) {
36
+ n === void 0 && (n = !1);
37
+ const o = G(t), i = Ot(t), s = Ct(i);
38
+ let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
39
+ return e.reference[s] > e.floating[s] && (r = Z(r)), [r, Z(r)];
40
+ }
41
+ function kt(t) {
42
+ const e = Z(t);
43
+ return [ft(t), e, ft(e)];
44
+ }
45
+ function ft(t) {
46
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
47
+ }
48
+ const wt = ["left", "right"], xt = ["right", "left"], _t = ["top", "bottom"], $t = ["bottom", "top"];
49
+ function Bt(t, e, n) {
50
+ switch (t) {
51
+ case "top":
52
+ case "bottom":
53
+ return n ? e ? xt : wt : e ? wt : xt;
54
+ case "left":
55
+ case "right":
56
+ return e ? _t : $t;
57
+ default:
58
+ return [];
59
+ }
60
+ }
61
+ function Ht(t, e, n, o) {
62
+ const i = G(t);
63
+ let s = Bt(B(t), n === "start", o);
64
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(ft)))), s;
65
+ }
66
+ function Z(t) {
67
+ const e = B(t);
68
+ return Mt[e] + t.slice(e.length);
69
+ }
70
+ function zt(t) {
71
+ var e, n, o, i;
72
+ return {
73
+ top: (e = t.top) != null ? e : 0,
74
+ right: (n = t.right) != null ? n : 0,
75
+ bottom: (o = t.bottom) != null ? o : 0,
76
+ left: (i = t.left) != null ? i : 0
77
+ };
78
+ }
79
+ function It(t) {
80
+ return typeof t != "number" ? zt(t) : {
81
+ top: t,
82
+ right: t,
83
+ bottom: t,
84
+ left: t
85
+ };
86
+ }
87
+ function tt(t) {
88
+ const {
89
+ x: e,
90
+ y: n,
91
+ width: o,
92
+ height: i
93
+ } = t;
94
+ return {
95
+ width: o,
96
+ height: i,
97
+ top: n,
98
+ left: e,
99
+ right: e + o,
100
+ bottom: n + i,
101
+ x: e,
102
+ y: n
103
+ };
104
+ }
105
+ function yt(t, e, n) {
106
+ let {
107
+ reference: o,
108
+ floating: i
109
+ } = t;
110
+ const s = T(e), r = Ot(e), c = Ct(r), l = B(e), f = s === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[c] / 2 - i[c] / 2;
111
+ let a;
112
+ switch (l) {
113
+ case "top":
114
+ a = {
115
+ x: u,
116
+ y: o.y - i.height
117
+ };
118
+ break;
119
+ case "bottom":
120
+ a = {
121
+ x: u,
122
+ y: o.y + o.height
123
+ };
124
+ break;
125
+ case "right":
126
+ a = {
127
+ x: o.x + o.width,
128
+ y: d
129
+ };
130
+ break;
131
+ case "left":
132
+ a = {
133
+ x: o.x - i.width,
134
+ y: d
135
+ };
136
+ break;
137
+ default:
138
+ a = {
139
+ x: o.x,
140
+ y: o.y
141
+ };
142
+ }
143
+ const m = G(e);
144
+ return m && (a[r] += h * (m === "end" ? 1 : -1) * (n && f ? -1 : 1)), a;
145
+ }
146
+ async function Xt(t, e) {
147
+ var n;
148
+ e === void 0 && (e = {});
149
+ const {
150
+ x: o,
151
+ y: i,
152
+ platform: s,
153
+ rects: r,
154
+ elements: c,
155
+ strategy: l
156
+ } = t, {
157
+ boundary: f = "clippingAncestors",
158
+ rootBoundary: u = "viewport",
159
+ elementContext: d = "floating",
160
+ altBoundary: h = !1,
161
+ padding: a = 0
162
+ } = U(e, t), m = It(a), w = c[h ? d === "floating" ? "reference" : "floating" : d], g = tt(await s.getClippingRect({
163
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
164
+ boundary: f,
165
+ rootBoundary: u,
166
+ strategy: l
167
+ })), x = d === "floating" ? {
168
+ x: o,
169
+ y: i,
170
+ width: r.floating.width,
171
+ height: r.floating.height
172
+ } : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), v = await (s.isElement == null ? void 0 : s.isElement(y)) && await (s.getScale == null ? void 0 : s.getScale(y)) || {
173
+ x: 1,
174
+ y: 1
175
+ }, A = tt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
176
+ elements: c,
177
+ rect: x,
178
+ offsetParent: y,
179
+ strategy: l
180
+ }) : x);
181
+ return {
182
+ top: (g.top - A.top + m.top) / v.y,
183
+ bottom: (A.bottom - g.bottom + m.bottom) / v.y,
184
+ left: (g.left - A.left + m.left) / v.x,
185
+ right: (A.right - g.right + m.right) / v.x
186
+ };
187
+ }
188
+ const jt = 50, Yt = async (t, e, n) => {
189
+ const {
190
+ placement: o = "bottom",
191
+ strategy: i = "absolute",
192
+ middleware: s = [],
193
+ platform: r
194
+ } = n, c = r.detectOverflow ? r : {
195
+ ...r,
196
+ detectOverflow: Xt
197
+ }, l = await (r.isRTL == null ? void 0 : r.isRTL(e));
198
+ let f = await r.getElementRects({
199
+ reference: t,
200
+ floating: e,
201
+ strategy: i
202
+ }), {
203
+ x: u,
204
+ y: d
205
+ } = yt(f, o, l), h = o, a = 0;
206
+ const m = {};
207
+ for (let p = 0; p < s.length; p++) {
208
+ const w = s[p];
209
+ if (!w)
210
+ continue;
211
+ const {
212
+ name: g,
213
+ fn: x
214
+ } = w, {
215
+ x: y,
216
+ y: v,
217
+ data: A,
218
+ reset: b
219
+ } = await x({
220
+ x: u,
221
+ y: d,
222
+ initialPlacement: o,
223
+ placement: h,
224
+ strategy: i,
225
+ middlewareData: m,
226
+ rects: f,
227
+ platform: c,
228
+ elements: {
229
+ reference: t,
230
+ floating: e
231
+ }
232
+ });
233
+ u = y ?? u, d = v ?? d, m[g] = {
234
+ ...m[g],
235
+ ...A
236
+ }, b && a < jt && (a++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (f = b.rects === !0 ? await r.getElementRects({
237
+ reference: t,
238
+ floating: e,
239
+ strategy: i
240
+ }) : b.rects), {
241
+ x: u,
242
+ y: d
243
+ } = yt(f, h, l)), p = -1);
244
+ }
245
+ return {
246
+ x: u,
247
+ y: d,
248
+ placement: h,
249
+ strategy: i,
250
+ middlewareData: m
251
+ };
252
+ }, qt = function(t) {
253
+ return t === void 0 && (t = {}), {
254
+ name: "flip",
255
+ options: t,
256
+ async fn(e) {
257
+ var n, o;
258
+ const {
259
+ placement: i,
260
+ middlewareData: s,
261
+ rects: r,
262
+ initialPlacement: c,
263
+ platform: l,
264
+ elements: f
265
+ } = e, {
266
+ mainAxis: u = !0,
267
+ crossAxis: d = !0,
268
+ fallbackPlacements: h,
269
+ fallbackStrategy: a = "bestFit",
270
+ fallbackAxisSideDirection: m = "none",
271
+ flipAlignment: p = !0,
272
+ ...w
273
+ } = U(t, e);
274
+ if ((n = s.arrow) != null && n.alignmentOffset)
275
+ return {};
276
+ const g = B(i), x = T(c), y = B(c) === c, v = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), A = h || (y || !p ? [Z(c)] : kt(c)), b = m !== "none";
277
+ !h && b && A.push(...Ht(c, p, m, v));
278
+ const W = [c, ...A], S = await l.detectOverflow(e, w), V = [];
279
+ let O = ((o = s.flip) == null ? void 0 : o.overflows) || [];
280
+ if (u && V.push(S[g]), d) {
281
+ const k = Vt(i, r, v);
282
+ V.push(S[k[0]], S[k[1]]);
283
+ }
284
+ if (O = [...O, {
285
+ placement: i,
286
+ overflows: V
287
+ }], !V.every((k) => k <= 0)) {
288
+ var mt, gt;
289
+ const k = (((mt = s.flip) == null ? void 0 : mt.index) || 0) + 1, rt = W[k];
290
+ if (rt && (!(d === "alignment" ? x !== T(rt) : !1) || // We leave the current main axis only if every placement on that axis
291
+ // overflows the main axis.
292
+ O.every((C) => T(C.placement) === x ? C.overflows[0] > 0 : !0)))
293
+ return {
294
+ data: {
295
+ index: k,
296
+ overflows: O
297
+ },
298
+ reset: {
299
+ placement: rt
300
+ }
301
+ };
302
+ let Y = (gt = O.filter((_) => _.overflows[0] <= 0).sort((_, C) => _.overflows[1] - C.overflows[1])[0]) == null ? void 0 : gt.placement;
303
+ if (!Y)
304
+ switch (a) {
305
+ case "bestFit": {
306
+ var pt;
307
+ const _ = (pt = O.filter((C) => {
308
+ if (b) {
309
+ const M = T(C.placement);
310
+ return M === x || // Create a bias to the `y` side axis due to horizontal
311
+ // reading directions favoring greater width.
312
+ M === "y";
313
+ }
314
+ return !0;
315
+ }).map((C) => [C.placement, C.overflows.filter((M) => M > 0).reduce((M, Wt) => M + Wt, 0)]).sort((C, M) => C[1] - M[1])[0]) == null ? void 0 : pt[0];
316
+ _ && (Y = _);
317
+ break;
318
+ }
319
+ case "initialPlacement":
320
+ Y = c;
321
+ break;
322
+ }
323
+ if (i !== Y)
324
+ return {
325
+ reset: {
326
+ placement: Y
327
+ }
328
+ };
329
+ }
330
+ return {};
331
+ }
332
+ };
333
+ }, Kt = /* @__PURE__ */ new Set(["left", "top"]);
334
+ async function Ut(t, e) {
335
+ const {
336
+ placement: n,
337
+ platform: o,
338
+ elements: i
339
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = B(n), c = G(n), l = T(n) === "y", f = Kt.has(r) ? -1 : 1, u = s && l ? -1 : 1, d = U(e, t);
340
+ let {
341
+ mainAxis: h,
342
+ crossAxis: a,
343
+ alignmentAxis: m
344
+ } = typeof d == "number" ? {
345
+ mainAxis: d,
346
+ crossAxis: 0,
347
+ alignmentAxis: null
348
+ } : {
349
+ mainAxis: d.mainAxis || 0,
350
+ crossAxis: d.crossAxis || 0,
351
+ alignmentAxis: d.alignmentAxis
352
+ };
353
+ return c && typeof m == "number" && (a = c === "end" ? m * -1 : m), l ? {
354
+ x: a * u,
355
+ y: h * f
356
+ } : {
357
+ x: h * f,
358
+ y: a * u
359
+ };
360
+ }
361
+ const Gt = function(t) {
362
+ return t === void 0 && (t = 0), {
363
+ name: "offset",
364
+ options: t,
365
+ async fn(e) {
366
+ var n, o;
367
+ const {
368
+ x: i,
369
+ y: s,
370
+ placement: r,
371
+ middlewareData: c
372
+ } = e, l = await Ut(e, t);
373
+ return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
374
+ x: i + l.x,
375
+ y: s + l.y,
376
+ data: {
377
+ ...l,
378
+ placement: r
379
+ }
380
+ };
381
+ }
382
+ };
383
+ }, Jt = function(t) {
384
+ return t === void 0 && (t = {}), {
385
+ name: "shift",
386
+ options: t,
387
+ async fn(e) {
388
+ const {
389
+ x: n,
390
+ y: o,
391
+ placement: i,
392
+ platform: s
393
+ } = e, {
394
+ mainAxis: r = !0,
395
+ crossAxis: c = !1,
396
+ limiter: l = {
397
+ fn: (x) => {
398
+ let {
399
+ x: y,
400
+ y: v
401
+ } = x;
402
+ return {
403
+ x: y,
404
+ y: v
405
+ };
406
+ }
407
+ },
408
+ ...f
409
+ } = U(t, e), u = {
410
+ x: n,
411
+ y: o
412
+ }, d = await s.detectOverflow(e, f), h = T(i), a = At(h);
413
+ let m = u[a], p = u[h];
414
+ const w = (x, y) => Nt(y + d[x === "y" ? "top" : "left"], y, y - d[x === "y" ? "bottom" : "right"]);
415
+ r && (m = w(a, m)), c && (p = w(h, p));
416
+ const g = l.fn({
417
+ ...e,
418
+ [a]: m,
419
+ [h]: p
420
+ });
421
+ return {
422
+ ...g,
423
+ data: {
424
+ x: g.x - n,
425
+ y: g.y - o,
426
+ enabled: {
427
+ [a]: r,
428
+ [h]: c
429
+ }
430
+ }
431
+ };
432
+ }
433
+ };
434
+ }, Qt = function(t) {
435
+ return t === void 0 && (t = {}), {
436
+ name: "size",
437
+ options: t,
438
+ async fn(e) {
439
+ const {
440
+ placement: n,
441
+ rects: o,
442
+ platform: i,
443
+ elements: s
444
+ } = e, {
445
+ apply: r = () => {
446
+ },
447
+ ...c
448
+ } = U(t, e), l = await i.detectOverflow(e, c), f = B(n), u = G(n), d = T(n) === "y", {
449
+ width: h,
450
+ height: a
451
+ } = o.floating;
452
+ let m, p;
453
+ f === "top" || f === "bottom" ? (m = f, p = u === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (p = f, m = u === "end" ? "top" : "bottom");
454
+ const w = a - l.top - l.bottom, g = h - l.left - l.right, x = X(a - l[m], w), y = X(h - l[p], g), v = e.middlewareData.shift, A = !v;
455
+ let b = x, W = y;
456
+ v != null && v.enabled.x && (W = g), v != null && v.enabled.y && (b = w), A && !u && (d ? W = h - 2 * D(l.left, l.right) : b = a - 2 * D(l.top, l.bottom)), await r({
457
+ ...e,
458
+ availableWidth: W,
459
+ availableHeight: b
460
+ });
461
+ const S = await i.getDimensions(s.floating);
462
+ return h !== S.width || a !== S.height ? {
463
+ reset: {
464
+ rects: !0
465
+ }
466
+ } : {};
467
+ }
468
+ };
469
+ };
470
+ function et() {
471
+ return typeof window < "u";
472
+ }
473
+ function j(t) {
474
+ return Lt(t) ? (t.nodeName || "").toLowerCase() : "#document";
475
+ }
476
+ function R(t) {
477
+ var e;
478
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
479
+ }
480
+ function F(t) {
481
+ var e;
482
+ return (e = (Lt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
483
+ }
484
+ function Lt(t) {
485
+ return et() ? t instanceof Node || t instanceof R(t).Node : !1;
486
+ }
487
+ function L(t) {
488
+ return et() ? t instanceof Element || t instanceof R(t).Element : !1;
489
+ }
490
+ function N(t) {
491
+ return et() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
492
+ }
493
+ function vt(t) {
494
+ return !et() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
495
+ }
496
+ function nt(t) {
497
+ const {
498
+ overflow: e,
499
+ overflowX: n,
500
+ overflowY: o,
501
+ display: i
502
+ } = E(t);
503
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && i !== "inline" && i !== "contents";
504
+ }
505
+ function Zt(t) {
506
+ return /^(table|td|th)$/.test(j(t));
507
+ }
508
+ function ot(t) {
509
+ try {
510
+ if (t.matches(":popover-open"))
511
+ return !0;
512
+ } catch {
513
+ }
514
+ try {
515
+ return t.matches(":modal");
516
+ } catch {
517
+ return !1;
518
+ }
519
+ }
520
+ const te = /transform|translate|scale|rotate|perspective|filter/, ee = /paint|layout|strict|content/, $ = (t) => !!t && t !== "none";
521
+ let ct;
522
+ function ut(t) {
523
+ const e = L(t) ? E(t) : t;
524
+ return $(e.transform) || $(e.translate) || $(e.scale) || $(e.rotate) || $(e.perspective) || !dt() && ($(e.backdropFilter) || $(e.filter)) || te.test(e.willChange || "") || ee.test(e.contain || "");
525
+ }
526
+ function ne(t) {
527
+ let e = H(t);
528
+ for (; N(e) && !q(e); ) {
529
+ if (ut(e))
530
+ return e;
531
+ if (ot(e))
532
+ return null;
533
+ e = H(e);
534
+ }
535
+ return null;
536
+ }
537
+ function dt() {
538
+ return ct == null && (ct = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), ct;
539
+ }
540
+ function q(t) {
541
+ return /^(html|body|#document)$/.test(j(t));
542
+ }
543
+ function E(t) {
544
+ return R(t).getComputedStyle(t);
545
+ }
546
+ function it(t) {
547
+ return L(t) ? {
548
+ scrollLeft: t.scrollLeft,
549
+ scrollTop: t.scrollTop
550
+ } : {
551
+ scrollLeft: t.scrollX,
552
+ scrollTop: t.scrollY
553
+ };
554
+ }
555
+ function H(t) {
556
+ if (j(t) === "html")
557
+ return t;
558
+ const e = (
559
+ // Step into the shadow DOM of the parent of a slotted node.
560
+ t.assignedSlot || // DOM Element detected.
561
+ t.parentNode || // ShadowRoot detected.
562
+ vt(t) && t.host || // Fallback.
563
+ F(t)
564
+ );
565
+ return vt(e) ? e.host : e;
566
+ }
567
+ function Et(t) {
568
+ const e = H(t);
569
+ return q(e) ? (t.ownerDocument || t).body : N(e) && nt(e) ? e : Et(e);
570
+ }
571
+ function K(t, e, n) {
572
+ var o;
573
+ e === void 0 && (e = []), n === void 0 && (n = !0);
574
+ const i = Et(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = R(i);
575
+ if (s) {
576
+ const c = at(r);
577
+ return e.concat(r, r.visualViewport || [], nt(i) ? i : [], c && n ? K(c) : []);
578
+ } else
579
+ return e.concat(i, K(i, [], n));
580
+ }
581
+ function at(t) {
582
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
583
+ }
584
+ function St(t) {
585
+ const e = E(t);
586
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
587
+ const i = N(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = Q(n) !== s || Q(o) !== r;
588
+ return c && (n = s, o = r), {
589
+ width: n,
590
+ height: o,
591
+ $: c
592
+ };
593
+ }
594
+ function ht(t) {
595
+ return L(t) ? t : t.contextElement;
596
+ }
597
+ function I(t) {
598
+ const e = ht(t);
599
+ if (!N(e))
600
+ return P(1);
601
+ const n = e.getBoundingClientRect(), {
602
+ width: o,
603
+ height: i,
604
+ $: s
605
+ } = St(e);
606
+ let r = (s ? Q(n.width) : n.width) / o, c = (s ? Q(n.height) : n.height) / i;
607
+ return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
608
+ x: r,
609
+ y: c
610
+ };
611
+ }
612
+ const oe = /* @__PURE__ */ P(0);
613
+ function Tt(t) {
614
+ const e = R(t);
615
+ return !dt() || !e.visualViewport ? oe : {
616
+ x: e.visualViewport.offsetLeft,
617
+ y: e.visualViewport.offsetTop
618
+ };
619
+ }
620
+ function ie(t, e, n) {
621
+ return e === void 0 && (e = !1), !!n && e && n === R(t);
622
+ }
623
+ function z(t, e, n, o) {
624
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
625
+ const i = t.getBoundingClientRect(), s = ht(t);
626
+ let r = P(1);
627
+ e && (o ? L(o) && (r = I(o)) : r = I(t));
628
+ const c = ie(s, n, o) ? Tt(s) : P(0);
629
+ let l = (i.left + c.x) / r.x, f = (i.top + c.y) / r.y, u = i.width / r.x, d = i.height / r.y;
630
+ if (s && o) {
631
+ const h = R(s), a = L(o) ? R(o) : o;
632
+ let m = h, p = at(m);
633
+ for (; p && a !== m; ) {
634
+ const w = I(p), g = p.getBoundingClientRect(), x = E(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, v = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
635
+ l *= w.x, f *= w.y, u *= w.x, d *= w.y, l += y, f += v, m = R(p), p = at(m);
636
+ }
637
+ }
638
+ return tt({
639
+ width: u,
640
+ height: d,
641
+ x: l,
642
+ y: f
643
+ });
644
+ }
645
+ function st(t, e) {
646
+ const n = it(t).scrollLeft;
647
+ return e ? e.left + n : z(F(t)).left + n;
648
+ }
649
+ function Dt(t, e) {
650
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - st(t, n), i = n.top + e.scrollTop;
651
+ return {
652
+ x: o,
653
+ y: i
654
+ };
655
+ }
656
+ function se(t) {
657
+ let {
658
+ elements: e,
659
+ rect: n,
660
+ offsetParent: o,
661
+ strategy: i
662
+ } = t;
663
+ const s = i === "fixed", r = F(o), c = e ? ot(e.floating) : !1;
664
+ if (o === r || c && s)
665
+ return n;
666
+ let l = {
667
+ scrollLeft: 0,
668
+ scrollTop: 0
669
+ }, f = P(1);
670
+ const u = P(0), d = N(o);
671
+ if ((d || !s) && ((j(o) !== "body" || nt(r)) && (l = it(o)), d)) {
672
+ const a = z(o);
673
+ f = I(o), u.x = a.x + o.clientLeft, u.y = a.y + o.clientTop;
674
+ }
675
+ const h = r && !d && !s ? Dt(r, l) : P(0);
676
+ return {
677
+ width: n.width * f.x,
678
+ height: n.height * f.y,
679
+ x: n.x * f.x - l.scrollLeft * f.x + u.x + h.x,
680
+ y: n.y * f.y - l.scrollTop * f.y + u.y + h.y
681
+ };
682
+ }
683
+ function re(t) {
684
+ return t.getClientRects ? Array.from(t.getClientRects()) : [];
685
+ }
686
+ function ce(t) {
687
+ const e = it(t), n = t.ownerDocument.body, o = D(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = D(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
688
+ let s = -e.scrollLeft + st(t);
689
+ const r = -e.scrollTop;
690
+ return E(n).direction === "rtl" && (s += D(t.clientWidth, n.clientWidth) - o), {
691
+ width: o,
692
+ height: i,
693
+ x: s,
694
+ y: r
695
+ };
696
+ }
697
+ const le = 25;
698
+ function fe(t, e, n) {
699
+ n === void 0 && (n = "viewport");
700
+ const o = n === "layoutViewport", i = R(t), s = F(t), r = i.visualViewport;
701
+ let c = s.clientWidth, l = s.clientHeight, f = 0, u = 0;
702
+ if (r) {
703
+ const h = !dt() || e === "fixed";
704
+ o ? h || (f = -r.offsetLeft, u = -r.offsetTop) : (c = r.width, l = r.height, h && (f = r.offsetLeft, u = r.offsetTop));
705
+ }
706
+ if (st(s) <= 0) {
707
+ const h = s.ownerDocument, a = h.body, m = getComputedStyle(a), p = h.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, w = Math.abs(s.clientWidth - a.clientWidth - p), g = getComputedStyle(s).scrollbarGutter === "stable both-edges" ? w / 2 : w;
708
+ g <= le && (c -= g);
709
+ }
710
+ return {
711
+ width: c,
712
+ height: l,
713
+ x: f,
714
+ y: u
715
+ };
716
+ }
717
+ function ae(t, e) {
718
+ const n = z(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = I(t), r = t.clientWidth * s.x, c = t.clientHeight * s.y, l = i * s.x, f = o * s.y;
719
+ return {
720
+ width: r,
721
+ height: c,
722
+ x: l,
723
+ y: f
724
+ };
725
+ }
726
+ function bt(t, e, n) {
727
+ let o;
728
+ if (e === "viewport" || e === "layoutViewport")
729
+ o = fe(t, n, e);
730
+ else if (e === "document")
731
+ o = ce(F(t));
732
+ else if (L(e))
733
+ o = ae(e, n);
734
+ else {
735
+ const i = Tt(t);
736
+ o = {
737
+ x: e.x - i.x,
738
+ y: e.y - i.y,
739
+ width: e.width,
740
+ height: e.height
741
+ };
742
+ }
743
+ return tt(o);
744
+ }
745
+ function ue(t, e) {
746
+ const n = e.get(t);
747
+ if (n)
748
+ return n;
749
+ let o = K(t, [], !1).filter((c) => L(c) && j(c) !== "body"), i = null;
750
+ const s = E(t).position === "fixed";
751
+ let r = s ? H(t) : t;
752
+ for (; L(r) && !q(r); ) {
753
+ const c = E(r), l = ut(r), f = i ? i.position : s ? "fixed" : "";
754
+ !l && (f === "fixed" || f === "absolute" && c.position === "static") ? o = o.filter((d) => d !== r) : i = c, r = H(r);
755
+ }
756
+ return e.set(t, o), o;
757
+ }
758
+ function de(t) {
759
+ let {
760
+ element: e,
761
+ boundary: n,
762
+ rootBoundary: o,
763
+ strategy: i
764
+ } = t;
765
+ const r = [...n === "clippingAncestors" ? ot(e) ? [] : ue(e, this._c) : [].concat(n), o], c = bt(e, r[0], i);
766
+ let l = c.top, f = c.right, u = c.bottom, d = c.left;
767
+ for (let h = 1; h < r.length; h++) {
768
+ const a = bt(e, r[h], i);
769
+ l = D(a.top, l), f = X(a.right, f), u = X(a.bottom, u), d = D(a.left, d);
770
+ }
771
+ return {
772
+ width: f - d,
773
+ height: u - l,
774
+ x: d,
775
+ y: l
776
+ };
777
+ }
778
+ function he(t) {
779
+ const {
780
+ width: e,
781
+ height: n
782
+ } = St(t);
783
+ return {
784
+ width: e,
785
+ height: n
786
+ };
787
+ }
788
+ function me(t, e, n) {
789
+ const o = N(e), i = F(e), s = n === "fixed", r = z(t, !0, s, e);
790
+ let c = {
791
+ scrollLeft: 0,
792
+ scrollTop: 0
793
+ };
794
+ const l = P(0);
795
+ if ((o || !s) && ((j(e) !== "body" || nt(i)) && (c = it(e)), o)) {
796
+ const h = z(e, !0, s, e);
797
+ l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
798
+ }
799
+ !o && i && (l.x = st(i));
800
+ const f = i && !o && !s ? Dt(i, c) : P(0), u = r.left + c.scrollLeft - l.x - f.x, d = r.top + c.scrollTop - l.y - f.y;
801
+ return {
802
+ x: u,
803
+ y: d,
804
+ width: r.width,
805
+ height: r.height
806
+ };
807
+ }
808
+ function lt(t) {
809
+ return E(t).position === "static";
810
+ }
811
+ function Rt(t, e) {
812
+ if (!N(t) || E(t).position === "fixed")
813
+ return null;
814
+ if (e)
815
+ return e(t);
816
+ let n = t.offsetParent;
817
+ return F(t) === n && (n = n.ownerDocument.body), n;
818
+ }
819
+ function Pt(t, e) {
820
+ const n = R(t);
821
+ if (ot(t))
822
+ return n;
823
+ if (!N(t)) {
824
+ let i = H(t);
825
+ for (; i && !q(i); ) {
826
+ if (L(i) && !lt(i))
827
+ return i;
828
+ i = H(i);
829
+ }
830
+ return n;
831
+ }
832
+ let o = Rt(t, e);
833
+ for (; o && Zt(o) && lt(o); )
834
+ o = Rt(o, e);
835
+ return o && q(o) && lt(o) && !ut(o) ? n : o || ne(t) || n;
836
+ }
837
+ const ge = async function(t) {
838
+ const e = this.getOffsetParent || Pt, n = this.getDimensions, o = await n(t.floating);
839
+ return {
840
+ reference: me(t.reference, await e(t.floating), t.strategy),
841
+ floating: {
842
+ x: 0,
843
+ y: 0,
844
+ width: o.width,
845
+ height: o.height
846
+ }
847
+ };
848
+ };
849
+ function pe(t) {
850
+ return E(t).direction === "rtl";
851
+ }
852
+ const we = {
853
+ convertOffsetParentRelativeRectToViewportRelativeRect: se,
854
+ getDocumentElement: F,
855
+ getClippingRect: de,
856
+ getOffsetParent: Pt,
857
+ getElementRects: ge,
858
+ getClientRects: re,
859
+ getDimensions: he,
860
+ getScale: I,
861
+ isElement: L,
862
+ isRTL: pe
863
+ };
864
+ function Ft(t, e) {
865
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
866
+ }
867
+ function xe(t, e, n) {
868
+ let o = null, i;
869
+ const s = F(t);
870
+ function r() {
871
+ var u;
872
+ clearTimeout(i), (u = o) == null || u.disconnect(), o = null;
873
+ }
874
+ function c(u, d) {
875
+ u === void 0 && (u = !1), d === void 0 && (d = 1), r();
876
+ const h = t.getBoundingClientRect(), {
877
+ left: a,
878
+ top: m,
879
+ width: p,
880
+ height: w
881
+ } = h;
882
+ if (u || e(), !p || !w)
883
+ return;
884
+ const g = J(m), x = J(s.clientWidth - (a + p)), y = J(s.clientHeight - (m + w)), v = J(a), b = {
885
+ rootMargin: -g + "px " + -x + "px " + -y + "px " + -v + "px",
886
+ threshold: D(0, X(1, d)) || 1
887
+ };
888
+ let W = !0;
889
+ function S(V) {
890
+ const O = V[0].intersectionRatio;
891
+ if (!Ft(h, t.getBoundingClientRect()))
892
+ return c();
893
+ if (O !== d) {
894
+ if (!W)
895
+ return c();
896
+ O ? c(!1, O) : i = setTimeout(() => {
897
+ c(!1, 1e-7);
898
+ }, 1e3);
899
+ }
900
+ W = !1;
901
+ }
902
+ try {
903
+ o = new IntersectionObserver(S, {
904
+ ...b,
905
+ // Handle <iframe>s
906
+ root: s.ownerDocument
907
+ });
908
+ } catch {
909
+ o = new IntersectionObserver(S, b);
910
+ }
911
+ o.observe(t);
912
+ }
913
+ const l = R(t), f = () => c(n);
914
+ return l.addEventListener("resize", f), c(!0), () => {
915
+ l.removeEventListener("resize", f), r();
916
+ };
917
+ }
918
+ function ye(t, e, n, o) {
919
+ o === void 0 && (o = {});
920
+ const {
921
+ ancestorScroll: i = !0,
922
+ ancestorResize: s = !0,
923
+ elementResize: r = typeof ResizeObserver == "function",
924
+ layoutShift: c = typeof IntersectionObserver == "function",
925
+ animationFrame: l = !1
926
+ } = o, f = ht(t), u = i || s ? [...f ? K(f) : [], ...e ? K(e) : []] : [];
927
+ u.forEach((g) => {
928
+ i && g.addEventListener("scroll", n), s && g.addEventListener("resize", n);
929
+ });
930
+ const d = f && c ? xe(f, n, s) : null;
931
+ let h = -1, a = null;
932
+ r && (a = new ResizeObserver((g) => {
933
+ let [x] = g;
934
+ x && x.target === f && a && e && (a.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
935
+ var y;
936
+ (y = a) == null || y.observe(e);
937
+ })), n();
938
+ }), f && !l && a.observe(f), e && a.observe(e));
939
+ let m, p = l ? z(t) : null;
940
+ l && w();
941
+ function w() {
942
+ const g = z(t);
943
+ p && !Ft(p, g) && n(), p = g, m = requestAnimationFrame(w);
944
+ }
945
+ return n(), () => {
946
+ var g;
947
+ u.forEach((x) => {
948
+ i && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
949
+ }), d == null || d(), (g = a) == null || g.disconnect(), a = null, l && cancelAnimationFrame(m);
950
+ };
951
+ }
952
+ const ve = Gt, be = Jt, Re = qt, Ae = Qt, Ce = (t, e, n) => {
953
+ const o = /* @__PURE__ */ new Map(), i = n ?? {}, s = {
954
+ ...we,
955
+ ...i.platform,
956
+ _c: o
957
+ };
958
+ return Yt(t, e, {
959
+ ...i,
960
+ platform: s
961
+ });
962
+ };
963
+ export {
964
+ ye as a,
965
+ Ae as b,
966
+ Ce as c,
967
+ Re as f,
968
+ ve as o,
969
+ be as s
970
+ };