bootstrap-vue-next 1.2.4 → 1.2.5

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 (167) hide show
  1. package/dist/{BAccordion-ByAMZCS9.js → BAccordion-BfaVicrj.js} +2 -2
  2. package/dist/{BAccordion-ByAMZCS9.js.map → BAccordion-BfaVicrj.js.map} +1 -1
  3. package/dist/{BAlert-DdfFcjWF.js → BAlert-Czy83dU3.js} +5 -5
  4. package/dist/{BAlert-DdfFcjWF.js.map → BAlert-Czy83dU3.js.map} +1 -1
  5. package/dist/BAutocomplete-Bh4Bp5AI.js +437 -0
  6. package/dist/BAutocomplete-Bh4Bp5AI.js.map +1 -0
  7. package/dist/{BAvatar-BsStQrBF.js → BAvatar-BJNeQ1fe.js} +2 -2
  8. package/dist/{BAvatar-BsStQrBF.js.map → BAvatar-BJNeQ1fe.js.map} +1 -1
  9. package/dist/{BButton-KZu5jczf.js → BButton-DlOQ5sem.js} +2 -2
  10. package/dist/{BButton-KZu5jczf.js.map → BButton-DlOQ5sem.js.map} +1 -1
  11. package/dist/{BCard-DELccMG-.js → BCard-Bc1wed-3.js} +2 -2
  12. package/dist/{BCard-DELccMG-.js.map → BCard-Bc1wed-3.js.map} +1 -1
  13. package/dist/{BCarousel-qHGRSVFe.js → BCarousel-B-WZR469.js} +3 -4
  14. package/dist/{BCarousel-qHGRSVFe.js.map → BCarousel-B-WZR469.js.map} +1 -1
  15. package/dist/{BCollapse-DtuJwN7B.js → BCollapse-DCjKiTxo.js} +2 -2
  16. package/dist/{BCollapse-DtuJwN7B.js.map → BCollapse-DCjKiTxo.js.map} +1 -1
  17. package/dist/BDateField-Oh-cU-4i.js +456 -0
  18. package/dist/BDateField-Oh-cU-4i.js.map +1 -0
  19. package/dist/BDatePicker-HNI11eCe.js +632 -0
  20. package/dist/BDatePicker-HNI11eCe.js.map +1 -0
  21. package/dist/{BDropdown-BY-E0SHv.js → BDropdown-04nGcMhm.js} +6 -7
  22. package/dist/{BDropdown-BY-E0SHv.js.map → BDropdown-04nGcMhm.js.map} +1 -1
  23. package/dist/{BFormCheckbox-BYNGQgr2.js → BFormCheckbox-zjr8OsNd.js} +2 -2
  24. package/dist/{BFormCheckbox-BYNGQgr2.js.map → BFormCheckbox-zjr8OsNd.js.map} +1 -1
  25. package/dist/{BFormFile-C2DnrbK7.js → BFormFile-D_s8tf1m.js} +2 -2
  26. package/dist/{BFormFile-C2DnrbK7.js.map → BFormFile-D_s8tf1m.js.map} +1 -1
  27. package/dist/{BFormInput-_AkAy6Wk.js → BFormInput-DnIBPLCx.js} +2 -2
  28. package/dist/{BFormInput-_AkAy6Wk.js.map → BFormInput-DnIBPLCx.js.map} +1 -1
  29. package/dist/BFormOtp-Dx2RxPAW.js +150 -0
  30. package/dist/BFormOtp-Dx2RxPAW.js.map +1 -0
  31. package/dist/{BFormRadio-DAddcnfE.js → BFormRadio-DUz60sBI.js} +2 -2
  32. package/dist/{BFormRadio-DAddcnfE.js.map → BFormRadio-DUz60sBI.js.map} +1 -1
  33. package/dist/{BFormRating-iKFgSFet.js → BFormRating-CtMmDgrF.js} +2 -2
  34. package/dist/{BFormRating-iKFgSFet.js.map → BFormRating-CtMmDgrF.js.map} +1 -1
  35. package/dist/{BFormSelect-CSS-_kul.js → BFormSelect-CeslPN3i.js} +2 -3
  36. package/dist/{BFormSelect-CSS-_kul.js.map → BFormSelect-CeslPN3i.js.map} +1 -1
  37. package/dist/{BFormSpinbutton-fkVMbQC3.js → BFormSpinbutton-BR9YTfYy.js} +2 -3
  38. package/dist/{BFormSpinbutton-fkVMbQC3.js.map → BFormSpinbutton-BR9YTfYy.js.map} +1 -1
  39. package/dist/{BFormTags-CUcyRTCK.js → BFormTags-6qQn0Vlv.js} +2 -3
  40. package/dist/{BFormTags-CUcyRTCK.js.map → BFormTags-6qQn0Vlv.js.map} +1 -1
  41. package/dist/{BFormTextarea-CBBlEcrV.js → BFormTextarea-DvLrtG08.js} +3 -3
  42. package/dist/{BFormTextarea-CBBlEcrV.js.map → BFormTextarea-DvLrtG08.js.map} +1 -1
  43. package/dist/{BImg-knz2UZQE.js → BImg-Dd8Pc1Ln.js} +2 -2
  44. package/dist/{BImg-knz2UZQE.js.map → BImg-Dd8Pc1Ln.js.map} +1 -1
  45. package/dist/{BModal-DtQlIFNn.js → BModal-DOmTYI6F.js} +5 -6
  46. package/dist/{BModal-DtQlIFNn.js.map → BModal-DOmTYI6F.js.map} +1 -1
  47. package/dist/{BNav-BMWNXoNo.js → BNav-D3XbyI1R.js} +2 -2
  48. package/dist/{BNav-BMWNXoNo.js.map → BNav-D3XbyI1R.js.map} +1 -1
  49. package/dist/{BOffcanvas-BtvIDgH7.js → BOffcanvas-DyPG7s8I.js} +5 -5
  50. package/dist/{BOffcanvas-BtvIDgH7.js.map → BOffcanvas-DyPG7s8I.js.map} +1 -1
  51. package/dist/{BPagination-C85wHRgS.js → BPagination-DGvgWeYG.js} +2 -2
  52. package/dist/{BPagination-C85wHRgS.js.map → BPagination-DGvgWeYG.js.map} +1 -1
  53. package/dist/{BPlaceholder-DI12zz0a.js → BPlaceholder-BrBmbfIg.js} +3 -3
  54. package/dist/{BPlaceholder-DI12zz0a.js.map → BPlaceholder-BrBmbfIg.js.map} +1 -1
  55. package/dist/{BProgress-BNxYppi-.js → BProgress-CXhe6hsN.js} +2 -2
  56. package/dist/{BProgress-BNxYppi-.js.map → BProgress-CXhe6hsN.js.map} +1 -1
  57. package/dist/{BTable-BZxX17YU.js → BTable-8jp3wPAI.js} +2 -2
  58. package/dist/{BTable-BZxX17YU.js.map → BTable-8jp3wPAI.js.map} +1 -1
  59. package/dist/BTimeField-vdultTwg.js +138 -0
  60. package/dist/BTimeField-vdultTwg.js.map +1 -0
  61. package/dist/{BToast-Cm7TZlZq.js → BToast-vxfpFGe3.js} +5 -5
  62. package/dist/{BToast-Cm7TZlZq.js.map → BToast-vxfpFGe3.js.map} +1 -1
  63. package/dist/{BTooltip-CAgQ77tS.js → BTooltip-CV5Ogidy.js} +2 -2
  64. package/dist/{BTooltip-CAgQ77tS.js.map → BTooltip-CV5Ogidy.js.map} +1 -1
  65. package/dist/bootstrap-vue-next.mjs +33 -33
  66. package/dist/{floatingUi-CSJCHfOw.js → floatingUi-BhgR4GBJ.js} +10 -168
  67. package/dist/floatingUi-BhgR4GBJ.js.map +1 -0
  68. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  69. package/dist/src/components/BAccordion/index.mjs +1 -1
  70. package/dist/src/components/BAlert/index.mjs +1 -1
  71. package/dist/src/components/BAutocomplete/index.mjs +1 -1
  72. package/dist/src/components/BAvatar/index.mjs +1 -1
  73. package/dist/src/components/BButton/index.mjs +1 -1
  74. package/dist/src/components/BCard/index.mjs +1 -1
  75. package/dist/src/components/BCarousel/index.mjs +1 -1
  76. package/dist/src/components/BCollapse/index.mjs +1 -1
  77. package/dist/src/components/BDateField/index.mjs +1 -1
  78. package/dist/src/components/BDatePicker/index.mjs +1 -1
  79. package/dist/src/components/BDropdown/index.mjs +1 -1
  80. package/dist/src/components/BFormCheckbox/index.mjs +1 -1
  81. package/dist/src/components/BFormFile/index.mjs +1 -1
  82. package/dist/src/components/BFormInput/index.mjs +1 -1
  83. package/dist/src/components/BFormOtp/index.mjs +1 -1
  84. package/dist/src/components/BFormRadio/index.mjs +1 -1
  85. package/dist/src/components/BFormRating/index.mjs +1 -1
  86. package/dist/src/components/BFormSelect/index.mjs +1 -1
  87. package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
  88. package/dist/src/components/BFormTags/index.mjs +1 -1
  89. package/dist/src/components/BFormTextarea/index.mjs +1 -1
  90. package/dist/src/components/BImg/index.mjs +1 -1
  91. package/dist/src/components/BModal/index.mjs +1 -1
  92. package/dist/src/components/BNav/index.mjs +1 -1
  93. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  94. package/dist/src/components/BPagination/index.mjs +1 -1
  95. package/dist/src/components/BPlaceholder/index.mjs +1 -1
  96. package/dist/src/components/BPopover/index.mjs +1 -1
  97. package/dist/src/components/BProgress/index.mjs +1 -1
  98. package/dist/src/components/BTable/index.mjs +1 -1
  99. package/dist/src/components/BTimeField/index.mjs +1 -1
  100. package/dist/src/components/BToast/index.mjs +1 -1
  101. package/dist/src/components/BTooltip/index.mjs +1 -1
  102. package/dist/src/components/index.mjs +34 -34
  103. package/dist/src/composables/index.mjs +1 -1
  104. package/dist/src/composables/useColorMode/index.mjs +1 -1
  105. package/dist/src/composables/useModal/index.mjs +1 -1
  106. package/dist/src/composables/usePopover/index.mjs +2 -2
  107. package/dist/src/composables/useScrollLock/index.mjs +1 -2
  108. package/dist/src/composables/useScrollLock/index.mjs.map +1 -1
  109. package/dist/src/composables/useScrollspy/index.mjs +1 -2
  110. package/dist/src/composables/useScrollspy/index.mjs.map +1 -1
  111. package/dist/src/composables/useToast/index.mjs +1 -1
  112. package/dist/src/directives/BPopover/index.mjs +2 -2
  113. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  114. package/dist/src/directives/BToggle/index.mjs +1 -1
  115. package/dist/src/directives/BTooltip/index.mjs +2 -2
  116. package/dist/src/directives/index.mjs +1 -1
  117. package/dist/src/plugins/index.mjs +1 -1
  118. package/dist/src/resolvers/index.mjs +1 -1
  119. package/dist/src/types/index.mjs +1 -1
  120. package/dist/src/utils/index.mjs +1 -1
  121. package/dist/{useCountdownHover-BN8vJIQW.js → useCountdownHover-HZSJZkHq.js} +2 -2
  122. package/dist/{useCountdownHover-BN8vJIQW.js.map → useCountdownHover-HZSJZkHq.js.map} +1 -1
  123. package/dist/{useFormInput-C-iXRxog.js → useFormInput-CMtXFoM2.js} +2 -3
  124. package/dist/{useFormInput-C-iXRxog.js.map → useFormInput-CMtXFoM2.js.map} +1 -1
  125. package/dist/useSafeScrollLock-BT4KKhxB.js +89 -0
  126. package/dist/useSafeScrollLock-BT4KKhxB.js.map +1 -0
  127. package/dist/{useShowHide-Dpld86ys.js → useShowHide-BLIZLD9E.js} +2 -3
  128. package/dist/{useShowHide-Dpld86ys.js.map → useShowHide-BLIZLD9E.js.map} +1 -1
  129. package/dist/{utils-DYdkCKBf.js → utils-CvjliJBf.js} +2 -2
  130. package/dist/{utils-DYdkCKBf.js.map → utils-CvjliJBf.js.map} +1 -1
  131. package/package.json +3 -23
  132. package/dist/BAutocomplete-BFbbKtpz.js +0 -2490
  133. package/dist/BAutocomplete-BFbbKtpz.js.map +0 -1
  134. package/dist/BDateField-Bj-Jz7u4.js +0 -906
  135. package/dist/BDateField-Bj-Jz7u4.js.map +0 -1
  136. package/dist/BDatePicker-AVTYcVLy.js +0 -5210
  137. package/dist/BDatePicker-AVTYcVLy.js.map +0 -1
  138. package/dist/BFormOtp-ClDACqXM.js +0 -577
  139. package/dist/BFormOtp-ClDACqXM.js.map +0 -1
  140. package/dist/BTimeField-CbRGjaI6.js +0 -516
  141. package/dist/BTimeField-CbRGjaI6.js.map +0 -1
  142. package/dist/DateRangeFieldInput-Cbzjg8iF.js +0 -761
  143. package/dist/DateRangeFieldInput-Cbzjg8iF.js.map +0 -1
  144. package/dist/PopperContent-C9eeL6LH.js +0 -1726
  145. package/dist/PopperContent-C9eeL6LH.js.map +0 -1
  146. package/dist/VisuallyHidden-BYzyjJiY.js +0 -182
  147. package/dist/VisuallyHidden-BYzyjJiY.js.map +0 -1
  148. package/dist/VisuallyHiddenInput-CUrc8XXa.js +0 -180
  149. package/dist/VisuallyHiddenInput-CUrc8XXa.js.map +0 -1
  150. package/dist/dist-9-XTMhb-.js +0 -1302
  151. package/dist/dist-9-XTMhb-.js.map +0 -1
  152. package/dist/dist-B-regXAP.js +0 -123
  153. package/dist/dist-B-regXAP.js.map +0 -1
  154. package/dist/dist-DKc2ivHS.js +0 -411
  155. package/dist/dist-DKc2ivHS.js.map +0 -1
  156. package/dist/floating-ui.dom-C7UZexJK.js +0 -1484
  157. package/dist/floating-ui.dom-C7UZexJK.js.map +0 -1
  158. package/dist/floatingUi-CSJCHfOw.js.map +0 -1
  159. package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
  160. package/dist/useDateField-CQZb799C.js +0 -3679
  161. package/dist/useDateField-CQZb799C.js.map +0 -1
  162. package/dist/useForwardExpose-DDvk7mir.js +0 -60
  163. package/dist/useForwardExpose-DDvk7mir.js.map +0 -1
  164. package/dist/useKbd-DRsaFU_f.js +0 -76
  165. package/dist/useKbd-DRsaFU_f.js.map +0 -1
  166. package/dist/useSafeScrollLock-PVgSASYu.js +0 -1326
  167. package/dist/useSafeScrollLock-PVgSASYu.js.map +0 -1
@@ -1,1726 +0,0 @@
1
- import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { n as createGlobalState, r as createSharedComposable } from "./dist-DKc2ivHS.js";
3
- import { a as onKeyStroke, f as useEventListener, g as useMounted, n as defaultWindow, o as unrefElement } from "./dist-9-XTMhb-.js";
4
- import { a as useDirection, c as getActiveElement, l as createContext, o as injectConfigProviderContext, r as Primitive, s as renderSlotFragments } from "./VisuallyHidden-BYzyjJiY.js";
5
- import { n as defu, r as isNullish } from "./useKbd-DRsaFU_f.js";
6
- import { n as isIOS, s as tryOnBeforeUnmount, t as isClient } from "./dist-B-regXAP.js";
7
- import { t as useForwardExpose } from "./useForwardExpose-DDvk7mir.js";
8
- import { a as flip, c as limitShift, d as size, f as getNodeName, i as computePosition, l as offset, o as hide, p as isNode, r as autoUpdate, t as arrow$1, u as shift } from "./floating-ui.dom-C7UZexJK.js";
9
- import * as vue from "vue";
10
- import { Teleport, camelize, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, getCurrentInstance, h, mergeDefaults, mergeProps, nextTick, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, renderSlot, toHandlerKey, toRef, toRefs, toValue, unref, watch, watchEffect, watchPostEffect, withCtx, withMemo } from "vue";
11
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/handleAndDispatchCustomEvent.js
12
- function handleAndDispatchCustomEvent(name, handler, detail) {
13
- const target = detail.originalEvent.target;
14
- const event = new CustomEvent(name, {
15
- bubbles: false,
16
- cancelable: true,
17
- detail
18
- });
19
- if (handler) target.addEventListener(name, handler, { once: true });
20
- target.dispatchEvent(event);
21
- }
22
- //#endregion
23
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DismissableLayer/context.js
24
- var context = /*#__PURE__*/ reactive({
25
- layersRoot: /* @__PURE__ */ new Set(),
26
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
27
- originalBodyPointerEvents: void 0,
28
- branches: /* @__PURE__ */ new Set()
29
- });
30
- //#endregion
31
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useBodyScrollLock.js
32
- var useBodyLockStackCount = createSharedComposable(() => {
33
- const map = ref(/* @__PURE__ */ new Map());
34
- const initialOverflow = ref();
35
- const locked = computed(() => {
36
- for (const value of map.value.values()) if (value) return true;
37
- return false;
38
- });
39
- const context$1 = injectConfigProviderContext({ scrollBody: ref(true) });
40
- let stopTouchMoveListener = null;
41
- const resetBodyStyle = () => {
42
- document.body.style.paddingRight = "";
43
- document.body.style.marginRight = "";
44
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) document.body.style.pointerEvents = "";
45
- document.documentElement.style.removeProperty("--scrollbar-width");
46
- document.body.style.overflow = initialOverflow.value ?? "";
47
- isIOS && stopTouchMoveListener?.();
48
- initialOverflow.value = void 0;
49
- };
50
- watch(locked, (val, oldVal) => {
51
- if (!isClient) return;
52
- if (!val) {
53
- if (oldVal) resetBodyStyle();
54
- return;
55
- }
56
- if (initialOverflow.value === void 0) initialOverflow.value = document.body.style.overflow;
57
- const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
58
- const defaultConfig = {
59
- padding: verticalScrollbarWidth,
60
- margin: 0
61
- };
62
- const config = context$1.scrollBody?.value ? typeof context$1.scrollBody.value === "object" ? defu({
63
- padding: context$1.scrollBody.value.padding === true ? verticalScrollbarWidth : context$1.scrollBody.value.padding,
64
- margin: context$1.scrollBody.value.margin === true ? verticalScrollbarWidth : context$1.scrollBody.value.margin
65
- }, defaultConfig) : defaultConfig : {
66
- padding: 0,
67
- margin: 0
68
- };
69
- if (verticalScrollbarWidth > 0) {
70
- document.body.style.paddingRight = typeof config.padding === "number" ? `${config.padding}px` : String(config.padding);
71
- document.body.style.marginRight = typeof config.margin === "number" ? `${config.margin}px` : String(config.margin);
72
- document.documentElement.style.setProperty("--scrollbar-width", `${verticalScrollbarWidth}px`);
73
- document.body.style.overflow = "hidden";
74
- }
75
- if (isIOS) stopTouchMoveListener = useEventListener(document, "touchmove", (e) => preventDefault(e), { passive: false });
76
- nextTick(() => {
77
- if (!locked.value) return;
78
- document.body.style.pointerEvents = "none";
79
- document.body.style.overflow = "hidden";
80
- });
81
- }, {
82
- immediate: true,
83
- flush: "sync"
84
- });
85
- return map;
86
- });
87
- function useBodyScrollLock(initialState) {
88
- const id = Math.random().toString(36).substring(2, 7);
89
- const map = useBodyLockStackCount();
90
- map.value.set(id, initialState ?? false);
91
- const locked = computed({
92
- get: () => map.value.get(id) ?? false,
93
- set: (value) => map.value.set(id, value)
94
- });
95
- tryOnBeforeUnmount(() => {
96
- map.value.delete(id);
97
- });
98
- return locked;
99
- }
100
- function checkOverflowScroll(ele) {
101
- const style = window.getComputedStyle(ele);
102
- if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientWidth < ele.scrollWidth || style.overflowY === "auto" && ele.clientHeight < ele.scrollHeight) return true;
103
- else {
104
- const parent = ele.parentNode;
105
- if (!(parent instanceof Element) || parent.tagName === "BODY") return false;
106
- return checkOverflowScroll(parent);
107
- }
108
- }
109
- function preventDefault(rawEvent) {
110
- const e = rawEvent || window.event;
111
- const _target = e.target;
112
- if (_target instanceof Element && checkOverflowScroll(_target)) return false;
113
- if (e.touches.length > 1) return true;
114
- if (e.preventDefault && e.cancelable) e.preventDefault();
115
- return false;
116
- }
117
- //#endregion
118
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useEmitAsProps.js
119
- /**
120
- * The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a
121
- * Vue component.
122
- *
123
- * @template Name - The event name string union type.
124
- * @template Fn - The emit function type.
125
- *
126
- * @param emit - The `emit` parameter is a function that is used to emit events from a component. It
127
- *
128
- * takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are
129
- * the arguments to be passed along with the event.
130
- * @returns The function `useEmitAsProps` returns an object that maps event names to functions that
131
- * call the `emit` function with the corresponding event name and arguments.
132
- */
133
- function useEmitAsProps(emit) {
134
- const vm = getCurrentInstance();
135
- const events = vm?.type.emits;
136
- const result = {};
137
- if (!events?.length) console.warn(`No emitted event found. Please check component: ${vm?.type.__name}`);
138
- events?.forEach((ev) => {
139
- result[toHandlerKey(camelize(ev))] = (...arg) => emit(ev, ...arg);
140
- });
141
- return result;
142
- }
143
- //#endregion
144
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useFocusGuards.js
145
- /** Number of components which have requested interest to have focus guards */
146
- var count$1 = 0;
147
- /**
148
- * Injects a pair of focus guards at the edges of the whole DOM tree
149
- * to ensure `focusin` & `focusout` events can be caught consistently.
150
- */
151
- function useFocusGuards() {
152
- watchEffect((cleanupFn) => {
153
- if (!isClient) return;
154
- const edgeGuards = document.querySelectorAll("[data-reka-focus-guard]");
155
- document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
156
- document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
157
- count$1++;
158
- cleanupFn(() => {
159
- if (count$1 === 1) document.querySelectorAll("[data-reka-focus-guard]").forEach((node) => node.remove());
160
- count$1--;
161
- });
162
- });
163
- }
164
- function createFocusGuard() {
165
- const element = document.createElement("span");
166
- element.setAttribute("data-reka-focus-guard", "");
167
- element.tabIndex = 0;
168
- element.style.outline = "none";
169
- element.style.opacity = "0";
170
- element.style.position = "fixed";
171
- element.style.pointerEvents = "none";
172
- return element;
173
- }
174
- //#endregion
175
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useForwardProps.js
176
- /**
177
- * The `useForwardProps` function in TypeScript takes in a set of props and returns a computed value
178
- * that combines default props with assigned props from the current instance.
179
- * @param {T} props - The `props` parameter is an object that represents the props passed to a
180
- * component.
181
- * @returns computed value that combines the default props, preserved props, and assigned props.
182
- */
183
- function useForwardProps(props) {
184
- const vm = getCurrentInstance();
185
- const defaultProps = Object.keys(vm?.type.props ?? {}).reduce((prev, curr) => {
186
- const defaultValue = (vm?.type.props[curr]).default;
187
- if (defaultValue !== void 0) prev[curr] = defaultValue;
188
- return prev;
189
- }, {});
190
- const refProps = toRef(props);
191
- return computed(() => {
192
- const preservedProps = {};
193
- const assignedProps = vm?.vnode.props ?? {};
194
- Object.keys(assignedProps).forEach((key) => {
195
- preservedProps[camelize(key)] = assignedProps[key];
196
- });
197
- return Object.keys({
198
- ...defaultProps,
199
- ...preservedProps
200
- }).reduce((prev, curr) => {
201
- if (refProps.value[curr] !== void 0) prev[curr] = refProps.value[curr];
202
- return prev;
203
- }, {});
204
- });
205
- }
206
- //#endregion
207
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useForwardPropsEmits.js
208
- function useForwardPropsEmits(props, emit) {
209
- const parsedProps = useForwardProps(props);
210
- const emitsAsProps = emit ? useEmitAsProps(emit) : {};
211
- return computed(() => ({
212
- ...parsedProps.value,
213
- ...emitsAsProps
214
- }));
215
- }
216
- //#endregion
217
- //#region ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
218
- var getDefaultParent = function(originalTarget) {
219
- if (typeof document === "undefined") return null;
220
- return (Array.isArray(originalTarget) ? originalTarget[0] : originalTarget).ownerDocument.body;
221
- };
222
- var counterMap = /* @__PURE__ */ new WeakMap();
223
- var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
224
- var markerMap = {};
225
- var lockCount = 0;
226
- var unwrapHost = function(node) {
227
- return node && (node.host || unwrapHost(node.parentNode));
228
- };
229
- var correctTargets = function(parent, targets) {
230
- return targets.map(function(target) {
231
- if (parent.contains(target)) return target;
232
- var correctedTarget = unwrapHost(target);
233
- if (correctedTarget && parent.contains(correctedTarget)) return correctedTarget;
234
- console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
235
- return null;
236
- }).filter(function(x) {
237
- return Boolean(x);
238
- });
239
- };
240
- /**
241
- * Marks everything except given node(or nodes) as aria-hidden
242
- * @param {Element | Element[]} originalTarget - elements to keep on the page
243
- * @param [parentNode] - top element, defaults to document.body
244
- * @param {String} [markerName] - a special attribute to mark every node
245
- * @param {String} [controlAttribute] - html Attribute to control
246
- * @return {Undo} undo command
247
- */
248
- var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
249
- var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
250
- if (!markerMap[markerName]) markerMap[markerName] = /* @__PURE__ */ new WeakMap();
251
- var markerCounter = markerMap[markerName];
252
- var hiddenNodes = [];
253
- var elementsToKeep = /* @__PURE__ */ new Set();
254
- var elementsToStop = new Set(targets);
255
- var keep = function(el) {
256
- if (!el || elementsToKeep.has(el)) return;
257
- elementsToKeep.add(el);
258
- keep(el.parentNode);
259
- };
260
- targets.forEach(keep);
261
- var deep = function(parent) {
262
- if (!parent || elementsToStop.has(parent)) return;
263
- Array.prototype.forEach.call(parent.children, function(node) {
264
- if (elementsToKeep.has(node)) deep(node);
265
- else try {
266
- var attr = node.getAttribute(controlAttribute);
267
- var alreadyHidden = attr !== null && attr !== "false";
268
- var counterValue = (counterMap.get(node) || 0) + 1;
269
- var markerValue = (markerCounter.get(node) || 0) + 1;
270
- counterMap.set(node, counterValue);
271
- markerCounter.set(node, markerValue);
272
- hiddenNodes.push(node);
273
- if (counterValue === 1 && alreadyHidden) uncontrolledNodes.set(node, true);
274
- if (markerValue === 1) node.setAttribute(markerName, "true");
275
- if (!alreadyHidden) node.setAttribute(controlAttribute, "true");
276
- } catch (e) {
277
- console.error("aria-hidden: cannot operate on ", node, e);
278
- }
279
- });
280
- };
281
- deep(parentNode);
282
- elementsToKeep.clear();
283
- lockCount++;
284
- return function() {
285
- hiddenNodes.forEach(function(node) {
286
- var counterValue = counterMap.get(node) - 1;
287
- var markerValue = markerCounter.get(node) - 1;
288
- counterMap.set(node, counterValue);
289
- markerCounter.set(node, markerValue);
290
- if (!counterValue) {
291
- if (!uncontrolledNodes.has(node)) node.removeAttribute(controlAttribute);
292
- uncontrolledNodes.delete(node);
293
- }
294
- if (!markerValue) node.removeAttribute(markerName);
295
- });
296
- lockCount--;
297
- if (!lockCount) {
298
- counterMap = /* @__PURE__ */ new WeakMap();
299
- counterMap = /* @__PURE__ */ new WeakMap();
300
- uncontrolledNodes = /* @__PURE__ */ new WeakMap();
301
- markerMap = {};
302
- }
303
- };
304
- };
305
- /**
306
- * Marks everything except given node(or nodes) as aria-hidden
307
- * @param {Element | Element[]} originalTarget - elements to keep on the page
308
- * @param [parentNode] - top element, defaults to document.body
309
- * @param {String} [markerName] - a special attribute to mark every node
310
- * @return {Undo} undo command
311
- */
312
- var hideOthers = function(originalTarget, parentNode, markerName) {
313
- if (markerName === void 0) markerName = "data-aria-hidden";
314
- var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
315
- var activeParentNode = parentNode || getDefaultParent(originalTarget);
316
- if (!activeParentNode) return function() {
317
- return null;
318
- };
319
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
320
- return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
321
- };
322
- //#endregion
323
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useHideOthers.js
324
- /**
325
- * The `useHideOthers` function is a TypeScript function that takes a target element reference and
326
- * hides all other elements in ARIA when the target element is present, and restores the visibility of the
327
- * hidden elements when the target element is removed.
328
- * @param {MaybeElementRef} target - The `target` parameter is a reference to the element that you want
329
- * to hide other elements when it is clicked or focused.
330
- */
331
- function useHideOthers(target) {
332
- let undo;
333
- watch(() => unrefElement(target), (el) => {
334
- let isInsideClosedPopover = false;
335
- try {
336
- isInsideClosedPopover = !!el?.closest("[popover]:not(:popover-open)");
337
- } catch {}
338
- if (el && !isInsideClosedPopover) undo = hideOthers(el);
339
- else if (undo) undo();
340
- });
341
- onUnmounted(() => {
342
- if (undo) undo();
343
- });
344
- }
345
- //#endregion
346
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useId.js
347
- var count = 0;
348
- /**
349
- * The `useId` function generates a unique identifier using a provided deterministic ID,
350
- * a configured `<ConfigProvider>` ID source, Vue's native `useId`, or a fallback counter.
351
- * @param {string | null | undefined} [deterministicId] - The `useId` function you provided takes an
352
- * optional parameter `deterministicId`, which can be a string, null, or undefined. If
353
- * `deterministicId` is provided, the function will return it. Otherwise, it will generate an id using
354
- * the configured ID source.
355
- */
356
- function useId$1(deterministicId, prefix = "reka") {
357
- if (deterministicId) return deterministicId;
358
- let id;
359
- const configProviderContext = injectConfigProviderContext({ useId: void 0 });
360
- if (configProviderContext.useId) id = configProviderContext.useId();
361
- else if ("useId" in vue) id = vue.useId?.();
362
- else id = `${++count}`;
363
- return prefix ? `${prefix}-${id}` : id;
364
- }
365
- //#endregion
366
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useSize.js
367
- function useSize(element) {
368
- const size = ref();
369
- const width = computed(() => size.value?.width ?? 0);
370
- const height = computed(() => size.value?.height ?? 0);
371
- let resizeObserver;
372
- onMounted(() => {
373
- const el = unrefElement(element);
374
- if (el) {
375
- size.value = {
376
- width: el.offsetWidth,
377
- height: el.offsetHeight
378
- };
379
- resizeObserver = new ResizeObserver((entries) => {
380
- if (!Array.isArray(entries)) return;
381
- if (!entries.length) return;
382
- const entry = entries[0];
383
- let width$1;
384
- let height$1;
385
- if ("borderBoxSize" in entry) {
386
- const borderSizeEntry = entry.borderBoxSize;
387
- const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
388
- width$1 = borderSize.inlineSize;
389
- height$1 = borderSize.blockSize;
390
- } else {
391
- width$1 = el.offsetWidth;
392
- height$1 = el.offsetHeight;
393
- }
394
- size.value = {
395
- width: width$1,
396
- height: height$1
397
- };
398
- });
399
- resizeObserver.observe(el, { box: "border-box" });
400
- } else size.value = void 0;
401
- });
402
- onUnmounted(() => {
403
- resizeObserver?.disconnect();
404
- resizeObserver = void 0;
405
- });
406
- return {
407
- width,
408
- height
409
- };
410
- }
411
- //#endregion
412
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useStateMachine.js
413
- /**
414
- * The `useStateMachine` function is a TypeScript function that creates a state machine and returns the
415
- * current state and a dispatch function to update the state based on events.
416
- * @param initialState - The `initialState` parameter is the initial state of the state machine. It
417
- * represents the starting point of the state machine's state.
418
- * @param machine - The `machine` parameter is an object that represents a state machine. It should
419
- * have keys that correspond to the possible states of the machine, and the values should be objects
420
- * that represent the possible events and their corresponding next states.
421
- * @returns The `useStateMachine` function returns an object with two properties: `state` and
422
- * `dispatch`.
423
- */
424
- function useStateMachine(initialState, machine) {
425
- const state = ref(initialState);
426
- function reducer(event) {
427
- return machine[state.value][event] ?? state.value;
428
- }
429
- const dispatch = (event) => {
430
- state.value = reducer(event);
431
- };
432
- return {
433
- state,
434
- dispatch
435
- };
436
- }
437
- //#endregion
438
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Presence/usePresence.js
439
- function usePresence(present, node) {
440
- const stylesRef = ref({});
441
- const prevAnimationNameRef = ref("none");
442
- const prevPresentRef = ref(present);
443
- const initialState = present.value ? "mounted" : "unmounted";
444
- let timeoutId;
445
- const ownerWindow = node.value?.ownerDocument.defaultView ?? defaultWindow;
446
- const { state, dispatch } = useStateMachine(initialState, {
447
- mounted: {
448
- UNMOUNT: "unmounted",
449
- ANIMATION_OUT: "unmountSuspended"
450
- },
451
- unmountSuspended: {
452
- MOUNT: "mounted",
453
- ANIMATION_END: "unmounted"
454
- },
455
- unmounted: { MOUNT: "mounted" }
456
- });
457
- const dispatchCustomEvent = (name) => {
458
- if (isClient) {
459
- const customEvent = new CustomEvent(name, {
460
- bubbles: false,
461
- cancelable: false
462
- });
463
- node.value?.dispatchEvent(customEvent);
464
- }
465
- };
466
- watch(present, async (currentPresent, prevPresent) => {
467
- const hasPresentChanged = prevPresent !== currentPresent;
468
- await nextTick();
469
- if (hasPresentChanged) {
470
- const prevAnimationName = prevAnimationNameRef.value;
471
- const currentAnimationName = getAnimationName(node.value);
472
- if (currentPresent) {
473
- dispatch("MOUNT");
474
- dispatchCustomEvent("enter");
475
- if (currentAnimationName === "none") dispatchCustomEvent("after-enter");
476
- } else if (currentAnimationName === "none" || currentAnimationName === "undefined" || stylesRef.value?.display === "none") {
477
- dispatch("UNMOUNT");
478
- dispatchCustomEvent("leave");
479
- dispatchCustomEvent("after-leave");
480
- } else if (prevPresent && prevAnimationName !== currentAnimationName) {
481
- dispatch("ANIMATION_OUT");
482
- dispatchCustomEvent("leave");
483
- } else {
484
- dispatch("UNMOUNT");
485
- dispatchCustomEvent("after-leave");
486
- }
487
- }
488
- }, { immediate: true });
489
- /**
490
- * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
491
- * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
492
- * make sure we only trigger ANIMATION_END for the currently active animation.
493
- */
494
- const handleAnimationEnd = (event) => {
495
- if (event.target !== node.value) return;
496
- const currentAnimationName = getAnimationName(node.value);
497
- const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
498
- const directionName = state.value === "mounted" ? "enter" : "leave";
499
- if (isCurrentAnimation) {
500
- dispatchCustomEvent(`after-${directionName}`);
501
- dispatch("ANIMATION_END");
502
- if (!prevPresentRef.value) {
503
- const currentFillMode = node.value.style.animationFillMode;
504
- node.value.style.animationFillMode = "forwards";
505
- timeoutId = ownerWindow?.setTimeout(() => {
506
- if (node.value?.style.animationFillMode === "forwards") node.value.style.animationFillMode = currentFillMode;
507
- });
508
- }
509
- }
510
- if (currentAnimationName === "none") dispatch("ANIMATION_END");
511
- };
512
- const handleAnimationStart = (event) => {
513
- if (event.target === node.value) prevAnimationNameRef.value = getAnimationName(node.value);
514
- };
515
- const watcher = watch(node, (newNode, oldNode) => {
516
- if (newNode) {
517
- stylesRef.value = getComputedStyle(newNode);
518
- newNode.addEventListener("animationstart", handleAnimationStart);
519
- newNode.addEventListener("animationcancel", handleAnimationEnd);
520
- newNode.addEventListener("animationend", handleAnimationEnd);
521
- } else {
522
- dispatch("ANIMATION_END");
523
- if (timeoutId !== void 0) ownerWindow?.clearTimeout(timeoutId);
524
- oldNode?.removeEventListener("animationstart", handleAnimationStart);
525
- oldNode?.removeEventListener("animationcancel", handleAnimationEnd);
526
- oldNode?.removeEventListener("animationend", handleAnimationEnd);
527
- }
528
- }, { immediate: true });
529
- const stateWatcher = watch(state, () => {
530
- const currentAnimationName = getAnimationName(node.value);
531
- prevAnimationNameRef.value = state.value === "mounted" ? currentAnimationName : "none";
532
- });
533
- onUnmounted(() => {
534
- watcher();
535
- stateWatcher();
536
- if (node.value) {
537
- node.value.removeEventListener("animationstart", handleAnimationStart);
538
- node.value.removeEventListener("animationcancel", handleAnimationEnd);
539
- node.value.removeEventListener("animationend", handleAnimationEnd);
540
- }
541
- if (timeoutId !== void 0) ownerWindow?.clearTimeout(timeoutId);
542
- });
543
- return { isPresent: computed(() => ["mounted", "unmountSuspended"].includes(state.value)) };
544
- }
545
- function getAnimationName(node) {
546
- return node ? getComputedStyle(node).animationName || "none" : "none";
547
- }
548
- //#endregion
549
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Presence/Presence.js
550
- var Presence_default = /*#__PURE__*/ defineComponent({
551
- name: "Presence",
552
- props: {
553
- present: {
554
- type: Boolean,
555
- required: true
556
- },
557
- forceMount: { type: Boolean }
558
- },
559
- slots: {},
560
- setup(props, { slots, expose }) {
561
- const { present, forceMount } = toRefs(props);
562
- const node = ref();
563
- const { isPresent } = usePresence(present, node);
564
- expose({ present: isPresent });
565
- let children = slots.default({ present: isPresent.value });
566
- children = renderSlotFragments(children || []);
567
- const instance = getCurrentInstance();
568
- if (children && children?.length > 1) {
569
- const componentName = instance?.parent?.type.name ? `<${instance.parent.type.name} />` : "component";
570
- throw new Error([
571
- `Detected an invalid children for \`${componentName}\` for \`Presence\` component.`,
572
- "",
573
- "Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
574
- "You can apply a few solutions:",
575
- ["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((line) => ` - ${line}`).join("\n")
576
- ].join("\n"));
577
- }
578
- return () => {
579
- if (forceMount.value || present.value || isPresent.value) return h(slots.default({ present: isPresent.value })[0], { ref: (v) => {
580
- const el = unrefElement(v);
581
- if (typeof el?.hasAttribute === "undefined") return el;
582
- if (el?.hasAttribute("data-reka-popper-content-wrapper")) node.value = el.firstElementChild;
583
- else node.value = el;
584
- return el;
585
- } });
586
- else return null;
587
- };
588
- }
589
- });
590
- //#endregion
591
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DismissableLayer/utils.js
592
- var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
593
- var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
594
- function isLayerExist(layerElement, targetElement) {
595
- if (!(targetElement instanceof Element)) return false;
596
- const targetLayer = targetElement.closest("[data-dismissable-layer]");
597
- const mainLayer = layerElement.dataset.dismissableLayer === "" ? layerElement : layerElement.querySelector("[data-dismissable-layer]");
598
- const nodeList = Array.from(layerElement.ownerDocument.querySelectorAll("[data-dismissable-layer]"));
599
- if (targetLayer && (mainLayer === targetLayer || nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer))) return true;
600
- else return false;
601
- }
602
- /**
603
- * Listens for `pointerdown` outside a DOM subtree. We use `pointerdown` rather than `pointerup`
604
- * to mimic layer dismissing behaviour present in OS.
605
- * Returns props to pass to the node we want to check for outside events.
606
- */
607
- function usePointerDownOutside(onPointerDownOutside, element, enabled = true) {
608
- const ownerDocument = element?.value?.ownerDocument ?? globalThis?.document;
609
- const isPointerInsideDOMTree = ref(false);
610
- const handleClickRef = ref(() => {});
611
- watchEffect((cleanupFn) => {
612
- if (!isClient || !toValue(enabled)) return;
613
- const handlePointerDown = async (event) => {
614
- const target = event.target;
615
- if (!element?.value || !target) return;
616
- if (isLayerExist(element.value, target)) {
617
- isPointerInsideDOMTree.value = false;
618
- return;
619
- }
620
- if (event.target && !isPointerInsideDOMTree.value) {
621
- const eventDetail = { originalEvent: event };
622
- function handleAndDispatchPointerDownOutsideEvent() {
623
- handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, onPointerDownOutside, eventDetail);
624
- }
625
- /**
626
- * On touch devices, we need to wait for a click event because browsers implement
627
- * a ~350ms delay between the time the user stops touching the display and when the
628
- * browser executes events. We need to ensure we don't reactivate pointer-events within
629
- * this timeframe otherwise the browser may execute events that should have been prevented.
630
- *
631
- * Additionally, this also lets us deal automatically with cancellations when a click event
632
- * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
633
- *
634
- * This is why we also continuously remove the previous listener, because we cannot be
635
- * certain that it was raised, and therefore cleaned-up.
636
- */
637
- if (event.pointerType === "touch") {
638
- ownerDocument.removeEventListener("click", handleClickRef.value);
639
- handleClickRef.value = handleAndDispatchPointerDownOutsideEvent;
640
- ownerDocument.addEventListener("click", handleClickRef.value, { once: true });
641
- } else handleAndDispatchPointerDownOutsideEvent();
642
- } else ownerDocument.removeEventListener("click", handleClickRef.value);
643
- isPointerInsideDOMTree.value = false;
644
- };
645
- /**
646
- * if this hook executes in a component that mounts via a `pointerdown` event, the event
647
- * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
648
- * this by delaying the event listener registration on the document.
649
- * This is how the DOM works, ie:
650
- * ```
651
- * button.addEventListener('pointerdown', () => {
652
- * console.log('I will log');
653
- * document.addEventListener('pointerdown', () => {
654
- * console.log('I will also log');
655
- * })
656
- * });
657
- */
658
- const timerId = window.setTimeout(() => {
659
- ownerDocument.addEventListener("pointerdown", handlePointerDown);
660
- }, 0);
661
- cleanupFn(() => {
662
- window.clearTimeout(timerId);
663
- ownerDocument.removeEventListener("pointerdown", handlePointerDown);
664
- ownerDocument.removeEventListener("click", handleClickRef.value);
665
- });
666
- });
667
- return { onPointerDownCapture: () => {
668
- if (!toValue(enabled)) return;
669
- isPointerInsideDOMTree.value = true;
670
- } };
671
- }
672
- /**
673
- * Listens for when focus happens outside a DOM subtree.
674
- * Returns props to pass to the root (node) of the subtree we want to check.
675
- */
676
- function useFocusOutside(onFocusOutside, element, enabled = true) {
677
- const ownerDocument = element?.value?.ownerDocument ?? globalThis?.document;
678
- const isFocusInsideDOMTree = ref(false);
679
- watchEffect((cleanupFn) => {
680
- if (!isClient || !toValue(enabled)) return;
681
- const handleFocus = async (event) => {
682
- if (!element?.value) return;
683
- await nextTick();
684
- await nextTick();
685
- const target = event.target;
686
- if (!element.value || !target || isLayerExist(element.value, target)) return;
687
- if (event.target && !isFocusInsideDOMTree.value) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, onFocusOutside, { originalEvent: event });
688
- };
689
- ownerDocument.addEventListener("focusin", handleFocus);
690
- cleanupFn(() => ownerDocument.removeEventListener("focusin", handleFocus));
691
- });
692
- return {
693
- onFocusCapture: () => {
694
- if (!toValue(enabled)) return;
695
- isFocusInsideDOMTree.value = true;
696
- },
697
- onBlurCapture: () => {
698
- if (!toValue(enabled)) return;
699
- isFocusInsideDOMTree.value = false;
700
- }
701
- };
702
- }
703
- //#endregion
704
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DismissableLayer/DismissableLayer.js
705
- var DismissableLayer_default = /* @__PURE__ */ defineComponent({
706
- __name: "DismissableLayer",
707
- props: {
708
- disableOutsidePointerEvents: {
709
- type: Boolean,
710
- required: false,
711
- default: false
712
- },
713
- asChild: {
714
- type: Boolean,
715
- required: false
716
- },
717
- as: {
718
- type: null,
719
- required: false
720
- },
721
- present: {
722
- type: Boolean,
723
- required: false,
724
- default: true
725
- }
726
- },
727
- emits: [
728
- "escapeKeyDown",
729
- "pointerDownOutside",
730
- "focusOutside",
731
- "interactOutside",
732
- "dismiss"
733
- ],
734
- setup(__props, { emit: __emit }) {
735
- const props = __props;
736
- const emits = __emit;
737
- const { forwardRef, currentElement: layerElement } = useForwardExpose();
738
- const ownerDocument = computed(() => layerElement.value?.ownerDocument ?? globalThis.document);
739
- const layers = computed(() => context.layersRoot);
740
- const index = computed(() => {
741
- return layerElement.value ? Array.from(layers.value).indexOf(layerElement.value) : -1;
742
- });
743
- const isBodyPointerEventsDisabled = computed(() => {
744
- return context.layersWithOutsidePointerEventsDisabled.size > 0;
745
- });
746
- const isPointerEventsEnabled = computed(() => {
747
- const localLayers = Array.from(layers.value);
748
- const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
749
- const highestLayerWithOutsidePointerEventsDisabledIndex = localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
750
- return index.value >= highestLayerWithOutsidePointerEventsDisabledIndex;
751
- });
752
- const pointerDownOutside = usePointerDownOutside(async (event) => {
753
- const isPointerDownOnBranch = [...context.branches].some((branch) => branch?.contains(event.target));
754
- if (!props.present || !isPointerEventsEnabled.value || isPointerDownOnBranch) return;
755
- emits("pointerDownOutside", event);
756
- emits("interactOutside", event);
757
- await nextTick();
758
- if (!event.defaultPrevented) emits("dismiss");
759
- }, layerElement);
760
- const focusOutside = useFocusOutside((event) => {
761
- const isFocusInBranch = [...context.branches].some((branch) => branch?.contains(event.target));
762
- if (!props.present || isFocusInBranch) return;
763
- emits("focusOutside", event);
764
- emits("interactOutside", event);
765
- if (!event.defaultPrevented) emits("dismiss");
766
- }, layerElement);
767
- onKeyStroke("Escape", (event) => {
768
- if (!props.present) return;
769
- if (!(index.value === layers.value.size - 1)) return;
770
- emits("escapeKeyDown", event);
771
- if (!event.defaultPrevented) emits("dismiss");
772
- });
773
- watch([
774
- layerElement,
775
- () => props.disableOutsidePointerEvents,
776
- () => props.present
777
- ], ([element, disableOutsidePointerEvents, present], _, onCleanup) => {
778
- if (!element || !present) return;
779
- if (disableOutsidePointerEvents) {
780
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
781
- context.originalBodyPointerEvents = ownerDocument.value.body.style.pointerEvents;
782
- ownerDocument.value.body.style.pointerEvents = "none";
783
- }
784
- context.layersWithOutsidePointerEventsDisabled.add(element);
785
- onCleanup(() => {
786
- context.layersWithOutsidePointerEventsDisabled.delete(element);
787
- if (context.layersWithOutsidePointerEventsDisabled.size === 0 && !isNullish(context.originalBodyPointerEvents)) ownerDocument.value.body.style.pointerEvents = context.originalBodyPointerEvents;
788
- });
789
- }
790
- }, { immediate: true });
791
- watch([layerElement, () => props.present], ([element, present], _, onCleanup) => {
792
- if (!element || !present) return;
793
- layers.value.add(element);
794
- onCleanup(() => {
795
- layers.value.delete(element);
796
- });
797
- }, { immediate: true });
798
- watchEffect((cleanupFn) => {
799
- cleanupFn(() => {
800
- if (!layerElement.value) return;
801
- layers.value.delete(layerElement.value);
802
- context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value);
803
- });
804
- });
805
- return (_ctx, _cache) => {
806
- return openBlock(), createBlock(unref(Primitive), {
807
- ref: unref(forwardRef),
808
- "as-child": _ctx.asChild,
809
- as: _ctx.as,
810
- "data-dismissable-layer": "",
811
- style: normalizeStyle({ pointerEvents: isBodyPointerEventsDisabled.value ? isPointerEventsEnabled.value ? "auto" : "none" : void 0 }),
812
- onFocusCapture: unref(focusOutside).onFocusCapture,
813
- onBlurCapture: unref(focusOutside).onBlurCapture,
814
- onPointerdownCapture: unref(pointerDownOutside).onPointerDownCapture
815
- }, {
816
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
817
- _: 3
818
- }, 8, [
819
- "as-child",
820
- "as",
821
- "style",
822
- "onFocusCapture",
823
- "onBlurCapture",
824
- "onPointerdownCapture"
825
- ]);
826
- };
827
- }
828
- });
829
- //#endregion
830
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/FocusScope/stack.js
831
- var useFocusStackState = createGlobalState(() => {
832
- return ref([]);
833
- });
834
- function createFocusScopesStack() {
835
- /** A stack of focus scopes, with the active one at the top */
836
- const stack = useFocusStackState();
837
- return {
838
- add(focusScope) {
839
- const activeFocusScope = stack.value[0];
840
- if (focusScope !== activeFocusScope) activeFocusScope?.pause();
841
- stack.value = arrayRemove(stack.value, focusScope);
842
- stack.value.unshift(focusScope);
843
- },
844
- remove(focusScope) {
845
- stack.value = arrayRemove(stack.value, focusScope);
846
- stack.value[0]?.resume();
847
- }
848
- };
849
- }
850
- function arrayRemove(array, item) {
851
- const updatedArray = [...array];
852
- const index = updatedArray.indexOf(item);
853
- if (index !== -1) updatedArray.splice(index, 1);
854
- return updatedArray;
855
- }
856
- //#endregion
857
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/FocusScope/utils.js
858
- var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
859
- var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
860
- var EVENT_OPTIONS = {
861
- bubbles: false,
862
- cancelable: true
863
- };
864
- /**
865
- * Attempts focusing the first element in a list of candidates.
866
- * Stops when focus has actually moved.
867
- */
868
- function focusFirst(candidates, { select = false } = {}) {
869
- const previouslyFocusedElement = getActiveElement();
870
- for (const candidate of candidates) {
871
- focus(candidate, { select });
872
- if (getActiveElement() !== previouslyFocusedElement) return true;
873
- }
874
- }
875
- /**
876
- * Returns the first and last tabbable elements inside a container.
877
- */
878
- function getTabbableEdges(container) {
879
- const candidates = getTabbableCandidates(container);
880
- return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
881
- }
882
- /**
883
- * Returns a list of potential tabbable candidates.
884
- *
885
- * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
886
- * elements are not visible. This cannot be worked out easily by just reading a property, but rather
887
- * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
888
- *
889
- * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
890
- * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
891
- */
892
- function getTabbableCandidates(container) {
893
- const nodes = [];
894
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
895
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
896
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
897
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
898
- } });
899
- while (walker.nextNode()) nodes.push(walker.currentNode);
900
- return nodes;
901
- }
902
- /**
903
- * Returns the first visible element in a list.
904
- * NOTE: Only checks visibility up to the `container`.
905
- */
906
- function findVisible(elements, container) {
907
- for (const element of elements) if (!isHidden(element, { upTo: container })) return element;
908
- }
909
- function isHidden(node, { upTo }) {
910
- if (getComputedStyle(node).visibility === "hidden") return true;
911
- while (node) {
912
- if (upTo !== void 0 && node === upTo) return false;
913
- if (getComputedStyle(node).display === "none") return true;
914
- node = node.parentElement;
915
- }
916
- return false;
917
- }
918
- function isSelectableInput(element) {
919
- return element instanceof HTMLInputElement && "select" in element;
920
- }
921
- function focus(element, { select = false } = {}) {
922
- if (element && element.focus) {
923
- const previouslyFocusedElement = getActiveElement();
924
- element.focus({ preventScroll: true });
925
- if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
926
- }
927
- }
928
- //#endregion
929
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/FocusScope/FocusScope.js
930
- var FocusScope_default = /* @__PURE__ */ defineComponent({
931
- __name: "FocusScope",
932
- props: {
933
- loop: {
934
- type: Boolean,
935
- required: false,
936
- default: false
937
- },
938
- trapped: {
939
- type: Boolean,
940
- required: false,
941
- default: false
942
- },
943
- present: {
944
- type: Boolean,
945
- required: false,
946
- default: true
947
- },
948
- asChild: {
949
- type: Boolean,
950
- required: false
951
- },
952
- as: {
953
- type: null,
954
- required: false
955
- }
956
- },
957
- emits: ["mountAutoFocus", "unmountAutoFocus"],
958
- setup(__props, { emit: __emit }) {
959
- const props = __props;
960
- const emits = __emit;
961
- const { currentRef, currentElement } = useForwardExpose();
962
- const lastFocusedElementRef = ref(null);
963
- const focusScopesStack = createFocusScopesStack();
964
- const focusScope = /*#__PURE__*/ reactive({
965
- paused: false,
966
- pause() {
967
- this.paused = true;
968
- },
969
- resume() {
970
- this.paused = false;
971
- }
972
- });
973
- watchEffect((cleanupFn) => {
974
- if (!isClient) return;
975
- const container = currentElement.value;
976
- if (!props.trapped) return;
977
- function handleFocusIn(event) {
978
- if (focusScope.paused || !container) return;
979
- const target = event.target;
980
- if (container.contains(target)) lastFocusedElementRef.value = target;
981
- else focus(lastFocusedElementRef.value, { select: true });
982
- }
983
- function handleFocusOut(event) {
984
- if (focusScope.paused || !container) return;
985
- const relatedTarget = event.relatedTarget;
986
- if (relatedTarget === null) return;
987
- if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.value, { select: true });
988
- }
989
- function handleMutations(mutations) {
990
- const lastFocusedElement = lastFocusedElementRef.value;
991
- if (lastFocusedElement === null) return;
992
- if (!mutations.some((m) => m.removedNodes.length > 0)) return;
993
- if (!container.contains(lastFocusedElement)) focus(container);
994
- }
995
- document.addEventListener("focusin", handleFocusIn);
996
- document.addEventListener("focusout", handleFocusOut);
997
- const mutationObserver = new MutationObserver(handleMutations);
998
- if (container) mutationObserver.observe(container, {
999
- childList: true,
1000
- subtree: true
1001
- });
1002
- cleanupFn(() => {
1003
- document.removeEventListener("focusin", handleFocusIn);
1004
- document.removeEventListener("focusout", handleFocusOut);
1005
- mutationObserver.disconnect();
1006
- });
1007
- });
1008
- function dispatchMountAutoFocus(container, previouslyFocusedElement) {
1009
- const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
1010
- const handleMountAutoFocus = (ev) => emits("mountAutoFocus", ev);
1011
- container.addEventListener(AUTOFOCUS_ON_MOUNT, handleMountAutoFocus);
1012
- container.dispatchEvent(mountEvent);
1013
- container.removeEventListener(AUTOFOCUS_ON_MOUNT, handleMountAutoFocus);
1014
- if (!mountEvent.defaultPrevented) {
1015
- focusFirst(getTabbableCandidates(container), { select: true });
1016
- if (getActiveElement() === previouslyFocusedElement) focus(container);
1017
- }
1018
- }
1019
- watchEffect(async (cleanupFn) => {
1020
- const container = currentElement.value;
1021
- await nextTick();
1022
- if (!container) return;
1023
- if (props.present !== false) focusScopesStack.add(focusScope);
1024
- const previouslyFocusedElement = getActiveElement();
1025
- if (!container.contains(previouslyFocusedElement) && props.present !== false) dispatchMountAutoFocus(container, previouslyFocusedElement);
1026
- cleanupFn(() => {
1027
- const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
1028
- const unmountEventHandler = (ev) => {
1029
- emits("unmountAutoFocus", ev);
1030
- };
1031
- container.addEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);
1032
- container.dispatchEvent(unmountEvent);
1033
- container.setAttribute("data-focus-scope-unmounting", "");
1034
- setTimeout(() => {
1035
- if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
1036
- container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);
1037
- focusScopesStack.remove(focusScope);
1038
- container.removeAttribute("data-focus-scope-unmounting");
1039
- }, 0);
1040
- });
1041
- });
1042
- watch(() => props.present, async (present, prevPresent) => {
1043
- if (!isClient) return;
1044
- if (present === false && prevPresent === true) {
1045
- focusScopesStack.remove(focusScope);
1046
- return;
1047
- }
1048
- if (present !== true || prevPresent !== false) return;
1049
- focusScopesStack.add(focusScope);
1050
- await nextTick();
1051
- const container = currentElement.value;
1052
- if (!container) return;
1053
- const previouslyFocusedElement = getActiveElement();
1054
- if (!container.contains(previouslyFocusedElement)) dispatchMountAutoFocus(container, previouslyFocusedElement);
1055
- });
1056
- function handleKeyDown(event) {
1057
- if (!props.loop && !props.trapped) return;
1058
- if (focusScope.paused) return;
1059
- const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
1060
- const focusedElement = getActiveElement();
1061
- if (isTabKey && focusedElement) {
1062
- const container = event.currentTarget;
1063
- const [first, last] = getTabbableEdges(container);
1064
- if (!(first && last)) {
1065
- if (focusedElement === container) event.preventDefault();
1066
- } else if (!event.shiftKey && focusedElement === last) {
1067
- event.preventDefault();
1068
- if (props.loop) focus(first, { select: true });
1069
- } else if (event.shiftKey && focusedElement === first) {
1070
- event.preventDefault();
1071
- if (props.loop) focus(last, { select: true });
1072
- }
1073
- }
1074
- }
1075
- return (_ctx, _cache) => {
1076
- return openBlock(), createBlock(unref(Primitive), {
1077
- ref_key: "currentRef",
1078
- ref: currentRef,
1079
- tabindex: "-1",
1080
- "as-child": _ctx.asChild,
1081
- as: _ctx.as,
1082
- onKeydown: handleKeyDown
1083
- }, {
1084
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1085
- _: 3
1086
- }, 8, ["as-child", "as"]);
1087
- };
1088
- }
1089
- });
1090
- //#endregion
1091
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Teleport/Teleport.js
1092
- var Teleport_default = /* @__PURE__ */ defineComponent({
1093
- __name: "Teleport",
1094
- props: {
1095
- to: {
1096
- type: null,
1097
- required: false
1098
- },
1099
- disabled: {
1100
- type: Boolean,
1101
- required: false
1102
- },
1103
- defer: {
1104
- type: Boolean,
1105
- required: false
1106
- },
1107
- forceMount: {
1108
- type: Boolean,
1109
- required: false
1110
- }
1111
- },
1112
- setup(__props) {
1113
- const props = __props;
1114
- const configContext = injectConfigProviderContext({});
1115
- const target = computed(() => props.to ?? configContext.teleportTo?.value ?? "body");
1116
- const isMounted = useMounted();
1117
- return (_ctx, _cache) => {
1118
- return unref(isMounted) || _ctx.forceMount ? (openBlock(), createBlock(Teleport, {
1119
- key: 0,
1120
- to: target.value,
1121
- disabled: _ctx.disabled,
1122
- defer: _ctx.defer
1123
- }, [renderSlot(_ctx.$slots, "default")], 8, [
1124
- "to",
1125
- "disabled",
1126
- "defer"
1127
- ])) : createCommentVNode("v-if", true);
1128
- };
1129
- }
1130
- });
1131
- //#endregion
1132
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Popper/PopperRoot.js
1133
- var [injectPopperRootContext, providePopperRootContext] = /*#__PURE__*/ createContext("PopperRoot");
1134
- var PopperRoot_default = /* @__PURE__ */ defineComponent({
1135
- inheritAttrs: false,
1136
- __name: "PopperRoot",
1137
- setup(__props) {
1138
- const anchor = ref();
1139
- providePopperRootContext({
1140
- anchor,
1141
- onAnchorChange: (element) => anchor.value = element
1142
- });
1143
- return (_ctx, _cache) => {
1144
- return renderSlot(_ctx.$slots, "default");
1145
- };
1146
- }
1147
- });
1148
- //#endregion
1149
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Popper/PopperAnchor.js
1150
- var PopperAnchor_default = /* @__PURE__ */ defineComponent({
1151
- __name: "PopperAnchor",
1152
- props: {
1153
- reference: {
1154
- type: null,
1155
- required: false
1156
- },
1157
- asChild: {
1158
- type: Boolean,
1159
- required: false
1160
- },
1161
- as: {
1162
- type: null,
1163
- required: false
1164
- }
1165
- },
1166
- setup(__props) {
1167
- const props = __props;
1168
- const { forwardRef, currentElement } = useForwardExpose();
1169
- const rootContext = injectPopperRootContext();
1170
- watchPostEffect(() => {
1171
- rootContext.onAnchorChange(props.reference ?? currentElement.value);
1172
- });
1173
- return (_ctx, _cache) => {
1174
- return openBlock(), createBlock(unref(Primitive), {
1175
- ref: unref(forwardRef),
1176
- as: _ctx.as,
1177
- "as-child": _ctx.asChild
1178
- }, {
1179
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1180
- _: 3
1181
- }, 8, ["as", "as-child"]);
1182
- };
1183
- }
1184
- });
1185
- //#endregion
1186
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Popper/utils.js
1187
- function isNotNull(value) {
1188
- return value !== null;
1189
- }
1190
- function transformOrigin(options) {
1191
- return {
1192
- name: "transformOrigin",
1193
- options,
1194
- fn(data) {
1195
- const { placement, rects, middlewareData } = data;
1196
- const isArrowHidden = middlewareData.arrow?.centerOffset !== 0;
1197
- const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
1198
- const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
1199
- const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
1200
- const noArrowAlignX = {
1201
- start: options.dir === "rtl" ? "100%" : "0%",
1202
- center: "50%",
1203
- end: options.dir === "rtl" ? "0%" : "100%"
1204
- }[placedAlign];
1205
- const noArrowAlignY = {
1206
- start: "0%",
1207
- center: "50%",
1208
- end: "100%"
1209
- }[placedAlign];
1210
- const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
1211
- const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
1212
- let x = "";
1213
- let y = "";
1214
- if (placedSide === "bottom") {
1215
- x = isArrowHidden ? noArrowAlignX : `${arrowXCenter}px`;
1216
- y = `${-arrowHeight}px`;
1217
- } else if (placedSide === "top") {
1218
- x = isArrowHidden ? noArrowAlignX : `${arrowXCenter}px`;
1219
- y = `${rects.floating.height + arrowHeight}px`;
1220
- } else if (placedSide === "right") {
1221
- x = `${-arrowHeight}px`;
1222
- y = isArrowHidden ? noArrowAlignY : `${arrowYCenter}px`;
1223
- } else if (placedSide === "left") {
1224
- x = `${rects.floating.width + arrowHeight}px`;
1225
- y = isArrowHidden ? noArrowAlignY : `${arrowYCenter}px`;
1226
- }
1227
- return { data: {
1228
- x,
1229
- y
1230
- } };
1231
- }
1232
- };
1233
- }
1234
- function getSideAndAlignFromPlacement(placement) {
1235
- const [side, align = "center"] = placement.split("-");
1236
- return [side, align];
1237
- }
1238
- //#endregion
1239
- //#region ../../node_modules/.pnpm/vue-demi@0.14.10_vue@3.5.41_typescript@5.9.3_/node_modules/vue-demi/lib/index.mjs
1240
- var lib_exports = /* @__PURE__ */ __exportAll({
1241
- Vue: () => vue,
1242
- Vue2: () => void 0,
1243
- del: () => del,
1244
- install: () => install,
1245
- isVue2: () => false,
1246
- isVue3: () => true,
1247
- set: () => set
1248
- });
1249
- import * as import_vue from "vue";
1250
- __reExport(lib_exports, import_vue);
1251
- function install() {}
1252
- function set(target, key, val) {
1253
- if (Array.isArray(target)) {
1254
- target.length = Math.max(target.length, key);
1255
- target.splice(key, 1, val);
1256
- return val;
1257
- }
1258
- target[key] = val;
1259
- return val;
1260
- }
1261
- function del(target, key) {
1262
- if (Array.isArray(target)) {
1263
- target.splice(key, 1);
1264
- return;
1265
- }
1266
- delete target[key];
1267
- }
1268
- //#endregion
1269
- //#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.11_vue@3.5.41_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
1270
- function isComponentPublicInstance(target) {
1271
- return target != null && typeof target === "object" && "$el" in target;
1272
- }
1273
- function unwrapElement(target) {
1274
- if (isComponentPublicInstance(target)) {
1275
- const element = target.$el;
1276
- return isNode(element) && getNodeName(element) === "#comment" ? null : element;
1277
- }
1278
- return target;
1279
- }
1280
- function toValue$1(source) {
1281
- return typeof source === "function" ? source() : (0, lib_exports.unref)(source);
1282
- }
1283
- /**
1284
- * Positions an inner element of the floating element such that it is centered to the reference element.
1285
- * @param options The arrow options.
1286
- * @see https://floating-ui.com/docs/arrow
1287
- */
1288
- function arrow(options) {
1289
- return {
1290
- name: "arrow",
1291
- options,
1292
- fn(args) {
1293
- const element = unwrapElement(toValue$1(options.element));
1294
- if (element == null) return {};
1295
- return arrow$1({
1296
- element,
1297
- padding: options.padding
1298
- }).fn(args);
1299
- }
1300
- };
1301
- }
1302
- function getDPR(element) {
1303
- if (typeof window === "undefined") return 1;
1304
- return (element.ownerDocument.defaultView || window).devicePixelRatio || 1;
1305
- }
1306
- function roundByDPR(element, value) {
1307
- const dpr = getDPR(element);
1308
- return Math.round(value * dpr) / dpr;
1309
- }
1310
- /**
1311
- * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.
1312
- * @param reference The reference template ref.
1313
- * @param floating The floating template ref.
1314
- * @param options The floating options.
1315
- * @see https://floating-ui.com/docs/vue
1316
- */
1317
- function useFloating(reference, floating, options) {
1318
- if (options === void 0) options = {};
1319
- const whileElementsMountedOption = options.whileElementsMounted;
1320
- const openOption = (0, lib_exports.computed)(() => {
1321
- var _toValue;
1322
- return (_toValue = toValue$1(options.open)) != null ? _toValue : true;
1323
- });
1324
- const middlewareOption = (0, lib_exports.computed)(() => toValue$1(options.middleware));
1325
- const placementOption = (0, lib_exports.computed)(() => {
1326
- var _toValue2;
1327
- return (_toValue2 = toValue$1(options.placement)) != null ? _toValue2 : "bottom";
1328
- });
1329
- const strategyOption = (0, lib_exports.computed)(() => {
1330
- var _toValue3;
1331
- return (_toValue3 = toValue$1(options.strategy)) != null ? _toValue3 : "absolute";
1332
- });
1333
- const transformOption = (0, lib_exports.computed)(() => {
1334
- var _toValue4;
1335
- return (_toValue4 = toValue$1(options.transform)) != null ? _toValue4 : true;
1336
- });
1337
- const referenceElement = (0, lib_exports.computed)(() => unwrapElement(reference.value));
1338
- const floatingElement = (0, lib_exports.computed)(() => unwrapElement(floating.value));
1339
- const x = (0, lib_exports.ref)(0);
1340
- const y = (0, lib_exports.ref)(0);
1341
- const strategy = (0, lib_exports.ref)(strategyOption.value);
1342
- const placement = (0, lib_exports.ref)(placementOption.value);
1343
- const middlewareData = (0, lib_exports.shallowRef)({});
1344
- const isPositioned = (0, lib_exports.ref)(false);
1345
- const floatingStyles = (0, lib_exports.computed)(() => {
1346
- const initialStyles = {
1347
- position: strategy.value,
1348
- left: "0",
1349
- top: "0"
1350
- };
1351
- if (!floatingElement.value) return initialStyles;
1352
- const xVal = roundByDPR(floatingElement.value, x.value);
1353
- const yVal = roundByDPR(floatingElement.value, y.value);
1354
- if (transformOption.value) return {
1355
- ...initialStyles,
1356
- transform: "translate(" + xVal + "px, " + yVal + "px)",
1357
- ...getDPR(floatingElement.value) >= 1.5 && { willChange: "transform" }
1358
- };
1359
- return {
1360
- position: strategy.value,
1361
- left: xVal + "px",
1362
- top: yVal + "px"
1363
- };
1364
- });
1365
- let whileElementsMountedCleanup;
1366
- function update() {
1367
- if (referenceElement.value == null || floatingElement.value == null) return;
1368
- const open = openOption.value;
1369
- computePosition(referenceElement.value, floatingElement.value, {
1370
- middleware: middlewareOption.value,
1371
- placement: placementOption.value,
1372
- strategy: strategyOption.value
1373
- }).then((position) => {
1374
- x.value = position.x;
1375
- y.value = position.y;
1376
- strategy.value = position.strategy;
1377
- placement.value = position.placement;
1378
- middlewareData.value = position.middlewareData;
1379
- /**
1380
- * The floating element's position may be recomputed while it's closed
1381
- * but still mounted (such as when transitioning out). To ensure
1382
- * `isPositioned` will be `false` initially on the next open, avoid
1383
- * setting it to `true` when `open === false` (must be specified).
1384
- */
1385
- isPositioned.value = open !== false;
1386
- });
1387
- }
1388
- function cleanup() {
1389
- if (typeof whileElementsMountedCleanup === "function") {
1390
- whileElementsMountedCleanup();
1391
- whileElementsMountedCleanup = void 0;
1392
- }
1393
- }
1394
- function attach() {
1395
- cleanup();
1396
- if (whileElementsMountedOption === void 0) {
1397
- update();
1398
- return;
1399
- }
1400
- if (referenceElement.value != null && floatingElement.value != null) {
1401
- whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);
1402
- return;
1403
- }
1404
- }
1405
- function reset() {
1406
- if (!openOption.value) isPositioned.value = false;
1407
- }
1408
- (0, lib_exports.watch)([
1409
- middlewareOption,
1410
- placementOption,
1411
- strategyOption,
1412
- openOption
1413
- ], update, { flush: "sync" });
1414
- (0, lib_exports.watch)([referenceElement, floatingElement], attach, { flush: "sync" });
1415
- (0, lib_exports.watch)(openOption, reset, { flush: "sync" });
1416
- if ((0, lib_exports.getCurrentScope)()) (0, lib_exports.onScopeDispose)(cleanup);
1417
- return {
1418
- x: (0, lib_exports.shallowReadonly)(x),
1419
- y: (0, lib_exports.shallowReadonly)(y),
1420
- strategy: (0, lib_exports.shallowReadonly)(strategy),
1421
- placement: (0, lib_exports.shallowReadonly)(placement),
1422
- middlewareData: (0, lib_exports.shallowReadonly)(middlewareData),
1423
- isPositioned: (0, lib_exports.shallowReadonly)(isPositioned),
1424
- floatingStyles,
1425
- update
1426
- };
1427
- }
1428
- //#endregion
1429
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/Popper/PopperContent.js
1430
- var _hoisted_1 = ["dir"];
1431
- var PopperContentPropsDefaultValue = {
1432
- side: "bottom",
1433
- sideOffset: 0,
1434
- sideFlip: true,
1435
- align: "center",
1436
- alignOffset: 0,
1437
- alignFlip: true,
1438
- arrowPadding: 0,
1439
- hideShiftedArrow: true,
1440
- avoidCollisions: true,
1441
- collisionBoundary: () => [],
1442
- collisionPadding: 0,
1443
- sticky: "partial",
1444
- hideWhenDetached: false,
1445
- positionStrategy: "fixed",
1446
- updatePositionStrategy: "optimized",
1447
- prioritizePosition: false
1448
- };
1449
- var [injectPopperContentContext, providePopperContentContext] = /*#__PURE__*/ createContext("PopperContent");
1450
- var PopperContent_default = /* @__PURE__ */ defineComponent({
1451
- inheritAttrs: false,
1452
- __name: "PopperContent",
1453
- props: /* @__PURE__ */ mergeDefaults({
1454
- memoDependencies: {
1455
- type: Array,
1456
- required: false
1457
- },
1458
- side: {
1459
- type: null,
1460
- required: false
1461
- },
1462
- sideOffset: {
1463
- type: Number,
1464
- required: false
1465
- },
1466
- sideFlip: {
1467
- type: Boolean,
1468
- required: false
1469
- },
1470
- align: {
1471
- type: null,
1472
- required: false
1473
- },
1474
- alignOffset: {
1475
- type: Number,
1476
- required: false
1477
- },
1478
- alignFlip: {
1479
- type: Boolean,
1480
- required: false
1481
- },
1482
- avoidCollisions: {
1483
- type: Boolean,
1484
- required: false
1485
- },
1486
- collisionBoundary: {
1487
- type: null,
1488
- required: false
1489
- },
1490
- collisionPadding: {
1491
- type: [Number, Object],
1492
- required: false
1493
- },
1494
- arrowPadding: {
1495
- type: Number,
1496
- required: false
1497
- },
1498
- hideShiftedArrow: {
1499
- type: Boolean,
1500
- required: false
1501
- },
1502
- sticky: {
1503
- type: String,
1504
- required: false
1505
- },
1506
- hideWhenDetached: {
1507
- type: Boolean,
1508
- required: false
1509
- },
1510
- positionStrategy: {
1511
- type: String,
1512
- required: false
1513
- },
1514
- updatePositionStrategy: {
1515
- type: String,
1516
- required: false
1517
- },
1518
- disableUpdateOnLayoutShift: {
1519
- type: Boolean,
1520
- required: false
1521
- },
1522
- prioritizePosition: {
1523
- type: Boolean,
1524
- required: false
1525
- },
1526
- reference: {
1527
- type: null,
1528
- required: false
1529
- },
1530
- dir: {
1531
- type: String,
1532
- required: false
1533
- },
1534
- asChild: {
1535
- type: Boolean,
1536
- required: false
1537
- },
1538
- as: {
1539
- type: null,
1540
- required: false
1541
- }
1542
- }, { ...PopperContentPropsDefaultValue }),
1543
- emits: ["placed"],
1544
- setup(__props, { emit: __emit }) {
1545
- const props = __props;
1546
- const emits = __emit;
1547
- const rootContext = injectPopperRootContext();
1548
- const { forwardRef, currentElement: contentElement } = useForwardExpose();
1549
- const dir = useDirection(computed(() => props.dir));
1550
- const floatingRef = ref();
1551
- const arrow$1 = ref();
1552
- const { width: arrowWidth, height: arrowHeight } = useSize(arrow$1);
1553
- const desiredPlacement = computed(() => props.side + (props.align !== "center" ? `-${props.align}` : ""));
1554
- const collisionPadding = computed(() => {
1555
- return typeof props.collisionPadding === "number" ? props.collisionPadding : {
1556
- top: 0,
1557
- right: 0,
1558
- bottom: 0,
1559
- left: 0,
1560
- ...props.collisionPadding
1561
- };
1562
- });
1563
- const boundary = computed(() => {
1564
- return Array.isArray(props.collisionBoundary) ? props.collisionBoundary : [props.collisionBoundary];
1565
- });
1566
- const detectOverflowOptions = computed(() => {
1567
- return {
1568
- padding: collisionPadding.value,
1569
- boundary: boundary.value.filter(isNotNull),
1570
- altBoundary: boundary.value.length > 0
1571
- };
1572
- });
1573
- const flipOptions = computed(() => {
1574
- return {
1575
- mainAxis: props.sideFlip,
1576
- crossAxis: props.alignFlip
1577
- };
1578
- });
1579
- const computedMiddleware = computed(() => {
1580
- return [
1581
- offset({
1582
- mainAxis: props.sideOffset + arrowHeight.value,
1583
- alignmentAxis: props.alignOffset
1584
- }),
1585
- props.prioritizePosition && props.avoidCollisions && flip({
1586
- ...detectOverflowOptions.value,
1587
- ...flipOptions.value
1588
- }),
1589
- props.avoidCollisions && shift({
1590
- mainAxis: true,
1591
- crossAxis: !!props.prioritizePosition,
1592
- limiter: props.sticky === "partial" ? limitShift() : void 0,
1593
- ...detectOverflowOptions.value
1594
- }),
1595
- !props.prioritizePosition && props.avoidCollisions && flip({
1596
- ...detectOverflowOptions.value,
1597
- ...flipOptions.value
1598
- }),
1599
- size({
1600
- ...detectOverflowOptions.value,
1601
- apply: ({ elements, rects, availableWidth, availableHeight }) => {
1602
- const { width: anchorWidth, height: anchorHeight } = rects.reference;
1603
- const contentStyle = elements.floating.style;
1604
- contentStyle.setProperty("--reka-popper-available-width", `${availableWidth}px`);
1605
- contentStyle.setProperty("--reka-popper-available-height", `${availableHeight}px`);
1606
- contentStyle.setProperty("--reka-popper-anchor-width", `${anchorWidth}px`);
1607
- contentStyle.setProperty("--reka-popper-anchor-height", `${anchorHeight}px`);
1608
- }
1609
- }),
1610
- arrow$1.value && arrow({
1611
- element: arrow$1.value,
1612
- padding: props.arrowPadding
1613
- }),
1614
- transformOrigin({
1615
- arrowWidth: arrowWidth.value,
1616
- arrowHeight: arrowHeight.value,
1617
- dir: dir.value
1618
- }),
1619
- props.hideWhenDetached && hide({
1620
- strategy: "referenceHidden",
1621
- ...detectOverflowOptions.value
1622
- })
1623
- ];
1624
- });
1625
- const { floatingStyles, placement, isPositioned, middlewareData, update } = useFloating(computed(() => props.reference ?? rootContext.anchor.value), floatingRef, {
1626
- strategy: props.positionStrategy,
1627
- placement: desiredPlacement,
1628
- whileElementsMounted: (...args) => {
1629
- return autoUpdate(...args, {
1630
- layoutShift: !props.disableUpdateOnLayoutShift,
1631
- animationFrame: props.updatePositionStrategy === "always"
1632
- });
1633
- },
1634
- middleware: computedMiddleware
1635
- });
1636
- const placedSide = computed(() => getSideAndAlignFromPlacement(placement.value)[0]);
1637
- const placedAlign = computed(() => getSideAndAlignFromPlacement(placement.value)[1]);
1638
- watchPostEffect(() => {
1639
- if (isPositioned.value) emits("placed");
1640
- });
1641
- const shouldHideArrow = computed(() => {
1642
- const cannotCenterArrow = middlewareData.value.arrow?.centerOffset !== 0;
1643
- return props.hideShiftedArrow && cannotCenterArrow;
1644
- });
1645
- const contentZIndex = ref("");
1646
- watchEffect(() => {
1647
- if (contentElement.value) contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;
1648
- });
1649
- providePopperContentContext({
1650
- placedSide,
1651
- onArrowChange: (element) => arrow$1.value = element,
1652
- arrowX: computed(() => middlewareData.value.arrow?.x ?? 0),
1653
- arrowY: computed(() => middlewareData.value.arrow?.y ?? 0),
1654
- shouldHideArrow
1655
- });
1656
- return (_ctx, _cache) => {
1657
- return openBlock(), createElementBlock("div", {
1658
- ref_key: "floatingRef",
1659
- ref: floatingRef,
1660
- "data-reka-popper-content-wrapper": "",
1661
- dir: unref(dir),
1662
- style: normalizeStyle({
1663
- ...unref(floatingStyles),
1664
- transform: unref(isPositioned) ? unref(floatingStyles).transform : "translate(0, -200%)",
1665
- minWidth: "max-content",
1666
- zIndex: contentZIndex.value,
1667
- ["--reka-popper-transform-origin"]: [unref(middlewareData).transformOrigin?.x, unref(middlewareData).transformOrigin?.y].join(" "),
1668
- ...unref(middlewareData).hide?.referenceHidden && {
1669
- visibility: "hidden",
1670
- pointerEvents: "none"
1671
- }
1672
- })
1673
- }, [props.memoDependencies ? withMemo([
1674
- props.asChild,
1675
- props.as,
1676
- placedSide.value,
1677
- placedAlign.value,
1678
- unref(isPositioned),
1679
- ...Object.values(_ctx.$attrs),
1680
- ...props.memoDependencies
1681
- ], () => (openBlock(), createBlock(unref(Primitive), mergeProps({
1682
- key: 0,
1683
- ref: unref(forwardRef)
1684
- }, _ctx.$attrs, {
1685
- "as-child": props.asChild,
1686
- as: props.as,
1687
- "data-side": placedSide.value,
1688
- "data-align": placedAlign.value,
1689
- style: { animation: !unref(isPositioned) ? "none" : void 0 }
1690
- }), {
1691
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1692
- _: 3
1693
- }, 16, [
1694
- "as-child",
1695
- "as",
1696
- "data-side",
1697
- "data-align",
1698
- "style"
1699
- ])), _cache, 0) : (openBlock(), createBlock(unref(Primitive), mergeProps({
1700
- key: 1,
1701
- ref: unref(forwardRef)
1702
- }, _ctx.$attrs, {
1703
- "as-child": props.asChild,
1704
- as: props.as,
1705
- "data-side": placedSide.value,
1706
- "data-align": placedAlign.value,
1707
- dir: unref(dir),
1708
- style: { animation: !unref(isPositioned) ? "none" : void 0 }
1709
- }), {
1710
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1711
- _: 3
1712
- }, 16, [
1713
- "as-child",
1714
- "as",
1715
- "data-side",
1716
- "data-align",
1717
- "dir",
1718
- "style"
1719
- ]))], 12, _hoisted_1);
1720
- };
1721
- }
1722
- });
1723
- //#endregion
1724
- export { FocusScope_default as a, useId$1 as c, useForwardProps as d, useFocusGuards as f, Teleport_default as i, useHideOthers as l, handleAndDispatchCustomEvent as m, PopperAnchor_default as n, DismissableLayer_default as o, useBodyScrollLock as p, PopperRoot_default as r, Presence_default as s, PopperContent_default as t, useForwardPropsEmits as u };
1725
-
1726
- //# sourceMappingURL=PopperContent-C9eeL6LH.js.map