@hotelinking/ui 5.37.3 → 5.37.4
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.
- package/dist/ui.es.js +631 -622
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as n, createElementBlock as a, createVNode as o, renderSlot as r, createElementVNode as i, ref as s, computed as u, unref as d, shallowRef as c, watch as p, triggerRef as g, onScopeDispose as m, inject as f, nextTick as v, watchEffect as h, onMounted as b, cloneVNode as y, h as x, Fragment as w, defineComponent as k, provide as S, reactive as C, onUnmounted as O, toRaw as M, getCurrentInstance as D, Teleport as
|
|
1
|
+
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as n, createElementBlock as a, createVNode as o, renderSlot as r, createElementVNode as i, ref as s, computed as u, unref as d, shallowRef as c, watch as p, triggerRef as g, onScopeDispose as m, inject as f, nextTick as v, watchEffect as h, onMounted as b, cloneVNode as y, h as x, Fragment as w, defineComponent as k, provide as S, reactive as C, onUnmounted as O, toRaw as M, getCurrentInstance as D, Teleport as E, withCtx as T, createTextVNode as I, toDisplayString as _, Transition as P, renderList as j, createCommentVNode as R, withDirectives as B, vModelDynamic as A, vShow as L, withModifiers as F, vModelText as N, createStaticVNode as z, resolveComponent as $, vModelCheckbox as V, isRef as H } from "vue";
|
|
2
2
|
import Y from "dayjs";
|
|
3
3
|
import U from "vue3-apexcharts";
|
|
4
4
|
import q from "vue3-draggable";
|
|
@@ -39,12 +39,17 @@ function ce(e2, t2) {
|
|
|
39
39
|
throw new Error("Unexpected undefined" + (t2 ? `: ${t2}` : ""));
|
|
40
40
|
return e2;
|
|
41
41
|
}
|
|
42
|
-
const pe = (e2
|
|
42
|
+
const pe = (e2, t2) => {
|
|
43
|
+
let l2;
|
|
44
|
+
return function(...n2) {
|
|
45
|
+
clearTimeout(l2), l2 = setTimeout(() => e2.apply(this, n2), t2);
|
|
46
|
+
};
|
|
47
|
+
}, ge = (e2) => e2, me = (e2) => {
|
|
43
48
|
const t2 = Math.max(e2.startIndex - e2.overscan, 0), l2 = Math.min(e2.endIndex + e2.overscan, e2.count - 1), n2 = [];
|
|
44
49
|
for (let e3 = t2; e3 <= l2; e3++)
|
|
45
50
|
n2.push(e3);
|
|
46
51
|
return n2;
|
|
47
|
-
},
|
|
52
|
+
}, fe = (e2, t2) => {
|
|
48
53
|
const l2 = e2.scrollElement;
|
|
49
54
|
if (!l2)
|
|
50
55
|
return;
|
|
@@ -67,17 +72,21 @@ const pe = (e2) => e2, ge = (e2) => {
|
|
|
67
72
|
return a2.observe(l2, { box: "border-box" }), () => {
|
|
68
73
|
a2.unobserve(l2);
|
|
69
74
|
};
|
|
70
|
-
},
|
|
75
|
+
}, ve = { passive: true }, he = "undefined" == typeof window || "onscrollend" in window, be = (e2, t2) => {
|
|
71
76
|
const l2 = e2.scrollElement;
|
|
72
77
|
if (!l2)
|
|
73
78
|
return;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
let n2 = 0;
|
|
80
|
+
const a2 = he ? () => {
|
|
81
|
+
} : pe(() => {
|
|
82
|
+
t2(n2, false);
|
|
83
|
+
}, 150), o2 = (o3) => () => {
|
|
84
|
+
n2 = l2[e2.options.horizontal ? "scrollLeft" : "scrollTop"], a2(), t2(n2, o3);
|
|
85
|
+
}, r2 = o2(true), i2 = o2(false);
|
|
86
|
+
return i2(), l2.addEventListener("scroll", r2, ve), l2.addEventListener("scrollend", i2, ve), () => {
|
|
87
|
+
l2.removeEventListener("scroll", r2), l2.removeEventListener("scrollend", i2);
|
|
79
88
|
};
|
|
80
|
-
},
|
|
89
|
+
}, ye = (e2, t2, l2) => {
|
|
81
90
|
if (null == t2 ? void 0 : t2.borderBoxSize) {
|
|
82
91
|
const e3 = t2.borderBoxSize[0];
|
|
83
92
|
if (e3) {
|
|
@@ -85,14 +94,14 @@ const pe = (e2) => e2, ge = (e2) => {
|
|
|
85
94
|
}
|
|
86
95
|
}
|
|
87
96
|
return Math.round(e2.getBoundingClientRect()[l2.options.horizontal ? "width" : "height"]);
|
|
88
|
-
},
|
|
97
|
+
}, xe = (e2, { adjustments: t2 = 0, behavior: l2 }, n2) => {
|
|
89
98
|
var a2, o2;
|
|
90
99
|
const r2 = e2 + t2;
|
|
91
100
|
null == (o2 = null == (a2 = n2.scrollElement) ? void 0 : a2.scrollTo) || o2.call(a2, { [n2.options.horizontal ? "left" : "top"]: r2, behavior: l2 });
|
|
92
101
|
};
|
|
93
|
-
class
|
|
102
|
+
class we {
|
|
94
103
|
constructor(e2) {
|
|
95
|
-
this.unsubs = [], this.scrollElement = null, this.isScrolling = false, this.
|
|
104
|
+
this.unsubs = [], this.scrollElement = null, this.isScrolling = false, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollDirection = null, this.scrollAdjustments = 0, this.measureElementCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
96
105
|
let e3 = null;
|
|
97
106
|
const t2 = () => e3 || ("undefined" != typeof ResizeObserver ? e3 = new ResizeObserver((e4) => {
|
|
98
107
|
e4.forEach((e5) => {
|
|
@@ -112,27 +121,26 @@ class be {
|
|
|
112
121
|
})(), this.range = null, this.setOptions = (e3) => {
|
|
113
122
|
Object.entries(e3).forEach(([t2, l2]) => {
|
|
114
123
|
void 0 === l2 && delete e3[t2];
|
|
115
|
-
}), this.options = { debug: false, initialOffset: 0, overscan: 1, paddingStart: 0, paddingEnd: 0, scrollPaddingStart: 0, scrollPaddingEnd: 0, horizontal: false, getItemKey:
|
|
116
|
-
}, measureElement:
|
|
117
|
-
}, this.notify = (e3) => {
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, { key: "production" !== process.env.NODE_ENV && "maybeNotify", debug: () => this.options.debug, initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null] }), this.cleanup = () => {
|
|
124
|
+
}), this.options = { debug: false, initialOffset: 0, overscan: 1, paddingStart: 0, paddingEnd: 0, scrollPaddingStart: 0, scrollPaddingEnd: 0, horizontal: false, getItemKey: ge, rangeExtractor: me, onChange: () => {
|
|
125
|
+
}, measureElement: ye, initialRect: { width: 0, height: 0 }, scrollMargin: 0, gap: 0, indexAttribute: "data-index", initialMeasurementsCache: [], lanes: 1, ...e3 };
|
|
126
|
+
}, this.notify = (e3, t2) => {
|
|
127
|
+
var l2, n2;
|
|
128
|
+
const { startIndex: a2, endIndex: o2 } = this.range ?? { startIndex: void 0, endIndex: void 0 }, r2 = this.calculateRange();
|
|
129
|
+
(e3 || a2 !== (null == r2 ? void 0 : r2.startIndex) || o2 !== (null == r2 ? void 0 : r2.endIndex)) && (null == (n2 = (l2 = this.options).onChange) || n2.call(l2, this, t2));
|
|
130
|
+
}, this.cleanup = () => {
|
|
123
131
|
this.unsubs.filter(Boolean).forEach((e3) => e3()), this.unsubs = [], this.scrollElement = null;
|
|
124
132
|
}, this._didMount = () => (this.measureElementCache.forEach(this.observer.observe), () => {
|
|
125
133
|
this.observer.disconnect(), this.cleanup();
|
|
126
134
|
}), this._willUpdate = () => {
|
|
127
135
|
const e3 = this.options.getScrollElement();
|
|
128
136
|
this.scrollElement !== e3 && (this.cleanup(), this.scrollElement = e3, this._scrollToOffset(this.scrollOffset, { adjustments: void 0, behavior: void 0 }), this.unsubs.push(this.options.observeElementRect(this, (e4) => {
|
|
129
|
-
this.scrollRect = e4, this.
|
|
130
|
-
})), this.unsubs.push(this.options.observeElementOffset(this, (e4) => {
|
|
131
|
-
this.scrollAdjustments = 0, this.
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
this.scrollRect = e4, this.notify(false, false);
|
|
138
|
+
})), this.unsubs.push(this.options.observeElementOffset(this, (e4, t2) => {
|
|
139
|
+
this.scrollAdjustments = 0, this.scrollDirection = t2 ? this.scrollOffset < e4 ? "forward" : "backward" : null, this.scrollOffset = e4;
|
|
140
|
+
const l2 = this.isScrolling;
|
|
141
|
+
this.isScrolling = t2, this.notify(l2 !== t2, t2);
|
|
134
142
|
})));
|
|
135
|
-
}, this.getSize = () => this.scrollRect[this.options.horizontal ? "width" : "height"], this.
|
|
143
|
+
}, this.getSize = () => this.scrollRect[this.options.horizontal ? "width" : "height"], this.getMeasurementOptions = de(() => [this.options.count, this.options.paddingStart, this.options.scrollMargin, this.options.getItemKey], (e3, t2, l2, n2) => (this.pendingMeasuredCacheIndexes = [], { count: e3, paddingStart: t2, scrollMargin: l2, getItemKey: n2 }), { key: false }), this.getFurthestMeasurement = (e3, t2) => {
|
|
136
144
|
const l2 = /* @__PURE__ */ new Map(), n2 = /* @__PURE__ */ new Map();
|
|
137
145
|
for (let a2 = t2 - 1; a2 >= 0; a2--) {
|
|
138
146
|
const t3 = e3[a2];
|
|
@@ -143,7 +151,7 @@ class be {
|
|
|
143
151
|
break;
|
|
144
152
|
}
|
|
145
153
|
return n2.size === this.options.lanes ? Array.from(n2.values()).sort((e4, t3) => e4.end === t3.end ? e4.index - t3.index : e4.end - t3.end)[0] : void 0;
|
|
146
|
-
}, this.getMeasurements = de(() => [this.
|
|
154
|
+
}, this.getMeasurements = de(() => [this.getMeasurementOptions(), this.itemSizeCache], ({ count: e3, paddingStart: t2, scrollMargin: l2, getItemKey: n2 }, a2) => {
|
|
147
155
|
const o2 = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
148
156
|
this.pendingMeasuredCacheIndexes = [];
|
|
149
157
|
const r2 = this.measurementsCache.slice(0, o2);
|
|
@@ -153,12 +161,12 @@ class be {
|
|
|
153
161
|
}
|
|
154
162
|
return this.measurementsCache = r2, r2;
|
|
155
163
|
}, { key: "production" !== process.env.NODE_ENV && "getMeasurements", debug: () => this.options.debug }), this.calculateRange = de(() => [this.getMeasurements(), this.getSize(), this.scrollOffset], (e3, t2, l2) => this.range = e3.length > 0 && t2 > 0 ? function({ measurements: e4, outerSize: t3, scrollOffset: l3 }) {
|
|
156
|
-
const n2 = e4.length - 1, a2 = (t4) => e4[t4].start, o2 =
|
|
164
|
+
const n2 = e4.length - 1, a2 = (t4) => e4[t4].start, o2 = ke(0, n2, a2, l3);
|
|
157
165
|
let r2 = o2;
|
|
158
166
|
for (; r2 < n2 && e4[r2].end < l3 + t3; )
|
|
159
167
|
r2++;
|
|
160
168
|
return { startIndex: o2, endIndex: r2 };
|
|
161
|
-
}({ measurements: e3, outerSize: t2, scrollOffset: l2 }) : null, { key: "production" !== process.env.NODE_ENV && "calculateRange", debug: () => this.options.debug }), this.getIndexes = de(() => [this.options.rangeExtractor, this.calculateRange(), this.options.overscan, this.options.count], (e3, t2, l2, n2) => null === t2 ? [] : e3({
|
|
169
|
+
}({ measurements: e3, outerSize: t2, scrollOffset: l2 }) : null, { key: "production" !== process.env.NODE_ENV && "calculateRange", debug: () => this.options.debug }), this.getIndexes = de(() => [this.options.rangeExtractor, this.calculateRange(), this.options.overscan, this.options.count], (e3, t2, l2, n2) => null === t2 ? [] : e3({ startIndex: t2.startIndex, endIndex: t2.endIndex, overscan: l2, count: n2 }), { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: () => this.options.debug }), this.indexFromElement = (e3) => {
|
|
162
170
|
const t2 = this.options.indexAttribute, l2 = e3.getAttribute(t2);
|
|
163
171
|
return l2 ? parseInt(l2, 10) : (console.warn(`Missing attribute name '${t2}={index}' on measured element.`), -1);
|
|
164
172
|
}, this._measureElement = (e3, t2) => {
|
|
@@ -173,7 +181,7 @@ class be {
|
|
|
173
181
|
this.resizeItem(l2, a2);
|
|
174
182
|
}, this.resizeItem = (e3, t2) => {
|
|
175
183
|
const l2 = t2 - (this.itemSizeCache.get(e3.key) ?? e3.size);
|
|
176
|
-
0 !== l2 && ((void 0 !== this.shouldAdjustScrollPositionOnItemSizeChange ? this.shouldAdjustScrollPositionOnItemSizeChange(e3, l2, this) : e3.start < this.scrollOffset + this.scrollAdjustments) && ("production" !== process.env.NODE_ENV && this.options.debug && console.info("correction", l2), this._scrollToOffset(this.scrollOffset, { adjustments: this.scrollAdjustments += l2, behavior: void 0 })), this.pendingMeasuredCacheIndexes.push(e3.index), this.itemSizeCache = new Map(this.itemSizeCache.set(e3.key, t2)), this.notify(false));
|
|
184
|
+
0 !== l2 && ((void 0 !== this.shouldAdjustScrollPositionOnItemSizeChange ? this.shouldAdjustScrollPositionOnItemSizeChange(e3, l2, this) : e3.start < this.scrollOffset + this.scrollAdjustments) && ("production" !== process.env.NODE_ENV && this.options.debug && console.info("correction", l2), this._scrollToOffset(this.scrollOffset, { adjustments: this.scrollAdjustments += l2, behavior: void 0 })), this.pendingMeasuredCacheIndexes.push(e3.index), this.itemSizeCache = new Map(this.itemSizeCache.set(e3.key, t2)), this.notify(true, false));
|
|
177
185
|
}, this.measureElement = (e3) => {
|
|
178
186
|
e3 && this._measureElement(e3, void 0);
|
|
179
187
|
}, this.getVirtualItems = de(() => [this.getIndexes(), this.getMeasurements()], (e3, t2) => {
|
|
@@ -185,7 +193,7 @@ class be {
|
|
|
185
193
|
return l2;
|
|
186
194
|
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: () => this.options.debug }), this.getVirtualItemForOffset = (e3) => {
|
|
187
195
|
const t2 = this.getMeasurements();
|
|
188
|
-
return ce(t2[
|
|
196
|
+
return ce(t2[ke(0, t2.length - 1, (e4) => ce(t2[e4]).start, e3)]);
|
|
189
197
|
}, this.getOffsetForAlignment = (e3, t2) => {
|
|
190
198
|
const l2 = this.getSize();
|
|
191
199
|
"auto" === t2 && (t2 = e3 <= this.scrollOffset ? "start" : e3 >= this.scrollOffset + l2 ? "end" : "start"), "start" === t2 || ("end" === t2 ? e3 -= l2 : "center" === t2 && (e3 -= l2 / 2));
|
|
@@ -229,13 +237,14 @@ class be {
|
|
|
229
237
|
}, this._scrollToOffset = (e3, { adjustments: t2, behavior: l2 }) => {
|
|
230
238
|
this.options.scrollToFn(e3, { behavior: l2, adjustments: t2 }, this);
|
|
231
239
|
}, this.measure = () => {
|
|
232
|
-
|
|
240
|
+
var e3, t2;
|
|
241
|
+
this.itemSizeCache = /* @__PURE__ */ new Map(), null == (t2 = (e3 = this.options).onChange) || t2.call(e3, this, false);
|
|
233
242
|
}, this.setOptions(e2), this.scrollRect = this.options.initialRect, this.scrollOffset = "function" == typeof this.options.initialOffset ? this.options.initialOffset() : this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((e3) => {
|
|
234
243
|
this.itemSizeCache.set(e3.key, e3.size);
|
|
235
|
-
}), this.
|
|
244
|
+
}), this.notify(false, false);
|
|
236
245
|
}
|
|
237
246
|
}
|
|
238
|
-
const
|
|
247
|
+
const ke = (e2, t2, l2, n2) => {
|
|
239
248
|
for (; e2 <= t2; ) {
|
|
240
249
|
const a2 = (e2 + t2) / 2 | 0, o2 = l2(a2);
|
|
241
250
|
if (o2 < n2)
|
|
@@ -248,9 +257,9 @@ const ye = (e2, t2, l2, n2) => {
|
|
|
248
257
|
}
|
|
249
258
|
return e2 > 0 ? e2 - 1 : 0;
|
|
250
259
|
};
|
|
251
|
-
function
|
|
260
|
+
function Se(e2) {
|
|
252
261
|
return function(e3) {
|
|
253
|
-
const t2 = new
|
|
262
|
+
const t2 = new we(d(e3)), l2 = c(t2), n2 = t2._didMount();
|
|
254
263
|
return p(() => d(e3).getScrollElement(), (e4) => {
|
|
255
264
|
e4 && t2._willUpdate();
|
|
256
265
|
}, { immediate: true }), p(() => d(e3), (e4) => {
|
|
@@ -259,39 +268,39 @@ function xe(e2) {
|
|
|
259
268
|
g(l2), null == (a2 = e4.onChange) || a2.call(e4, t3, n3);
|
|
260
269
|
} }), t2._willUpdate(), g(l2);
|
|
261
270
|
}, { immediate: true }), m(n2), l2;
|
|
262
|
-
}(u(() => ({ observeElementRect:
|
|
271
|
+
}(u(() => ({ observeElementRect: fe, observeElementOffset: be, scrollToFn: xe, ...d(e2) })));
|
|
263
272
|
}
|
|
264
|
-
function
|
|
273
|
+
function Ce(e2, t2, l2) {
|
|
265
274
|
let n2 = s(null == l2 ? void 0 : l2.value), a2 = u(() => void 0 !== e2.value);
|
|
266
275
|
return [u(() => a2.value ? e2.value : n2.value), function(e3) {
|
|
267
276
|
return a2.value || (n2.value = e3), null == t2 ? void 0 : t2(e3);
|
|
268
277
|
}];
|
|
269
278
|
}
|
|
270
|
-
let
|
|
271
|
-
function
|
|
272
|
-
return f(
|
|
279
|
+
let Oe = Symbol("headlessui.useid"), Me = 0;
|
|
280
|
+
function De() {
|
|
281
|
+
return f(Oe, () => "" + ++Me)();
|
|
273
282
|
}
|
|
274
|
-
function
|
|
283
|
+
function Ee(e2) {
|
|
275
284
|
var t2;
|
|
276
285
|
if (null == e2 || null == e2.value)
|
|
277
286
|
return null;
|
|
278
287
|
let l2 = null != (t2 = e2.value.$el) ? t2 : e2.value;
|
|
279
288
|
return l2 instanceof Node ? l2 : null;
|
|
280
289
|
}
|
|
281
|
-
function
|
|
290
|
+
function Te(e2, t2, ...l2) {
|
|
282
291
|
if (e2 in t2) {
|
|
283
292
|
let n3 = t2[e2];
|
|
284
293
|
return "function" == typeof n3 ? n3(...l2) : n3;
|
|
285
294
|
}
|
|
286
295
|
let n2 = new Error(`Tried to handle "${e2}" but there is no handler defined. Only defined handlers are: ${Object.keys(t2).map((e3) => `"${e3}"`).join(", ")}.`);
|
|
287
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n2,
|
|
296
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n2, Te), n2;
|
|
288
297
|
}
|
|
289
|
-
var
|
|
290
|
-
t3 in e3 ?
|
|
298
|
+
var Ie = Object.defineProperty, _e = (e2, t2, l2) => (((e3, t3, l3) => {
|
|
299
|
+
t3 in e3 ? Ie(e3, t3, { enumerable: true, configurable: true, writable: true, value: l3 }) : e3[t3] = l3;
|
|
291
300
|
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, l2), l2);
|
|
292
|
-
let
|
|
301
|
+
let Pe = new class {
|
|
293
302
|
constructor() {
|
|
294
|
-
|
|
303
|
+
_e(this, "current", this.detect()), _e(this, "currentId", 0);
|
|
295
304
|
}
|
|
296
305
|
set(e2) {
|
|
297
306
|
this.current !== e2 && (this.currentId = 0, this.current = e2);
|
|
@@ -312,44 +321,44 @@ let Ee = new class {
|
|
|
312
321
|
return "undefined" == typeof window || "undefined" == typeof document ? "server" : "client";
|
|
313
322
|
}
|
|
314
323
|
}();
|
|
315
|
-
function
|
|
316
|
-
if (
|
|
324
|
+
function je(e2) {
|
|
325
|
+
if (Pe.isServer)
|
|
317
326
|
return null;
|
|
318
327
|
if (e2 instanceof Node)
|
|
319
328
|
return e2.ownerDocument;
|
|
320
329
|
if (null != e2 && e2.hasOwnProperty("value")) {
|
|
321
|
-
let t2 =
|
|
330
|
+
let t2 = Ee(e2);
|
|
322
331
|
if (t2)
|
|
323
332
|
return t2.ownerDocument;
|
|
324
333
|
}
|
|
325
334
|
return document;
|
|
326
335
|
}
|
|
327
|
-
let
|
|
328
|
-
var
|
|
329
|
-
function
|
|
330
|
-
return null == e2 ? [] : Array.from(e2.querySelectorAll(
|
|
336
|
+
let Re = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
|
|
337
|
+
var Be = ((e2) => (e2[e2.First = 1] = "First", e2[e2.Previous = 2] = "Previous", e2[e2.Next = 4] = "Next", e2[e2.Last = 8] = "Last", e2[e2.WrapAround = 16] = "WrapAround", e2[e2.NoScroll = 32] = "NoScroll", e2))(Be || {}), Ae = ((e2) => (e2[e2.Error = 0] = "Error", e2[e2.Overflow = 1] = "Overflow", e2[e2.Success = 2] = "Success", e2[e2.Underflow = 3] = "Underflow", e2))(Ae || {}), Le = ((e2) => (e2[e2.Previous = -1] = "Previous", e2[e2.Next = 1] = "Next", e2))(Le || {});
|
|
338
|
+
function Fe(e2 = document.body) {
|
|
339
|
+
return null == e2 ? [] : Array.from(e2.querySelectorAll(Re)).sort((e3, t2) => Math.sign((e3.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
331
340
|
}
|
|
332
|
-
var
|
|
333
|
-
function
|
|
341
|
+
var Ne = ((e2) => (e2[e2.Strict = 0] = "Strict", e2[e2.Loose = 1] = "Loose", e2))(Ne || {});
|
|
342
|
+
function ze(e2, t2 = 0) {
|
|
334
343
|
var l2;
|
|
335
|
-
return e2 !== (null == (l2 =
|
|
344
|
+
return e2 !== (null == (l2 = je(e2)) ? void 0 : l2.body) && Te(t2, { 0: () => e2.matches(Re), 1() {
|
|
336
345
|
let t3 = e2;
|
|
337
346
|
for (; null !== t3; ) {
|
|
338
|
-
if (t3.matches(
|
|
347
|
+
if (t3.matches(Re))
|
|
339
348
|
return true;
|
|
340
349
|
t3 = t3.parentElement;
|
|
341
350
|
}
|
|
342
351
|
return false;
|
|
343
352
|
} });
|
|
344
353
|
}
|
|
345
|
-
function
|
|
346
|
-
let t2 =
|
|
354
|
+
function $e(e2) {
|
|
355
|
+
let t2 = je(e2);
|
|
347
356
|
v(() => {
|
|
348
|
-
t2 && !
|
|
357
|
+
t2 && !ze(t2.activeElement, 0) && He(e2);
|
|
349
358
|
});
|
|
350
359
|
}
|
|
351
|
-
var
|
|
352
|
-
function
|
|
360
|
+
var Ve = ((e2) => (e2[e2.Keyboard = 0] = "Keyboard", e2[e2.Mouse = 1] = "Mouse", e2))(Ve || {});
|
|
361
|
+
function He(e2) {
|
|
353
362
|
null == e2 || e2.focus({ preventScroll: true });
|
|
354
363
|
}
|
|
355
364
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("keydown", (e2) => {
|
|
@@ -357,8 +366,8 @@ function ze(e2) {
|
|
|
357
366
|
}, true), document.addEventListener("click", (e2) => {
|
|
358
367
|
1 === e2.detail ? delete document.documentElement.dataset.headlessuiFocusVisible : 0 === e2.detail && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
359
368
|
}, true));
|
|
360
|
-
let
|
|
361
|
-
function
|
|
369
|
+
let Ye = ["textarea", "input"].join(",");
|
|
370
|
+
function Ue(e2, t2 = (e3) => e3) {
|
|
362
371
|
return e2.slice().sort((e3, l2) => {
|
|
363
372
|
let n2 = t2(e3), a2 = t2(l2);
|
|
364
373
|
if (null === n2 || null === a2)
|
|
@@ -367,9 +376,9 @@ function Ve(e2, t2 = (e3) => e3) {
|
|
|
367
376
|
return o2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
368
377
|
});
|
|
369
378
|
}
|
|
370
|
-
function
|
|
379
|
+
function qe(e2, t2, { sorted: l2 = true, relativeTo: n2 = null, skipElements: a2 = [] } = {}) {
|
|
371
380
|
var o2;
|
|
372
|
-
let r2 = null != (o2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? o2 : document, i2 = Array.isArray(e2) ? l2 ?
|
|
381
|
+
let r2 = null != (o2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? o2 : document, i2 = Array.isArray(e2) ? l2 ? Ue(e2) : e2 : Fe(e2);
|
|
373
382
|
a2.length > 0 && i2.length > 1 && (i2 = i2.filter((e3) => !a2.includes(e3))), n2 = null != n2 ? n2 : r2.activeElement;
|
|
374
383
|
let s2, u2 = (() => {
|
|
375
384
|
if (5 & t2)
|
|
@@ -404,26 +413,26 @@ function He(e2, t2, { sorted: l2 = true, relativeTo: n2 = null, skipElements: a2
|
|
|
404
413
|
} while (s2 !== r2.activeElement);
|
|
405
414
|
return 6 & t2 && function(e3) {
|
|
406
415
|
var t3, l3;
|
|
407
|
-
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3,
|
|
416
|
+
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3, Ye)) && l3;
|
|
408
417
|
}(s2) && s2.select(), 2;
|
|
409
418
|
}
|
|
410
|
-
function
|
|
419
|
+
function We() {
|
|
411
420
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
412
421
|
}
|
|
413
|
-
function
|
|
414
|
-
return
|
|
422
|
+
function Ke() {
|
|
423
|
+
return We() || /Android/gi.test(window.navigator.userAgent);
|
|
415
424
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
425
|
+
function Je(e2, t2, l2) {
|
|
426
|
+
Pe.isServer || h((n2) => {
|
|
418
427
|
document.addEventListener(e2, t2, l2), n2(() => document.removeEventListener(e2, t2, l2));
|
|
419
428
|
});
|
|
420
429
|
}
|
|
421
|
-
function
|
|
422
|
-
|
|
430
|
+
function Ge(e2, t2, l2) {
|
|
431
|
+
Pe.isServer || h((n2) => {
|
|
423
432
|
window.addEventListener(e2, t2, l2), n2(() => window.removeEventListener(e2, t2, l2));
|
|
424
433
|
});
|
|
425
434
|
}
|
|
426
|
-
function
|
|
435
|
+
function Ze(e2, t2, l2 = u(() => true)) {
|
|
427
436
|
function n2(n3, a3) {
|
|
428
437
|
if (!l2.value || n3.defaultPrevented)
|
|
429
438
|
return;
|
|
@@ -436,56 +445,56 @@ function Ke(e2, t2, l2 = u(() => true)) {
|
|
|
436
445
|
for (let e3 of r2) {
|
|
437
446
|
if (null === e3)
|
|
438
447
|
continue;
|
|
439
|
-
let t3 = e3 instanceof HTMLElement ? e3 :
|
|
448
|
+
let t3 = e3 instanceof HTMLElement ? e3 : Ee(e3);
|
|
440
449
|
if (null != t3 && t3.contains(o2) || n3.composed && n3.composedPath().includes(t3))
|
|
441
450
|
return;
|
|
442
451
|
}
|
|
443
|
-
return !
|
|
452
|
+
return !ze(o2, Ne.Loose) && -1 !== o2.tabIndex && n3.preventDefault(), t2(n3, o2);
|
|
444
453
|
}
|
|
445
454
|
let a2 = s(null);
|
|
446
|
-
|
|
455
|
+
Je("pointerdown", (e3) => {
|
|
447
456
|
var t3, n3;
|
|
448
457
|
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
449
|
-
}, true),
|
|
458
|
+
}, true), Je("mousedown", (e3) => {
|
|
450
459
|
var t3, n3;
|
|
451
460
|
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
452
|
-
}, true),
|
|
453
|
-
|
|
454
|
-
}, true),
|
|
461
|
+
}, true), Je("click", (e3) => {
|
|
462
|
+
Ke() || a2.value && (n2(e3, () => a2.value), a2.value = null);
|
|
463
|
+
}, true), Je("touchend", (e3) => n2(e3, () => e3.target instanceof HTMLElement ? e3.target : null), true), Ge("blur", (e3) => n2(e3, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
|
|
455
464
|
}
|
|
456
|
-
function
|
|
465
|
+
function Xe(e2, t2) {
|
|
457
466
|
if (e2)
|
|
458
467
|
return e2;
|
|
459
468
|
let l2 = null != t2 ? t2 : "button";
|
|
460
469
|
return "string" == typeof l2 && "button" === l2.toLowerCase() ? "button" : void 0;
|
|
461
470
|
}
|
|
462
|
-
function
|
|
463
|
-
let l2 = s(
|
|
471
|
+
function Qe(e2, t2) {
|
|
472
|
+
let l2 = s(Xe(e2.value.type, e2.value.as));
|
|
464
473
|
return b(() => {
|
|
465
|
-
l2.value =
|
|
474
|
+
l2.value = Xe(e2.value.type, e2.value.as);
|
|
466
475
|
}), h(() => {
|
|
467
476
|
var e3;
|
|
468
|
-
l2.value ||
|
|
477
|
+
l2.value || Ee(t2) && Ee(t2) instanceof HTMLButtonElement && (null == (e3 = Ee(t2)) || !e3.hasAttribute("type")) && (l2.value = "button");
|
|
469
478
|
}), l2;
|
|
470
479
|
}
|
|
471
|
-
function
|
|
480
|
+
function et(e2) {
|
|
472
481
|
return [e2.screenX, e2.screenY];
|
|
473
482
|
}
|
|
474
|
-
function
|
|
483
|
+
function tt() {
|
|
475
484
|
let e2 = s([-1, -1]);
|
|
476
485
|
return { wasMoved(t2) {
|
|
477
|
-
let l2 =
|
|
486
|
+
let l2 = et(t2);
|
|
478
487
|
return (e2.value[0] !== l2[0] || e2.value[1] !== l2[1]) && (e2.value = l2, true);
|
|
479
488
|
}, update(t2) {
|
|
480
|
-
e2.value =
|
|
489
|
+
e2.value = et(t2);
|
|
481
490
|
} };
|
|
482
491
|
}
|
|
483
|
-
function
|
|
492
|
+
function lt({ container: e2, accept: t2, walk: l2, enabled: n2 }) {
|
|
484
493
|
h(() => {
|
|
485
494
|
let a2 = e2.value;
|
|
486
495
|
if (!a2 || void 0 !== n2 && !n2.value)
|
|
487
496
|
return;
|
|
488
|
-
let o2 =
|
|
497
|
+
let o2 = je(e2);
|
|
489
498
|
if (!o2)
|
|
490
499
|
return;
|
|
491
500
|
let r2 = Object.assign((e3) => t2(e3), { acceptNode: t2 }), i2 = o2.createTreeWalker(a2, NodeFilter.SHOW_ELEMENT, r2, false);
|
|
@@ -493,20 +502,20 @@ function Qe({ container: e2, accept: t2, walk: l2, enabled: n2 }) {
|
|
|
493
502
|
l2(i2.currentNode);
|
|
494
503
|
});
|
|
495
504
|
}
|
|
496
|
-
var
|
|
497
|
-
function
|
|
505
|
+
var nt = ((e2) => (e2[e2.None = 0] = "None", e2[e2.RenderStrategy = 1] = "RenderStrategy", e2[e2.Static = 2] = "Static", e2))(nt || {}), at = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(at || {});
|
|
506
|
+
function ot({ visible: e2 = true, features: t2 = 0, ourProps: l2, theirProps: n2, ...a2 }) {
|
|
498
507
|
var o2;
|
|
499
|
-
let r2 =
|
|
508
|
+
let r2 = st(n2, l2), i2 = Object.assign(a2, { props: r2 });
|
|
500
509
|
if (e2 || 2 & t2 && r2.static)
|
|
501
|
-
return
|
|
510
|
+
return rt(i2);
|
|
502
511
|
if (1 & t2) {
|
|
503
|
-
return
|
|
512
|
+
return Te(null == (o2 = r2.unmount) || o2 ? 0 : 1, { 0: () => null, 1: () => rt({ ...a2, props: { ...r2, hidden: true, style: { display: "none" } } }) });
|
|
504
513
|
}
|
|
505
|
-
return
|
|
514
|
+
return rt(i2);
|
|
506
515
|
}
|
|
507
|
-
function
|
|
516
|
+
function rt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
508
517
|
var o2, r2;
|
|
509
|
-
let { as: i2, ...s2 } =
|
|
518
|
+
let { as: i2, ...s2 } = dt(e2, ["unmount", "static"]), u2 = null == (o2 = l2.default) ? void 0 : o2.call(l2, n2), d2 = {};
|
|
510
519
|
if (n2) {
|
|
511
520
|
let e3 = false, t3 = [];
|
|
512
521
|
for (let [l3, a3] of Object.entries(n2))
|
|
@@ -514,13 +523,13 @@ function nt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
|
514
523
|
e3 && (d2["data-headlessui-state"] = t3.join(" "));
|
|
515
524
|
}
|
|
516
525
|
if ("template" === i2) {
|
|
517
|
-
if (u2 =
|
|
526
|
+
if (u2 = it(null != u2 ? u2 : []), Object.keys(s2).length > 0 || Object.keys(t2).length > 0) {
|
|
518
527
|
let [e3, ...l3] = null != u2 ? u2 : [];
|
|
519
528
|
if (!function(e4) {
|
|
520
529
|
return null != e4 && ("string" == typeof e4.type || "object" == typeof e4.type || "function" == typeof e4.type);
|
|
521
530
|
}(e3) || l3.length > 0)
|
|
522
531
|
throw new Error(['Passing props on "template"!', "", `The current component <${a2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s2).concat(Object.keys(t2)).map((e4) => e4.trim()).filter((e4, t3, l4) => l4.indexOf(e4) === t3).sort((e4, t3) => e4.localeCompare(t3)).map((e4) => ` - ${e4}`).join("\n"), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((e4) => ` - ${e4}`).join("\n")].join("\n"));
|
|
523
|
-
let n3 =
|
|
532
|
+
let n3 = st(null != (r2 = e3.props) ? r2 : {}, s2, d2), o3 = y(e3, n3, true);
|
|
524
533
|
for (let e4 in n3)
|
|
525
534
|
e4.startsWith("on") && (o3.props || (o3.props = {}), o3.props[e4] = n3[e4]);
|
|
526
535
|
return o3;
|
|
@@ -529,10 +538,10 @@ function nt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
|
529
538
|
}
|
|
530
539
|
return x(i2, Object.assign({}, s2, d2), { default: () => u2 });
|
|
531
540
|
}
|
|
532
|
-
function
|
|
533
|
-
return e2.flatMap((e3) => e3.type === w ?
|
|
541
|
+
function it(e2) {
|
|
542
|
+
return e2.flatMap((e3) => e3.type === w ? it(e3.children) : [e3]);
|
|
534
543
|
}
|
|
535
|
-
function
|
|
544
|
+
function st(...e2) {
|
|
536
545
|
if (0 === e2.length)
|
|
537
546
|
return {};
|
|
538
547
|
if (1 === e2.length)
|
|
@@ -554,33 +563,33 @@ function ot(...e2) {
|
|
|
554
563
|
} });
|
|
555
564
|
return t2;
|
|
556
565
|
}
|
|
557
|
-
function
|
|
566
|
+
function ut(e2) {
|
|
558
567
|
let t2 = Object.assign({}, e2);
|
|
559
568
|
for (let e3 in t2)
|
|
560
569
|
void 0 === t2[e3] && delete t2[e3];
|
|
561
570
|
return t2;
|
|
562
571
|
}
|
|
563
|
-
function
|
|
572
|
+
function dt(e2, t2 = []) {
|
|
564
573
|
let l2 = Object.assign({}, e2);
|
|
565
574
|
for (let e3 of t2)
|
|
566
575
|
e3 in l2 && delete l2[e3];
|
|
567
576
|
return l2;
|
|
568
577
|
}
|
|
569
|
-
var
|
|
570
|
-
let
|
|
578
|
+
var ct = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(ct || {});
|
|
579
|
+
let pt = k({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup: (e2, { slots: t2, attrs: l2 }) => () => {
|
|
571
580
|
var n2;
|
|
572
581
|
let { features: a2, ...o2 } = e2;
|
|
573
|
-
return
|
|
574
|
-
} }),
|
|
575
|
-
var
|
|
576
|
-
function
|
|
577
|
-
return f(
|
|
582
|
+
return ot({ ourProps: { "aria-hidden": !(2 & ~a2) || (null != (n2 = o2["aria-hidden"]) ? n2 : void 0), hidden: !(4 & ~a2) || void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...!(4 & ~a2) && !!(2 & ~a2) && { display: "none" } } }, theirProps: o2, slot: {}, attrs: l2, slots: t2, name: "Hidden" });
|
|
583
|
+
} }), gt = Symbol("Context");
|
|
584
|
+
var mt = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(mt || {});
|
|
585
|
+
function ft() {
|
|
586
|
+
return f(gt, null);
|
|
578
587
|
}
|
|
579
|
-
function
|
|
580
|
-
S(
|
|
588
|
+
function vt(e2) {
|
|
589
|
+
S(gt, e2);
|
|
581
590
|
}
|
|
582
|
-
var
|
|
583
|
-
let
|
|
591
|
+
var ht = ((e2) => (e2.Space = " ", e2.Enter = "Enter", e2.Escape = "Escape", e2.Backspace = "Backspace", e2.Delete = "Delete", e2.ArrowLeft = "ArrowLeft", e2.ArrowUp = "ArrowUp", e2.ArrowRight = "ArrowRight", e2.ArrowDown = "ArrowDown", e2.Home = "Home", e2.End = "End", e2.PageUp = "PageUp", e2.PageDown = "PageDown", e2.Tab = "Tab", e2))(ht || {});
|
|
592
|
+
let bt = [];
|
|
584
593
|
!function(e2) {
|
|
585
594
|
function t2() {
|
|
586
595
|
"loading" !== document.readyState && (e2(), document.removeEventListener("DOMContentLoaded", t2));
|
|
@@ -588,12 +597,12 @@ let ft = [];
|
|
|
588
597
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("DOMContentLoaded", t2), t2());
|
|
589
598
|
}(() => {
|
|
590
599
|
function e2(e3) {
|
|
591
|
-
e3.target instanceof HTMLElement && e3.target !== document.body &&
|
|
600
|
+
e3.target instanceof HTMLElement && e3.target !== document.body && bt[0] !== e3.target && (bt.unshift(e3.target), bt = bt.filter((e4) => null != e4 && e4.isConnected), bt.splice(10));
|
|
592
601
|
}
|
|
593
602
|
window.addEventListener("click", e2, { capture: true }), window.addEventListener("mousedown", e2, { capture: true }), window.addEventListener("focus", e2, { capture: true }), document.body.addEventListener("click", e2, { capture: true }), document.body.addEventListener("mousedown", e2, { capture: true }), document.body.addEventListener("focus", e2, { capture: true });
|
|
594
603
|
});
|
|
595
|
-
var
|
|
596
|
-
function
|
|
604
|
+
var yt = ((e2) => (e2[e2.First = 0] = "First", e2[e2.Previous = 1] = "Previous", e2[e2.Next = 2] = "Next", e2[e2.Last = 3] = "Last", e2[e2.Specific = 4] = "Specific", e2[e2.Nothing = 5] = "Nothing", e2))(yt || {});
|
|
605
|
+
function xt(e2, t2) {
|
|
597
606
|
let l2 = t2.resolveItems();
|
|
598
607
|
if (l2.length <= 0)
|
|
599
608
|
return null;
|
|
@@ -633,12 +642,12 @@ function ht(e2, t2) {
|
|
|
633
642
|
}(e2);
|
|
634
643
|
}
|
|
635
644
|
}
|
|
636
|
-
function
|
|
645
|
+
function wt(e2) {
|
|
637
646
|
"function" == typeof queueMicrotask ? queueMicrotask(e2) : Promise.resolve().then(e2).catch((e3) => setTimeout(() => {
|
|
638
647
|
throw e3;
|
|
639
648
|
}));
|
|
640
649
|
}
|
|
641
|
-
function
|
|
650
|
+
function kt() {
|
|
642
651
|
let e2 = [], t2 = { addEventListener: (e3, l2, n2, a2) => (e3.addEventListener(l2, n2, a2), t2.add(() => e3.removeEventListener(l2, n2, a2))), requestAnimationFrame(...e3) {
|
|
643
652
|
let l2 = requestAnimationFrame(...e3);
|
|
644
653
|
t2.add(() => cancelAnimationFrame(l2));
|
|
@@ -651,7 +660,7 @@ function yt() {
|
|
|
651
660
|
t2.add(() => clearTimeout(l2));
|
|
652
661
|
}, microTask(...e3) {
|
|
653
662
|
let l2 = { current: true };
|
|
654
|
-
return
|
|
663
|
+
return wt(() => {
|
|
655
664
|
l2.current && e3[0]();
|
|
656
665
|
}), t2.add(() => {
|
|
657
666
|
l2.current = false;
|
|
@@ -662,7 +671,7 @@ function yt() {
|
|
|
662
671
|
Object.assign(e3.style, { [t3]: n2 });
|
|
663
672
|
});
|
|
664
673
|
}, group(e3) {
|
|
665
|
-
let t3 =
|
|
674
|
+
let t3 = kt();
|
|
666
675
|
return e3(t3), this.add(() => t3.dispose());
|
|
667
676
|
}, add: (t3) => (e2.push(t3), () => {
|
|
668
677
|
let l2 = e2.indexOf(t3);
|
|
@@ -675,60 +684,60 @@ function yt() {
|
|
|
675
684
|
} };
|
|
676
685
|
return t2;
|
|
677
686
|
}
|
|
678
|
-
function
|
|
687
|
+
function St(e2 = {}, t2 = null, l2 = []) {
|
|
679
688
|
for (let [n2, a2] of Object.entries(e2))
|
|
680
|
-
|
|
689
|
+
Ot(l2, Ct(t2, n2), a2);
|
|
681
690
|
return l2;
|
|
682
691
|
}
|
|
683
|
-
function
|
|
692
|
+
function Ct(e2, t2) {
|
|
684
693
|
return e2 ? e2 + "[" + t2 + "]" : t2;
|
|
685
694
|
}
|
|
686
|
-
function
|
|
695
|
+
function Ot(e2, t2, l2) {
|
|
687
696
|
if (Array.isArray(l2))
|
|
688
697
|
for (let [n2, a2] of l2.entries())
|
|
689
|
-
|
|
698
|
+
Ot(e2, Ct(t2, n2.toString()), a2);
|
|
690
699
|
else
|
|
691
|
-
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) :
|
|
700
|
+
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) : St(l2, t2, e2);
|
|
692
701
|
}
|
|
693
|
-
var
|
|
694
|
-
let
|
|
695
|
-
function
|
|
696
|
-
let t2 = f(
|
|
702
|
+
var Mt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(Mt || {}), Dt = ((e2) => (e2[e2.Single = 0] = "Single", e2[e2.Multi = 1] = "Multi", e2))(Dt || {}), Et = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Focus = 1] = "Focus", e2[e2.Other = 2] = "Other", e2))(Et || {});
|
|
703
|
+
let Tt = Symbol("ComboboxContext");
|
|
704
|
+
function It(e2) {
|
|
705
|
+
let t2 = f(Tt, null);
|
|
697
706
|
if (null === t2) {
|
|
698
707
|
let t3 = new Error(`<${e2} /> is missing a parent <Combobox /> component.`);
|
|
699
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
708
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, It), t3;
|
|
700
709
|
}
|
|
701
710
|
return t2;
|
|
702
711
|
}
|
|
703
|
-
let
|
|
704
|
-
let l2 =
|
|
705
|
-
let e3 =
|
|
712
|
+
let _t = Symbol("VirtualContext"), Pt = k({ name: "VirtualProvider", setup(e2, { slots: t2 }) {
|
|
713
|
+
let l2 = It("VirtualProvider"), n2 = u(() => {
|
|
714
|
+
let e3 = Ee(l2.optionsRef);
|
|
706
715
|
if (!e3)
|
|
707
716
|
return { start: 0, end: 0 };
|
|
708
717
|
let t3 = window.getComputedStyle(e3);
|
|
709
718
|
return { start: parseFloat(t3.paddingBlockStart || t3.paddingTop), end: parseFloat(t3.paddingBlockEnd || t3.paddingBottom) };
|
|
710
|
-
}), a2 =
|
|
719
|
+
}), a2 = Se(u(() => ({ scrollPaddingStart: n2.value.start, scrollPaddingEnd: n2.value.end, count: l2.virtual.value.options.length, estimateSize: () => 40, getScrollElement: () => Ee(l2.optionsRef), overscan: 12 }))), o2 = u(() => {
|
|
711
720
|
var e3;
|
|
712
721
|
return null == (e3 = l2.virtual.value) ? void 0 : e3.options;
|
|
713
722
|
}), r2 = s(0);
|
|
714
723
|
return p([o2], () => {
|
|
715
724
|
r2.value += 1;
|
|
716
|
-
}), S(
|
|
725
|
+
}), S(_t, l2.virtual.value ? a2 : null), () => [x("div", { style: { position: "relative", width: "100%", height: `${a2.value.getTotalSize()}px` }, ref: (e3) => {
|
|
717
726
|
if (e3) {
|
|
718
727
|
if ("undefined" != typeof process && void 0 !== process.env.JEST_WORKER_ID || 0 === l2.activationTrigger.value)
|
|
719
728
|
return;
|
|
720
729
|
null !== l2.activeOptionIndex.value && l2.virtual.value.options.length > l2.activeOptionIndex.value && a2.value.scrollToIndex(l2.activeOptionIndex.value);
|
|
721
730
|
}
|
|
722
731
|
} }, a2.value.getVirtualItems().map((e3) => y(t2.default({ option: l2.virtual.value.options[e3.index], open: 0 === l2.comboboxState.value })[0], { key: `${r2.value}-${e3.index}`, "data-index": e3.index, "aria-setsize": l2.virtual.value.options.length, "aria-posinset": e3.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${e3.start}px)`, overflowAnchor: "none" } })))];
|
|
723
|
-
} }),
|
|
732
|
+
} }), jt = k({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], nullable: true, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: true }, name: { type: String, optional: true }, nullable: { type: Boolean, default: false }, multiple: { type: [Boolean], default: false }, immediate: { type: [Boolean], default: false }, virtual: { type: Object, default: null } }, inheritAttrs: false, setup(e2, { slots: t2, attrs: l2, emit: n2 }) {
|
|
724
733
|
let a2 = s(1), o2 = s(null), r2 = s(null), i2 = s(null), d2 = s(null), c2 = s({ static: false, hold: false }), g2 = s([]), m2 = s(null), f2 = s(2), v2 = s(false);
|
|
725
734
|
function h2(e3 = (e4) => e4) {
|
|
726
|
-
let t3 = null !== m2.value ? g2.value[m2.value] : null, l3 = e3(g2.value.slice()), n3 = l3.length > 0 && null !== l3[0].dataRef.order.value ? l3.sort((e4, t4) => e4.dataRef.order.value - t4.dataRef.order.value) :
|
|
735
|
+
let t3 = null !== m2.value ? g2.value[m2.value] : null, l3 = e3(g2.value.slice()), n3 = l3.length > 0 && null !== l3[0].dataRef.order.value ? l3.sort((e4, t4) => e4.dataRef.order.value - t4.dataRef.order.value) : Ue(l3, (e4) => Ee(e4.dataRef.domRef)), a3 = t3 ? n3.indexOf(t3) : null;
|
|
727
736
|
return -1 === a3 && (a3 = null), { options: n3, activeOptionIndex: a3 };
|
|
728
737
|
}
|
|
729
|
-
let y2 = u(() => e2.multiple ? 1 : 0), k2 = u(() => e2.nullable), [O2, D2] =
|
|
738
|
+
let y2 = u(() => e2.multiple ? 1 : 0), k2 = u(() => e2.nullable), [O2, D2] = Ce(u(() => e2.modelValue), (e3) => n2("update:modelValue", e3), u(() => e2.defaultValue)), E2 = u(() => void 0 === O2.value ? Te(y2.value, { 1: [], 0: void 0 }) : O2.value), T2 = null, I2 = null;
|
|
730
739
|
function _2(e3) {
|
|
731
|
-
return
|
|
740
|
+
return Te(y2.value, { 0: () => null == D2 ? void 0 : D2(e3), 1: () => {
|
|
732
741
|
let t3 = M(j2.value.value).slice(), l3 = M(e3), n3 = t3.findIndex((e4) => j2.compare(l3, M(e4)));
|
|
733
742
|
return -1 === n3 ? t3.push(l3) : t3.splice(n3, 1), null == D2 ? void 0 : D2(t3);
|
|
734
743
|
} });
|
|
@@ -741,7 +750,7 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
741
750
|
m2.value = -1 !== l3 ? l3 : null;
|
|
742
751
|
}
|
|
743
752
|
});
|
|
744
|
-
let j2 = { comboboxState: a2, value:
|
|
753
|
+
let j2 = { comboboxState: a2, value: E2, mode: y2, compare(t3, l3) {
|
|
745
754
|
if ("string" == typeof e2.by) {
|
|
746
755
|
let n3 = e2.by;
|
|
747
756
|
return (null == t3 ? void 0 : t3[n3]) === (null == l3 ? void 0 : l3[n3]);
|
|
@@ -779,11 +788,11 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
779
788
|
}, setActivationTrigger(e3) {
|
|
780
789
|
f2.value = e3;
|
|
781
790
|
}, goToOption(t3, l3, n3) {
|
|
782
|
-
v2.value = false, null !==
|
|
791
|
+
v2.value = false, null !== T2 && cancelAnimationFrame(T2), T2 = requestAnimationFrame(() => {
|
|
783
792
|
if (e2.disabled || d2.value && !c2.value.static && 1 === a2.value)
|
|
784
793
|
return;
|
|
785
794
|
if (j2.virtual.value)
|
|
786
|
-
return m2.value = t3 ===
|
|
795
|
+
return m2.value = t3 === yt.Specific ? l3 : xt({ focus: t3 }, { resolveItems: () => j2.virtual.value.options, resolveActiveIndex: () => {
|
|
787
796
|
var e3, t4;
|
|
788
797
|
return null != (t4 = null != (e3 = j2.activeOptionIndex.value) ? e3 : j2.virtual.value.options.findIndex((e4) => {
|
|
789
798
|
var t5;
|
|
@@ -797,7 +806,7 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
797
806
|
let e3 = o3.options.findIndex((e4) => !e4.dataRef.disabled);
|
|
798
807
|
-1 !== e3 && (o3.activeOptionIndex = e3);
|
|
799
808
|
}
|
|
800
|
-
let r3 = t3 ===
|
|
809
|
+
let r3 = t3 === yt.Specific ? l3 : xt({ focus: t3 }, { resolveItems: () => o3.options, resolveActiveIndex: () => o3.activeOptionIndex, resolveId: (e3) => e3.id, resolveDisabled: (e3) => e3.dataRef.disabled });
|
|
801
810
|
m2.value = r3, f2.value = null != n3 ? n3 : 2, g2.value = o3.options;
|
|
802
811
|
});
|
|
803
812
|
}, selectOption(e3) {
|
|
@@ -814,7 +823,7 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
814
823
|
let { dataRef: e3 } = g2.value[j2.activeOptionIndex.value];
|
|
815
824
|
_2(e3.value);
|
|
816
825
|
}
|
|
817
|
-
j2.goToOption(
|
|
826
|
+
j2.goToOption(yt.Specific, j2.activeOptionIndex.value);
|
|
818
827
|
}
|
|
819
828
|
}, registerOption(e3, t3) {
|
|
820
829
|
let l3 = C({ id: e3, dataRef: t3 });
|
|
@@ -822,23 +831,23 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
822
831
|
return void g2.value.push(l3);
|
|
823
832
|
I2 && cancelAnimationFrame(I2);
|
|
824
833
|
let n3 = h2((e4) => (e4.push(l3), e4));
|
|
825
|
-
null === m2.value && j2.isSelected(t3.value.value) && (n3.activeOptionIndex = n3.options.indexOf(l3)), g2.value = n3.options, m2.value = n3.activeOptionIndex, f2.value = 2, n3.options.some((e4) => !
|
|
834
|
+
null === m2.value && j2.isSelected(t3.value.value) && (n3.activeOptionIndex = n3.options.indexOf(l3)), g2.value = n3.options, m2.value = n3.activeOptionIndex, f2.value = 2, n3.options.some((e4) => !Ee(e4.dataRef.domRef)) && (I2 = requestAnimationFrame(() => {
|
|
826
835
|
let e4 = h2();
|
|
827
836
|
g2.value = e4.options, m2.value = e4.activeOptionIndex;
|
|
828
837
|
}));
|
|
829
838
|
}, unregisterOption(e3, t3) {
|
|
830
|
-
if (null !==
|
|
839
|
+
if (null !== T2 && cancelAnimationFrame(T2), t3 && (v2.value = true), j2.virtual.value)
|
|
831
840
|
return void (g2.value = g2.value.filter((t4) => t4.id !== e3));
|
|
832
841
|
let l3 = h2((t4) => {
|
|
833
842
|
let l4 = t4.findIndex((t5) => t5.id === e3);
|
|
834
843
|
return -1 !== l4 && t4.splice(l4, 1), t4;
|
|
835
844
|
});
|
|
836
845
|
g2.value = l3.options, m2.value = l3.activeOptionIndex, f2.value = 2;
|
|
837
|
-
}, isSelected: (e3) =>
|
|
838
|
-
|
|
846
|
+
}, isSelected: (e3) => Te(y2.value, { 0: () => j2.compare(M(j2.value.value), M(e3)), 1: () => M(j2.value.value).some((t3) => j2.compare(M(t3), M(e3))) }), isActive: (e3) => m2.value === j2.calculateIndex(e3) };
|
|
847
|
+
Ze([r2, i2, d2], () => j2.closeCombobox(), u(() => 0 === a2.value)), S(Tt, j2), vt(u(() => Te(a2.value, { 0: mt.Open, 1: mt.Closed })));
|
|
839
848
|
let R2 = u(() => {
|
|
840
849
|
var e3;
|
|
841
|
-
return null == (e3 =
|
|
850
|
+
return null == (e3 = Ee(r2)) ? void 0 : e3.closest("form");
|
|
842
851
|
});
|
|
843
852
|
return b(() => {
|
|
844
853
|
p([R2], () => {
|
|
@@ -853,44 +862,44 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
853
862
|
}, { immediate: true });
|
|
854
863
|
}), () => {
|
|
855
864
|
var n3, o3, r3;
|
|
856
|
-
let { name: i3, disabled: s2, form: u2, ...d3 } = e2, c3 = { open: 0 === a2.value, disabled: s2, activeIndex: j2.activeOptionIndex.value, activeOption: null === j2.activeOptionIndex.value ? null : j2.virtual.value ? j2.virtual.value.options[null != (n3 = j2.activeOptionIndex.value) ? n3 : 0] : null != (r3 = null == (o3 = j2.options.value[j2.activeOptionIndex.value]) ? void 0 : o3.dataRef.value) ? r3 : null, value:
|
|
857
|
-
return x(w, [...null != i3 && null !=
|
|
865
|
+
let { name: i3, disabled: s2, form: u2, ...d3 } = e2, c3 = { open: 0 === a2.value, disabled: s2, activeIndex: j2.activeOptionIndex.value, activeOption: null === j2.activeOptionIndex.value ? null : j2.virtual.value ? j2.virtual.value.options[null != (n3 = j2.activeOptionIndex.value) ? n3 : 0] : null != (r3 = null == (o3 = j2.options.value[j2.activeOptionIndex.value]) ? void 0 : o3.dataRef.value) ? r3 : null, value: E2.value };
|
|
866
|
+
return x(w, [...null != i3 && null != E2.value ? St({ [i3]: E2.value }).map(([e3, t3]) => x(pt, ut({ features: ct.Hidden, key: e3, as: "input", type: "hidden", hidden: true, readOnly: true, form: u2, disabled: s2, name: e3, value: t3 }))) : [], ot({ theirProps: { ...l2, ...dt(d3, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: c3, slots: t2, attrs: l2, name: "Combobox" })]);
|
|
858
867
|
};
|
|
859
|
-
} }),
|
|
868
|
+
} }), Rt = k({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
860
869
|
var n2;
|
|
861
|
-
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-combobox-label-${
|
|
870
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-combobox-label-${De()}`, o2 = It("ComboboxLabel");
|
|
862
871
|
function r2() {
|
|
863
872
|
var e3;
|
|
864
|
-
null == (e3 =
|
|
873
|
+
null == (e3 = Ee(o2.inputRef)) || e3.focus({ preventScroll: true });
|
|
865
874
|
}
|
|
866
875
|
return () => {
|
|
867
876
|
let n3 = { open: 0 === o2.comboboxState.value, disabled: o2.disabled.value }, { ...i2 } = e2;
|
|
868
|
-
return
|
|
877
|
+
return ot({ ourProps: { id: a2, ref: o2.labelRef, onClick: r2 }, theirProps: i2, slot: n3, attrs: t2, slots: l2, name: "ComboboxLabel" });
|
|
869
878
|
};
|
|
870
|
-
} }),
|
|
879
|
+
} }), Bt = k({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
871
880
|
var a2;
|
|
872
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-combobox-button-${
|
|
881
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-combobox-button-${De()}`, r2 = It("ComboboxButton");
|
|
873
882
|
function i2(e3) {
|
|
874
883
|
r2.disabled.value || (0 === r2.comboboxState.value ? r2.closeCombobox() : (e3.preventDefault(), r2.openCombobox()), v(() => {
|
|
875
884
|
var e4;
|
|
876
|
-
return null == (e4 =
|
|
885
|
+
return null == (e4 = Ee(r2.inputRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
877
886
|
}));
|
|
878
887
|
}
|
|
879
888
|
function s2(e3) {
|
|
880
889
|
switch (e3.key) {
|
|
881
|
-
case
|
|
890
|
+
case ht.ArrowDown:
|
|
882
891
|
return e3.preventDefault(), e3.stopPropagation(), 1 === r2.comboboxState.value && r2.openCombobox(), void v(() => {
|
|
883
892
|
var e4;
|
|
884
893
|
return null == (e4 = r2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
885
894
|
});
|
|
886
|
-
case
|
|
895
|
+
case ht.ArrowUp:
|
|
887
896
|
return e3.preventDefault(), e3.stopPropagation(), 1 === r2.comboboxState.value && (r2.openCombobox(), v(() => {
|
|
888
|
-
r2.value.value || r2.goToOption(
|
|
897
|
+
r2.value.value || r2.goToOption(yt.Last);
|
|
889
898
|
})), void v(() => {
|
|
890
899
|
var e4;
|
|
891
900
|
return null == (e4 = r2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
892
901
|
});
|
|
893
|
-
case
|
|
902
|
+
case ht.Escape:
|
|
894
903
|
if (0 !== r2.comboboxState.value)
|
|
895
904
|
return;
|
|
896
905
|
return e3.preventDefault(), r2.optionsRef.value && !r2.optionsPropsRef.value.static && e3.stopPropagation(), r2.closeCombobox(), void v(() => {
|
|
@@ -900,31 +909,31 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
900
909
|
}
|
|
901
910
|
}
|
|
902
911
|
n2({ el: r2.buttonRef, $el: r2.buttonRef });
|
|
903
|
-
let d2 =
|
|
912
|
+
let d2 = Qe(u(() => ({ as: e2.as, type: t2.type })), r2.buttonRef);
|
|
904
913
|
return () => {
|
|
905
914
|
var n3, a3;
|
|
906
915
|
let u2 = { open: 0 === r2.comboboxState.value, disabled: r2.disabled.value, value: r2.value.value }, { ...c2 } = e2;
|
|
907
|
-
return
|
|
916
|
+
return ot({ ourProps: { ref: r2.buttonRef, id: o2, type: d2.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": null == (n3 = Ee(r2.optionsRef)) ? void 0 : n3.id, "aria-expanded": 0 === r2.comboboxState.value, "aria-labelledby": r2.labelRef.value ? [null == (a3 = Ee(r2.labelRef)) ? void 0 : a3.id, o2].join(" ") : void 0, disabled: true === r2.disabled.value || void 0, onKeydown: s2, onClick: i2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "ComboboxButton" });
|
|
908
917
|
};
|
|
909
|
-
} }),
|
|
918
|
+
} }), At = k({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
910
919
|
var o2;
|
|
911
|
-
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-combobox-input-${
|
|
920
|
+
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-combobox-input-${De()}`, i2 = It("ComboboxInput"), d2 = u(() => je(Ee(i2.inputRef))), c2 = { value: false };
|
|
912
921
|
function g2() {
|
|
913
922
|
i2.change(null);
|
|
914
|
-
let e3 =
|
|
915
|
-
e3 && (e3.scrollTop = 0), i2.goToOption(
|
|
923
|
+
let e3 = Ee(i2.optionsRef);
|
|
924
|
+
e3 && (e3.scrollTop = 0), i2.goToOption(yt.Nothing);
|
|
916
925
|
}
|
|
917
926
|
a2({ el: i2.inputRef, $el: i2.inputRef });
|
|
918
927
|
let m2 = u(() => {
|
|
919
928
|
var t3;
|
|
920
929
|
let l3 = i2.value.value;
|
|
921
|
-
return
|
|
930
|
+
return Ee(i2.inputRef) ? void 0 !== e2.displayValue && void 0 !== l3 ? null != (t3 = e2.displayValue(l3)) ? t3 : "" : "string" == typeof l3 ? l3 : "" : "";
|
|
922
931
|
});
|
|
923
932
|
b(() => {
|
|
924
933
|
p([m2, i2.comboboxState, d2], ([e3, t3], [l3, n3]) => {
|
|
925
934
|
if (c2.value)
|
|
926
935
|
return;
|
|
927
|
-
let a3 =
|
|
936
|
+
let a3 = Ee(i2.inputRef);
|
|
928
937
|
a3 && ((0 === n3 && 1 === t3 || e3 !== l3) && (a3.value = e3), requestAnimationFrame(() => {
|
|
929
938
|
var e4;
|
|
930
939
|
if (c2.value || !a3 || (null == (e4 = d2.value) ? void 0 : e4.activeElement) !== a3)
|
|
@@ -936,7 +945,7 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
936
945
|
if (0 === e3 && 1 === t3) {
|
|
937
946
|
if (c2.value)
|
|
938
947
|
return;
|
|
939
|
-
let e4 =
|
|
948
|
+
let e4 = Ee(i2.inputRef);
|
|
940
949
|
if (!e4)
|
|
941
950
|
return;
|
|
942
951
|
let t4 = e4.value, { selectionStart: l3, selectionEnd: n3, selectionDirection: a3 } = e4;
|
|
@@ -949,45 +958,45 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
949
958
|
f2.value = true;
|
|
950
959
|
}
|
|
951
960
|
function y2() {
|
|
952
|
-
|
|
961
|
+
kt().nextFrame(() => {
|
|
953
962
|
f2.value = false;
|
|
954
963
|
});
|
|
955
964
|
}
|
|
956
965
|
function x2(e3) {
|
|
957
966
|
switch (c2.value = true, e3.key) {
|
|
958
|
-
case
|
|
967
|
+
case ht.Enter:
|
|
959
968
|
if (c2.value = false, 0 !== i2.comboboxState.value || f2.value)
|
|
960
969
|
return;
|
|
961
970
|
if (e3.preventDefault(), e3.stopPropagation(), null === i2.activeOptionIndex.value)
|
|
962
971
|
return void i2.closeCombobox();
|
|
963
972
|
i2.selectActiveOption(), 0 === i2.mode.value && i2.closeCombobox();
|
|
964
973
|
break;
|
|
965
|
-
case
|
|
966
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
967
|
-
case
|
|
968
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
974
|
+
case ht.ArrowDown:
|
|
975
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), Te(i2.comboboxState.value, { 0: () => i2.goToOption(yt.Next), 1: () => i2.openCombobox() });
|
|
976
|
+
case ht.ArrowUp:
|
|
977
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), Te(i2.comboboxState.value, { 0: () => i2.goToOption(yt.Previous), 1: () => {
|
|
969
978
|
i2.openCombobox(), v(() => {
|
|
970
|
-
i2.value.value || i2.goToOption(
|
|
979
|
+
i2.value.value || i2.goToOption(yt.Last);
|
|
971
980
|
});
|
|
972
981
|
} });
|
|
973
|
-
case
|
|
982
|
+
case ht.Home:
|
|
974
983
|
if (e3.shiftKey)
|
|
975
984
|
break;
|
|
976
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(
|
|
977
|
-
case
|
|
978
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(
|
|
979
|
-
case
|
|
985
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(yt.First);
|
|
986
|
+
case ht.PageUp:
|
|
987
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(yt.First);
|
|
988
|
+
case ht.End:
|
|
980
989
|
if (e3.shiftKey)
|
|
981
990
|
break;
|
|
982
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(
|
|
983
|
-
case
|
|
984
|
-
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(
|
|
985
|
-
case
|
|
991
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(yt.Last);
|
|
992
|
+
case ht.PageDown:
|
|
993
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(yt.Last);
|
|
994
|
+
case ht.Escape:
|
|
986
995
|
if (c2.value = false, 0 !== i2.comboboxState.value)
|
|
987
996
|
return;
|
|
988
997
|
e3.preventDefault(), i2.optionsRef.value && !i2.optionsPropsRef.value.static && e3.stopPropagation(), i2.nullable.value && 0 === i2.mode.value && null === i2.value.value && g2(), i2.closeCombobox();
|
|
989
998
|
break;
|
|
990
|
-
case
|
|
999
|
+
case ht.Tab:
|
|
991
1000
|
if (c2.value = false, 0 !== i2.comboboxState.value)
|
|
992
1001
|
return;
|
|
993
1002
|
0 === i2.mode.value && 1 !== i2.activationTrigger.value && i2.selectActiveOption(), i2.closeCombobox();
|
|
@@ -998,14 +1007,14 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
998
1007
|
}
|
|
999
1008
|
function k2(e3) {
|
|
1000
1009
|
var t3, l3, n3;
|
|
1001
|
-
let a3 = null != (t3 = e3.relatedTarget) ? t3 :
|
|
1002
|
-
if (c2.value = false, !(null != (l3 =
|
|
1010
|
+
let a3 = null != (t3 = e3.relatedTarget) ? t3 : bt.find((t4) => t4 !== e3.currentTarget);
|
|
1011
|
+
if (c2.value = false, !(null != (l3 = Ee(i2.optionsRef)) && l3.contains(a3) || null != (n3 = Ee(i2.buttonRef)) && n3.contains(a3) || 0 !== i2.comboboxState.value))
|
|
1003
1012
|
return e3.preventDefault(), 0 === i2.mode.value && (i2.nullable.value && null === i2.value.value ? g2() : 1 !== i2.activationTrigger.value && i2.selectActiveOption()), i2.closeCombobox();
|
|
1004
1013
|
}
|
|
1005
1014
|
function S2(e3) {
|
|
1006
1015
|
var t3, l3, n3;
|
|
1007
|
-
let a3 = null != (t3 = e3.relatedTarget) ? t3 :
|
|
1008
|
-
null != (l3 =
|
|
1016
|
+
let a3 = null != (t3 = e3.relatedTarget) ? t3 : bt.find((t4) => t4 !== e3.currentTarget);
|
|
1017
|
+
null != (l3 = Ee(i2.buttonRef)) && l3.contains(a3) || null != (n3 = Ee(i2.optionsRef)) && n3.contains(a3) || i2.disabled.value || i2.immediate.value && 0 !== i2.comboboxState.value && (i2.openCombobox(), kt().nextFrame(() => {
|
|
1009
1018
|
i2.setActivationTrigger(1);
|
|
1010
1019
|
}));
|
|
1011
1020
|
}
|
|
@@ -1015,57 +1024,57 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
1015
1024
|
});
|
|
1016
1025
|
return () => {
|
|
1017
1026
|
var t3, a3, o3, s2, u2, d3, c3;
|
|
1018
|
-
let p2 = { open: 0 === i2.comboboxState.value }, { displayValue: g3, onChange: m3, ...f3 } = e2, v2 = { "aria-controls": null == (t3 = i2.optionsRef.value) ? void 0 : t3.id, "aria-expanded": 0 === i2.comboboxState.value, "aria-activedescendant": null === i2.activeOptionIndex.value ? void 0 : i2.virtual.value ? null == (a3 = i2.options.value.find((e3) => !i2.virtual.value.disabled(e3.dataRef.value) && i2.compare(e3.dataRef.value, i2.virtual.value.options[i2.activeOptionIndex.value]))) ? void 0 : a3.id : null == (o3 = i2.options.value[i2.activeOptionIndex.value]) ? void 0 : o3.id, "aria-labelledby": null != (d3 = null == (s2 =
|
|
1019
|
-
return
|
|
1027
|
+
let p2 = { open: 0 === i2.comboboxState.value }, { displayValue: g3, onChange: m3, ...f3 } = e2, v2 = { "aria-controls": null == (t3 = i2.optionsRef.value) ? void 0 : t3.id, "aria-expanded": 0 === i2.comboboxState.value, "aria-activedescendant": null === i2.activeOptionIndex.value ? void 0 : i2.virtual.value ? null == (a3 = i2.options.value.find((e3) => !i2.virtual.value.disabled(e3.dataRef.value) && i2.compare(e3.dataRef.value, i2.virtual.value.options[i2.activeOptionIndex.value]))) ? void 0 : a3.id : null == (o3 = i2.options.value[i2.activeOptionIndex.value]) ? void 0 : o3.id, "aria-labelledby": null != (d3 = null == (s2 = Ee(i2.labelRef)) ? void 0 : s2.id) ? d3 : null == (u2 = Ee(i2.buttonRef)) ? void 0 : u2.id, "aria-autocomplete": "list", id: r2, onCompositionstart: h2, onCompositionend: y2, onKeydown: x2, onInput: w2, onFocus: S2, onBlur: k2, role: "combobox", type: null != (c3 = l2.type) ? c3 : "text", tabIndex: 0, ref: i2.inputRef, defaultValue: C2.value, disabled: true === i2.disabled.value || void 0 };
|
|
1028
|
+
return ot({ ourProps: v2, theirProps: f3, slot: p2, attrs: l2, slots: n2, features: nt.RenderStrategy | nt.Static, name: "ComboboxInput" });
|
|
1020
1029
|
};
|
|
1021
|
-
} }),
|
|
1022
|
-
let a2 =
|
|
1030
|
+
} }), Lt = k({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, hold: { type: [Boolean], default: false } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1031
|
+
let a2 = It("ComboboxOptions"), o2 = `headlessui-combobox-options-${De()}`;
|
|
1023
1032
|
n2({ el: a2.optionsRef, $el: a2.optionsRef }), h(() => {
|
|
1024
1033
|
a2.optionsPropsRef.value.static = e2.static;
|
|
1025
1034
|
}), h(() => {
|
|
1026
1035
|
a2.optionsPropsRef.value.hold = e2.hold;
|
|
1027
1036
|
});
|
|
1028
|
-
let r2 =
|
|
1029
|
-
return
|
|
1037
|
+
let r2 = ft(), i2 = u(() => null !== r2 ? (r2.value & mt.Open) === mt.Open : 0 === a2.comboboxState.value);
|
|
1038
|
+
return lt({ container: u(() => Ee(a2.optionsRef)), enabled: u(() => 0 === a2.comboboxState.value), accept: (e3) => "option" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1030
1039
|
e3.setAttribute("role", "none");
|
|
1031
1040
|
} }), () => {
|
|
1032
1041
|
var n3, r3, s2;
|
|
1033
1042
|
let u2 = { open: 0 === a2.comboboxState.value };
|
|
1034
|
-
return
|
|
1043
|
+
return ot({ ourProps: { "aria-labelledby": null != (s2 = null == (n3 = Ee(a2.labelRef)) ? void 0 : n3.id) ? s2 : null == (r3 = Ee(a2.buttonRef)) ? void 0 : r3.id, id: o2, ref: a2.optionsRef, role: "listbox", "aria-multiselectable": 1 === a2.mode.value || void 0 }, theirProps: dt(e2, ["hold"]), slot: u2, attrs: t2, slots: a2.virtual.value && 0 === a2.comboboxState.value ? { ...l2, default: () => [x(Pt, {}, l2.default)] } : l2, features: nt.RenderStrategy | nt.Static, visible: i2.value, name: "ComboboxOptions" });
|
|
1035
1044
|
};
|
|
1036
|
-
} }),
|
|
1037
|
-
let a2 =
|
|
1045
|
+
} }), Ft = k({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false }, order: { type: [Number], default: null } }, setup(e2, { slots: t2, attrs: l2, expose: n2 }) {
|
|
1046
|
+
let a2 = It("ComboboxOption"), o2 = `headlessui-combobox-option-${De()}`, r2 = s(null);
|
|
1038
1047
|
n2({ el: r2, $el: r2 });
|
|
1039
1048
|
let i2 = u(() => {
|
|
1040
1049
|
var t3;
|
|
1041
1050
|
return a2.virtual.value ? a2.activeOptionIndex.value === a2.calculateIndex(e2.value) : null !== a2.activeOptionIndex.value && (null == (t3 = a2.options.value[a2.activeOptionIndex.value]) ? void 0 : t3.id) === o2;
|
|
1042
|
-
}), d2 = u(() => a2.isSelected(e2.value)), c2 = f(
|
|
1051
|
+
}), d2 = u(() => a2.isSelected(e2.value)), c2 = f(_t, null), p2 = u(() => ({ disabled: e2.disabled, value: e2.value, domRef: r2, order: u(() => e2.order) }));
|
|
1043
1052
|
function g2(t3) {
|
|
1044
1053
|
var l3;
|
|
1045
1054
|
if (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value))
|
|
1046
1055
|
return t3.preventDefault();
|
|
1047
|
-
a2.selectOption(o2),
|
|
1056
|
+
a2.selectOption(o2), Ke() || requestAnimationFrame(() => {
|
|
1048
1057
|
var e3;
|
|
1049
|
-
return null == (e3 =
|
|
1058
|
+
return null == (e3 = Ee(a2.inputRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1050
1059
|
}), 0 === a2.mode.value && requestAnimationFrame(() => a2.closeCombobox());
|
|
1051
1060
|
}
|
|
1052
1061
|
function m2() {
|
|
1053
1062
|
var t3;
|
|
1054
1063
|
if (e2.disabled || null != (t3 = a2.virtual.value) && t3.disabled(e2.value))
|
|
1055
|
-
return a2.goToOption(
|
|
1064
|
+
return a2.goToOption(yt.Nothing);
|
|
1056
1065
|
let l3 = a2.calculateIndex(e2.value);
|
|
1057
|
-
a2.goToOption(
|
|
1066
|
+
a2.goToOption(yt.Specific, l3);
|
|
1058
1067
|
}
|
|
1059
1068
|
b(() => a2.registerOption(o2, p2)), O(() => a2.unregisterOption(o2, i2.value)), h(() => {
|
|
1060
|
-
let e3 =
|
|
1069
|
+
let e3 = Ee(r2);
|
|
1061
1070
|
e3 && (null == c2 || c2.value.measureElement(e3));
|
|
1062
1071
|
}), h(() => {
|
|
1063
1072
|
0 === a2.comboboxState.value && i2.value && (a2.virtual.value || 0 !== a2.activationTrigger.value && v(() => {
|
|
1064
1073
|
var e3, t3;
|
|
1065
|
-
return null == (t3 = null == (e3 =
|
|
1074
|
+
return null == (t3 = null == (e3 = Ee(r2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1066
1075
|
}));
|
|
1067
1076
|
});
|
|
1068
|
-
let y2 =
|
|
1077
|
+
let y2 = tt();
|
|
1069
1078
|
function x2(e3) {
|
|
1070
1079
|
y2.update(e3);
|
|
1071
1080
|
}
|
|
@@ -1074,47 +1083,47 @@ let Tt = Symbol("VirtualContext"), Et = k({ name: "VirtualProvider", setup(e2, {
|
|
|
1074
1083
|
if (!y2.wasMoved(t3) || e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value)
|
|
1075
1084
|
return;
|
|
1076
1085
|
let n3 = a2.calculateIndex(e2.value);
|
|
1077
|
-
a2.goToOption(
|
|
1086
|
+
a2.goToOption(yt.Specific, n3, 0);
|
|
1078
1087
|
}
|
|
1079
1088
|
function k2(t3) {
|
|
1080
1089
|
var l3;
|
|
1081
|
-
y2.wasMoved(t3) && (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value && (a2.optionsPropsRef.value.hold || a2.goToOption(
|
|
1090
|
+
y2.wasMoved(t3) && (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value && (a2.optionsPropsRef.value.hold || a2.goToOption(yt.Nothing)));
|
|
1082
1091
|
}
|
|
1083
1092
|
return () => {
|
|
1084
1093
|
let { disabled: n3 } = e2, a3 = { active: i2.value, selected: d2.value, disabled: n3 };
|
|
1085
|
-
return
|
|
1094
|
+
return ot({ ourProps: { id: o2, ref: r2, role: "option", tabIndex: true === n3 ? void 0 : -1, "aria-disabled": true === n3 || void 0, "aria-selected": d2.value, disabled: void 0, onClick: g2, onFocus: m2, onPointerenter: x2, onMouseenter: x2, onPointermove: w2, onMousemove: w2, onPointerleave: k2, onMouseleave: k2 }, theirProps: dt(e2, ["order", "value"]), slot: a3, attrs: l2, slots: t2, name: "ComboboxOption" });
|
|
1086
1095
|
};
|
|
1087
1096
|
} });
|
|
1088
|
-
function
|
|
1089
|
-
|
|
1097
|
+
function Nt(e2, t2, l2, n2) {
|
|
1098
|
+
Pe.isServer || h((a2) => {
|
|
1090
1099
|
(e2 = null != e2 ? e2 : window).addEventListener(t2, l2, n2), a2(() => e2.removeEventListener(t2, l2, n2));
|
|
1091
1100
|
});
|
|
1092
1101
|
}
|
|
1093
|
-
var
|
|
1094
|
-
function
|
|
1102
|
+
var zt = ((e2) => (e2[e2.Forwards = 0] = "Forwards", e2[e2.Backwards = 1] = "Backwards", e2))(zt || {});
|
|
1103
|
+
function $t(e2) {
|
|
1095
1104
|
if (!e2)
|
|
1096
1105
|
return /* @__PURE__ */ new Set();
|
|
1097
1106
|
if ("function" == typeof e2)
|
|
1098
1107
|
return new Set(e2());
|
|
1099
1108
|
let t2 = /* @__PURE__ */ new Set();
|
|
1100
1109
|
for (let l2 of e2.value) {
|
|
1101
|
-
let e3 =
|
|
1110
|
+
let e3 = Ee(l2);
|
|
1102
1111
|
e3 instanceof HTMLElement && t2.add(e3);
|
|
1103
1112
|
}
|
|
1104
1113
|
return t2;
|
|
1105
1114
|
}
|
|
1106
|
-
var
|
|
1107
|
-
let
|
|
1115
|
+
var Vt = ((e2) => (e2[e2.None = 1] = "None", e2[e2.InitialFocus = 2] = "InitialFocus", e2[e2.TabLock = 4] = "TabLock", e2[e2.FocusLock = 8] = "FocusLock", e2[e2.RestoreFocus = 16] = "RestoreFocus", e2[e2.All = 30] = "All", e2))(Vt || {});
|
|
1116
|
+
let Ht = Object.assign(k({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: s(/* @__PURE__ */ new Set()) } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1108
1117
|
let a2 = s(null);
|
|
1109
1118
|
n2({ el: a2, $el: a2 });
|
|
1110
|
-
let o2 = u(() =>
|
|
1119
|
+
let o2 = u(() => je(a2)), r2 = s(false);
|
|
1111
1120
|
b(() => r2.value = true), O(() => r2.value = false), function({ ownerDocument: e3 }, t3) {
|
|
1112
1121
|
let l3 = function(e4) {
|
|
1113
|
-
let t4 = s(
|
|
1122
|
+
let t4 = s(bt.slice());
|
|
1114
1123
|
return p([e4], ([e5], [l4]) => {
|
|
1115
|
-
true === l4 && false === e5 ?
|
|
1124
|
+
true === l4 && false === e5 ? wt(() => {
|
|
1116
1125
|
t4.value.splice(0);
|
|
1117
|
-
}) : false === l4 && true === e5 && (t4.value =
|
|
1126
|
+
}) : false === l4 && true === e5 && (t4.value = bt.slice());
|
|
1118
1127
|
}, { flush: "post" }), () => {
|
|
1119
1128
|
var e5;
|
|
1120
1129
|
return null != (e5 = t4.value.find((e6) => null != e6 && e6.isConnected)) ? e5 : null;
|
|
@@ -1123,10 +1132,10 @@ let zt = Object.assign(k({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1123
1132
|
b(() => {
|
|
1124
1133
|
h(() => {
|
|
1125
1134
|
var n3, a3;
|
|
1126
|
-
t3.value || (null == (n3 = e3.value) ? void 0 : n3.activeElement) === (null == (a3 = e3.value) ? void 0 : a3.body) &&
|
|
1135
|
+
t3.value || (null == (n3 = e3.value) ? void 0 : n3.activeElement) === (null == (a3 = e3.value) ? void 0 : a3.body) && He(l3());
|
|
1127
1136
|
}, { flush: "post" });
|
|
1128
1137
|
}), O(() => {
|
|
1129
|
-
t3.value &&
|
|
1138
|
+
t3.value && He(l3());
|
|
1130
1139
|
});
|
|
1131
1140
|
}({ ownerDocument: o2 }, u(() => r2.value && Boolean(16 & e2.features)));
|
|
1132
1141
|
let i2 = function({ ownerDocument: e3, container: t3, initialFocus: l3 }, n3) {
|
|
@@ -1135,48 +1144,48 @@ let zt = Object.assign(k({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1135
1144
|
p([t3, l3, n3], (r3, i3) => {
|
|
1136
1145
|
if (r3.every((e4, t4) => (null == i3 ? void 0 : i3[t4]) === e4) || !n3.value)
|
|
1137
1146
|
return;
|
|
1138
|
-
let s2 =
|
|
1139
|
-
s2 &&
|
|
1147
|
+
let s2 = Ee(t3);
|
|
1148
|
+
s2 && wt(() => {
|
|
1140
1149
|
var t4, n4;
|
|
1141
1150
|
if (!o3.value)
|
|
1142
1151
|
return;
|
|
1143
|
-
let r4 =
|
|
1152
|
+
let r4 = Ee(l3), i4 = null == (t4 = e3.value) ? void 0 : t4.activeElement;
|
|
1144
1153
|
if (r4) {
|
|
1145
1154
|
if (r4 === i4)
|
|
1146
1155
|
return void (a3.value = i4);
|
|
1147
1156
|
} else if (s2.contains(i4))
|
|
1148
1157
|
return void (a3.value = i4);
|
|
1149
|
-
r4 ?
|
|
1158
|
+
r4 ? He(r4) : qe(s2, Be.First | Be.NoScroll) === Ae.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), a3.value = null == (n4 = e3.value) ? void 0 : n4.activeElement;
|
|
1150
1159
|
});
|
|
1151
1160
|
}, { immediate: true, flush: "post" });
|
|
1152
1161
|
}), a3;
|
|
1153
1162
|
}({ ownerDocument: o2, container: a2, initialFocus: u(() => e2.initialFocus) }, u(() => r2.value && Boolean(2 & e2.features)));
|
|
1154
1163
|
!function({ ownerDocument: e3, container: t3, containers: l3, previousActiveElement: n3 }, a3) {
|
|
1155
1164
|
var o3;
|
|
1156
|
-
|
|
1165
|
+
Nt(null == (o3 = e3.value) ? void 0 : o3.defaultView, "focus", (e4) => {
|
|
1157
1166
|
if (!a3.value)
|
|
1158
1167
|
return;
|
|
1159
|
-
let o4 =
|
|
1160
|
-
|
|
1168
|
+
let o4 = $t(l3);
|
|
1169
|
+
Ee(t3) instanceof HTMLElement && o4.add(Ee(t3));
|
|
1161
1170
|
let r3 = n3.value;
|
|
1162
1171
|
if (!r3)
|
|
1163
1172
|
return;
|
|
1164
1173
|
let i3 = e4.target;
|
|
1165
|
-
i3 && i3 instanceof HTMLElement ?
|
|
1174
|
+
i3 && i3 instanceof HTMLElement ? Yt(o4, i3) ? (n3.value = i3, He(i3)) : (e4.preventDefault(), e4.stopPropagation(), He(r3)) : He(n3.value);
|
|
1166
1175
|
}, true);
|
|
1167
1176
|
}({ ownerDocument: o2, container: a2, containers: e2.containers, previousActiveElement: i2 }, u(() => r2.value && Boolean(8 & e2.features)));
|
|
1168
1177
|
let d2 = function() {
|
|
1169
1178
|
let e3 = s(0);
|
|
1170
|
-
return
|
|
1179
|
+
return Ge("keydown", (t3) => {
|
|
1171
1180
|
"Tab" === t3.key && (e3.value = t3.shiftKey ? 1 : 0);
|
|
1172
1181
|
}), e3;
|
|
1173
1182
|
}();
|
|
1174
1183
|
function c2(e3) {
|
|
1175
|
-
let t3 =
|
|
1176
|
-
t3 &&
|
|
1177
|
-
|
|
1178
|
-
}, [
|
|
1179
|
-
|
|
1184
|
+
let t3 = Ee(a2);
|
|
1185
|
+
t3 && Te(d2.value, { [zt.Forwards]: () => {
|
|
1186
|
+
qe(t3, Be.First, { skipElements: [e3.relatedTarget] });
|
|
1187
|
+
}, [zt.Backwards]: () => {
|
|
1188
|
+
qe(t3, Be.Last, { skipElements: [e3.relatedTarget] });
|
|
1180
1189
|
} });
|
|
1181
1190
|
}
|
|
1182
1191
|
let g2 = s(false);
|
|
@@ -1188,23 +1197,23 @@ let zt = Object.assign(k({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1188
1197
|
function f2(t3) {
|
|
1189
1198
|
if (!r2.value)
|
|
1190
1199
|
return;
|
|
1191
|
-
let l3 =
|
|
1192
|
-
|
|
1200
|
+
let l3 = $t(e2.containers);
|
|
1201
|
+
Ee(a2) instanceof HTMLElement && l3.add(Ee(a2));
|
|
1193
1202
|
let n3 = t3.relatedTarget;
|
|
1194
|
-
n3 instanceof HTMLElement && "true" !== n3.dataset.headlessuiFocusGuard && (
|
|
1203
|
+
n3 instanceof HTMLElement && "true" !== n3.dataset.headlessuiFocusGuard && (Yt(l3, n3) || (g2.value ? qe(Ee(a2), Te(d2.value, { [zt.Forwards]: () => Be.Next, [zt.Backwards]: () => Be.Previous }) | Be.WrapAround, { relativeTo: t3.target }) : t3.target instanceof HTMLElement && He(t3.target)));
|
|
1195
1204
|
}
|
|
1196
1205
|
return () => {
|
|
1197
1206
|
let n3 = { ref: a2, onKeydown: m2, onFocusout: f2 }, { features: o3, initialFocus: r3, containers: i3, ...s2 } = e2;
|
|
1198
|
-
return x(w, [Boolean(4 & o3) && x(
|
|
1207
|
+
return x(w, [Boolean(4 & o3) && x(pt, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: ct.Focusable }), ot({ ourProps: n3, theirProps: { ...t2, ...s2 }, slot: {}, attrs: t2, slots: l2, name: "FocusTrap" }), Boolean(4 & o3) && x(pt, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: ct.Focusable })]);
|
|
1199
1208
|
};
|
|
1200
|
-
} }), { features:
|
|
1201
|
-
function
|
|
1209
|
+
} }), { features: Vt });
|
|
1210
|
+
function Yt(e2, t2) {
|
|
1202
1211
|
for (let l2 of e2)
|
|
1203
1212
|
if (l2.contains(t2))
|
|
1204
1213
|
return true;
|
|
1205
1214
|
return false;
|
|
1206
1215
|
}
|
|
1207
|
-
function
|
|
1216
|
+
function Ut() {
|
|
1208
1217
|
let e2;
|
|
1209
1218
|
return { before({ doc: t2 }) {
|
|
1210
1219
|
var l2;
|
|
@@ -1215,13 +1224,13 @@ function Vt() {
|
|
|
1215
1224
|
l2.style(n2, "paddingRight", `${o2}px`);
|
|
1216
1225
|
} };
|
|
1217
1226
|
}
|
|
1218
|
-
function
|
|
1227
|
+
function qt(e2) {
|
|
1219
1228
|
let t2 = {};
|
|
1220
1229
|
for (let l2 of e2)
|
|
1221
1230
|
Object.assign(t2, l2(t2));
|
|
1222
1231
|
return t2;
|
|
1223
1232
|
}
|
|
1224
|
-
let
|
|
1233
|
+
let Wt = function(e2, t2) {
|
|
1225
1234
|
let l2 = e2(), n2 = /* @__PURE__ */ new Set();
|
|
1226
1235
|
return { getSnapshot: () => l2, subscribe: (e3) => (n2.add(e3), () => n2.delete(e3)), dispatch(e3, ...a2) {
|
|
1227
1236
|
let o2 = t2[e3].call(l2, ...a2);
|
|
@@ -1229,20 +1238,20 @@ let Yt = function(e2, t2) {
|
|
|
1229
1238
|
} };
|
|
1230
1239
|
}(() => /* @__PURE__ */ new Map(), { PUSH(e2, t2) {
|
|
1231
1240
|
var l2;
|
|
1232
|
-
let n2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d:
|
|
1241
|
+
let n2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d: kt(), meta: /* @__PURE__ */ new Set() };
|
|
1233
1242
|
return n2.count++, n2.meta.add(t2), this.set(e2, n2), this;
|
|
1234
1243
|
}, POP(e2, t2) {
|
|
1235
1244
|
let l2 = this.get(e2);
|
|
1236
1245
|
return l2 && (l2.count--, l2.meta.delete(t2)), this;
|
|
1237
1246
|
}, SCROLL_PREVENT({ doc: e2, d: t2, meta: l2 }) {
|
|
1238
|
-
let n2 = { doc: e2, d: t2, meta:
|
|
1247
|
+
let n2 = { doc: e2, d: t2, meta: qt(l2) }, a2 = [We() ? { before({ doc: e3, d: t3, meta: l3 }) {
|
|
1239
1248
|
function n3(e4) {
|
|
1240
1249
|
return l3.containers.flatMap((e5) => e5()).some((t4) => t4.contains(e4));
|
|
1241
1250
|
}
|
|
1242
1251
|
t3.microTask(() => {
|
|
1243
1252
|
var l4;
|
|
1244
1253
|
if ("auto" !== window.getComputedStyle(e3.documentElement).scrollBehavior) {
|
|
1245
|
-
let l5 =
|
|
1254
|
+
let l5 = kt();
|
|
1246
1255
|
l5.style(e3.documentElement, "scrollBehavior", "auto"), t3.add(() => t3.microTask(() => l5.dispose()));
|
|
1247
1256
|
}
|
|
1248
1257
|
let a3 = null != (l4 = window.scrollY) ? l4 : window.pageYOffset, o2 = null;
|
|
@@ -1280,7 +1289,7 @@ let Yt = function(e2, t2) {
|
|
|
1280
1289
|
a3 !== t4 && window.scrollTo(0, a3), o2 && o2.isConnected && (o2.scrollIntoView({ block: "nearest" }), o2 = null);
|
|
1281
1290
|
});
|
|
1282
1291
|
});
|
|
1283
|
-
} } : {},
|
|
1292
|
+
} } : {}, Ut(), { before({ doc: e3, d: t3 }) {
|
|
1284
1293
|
t3.style(e3.documentElement, "overflow", "hidden");
|
|
1285
1294
|
} }];
|
|
1286
1295
|
a2.forEach(({ before: e3 }) => null == e3 ? void 0 : e3(n2)), a2.forEach(({ after: e3 }) => null == e3 ? void 0 : e3(n2));
|
|
@@ -1289,69 +1298,69 @@ let Yt = function(e2, t2) {
|
|
|
1289
1298
|
}, TEARDOWN({ doc: e2 }) {
|
|
1290
1299
|
this.delete(e2);
|
|
1291
1300
|
} });
|
|
1292
|
-
function
|
|
1301
|
+
function Kt(e2, t2, l2) {
|
|
1293
1302
|
let n2 = function(e3) {
|
|
1294
1303
|
let t3 = c(e3.getSnapshot());
|
|
1295
1304
|
return O(e3.subscribe(() => {
|
|
1296
1305
|
t3.value = e3.getSnapshot();
|
|
1297
1306
|
})), t3;
|
|
1298
|
-
}(
|
|
1307
|
+
}(Wt), a2 = u(() => {
|
|
1299
1308
|
let t3 = e2.value ? n2.value.get(e2.value) : void 0;
|
|
1300
1309
|
return !!t3 && t3.count > 0;
|
|
1301
1310
|
});
|
|
1302
1311
|
return p([e2, t2], ([e3, t3], [n3], a3) => {
|
|
1303
1312
|
if (!e3 || !t3)
|
|
1304
1313
|
return;
|
|
1305
|
-
|
|
1314
|
+
Wt.dispatch("PUSH", e3, l2);
|
|
1306
1315
|
let o2 = false;
|
|
1307
1316
|
a3(() => {
|
|
1308
|
-
o2 || (
|
|
1317
|
+
o2 || (Wt.dispatch("POP", null != n3 ? n3 : e3, l2), o2 = true);
|
|
1309
1318
|
});
|
|
1310
1319
|
}, { immediate: true }), a2;
|
|
1311
1320
|
}
|
|
1312
|
-
|
|
1313
|
-
let e2 =
|
|
1321
|
+
Wt.subscribe(() => {
|
|
1322
|
+
let e2 = Wt.getSnapshot(), t2 = /* @__PURE__ */ new Map();
|
|
1314
1323
|
for (let [l2] of e2)
|
|
1315
1324
|
t2.set(l2, l2.documentElement.style.overflow);
|
|
1316
1325
|
for (let l2 of e2.values()) {
|
|
1317
1326
|
let e3 = "hidden" === t2.get(l2.doc), n2 = 0 !== l2.count;
|
|
1318
|
-
(n2 && !e3 || !n2 && e3) &&
|
|
1327
|
+
(n2 && !e3 || !n2 && e3) && Wt.dispatch(l2.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", l2), 0 === l2.count && Wt.dispatch("TEARDOWN", l2);
|
|
1319
1328
|
}
|
|
1320
1329
|
});
|
|
1321
|
-
let
|
|
1322
|
-
function
|
|
1330
|
+
let Jt = /* @__PURE__ */ new Map(), Gt = /* @__PURE__ */ new Map();
|
|
1331
|
+
function Zt(e2, t2 = s(true)) {
|
|
1323
1332
|
h((l2) => {
|
|
1324
1333
|
var n2;
|
|
1325
1334
|
if (!t2.value)
|
|
1326
1335
|
return;
|
|
1327
|
-
let a2 =
|
|
1336
|
+
let a2 = Ee(e2);
|
|
1328
1337
|
if (!a2)
|
|
1329
1338
|
return;
|
|
1330
1339
|
l2(function() {
|
|
1331
1340
|
var e3;
|
|
1332
1341
|
if (!a2)
|
|
1333
1342
|
return;
|
|
1334
|
-
let t3 = null != (e3 =
|
|
1335
|
-
if (1 === t3 ?
|
|
1343
|
+
let t3 = null != (e3 = Gt.get(a2)) ? e3 : 1;
|
|
1344
|
+
if (1 === t3 ? Gt.delete(a2) : Gt.set(a2, t3 - 1), 1 !== t3)
|
|
1336
1345
|
return;
|
|
1337
|
-
let l3 =
|
|
1338
|
-
l3 && (null === l3["aria-hidden"] ? a2.removeAttribute("aria-hidden") : a2.setAttribute("aria-hidden", l3["aria-hidden"]), a2.inert = l3.inert,
|
|
1346
|
+
let l3 = Jt.get(a2);
|
|
1347
|
+
l3 && (null === l3["aria-hidden"] ? a2.removeAttribute("aria-hidden") : a2.setAttribute("aria-hidden", l3["aria-hidden"]), a2.inert = l3.inert, Jt.delete(a2));
|
|
1339
1348
|
});
|
|
1340
|
-
let o2 = null != (n2 =
|
|
1341
|
-
|
|
1349
|
+
let o2 = null != (n2 = Gt.get(a2)) ? n2 : 0;
|
|
1350
|
+
Gt.set(a2, o2 + 1), 0 === o2 && (Jt.set(a2, { "aria-hidden": a2.getAttribute("aria-hidden"), inert: a2.inert }), a2.setAttribute("aria-hidden", "true"), a2.inert = true);
|
|
1342
1351
|
});
|
|
1343
1352
|
}
|
|
1344
|
-
let
|
|
1345
|
-
function
|
|
1346
|
-
return f(
|
|
1353
|
+
let Xt = Symbol("ForcePortalRootContext");
|
|
1354
|
+
function Qt() {
|
|
1355
|
+
return f(Xt, false);
|
|
1347
1356
|
}
|
|
1348
|
-
let
|
|
1357
|
+
let el = k({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup: (e2, { slots: t2, attrs: l2 }) => (S(Xt, e2.force), () => {
|
|
1349
1358
|
let { force: n2, ...a2 } = e2;
|
|
1350
|
-
return
|
|
1351
|
-
}) }),
|
|
1352
|
-
var
|
|
1353
|
-
function
|
|
1354
|
-
let a2 = f(
|
|
1359
|
+
return ot({ theirProps: a2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "ForcePortalRoot" });
|
|
1360
|
+
}) }), tl = Symbol("StackContext");
|
|
1361
|
+
var ll = ((e2) => (e2[e2.Add = 0] = "Add", e2[e2.Remove = 1] = "Remove", e2))(ll || {});
|
|
1362
|
+
function nl({ type: e2, enabled: t2, element: l2, onUpdate: n2 }) {
|
|
1363
|
+
let a2 = f(tl, () => {
|
|
1355
1364
|
});
|
|
1356
1365
|
function o2(...e3) {
|
|
1357
1366
|
null == n2 || n2(...e3), a2(...e3);
|
|
@@ -1362,12 +1371,12 @@ function el({ type: e2, enabled: t2, element: l2, onUpdate: n2 }) {
|
|
|
1362
1371
|
}, { immediate: true, flush: "sync" });
|
|
1363
1372
|
}), O(() => {
|
|
1364
1373
|
t2.value && o2(1, e2, l2);
|
|
1365
|
-
}), S(
|
|
1374
|
+
}), S(tl, o2);
|
|
1366
1375
|
}
|
|
1367
|
-
let
|
|
1368
|
-
function
|
|
1376
|
+
let al = Symbol("DescriptionContext");
|
|
1377
|
+
function ol({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {}) {
|
|
1369
1378
|
let n2 = s([]);
|
|
1370
|
-
return S(
|
|
1379
|
+
return S(al, { register: function(e3) {
|
|
1371
1380
|
return n2.value.push(e3), () => {
|
|
1372
1381
|
let t3 = n2.value.indexOf(e3);
|
|
1373
1382
|
-1 !== t3 && n2.value.splice(t3, 1);
|
|
@@ -1376,20 +1385,20 @@ function ll({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {})
|
|
|
1376
1385
|
}
|
|
1377
1386
|
k({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1378
1387
|
var n2;
|
|
1379
|
-
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-description-${
|
|
1380
|
-
let e3 = f(
|
|
1388
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-description-${De()}`, o2 = function() {
|
|
1389
|
+
let e3 = f(al, null);
|
|
1381
1390
|
if (null === e3)
|
|
1382
1391
|
throw new Error("Missing parent");
|
|
1383
1392
|
return e3;
|
|
1384
1393
|
}();
|
|
1385
1394
|
return b(() => O(o2.register(a2))), () => {
|
|
1386
1395
|
let { name: n3 = "Description", slot: r2 = s({}), props: i2 = {} } = o2, { ...u2 } = e2, c2 = { ...Object.entries(i2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: a2 };
|
|
1387
|
-
return
|
|
1396
|
+
return ot({ ourProps: c2, theirProps: u2, slot: r2.value, attrs: t2, slots: l2, name: n3 });
|
|
1388
1397
|
};
|
|
1389
1398
|
} });
|
|
1390
|
-
let
|
|
1391
|
-
let n2 = s(null), a2 = u(() =>
|
|
1392
|
-
let t3 =
|
|
1399
|
+
let rl = k({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1400
|
+
let n2 = s(null), a2 = u(() => je(n2)), o2 = Qt(), r2 = f(sl, null), i2 = s(true === o2 || null == r2 ? function(e3) {
|
|
1401
|
+
let t3 = je(e3);
|
|
1393
1402
|
if (!t3) {
|
|
1394
1403
|
if (null === e3)
|
|
1395
1404
|
return null;
|
|
@@ -1406,11 +1415,11 @@ let nl = k({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
1406
1415
|
}), h(() => {
|
|
1407
1416
|
o2 || null != r2 && (i2.value = r2.resolveTarget());
|
|
1408
1417
|
});
|
|
1409
|
-
let c2 = f(
|
|
1418
|
+
let c2 = f(il, null), g2 = false, m2 = D();
|
|
1410
1419
|
return p(n2, () => {
|
|
1411
1420
|
if (g2 || !c2)
|
|
1412
1421
|
return;
|
|
1413
|
-
let e3 =
|
|
1422
|
+
let e3 = Ee(n2);
|
|
1414
1423
|
e3 && (O(c2.register(e3), m2), g2 = true);
|
|
1415
1424
|
}), O(() => {
|
|
1416
1425
|
var e3, t3;
|
|
@@ -1420,39 +1429,39 @@ let nl = k({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
1420
1429
|
if (!d2.value || null === i2.value)
|
|
1421
1430
|
return null;
|
|
1422
1431
|
let a3 = { ref: n2, "data-headlessui-portal": "" };
|
|
1423
|
-
return x(
|
|
1432
|
+
return x(E, { to: i2.value }, ot({ ourProps: a3, theirProps: e2, slot: {}, attrs: l2, slots: t2, name: "Portal" }));
|
|
1424
1433
|
};
|
|
1425
|
-
} }),
|
|
1426
|
-
let
|
|
1434
|
+
} }), il = Symbol("PortalParentContext");
|
|
1435
|
+
let sl = Symbol("PortalGroupContext"), ul = k({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1427
1436
|
let n2 = C({ resolveTarget: () => e2.target });
|
|
1428
|
-
return S(
|
|
1437
|
+
return S(sl, n2), () => {
|
|
1429
1438
|
let { target: n3, ...a2 } = e2;
|
|
1430
|
-
return
|
|
1439
|
+
return ot({ theirProps: a2, ourProps: {}, slot: {}, attrs: t2, slots: l2, name: "PortalGroup" });
|
|
1431
1440
|
};
|
|
1432
1441
|
} });
|
|
1433
|
-
var
|
|
1434
|
-
let
|
|
1435
|
-
function
|
|
1436
|
-
let t2 = f(
|
|
1442
|
+
var dl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(dl || {});
|
|
1443
|
+
let cl = Symbol("DialogContext");
|
|
1444
|
+
function pl(e2) {
|
|
1445
|
+
let t2 = f(cl, null);
|
|
1437
1446
|
if (null === t2) {
|
|
1438
1447
|
let t3 = new Error(`<${e2} /> is missing a parent <Dialog /> component.`);
|
|
1439
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1448
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, pl), t3;
|
|
1440
1449
|
}
|
|
1441
1450
|
return t2;
|
|
1442
1451
|
}
|
|
1443
|
-
let
|
|
1452
|
+
let gl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", ml = k({ name: "Dialog", inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, open: { type: [Boolean, String], default: gl }, initialFocus: { type: Object, default: null }, id: { type: String, default: null }, role: { type: String, default: "dialog" } }, emits: { close: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1444
1453
|
var o2, r2;
|
|
1445
|
-
let i2 = null != (o2 = e2.id) ? o2 : `headlessui-dialog-${
|
|
1454
|
+
let i2 = null != (o2 = e2.id) ? o2 : `headlessui-dialog-${De()}`, d2 = s(false);
|
|
1446
1455
|
b(() => {
|
|
1447
1456
|
d2.value = true;
|
|
1448
1457
|
});
|
|
1449
|
-
let c2 = false, p2 = u(() => "dialog" === e2.role || "alertdialog" === e2.role ? e2.role : (c2 || (c2 = true, console.warn(`Invalid role [${p2}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), g2 = s(0), m2 =
|
|
1450
|
-
if (a2({ el: w2, $el: w2 }), e2.open ===
|
|
1458
|
+
let c2 = false, p2 = u(() => "dialog" === e2.role || "alertdialog" === e2.role ? e2.role : (c2 || (c2 = true, console.warn(`Invalid role [${p2}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), g2 = s(0), m2 = ft(), y2 = u(() => e2.open === gl && null !== m2 ? (m2.value & mt.Open) === mt.Open : e2.open), w2 = s(null), C2 = u(() => je(w2));
|
|
1459
|
+
if (a2({ el: w2, $el: w2 }), e2.open === gl && null === m2)
|
|
1451
1460
|
throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1452
1461
|
if ("boolean" != typeof y2.value)
|
|
1453
|
-
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${y2.value ===
|
|
1454
|
-
let O2 = u(() => d2.value && y2.value ? 0 : 1), M2 = u(() => 0 === O2.value), D2 = u(() => g2.value > 1),
|
|
1455
|
-
let e3 = f(
|
|
1462
|
+
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${y2.value === gl ? void 0 : e2.open}`);
|
|
1463
|
+
let O2 = u(() => d2.value && y2.value ? 0 : 1), M2 = u(() => 0 === O2.value), D2 = u(() => g2.value > 1), E2 = null !== f(cl, null), [T2, I2] = function() {
|
|
1464
|
+
let e3 = f(il, null), t3 = s([]);
|
|
1456
1465
|
function l3(l4) {
|
|
1457
1466
|
let n4 = t3.value.indexOf(l4);
|
|
1458
1467
|
-1 !== n4 && t3.value.splice(n4, 1), e3 && e3.unregister(l4);
|
|
@@ -1460,12 +1469,12 @@ let dl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", cl = k({ name: "Dialog", inheri
|
|
|
1460
1469
|
let n3 = { register: function(n4) {
|
|
1461
1470
|
return t3.value.push(n4), e3 && e3.register(n4), () => l3(n4);
|
|
1462
1471
|
}, unregister: l3, portals: t3 };
|
|
1463
|
-
return [t3, k({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (S(
|
|
1472
|
+
return [t3, k({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (S(il, n3), () => {
|
|
1464
1473
|
var e5;
|
|
1465
1474
|
return null == (e5 = t4.default) ? void 0 : e5.call(t4);
|
|
1466
1475
|
}) })];
|
|
1467
1476
|
}(), { resolveContainers: _2, mainTreeNodeRef: P2, MainTreeNode: j2 } = function({ defaultContainers: e3 = [], portals: t3, mainTreeNodeRef: l3 } = {}) {
|
|
1468
|
-
let n3 = s(null), a3 =
|
|
1477
|
+
let n3 = s(null), a3 = je(n3);
|
|
1469
1478
|
function o3() {
|
|
1470
1479
|
var l4, o4, r3;
|
|
1471
1480
|
let i3 = [];
|
|
@@ -1475,48 +1484,48 @@ let dl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", cl = k({ name: "Dialog", inheri
|
|
|
1475
1484
|
for (let e4 of t3.value)
|
|
1476
1485
|
i3.push(e4);
|
|
1477
1486
|
for (let e4 of null != (l4 = null == a3 ? void 0 : a3.querySelectorAll("html > *, body > *")) ? l4 : [])
|
|
1478
|
-
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1487
|
+
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(Ee(n3)) || e4.contains(null == (r3 = null == (o4 = Ee(n3)) ? void 0 : o4.getRootNode()) ? void 0 : r3.host) || i3.some((t4) => e4.contains(t4)) || i3.push(e4));
|
|
1479
1488
|
return i3;
|
|
1480
1489
|
}
|
|
1481
|
-
return { resolveContainers: o3, contains: (e4) => o3().some((t4) => t4.contains(e4)), mainTreeNodeRef: n3, MainTreeNode: () => null != l3 ? null : x(
|
|
1482
|
-
}({ portals:
|
|
1490
|
+
return { resolveContainers: o3, contains: (e4) => o3().some((t4) => t4.contains(e4)), mainTreeNodeRef: n3, MainTreeNode: () => null != l3 ? null : x(pt, { features: ct.Hidden, ref: n3 }) };
|
|
1491
|
+
}({ portals: T2, defaultContainers: [u(() => {
|
|
1483
1492
|
var e3;
|
|
1484
1493
|
return null != (e3 = V2.panelRef.value) ? e3 : w2.value;
|
|
1485
|
-
})] }), R2 = u(() => D2.value ? "parent" : "leaf"), B2 = u(() => null !== m2 && (m2.value &
|
|
1494
|
+
})] }), R2 = u(() => D2.value ? "parent" : "leaf"), B2 = u(() => null !== m2 && (m2.value & mt.Closing) === mt.Closing), A2 = u(() => !E2 && !B2.value && M2.value), L2 = u(() => {
|
|
1486
1495
|
var e3, t3, l3;
|
|
1487
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1496
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(Ee(P2)) && e4 instanceof HTMLElement))) ? l3 : null;
|
|
1488
1497
|
});
|
|
1489
|
-
|
|
1498
|
+
Zt(L2, A2);
|
|
1490
1499
|
let F2 = u(() => !!D2.value || M2.value), N2 = u(() => {
|
|
1491
1500
|
var e3, t3, l3;
|
|
1492
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(
|
|
1501
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(Ee(P2)) && e4 instanceof HTMLElement)) ? l3 : null;
|
|
1493
1502
|
});
|
|
1494
|
-
|
|
1503
|
+
Zt(N2, F2), nl({ type: "Dialog", enabled: u(() => 0 === O2.value), element: w2, onUpdate: (e3, t3) => {
|
|
1495
1504
|
if ("Dialog" === t3)
|
|
1496
|
-
return
|
|
1505
|
+
return Te(e3, { [ll.Add]: () => g2.value += 1, [ll.Remove]: () => g2.value -= 1 });
|
|
1497
1506
|
} });
|
|
1498
|
-
let z2 =
|
|
1507
|
+
let z2 = ol({ name: "DialogDescription", slot: u(() => ({ open: y2.value })) }), $2 = s(null), V2 = { titleId: $2, panelRef: s(null), dialogState: O2, setTitleId(e3) {
|
|
1499
1508
|
$2.value !== e3 && ($2.value = e3);
|
|
1500
1509
|
}, close() {
|
|
1501
1510
|
t2("close", false);
|
|
1502
1511
|
} };
|
|
1503
|
-
S(
|
|
1512
|
+
S(cl, V2);
|
|
1504
1513
|
let H2 = u(() => !(!M2.value || D2.value));
|
|
1505
|
-
|
|
1514
|
+
Ze(_2, (e3, t3) => {
|
|
1506
1515
|
e3.preventDefault(), V2.close(), v(() => null == t3 ? void 0 : t3.focus());
|
|
1507
1516
|
}, H2);
|
|
1508
1517
|
let Y2 = u(() => !(D2.value || 0 !== O2.value));
|
|
1509
|
-
|
|
1510
|
-
Y2.value && (e3.defaultPrevented || e3.key ===
|
|
1518
|
+
Nt(null == (r2 = C2.value) ? void 0 : r2.defaultView, "keydown", (e3) => {
|
|
1519
|
+
Y2.value && (e3.defaultPrevented || e3.key === ht.Escape && (e3.preventDefault(), e3.stopPropagation(), V2.close()));
|
|
1511
1520
|
});
|
|
1512
|
-
let U2 = u(() => !(B2.value || 0 !== O2.value ||
|
|
1513
|
-
return
|
|
1521
|
+
let U2 = u(() => !(B2.value || 0 !== O2.value || E2));
|
|
1522
|
+
return Kt(C2, U2, (e3) => {
|
|
1514
1523
|
var t3;
|
|
1515
1524
|
return { containers: [...null != (t3 = e3.containers) ? t3 : [], _2] };
|
|
1516
1525
|
}), h((e3) => {
|
|
1517
1526
|
if (0 !== O2.value)
|
|
1518
1527
|
return;
|
|
1519
|
-
let t3 =
|
|
1528
|
+
let t3 = Ee(w2);
|
|
1520
1529
|
if (!t3)
|
|
1521
1530
|
return;
|
|
1522
1531
|
let l3 = new ResizeObserver((e4) => {
|
|
@@ -1528,77 +1537,77 @@ let dl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", cl = k({ name: "Dialog", inheri
|
|
|
1528
1537
|
l3.observe(t3), e3(() => l3.disconnect());
|
|
1529
1538
|
}), () => {
|
|
1530
1539
|
let { open: t3, initialFocus: a3, ...o3 } = e2, r3 = { ...l2, ref: w2, id: i2, role: p2.value, "aria-modal": 0 === O2.value || void 0, "aria-labelledby": $2.value, "aria-describedby": z2.value }, s2 = { open: 0 === O2.value };
|
|
1531
|
-
return x(
|
|
1540
|
+
return x(el, { force: true }, () => [x(rl, () => x(ul, { target: w2.value }, () => x(el, { force: false }, () => x(Ht, { initialFocus: a3, containers: _2, features: M2.value ? Te(R2.value, { parent: Ht.features.RestoreFocus, leaf: Ht.features.All & ~Ht.features.FocusLock }) : Ht.features.None }, () => x(I2, {}, () => ot({ ourProps: r3, theirProps: { ...o3, ...l2 }, slot: s2, attrs: l2, slots: n2, visible: 0 === O2.value, features: nt.RenderStrategy | nt.Static, name: "Dialog" })))))), x(j2)]);
|
|
1532
1541
|
};
|
|
1533
1542
|
} });
|
|
1534
1543
|
k({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1535
1544
|
var n2;
|
|
1536
|
-
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-overlay-${
|
|
1545
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-overlay-${De()}`, o2 = pl("DialogOverlay");
|
|
1537
1546
|
function r2(e3) {
|
|
1538
1547
|
e3.target === e3.currentTarget && (e3.preventDefault(), e3.stopPropagation(), o2.close());
|
|
1539
1548
|
}
|
|
1540
1549
|
return () => {
|
|
1541
1550
|
let { ...n3 } = e2;
|
|
1542
|
-
return
|
|
1551
|
+
return ot({ ourProps: { id: a2, "aria-hidden": true, onClick: r2 }, theirProps: n3, slot: { open: 0 === o2.dialogState.value }, attrs: t2, slots: l2, name: "DialogOverlay" });
|
|
1543
1552
|
};
|
|
1544
1553
|
} }), k({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1545
1554
|
var a2;
|
|
1546
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-backdrop-${
|
|
1555
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-backdrop-${De()}`, r2 = pl("DialogBackdrop"), i2 = s(null);
|
|
1547
1556
|
return n2({ el: i2, $el: i2 }), b(() => {
|
|
1548
1557
|
if (null === r2.panelRef.value)
|
|
1549
1558
|
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1550
1559
|
}), () => {
|
|
1551
1560
|
let { ...n3 } = e2, a3 = { id: o2, ref: i2, "aria-hidden": true };
|
|
1552
|
-
return x(
|
|
1561
|
+
return x(el, { force: true }, () => x(rl, () => ot({ ourProps: a3, theirProps: { ...t2, ...n3 }, slot: { open: 0 === r2.dialogState.value }, attrs: t2, slots: l2, name: "DialogBackdrop" })));
|
|
1553
1562
|
};
|
|
1554
1563
|
} });
|
|
1555
|
-
let
|
|
1564
|
+
let fl = k({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1556
1565
|
var a2;
|
|
1557
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-panel-${
|
|
1566
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-panel-${De()}`, r2 = pl("DialogPanel");
|
|
1558
1567
|
function i2(e3) {
|
|
1559
1568
|
e3.stopPropagation();
|
|
1560
1569
|
}
|
|
1561
1570
|
return n2({ el: r2.panelRef, $el: r2.panelRef }), () => {
|
|
1562
1571
|
let { ...n3 } = e2;
|
|
1563
|
-
return
|
|
1572
|
+
return ot({ ourProps: { id: o2, ref: r2.panelRef, onClick: i2 }, theirProps: n3, slot: { open: 0 === r2.dialogState.value }, attrs: t2, slots: l2, name: "DialogPanel" });
|
|
1564
1573
|
};
|
|
1565
|
-
} }),
|
|
1574
|
+
} }), vl = k({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1566
1575
|
var n2;
|
|
1567
|
-
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-title-${
|
|
1576
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-title-${De()}`, o2 = pl("DialogTitle");
|
|
1568
1577
|
return b(() => {
|
|
1569
1578
|
o2.setTitleId(a2), O(() => o2.setTitleId(null));
|
|
1570
1579
|
}), () => {
|
|
1571
1580
|
let { ...n3 } = e2;
|
|
1572
|
-
return
|
|
1581
|
+
return ot({ ourProps: { id: a2 }, theirProps: n3, slot: { open: 0 === o2.dialogState.value }, attrs: t2, slots: l2, name: "DialogTitle" });
|
|
1573
1582
|
};
|
|
1574
1583
|
} });
|
|
1575
|
-
var
|
|
1576
|
-
let
|
|
1577
|
-
function
|
|
1578
|
-
let t2 = f(
|
|
1584
|
+
var hl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(hl || {});
|
|
1585
|
+
let bl = Symbol("DisclosureContext");
|
|
1586
|
+
function yl(e2) {
|
|
1587
|
+
let t2 = f(bl, null);
|
|
1579
1588
|
if (null === t2) {
|
|
1580
1589
|
let t3 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
|
1581
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1590
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, yl), t3;
|
|
1582
1591
|
}
|
|
1583
1592
|
return t2;
|
|
1584
1593
|
}
|
|
1585
|
-
let
|
|
1586
|
-
let
|
|
1587
|
-
let n2 = s(e2.defaultOpen ? 0 : 1), a2 = s(null), o2 = s(null), r2 = { buttonId: s(`headlessui-disclosure-button-${
|
|
1588
|
-
n2.value =
|
|
1594
|
+
let xl = Symbol("DisclosurePanelContext");
|
|
1595
|
+
let wl = k({ name: "Disclosure", props: { as: { type: [Object, String], default: "template" }, defaultOpen: { type: [Boolean], default: false } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1596
|
+
let n2 = s(e2.defaultOpen ? 0 : 1), a2 = s(null), o2 = s(null), r2 = { buttonId: s(`headlessui-disclosure-button-${De()}`), panelId: s(`headlessui-disclosure-panel-${De()}`), disclosureState: n2, panel: a2, button: o2, toggleDisclosure() {
|
|
1597
|
+
n2.value = Te(n2.value, { 0: 1, 1: 0 });
|
|
1589
1598
|
}, closeDisclosure() {
|
|
1590
1599
|
1 !== n2.value && (n2.value = 1);
|
|
1591
1600
|
}, close(e3) {
|
|
1592
1601
|
r2.closeDisclosure();
|
|
1593
|
-
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ?
|
|
1602
|
+
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ? Ee(e3) : Ee(r2.button) : Ee(r2.button);
|
|
1594
1603
|
null == t3 || t3.focus();
|
|
1595
1604
|
} };
|
|
1596
|
-
return S(
|
|
1605
|
+
return S(bl, r2), vt(u(() => Te(n2.value, { 0: mt.Open, 1: mt.Closed }))), () => {
|
|
1597
1606
|
let { defaultOpen: a3, ...o3 } = e2;
|
|
1598
|
-
return
|
|
1607
|
+
return ot({ theirProps: o3, ourProps: {}, slot: { open: 0 === n2.value, close: r2.close }, slots: t2, attrs: l2, name: "Disclosure" });
|
|
1599
1608
|
};
|
|
1600
|
-
} }),
|
|
1601
|
-
let a2 =
|
|
1609
|
+
} }), kl = k({ name: "DisclosureButton", props: { as: { type: [Object, String], default: "button" }, disabled: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1610
|
+
let a2 = yl("DisclosureButton"), o2 = f(xl, null), r2 = u(() => null !== o2 && o2.value === a2.panelId.value);
|
|
1602
1611
|
b(() => {
|
|
1603
1612
|
r2.value || null !== e2.id && (a2.buttonId.value = e2.id);
|
|
1604
1613
|
}), O(() => {
|
|
@@ -1608,51 +1617,51 @@ let bl = k({ name: "Disclosure", props: { as: { type: [Object, String], default:
|
|
|
1608
1617
|
n2({ el: i2, $el: i2 }), r2.value || h(() => {
|
|
1609
1618
|
a2.button.value = i2.value;
|
|
1610
1619
|
});
|
|
1611
|
-
let d2 =
|
|
1620
|
+
let d2 = Qe(u(() => ({ as: e2.as, type: t2.type })), i2);
|
|
1612
1621
|
function c2() {
|
|
1613
1622
|
var t3;
|
|
1614
|
-
e2.disabled || (r2.value ? (a2.toggleDisclosure(), null == (t3 =
|
|
1623
|
+
e2.disabled || (r2.value ? (a2.toggleDisclosure(), null == (t3 = Ee(a2.button)) || t3.focus()) : a2.toggleDisclosure());
|
|
1615
1624
|
}
|
|
1616
1625
|
function p2(t3) {
|
|
1617
1626
|
var l3;
|
|
1618
1627
|
if (!e2.disabled)
|
|
1619
1628
|
if (r2.value)
|
|
1620
1629
|
switch (t3.key) {
|
|
1621
|
-
case
|
|
1622
|
-
case
|
|
1623
|
-
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure(), null == (l3 =
|
|
1630
|
+
case ht.Space:
|
|
1631
|
+
case ht.Enter:
|
|
1632
|
+
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure(), null == (l3 = Ee(a2.button)) || l3.focus();
|
|
1624
1633
|
}
|
|
1625
1634
|
else
|
|
1626
1635
|
switch (t3.key) {
|
|
1627
|
-
case
|
|
1628
|
-
case
|
|
1636
|
+
case ht.Space:
|
|
1637
|
+
case ht.Enter:
|
|
1629
1638
|
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure();
|
|
1630
1639
|
}
|
|
1631
1640
|
}
|
|
1632
1641
|
function g2(e3) {
|
|
1633
|
-
if (e3.key ===
|
|
1642
|
+
if (e3.key === ht.Space)
|
|
1634
1643
|
e3.preventDefault();
|
|
1635
1644
|
}
|
|
1636
1645
|
return () => {
|
|
1637
1646
|
var n3;
|
|
1638
1647
|
let o3 = { open: 0 === a2.disclosureState.value }, { id: s2, ...u2 } = e2;
|
|
1639
|
-
return
|
|
1648
|
+
return ot({ ourProps: r2.value ? { ref: i2, type: d2.value, onClick: c2, onKeydown: p2 } : { id: null != (n3 = a2.buttonId.value) ? n3 : s2, ref: i2, type: d2.value, "aria-expanded": 0 === a2.disclosureState.value, "aria-controls": 0 === a2.disclosureState.value || Ee(a2.panel) ? a2.panelId.value : void 0, disabled: !!e2.disabled || void 0, onClick: c2, onKeydown: p2, onKeyup: g2 }, theirProps: u2, slot: o3, attrs: t2, slots: l2, name: "DisclosureButton" });
|
|
1640
1649
|
};
|
|
1641
|
-
} }),
|
|
1642
|
-
let a2 =
|
|
1650
|
+
} }), Sl = k({ name: "DisclosurePanel", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1651
|
+
let a2 = yl("DisclosurePanel");
|
|
1643
1652
|
b(() => {
|
|
1644
1653
|
null !== e2.id && (a2.panelId.value = e2.id);
|
|
1645
1654
|
}), O(() => {
|
|
1646
1655
|
a2.panelId.value = null;
|
|
1647
|
-
}), n2({ el: a2.panel, $el: a2.panel }), S(
|
|
1648
|
-
let o2 =
|
|
1656
|
+
}), n2({ el: a2.panel, $el: a2.panel }), S(xl, a2.panelId);
|
|
1657
|
+
let o2 = ft(), r2 = u(() => null !== o2 ? (o2.value & mt.Open) === mt.Open : 0 === a2.disclosureState.value);
|
|
1649
1658
|
return () => {
|
|
1650
1659
|
var n3;
|
|
1651
1660
|
let o3 = { open: 0 === a2.disclosureState.value, close: a2.close }, { id: i2, ...s2 } = e2;
|
|
1652
|
-
return
|
|
1661
|
+
return ot({ ourProps: { id: null != (n3 = a2.panelId.value) ? n3 : i2, ref: a2.panel }, theirProps: s2, slot: o3, attrs: t2, slots: l2, features: nt.RenderStrategy | nt.Static, visible: r2.value, name: "DisclosurePanel" });
|
|
1653
1662
|
};
|
|
1654
|
-
} }),
|
|
1655
|
-
function
|
|
1663
|
+
} }), Cl = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1664
|
+
function Ol(e2) {
|
|
1656
1665
|
var t2, l2;
|
|
1657
1666
|
let n2 = null != (t2 = e2.innerText) ? t2 : "", a2 = e2.cloneNode(true);
|
|
1658
1667
|
if (!(a2 instanceof HTMLElement))
|
|
@@ -1661,12 +1670,12 @@ function kl(e2) {
|
|
|
1661
1670
|
for (let e3 of a2.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1662
1671
|
e3.remove(), o2 = true;
|
|
1663
1672
|
let r2 = o2 ? null != (l2 = a2.innerText) ? l2 : "" : n2;
|
|
1664
|
-
return
|
|
1673
|
+
return Cl.test(r2) && (r2 = r2.replace(Cl, "")), r2;
|
|
1665
1674
|
}
|
|
1666
|
-
function
|
|
1675
|
+
function Ml(e2) {
|
|
1667
1676
|
let t2 = s(""), l2 = s("");
|
|
1668
1677
|
return () => {
|
|
1669
|
-
let n2 =
|
|
1678
|
+
let n2 = Ee(e2);
|
|
1670
1679
|
if (!n2)
|
|
1671
1680
|
return "";
|
|
1672
1681
|
let a2 = n2.innerText;
|
|
@@ -1682,38 +1691,38 @@ function Sl(e2) {
|
|
|
1682
1691
|
let t4 = document.getElementById(e5);
|
|
1683
1692
|
if (t4) {
|
|
1684
1693
|
let e6 = t4.getAttribute("aria-label");
|
|
1685
|
-
return "string" == typeof e6 ? e6.trim() :
|
|
1694
|
+
return "string" == typeof e6 ? e6.trim() : Ol(t4).trim();
|
|
1686
1695
|
}
|
|
1687
1696
|
return null;
|
|
1688
1697
|
}).filter(Boolean);
|
|
1689
1698
|
if (e4.length > 0)
|
|
1690
1699
|
return e4.join(", ");
|
|
1691
1700
|
}
|
|
1692
|
-
return
|
|
1701
|
+
return Ol(e3).trim();
|
|
1693
1702
|
}(n2).trim().toLowerCase();
|
|
1694
1703
|
return t2.value = a2, l2.value = o2, o2;
|
|
1695
1704
|
};
|
|
1696
1705
|
}
|
|
1697
|
-
var
|
|
1698
|
-
let
|
|
1699
|
-
function
|
|
1700
|
-
let t2 = f(
|
|
1706
|
+
var Dl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(Dl || {}), El = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Other = 1] = "Other", e2))(El || {});
|
|
1707
|
+
let Tl = Symbol("MenuContext");
|
|
1708
|
+
function Il(e2) {
|
|
1709
|
+
let t2 = f(Tl, null);
|
|
1701
1710
|
if (null === t2) {
|
|
1702
1711
|
let t3 = new Error(`<${e2} /> is missing a parent <Menu /> component.`);
|
|
1703
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1712
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Il), t3;
|
|
1704
1713
|
}
|
|
1705
1714
|
return t2;
|
|
1706
1715
|
}
|
|
1707
|
-
let
|
|
1716
|
+
let _l = k({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1708
1717
|
let n2 = s(1), a2 = s(null), o2 = s(null), r2 = s([]), i2 = s(""), d2 = s(null), c2 = s(1);
|
|
1709
1718
|
function p2(e3 = (e4) => e4) {
|
|
1710
|
-
let t3 = null !== d2.value ? r2.value[d2.value] : null, l3 =
|
|
1719
|
+
let t3 = null !== d2.value ? r2.value[d2.value] : null, l3 = Ue(e3(r2.value.slice()), (e4) => Ee(e4.dataRef.domRef)), n3 = t3 ? l3.indexOf(t3) : null;
|
|
1711
1720
|
return -1 === n3 && (n3 = null), { items: l3, activeItemIndex: n3 };
|
|
1712
1721
|
}
|
|
1713
1722
|
let g2 = { menuState: n2, buttonRef: a2, itemsRef: o2, items: r2, searchQuery: i2, activeItemIndex: d2, activationTrigger: c2, closeMenu: () => {
|
|
1714
1723
|
n2.value = 1, d2.value = null;
|
|
1715
1724
|
}, openMenu: () => n2.value = 0, goToItem(e3, t3, l3) {
|
|
1716
|
-
let n3 = p2(), a3 =
|
|
1725
|
+
let n3 = p2(), a3 = xt(e3 === yt.Specific ? { focus: yt.Specific, id: t3 } : { focus: e3 }, { resolveItems: () => n3.items, resolveActiveIndex: () => n3.activeItemIndex, resolveId: (e4) => e4.id, resolveDisabled: (e4) => e4.dataRef.disabled });
|
|
1717
1726
|
i2.value = "", d2.value = a3, c2.value = null != l3 ? l3 : 1, r2.value = n3.items;
|
|
1718
1727
|
}, search(e3) {
|
|
1719
1728
|
let t3 = "" !== i2.value ? 0 : 1;
|
|
@@ -1732,165 +1741,165 @@ let Tl = k({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1732
1741
|
});
|
|
1733
1742
|
r2.value = t3.items, d2.value = t3.activeItemIndex, c2.value = 1;
|
|
1734
1743
|
} };
|
|
1735
|
-
return
|
|
1744
|
+
return Ze([a2, o2], (e3, t3) => {
|
|
1736
1745
|
var l3;
|
|
1737
|
-
g2.closeMenu(),
|
|
1738
|
-
}, u(() => 0 === n2.value)), S(
|
|
1746
|
+
g2.closeMenu(), ze(t3, Ne.Loose) || (e3.preventDefault(), null == (l3 = Ee(a2)) || l3.focus());
|
|
1747
|
+
}, u(() => 0 === n2.value)), S(Tl, g2), vt(u(() => Te(n2.value, { 0: mt.Open, 1: mt.Closed }))), () => {
|
|
1739
1748
|
let a3 = { open: 0 === n2.value, close: g2.closeMenu };
|
|
1740
|
-
return
|
|
1749
|
+
return ot({ ourProps: {}, theirProps: e2, slot: a3, slots: t2, attrs: l2, name: "Menu" });
|
|
1741
1750
|
};
|
|
1742
|
-
} }),
|
|
1751
|
+
} }), Pl = k({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1743
1752
|
var a2;
|
|
1744
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-button-${
|
|
1753
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-button-${De()}`, r2 = Il("MenuButton");
|
|
1745
1754
|
function i2(e3) {
|
|
1746
1755
|
switch (e3.key) {
|
|
1747
|
-
case
|
|
1748
|
-
case
|
|
1749
|
-
case
|
|
1756
|
+
case ht.Space:
|
|
1757
|
+
case ht.Enter:
|
|
1758
|
+
case ht.ArrowDown:
|
|
1750
1759
|
e3.preventDefault(), e3.stopPropagation(), r2.openMenu(), v(() => {
|
|
1751
1760
|
var e4;
|
|
1752
|
-
null == (e4 =
|
|
1761
|
+
null == (e4 = Ee(r2.itemsRef)) || e4.focus({ preventScroll: true }), r2.goToItem(yt.First);
|
|
1753
1762
|
});
|
|
1754
1763
|
break;
|
|
1755
|
-
case
|
|
1764
|
+
case ht.ArrowUp:
|
|
1756
1765
|
e3.preventDefault(), e3.stopPropagation(), r2.openMenu(), v(() => {
|
|
1757
1766
|
var e4;
|
|
1758
|
-
null == (e4 =
|
|
1767
|
+
null == (e4 = Ee(r2.itemsRef)) || e4.focus({ preventScroll: true }), r2.goToItem(yt.Last);
|
|
1759
1768
|
});
|
|
1760
1769
|
}
|
|
1761
1770
|
}
|
|
1762
1771
|
function s2(e3) {
|
|
1763
|
-
if (e3.key ===
|
|
1772
|
+
if (e3.key === ht.Space)
|
|
1764
1773
|
e3.preventDefault();
|
|
1765
1774
|
}
|
|
1766
1775
|
function d2(t3) {
|
|
1767
1776
|
e2.disabled || (0 === r2.menuState.value ? (r2.closeMenu(), v(() => {
|
|
1768
1777
|
var e3;
|
|
1769
|
-
return null == (e3 =
|
|
1778
|
+
return null == (e3 = Ee(r2.buttonRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1770
1779
|
})) : (t3.preventDefault(), r2.openMenu(), function(e3) {
|
|
1771
1780
|
requestAnimationFrame(() => requestAnimationFrame(e3));
|
|
1772
1781
|
}(() => {
|
|
1773
1782
|
var e3;
|
|
1774
|
-
return null == (e3 =
|
|
1783
|
+
return null == (e3 = Ee(r2.itemsRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1775
1784
|
})));
|
|
1776
1785
|
}
|
|
1777
1786
|
n2({ el: r2.buttonRef, $el: r2.buttonRef });
|
|
1778
|
-
let c2 =
|
|
1787
|
+
let c2 = Qe(u(() => ({ as: e2.as, type: t2.type })), r2.buttonRef);
|
|
1779
1788
|
return () => {
|
|
1780
1789
|
var n3;
|
|
1781
1790
|
let a3 = { open: 0 === r2.menuState.value }, { ...u2 } = e2;
|
|
1782
|
-
return
|
|
1791
|
+
return ot({ ourProps: { ref: r2.buttonRef, id: o2, type: c2.value, "aria-haspopup": "menu", "aria-controls": null == (n3 = Ee(r2.itemsRef)) ? void 0 : n3.id, "aria-expanded": 0 === r2.menuState.value, onKeydown: i2, onKeyup: s2, onClick: d2 }, theirProps: u2, slot: a3, attrs: t2, slots: l2, name: "MenuButton" });
|
|
1783
1792
|
};
|
|
1784
|
-
} }),
|
|
1793
|
+
} }), jl = k({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1785
1794
|
var a2;
|
|
1786
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-items-${
|
|
1795
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-items-${De()}`, r2 = Il("MenuItems"), i2 = s(null);
|
|
1787
1796
|
function d2(e3) {
|
|
1788
1797
|
var t3;
|
|
1789
1798
|
switch (i2.value && clearTimeout(i2.value), e3.key) {
|
|
1790
|
-
case
|
|
1799
|
+
case ht.Space:
|
|
1791
1800
|
if ("" !== r2.searchQuery.value)
|
|
1792
1801
|
return e3.preventDefault(), e3.stopPropagation(), r2.search(e3.key);
|
|
1793
|
-
case
|
|
1802
|
+
case ht.Enter:
|
|
1794
1803
|
if (e3.preventDefault(), e3.stopPropagation(), null !== r2.activeItemIndex.value) {
|
|
1795
|
-
null == (t3 =
|
|
1804
|
+
null == (t3 = Ee(r2.items.value[r2.activeItemIndex.value].dataRef.domRef)) || t3.click();
|
|
1796
1805
|
}
|
|
1797
|
-
r2.closeMenu(),
|
|
1806
|
+
r2.closeMenu(), $e(Ee(r2.buttonRef));
|
|
1798
1807
|
break;
|
|
1799
|
-
case
|
|
1800
|
-
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(
|
|
1801
|
-
case
|
|
1802
|
-
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(
|
|
1803
|
-
case
|
|
1804
|
-
case
|
|
1805
|
-
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(
|
|
1806
|
-
case
|
|
1807
|
-
case
|
|
1808
|
-
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(
|
|
1809
|
-
case
|
|
1808
|
+
case ht.ArrowDown:
|
|
1809
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(yt.Next);
|
|
1810
|
+
case ht.ArrowUp:
|
|
1811
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(yt.Previous);
|
|
1812
|
+
case ht.Home:
|
|
1813
|
+
case ht.PageUp:
|
|
1814
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(yt.First);
|
|
1815
|
+
case ht.End:
|
|
1816
|
+
case ht.PageDown:
|
|
1817
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(yt.Last);
|
|
1818
|
+
case ht.Escape:
|
|
1810
1819
|
e3.preventDefault(), e3.stopPropagation(), r2.closeMenu(), v(() => {
|
|
1811
1820
|
var e4;
|
|
1812
|
-
return null == (e4 =
|
|
1821
|
+
return null == (e4 = Ee(r2.buttonRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
1813
1822
|
});
|
|
1814
1823
|
break;
|
|
1815
|
-
case
|
|
1824
|
+
case ht.Tab:
|
|
1816
1825
|
e3.preventDefault(), e3.stopPropagation(), r2.closeMenu(), v(() => function(e4, t4) {
|
|
1817
|
-
return
|
|
1818
|
-
}(
|
|
1826
|
+
return qe(Fe(), t4, { relativeTo: e4 });
|
|
1827
|
+
}(Ee(r2.buttonRef), e3.shiftKey ? Be.Previous : Be.Next));
|
|
1819
1828
|
break;
|
|
1820
1829
|
default:
|
|
1821
1830
|
1 === e3.key.length && (r2.search(e3.key), i2.value = setTimeout(() => r2.clearSearch(), 350));
|
|
1822
1831
|
}
|
|
1823
1832
|
}
|
|
1824
1833
|
function c2(e3) {
|
|
1825
|
-
if (e3.key ===
|
|
1834
|
+
if (e3.key === ht.Space)
|
|
1826
1835
|
e3.preventDefault();
|
|
1827
1836
|
}
|
|
1828
|
-
n2({ el: r2.itemsRef, $el: r2.itemsRef }),
|
|
1837
|
+
n2({ el: r2.itemsRef, $el: r2.itemsRef }), lt({ container: u(() => Ee(r2.itemsRef)), enabled: u(() => 0 === r2.menuState.value), accept: (e3) => "menuitem" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1829
1838
|
e3.setAttribute("role", "none");
|
|
1830
1839
|
} });
|
|
1831
|
-
let p2 =
|
|
1840
|
+
let p2 = ft(), g2 = u(() => null !== p2 ? (p2.value & mt.Open) === mt.Open : 0 === r2.menuState.value);
|
|
1832
1841
|
return () => {
|
|
1833
1842
|
var n3, a3;
|
|
1834
1843
|
let i3 = { open: 0 === r2.menuState.value }, { ...s2 } = e2;
|
|
1835
|
-
return
|
|
1844
|
+
return ot({ ourProps: { "aria-activedescendant": null === r2.activeItemIndex.value || null == (n3 = r2.items.value[r2.activeItemIndex.value]) ? void 0 : n3.id, "aria-labelledby": null == (a3 = Ee(r2.buttonRef)) ? void 0 : a3.id, id: o2, onKeydown: d2, onKeyup: c2, role: "menu", tabIndex: 0, ref: r2.itemsRef }, theirProps: s2, slot: i3, attrs: t2, slots: l2, features: nt.RenderStrategy | nt.Static, visible: g2.value, name: "MenuItems" });
|
|
1836
1845
|
};
|
|
1837
|
-
} }),
|
|
1846
|
+
} }), Rl = k({ name: "MenuItem", inheritAttrs: false, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false }, id: { type: String, default: null } }, setup(e2, { slots: t2, attrs: l2, expose: n2 }) {
|
|
1838
1847
|
var a2;
|
|
1839
|
-
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-item-${
|
|
1848
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-item-${De()}`, r2 = Il("MenuItem"), i2 = s(null);
|
|
1840
1849
|
n2({ el: i2, $el: i2 });
|
|
1841
|
-
let d2 = u(() => null !== r2.activeItemIndex.value && r2.items.value[r2.activeItemIndex.value].id === o2), c2 =
|
|
1850
|
+
let d2 = u(() => null !== r2.activeItemIndex.value && r2.items.value[r2.activeItemIndex.value].id === o2), c2 = Ml(i2), p2 = u(() => ({ disabled: e2.disabled, get textValue() {
|
|
1842
1851
|
return c2();
|
|
1843
1852
|
}, domRef: i2 }));
|
|
1844
1853
|
function g2(t3) {
|
|
1845
1854
|
if (e2.disabled)
|
|
1846
1855
|
return t3.preventDefault();
|
|
1847
|
-
r2.closeMenu(),
|
|
1856
|
+
r2.closeMenu(), $e(Ee(r2.buttonRef));
|
|
1848
1857
|
}
|
|
1849
1858
|
function m2() {
|
|
1850
1859
|
if (e2.disabled)
|
|
1851
|
-
return r2.goToItem(
|
|
1852
|
-
r2.goToItem(
|
|
1860
|
+
return r2.goToItem(yt.Nothing);
|
|
1861
|
+
r2.goToItem(yt.Specific, o2);
|
|
1853
1862
|
}
|
|
1854
1863
|
b(() => r2.registerItem(o2, p2)), O(() => r2.unregisterItem(o2)), h(() => {
|
|
1855
1864
|
0 === r2.menuState.value && d2.value && 0 !== r2.activationTrigger.value && v(() => {
|
|
1856
1865
|
var e3, t3;
|
|
1857
|
-
return null == (t3 = null == (e3 =
|
|
1866
|
+
return null == (t3 = null == (e3 = Ee(i2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1858
1867
|
});
|
|
1859
1868
|
});
|
|
1860
|
-
let f2 =
|
|
1869
|
+
let f2 = tt();
|
|
1861
1870
|
function y2(e3) {
|
|
1862
1871
|
f2.update(e3);
|
|
1863
1872
|
}
|
|
1864
1873
|
function x2(t3) {
|
|
1865
|
-
f2.wasMoved(t3) && (e2.disabled || d2.value || r2.goToItem(
|
|
1874
|
+
f2.wasMoved(t3) && (e2.disabled || d2.value || r2.goToItem(yt.Specific, o2, 0));
|
|
1866
1875
|
}
|
|
1867
1876
|
function w2(t3) {
|
|
1868
|
-
f2.wasMoved(t3) && (e2.disabled || d2.value && r2.goToItem(
|
|
1877
|
+
f2.wasMoved(t3) && (e2.disabled || d2.value && r2.goToItem(yt.Nothing));
|
|
1869
1878
|
}
|
|
1870
1879
|
return () => {
|
|
1871
1880
|
let { disabled: n3, ...a3 } = e2, s2 = { active: d2.value, disabled: n3, close: r2.closeMenu };
|
|
1872
|
-
return
|
|
1881
|
+
return ot({ ourProps: { id: o2, ref: i2, role: "menuitem", tabIndex: true === n3 ? void 0 : -1, "aria-disabled": true === n3 || void 0, onClick: g2, onFocus: m2, onPointerenter: y2, onMouseenter: y2, onPointermove: x2, onMousemove: x2, onPointerleave: w2, onMouseleave: w2 }, theirProps: { ...l2, ...a3 }, slot: s2, attrs: l2, slots: t2, name: "MenuItem" });
|
|
1873
1882
|
};
|
|
1874
|
-
} }),
|
|
1875
|
-
function
|
|
1876
|
-
let e2 = f(
|
|
1883
|
+
} }), Bl = Symbol("LabelContext");
|
|
1884
|
+
function Al() {
|
|
1885
|
+
let e2 = f(Bl, null);
|
|
1877
1886
|
if (null === e2) {
|
|
1878
1887
|
let e3 = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1879
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e3,
|
|
1888
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e3, Al), e3;
|
|
1880
1889
|
}
|
|
1881
1890
|
return e2;
|
|
1882
1891
|
}
|
|
1883
|
-
let
|
|
1892
|
+
let Ll = k({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1884
1893
|
var n2;
|
|
1885
|
-
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-label-${
|
|
1894
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-label-${De()}`, o2 = Al();
|
|
1886
1895
|
return b(() => O(o2.register(a2))), () => {
|
|
1887
1896
|
let { name: n3 = "Label", slot: r2 = {}, props: i2 = {} } = o2, { passive: s2, ...u2 } = e2, c2 = { ...Object.entries(i2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: a2 };
|
|
1888
|
-
return s2 && (delete c2.onClick, delete c2.htmlFor, delete u2.onClick),
|
|
1897
|
+
return s2 && (delete c2.onClick, delete c2.htmlFor, delete u2.onClick), ot({ ourProps: c2, theirProps: u2, slot: r2, attrs: l2, slots: t2, name: n3 });
|
|
1889
1898
|
};
|
|
1890
|
-
} }),
|
|
1899
|
+
} }), Fl = Symbol("GroupContext"), Nl = k({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1891
1900
|
let n2 = s(null), a2 = function({ slot: e3 = {}, name: t3 = "Label", props: l3 = {} } = {}) {
|
|
1892
1901
|
let n3 = s([]);
|
|
1893
|
-
return S(
|
|
1902
|
+
return S(Bl, { register: function(e4) {
|
|
1894
1903
|
return n3.value.push(e4), () => {
|
|
1895
1904
|
let t4 = n3.value.indexOf(e4);
|
|
1896
1905
|
-1 !== t4 && n3.value.splice(t4, 1);
|
|
@@ -1901,20 +1910,20 @@ let Rl = k({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1901
1910
|
return null == (e3 = n2.value) ? void 0 : e3.id;
|
|
1902
1911
|
}), onClick(e3) {
|
|
1903
1912
|
n2.value && ("LABEL" === e3.currentTarget.tagName && e3.preventDefault(), n2.value.click(), n2.value.focus({ preventScroll: true }));
|
|
1904
|
-
} } }), o2 =
|
|
1905
|
-
return S(
|
|
1906
|
-
} }),
|
|
1913
|
+
} } }), o2 = ol({ name: "SwitchDescription" });
|
|
1914
|
+
return S(Fl, { switchRef: n2, labelledby: a2, describedby: o2 }), () => ot({ theirProps: e2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "SwitchGroup" });
|
|
1915
|
+
} }), zl = k({ name: "Switch", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: true }, form: { type: String, optional: true }, name: { type: String, optional: true }, value: { type: String, optional: true }, id: { type: String, default: null }, disabled: { type: Boolean, default: false }, tabIndex: { type: Number, default: 0 } }, inheritAttrs: false, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1907
1916
|
var o2;
|
|
1908
|
-
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-switch-${
|
|
1917
|
+
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-switch-${De()}`, i2 = f(Fl, null), [d2, c2] = Ce(u(() => e2.modelValue), (e3) => t2("update:modelValue", e3), u(() => e2.defaultChecked));
|
|
1909
1918
|
function g2() {
|
|
1910
1919
|
c2(!d2.value);
|
|
1911
1920
|
}
|
|
1912
|
-
let m2 = s(null), v2 = null === i2 ? m2 : i2.switchRef, h2 =
|
|
1921
|
+
let m2 = s(null), v2 = null === i2 ? m2 : i2.switchRef, h2 = Qe(u(() => ({ as: e2.as, type: l2.type })), v2);
|
|
1913
1922
|
function y2(e3) {
|
|
1914
1923
|
e3.preventDefault(), g2();
|
|
1915
1924
|
}
|
|
1916
1925
|
function k2(e3) {
|
|
1917
|
-
e3.key ===
|
|
1926
|
+
e3.key === ht.Space ? (e3.preventDefault(), g2()) : e3.key === ht.Enter && function(e4) {
|
|
1918
1927
|
var t3, l3;
|
|
1919
1928
|
let n3 = null != (t3 = null == e4 ? void 0 : e4.form) ? t3 : e4.closest("form");
|
|
1920
1929
|
if (n3) {
|
|
@@ -1931,7 +1940,7 @@ let Rl = k({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1931
1940
|
a2({ el: v2, $el: v2 });
|
|
1932
1941
|
let C2 = u(() => {
|
|
1933
1942
|
var e3, t3;
|
|
1934
|
-
return null == (t3 = null == (e3 =
|
|
1943
|
+
return null == (t3 = null == (e3 = Ee(v2)) ? void 0 : e3.closest) ? void 0 : t3.call(e3, "form");
|
|
1935
1944
|
});
|
|
1936
1945
|
return b(() => {
|
|
1937
1946
|
p([C2], () => {
|
|
@@ -1946,18 +1955,18 @@ let Rl = k({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1946
1955
|
}, { immediate: true });
|
|
1947
1956
|
}), () => {
|
|
1948
1957
|
let { name: t3, value: a3, form: o3, tabIndex: s2, ...u2 } = e2, c3 = { checked: d2.value }, p2 = { id: r2, ref: v2, role: "switch", type: h2.value, tabIndex: -1 === s2 ? 0 : s2, "aria-checked": d2.value, "aria-labelledby": null == i2 ? void 0 : i2.labelledby.value, "aria-describedby": null == i2 ? void 0 : i2.describedby.value, onClick: y2, onKeyup: k2, onKeypress: S2 };
|
|
1949
|
-
return x(w, [null != t3 && null != d2.value ? x(
|
|
1958
|
+
return x(w, [null != t3 && null != d2.value ? x(pt, ut({ features: ct.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: d2.value, form: o3, disabled: u2.disabled, name: t3, value: a3 })) : null, ot({ ourProps: p2, theirProps: { ...l2, ...dt(u2, ["modelValue", "defaultChecked"]) }, slot: c3, attrs: l2, slots: n2, name: "Switch" })]);
|
|
1950
1959
|
};
|
|
1951
|
-
} }),
|
|
1952
|
-
function
|
|
1960
|
+
} }), $l = Ll;
|
|
1961
|
+
function Vl(e2, ...t2) {
|
|
1953
1962
|
e2 && t2.length > 0 && e2.classList.add(...t2);
|
|
1954
1963
|
}
|
|
1955
|
-
function
|
|
1964
|
+
function Hl(e2, ...t2) {
|
|
1956
1965
|
e2 && t2.length > 0 && e2.classList.remove(...t2);
|
|
1957
1966
|
}
|
|
1958
|
-
var
|
|
1959
|
-
function
|
|
1960
|
-
let r2 =
|
|
1967
|
+
var Yl = ((e2) => (e2.Finished = "finished", e2.Cancelled = "cancelled", e2))(Yl || {});
|
|
1968
|
+
function Ul(e2, t2, l2, n2, a2, o2) {
|
|
1969
|
+
let r2 = kt(), i2 = void 0 !== o2 ? /* @__PURE__ */ function(e3) {
|
|
1961
1970
|
let t3 = { called: false };
|
|
1962
1971
|
return (...l3) => {
|
|
1963
1972
|
if (!t3.called)
|
|
@@ -1965,9 +1974,9 @@ function Vl(e2, t2, l2, n2, a2, o2) {
|
|
|
1965
1974
|
};
|
|
1966
1975
|
}(o2) : () => {
|
|
1967
1976
|
};
|
|
1968
|
-
return
|
|
1969
|
-
|
|
1970
|
-
let l3 =
|
|
1977
|
+
return Hl(e2, ...a2), Vl(e2, ...t2, ...l2), r2.nextFrame(() => {
|
|
1978
|
+
Hl(e2, ...l2), Vl(e2, ...n2), r2.add(function(e3, t3) {
|
|
1979
|
+
let l3 = kt();
|
|
1971
1980
|
if (!e3)
|
|
1972
1981
|
return l3.dispose;
|
|
1973
1982
|
let { transitionDuration: n3, transitionDelay: a3 } = getComputedStyle(e3), [o3, r3] = [n3, a3].map((e4) => {
|
|
@@ -1975,79 +1984,79 @@ function Vl(e2, t2, l2, n2, a2, o2) {
|
|
|
1975
1984
|
return t4;
|
|
1976
1985
|
});
|
|
1977
1986
|
return 0 !== o3 ? l3.setTimeout(() => t3("finished"), o3 + r3) : t3("finished"), l3.add(() => t3("cancelled")), l3.dispose;
|
|
1978
|
-
}(e2, (l3) => (
|
|
1979
|
-
}), r2.add(() =>
|
|
1987
|
+
}(e2, (l3) => (Hl(e2, ...n2, ...t2), Vl(e2, ...a2), i2(l3))));
|
|
1988
|
+
}), r2.add(() => Hl(e2, ...t2, ...l2, ...n2, ...a2)), r2.add(() => i2("cancelled")), r2.dispose;
|
|
1980
1989
|
}
|
|
1981
|
-
function
|
|
1990
|
+
function ql(e2 = "") {
|
|
1982
1991
|
return e2.split(/\s+/).filter((e3) => e3.length > 1);
|
|
1983
1992
|
}
|
|
1984
|
-
let
|
|
1985
|
-
var
|
|
1986
|
-
let
|
|
1987
|
-
function
|
|
1988
|
-
return "children" in e2 ?
|
|
1993
|
+
let Wl = Symbol("TransitionContext");
|
|
1994
|
+
var Kl = ((e2) => (e2.Visible = "visible", e2.Hidden = "hidden", e2))(Kl || {});
|
|
1995
|
+
let Jl = Symbol("NestingContext");
|
|
1996
|
+
function Gl(e2) {
|
|
1997
|
+
return "children" in e2 ? Gl(e2.children) : e2.value.filter(({ state: e3 }) => "visible" === e3).length > 0;
|
|
1989
1998
|
}
|
|
1990
|
-
function
|
|
1999
|
+
function Zl(e2) {
|
|
1991
2000
|
let t2 = s([]), l2 = s(false);
|
|
1992
|
-
function n2(n3, a2 =
|
|
2001
|
+
function n2(n3, a2 = at.Hidden) {
|
|
1993
2002
|
let o2 = t2.value.findIndex(({ id: e3 }) => e3 === n3);
|
|
1994
|
-
-1 !== o2 && (
|
|
2003
|
+
-1 !== o2 && (Te(a2, { [at.Unmount]() {
|
|
1995
2004
|
t2.value.splice(o2, 1);
|
|
1996
|
-
}, [
|
|
2005
|
+
}, [at.Hidden]() {
|
|
1997
2006
|
t2.value[o2].state = "hidden";
|
|
1998
|
-
} }), !
|
|
2007
|
+
} }), !Gl(t2) && l2.value && (null == e2 || e2()));
|
|
1999
2008
|
}
|
|
2000
2009
|
return b(() => l2.value = true), O(() => l2.value = false), { children: t2, register: function(e3) {
|
|
2001
2010
|
let l3 = t2.value.find(({ id: t3 }) => t3 === e3);
|
|
2002
|
-
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => n2(e3,
|
|
2011
|
+
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => n2(e3, at.Unmount);
|
|
2003
2012
|
}, unregister: n2 };
|
|
2004
2013
|
}
|
|
2005
|
-
let
|
|
2014
|
+
let Xl = nt.RenderStrategy, Ql = k({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: a2, expose: o2 }) {
|
|
2006
2015
|
let r2 = s(0);
|
|
2007
2016
|
function i2() {
|
|
2008
|
-
r2.value |=
|
|
2017
|
+
r2.value |= mt.Opening, t2("beforeEnter");
|
|
2009
2018
|
}
|
|
2010
2019
|
function d2() {
|
|
2011
|
-
r2.value &= ~
|
|
2020
|
+
r2.value &= ~mt.Opening, t2("afterEnter");
|
|
2012
2021
|
}
|
|
2013
2022
|
function c2() {
|
|
2014
|
-
r2.value |=
|
|
2023
|
+
r2.value |= mt.Closing, t2("beforeLeave");
|
|
2015
2024
|
}
|
|
2016
2025
|
function g2() {
|
|
2017
|
-
r2.value &= ~
|
|
2026
|
+
r2.value &= ~mt.Closing, t2("afterLeave");
|
|
2018
2027
|
}
|
|
2019
|
-
if (null === f(
|
|
2020
|
-
return () => x(
|
|
2021
|
-
let m2 = s(null), v2 = u(() => e2.unmount ?
|
|
2028
|
+
if (null === f(Wl, null) && null !== ft())
|
|
2029
|
+
return () => x(tn, { ...e2, onBeforeEnter: i2, onAfterEnter: d2, onBeforeLeave: c2, onAfterLeave: g2 }, a2);
|
|
2030
|
+
let m2 = s(null), v2 = u(() => e2.unmount ? at.Unmount : at.Hidden);
|
|
2022
2031
|
o2({ el: m2, $el: m2 });
|
|
2023
2032
|
let { show: y2, appear: w2 } = function() {
|
|
2024
|
-
let e3 = f(
|
|
2033
|
+
let e3 = f(Wl, null);
|
|
2025
2034
|
if (null === e3)
|
|
2026
2035
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
2027
2036
|
return e3;
|
|
2028
2037
|
}(), { register: k2, unregister: C2 } = function() {
|
|
2029
|
-
let e3 = f(
|
|
2038
|
+
let e3 = f(Jl, null);
|
|
2030
2039
|
if (null === e3)
|
|
2031
2040
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
2032
2041
|
return e3;
|
|
2033
|
-
}(), M2 = s(y2.value ? "visible" : "hidden"), D2 = { value: true },
|
|
2034
|
-
!
|
|
2042
|
+
}(), M2 = s(y2.value ? "visible" : "hidden"), D2 = { value: true }, E2 = De(), T2 = { value: false }, I2 = Zl(() => {
|
|
2043
|
+
!T2.value && "hidden" !== M2.value && (M2.value = "hidden", C2(E2), g2());
|
|
2035
2044
|
});
|
|
2036
2045
|
b(() => {
|
|
2037
|
-
let e3 = k2(
|
|
2046
|
+
let e3 = k2(E2);
|
|
2038
2047
|
O(e3);
|
|
2039
2048
|
}), h(() => {
|
|
2040
|
-
if (v2.value ===
|
|
2049
|
+
if (v2.value === at.Hidden && E2) {
|
|
2041
2050
|
if (y2.value && "visible" !== M2.value)
|
|
2042
2051
|
return void (M2.value = "visible");
|
|
2043
|
-
|
|
2052
|
+
Te(M2.value, { hidden: () => C2(E2), visible: () => k2(E2) });
|
|
2044
2053
|
}
|
|
2045
2054
|
});
|
|
2046
|
-
let _2 =
|
|
2055
|
+
let _2 = ql(e2.enter), P2 = ql(e2.enterFrom), j2 = ql(e2.enterTo), R2 = ql(e2.entered), B2 = ql(e2.leave), A2 = ql(e2.leaveFrom), L2 = ql(e2.leaveTo);
|
|
2047
2056
|
return b(() => {
|
|
2048
2057
|
h(() => {
|
|
2049
2058
|
if ("visible" === M2.value) {
|
|
2050
|
-
let e3 =
|
|
2059
|
+
let e3 = Ee(m2);
|
|
2051
2060
|
if (e3 instanceof Comment && "" === e3.data)
|
|
2052
2061
|
throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2053
2062
|
}
|
|
@@ -2055,105 +2064,105 @@ let Jl = et.RenderStrategy, Gl = k({ props: { as: { type: [Object, String], defa
|
|
|
2055
2064
|
}), b(() => {
|
|
2056
2065
|
p([y2], (e3, t3, l3) => {
|
|
2057
2066
|
(function(e4) {
|
|
2058
|
-
let t4 = D2.value && !w2.value, l4 =
|
|
2059
|
-
!l4 || !(l4 instanceof HTMLElement) || t4 || (
|
|
2060
|
-
|
|
2061
|
-
}) :
|
|
2062
|
-
|
|
2067
|
+
let t4 = D2.value && !w2.value, l4 = Ee(m2);
|
|
2068
|
+
!l4 || !(l4 instanceof HTMLElement) || t4 || (T2.value = true, y2.value && i2(), y2.value || c2(), e4(y2.value ? Ul(l4, _2, P2, j2, R2, (e5) => {
|
|
2069
|
+
T2.value = false, e5 === Yl.Finished && d2();
|
|
2070
|
+
}) : Ul(l4, B2, A2, L2, R2, (e5) => {
|
|
2071
|
+
T2.value = false, e5 === Yl.Finished && (Gl(I2) || (M2.value = "hidden", C2(E2), g2()));
|
|
2063
2072
|
})));
|
|
2064
2073
|
})(l3), D2.value = false;
|
|
2065
2074
|
}, { immediate: true });
|
|
2066
|
-
}), S(
|
|
2075
|
+
}), S(Jl, I2), vt(u(() => Te(M2.value, { visible: mt.Open, hidden: mt.Closed }) | r2.value)), () => {
|
|
2067
2076
|
let { appear: t3, show: o3, enter: r3, enterFrom: i3, enterTo: s2, entered: u2, leave: d3, leaveFrom: c3, leaveTo: p2, ...g3 } = e2, f2 = { ref: m2 };
|
|
2068
|
-
return
|
|
2077
|
+
return ot({ theirProps: { ...g3, ...w2.value && y2.value && Pe.isServer ? { class: n([l2.class, g3.class, ..._2, ...P2]) } : {} }, ourProps: f2, slot: {}, slots: a2, attrs: l2, features: Xl, visible: "visible" === M2.value, name: "TransitionChild" });
|
|
2069
2078
|
};
|
|
2070
|
-
} }),
|
|
2071
|
-
let a2 =
|
|
2079
|
+
} }), en = Ql, tn = k({ inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: n2 }) {
|
|
2080
|
+
let a2 = ft(), o2 = u(() => null === e2.show && null !== a2 ? (a2.value & mt.Open) === mt.Open : e2.show);
|
|
2072
2081
|
h(() => {
|
|
2073
2082
|
if (![true, false].includes(o2.value))
|
|
2074
2083
|
throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
2075
2084
|
});
|
|
2076
|
-
let r2 = s(o2.value ? "visible" : "hidden"), i2 =
|
|
2085
|
+
let r2 = s(o2.value ? "visible" : "hidden"), i2 = Zl(() => {
|
|
2077
2086
|
r2.value = "hidden";
|
|
2078
2087
|
}), d2 = s(true), c2 = { show: o2, appear: u(() => e2.appear || !d2.value) };
|
|
2079
2088
|
return b(() => {
|
|
2080
2089
|
h(() => {
|
|
2081
|
-
d2.value = false, o2.value ? r2.value = "visible" :
|
|
2090
|
+
d2.value = false, o2.value ? r2.value = "visible" : Gl(i2) || (r2.value = "hidden");
|
|
2082
2091
|
});
|
|
2083
|
-
}), S(
|
|
2084
|
-
let a3 =
|
|
2085
|
-
return
|
|
2092
|
+
}), S(Jl, i2), S(Wl, c2), () => {
|
|
2093
|
+
let a3 = dt(e2, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), o3 = { unmount: e2.unmount };
|
|
2094
|
+
return ot({ ourProps: { ...o3, as: "template" }, theirProps: {}, slot: {}, slots: { ...n2, default: () => [x(en, { onBeforeEnter: () => t2("beforeEnter"), onAfterEnter: () => t2("afterEnter"), onBeforeLeave: () => t2("beforeLeave"), onAfterLeave: () => t2("afterLeave"), ...l2, ...o3, ...a3 }, n2.default)] }, attrs: {}, features: Xl, visible: "visible" === r2.value, name: "Transition" });
|
|
2086
2095
|
};
|
|
2087
2096
|
} });
|
|
2088
|
-
function
|
|
2097
|
+
function ln(t2, l2) {
|
|
2089
2098
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" })]);
|
|
2090
2099
|
}
|
|
2091
|
-
function
|
|
2100
|
+
function nn(t2, l2) {
|
|
2092
2101
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18" })]);
|
|
2093
2102
|
}
|
|
2094
|
-
function
|
|
2103
|
+
function an(t2, l2) {
|
|
2095
2104
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 5.25h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5" })]);
|
|
2096
2105
|
}
|
|
2097
|
-
function
|
|
2106
|
+
function on(t2, l2) {
|
|
2098
2107
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })]);
|
|
2099
2108
|
}
|
|
2100
|
-
function
|
|
2109
|
+
function rn(t2, l2) {
|
|
2101
2110
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m4.5 12.75 6 6 9-13.5" })]);
|
|
2102
2111
|
}
|
|
2103
|
-
function
|
|
2112
|
+
function sn(t2, l2) {
|
|
2104
2113
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })]);
|
|
2105
2114
|
}
|
|
2106
|
-
function
|
|
2115
|
+
function un(t2, l2) {
|
|
2107
2116
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5 8.25 12l7.5-7.5" })]);
|
|
2108
2117
|
}
|
|
2109
|
-
function
|
|
2118
|
+
function dn(t2, l2) {
|
|
2110
2119
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" })]);
|
|
2111
2120
|
}
|
|
2112
|
-
function
|
|
2121
|
+
function cn(t2, l2) {
|
|
2113
2122
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" })]);
|
|
2114
2123
|
}
|
|
2115
|
-
function
|
|
2124
|
+
function pn(t2, l2) {
|
|
2116
2125
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })]);
|
|
2117
2126
|
}
|
|
2118
|
-
function
|
|
2127
|
+
function gn(t2, l2) {
|
|
2119
2128
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" })]);
|
|
2120
2129
|
}
|
|
2121
|
-
function
|
|
2130
|
+
function mn(t2, l2) {
|
|
2122
2131
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M10.05 4.575a1.575 1.575 0 1 0-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 0 1 3.15 0v1.5m-3.15 0 .075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 0 1 3.15 0V15M6.9 7.575a1.575 1.575 0 1 0-3.15 0v8.175a6.75 6.75 0 0 0 6.75 6.75h2.018a5.25 5.25 0 0 0 3.712-1.538l1.732-1.732a5.25 5.25 0 0 0 1.538-3.712l.003-2.024a.668.668 0 0 1 .198-.471 1.575 1.575 0 1 0-2.228-2.228 3.818 3.818 0 0 0-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0 1 16.35 15m.002 0h-.002" })]);
|
|
2123
2132
|
}
|
|
2124
|
-
function
|
|
2133
|
+
function fn(t2, l2) {
|
|
2125
2134
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" })]);
|
|
2126
2135
|
}
|
|
2127
|
-
function
|
|
2136
|
+
function vn(t2, l2) {
|
|
2128
2137
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" })]);
|
|
2129
2138
|
}
|
|
2130
|
-
function
|
|
2139
|
+
function hn(t2, l2) {
|
|
2131
2140
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" })]);
|
|
2132
2141
|
}
|
|
2133
|
-
function
|
|
2142
|
+
function bn(t2, l2) {
|
|
2134
2143
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" })]);
|
|
2135
2144
|
}
|
|
2136
|
-
function
|
|
2145
|
+
function yn(t2, l2) {
|
|
2137
2146
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })]);
|
|
2138
2147
|
}
|
|
2139
|
-
function
|
|
2148
|
+
function xn(t2, l2) {
|
|
2140
2149
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" })]);
|
|
2141
2150
|
}
|
|
2142
|
-
const
|
|
2151
|
+
const wn = { class: "py-1" }, kn = ["onClick"], Sn = { key: 1, class: "animate-pulse px-4 py-2 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left" }, Cn = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1), On = { name: "uiDropdown" }, Mn = Object.assign(On, { props: { items: { type: Array, required: true }, position: { type: String, default: "left" }, disabled: Boolean, label: String, loading: { type: Boolean, default: true } }, emits: ["optionSelected"], setup(l2, { emit: r2 }) {
|
|
2143
2152
|
const s2 = r2, c2 = l2, p2 = u(() => {
|
|
2144
2153
|
let e2 = c2.items.find((e3) => true === e3.active);
|
|
2145
2154
|
return e2 ? e2.name : c2.label;
|
|
2146
2155
|
});
|
|
2147
|
-
return (r3, u2) => l2.loading ? (e(), a("div",
|
|
2156
|
+
return (r3, u2) => l2.loading ? (e(), a("div", Sn, [Cn, o(d(sn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-200 dark:text-gray-300" })])) : (e(), t(d(_l), { key: 0, as: "div", class: n(["relative inline-block text-left", { "opacity-25": l2.disabled }]) }, { default: T(() => [i("div", null, [o(d(Pl), { class: "inline-flex justify-between w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500" }, { default: T(() => [I(_(p2.value) + " ", 1), o(d(sn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5" })]), _: 1 })]), o(P, { "enter-active-class": "transition ease-out duration-100", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: T(() => [l2.disabled ? R("", true) : (e(), t(d(jl), { key: 0, class: n([{ "right-0": "right" === l2.position, "left-0": "left" === l2.position }, "origin-top-right absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-10"]) }, { default: T(() => [i("div", wn, [(e(true), a(w, null, j(l2.items, (l3, a2) => (e(), t(d(Rl), { key: a2 }, { default: T(() => [i("a", { onClick: (e2) => ((e3) => {
|
|
2148
2157
|
c2.disabled || s2("optionSelected", e3.value);
|
|
2149
|
-
})(l3), class: n([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11,
|
|
2150
|
-
} }),
|
|
2158
|
+
})(l3), class: n([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11, kn)]), _: 2 }, 1024))), 128))])]), _: 1 }, 8, ["class"]))]), _: 1 })]), _: 1 }, 8, ["class"]));
|
|
2159
|
+
} }), Dn = { key: 0 }, En = { class: "flex justify-between" }, Tn = { key: 0, class: "block text-sm font-medium text-gray-700" }, In = { key: 1, class: "text-[10px] text-gray-500 uppercase justify-self-end" }, _n = ["disabled", "name", "placeholder", "type"], Pn = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" }, jn = { key: 1, class: "animate-pulse" }, Rn = { key: 0, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, Bn = i("div", { class: "animate-pulse px-4 py-3.5 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left w-full" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" })], -1), An = { name: "uiInput" }, Ln = Object.assign(An, { props: { label: String, type: { type: String, default: "text" }, name: String, placeholder: { type: String, default: "..." }, icon: { type: Function, default: () => {
|
|
2151
2160
|
} }, disabled: Boolean, color: { type: String, default: "gray" }, value: { type: String, default: "" }, error: String, optional: String, addOn: String, rightAddOn: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged", "rightAddOnClicked", "addOnClicked"], setup(t2, { emit: l2 }) {
|
|
2152
2161
|
const r2 = l2, u2 = t2, c2 = s(u2.value);
|
|
2153
2162
|
return p(() => u2.value, (e2) => {
|
|
2154
2163
|
c2.value = e2, r2("inputChanged", { name: u2.name, value: c2.value });
|
|
2155
|
-
}), (l3, r3) => t2.loading ? (e(), a("div",
|
|
2156
|
-
} }),
|
|
2164
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", jn, [void 0 !== t2.label ? (e(), a("div", Rn)) : R("", true), Bn])) : (e(), a("div", Dn, [i("div", En, [t2.label ? (e(), a("label", Tn, _(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", In, _(t2.optional), 1)) : R("", true)]), i("div", { class: n([{ "mt-1": t2.label }, "relative flex"]) }, [t2.addOn ? (e(), a("span", { key: 0, onClick: r3[0] || (r3[0] = (e2) => l3.$emit("addOnClicked")), class: "inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm cursor-pointer" }, _(t2.addOn), 1)) : R("", true), B(i("input", { "onUpdate:modelValue": r3[1] || (r3[1] = (e2) => c2.value = e2), class: n([{ "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-400": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color, "rounded-md": !t2.addOn || !t2.rightAddOn, "rounded-r-md": t2.addOn, "rounded-l-none": t2.addOn, "rounded-l-md": t2.rightAddOn, "rounded-r-none": t2.rightAddOn }, "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 placeholder-gray-300"]), disabled: t2.disabled, name: t2.name, placeholder: t2.placeholder, type: t2.type, onInput: r3[2] || (r3[2] = (e2) => l3.$emit("inputChanged", { value: e2.target.value, name: e2.target.name })) }, null, 42, _n), [[A, c2.value]]), t2.rightAddOn ? (e(), a("span", { key: 1, onClick: r3[3] || (r3[3] = (e2) => l3.$emit("rightAddOnClicked")), class: "inline-flex items-center px-3 rounded-r-md border border-l-0 border-gray-300 bg-gray-50 hover:bg-gray-200 text-gray-500 sm:text-sm cursor-pointer" }, _(t2.rightAddOn), 1)) : R("", true), t2.icon ? (e(), a("div", Pn, [o(J, { icon: t2.icon, color: t2.color, loading: t2.loading }, null, 8, ["icon", "color", "loading"]), B(o(J, { icon: d(rn), color: "green", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "success" === t2.color]]), B(o(J, { icon: d(gn), color: "yellow", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "warning" === t2.color]]), B(o(J, { icon: d(xn), color: "red", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "danger" === t2.color]])])) : R("", true)], 2), B(i("p", { class: n([{ "text-gray-400": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(t2.error), 3), [[L, t2.error]])]));
|
|
2165
|
+
} }), Fn = { key: 0 }, Nn = { class: "flex justify-between" }, zn = { key: 0, class: "block text-sm font-medium text-gray-700" }, $n = { key: 1, class: "text-[10px] text-gray-500 uppercase" }, Vn = { class: "space-y-1 flex flex-col items-center justify-center" }, Hn = { class: "flex text-sm text-gray-600 flex flex-col sm:flex-row text-center" }, Yn = { for: "file-upload", class: "relative cursor-pointer rounded-md font-medium text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:text-indigo-500" }, Un = ["accept"], qn = { class: "pl-1" }, Wn = { class: "text-xs text-gray-500 pb-4" }, Kn = { class: "mt-2 text-xs flex flex-row items-center text-red-300" }, Jn = { key: 1, class: "animate-pulse" }, Gn = [i("div", { class: "flex justify-center items-center flex-col rounded-md border-2 border-dashed px-6 pt-5 pb-6 border-gray-200" }, [i("div", { class: "rounded-full h-20 w-20 bg-gray-200 mb-4" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/3 mb-3" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/4 mb-3" })], -1)], Zn = { name: "uiInputFile" }, Xn = Object.assign(Zn, { props: { name: String, label: String, optional: String, placeholder: String, dragAndDrop: String, fileTypesAndSizes: String, error: String, accept: String, icon: { type: Function, default: function(t2, l2) {
|
|
2157
2166
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m0-3-3-3m0 0-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75" })]);
|
|
2158
2167
|
} }, loading: { type: Boolean, default: true } }, emits: ["filesUploaded"], setup(t2, { emit: l2 }) {
|
|
2159
2168
|
const r2 = s(""), u2 = l2, c2 = t2, p2 = (e2) => {
|
|
@@ -2162,42 +2171,42 @@ const bn = { class: "py-1" }, yn = ["onClick"], xn = { key: 1, class: "animate-p
|
|
|
2162
2171
|
}, g2 = (e2) => {
|
|
2163
2172
|
u2("filesUploaded", e2.target.files), c2.filename = e2.target.files[0].name;
|
|
2164
2173
|
};
|
|
2165
|
-
return (l3, s2) => t2.loading ? (e(), a("div",
|
|
2166
|
-
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div",
|
|
2167
|
-
} }),
|
|
2174
|
+
return (l3, s2) => t2.loading ? (e(), a("div", Jn, Gn)) : (e(), a("div", Fn, [i("div", Nn, [t2.label ? (e(), a("label", zn, _(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", $n, _(t2.optional), 1)) : R("", true)]), i("div", { class: n([[{ "mt-1": t2.label }, { "border-gray-300 hover:border-gray-400": !t2.error }, { "border-red-300 hover:border-red-400": t2.error }], "dropArea flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"]), onDragover: s2[0] || (s2[0] = F(() => {
|
|
2175
|
+
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div", Vn, [o(J, { icon: t2.icon, size: "massive", color: "gray", "aria-hidden": "true", class: "mb-4", loading: t2.loading }, null, 8, ["icon", "loading"]), i("div", Hn, [i("label", Yn, [i("span", null, _(t2.placeholder), 1), i("input", { id: "file-upload", name: "file-upload", type: "file", class: "sr-only", accept: t2.accept, onChange: g2 }, null, 40, Un)]), i("p", qn, _(t2.dragAndDrop), 1)]), i("p", Wn, _(t2.fileTypesAndSizes), 1), B(i("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, _(r2.value), 513), [[L, "" !== r2.value]])])], 34), B(i("p", Kn, [o(J, { icon: d(yn), color: "red", class: "mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), I(_(t2.error), 1)], 512), [[L, t2.error]])]));
|
|
2176
|
+
} }), Qn = { class: "relative mt-1" }, ea = { key: 1, class: "animate-pulse px-4 py-2.5 bg-gray-200 rounded-md flex justify-between items-center w-full" }, ta = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1), la = { name: "uiSelect" }, na = Object.assign(la, { props: { items: { type: Array, required: true }, label: String, error: String, color: String, select: Object, loading: { type: Boolean, default: true }, disabled: { type: Boolean, default: false } }, emits: ["selectChanged"], setup(l2, { emit: r2 }) {
|
|
2168
2177
|
const c2 = s(""), p2 = r2, g2 = l2, m2 = u(() => "" === c2.value ? g2.items : g2.items.filter((e2) => e2.name.toLowerCase().includes(c2.value.toLowerCase()))), f2 = u(() => g2.select);
|
|
2169
|
-
return (r3, s2) => l2.loading ? (e(), a("div",
|
|
2170
|
-
} }),
|
|
2178
|
+
return (r3, s2) => l2.loading ? (e(), a("div", ea, [ta, o(d(cn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-300 dark:text-gray-400" })])) : (e(), t(d(jt), { key: 0, modelValue: f2.value, "onUpdate:modelValue": [s2[1] || (s2[1] = (e2) => f2.value = e2), s2[2] || (s2[2] = (e2) => p2("selectChanged", e2))], disabled: l2.disabled, as: "div" }, { default: T(() => [o(d(Rt), { class: "block text-sm font-medium" }, { default: T(() => [I(_(l2.label), 1)]), _: 1 }), i("div", Qn, [o(d(At), { "display-value": (e2) => e2 == null ? void 0 : e2.name, class: n([{ "border-gray-300": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "border-red-400": "danger" === l2.color, "border-yellow-400": "warning" === l2.color, "border-green-400": "success" === l2.color, "bg-gray-100": l2.disabled, "bg-white": !l2.disabled, "text-black": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-gray-300": l2.disabled, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "w-full rounded-md border py-2 pl-3 pr-10 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm"]), onChange: s2[0] || (s2[0] = (e2) => c2.value = e2.target.value) }, null, 8, ["display-value", "class"]), o(d(Bt), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, { default: T(() => [o(d(cn), { "aria-hidden": "true", class: "h-5 w-5 text-gray-400" })]), _: 1 }), m2.value.length > 0 ? (e(), t(d(Lt), { key: 0, class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" }, { default: T(() => [(e(true), a(w, null, j(m2.value, (l3) => (e(), t(d(Ft), { key: l3.id, value: l3, as: "template" }, { default: T(({ active: t2, selected: r4 }) => [i("li", { class: n(["relative cursor-default select-none py-2 pl-3 pr-9", t2 ? "bg-indigo-600 text-white" : "text-gray-900"]) }, [i("span", { class: n(["block truncate", r4 && "font-semibold"]) }, _(l3.name), 3), r4 ? (e(), a("span", { key: 0, class: n(["absolute inset-y-0 right-0 flex items-center pr-4", t2 ? "text-white" : "text-indigo-600"]) }, [o(d(rn), { "aria-hidden": "true", class: "h-5 w-5", loading: true })], 2)) : R("", true)], 2)]), _: 2 }, 1032, ["value"]))), 128))]), _: 1 })) : R("", true)]), B(i("p", { class: n([{ "text-gray-400": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(l2.error), 3), [[L, l2.error]])]), _: 1 }, 8, ["modelValue", "disabled"]));
|
|
2179
|
+
} }), aa = { key: 1, class: "inline-flex items-center px-3 py-2.5 rounded text-xs font-medium leading-none animate-pulse bg-gray-200" }, oa = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" }, null, -1)], ra = { name: "uiTag" }, ia = Object.assign(ra, { props: { color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("div", aa, oa)) : (e(), a("span", { key: 0, class: n([{ "bg-indigo-100 text-indigo-800 border border-indigo-200": "primary" === t2.color, "bg-red-100 text-red-800 border border-red-200": "danger" === t2.color, "bg-yellow-100 text-yellow-800 border border-yellow-200": "warning" === t2.color, "bg-green-100 text-green-800 border border-green-200": "success" === t2.color, "bg-black text-white border border-black": "black" === t2.color, "text-black border border-gray-200 bg-white": "white" === t2.color }, "inline-flex items-center px-3 py-2 rounded text-xs font-medium leading-none"]) }, [r(l2.$slots, "default")], 2)) }), sa = { key: 0 }, ua = { key: 0, class: "block text-sm font-medium text-gray-700" }, da = ["disabled", "placeholder"], ca = { key: 1, class: "animate-pulse" }, pa = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, null, -1), i("div", { class: "h-24 bg-gray-200 rounded-lg flex inline-flex items-center relative inline-block text-left w-full" }, null, -1)], ga = { name: "uiTextArea" }, ma = Object.assign(ga, { props: { label: String, placeholder: { type: String, default: "..." }, value: String, color: String, disabled: { type: Boolean, default: false }, error: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged"], setup(t2, { emit: l2 }) {
|
|
2171
2180
|
const r2 = l2, u2 = t2, c2 = (e2) => {
|
|
2172
2181
|
r2("inputChanged", e2.target.value);
|
|
2173
2182
|
}, g2 = s(u2.value);
|
|
2174
2183
|
return p(() => u2.value, (e2) => {
|
|
2175
2184
|
g2.value = e2, r2("inputChanged", e2);
|
|
2176
|
-
}), (l3, r3) => t2.loading ? (e(), a("div",
|
|
2177
|
-
} }),
|
|
2185
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", ca, pa)) : (e(), a("div", sa, [t2.label ? (e(), a("label", ua, _(t2.label), 1)) : R("", true), i("div", { class: n({ "mt-1": t2.label }) }, [B(i("textarea", { disabled: t2.disabled, rows: "4", "onUpdate:modelValue": r3[0] || (r3[0] = (e2) => g2.value = e2), placeholder: t2.placeholder, class: n(["shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md", { "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-300": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }]), onChange: c2 }, null, 42, da), [[N, g2.value]])], 2), B(i("p", { class: n([{ "text-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, [o(J, { icon: d(yn), color: "red", class: "mr-2" }, null, 8, ["icon"]), I(_(t2.error), 1)], 2), [[L, t2.error]])]));
|
|
2186
|
+
} }), fa = { class: "text-sm font-medium text-gray-900" }, va = { key: 0, class: "text-sm text-gray-500 ml-2" }, ha = { key: 1, class: "animate-pulse flex items-center" }, ba = [i("div", { class: "relative bg-gray-200 rounded-full w-12 h-6 p-1 flex items-center" }, [i("div", { class: "rounded-full bg-gray-300 dark:bg-gray-400 h-4 w-4" })], -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-16 ml-2" }, null, -1)], ya = { name: "uiToggle" }, xa = Object.assign(ya, { props: { item: { type: Object, required: true }, checked: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup(l2) {
|
|
2178
2187
|
const r2 = s(l2.checked);
|
|
2179
|
-
return (s2, u2) => l2.loading ? (e(), a("div",
|
|
2180
|
-
} }),
|
|
2188
|
+
return (s2, u2) => l2.loading ? (e(), a("div", ha, ba)) : (e(), t(d(Nl), { key: 0, as: "div", class: "flex items-center relative" }, { default: T(() => [o(d(zl), { disabled: l2.disabled, onClick: u2[0] || (u2[0] = (e2) => s2.$emit("toggleChanged", { item: l2.item, active: !r2.value })), modelValue: r2.value, "onUpdate:modelValue": u2[1] || (u2[1] = (e2) => r2.value = e2), class: n([r2.value ? "bg-indigo-600" : "bg-gray-200", "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"]) }, { default: T(() => [i("span", { "aria-hidden": "true", class: n([r2.value ? "translate-x-5" : "translate-x-0", l2.disabled ? "bg-gray-300" : "", "pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"]) }, null, 2)]), _: 1 }, 8, ["disabled", "modelValue", "class"]), o(d($l), { as: "span", class: "ml-3" }, { default: T(() => [i("span", fa, _(l2.item.title), 1), l2.item.subtitle ? (e(), a("span", va, _(l2.item.subtitle), 1)) : R("", true)]), _: 1 }), l2.item.action ? (e(), a("span", { key: 0, class: "cursor-pointer text-indigo-600 hover:text-indigo-400 uppercase text-xs absolute right-0 bottom-0.5", onClick: u2[2] || (u2[2] = (e2) => s2.$emit("actionClicked", l2.item)) }, _(l2.item.action), 1)) : R("", true)]), _: 1 }));
|
|
2189
|
+
} }), wa = { key: 0, class: "flex flex-col" }, ka = { class: "flex" }, Sa = { class: "flex-shrink-0" }, Ca = { class: "ml-3" }, Oa = { class: "mt-4" }, Ma = { class: "-mx-2 -my-1.5 flex" }, Da = ["onClick"], Ea = { key: 1, class: "flex flex-col animate-pulse" }, Ta = [z('<div class="p-4 border-l-4 bg-gray-100 border-gray-400 rounded"><div class="flex"><div class="flex-shrink-0"><div class="h-6 w-6 animate-pulse rounded-full bg-gray-200 dark:bg-gray-300"></div></div><div class="ml-3 w-full"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-3/5"></div></div></div></div>', 1)], Ia = { name: "uiAlert" }, _a = Object.assign(Ia, { props: { actions: { type: Array }, title: { type: String }, type: { type: String, default: "info" }, loading: { type: Boolean, default: true } }, setup: (l2) => (o2, s2) => l2.loading ? (e(), a("div", Ea, Ta)) : (e(), a("div", wa, [i("div", { class: n([{ "bg-indigo-50 border-indigo-400": "info" === l2.type, "bg-red-50 border-red-400": "danger" === l2.type, "bg-yellow-50 border-yellow-400": "warning" === l2.type, "bg-green-50 border-green-400": "success" === l2.type }, "p-4 border-l-4 rounded"]) }, [i("div", ka, [i("div", Sa, ["info" === l2.type ? (e(), t(d(vn), { key: 0, class: "h-8 w-8 text-indigo-400", "aria-hidden": "true" })) : R("", true), "danger" === l2.type ? (e(), t(d(yn), { key: 1, class: "h-8 w-8 text-red-400", "aria-hidden": "true" })) : R("", true), "warning" === l2.type ? (e(), t(d(gn), { key: 2, class: "h-8 w-8 text-yellow-400", "aria-hidden": "true" })) : R("", true), "success" === l2.type ? (e(), t(d(on), { key: 3, class: "h-8 w-8 text-green-400", "aria-hidden": "true" })) : R("", true)]), i("div", Ca, [i("h3", { class: n([{ "text-red-800": "danger" === l2.type, "text-yellow-800": "warning" === l2.type, "text-green-800": "success" === l2.type }, "text-sm font-medium"]) }, _(l2.title), 3), i("div", { class: n([{ "text-red-700": "danger" === l2.type, "text-yellow-700": "warning" === l2.type, "text-green-700": "success" === l2.type }, "mt-2 text-sm"]) }, [r(o2.$slots, "default")], 2), i("div", Oa, [i("div", Ma, [(e(true), a(w, null, j(l2.actions, (t2, r2) => (e(), a("button", { onClick: (e2) => o2.$emit("alertEvent", t2.event), type: "button", key: r2, class: n([{ "bg-green-50 text-green-800 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50": "success" === l2.type, "bg-indigo-50 text-indigo-800 hover:bg-indigo-100 focus:ring-indigo-600 focus:ring-offset-indigo-50": "info" === l2.type, "bg-red-50 text-red-800 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50": "danger" === l2.type, "bg-yellow-50 text-yellow-800 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50": "warning" === l2.type }, "px-2 py-1.5 text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2"]) }, _(t2.name), 11, Da))), 128))])])])])], 2)])) }), Pa = { key: 0, class: "inline-flex", "aria-label": "Breadcrumb" }, ja = { role: "list", class: "flex items-center space-x-4 text-xs" }, Ra = { key: 0 }, Ba = ["onClick"], Aa = { key: 1, class: "flex items-center" }, La = ["onClick", "aria-current"], Fa = { key: 1, class: "flex flex-row items-center animate-pulse" }, Na = [i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5 mr-4" }, null, -1), i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1)], za = { name: "uiBreadcrumbs" }, $a = Object.assign(za, { props: { pages: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => t2.loading ? (e(), a("div", Fa, Na)) : (e(), a("nav", Pa, [i("ol", ja, [(e(true), a(w, null, j(t2.pages, (t3, r3) => (e(), a("li", { key: r3 }, [0 === r3 ? (e(), a("div", Ra, [i("p", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: "flex flex-row items-center justify-center text-indigo-600 hover:text-indigo-800 cursor-pointer" }, [o(d(fn), { class: "flex-shrink-0 h-3 w-3 text-gray-400 mr-4", "aria-hidden": "true" }), i("span", null, _(t3.name), 1)], 8, Ba)])) : (e(), a("div", Aa, [o(d(dn), { class: "flex-shrink-0 h-3 w-3 text-gray-400", "aria-hidden": "true" }), i("span", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: n(["cursor-pointer ml-4 text-xs text-gray-400 hover:text-gray-500", { "text-indigo-600 hover:text-indigo-800": !t3.current }]), "aria-current": t3.current ? "page" : "" }, _(t3.name), 11, La)]))]))), 128))])])) }), Va = { class: "flex items-center flex-col sm:flex-row justify-center sm:justify-start" }, Ha = ["src"], Ya = { class: "font-bold text-center sm:text-left" }, Ua = { class: "mt-1 text-xs text-center sm:text-left" }, qa = { key: 0, class: "flex flex-wrap mt-4 justify-center sm:justify-start" }, Wa = { key: 1, class: "rounded-lg bg-white shadow p-6 cursor-pointer animate-pulse" }, Ka = [z('<div class="flex items-center flex-col sm:flex-row justify-center sm:justify-start w-full"><div class="w-16 h-16 rounded-full bg-gray-200 flex self-center"></div><div class="w-full ml-4"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mt-4 sm:mt-0 sm:w-16 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full sm:w-32"></div></div></div>', 1)], Ja = { name: "uiCard" }, Ga = Object.assign(Ja, { props: { id: { type: String, required: true }, name: { type: String, required: true }, type: String, tags: Array, logo: String, loading: { type: Boolean, default: true } }, setup: (l2) => (n2, o2) => {
|
|
2181
2190
|
var _a2;
|
|
2182
|
-
return l2.loading ? (e(), a("div",
|
|
2183
|
-
} }),
|
|
2191
|
+
return l2.loading ? (e(), a("div", Wa, Ka)) : (e(), a("div", { key: 0, class: "rounded-lg bg-white shadow p-6 cursor-pointer", onClick: o2[0] || (o2[0] = (e2) => n2.$emit("cardSelected", { id: l2.id, name: l2.name, type: l2.type, tags: l2.tags })) }, [i("div", Va, [i("img", { class: "w-16 h-16 rounded-full mb-4 sm:mb-0 sm:mr-4", src: l2.logo }, null, 8, Ha), i("div", null, [i("h4", Ya, _(l2.name), 1), i("p", Ua, _(l2.type), 1)])]), ((_a2 = l2.tags) == null ? void 0 : _a2.length) > 0 ? (e(), a("div", qa, [(e(true), a(w, null, j(l2.tags, (n3) => (e(), t(ia, { class: "mb-1 mr-1", key: n3.name, color: n3.color, loading: l2.loading }, { default: T(() => [I(_(n3.name), 1)]), _: 2 }, 1032, ["color", "loading"]))), 128))])) : R("", true)]));
|
|
2192
|
+
} }), Za = { name: "uiFilter" }, Xa = Object.assign(Za, { props: { position: { type: String, default: "left" }, items: { type: Array, required: true }, label: { type: String, required: true }, loading: { type: Boolean, default: true } }, emits: ["filterSelected"], setup(l2, { emit: n2 }) {
|
|
2184
2193
|
const a2 = n2, o2 = s(l2.items);
|
|
2185
|
-
return (n3, r2) => (e(), t(
|
|
2194
|
+
return (n3, r2) => (e(), t(Mn, { loading: l2.loading, onOptionSelected: r2[0] || (r2[0] = (e2) => ((e3) => {
|
|
2186
2195
|
o2.value.forEach((t2) => {
|
|
2187
2196
|
t2.value !== e3 ? t2.active = false : t2.active = true;
|
|
2188
2197
|
}), a2("filterSelected", e3);
|
|
2189
2198
|
})(e2)), position: l2.position, items: o2.value, label: l2.label }, null, 8, ["loading", "position", "items", "label"]));
|
|
2190
|
-
} }),
|
|
2199
|
+
} }), Qa = i("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), eo = { class: "fixed inset-0 z-10 overflow-y-auto" }, to = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, lo = { class: "absolute top-0 right-0 hidden pt-4 pr-4 sm:block" }, no = i("span", { class: "sr-only" }, "X", -1), ao = { class: "sm:flex sm:items-start" }, oo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left sm:mr-4 sm:w-10/12 break-words" }, ro = { class: "mt-4 text-gray-500 text-sm" }, io = { key: 0, class: "mt-8" }, so = ["onClick"], uo = { name: "uiModal" }, co = Object.assign(uo, { props: { title: String, actions: Object, modalName: String, open: { type: Boolean, default: false }, type: { type: String, default: "default" }, loading: { type: Boolean, default: false } }, emits: ["modalAction"], setup(l2, { emit: s2 }) {
|
|
2191
2200
|
const u2 = l2, c2 = s2, p2 = (e2) => {
|
|
2192
2201
|
c2("modalAction", { modal: u2.modalName, action: e2 });
|
|
2193
2202
|
};
|
|
2194
|
-
return (s3, u3) => (e(), t(d(
|
|
2195
|
-
} }),
|
|
2203
|
+
return (s3, u3) => (e(), t(d(tn), { as: "template", show: l2.open }, { default: T(() => [o(d(ml), { as: "div", class: "relative z-10", onClose: u3[1] || (u3[1] = (e2) => p2("close")) }, { default: T(() => [o(d(Ql), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0", "enter-to": "opacity-100", leave: "ease-in duration-200", "leave-from": "opacity-100", "leave-to": "opacity-0" }, { default: T(() => [Qa]), _: 1 }), i("div", eo, [i("div", to, [o(d(Ql), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", "enter-to": "opacity-100 translate-y-0 sm:scale-100", leave: "ease-in duration-200", "leave-from": "opacity-100 translate-y-0 sm:scale-100", "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" }, { default: T(() => [o(d(fl), { class: "relative transform rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 w-9/12 sm:w-full sm:max-w-lg sm:p-6" }, { default: T(() => [i("div", lo, [i("button", { type: "button", class: "rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none", onClick: u3[0] || (u3[0] = (e2) => p2("close")) }, [no, o(J, { icon: d(xn), "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])])]), i("div", ao, [i("div", { class: n(["mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10", { "bg-red-100": "danger" === l2.type, "bg-green-100": "success" === l2.type, "bg-indigo-100": "default" === l2.type, "bg-yellow-100": "warning" === l2.type }]) }, [B(o(d(xn), { class: "h-6 w-6 text-red-600", "aria-hidden": "true" }, null, 512), [[L, "danger" === l2.type]]), B(o(d(rn), { class: "h-6 w-6 text-green-600", "aria-hidden": "true" }, null, 512), [[L, "success" === l2.type]]), B(o(d(gn), { class: "h-6 w-6 text-yellow-600", "aria-hidden": "true" }, null, 512), [[L, "warning" === l2.type]]), B(o(d(mn), { class: "h-6 w-6 text-indigo-600", "aria-hidden": "true" }, null, 512), [[L, "default" === l2.type]])], 2), i("div", oo, [o(d(vl), { as: "h3", class: "text-lg font-medium leading-6 text-gray-900" }, { default: T(() => [I(_(l2.title), 1)]), _: 1 }), i("div", ro, [r(s3.$slots, "default")]), l2.actions ? (e(), a("div", io, [(e(true), a(w, null, j(l2.actions, (t2, l3) => (e(), a("button", { key: l3, type: "button", class: "inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 mb-2 sm:mb-0 mr-2 sm:w-auto sm:text-sm", onClick: (e2) => p2(t2.value) }, _(t2.name), 9, so))), 128))])) : R("", true)])])]), _: 3 })]), _: 3 })])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2204
|
+
} }), po = { class: "w-full flex flex-col items-center space-y-4 sm:items-end" }, go = { key: 0, class: "max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden" }, mo = { class: "p-4" }, fo = { class: "flex items-start" }, vo = { class: "flex-shrink-0 mt-0.5" }, ho = { class: "ml-3 w-0 flex-1 pt-0.5" }, bo = { class: "font-medium text-gray-900" }, yo = { class: "mt-1 text-sm text-gray-500" }, xo = { class: "ml-4 flex-shrink-0 flex" }, wo = i("span", { class: "sr-only" }, "Close", -1), ko = { name: "uiNotification" }, So = Object.assign(ko, { props: { show: Boolean, type: { type: String, default: "info" }, title: String, message: String, fixed: { type: Boolean, default: true } }, setup(t2) {
|
|
2196
2205
|
const l2 = t2, r2 = u(() => l2.show);
|
|
2197
|
-
return (l3, s2) => (e(), a("div", { "aria-live": "assertive", class: n([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div",
|
|
2198
|
-
} }),
|
|
2206
|
+
return (l3, s2) => (e(), a("div", { "aria-live": "assertive", class: n([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div", po, [o(P, { "enter-active-class": "transform ease-out duration-300 transition", "enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2", "enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0", "leave-active-class": "transition ease-in duration-100", "leave-from-class": "opacity-100", "leave-to-class": "opacity-0" }, { default: T(() => [r2.value ? (e(), a("div", go, [i("div", mo, [i("div", fo, [i("div", vo, [B(o(d(on), { "aria-hidden": "true", class: "h-6 w-6 text-green-400" }, null, 512), [[L, "success" === t2.type]]), B(o(d(yn), { "aria-hidden": "true", class: "h-6 w-6 text-red-400" }, null, 512), [[L, "danger" === t2.type]]), B(o(d(gn), { "aria-hidden": "true", class: "h-6 w-6 text-yellow-400" }, null, 512), [[L, "warning" === t2.type]]), B(o(d(vn), { "aria-hidden": "true", class: "h-6 w-6 text-indigo-600" }, null, 512), [[L, "info" === t2.type]])]), i("div", ho, [i("p", bo, _(t2.title), 1), i("p", yo, _(t2.message), 1)]), i("div", xo, [i("button", { class: "bg-white rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", type: "button", onClick: s2[0] || (s2[0] = (e2) => l3.$emit("closeNotification")) }, [wo, o(d(xn), { "aria-hidden": "true", class: "h-5 w-5" })])])])])])) : R("", true)]), _: 1 })])], 2));
|
|
2207
|
+
} }), Co = { key: 0, role: "list", class: "divide-y divide-gray-100" }, Oo = { class: "min-w-0" }, Mo = { class: "flex items-start gap-x-3" }, Do = { class: "text-sm font-semibold leading-6 text-gray-900" }, Eo = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500" }, To = { class: "truncate" }, Io = { class: "flex flex-none items-center gap-x-4" }, _o = ["href"], Po = { class: "sr-only" }, jo = { key: 1, class: "divide-y divide-gray-100 animate-pulse" }, Ro = [z('<div class="min-w-0 w-full"><div class="flex items-start gap-x-3"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2"></p></div></div><div class="flex flex-none items-center gap-x-4"><div class="hidden rounded-md bg-gray-200 px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-10"></p></div></div>', 2)], Bo = { name: "uiTaskList" }, Ao = Object.assign(Bo, { props: { tasks: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("ul", jo, [(e(true), a(w, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, Ro))), 128))])) : (e(), a("ul", Co, [(e(true), a(w, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, [i("div", Oo, [i("div", Mo, [i("p", Do, _(t3.name), 1), i("p", { class: n([{ "text-green-700 bg-green-50 ring-green-600/20": "Complete" === t3.status, "text-gray-600 bg-gray-50 ring-gray-500/10": "In progress" === t3.status, "text-yellow-800 bg-yellow-50 ring-yellow-600/20": "Incomplete" === t3.status }, "rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-medium ring-1 ring-inset"]) }, _(t3.statusLiteral), 3)]), i("div", Eo, [i("p", To, _(t3.description), 1)])]), i("div", Io, [i("a", { href: t3.href, class: "hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block" }, [I(_(t3.action), 1), i("span", Po, ", " + _(t3.name), 1)], 8, _o)])]))), 128))])) });
|
|
2199
2208
|
"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
|
|
2200
|
-
function
|
|
2209
|
+
function Lo(e2) {
|
|
2201
2210
|
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
2202
2211
|
}
|
|
2203
2212
|
!function(e2) {
|
|
@@ -2233,42 +2242,42 @@ function Ro(e2) {
|
|
|
2233
2242
|
} };
|
|
2234
2243
|
l2.default.locale(n2, null, true);
|
|
2235
2244
|
}(Y);
|
|
2236
|
-
const
|
|
2245
|
+
const Fo = (e2, t2) => {
|
|
2237
2246
|
const l2 = e2.__vccOpts || e2;
|
|
2238
2247
|
for (const [e3, n2] of t2)
|
|
2239
2248
|
l2[e3] = n2;
|
|
2240
2249
|
return l2;
|
|
2241
|
-
},
|
|
2242
|
-
const
|
|
2250
|
+
}, No = { class: "dateSelector flex items-center text-white flex-row" }, zo = { class: "pagination flex items-center my-1 md:my-0" }, $o = { class: "date mx-4 font-bold text-center text-indigo-600 select-none uppercase" }, Vo = { class: "pagination flex items-center my-1 sm:my-0" };
|
|
2251
|
+
const Ho = Fo({ name: "dateSelector", components: { ChevronLeftIcon: un, ChevronRightIcon: dn }, computed: { currentDate() {
|
|
2243
2252
|
return Y(this.selectedDate).locale("es").format("DD MMM. YYYY");
|
|
2244
2253
|
} }, props: { selectedDate: { type: Object, required: true } }, methods: { selectDate(e2, t2) {
|
|
2245
2254
|
let l2;
|
|
2246
2255
|
"previous" === t2 && ("day" === e2 && (l2 = Y(this.selectedDate).subtract(1, "day")), "month" === e2 && (l2 = Y(this.selectedDate).subtract(1, "month")), "year" === e2 && (l2 = Y(this.selectedDate).subtract(1, "year"))), "next" === t2 && ("day" === e2 && (l2 = Y(this.selectedDate).add(1, "day")), "month" === e2 && (l2 = Y(this.selectedDate).add(1, "month")), "year" === e2 && (l2 = Y(this.selectedDate).add(1, "year"))), this.$emit("dateSelected", l2);
|
|
2247
2256
|
} } }, [["render", function(t2, l2, n2, r2, s2, u2) {
|
|
2248
2257
|
const d2 = $("ChevronLeftIcon"), c2 = $("ChevronRightIcon");
|
|
2249
|
-
return e(), a("div",
|
|
2250
|
-
}]]),
|
|
2251
|
-
const
|
|
2252
|
-
return e(), a("div",
|
|
2258
|
+
return e(), a("div", No, [i("div", zo, [i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[0] || (l2[0] = (e2) => u2.selectDate("year", "previous")) }, [o(d2, { class: "h-4" }), o(d2, { class: "h-4 -ml-3" }), o(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[1] || (l2[1] = (e2) => u2.selectDate("month", "previous")) }, [o(d2, { class: "h-4" }), o(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[2] || (l2[2] = (e2) => u2.selectDate("day", "previous")) }, [o(d2, { class: "h-4" })])]), i("div", $o, _(u2.currentDate), 1), i("div", Vo, [i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[3] || (l2[3] = (e2) => u2.selectDate("day", "next")) }, [o(c2, { class: "h-4" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[4] || (l2[4] = (e2) => u2.selectDate("month", "next")) }, [o(c2, { class: "h-4" }), o(c2, { class: "h-4 -ml-3" })]), i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[5] || (l2[5] = (e2) => u2.selectDate("year", "next")) }, [o(c2, { class: "h-4" }), o(c2, { class: "h-4 -ml-3" }), o(c2, { class: "h-4 -ml-3" })])])]);
|
|
2259
|
+
}]]), Yo = { name: "SkeletonTable" }, Uo = { class: "px-4 sm:px-6 lg:px-8 animate-pulse" }, qo = { class: "flow-root" }, Wo = { class: "-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, Ko = { class: "inline-block min-w-full py-2 align-middle px-1" }, Jo = { class: "overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, Go = { class: "min-w-full divide-y divide-gray-300" }, Zo = i("thead", { class: "bg-gray-50" }, [i("tr", null, [i("th", { scope: "col", class: "py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "relative py-3.5 pl-3 pr-4 sm:pr-6" }, [i("span", { class: "sr-only" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])])], -1), Xo = { class: "divide-y divide-gray-200 bg-white" }, Qo = [i("td", { class: "whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6" }, [i("a", { href: "#", class: "text-indigo-600 hover:text-indigo-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" }), i("span", { class: "sr-only" }, [I(", {"), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])], -1)];
|
|
2260
|
+
const er = Fo(Yo, [["render", function(t2, l2, n2, o2, r2, s2) {
|
|
2261
|
+
return e(), a("div", Uo, [i("div", qo, [i("div", Wo, [i("div", Ko, [i("div", Jo, [i("table", Go, [Zo, i("tbody", Xo, [(e(), a(w, null, j(10, (e2) => i("tr", { key: e2 }, Qo)), 64))])])])])])])]);
|
|
2253
2262
|
}]]);
|
|
2254
|
-
var
|
|
2255
|
-
|
|
2263
|
+
var tr = { exports: {} };
|
|
2264
|
+
tr.exports = function(e2, t2, l2) {
|
|
2256
2265
|
t2.prototype.isToday = function() {
|
|
2257
2266
|
var e3 = "YYYY-MM-DD", t3 = l2();
|
|
2258
2267
|
return this.format(e3) === t3.format(e3);
|
|
2259
2268
|
};
|
|
2260
2269
|
};
|
|
2261
|
-
const
|
|
2262
|
-
const
|
|
2263
|
-
return Y.extend(
|
|
2270
|
+
const lr = Lo(tr.exports), nr = { class: "text-xs" }, ar = { class: "font-bold text-lg" }, or = { class: "text-xs font-medium" };
|
|
2271
|
+
const rr = Fo({ name: "calendarDay", props: { day: Object }, computed: { currentDay() {
|
|
2272
|
+
return Y.extend(lr), { dayName: Y(this.day).locale("es").format("ddd"), day: Y(this.day).locale("es").format("DD"), month: Y(this.day).locale("es").format("MMM."), isWeekend: 6 == Y(this.day).format("d") || 0 == Y(this.day).format("d"), isToday: Y(this.day).isToday() };
|
|
2264
2273
|
} } }, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2265
|
-
return e(), a("div", { class: n(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p",
|
|
2266
|
-
}]]),
|
|
2274
|
+
return e(), a("div", { class: n(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p", nr, _(u2.currentDay.dayName), 1), i("p", ar, _(u2.currentDay.day), 1), i("p", or, _(u2.currentDay.month), 1)], 2);
|
|
2275
|
+
}]]), ir = { name: "dayPrice", props: { currency: String, price: Object, basePrice: Number, isBasePrice: { type: Boolean, default: false } }, computed: { currentDay() {
|
|
2267
2276
|
return { isWeekend: 6 == Y(this.price.date).format("d") || 0 == Y(this.price.date).format("d"), price: this.price.price };
|
|
2268
|
-
} } },
|
|
2269
|
-
const
|
|
2270
|
-
return e(), a("div",
|
|
2271
|
-
}]]), uiButton: ee, SkeletonTable:
|
|
2277
|
+
} } }, sr = { class: "priceDay" };
|
|
2278
|
+
const ur = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new Date(), date: /* @__PURE__ */ new Date(), selectedRooms: [], showBasePricesModal: false, showDays: 14 }), props: { type: String, category: { type: Object, required: true }, rooms: { type: Array, required: true }, currency: Object, actions: Array, loading: { type: Boolean, default: true }, literals: { type: Object, required: true } }, components: { DateSelector: Ho, Day: rr, Price: Fo(ir, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2279
|
+
return e(), a("div", sr, [i("div", { class: n([{ "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-green-300 text-white": o2.price.price > o2.basePrice, "bg-yellow-300 text-white": o2.price.price < o2.basePrice }, "select-none text-center rounded-lg p-1"]) }, _(u2.currentDay.price) + _(o2.currency), 3)]);
|
|
2280
|
+
}]]), uiButton: ee, SkeletonTable: er }, computed: { days() {
|
|
2272
2281
|
let e2 = [];
|
|
2273
2282
|
for (let t2 = 0; t2 < this.showDays; t2++)
|
|
2274
2283
|
e2.push(Y(this.date).add(t2, "day"));
|
|
@@ -2290,44 +2299,44 @@ const rr = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new
|
|
|
2290
2299
|
this.$emit("tableAction", e2);
|
|
2291
2300
|
}, changeRoomPrice(e2) {
|
|
2292
2301
|
this.$emit("changeRoomPrice", e2);
|
|
2293
|
-
} } },
|
|
2294
|
-
const
|
|
2302
|
+
} } }, dr = { key: 0, class: "px-4 sm:px-6 lg:px-8" }, cr = { class: "flow-root" }, pr = { class: "overflow-x-auto sm:-mx-6 lg:-mx-8 shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, gr = { class: "inline-block min-w-full align-middle" }, mr = { class: "min-w-full text-sm" }, fr = { class: "bg-white" }, vr = { colspan: "6", scope: "colgroup", class: "bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-3" }, hr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, br = { key: 0 }, yr = { colspan: "6", class: "pl-4" }, xr = { key: 1 }, wr = { colspan: "6", class: "pl-4" }, kr = { key: 2 }, Sr = { colspan: "6", class: "pl-4" }, Cr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900 relative" }, Or = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-48 bg-white shadow rounded px-4 py-1 z-10" }, Mr = ["onClick"], Dr = { colspan: "2", scope: "colgroup", class: "relative bg-gray-100 py-3.5 pl-4 pr-3 text-left font-semibold text-gray-900" }, Er = ["checked", "indeterminate"], Tr = { class: "pl-6" }, Ir = { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, _r = { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, Pr = i("th", { colspan: "14", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, null, -1), jr = { colspan: "2", class: "relative py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, Rr = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, Br = ["value"], Ar = { class: "pl-6" }, Lr = { colspan: "2", class: "pl-4" }, Fr = { colspan: "2", class: "pl-4" };
|
|
2303
|
+
const Nr = Fo(ur, [["render", function(l2, r2, s2, u2, d2, c2) {
|
|
2295
2304
|
var _a2, _b;
|
|
2296
2305
|
const p2 = $("DateSelector"), g2 = $("Day"), m2 = $("uiButton"), f2 = $("Price"), v2 = $("SkeletonTable");
|
|
2297
|
-
return s2.loading ? (e(), t(v2, { key: 1 })) : (e(), a("div",
|
|
2298
|
-
}]]),
|
|
2306
|
+
return s2.loading ? (e(), t(v2, { key: 1 })) : (e(), a("div", dr, [i("div", cr, [i("div", pr, [i("div", gr, [i("table", mr, [i("tbody", fr, [i("tr", null, [i("th", vr, [o(p2, { selectedDate: l2.date, onDateSelected: r2[0] || (r2[0] = (e2) => c2.changeDate(e2)) }, null, 8, ["selectedDate"])]), (e(true), a(w, null, j(c2.days, (t2, l3) => (e(), a("th", { scope: "col", key: l3, class: "text-sm font-semibold text-gray-900 p-0" }, [o(g2, { class: "border-l border-gray-200 px-6 py-3", day: t2 }, null, 8, ["day"])]))), 128))]), i("tr", null, [i("th", hr, [i("span", null, _(s2.literals.category) + " " + _(s2.category.name), 1), o(m2, { loading: s2.loading, class: "ml-4", size: "small", onClick: c2.changeCategoryBulkPrices }, { default: T(() => [I(_(s2.literals.changeInBulk), 1)]), _: 1 }, 8, ["loading", "onClick"])])]), "discounts" === s2.type ? (e(), a("tr", br, [i("td", yr, _(s2.literals.pricesDiscount), 1), (e(true), a(w, null, j(s2.category.selectionPrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategorySelectionPrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), "prices" === s2.type ? (e(), a("tr", xr, [i("td", wr, _(s2.literals.pricesSelection), 1), (e(true), a(w, null, j(s2.category.selectionPrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategorySelectionPrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), "prices" === s2.type ? (e(), a("tr", kr, [i("td", Sr, _(s2.literals.pricesUpgrade), 1), (e(true), a(w, null, j(s2.category.upgradePrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategoryUpgradePrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer bg-gray-100", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), i("tr", null, [i("th", Cr, [((_a2 = l2.selectedRooms) == null ? void 0 : _a2.length) > 0 && ((_b = s2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", Or, [(e(true), a(w, null, j(s2.actions, (t2, n2) => (e(), a("button", { onClick: (e2) => c2.tableAction({ action: t2.id, items: l2.selectedRooms }), key: n2, type: "button", class: "inline-flex items-center rounded bg-indigo-600 hover:bg-indigo-800 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm disabled:cursor-not-allowed disabled:opacity-30" }, _(t2.name), 9, Mr))), 128))])) : R("", true), i("span", null, _(s2.literals.pricesSelection), 1)])]), i("tr", null, [i("th", Dr, [i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", checked: c2.indeterminate || l2.selectedRooms.length === s2.rooms.length, indeterminate: c2.indeterminate, onChange: r2[1] || (r2[1] = (e2) => l2.selectedRooms = e2.target.checked ? s2.rooms.map((e3) => e3.name) : []) }, null, 40, Er), i("span", Tr, _(s2.literals.room), 1)]), i("th", Ir, _(s2.literals.building), 1), i("th", _r, _(s2.literals.floor), 1), Pr]), (e(true), a(w, null, j(s2.rooms, (t2) => (e(), a("tr", { key: t2.name, class: n([{ "even:bg-gray-100": "prices" === s2.type, "odd:bg-gray-100": "discounts" === s2.type }]) }, [i("td", jr, [l2.selectedRooms.includes(t2.name) ? (e(), a("div", Rr)) : R("", true), B(i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", value: t2.name, "onUpdate:modelValue": r2[2] || (r2[2] = (e2) => l2.selectedRooms = e2) }, null, 8, Br), [[V, l2.selectedRooms]]), i("span", Ar, _(t2.name), 1)]), i("td", Lr, _(t2.building), 1), i("td", Fr, _(t2.floor), 1), (e(true), a(w, null, j(t2.selectionPrices, (t3, l3) => (e(), a("td", { class: "p-0", key: l3 }, [o(f2, { onClick: (e2) => c2.changeRoomPrice(t3), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 cursor-pointer", price: t3, currency: s2.currency.symbol, basePrice: c2.getSelectionBasePrice(t3) }, null, 8, ["onClick", "price", "currency", "basePrice"])]))), 128))], 2))), 128))])])])])])]));
|
|
2307
|
+
}]]), zr = { class: "chart-selector flex flex-row items-center justify-center" }, $r = { name: "rangeSelector" }, Vr = Object.assign($r, { props: { range: { type: String } }, emits: ["rangeSelected"], setup(t2, { emit: l2 }) {
|
|
2299
2308
|
const o2 = l2, r2 = t2;
|
|
2300
2309
|
let s2 = u(() => r2.range);
|
|
2301
2310
|
const c2 = (e2) => {
|
|
2302
2311
|
s2.value = e2, o2("rangeSelected", e2);
|
|
2303
2312
|
};
|
|
2304
|
-
return (t3, l3) => (e(), a("ul",
|
|
2305
|
-
} }),
|
|
2313
|
+
return (t3, l3) => (e(), a("ul", zr, [i("li", { class: n({ selected: "24h" === d(s2) }), onClick: l3[0] || (l3[0] = (e2) => c2("24h")) }, " 24H ", 2), i("li", { class: n({ selected: "7d" === d(s2) }), onClick: l3[1] || (l3[1] = (e2) => c2("7d")) }, "7D", 2), i("li", { class: n({ selected: "1m" === d(s2) }), onClick: l3[2] || (l3[2] = (e2) => c2("1m")) }, "1M", 2), i("li", { class: n({ selected: "3m" === d(s2) }), onClick: l3[3] || (l3[3] = (e2) => c2("3m")) }, "3M", 2)]));
|
|
2314
|
+
} }), Hr = { class: "chart-header flex flex-row justify-between" }, Yr = { class: "text-sm font-medium text-gray-500 truncate" }, Ur = { class: "chart-content" }, qr = { class: "h-full w-full flex items-center justify-center flex-col" }, Wr = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Kr = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Jr = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], Gr = { name: "uiChart" }, Zr = Object.assign(Gr, { props: { title: String, id: { type: String, default: "noChartId" }, type: { type: String, default: "area" }, series: { type: Array, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, horizontal: { type: Boolean, default: false }, stacked: { type: Boolean, default: false }, height: { type: Number, default: 320 }, annotations: { type: Object } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2306
2315
|
const r2 = l2, s2 = t2;
|
|
2307
2316
|
let c2 = { chart: { toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff", "#00ffff", "#aba9ba"], stroke: { show: true, curve: "stepline", lineCap: "butt", width: 1, dashArray: 0 }, dataLabels: { enabled: true }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } } };
|
|
2308
2317
|
s2.annotations && (c2.annotations = { yaxis: [{ y: s2.annotations.high, borderColor: "#4f46e5", label: { borderColor: "#4f46e5", style: { color: "#fff", background: "#4f46e5" }, text: s2.annotations.text } }] }), "area" === s2.type && (c2.tooltip = { intersect: true, shared: false });
|
|
2309
2318
|
const p2 = u(() => s2.series), g2 = u(() => (c2.chart.stacked = s2.stacked, { ...c2, ...s2.options, plotOptions: { bar: { horizontal: s2.horizontal } } })), m2 = () => r2("chartUpdated"), f2 = (e2, t3, l3) => {
|
|
2310
2319
|
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
2311
2320
|
};
|
|
2312
|
-
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div",
|
|
2313
|
-
} }),
|
|
2314
|
-
const
|
|
2315
|
-
return e(), a("footer",
|
|
2316
|
-
}]]),
|
|
2321
|
+
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", Hr, [i("div", Yr, _(t2.title), 1), o(Vr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", Ur, [o(d(U), { type: t2.type, series: p2.value, width: "100%", height: t2.height, options: g2.value, onUpdated: m2, onMounted: m2, onDataPointSelection: f2 }, null, 8, ["type", "series", "height", "options"])], 512), [[L, !t2.empty]]), B(i("div", qr, [o(J, { icon: d(gn), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Wr], 512), [[L, t2.empty]])], 2), [[L, !t2.loading]]), B(i("div", Kr, Jr, 512), [[L, t2.loading]])], 64));
|
|
2322
|
+
} }), Xr = { name: "uiFooter" }, Qr = { class: "bg-white" }, ei = [i("div", { class: "mx-auto py-6 px-4 sm:px-6 md:flex md:items-center md:justify-between lg:px-8" }, [i("div", { class: "mt-8 md:mt-0 md:order-1" }, [i("p", { class: "text-center text-base text-gray-400" }, "© Made by Hotelinking.")])], -1)];
|
|
2323
|
+
const ti = Fo(Xr, [["render", function(t2, l2, n2, o2, r2, i2) {
|
|
2324
|
+
return e(), a("footer", Qr, ei);
|
|
2325
|
+
}]]), li = i("div", { class: "spinner h-12 w-12 mb-6" }, [i("img", { src: "https://images.hotelinking.com/ui/loader.gif", alt: "loading animation" })], -1), ni = { name: "uiLoadScreen" }, ai = Object.assign(ni, { props: { title: String, message: String, fixed: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => (e(), a("div", { class: n([{ fixed: t2.fixed }, "load-screen h-full w-full top-0 left-0 z-50 flex flex-col items-center justify-center bg-gray-50"]) }, [li, B(i("h2", { class: "text-xs font-bold text-center uppercase mb-2" }, _(t2.title), 513), [[L, t2.title]]), B(i("p", { class: "text-xs text-center uppercase md:w-1/4" }, _(t2.message), 513), [[L, t2.message]])], 2)) }), oi = { key: 0, class: "py-6 flex items-center justify-between" }, ri = { class: "flex-1 flex justify-between sm:hidden" }, ii = { href: "#", class: "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, si = { href: "#", class: "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, ui = { class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" }, di = { class: "text-sm text-gray-700" }, ci = { class: "font-bold" }, pi = { class: "font-bold" }, gi = { class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" }, mi = { class: "sr-only" }, fi = ["onClick"], vi = { class: "sr-only" }, hi = { key: 1, class: "py-6 flex flex-row justify-between items-center animate-pulse" }, bi = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1), i("div", { class: "h-10 w-32 bg-gray-200 rounded dark:bg-gray-300" }, null, -1)], yi = { name: "uiPagination" }, xi = Object.assign(yi, { props: { current: { type: Number, requires: true }, total: { type: Number, requires: true }, loading: { type: Boolean, default: true } }, emits: ["changePage"], setup(t2, { emit: l2 }) {
|
|
2317
2326
|
const c2 = l2, p2 = t2, g2 = s(3), m2 = u(() => Math.max(1, Number(p2.current) - Number(g2.value))), f2 = u(() => Math.min(Number(p2.current) + Number(g2.value), Number(p2.total))), v2 = u(() => {
|
|
2318
2327
|
let e2 = [];
|
|
2319
2328
|
for (let t3 = Number(m2.value); t3 <= Number(f2.value); t3++)
|
|
2320
2329
|
e2.push(t3);
|
|
2321
2330
|
return e2;
|
|
2322
2331
|
});
|
|
2323
|
-
return (l3, s2) => t2.loading ? (e(), a("div",
|
|
2324
|
-
} }),
|
|
2332
|
+
return (l3, s2) => t2.loading ? (e(), a("div", hi, bi)) : (e(), a("div", oi, [i("div", ri, [i("a", ii, [r(l3.$slots, "previous")]), i("a", si, [r(l3.$slots, "next")])]), i("div", ui, [i("div", null, [i("p", di, [r(l3.$slots, "showing"), I(), i("span", ci, _(t2.current + " "), 1), r(l3.$slots, "of"), I(), i("span", pi, _(t2.total), 1)])]), i("div", null, [i("nav", gi, [B(i("button", { onClick: s2[0] || (s2[0] = (e2) => c2("changePage", t2.current - 1)), class: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", mi, [r(l3.$slots, "previous")]), o(d(un), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[L, 1 !== t2.current]]), (e(true), a(w, null, j(v2.value, (l4) => (e(), a("button", { onClick: (e2) => c2("changePage", l4), key: l4, "aria-current": "page", class: n([[l4 === t2.current ? "z-10 bg-indigo-50 border-indigo-500 text-indigo-600" : "bg-white border-gray-300 text-gray-500 hover:bg-gray-50"], "relative inline-flex items-center px-4 py-2 border text-sm font-medium"]) }, _(l4), 11, fi))), 128)), B(i("button", { onClick: s2[1] || (s2[1] = (e2) => c2("changePage", t2.current + 1)), class: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", vi, [r(l3.$slots, "next")]), o(d(dn), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[L, t2.current !== t2.total]])])])])]));
|
|
2333
|
+
} }), wi = { class: "hidden md:flex md:flex-col sticky md:inset-y-0" }, ki = { class: "flex flex-col flex-grow overflow-y-auto" }, Si = { class: "grow flex flex-col" }, Ci = { class: "flex-1 space-y-1", "aria-label": "Sidebar" }, Oi = { key: 0 }, Mi = ["onClick"], Di = { key: 0, class: "text-left" }, Ei = { key: 0, class: "flex-1 text-left" }, Ti = { key: 1, class: "flex-1" }, Ii = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1)], _i = { key: 0, class: "align-left" }, Pi = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, ji = { class: "h-12 flex flex-row items-center" }, Ri = [i("div", { class: "w-6 h-6 animate-pulse bg-gray-200 rounded-full dark:bg-gray-300 mr-4" }, null, -1), i("div", { class: "h-3 animate-pulse bg-gray-200 rounded-full dark:bg-gray-300 grow" }, null, -1)], Bi = { name: "uiSidebar" }, Ai = Object.assign(Bi, { props: { navigation: { type: Array, required: true }, loading: { type: Boolean, default: true } }, emits: ["sideBarClick"], setup(l2, { emit: r2 }) {
|
|
2325
2334
|
const s2 = r2;
|
|
2326
|
-
return (r3, u2) => (e(), a("div",
|
|
2327
|
-
} }),
|
|
2335
|
+
return (r3, u2) => (e(), a("div", wi, [i("div", ki, [i("div", Si, [i("nav", Ci, [l2.loading ? (e(), a(w, { key: 1 }, j(5, (e2) => i("div", ji, Ri)), 64)) : (e(true), a(w, { key: 0 }, j(l2.navigation, (r4) => (e(), a(w, { key: r4.name }, [r4.children ? (e(), t(d(wl), { key: 1, as: "div", class: "space-y-1" }, { default: T(({ open: i2 }) => [o(d(kl), { class: n([r4.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none"]) }, { default: T(() => [o(J, { loading: l2.loading, icon: r4.icon, class: n([r4.current ? "text-white" : "text-gray-400 group-hover:text-gray-500", "mr-3 flex-shrink-0 h-6 w-6"]), "aria-hidden": "true" }, null, 8, ["loading", "icon", "class"]), l2.loading ? (e(), a("div", Ti, Ii)) : (e(), a("span", Ei, _(r4.name), 1)), o(d(dn), { class: n([i2 ? "text-gray-400 rotate-90" : "text-gray-400", "ml-3 flex-shrink-0 h-3 w-3 transform group-hover:text-gray-400 transition-colors ease-in-out duration-150"]) }, null, 8, ["class"])]), _: 2 }, 1032, ["class"]), o(d(Sl), { class: "space-y-1" }, { default: T(() => [(e(true), a(w, null, j(r4.children, (o2) => (e(), t(d(kl), { onClick: (e2) => s2("sideBarClick", o2.id), key: o2.name, class: n([o2.current ? "bg-gray-200" : "hover:text-gray-900 hover:bg-gray-100", "group text-gray-600 w-full flex items-center text-left pl-11 pr-2 py-2 text-sm font-medium rounded-md"]) }, { default: T(() => [l2.loading ? (e(), a("div", Pi)) : (e(), a("span", _i, _(o2.name), 1))]), _: 2 }, 1032, ["onClick", "class"]))), 128))]), _: 2 }, 1024)]), _: 2 }, 1024)) : (e(), a("div", Oi, [i("button", { onClick: (e2) => s2("sideBarClick", r4.id), class: n([r4.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"]) }, [o(J, { loading: l2.loading, icon: r4.icon, class: n([r4.current ? "text-white" : "text-gray-400 group-hover:text-gray-500", "mr-3 flex-shrink-0 h-6 w-6"]), "aria-hidden": "true" }, null, 8, ["loading", "icon", "class"]), l2.loading ? R("", true) : (e(), a("span", Di, _(r4.name), 1))], 10, Mi)]))], 64))), 128))])])])]));
|
|
2336
|
+
} }), Li = { key: 0 }, Fi = { class: "ml-16 text-sm font-medium text-gray-500 truncate" }, Ni = { class: "ml-16 flex items-baseline pb-5" }, zi = { class: "text-2xl font-semibold text-gray-900" }, $i = { key: 0, class: "text-black ml-2 flex items-baseline text-sm font-semibold" }, Vi = { class: "absolute bottom-0 inset-x-0 bg-gray-50 px-4 py-4 sm:px-6" }, Hi = { class: "text-sm" }, Yi = { key: 1 }, Ui = { class: "relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full pb-6" }, qi = { class: "absolute bg-gray-200 rounded-md p-3 animate-pulse" }, Wi = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 mb-4 animate-pulse" })], -1), Ki = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 animate-pulse" })], -1), Ji = { name: "uiStats" }, Gi = Object.assign(Ji, { props: { item: { type: Object, required: true }, loading: { type: Boolean, default: true } }, emits: ["statClick"], setup(l2, { emit: r2 }) {
|
|
2328
2337
|
const s2 = r2;
|
|
2329
|
-
return (r3, u2) => l2.loading ? (e(), a("div",
|
|
2330
|
-
} }),
|
|
2338
|
+
return (r3, u2) => l2.loading ? (e(), a("div", Yi, [i("div", Ui, [i("dt", null, [i("div", qi, [o(J, { loading: l2.loading, icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true" }, null, 8, ["loading", "icon"])]), Wi, Ki])])])) : (e(), a("div", Li, [i("div", { class: n(["relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full", { "pb-12": l2.item.showFooter }]) }, [i("dt", null, [i("div", { class: n(["absolute rounded-md p-3", { "bg-indigo-500": !l2.item.color, "bg-green-500": "success" === l2.item.color, "bg-red-500": "danger" === l2.item.color, "bg-yellow-500": "warning" === l2.item.color }]) }, [o(J, { icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])], 2), i("p", Fi, _(l2.item.name), 1)]), i("dd", Ni, [i("p", zi, _(l2.item.stat), 1), l2.item.explanation ? (e(), a("p", $i, _(l2.item.explanation), 1)) : R("", true), l2.item.changeType ? (e(), a("p", { key: 1, class: n([{ "text-green-600": "increase" === l2.item.changeType, "text-red-600": "decrease" === l2.item.changeType, "text-black": "neutral" === l2.item.changeType }, "ml-2 flex items-baseline text-sm font-semibold"]) }, ["increase" === l2.item.changeType ? (e(), t(d(nn), { key: 0, class: "self-center flex-shrink-0 h-3 w-3 text-green-500", "aria-hidden": "true" })) : R("", true), "decrease" === l2.item.changeType ? (e(), t(d(ln), { key: 1, class: "self-center flex-shrink-0 h-3 w-3 text-red-500", "aria-hidden": "true" })) : R("", true), I(" " + _(l2.item.change), 1)], 2)) : R("", true), B(i("div", Vi, [i("div", Hi, [i("span", { onClick: u2[0] || (u2[0] = (e2) => s2("statClick", l2.item.id)), class: "font-medium text-indigo-600 hover:text-indigo-500 cursor-pointer" }, _(l2.item.actionText), 1)])], 512), [[L, l2.item.showFooter]])])], 2)]));
|
|
2339
|
+
} }), Zi = { key: 0, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Xi = { class: "px-4 py-5 sm:px-6" }, Qi = { class: "text-lg font-medium leading-6 text-gray-900" }, es = { class: "mt-1 max-w-2xl text-sm text-gray-500" }, ts = { class: "border-t border-gray-200" }, ls = { class: "text-sm font-medium text-gray-500" }, ns = { key: 0, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, as = { key: 1, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, os = ["onClick"], rs = { key: 3, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, is = { key: 1, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, ss = z('<div class="px-4 py-5 sm:px-6 animate-pulse"><h3 class="text-lg font-medium leading-6 text-gray-900"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></h3><p class="mt-1 max-w-2xl text-sm text-gray-500"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/5"></div></p></div>', 1), us = { class: "border-t border-gray-200" }, ds = [i("dt", { class: "text-sm font-medium text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1), i("dd", { class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1)], cs = { name: "uiStripedCard" }, ps = Object.assign(cs, { props: { title: String, subtitle: String, items: Object, loading: { type: Boolean, default: true } }, emits: ["itemClicked"], setup: (l2, { emit: r2 }) => (r3, s2) => l2.loading ? (e(), a("div", is, [ss, i("div", us, [i("dl", null, [(e(), a(w, null, j(5, (e2) => i("div", { key: e2, class: n(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [e2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, ds, 2)), 64))])])])) : (e(), a("div", Zi, [i("div", Xi, [i("h3", Qi, _(l2.title), 1), i("p", es, _(l2.subtitle), 1)]), i("div", ts, [i("dl", null, [(e(true), a(w, null, j(l2.items, (s3, u2) => (e(), a("div", { key: u2, class: n(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [u2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, [i("dt", ls, _(s3.title), 1), "tag" === s3.type ? (e(), a("dd", ns, [o(ia, { color: s3.color }, { default: T(() => [I(_(s3.text), 1)]), _: 2 }, 1032, ["color"])])) : "tags" === s3.type ? (e(), a("dd", as, [(e(true), a(w, null, j(s3.tags, (n2, a2) => (e(), t(ia, { loading: l2.loading, key: a2, color: n2.color, class: "mr-2 mb-2" }, { default: T(() => [I(_(n2.text), 1)]), _: 2 }, 1032, ["loading", "color"]))), 128))])) : "link" === s3.type ? (e(), a("dd", { key: 2, class: "mt-1 text-sm text-indigo-600 hover:text-indigo-400 sm:col-span-2 sm:mt-0 cursor-pointer", onClick: (e2) => r3.$emit("itemClicked", s3.emits) }, _(s3.text), 9, os)) : (e(), a("dd", rs, _(s3.text), 1))], 2))), 128))])])])) }), gs = { class: "absolute top-10 bg-indigo-600 text-white text-xs p-2 rounded z-10 font-light w-60 flex flex-row items-start" }, ms = i("svg", { class: "absolute -top-3 left-0", xmlns: "http://www.w3.org/2000/svg", width: "27.687", height: "26.954", viewBox: "0 0 27.687 26.954" }, [i("path", { id: "Polígono_1", "data-name": "Polígono 1", d: "M10.5,0,21,19H0Z", transform: "translate(0 10.5) rotate(-30)", fill: "#4f46e5" })], -1), fs = { class: "ml-2" }, vs = { __name: "tooltip", props: { tip: { type: String, required: true } }, setup: (t2) => (l2, n2) => (e(), a("div", gs, [ms, i("div", null, [o(J, { icon: d(hn), loading: false, color: "white", size: "big" }, null, 8, ["icon"])]), i("span", fs, _(t2.tip), 1)])) }, hs = { key: 0 }, bs = { class: "flex flex-col" }, ys = { class: "-my-2 overflow-x-auto" }, xs = { class: "inline-block min-w-full py-2 align-middle px-1" }, ws = { class: "relative overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, ks = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-16 bg-white shadow rounded px-4 py-1 z-10" }, Ss = ["onClick"], Cs = { class: "min-w-full table-fixed divide-y divide-gray-300" }, Os = { class: "bg-gray-50" }, Ms = ["checked", "indeterminate"], Ds = ["onMouseover", "onMouseleave"], Es = ["onClick"], Ts = { key: 2, class: "group flex items-center uppercase text-xs" }, Is = { class: "divide-y divide-gray-200 bg-white" }, _s = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, Ps = ["value"], js = ["onClick"], Rs = ["href"], Bs = { key: 3 }, As = { name: "uiTable" }, Ls = Object.assign(As, { props: { header: { type: Array, required: true }, items: { type: Array, required: true }, orderedBy: String, orderDirection: { type: String, default: "asc" }, actions: Array, loading: { type: Boolean, default: true } }, emits: ["tableAction", "orderBy"], setup(l2, { emit: r2 }) {
|
|
2331
2340
|
let c2 = s([]);
|
|
2332
2341
|
s(false);
|
|
2333
2342
|
let p2 = s(void 0);
|
|
@@ -2336,65 +2345,65 @@ const Xr = Bo(Jr, [["render", function(t2, l2, n2, o2, r2, i2) {
|
|
|
2336
2345
|
};
|
|
2337
2346
|
return (r3, s2) => {
|
|
2338
2347
|
var _a2, _b;
|
|
2339
|
-
return l2.loading ? (e(), t(
|
|
2348
|
+
return l2.loading ? (e(), t(er, { key: 1 })) : (e(), a("div", hs, [i("div", bs, [i("div", ys, [i("div", xs, [i("div", ws, [((_a2 = d(c2)) == null ? void 0 : _a2.length) > 0 && ((_b = l2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", ks, [(e(true), a(w, null, j(l2.actions, (t2, l3) => (e(), a("button", { onClick: (e2) => g2("tableAction", { action: t2.id, items: d(c2) }), key: l3, type: "button", class: "inline-flex items-center rounded bg-indigo-600 hover:bg-indigo-800 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm disabled:cursor-not-allowed disabled:opacity-30" }, _(t2.name), 9, Ss))), 128))])) : R("", true), i("table", Cs, [i("thead", Os, [i("tr", null, [i("th", { scope: "col", class: n([l2.actions ? "px-6 sm:px-8" : "px-3", "relative"]) }, [l2.actions ? (e(), a("input", { key: 0, checked: f2.value || d(c2).length === l2.items.length, indeterminate: f2.value, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500", type: "checkbox", onChange: s2[0] || (s2[0] = (e2) => H(c2) ? c2.value = e2.target.checked ? l2.items.map((e3) => e3.id) : [] : c2 = e2.target.checked ? l2.items.map((e3) => e3.id) : []) }, null, 40, Ms)) : R("", true)], 2), (e(true), a(w, null, j(l2.header, (r4, s3) => (e(), a("th", { key: s3, class: "py-3.5 pr-3 text-left font-semibold text-gray-900 flex-wrap relative", scope: "col", onMouseover: (e2) => v2(r4.name, true), onMouseleave: (e2) => v2(r4.name, false) }, [r4.tooltip ? B((e(), t(vs, { key: 0, tip: r4.tooltip }, null, 8, ["tip"])), [[L, d(p2) === r4.name]]) : R("", true), r4.value ? (e(), a("button", { key: 1, class: "group flex items-center uppercase text-xs relative", onClick: (e2) => g2("orderBy", { value: r4.value, orderDirection: "asc" === l2.orderDirection ? "desc" : "asc" }) }, [i("span", null, _(r4.name), 1), i("span", { class: n([[r4.value === l2.orderedBy ? "bg-indigo-600 text-white group-hover:bg-gray-300" : "text-gray-400 group-hover:visible group-focus:visible"], "ml-2 flex-none rounded group-hover:bg-indigo-200 group-hover:text-white"]) }, [o(J, { icon: "asc" === l2.orderDirection ? d(sn) : d(pn), loading: l2.loading, color: r4.value === l2.orderedBy ? "white" : "primary" }, null, 8, ["icon", "loading", "color"])], 2)], 8, Es)) : (e(), a("p", Ts, [i("span", null, _(r4.name), 1)]))], 40, Ds))), 128))])]), i("tbody", Is, [(e(true), a(w, null, j(l2.items, (o2, r4) => {
|
|
2340
2349
|
var _a3, _b2;
|
|
2341
|
-
return e(), a("tr", { key: o2.id, class: n([d(c2).includes(o2.id) && "bg-gray-50", r4 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: n([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [d(c2).includes(o2.id) ? (e(), a("div",
|
|
2350
|
+
return e(), a("tr", { key: o2.id, class: n([d(c2).includes(o2.id) && "bg-gray-50", r4 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: n([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [d(c2).includes(o2.id) ? (e(), a("div", _s)) : R("", true), ((_b2 = l2.actions) == null ? void 0 : _b2.length) > 0 ? B((e(), a("input", { key: 1, "onUpdate:modelValue": s2[1] || (s2[1] = (e2) => H(c2) ? c2.value = e2 : c2 = e2), value: o2.id, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 flex-wrap", type: "checkbox" }, null, 8, Ps)), [[V, d(c2)]]) : R("", true)], 2), (e(true), a(w, null, j(o2.row, (r5, i2) => (e(), a("td", { key: i2, class: n(["whitespace-nowrap py-4 pr-3 text-sm", d(c2).includes(o2.id) ? "text-indigo-600" : "text-gray-900"]) }, ["object" == typeof r5 && "tag" === r5.type ? (e(), t(ia, { key: 0, loading: l2.loading, color: r5.color }, { default: T(() => [I(_(r5.content), 1)]), _: 2 }, 1032, ["loading", "color"])) : "object" == typeof r5 && "link" === r5.type ? (e(), a("span", { key: 1, class: "text-indigo-600 hover:text-indigo-400 cursor-pointer", onClick: (e2) => g2(r5.emits, { id: o2.id, data: (o2 == null ? void 0 : o2.emitWith) || null }) }, _(r5.content), 9, js)) : "object" == typeof r5 && "href" === r5.type ? (e(), a("a", { key: 2, class: "text-indigo-600 hover:text-indigo-400 cursor-pointer", href: r5.href, target: "_blank" }, _(r5.content), 9, Rs)) : (e(), a("span", Bs, _(r5), 1))], 2))), 128))], 2);
|
|
2342
2351
|
}), 128))])])])])])])]));
|
|
2343
2352
|
};
|
|
2344
|
-
} }),
|
|
2353
|
+
} }), Fs = { class: "lg:hidden" }, Ns = ["value"], zs = { class: "hidden lg:block" }, $s = { class: "border-b border-gray-200" }, Vs = { class: "-mb-px flex space-x-8", "aria-label": "Tabs" }, Hs = ["onClick", "aria-current"], Ys = { name: "uiTabs" }, Us = Object.assign(Ys, { props: { tabs: Array }, emits: ["tabClicked"], setup(t2, { emit: l2 }) {
|
|
2345
2354
|
const o2 = l2;
|
|
2346
|
-
return (l3, r2) => (e(), a("div", null, [i("div",
|
|
2355
|
+
return (l3, r2) => (e(), a("div", null, [i("div", Fs, [i("select", { onChange: r2[0] || (r2[0] = (e2) => {
|
|
2347
2356
|
o2("tabClicked", e2.target.value);
|
|
2348
|
-
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), a(w, null, j(t2.tabs, (t3) => (e(), a("option", { value: t3.id, key: t3.name }, _(t3.name), 9,
|
|
2349
|
-
} }),
|
|
2357
|
+
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), a(w, null, j(t2.tabs, (t3) => (e(), a("option", { value: t3.id, key: t3.name }, _(t3.name), 9, Ns))), 128))], 32)]), i("div", zs, [i("div", $s, [i("nav", Vs, [(e(true), a(w, null, j(t2.tabs, (t3) => (e(), a("a", { key: t3.name, onClick: (e2) => o2("tabClicked", t3.id), class: n([t3.current ? "border-indigo-500 text-indigo-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-200", "whitespace-nowrap flex py-4 px-1 border-b-2 font-medium text-sm cursor-pointer"]), "aria-current": t3.current ? "page" : void 0 }, [I(_(t3.name) + " ", 1), t3.count ? (e(), a("span", { key: 0, class: n([t3.current ? "bg-indigo-100 text-indigo-600" : "bg-gray-100 text-gray-900", "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"]) }, _(t3.count), 3)) : R("", true)], 10, Hs))), 128))])])])]));
|
|
2358
|
+
} }), qs = { key: 0, class: "bg-white overflow-hidden shadow rounded-lg" }, Ws = { class: "px-4 py-5 sm:px-6" }, Ks = { class: "text-xl font-bold" }, Js = { class: "px-4 py-5 sm:p-6" }, Gs = { class: "flow-root" }, Zs = { class: "-mb-8", role: "list" }, Xs = { class: "relative pb-8" }, Qs = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, eu = { class: "relative flex space-x-3" }, tu = { class: "min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center" }, lu = { class: "text-sm text-gray-500" }, nu = ["onClick"], au = { class: "text-right text-sm whitespace-nowrap text-gray-500" }, ou = ["datetime"], ru = { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10" }, iu = { class: "text-sm" }, su = { class: "h-full w-full flex items-center justify-center flex-col mb-5" }, uu = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), du = { key: 1, class: "bg-white overflow-hidden shadow rounded-lg" }, cu = i("div", { class: "px-4 py-5 sm:px-6 animate-pulse" }, [i("h1", { class: "text-xl font-bold" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), pu = { class: "px-4 py-5 sm:p-6 animate-pulse" }, gu = { class: "flow-root" }, mu = { class: "-mb-8", role: "list" }, fu = { class: "relative pb-8" }, vu = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, hu = z('<div class="relative flex space-x-3"><div><span class="h-8 w-8 rounded-full bg-gray-300 flex items-center justify-center ring-4 ring-white"></span></div><div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center"><div><p class="text-sm text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full"></div></p></div><div class="text-right text-sm whitespace-nowrap text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></div></div></div>', 1), bu = i("div", { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10 animate-pulse" }, [i("div", { class: "text-sm" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), yu = { name: "uiTimeline" }, xu = Object.assign(yu, { props: { name: { type: String, required: true }, timeline: { type: Object }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false } }, setup: (t2) => (l2, r2) => {
|
|
2350
2359
|
const s2 = $("uiIcon");
|
|
2351
|
-
return t2.loading ? (e(), a("div",
|
|
2352
|
-
} }),
|
|
2360
|
+
return t2.loading ? (e(), a("div", du, [cu, i("div", pu, [i("div", gu, [i("ul", mu, [(e(), a(w, null, j(10, (t3) => i("li", { key: l2.index }, [i("div", fu, [10 !== t3 ? (e(), a("span", vu)) : R("", true), hu])])), 64))])])]), bu])) : (e(), a("div", qs, [i("div", Ws, [i("h1", Ks, _(t2.name), 1)]), B(i("div", Js, [i("div", Gs, [i("ul", Zs, [(e(true), a(w, null, j(t2.timeline.items, (r3, u2) => (e(), a("li", { key: u2 }, [i("div", Xs, [u2 !== t2.timeline.items.length - 1 ? (e(), a("span", Qs)) : R("", true), i("div", eu, [i("div", null, [i("span", { class: n([r3.iconBackground, "h-8 w-8 rounded-full flex items-center justify-center ring-4 ring-white"]) }, [o(s2, { loading: t2.loading, icon: r3.icon, "aria-hidden": "true", class: "h-5 w-5 text-white", color: "white" }, null, 8, ["loading", "icon"])], 2)]), i("div", tu, [i("div", null, [i("p", lu, [i("a", { onClick: (e2) => l2.$emit("timelineEventClicked", r3.linkId), class: "font-medium text-indigo-600 hover:text-indigo-800 cursor-pointer" }, _(r3.target), 9, nu), I(" " + _(r3.content), 1)])]), i("div", au, [i("time", { datetime: r3.datetime }, _(r3.date), 9, ou)])])])])]))), 128))])])], 512), [[L, !t2.empty]]), B(i("div", ru, [i("div", iu, [i("a", { class: "cursor-pointer font-medium text-indigo-600 hover:text-indigo-500", onClick: r2[0] || (r2[0] = (e2) => l2.$emit("timelineFooterClicked", t2.timeline.id)) }, _(t2.timeline.footerText), 1)])], 512), [[L, !t2.empty]]), B(i("div", su, [o(J, { icon: d(gn), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), uu], 512), [[L, t2.empty]])]));
|
|
2361
|
+
} }), wu = { name: "uiTopbar", props: ["navigation", "logo", "profileMenu", "brand", "accountLogo", "alerted"], components: { Disclosure: wl, DisclosureButton: kl, DisclosurePanel: Sl, Menu: _l, MenuButton: Pl, MenuItem: Rl, MenuItems: jl, Bars3Icon: function(t2, l2) {
|
|
2353
2362
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })]);
|
|
2354
|
-
}, XMarkIcon:
|
|
2355
|
-
const
|
|
2363
|
+
}, XMarkIcon: xn } }, ku = { class: "mx-auto px-6 lg:px-8" }, Su = { class: "flex justify-between h-20" }, Cu = { class: "flex" }, Ou = { class: "-ml-2 mr-2 flex items-center lg:hidden" }, Mu = i("span", { class: "sr-only" }, "Open main menu", -1), Du = ["src"], Eu = { class: "flex items-center" }, Tu = { class: "lg:ml-4 lg:flex-shrink-0 lg:flex lg:items-center hidden" }, Iu = { class: "redCircle flex items-center justify-center h-4 w-4 bg-red-500 rounded-full absolute -top-0 -left-1" }, _u = [i("span", { class: "animate-ping absolute inline-flex h-4 w-4 bg-red-500 rounded-full opacity-75" }, null, -1)], Pu = ["src"], ju = ["onClick"], Ru = { class: "pt-2 pb-3 space-y-1" }, Bu = ["onClick"], Au = { class: "pt-4 pb-3 border-t border-gray-200" }, Lu = { class: "flex items-center px-4 sm:px-6" }, Fu = { class: "flex-shrink-0" }, Nu = ["src"], zu = { key: 0, class: "ml-3" }, $u = { class: "text-base font-medium text-gray-800" }, Vu = { class: "text-sm font-medium text-gray-500" }, Hu = { class: "mt-3 space-y-1" }, Yu = ["onClick"];
|
|
2364
|
+
const Uu = Fo(wu, [["render", function(l2, r2, s2, u2, d2, c2) {
|
|
2356
2365
|
const p2 = $("Bars3Icon"), g2 = $("XMarkIcon"), m2 = $("DisclosureButton"), f2 = $("MenuButton"), v2 = $("MenuItem"), h2 = $("MenuItems"), b2 = $("Menu"), y2 = $("DisclosurePanel"), x2 = $("Disclosure");
|
|
2357
|
-
return e(), t(x2, { as: "nav", class: "bg-white shadow z-10" }, { default:
|
|
2358
|
-
}]]),
|
|
2366
|
+
return e(), t(x2, { as: "nav", class: "bg-white shadow z-10" }, { default: T(({ open: u3 }) => [i("div", ku, [i("div", Su, [i("div", Cu, [i("div", Ou, [o(m2, { class: "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500" }, { default: T(() => [Mu, u3 ? (e(), t(g2, { key: 1, class: "block h-6 w-6", "aria-hidden": "true" })) : (e(), t(p2, { key: 0, class: "block h-6 w-6", "aria-hidden": "true" }))]), _: 2 }, 1024)]), i("div", { class: "flex-shrink-0 flex items-center cursor-pointer", onClick: r2[0] || (r2[0] = (e2) => l2.$emit("topBarClick", "logo")) }, [i("img", { class: "h-10", src: s2.logo, alt: "Hotelinking suite product logo" }, null, 8, Du)])]), i("div", Eu, [i("div", Tu, [o(b2, { as: "div", class: "ml-3 relative" }, { default: T(() => [i("div", null, [B(o(f2, { class: "bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 relative" }, { default: T(() => [B(i("div", Iu, _u, 512), [[L, s2.alerted]]), i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, Pu)]), _: 1 }, 512), [[L, s2.accountLogo]])]), o(P, { "enter-active-class": "transition ease-out duration-200", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: T(() => [o(h2, { class: "origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, { default: T(() => [(e(true), a(w, null, j(s2.profileMenu, (a2) => (e(), t(v2, { key: a2.name }, { default: T(({ active: e2 }) => [i("p", { onClick: (e3) => l2.$emit("topBarClick", a2.id), class: n(["cursor-pointer", [e2 ? "bg-gray-100" : "", "block px-4 py-2 text-sm text-gray-700"]]) }, _(a2.name), 11, ju)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 })]), _: 1 })])])])]), o(y2, { class: "lg:hidden" }, { default: T(() => [i("div", Ru, [(e(true), a(w, null, j(s2.navigation, (a2) => (e(), t(m2, { as: "template", key: a2.name, class: n(["block pl-3 pr-4 py-2 border-l-4 text-base font-medium sm:pl-5 sm:pr-6", { "bg-indigo-50 border-indigo-500 text-indigo-700": a2.current && true === a2.current, "border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700": !a2.current }]) }, { default: T(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", a2.id) }, _(a2.name), 9, Bu)]), _: 2 }, 1032, ["class"]))), 128))]), i("div", Au, [i("div", Lu, [i("div", Fu, [i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, Nu)]), s2.brand ? (e(), a("div", zu, [i("div", $u, _(s2.brand.title), 1), i("div", Vu, _(s2.brand.subtitle), 1)])) : R("", true)]), i("div", Hu, [(e(true), a(w, null, j(s2.profileMenu, (n2) => (e(), t(m2, { as: "template", key: n2.name, class: "block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 sm:px-6" }, { default: T(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", n2.id) }, _(n2.name), 9, Yu)]), _: 2 }, 1024))), 128))])])]), _: 1 })]), _: 1 });
|
|
2367
|
+
}]]), qu = { chart: { type: "bar", toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff"], dataLabels: { enabled: true, formatter: function(e2, t2) {
|
|
2359
2368
|
return t2.w.globals.labels[t2.dataPointIndex] + ": " + e2;
|
|
2360
|
-
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } },
|
|
2361
|
-
const r2 = l2, s2 = t2, c2 = u(() => ({ ...s2.options, ...
|
|
2369
|
+
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } }, Wu = { class: "chart-header flex flex-row justify-between" }, Ku = { class: "text-sm font-medium text-gray-500 truncate" }, Ju = { class: "chart-content" }, Gu = { class: "h-full w-full flex items-center justify-center flex-col" }, Zu = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Xu = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Qu = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], ed = { name: "uiChart" }, td = Object.assign(ed, { props: { title: String, id: { type: String, default: "noChartId" }, series: { type: Object, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2370
|
+
const r2 = l2, s2 = t2, c2 = u(() => ({ ...s2.options, ...qu })), p2 = u(() => s2.series), g2 = () => r2("chartUpdated"), m2 = (e2, t3, l3) => {
|
|
2362
2371
|
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
2363
2372
|
};
|
|
2364
|
-
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div",
|
|
2365
|
-
} }),
|
|
2373
|
+
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", Wu, [i("div", Ku, _(t2.title), 1), o(Vr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", Ju, [o(d(U), { type: l3.bar, series: p2.value, width: "100%", height: t2.height, options: c2.value, onUpdated: g2, onMounted: g2, onDataPointSelection: m2 }, null, 8, ["type", "series", "height", "options"])], 512), [[L, !t2.empty]]), B(i("div", Gu, [o(J, { icon: d(gn), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Zu], 512), [[L, t2.empty]])], 2), [[L, !t2.loading]]), B(i("div", Xu, Qu, 512), [[L, t2.loading]])], 64));
|
|
2374
|
+
} }), ld = { class: "w-full flex flex-col items-center justify-center p-10 grow" }, nd = { class: "text-2xl mt-4 font-bold" }, ad = { class: "buttons flex flex-row items-center justify-center mt-8 gap-x-1" }, od = { __name: "uiNoResults", props: { title: { type: String, required: true }, message: { type: String, required: true }, actions: { type: Array } }, emits: ["action"], setup: (l2, { emit: n2 }) => (n3, r2) => (e(), a("div", ld, [o(J, { loading: false, icon: d(gn), size: "massive", color: "gray" }, null, 8, ["icon"]), i("h2", nd, _(l2.title), 1), i("p", null, _(l2.message), 1), i("div", ad, [(e(true), a(w, null, j(l2.actions, (l3, a2) => (e(), t(ee, { key: a2, loading: false, onClick: (e2) => n3.$emit("action", l3.action) }, { default: T(() => [I(_(l3.text), 1)]), _: 2 }, 1032, ["onClick"]))), 128))])])) }, rd = i("div", { class: "fixed inset-0" }, null, -1), id = { class: "fixed inset-0 overflow-hidden" }, sd = { class: "absolute inset-0 overflow-hidden" }, ud = { class: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10" }, dd = { class: "flex h-full flex-col overflow-y-scroll bg-white shadow-xl" }, cd = { class: "bg-indigo-700 px-4 py-6 sm:px-6" }, pd = { class: "flex items-center justify-between" }, gd = { class: "ml-3 flex h-7 items-center" }, md = i("span", { class: "absolute -inset-2.5" }, null, -1), fd = i("span", { class: "sr-only" }, "Close panel", -1), vd = { class: "mt-1" }, hd = { class: "text-sm text-indigo-300" }, bd = { class: "relative flex-1 px-4 py-6 sm:px-6" }, yd = { name: "uiRightSidebar" }, xd = Object.assign(yd, { props: { title: { type: String, required: true }, description: { type: String }, open: { type: Boolean, default: false } }, emits: ["closeRightBar"], setup(l2, { emit: n2 }) {
|
|
2366
2375
|
const a2 = n2;
|
|
2367
|
-
return (n3, s2) => (e(), t(d(
|
|
2368
|
-
} }),
|
|
2376
|
+
return (n3, s2) => (e(), t(d(tn), { as: "template", show: l2.open }, { default: T(() => [o(d(ml), { as: "div", class: "relative z-10", onClose: s2[1] || (s2[1] = (e2) => a2("closeRightBar")) }, { default: T(() => [rd, i("div", id, [i("div", sd, [i("div", ud, [o(d(Ql), { as: "template", enter: "transform transition ease-in-out duration-500 sm:duration-700", "enter-from": "translate-x-full", "enter-to": "translate-x-0", leave: "transform transition ease-in-out duration-500 sm:duration-700", "leave-from": "translate-x-0", "leave-to": "translate-x-full" }, { default: T(() => [o(d(fl), { class: "pointer-events-auto w-screen max-w-md" }, { default: T(() => [i("div", dd, [i("div", cd, [i("div", pd, [o(d(vl), { class: "text-base font-semibold leading-6 text-white" }, { default: T(() => [I(_(l2.title), 1)]), _: 1 }), i("div", gd, [i("button", { type: "button", class: "relative rounded-md bg-indigo-700 text-indigo-200 hover:text-white outline-none", onClick: s2[0] || (s2[0] = (e2) => a2("closeRightBar")) }, [md, fd, o(d(xn), { class: "h-6 w-6 ring-0", "aria-hidden": "true" })])])]), i("div", vd, [i("p", hd, _(l2.description), 1)])]), i("div", bd, [r(n3.$slots, "default")])])]), _: 3 })]), _: 3 })])])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2377
|
+
} }), wd = { class: "uiGallery" }, kd = { key: 1, role: "list", class: "grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 sm:gap-x-4 lg:grid-cols-6" }, Sd = { class: "group aspect-h-7 aspect-w-10 block w-full overflow-hidden rounded-lg bg-gray-100 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100" }, Cd = ["src"], Od = ["onClick"], Md = { class: "pointer-events-none mt-2 block truncate text-sm font-medium text-gray-900" }, Dd = { class: "flex items-center justify-between" }, Ed = { class: "pointer-events-none block text-sm font-medium text-gray-500" }, Td = { key: 2, role: "list", class: "grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 sm:gap-x-4 lg:grid-cols-6" }, Id = [i("div", { class: "group aspect-h-7 aspect-w-10 block w-full overflow-hidden rounded-lg bg-gray-200 animate-pulse dark:bg-gray-200 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100" }, null, -1), i("p", { class: "animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28 mt-4" }, null, -1), i("p", { class: "animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-14 mt-2" }, null, -1)], _d = { name: "uiGallery" }, Pd = Object.assign(_d, { props: { galleryId: String, gallery: Array, loading: Boolean, literals: Object }, setup(l2, { emit: n2 }) {
|
|
2369
2378
|
const r2 = n2, u2 = s(false);
|
|
2370
|
-
return (n3, s2) => (e(), a("div",
|
|
2379
|
+
return (n3, s2) => (e(), a("div", wd, [l2.loading ? R("", true) : (e(), t(co, { key: 0, open: u2.value, modalName: "deleteAllImagesModal", title: l2.literals.modalTitle, type: "warning", actions: [{ value: "close", name: l2.literals.closeAction }, { value: `deleteGallery_${l2.galleryId}`, name: l2.literals.deleteAction }], onModalAction: s2[0] || (s2[0] = (e2) => {
|
|
2371
2380
|
var t2;
|
|
2372
2381
|
"close" !== (t2 = e2).action ? r2("modalAction", t2) : u2.value = false;
|
|
2373
|
-
}) }, { default:
|
|
2374
|
-
} }),
|
|
2382
|
+
}) }, { default: T(() => [i("p", null, _(l2.literals.modalText), 1)]), _: 1 }, 8, ["open", "title", "actions"])), l2.loading ? (e(), a("ul", Td, [(e(), a(w, null, j(4, (e2) => i("li", null, Id)), 64))])) : (e(), a("ul", kd, [(e(true), a(w, null, j(l2.gallery, (t2) => (e(), a("li", { key: t2.source, class: "relative" }, [i("div", Sd, [i("img", { src: t2.source, alt: "", class: "pointer-events-none object-cover group-hover:opacity-75" }, null, 8, Cd), i("button", { type: "button", class: "absolute inset-0 focus:outline-none", onClick: (e2) => n3.$emit("imgClicked", t2) }, null, 8, Od)]), i("p", Md, _(t2.title), 1), i("div", Dd, [i("p", Ed, _(t2.size), 1), o(J, { class: "cursor-pointer", icon: d(bn), color: "red", loading: false, onClick: (e2) => r2("deleteImage", t2) }, null, 8, ["icon", "onClick"])])]))), 128))])), l2.gallery.length > 0 && !l2.loading ? (e(), t(ee, { key: 3, onClick: s2[1] || (s2[1] = (e2) => u2.value = true), class: "mt-8", loading: false, color: "red", size: "small" }, { default: T(() => [I(_(l2.literals.deleteAllImages), 1)]), _: 1 })) : R("", true)]));
|
|
2383
|
+
} }), jd = { class: "cursor-move mb-1 relative flex items-center space-x-3 rounded-lg border border-gray-300 bg-white p-4 shadow-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:border-gray-400" }, Rd = { class: "flex flex-row items-center w-full" }, Bd = { class: "content text-sm grow" }, Ad = { class: "font-bold" }, Ld = { key: 0 }, Fd = { class: "font-bold text-gray-400" }, Nd = { key: 1, class: "animate-pulse" }, zd = [z('<div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div>', 5)], $d = { name: "uiDragAndDrop" }, Vd = Object.assign($d, { props: { elements: { type: Array, required: true }, loading: true }, setup(l2) {
|
|
2375
2384
|
const n2 = l2;
|
|
2376
2385
|
let r2 = s(n2.elements);
|
|
2377
2386
|
return p(() => n2.elements, (e2) => {
|
|
2378
2387
|
r2.value = e2;
|
|
2379
|
-
}), (n3, s2) => l2.loading ? (e(), a("div",
|
|
2380
|
-
} }),
|
|
2388
|
+
}), (n3, s2) => l2.loading ? (e(), a("div", Nd, zd)) : (e(), t(d(q), { key: 0, modelValue: d(r2), "onUpdate:modelValue": s2[0] || (s2[0] = (e2) => H(r2) ? r2.value = e2 : r2 = e2) }, { item: T(({ item: t2 }) => [i("div", jd, [i("div", Rd, [o(J, { icon: d(an), loading: false, color: "gray", class: "mr-4", size: "big" }, null, 8, ["icon"]), i("div", Bd, [i("p", Ad, _(t2.name), 1), t2.description ? (e(), a("p", Ld, _(t2.description), 1)) : R("", true)]), i("div", Fd, _(d(r2).indexOf(t2) + 1), 1)])])]), _: 1 }, 8, ["modelValue"]));
|
|
2389
|
+
} }), Hd = { class: "chart-header flex flex-row justify-between" }, Yd = { class: "text-sm font-medium text-gray-500 truncate" }, Ud = { class: "chart-content" }, qd = { class: "h-full w-full flex items-center justify-center flex-col" }, Wd = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Kd = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Jd = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], Gd = { name: "uiCircleChart" }, Zd = Object.assign(Gd, { props: { title: String, id: { type: String, default: "noChartId" }, series: { type: Array, required: true }, labels: { type: Array, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2381
2390
|
const r2 = l2, s2 = t2;
|
|
2382
2391
|
let c2 = { labels: s2.labels, chart: { toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff", "#00ffff", "#aba9ba"], stroke: { show: true, curve: "stepline", lineCap: "butt", width: 1, dashArray: 0 }, dataLabels: { enabled: true, dropShadow: { enabled: false } } };
|
|
2383
2392
|
const p2 = u(() => s2.series), g2 = u(() => ({ ...c2, ...s2.options })), m2 = () => r2("chartUpdated"), f2 = (e2, t3, l3) => {
|
|
2384
2393
|
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
2385
2394
|
};
|
|
2386
|
-
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div",
|
|
2387
|
-
} }),
|
|
2395
|
+
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", Hd, [i("div", Yd, _(t2.title), 1), o(Vr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", Ud, [o(d(U), { class: "flex items-center justify-center", type: "donut", series: p2.value, options: g2.value, height: t2.height, onUpdated: m2, onMounted: m2, onDataPointSelection: f2 }, null, 8, ["series", "options", "height"])], 512), [[L, !t2.empty]]), B(i("div", qd, [o(J, { icon: d(gn), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Wd], 512), [[L, t2.empty]])], 2), [[L, !t2.loading]]), B(i("div", Kd, Jd, 512), [[L, t2.loading]])], 64));
|
|
2396
|
+
} }), Xd = { class: "flex flex-col lg:flex-row w-full gap-y-4 gap-x-2" }, Qd = { name: "uiDateRange" }, ec = Object.assign(Qd, { props: { id: { type: String, required: true }, loading: { type: Boolean, default: true }, literals: { type: Object, required: true }, color: String, values: { type: Object, default: () => ({ from: "", to: "" }) }, error: String, disabled: Boolean, label: String }, setup(t2) {
|
|
2388
2397
|
let l2 = C({ from: void 0, to: void 0 });
|
|
2389
|
-
return (r2, i2) => (e(), a("div",
|
|
2390
|
-
} }),
|
|
2398
|
+
return (r2, i2) => (e(), a("div", Xd, [o(Ln, { type: "date", loading: t2.loading, addOn: t2.literals.from, name: `dateFrom_${t2.id}`, color: t2.color, value: t2.values.from, error: t2.error, disabled: t2.disabled, label: t2.label, onInputChanged: i2[0] || (i2[0] = (e2) => d(l2).from = e2.value) }, null, 8, ["loading", "addOn", "name", "color", "value", "error", "disabled", "label"]), o(Ln, { class: n([{ "mt-6": t2.label && !t2.loading }, { "mt-4": t2.loading }]), type: "date", loading: t2.loading, addOn: t2.literals.to, name: `dateTo_${t2.id}`, color: t2.color, value: t2.values.to, error: t2.error, disabled: t2.disabled, onInputChanged: i2[1] || (i2[1] = (e2) => d(l2).to = e2.value) }, null, 8, ["class", "loading", "addOn", "name", "color", "value", "error", "disabled"]), o(ee, { disabled: t2.disabled, color: "primary", loading: t2.loading, class: n([{ "mt-6": t2.label && !t2.loading }, "h-10"]), onClick: i2[2] || (i2[2] = (e2) => r2.$emit("uiDateRangeButtonClicked", d(l2))) }, { default: T(() => [I(_(t2.literals.search), 1)]), _: 1 }, 8, ["disabled", "loading", "class"])]));
|
|
2399
|
+
} }), tc = { class: "flex justify-between items-center" }, lc = { key: 0, class: "block text-sm font-medium text-gray-700" }, nc = { key: 1, class: "text-[10px] text-gray-500 uppercase justify-self-end" }, ac = { class: "pt-12" }, oc = { key: 1, class: "h-2 animate-pulse bg-gray-200 rounded-full dark:bg-gray-300 w-full" }, rc = { name: "uiRangeSlider" }, ic = Object.assign(rc, { props: { loading: { type: Boolean, default: true }, disabled: { type: Boolean, default: false }, min: Number, max: Number, sliderValue: [Array, Number], label: String, optional: String }, emits: ["sliderUpdated"], setup(l2, { emit: n2 }) {
|
|
2391
2400
|
const o2 = n2, r2 = s(l2.sliderValue);
|
|
2392
|
-
return (n3,
|
|
2393
|
-
} }),
|
|
2394
|
-
Object.keys(
|
|
2395
|
-
e2.component(t2,
|
|
2401
|
+
return (n3, s2) => (e(), a(w, null, [i("div", tc, [l2.label ? (e(), a("label", lc, _(l2.label), 1)) : R("", true), l2.optional ? (e(), a("span", nc, _(l2.optional), 1)) : R("", true)]), i("div", ac, [l2.loading ? (e(), a("p", oc)) : (e(), t(d(W), { key: 0, modelValue: r2.value, "onUpdate:modelValue": s2[0] || (s2[0] = (e2) => r2.value = e2), min: l2.min, max: l2.max, disabled: l2.disabled, onChange: s2[1] || (s2[1] = (e2) => o2("sliderUpdated", e2)), classes: { base: "w-full h-full relative z-1 bg-gray-300 rounded", tooltip: "absolute block text-sm font-semibold whitespace-nowrap py-1 px-1.5 min-w-5 text-center text-white rounded border border-indigo-600 bg-indigo-600 transform h:-translate-x-1/2 h:left-1/2 v:-translate-y-1/2 v:top-1/2 slider-disabled:bg-gray-400 slider-disabled:border-gray-400 merge-h:translate-x-1/2 merge-h:left-auto merge-v:-translate-x-4 merge-v:top-auto tt-focus:hidden tt-focused:block tt-drag:hidden tt-dragging:block" } }, null, 8, ["modelValue", "min", "max", "disabled"]))])], 64));
|
|
2402
|
+
} }), sc = { uiButton: ee, uiIcon: J, uiCheckbox: ue, uiDropdown: Mn, uiInput: Ln, uiInputFile: Xn, uiSelect: na, uiTag: ia, uiTextArea: ma, uiToggle: xa, uiAlert: _a, uiBreadcrumbs: $a, uiCard: Ga, uiFilter: Xa, uiModal: co, uiNotification: So, uiTaskList: Ao, uiPriceCalendar: Nr, uiChart: Zr, uiFooter: ti, uiLoadingScreen: ai, uiPagination: xi, uiSidebar: Ai, uiStats: Gi, uiStripedCard: ps, uiTable: Ls, uiTabs: Us, uiTimeline: xu, uiTopbar: Uu, uiFunnelChartV2: td, uiNoResults: od, uiRightSidebar: xd, uiGallery: Pd, uiDragAndDrop: Vd, uiCircleChart: Zd, uiDateRange: ec, uiRangeSlider: ic }, uc = { install(e2) {
|
|
2403
|
+
Object.keys(sc).forEach((t2) => {
|
|
2404
|
+
e2.component(t2, sc[t2]);
|
|
2396
2405
|
});
|
|
2397
2406
|
} };
|
|
2398
2407
|
export {
|
|
2399
|
-
|
|
2408
|
+
uc as default
|
|
2400
2409
|
};
|