@eodash/eodash 5.0.0-alpha.2.1 → 5.0.0-alpha.2.10

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 (136) hide show
  1. package/README.md +36 -3
  2. package/core/client/App.vue +26 -0
  3. package/core/client/SuspensedDashboard.ce.vue +105 -0
  4. package/core/client/asWebComponent.d.ts +23 -0
  5. package/core/client/asWebComponent.js +12 -0
  6. package/core/client/components/DashboardLayout.vue +77 -0
  7. package/core/client/components/DynamicWebComponent.vue +68 -0
  8. package/core/client/components/ErrorAlert.vue +36 -0
  9. package/core/{components → client/components}/Footer.vue +34 -15
  10. package/core/client/components/Header.vue +19 -0
  11. package/core/client/components/IframeWrapper.vue +11 -0
  12. package/core/client/components/Loading.vue +37 -0
  13. package/core/client/components/MobileLayout.vue +109 -0
  14. package/core/client/composables/DefineEodash.js +67 -0
  15. package/core/client/composables/DefineWidgets.js +161 -0
  16. package/core/client/composables/index.js +136 -0
  17. package/core/client/eodash.js +136 -0
  18. package/core/client/main.js +2 -0
  19. package/core/client/plugins/index.js +20 -0
  20. package/core/client/plugins/vuetify.js +35 -0
  21. package/core/client/render.js +12 -0
  22. package/core/client/store/Actions.js +62 -0
  23. package/core/client/store/States.js +21 -0
  24. package/core/client/store/index.js +20 -0
  25. package/core/client/store/stac.js +81 -0
  26. package/core/client/types.d.ts +287 -0
  27. package/core/client/utils/eodashSTAC.js +337 -0
  28. package/core/client/utils/helpers.js +172 -0
  29. package/core/client/utils/index.js +51 -0
  30. package/core/{utils → client/utils}/keys.js +2 -2
  31. package/core/client/views/Dashboard.vue +116 -0
  32. package/core/client/vite-env.d.ts +39 -0
  33. package/dist/client/DashboardLayout-C_3q8Y10.js +156 -0
  34. package/dist/{DynamicWebComponent-BrHVTesn.js → client/DynamicWebComponent-IiTTLBt-.js} +11 -11
  35. package/dist/client/EodashDatePicker-DgC1lccp.js +252 -0
  36. package/dist/{eox-itemfilter-DcQkRD2l.js → client/EodashItemFilter-DoWZGe6r.js} +1515 -1381
  37. package/dist/client/EodashMap-C96D3LLv.js +114352 -0
  38. package/dist/client/EodashMapBtns-DDtzV94u.js +50 -0
  39. package/dist/client/ExportState-CduS2mFs.js +558 -0
  40. package/dist/client/Footer-DHQcutCv.js +115 -0
  41. package/dist/client/Header-DC0y7rLK.js +350 -0
  42. package/dist/{IframeWrapper-Dd9zrX9s.js → client/IframeWrapper-BK-10FbS.js} +4 -4
  43. package/dist/client/MobileLayout-BpLoMY4i.js +945 -0
  44. package/dist/client/PopUp-CNMCWL0z.js +300 -0
  45. package/dist/client/VImg-DT7eb8V-.js +291 -0
  46. package/dist/client/VMain-OenWyy46.js +39 -0
  47. package/dist/client/VOverlay-x3UXpKhr.js +972 -0
  48. package/dist/{WidgetsContainer-DxfCu0I3.js → client/WidgetsContainer-qMUwtN0W.js} +24 -17
  49. package/dist/client/asWebComponent-DQrnLsI2.js +20404 -0
  50. package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
  51. package/dist/{decoder-kAoyGIq9-BBR5CgzS.js → client/decoder-Cth6J7EK-CtUoHA6r.js} +1 -1
  52. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
  53. package/dist/client/eo-dash.js +6 -0
  54. package/dist/client/eox-jsonform-DCErgjhw.js +17515 -0
  55. package/dist/client/eox-layercontrol-D0Ht7Mag.js +21298 -0
  56. package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
  57. package/dist/client/forwardRefs-CpNjL95t.js +185 -0
  58. package/dist/client/helpers-KCSgmfim.js +1417 -0
  59. package/dist/{index-DTkOfh2g.js → client/index-DopVrUzM.js} +22 -21
  60. package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
  61. package/dist/{lerc-C9VL9kri-cIdbW0sg.js → client/lerc-BgbQqdFI-D986ErVw.js} +37 -39
  62. package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-LAGDNbSC-DkP96qO9.js} +1 -1
  63. package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
  64. package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
  65. package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CMGvRjfu-BRi6E4i1.js} +1 -1
  66. package/dist/{ssrBoot-D-b4-M19.js → client/ssrBoot-DkjdOWvj.js} +1 -1
  67. package/dist/client/style.css +5 -0
  68. package/dist/client/transition-BtJHh7JK.js +34 -0
  69. package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-qotgY98I.js} +56 -92
  70. package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
  71. package/dist/node/cli.js +20 -0
  72. package/dist/node/main.js +2 -0
  73. package/dist/node/types.d.ts +47 -0
  74. package/package.json +54 -51
  75. package/widgets/EodashDatePicker.vue +145 -40
  76. package/widgets/EodashItemFilter.vue +73 -38
  77. package/widgets/EodashMap.vue +210 -37
  78. package/widgets/EodashMapBtns.vue +50 -0
  79. package/widgets/ExportState.vue +112 -0
  80. package/widgets/PopUp.vue +40 -0
  81. package/widgets/WidgetsContainer.vue +47 -27
  82. package/bin/app.js +0 -22
  83. package/bin/cli.js +0 -62
  84. package/bin/main.js +0 -9
  85. package/bin/serverConfig.js +0 -165
  86. package/bin/types.d.ts +0 -52
  87. package/bin/utils.js +0 -103
  88. package/core/App.vue +0 -19
  89. package/core/SuspensedDashboard.ce.vue +0 -65
  90. package/core/asWebComponent.d.ts +0 -18
  91. package/core/asWebComponent.js +0 -12
  92. package/core/components/DashboardLayout.vue +0 -44
  93. package/core/components/DynamicWebComponent.vue +0 -68
  94. package/core/components/Header.vue +0 -14
  95. package/core/components/IframeWrapper.vue +0 -11
  96. package/core/components/Loading.vue +0 -27
  97. package/core/components/MobileLayout.vue +0 -49
  98. package/core/composables/DefineEodash.js +0 -57
  99. package/core/composables/DefineWidgets.js +0 -129
  100. package/core/composables/index.js +0 -219
  101. package/core/eodash.js +0 -100
  102. package/core/main.js +0 -2
  103. package/core/plugins/index.js +0 -18
  104. package/core/plugins/vuetify.js +0 -30
  105. package/core/render.js +0 -13
  106. package/core/store/Actions.js +0 -0
  107. package/core/store/States.js +0 -21
  108. package/core/store/index.js +0 -17
  109. package/core/store/stac.js +0 -63
  110. package/core/types.d.ts +0 -356
  111. package/core/utils/eodashSTAC.js +0 -164
  112. package/core/utils/helpers.js +0 -40
  113. package/core/utils/index.js +0 -28
  114. package/core/views/Dashboard.vue +0 -59
  115. package/core/vite-env.d.ts +0 -31
  116. package/dist/DashboardLayout-Dp8AnYD9.js +0 -141
  117. package/dist/EodashDatePicker-D_udZ26j.js +0 -1645
  118. package/dist/EodashItemFilter-BLAGx2UD.js +0 -51
  119. package/dist/EodashMap-Bxl_aqY2.js +0 -53405
  120. package/dist/Footer-AohCH8U7.js +0 -118
  121. package/dist/Header-DC50S6GR.js +0 -609
  122. package/dist/MobileLayout-CgToA7Gp.js +0 -523
  123. package/dist/VBtn-Bz7ruRUg.js +0 -1106
  124. package/dist/VMain-BHfWJU2j.js +0 -35
  125. package/dist/asWebComponent-C8rb3b1D.js +0 -11323
  126. package/dist/color-DpYEub1f.js +0 -115
  127. package/dist/deflate-Be2Arps5-hDqMz3RA.js +0 -10
  128. package/dist/dimensions-CJaGeSrj.js +0 -53
  129. package/dist/eo-dash.js +0 -6
  130. package/dist/eox-map-BJ9SIixs.js +0 -36205
  131. package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
  132. package/dist/forwardRefs-Bxeu9Obx.js +0 -142
  133. package/dist/index-Sa2Vg_gx.js +0 -65
  134. package/dist/style.css +0 -5
  135. /package/dist/{.gitkeep → client/.gitkeep} +0 -0
  136. /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
@@ -0,0 +1,972 @@
1
+ import { bi as ke, bj as Oe, p as U, r as I, L as q, ap as se, w as L, bk as _, bl as De, bm as ve, bn as te, bo as ne, bp as de, c as P, D as ce, bq as Ie, br as me, C as F, al as ye, aq as ue, bs as Pe, bt as Ve, bd as pe, x as Ce, bu as ge, d as W, bv as We, s as Y, H as qe, Z as je, aJ as Ae, q as ze, as as $e, bw as Ye, bx as Ue, e as Ge, ac as Xe, h as Ze, g as Je, y as Ke, i as Qe, j as et, Q as tt, R as nt, ad as ot, an as at, by as rt, a as it, b as D, bz as lt, t as st, B as ct, v as ut, F as ft, ab as vt, bA as dt } from "./asWebComponent-DQrnLsI2.js";
2
+ import { g as mt, B as oe, e as he, n as yt, m as gt, u as ht, b as bt, a as wt, s as Et } from "./forwardRefs-CpNjL95t.js";
3
+ import { m as St, M as xt } from "./transition-BtJHh7JK.js";
4
+ const Z = /* @__PURE__ */ new WeakMap();
5
+ function kt(e, t) {
6
+ Object.keys(t).forEach((n) => {
7
+ if (ke(n)) {
8
+ const o = Oe(n), r = Z.get(e);
9
+ if (t[n] == null)
10
+ r?.forEach((l) => {
11
+ const [a, s] = l;
12
+ a === o && (e.removeEventListener(o, s), r.delete(l));
13
+ });
14
+ else if (!r || ![...r].some((l) => l[0] === o && l[1] === t[n])) {
15
+ e.addEventListener(o, t[n]);
16
+ const l = r || /* @__PURE__ */ new Set();
17
+ l.add([o, t[n]]), Z.has(e) || Z.set(e, l);
18
+ }
19
+ } else
20
+ t[n] == null ? e.removeAttribute(n) : e.setAttribute(n, t[n]);
21
+ });
22
+ }
23
+ function Ot(e, t) {
24
+ Object.keys(t).forEach((n) => {
25
+ if (ke(n)) {
26
+ const o = Oe(n), r = Z.get(e);
27
+ r?.forEach((l) => {
28
+ const [a, s] = l;
29
+ a === o && (e.removeEventListener(o, s), r.delete(l));
30
+ });
31
+ } else
32
+ e.removeAttribute(n);
33
+ });
34
+ }
35
+ function Te(e) {
36
+ if (typeof e.getRootNode != "function") {
37
+ for (; e.parentNode; ) e = e.parentNode;
38
+ return e !== document ? null : document;
39
+ }
40
+ const t = e.getRootNode();
41
+ return t !== document && t.getRootNode({
42
+ composed: !0
43
+ }) !== document ? null : t;
44
+ }
45
+ function Pt(e) {
46
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
47
+ for (; e; ) {
48
+ if (t ? pt(e) : fe(e)) return e;
49
+ e = e.parentElement;
50
+ }
51
+ return document.scrollingElement;
52
+ }
53
+ function J(e, t) {
54
+ const n = [];
55
+ if (t && e && !t.contains(e)) return n;
56
+ for (; e && (fe(e) && n.push(e), e !== t); )
57
+ e = e.parentElement;
58
+ return n;
59
+ }
60
+ function fe(e) {
61
+ if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1;
62
+ const t = window.getComputedStyle(e);
63
+ return t.overflowY === "scroll" || t.overflowY === "auto" && e.scrollHeight > e.clientHeight;
64
+ }
65
+ function pt(e) {
66
+ if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1;
67
+ const t = window.getComputedStyle(e);
68
+ return ["scroll", "auto"].includes(t.overflowY);
69
+ }
70
+ function Ct(e) {
71
+ for (; e; ) {
72
+ if (window.getComputedStyle(e).position === "fixed")
73
+ return !0;
74
+ e = e.offsetParent;
75
+ }
76
+ return !1;
77
+ }
78
+ function At() {
79
+ return !0;
80
+ }
81
+ function Le(e, t, n) {
82
+ if (!e || Be(e, n) === !1) return !1;
83
+ const o = Te(t);
84
+ if (typeof ShadowRoot < "u" && o instanceof ShadowRoot && o.host === e.target) return !1;
85
+ const r = (typeof n.value == "object" && n.value.include || (() => []))();
86
+ return r.push(t), !r.some((l) => l?.contains(e.target));
87
+ }
88
+ function Be(e, t) {
89
+ return (typeof t.value == "object" && t.value.closeConditional || At)(e);
90
+ }
91
+ function Tt(e, t, n) {
92
+ const o = typeof n.value == "function" ? n.value : n.value.handler;
93
+ t._clickOutside.lastMousedownWasOutside && Le(e, t, n) && setTimeout(() => {
94
+ Be(e, n) && o && o(e);
95
+ }, 0);
96
+ }
97
+ function be(e, t) {
98
+ const n = Te(e);
99
+ t(document), typeof ShadowRoot < "u" && n instanceof ShadowRoot && t(n);
100
+ }
101
+ const Lt = {
102
+ // [data-app] may not be found
103
+ // if using bind, inserted makes
104
+ // sure that the root element is
105
+ // available, iOS does not support
106
+ // clicks on body
107
+ mounted(e, t) {
108
+ const n = (r) => Tt(r, e, t), o = (r) => {
109
+ e._clickOutside.lastMousedownWasOutside = Le(r, e, t);
110
+ };
111
+ be(e, (r) => {
112
+ r.addEventListener("click", n, !0), r.addEventListener("mousedown", o, !0);
113
+ }), e._clickOutside || (e._clickOutside = {
114
+ lastMousedownWasOutside: !1
115
+ }), e._clickOutside[t.instance.$.uid] = {
116
+ onClick: n,
117
+ onMousedown: o
118
+ };
119
+ },
120
+ unmounted(e, t) {
121
+ e._clickOutside && (be(e, (n) => {
122
+ if (!n || !e._clickOutside?.[t.instance.$.uid]) return;
123
+ const {
124
+ onClick: o,
125
+ onMousedown: r
126
+ } = e._clickOutside[t.instance.$.uid];
127
+ n.removeEventListener("click", o, !0), n.removeEventListener("mousedown", r, !0);
128
+ }), delete e._clickOutside[t.instance.$.uid]);
129
+ }
130
+ };
131
+ function ae(e, t) {
132
+ return {
133
+ x: e.x + t.x,
134
+ y: e.y + t.y
135
+ };
136
+ }
137
+ function Bt(e, t) {
138
+ return {
139
+ x: e.x - t.x,
140
+ y: e.y - t.y
141
+ };
142
+ }
143
+ function we(e, t) {
144
+ if (e.side === "top" || e.side === "bottom") {
145
+ const {
146
+ side: n,
147
+ align: o
148
+ } = e, r = o === "left" ? 0 : o === "center" ? t.width / 2 : o === "right" ? t.width : o, l = n === "top" ? 0 : n === "bottom" ? t.height : n;
149
+ return ae({
150
+ x: r,
151
+ y: l
152
+ }, t);
153
+ } else if (e.side === "left" || e.side === "right") {
154
+ const {
155
+ side: n,
156
+ align: o
157
+ } = e, r = n === "left" ? 0 : n === "right" ? t.width : n, l = o === "top" ? 0 : o === "center" ? t.height / 2 : o === "bottom" ? t.height : o;
158
+ return ae({
159
+ x: r,
160
+ y: l
161
+ }, t);
162
+ }
163
+ return ae({
164
+ x: t.width / 2,
165
+ y: t.height / 2
166
+ }, t);
167
+ }
168
+ const Me = {
169
+ static: Ft,
170
+ // specific viewport position, usually centered
171
+ connected: _t
172
+ // connected to a certain element
173
+ }, Mt = U({
174
+ locationStrategy: {
175
+ type: [String, Function],
176
+ default: "static",
177
+ validator: (e) => typeof e == "function" || e in Me
178
+ },
179
+ location: {
180
+ type: String,
181
+ default: "bottom"
182
+ },
183
+ origin: {
184
+ type: String,
185
+ default: "auto"
186
+ },
187
+ offset: [Number, String, Array]
188
+ }, "VOverlay-location-strategies");
189
+ function Rt(e, t) {
190
+ const n = I({}), o = I();
191
+ q && se(() => !!(t.isActive.value && e.locationStrategy), (l) => {
192
+ L(() => e.locationStrategy, l), _(() => {
193
+ window.removeEventListener("resize", r), o.value = void 0;
194
+ }), window.addEventListener("resize", r, {
195
+ passive: !0
196
+ }), typeof e.locationStrategy == "function" ? o.value = e.locationStrategy(t, e, n)?.updateLocation : o.value = Me[e.locationStrategy](t, e, n)?.updateLocation;
197
+ });
198
+ function r(l) {
199
+ o.value?.(l);
200
+ }
201
+ return {
202
+ contentStyles: n,
203
+ updateLocation: o
204
+ };
205
+ }
206
+ function Ft() {
207
+ }
208
+ function Nt(e, t) {
209
+ t ? e.style.removeProperty("left") : e.style.removeProperty("right");
210
+ const n = yt(e);
211
+ return t ? n.x += parseFloat(e.style.right || 0) : n.x -= parseFloat(e.style.left || 0), n.y -= parseFloat(e.style.top || 0), n;
212
+ }
213
+ function _t(e, t, n) {
214
+ (Array.isArray(e.target.value) || Ct(e.target.value)) && Object.assign(n.value, {
215
+ position: "fixed",
216
+ top: 0,
217
+ [e.isRtl.value ? "right" : "left"]: 0
218
+ });
219
+ const {
220
+ preferredAnchor: r,
221
+ preferredOrigin: l
222
+ } = De(() => {
223
+ const u = ve(t.location, e.isRtl.value), c = t.origin === "overlap" ? u : t.origin === "auto" ? te(u) : ve(t.origin, e.isRtl.value);
224
+ return u.side === c.side && u.align === ne(c).align ? {
225
+ preferredAnchor: de(u),
226
+ preferredOrigin: de(c)
227
+ } : {
228
+ preferredAnchor: u,
229
+ preferredOrigin: c
230
+ };
231
+ }), [a, s, d, m] = ["minWidth", "minHeight", "maxWidth", "maxHeight"].map((u) => P(() => {
232
+ const c = parseFloat(t[u]);
233
+ return isNaN(c) ? 1 / 0 : c;
234
+ })), y = P(() => {
235
+ if (Array.isArray(t.offset))
236
+ return t.offset;
237
+ if (typeof t.offset == "string") {
238
+ const u = t.offset.split(" ").map(parseFloat);
239
+ return u.length < 2 && u.push(0), u;
240
+ }
241
+ return typeof t.offset == "number" ? [t.offset, 0] : [0, 0];
242
+ });
243
+ let p = !1;
244
+ const k = new ResizeObserver(() => {
245
+ p && S();
246
+ });
247
+ L([e.target, e.contentEl], (u, c) => {
248
+ let [x, A] = u, [h, w] = c;
249
+ h && !Array.isArray(h) && k.unobserve(h), x && !Array.isArray(x) && k.observe(x), w && k.unobserve(w), A && k.observe(A);
250
+ }, {
251
+ immediate: !0
252
+ }), _(() => {
253
+ k.disconnect();
254
+ });
255
+ function S() {
256
+ if (p = !1, requestAnimationFrame(() => p = !0), !e.target.value || !e.contentEl.value) return;
257
+ const u = mt(e.target.value), c = Nt(e.contentEl.value, e.isRtl.value), x = J(e.contentEl.value), A = 12;
258
+ x.length || (x.push(document.documentElement), e.contentEl.value.style.top && e.contentEl.value.style.left || (c.x -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x") || 0), c.y -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y") || 0)));
259
+ const h = x.reduce((E, g) => {
260
+ const f = g.getBoundingClientRect(), v = new oe({
261
+ x: g === document.documentElement ? 0 : f.x,
262
+ y: g === document.documentElement ? 0 : f.y,
263
+ width: g.clientWidth,
264
+ height: g.clientHeight
265
+ });
266
+ return E ? new oe({
267
+ x: Math.max(E.left, v.left),
268
+ y: Math.max(E.top, v.top),
269
+ width: Math.min(E.right, v.right) - Math.max(E.left, v.left),
270
+ height: Math.min(E.bottom, v.bottom) - Math.max(E.top, v.top)
271
+ }) : v;
272
+ }, void 0);
273
+ h.x += A, h.y += A, h.width -= A * 2, h.height -= A * 2;
274
+ let w = {
275
+ anchor: r.value,
276
+ origin: l.value
277
+ };
278
+ function H(E) {
279
+ const g = new oe(c), f = we(E.anchor, u), v = we(E.origin, g);
280
+ let {
281
+ x: M,
282
+ y: T
283
+ } = Bt(f, v);
284
+ switch (E.anchor.side) {
285
+ case "top":
286
+ T -= y.value[0];
287
+ break;
288
+ case "bottom":
289
+ T += y.value[0];
290
+ break;
291
+ case "left":
292
+ M -= y.value[0];
293
+ break;
294
+ case "right":
295
+ M += y.value[0];
296
+ break;
297
+ }
298
+ switch (E.anchor.align) {
299
+ case "top":
300
+ T -= y.value[1];
301
+ break;
302
+ case "bottom":
303
+ T += y.value[1];
304
+ break;
305
+ case "left":
306
+ M -= y.value[1];
307
+ break;
308
+ case "right":
309
+ M += y.value[1];
310
+ break;
311
+ }
312
+ return g.x += M, g.y += T, g.width = Math.min(g.width, d.value), g.height = Math.min(g.height, m.value), {
313
+ overflows: he(g, h),
314
+ x: M,
315
+ y: T
316
+ };
317
+ }
318
+ let B = 0, C = 0;
319
+ const i = {
320
+ x: 0,
321
+ y: 0
322
+ }, N = {
323
+ x: !1,
324
+ y: !1
325
+ };
326
+ let Q = -1;
327
+ for (; ; ) {
328
+ if (Q++ > 10) {
329
+ Ie("Infinite loop detected in connectedLocationStrategy");
330
+ break;
331
+ }
332
+ const {
333
+ x: E,
334
+ y: g,
335
+ overflows: f
336
+ } = H(w);
337
+ B += E, C += g, c.x += E, c.y += g;
338
+ {
339
+ const v = me(w.anchor), M = f.x.before || f.x.after, T = f.y.before || f.y.after;
340
+ let z = !1;
341
+ if (["x", "y"].forEach((O) => {
342
+ if (O === "x" && M && !N.x || O === "y" && T && !N.y) {
343
+ const R = {
344
+ anchor: {
345
+ ...w.anchor
346
+ },
347
+ origin: {
348
+ ...w.origin
349
+ }
350
+ }, G = O === "x" ? v === "y" ? ne : te : v === "y" ? te : ne;
351
+ R.anchor = G(R.anchor), R.origin = G(R.origin);
352
+ const {
353
+ overflows: V
354
+ } = H(R);
355
+ (V[O].before <= f[O].before && V[O].after <= f[O].after || V[O].before + V[O].after < (f[O].before + f[O].after) / 2) && (w = R, z = N[O] = !0);
356
+ }
357
+ }), z) continue;
358
+ }
359
+ f.x.before && (B += f.x.before, c.x += f.x.before), f.x.after && (B -= f.x.after, c.x -= f.x.after), f.y.before && (C += f.y.before, c.y += f.y.before), f.y.after && (C -= f.y.after, c.y -= f.y.after);
360
+ {
361
+ const v = he(c, h);
362
+ i.x = h.width - v.x.before - v.x.after, i.y = h.height - v.y.before - v.y.after, B += v.x.before, c.x += v.x.before, C += v.y.before, c.y += v.y.before;
363
+ }
364
+ break;
365
+ }
366
+ const ee = me(w.anchor);
367
+ return Object.assign(n.value, {
368
+ "--v-overlay-anchor-origin": `${w.anchor.side} ${w.anchor.align}`,
369
+ transformOrigin: `${w.origin.side} ${w.origin.align}`,
370
+ // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
371
+ top: F(re(C)),
372
+ left: e.isRtl.value ? void 0 : F(re(B)),
373
+ right: e.isRtl.value ? F(re(-B)) : void 0,
374
+ minWidth: F(ee === "y" ? Math.min(a.value, u.width) : a.value),
375
+ maxWidth: F(Ee(ye(i.x, a.value === 1 / 0 ? 0 : a.value, d.value))),
376
+ maxHeight: F(Ee(ye(i.y, s.value === 1 / 0 ? 0 : s.value, m.value)))
377
+ }), {
378
+ available: i,
379
+ contentBox: c
380
+ };
381
+ }
382
+ return L(() => [r.value, l.value, t.offset, t.minWidth, t.minHeight, t.maxWidth, t.maxHeight], () => S()), ce(() => {
383
+ const u = S();
384
+ if (!u) return;
385
+ const {
386
+ available: c,
387
+ contentBox: x
388
+ } = u;
389
+ x.height > c.y && requestAnimationFrame(() => {
390
+ S(), requestAnimationFrame(() => {
391
+ S();
392
+ });
393
+ });
394
+ }), {
395
+ updateLocation: S
396
+ };
397
+ }
398
+ function re(e) {
399
+ return Math.round(e * devicePixelRatio) / devicePixelRatio;
400
+ }
401
+ function Ee(e) {
402
+ return Math.ceil(e * devicePixelRatio) / devicePixelRatio;
403
+ }
404
+ let ie = !0;
405
+ const K = [];
406
+ function Ht(e) {
407
+ !ie || K.length ? (K.push(e), le()) : (ie = !1, e(), le());
408
+ }
409
+ let Se = -1;
410
+ function le() {
411
+ cancelAnimationFrame(Se), Se = requestAnimationFrame(() => {
412
+ const e = K.shift();
413
+ e && e(), K.length ? le() : ie = !0;
414
+ });
415
+ }
416
+ const Re = {
417
+ none: null,
418
+ close: Vt,
419
+ block: Wt,
420
+ reposition: qt
421
+ }, Dt = U({
422
+ scrollStrategy: {
423
+ type: [String, Function],
424
+ default: "block",
425
+ validator: (e) => typeof e == "function" || e in Re
426
+ }
427
+ }, "VOverlay-scroll-strategies");
428
+ function It(e, t) {
429
+ if (!q) return;
430
+ let n;
431
+ ue(async () => {
432
+ n?.stop(), t.isActive.value && e.scrollStrategy && (n = Pe(), await new Promise((o) => setTimeout(o)), n.active && n.run(() => {
433
+ typeof e.scrollStrategy == "function" ? e.scrollStrategy(t, e, n) : Re[e.scrollStrategy]?.(t, e, n);
434
+ }));
435
+ }), _(() => {
436
+ n?.stop();
437
+ });
438
+ }
439
+ function Vt(e) {
440
+ function t(n) {
441
+ e.isActive.value = !1;
442
+ }
443
+ Fe(e.targetEl.value ?? e.contentEl.value, t);
444
+ }
445
+ function Wt(e, t) {
446
+ const n = e.root.value?.offsetParent, o = [.../* @__PURE__ */ new Set([...J(e.targetEl.value, t.contained ? n : void 0), ...J(e.contentEl.value, t.contained ? n : void 0)])].filter((a) => !a.classList.contains("v-overlay-scroll-blocked")), r = window.innerWidth - document.documentElement.offsetWidth, l = ((a) => fe(a) && a)(n || document.documentElement);
447
+ l && e.root.value.classList.add("v-overlay--scroll-blocked"), o.forEach((a, s) => {
448
+ a.style.setProperty("--v-body-scroll-x", F(-a.scrollLeft)), a.style.setProperty("--v-body-scroll-y", F(-a.scrollTop)), a !== document.documentElement && a.style.setProperty("--v-scrollbar-offset", F(r)), a.classList.add("v-overlay-scroll-blocked");
449
+ }), _(() => {
450
+ o.forEach((a, s) => {
451
+ const d = parseFloat(a.style.getPropertyValue("--v-body-scroll-x")), m = parseFloat(a.style.getPropertyValue("--v-body-scroll-y")), y = a.style.scrollBehavior;
452
+ a.style.scrollBehavior = "auto", a.style.removeProperty("--v-body-scroll-x"), a.style.removeProperty("--v-body-scroll-y"), a.style.removeProperty("--v-scrollbar-offset"), a.classList.remove("v-overlay-scroll-blocked"), a.scrollLeft = -d, a.scrollTop = -m, a.style.scrollBehavior = y;
453
+ }), l && e.root.value.classList.remove("v-overlay--scroll-blocked");
454
+ });
455
+ }
456
+ function qt(e, t, n) {
457
+ let o = !1, r = -1, l = -1;
458
+ function a(s) {
459
+ Ht(() => {
460
+ const d = performance.now();
461
+ e.updateLocation.value?.(s), o = (performance.now() - d) / (1e3 / 60) > 2;
462
+ });
463
+ }
464
+ l = (typeof requestIdleCallback > "u" ? (s) => s() : requestIdleCallback)(() => {
465
+ n.run(() => {
466
+ Fe(e.targetEl.value ?? e.contentEl.value, (s) => {
467
+ o ? (cancelAnimationFrame(r), r = requestAnimationFrame(() => {
468
+ r = requestAnimationFrame(() => {
469
+ a(s);
470
+ });
471
+ })) : a(s);
472
+ });
473
+ });
474
+ }), _(() => {
475
+ typeof cancelIdleCallback < "u" && cancelIdleCallback(l), cancelAnimationFrame(r);
476
+ });
477
+ }
478
+ function Fe(e, t) {
479
+ const n = [document, ...J(e)];
480
+ n.forEach((o) => {
481
+ o.addEventListener("scroll", t, {
482
+ passive: !0
483
+ });
484
+ }), _(() => {
485
+ n.forEach((o) => {
486
+ o.removeEventListener("scroll", t);
487
+ });
488
+ });
489
+ }
490
+ const jt = Symbol.for("vuetify:v-menu"), zt = U({
491
+ closeDelay: [Number, String],
492
+ openDelay: [Number, String]
493
+ }, "delay");
494
+ function $t(e, t) {
495
+ let n = () => {
496
+ };
497
+ function o(a) {
498
+ n?.();
499
+ const s = Number(a ? e.openDelay : e.closeDelay);
500
+ return new Promise((d) => {
501
+ n = Ve(s, () => {
502
+ t?.(a), d(a);
503
+ });
504
+ });
505
+ }
506
+ function r() {
507
+ return o(!0);
508
+ }
509
+ function l() {
510
+ return o(!1);
511
+ }
512
+ return {
513
+ clearDelay: n,
514
+ runOpenDelay: r,
515
+ runCloseDelay: l
516
+ };
517
+ }
518
+ const Yt = U({
519
+ target: [String, Object],
520
+ activator: [String, Object],
521
+ activatorProps: {
522
+ type: Object,
523
+ default: () => ({})
524
+ },
525
+ openOnClick: {
526
+ type: Boolean,
527
+ default: void 0
528
+ },
529
+ openOnHover: Boolean,
530
+ openOnFocus: {
531
+ type: Boolean,
532
+ default: void 0
533
+ },
534
+ closeOnContentClick: Boolean,
535
+ ...zt()
536
+ }, "VOverlay-activator");
537
+ function Ut(e, t) {
538
+ let {
539
+ isActive: n,
540
+ isTop: o
541
+ } = t;
542
+ const r = pe("useActivator"), l = I();
543
+ let a = !1, s = !1, d = !0;
544
+ const m = P(() => e.openOnFocus || e.openOnFocus == null && e.openOnHover), y = P(() => e.openOnClick || e.openOnClick == null && !e.openOnHover && !m.value), {
545
+ runOpenDelay: p,
546
+ runCloseDelay: k
547
+ } = $t(e, (i) => {
548
+ i === (e.openOnHover && a || m.value && s) && !(e.openOnHover && n.value && !o.value) && (n.value !== i && (d = !0), n.value = i);
549
+ }), S = I(), u = {
550
+ onClick: (i) => {
551
+ i.stopPropagation(), l.value = i.currentTarget || i.target, n.value || (S.value = [i.clientX, i.clientY]), n.value = !n.value;
552
+ },
553
+ onMouseenter: (i) => {
554
+ i.sourceCapabilities?.firesTouchEvents || (a = !0, l.value = i.currentTarget || i.target, p());
555
+ },
556
+ onMouseleave: (i) => {
557
+ a = !1, k();
558
+ },
559
+ onFocus: (i) => {
560
+ We(i.target, ":focus-visible") !== !1 && (s = !0, i.stopPropagation(), l.value = i.currentTarget || i.target, p());
561
+ },
562
+ onBlur: (i) => {
563
+ s = !1, i.stopPropagation(), k();
564
+ }
565
+ }, c = P(() => {
566
+ const i = {};
567
+ return y.value && (i.onClick = u.onClick), e.openOnHover && (i.onMouseenter = u.onMouseenter, i.onMouseleave = u.onMouseleave), m.value && (i.onFocus = u.onFocus, i.onBlur = u.onBlur), i;
568
+ }), x = P(() => {
569
+ const i = {};
570
+ if (e.openOnHover && (i.onMouseenter = () => {
571
+ a = !0, p();
572
+ }, i.onMouseleave = () => {
573
+ a = !1, k();
574
+ }), m.value && (i.onFocusin = () => {
575
+ s = !0, p();
576
+ }, i.onFocusout = () => {
577
+ s = !1, k();
578
+ }), e.closeOnContentClick) {
579
+ const N = Ce(jt, null);
580
+ i.onClick = () => {
581
+ n.value = !1, N?.closeParents();
582
+ };
583
+ }
584
+ return i;
585
+ }), A = P(() => {
586
+ const i = {};
587
+ return e.openOnHover && (i.onMouseenter = () => {
588
+ d && (a = !0, d = !1, p());
589
+ }, i.onMouseleave = () => {
590
+ a = !1, k();
591
+ }), i;
592
+ });
593
+ L(o, (i) => {
594
+ i && (e.openOnHover && !a && (!m.value || !s) || m.value && !s && (!e.openOnHover || !a)) && (n.value = !1);
595
+ }), L(n, (i) => {
596
+ i || setTimeout(() => {
597
+ S.value = void 0;
598
+ });
599
+ }, {
600
+ flush: "post"
601
+ });
602
+ const h = ge();
603
+ ue(() => {
604
+ h.value && ce(() => {
605
+ l.value = h.el;
606
+ });
607
+ });
608
+ const w = ge(), H = P(() => e.target === "cursor" && S.value ? S.value : w.value ? w.el : Ne(e.target, r) || l.value), B = P(() => Array.isArray(H.value) ? void 0 : H.value);
609
+ let C;
610
+ return L(() => !!e.activator, (i) => {
611
+ i && q ? (C = Pe(), C.run(() => {
612
+ Gt(e, r, {
613
+ activatorEl: l,
614
+ activatorEvents: c
615
+ });
616
+ })) : C && C.stop();
617
+ }, {
618
+ flush: "post",
619
+ immediate: !0
620
+ }), _(() => {
621
+ C?.stop();
622
+ }), {
623
+ activatorEl: l,
624
+ activatorRef: h,
625
+ target: H,
626
+ targetEl: B,
627
+ targetRef: w,
628
+ activatorEvents: c,
629
+ contentEvents: x,
630
+ scrimEvents: A
631
+ };
632
+ }
633
+ function Gt(e, t, n) {
634
+ let {
635
+ activatorEl: o,
636
+ activatorEvents: r
637
+ } = n;
638
+ L(() => e.activator, (d, m) => {
639
+ if (m && d !== m) {
640
+ const y = s(m);
641
+ y && a(y);
642
+ }
643
+ d && ce(() => l());
644
+ }, {
645
+ immediate: !0
646
+ }), L(() => e.activatorProps, () => {
647
+ l();
648
+ }), _(() => {
649
+ a();
650
+ });
651
+ function l() {
652
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : s(), m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.activatorProps;
653
+ d && kt(d, W(r.value, m));
654
+ }
655
+ function a() {
656
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : s(), m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.activatorProps;
657
+ d && Ot(d, W(r.value, m));
658
+ }
659
+ function s() {
660
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activator;
661
+ const m = Ne(d, t);
662
+ return o.value = m?.nodeType === Node.ELEMENT_NODE ? m : void 0, o.value;
663
+ }
664
+ }
665
+ function Ne(e, t) {
666
+ if (!e) return;
667
+ let n;
668
+ if (e === "parent") {
669
+ let o = t?.proxy?.$el?.parentNode;
670
+ for (; o?.hasAttribute("data-no-activator"); )
671
+ o = o.parentNode;
672
+ n = o;
673
+ } else typeof e == "string" ? n = document.querySelector(e) : "$el" in e ? n = e.$el : n = e;
674
+ return n;
675
+ }
676
+ function Xt() {
677
+ if (!q) return Y(!1);
678
+ const {
679
+ ssr: e
680
+ } = qe();
681
+ if (e) {
682
+ const t = Y(!1);
683
+ return je(() => {
684
+ t.value = !0;
685
+ }), t;
686
+ } else
687
+ return Y(!0);
688
+ }
689
+ const xe = Symbol.for("vuetify:stack"), $ = Ae([]);
690
+ function Zt(e, t, n) {
691
+ const o = pe("useStack"), r = !n, l = Ce(xe, void 0), a = Ae({
692
+ activeChildren: /* @__PURE__ */ new Set()
693
+ });
694
+ ze(xe, a);
695
+ const s = Y(+t.value);
696
+ se(e, () => {
697
+ const y = $.at(-1)?.[1];
698
+ s.value = y ? y + 10 : +t.value, r && $.push([o.uid, s.value]), l?.activeChildren.add(o.uid), _(() => {
699
+ if (r) {
700
+ const p = Ye($).findIndex((k) => k[0] === o.uid);
701
+ $.splice(p, 1);
702
+ }
703
+ l?.activeChildren.delete(o.uid);
704
+ });
705
+ });
706
+ const d = Y(!0);
707
+ r && ue(() => {
708
+ const y = $.at(-1)?.[0] === o.uid;
709
+ setTimeout(() => d.value = y);
710
+ });
711
+ const m = P(() => !a.activeChildren.size);
712
+ return {
713
+ globalTop: $e(d),
714
+ localTop: m,
715
+ stackStyles: P(() => ({
716
+ zIndex: s.value
717
+ }))
718
+ };
719
+ }
720
+ function Jt(e) {
721
+ return {
722
+ teleportTarget: P(() => {
723
+ const n = e();
724
+ if (n === !0 || !q) return;
725
+ const o = n === !1 ? document.body : typeof n == "string" ? document.querySelector(n) : n;
726
+ if (o == null) {
727
+ Ue(`Unable to locate target ${n}`);
728
+ return;
729
+ }
730
+ let r = o.querySelector(":scope > .v-overlay-container");
731
+ return r || (r = document.createElement("div"), r.className = "v-overlay-container", o.appendChild(r)), r;
732
+ })
733
+ };
734
+ }
735
+ function Kt(e) {
736
+ const {
737
+ modelValue: t,
738
+ color: n,
739
+ ...o
740
+ } = e;
741
+ return D(vt, {
742
+ name: "fade-transition",
743
+ appear: !0
744
+ }, {
745
+ default: () => [e.modelValue && D("div", W({
746
+ class: ["v-overlay__scrim", e.color.backgroundColorClasses.value],
747
+ style: e.color.backgroundColorStyles.value
748
+ }, o), null)]
749
+ });
750
+ }
751
+ const Qt = U({
752
+ absolute: Boolean,
753
+ attach: [Boolean, String, Object],
754
+ closeOnBack: {
755
+ type: Boolean,
756
+ default: !0
757
+ },
758
+ contained: Boolean,
759
+ contentClass: null,
760
+ contentProps: null,
761
+ disabled: Boolean,
762
+ opacity: [Number, String],
763
+ noClickAnimation: Boolean,
764
+ modelValue: Boolean,
765
+ persistent: Boolean,
766
+ scrim: {
767
+ type: [Boolean, String],
768
+ default: !0
769
+ },
770
+ zIndex: {
771
+ type: [Number, String],
772
+ default: 2e3
773
+ },
774
+ ...Yt(),
775
+ ...Ge(),
776
+ ...Xe(),
777
+ ...gt(),
778
+ ...Mt(),
779
+ ...Dt(),
780
+ ...Ze(),
781
+ ...St()
782
+ }, "VOverlay"), on = Je()({
783
+ name: "VOverlay",
784
+ directives: {
785
+ ClickOutside: Lt
786
+ },
787
+ inheritAttrs: !1,
788
+ props: {
789
+ _disableGlobalStack: Boolean,
790
+ ...Qt()
791
+ },
792
+ emits: {
793
+ "click:outside": (e) => !0,
794
+ "update:modelValue": (e) => !0,
795
+ afterEnter: () => !0,
796
+ afterLeave: () => !0
797
+ },
798
+ setup(e, t) {
799
+ let {
800
+ slots: n,
801
+ attrs: o,
802
+ emit: r
803
+ } = t;
804
+ const l = Ke(e, "modelValue"), a = P({
805
+ get: () => l.value,
806
+ set: (b) => {
807
+ b && e.disabled || (l.value = b);
808
+ }
809
+ }), {
810
+ themeClasses: s
811
+ } = Qe(e), {
812
+ rtlClasses: d,
813
+ isRtl: m
814
+ } = et(), {
815
+ hasContent: y,
816
+ onAfterLeave: p
817
+ } = ht(e, a), k = tt(P(() => typeof e.scrim == "string" ? e.scrim : null)), {
818
+ globalTop: S,
819
+ localTop: u,
820
+ stackStyles: c
821
+ } = Zt(a, nt(e, "zIndex"), e._disableGlobalStack), {
822
+ activatorEl: x,
823
+ activatorRef: A,
824
+ target: h,
825
+ targetEl: w,
826
+ targetRef: H,
827
+ activatorEvents: B,
828
+ contentEvents: C,
829
+ scrimEvents: i
830
+ } = Ut(e, {
831
+ isActive: a,
832
+ isTop: u
833
+ }), {
834
+ teleportTarget: N
835
+ } = Jt(() => {
836
+ const b = e.attach || e.contained;
837
+ if (b) return b;
838
+ const j = x?.value?.getRootNode();
839
+ return j instanceof ShadowRoot ? j : !1;
840
+ }), {
841
+ dimensionStyles: Q
842
+ } = ot(e), ee = Xt(), {
843
+ scopeId: E
844
+ } = bt();
845
+ L(() => e.disabled, (b) => {
846
+ b && (a.value = !1);
847
+ });
848
+ const g = I(), f = I(), v = I(), {
849
+ contentStyles: M,
850
+ updateLocation: T
851
+ } = Rt(e, {
852
+ isRtl: m,
853
+ contentEl: v,
854
+ target: h,
855
+ isActive: a
856
+ });
857
+ It(e, {
858
+ root: g,
859
+ contentEl: v,
860
+ targetEl: w,
861
+ isActive: a,
862
+ updateLocation: T
863
+ });
864
+ function z(b) {
865
+ r("click:outside", b), e.persistent ? X() : a.value = !1;
866
+ }
867
+ function O(b) {
868
+ return a.value && S.value && // If using scrim, only close if clicking on it rather than anything opened on top
869
+ (!e.scrim || b.target === f.value);
870
+ }
871
+ q && L(a, (b) => {
872
+ b ? window.addEventListener("keydown", R) : window.removeEventListener("keydown", R);
873
+ }, {
874
+ immediate: !0
875
+ }), at(() => {
876
+ q && window.removeEventListener("keydown", R);
877
+ });
878
+ function R(b) {
879
+ b.key === "Escape" && S.value && (e.persistent ? X() : (a.value = !1, v.value?.contains(document.activeElement) && x.value?.focus()));
880
+ }
881
+ const G = rt();
882
+ se(() => e.closeOnBack, () => {
883
+ dt(G, (b) => {
884
+ S.value && a.value ? (b(!1), e.persistent ? X() : a.value = !1) : b();
885
+ });
886
+ });
887
+ const V = I();
888
+ L(() => a.value && (e.absolute || e.contained) && N.value == null, (b) => {
889
+ if (b) {
890
+ const j = Pt(g.value);
891
+ j && j !== document.scrollingElement && (V.value = j.scrollTop);
892
+ }
893
+ });
894
+ function X() {
895
+ e.noClickAnimation || v.value && wt(v.value, [{
896
+ transformOrigin: "center"
897
+ }, {
898
+ transform: "scale(1.03)"
899
+ }, {
900
+ transformOrigin: "center"
901
+ }], {
902
+ duration: 150,
903
+ easing: Et
904
+ });
905
+ }
906
+ function _e() {
907
+ r("afterEnter");
908
+ }
909
+ function He() {
910
+ p(), r("afterLeave");
911
+ }
912
+ return it(() => D(ft, null, [n.activator?.({
913
+ isActive: a.value,
914
+ targetRef: H,
915
+ props: W({
916
+ ref: A
917
+ }, B.value, e.activatorProps)
918
+ }), ee.value && y.value && D(lt, {
919
+ disabled: !N.value,
920
+ to: N.value
921
+ }, {
922
+ default: () => [D("div", W({
923
+ class: ["v-overlay", {
924
+ "v-overlay--absolute": e.absolute || e.contained,
925
+ "v-overlay--active": a.value,
926
+ "v-overlay--contained": e.contained
927
+ }, s.value, d.value, e.class],
928
+ style: [c.value, {
929
+ "--v-overlay-opacity": e.opacity,
930
+ top: F(V.value)
931
+ }, e.style],
932
+ ref: g
933
+ }, E, o), [D(Kt, W({
934
+ color: k,
935
+ modelValue: a.value && !!e.scrim,
936
+ ref: f
937
+ }, i.value), null), D(xt, {
938
+ appear: !0,
939
+ persisted: !0,
940
+ transition: e.transition,
941
+ target: h.value,
942
+ onAfterEnter: _e,
943
+ onAfterLeave: He
944
+ }, {
945
+ default: () => [st(D("div", W({
946
+ ref: v,
947
+ class: ["v-overlay__content", e.contentClass],
948
+ style: [Q.value, M.value]
949
+ }, C.value, e.contentProps), [n.default?.({
950
+ isActive: a
951
+ })]), [[ct, a.value], [ut("click-outside"), {
952
+ handler: z,
953
+ closeConditional: O,
954
+ include: () => [x.value]
955
+ }]])]
956
+ })])]
957
+ })])), {
958
+ activatorEl: x,
959
+ scrimEl: f,
960
+ target: h,
961
+ animateClick: X,
962
+ contentEl: v,
963
+ globalTop: S,
964
+ localTop: u,
965
+ updateLocation: T
966
+ };
967
+ }
968
+ });
969
+ export {
970
+ on as V,
971
+ Qt as m
972
+ };