@eodash/eodash 5.6.1 → 5.7.1

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 (133) hide show
  1. package/core/client/components/DashboardLayout.vue +1 -1
  2. package/core/client/components/EodashOverlay.vue +27 -4
  3. package/core/client/composables/DefineEodash.js +0 -1
  4. package/core/client/composables/DefineWidgets.js +3 -1
  5. package/core/client/composables/index.js +6 -2
  6. package/core/client/eodashSTAC/EodashCollection.js +79 -45
  7. package/core/client/eodashSTAC/cql.js +64 -0
  8. package/core/client/eodashSTAC/createLayers.js +192 -125
  9. package/core/client/eodashSTAC/helpers.js +423 -97
  10. package/core/client/eodashSTAC/mosaic.js +416 -0
  11. package/core/client/plugins/axios.js +31 -1
  12. package/core/client/store/actions.js +1 -1
  13. package/core/client/store/stac.js +25 -4
  14. package/core/client/store/states.js +20 -2
  15. package/core/client/types.ts +155 -29
  16. package/core/client/utils/bands-editor/exampleSchema.json +50 -50
  17. package/core/client/utils/index.js +4 -0
  18. package/core/client/utils/states.js +10 -0
  19. package/dist/client/{DashboardLayout-CqMb7OXc.js → DashboardLayout-ePbdvUTE.js} +5 -5
  20. package/dist/client/{DynamicWebComponent-DqKqTf7l.js → DynamicWebComponent-g5SdRbjY.js} +1 -1
  21. package/dist/client/{EodashChart-PkUQfH0k.js → EodashChart-ChrkA5oS.js} +7 -6
  22. package/dist/client/{EodashDatePicker-DLJGdTtX.js → EodashDatePicker-CY1TrsDo.js} +3 -3
  23. package/dist/client/{EodashItemFilter-Dk8KjFcX.js → EodashItemFilter-DzshHDlS.js} +2 -1
  24. package/dist/client/{EodashLayerControl-CC1Cogrn.js → EodashLayerControl-DMCeMkSd.js} +70 -22
  25. package/dist/client/{EodashLayoutSwitcher-5WZYd6rr.js → EodashLayoutSwitcher-iJ8mX1rF.js} +3 -3
  26. package/dist/client/EodashMapBtns-C7Cr7q5Y.js +592 -0
  27. package/dist/client/EodashStacInfo-K7-iuXa7.js +169 -0
  28. package/dist/client/{EodashTools-CGZtTh45.js → EodashTools-BEK7e7JM.js} +4 -4
  29. package/dist/client/{ExportState-Ce0ZnrX_.js → ExportState-CqIzfMYQ.js} +6 -168
  30. package/dist/client/{Footer-CnZqEiop.js → Footer-1P0cmBOZ.js} +1 -1
  31. package/dist/client/{Header-Dr5PBIm8.js → Header-CkkBaBNh.js} +2 -2
  32. package/dist/client/MobileLayout-BPf49kDU.js +118 -0
  33. package/dist/client/{PopUp-DjvE_71e.js → PopUp-DPZq5SWI.js} +4 -168
  34. package/dist/client/{ProcessList-kf3olI7W.js → ProcessList-DuI6WpS1.js} +5 -5
  35. package/dist/client/VDivider-Bj9LG_JV.js +168 -0
  36. package/dist/client/{VImg-Bj6uWt6j.js → VImg-Ddv5OyMz.js} +2 -2
  37. package/dist/client/{VMain-Cm0UmKGi.js → VMain-7yqk_qC3.js} +1 -1
  38. package/dist/client/{VTooltip-DbBu-ky3.js → VTooltip-2hAJyEoa.js} +2 -2
  39. package/dist/client/{WidgetsContainer-CfLnd44U.js → WidgetsContainer-2DOrlwCB.js} +1 -1
  40. package/dist/client/{asWebComponent-DfULAbpq.js → asWebComponent-BlFN2lkB.js} +493 -335
  41. package/dist/client/{async-CIbKXEEe.js → async-B2H8ZwUK.js} +21 -10
  42. package/dist/client/create-layers-config-u_vn5hPk.js +182 -0
  43. package/dist/client/dialog-transition-BrMkMiNa.js +170 -0
  44. package/dist/client/eo-dash.js +1 -1
  45. package/dist/client/{forwardRefs-yj3VWOK5.js → forwardRefs-DAlror6d.js} +8 -87
  46. package/dist/client/{handling-s8xt2JwF.js → handling-B6I1V5eG.js} +123 -85
  47. package/dist/client/{helpers-DAVGYl_f.js → helpers-CBqIUSXJ.js} +3034 -1649
  48. package/dist/client/index-BWq1ZKaV.js +3168 -0
  49. package/dist/client/{index-CYz6dT7K.js → index-CJ9UI3ln.js} +2 -2
  50. package/dist/client/index-DXLz4sFR.js +442 -0
  51. package/dist/client/{index-4TrjfJ32.js → index-DhKU6KqM.js} +230 -231
  52. package/dist/client/{index-Bu8BMA9q.js → index-DjQlbWbJ.js} +70 -83
  53. package/dist/client/material-symbols-outlined.woff2 +0 -0
  54. package/dist/client/material-symbols-rounded.woff2 +0 -0
  55. package/dist/client/material-symbols-sharp.woff2 +0 -0
  56. package/dist/client/material-symbols-subset.woff2 +0 -0
  57. package/dist/client/mosaic-BFYLEwyx.js +455 -0
  58. package/dist/client/templates.js +250 -119
  59. package/dist/client/{transition-DaOsiD4u.js → transition-D_W6Wn9v.js} +1 -1
  60. package/dist/node/cli.js +5 -5
  61. package/dist/node/types.d.ts +4 -0
  62. package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
  63. package/dist/types/core/client/composables/index.d.ts +1 -3
  64. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +62 -31
  65. package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
  66. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +44 -25
  67. package/dist/types/core/client/eodashSTAC/helpers.d.ts +78 -18
  68. package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
  69. package/dist/types/core/client/store/stac.d.ts +31 -7
  70. package/dist/types/core/client/store/states.d.ts +24 -2
  71. package/dist/types/core/client/types.d.ts +131 -25
  72. package/dist/types/core/client/utils/states.d.ts +12 -0
  73. package/dist/types/templates/baseConfig.d.ts +1 -88
  74. package/dist/types/templates/compare.d.ts +32 -3
  75. package/dist/types/templates/expert.d.ts +18 -0
  76. package/dist/types/templates/explore.d.ts +9 -1
  77. package/dist/types/templates/lite.d.ts +11 -0
  78. package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
  79. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
  80. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
  81. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
  82. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
  83. package/dist/types/widgets/EodashLayerControl.vue.d.ts +36 -17
  84. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +23 -10
  85. package/dist/types/widgets/EodashMap/index.vue.d.ts +91 -35
  86. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -8
  87. package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
  88. package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
  89. package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
  90. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -1
  91. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +13 -8
  92. package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
  93. package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
  94. package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +54 -0
  95. package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +34 -0
  96. package/dist/types/widgets/EodashTimeSlider/types.d.ts +52 -0
  97. package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
  98. package/package.json +46 -46
  99. package/templates/baseConfig.js +36 -6
  100. package/templates/compare.js +62 -7
  101. package/templates/expert.js +23 -0
  102. package/templates/explore.js +11 -5
  103. package/templates/lite.js +14 -0
  104. package/widgets/EodashChart.vue +1 -0
  105. package/widgets/EodashItemCatalog/index.vue +363 -35
  106. package/widgets/EodashItemCatalog/methods/filters.js +134 -70
  107. package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
  108. package/widgets/EodashItemCatalog/methods/map.js +142 -28
  109. package/widgets/EodashLayerControl.vue +64 -14
  110. package/widgets/EodashMap/EodashMapBtns.vue +153 -47
  111. package/widgets/EodashMap/index.vue +101 -105
  112. package/widgets/EodashMap/methods/btns.js +37 -5
  113. package/widgets/EodashMap/methods/create-layers-config.js +18 -16
  114. package/widgets/EodashMap/methods/index.js +89 -8
  115. package/widgets/EodashMap/methods/use-map-loading.js +52 -0
  116. package/widgets/EodashProcess/index.vue +2 -1
  117. package/widgets/EodashProcess/methods/async.js +19 -8
  118. package/widgets/EodashProcess/methods/composables.js +63 -77
  119. package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +9 -5
  120. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +7 -4
  121. package/widgets/EodashProcess/methods/handling.js +105 -72
  122. package/widgets/EodashProcess/states.js +1 -1
  123. package/widgets/EodashStacInfo.vue +64 -2
  124. package/widgets/EodashTimeSlider/index.vue +208 -0
  125. package/widgets/EodashTimeSlider/methods/index.js +236 -0
  126. package/widgets/EodashTimeSlider/types.ts +54 -0
  127. package/dist/client/EodashMapBtns-BHrSDNoC.js +0 -435
  128. package/dist/client/EodashStacInfo-B90wobPc.js +0 -107
  129. package/dist/client/EodashTimeSlider-5vm7F3ju.js +0 -53
  130. package/dist/client/MobileLayout-DyMjaeif.js +0 -118
  131. package/dist/client/index-CugS__t5.js +0 -570
  132. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +0 -15
  133. package/widgets/EodashTimeSlider.vue +0 -40
@@ -1,5 +1,5 @@
1
- import { t as replaceLayer, b as extractLayerConfig, x as extractLayerLegend, m as mergeGeojsons, d as axios, w as getCompareLayers, v as getLayers, $ as axios$1, I as compareIndicator, F as indicator } from './helpers-DAVGYl_f.js';
2
- import { S as useEmitLayersUpdate } from './asWebComponent-DfULAbpq.js';
1
+ import { y as replaceLayer, d as extractLayerConfig, C as extractLayerLegend, m as mergeGeojsons, f as axios, ab as getCompareLayers, B as getLayers, ae as axios$1, Q as compareIndicator, M as indicator } from './helpers-CBqIUSXJ.js';
2
+ import { aa as useEmitLayersUpdate } from './asWebComponent-BlFN2lkB.js';
3
3
  import { isMulti } from '@eox/jsonform/src/custom-inputs/spatial/utils';
4
4
  import log from 'loglevel';
5
5
 
@@ -649,16 +649,27 @@ async function updateJobsStatus(jobs, indicator) {
649
649
  jobsUrls.map((url) =>
650
650
  axios$1
651
651
  .get(url, { params: { t: Date.now() } })
652
- .then((response) => response.data),
652
+ .then((response) => response.data)
653
+ .catch((error) => {
654
+ if (axios$1.isAxiosError(error)) {
655
+ console.warn(
656
+ `Job URL not accessible: ${url}. Maybe was deleted from the processing endpoint or endpoint is unavailable. Skipping...`,
657
+ );
658
+ return null;
659
+ }
660
+ throw error;
661
+ }),
653
662
  ),
654
663
  );
655
- jobResults.sort((a, b) => {
656
- return (
657
- new Date(b.job_start_datetime).getTime() -
658
- new Date(a.job_start_datetime).getTime()
659
- );
660
- });
661
- jobs.value.splice(0, jobs.value.length, ...jobResults);
664
+ const validResults = jobResults
665
+ .filter((job) => job !== null)
666
+ .sort((a, b) => {
667
+ return (
668
+ new Date(b.job_start_datetime).getTime() -
669
+ new Date(a.job_start_datetime).getTime()
670
+ );
671
+ });
672
+ jobs.value.splice(0, jobs.value.length, ...validResults);
662
673
  }
663
674
 
664
675
  /**
@@ -0,0 +1,182 @@
1
+ import { ah as EodashCollection } from './asWebComponent-BlFN2lkB.js';
2
+ import log from 'loglevel';
3
+
4
+ /**
5
+ * Creates full layer configuration from indicator and time information
6
+ * @param {import("stac-ts").StacCatalog
7
+ * | import("stac-ts").StacCollection
8
+ * | import("stac-ts").StacItem
9
+ * | null
10
+ * } selectedIndicator
11
+ * @param {EodashCollection[]} eodashCols
12
+ * @param {string | import("stac-ts").StacItem | null} [timeOrItem] - time as a string, or a stac item
13
+ * @param {Record<string, any>[]} [defaultBaseLayers] - Optional default baselayers to use if the indicator does not provide any
14
+ * @returns {Promise<Record<string, any>[]>}
15
+ */
16
+
17
+ const createLayersConfig = async (
18
+ selectedIndicator,
19
+ eodashCols,
20
+ timeOrItem,
21
+ defaultBaseLayers = [],
22
+ ) => {
23
+ log.debug(
24
+ "Creating layers config",
25
+ selectedIndicator,
26
+ eodashCols,
27
+ timeOrItem,
28
+ );
29
+ const layersCollection = [];
30
+ const dataLayers = {
31
+ type: "Group",
32
+ properties: {
33
+ id: "AnalysisGroup",
34
+ title: "Data Layers",
35
+ layerControlExpand: true,
36
+ },
37
+ layers: /** @type {Record<string,any>[]}*/ ([]),
38
+ };
39
+
40
+ for (const ec of eodashCols) {
41
+ /** @type {Record<string,any>[]} */
42
+ let layers;
43
+ let dateOrItem;
44
+ if (timeOrItem) {
45
+ if (typeof timeOrItem === "string" && timeOrItem.includes("/")) {
46
+ dateOrItem = timeOrItem;
47
+ } else {
48
+ dateOrItem =
49
+ typeof timeOrItem === "string" ? new Date(timeOrItem) : timeOrItem;
50
+ }
51
+ layers = await ec.createLayersJson(/** @type {any} */ (dateOrItem));
52
+ } else {
53
+ layers = await ec.createLayersJson(undefined);
54
+ }
55
+
56
+ // Add expand to all analysis layers
57
+ layers.forEach((dl) => {
58
+ if (!dl.properties?.layerControlExclusive) {
59
+ dl.properties.layerControlExpand = true;
60
+ dl.properties.layerControlToolsExpand = true;
61
+ }
62
+ });
63
+ dataLayers.layers.push(...layers);
64
+ }
65
+
66
+ /* check for roles in indicator links to assign visibility property for the data layers */
67
+ if (selectedIndicator?.links) {
68
+ const visibilityLinks = selectedIndicator.links.filter(
69
+ (link) =>
70
+ Array.isArray(link.roles) &&
71
+ (link.roles.includes("disable") || link.roles.includes("hidden")),
72
+ );
73
+ if (visibilityLinks.length > 0) {
74
+ visibilityLinks.forEach((vl) => {
75
+ const targetLayerId = vl.id;
76
+ const targetLayer = dataLayers.layers.find(
77
+ (dl) => dl.properties.id.split(";:;")[0] === targetLayerId,
78
+ );
79
+ if (targetLayer) {
80
+ if (Array.isArray(vl.roles) && vl.roles.includes("disable")) {
81
+ targetLayer.properties.visible = false;
82
+ targetLayer.properties.layerControlExpand = false;
83
+ } else if (Array.isArray(vl.roles) && vl.roles.includes("hidden")) {
84
+ targetLayer.properties.layerControlHide = true;
85
+ }
86
+ }
87
+ });
88
+ }
89
+ }
90
+ layersCollection.push(dataLayers);
91
+ const indicatorLayers =
92
+ //@ts-expect-error indicator is collection
93
+ await EodashCollection.getIndicatorLayers(selectedIndicator);
94
+ const observationPointsLayer =
95
+ EodashCollection.getObservationPointsLayer(eodashCols);
96
+ if (observationPointsLayer) {
97
+ dataLayers.layers.push(observationPointsLayer);
98
+ }
99
+ const baseLayers = {
100
+ type: "Group",
101
+ properties: {
102
+ id: "BaseLayersGroup",
103
+ title: "Base Layers",
104
+ },
105
+ layers: /** @type {Record<string,any>[]}*/ ([]),
106
+ };
107
+
108
+ const indicatorBaseLayers = indicatorLayers.filter(
109
+ (l) => l.properties.group === "baselayer",
110
+ );
111
+
112
+ if (indicatorBaseLayers.length) {
113
+ // Only one baselayer can be set to visible, let's first set all to
114
+ // false that have not a dedicated property visible, then check
115
+ // if there are more then one visible and only allow one
116
+ let counter = 0;
117
+ let lastPos = 0;
118
+ for (let indx = 0; indx < indicatorBaseLayers.length; indx++) {
119
+ const bl = indicatorBaseLayers[indx];
120
+ if (!("visible" in bl.properties)) {
121
+ bl.properties.visible = false;
122
+ }
123
+
124
+ if (bl.properties.visible) {
125
+ counter++;
126
+ lastPos = indx;
127
+ }
128
+ }
129
+
130
+ // if none visible set the last one as visible
131
+ if (counter === 0) {
132
+ indicatorBaseLayers[0].properties.visible = true;
133
+ }
134
+
135
+ // disable all apart from last
136
+ if (counter > 0) {
137
+ indicatorBaseLayers.forEach((bl, indx) => {
138
+ if (indx !== lastPos) {
139
+ bl.properties.visible = false;
140
+ } else {
141
+ bl.properties.visible = true;
142
+ }
143
+ });
144
+ }
145
+
146
+ baseLayers.layers.push(...indicatorBaseLayers);
147
+
148
+ // Add exclusive to baselayers and make sure only one is selected
149
+ baseLayers.layers.forEach((bl) => {
150
+ bl.properties.layerControlExclusive = true;
151
+ });
152
+ } else {
153
+ // Default to some baselayer
154
+ baseLayers.layers.push(...defaultBaseLayers);
155
+ }
156
+
157
+ if (baseLayers.layers.length) {
158
+ layersCollection.unshift(baseLayers);
159
+ }
160
+
161
+ const overlayLayers = {
162
+ type: "Group",
163
+ properties: {
164
+ id: "OverlayGroup",
165
+ title: "Overlay Layers",
166
+ },
167
+ layers: /** @type {Record<string,any>[]}*/ ([]),
168
+ };
169
+
170
+ const indicatorOverlays = indicatorLayers.filter(
171
+ (l) => l.properties.group === "overlay",
172
+ );
173
+
174
+ if (indicatorOverlays.length) {
175
+ overlayLayers.layers.push(...indicatorOverlays);
176
+ layersCollection.push(overlayLayers);
177
+ }
178
+
179
+ return layersCollection;
180
+ };
181
+
182
+ export { createLayersConfig as c };
@@ -0,0 +1,170 @@
1
+ import { createVNode, Transition, mergeProps } from 'vue';
2
+ import { g as genericComponent, ar as PREFERS_REDUCED_MOTION, p as propsFactory, at as getTargetBox, au as acceleratedEasing, av as deceleratedEasing, aw as standardEasing } from './asWebComponent-BlFN2lkB.js';
3
+ import { b as animate, n as nullifyTransforms } from './forwardRefs-DAlror6d.js';
4
+
5
+ // Utilities
6
+ const makeVDialogTransitionProps = propsFactory({
7
+ target: [Object, Array]
8
+ }, 'v-dialog-transition');
9
+ const saved = new WeakMap();
10
+ const VDialogTransition = genericComponent()({
11
+ name: 'VDialogTransition',
12
+ props: makeVDialogTransitionProps(),
13
+ setup(props, _ref) {
14
+ let {
15
+ slots
16
+ } = _ref;
17
+ const functions = {
18
+ onBeforeEnter(el) {
19
+ el.style.pointerEvents = 'none';
20
+ el.style.visibility = 'hidden';
21
+ },
22
+ async onEnter(el, done) {
23
+ await new Promise(resolve => requestAnimationFrame(resolve));
24
+ await new Promise(resolve => requestAnimationFrame(resolve));
25
+ el.style.visibility = '';
26
+ const dimensions = getDimensions(props.target, el);
27
+ const {
28
+ x,
29
+ y,
30
+ sx,
31
+ sy,
32
+ speed
33
+ } = dimensions;
34
+ saved.set(el, dimensions);
35
+ if (PREFERS_REDUCED_MOTION()) {
36
+ animate(el, [{
37
+ opacity: 0
38
+ }, {}], {
39
+ duration: 125 * speed,
40
+ easing: deceleratedEasing
41
+ }).finished.then(() => done());
42
+ } else {
43
+ const animation = animate(el, [{
44
+ transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
45
+ opacity: 0
46
+ }, {}], {
47
+ duration: 225 * speed,
48
+ easing: deceleratedEasing
49
+ });
50
+ getChildren(el)?.forEach(el => {
51
+ animate(el, [{
52
+ opacity: 0
53
+ }, {
54
+ opacity: 0,
55
+ offset: 0.33
56
+ }, {}], {
57
+ duration: 225 * 2 * speed,
58
+ easing: standardEasing
59
+ });
60
+ });
61
+ animation.finished.then(() => done());
62
+ }
63
+ },
64
+ onAfterEnter(el) {
65
+ el.style.removeProperty('pointer-events');
66
+ },
67
+ onBeforeLeave(el) {
68
+ el.style.pointerEvents = 'none';
69
+ },
70
+ async onLeave(el, done) {
71
+ await new Promise(resolve => requestAnimationFrame(resolve));
72
+ let dimensions;
73
+ if (!saved.has(el) || Array.isArray(props.target) || props.target.offsetParent || props.target.getClientRects().length) {
74
+ dimensions = getDimensions(props.target, el);
75
+ } else {
76
+ dimensions = saved.get(el);
77
+ }
78
+ const {
79
+ x,
80
+ y,
81
+ sx,
82
+ sy,
83
+ speed
84
+ } = dimensions;
85
+ if (PREFERS_REDUCED_MOTION()) {
86
+ animate(el, [{}, {
87
+ opacity: 0
88
+ }], {
89
+ duration: 85 * speed,
90
+ easing: acceleratedEasing
91
+ }).finished.then(() => done());
92
+ } else {
93
+ const animation = animate(el, [{}, {
94
+ transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
95
+ opacity: 0
96
+ }], {
97
+ duration: 125 * speed,
98
+ easing: acceleratedEasing
99
+ });
100
+ animation.finished.then(() => done());
101
+ getChildren(el)?.forEach(el => {
102
+ animate(el, [{}, {
103
+ opacity: 0,
104
+ offset: 0.2
105
+ }, {
106
+ opacity: 0
107
+ }], {
108
+ duration: 125 * 2 * speed,
109
+ easing: standardEasing
110
+ });
111
+ });
112
+ }
113
+ },
114
+ onAfterLeave(el) {
115
+ el.style.removeProperty('pointer-events');
116
+ }
117
+ };
118
+ return () => {
119
+ return props.target ? createVNode(Transition, mergeProps({
120
+ "name": "dialog-transition"
121
+ }, functions, {
122
+ "css": false
123
+ }), slots) : createVNode(Transition, {
124
+ "name": "dialog-transition"
125
+ }, slots);
126
+ };
127
+ }
128
+ });
129
+
130
+ /** Animatable children (card, sheet, list) */
131
+ function getChildren(el) {
132
+ const els = el.querySelector(':scope > .v-card, :scope > .v-sheet, :scope > .v-list')?.children;
133
+ return els && [...els];
134
+ }
135
+ function getDimensions(target, el) {
136
+ const targetBox = getTargetBox(target);
137
+ const elBox = nullifyTransforms(el);
138
+ const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
139
+ const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
140
+ let offsetX = targetBox.left + targetBox.width / 2;
141
+ if (anchorSide === 'left' || anchorOffset === 'left') {
142
+ offsetX -= targetBox.width / 2;
143
+ } else if (anchorSide === 'right' || anchorOffset === 'right') {
144
+ offsetX += targetBox.width / 2;
145
+ }
146
+ let offsetY = targetBox.top + targetBox.height / 2;
147
+ if (anchorSide === 'top' || anchorOffset === 'top') {
148
+ offsetY -= targetBox.height / 2;
149
+ } else if (anchorSide === 'bottom' || anchorOffset === 'bottom') {
150
+ offsetY += targetBox.height / 2;
151
+ }
152
+ const tsx = targetBox.width / elBox.width;
153
+ const tsy = targetBox.height / elBox.height;
154
+ const maxs = Math.max(1, tsx, tsy);
155
+ const sx = tsx / maxs || 0;
156
+ const sy = tsy / maxs || 0;
157
+
158
+ // Animate elements larger than 12% of the screen area up to 1.5x slower
159
+ const asa = elBox.width * elBox.height / (window.innerWidth * window.innerHeight);
160
+ const speed = asa > 0.12 ? Math.min(1.5, (asa - 0.12) * 10 + 1) : 1;
161
+ return {
162
+ x: offsetX - (originX + elBox.left),
163
+ y: offsetY - (originY + elBox.top),
164
+ sx,
165
+ sy,
166
+ speed
167
+ };
168
+ }
169
+
170
+ export { VDialogTransition as V };
@@ -1,2 +1,2 @@
1
- export { aI as EodashConstructor, aJ as register, aK as store } from './asWebComponent-DfULAbpq.js';
1
+ export { aR as EodashConstructor, aS as register, aT as store } from './asWebComponent-BlFN2lkB.js';
2
2
  import 'vue';
@@ -1,84 +1,6 @@
1
1
  import { computed, watch, onScopeDispose, nextTick, ref, watchEffect, effectScope, inject, mergeProps, toRef, toValue, shallowRef, onMounted, reactive, provide, toRaw, readonly, warn, onBeforeUnmount, createElementVNode, Fragment, createVNode, Teleport, withDirectives, vShow, Transition } from 'vue';
2
- import { aq as isOn, ar as eventName, p as propsFactory, as as destructComputed, at as parseAnchor, au as flipSide, av as flipAlign, aw as flipCorner, ax as CircularBuffer, ay as deepEqual, a0 as consoleError, az as getAxis, q as convertToUnit, x as clamp, aA as IN_BROWSER, A as useToggleScope, aB as defer, al as getCurrentInstance, aC as templateRef, aD as matchesSelector, aE as focusableChildren, G as useDisplay, r as makeThemeProps, d as makeDimensionProps, e as makeComponentProps, g as genericComponent, z as useProxiedModel, l as provideTheme, n as useRtl, f as useBackgroundColor, b as useDimension, aF as useRouter, aG as useBackButton, ao as standardEasing, c as useRender, C as omit } from './asWebComponent-DfULAbpq.js';
3
- import { m as makeTransitionProps, M as MaybeTransition } from './transition-DaOsiD4u.js';
4
-
5
- class Box {
6
- constructor(args) {
7
- const pageScale = document.body.currentCSSZoom ?? 1;
8
- const isElement = args instanceof Element;
9
- const factor = isElement ? 1 + (1 - pageScale) / pageScale : 1;
10
- const {
11
- x,
12
- y,
13
- width,
14
- height
15
- } = isElement ? args.getBoundingClientRect() : args;
16
- this.x = x * factor;
17
- this.y = y * factor;
18
- this.width = width * factor;
19
- this.height = height * factor;
20
- }
21
- get top() {
22
- return this.y;
23
- }
24
- get bottom() {
25
- return this.y + this.height;
26
- }
27
- get left() {
28
- return this.x;
29
- }
30
- get right() {
31
- return this.x + this.width;
32
- }
33
- }
34
- function getOverflow(a, b) {
35
- return {
36
- x: {
37
- before: Math.max(0, b.left - a.left),
38
- after: Math.max(0, a.right - b.right)
39
- },
40
- y: {
41
- before: Math.max(0, b.top - a.top),
42
- after: Math.max(0, a.bottom - b.bottom)
43
- }
44
- };
45
- }
46
- function getTargetBox(target) {
47
- if (Array.isArray(target)) {
48
- const pageScale = document.body.currentCSSZoom ?? 1;
49
- const factor = 1 + (1 - pageScale) / pageScale;
50
- return new Box({
51
- x: target[0] * factor,
52
- y: target[1] * factor,
53
- width: 0 * factor,
54
- height: 0 * factor
55
- });
56
- } else {
57
- return new Box(target);
58
- }
59
- }
60
- function getElementBox(el) {
61
- if (el === document.documentElement) {
62
- if (!visualViewport) {
63
- return new Box({
64
- x: 0,
65
- y: 0,
66
- width: document.documentElement.clientWidth,
67
- height: document.documentElement.clientHeight
68
- });
69
- } else {
70
- const pageScale = document.body.currentCSSZoom ?? 1;
71
- return new Box({
72
- x: visualViewport.scale > 1 ? 0 : visualViewport.offsetLeft,
73
- y: visualViewport.scale > 1 ? 0 : visualViewport.offsetTop,
74
- width: visualViewport.width * visualViewport.scale / pageScale,
75
- height: visualViewport.height * visualViewport.scale / pageScale
76
- });
77
- }
78
- } else {
79
- return new Box(el);
80
- }
81
- }
2
+ import { ax as Box, ay as isOn, az as eventName, p as propsFactory, aA as destructComputed, aB as parseAnchor, aC as flipSide, aD as flipAlign, aE as flipCorner, aF as CircularBuffer, aG as deepEqual, at as getTargetBox, aH as getElementBox, O as consoleError, aI as getAxis, q as convertToUnit, aJ as getOverflow, x as clamp, aK as IN_BROWSER, A as useToggleScope, aL as defer, N as getCurrentInstance, aM as templateRef, aN as matchesSelector, a8 as focusableChildren, G as useDisplay, r as makeThemeProps, d as makeDimensionProps, e as makeComponentProps, g as genericComponent, z as useProxiedModel, l as provideTheme, n as useRtl, f as useBackgroundColor, b as useDimension, aO as useRouter, aP as useBackButton, aw as standardEasing, c as useRender, C as omit } from './asWebComponent-BlFN2lkB.js';
3
+ import { m as makeTransitionProps, M as MaybeTransition } from './transition-D_W6Wn9v.js';
82
4
 
83
5
  // Utilities
84
6
  /** @see https://stackoverflow.com/a/57876601/2074736 */
@@ -1161,7 +1083,7 @@ function useActivator(props, _ref) {
1161
1083
  });
1162
1084
  watch(isTop, val => {
1163
1085
  if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !contentEl.value?.contains(document.activeElement)) {
1164
- isActive.value = false;
1086
+ runCloseDelay();
1165
1087
  }
1166
1088
  });
1167
1089
  watch(isActive, val => {
@@ -1356,7 +1278,7 @@ function useFocusTrap(props, _ref2) {
1356
1278
  const after = e.target;
1357
1279
  document.removeEventListener('pointerdown', onPointerdown);
1358
1280
  document.removeEventListener('keydown', captureOnKeydown);
1359
- await nextTick();
1281
+ await new Promise(resolve => requestAnimationFrame(resolve));
1360
1282
  if (isActive.value && !focusTrapSuppressed && before !== after && contentEl.value &&
1361
1283
  // We're the menu without open submenus or overlays
1362
1284
  toValue(localTop) &&
@@ -1737,13 +1659,12 @@ const VOverlay = genericComponent()({
1737
1659
  }
1738
1660
  const router = useRouter();
1739
1661
  useToggleScope(() => props.closeOnBack, () => {
1740
- useBackButton(router, next => {
1662
+ useBackButton(router, () => {
1741
1663
  if (globalTop.value && isActive.value) {
1742
- next(false);
1743
1664
  if (!props.persistent) isActive.value = false;else animateClick();
1744
- } else {
1745
- next();
1665
+ return false;
1746
1666
  }
1667
+ return undefined;
1747
1668
  });
1748
1669
  });
1749
1670
  const top = ref();
@@ -1935,4 +1856,4 @@ function forwardRefs(target) {
1935
1856
  });
1936
1857
  }
1937
1858
 
1938
- export { VOverlay as V, animate as a, forwardRefs as f, getTargetBox as g, makeVOverlayProps as m, nullifyTransforms as n, useScopeId as u };
1859
+ export { VMenuSymbol as V, VOverlay as a, animate as b, forwardRefs as f, makeVOverlayProps as m, nullifyTransforms as n, useScopeId as u };