@hotelinking/ui 4.32.15 → 4.32.17
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 +1710 -1299
- package/dist/ui.umd.cjs +1 -1
- package/package.json +11 -11
package/dist/ui.es.js
CHANGED
|
@@ -1,163 +1,347 @@
|
|
|
1
|
-
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
} }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, i2) => t2.loading ? (e(),
|
|
6
|
-
const
|
|
7
|
-
return (l3, s2) => t2.loading ? (e(),
|
|
8
|
-
|
|
9
|
-
}) }, null, 40,
|
|
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 f, nextTick as m, watchEffect as v, onMounted as b, cloneVNode as h, h as y, Fragment as x, defineComponent as w, inject as k, provide as S, reactive as C, onUnmounted as O, toRaw as M, getCurrentInstance as T, Teleport as E, withCtx as D, createTextVNode as _, toDisplayString as I, Transition as P, renderList as j, createCommentVNode as R, withDirectives as B, vModelDynamic as L, vShow as A, withModifiers as F, vModelText as N, createStaticVNode as z, resolveComponent as $, vModelCheckbox as H, isRef as V } from "vue";
|
|
2
|
+
import Y from "dayjs";
|
|
3
|
+
import U from "vue3-apexcharts";
|
|
4
|
+
const q = { name: "uiIcon" }, W = Object.assign(q, { props: { icon: { type: Function, required: true }, size: { type: String, default: "normal" }, color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (o2) => (r2, i2) => o2.loading ? (e(), a("div", { key: 1, class: n([{ "h-4 w-4": "normal" === o2.size, "h-6 w-6": "big" === o2.size, "h-12 w-12": "huge" === o2.size, "h-20 w-20": "massive" === o2.size }, "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300"]) }, null, 2)) : (e(), t(l(o2.icon), { key: 0, class: n({ "h-4 w-4": "normal" === o2.size, "h-6 w-6": "big" === o2.size, "h-12 w-12": "huge" === o2.size, "h-20 w-20": "massive" === o2.size, "text-indigo-600": "primary" === o2.color, "text-cyan-300": "secondary" === o2.color, "text-red-400": "red" === o2.color, "text-yellow-400": "yellow" === o2.color, "text-green-400": "green" === o2.color, "text-white": "white" === o2.color, "text-gray-300": "gray" === o2.color, "text-black": "black" === o2.color }) }, null, 8, ["class"])) }), K = ["disabled"], J = { key: 1, class: "animate-pulse px-4 py-2.5 text-sm rounded-md inline-flex items-center border border-transparent font-medium shadow-sm text-white focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25 bg-gray-200" }, G = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-16" }, null, -1), Z = { name: "uiButton" }, X = Object.assign(Z, { props: { color: { type: String, default: "primary" }, size: { type: String, default: "normal" }, icon: { type: Function, default: () => {
|
|
5
|
+
} }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, i2) => t2.loading ? (e(), a("button", J, [o(W, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), G])) : (e(), a("button", { key: 0, disabled: t2.disabled, class: n([{ "bg-indigo-600 hover:bg-indigo-800 text-white shadow-sm": "primary" === t2.color, "bg-cyan-300 hover:bg-cyan-500 text-white shadow-sme": "secondary" === t2.color, "bg-red-400 hover:bg-red-600 text-white shadow-sm": "red" === t2.color, "bg-yellow-400 hover:bg-yellow-600 text-white shadow-sm": "yellow" === t2.color, "bg-green-400 hover:bg-green-600 text-white shadow-sm": "green" === t2.color, "bg-transparent hover:bg-indigo-800 text-indigo-800 hover:text-white": "transparent" === t2.color, "px-4 py-2 text-sm rounded-md": "normal" === t2.size, "px-2.5 py-1.5 text-xs rounded leading-none": "small" === t2.size, "px-6 py-3 text-base rounded-md": "large" === t2.size }, "inline-flex items-center border border-transparent font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25"]), type: "button" }, [o(W, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), r(l2.$slots, "default")], 10, K)) }), Q = { key: 0, class: "relative flex items-start" }, ee = { class: "flex items-center h-5" }, te = ["checked", "value", "disabled"], le = { class: "ml-3 text-sm" }, ne = { class: "text-gray-500" }, ae = { key: 1, class: "flex items-center animate-pulse" }, oe = [i("div", { class: "w-5 h-5 rounded bg-gray-200" }, null, -1), i("div", { class: "ml-3 h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1)], re = { name: "uiCheckbox" }, ie = Object.assign(re, { props: { disabled: { type: Boolean, default: false }, value: { type: String }, check: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, emits: ["checkboxChanged"], setup(t2, { emit: l2 }) {
|
|
6
|
+
const n2 = l2, o2 = t2, u2 = s(o2.check);
|
|
7
|
+
return (l3, s2) => t2.loading ? (e(), a("div", ae, oe)) : (e(), a("div", Q, [i("div", ee, [i("input", { checked: t2.check, value: t2.value, disabled: t2.disabled, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-25", type: "checkbox", onChange: s2[0] || (s2[0] = (e2) => {
|
|
8
|
+
o2.disabled || (u2.value = !u2.value, n2("checkboxChanged", { checked: u2.value, value: o2.value }));
|
|
9
|
+
}) }, null, 40, te)]), i("div", le, [i("span", ne, [r(l3.$slots, "default")])])]));
|
|
10
10
|
} });
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
throw Error.captureStackTrace && Error.captureStackTrace(a2, re), a2;
|
|
18
|
-
}
|
|
19
|
-
var oe = ((e2) => (e2[e2.None = 0] = "None", e2[e2.RenderStrategy = 1] = "RenderStrategy", e2[e2.Static = 2] = "Static", e2))(oe || {}), ie = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(ie || {});
|
|
20
|
-
function se({ visible: e2 = true, features: t2 = 0, ourProps: l2, theirProps: a2, ...n2 }) {
|
|
21
|
-
var r2;
|
|
22
|
-
let o2 = ce(a2, l2), i2 = Object.assign(n2, { props: o2 });
|
|
23
|
-
if (e2 || 2 & t2 && o2.static)
|
|
24
|
-
return ue(i2);
|
|
25
|
-
if (1 & t2) {
|
|
26
|
-
return re(null == (r2 = o2.unmount) || r2 ? 0 : 1, { 0: () => null, 1: () => ue({ ...n2, props: { ...o2, hidden: true, style: { display: "none" } } }) });
|
|
27
|
-
}
|
|
28
|
-
return ue(i2);
|
|
29
|
-
}
|
|
30
|
-
function ue({ props: e2, attrs: t2, slots: l2, slot: a2, name: n2 }) {
|
|
31
|
-
var r2, o2;
|
|
32
|
-
let { as: i2, ...s2 } = ge(e2, ["unmount", "static"]), c2 = null == (r2 = l2.default) ? void 0 : r2.call(l2, a2), p2 = {};
|
|
33
|
-
if (a2) {
|
|
34
|
-
let e3 = false, t3 = [];
|
|
35
|
-
for (let [l3, n3] of Object.entries(a2))
|
|
36
|
-
"boolean" == typeof n3 && (e3 = true), true === n3 && t3.push(l3);
|
|
37
|
-
e3 && (p2["data-headlessui-state"] = t3.join(" "));
|
|
38
|
-
}
|
|
39
|
-
if ("template" === i2) {
|
|
40
|
-
if (c2 = de(null != c2 ? c2 : []), Object.keys(s2).length > 0 || Object.keys(t2).length > 0) {
|
|
41
|
-
let [e3, ...l3] = null != c2 ? c2 : [];
|
|
42
|
-
if (!function(e4) {
|
|
43
|
-
return null != e4 && ("string" == typeof e4.type || "object" == typeof e4.type || "function" == typeof e4.type);
|
|
44
|
-
}(e3) || l3.length > 0)
|
|
45
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${n2} /> 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"));
|
|
46
|
-
let a3 = ce(null != (o2 = e3.props) ? o2 : {}, s2), r3 = u(e3, a3);
|
|
47
|
-
for (let e4 in a3)
|
|
48
|
-
e4.startsWith("on") && (r3.props || (r3.props = {}), r3.props[e4] = a3[e4]);
|
|
49
|
-
return r3;
|
|
11
|
+
function se() {
|
|
12
|
+
return se = Object.assign ? Object.assign.bind() : function(e2) {
|
|
13
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
14
|
+
var l2 = arguments[t2];
|
|
15
|
+
for (var n2 in l2)
|
|
16
|
+
Object.prototype.hasOwnProperty.call(l2, n2) && (e2[n2] = l2[n2]);
|
|
50
17
|
}
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
18
|
+
return e2;
|
|
19
|
+
}, se.apply(this, arguments);
|
|
20
|
+
}
|
|
21
|
+
function ue() {
|
|
22
|
+
return ue = Object.assign ? Object.assign.bind() : function(e2) {
|
|
23
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
24
|
+
var l2 = arguments[t2];
|
|
25
|
+
for (var n2 in l2)
|
|
26
|
+
Object.prototype.hasOwnProperty.call(l2, n2) && (e2[n2] = l2[n2]);
|
|
27
|
+
}
|
|
28
|
+
return e2;
|
|
29
|
+
}, ue.apply(this, arguments);
|
|
30
|
+
}
|
|
31
|
+
function de(e2, t2, l2) {
|
|
32
|
+
var n2, a2, o2 = null != (n2 = l2.initialDeps) ? n2 : [];
|
|
33
|
+
return function() {
|
|
34
|
+
var n3;
|
|
35
|
+
l2.key && null != l2.debug && l2.debug() && (n3 = Date.now());
|
|
36
|
+
var r2, i2 = e2(), s2 = i2.length !== o2.length || i2.some(function(e3, t3) {
|
|
37
|
+
return o2[t3] !== e3;
|
|
38
|
+
});
|
|
39
|
+
if (!s2)
|
|
40
|
+
return a2;
|
|
41
|
+
if (o2 = i2, l2.key && null != l2.debug && l2.debug() && (r2 = Date.now()), a2 = t2.apply(void 0, i2), l2.key && null != l2.debug && l2.debug()) {
|
|
42
|
+
var u2 = Math.round(100 * (Date.now() - n3)) / 100, d2 = Math.round(100 * (Date.now() - r2)) / 100, c2 = d2 / 16, p2 = function(e3, t3) {
|
|
43
|
+
for (e3 = String(e3); e3.length < t3; )
|
|
44
|
+
e3 = " " + e3;
|
|
45
|
+
return e3;
|
|
46
|
+
};
|
|
47
|
+
console.info("%c⏱ " + p2(d2, 5) + " /" + p2(u2, 5) + " ms", "\n font-size: .6rem;\n font-weight: bold;\n color: hsl(" + Math.max(0, Math.min(120 - 120 * c2, 120)) + "deg 100% 31%);", null == l2 ? void 0 : l2.key);
|
|
48
|
+
}
|
|
49
|
+
return null == l2 || null == l2.onChange || l2.onChange(a2), a2;
|
|
50
|
+
};
|
|
54
51
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
52
|
+
function ce(e2, t2) {
|
|
53
|
+
if (void 0 === e2)
|
|
54
|
+
throw new Error("Unexpected undefined" + (t2 ? ": " + t2 : ""));
|
|
55
|
+
return e2;
|
|
57
56
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
var pe = function(e2) {
|
|
58
|
+
return e2;
|
|
59
|
+
}, ge = function(e2) {
|
|
60
|
+
for (var t2 = Math.max(e2.startIndex - e2.overscan, 0), l2 = Math.min(e2.endIndex + e2.overscan, e2.count - 1), n2 = [], a2 = t2; a2 <= l2; a2++)
|
|
61
|
+
n2.push(a2);
|
|
62
|
+
return n2;
|
|
63
|
+
}, fe = function(e2, t2) {
|
|
64
|
+
var l2 = e2.scrollElement;
|
|
65
|
+
if (l2) {
|
|
66
|
+
var n2 = function(e3) {
|
|
67
|
+
var l3 = e3.width, n3 = e3.height;
|
|
68
|
+
t2({ width: Math.round(l3), height: Math.round(n3) });
|
|
69
|
+
};
|
|
70
|
+
n2(l2.getBoundingClientRect());
|
|
71
|
+
var a2 = new ResizeObserver(function(e3) {
|
|
72
|
+
var t3 = e3[0];
|
|
73
|
+
if (null != t3 && t3.borderBoxSize) {
|
|
74
|
+
var a3 = t3.borderBoxSize[0];
|
|
75
|
+
if (a3)
|
|
76
|
+
return void n2({ width: a3.inlineSize, height: a3.blockSize });
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
78
|
+
n2(l2.getBoundingClientRect());
|
|
79
|
+
});
|
|
80
|
+
return a2.observe(l2, { box: "border-box" }), function() {
|
|
81
|
+
a2.unobserve(l2);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}, me = function(e2, t2) {
|
|
85
|
+
var l2 = e2.scrollElement;
|
|
86
|
+
if (l2) {
|
|
87
|
+
var n2 = function() {
|
|
88
|
+
t2(l2[e2.options.horizontal ? "scrollLeft" : "scrollTop"]);
|
|
89
|
+
};
|
|
90
|
+
return n2(), l2.addEventListener("scroll", n2, { passive: true }), function() {
|
|
91
|
+
l2.removeEventListener("scroll", n2);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}, ve = function(e2, t2, l2) {
|
|
95
|
+
if (null != t2 && t2.borderBoxSize) {
|
|
96
|
+
var n2 = t2.borderBoxSize[0];
|
|
97
|
+
if (n2)
|
|
98
|
+
return Math.round(n2[l2.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
99
|
+
}
|
|
100
|
+
return Math.round(e2.getBoundingClientRect()[l2.options.horizontal ? "width" : "height"]);
|
|
101
|
+
}, be = function(e2, t2, l2) {
|
|
102
|
+
var n2, a2, o2 = t2.adjustments, r2 = void 0 === o2 ? 0 : o2, i2 = t2.behavior, s2 = e2 + r2;
|
|
103
|
+
null == (n2 = l2.scrollElement) || null == n2.scrollTo || n2.scrollTo(((a2 = {})[l2.options.horizontal ? "left" : "top"] = s2, a2.behavior = i2, a2));
|
|
104
|
+
}, he = function(e2) {
|
|
105
|
+
var t2, l2, n2 = this;
|
|
106
|
+
this.unsubs = [], this.scrollElement = null, this.isScrolling = false, this.isScrollingTimeoutId = null, 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 = (t2 = null, l2 = function() {
|
|
107
|
+
return t2 || ("undefined" != typeof ResizeObserver ? t2 = new ResizeObserver(function(e3) {
|
|
108
|
+
e3.forEach(function(e4) {
|
|
109
|
+
n2._measureElement(e4.target, e4);
|
|
110
|
+
});
|
|
111
|
+
}) : null);
|
|
112
|
+
}, { disconnect: function() {
|
|
113
|
+
var e3;
|
|
114
|
+
return null == (e3 = l2()) ? void 0 : e3.disconnect();
|
|
115
|
+
}, observe: function(e3) {
|
|
116
|
+
var t3;
|
|
117
|
+
return null == (t3 = l2()) ? void 0 : t3.observe(e3, { box: "border-box" });
|
|
118
|
+
}, unobserve: function(e3) {
|
|
119
|
+
var t3;
|
|
120
|
+
return null == (t3 = l2()) ? void 0 : t3.unobserve(e3);
|
|
121
|
+
} }), this.range = null, this.setOptions = function(e3) {
|
|
122
|
+
Object.entries(e3).forEach(function(t3) {
|
|
123
|
+
var l3 = t3[0];
|
|
124
|
+
void 0 === t3[1] && delete e3[l3];
|
|
125
|
+
}), n2.options = ue({ debug: false, initialOffset: 0, overscan: 1, paddingStart: 0, paddingEnd: 0, scrollPaddingStart: 0, scrollPaddingEnd: 0, horizontal: false, getItemKey: pe, rangeExtractor: ge, onChange: function() {
|
|
126
|
+
}, measureElement: ve, initialRect: { width: 0, height: 0 }, scrollMargin: 0, scrollingDelay: 150, indexAttribute: "data-index", initialMeasurementsCache: [], lanes: 1 }, e3);
|
|
127
|
+
}, this.notify = function(e3) {
|
|
128
|
+
null == n2.options.onChange || n2.options.onChange(n2, e3);
|
|
129
|
+
}, this.maybeNotify = de(function() {
|
|
130
|
+
return n2.calculateRange(), [n2.isScrolling, n2.range ? n2.range.startIndex : null, n2.range ? n2.range.endIndex : null];
|
|
131
|
+
}, function(e3) {
|
|
132
|
+
n2.notify(e3);
|
|
133
|
+
}, { key: "production" !== process.env.NODE_ENV && "maybeNotify", debug: function() {
|
|
134
|
+
return n2.options.debug;
|
|
135
|
+
}, initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null] }), this.cleanup = function() {
|
|
136
|
+
n2.unsubs.filter(Boolean).forEach(function(e3) {
|
|
137
|
+
return e3();
|
|
138
|
+
}), n2.unsubs = [], n2.scrollElement = null;
|
|
139
|
+
}, this._didMount = function() {
|
|
140
|
+
return n2.measureElementCache.forEach(n2.observer.observe), function() {
|
|
141
|
+
n2.observer.disconnect(), n2.cleanup();
|
|
142
|
+
};
|
|
143
|
+
}, this._willUpdate = function() {
|
|
144
|
+
var e3 = n2.options.getScrollElement();
|
|
145
|
+
n2.scrollElement !== e3 && (n2.cleanup(), n2.scrollElement = e3, n2._scrollToOffset(n2.scrollOffset, { adjustments: void 0, behavior: void 0 }), n2.unsubs.push(n2.options.observeElementRect(n2, function(e4) {
|
|
146
|
+
n2.scrollRect = e4, n2.maybeNotify();
|
|
147
|
+
})), n2.unsubs.push(n2.options.observeElementOffset(n2, function(e4) {
|
|
148
|
+
n2.scrollAdjustments = 0, n2.scrollOffset !== e4 && (null !== n2.isScrollingTimeoutId && (clearTimeout(n2.isScrollingTimeoutId), n2.isScrollingTimeoutId = null), n2.isScrolling = true, n2.scrollDirection = n2.scrollOffset < e4 ? "forward" : "backward", n2.scrollOffset = e4, n2.maybeNotify(), n2.isScrollingTimeoutId = setTimeout(function() {
|
|
149
|
+
n2.isScrollingTimeoutId = null, n2.isScrolling = false, n2.scrollDirection = null, n2.maybeNotify();
|
|
150
|
+
}, n2.options.scrollingDelay));
|
|
151
|
+
})));
|
|
152
|
+
}, this.getSize = function() {
|
|
153
|
+
return n2.scrollRect[n2.options.horizontal ? "width" : "height"];
|
|
154
|
+
}, this.memoOptions = de(function() {
|
|
155
|
+
return [n2.options.count, n2.options.paddingStart, n2.options.scrollMargin, n2.options.getItemKey];
|
|
156
|
+
}, function(e3, t3, l3, a2) {
|
|
157
|
+
return n2.pendingMeasuredCacheIndexes = [], { count: e3, paddingStart: t3, scrollMargin: l3, getItemKey: a2 };
|
|
158
|
+
}, { key: false }), this.getFurthestMeasurement = function(e3, t3) {
|
|
159
|
+
for (var l3 = /* @__PURE__ */ new Map(), a2 = /* @__PURE__ */ new Map(), o2 = t3 - 1; o2 >= 0; o2--) {
|
|
160
|
+
var r2 = e3[o2];
|
|
161
|
+
if (!l3.has(r2.lane)) {
|
|
162
|
+
var i2 = a2.get(r2.lane);
|
|
163
|
+
if (null == i2 || r2.end > i2.end ? a2.set(r2.lane, r2) : r2.end < i2.end && l3.set(r2.lane, true), l3.size === n2.options.lanes)
|
|
164
|
+
break;
|
|
109
165
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
166
|
+
}
|
|
167
|
+
return a2.size === n2.options.lanes ? Array.from(a2.values()).sort(function(e4, t4) {
|
|
168
|
+
return e4.end - t4.end;
|
|
169
|
+
})[0] : void 0;
|
|
170
|
+
}, this.getMeasurements = de(function() {
|
|
171
|
+
return [n2.memoOptions(), n2.itemSizeCache];
|
|
172
|
+
}, function(e3, t3) {
|
|
173
|
+
var l3 = e3.count, a2 = e3.paddingStart, o2 = e3.scrollMargin, r2 = e3.getItemKey, i2 = n2.pendingMeasuredCacheIndexes.length > 0 ? Math.min.apply(Math, n2.pendingMeasuredCacheIndexes) : 0;
|
|
174
|
+
n2.pendingMeasuredCacheIndexes = [];
|
|
175
|
+
for (var s2 = n2.measurementsCache.slice(0, i2), u2 = i2; u2 < l3; u2++) {
|
|
176
|
+
var d2 = r2(u2), c2 = 1 === n2.options.lanes ? s2[u2 - 1] : n2.getFurthestMeasurement(s2, u2), p2 = c2 ? c2.end : a2 + o2, g2 = t3.get(d2), f2 = "number" == typeof g2 ? g2 : n2.options.estimateSize(u2), m2 = p2 + f2, v2 = c2 ? c2.lane : u2 % n2.options.lanes;
|
|
177
|
+
s2[u2] = { index: u2, start: p2, size: f2, end: m2, key: d2, lane: v2 };
|
|
178
|
+
}
|
|
179
|
+
return n2.measurementsCache = s2, s2;
|
|
180
|
+
}, { key: "production" !== process.env.NODE_ENV && "getMeasurements", debug: function() {
|
|
181
|
+
return n2.options.debug;
|
|
182
|
+
} }), this.calculateRange = de(function() {
|
|
183
|
+
return [n2.getMeasurements(), n2.getSize(), n2.scrollOffset];
|
|
184
|
+
}, function(e3, t3, l3) {
|
|
185
|
+
return n2.range = e3.length > 0 && t3 > 0 ? function(e4) {
|
|
186
|
+
var t4 = e4.measurements, l4 = e4.outerSize, n3 = e4.scrollOffset, a2 = t4.length - 1, o2 = function(e5) {
|
|
187
|
+
return t4[e5].start;
|
|
188
|
+
}, r2 = ye(0, a2, o2, n3), i2 = r2;
|
|
189
|
+
for (; i2 < a2 && t4[i2].end < n3 + l4; )
|
|
190
|
+
i2++;
|
|
191
|
+
return { startIndex: r2, endIndex: i2 };
|
|
192
|
+
}({ measurements: e3, outerSize: t3, scrollOffset: l3 }) : null;
|
|
193
|
+
}, { key: "production" !== process.env.NODE_ENV && "calculateRange", debug: function() {
|
|
194
|
+
return n2.options.debug;
|
|
195
|
+
} }), this.getIndexes = de(function() {
|
|
196
|
+
return [n2.options.rangeExtractor, n2.calculateRange(), n2.options.overscan, n2.options.count];
|
|
197
|
+
}, function(e3, t3, l3, n3) {
|
|
198
|
+
return null === t3 ? [] : e3(ue({}, t3, { overscan: l3, count: n3 }));
|
|
199
|
+
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: function() {
|
|
200
|
+
return n2.options.debug;
|
|
201
|
+
} }), this.indexFromElement = function(e3) {
|
|
202
|
+
var t3 = n2.options.indexAttribute, l3 = e3.getAttribute(t3);
|
|
203
|
+
return l3 ? parseInt(l3, 10) : (console.warn("Missing attribute name '" + t3 + "={index}' on measured element."), -1);
|
|
204
|
+
}, this._measureElement = function(e3, t3) {
|
|
205
|
+
var l3 = n2.measurementsCache[n2.indexFromElement(e3)];
|
|
206
|
+
if (l3 && e3.isConnected) {
|
|
207
|
+
var a2 = n2.measureElementCache.get(l3.key);
|
|
208
|
+
a2 !== e3 && (a2 && n2.observer.unobserve(a2), n2.observer.observe(e3), n2.measureElementCache.set(l3.key, e3));
|
|
209
|
+
var o2 = n2.options.measureElement(e3, t3, n2);
|
|
210
|
+
n2.resizeItem(l3, o2);
|
|
211
|
+
} else
|
|
212
|
+
n2.measureElementCache.forEach(function(t4, l4) {
|
|
213
|
+
t4 === e3 && (n2.observer.unobserve(e3), n2.measureElementCache.delete(l4));
|
|
214
|
+
});
|
|
215
|
+
}, this.resizeItem = function(e3, t3) {
|
|
216
|
+
var l3, a2 = t3 - (null != (l3 = n2.itemSizeCache.get(e3.key)) ? l3 : e3.size);
|
|
217
|
+
0 !== a2 && (e3.start < n2.scrollOffset && ("production" !== process.env.NODE_ENV && n2.options.debug && console.info("correction", a2), n2._scrollToOffset(n2.scrollOffset, { adjustments: n2.scrollAdjustments += a2, behavior: void 0 })), n2.pendingMeasuredCacheIndexes.push(e3.index), n2.itemSizeCache = new Map(n2.itemSizeCache.set(e3.key, t3)), n2.notify(false));
|
|
218
|
+
}, this.measureElement = function(e3) {
|
|
219
|
+
e3 && n2._measureElement(e3, void 0);
|
|
220
|
+
}, this.getVirtualItems = de(function() {
|
|
221
|
+
return [n2.getIndexes(), n2.getMeasurements()];
|
|
222
|
+
}, function(e3, t3) {
|
|
223
|
+
for (var l3 = [], n3 = 0, a2 = e3.length; n3 < a2; n3++) {
|
|
224
|
+
var o2 = t3[e3[n3]];
|
|
225
|
+
l3.push(o2);
|
|
226
|
+
}
|
|
227
|
+
return l3;
|
|
228
|
+
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: function() {
|
|
229
|
+
return n2.options.debug;
|
|
230
|
+
} }), this.getVirtualItemForOffset = function(e3) {
|
|
231
|
+
var t3 = n2.getMeasurements();
|
|
232
|
+
return ce(t3[ye(0, t3.length - 1, function(e4) {
|
|
233
|
+
return ce(t3[e4]).start;
|
|
234
|
+
}, e3)]);
|
|
235
|
+
}, this.getOffsetForAlignment = function(e3, t3) {
|
|
236
|
+
var l3 = n2.getSize();
|
|
237
|
+
"auto" === t3 && (t3 = e3 <= n2.scrollOffset ? "start" : e3 >= n2.scrollOffset + l3 ? "end" : "start"), "start" === t3 || ("end" === t3 ? e3 -= l3 : "center" === t3 && (e3 -= l3 / 2));
|
|
238
|
+
var a2 = n2.options.horizontal ? "scrollWidth" : "scrollHeight", o2 = (n2.scrollElement ? "document" in n2.scrollElement ? n2.scrollElement.document.documentElement[a2] : n2.scrollElement[a2] : 0) - n2.getSize();
|
|
239
|
+
return Math.max(Math.min(o2, e3), 0);
|
|
240
|
+
}, this.getOffsetForIndex = function(e3, t3) {
|
|
241
|
+
void 0 === t3 && (t3 = "auto"), e3 = Math.max(0, Math.min(e3, n2.options.count - 1));
|
|
242
|
+
var l3 = ce(n2.getMeasurements()[e3]);
|
|
243
|
+
if ("auto" === t3)
|
|
244
|
+
if (l3.end >= n2.scrollOffset + n2.getSize() - n2.options.scrollPaddingEnd)
|
|
245
|
+
t3 = "end";
|
|
246
|
+
else {
|
|
247
|
+
if (!(l3.start <= n2.scrollOffset + n2.options.scrollPaddingStart))
|
|
248
|
+
return [n2.scrollOffset, t3];
|
|
249
|
+
t3 = "start";
|
|
115
250
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
251
|
+
var a2 = "end" === t3 ? l3.end + n2.options.scrollPaddingEnd : l3.start - n2.options.scrollPaddingStart;
|
|
252
|
+
return [n2.getOffsetForAlignment(a2, t3), t3];
|
|
253
|
+
}, this.isDynamicMode = function() {
|
|
254
|
+
return n2.measureElementCache.size > 0;
|
|
255
|
+
}, this.cancelScrollToIndex = function() {
|
|
256
|
+
null !== n2.scrollToIndexTimeoutId && (clearTimeout(n2.scrollToIndexTimeoutId), n2.scrollToIndexTimeoutId = null);
|
|
257
|
+
}, this.scrollToOffset = function(e3, t3) {
|
|
258
|
+
var l3 = void 0 === t3 ? {} : t3, a2 = l3.align, o2 = void 0 === a2 ? "start" : a2, r2 = l3.behavior;
|
|
259
|
+
n2.cancelScrollToIndex(), "smooth" === r2 && n2.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), n2._scrollToOffset(n2.getOffsetForAlignment(e3, o2), { adjustments: void 0, behavior: r2 });
|
|
260
|
+
}, this.scrollToIndex = function(e3, t3) {
|
|
261
|
+
var l3 = void 0 === t3 ? {} : t3, a2 = l3.align, o2 = void 0 === a2 ? "auto" : a2, r2 = l3.behavior;
|
|
262
|
+
e3 = Math.max(0, Math.min(e3, n2.options.count - 1)), n2.cancelScrollToIndex(), "smooth" === r2 && n2.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");
|
|
263
|
+
var i2 = n2.getOffsetForIndex(e3, o2), s2 = i2[0], u2 = i2[1];
|
|
264
|
+
n2._scrollToOffset(s2, { adjustments: void 0, behavior: r2 }), "smooth" !== r2 && n2.isDynamicMode() && (n2.scrollToIndexTimeoutId = setTimeout(function() {
|
|
265
|
+
(n2.scrollToIndexTimeoutId = null, n2.measureElementCache.has(n2.options.getItemKey(e3))) ? function(e4, t4) {
|
|
266
|
+
return Math.abs(e4 - t4) < 1;
|
|
267
|
+
}(n2.getOffsetForIndex(e3, u2)[0], n2.scrollOffset) || n2.scrollToIndex(e3, { align: u2, behavior: r2 }) : n2.scrollToIndex(e3, { align: u2, behavior: r2 });
|
|
268
|
+
}));
|
|
269
|
+
}, this.scrollBy = function(e3, t3) {
|
|
270
|
+
var l3 = (void 0 === t3 ? {} : t3).behavior;
|
|
271
|
+
n2.cancelScrollToIndex(), "smooth" === l3 && n2.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), n2._scrollToOffset(n2.scrollOffset + e3, { adjustments: void 0, behavior: l3 });
|
|
272
|
+
}, this.getTotalSize = function() {
|
|
273
|
+
var e3;
|
|
274
|
+
return ((null == (e3 = n2.getMeasurements()[n2.options.count - 1]) ? void 0 : e3.end) || n2.options.paddingStart) - n2.options.scrollMargin + n2.options.paddingEnd;
|
|
275
|
+
}, this._scrollToOffset = function(e3, t3) {
|
|
276
|
+
var l3 = t3.adjustments, a2 = t3.behavior;
|
|
277
|
+
n2.options.scrollToFn(e3, { behavior: a2, adjustments: l3 }, n2);
|
|
278
|
+
}, this.measure = function() {
|
|
279
|
+
n2.itemSizeCache = /* @__PURE__ */ new Map(), n2.notify(false);
|
|
280
|
+
}, this.setOptions(e2), this.scrollRect = this.options.initialRect, this.scrollOffset = this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach(function(e3) {
|
|
281
|
+
n2.itemSizeCache.set(e3.key, e3.size);
|
|
282
|
+
}), this.maybeNotify();
|
|
283
|
+
}, ye = function(e2, t2, l2, n2) {
|
|
284
|
+
for (; e2 <= t2; ) {
|
|
285
|
+
var a2 = (e2 + t2) / 2 | 0, o2 = l2(a2);
|
|
286
|
+
if (o2 < n2)
|
|
287
|
+
e2 = a2 + 1;
|
|
288
|
+
else {
|
|
289
|
+
if (!(o2 > n2))
|
|
290
|
+
return a2;
|
|
291
|
+
t2 = a2 - 1;
|
|
124
292
|
}
|
|
125
|
-
}
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
|
|
293
|
+
}
|
|
294
|
+
return e2 > 0 ? e2 - 1 : 0;
|
|
295
|
+
};
|
|
296
|
+
function xe(e2) {
|
|
297
|
+
return function(e3) {
|
|
298
|
+
var t2 = new he(d(e3)), l2 = c(t2), n2 = t2._didMount();
|
|
299
|
+
return p(function() {
|
|
300
|
+
return d(e3).getScrollElement();
|
|
301
|
+
}, function(e4) {
|
|
302
|
+
e4 && t2._willUpdate();
|
|
303
|
+
}, { immediate: true }), p(function() {
|
|
304
|
+
return d(e3);
|
|
305
|
+
}, function(e4) {
|
|
306
|
+
t2.setOptions(se({}, e4, { onChange: function(t3, n3) {
|
|
307
|
+
g(l2), null == e4.onChange || e4.onChange(t3, n3);
|
|
308
|
+
} })), t2._willUpdate(), g(l2);
|
|
309
|
+
}, { immediate: true }), f(n2), l2;
|
|
310
|
+
}(u(function() {
|
|
311
|
+
return se({ observeElementRect: fe, observeElementOffset: me, scrollToFn: be }, d(e2));
|
|
312
|
+
}));
|
|
131
313
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
314
|
+
function we(e2, t2, l2) {
|
|
315
|
+
let n2 = s(null == l2 ? void 0 : l2.value), a2 = u(() => void 0 !== e2.value);
|
|
316
|
+
return [u(() => a2.value ? e2.value : n2.value), function(e3) {
|
|
317
|
+
return a2.value || (n2.value = e3), null == t2 ? void 0 : t2(e3);
|
|
318
|
+
}];
|
|
136
319
|
}
|
|
137
|
-
|
|
138
|
-
|
|
320
|
+
let ke = 0;
|
|
321
|
+
function Se() {
|
|
322
|
+
return ++ke;
|
|
139
323
|
}
|
|
140
|
-
function Ce(e2
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
324
|
+
function Ce(e2) {
|
|
325
|
+
var t2;
|
|
326
|
+
if (null == e2 || null == e2.value)
|
|
327
|
+
return null;
|
|
328
|
+
let l2 = null != (t2 = e2.value.$el) ? t2 : e2.value;
|
|
329
|
+
return l2 instanceof Node ? l2 : null;
|
|
145
330
|
}
|
|
146
|
-
function Oe(e2, t2) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}), l2;
|
|
331
|
+
function Oe(e2, t2, ...l2) {
|
|
332
|
+
if (e2 in t2) {
|
|
333
|
+
let n3 = t2[e2];
|
|
334
|
+
return "function" == typeof n3 ? n3(...l2) : n3;
|
|
335
|
+
}
|
|
336
|
+
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(", ")}.`);
|
|
337
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n2, Oe), n2;
|
|
154
338
|
}
|
|
155
|
-
var
|
|
156
|
-
t3 in e3 ?
|
|
339
|
+
var Me = Object.defineProperty, Te = (e2, t2, l2) => (((e3, t3, l3) => {
|
|
340
|
+
t3 in e3 ? Me(e3, t3, { enumerable: true, configurable: true, writable: true, value: l3 }) : e3[t3] = l3;
|
|
157
341
|
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, l2), l2);
|
|
158
|
-
let
|
|
342
|
+
let Ee = new class {
|
|
159
343
|
constructor() {
|
|
160
|
-
|
|
344
|
+
Te(this, "current", this.detect()), Te(this, "currentId", 0);
|
|
161
345
|
}
|
|
162
346
|
set(e2) {
|
|
163
347
|
this.current !== e2 && (this.currentId = 0, this.current = e2);
|
|
@@ -178,57 +362,44 @@ let Pe = new class {
|
|
|
178
362
|
return "undefined" == typeof window || "undefined" == typeof document ? "server" : "client";
|
|
179
363
|
}
|
|
180
364
|
}();
|
|
181
|
-
function
|
|
182
|
-
if (
|
|
365
|
+
function De(e2) {
|
|
366
|
+
if (Ee.isServer)
|
|
183
367
|
return null;
|
|
184
368
|
if (e2 instanceof Node)
|
|
185
369
|
return e2.ownerDocument;
|
|
186
370
|
if (null != e2 && e2.hasOwnProperty("value")) {
|
|
187
|
-
let t2 =
|
|
371
|
+
let t2 = Ce(e2);
|
|
188
372
|
if (t2)
|
|
189
373
|
return t2.ownerDocument;
|
|
190
374
|
}
|
|
191
375
|
return document;
|
|
192
376
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return;
|
|
198
|
-
let r2 = _e(e2);
|
|
199
|
-
if (!r2)
|
|
200
|
-
return;
|
|
201
|
-
let o2 = Object.assign((e3) => t2(e3), { acceptNode: t2 }), i2 = r2.createTreeWalker(n2, NodeFilter.SHOW_ELEMENT, o2, false);
|
|
202
|
-
for (; i2.nextNode(); )
|
|
203
|
-
l2(i2.currentNode);
|
|
204
|
-
});
|
|
377
|
+
let _e = ["[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(",");
|
|
378
|
+
var Ie = ((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))(Ie || {}), Pe = ((e2) => (e2[e2.Error = 0] = "Error", e2[e2.Overflow = 1] = "Overflow", e2[e2.Success = 2] = "Success", e2[e2.Underflow = 3] = "Underflow", e2))(Pe || {}), je = ((e2) => (e2[e2.Previous = -1] = "Previous", e2[e2.Next = 1] = "Next", e2))(je || {});
|
|
379
|
+
function Re(e2 = document.body) {
|
|
380
|
+
return null == e2 ? [] : Array.from(e2.querySelectorAll(_e)).sort((e3, t2) => Math.sign((e3.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
205
381
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
function Ie(e2 = document.body) {
|
|
209
|
-
return null == e2 ? [] : Array.from(e2.querySelectorAll(je)).sort((e3, t2) => Math.sign((e3.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
210
|
-
}
|
|
211
|
-
var Re = ((e2) => (e2[e2.Strict = 0] = "Strict", e2[e2.Loose = 1] = "Loose", e2))(Re || {});
|
|
212
|
-
function Ae(e2, t2 = 0) {
|
|
382
|
+
var Be = ((e2) => (e2[e2.Strict = 0] = "Strict", e2[e2.Loose = 1] = "Loose", e2))(Be || {});
|
|
383
|
+
function Le(e2, t2 = 0) {
|
|
213
384
|
var l2;
|
|
214
|
-
return e2 !== (null == (l2 =
|
|
385
|
+
return e2 !== (null == (l2 = De(e2)) ? void 0 : l2.body) && Oe(t2, { 0: () => e2.matches(_e), 1() {
|
|
215
386
|
let t3 = e2;
|
|
216
387
|
for (; null !== t3; ) {
|
|
217
|
-
if (t3.matches(
|
|
388
|
+
if (t3.matches(_e))
|
|
218
389
|
return true;
|
|
219
390
|
t3 = t3.parentElement;
|
|
220
391
|
}
|
|
221
392
|
return false;
|
|
222
393
|
} });
|
|
223
394
|
}
|
|
224
|
-
function
|
|
225
|
-
let t2 =
|
|
226
|
-
|
|
227
|
-
t2 && !
|
|
395
|
+
function Ae(e2) {
|
|
396
|
+
let t2 = De(e2);
|
|
397
|
+
m(() => {
|
|
398
|
+
t2 && !Le(t2.activeElement, 0) && Ne(e2);
|
|
228
399
|
});
|
|
229
400
|
}
|
|
230
|
-
var
|
|
231
|
-
function
|
|
401
|
+
var Fe = ((e2) => (e2[e2.Keyboard = 0] = "Keyboard", e2[e2.Mouse = 1] = "Mouse", e2))(Fe || {});
|
|
402
|
+
function Ne(e2) {
|
|
232
403
|
null == e2 || e2.focus({ preventScroll: true });
|
|
233
404
|
}
|
|
234
405
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("keydown", (e2) => {
|
|
@@ -236,20 +407,20 @@ function $e(e2) {
|
|
|
236
407
|
}, true), document.addEventListener("click", (e2) => {
|
|
237
408
|
1 === e2.detail ? delete document.documentElement.dataset.headlessuiFocusVisible : 0 === e2.detail && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
238
409
|
}, true));
|
|
239
|
-
let
|
|
240
|
-
function
|
|
410
|
+
let ze = ["textarea", "input"].join(",");
|
|
411
|
+
function $e(e2, t2 = (e3) => e3) {
|
|
241
412
|
return e2.slice().sort((e3, l2) => {
|
|
242
|
-
let
|
|
243
|
-
if (null ===
|
|
413
|
+
let n2 = t2(e3), a2 = t2(l2);
|
|
414
|
+
if (null === n2 || null === a2)
|
|
244
415
|
return 0;
|
|
245
|
-
let
|
|
246
|
-
return
|
|
416
|
+
let o2 = n2.compareDocumentPosition(a2);
|
|
417
|
+
return o2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
247
418
|
});
|
|
248
419
|
}
|
|
249
|
-
function
|
|
250
|
-
var
|
|
251
|
-
let
|
|
252
|
-
|
|
420
|
+
function He(e2, t2, { sorted: l2 = true, relativeTo: n2 = null, skipElements: a2 = [] } = {}) {
|
|
421
|
+
var o2;
|
|
422
|
+
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 ? $e(e2) : e2 : Re(e2);
|
|
423
|
+
a2.length > 0 && i2.length > 1 && (i2 = i2.filter((e3) => !a2.includes(e3))), n2 = null != n2 ? n2 : r2.activeElement;
|
|
253
424
|
let s2, u2 = (() => {
|
|
254
425
|
if (5 & t2)
|
|
255
426
|
return 1;
|
|
@@ -260,9 +431,9 @@ function Ve(e2, t2, { sorted: l2 = true, relativeTo: a2 = null, skipElements: n2
|
|
|
260
431
|
if (1 & t2)
|
|
261
432
|
return 0;
|
|
262
433
|
if (2 & t2)
|
|
263
|
-
return Math.max(0, i2.indexOf(
|
|
434
|
+
return Math.max(0, i2.indexOf(n2)) - 1;
|
|
264
435
|
if (4 & t2)
|
|
265
|
-
return Math.max(0, i2.indexOf(
|
|
436
|
+
return Math.max(0, i2.indexOf(n2)) + 1;
|
|
266
437
|
if (8 & t2)
|
|
267
438
|
return i2.length - 1;
|
|
268
439
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
@@ -280,103 +451,245 @@ function Ve(e2, t2, { sorted: l2 = true, relativeTo: a2 = null, skipElements: n2
|
|
|
280
451
|
return 1;
|
|
281
452
|
}
|
|
282
453
|
s2 = i2[e3], null == s2 || s2.focus(c2), p2 += u2;
|
|
283
|
-
} while (s2 !==
|
|
454
|
+
} while (s2 !== r2.activeElement);
|
|
284
455
|
return 6 & t2 && function(e3) {
|
|
285
456
|
var t3, l3;
|
|
286
|
-
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3,
|
|
457
|
+
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3, ze)) && l3;
|
|
287
458
|
}(s2) && s2.select(), 2;
|
|
288
459
|
}
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
|
|
460
|
+
function Ve() {
|
|
461
|
+
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
462
|
+
}
|
|
463
|
+
function Ye() {
|
|
464
|
+
return Ve() || /Android/gi.test(window.navigator.userAgent);
|
|
465
|
+
}
|
|
466
|
+
function Ue(e2, t2, l2) {
|
|
467
|
+
Ee.isServer || v((n2) => {
|
|
468
|
+
document.addEventListener(e2, t2, l2), n2(() => document.removeEventListener(e2, t2, l2));
|
|
292
469
|
});
|
|
293
470
|
}
|
|
294
471
|
function qe(e2, t2, l2) {
|
|
295
|
-
|
|
296
|
-
window.addEventListener(e2, t2, l2),
|
|
472
|
+
Ee.isServer || v((n2) => {
|
|
473
|
+
window.addEventListener(e2, t2, l2), n2(() => window.removeEventListener(e2, t2, l2));
|
|
297
474
|
});
|
|
298
475
|
}
|
|
299
|
-
function
|
|
300
|
-
function
|
|
301
|
-
if (!l2.value ||
|
|
476
|
+
function We(e2, t2, l2 = u(() => true)) {
|
|
477
|
+
function n2(n3, a3) {
|
|
478
|
+
if (!l2.value || n3.defaultPrevented)
|
|
302
479
|
return;
|
|
303
|
-
let
|
|
304
|
-
if (null ===
|
|
480
|
+
let o2 = a3(n3);
|
|
481
|
+
if (null === o2 || !o2.getRootNode().contains(o2))
|
|
305
482
|
return;
|
|
306
|
-
let
|
|
483
|
+
let r2 = function e3(t3) {
|
|
307
484
|
return "function" == typeof t3 ? e3(t3()) : Array.isArray(t3) || t3 instanceof Set ? t3 : [t3];
|
|
308
485
|
}(e2);
|
|
309
|
-
for (let e3 of
|
|
486
|
+
for (let e3 of r2) {
|
|
310
487
|
if (null === e3)
|
|
311
488
|
continue;
|
|
312
|
-
let t3 = e3 instanceof HTMLElement ? e3 :
|
|
313
|
-
if (null != t3 && t3.contains(
|
|
489
|
+
let t3 = e3 instanceof HTMLElement ? e3 : Ce(e3);
|
|
490
|
+
if (null != t3 && t3.contains(o2) || n3.composed && n3.composedPath().includes(t3))
|
|
314
491
|
return;
|
|
315
492
|
}
|
|
316
|
-
return !
|
|
317
|
-
}
|
|
318
|
-
let
|
|
319
|
-
|
|
320
|
-
var t3,
|
|
321
|
-
l2.value && (
|
|
322
|
-
}, true),
|
|
323
|
-
var t3,
|
|
324
|
-
l2.value && (
|
|
325
|
-
}, true),
|
|
326
|
-
|
|
327
|
-
}, true),
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
function Je(e2 = {}, t2 = null, l2 = []) {
|
|
335
|
-
for (let [a2, n2] of Object.entries(e2))
|
|
336
|
-
Ze(l2, Ge(t2, a2), n2);
|
|
337
|
-
return l2;
|
|
338
|
-
}
|
|
339
|
-
function Ge(e2, t2) {
|
|
340
|
-
return e2 ? e2 + "[" + t2 + "]" : t2;
|
|
341
|
-
}
|
|
342
|
-
function Ze(e2, t2, l2) {
|
|
343
|
-
if (Array.isArray(l2))
|
|
344
|
-
for (let [a2, n2] of l2.entries())
|
|
345
|
-
Ze(e2, Ge(t2, a2.toString()), n2);
|
|
346
|
-
else
|
|
347
|
-
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, ""]) : Je(l2, t2, e2);
|
|
493
|
+
return !Le(o2, Be.Loose) && -1 !== o2.tabIndex && n3.preventDefault(), t2(n3, o2);
|
|
494
|
+
}
|
|
495
|
+
let a2 = s(null);
|
|
496
|
+
Ue("pointerdown", (e3) => {
|
|
497
|
+
var t3, n3;
|
|
498
|
+
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
499
|
+
}, true), Ue("mousedown", (e3) => {
|
|
500
|
+
var t3, n3;
|
|
501
|
+
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
502
|
+
}, true), Ue("click", (e3) => {
|
|
503
|
+
Ye() || a2.value && (n2(e3, () => a2.value), a2.value = null);
|
|
504
|
+
}, true), Ue("touchend", (e3) => n2(e3, () => e3.target instanceof HTMLElement ? e3.target : null), true), qe("blur", (e3) => n2(e3, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
|
|
505
|
+
}
|
|
506
|
+
function Ke(e2, t2) {
|
|
507
|
+
if (e2)
|
|
508
|
+
return e2;
|
|
509
|
+
let l2 = null != t2 ? t2 : "button";
|
|
510
|
+
return "string" == typeof l2 && "button" === l2.toLowerCase() ? "button" : void 0;
|
|
348
511
|
}
|
|
349
|
-
function
|
|
350
|
-
let
|
|
351
|
-
return
|
|
352
|
-
|
|
353
|
-
}
|
|
512
|
+
function Je(e2, t2) {
|
|
513
|
+
let l2 = s(Ke(e2.value.type, e2.value.as));
|
|
514
|
+
return b(() => {
|
|
515
|
+
l2.value = Ke(e2.value.type, e2.value.as);
|
|
516
|
+
}), v(() => {
|
|
517
|
+
var e3;
|
|
518
|
+
l2.value || Ce(t2) && Ce(t2) instanceof HTMLButtonElement && (null == (e3 = Ce(t2)) || !e3.hasAttribute("type")) && (l2.value = "button");
|
|
519
|
+
}), l2;
|
|
354
520
|
}
|
|
355
|
-
function
|
|
521
|
+
function Ge(e2) {
|
|
356
522
|
return [e2.screenX, e2.screenY];
|
|
357
523
|
}
|
|
358
|
-
function
|
|
524
|
+
function Ze() {
|
|
359
525
|
let e2 = s([-1, -1]);
|
|
360
526
|
return { wasMoved(t2) {
|
|
361
|
-
let l2 =
|
|
527
|
+
let l2 = Ge(t2);
|
|
362
528
|
return (e2.value[0] !== l2[0] || e2.value[1] !== l2[1]) && (e2.value = l2, true);
|
|
363
529
|
}, update(t2) {
|
|
364
|
-
e2.value =
|
|
530
|
+
e2.value = Ge(t2);
|
|
365
531
|
} };
|
|
366
532
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
533
|
+
function Xe({ container: e2, accept: t2, walk: l2, enabled: n2 }) {
|
|
534
|
+
v(() => {
|
|
535
|
+
let a2 = e2.value;
|
|
536
|
+
if (!a2 || void 0 !== n2 && !n2.value)
|
|
537
|
+
return;
|
|
538
|
+
let o2 = De(e2);
|
|
539
|
+
if (!o2)
|
|
540
|
+
return;
|
|
541
|
+
let r2 = Object.assign((e3) => t2(e3), { acceptNode: t2 }), i2 = o2.createTreeWalker(a2, NodeFilter.SHOW_ELEMENT, r2, false);
|
|
542
|
+
for (; i2.nextNode(); )
|
|
543
|
+
l2(i2.currentNode);
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
var Qe = ((e2) => (e2[e2.None = 0] = "None", e2[e2.RenderStrategy = 1] = "RenderStrategy", e2[e2.Static = 2] = "Static", e2))(Qe || {}), et = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(et || {});
|
|
547
|
+
function tt({ visible: e2 = true, features: t2 = 0, ourProps: l2, theirProps: n2, ...a2 }) {
|
|
548
|
+
var o2;
|
|
549
|
+
let r2 = at(n2, l2), i2 = Object.assign(a2, { props: r2 });
|
|
550
|
+
if (e2 || 2 & t2 && r2.static)
|
|
551
|
+
return lt(i2);
|
|
552
|
+
if (1 & t2) {
|
|
553
|
+
return Oe(null == (o2 = r2.unmount) || o2 ? 0 : 1, { 0: () => null, 1: () => lt({ ...a2, props: { ...r2, hidden: true, style: { display: "none" } } }) });
|
|
554
|
+
}
|
|
555
|
+
return lt(i2);
|
|
556
|
+
}
|
|
557
|
+
function lt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
558
|
+
var o2, r2;
|
|
559
|
+
let { as: i2, ...s2 } = rt(e2, ["unmount", "static"]), u2 = null == (o2 = l2.default) ? void 0 : o2.call(l2, n2), d2 = {};
|
|
560
|
+
if (n2) {
|
|
561
|
+
let e3 = false, t3 = [];
|
|
562
|
+
for (let [l3, a3] of Object.entries(n2))
|
|
563
|
+
"boolean" == typeof a3 && (e3 = true), true === a3 && t3.push(l3);
|
|
564
|
+
e3 && (d2["data-headlessui-state"] = t3.join(" "));
|
|
565
|
+
}
|
|
566
|
+
if ("template" === i2) {
|
|
567
|
+
if (u2 = nt(null != u2 ? u2 : []), Object.keys(s2).length > 0 || Object.keys(t2).length > 0) {
|
|
568
|
+
let [e3, ...l3] = null != u2 ? u2 : [];
|
|
569
|
+
if (!function(e4) {
|
|
570
|
+
return null != e4 && ("string" == typeof e4.type || "object" == typeof e4.type || "function" == typeof e4.type);
|
|
571
|
+
}(e3) || l3.length > 0)
|
|
572
|
+
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"));
|
|
573
|
+
let n3 = at(null != (r2 = e3.props) ? r2 : {}, s2, d2), o3 = h(e3, n3, true);
|
|
574
|
+
for (let e4 in n3)
|
|
575
|
+
e4.startsWith("on") && (o3.props || (o3.props = {}), o3.props[e4] = n3[e4]);
|
|
576
|
+
return o3;
|
|
577
|
+
}
|
|
578
|
+
return Array.isArray(u2) && 1 === u2.length ? u2[0] : u2;
|
|
579
|
+
}
|
|
580
|
+
return y(i2, Object.assign({}, s2, d2), { default: () => u2 });
|
|
581
|
+
}
|
|
582
|
+
function nt(e2) {
|
|
583
|
+
return e2.flatMap((e3) => e3.type === x ? nt(e3.children) : [e3]);
|
|
584
|
+
}
|
|
585
|
+
function at(...e2) {
|
|
586
|
+
if (0 === e2.length)
|
|
587
|
+
return {};
|
|
588
|
+
if (1 === e2.length)
|
|
589
|
+
return e2[0];
|
|
590
|
+
let t2 = {}, l2 = {};
|
|
591
|
+
for (let n2 of e2)
|
|
592
|
+
for (let e3 in n2)
|
|
593
|
+
e3.startsWith("on") && "function" == typeof n2[e3] ? (null != l2[e3] || (l2[e3] = []), l2[e3].push(n2[e3])) : t2[e3] = n2[e3];
|
|
594
|
+
if (t2.disabled || t2["aria-disabled"])
|
|
595
|
+
return Object.assign(t2, Object.fromEntries(Object.keys(l2).map((e3) => [e3, void 0])));
|
|
596
|
+
for (let e3 in l2)
|
|
597
|
+
Object.assign(t2, { [e3](t3, ...n2) {
|
|
598
|
+
let a2 = l2[e3];
|
|
599
|
+
for (let e4 of a2) {
|
|
600
|
+
if (t3 instanceof Event && t3.defaultPrevented)
|
|
601
|
+
return;
|
|
602
|
+
e4(t3, ...n2);
|
|
603
|
+
}
|
|
604
|
+
} });
|
|
605
|
+
return t2;
|
|
369
606
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
607
|
+
function ot(e2) {
|
|
608
|
+
let t2 = Object.assign({}, e2);
|
|
609
|
+
for (let e3 in t2)
|
|
610
|
+
void 0 === t2[e3] && delete t2[e3];
|
|
611
|
+
return t2;
|
|
612
|
+
}
|
|
613
|
+
function rt(e2, t2 = []) {
|
|
614
|
+
let l2 = Object.assign({}, e2);
|
|
615
|
+
for (let e3 of t2)
|
|
616
|
+
e3 in l2 && delete l2[e3];
|
|
617
|
+
return l2;
|
|
618
|
+
}
|
|
619
|
+
var it = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(it || {});
|
|
620
|
+
let st = w({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup: (e2, { slots: t2, attrs: l2 }) => () => {
|
|
621
|
+
var n2;
|
|
622
|
+
let { features: a2, ...o2 } = e2;
|
|
623
|
+
return tt({ ourProps: { "aria-hidden": 2 == (2 & a2) || (null != (n2 = o2["aria-hidden"]) ? n2 : 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 == (4 & a2) && 2 != (2 & a2) && { display: "none" } } }, theirProps: o2, slot: {}, attrs: l2, slots: t2, name: "Hidden" });
|
|
624
|
+
} }), ut = Symbol("Context");
|
|
625
|
+
var dt = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(dt || {});
|
|
626
|
+
function ct() {
|
|
627
|
+
return k(ut, null);
|
|
628
|
+
}
|
|
629
|
+
function pt(e2) {
|
|
630
|
+
S(ut, e2);
|
|
631
|
+
}
|
|
632
|
+
var gt = ((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))(gt || {});
|
|
633
|
+
let ft = [];
|
|
634
|
+
!function(e2) {
|
|
635
|
+
function t2() {
|
|
636
|
+
"loading" !== document.readyState && (e2(), document.removeEventListener("DOMContentLoaded", t2));
|
|
637
|
+
}
|
|
638
|
+
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("DOMContentLoaded", t2), t2());
|
|
639
|
+
}(() => {
|
|
640
|
+
function e2(e3) {
|
|
641
|
+
e3.target instanceof HTMLElement && e3.target !== document.body && ft[0] !== e3.target && (ft.unshift(e3.target), ft = ft.filter((e4) => null != e4 && e4.isConnected), ft.splice(10));
|
|
642
|
+
}
|
|
643
|
+
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 });
|
|
644
|
+
});
|
|
645
|
+
var mt = ((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))(mt || {});
|
|
646
|
+
function vt(e2, t2) {
|
|
647
|
+
let l2 = t2.resolveItems();
|
|
648
|
+
if (l2.length <= 0)
|
|
649
|
+
return null;
|
|
650
|
+
let n2 = t2.resolveActiveIndex(), a2 = null != n2 ? n2 : -1;
|
|
651
|
+
switch (e2.focus) {
|
|
652
|
+
case 0:
|
|
653
|
+
for (let e3 = 0; e3 < l2.length; ++e3)
|
|
654
|
+
if (!t2.resolveDisabled(l2[e3], e3, l2))
|
|
655
|
+
return e3;
|
|
656
|
+
return n2;
|
|
657
|
+
case 1:
|
|
658
|
+
-1 === a2 && (a2 = l2.length);
|
|
659
|
+
for (let e3 = a2 - 1; e3 >= 0; --e3)
|
|
660
|
+
if (!t2.resolveDisabled(l2[e3], e3, l2))
|
|
661
|
+
return e3;
|
|
662
|
+
return n2;
|
|
663
|
+
case 2:
|
|
664
|
+
for (let e3 = a2 + 1; e3 < l2.length; ++e3)
|
|
665
|
+
if (!t2.resolveDisabled(l2[e3], e3, l2))
|
|
666
|
+
return e3;
|
|
667
|
+
return n2;
|
|
668
|
+
case 3:
|
|
669
|
+
for (let e3 = l2.length - 1; e3 >= 0; --e3)
|
|
670
|
+
if (!t2.resolveDisabled(l2[e3], e3, l2))
|
|
671
|
+
return e3;
|
|
672
|
+
return n2;
|
|
673
|
+
case 4:
|
|
674
|
+
for (let n3 = 0; n3 < l2.length; ++n3)
|
|
675
|
+
if (t2.resolveId(l2[n3], n3, l2) === e2.id)
|
|
676
|
+
return n3;
|
|
677
|
+
return n2;
|
|
678
|
+
case 5:
|
|
679
|
+
return null;
|
|
680
|
+
default:
|
|
681
|
+
!function(e3) {
|
|
682
|
+
throw new Error("Unexpected object: " + e3);
|
|
683
|
+
}(e2);
|
|
684
|
+
}
|
|
372
685
|
}
|
|
373
|
-
function
|
|
686
|
+
function bt(e2) {
|
|
374
687
|
"function" == typeof queueMicrotask ? queueMicrotask(e2) : Promise.resolve().then(e2).catch((e3) => setTimeout(() => {
|
|
375
688
|
throw e3;
|
|
376
689
|
}));
|
|
377
690
|
}
|
|
378
|
-
function
|
|
379
|
-
let e2 = [], t2 = { addEventListener: (e3, l2,
|
|
691
|
+
function ht() {
|
|
692
|
+
let e2 = [], t2 = { addEventListener: (e3, l2, n2, a2) => (e3.addEventListener(l2, n2, a2), t2.add(() => e3.removeEventListener(l2, n2, a2))), requestAnimationFrame(...e3) {
|
|
380
693
|
let l2 = requestAnimationFrame(...e3);
|
|
381
694
|
t2.add(() => cancelAnimationFrame(l2));
|
|
382
695
|
}, nextFrame(...e3) {
|
|
@@ -388,18 +701,18 @@ function nt() {
|
|
|
388
701
|
t2.add(() => clearTimeout(l2));
|
|
389
702
|
}, microTask(...e3) {
|
|
390
703
|
let l2 = { current: true };
|
|
391
|
-
return
|
|
704
|
+
return bt(() => {
|
|
392
705
|
l2.current && e3[0]();
|
|
393
706
|
}), t2.add(() => {
|
|
394
707
|
l2.current = false;
|
|
395
708
|
});
|
|
396
709
|
}, style(e3, t3, l2) {
|
|
397
|
-
let
|
|
710
|
+
let n2 = e3.style.getPropertyValue(t3);
|
|
398
711
|
return Object.assign(e3.style, { [t3]: l2 }), this.add(() => {
|
|
399
|
-
Object.assign(e3.style, { [t3]:
|
|
712
|
+
Object.assign(e3.style, { [t3]: n2 });
|
|
400
713
|
});
|
|
401
714
|
}, group(e3) {
|
|
402
|
-
let t3 =
|
|
715
|
+
let t3 = ht();
|
|
403
716
|
return e3(t3), this.add(() => t3.dispose());
|
|
404
717
|
}, add: (t3) => (e2.push(t3), () => {
|
|
405
718
|
let l2 = e2.indexOf(t3);
|
|
@@ -412,587 +725,541 @@ function nt() {
|
|
|
412
725
|
} };
|
|
413
726
|
return t2;
|
|
414
727
|
}
|
|
415
|
-
function
|
|
416
|
-
|
|
728
|
+
function yt(e2 = {}, t2 = null, l2 = []) {
|
|
729
|
+
for (let [n2, a2] of Object.entries(e2))
|
|
730
|
+
wt(l2, xt(t2, n2), a2);
|
|
731
|
+
return l2;
|
|
732
|
+
}
|
|
733
|
+
function xt(e2, t2) {
|
|
734
|
+
return e2 ? e2 + "[" + t2 + "]" : t2;
|
|
417
735
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
736
|
+
function wt(e2, t2, l2) {
|
|
737
|
+
if (Array.isArray(l2))
|
|
738
|
+
for (let [n2, a2] of l2.entries())
|
|
739
|
+
wt(e2, xt(t2, n2.toString()), a2);
|
|
740
|
+
else
|
|
741
|
+
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, ""]) : yt(l2, t2, e2);
|
|
742
|
+
}
|
|
743
|
+
var kt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(kt || {}), St = ((e2) => (e2[e2.Single = 0] = "Single", e2[e2.Multi = 1] = "Multi", e2))(St || {}), Ct = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Focus = 1] = "Focus", e2[e2.Other = 2] = "Other", e2))(Ct || {});
|
|
744
|
+
let Ot = Symbol("ComboboxContext");
|
|
745
|
+
function Mt(e2) {
|
|
746
|
+
let t2 = k(Ot, null);
|
|
422
747
|
if (null === t2) {
|
|
423
748
|
let t3 = new Error(`<${e2} /> is missing a parent <Combobox /> component.`);
|
|
424
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
749
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Mt), t3;
|
|
425
750
|
}
|
|
426
751
|
return t2;
|
|
427
752
|
}
|
|
428
|
-
let
|
|
429
|
-
let
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
753
|
+
let Tt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, { slots: t2 }) {
|
|
754
|
+
let l2 = Mt("VirtualProvider"), n2 = u(() => {
|
|
755
|
+
let e3 = Ce(l2.optionsRef);
|
|
756
|
+
if (!e3)
|
|
757
|
+
return { start: 0, end: 0 };
|
|
758
|
+
let t3 = window.getComputedStyle(e3);
|
|
759
|
+
return { start: parseFloat(t3.paddingBlockStart || t3.paddingTop), end: parseFloat(t3.paddingBlockEnd || t3.paddingBottom) };
|
|
760
|
+
}), a2 = xe(u(() => ({ scrollPaddingStart: n2.value.start, scrollPaddingEnd: n2.value.end, count: l2.virtual.value.options.length, estimateSize: () => 40, getScrollElement: () => Ce(l2.optionsRef), overscan: 12 }))), o2 = u(() => {
|
|
761
|
+
var e3;
|
|
762
|
+
return null == (e3 = l2.virtual.value) ? void 0 : e3.options;
|
|
763
|
+
}), r2 = s(0);
|
|
764
|
+
return p([o2], () => {
|
|
765
|
+
r2.value += 1;
|
|
766
|
+
}), S(Tt, l2.virtual.value ? a2 : null), () => [y("div", { style: { position: "relative", width: "100%", height: `${a2.value.getTotalSize()}px` }, ref: (e3) => {
|
|
767
|
+
if (e3) {
|
|
768
|
+
if ("undefined" != typeof process && void 0 !== process.env.JEST_WORKER_ID || 0 === l2.activationTrigger.value)
|
|
769
|
+
return;
|
|
770
|
+
null !== l2.activeOptionIndex.value && l2.virtual.value.options.length > l2.activeOptionIndex.value && a2.value.scrollToIndex(l2.activeOptionIndex.value);
|
|
771
|
+
}
|
|
772
|
+
} }, a2.value.getVirtualItems().map((e3) => h(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" } })))];
|
|
773
|
+
} }), Dt = w({ 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 }) {
|
|
774
|
+
let a2 = s(1), o2 = s(null), r2 = s(null), i2 = s(null), d2 = s(null), c2 = s({ static: false, hold: false }), g2 = s([]), f2 = s(null), m2 = s(2), v2 = s(false);
|
|
775
|
+
function h2(e3 = (e4) => e4) {
|
|
776
|
+
let t3 = null !== f2.value ? g2.value[f2.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) : $e(l3, (e4) => Ce(e4.dataRef.domRef)), a3 = t3 ? n3.indexOf(t3) : null;
|
|
777
|
+
return -1 === a3 && (a3 = null), { options: n3, activeOptionIndex: a3 };
|
|
778
|
+
}
|
|
779
|
+
let w2 = u(() => e2.multiple ? 1 : 0), k2 = u(() => e2.nullable), [O2, T2] = we(u(() => e2.modelValue), (e3) => n2("update:modelValue", e3), u(() => e2.defaultValue)), E2 = u(() => void 0 === O2.value ? Oe(w2.value, { 1: [], 0: void 0 }) : O2.value), D2 = null, _2 = null;
|
|
780
|
+
function I2(e3) {
|
|
781
|
+
return Oe(w2.value, { 0: () => null == T2 ? void 0 : T2(e3), 1: () => {
|
|
782
|
+
let t3 = M(j2.value.value).slice(), l3 = M(e3), n3 = t3.findIndex((e4) => j2.compare(l3, M(e4)));
|
|
783
|
+
return -1 === n3 ? t3.push(l3) : t3.splice(n3, 1), null == T2 ? void 0 : T2(t3);
|
|
784
|
+
} });
|
|
433
785
|
}
|
|
434
|
-
let
|
|
786
|
+
let P2 = u(() => {
|
|
787
|
+
});
|
|
788
|
+
p([P2], ([e3], [t3]) => {
|
|
789
|
+
if (j2.virtual.value && e3 && t3 && null !== f2.value) {
|
|
790
|
+
let l3 = e3.indexOf(t3[f2.value]);
|
|
791
|
+
f2.value = -1 !== l3 ? l3 : null;
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
let j2 = { comboboxState: a2, value: E2, mode: w2, compare(t3, l3) {
|
|
435
795
|
if ("string" == typeof e2.by) {
|
|
436
|
-
let
|
|
437
|
-
return (null == t3 ? void 0 : t3[
|
|
796
|
+
let n3 = e2.by;
|
|
797
|
+
return (null == t3 ? void 0 : t3[n3]) === (null == l3 ? void 0 : l3[n3]);
|
|
438
798
|
}
|
|
439
|
-
return e2.by(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
},
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
799
|
+
return null === e2.by ? function(e3, t4) {
|
|
800
|
+
return e3 === t4;
|
|
801
|
+
}(t3, l3) : e2.by(t3, l3);
|
|
802
|
+
}, calculateIndex: (t3) => j2.virtual.value ? null === e2.by ? j2.virtual.value.options.indexOf(t3) : j2.virtual.value.options.findIndex((e3) => j2.compare(e3, t3)) : g2.value.findIndex((e3) => j2.compare(e3.dataRef.value, t3)), defaultValue: u(() => e2.defaultValue), nullable: k2, immediate: u(() => false), virtual: u(() => null), inputRef: r2, labelRef: o2, buttonRef: i2, optionsRef: d2, disabled: u(() => e2.disabled), options: g2, change(e3) {
|
|
803
|
+
T2(e3);
|
|
804
|
+
}, activeOptionIndex: u(() => {
|
|
805
|
+
if (v2.value && null === f2.value && (j2.virtual.value ? j2.virtual.value.options.length > 0 : g2.value.length > 0)) {
|
|
806
|
+
if (j2.virtual.value) {
|
|
807
|
+
let e4 = j2.virtual.value.options.findIndex((e5) => {
|
|
808
|
+
var t3;
|
|
809
|
+
return !(null != (t3 = j2.virtual.value) && t3.disabled(e5));
|
|
810
|
+
});
|
|
811
|
+
if (-1 !== e4)
|
|
812
|
+
return e4;
|
|
813
|
+
}
|
|
814
|
+
let e3 = g2.value.findIndex((e4) => !e4.dataRef.disabled);
|
|
815
|
+
if (-1 !== e3)
|
|
816
|
+
return e3;
|
|
446
817
|
}
|
|
447
|
-
return
|
|
448
|
-
}), activationTrigger:
|
|
449
|
-
|
|
818
|
+
return f2.value;
|
|
819
|
+
}), activationTrigger: m2, optionsPropsRef: c2, closeCombobox() {
|
|
820
|
+
v2.value = false, !e2.disabled && 1 !== a2.value && (a2.value = 1, f2.value = null);
|
|
450
821
|
}, openCombobox() {
|
|
451
|
-
if (
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
},
|
|
459
|
-
|
|
460
|
-
|
|
822
|
+
if (v2.value = true, !e2.disabled && 0 !== a2.value) {
|
|
823
|
+
if (j2.value.value) {
|
|
824
|
+
let e3 = j2.calculateIndex(j2.value.value);
|
|
825
|
+
-1 !== e3 && (f2.value = e3);
|
|
826
|
+
}
|
|
827
|
+
a2.value = 0;
|
|
828
|
+
}
|
|
829
|
+
}, setActivationTrigger(e3) {
|
|
830
|
+
m2.value = e3;
|
|
831
|
+
}, goToOption(t3, l3, n3) {
|
|
832
|
+
v2.value = false, null !== D2 && cancelAnimationFrame(D2), D2 = requestAnimationFrame(() => {
|
|
833
|
+
if (e2.disabled || d2.value && !c2.value.static && 1 === a2.value)
|
|
461
834
|
return;
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
835
|
+
if (j2.virtual.value)
|
|
836
|
+
return f2.value = t3 === mt.Specific ? l3 : vt({ focus: t3 }, { resolveItems: () => j2.virtual.value.options, resolveActiveIndex: () => {
|
|
837
|
+
var e3, t4;
|
|
838
|
+
return null != (t4 = null != (e3 = j2.activeOptionIndex.value) ? e3 : j2.virtual.value.options.findIndex((e4) => {
|
|
839
|
+
var t5;
|
|
840
|
+
return !(null != (t5 = j2.virtual.value) && t5.disabled(e4));
|
|
841
|
+
})) ? t4 : null;
|
|
842
|
+
}, resolveDisabled: (e3) => j2.virtual.value.disabled(e3), resolveId() {
|
|
843
|
+
throw new Error("Function not implemented.");
|
|
844
|
+
} }), void (m2.value = null != n3 ? n3 : 2);
|
|
845
|
+
let o3 = h2();
|
|
846
|
+
if (null === o3.activeOptionIndex) {
|
|
847
|
+
let e3 = o3.options.findIndex((e4) => !e4.dataRef.disabled);
|
|
848
|
+
-1 !== e3 && (o3.activeOptionIndex = e3);
|
|
466
849
|
}
|
|
467
|
-
let
|
|
468
|
-
|
|
850
|
+
let r3 = t3 === mt.Specific ? l3 : vt({ focus: t3 }, { resolveItems: () => o3.options, resolveActiveIndex: () => o3.activeOptionIndex, resolveId: (e3) => e3.id, resolveDisabled: (e3) => e3.dataRef.disabled });
|
|
851
|
+
f2.value = r3, m2.value = null != n3 ? n3 : 2, g2.value = o3.options;
|
|
469
852
|
});
|
|
470
853
|
}, selectOption(e3) {
|
|
471
|
-
let t3 =
|
|
854
|
+
let t3 = g2.value.find((t4) => t4.id === e3);
|
|
472
855
|
if (!t3)
|
|
473
856
|
return;
|
|
474
857
|
let { dataRef: l3 } = t3;
|
|
475
|
-
|
|
476
|
-
let e4 = h(T2.value.value).slice(), t4 = h(l3.value), a3 = e4.findIndex((e5) => T2.compare(t4, h(e5)));
|
|
477
|
-
return -1 === a3 ? e4.push(t4) : e4.splice(a3, 1), e4;
|
|
478
|
-
} }));
|
|
858
|
+
I2(l3.value);
|
|
479
859
|
}, selectActiveOption() {
|
|
480
|
-
if (null
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
860
|
+
if (null !== j2.activeOptionIndex.value) {
|
|
861
|
+
if (j2.virtual.value)
|
|
862
|
+
I2(j2.virtual.value.options[j2.activeOptionIndex.value]);
|
|
863
|
+
else {
|
|
864
|
+
let { dataRef: e3 } = g2.value[j2.activeOptionIndex.value];
|
|
865
|
+
I2(e3.value);
|
|
866
|
+
}
|
|
867
|
+
j2.goToOption(mt.Specific, j2.activeOptionIndex.value);
|
|
868
|
+
}
|
|
487
869
|
}, registerOption(e3, t3) {
|
|
870
|
+
let l3 = C({ id: e3, dataRef: t3 });
|
|
871
|
+
if (j2.virtual.value)
|
|
872
|
+
return void g2.value.push(l3);
|
|
488
873
|
_2 && cancelAnimationFrame(_2);
|
|
489
|
-
let
|
|
490
|
-
|
|
491
|
-
let e4 =
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
f2.value = a3.options, v2.value = a3.activeOptionIndex, b2.value = 1, a3.options.some((e4) => !he(e4.dataRef.domRef)) && (_2 = requestAnimationFrame(() => {
|
|
495
|
-
let e4 = k2();
|
|
496
|
-
f2.value = e4.options, v2.value = e4.activeOptionIndex;
|
|
874
|
+
let n3 = h2((e4) => (e4.push(l3), e4));
|
|
875
|
+
null === f2.value && j2.isSelected(t3.value.value) && (n3.activeOptionIndex = n3.options.indexOf(l3)), g2.value = n3.options, f2.value = n3.activeOptionIndex, m2.value = 2, n3.options.some((e4) => !Ce(e4.dataRef.domRef)) && (_2 = requestAnimationFrame(() => {
|
|
876
|
+
let e4 = h2();
|
|
877
|
+
g2.value = e4.options, f2.value = e4.activeOptionIndex;
|
|
497
878
|
}));
|
|
498
|
-
}, unregisterOption(e3) {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
let l3 =
|
|
879
|
+
}, unregisterOption(e3, t3) {
|
|
880
|
+
if (null !== D2 && cancelAnimationFrame(D2), t3 && (v2.value = true), j2.virtual.value)
|
|
881
|
+
return void (g2.value = g2.value.filter((t4) => t4.id !== e3));
|
|
882
|
+
let l3 = h2((t4) => {
|
|
502
883
|
let l4 = t4.findIndex((t5) => t5.id === e3);
|
|
503
884
|
return -1 !== l4 && t4.splice(l4, 1), t4;
|
|
504
885
|
});
|
|
505
|
-
|
|
506
|
-
} };
|
|
507
|
-
|
|
508
|
-
let
|
|
886
|
+
g2.value = l3.options, f2.value = l3.activeOptionIndex, m2.value = 2;
|
|
887
|
+
}, isSelected: (e3) => Oe(w2.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) => f2.value === j2.calculateIndex(e3) };
|
|
888
|
+
We([r2, i2, d2], () => j2.closeCombobox(), u(() => 0 === a2.value)), S(Ot, j2), pt(u(() => Oe(a2.value, { 0: dt.Open, 1: dt.Closed })));
|
|
889
|
+
let R2 = u(() => {
|
|
509
890
|
var e3;
|
|
510
|
-
return null == (e3 =
|
|
891
|
+
return null == (e3 = Ce(r2)) ? void 0 : e3.closest("form");
|
|
511
892
|
});
|
|
512
|
-
return
|
|
513
|
-
|
|
514
|
-
if (
|
|
515
|
-
return
|
|
893
|
+
return b(() => {
|
|
894
|
+
p([R2], () => {
|
|
895
|
+
if (R2.value && void 0 !== e2.defaultValue)
|
|
896
|
+
return R2.value.addEventListener("reset", t3), () => {
|
|
516
897
|
var e3;
|
|
517
|
-
null == (e3 =
|
|
898
|
+
null == (e3 = R2.value) || e3.removeEventListener("reset", t3);
|
|
518
899
|
};
|
|
519
900
|
function t3() {
|
|
520
|
-
|
|
901
|
+
j2.change(e2.defaultValue);
|
|
521
902
|
}
|
|
522
903
|
}, { immediate: true });
|
|
523
904
|
}), () => {
|
|
524
|
-
|
|
525
|
-
|
|
905
|
+
var n3, o3, r3;
|
|
906
|
+
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.value) ? r3 : null, value: E2.value };
|
|
907
|
+
return y(x, [...null != i3 && null != E2.value ? yt({ [i3]: E2.value }).map(([e3, t3]) => y(st, ot({ features: it.Hidden, key: e3, as: "input", type: "hidden", hidden: true, readOnly: true, form: u2, name: e3, value: t3 }))) : [], tt({ theirProps: { ...l2, ...rt(d3, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: c3, slots: t2, attrs: l2, name: "Combobox" })]);
|
|
526
908
|
};
|
|
527
|
-
} }),
|
|
528
|
-
let
|
|
529
|
-
function
|
|
909
|
+
} }), _t = w({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-combobox-label-${Se()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
910
|
+
let n2 = Mt("ComboboxLabel");
|
|
911
|
+
function a2() {
|
|
530
912
|
var e3;
|
|
531
|
-
null == (e3 =
|
|
913
|
+
null == (e3 = Ce(n2.inputRef)) || e3.focus({ preventScroll: true });
|
|
532
914
|
}
|
|
533
915
|
return () => {
|
|
534
|
-
let
|
|
535
|
-
return
|
|
916
|
+
let o2 = { open: 0 === n2.comboboxState.value, disabled: n2.disabled.value }, { id: r2, ...i2 } = e2;
|
|
917
|
+
return tt({ ourProps: { id: r2, ref: n2.labelRef, onClick: a2 }, theirProps: i2, slot: o2, attrs: t2, slots: l2, name: "ComboboxLabel" });
|
|
536
918
|
};
|
|
537
|
-
} }),
|
|
538
|
-
let
|
|
539
|
-
function
|
|
540
|
-
|
|
919
|
+
} }), It = w({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-combobox-button-${Se()}` } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
920
|
+
let a2 = Mt("ComboboxButton");
|
|
921
|
+
function o2(e3) {
|
|
922
|
+
a2.disabled.value || (0 === a2.comboboxState.value ? a2.closeCombobox() : (e3.preventDefault(), a2.openCombobox()), m(() => {
|
|
541
923
|
var e4;
|
|
542
|
-
return null == (e4 =
|
|
924
|
+
return null == (e4 = Ce(a2.inputRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
543
925
|
}));
|
|
544
926
|
}
|
|
545
|
-
function
|
|
927
|
+
function r2(e3) {
|
|
546
928
|
switch (e3.key) {
|
|
547
|
-
case
|
|
548
|
-
return e3.preventDefault(), e3.stopPropagation(), 1 ===
|
|
929
|
+
case gt.ArrowDown:
|
|
930
|
+
return e3.preventDefault(), e3.stopPropagation(), 1 === a2.comboboxState.value && a2.openCombobox(), void m(() => {
|
|
549
931
|
var e4;
|
|
550
|
-
return null == (e4 =
|
|
932
|
+
return null == (e4 = a2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
551
933
|
});
|
|
552
|
-
case
|
|
553
|
-
return e3.preventDefault(), e3.stopPropagation(), 1 ===
|
|
554
|
-
|
|
555
|
-
})), void
|
|
934
|
+
case gt.ArrowUp:
|
|
935
|
+
return e3.preventDefault(), e3.stopPropagation(), 1 === a2.comboboxState.value && (a2.openCombobox(), m(() => {
|
|
936
|
+
a2.value.value || a2.goToOption(mt.Last);
|
|
937
|
+
})), void m(() => {
|
|
556
938
|
var e4;
|
|
557
|
-
return null == (e4 =
|
|
939
|
+
return null == (e4 = a2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
558
940
|
});
|
|
559
|
-
case
|
|
560
|
-
if (0 !==
|
|
941
|
+
case gt.Escape:
|
|
942
|
+
if (0 !== a2.comboboxState.value)
|
|
561
943
|
return;
|
|
562
|
-
return e3.preventDefault(),
|
|
944
|
+
return e3.preventDefault(), a2.optionsRef.value && !a2.optionsPropsRef.value.static && e3.stopPropagation(), a2.closeCombobox(), void m(() => {
|
|
563
945
|
var e4;
|
|
564
|
-
return null == (e4 =
|
|
946
|
+
return null == (e4 = a2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
565
947
|
});
|
|
566
948
|
}
|
|
567
949
|
}
|
|
568
|
-
|
|
569
|
-
let i2 =
|
|
950
|
+
n2({ el: a2.buttonRef, $el: a2.buttonRef });
|
|
951
|
+
let i2 = Je(u(() => ({ as: e2.as, type: t2.type })), a2.buttonRef);
|
|
570
952
|
return () => {
|
|
571
|
-
var
|
|
572
|
-
let u2 = { open: 0 ===
|
|
573
|
-
return
|
|
953
|
+
var n3, s2;
|
|
954
|
+
let u2 = { open: 0 === a2.comboboxState.value, disabled: a2.disabled.value, value: a2.value.value }, { id: d2, ...c2 } = e2;
|
|
955
|
+
return tt({ ourProps: { ref: a2.buttonRef, id: d2, type: i2.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": null == (n3 = Ce(a2.optionsRef)) ? void 0 : n3.id, "aria-expanded": 0 === a2.comboboxState.value, "aria-labelledby": a2.labelRef.value ? [null == (s2 = Ce(a2.labelRef)) ? void 0 : s2.id, d2].join(" ") : void 0, disabled: true === a2.disabled.value || void 0, onKeydown: r2, onClick: o2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "ComboboxButton" });
|
|
574
956
|
};
|
|
575
|
-
} }),
|
|
576
|
-
let
|
|
577
|
-
function
|
|
578
|
-
|
|
579
|
-
let e3 =
|
|
580
|
-
e3 && (e3.scrollTop = 0),
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
let
|
|
957
|
+
} }), Pt = w({ 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: () => `headlessui-combobox-input-${Se()}` } }, emits: { change: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
958
|
+
let o2 = Mt("ComboboxInput"), r2 = u(() => De(Ce(o2.inputRef))), i2 = { value: false };
|
|
959
|
+
function d2() {
|
|
960
|
+
o2.change(null);
|
|
961
|
+
let e3 = Ce(o2.optionsRef);
|
|
962
|
+
e3 && (e3.scrollTop = 0), o2.goToOption(mt.Nothing);
|
|
963
|
+
}
|
|
964
|
+
a2({ el: o2.inputRef, $el: o2.inputRef });
|
|
965
|
+
let c2 = u(() => {
|
|
584
966
|
var t3;
|
|
585
|
-
let l3 =
|
|
586
|
-
return
|
|
967
|
+
let l3 = o2.value.value;
|
|
968
|
+
return Ce(o2.inputRef) ? void 0 !== e2.displayValue && void 0 !== l3 ? null != (t3 = e2.displayValue(l3)) ? t3 : "" : "string" == typeof l3 ? l3 : "" : "";
|
|
587
969
|
});
|
|
588
|
-
|
|
589
|
-
|
|
970
|
+
b(() => {
|
|
971
|
+
p([c2, o2.comboboxState, r2], ([e3, t3], [l3, n3]) => {
|
|
590
972
|
if (i2.value)
|
|
591
973
|
return;
|
|
592
|
-
let
|
|
593
|
-
|
|
974
|
+
let a3 = Ce(o2.inputRef);
|
|
975
|
+
a3 && ((0 === n3 && 1 === t3 || e3 !== l3) && (a3.value = e3), requestAnimationFrame(() => {
|
|
594
976
|
var e4;
|
|
595
|
-
if (i2.value || !
|
|
977
|
+
if (i2.value || !a3 || (null == (e4 = r2.value) ? void 0 : e4.activeElement) !== a3)
|
|
596
978
|
return;
|
|
597
|
-
let { selectionStart: t4, selectionEnd: l4 } =
|
|
598
|
-
0 === Math.abs((null != l4 ? l4 : 0) - (null != t4 ? t4 : 0)) && 0 === t4 &&
|
|
979
|
+
let { selectionStart: t4, selectionEnd: l4 } = a3;
|
|
980
|
+
0 === Math.abs((null != l4 ? l4 : 0) - (null != t4 ? t4 : 0)) && 0 === t4 && a3.setSelectionRange(a3.value.length, a3.value.length);
|
|
599
981
|
}));
|
|
600
|
-
}, { immediate: true }),
|
|
982
|
+
}, { immediate: true }), p([o2.comboboxState], ([e3], [t3]) => {
|
|
601
983
|
if (0 === e3 && 1 === t3) {
|
|
602
984
|
if (i2.value)
|
|
603
985
|
return;
|
|
604
|
-
let e4 =
|
|
986
|
+
let e4 = Ce(o2.inputRef);
|
|
605
987
|
if (!e4)
|
|
606
988
|
return;
|
|
607
|
-
let t4 = e4.value, { selectionStart: l3, selectionEnd:
|
|
608
|
-
e4.value = "", e4.value = t4, null !==
|
|
989
|
+
let t4 = e4.value, { selectionStart: l3, selectionEnd: n3, selectionDirection: a3 } = e4;
|
|
990
|
+
e4.value = "", e4.value = t4, null !== a3 ? e4.setSelectionRange(l3, n3, a3) : e4.setSelectionRange(l3, n3);
|
|
609
991
|
}
|
|
610
992
|
});
|
|
611
993
|
});
|
|
612
|
-
let
|
|
613
|
-
function
|
|
614
|
-
|
|
994
|
+
let g2 = s(false);
|
|
995
|
+
function f2() {
|
|
996
|
+
g2.value = true;
|
|
615
997
|
}
|
|
616
|
-
function
|
|
617
|
-
|
|
618
|
-
|
|
998
|
+
function v2() {
|
|
999
|
+
ht().nextFrame(() => {
|
|
1000
|
+
g2.value = false;
|
|
619
1001
|
});
|
|
620
1002
|
}
|
|
621
|
-
function
|
|
1003
|
+
function h2(e3) {
|
|
622
1004
|
switch (i2.value = true, e3.key) {
|
|
623
|
-
case
|
|
624
|
-
if (i2.value = false, 0 !==
|
|
1005
|
+
case gt.Enter:
|
|
1006
|
+
if (i2.value = false, 0 !== o2.comboboxState.value || g2.value)
|
|
625
1007
|
return;
|
|
626
|
-
if (e3.preventDefault(), e3.stopPropagation(), null ===
|
|
627
|
-
return void
|
|
628
|
-
|
|
1008
|
+
if (e3.preventDefault(), e3.stopPropagation(), null === o2.activeOptionIndex.value)
|
|
1009
|
+
return void o2.closeCombobox();
|
|
1010
|
+
o2.selectActiveOption(), 0 === o2.mode.value && o2.closeCombobox();
|
|
629
1011
|
break;
|
|
630
|
-
case
|
|
631
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
632
|
-
case
|
|
633
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
634
|
-
|
|
635
|
-
|
|
1012
|
+
case gt.ArrowDown:
|
|
1013
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), Oe(o2.comboboxState.value, { 0: () => o2.goToOption(mt.Next), 1: () => o2.openCombobox() });
|
|
1014
|
+
case gt.ArrowUp:
|
|
1015
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), Oe(o2.comboboxState.value, { 0: () => o2.goToOption(mt.Previous), 1: () => {
|
|
1016
|
+
o2.openCombobox(), m(() => {
|
|
1017
|
+
o2.value.value || o2.goToOption(mt.Last);
|
|
636
1018
|
});
|
|
637
1019
|
} });
|
|
638
|
-
case
|
|
1020
|
+
case gt.Home:
|
|
639
1021
|
if (e3.shiftKey)
|
|
640
1022
|
break;
|
|
641
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
642
|
-
case
|
|
643
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
644
|
-
case
|
|
1023
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), o2.goToOption(mt.First);
|
|
1024
|
+
case gt.PageUp:
|
|
1025
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), o2.goToOption(mt.First);
|
|
1026
|
+
case gt.End:
|
|
645
1027
|
if (e3.shiftKey)
|
|
646
1028
|
break;
|
|
647
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
648
|
-
case
|
|
649
|
-
return i2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
650
|
-
case
|
|
651
|
-
if (i2.value = false, 0 !==
|
|
1029
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), o2.goToOption(mt.Last);
|
|
1030
|
+
case gt.PageDown:
|
|
1031
|
+
return i2.value = false, e3.preventDefault(), e3.stopPropagation(), o2.goToOption(mt.Last);
|
|
1032
|
+
case gt.Escape:
|
|
1033
|
+
if (i2.value = false, 0 !== o2.comboboxState.value)
|
|
652
1034
|
return;
|
|
653
|
-
e3.preventDefault(),
|
|
1035
|
+
e3.preventDefault(), o2.optionsRef.value && !o2.optionsPropsRef.value.static && e3.stopPropagation(), o2.nullable.value && 0 === o2.mode.value && null === o2.value.value && d2(), o2.closeCombobox();
|
|
654
1036
|
break;
|
|
655
|
-
case
|
|
656
|
-
if (i2.value = false, 0 !==
|
|
1037
|
+
case gt.Tab:
|
|
1038
|
+
if (i2.value = false, 0 !== o2.comboboxState.value)
|
|
657
1039
|
return;
|
|
658
|
-
0 ===
|
|
1040
|
+
0 === o2.mode.value && 1 !== o2.activationTrigger.value && o2.selectActiveOption(), o2.closeCombobox();
|
|
659
1041
|
}
|
|
660
1042
|
}
|
|
661
|
-
function
|
|
662
|
-
t2("change", e3),
|
|
1043
|
+
function y2(e3) {
|
|
1044
|
+
t2("change", e3), o2.nullable.value && 0 === o2.mode.value && "" === e3.target.value && d2(), o2.openCombobox();
|
|
663
1045
|
}
|
|
664
|
-
function
|
|
665
|
-
|
|
1046
|
+
function x2(e3) {
|
|
1047
|
+
var t3, l3, n3;
|
|
1048
|
+
let a3 = null != (t3 = e3.relatedTarget) ? t3 : ft.find((t4) => t4 !== e3.currentTarget);
|
|
1049
|
+
if (i2.value = false, !(null != (l3 = Ce(o2.optionsRef)) && l3.contains(a3) || null != (n3 = Ce(o2.buttonRef)) && n3.contains(a3) || 0 !== o2.comboboxState.value))
|
|
1050
|
+
return e3.preventDefault(), 0 === o2.mode.value && (o2.nullable.value && null === o2.value.value ? d2() : 1 !== o2.activationTrigger.value && o2.selectActiveOption()), o2.closeCombobox();
|
|
666
1051
|
}
|
|
667
|
-
|
|
668
|
-
var t3, l3,
|
|
669
|
-
|
|
1052
|
+
function w2(e3) {
|
|
1053
|
+
var t3, l3, n3;
|
|
1054
|
+
let a3 = null != (t3 = e3.relatedTarget) ? t3 : ft.find((t4) => t4 !== e3.currentTarget);
|
|
1055
|
+
null != (l3 = Ce(o2.buttonRef)) && l3.contains(a3) || null != (n3 = Ce(o2.optionsRef)) && n3.contains(a3) || o2.disabled.value || o2.immediate.value && 0 !== o2.comboboxState.value && (o2.openCombobox(), ht().nextFrame(() => {
|
|
1056
|
+
o2.setActivationTrigger(1);
|
|
1057
|
+
}));
|
|
1058
|
+
}
|
|
1059
|
+
let k2 = u(() => {
|
|
1060
|
+
var t3, l3, n3, a3;
|
|
1061
|
+
return null != (a3 = null != (n3 = null != (l3 = e2.defaultValue) ? l3 : void 0 !== o2.defaultValue.value ? null == (t3 = e2.displayValue) ? void 0 : t3.call(e2, o2.defaultValue.value) : null) ? n3 : o2.defaultValue.value) ? a3 : "";
|
|
670
1062
|
});
|
|
671
1063
|
return () => {
|
|
672
|
-
var t3,
|
|
673
|
-
let
|
|
674
|
-
return
|
|
1064
|
+
var t3, a3, r3, i3, s2, u2, d3;
|
|
1065
|
+
let c3 = { open: 0 === o2.comboboxState.value }, { id: p2, displayValue: g3, onChange: m2, ...b2 } = e2, S2 = { "aria-controls": null == (t3 = o2.optionsRef.value) ? void 0 : t3.id, "aria-expanded": 0 === o2.comboboxState.value, "aria-activedescendant": null === o2.activeOptionIndex.value ? void 0 : o2.virtual.value ? null == (a3 = o2.options.value.find((e3) => !o2.virtual.value.disabled(e3.dataRef.value) && o2.compare(e3.dataRef.value, o2.virtual.value.options[o2.activeOptionIndex.value]))) ? void 0 : a3.id : null == (r3 = o2.options.value[o2.activeOptionIndex.value]) ? void 0 : r3.id, "aria-labelledby": null != (u2 = null == (i3 = Ce(o2.labelRef)) ? void 0 : i3.id) ? u2 : null == (s2 = Ce(o2.buttonRef)) ? void 0 : s2.id, "aria-autocomplete": "list", id: p2, onCompositionstart: f2, onCompositionend: v2, onKeydown: h2, onInput: y2, onFocus: w2, onBlur: x2, role: "combobox", type: null != (d3 = l2.type) ? d3 : "text", tabIndex: 0, ref: o2.inputRef, defaultValue: k2.value, disabled: true === o2.disabled.value || void 0 };
|
|
1066
|
+
return tt({ ourProps: S2, theirProps: b2, slot: c3, attrs: l2, slots: n2, features: Qe.RenderStrategy | Qe.Static, name: "ComboboxInput" });
|
|
675
1067
|
};
|
|
676
|
-
} }),
|
|
677
|
-
let
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}),
|
|
681
|
-
|
|
1068
|
+
} }), jt = w({ 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 }) {
|
|
1069
|
+
let a2 = Mt("ComboboxOptions"), o2 = `headlessui-combobox-options-${Se()}`;
|
|
1070
|
+
n2({ el: a2.optionsRef, $el: a2.optionsRef }), v(() => {
|
|
1071
|
+
a2.optionsPropsRef.value.static = e2.static;
|
|
1072
|
+
}), v(() => {
|
|
1073
|
+
a2.optionsPropsRef.value.hold = e2.hold;
|
|
682
1074
|
});
|
|
683
|
-
let
|
|
684
|
-
return
|
|
1075
|
+
let r2 = ct(), i2 = u(() => null !== r2 ? (r2.value & dt.Open) === dt.Open : 0 === a2.comboboxState.value);
|
|
1076
|
+
return Xe({ container: u(() => Ce(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) {
|
|
685
1077
|
e3.setAttribute("role", "none");
|
|
686
1078
|
} }), () => {
|
|
687
|
-
var
|
|
688
|
-
let u2 = { open: 0 ===
|
|
689
|
-
return
|
|
1079
|
+
var n3, r3, s2;
|
|
1080
|
+
let u2 = { open: 0 === a2.comboboxState.value };
|
|
1081
|
+
return tt({ ourProps: { "aria-labelledby": null != (s2 = null == (n3 = Ce(a2.labelRef)) ? void 0 : n3.id) ? s2 : null == (r3 = Ce(a2.buttonRef)) ? void 0 : r3.id, id: o2, ref: a2.optionsRef, role: "listbox", "aria-multiselectable": 1 === a2.mode.value || void 0 }, theirProps: rt(e2, ["hold"]), slot: u2, attrs: t2, slots: a2.virtual.value && 0 === a2.comboboxState.value ? { ...l2, default: () => [y(Et, {}, l2.default)] } : l2, features: Qe.RenderStrategy | Qe.Static, visible: i2.value, name: "ComboboxOptions" });
|
|
690
1082
|
};
|
|
691
|
-
} }),
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
let i2 =
|
|
695
|
-
|
|
696
|
-
|
|
1083
|
+
} }), Rt = w({ 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 }) {
|
|
1084
|
+
let a2 = Mt("ComboboxOption"), o2 = `headlessui-combobox-option-${Se()}`, r2 = s(null);
|
|
1085
|
+
n2({ el: r2, $el: r2 });
|
|
1086
|
+
let i2 = u(() => {
|
|
1087
|
+
var t3;
|
|
1088
|
+
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;
|
|
1089
|
+
}), d2 = u(() => a2.isSelected(e2.value)), c2 = k(Tt, null), p2 = u(() => ({ disabled: e2.disabled, value: e2.value, domRef: r2, order: u(() => e2.order) }));
|
|
1090
|
+
function g2(t3) {
|
|
1091
|
+
var l3;
|
|
1092
|
+
if (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value))
|
|
697
1093
|
return t3.preventDefault();
|
|
698
|
-
|
|
1094
|
+
a2.selectOption(o2), Ye() || requestAnimationFrame(() => {
|
|
699
1095
|
var e3;
|
|
700
|
-
return null == (e3 =
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
function p2() {
|
|
704
|
-
if (e2.disabled)
|
|
705
|
-
return n2.goToOption(ye.Nothing);
|
|
706
|
-
n2.goToOption(ye.Specific, r2);
|
|
1096
|
+
return null == (e3 = Ce(a2.inputRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1097
|
+
}), 0 === a2.mode.value && requestAnimationFrame(() => a2.closeCombobox());
|
|
707
1098
|
}
|
|
708
|
-
|
|
709
|
-
|
|
1099
|
+
function f2() {
|
|
1100
|
+
var t3;
|
|
1101
|
+
if (e2.disabled || null != (t3 = a2.virtual.value) && t3.disabled(e2.value))
|
|
1102
|
+
return a2.goToOption(mt.Nothing);
|
|
1103
|
+
let l3 = a2.calculateIndex(e2.value);
|
|
1104
|
+
a2.goToOption(mt.Specific, l3);
|
|
1105
|
+
}
|
|
1106
|
+
b(() => a2.registerOption(o2, p2)), O(() => a2.unregisterOption(o2, i2.value)), v(() => {
|
|
1107
|
+
let e3 = Ce(r2);
|
|
1108
|
+
e3 && (null == c2 || c2.value.measureElement(e3));
|
|
1109
|
+
}), v(() => {
|
|
1110
|
+
0 === a2.comboboxState.value && i2.value && (a2.virtual.value || 0 !== a2.activationTrigger.value && m(() => {
|
|
710
1111
|
var e3, t3;
|
|
711
|
-
return null == (t3 = null == (e3 =
|
|
712
|
-
});
|
|
1112
|
+
return null == (t3 = null == (e3 = Ce(r2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1113
|
+
}));
|
|
713
1114
|
});
|
|
714
|
-
let
|
|
715
|
-
function
|
|
716
|
-
|
|
1115
|
+
let h2 = Ze();
|
|
1116
|
+
function y2(e3) {
|
|
1117
|
+
h2.update(e3);
|
|
717
1118
|
}
|
|
718
1119
|
function x2(t3) {
|
|
719
|
-
|
|
1120
|
+
var l3;
|
|
1121
|
+
if (!h2.wasMoved(t3) || e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value)
|
|
1122
|
+
return;
|
|
1123
|
+
let n3 = a2.calculateIndex(e2.value);
|
|
1124
|
+
a2.goToOption(mt.Specific, n3, 0);
|
|
720
1125
|
}
|
|
721
|
-
function
|
|
722
|
-
|
|
1126
|
+
function w2(t3) {
|
|
1127
|
+
var l3;
|
|
1128
|
+
h2.wasMoved(t3) && (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value && (a2.optionsPropsRef.value.hold || a2.goToOption(mt.Nothing)));
|
|
723
1129
|
}
|
|
724
1130
|
return () => {
|
|
725
|
-
let { disabled:
|
|
726
|
-
return
|
|
1131
|
+
let { disabled: n3 } = e2, a3 = { active: i2.value, selected: d2.value, disabled: n3 };
|
|
1132
|
+
return tt({ 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: f2, onPointerenter: y2, onMouseenter: y2, onPointermove: x2, onMousemove: x2, onPointerleave: w2, onMouseleave: w2 }, theirProps: rt(e2, ["order", "value"]), slot: a3, attrs: l2, slots: t2, name: "ComboboxOption" });
|
|
727
1133
|
};
|
|
728
1134
|
} });
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
(e2 = null != e2 ? e2 : window).addEventListener(t2, l2, a2), n2(() => e2.removeEventListener(t2, l2, a2));
|
|
1135
|
+
function Bt(e2, t2, l2, n2) {
|
|
1136
|
+
Ee.isServer || v((a2) => {
|
|
1137
|
+
(e2 = null != e2 ? e2 : window).addEventListener(t2, l2, n2), a2(() => e2.removeEventListener(t2, l2, n2));
|
|
733
1138
|
});
|
|
734
1139
|
}
|
|
735
|
-
|
|
1140
|
+
var Lt = ((e2) => (e2[e2.Forwards = 0] = "Forwards", e2[e2.Backwards = 1] = "Backwards", e2))(Lt || {});
|
|
1141
|
+
function At(e2) {
|
|
736
1142
|
if (!e2)
|
|
737
1143
|
return /* @__PURE__ */ new Set();
|
|
738
1144
|
if ("function" == typeof e2)
|
|
739
1145
|
return new Set(e2());
|
|
740
1146
|
let t2 = /* @__PURE__ */ new Set();
|
|
741
1147
|
for (let l2 of e2.value) {
|
|
742
|
-
let e3 =
|
|
1148
|
+
let e3 = Ce(l2);
|
|
743
1149
|
e3 instanceof HTMLElement && t2.add(e3);
|
|
744
1150
|
}
|
|
745
1151
|
return t2;
|
|
746
1152
|
}
|
|
747
|
-
var
|
|
748
|
-
let
|
|
749
|
-
let
|
|
750
|
-
|
|
751
|
-
let
|
|
752
|
-
|
|
1153
|
+
var Ft = ((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))(Ft || {});
|
|
1154
|
+
let Nt = Object.assign(w({ 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 }) {
|
|
1155
|
+
let a2 = s(null);
|
|
1156
|
+
n2({ el: a2, $el: a2 });
|
|
1157
|
+
let o2 = u(() => De(a2)), r2 = s(false);
|
|
1158
|
+
b(() => r2.value = true), O(() => r2.value = false), function({ ownerDocument: e3 }, t3) {
|
|
753
1159
|
let l3 = function(e4) {
|
|
754
|
-
let t4 = s(
|
|
755
|
-
return
|
|
756
|
-
true === l4 && false === e5 ?
|
|
1160
|
+
let t4 = s(ft.slice());
|
|
1161
|
+
return p([e4], ([e5], [l4]) => {
|
|
1162
|
+
true === l4 && false === e5 ? bt(() => {
|
|
757
1163
|
t4.value.splice(0);
|
|
758
|
-
}) : false === l4 && true === e5 && (t4.value =
|
|
1164
|
+
}) : false === l4 && true === e5 && (t4.value = ft.slice());
|
|
759
1165
|
}, { flush: "post" }), () => {
|
|
760
1166
|
var e5;
|
|
761
1167
|
return null != (e5 = t4.value.find((e6) => null != e6 && e6.isConnected)) ? e5 : null;
|
|
762
1168
|
};
|
|
763
1169
|
}(t3);
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
var
|
|
767
|
-
t3.value || (null == (
|
|
1170
|
+
b(() => {
|
|
1171
|
+
v(() => {
|
|
1172
|
+
var n3, a3;
|
|
1173
|
+
t3.value || (null == (n3 = e3.value) ? void 0 : n3.activeElement) === (null == (a3 = e3.value) ? void 0 : a3.body) && Ne(l3());
|
|
768
1174
|
}, { flush: "post" });
|
|
769
|
-
}),
|
|
770
|
-
t3.value &&
|
|
1175
|
+
}), O(() => {
|
|
1176
|
+
t3.value && Ne(l3());
|
|
771
1177
|
});
|
|
772
|
-
}({ ownerDocument:
|
|
773
|
-
let i2 = function({ ownerDocument: e3, container: t3, initialFocus: l3 },
|
|
774
|
-
let
|
|
775
|
-
return
|
|
776
|
-
|
|
777
|
-
if (
|
|
1178
|
+
}({ ownerDocument: o2 }, u(() => r2.value && Boolean(16 & e2.features)));
|
|
1179
|
+
let i2 = function({ ownerDocument: e3, container: t3, initialFocus: l3 }, n3) {
|
|
1180
|
+
let a3 = s(null), o3 = s(false);
|
|
1181
|
+
return b(() => o3.value = true), O(() => o3.value = false), b(() => {
|
|
1182
|
+
p([t3, l3, n3], (r3, i3) => {
|
|
1183
|
+
if (r3.every((e4, t4) => (null == i3 ? void 0 : i3[t4]) === e4) || !n3.value)
|
|
778
1184
|
return;
|
|
779
|
-
let s2 =
|
|
780
|
-
s2 &&
|
|
781
|
-
var t4,
|
|
782
|
-
if (!
|
|
1185
|
+
let s2 = Ce(t3);
|
|
1186
|
+
s2 && bt(() => {
|
|
1187
|
+
var t4, n4;
|
|
1188
|
+
if (!o3.value)
|
|
783
1189
|
return;
|
|
784
|
-
let
|
|
785
|
-
if (
|
|
786
|
-
if (
|
|
787
|
-
return void (
|
|
1190
|
+
let r4 = Ce(l3), i4 = null == (t4 = e3.value) ? void 0 : t4.activeElement;
|
|
1191
|
+
if (r4) {
|
|
1192
|
+
if (r4 === i4)
|
|
1193
|
+
return void (a3.value = i4);
|
|
788
1194
|
} else if (s2.contains(i4))
|
|
789
|
-
return void (
|
|
790
|
-
|
|
1195
|
+
return void (a3.value = i4);
|
|
1196
|
+
r4 ? Ne(r4) : He(s2, Ie.First | Ie.NoScroll) === Pe.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), a3.value = null == (n4 = e3.value) ? void 0 : n4.activeElement;
|
|
791
1197
|
});
|
|
792
1198
|
}, { immediate: true, flush: "post" });
|
|
793
|
-
}),
|
|
794
|
-
}({ ownerDocument:
|
|
795
|
-
!function({ ownerDocument: e3, container: t3, containers: l3, previousActiveElement:
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
if (!
|
|
1199
|
+
}), a3;
|
|
1200
|
+
}({ ownerDocument: o2, container: a2, initialFocus: u(() => e2.initialFocus) }, u(() => r2.value && Boolean(2 & e2.features)));
|
|
1201
|
+
!function({ ownerDocument: e3, container: t3, containers: l3, previousActiveElement: n3 }, a3) {
|
|
1202
|
+
var o3;
|
|
1203
|
+
Bt(null == (o3 = e3.value) ? void 0 : o3.defaultView, "focus", (e4) => {
|
|
1204
|
+
if (!a3.value)
|
|
799
1205
|
return;
|
|
800
|
-
let
|
|
801
|
-
|
|
802
|
-
let
|
|
803
|
-
if (!
|
|
1206
|
+
let o4 = At(l3);
|
|
1207
|
+
Ce(t3) instanceof HTMLElement && o4.add(Ce(t3));
|
|
1208
|
+
let r3 = n3.value;
|
|
1209
|
+
if (!r3)
|
|
804
1210
|
return;
|
|
805
1211
|
let i3 = e4.target;
|
|
806
|
-
i3 && i3 instanceof HTMLElement ?
|
|
1212
|
+
i3 && i3 instanceof HTMLElement ? zt(o4, i3) ? (n3.value = i3, Ne(i3)) : (e4.preventDefault(), e4.stopPropagation(), Ne(r3)) : Ne(n3.value);
|
|
807
1213
|
}, true);
|
|
808
|
-
}({ ownerDocument:
|
|
809
|
-
let
|
|
1214
|
+
}({ ownerDocument: o2, container: a2, containers: e2.containers, previousActiveElement: i2 }, u(() => r2.value && Boolean(8 & e2.features)));
|
|
1215
|
+
let d2 = function() {
|
|
810
1216
|
let e3 = s(0);
|
|
811
1217
|
return qe("keydown", (t3) => {
|
|
812
1218
|
"Tab" === t3.key && (e3.value = t3.shiftKey ? 1 : 0);
|
|
813
1219
|
}), e3;
|
|
814
1220
|
}();
|
|
815
|
-
function
|
|
816
|
-
let t3 =
|
|
817
|
-
t3 &&
|
|
818
|
-
|
|
819
|
-
}, [
|
|
820
|
-
|
|
1221
|
+
function c2(e3) {
|
|
1222
|
+
let t3 = Ce(a2);
|
|
1223
|
+
t3 && Oe(d2.value, { [Lt.Forwards]: () => {
|
|
1224
|
+
He(t3, Ie.First, { skipElements: [e3.relatedTarget] });
|
|
1225
|
+
}, [Lt.Backwards]: () => {
|
|
1226
|
+
He(t3, Ie.Last, { skipElements: [e3.relatedTarget] });
|
|
821
1227
|
} });
|
|
822
1228
|
}
|
|
823
1229
|
let g2 = s(false);
|
|
824
|
-
function
|
|
1230
|
+
function f2(e3) {
|
|
825
1231
|
"Tab" === e3.key && (g2.value = true, requestAnimationFrame(() => {
|
|
826
1232
|
g2.value = false;
|
|
827
1233
|
}));
|
|
828
1234
|
}
|
|
829
|
-
function
|
|
830
|
-
if (!
|
|
1235
|
+
function m2(t3) {
|
|
1236
|
+
if (!r2.value)
|
|
831
1237
|
return;
|
|
832
|
-
let l3 =
|
|
833
|
-
|
|
834
|
-
let
|
|
835
|
-
|
|
1238
|
+
let l3 = At(e2.containers);
|
|
1239
|
+
Ce(a2) instanceof HTMLElement && l3.add(Ce(a2));
|
|
1240
|
+
let n3 = t3.relatedTarget;
|
|
1241
|
+
n3 instanceof HTMLElement && "true" !== n3.dataset.headlessuiFocusGuard && (zt(l3, n3) || (g2.value ? He(Ce(a2), Oe(d2.value, { [Lt.Forwards]: () => Ie.Next, [Lt.Backwards]: () => Ie.Previous }) | Ie.WrapAround, { relativeTo: t3.target }) : t3.target instanceof HTMLElement && Ne(t3.target)));
|
|
836
1242
|
}
|
|
837
1243
|
return () => {
|
|
838
|
-
let
|
|
839
|
-
return
|
|
1244
|
+
let n3 = { ref: a2, onKeydown: f2, onFocusout: m2 }, { features: o3, initialFocus: r3, containers: i3, ...s2 } = e2;
|
|
1245
|
+
return y(x, [Boolean(4 & o3) && y(st, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: it.Focusable }), tt({ ourProps: n3, theirProps: { ...t2, ...s2 }, slot: {}, attrs: t2, slots: l2, name: "FocusTrap" }), Boolean(4 & o3) && y(st, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: it.Focusable })]);
|
|
840
1246
|
};
|
|
841
|
-
} }), { features:
|
|
842
|
-
function
|
|
1247
|
+
} }), { features: Ft });
|
|
1248
|
+
function zt(e2, t2) {
|
|
843
1249
|
for (let l2 of e2)
|
|
844
1250
|
if (l2.contains(t2))
|
|
845
1251
|
return true;
|
|
846
1252
|
return false;
|
|
847
1253
|
}
|
|
848
|
-
|
|
849
|
-
function t2() {
|
|
850
|
-
"loading" !== document.readyState && (e2(), document.removeEventListener("DOMContentLoaded", t2));
|
|
851
|
-
}
|
|
852
|
-
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("DOMContentLoaded", t2), t2());
|
|
853
|
-
}(() => {
|
|
854
|
-
function e2(e3) {
|
|
855
|
-
e3.target instanceof HTMLElement && e3.target !== document.body && kt[0] !== e3.target && (kt.unshift(e3.target), kt = kt.filter((e4) => null != e4 && e4.isConnected), kt.splice(10));
|
|
856
|
-
}
|
|
857
|
-
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 });
|
|
858
|
-
});
|
|
859
|
-
let Ct = /* @__PURE__ */ new Map(), Ot = /* @__PURE__ */ new Map();
|
|
860
|
-
function Dt(e2, t2 = s(true)) {
|
|
861
|
-
f((l2) => {
|
|
862
|
-
var a2;
|
|
863
|
-
if (!t2.value)
|
|
864
|
-
return;
|
|
865
|
-
let n2 = he(e2);
|
|
866
|
-
if (!n2)
|
|
867
|
-
return;
|
|
868
|
-
l2(function() {
|
|
869
|
-
var e3;
|
|
870
|
-
if (!n2)
|
|
871
|
-
return;
|
|
872
|
-
let t3 = null != (e3 = Ot.get(n2)) ? e3 : 1;
|
|
873
|
-
if (1 === t3 ? Ot.delete(n2) : Ot.set(n2, t3 - 1), 1 !== t3)
|
|
874
|
-
return;
|
|
875
|
-
let l3 = Ct.get(n2);
|
|
876
|
-
l3 && (null === l3["aria-hidden"] ? n2.removeAttribute("aria-hidden") : n2.setAttribute("aria-hidden", l3["aria-hidden"]), n2.inert = l3.inert, Ct.delete(n2));
|
|
877
|
-
});
|
|
878
|
-
let r2 = null != (a2 = Ot.get(n2)) ? a2 : 0;
|
|
879
|
-
Ot.set(n2, r2 + 1), 0 === r2 && (Ct.set(n2, { "aria-hidden": n2.getAttribute("aria-hidden"), inert: n2.inert }), n2.setAttribute("aria-hidden", "true"), n2.inert = true);
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
let Mt = Symbol("ForcePortalRootContext");
|
|
883
|
-
function Pt() {
|
|
884
|
-
return p(Mt, false);
|
|
885
|
-
}
|
|
886
|
-
let _t = b({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup: (e2, { slots: t2, attrs: l2 }) => (g(Mt, e2.force), () => {
|
|
887
|
-
let { force: a2, ...n2 } = e2;
|
|
888
|
-
return se({ theirProps: n2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "ForcePortalRoot" });
|
|
889
|
-
}) });
|
|
890
|
-
let Tt = b({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
891
|
-
let a2 = s(null), n2 = y(() => _e(a2)), r2 = Pt(), o2 = p(Et, null), i2 = s(true === r2 || null == o2 ? function(e3) {
|
|
892
|
-
let t3 = _e(e3);
|
|
893
|
-
if (!t3) {
|
|
894
|
-
if (null === e3)
|
|
895
|
-
return null;
|
|
896
|
-
throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e3}`);
|
|
897
|
-
}
|
|
898
|
-
let l3 = t3.getElementById("headlessui-portal-root");
|
|
899
|
-
if (l3)
|
|
900
|
-
return l3;
|
|
901
|
-
let a3 = t3.createElement("div");
|
|
902
|
-
return a3.setAttribute("id", "headlessui-portal-root"), t3.body.appendChild(a3);
|
|
903
|
-
}(a2.value) : o2.resolveTarget());
|
|
904
|
-
f(() => {
|
|
905
|
-
r2 || null != o2 && (i2.value = o2.resolveTarget());
|
|
906
|
-
});
|
|
907
|
-
let u2 = p(jt, null);
|
|
908
|
-
return m(() => {
|
|
909
|
-
let e3 = he(a2);
|
|
910
|
-
e3 && u2 && w(u2.register(e3));
|
|
911
|
-
}), w(() => {
|
|
912
|
-
var e3, t3;
|
|
913
|
-
let l3 = null == (e3 = n2.value) ? void 0 : e3.getElementById("headlessui-portal-root");
|
|
914
|
-
l3 && i2.value === l3 && i2.value.children.length <= 0 && (null == (t3 = i2.value.parentElement) || t3.removeChild(i2.value));
|
|
915
|
-
}), () => {
|
|
916
|
-
if (null === i2.value)
|
|
917
|
-
return null;
|
|
918
|
-
let n3 = { ref: a2, "data-headlessui-portal": "" };
|
|
919
|
-
return d(k, { to: i2.value }, se({ ourProps: n3, theirProps: e2, slot: {}, attrs: l2, slots: t2, name: "Portal" }));
|
|
920
|
-
};
|
|
921
|
-
} }), jt = Symbol("PortalParentContext");
|
|
922
|
-
let Et = Symbol("PortalGroupContext"), Lt = b({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
923
|
-
let a2 = S({ resolveTarget: () => e2.target });
|
|
924
|
-
return g(Et, a2), () => {
|
|
925
|
-
let { target: a3, ...n2 } = e2;
|
|
926
|
-
return se({ theirProps: n2, ourProps: {}, slot: {}, attrs: t2, slots: l2, name: "PortalGroup" });
|
|
927
|
-
};
|
|
928
|
-
} }), Bt = Symbol("StackContext");
|
|
929
|
-
var It = ((e2) => (e2[e2.Add = 0] = "Add", e2[e2.Remove = 1] = "Remove", e2))(It || {});
|
|
930
|
-
function Rt({ type: e2, enabled: t2, element: l2, onUpdate: a2 }) {
|
|
931
|
-
let n2 = p(Bt, () => {
|
|
932
|
-
});
|
|
933
|
-
function r2(...e3) {
|
|
934
|
-
null == a2 || a2(...e3), n2(...e3);
|
|
935
|
-
}
|
|
936
|
-
m(() => {
|
|
937
|
-
x(t2, (t3, a3) => {
|
|
938
|
-
t3 ? r2(0, e2, l2) : true === a3 && r2(1, e2, l2);
|
|
939
|
-
}, { immediate: true, flush: "sync" });
|
|
940
|
-
}), w(() => {
|
|
941
|
-
t2.value && r2(1, e2, l2);
|
|
942
|
-
}), g(Bt, r2);
|
|
943
|
-
}
|
|
944
|
-
let At = Symbol("DescriptionContext");
|
|
945
|
-
function Ft({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {}) {
|
|
946
|
-
let a2 = s([]);
|
|
947
|
-
return g(At, { register: function(e3) {
|
|
948
|
-
return a2.value.push(e3), () => {
|
|
949
|
-
let t3 = a2.value.indexOf(e3);
|
|
950
|
-
-1 !== t3 && a2.value.splice(t3, 1);
|
|
951
|
-
};
|
|
952
|
-
}, slot: e2, name: t2, props: l2 }), y(() => a2.value.length > 0 ? a2.value.join(" ") : void 0);
|
|
953
|
-
}
|
|
954
|
-
function Nt() {
|
|
1254
|
+
function $t() {
|
|
955
1255
|
let e2;
|
|
956
1256
|
return { before({ doc: t2 }) {
|
|
957
1257
|
var l2;
|
|
958
|
-
let
|
|
959
|
-
e2 = (null != (l2 = t2.defaultView) ? l2 : window).innerWidth -
|
|
1258
|
+
let n2 = t2.documentElement;
|
|
1259
|
+
e2 = (null != (l2 = t2.defaultView) ? l2 : window).innerWidth - n2.clientWidth;
|
|
960
1260
|
}, after({ doc: t2, d: l2 }) {
|
|
961
|
-
let
|
|
962
|
-
l2.style(
|
|
963
|
-
} };
|
|
964
|
-
}
|
|
965
|
-
function $t() {
|
|
966
|
-
if (!tt())
|
|
967
|
-
return {};
|
|
968
|
-
let e2;
|
|
969
|
-
return { before() {
|
|
970
|
-
e2 = window.pageYOffset;
|
|
971
|
-
}, after({ doc: t2, d: l2, meta: a2 }) {
|
|
972
|
-
function n2(e3) {
|
|
973
|
-
return a2.containers.flatMap((e4) => e4()).some((t3) => t3.contains(e3));
|
|
974
|
-
}
|
|
975
|
-
if ("auto" !== window.getComputedStyle(t2.documentElement).scrollBehavior) {
|
|
976
|
-
let e3 = nt();
|
|
977
|
-
e3.style(t2.documentElement, "scroll-behavior", "auto"), l2.add(() => l2.microTask(() => e3.dispose()));
|
|
978
|
-
}
|
|
979
|
-
l2.style(t2.body, "marginTop", `-${e2}px`), window.scrollTo(0, 0);
|
|
980
|
-
let r2 = null;
|
|
981
|
-
l2.addEventListener(t2, "click", (e3) => {
|
|
982
|
-
if (e3.target instanceof HTMLElement)
|
|
983
|
-
try {
|
|
984
|
-
let l3 = e3.target.closest("a");
|
|
985
|
-
if (!l3)
|
|
986
|
-
return;
|
|
987
|
-
let { hash: a3 } = new URL(l3.href), o2 = t2.querySelector(a3);
|
|
988
|
-
o2 && !n2(o2) && (r2 = o2);
|
|
989
|
-
} catch {
|
|
990
|
-
}
|
|
991
|
-
}, true), l2.addEventListener(t2, "touchmove", (e3) => {
|
|
992
|
-
e3.target instanceof HTMLElement && !n2(e3.target) && e3.preventDefault();
|
|
993
|
-
}, { passive: false }), l2.add(() => {
|
|
994
|
-
window.scrollTo(0, window.pageYOffset + e2), r2 && r2.isConnected && (r2.scrollIntoView({ block: "nearest" }), r2 = null);
|
|
995
|
-
});
|
|
1261
|
+
let n2 = t2.documentElement, a2 = n2.clientWidth - n2.offsetWidth, o2 = e2 - a2;
|
|
1262
|
+
l2.style(n2, "paddingRight", `${o2}px`);
|
|
996
1263
|
} };
|
|
997
1264
|
}
|
|
998
1265
|
function Ht(e2) {
|
|
@@ -1001,309 +1268,453 @@ function Ht(e2) {
|
|
|
1001
1268
|
Object.assign(t2, l2(t2));
|
|
1002
1269
|
return t2;
|
|
1003
1270
|
}
|
|
1004
|
-
|
|
1005
|
-
let
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
return e3;
|
|
1010
|
-
}();
|
|
1011
|
-
return m(() => w(a2.register(e2.id))), () => {
|
|
1012
|
-
let { name: n2 = "Description", slot: r2 = s({}), props: o2 = {} } = a2, { id: i2, ...u2 } = e2, d2 = { ...Object.entries(o2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: C(l3) }), {}), id: i2 };
|
|
1013
|
-
return se({ ourProps: d2, theirProps: u2, slot: r2.value, attrs: t2, slots: l2, name: n2 });
|
|
1014
|
-
};
|
|
1015
|
-
} });
|
|
1016
|
-
let Yt = function(e2, t2) {
|
|
1017
|
-
let l2 = e2(), a2 = /* @__PURE__ */ new Set();
|
|
1018
|
-
return { getSnapshot: () => l2, subscribe: (e3) => (a2.add(e3), () => a2.delete(e3)), dispatch(e3, ...n2) {
|
|
1019
|
-
let r2 = t2[e3].call(l2, ...n2);
|
|
1020
|
-
r2 && (l2 = r2, a2.forEach((e4) => e4()));
|
|
1271
|
+
let Vt = function(e2, t2) {
|
|
1272
|
+
let l2 = e2(), n2 = /* @__PURE__ */ new Set();
|
|
1273
|
+
return { getSnapshot: () => l2, subscribe: (e3) => (n2.add(e3), () => n2.delete(e3)), dispatch(e3, ...a2) {
|
|
1274
|
+
let o2 = t2[e3].call(l2, ...a2);
|
|
1275
|
+
o2 && (l2 = o2, n2.forEach((e4) => e4()));
|
|
1021
1276
|
} };
|
|
1022
1277
|
}(() => /* @__PURE__ */ new Map(), { PUSH(e2, t2) {
|
|
1023
1278
|
var l2;
|
|
1024
|
-
let
|
|
1025
|
-
return
|
|
1279
|
+
let n2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d: ht(), meta: /* @__PURE__ */ new Set() };
|
|
1280
|
+
return n2.count++, n2.meta.add(t2), this.set(e2, n2), this;
|
|
1026
1281
|
}, POP(e2, t2) {
|
|
1027
1282
|
let l2 = this.get(e2);
|
|
1028
1283
|
return l2 && (l2.count--, l2.meta.delete(t2)), this;
|
|
1029
1284
|
}, SCROLL_PREVENT({ doc: e2, d: t2, meta: l2 }) {
|
|
1030
|
-
let
|
|
1285
|
+
let n2 = { doc: e2, d: t2, meta: Ht(l2) }, a2 = [Ve() ? { before({ doc: e3, d: t3, meta: l3 }) {
|
|
1286
|
+
function n3(e4) {
|
|
1287
|
+
return l3.containers.flatMap((e5) => e5()).some((t4) => t4.contains(e4));
|
|
1288
|
+
}
|
|
1289
|
+
t3.microTask(() => {
|
|
1290
|
+
var l4;
|
|
1291
|
+
if ("auto" !== window.getComputedStyle(e3.documentElement).scrollBehavior) {
|
|
1292
|
+
let l5 = ht();
|
|
1293
|
+
l5.style(e3.documentElement, "scrollBehavior", "auto"), t3.add(() => t3.microTask(() => l5.dispose()));
|
|
1294
|
+
}
|
|
1295
|
+
let a3 = null != (l4 = window.scrollY) ? l4 : window.pageYOffset, o2 = null;
|
|
1296
|
+
t3.addEventListener(e3, "click", (t4) => {
|
|
1297
|
+
if (t4.target instanceof HTMLElement)
|
|
1298
|
+
try {
|
|
1299
|
+
let l5 = t4.target.closest("a");
|
|
1300
|
+
if (!l5)
|
|
1301
|
+
return;
|
|
1302
|
+
let { hash: a4 } = new URL(l5.href), r2 = e3.querySelector(a4);
|
|
1303
|
+
r2 && !n3(r2) && (o2 = r2);
|
|
1304
|
+
} catch {
|
|
1305
|
+
}
|
|
1306
|
+
}, true), t3.addEventListener(e3, "touchstart", (e4) => {
|
|
1307
|
+
if (e4.target instanceof HTMLElement)
|
|
1308
|
+
if (n3(e4.target)) {
|
|
1309
|
+
let l5 = e4.target;
|
|
1310
|
+
for (; l5.parentElement && n3(l5.parentElement); )
|
|
1311
|
+
l5 = l5.parentElement;
|
|
1312
|
+
t3.style(l5, "overscrollBehavior", "contain");
|
|
1313
|
+
} else
|
|
1314
|
+
t3.style(e4.target, "touchAction", "none");
|
|
1315
|
+
}), t3.addEventListener(e3, "touchmove", (e4) => {
|
|
1316
|
+
if (e4.target instanceof HTMLElement)
|
|
1317
|
+
if (n3(e4.target)) {
|
|
1318
|
+
let t4 = e4.target;
|
|
1319
|
+
for (; t4.parentElement && "" !== t4.dataset.headlessuiPortal && !(t4.scrollHeight > t4.clientHeight || t4.scrollWidth > t4.clientWidth); )
|
|
1320
|
+
t4 = t4.parentElement;
|
|
1321
|
+
"" === t4.dataset.headlessuiPortal && e4.preventDefault();
|
|
1322
|
+
} else
|
|
1323
|
+
e4.preventDefault();
|
|
1324
|
+
}, { passive: false }), t3.add(() => {
|
|
1325
|
+
var e4;
|
|
1326
|
+
let t4 = null != (e4 = window.scrollY) ? e4 : window.pageYOffset;
|
|
1327
|
+
a3 !== t4 && window.scrollTo(0, a3), o2 && o2.isConnected && (o2.scrollIntoView({ block: "nearest" }), o2 = null);
|
|
1328
|
+
});
|
|
1329
|
+
});
|
|
1330
|
+
} } : {}, $t(), { before({ doc: e3, d: t3 }) {
|
|
1031
1331
|
t3.style(e3.documentElement, "overflow", "hidden");
|
|
1032
1332
|
} }];
|
|
1033
|
-
|
|
1333
|
+
a2.forEach(({ before: e3 }) => null == e3 ? void 0 : e3(n2)), a2.forEach(({ after: e3 }) => null == e3 ? void 0 : e3(n2));
|
|
1034
1334
|
}, SCROLL_ALLOW({ d: e2 }) {
|
|
1035
1335
|
e2.dispose();
|
|
1036
1336
|
}, TEARDOWN({ doc: e2 }) {
|
|
1037
1337
|
this.delete(e2);
|
|
1038
1338
|
} });
|
|
1039
|
-
function
|
|
1040
|
-
let
|
|
1041
|
-
let t3 =
|
|
1042
|
-
return
|
|
1339
|
+
function Yt(e2, t2, l2) {
|
|
1340
|
+
let n2 = function(e3) {
|
|
1341
|
+
let t3 = c(e3.getSnapshot());
|
|
1342
|
+
return O(e3.subscribe(() => {
|
|
1043
1343
|
t3.value = e3.getSnapshot();
|
|
1044
1344
|
})), t3;
|
|
1045
|
-
}(
|
|
1046
|
-
let t3 = e2.value ?
|
|
1345
|
+
}(Vt), a2 = u(() => {
|
|
1346
|
+
let t3 = e2.value ? n2.value.get(e2.value) : void 0;
|
|
1047
1347
|
return !!t3 && t3.count > 0;
|
|
1048
1348
|
});
|
|
1049
|
-
return
|
|
1349
|
+
return p([e2, t2], ([e3, t3], [n3], a3) => {
|
|
1050
1350
|
if (!e3 || !t3)
|
|
1051
1351
|
return;
|
|
1052
|
-
|
|
1053
|
-
let
|
|
1054
|
-
|
|
1055
|
-
|
|
1352
|
+
Vt.dispatch("PUSH", e3, l2);
|
|
1353
|
+
let o2 = false;
|
|
1354
|
+
a3(() => {
|
|
1355
|
+
o2 || (Vt.dispatch("POP", null != n3 ? n3 : e3, l2), o2 = true);
|
|
1056
1356
|
});
|
|
1057
|
-
}, { immediate: true }),
|
|
1357
|
+
}, { immediate: true }), a2;
|
|
1058
1358
|
}
|
|
1059
|
-
|
|
1060
|
-
let e2 =
|
|
1359
|
+
Vt.subscribe(() => {
|
|
1360
|
+
let e2 = Vt.getSnapshot(), t2 = /* @__PURE__ */ new Map();
|
|
1061
1361
|
for (let [l2] of e2)
|
|
1062
1362
|
t2.set(l2, l2.documentElement.style.overflow);
|
|
1063
1363
|
for (let l2 of e2.values()) {
|
|
1064
|
-
let e3 = "hidden" === t2.get(l2.doc),
|
|
1065
|
-
(
|
|
1364
|
+
let e3 = "hidden" === t2.get(l2.doc), n2 = 0 !== l2.count;
|
|
1365
|
+
(n2 && !e3 || !n2 && e3) && Vt.dispatch(l2.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", l2), 0 === l2.count && Vt.dispatch("TEARDOWN", l2);
|
|
1066
1366
|
}
|
|
1067
1367
|
});
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1368
|
+
let Ut = /* @__PURE__ */ new Map(), qt = /* @__PURE__ */ new Map();
|
|
1369
|
+
function Wt(e2, t2 = s(true)) {
|
|
1370
|
+
v((l2) => {
|
|
1371
|
+
var n2;
|
|
1372
|
+
if (!t2.value)
|
|
1373
|
+
return;
|
|
1374
|
+
let a2 = Ce(e2);
|
|
1375
|
+
if (!a2)
|
|
1376
|
+
return;
|
|
1377
|
+
l2(function() {
|
|
1378
|
+
var e3;
|
|
1379
|
+
if (!a2)
|
|
1380
|
+
return;
|
|
1381
|
+
let t3 = null != (e3 = qt.get(a2)) ? e3 : 1;
|
|
1382
|
+
if (1 === t3 ? qt.delete(a2) : qt.set(a2, t3 - 1), 1 !== t3)
|
|
1383
|
+
return;
|
|
1384
|
+
let l3 = Ut.get(a2);
|
|
1385
|
+
l3 && (null === l3["aria-hidden"] ? a2.removeAttribute("aria-hidden") : a2.setAttribute("aria-hidden", l3["aria-hidden"]), a2.inert = l3.inert, Ut.delete(a2));
|
|
1386
|
+
});
|
|
1387
|
+
let o2 = null != (n2 = qt.get(a2)) ? n2 : 0;
|
|
1388
|
+
qt.set(a2, o2 + 1), 0 === o2 && (Ut.set(a2, { "aria-hidden": a2.getAttribute("aria-hidden"), inert: a2.inert }), a2.setAttribute("aria-hidden", "true"), a2.inert = true);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
let Kt = Symbol("ForcePortalRootContext");
|
|
1392
|
+
function Jt() {
|
|
1393
|
+
return k(Kt, false);
|
|
1394
|
+
}
|
|
1395
|
+
let Gt = w({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup: (e2, { slots: t2, attrs: l2 }) => (S(Kt, e2.force), () => {
|
|
1396
|
+
let { force: n2, ...a2 } = e2;
|
|
1397
|
+
return tt({ theirProps: a2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "ForcePortalRoot" });
|
|
1398
|
+
}) }), Zt = Symbol("StackContext");
|
|
1399
|
+
var Xt = ((e2) => (e2[e2.Add = 0] = "Add", e2[e2.Remove = 1] = "Remove", e2))(Xt || {});
|
|
1400
|
+
function Qt({ type: e2, enabled: t2, element: l2, onUpdate: n2 }) {
|
|
1401
|
+
let a2 = k(Zt, () => {
|
|
1402
|
+
});
|
|
1403
|
+
function o2(...e3) {
|
|
1404
|
+
null == n2 || n2(...e3), a2(...e3);
|
|
1405
|
+
}
|
|
1406
|
+
b(() => {
|
|
1407
|
+
p(t2, (t3, n3) => {
|
|
1408
|
+
t3 ? o2(0, e2, l2) : true === n3 && o2(1, e2, l2);
|
|
1409
|
+
}, { immediate: true, flush: "sync" });
|
|
1410
|
+
}), O(() => {
|
|
1411
|
+
t2.value && o2(1, e2, l2);
|
|
1412
|
+
}), S(Zt, o2);
|
|
1413
|
+
}
|
|
1414
|
+
let el = Symbol("DescriptionContext");
|
|
1415
|
+
function tl({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {}) {
|
|
1416
|
+
let n2 = s([]);
|
|
1417
|
+
return S(el, { register: function(e3) {
|
|
1418
|
+
return n2.value.push(e3), () => {
|
|
1419
|
+
let t3 = n2.value.indexOf(e3);
|
|
1420
|
+
-1 !== t3 && n2.value.splice(t3, 1);
|
|
1421
|
+
};
|
|
1422
|
+
}, slot: e2, name: t2, props: l2 }), u(() => n2.value.length > 0 ? n2.value.join(" ") : void 0);
|
|
1423
|
+
}
|
|
1424
|
+
w({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${Se()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1425
|
+
let n2 = function() {
|
|
1426
|
+
let e3 = k(el, null);
|
|
1427
|
+
if (null === e3)
|
|
1428
|
+
throw new Error("Missing parent");
|
|
1429
|
+
return e3;
|
|
1430
|
+
}();
|
|
1431
|
+
return b(() => O(n2.register(e2.id))), () => {
|
|
1432
|
+
let { name: a2 = "Description", slot: o2 = s({}), props: r2 = {} } = n2, { id: i2, ...u2 } = e2, c2 = { ...Object.entries(r2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: i2 };
|
|
1433
|
+
return tt({ ourProps: c2, theirProps: u2, slot: o2.value, attrs: t2, slots: l2, name: a2 });
|
|
1434
|
+
};
|
|
1435
|
+
} });
|
|
1436
|
+
let ll = w({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1437
|
+
let n2 = s(null), a2 = u(() => De(n2)), o2 = Jt(), r2 = k(al, null), i2 = s(true === o2 || null == r2 ? function(e3) {
|
|
1438
|
+
let t3 = De(e3);
|
|
1439
|
+
if (!t3) {
|
|
1440
|
+
if (null === e3)
|
|
1441
|
+
return null;
|
|
1442
|
+
throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e3}`);
|
|
1443
|
+
}
|
|
1444
|
+
let l3 = t3.getElementById("headlessui-portal-root");
|
|
1445
|
+
if (l3)
|
|
1446
|
+
return l3;
|
|
1447
|
+
let n3 = t3.createElement("div");
|
|
1448
|
+
return n3.setAttribute("id", "headlessui-portal-root"), t3.body.appendChild(n3);
|
|
1449
|
+
}(n2.value) : r2.resolveTarget()), d2 = s(false);
|
|
1450
|
+
b(() => {
|
|
1451
|
+
d2.value = true;
|
|
1452
|
+
}), v(() => {
|
|
1453
|
+
o2 || null != r2 && (i2.value = r2.resolveTarget());
|
|
1454
|
+
});
|
|
1455
|
+
let c2 = k(nl, null), g2 = false, f2 = T();
|
|
1456
|
+
return p(n2, () => {
|
|
1457
|
+
if (g2 || !c2)
|
|
1458
|
+
return;
|
|
1459
|
+
let e3 = Ce(n2);
|
|
1460
|
+
e3 && (O(c2.register(e3), f2), g2 = true);
|
|
1461
|
+
}), O(() => {
|
|
1462
|
+
var e3, t3;
|
|
1463
|
+
let l3 = null == (e3 = a2.value) ? void 0 : e3.getElementById("headlessui-portal-root");
|
|
1464
|
+
l3 && i2.value === l3 && i2.value.children.length <= 0 && (null == (t3 = i2.value.parentElement) || t3.removeChild(i2.value));
|
|
1465
|
+
}), () => {
|
|
1466
|
+
if (!d2.value || null === i2.value)
|
|
1467
|
+
return null;
|
|
1468
|
+
let a3 = { ref: n2, "data-headlessui-portal": "" };
|
|
1469
|
+
return y(E, { to: i2.value }, tt({ ourProps: a3, theirProps: e2, slot: {}, attrs: l2, slots: t2, name: "Portal" }));
|
|
1470
|
+
};
|
|
1471
|
+
} }), nl = Symbol("PortalParentContext");
|
|
1472
|
+
let al = Symbol("PortalGroupContext"), ol = w({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1473
|
+
let n2 = C({ resolveTarget: () => e2.target });
|
|
1474
|
+
return S(al, n2), () => {
|
|
1475
|
+
let { target: n3, ...a2 } = e2;
|
|
1476
|
+
return tt({ theirProps: a2, ourProps: {}, slot: {}, attrs: t2, slots: l2, name: "PortalGroup" });
|
|
1477
|
+
};
|
|
1478
|
+
} });
|
|
1479
|
+
var rl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(rl || {});
|
|
1480
|
+
let il = Symbol("DialogContext");
|
|
1481
|
+
function sl(e2) {
|
|
1482
|
+
let t2 = k(il, null);
|
|
1072
1483
|
if (null === t2) {
|
|
1073
1484
|
let t3 = new Error(`<${e2} /> is missing a parent <Dialog /> component.`);
|
|
1074
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1485
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, sl), t3;
|
|
1075
1486
|
}
|
|
1076
1487
|
return t2;
|
|
1077
1488
|
}
|
|
1078
|
-
let
|
|
1079
|
-
var
|
|
1080
|
-
let
|
|
1081
|
-
|
|
1082
|
-
|
|
1489
|
+
let ul = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", dl = w({ 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: ul }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${Se()}` }, role: { type: String, default: "dialog" } }, emits: { close: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1490
|
+
var o2;
|
|
1491
|
+
let r2 = s(false);
|
|
1492
|
+
b(() => {
|
|
1493
|
+
r2.value = true;
|
|
1083
1494
|
});
|
|
1084
|
-
let i2 = s(0),
|
|
1085
|
-
if (
|
|
1495
|
+
let i2 = false, d2 = u(() => "dialog" === e2.role || "alertdialog" === e2.role ? e2.role : (i2 || (i2 = true, console.warn(`Invalid role [${d2}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), c2 = s(0), p2 = ct(), g2 = u(() => e2.open === ul && null !== p2 ? (p2.value & dt.Open) === dt.Open : e2.open), f2 = s(null), h2 = u(() => De(f2));
|
|
1496
|
+
if (a2({ el: f2, $el: f2 }), e2.open === ul && null === p2)
|
|
1086
1497
|
throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1087
|
-
if ("boolean" != typeof
|
|
1088
|
-
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${
|
|
1089
|
-
let
|
|
1090
|
-
let e3 =
|
|
1498
|
+
if ("boolean" != typeof g2.value)
|
|
1499
|
+
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${g2.value === ul ? void 0 : e2.open}`);
|
|
1500
|
+
let x2 = u(() => r2.value && g2.value ? 0 : 1), C2 = u(() => 0 === x2.value), O2 = u(() => c2.value > 1), M2 = null !== k(il, null), [T2, E2] = function() {
|
|
1501
|
+
let e3 = k(nl, null), t3 = s([]);
|
|
1091
1502
|
function l3(l4) {
|
|
1092
|
-
let
|
|
1093
|
-
-1 !==
|
|
1503
|
+
let n4 = t3.value.indexOf(l4);
|
|
1504
|
+
-1 !== n4 && t3.value.splice(n4, 1), e3 && e3.unregister(l4);
|
|
1094
1505
|
}
|
|
1095
|
-
let
|
|
1096
|
-
return t3.value.push(
|
|
1506
|
+
let n3 = { register: function(n4) {
|
|
1507
|
+
return t3.value.push(n4), e3 && e3.register(n4), () => l3(n4);
|
|
1097
1508
|
}, unregister: l3, portals: t3 };
|
|
1098
|
-
return [t3,
|
|
1509
|
+
return [t3, w({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (S(nl, n3), () => {
|
|
1099
1510
|
var e5;
|
|
1100
1511
|
return null == (e5 = t4.default) ? void 0 : e5.call(t4);
|
|
1101
1512
|
}) })];
|
|
1102
|
-
}(), { resolveContainers:
|
|
1103
|
-
let
|
|
1104
|
-
function
|
|
1105
|
-
var l4;
|
|
1106
|
-
let
|
|
1513
|
+
}(), { resolveContainers: D2, mainTreeNodeRef: _2, MainTreeNode: I2 } = function({ defaultContainers: e3 = [], portals: t3, mainTreeNodeRef: l3 } = {}) {
|
|
1514
|
+
let n3 = s(null), a3 = De(n3);
|
|
1515
|
+
function o3() {
|
|
1516
|
+
var l4, o4, r3;
|
|
1517
|
+
let i3 = [];
|
|
1107
1518
|
for (let t4 of e3)
|
|
1108
|
-
null !== t4 && (t4 instanceof HTMLElement ?
|
|
1519
|
+
null !== t4 && (t4 instanceof HTMLElement ? i3.push(t4) : "value" in t4 && t4.value instanceof HTMLElement && i3.push(t4.value));
|
|
1109
1520
|
if (null != t3 && t3.value)
|
|
1110
1521
|
for (let e4 of t3.value)
|
|
1111
|
-
|
|
1112
|
-
for (let e4 of null != (l4 = null ==
|
|
1113
|
-
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1114
|
-
return
|
|
1522
|
+
i3.push(e4);
|
|
1523
|
+
for (let e4 of null != (l4 = null == a3 ? void 0 : a3.querySelectorAll("html > *, body > *")) ? l4 : [])
|
|
1524
|
+
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(Ce(n3)) || e4.contains(null == (r3 = null == (o4 = Ce(n3)) ? void 0 : o4.getRootNode()) ? void 0 : r3.host) || i3.some((t4) => e4.contains(t4)) || i3.push(e4));
|
|
1525
|
+
return i3;
|
|
1115
1526
|
}
|
|
1116
|
-
return { resolveContainers:
|
|
1117
|
-
}({ portals:
|
|
1527
|
+
return { resolveContainers: o3, contains: (e4) => o3().some((t4) => t4.contains(e4)), mainTreeNodeRef: n3, MainTreeNode: () => null != l3 ? null : y(st, { features: it.Hidden, ref: n3 }) };
|
|
1528
|
+
}({ portals: T2, defaultContainers: [u(() => {
|
|
1118
1529
|
var e3;
|
|
1119
|
-
return null != (e3 =
|
|
1120
|
-
})] }),
|
|
1530
|
+
return null != (e3 = z2.panelRef.value) ? e3 : f2.value;
|
|
1531
|
+
})] }), P2 = u(() => O2.value ? "parent" : "leaf"), j2 = u(() => null !== p2 && (p2.value & dt.Closing) === dt.Closing), R2 = u(() => !M2 && !j2.value && C2.value), B2 = u(() => {
|
|
1121
1532
|
var e3, t3, l3;
|
|
1122
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 =
|
|
1533
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = h2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(Ce(_2)) && e4 instanceof HTMLElement))) ? l3 : null;
|
|
1123
1534
|
});
|
|
1124
|
-
|
|
1125
|
-
let
|
|
1535
|
+
Wt(B2, R2);
|
|
1536
|
+
let L2 = u(() => !!O2.value || C2.value), A2 = u(() => {
|
|
1126
1537
|
var e3, t3, l3;
|
|
1127
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 =
|
|
1538
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = h2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(Ce(_2)) && e4 instanceof HTMLElement)) ? l3 : null;
|
|
1128
1539
|
});
|
|
1129
|
-
|
|
1540
|
+
Wt(A2, L2), Qt({ type: "Dialog", enabled: u(() => 0 === x2.value), element: f2, onUpdate: (e3, t3) => {
|
|
1130
1541
|
if ("Dialog" === t3)
|
|
1131
|
-
return
|
|
1542
|
+
return Oe(e3, { [Xt.Add]: () => c2.value += 1, [Xt.Remove]: () => c2.value -= 1 });
|
|
1132
1543
|
} });
|
|
1133
|
-
let
|
|
1134
|
-
|
|
1544
|
+
let F2 = tl({ name: "DialogDescription", slot: u(() => ({ open: g2.value })) }), N2 = s(null), z2 = { titleId: N2, panelRef: s(null), dialogState: x2, setTitleId(e3) {
|
|
1545
|
+
N2.value !== e3 && (N2.value = e3);
|
|
1135
1546
|
}, close() {
|
|
1136
1547
|
t2("close", false);
|
|
1137
1548
|
} };
|
|
1138
|
-
|
|
1139
|
-
let
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
},
|
|
1143
|
-
let
|
|
1144
|
-
|
|
1145
|
-
|
|
1549
|
+
S(il, z2);
|
|
1550
|
+
let $2 = u(() => !(!C2.value || O2.value));
|
|
1551
|
+
We(D2, (e3, t3) => {
|
|
1552
|
+
z2.close(), m(() => null == t3 ? void 0 : t3.focus());
|
|
1553
|
+
}, $2);
|
|
1554
|
+
let H2 = u(() => !(O2.value || 0 !== x2.value));
|
|
1555
|
+
Bt(null == (o2 = h2.value) ? void 0 : o2.defaultView, "keydown", (e3) => {
|
|
1556
|
+
H2.value && (e3.defaultPrevented || e3.key === gt.Escape && (e3.preventDefault(), e3.stopPropagation(), z2.close()));
|
|
1146
1557
|
});
|
|
1147
|
-
let
|
|
1148
|
-
return
|
|
1558
|
+
let V2 = u(() => !(j2.value || 0 !== x2.value || M2));
|
|
1559
|
+
return Yt(h2, V2, (e3) => {
|
|
1149
1560
|
var t3;
|
|
1150
|
-
return { containers: [...null != (t3 = e3.containers) ? t3 : [],
|
|
1151
|
-
}),
|
|
1152
|
-
if (0 !==
|
|
1561
|
+
return { containers: [...null != (t3 = e3.containers) ? t3 : [], D2] };
|
|
1562
|
+
}), v((e3) => {
|
|
1563
|
+
if (0 !== x2.value)
|
|
1153
1564
|
return;
|
|
1154
|
-
let t3 =
|
|
1565
|
+
let t3 = Ce(f2);
|
|
1155
1566
|
if (!t3)
|
|
1156
1567
|
return;
|
|
1157
1568
|
let l3 = new ResizeObserver((e4) => {
|
|
1158
1569
|
for (let t4 of e4) {
|
|
1159
1570
|
let e5 = t4.target.getBoundingClientRect();
|
|
1160
|
-
0 === e5.x && 0 === e5.y && 0 === e5.width && 0 === e5.height &&
|
|
1571
|
+
0 === e5.x && 0 === e5.y && 0 === e5.width && 0 === e5.height && z2.close();
|
|
1161
1572
|
}
|
|
1162
1573
|
});
|
|
1163
1574
|
l3.observe(t3), e3(() => l3.disconnect());
|
|
1164
1575
|
}), () => {
|
|
1165
|
-
let { id: t3, open:
|
|
1166
|
-
return
|
|
1576
|
+
let { id: t3, open: a3, initialFocus: o3, ...r3 } = e2, i3 = { ...l2, ref: f2, id: t3, role: d2.value, "aria-modal": 0 === x2.value || void 0, "aria-labelledby": N2.value, "aria-describedby": F2.value }, s2 = { open: 0 === x2.value };
|
|
1577
|
+
return y(Gt, { force: true }, () => [y(ll, () => y(ol, { target: f2.value }, () => y(Gt, { force: false }, () => y(Nt, { initialFocus: o3, containers: D2, features: C2.value ? Oe(P2.value, { parent: Nt.features.RestoreFocus, leaf: Nt.features.All & ~Nt.features.FocusLock }) : Nt.features.None }, () => y(E2, {}, () => tt({ ourProps: i3, theirProps: { ...r3, ...l2 }, slot: s2, attrs: l2, slots: n2, visible: 0 === x2.value, features: Qe.RenderStrategy | Qe.Static, name: "Dialog" })))))), y(I2)]);
|
|
1167
1578
|
};
|
|
1168
1579
|
} });
|
|
1169
|
-
|
|
1170
|
-
let
|
|
1171
|
-
function
|
|
1172
|
-
e3.target === e3.currentTarget && (e3.preventDefault(), e3.stopPropagation(),
|
|
1580
|
+
w({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${Se()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1581
|
+
let n2 = sl("DialogOverlay");
|
|
1582
|
+
function a2(e3) {
|
|
1583
|
+
e3.target === e3.currentTarget && (e3.preventDefault(), e3.stopPropagation(), n2.close());
|
|
1173
1584
|
}
|
|
1174
1585
|
return () => {
|
|
1175
|
-
let { id:
|
|
1176
|
-
return
|
|
1586
|
+
let { id: o2, ...r2 } = e2;
|
|
1587
|
+
return tt({ ourProps: { id: o2, "aria-hidden": true, onClick: a2 }, theirProps: r2, slot: { open: 0 === n2.dialogState.value }, attrs: t2, slots: l2, name: "DialogOverlay" });
|
|
1177
1588
|
};
|
|
1178
|
-
} }),
|
|
1179
|
-
let
|
|
1180
|
-
return
|
|
1181
|
-
if (null ===
|
|
1589
|
+
} }), w({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${Se()}` } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1590
|
+
let a2 = sl("DialogBackdrop"), o2 = s(null);
|
|
1591
|
+
return n2({ el: o2, $el: o2 }), b(() => {
|
|
1592
|
+
if (null === a2.panelRef.value)
|
|
1182
1593
|
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1183
1594
|
}), () => {
|
|
1184
|
-
let { id:
|
|
1185
|
-
return
|
|
1595
|
+
let { id: n3, ...r2 } = e2, i2 = { id: n3, ref: o2, "aria-hidden": true };
|
|
1596
|
+
return y(Gt, { force: true }, () => y(ll, () => tt({ ourProps: i2, theirProps: { ...t2, ...r2 }, slot: { open: 0 === a2.dialogState.value }, attrs: t2, slots: l2, name: "DialogBackdrop" })));
|
|
1186
1597
|
};
|
|
1187
1598
|
} });
|
|
1188
|
-
let
|
|
1189
|
-
let
|
|
1190
|
-
function
|
|
1599
|
+
let cl = w({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${Se()}` } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1600
|
+
let a2 = sl("DialogPanel");
|
|
1601
|
+
function o2(e3) {
|
|
1191
1602
|
e3.stopPropagation();
|
|
1192
1603
|
}
|
|
1193
|
-
return
|
|
1194
|
-
let { id:
|
|
1195
|
-
return
|
|
1604
|
+
return n2({ el: a2.panelRef, $el: a2.panelRef }), () => {
|
|
1605
|
+
let { id: n3, ...r2 } = e2;
|
|
1606
|
+
return tt({ ourProps: { id: n3, ref: a2.panelRef, onClick: o2 }, theirProps: r2, slot: { open: 0 === a2.dialogState.value }, attrs: t2, slots: l2, name: "DialogPanel" });
|
|
1196
1607
|
};
|
|
1197
|
-
} }),
|
|
1198
|
-
let
|
|
1199
|
-
return
|
|
1200
|
-
|
|
1608
|
+
} }), pl = w({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: () => `headlessui-dialog-title-${Se()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1609
|
+
let n2 = sl("DialogTitle");
|
|
1610
|
+
return b(() => {
|
|
1611
|
+
n2.setTitleId(e2.id), O(() => n2.setTitleId(null));
|
|
1201
1612
|
}), () => {
|
|
1202
|
-
let { id:
|
|
1203
|
-
return
|
|
1613
|
+
let { id: a2, ...o2 } = e2;
|
|
1614
|
+
return tt({ ourProps: { id: a2 }, theirProps: o2, slot: { open: 0 === n2.dialogState.value }, attrs: t2, slots: l2, name: "DialogTitle" });
|
|
1204
1615
|
};
|
|
1205
1616
|
} });
|
|
1206
|
-
var
|
|
1207
|
-
let
|
|
1208
|
-
function
|
|
1209
|
-
let t2 =
|
|
1617
|
+
var gl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(gl || {});
|
|
1618
|
+
let fl = Symbol("DisclosureContext");
|
|
1619
|
+
function ml(e2) {
|
|
1620
|
+
let t2 = k(fl, null);
|
|
1210
1621
|
if (null === t2) {
|
|
1211
1622
|
let t3 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
|
1212
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1623
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, ml), t3;
|
|
1213
1624
|
}
|
|
1214
1625
|
return t2;
|
|
1215
1626
|
}
|
|
1216
|
-
let
|
|
1217
|
-
let
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1627
|
+
let vl = Symbol("DisclosurePanelContext");
|
|
1628
|
+
let bl = w({ name: "Disclosure", props: { as: { type: [Object, String], default: "template" }, defaultOpen: { type: [Boolean], default: false } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1629
|
+
let n2 = s(e2.defaultOpen ? 0 : 1), a2 = s(null), o2 = s(null), r2 = { buttonId: s(`headlessui-disclosure-button-${Se()}`), panelId: s(`headlessui-disclosure-panel-${Se()}`), disclosureState: n2, panel: a2, button: o2, toggleDisclosure() {
|
|
1630
|
+
n2.value = Oe(n2.value, { 0: 1, 1: 0 });
|
|
1220
1631
|
}, closeDisclosure() {
|
|
1221
|
-
1 !==
|
|
1632
|
+
1 !== n2.value && (n2.value = 1);
|
|
1222
1633
|
}, close(e3) {
|
|
1223
|
-
|
|
1224
|
-
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ?
|
|
1634
|
+
r2.closeDisclosure();
|
|
1635
|
+
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ? Ce(e3) : Ce(r2.button) : Ce(r2.button);
|
|
1225
1636
|
null == t3 || t3.focus();
|
|
1226
1637
|
} };
|
|
1227
|
-
return
|
|
1228
|
-
let { defaultOpen:
|
|
1229
|
-
return
|
|
1638
|
+
return S(fl, r2), pt(u(() => Oe(n2.value, { 0: dt.Open, 1: dt.Closed }))), () => {
|
|
1639
|
+
let { defaultOpen: a3, ...o3 } = e2;
|
|
1640
|
+
return tt({ theirProps: o3, ourProps: {}, slot: { open: 0 === n2.value, close: r2.close }, slots: t2, attrs: l2, name: "Disclosure" });
|
|
1230
1641
|
};
|
|
1231
|
-
} }),
|
|
1232
|
-
let
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}),
|
|
1236
|
-
|
|
1642
|
+
} }), hl = w({ 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 }) {
|
|
1643
|
+
let a2 = ml("DisclosureButton"), o2 = k(vl, null), r2 = u(() => null !== o2 && o2.value === a2.panelId.value);
|
|
1644
|
+
b(() => {
|
|
1645
|
+
r2.value || null !== e2.id && (a2.buttonId.value = e2.id);
|
|
1646
|
+
}), O(() => {
|
|
1647
|
+
r2.value || (a2.buttonId.value = null);
|
|
1237
1648
|
});
|
|
1238
1649
|
let i2 = s(null);
|
|
1239
|
-
|
|
1240
|
-
|
|
1650
|
+
n2({ el: i2, $el: i2 }), r2.value || v(() => {
|
|
1651
|
+
a2.button.value = i2.value;
|
|
1241
1652
|
});
|
|
1242
|
-
let
|
|
1243
|
-
function
|
|
1653
|
+
let d2 = Je(u(() => ({ as: e2.as, type: t2.type })), i2);
|
|
1654
|
+
function c2() {
|
|
1244
1655
|
var t3;
|
|
1245
|
-
e2.disabled || (
|
|
1656
|
+
e2.disabled || (r2.value ? (a2.toggleDisclosure(), null == (t3 = Ce(a2.button)) || t3.focus()) : a2.toggleDisclosure());
|
|
1246
1657
|
}
|
|
1247
|
-
function
|
|
1658
|
+
function p2(t3) {
|
|
1248
1659
|
var l3;
|
|
1249
1660
|
if (!e2.disabled)
|
|
1250
|
-
if (
|
|
1661
|
+
if (r2.value)
|
|
1251
1662
|
switch (t3.key) {
|
|
1252
|
-
case
|
|
1253
|
-
case
|
|
1254
|
-
t3.preventDefault(), t3.stopPropagation(),
|
|
1663
|
+
case gt.Space:
|
|
1664
|
+
case gt.Enter:
|
|
1665
|
+
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure(), null == (l3 = Ce(a2.button)) || l3.focus();
|
|
1255
1666
|
}
|
|
1256
1667
|
else
|
|
1257
1668
|
switch (t3.key) {
|
|
1258
|
-
case
|
|
1259
|
-
case
|
|
1260
|
-
t3.preventDefault(), t3.stopPropagation(),
|
|
1669
|
+
case gt.Space:
|
|
1670
|
+
case gt.Enter:
|
|
1671
|
+
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure();
|
|
1261
1672
|
}
|
|
1262
1673
|
}
|
|
1263
1674
|
function g2(e3) {
|
|
1264
|
-
if (e3.key ===
|
|
1675
|
+
if (e3.key === gt.Space)
|
|
1265
1676
|
e3.preventDefault();
|
|
1266
1677
|
}
|
|
1267
1678
|
return () => {
|
|
1268
|
-
var
|
|
1269
|
-
let
|
|
1270
|
-
return
|
|
1679
|
+
var n3;
|
|
1680
|
+
let o3 = { open: 0 === a2.disclosureState.value }, { id: s2, ...u2 } = e2;
|
|
1681
|
+
return tt({ 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 || Ce(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" });
|
|
1271
1682
|
};
|
|
1272
|
-
} }),
|
|
1273
|
-
let
|
|
1274
|
-
|
|
1275
|
-
null !== e2.id && (
|
|
1276
|
-
}),
|
|
1277
|
-
|
|
1278
|
-
}),
|
|
1279
|
-
let
|
|
1683
|
+
} }), yl = w({ 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 }) {
|
|
1684
|
+
let a2 = ml("DisclosurePanel");
|
|
1685
|
+
b(() => {
|
|
1686
|
+
null !== e2.id && (a2.panelId.value = e2.id);
|
|
1687
|
+
}), O(() => {
|
|
1688
|
+
a2.panelId.value = null;
|
|
1689
|
+
}), n2({ el: a2.panel, $el: a2.panel }), S(vl, a2.panelId);
|
|
1690
|
+
let o2 = ct(), r2 = u(() => null !== o2 ? (o2.value & dt.Open) === dt.Open : 0 === a2.disclosureState.value);
|
|
1280
1691
|
return () => {
|
|
1281
|
-
var
|
|
1282
|
-
let
|
|
1283
|
-
return
|
|
1692
|
+
var n3;
|
|
1693
|
+
let o3 = { open: 0 === a2.disclosureState.value, close: a2.close }, { id: i2, ...s2 } = e2;
|
|
1694
|
+
return tt({ ourProps: { id: null != (n3 = a2.panelId.value) ? n3 : i2, ref: a2.panel }, theirProps: s2, slot: o3, attrs: t2, slots: l2, features: Qe.RenderStrategy | Qe.Static, visible: r2.value, name: "DisclosurePanel" });
|
|
1284
1695
|
};
|
|
1285
|
-
} }),
|
|
1286
|
-
function
|
|
1696
|
+
} }), xl = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1697
|
+
function wl(e2) {
|
|
1287
1698
|
var t2, l2;
|
|
1288
|
-
let
|
|
1289
|
-
if (!(
|
|
1290
|
-
return
|
|
1291
|
-
let
|
|
1292
|
-
for (let e3 of
|
|
1293
|
-
e3.remove(),
|
|
1294
|
-
let
|
|
1295
|
-
return
|
|
1296
|
-
}
|
|
1297
|
-
function
|
|
1699
|
+
let n2 = null != (t2 = e2.innerText) ? t2 : "", a2 = e2.cloneNode(true);
|
|
1700
|
+
if (!(a2 instanceof HTMLElement))
|
|
1701
|
+
return n2;
|
|
1702
|
+
let o2 = false;
|
|
1703
|
+
for (let e3 of a2.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1704
|
+
e3.remove(), o2 = true;
|
|
1705
|
+
let r2 = o2 ? null != (l2 = a2.innerText) ? l2 : "" : n2;
|
|
1706
|
+
return xl.test(r2) && (r2 = r2.replace(xl, "")), r2;
|
|
1707
|
+
}
|
|
1708
|
+
function kl(e2) {
|
|
1298
1709
|
let t2 = s(""), l2 = s("");
|
|
1299
1710
|
return () => {
|
|
1300
|
-
let
|
|
1301
|
-
if (!
|
|
1711
|
+
let n2 = Ce(e2);
|
|
1712
|
+
if (!n2)
|
|
1302
1713
|
return "";
|
|
1303
|
-
let
|
|
1304
|
-
if (t2.value ===
|
|
1714
|
+
let a2 = n2.innerText;
|
|
1715
|
+
if (t2.value === a2)
|
|
1305
1716
|
return l2.value;
|
|
1306
|
-
let
|
|
1717
|
+
let o2 = function(e3) {
|
|
1307
1718
|
let t3 = e3.getAttribute("aria-label");
|
|
1308
1719
|
if ("string" == typeof t3)
|
|
1309
1720
|
return t3.trim();
|
|
@@ -1313,595 +1724,595 @@ function ol(e2) {
|
|
|
1313
1724
|
let t4 = document.getElementById(e5);
|
|
1314
1725
|
if (t4) {
|
|
1315
1726
|
let e6 = t4.getAttribute("aria-label");
|
|
1316
|
-
return "string" == typeof e6 ? e6.trim() :
|
|
1727
|
+
return "string" == typeof e6 ? e6.trim() : wl(t4).trim();
|
|
1317
1728
|
}
|
|
1318
1729
|
return null;
|
|
1319
1730
|
}).filter(Boolean);
|
|
1320
1731
|
if (e4.length > 0)
|
|
1321
1732
|
return e4.join(", ");
|
|
1322
1733
|
}
|
|
1323
|
-
return
|
|
1324
|
-
}(
|
|
1325
|
-
return t2.value =
|
|
1734
|
+
return wl(e3).trim();
|
|
1735
|
+
}(n2).trim().toLowerCase();
|
|
1736
|
+
return t2.value = a2, l2.value = o2, o2;
|
|
1326
1737
|
};
|
|
1327
1738
|
}
|
|
1328
|
-
var
|
|
1329
|
-
let
|
|
1330
|
-
function
|
|
1331
|
-
let t2 =
|
|
1739
|
+
var Sl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(Sl || {}), Cl = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Other = 1] = "Other", e2))(Cl || {});
|
|
1740
|
+
let Ol = Symbol("MenuContext");
|
|
1741
|
+
function Ml(e2) {
|
|
1742
|
+
let t2 = k(Ol, null);
|
|
1332
1743
|
if (null === t2) {
|
|
1333
1744
|
let t3 = new Error(`<${e2} /> is missing a parent <Menu /> component.`);
|
|
1334
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1745
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Ml), t3;
|
|
1335
1746
|
}
|
|
1336
1747
|
return t2;
|
|
1337
1748
|
}
|
|
1338
|
-
let
|
|
1339
|
-
let
|
|
1340
|
-
function
|
|
1341
|
-
let t3 = null !==
|
|
1342
|
-
return -1 ===
|
|
1343
|
-
}
|
|
1344
|
-
let
|
|
1345
|
-
|
|
1346
|
-
}, openMenu: () =>
|
|
1347
|
-
let
|
|
1348
|
-
i2.value = "",
|
|
1749
|
+
let Tl = w({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1750
|
+
let n2 = s(1), a2 = s(null), o2 = s(null), r2 = s([]), i2 = s(""), d2 = s(null), c2 = s(1);
|
|
1751
|
+
function p2(e3 = (e4) => e4) {
|
|
1752
|
+
let t3 = null !== d2.value ? r2.value[d2.value] : null, l3 = $e(e3(r2.value.slice()), (e4) => Ce(e4.dataRef.domRef)), n3 = t3 ? l3.indexOf(t3) : null;
|
|
1753
|
+
return -1 === n3 && (n3 = null), { items: l3, activeItemIndex: n3 };
|
|
1754
|
+
}
|
|
1755
|
+
let g2 = { menuState: n2, buttonRef: a2, itemsRef: o2, items: r2, searchQuery: i2, activeItemIndex: d2, activationTrigger: c2, closeMenu: () => {
|
|
1756
|
+
n2.value = 1, d2.value = null;
|
|
1757
|
+
}, openMenu: () => n2.value = 0, goToItem(e3, t3, l3) {
|
|
1758
|
+
let n3 = p2(), a3 = vt(e3 === mt.Specific ? { focus: mt.Specific, id: t3 } : { focus: e3 }, { resolveItems: () => n3.items, resolveActiveIndex: () => n3.activeItemIndex, resolveId: (e4) => e4.id, resolveDisabled: (e4) => e4.dataRef.disabled });
|
|
1759
|
+
i2.value = "", d2.value = a3, c2.value = null != l3 ? l3 : 1, r2.value = n3.items;
|
|
1349
1760
|
}, search(e3) {
|
|
1350
1761
|
let t3 = "" !== i2.value ? 0 : 1;
|
|
1351
1762
|
i2.value += e3.toLowerCase();
|
|
1352
|
-
let l3 = (null !==
|
|
1353
|
-
-1 ===
|
|
1763
|
+
let l3 = (null !== d2.value ? r2.value.slice(d2.value + t3).concat(r2.value.slice(0, d2.value + t3)) : r2.value).find((e4) => e4.dataRef.textValue.startsWith(i2.value) && !e4.dataRef.disabled), n3 = l3 ? r2.value.indexOf(l3) : -1;
|
|
1764
|
+
-1 === n3 || n3 === d2.value || (d2.value = n3, c2.value = 1);
|
|
1354
1765
|
}, clearSearch() {
|
|
1355
1766
|
i2.value = "";
|
|
1356
1767
|
}, registerItem(e3, t3) {
|
|
1357
|
-
let l3 =
|
|
1358
|
-
|
|
1768
|
+
let l3 = p2((l4) => [...l4, { id: e3, dataRef: t3 }]);
|
|
1769
|
+
r2.value = l3.items, d2.value = l3.activeItemIndex, c2.value = 1;
|
|
1359
1770
|
}, unregisterItem(e3) {
|
|
1360
|
-
let t3 =
|
|
1771
|
+
let t3 = p2((t4) => {
|
|
1361
1772
|
let l3 = t4.findIndex((t5) => t5.id === e3);
|
|
1362
1773
|
return -1 !== l3 && t4.splice(l3, 1), t4;
|
|
1363
1774
|
});
|
|
1364
|
-
|
|
1775
|
+
r2.value = t3.items, d2.value = t3.activeItemIndex, c2.value = 1;
|
|
1365
1776
|
} };
|
|
1366
|
-
return
|
|
1777
|
+
return We([a2, o2], (e3, t3) => {
|
|
1367
1778
|
var l3;
|
|
1368
|
-
|
|
1369
|
-
},
|
|
1370
|
-
let
|
|
1371
|
-
return
|
|
1779
|
+
g2.closeMenu(), Le(t3, Be.Loose) || (e3.preventDefault(), null == (l3 = Ce(a2)) || l3.focus());
|
|
1780
|
+
}, u(() => 0 === n2.value)), S(Ol, g2), pt(u(() => Oe(n2.value, { 0: dt.Open, 1: dt.Closed }))), () => {
|
|
1781
|
+
let a3 = { open: 0 === n2.value, close: g2.closeMenu };
|
|
1782
|
+
return tt({ ourProps: {}, theirProps: e2, slot: a3, slots: t2, attrs: l2, name: "Menu" });
|
|
1372
1783
|
};
|
|
1373
|
-
} }),
|
|
1374
|
-
let
|
|
1375
|
-
function
|
|
1784
|
+
} }), El = w({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${Se()}` } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1785
|
+
let a2 = Ml("MenuButton");
|
|
1786
|
+
function o2(e3) {
|
|
1376
1787
|
switch (e3.key) {
|
|
1377
|
-
case
|
|
1378
|
-
case
|
|
1379
|
-
case
|
|
1380
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1788
|
+
case gt.Space:
|
|
1789
|
+
case gt.Enter:
|
|
1790
|
+
case gt.ArrowDown:
|
|
1791
|
+
e3.preventDefault(), e3.stopPropagation(), a2.openMenu(), m(() => {
|
|
1381
1792
|
var e4;
|
|
1382
|
-
null == (e4 =
|
|
1793
|
+
null == (e4 = Ce(a2.itemsRef)) || e4.focus({ preventScroll: true }), a2.goToItem(mt.First);
|
|
1383
1794
|
});
|
|
1384
1795
|
break;
|
|
1385
|
-
case
|
|
1386
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1796
|
+
case gt.ArrowUp:
|
|
1797
|
+
e3.preventDefault(), e3.stopPropagation(), a2.openMenu(), m(() => {
|
|
1387
1798
|
var e4;
|
|
1388
|
-
null == (e4 =
|
|
1799
|
+
null == (e4 = Ce(a2.itemsRef)) || e4.focus({ preventScroll: true }), a2.goToItem(mt.Last);
|
|
1389
1800
|
});
|
|
1390
1801
|
}
|
|
1391
1802
|
}
|
|
1392
|
-
function
|
|
1393
|
-
if (e3.key ===
|
|
1803
|
+
function r2(e3) {
|
|
1804
|
+
if (e3.key === gt.Space)
|
|
1394
1805
|
e3.preventDefault();
|
|
1395
1806
|
}
|
|
1396
1807
|
function i2(t3) {
|
|
1397
|
-
e2.disabled || (0 ===
|
|
1808
|
+
e2.disabled || (0 === a2.menuState.value ? (a2.closeMenu(), m(() => {
|
|
1398
1809
|
var e3;
|
|
1399
|
-
return null == (e3 =
|
|
1400
|
-
})) : (t3.preventDefault(),
|
|
1810
|
+
return null == (e3 = Ce(a2.buttonRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1811
|
+
})) : (t3.preventDefault(), a2.openMenu(), function(e3) {
|
|
1401
1812
|
requestAnimationFrame(() => requestAnimationFrame(e3));
|
|
1402
1813
|
}(() => {
|
|
1403
1814
|
var e3;
|
|
1404
|
-
return null == (e3 =
|
|
1815
|
+
return null == (e3 = Ce(a2.itemsRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1405
1816
|
})));
|
|
1406
1817
|
}
|
|
1407
|
-
|
|
1408
|
-
let s2 =
|
|
1818
|
+
n2({ el: a2.buttonRef, $el: a2.buttonRef });
|
|
1819
|
+
let s2 = Je(u(() => ({ as: e2.as, type: t2.type })), a2.buttonRef);
|
|
1409
1820
|
return () => {
|
|
1410
|
-
var
|
|
1411
|
-
let u2 = { open: 0 ===
|
|
1412
|
-
return
|
|
1821
|
+
var n3;
|
|
1822
|
+
let u2 = { open: 0 === a2.menuState.value }, { id: d2, ...c2 } = e2;
|
|
1823
|
+
return tt({ ourProps: { ref: a2.buttonRef, id: d2, type: s2.value, "aria-haspopup": "menu", "aria-controls": null == (n3 = Ce(a2.itemsRef)) ? void 0 : n3.id, "aria-expanded": 0 === a2.menuState.value, onKeydown: o2, onKeyup: r2, onClick: i2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "MenuButton" });
|
|
1413
1824
|
};
|
|
1414
|
-
} }),
|
|
1415
|
-
let
|
|
1416
|
-
function
|
|
1825
|
+
} }), Dl = w({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: () => `headlessui-menu-items-${Se()}` } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1826
|
+
let a2 = Ml("MenuItems"), o2 = s(null);
|
|
1827
|
+
function r2(e3) {
|
|
1417
1828
|
var t3;
|
|
1418
|
-
switch (
|
|
1419
|
-
case
|
|
1420
|
-
if ("" !==
|
|
1421
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1422
|
-
case
|
|
1423
|
-
if (e3.preventDefault(), e3.stopPropagation(), null !==
|
|
1424
|
-
null == (t3 =
|
|
1829
|
+
switch (o2.value && clearTimeout(o2.value), e3.key) {
|
|
1830
|
+
case gt.Space:
|
|
1831
|
+
if ("" !== a2.searchQuery.value)
|
|
1832
|
+
return e3.preventDefault(), e3.stopPropagation(), a2.search(e3.key);
|
|
1833
|
+
case gt.Enter:
|
|
1834
|
+
if (e3.preventDefault(), e3.stopPropagation(), null !== a2.activeItemIndex.value) {
|
|
1835
|
+
null == (t3 = Ce(a2.items.value[a2.activeItemIndex.value].dataRef.domRef)) || t3.click();
|
|
1425
1836
|
}
|
|
1426
|
-
|
|
1837
|
+
a2.closeMenu(), Ae(Ce(a2.buttonRef));
|
|
1427
1838
|
break;
|
|
1428
|
-
case
|
|
1429
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1430
|
-
case
|
|
1431
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1432
|
-
case
|
|
1433
|
-
case
|
|
1434
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1435
|
-
case
|
|
1436
|
-
case
|
|
1437
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1438
|
-
case
|
|
1439
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1839
|
+
case gt.ArrowDown:
|
|
1840
|
+
return e3.preventDefault(), e3.stopPropagation(), a2.goToItem(mt.Next);
|
|
1841
|
+
case gt.ArrowUp:
|
|
1842
|
+
return e3.preventDefault(), e3.stopPropagation(), a2.goToItem(mt.Previous);
|
|
1843
|
+
case gt.Home:
|
|
1844
|
+
case gt.PageUp:
|
|
1845
|
+
return e3.preventDefault(), e3.stopPropagation(), a2.goToItem(mt.First);
|
|
1846
|
+
case gt.End:
|
|
1847
|
+
case gt.PageDown:
|
|
1848
|
+
return e3.preventDefault(), e3.stopPropagation(), a2.goToItem(mt.Last);
|
|
1849
|
+
case gt.Escape:
|
|
1850
|
+
e3.preventDefault(), e3.stopPropagation(), a2.closeMenu(), m(() => {
|
|
1440
1851
|
var e4;
|
|
1441
|
-
return null == (e4 =
|
|
1852
|
+
return null == (e4 = Ce(a2.buttonRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
1442
1853
|
});
|
|
1443
1854
|
break;
|
|
1444
|
-
case
|
|
1445
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1446
|
-
return
|
|
1447
|
-
}(
|
|
1855
|
+
case gt.Tab:
|
|
1856
|
+
e3.preventDefault(), e3.stopPropagation(), a2.closeMenu(), m(() => function(e4, t4) {
|
|
1857
|
+
return He(Re(), t4, { relativeTo: e4 });
|
|
1858
|
+
}(Ce(a2.buttonRef), e3.shiftKey ? Ie.Previous : Ie.Next));
|
|
1448
1859
|
break;
|
|
1449
1860
|
default:
|
|
1450
|
-
1 === e3.key.length && (
|
|
1861
|
+
1 === e3.key.length && (a2.search(e3.key), o2.value = setTimeout(() => a2.clearSearch(), 350));
|
|
1451
1862
|
}
|
|
1452
1863
|
}
|
|
1453
1864
|
function i2(e3) {
|
|
1454
|
-
if (e3.key ===
|
|
1865
|
+
if (e3.key === gt.Space)
|
|
1455
1866
|
e3.preventDefault();
|
|
1456
1867
|
}
|
|
1457
|
-
|
|
1868
|
+
n2({ el: a2.itemsRef, $el: a2.itemsRef }), Xe({ container: u(() => Ce(a2.itemsRef)), enabled: u(() => 0 === a2.menuState.value), accept: (e3) => "menuitem" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1458
1869
|
e3.setAttribute("role", "none");
|
|
1459
1870
|
} });
|
|
1460
|
-
let
|
|
1871
|
+
let d2 = ct(), c2 = u(() => null !== d2 ? (d2.value & dt.Open) === dt.Open : 0 === a2.menuState.value);
|
|
1461
1872
|
return () => {
|
|
1462
|
-
var
|
|
1463
|
-
let s2 = { open: 0 ===
|
|
1464
|
-
return
|
|
1873
|
+
var n3, o3;
|
|
1874
|
+
let s2 = { open: 0 === a2.menuState.value }, { id: u2, ...d3 } = e2;
|
|
1875
|
+
return tt({ ourProps: { "aria-activedescendant": null === a2.activeItemIndex.value || null == (n3 = a2.items.value[a2.activeItemIndex.value]) ? void 0 : n3.id, "aria-labelledby": null == (o3 = Ce(a2.buttonRef)) ? void 0 : o3.id, id: u2, onKeydown: r2, onKeyup: i2, role: "menu", tabIndex: 0, ref: a2.itemsRef }, theirProps: d3, slot: s2, attrs: t2, slots: l2, features: Qe.RenderStrategy | Qe.Static, visible: c2.value, name: "MenuItems" });
|
|
1465
1876
|
};
|
|
1466
|
-
} }),
|
|
1467
|
-
let
|
|
1468
|
-
|
|
1469
|
-
let
|
|
1877
|
+
} }), _l = w({ name: "MenuItem", inheritAttrs: false, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false }, id: { type: String, default: () => `headlessui-menu-item-${Se()}` } }, setup(e2, { slots: t2, attrs: l2, expose: n2 }) {
|
|
1878
|
+
let a2 = Ml("MenuItem"), o2 = s(null);
|
|
1879
|
+
n2({ el: o2, $el: o2 });
|
|
1880
|
+
let r2 = u(() => null !== a2.activeItemIndex.value && a2.items.value[a2.activeItemIndex.value].id === e2.id), i2 = kl(o2), d2 = u(() => ({ disabled: e2.disabled, get textValue() {
|
|
1470
1881
|
return i2();
|
|
1471
|
-
}, domRef:
|
|
1472
|
-
function
|
|
1882
|
+
}, domRef: o2 }));
|
|
1883
|
+
function c2(t3) {
|
|
1473
1884
|
if (e2.disabled)
|
|
1474
1885
|
return t3.preventDefault();
|
|
1475
|
-
|
|
1886
|
+
a2.closeMenu(), Ae(Ce(a2.buttonRef));
|
|
1476
1887
|
}
|
|
1477
|
-
function
|
|
1888
|
+
function p2() {
|
|
1478
1889
|
if (e2.disabled)
|
|
1479
|
-
return
|
|
1480
|
-
|
|
1890
|
+
return a2.goToItem(mt.Nothing);
|
|
1891
|
+
a2.goToItem(mt.Specific, e2.id);
|
|
1481
1892
|
}
|
|
1482
|
-
|
|
1483
|
-
0 ===
|
|
1893
|
+
b(() => a2.registerItem(e2.id, d2)), O(() => a2.unregisterItem(e2.id)), v(() => {
|
|
1894
|
+
0 === a2.menuState.value && r2.value && 0 !== a2.activationTrigger.value && m(() => {
|
|
1484
1895
|
var e3, t3;
|
|
1485
|
-
return null == (t3 = null == (e3 =
|
|
1896
|
+
return null == (t3 = null == (e3 = Ce(o2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1486
1897
|
});
|
|
1487
1898
|
});
|
|
1488
|
-
let
|
|
1489
|
-
function
|
|
1490
|
-
|
|
1491
|
-
}
|
|
1492
|
-
function b2(t3) {
|
|
1493
|
-
p2.wasMoved(t3) && (e2.disabled || o2.value || n2.goToItem(ye.Specific, e2.id, 0));
|
|
1899
|
+
let g2 = Ze();
|
|
1900
|
+
function f2(e3) {
|
|
1901
|
+
g2.update(e3);
|
|
1494
1902
|
}
|
|
1495
1903
|
function h2(t3) {
|
|
1496
|
-
|
|
1904
|
+
g2.wasMoved(t3) && (e2.disabled || r2.value || a2.goToItem(mt.Specific, e2.id, 0));
|
|
1905
|
+
}
|
|
1906
|
+
function y2(t3) {
|
|
1907
|
+
g2.wasMoved(t3) && (e2.disabled || r2.value && a2.goToItem(mt.Nothing));
|
|
1497
1908
|
}
|
|
1498
1909
|
return () => {
|
|
1499
|
-
let { disabled:
|
|
1500
|
-
return
|
|
1910
|
+
let { disabled: n3 } = e2, i3 = { active: r2.value, disabled: n3, close: a2.closeMenu }, { id: s2, ...u2 } = e2;
|
|
1911
|
+
return tt({ ourProps: { id: s2, ref: o2, role: "menuitem", tabIndex: true === n3 ? void 0 : -1, "aria-disabled": true === n3 || void 0, disabled: void 0, onClick: c2, onFocus: p2, onPointerenter: f2, onMouseenter: f2, onPointermove: h2, onMousemove: h2, onPointerleave: y2, onMouseleave: y2 }, theirProps: { ...l2, ...u2 }, slot: i3, attrs: l2, slots: t2, name: "MenuItem" });
|
|
1501
1912
|
};
|
|
1502
|
-
} }),
|
|
1503
|
-
function
|
|
1504
|
-
let e2 =
|
|
1913
|
+
} }), Il = Symbol("LabelContext");
|
|
1914
|
+
function Pl() {
|
|
1915
|
+
let e2 = k(Il, null);
|
|
1505
1916
|
if (null === e2) {
|
|
1506
1917
|
let e3 = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1507
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e3,
|
|
1918
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e3, Pl), e3;
|
|
1508
1919
|
}
|
|
1509
1920
|
return e2;
|
|
1510
1921
|
}
|
|
1511
|
-
function
|
|
1512
|
-
let
|
|
1513
|
-
return
|
|
1514
|
-
return
|
|
1515
|
-
let t3 =
|
|
1516
|
-
-1 !== t3 &&
|
|
1922
|
+
function jl({ slot: e2 = {}, name: t2 = "Label", props: l2 = {} } = {}) {
|
|
1923
|
+
let n2 = s([]);
|
|
1924
|
+
return S(Il, { register: function(e3) {
|
|
1925
|
+
return n2.value.push(e3), () => {
|
|
1926
|
+
let t3 = n2.value.indexOf(e3);
|
|
1927
|
+
-1 !== t3 && n2.value.splice(t3, 1);
|
|
1517
1928
|
};
|
|
1518
|
-
}, slot: e2, name: t2, props: l2 }),
|
|
1929
|
+
}, slot: e2, name: t2, props: l2 }), u(() => n2.value.length > 0 ? n2.value.join(" ") : void 0);
|
|
1519
1930
|
}
|
|
1520
|
-
let
|
|
1521
|
-
let
|
|
1522
|
-
return
|
|
1523
|
-
let { name:
|
|
1524
|
-
return s2 && (delete
|
|
1931
|
+
let Rl = w({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-label-${Se()}` } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1932
|
+
let n2 = Pl();
|
|
1933
|
+
return b(() => O(n2.register(e2.id))), () => {
|
|
1934
|
+
let { name: a2 = "Label", slot: o2 = {}, props: r2 = {} } = n2, { id: i2, passive: s2, ...u2 } = e2, c2 = { ...Object.entries(r2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: i2 };
|
|
1935
|
+
return s2 && (delete c2.onClick, delete c2.htmlFor, delete u2.onClick), tt({ ourProps: c2, theirProps: u2, slot: o2, attrs: l2, slots: t2, name: a2 });
|
|
1525
1936
|
};
|
|
1526
|
-
} }),
|
|
1527
|
-
let
|
|
1937
|
+
} }), Bl = Symbol("GroupContext"), Ll = w({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1938
|
+
let n2 = s(null), a2 = jl({ name: "SwitchLabel", props: { htmlFor: u(() => {
|
|
1528
1939
|
var e3;
|
|
1529
|
-
return null == (e3 =
|
|
1940
|
+
return null == (e3 = n2.value) ? void 0 : e3.id;
|
|
1530
1941
|
}), onClick(e3) {
|
|
1531
|
-
|
|
1532
|
-
} } }),
|
|
1533
|
-
return
|
|
1534
|
-
} }),
|
|
1535
|
-
let
|
|
1536
|
-
function
|
|
1537
|
-
i2(!
|
|
1538
|
-
}
|
|
1539
|
-
let g2 = s(null), f2 = null === r2 ? g2 : r2.switchRef, v2 = Oe(y(() => ({ as: e2.as, type: l2.type })), f2);
|
|
1540
|
-
function b2(e3) {
|
|
1541
|
-
e3.preventDefault(), u2();
|
|
1942
|
+
n2.value && ("LABEL" === e3.currentTarget.tagName && e3.preventDefault(), n2.value.click(), n2.value.focus({ preventScroll: true }));
|
|
1943
|
+
} } }), o2 = tl({ name: "SwitchDescription" });
|
|
1944
|
+
return S(Bl, { switchRef: n2, labelledby: a2, describedby: o2 }), () => tt({ theirProps: e2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "SwitchGroup" });
|
|
1945
|
+
} }), Al = w({ 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: () => `headlessui-switch-${Se()}` } }, inheritAttrs: false, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1946
|
+
let o2 = k(Bl, null), [r2, i2] = we(u(() => e2.modelValue), (e3) => t2("update:modelValue", e3), u(() => e2.defaultChecked));
|
|
1947
|
+
function d2() {
|
|
1948
|
+
i2(!r2.value);
|
|
1542
1949
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1950
|
+
let c2 = s(null), g2 = null === o2 ? c2 : o2.switchRef, f2 = Je(u(() => ({ as: e2.as, type: l2.type })), g2);
|
|
1951
|
+
function m2(e3) {
|
|
1952
|
+
e3.preventDefault(), d2();
|
|
1953
|
+
}
|
|
1954
|
+
function v2(e3) {
|
|
1955
|
+
e3.key === gt.Space ? (e3.preventDefault(), d2()) : e3.key === gt.Enter && function(e4) {
|
|
1545
1956
|
var t3, l3;
|
|
1546
|
-
let
|
|
1547
|
-
if (
|
|
1548
|
-
for (let t4 of
|
|
1957
|
+
let n3 = null != (t3 = null == e4 ? void 0 : e4.form) ? t3 : e4.closest("form");
|
|
1958
|
+
if (n3) {
|
|
1959
|
+
for (let t4 of n3.elements)
|
|
1549
1960
|
if (t4 !== e4 && ("INPUT" === t4.tagName && "submit" === t4.type || "BUTTON" === t4.tagName && "submit" === t4.type || "INPUT" === t4.nodeName && "image" === t4.type))
|
|
1550
1961
|
return void t4.click();
|
|
1551
|
-
null == (l3 =
|
|
1962
|
+
null == (l3 = n3.requestSubmit) || l3.call(n3);
|
|
1552
1963
|
}
|
|
1553
1964
|
}(e3.currentTarget);
|
|
1554
1965
|
}
|
|
1555
|
-
function
|
|
1966
|
+
function h2(e3) {
|
|
1556
1967
|
e3.preventDefault();
|
|
1557
1968
|
}
|
|
1558
|
-
|
|
1559
|
-
let
|
|
1969
|
+
a2({ el: g2, $el: g2 });
|
|
1970
|
+
let w2 = u(() => {
|
|
1560
1971
|
var e3, t3;
|
|
1561
|
-
return null == (t3 = null == (e3 =
|
|
1972
|
+
return null == (t3 = null == (e3 = Ce(g2)) ? void 0 : e3.closest) ? void 0 : t3.call(e3, "form");
|
|
1562
1973
|
});
|
|
1563
|
-
return
|
|
1564
|
-
|
|
1565
|
-
if (
|
|
1566
|
-
return
|
|
1974
|
+
return b(() => {
|
|
1975
|
+
p([w2], () => {
|
|
1976
|
+
if (w2.value && void 0 !== e2.defaultChecked)
|
|
1977
|
+
return w2.value.addEventListener("reset", t3), () => {
|
|
1567
1978
|
var e3;
|
|
1568
|
-
null == (e3 =
|
|
1979
|
+
null == (e3 = w2.value) || e3.removeEventListener("reset", t3);
|
|
1569
1980
|
};
|
|
1570
1981
|
function t3() {
|
|
1571
1982
|
i2(e2.defaultChecked);
|
|
1572
1983
|
}
|
|
1573
1984
|
}, { immediate: true });
|
|
1574
1985
|
}), () => {
|
|
1575
|
-
let { id: t3, name:
|
|
1576
|
-
return
|
|
1986
|
+
let { id: t3, name: a3, value: i3, form: s2, ...u2 } = e2, d3 = { checked: r2.value }, c3 = { id: t3, ref: g2, role: "switch", type: f2.value, tabIndex: 0, "aria-checked": r2.value, "aria-labelledby": null == o2 ? void 0 : o2.labelledby.value, "aria-describedby": null == o2 ? void 0 : o2.describedby.value, onClick: m2, onKeyup: v2, onKeypress: h2 };
|
|
1987
|
+
return y(x, [null != a3 && null != r2.value ? y(st, ot({ features: it.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: r2.value, form: s2, name: a3, value: i3 })) : null, tt({ ourProps: c3, theirProps: { ...l2, ...rt(u2, ["modelValue", "defaultChecked"]) }, slot: d3, attrs: l2, slots: n2, name: "Switch" })]);
|
|
1577
1988
|
};
|
|
1578
|
-
} }),
|
|
1579
|
-
function
|
|
1989
|
+
} }), Fl = Rl;
|
|
1990
|
+
function Nl(e2, ...t2) {
|
|
1580
1991
|
e2 && t2.length > 0 && e2.classList.add(...t2);
|
|
1581
1992
|
}
|
|
1582
|
-
function
|
|
1993
|
+
function zl(e2, ...t2) {
|
|
1583
1994
|
e2 && t2.length > 0 && e2.classList.remove(...t2);
|
|
1584
1995
|
}
|
|
1585
|
-
var
|
|
1586
|
-
function
|
|
1587
|
-
let
|
|
1996
|
+
var $l = ((e2) => (e2.Finished = "finished", e2.Cancelled = "cancelled", e2))($l || {});
|
|
1997
|
+
function Hl(e2, t2, l2, n2, a2, o2) {
|
|
1998
|
+
let r2 = ht(), i2 = void 0 !== o2 ? function(e3) {
|
|
1588
1999
|
let t3 = { called: false };
|
|
1589
2000
|
return (...l3) => {
|
|
1590
2001
|
if (!t3.called)
|
|
1591
2002
|
return t3.called = true, e3(...l3);
|
|
1592
2003
|
};
|
|
1593
|
-
}(
|
|
2004
|
+
}(o2) : () => {
|
|
1594
2005
|
};
|
|
1595
|
-
return
|
|
1596
|
-
|
|
1597
|
-
let l3 =
|
|
2006
|
+
return zl(e2, ...a2), Nl(e2, ...t2, ...l2), r2.nextFrame(() => {
|
|
2007
|
+
zl(e2, ...l2), Nl(e2, ...n2), r2.add(function(e3, t3) {
|
|
2008
|
+
let l3 = ht();
|
|
1598
2009
|
if (!e3)
|
|
1599
2010
|
return l3.dispose;
|
|
1600
|
-
let { transitionDuration:
|
|
2011
|
+
let { transitionDuration: n3, transitionDelay: a3 } = getComputedStyle(e3), [o3, r3] = [n3, a3].map((e4) => {
|
|
1601
2012
|
let [t4 = 0] = e4.split(",").filter(Boolean).map((e5) => e5.includes("ms") ? parseFloat(e5) : 1e3 * parseFloat(e5)).sort((e5, t5) => t5 - e5);
|
|
1602
2013
|
return t4;
|
|
1603
2014
|
});
|
|
1604
|
-
return 0 !==
|
|
1605
|
-
}(e2, (l3) => (
|
|
1606
|
-
}),
|
|
2015
|
+
return 0 !== o3 ? l3.setTimeout(() => t3("finished"), o3 + r3) : t3("finished"), l3.add(() => t3("cancelled")), l3.dispose;
|
|
2016
|
+
}(e2, (l3) => (zl(e2, ...n2, ...t2), Nl(e2, ...a2), i2(l3))));
|
|
2017
|
+
}), r2.add(() => zl(e2, ...t2, ...l2, ...n2, ...a2)), r2.add(() => i2("cancelled")), r2.dispose;
|
|
1607
2018
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return e2.split(
|
|
2019
|
+
function Vl(e2 = "") {
|
|
2020
|
+
return e2.split(/\s+/).filter((e3) => e3.length > 1);
|
|
1610
2021
|
}
|
|
1611
|
-
let
|
|
1612
|
-
var
|
|
1613
|
-
let
|
|
1614
|
-
function
|
|
1615
|
-
return "children" in e2 ?
|
|
2022
|
+
let Yl = Symbol("TransitionContext");
|
|
2023
|
+
var Ul = ((e2) => (e2.Visible = "visible", e2.Hidden = "hidden", e2))(Ul || {});
|
|
2024
|
+
let ql = Symbol("NestingContext");
|
|
2025
|
+
function Wl(e2) {
|
|
2026
|
+
return "children" in e2 ? Wl(e2.children) : e2.value.filter(({ state: e3 }) => "visible" === e3).length > 0;
|
|
1616
2027
|
}
|
|
1617
|
-
function
|
|
2028
|
+
function Kl(e2) {
|
|
1618
2029
|
let t2 = s([]), l2 = s(false);
|
|
1619
|
-
function
|
|
1620
|
-
let
|
|
1621
|
-
-1 !==
|
|
1622
|
-
t2.value.splice(
|
|
1623
|
-
}, [
|
|
1624
|
-
t2.value[
|
|
1625
|
-
} }), !
|
|
1626
|
-
}
|
|
1627
|
-
return
|
|
2030
|
+
function n2(n3, a2 = et.Hidden) {
|
|
2031
|
+
let o2 = t2.value.findIndex(({ id: e3 }) => e3 === n3);
|
|
2032
|
+
-1 !== o2 && (Oe(a2, { [et.Unmount]() {
|
|
2033
|
+
t2.value.splice(o2, 1);
|
|
2034
|
+
}, [et.Hidden]() {
|
|
2035
|
+
t2.value[o2].state = "hidden";
|
|
2036
|
+
} }), !Wl(t2) && l2.value && (null == e2 || e2()));
|
|
2037
|
+
}
|
|
2038
|
+
return b(() => l2.value = true), O(() => l2.value = false), { children: t2, register: function(e3) {
|
|
1628
2039
|
let l3 = t2.value.find(({ id: t3 }) => t3 === e3);
|
|
1629
|
-
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () =>
|
|
1630
|
-
}, unregister:
|
|
2040
|
+
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => n2(e3, et.Unmount);
|
|
2041
|
+
}, unregister: n2 };
|
|
1631
2042
|
}
|
|
1632
|
-
let
|
|
1633
|
-
let
|
|
2043
|
+
let Jl = Qe.RenderStrategy, Gl = w({ 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 }) {
|
|
2044
|
+
let r2 = s(0);
|
|
1634
2045
|
function i2() {
|
|
1635
|
-
|
|
2046
|
+
r2.value |= dt.Opening, t2("beforeEnter");
|
|
1636
2047
|
}
|
|
1637
|
-
function
|
|
1638
|
-
|
|
2048
|
+
function d2() {
|
|
2049
|
+
r2.value &= ~dt.Opening, t2("afterEnter");
|
|
1639
2050
|
}
|
|
1640
2051
|
function c2() {
|
|
1641
|
-
|
|
2052
|
+
r2.value |= dt.Closing, t2("beforeLeave");
|
|
1642
2053
|
}
|
|
1643
|
-
function
|
|
1644
|
-
|
|
1645
|
-
}
|
|
1646
|
-
if (null ===
|
|
1647
|
-
return () =>
|
|
1648
|
-
let
|
|
1649
|
-
|
|
1650
|
-
let { show:
|
|
1651
|
-
let e3 =
|
|
2054
|
+
function g2() {
|
|
2055
|
+
r2.value &= ~dt.Closing, t2("afterLeave");
|
|
2056
|
+
}
|
|
2057
|
+
if (null === k(Yl, null) && null !== ct())
|
|
2058
|
+
return () => y(Xl, { ...e2, onBeforeEnter: i2, onAfterEnter: d2, onBeforeLeave: c2, onAfterLeave: g2 }, a2);
|
|
2059
|
+
let f2 = s(null), m2 = u(() => e2.unmount ? et.Unmount : et.Hidden);
|
|
2060
|
+
o2({ el: f2, $el: f2 });
|
|
2061
|
+
let { show: h2, appear: x2 } = function() {
|
|
2062
|
+
let e3 = k(Yl, null);
|
|
1652
2063
|
if (null === e3)
|
|
1653
2064
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1654
2065
|
return e3;
|
|
1655
|
-
}(), { register:
|
|
1656
|
-
let e3 =
|
|
2066
|
+
}(), { register: w2, unregister: C2 } = function() {
|
|
2067
|
+
let e3 = k(ql, null);
|
|
1657
2068
|
if (null === e3)
|
|
1658
2069
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1659
2070
|
return e3;
|
|
1660
|
-
}(),
|
|
1661
|
-
!
|
|
2071
|
+
}(), M2 = s(h2.value ? "visible" : "hidden"), T2 = { value: true }, E2 = Se(), D2 = { value: false }, _2 = Kl(() => {
|
|
2072
|
+
!D2.value && "hidden" !== M2.value && (M2.value = "hidden", C2(E2), g2());
|
|
1662
2073
|
});
|
|
1663
|
-
|
|
1664
|
-
let e3 =
|
|
1665
|
-
|
|
1666
|
-
}),
|
|
1667
|
-
if (
|
|
1668
|
-
if (
|
|
1669
|
-
return void (
|
|
1670
|
-
|
|
2074
|
+
b(() => {
|
|
2075
|
+
let e3 = w2(E2);
|
|
2076
|
+
O(e3);
|
|
2077
|
+
}), v(() => {
|
|
2078
|
+
if (m2.value === et.Hidden && E2) {
|
|
2079
|
+
if (h2.value && "visible" !== M2.value)
|
|
2080
|
+
return void (M2.value = "visible");
|
|
2081
|
+
Oe(M2.value, { hidden: () => C2(E2), visible: () => w2(E2) });
|
|
1671
2082
|
}
|
|
1672
2083
|
});
|
|
1673
|
-
let
|
|
1674
|
-
return
|
|
1675
|
-
|
|
1676
|
-
if ("visible" ===
|
|
1677
|
-
let e3 =
|
|
2084
|
+
let I2 = Vl(e2.enter), P2 = Vl(e2.enterFrom), j2 = Vl(e2.enterTo), R2 = Vl(e2.entered), B2 = Vl(e2.leave), L2 = Vl(e2.leaveFrom), A2 = Vl(e2.leaveTo);
|
|
2085
|
+
return b(() => {
|
|
2086
|
+
v(() => {
|
|
2087
|
+
if ("visible" === M2.value) {
|
|
2088
|
+
let e3 = Ce(f2);
|
|
1678
2089
|
if (e3 instanceof Comment && "" === e3.data)
|
|
1679
2090
|
throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1680
2091
|
}
|
|
1681
2092
|
});
|
|
1682
|
-
}),
|
|
1683
|
-
|
|
2093
|
+
}), b(() => {
|
|
2094
|
+
p([h2], (e3, t3, l3) => {
|
|
1684
2095
|
(function(e4) {
|
|
1685
|
-
let t4 =
|
|
1686
|
-
!l4 || !(l4 instanceof HTMLElement) || t4 || (
|
|
1687
|
-
|
|
1688
|
-
}) :
|
|
1689
|
-
|
|
2096
|
+
let t4 = T2.value && !x2.value, l4 = Ce(f2);
|
|
2097
|
+
!l4 || !(l4 instanceof HTMLElement) || t4 || (D2.value = true, h2.value && i2(), h2.value || c2(), e4(h2.value ? Hl(l4, I2, P2, j2, R2, (e5) => {
|
|
2098
|
+
D2.value = false, e5 === $l.Finished && d2();
|
|
2099
|
+
}) : Hl(l4, B2, L2, A2, R2, (e5) => {
|
|
2100
|
+
D2.value = false, e5 === $l.Finished && (Wl(_2) || (M2.value = "hidden", C2(E2), g2()));
|
|
1690
2101
|
})));
|
|
1691
|
-
})(l3),
|
|
2102
|
+
})(l3), T2.value = false;
|
|
1692
2103
|
}, { immediate: true });
|
|
1693
|
-
}),
|
|
1694
|
-
let { appear: t3, show:
|
|
1695
|
-
return
|
|
2104
|
+
}), S(ql, _2), pt(u(() => Oe(M2.value, { visible: dt.Open, hidden: dt.Closed }) | r2.value)), () => {
|
|
2105
|
+
let { appear: t3, show: o3, enter: r3, enterFrom: i3, enterTo: s2, entered: u2, leave: d3, leaveFrom: c3, leaveTo: p2, ...g3 } = e2, m3 = { ref: f2 };
|
|
2106
|
+
return tt({ theirProps: { ...g3, ...x2.value && h2.value && Ee.isServer ? { class: n([l2.class, g3.class, ...I2, ...P2]) } : {} }, ourProps: m3, slot: {}, slots: a2, attrs: l2, features: Jl, visible: "visible" === M2.value, name: "TransitionChild" });
|
|
1696
2107
|
};
|
|
1697
|
-
} }),
|
|
1698
|
-
let
|
|
1699
|
-
|
|
1700
|
-
if (![true, false].includes(
|
|
2108
|
+
} }), Zl = Gl, Xl = w({ 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 }) {
|
|
2109
|
+
let a2 = ct(), o2 = u(() => null === e2.show && null !== a2 ? (a2.value & dt.Open) === dt.Open : e2.show);
|
|
2110
|
+
v(() => {
|
|
2111
|
+
if (![true, false].includes(o2.value))
|
|
1701
2112
|
throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
1702
2113
|
});
|
|
1703
|
-
let
|
|
1704
|
-
|
|
1705
|
-
}),
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1708
|
-
|
|
2114
|
+
let r2 = s(o2.value ? "visible" : "hidden"), i2 = Kl(() => {
|
|
2115
|
+
r2.value = "hidden";
|
|
2116
|
+
}), d2 = s(true), c2 = { show: o2, appear: u(() => e2.appear || !d2.value) };
|
|
2117
|
+
return b(() => {
|
|
2118
|
+
v(() => {
|
|
2119
|
+
d2.value = false, o2.value ? r2.value = "visible" : Wl(i2) || (r2.value = "hidden");
|
|
1709
2120
|
});
|
|
1710
|
-
}),
|
|
1711
|
-
let
|
|
1712
|
-
return
|
|
2121
|
+
}), S(ql, i2), S(Yl, c2), () => {
|
|
2122
|
+
let a3 = rt(e2, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), o3 = { unmount: e2.unmount };
|
|
2123
|
+
return tt({ ourProps: { ...o3, as: "template" }, theirProps: {}, slot: {}, slots: { ...n2, default: () => [y(Zl, { onBeforeEnter: () => t2("beforeEnter"), onAfterEnter: () => t2("afterEnter"), onBeforeLeave: () => t2("beforeLeave"), onAfterLeave: () => t2("afterLeave"), ...l2, ...o3, ...a3 }, n2.default)] }, attrs: {}, features: Jl, visible: "visible" === r2.value, name: "Transition" });
|
|
1713
2124
|
};
|
|
1714
2125
|
} });
|
|
1715
|
-
function
|
|
1716
|
-
return e(),
|
|
2126
|
+
function Ql(t2, l2) {
|
|
2127
|
+
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" })]);
|
|
1717
2128
|
}
|
|
1718
|
-
function
|
|
1719
|
-
return e(),
|
|
2129
|
+
function en(t2, l2) {
|
|
2130
|
+
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" })]);
|
|
1720
2131
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return e(),
|
|
2132
|
+
function tn(t2, l2) {
|
|
2133
|
+
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" })]);
|
|
1723
2134
|
}
|
|
1724
|
-
function
|
|
1725
|
-
return e(),
|
|
2135
|
+
function ln(t2, l2) {
|
|
2136
|
+
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" })]);
|
|
1726
2137
|
}
|
|
1727
|
-
function
|
|
1728
|
-
return e(),
|
|
2138
|
+
function nn(t2, l2) {
|
|
2139
|
+
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" })]);
|
|
1729
2140
|
}
|
|
1730
|
-
function
|
|
1731
|
-
return e(),
|
|
2141
|
+
function an(t2, l2) {
|
|
2142
|
+
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" })]);
|
|
1732
2143
|
}
|
|
1733
|
-
function
|
|
1734
|
-
return e(),
|
|
2144
|
+
function on(t2, l2) {
|
|
2145
|
+
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" })]);
|
|
1735
2146
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return e(),
|
|
2147
|
+
function rn(t2, l2) {
|
|
2148
|
+
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" })]);
|
|
1738
2149
|
}
|
|
1739
|
-
function
|
|
1740
|
-
return e(),
|
|
2150
|
+
function sn(t2, l2) {
|
|
2151
|
+
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" })]);
|
|
1741
2152
|
}
|
|
1742
|
-
function
|
|
1743
|
-
return e(),
|
|
2153
|
+
function un(t2, l2) {
|
|
2154
|
+
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" })]);
|
|
1744
2155
|
}
|
|
1745
|
-
function
|
|
1746
|
-
return e(),
|
|
2156
|
+
function dn(t2, l2) {
|
|
2157
|
+
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" })]);
|
|
1747
2158
|
}
|
|
1748
|
-
function
|
|
1749
|
-
return e(),
|
|
2159
|
+
function cn(t2, l2) {
|
|
2160
|
+
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" })]);
|
|
1750
2161
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return e(),
|
|
2162
|
+
function pn(t2, l2) {
|
|
2163
|
+
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" })]);
|
|
1753
2164
|
}
|
|
1754
|
-
function
|
|
1755
|
-
return e(),
|
|
2165
|
+
function gn(t2, l2) {
|
|
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: "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" })]);
|
|
1756
2167
|
}
|
|
1757
|
-
function
|
|
1758
|
-
return e(),
|
|
2168
|
+
function fn(t2, l2) {
|
|
2169
|
+
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" })]);
|
|
1759
2170
|
}
|
|
1760
|
-
function
|
|
1761
|
-
return e(),
|
|
2171
|
+
function mn(t2, l2) {
|
|
2172
|
+
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" })]);
|
|
1762
2173
|
}
|
|
1763
|
-
const
|
|
1764
|
-
const s2 =
|
|
1765
|
-
let e2 =
|
|
1766
|
-
return e2 ? e2.name :
|
|
2174
|
+
const vn = { class: "py-1" }, bn = ["onClick"], hn = { key: 1, class: "animate-pulse px-4 py-2 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left" }, yn = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1), xn = { name: "uiDropdown" }, wn = Object.assign(xn, { 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 }) {
|
|
2175
|
+
const s2 = r2, c2 = l2, p2 = u(() => {
|
|
2176
|
+
let e2 = c2.items.find((e3) => true === e3.active);
|
|
2177
|
+
return e2 ? e2.name : c2.label;
|
|
1767
2178
|
});
|
|
1768
|
-
return (
|
|
1769
|
-
|
|
1770
|
-
})(l3), class:
|
|
1771
|
-
} }),
|
|
2179
|
+
return (r3, u2) => l2.loading ? (e(), a("div", hn, [yn, o(d(nn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-200 dark:text-gray-300" })])) : (e(), t(d(Tl), { key: 0, as: "div", class: n(["relative inline-block text-left", { "opacity-25": l2.disabled }]) }, { default: D(() => [i("div", null, [o(d(El), { 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: D(() => [_(I(p2.value) + " ", 1), o(d(nn), { "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: D(() => [l2.disabled ? R("", true) : (e(), t(d(Dl), { 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: D(() => [i("div", vn, [(e(true), a(x, null, j(l2.items, (l3, a2) => (e(), t(d(_l), { key: a2 }, { default: D(() => [i("a", { onClick: (e2) => ((e3) => {
|
|
2180
|
+
c2.disabled || s2("optionSelected", e3.value);
|
|
2181
|
+
})(l3), class: n([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, I(l3.name), 11, bn)]), _: 2 }, 1024))), 128))])]), _: 1 }, 8, ["class"]))]), _: 1 })]), _: 1 }, 8, ["class"]));
|
|
2182
|
+
} }), kn = { key: 0 }, Sn = { class: "flex justify-between" }, Cn = { key: 0, class: "block text-sm font-medium text-gray-700" }, On = { key: 1, class: "text-[10px] text-gray-500 uppercase justify-self-end" }, Mn = ["disabled", "name", "placeholder", "type"], Tn = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" }, En = { key: 1, class: "animate-pulse" }, Dn = { 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" }, _n = 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), In = { name: "uiInput" }, Pn = Object.assign(In, { props: { label: String, type: { type: String, default: "text" }, name: String, placeholder: { type: String, default: "..." }, icon: { type: Function, default: () => {
|
|
1772
2183
|
} }, 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 }) {
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1775
|
-
},
|
|
1776
|
-
return
|
|
1777
|
-
|
|
1778
|
-
}), (l3,
|
|
1779
|
-
} }),
|
|
1780
|
-
return e(),
|
|
2184
|
+
const r2 = l2, u2 = t2, c2 = (e2) => {
|
|
2185
|
+
r2("inputChanged", { value: e2.target.value, name: e2.target.name });
|
|
2186
|
+
}, g2 = s(u2.value);
|
|
2187
|
+
return p(() => u2.value, (e2) => {
|
|
2188
|
+
g2.value = e2, r2("inputChanged", { name: u2.name, inputValue: g2.value });
|
|
2189
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", En, [void 0 !== t2.label ? (e(), a("div", Dn)) : R("", true), _n])) : (e(), a("div", kn, [i("div", Sn, [t2.label ? (e(), a("label", Cn, I(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", On, I(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" }, I(t2.addOn), 1)) : R("", true), B(i("input", { "onUpdate:modelValue": r3[1] || (r3[1] = (e2) => g2.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: c2 }, null, 42, Mn), [[L, g2.value]]), t2.rightAddOn ? (e(), a("span", { key: 1, onClick: r3[2] || (r3[2] = (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" }, I(t2.rightAddOn), 1)) : R("", true), t2.icon ? (e(), a("div", Tn, [o(W, { icon: t2.icon, color: t2.color, loading: t2.loading }, null, 8, ["icon", "color", "loading"]), B(o(W, { icon: d(ln), color: "green", loading: t2.loading }, null, 8, ["icon", "loading"]), [[A, "success" === t2.color]]), B(o(W, { icon: d(un), color: "yellow", loading: t2.loading }, null, 8, ["icon", "loading"]), [[A, "warning" === t2.color]]), B(o(W, { icon: d(mn), color: "red", loading: t2.loading }, null, 8, ["icon", "loading"]), [[A, "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"]) }, I(t2.error), 3), [[A, t2.error]])]));
|
|
2190
|
+
} }), jn = { key: 0 }, Rn = { class: "flex justify-between" }, Bn = { key: 0, class: "block text-sm font-medium text-gray-700" }, Ln = { key: 1, class: "text-[10px] text-gray-500 uppercase" }, An = { class: "space-y-1 flex flex-col items-center justify-center" }, Fn = { class: "flex text-sm text-gray-600 flex flex-col sm:flex-row text-center" }, Nn = { 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" }, zn = ["accept"], $n = { class: "pl-1" }, Hn = { class: "text-xs text-gray-500 pb-4" }, Vn = { class: "mt-2 text-xs flex flex-row items-center text-red-300" }, Yn = { key: 1, class: "animate-pulse" }, Un = [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)], qn = { name: "uiInputFile" }, Wn = Object.assign(qn, { props: { name: String, label: String, optional: String, placeholder: String, dragAndDrop: String, fileTypesAndSizes: String, error: String, accept: String, icon: { type: Function, default: function(t2, l2) {
|
|
2191
|
+
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" })]);
|
|
1781
2192
|
} }, loading: { type: Boolean, default: true } }, emits: ["filesUploaded"], setup(t2, { emit: l2 }) {
|
|
1782
|
-
const
|
|
2193
|
+
const r2 = s(""), u2 = l2, c2 = t2, p2 = (e2) => {
|
|
1783
2194
|
let t3 = e2.dataTransfer.files;
|
|
1784
|
-
u2("filesUploaded", t3),
|
|
1785
|
-
},
|
|
1786
|
-
u2("filesUploaded", e2.target.files),
|
|
2195
|
+
u2("filesUploaded", t3), c2.filename = t3[0].name;
|
|
2196
|
+
}, g2 = (e2) => {
|
|
2197
|
+
u2("filesUploaded", e2.target.files), c2.filename = e2.target.files[0].name;
|
|
1787
2198
|
};
|
|
1788
|
-
return (l3, s2) => t2.loading ? (e(),
|
|
1789
|
-
}, ["prevent"])), onDrop:
|
|
1790
|
-
} }),
|
|
1791
|
-
const
|
|
1792
|
-
return (
|
|
1793
|
-
} }),
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1796
|
-
},
|
|
1797
|
-
return
|
|
1798
|
-
|
|
1799
|
-
}), (l3,
|
|
1800
|
-
} }),
|
|
1801
|
-
const
|
|
1802
|
-
return (s2, u2) => l2.loading ? (e(),
|
|
1803
|
-
} }),
|
|
2199
|
+
return (l3, s2) => t2.loading ? (e(), a("div", Yn, Un)) : (e(), a("div", jn, [i("div", Rn, [t2.label ? (e(), a("label", Bn, I(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", Ln, I(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(() => {
|
|
2200
|
+
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div", An, [o(W, { icon: t2.icon, size: "massive", color: "gray", "aria-hidden": "true", class: "mb-4", loading: t2.loading }, null, 8, ["icon", "loading"]), i("div", Fn, [i("label", Nn, [i("span", null, I(t2.placeholder), 1), i("input", { id: "file-upload", name: "file-upload", type: "file", class: "sr-only", accept: t2.accept, onChange: g2 }, null, 40, zn)]), i("p", $n, I(t2.dragAndDrop), 1)]), i("p", Hn, I(t2.fileTypesAndSizes), 1), B(i("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, I(r2.value), 513), [[A, "" !== r2.value]])])], 34), B(i("p", Vn, [o(W, { icon: d(fn), color: "red", class: "mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), _(I(t2.error), 1)], 512), [[A, t2.error]])]));
|
|
2201
|
+
} }), Kn = { class: "relative mt-1" }, Jn = { key: 1, class: "animate-pulse px-4 py-2.5 bg-gray-200 rounded-md flex justify-between items-center w-full" }, Gn = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1), Zn = { name: "uiSelect" }, Xn = Object.assign(Zn, { props: { items: { type: Array, required: true }, label: String, select: Object, loading: { type: Boolean, default: true } }, emits: ["selectChanged"], setup(l2, { emit: r2 }) {
|
|
2202
|
+
const c2 = s(""), p2 = r2, g2 = l2, f2 = u(() => "" === c2.value ? g2.items : g2.items.filter((e2) => e2.name.toLowerCase().includes(c2.value.toLowerCase()))), m2 = u(() => g2.select);
|
|
2203
|
+
return (r3, s2) => l2.loading ? (e(), a("div", Jn, [Gn, o(d(rn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-300 dark:text-gray-400" })])) : (e(), t(d(Dt), { key: 0, modelValue: m2.value, "onUpdate:modelValue": [s2[1] || (s2[1] = (e2) => m2.value = e2), s2[2] || (s2[2] = (e2) => p2("selectChanged", e2))], as: "div" }, { default: D(() => [o(d(_t), { class: "block text-sm font-medium text-gray-700" }, { default: D(() => [_(I(l2.label), 1)]), _: 1 }), i("div", Kn, [o(d(Pt), { "display-value": (e2) => e2 == null ? void 0 : e2.name, class: "w-full rounded-md border border-gray-300 bg-white 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"]), o(d(It), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, { default: D(() => [o(d(rn), { "aria-hidden": "true", class: "h-5 w-5 text-gray-400" })]), _: 1 }), f2.value.length > 0 ? (e(), t(d(jt), { 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: D(() => [(e(true), a(x, null, j(f2.value, (l3) => (e(), t(d(Rt), { key: l3.id, value: l3, as: "template" }, { default: D(({ 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"]) }, I(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(ln), { "aria-hidden": "true", class: "h-5 w-5", loading: true })], 2)) : R("", true)], 2)]), _: 2 }, 1032, ["value"]))), 128))]), _: 1 })) : R("", true)])]), _: 1 }, 8, ["modelValue"]));
|
|
2204
|
+
} }), Qn = { key: 1, class: "inline-flex items-center px-3 py-2.5 rounded text-xs font-medium leading-none animate-pulse bg-gray-200" }, ea = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" }, null, -1)], ta = { name: "uiTag" }, la = Object.assign(ta, { props: { color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("div", Qn, ea)) : (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)) }), na = { key: 0 }, aa = { key: 0, class: "block text-sm font-medium text-gray-700" }, oa = ["disabled", "placeholder"], ra = { key: 1, class: "animate-pulse" }, ia = [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)], sa = { name: "uiTextArea" }, ua = Object.assign(sa, { 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 }) {
|
|
2205
|
+
const r2 = l2, u2 = t2, c2 = (e2) => {
|
|
2206
|
+
r2("inputChanged", e2.target.value);
|
|
2207
|
+
}, g2 = s(u2.value);
|
|
2208
|
+
return p(() => u2.value, (e2) => {
|
|
2209
|
+
g2.value = e2, r2("inputChanged", e2);
|
|
2210
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", ra, ia)) : (e(), a("div", na, [t2.label ? (e(), a("label", aa, I(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, oa), [[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(W, { icon: d(fn), color: "red", class: "mr-2" }, null, 8, ["icon"]), _(I(t2.error), 1)], 2), [[A, t2.error]])]));
|
|
2211
|
+
} }), da = { class: "text-sm font-medium text-gray-900" }, ca = { key: 0, class: "text-sm text-gray-500 ml-2" }, pa = { key: 1, class: "animate-pulse flex items-center" }, ga = [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)], fa = { name: "uiToggle" }, ma = Object.assign(fa, { props: { item: { type: Object, required: true }, checked: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup(l2) {
|
|
2212
|
+
const r2 = s(l2.checked);
|
|
2213
|
+
return (s2, u2) => l2.loading ? (e(), a("div", pa, ga)) : (e(), t(d(Ll), { key: 0, as: "div", class: "flex items-center relative" }, { default: D(() => [o(d(Al), { 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: D(() => [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(Fl), { as: "span", class: "ml-3" }, { default: D(() => [i("span", da, I(l2.item.title), 1), l2.item.subtitle ? (e(), a("span", ca, I(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)) }, I(l2.item.action), 1)) : R("", true)]), _: 1 }));
|
|
2214
|
+
} }), va = { key: 0, class: "flex flex-col" }, ba = { class: "flex" }, ha = { class: "flex-shrink-0" }, ya = { class: "ml-3" }, xa = { class: "mt-4" }, wa = { class: "-mx-2 -my-1.5 flex" }, ka = ["onClick"], Sa = { key: 1, class: "flex flex-col animate-pulse" }, Ca = [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)], Oa = { name: "uiAlert" }, Ma = Object.assign(Oa, { 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", Sa, Ca)) : (e(), a("div", va, [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", ba, [i("div", ha, ["info" === l2.type ? (e(), t(d(pn), { key: 0, class: "h-8 w-8 text-indigo-400", "aria-hidden": "true" })) : R("", true), "danger" === l2.type ? (e(), t(d(fn), { key: 1, class: "h-8 w-8 text-red-400", "aria-hidden": "true" })) : R("", true), "warning" === l2.type ? (e(), t(d(un), { key: 2, class: "h-8 w-8 text-yellow-400", "aria-hidden": "true" })) : R("", true), "success" === l2.type ? (e(), t(d(tn), { key: 3, class: "h-8 w-8 text-green-400", "aria-hidden": "true" })) : R("", true)]), i("div", ya, [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"]) }, I(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", xa, [i("div", wa, [(e(true), a(x, 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"]) }, I(t2.name), 11, ka))), 128))])])])])], 2)])) }), Ta = { key: 0, class: "inline-flex", "aria-label": "Breadcrumb" }, Ea = { role: "list", class: "flex items-center space-x-4 text-xs" }, Da = { key: 0 }, _a = ["onClick"], Ia = { key: 1, class: "flex items-center" }, Pa = ["onClick", "aria-current"], ja = { key: 1, class: "flex flex-row items-center animate-pulse" }, Ra = [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)], Ba = { name: "uiBreadcrumbs" }, La = Object.assign(Ba, { props: { pages: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => t2.loading ? (e(), a("div", ja, Ra)) : (e(), a("nav", Ta, [i("ol", Ea, [(e(true), a(x, null, j(t2.pages, (t3, r3) => (e(), a("li", { key: r3 }, [0 === r3 ? (e(), a("div", Da, [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(cn), { class: "flex-shrink-0 h-3 w-3 text-gray-400 mr-4", "aria-hidden": "true" }), i("span", null, I(t3.name), 1)], 8, _a)])) : (e(), a("div", Ia, [o(d(on), { 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" : "" }, I(t3.name), 11, Pa)]))]))), 128))])])) }), Aa = { class: "flex items-center flex-col sm:flex-row justify-center sm:justify-start" }, Fa = ["src"], Na = { class: "font-bold text-center sm:text-left" }, za = { class: "mt-1 text-xs text-center sm:text-left" }, $a = { key: 0, class: "flex flex-wrap mt-4 justify-center sm:justify-start" }, Ha = { key: 1, class: "rounded-lg bg-white shadow p-6 cursor-pointer animate-pulse" }, Va = [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)], Ya = { name: "uiCard" }, Ua = Object.assign(Ya, { 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) => {
|
|
1804
2215
|
var _a2;
|
|
1805
|
-
return l2.loading ? (e(),
|
|
1806
|
-
} }),
|
|
1807
|
-
const
|
|
1808
|
-
return (
|
|
1809
|
-
|
|
2216
|
+
return l2.loading ? (e(), a("div", Ha, Va)) : (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", Aa, [i("img", { class: "w-16 h-16 rounded-full mb-4 sm:mb-0 sm:mr-4", src: l2.logo }, null, 8, Fa), i("div", null, [i("h4", Na, I(l2.name), 1), i("p", za, I(l2.type), 1)])]), ((_a2 = l2.tags) == null ? void 0 : _a2.length) > 0 ? (e(), a("div", $a, [(e(true), a(x, null, j(l2.tags, (n3) => (e(), t(la, { class: "mb-1 mr-1", key: n3.name, color: n3.color, loading: l2.loading }, { default: D(() => [_(I(n3.name), 1)]), _: 2 }, 1032, ["color", "loading"]))), 128))])) : R("", true)]));
|
|
2217
|
+
} }), qa = { name: "uiFilter" }, Wa = Object.assign(qa, { 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 }) {
|
|
2218
|
+
const a2 = n2, o2 = s(l2.items);
|
|
2219
|
+
return (n3, r2) => (e(), t(wn, { loading: l2.loading, onOptionSelected: r2[0] || (r2[0] = (e2) => ((e3) => {
|
|
2220
|
+
o2.value.forEach((t2) => {
|
|
1810
2221
|
t2.value !== e3 ? t2.active = false : t2.active = true;
|
|
1811
|
-
}),
|
|
1812
|
-
})(e2)), position: l2.position, items:
|
|
1813
|
-
} }),
|
|
1814
|
-
const u2 = l2,
|
|
1815
|
-
|
|
2222
|
+
}), a2("filterSelected", e3);
|
|
2223
|
+
})(e2)), position: l2.position, items: o2.value, label: l2.label }, null, 8, ["loading", "position", "items", "label"]));
|
|
2224
|
+
} }), Ka = i("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), Ja = { class: "fixed inset-0 z-10 overflow-y-auto" }, Ga = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Za = { class: "absolute top-0 right-0 hidden pt-4 pr-4 sm:block" }, Xa = i("span", { class: "sr-only" }, "X", -1), Qa = { class: "sm:flex sm:items-start" }, eo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left sm:mr-4" }, to = { class: "mt-4 text-gray-500 text-sm" }, lo = { key: 0, class: "mt-8" }, no = ["onClick"], ao = { name: "uiModal" }, oo = Object.assign(ao, { 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 }) {
|
|
2225
|
+
const u2 = l2, c2 = s2, p2 = (e2) => {
|
|
2226
|
+
c2("modalAction", { modal: u2.modalName, action: e2 });
|
|
1816
2227
|
};
|
|
1817
|
-
return (s3, u3) => (e(), t(
|
|
1818
|
-
} }),
|
|
1819
|
-
const l2 = t2,
|
|
1820
|
-
return (l3, s2) => (e(),
|
|
1821
|
-
} }),
|
|
2228
|
+
return (s3, u3) => (e(), t(d(Xl), { as: "template", show: l2.open }, { default: D(() => [o(d(dl), { as: "div", class: "relative z-10", onClose: u3[1] || (u3[1] = (e2) => p2("close")) }, { default: D(() => [o(d(Gl), { 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: D(() => [Ka]), _: 1 }), i("div", Ja, [i("div", Ga, [o(d(Gl), { 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: D(() => [o(d(cl), { 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: D(() => [i("div", Za, [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")) }, [Xa, o(W, { icon: d(mn), "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])])]), i("div", Qa, [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(mn), { class: "h-6 w-6 text-red-600", "aria-hidden": "true" }, null, 512), [[A, "danger" === l2.type]]), B(o(d(ln), { class: "h-6 w-6 text-green-600", "aria-hidden": "true" }, null, 512), [[A, "success" === l2.type]]), B(o(d(un), { class: "h-6 w-6 text-yellow-600", "aria-hidden": "true" }, null, 512), [[A, "warning" === l2.type]]), B(o(d(dn), { class: "h-6 w-6 text-indigo-600", "aria-hidden": "true" }, null, 512), [[A, "default" === l2.type]])], 2), i("div", eo, [o(d(pl), { as: "h3", class: "text-lg font-medium leading-6 text-gray-900" }, { default: D(() => [_(I(l2.title), 1)]), _: 1 }), i("div", to, [r(s3.$slots, "default")]), l2.actions ? (e(), a("div", lo, [(e(true), a(x, 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) }, I(t2.name), 9, no))), 128))])) : R("", true)])])]), _: 3 })]), _: 3 })])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2229
|
+
} }), ro = { class: "w-full flex flex-col items-center space-y-4 sm:items-end" }, io = { 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" }, so = { class: "p-4" }, uo = { class: "flex items-start" }, co = { class: "flex-shrink-0 mt-0.5" }, po = { class: "ml-3 w-0 flex-1 pt-0.5" }, go = { class: "font-medium text-gray-900" }, fo = { class: "mt-1 text-sm text-gray-500" }, mo = { class: "ml-4 flex-shrink-0 flex" }, vo = i("span", { class: "sr-only" }, "Close", -1), bo = { name: "uiNotification" }, ho = Object.assign(bo, { props: { show: Boolean, type: { type: String, default: "info" }, title: String, message: String, fixed: { type: Boolean, default: true } }, setup(t2) {
|
|
2230
|
+
const l2 = t2, r2 = u(() => l2.show);
|
|
2231
|
+
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", ro, [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: D(() => [r2.value ? (e(), a("div", io, [i("div", so, [i("div", uo, [i("div", co, [B(o(d(tn), { "aria-hidden": "true", class: "h-6 w-6 text-green-400" }, null, 512), [[A, "success" === t2.type]]), B(o(d(fn), { "aria-hidden": "true", class: "h-6 w-6 text-red-400" }, null, 512), [[A, "danger" === t2.type]]), B(o(d(un), { "aria-hidden": "true", class: "h-6 w-6 text-yellow-400" }, null, 512), [[A, "warning" === t2.type]]), B(o(d(pn), { "aria-hidden": "true", class: "h-6 w-6 text-indigo-600" }, null, 512), [[A, "info" === t2.type]])]), i("div", po, [i("p", go, I(t2.title), 1), i("p", fo, I(t2.message), 1)]), i("div", mo, [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")) }, [vo, o(d(mn), { "aria-hidden": "true", class: "h-5 w-5" })])])])])])) : R("", true)]), _: 1 })])], 2));
|
|
2232
|
+
} }), yo = { key: 0, role: "list", class: "divide-y divide-gray-100" }, xo = { class: "min-w-0" }, wo = { class: "flex items-start gap-x-3" }, ko = { class: "text-sm font-semibold leading-6 text-gray-900" }, So = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500" }, Co = { class: "truncate" }, Oo = { class: "flex flex-none items-center gap-x-4" }, Mo = ["href"], To = { class: "sr-only" }, Eo = { key: 1, class: "divide-y divide-gray-100 animate-pulse" }, Do = [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)], _o = { name: "uiTaskList" }, Io = Object.assign(_o, { props: { tasks: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("ul", Eo, [(e(true), a(x, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, Do))), 128))])) : (e(), a("ul", yo, [(e(true), a(x, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, [i("div", xo, [i("div", wo, [i("p", ko, I(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"]) }, I(t3.statusLiteral), 3)]), i("div", So, [i("p", Co, I(t3.description), 1)])]), i("div", Oo, [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", To, ", " + I(t3.name), 1)], 8, Mo)])]))), 128))])) });
|
|
1822
2233
|
"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
|
|
1823
|
-
function
|
|
2234
|
+
function Po(e2) {
|
|
1824
2235
|
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
1825
2236
|
}
|
|
1826
2237
|
!function(e2) {
|
|
1827
2238
|
function t2(e3) {
|
|
1828
2239
|
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
|
1829
2240
|
}
|
|
1830
|
-
var l2 = t2(e2),
|
|
2241
|
+
var l2 = t2(e2), n2 = { name: "es", monthsShort: "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"), weekdays: "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"), weekdaysShort: "dom._lun._mar._mié._jue._vie._sáb.".split("_"), weekdaysMin: "do_lu_ma_mi_ju_vi_sá".split("_"), months: "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"), weekStart: 1, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY H:mm", LLLL: "dddd, D [de] MMMM [de] YYYY H:mm" }, relativeTime: { future: "en %s", past: "hace %s", s: "unos segundos", m: "un minuto", mm: "%d minutos", h: "una hora", hh: "%d horas", d: "un día", dd: "%d días", M: "un mes", MM: "%d meses", y: "un año", yy: "%d años" }, ordinal: function(e3) {
|
|
1831
2242
|
return e3 + "º";
|
|
1832
2243
|
} };
|
|
1833
|
-
l2.default.locale(
|
|
1834
|
-
}(
|
|
2244
|
+
l2.default.locale(n2, null, true);
|
|
2245
|
+
}(Y);
|
|
1835
2246
|
!function(e2) {
|
|
1836
2247
|
function t2(e3) {
|
|
1837
2248
|
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
|
1838
2249
|
}
|
|
1839
|
-
var l2 = t2(e2),
|
|
1840
|
-
function
|
|
1841
|
-
var
|
|
1842
|
-
return Array.isArray(
|
|
2250
|
+
var l2 = t2(e2), n2 = { s: "ein paar Sekunden", m: ["eine Minute", "einer Minute"], mm: "%d Minuten", h: ["eine Stunde", "einer Stunde"], hh: "%d Stunden", d: ["ein Tag", "einem Tag"], dd: ["%d Tage", "%d Tagen"], M: ["ein Monat", "einem Monat"], MM: ["%d Monate", "%d Monaten"], y: ["ein Jahr", "einem Jahr"], yy: ["%d Jahre", "%d Jahren"] };
|
|
2251
|
+
function a2(e3, t3, l3) {
|
|
2252
|
+
var a3 = n2[l3];
|
|
2253
|
+
return Array.isArray(a3) && (a3 = a3[t3 ? 0 : 1]), a3.replace("%d", e3);
|
|
1843
2254
|
}
|
|
1844
|
-
var
|
|
2255
|
+
var o2 = { name: "de", weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"), weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"), weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"), months: "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"), monthsShort: "Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"), ordinal: function(e3) {
|
|
1845
2256
|
return e3 + ".";
|
|
1846
|
-
}, weekStart: 1, yearStart: 4, formats: { LTS: "HH:mm:ss", LT: "HH:mm", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd, D. MMMM YYYY HH:mm" }, relativeTime: { future: "in %s", past: "vor %s", s:
|
|
1847
|
-
l2.default.locale(
|
|
1848
|
-
}(
|
|
2257
|
+
}, weekStart: 1, yearStart: 4, formats: { LTS: "HH:mm:ss", LT: "HH:mm", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd, D. MMMM YYYY HH:mm" }, relativeTime: { future: "in %s", past: "vor %s", s: a2, m: a2, mm: a2, h: a2, hh: a2, d: a2, dd: a2, M: a2, MM: a2, y: a2, yy: a2 } };
|
|
2258
|
+
l2.default.locale(o2, null, true);
|
|
2259
|
+
}(Y);
|
|
1849
2260
|
"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), "January_February_March_April_May_June_July_August_September_October_November_December".split("_");
|
|
1850
2261
|
!function(e2) {
|
|
1851
2262
|
function t2(e3) {
|
|
1852
2263
|
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
|
1853
2264
|
}
|
|
1854
|
-
var l2 = t2(e2),
|
|
2265
|
+
var l2 = t2(e2), n2 = { name: "fr", weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"), weekdaysMin: "di_lu_ma_me_je_ve_sa".split("_"), months: "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"), monthsShort: "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"), weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "dans %s", past: "il y a %s", s: "quelques secondes", m: "une minute", mm: "%d minutes", h: "une heure", hh: "%d heures", d: "un jour", dd: "%d jours", M: "un mois", MM: "%d mois", y: "un an", yy: "%d ans" }, ordinal: function(e3) {
|
|
1855
2266
|
return e3 + (1 === e3 ? "er" : "");
|
|
1856
2267
|
} };
|
|
1857
|
-
l2.default.locale(
|
|
1858
|
-
}(
|
|
1859
|
-
const
|
|
2268
|
+
l2.default.locale(n2, null, true);
|
|
2269
|
+
}(Y);
|
|
2270
|
+
const jo = (e2, t2) => {
|
|
1860
2271
|
const l2 = e2.__vccOpts || e2;
|
|
1861
|
-
for (const [e3,
|
|
1862
|
-
l2[e3] =
|
|
2272
|
+
for (const [e3, n2] of t2)
|
|
2273
|
+
l2[e3] = n2;
|
|
1863
2274
|
return l2;
|
|
1864
|
-
},
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
2275
|
+
}, Ro = { class: "dateSelector flex items-center text-white flex-row" }, Bo = { class: "pagination flex items-center my-1 md:my-0" }, Lo = { class: "date mx-4 font-bold text-center text-indigo-600 select-none uppercase" }, Ao = { class: "pagination flex items-center my-1 sm:my-0" };
|
|
2276
|
+
const Fo = jo({ name: "dateSelector", components: { ChevronLeftIcon: an, ChevronRightIcon: on }, computed: { currentDate() {
|
|
2277
|
+
return Y(this.selectedDate).locale("es").format("DD MMM. YYYY");
|
|
1867
2278
|
} }, props: { selectedDate: { type: Object, required: true } }, methods: { selectDate(e2, t2) {
|
|
1868
2279
|
let l2;
|
|
1869
|
-
"previous" === t2 && ("day" === e2 && (l2 =
|
|
1870
|
-
} } }, [["render", function(t2, l2,
|
|
1871
|
-
const d2 =
|
|
1872
|
-
return e(),
|
|
1873
|
-
}]]),
|
|
1874
|
-
const
|
|
1875
|
-
return e(),
|
|
2280
|
+
"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);
|
|
2281
|
+
} } }, [["render", function(t2, l2, n2, r2, s2, u2) {
|
|
2282
|
+
const d2 = $("ChevronLeftIcon"), c2 = $("ChevronRightIcon");
|
|
2283
|
+
return e(), a("div", Ro, [i("div", Bo, [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", Lo, I(u2.currentDate), 1), i("div", Ao, [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" })])])]);
|
|
2284
|
+
}]]), No = { name: "SkeletonTable" }, zo = { class: "px-4 sm:px-6 lg:px-8 animate-pulse" }, $o = { class: "flow-root" }, Ho = { class: "-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, Vo = { class: "inline-block min-w-full py-2 align-middle px-1" }, Yo = { class: "overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, Uo = { class: "min-w-full divide-y divide-gray-300" }, qo = 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), Wo = { class: "divide-y divide-gray-200 bg-white" }, Ko = [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("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])], -1)];
|
|
2285
|
+
const Jo = jo(No, [["render", function(t2, l2, n2, o2, r2, s2) {
|
|
2286
|
+
return e(), a("div", zo, [i("div", $o, [i("div", Ho, [i("div", Vo, [i("div", Yo, [i("table", Uo, [qo, i("tbody", Wo, [(e(), a(x, null, j(10, (e2) => i("tr", { key: e2 }, Ko)), 64))])])])])])])]);
|
|
1876
2287
|
}]]);
|
|
1877
|
-
var
|
|
1878
|
-
|
|
2288
|
+
var Go = { exports: {} };
|
|
2289
|
+
Go.exports = function(e2, t2, l2) {
|
|
1879
2290
|
t2.prototype.isToday = function() {
|
|
1880
2291
|
var e3 = "YYYY-MM-DD", t3 = l2();
|
|
1881
2292
|
return this.format(e3) === t3.format(e3);
|
|
1882
2293
|
};
|
|
1883
2294
|
};
|
|
1884
|
-
const
|
|
1885
|
-
const
|
|
1886
|
-
return { isWeekend: 6 ==
|
|
1887
|
-
} } },
|
|
1888
|
-
const
|
|
1889
|
-
return
|
|
1890
|
-
} } }, [["render", function(t2, l2,
|
|
1891
|
-
return e(),
|
|
1892
|
-
}]]), Price:
|
|
1893
|
-
return e(),
|
|
1894
|
-
}]]), uiButton:
|
|
2295
|
+
const Zo = Po(Go.exports), Xo = { class: "text-xs" }, Qo = { class: "font-bold text-lg" }, er = { class: "text-xs font-medium" };
|
|
2296
|
+
const tr = { name: "dayPrice", props: { currency: String, price: Object, basePrice: Number, isBasePrice: { type: Boolean, default: false } }, computed: { currentDay() {
|
|
2297
|
+
return { isWeekend: 6 == Y(this.price.date).format("d") || 0 == Y(this.price.date).format("d"), price: this.price.price };
|
|
2298
|
+
} } }, lr = { class: "priceDay" };
|
|
2299
|
+
const nr = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new Date(), date: /* @__PURE__ */ new Date(), selectedRooms: [], showBasePricesModal: false, showDays: 14 }), props: { category: { type: Object, required: true }, rooms: { type: Array, required: true }, currency: Object, actions: Array, loading: { type: Boolean, default: true } }, components: { DateSelector: Fo, Day: jo({ name: "calendarDay", props: { day: Object }, computed: { currentDay() {
|
|
2300
|
+
return Y.extend(Zo), { 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() };
|
|
2301
|
+
} } }, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2302
|
+
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", Xo, I(u2.currentDay.dayName), 1), i("p", Qo, I(u2.currentDay.day), 1), i("p", er, I(u2.currentDay.month), 1)], 2);
|
|
2303
|
+
}]]), Price: jo(tr, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2304
|
+
return e(), a("div", lr, [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"]) }, I(u2.currentDay.price) + I(o2.currency), 3)]);
|
|
2305
|
+
}]]), uiButton: X, SkeletonTable: Jo }, computed: { days() {
|
|
1895
2306
|
let e2 = [];
|
|
1896
2307
|
for (let t2 = 0; t2 < this.showDays; t2++)
|
|
1897
|
-
e2.push(
|
|
2308
|
+
e2.push(Y(this.date).add(t2, "day"));
|
|
1898
2309
|
return e2;
|
|
1899
2310
|
}, indeterminate() {
|
|
1900
2311
|
return this.selectedRooms.length > 0 && this.selectedRooms.length < this.rooms.length;
|
|
1901
2312
|
} }, methods: { changeDate(e2) {
|
|
1902
|
-
|
|
2313
|
+
Y(e2).isBefore(this.today) || (this.date = e2, this.$emit("dateChanged", this.date));
|
|
1903
2314
|
}, getSelectionBasePrice(e2) {
|
|
1904
|
-
let t2 = this.category.selectionPrices.find((t3) =>
|
|
2315
|
+
let t2 = this.category.selectionPrices.find((t3) => Y(t3.date).isSame(e2.date));
|
|
1905
2316
|
return t2 ? t2.price : e2.price;
|
|
1906
2317
|
}, changeCategoryBulkPrices() {
|
|
1907
2318
|
this.$emit("changeCategoryBulkPrices");
|
|
@@ -1913,86 +2324,86 @@ const $r = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new
|
|
|
1913
2324
|
this.$emit("tableAction", e2);
|
|
1914
2325
|
}, changeRoomPrice(e2) {
|
|
1915
2326
|
this.$emit("changeRoomPrice", e2);
|
|
1916
|
-
} } },
|
|
1917
|
-
const
|
|
2327
|
+
} } }, ar = { key: 0, class: "px-4 sm:px-6 lg:px-8" }, or = { class: "flow-root" }, rr = { class: "overflow-x-auto sm:-mx-6 lg:-mx-8 shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, ir = { class: "inline-block min-w-full align-middle" }, sr = { class: "min-w-full" }, ur = { class: "bg-white" }, dr = { 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" }, cr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, pr = i("span", null, "Categoría: Simple", -1), gr = i("td", { colspan: "6", class: "pl-4" }, " Precios de selección ", -1), fr = i("td", { colspan: "6", class: "pl-4" }, " Precios de mejora ", -1), mr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900 relative" }, vr = { 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" }, br = ["onClick"], hr = i("span", null, "Precios de selección", -1), yr = { colspan: "2", scope: "colgroup", class: "relative bg-gray-100 py-3.5 pl-4 pr-3 text-left font-semibold text-gray-900" }, xr = ["checked", "indeterminate"], wr = i("span", { class: "pl-6" }, "Habitación", -1), kr = i("th", { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, " Edificio ", -1), Sr = i("th", { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, " Planta ", -1), Cr = 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), Or = { colspan: "2", class: "relative py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, Mr = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, Tr = ["value"], Er = { class: "pl-6" }, Dr = { colspan: "2", class: "pl-4" }, _r = { colspan: "2", class: "pl-4" };
|
|
2328
|
+
const Ir = jo(nr, [["render", function(l2, n2, r2, s2, u2, d2) {
|
|
1918
2329
|
var _a2, _b;
|
|
1919
|
-
const
|
|
1920
|
-
return
|
|
1921
|
-
}]]),
|
|
1922
|
-
const
|
|
1923
|
-
let s2 =
|
|
1924
|
-
const
|
|
1925
|
-
s2.value = e2,
|
|
2330
|
+
const c2 = $("DateSelector"), p2 = $("Day"), g2 = $("uiButton"), f2 = $("Price"), m2 = $("SkeletonTable");
|
|
2331
|
+
return r2.loading ? (e(), t(m2, { key: 1 })) : (e(), a("div", ar, [i("div", or, [i("div", rr, [i("div", ir, [i("table", sr, [i("tbody", ur, [i("tr", null, [i("th", dr, [o(c2, { selectedDate: l2.date, onDateSelected: n2[0] || (n2[0] = (e2) => d2.changeDate(e2)) }, null, 8, ["selectedDate"])]), (e(true), a(x, null, j(d2.days, (t2, l3) => (e(), a("th", { scope: "col", key: l3, class: "text-sm font-semibold text-gray-900 p-0" }, [o(p2, { class: "border-l border-gray-200 px-6 py-3", day: t2 }, null, 8, ["day"])]))), 128))]), i("tr", null, [i("th", cr, [pr, o(g2, { loading: r2.loading, class: "ml-4", size: "small", onClick: d2.changeCategoryBulkPrices }, { default: D(() => [_("Cambiar precios en bloque ")]), _: 1 }, 8, ["loading", "onClick"])])]), i("tr", null, [gr, (e(true), a(x, null, j(r2.category.selectionPrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => d2.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: r2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))]), i("tr", null, [fr, (e(true), a(x, null, j(r2.category.upgradePrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => d2.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: r2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))]), i("tr", null, [i("th", mr, [((_a2 = l2.selectedRooms) == null ? void 0 : _a2.length) > 0 && ((_b = r2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", vr, [(e(true), a(x, null, j(r2.actions, (t2, n3) => (e(), a("button", { onClick: (e2) => d2.tableAction({ action: t2.id, items: l2.selectedRooms }), key: n3, 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" }, I(t2.name), 9, br))), 128))])) : R("", true), hr])]), i("tr", null, [i("th", yr, [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: d2.indeterminate || l2.selectedRooms.length === r2.rooms.length, indeterminate: d2.indeterminate, onChange: n2[1] || (n2[1] = (e2) => l2.selectedRooms = e2.target.checked ? r2.rooms.map((e3) => e3.name) : []) }, null, 40, xr), wr]), kr, Sr, Cr]), (e(true), a(x, null, j(r2.rooms, (t2) => (e(), a("tr", { key: t2.name, class: "even:bg-gray-100" }, [i("td", Or, [l2.selectedRooms.includes(t2.name) ? (e(), a("div", Mr)) : 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": n2[2] || (n2[2] = (e2) => l2.selectedRooms = e2) }, null, 8, Tr), [[H, l2.selectedRooms]]), i("span", Er, I(t2.name), 1)]), i("td", Dr, I(t2.building), 1), i("td", _r, I(t2.floor), 1), (e(true), a(x, null, j(t2.selectionPrices, (t3, l3) => (e(), a("td", { class: "p-0", key: l3 }, [o(f2, { onClick: (e2) => d2.changeRoomPrice(t3), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 cursor-pointer", price: t3, currency: r2.currency.symbol, basePrice: d2.getSelectionBasePrice(t3) }, null, 8, ["onClick", "price", "currency", "basePrice"])]))), 128))]))), 128))])])])])])]));
|
|
2332
|
+
}]]), Pr = { class: "chart-selector flex flex-row items-center justify-center" }, jr = { name: "rangeSelector" }, Rr = Object.assign(jr, { props: { range: { type: String } }, emits: ["rangeSelected"], setup(t2, { emit: l2 }) {
|
|
2333
|
+
const o2 = l2, r2 = t2;
|
|
2334
|
+
let s2 = u(() => r2.range);
|
|
2335
|
+
const c2 = (e2) => {
|
|
2336
|
+
s2.value = e2, o2("rangeSelected", e2);
|
|
1926
2337
|
};
|
|
1927
|
-
return (t3, l3) => (e(),
|
|
1928
|
-
} }),
|
|
1929
|
-
const
|
|
1930
|
-
let
|
|
1931
|
-
"area" === s2.type && (
|
|
1932
|
-
const
|
|
1933
|
-
|
|
2338
|
+
return (t3, l3) => (e(), a("ul", Pr, [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)]));
|
|
2339
|
+
} }), Br = { class: "chart-header flex flex-row justify-between" }, Lr = { class: "text-sm font-medium text-gray-500 truncate" }, Ar = { class: "chart-content" }, Fr = { class: "h-full w-full flex items-center justify-center flex-col" }, Nr = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), zr = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, $r = [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)], Hr = { name: "uiChart" }, Vr = Object.assign(Hr, { 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 } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2340
|
+
const r2 = l2, s2 = t2;
|
|
2341
|
+
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: false }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } } };
|
|
2342
|
+
"area" === s2.type && (c2.tooltip = { intersect: true, shared: false });
|
|
2343
|
+
const p2 = u(() => s2.series), g2 = u(() => (c2.chart.stacked = s2.stacked, { ...c2, ...s2.options, plotOptions: { bar: { horizontal: s2.horizontal } } })), f2 = () => r2("chartUpdated"), m2 = (e2, t3, l3) => {
|
|
2344
|
+
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
1934
2345
|
};
|
|
1935
|
-
return (l3,
|
|
1936
|
-
} }),
|
|
1937
|
-
const
|
|
1938
|
-
return e(),
|
|
1939
|
-
}]]),
|
|
1940
|
-
const
|
|
2346
|
+
return (l3, r3) => (e(), a(x, 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", Br, [i("div", Lr, I(t2.title), 1), o(Rr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", Ar, [o(d(U), { type: t2.type, series: p2.value, width: "100%", height: t2.height, options: g2.value, onUpdated: f2, onMounted: f2, onDataPointSelection: m2 }, null, 8, ["type", "series", "height", "options"])], 512), [[A, !t2.empty]]), B(i("div", Fr, [o(W, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Nr], 512), [[A, t2.empty]])], 2), [[A, !t2.loading]]), B(i("div", zr, $r, 512), [[A, t2.loading]])], 64));
|
|
2347
|
+
} }), Yr = { name: "uiFooter" }, Ur = { class: "bg-white" }, qr = [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)];
|
|
2348
|
+
const Wr = jo(Yr, [["render", function(t2, l2, n2, o2, r2, i2) {
|
|
2349
|
+
return e(), a("footer", Ur, qr);
|
|
2350
|
+
}]]), Kr = i("div", { class: "spinner h-12 w-12 mb-6" }, [i("img", { src: "https://images.hotelinking.com/ui/loader.gif", alt: "loading animation" })], -1), Jr = { name: "uiLoadScreen" }, Gr = Object.assign(Jr, { 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"]) }, [Kr, B(i("h2", { class: "text-xs font-bold text-center uppercase mb-2" }, I(t2.title), 513), [[A, t2.title]]), B(i("p", { class: "text-xs text-center uppercase md:w-1/4" }, I(t2.message), 513), [[A, t2.message]])], 2)) }), Zr = { key: 0, class: "py-6 flex items-center justify-between" }, Xr = { class: "flex-1 flex justify-between sm:hidden" }, Qr = { 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" }, ei = { 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" }, ti = { class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" }, li = { class: "text-sm text-gray-700" }, ni = { class: "font-bold" }, ai = { class: "font-bold" }, oi = { class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" }, ri = { class: "sr-only" }, ii = ["onClick"], si = { class: "sr-only" }, ui = { key: 1, class: "py-6 flex flex-row justify-between items-center animate-pulse" }, di = [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)], ci = { name: "uiPagination" }, pi = Object.assign(ci, { props: { current: { type: Number, requires: true }, total: { type: Number, requires: true }, loading: { type: Boolean, default: true } }, emits: ["changePage"], setup(t2, { emit: l2 }) {
|
|
2351
|
+
const c2 = l2, p2 = t2, g2 = s(3), f2 = u(() => Math.max(1, Number(p2.current) - Number(g2.value))), m2 = u(() => Math.min(Number(p2.current) + Number(g2.value), Number(p2.total))), v2 = u(() => {
|
|
1941
2352
|
let e2 = [];
|
|
1942
|
-
for (let t3 = Number(
|
|
2353
|
+
for (let t3 = Number(f2.value); t3 <= Number(m2.value); t3++)
|
|
1943
2354
|
e2.push(t3);
|
|
1944
2355
|
return e2;
|
|
1945
2356
|
});
|
|
1946
|
-
return (l3, s2) => t2.loading ? (e(),
|
|
1947
|
-
} }),
|
|
1948
|
-
const s2 =
|
|
1949
|
-
return (
|
|
1950
|
-
} }),
|
|
1951
|
-
const s2 =
|
|
1952
|
-
return (
|
|
1953
|
-
} }),
|
|
1954
|
-
let
|
|
2357
|
+
return (l3, s2) => t2.loading ? (e(), a("div", ui, di)) : (e(), a("div", Zr, [i("div", Xr, [i("a", Qr, [r(l3.$slots, "previous")]), i("a", ei, [r(l3.$slots, "next")])]), i("div", ti, [i("div", null, [i("p", li, [r(l3.$slots, "showing"), _(), i("span", ni, I(t2.current + " "), 1), r(l3.$slots, "of"), _(), i("span", ai, I(t2.total), 1)])]), i("div", null, [i("nav", oi, [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", ri, [r(l3.$slots, "previous")]), o(d(an), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[A, 1 !== t2.current]]), (e(true), a(x, 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"]) }, I(l4), 11, ii))), 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", si, [r(l3.$slots, "next")]), o(d(on), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[A, t2.current !== t2.total]])])])])]));
|
|
2358
|
+
} }), gi = { class: "hidden md:flex md:flex-col sticky md:inset-y-0" }, fi = { class: "flex flex-col flex-grow overflow-y-auto" }, mi = { class: "grow flex flex-col" }, vi = { class: "flex-1 space-y-1", "aria-label": "Sidebar" }, bi = { key: 0 }, hi = ["onClick"], yi = { key: 0 }, xi = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, wi = { key: 0, class: "flex-1" }, ki = { key: 1, class: "flex-1" }, Si = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1)], Ci = { key: 0 }, Oi = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, Mi = { name: "uiSidebar" }, Ti = Object.assign(Mi, { props: { navigation: { type: Array, required: true }, loading: { type: Boolean, default: true } }, emits: ["sideBarClick"], setup(l2, { emit: r2 }) {
|
|
2359
|
+
const s2 = r2;
|
|
2360
|
+
return (r3, u2) => (e(), a("div", gi, [i("div", fi, [i("div", mi, [i("nav", vi, [(e(true), a(x, null, j(l2.navigation, (r4) => (e(), a(x, { key: r4.name }, [r4.children ? (e(), t(d(bl), { key: 1, as: "div", class: "space-y-1" }, { default: D(({ open: i2 }) => [o(d(hl), { 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: D(() => [o(W, { loading: l2.loading, icon: r4.icon, class: "mr-3 flex-shrink-0 h-6 w-6 text-gray-400 group-hover:text-gray-500", "aria-hidden": "true" }, null, 8, ["loading", "icon"]), l2.loading ? (e(), a("div", ki, Si)) : (e(), a("span", wi, I(r4.name), 1)), o(d(on), { 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(yl), { class: "space-y-1" }, { default: D(() => [(e(true), a(x, null, j(r4.children, (n2) => (e(), t(d(hl), { onClick: (e2) => s2("sideBarClick", n2.id), key: n2.name, class: "group w-full flex items-center pl-11 pr-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50" }, { default: D(() => [l2.loading ? (e(), a("div", Oi)) : (e(), a("span", Ci, I(n2.name), 1))]), _: 2 }, 1032, ["onClick"]))), 128))]), _: 2 }, 1024)]), _: 2 }, 1024)) : (e(), a("div", bi, [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(W, { 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", xi)) : (e(), a("span", yi, I(r4.name), 1))], 10, hi)]))], 64))), 128))])])])]));
|
|
2361
|
+
} }), Ei = { key: 0 }, Di = { class: "ml-16 text-sm font-medium text-gray-500 truncate" }, _i = { class: "ml-16 flex items-baseline pb-5" }, Ii = { class: "text-2xl font-semibold text-gray-900" }, Pi = { class: "absolute bottom-0 inset-x-0 bg-gray-50 px-4 py-4 sm:px-6" }, ji = { class: "text-sm" }, Ri = { key: 1 }, Bi = { class: "relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full pb-6" }, Li = { class: "absolute bg-gray-200 rounded-md p-3 animate-pulse" }, Ai = 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), Fi = 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), Ni = { name: "uiStats" }, zi = Object.assign(Ni, { props: { item: { type: Object, required: true }, loading: { type: Boolean, default: true } }, emits: ["statClick"], setup(l2, { emit: r2 }) {
|
|
2362
|
+
const s2 = r2;
|
|
2363
|
+
return (r3, u2) => l2.loading ? (e(), a("div", Ri, [i("div", Bi, [i("dt", null, [i("div", Li, [o(W, { loading: l2.loading, icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true" }, null, 8, ["loading", "icon"])]), Ai, Fi])])])) : (e(), a("div", Ei, [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(W, { icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])], 2), i("p", Di, I(l2.item.name), 1)]), i("dd", _i, [i("p", Ii, I(l2.item.stat), 1), l2.item.changeType ? (e(), a("p", { key: 0, 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(en), { 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(Ql), { 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", Pi, [i("div", ji, [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" }, I(l2.item.actionText), 1)])], 512), [[A, l2.item.showFooter]])])], 2)]));
|
|
2364
|
+
} }), $i = { key: 0, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Hi = { class: "px-4 py-5 sm:px-6" }, Vi = { class: "text-lg font-medium leading-6 text-gray-900" }, Yi = { class: "mt-1 max-w-2xl text-sm text-gray-500" }, Ui = { class: "border-t border-gray-200" }, qi = { class: "text-sm font-medium text-gray-500" }, Wi = { key: 0, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Ki = { key: 1, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Ji = ["onClick"], Gi = { key: 3, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, Zi = { key: 1, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Xi = 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), Qi = { class: "border-t border-gray-200" }, es = [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)], ts = { name: "uiStripedCard" }, ls = Object.assign(ts, { 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", Zi, [Xi, i("div", Qi, [i("dl", null, [(e(), a(x, 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"]]) }, es, 2)), 64))])])])) : (e(), a("div", $i, [i("div", Hi, [i("h3", Vi, I(l2.title), 1), i("p", Yi, I(l2.subtitle), 1)]), i("div", Ui, [i("dl", null, [(e(true), a(x, 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", qi, I(s3.title), 1), "tag" === s3.type ? (e(), a("dd", Wi, [o(la, { color: s3.color }, { default: D(() => [_(I(s3.text), 1)]), _: 2 }, 1032, ["color"])])) : "tags" === s3.type ? (e(), a("dd", Ki, [(e(true), a(x, null, j(s3.tags, (n2, a2) => (e(), t(la, { loading: l2.loading, key: a2, color: n2.color, class: "mr-2 mb-2" }, { default: D(() => [_(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) }, I(s3.text), 9, Ji)) : (e(), a("dd", Gi, I(s3.text), 1))], 2))), 128))])])])) }), ns = { 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" }, as = 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), os = { class: "ml-2" }, rs = { __name: "tooltip", props: { tip: { type: String, required: true } }, setup: (t2) => (l2, n2) => (e(), a("div", ns, [as, i("div", null, [o(W, { icon: d(gn), loading: false, color: "white", size: "big" }, null, 8, ["icon"])]), i("span", os, I(t2.tip), 1)])) }, is = { key: 0 }, ss = { class: "flex flex-col" }, us = { class: "-my-2 overflow-x-auto" }, ds = { class: "inline-block min-w-full py-2 align-middle px-1" }, cs = { class: "relative overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, ps = { 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" }, gs = ["onClick"], fs = { class: "min-w-full table-fixed divide-y divide-gray-300" }, ms = { class: "bg-gray-50" }, vs = ["checked", "indeterminate"], bs = ["onMouseover", "onMouseleave"], hs = ["onClick"], ys = { key: 2, class: "group flex items-center uppercase text-xs" }, xs = { class: "divide-y divide-gray-200 bg-white" }, ws = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, ks = ["value"], Ss = ["onClick"], Cs = { key: 2 }, Os = { name: "uiTable" }, Ms = Object.assign(Os, { 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 }) {
|
|
2365
|
+
let c2 = s([]);
|
|
1955
2366
|
s(false);
|
|
1956
|
-
let
|
|
1957
|
-
const
|
|
1958
|
-
|
|
2367
|
+
let p2 = s(void 0);
|
|
2368
|
+
const g2 = r2, f2 = l2, m2 = u(() => c2.value.length > 0 && c2.value.length < f2.items.length), v2 = (e2, t2) => {
|
|
2369
|
+
p2 !== e2 && t2 && (p2.value = e2), t2 || (p2.value = void 0);
|
|
1959
2370
|
};
|
|
1960
|
-
return (
|
|
2371
|
+
return (r3, s2) => {
|
|
1961
2372
|
var _a2, _b;
|
|
1962
|
-
return l2.loading ? (e(), t(
|
|
2373
|
+
return l2.loading ? (e(), t(Jo, { key: 1 })) : (e(), a("div", is, [i("div", ss, [i("div", us, [i("div", ds, [i("div", cs, [((_a2 = d(c2)) == null ? void 0 : _a2.length) > 0 && ((_b = l2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", ps, [(e(true), a(x, 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" }, I(t2.name), 9, gs))), 128))])) : R("", true), i("table", fs, [i("thead", ms, [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: m2.value || d(c2).length === l2.items.length, indeterminate: m2.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) => V(c2) ? c2.value = e2.target.checked ? l2.items.map((e3) => e3.id) : [] : c2 = e2.target.checked ? l2.items.map((e3) => e3.id) : []) }, null, 40, vs)) : R("", true)], 2), (e(true), a(x, 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(rs, { key: 0, tip: r4.tooltip }, null, 8, ["tip"])), [[A, 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, I(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(W, { icon: "asc" === l2.orderDirection ? d(nn) : d(sn), loading: l2.loading, color: r4.value === l2.orderedBy ? "white" : "primary" }, null, 8, ["icon", "loading", "color"])], 2)], 8, hs)) : (e(), a("p", ys, [i("span", null, I(r4.name), 1)]))], 40, bs))), 128))])]), i("tbody", xs, [(e(true), a(x, null, j(l2.items, (o2, r4) => {
|
|
1963
2374
|
var _a3, _b2;
|
|
1964
|
-
return e(),
|
|
2375
|
+
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", ws)) : R("", true), ((_b2 = l2.actions) == null ? void 0 : _b2.length) > 0 ? B((e(), a("input", { key: 1, "onUpdate:modelValue": s2[1] || (s2[1] = (e2) => V(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, ks)), [[H, d(c2)]]) : R("", true)], 2), (e(true), a(x, 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(la, { key: 0, loading: l2.loading, color: r5.color }, { default: D(() => [_(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 }) }, I(r5.content), 9, Ss)) : (e(), a("span", Cs, I(r5), 1))], 2))), 128))], 2);
|
|
1965
2376
|
}), 128))])])])])])])]));
|
|
1966
2377
|
};
|
|
1967
|
-
} }),
|
|
1968
|
-
const
|
|
1969
|
-
return (l3,
|
|
1970
|
-
|
|
1971
|
-
}), 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),
|
|
1972
|
-
} }),
|
|
1973
|
-
const s2 =
|
|
1974
|
-
return t2.loading ? (e(),
|
|
1975
|
-
} }),
|
|
1976
|
-
return e(),
|
|
1977
|
-
}, XMarkIcon:
|
|
1978
|
-
const
|
|
1979
|
-
const
|
|
1980
|
-
return e(), t(w2, { as: "nav", class: "bg-white shadow z-10" }, { default: D(({ open: u3 }) => [i("div",
|
|
1981
|
-
}]]),
|
|
2378
|
+
} }), Ts = { class: "lg:hidden" }, Es = ["value"], Ds = { class: "hidden lg:block" }, _s = { class: "border-b border-gray-200" }, Is = { class: "-mb-px flex space-x-8", "aria-label": "Tabs" }, Ps = ["onClick", "aria-current"], js = { name: "uiTabs" }, Rs = Object.assign(js, { props: { tabs: Array }, emits: ["tabClicked"], setup(t2, { emit: l2 }) {
|
|
2379
|
+
const o2 = l2;
|
|
2380
|
+
return (l3, r2) => (e(), a("div", null, [i("div", Ts, [i("select", { onChange: r2[0] || (r2[0] = (e2) => {
|
|
2381
|
+
o2("tabClicked", e2.target.value);
|
|
2382
|
+
}), 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(x, null, j(t2.tabs, (t3) => (e(), a("option", { value: t3.id, key: t3.name }, I(t3.name), 9, Es))), 128))], 32)]), i("div", Ds, [i("div", _s, [i("nav", Is, [(e(true), a(x, 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"]) }, I(t3.count), 3)) : R("", true)], 10, Ps))), 128))])])])]));
|
|
2383
|
+
} }), Bs = { key: 0, class: "bg-white overflow-hidden shadow rounded-lg" }, Ls = { class: "px-4 py-5 sm:px-6" }, As = { class: "text-xl font-bold" }, Fs = { class: "px-4 py-5 sm:p-6" }, Ns = { class: "flow-root" }, zs = { class: "-mb-8", role: "list" }, $s = { class: "relative pb-8" }, Hs = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, Vs = { class: "relative flex space-x-3" }, Ys = { class: "min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center" }, Us = { class: "text-sm text-gray-500" }, qs = ["onClick"], Ws = { class: "text-right text-sm whitespace-nowrap text-gray-500" }, Ks = ["datetime"], Js = { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10" }, Gs = { class: "text-sm" }, Zs = { class: "h-full w-full flex items-center justify-center flex-col mb-5" }, Xs = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Qs = { key: 1, class: "bg-white overflow-hidden shadow rounded-lg" }, eu = 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), tu = { class: "px-4 py-5 sm:p-6 animate-pulse" }, lu = { class: "flow-root" }, nu = { class: "-mb-8", role: "list" }, au = { class: "relative pb-8" }, ou = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, ru = 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), iu = 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), su = { name: "uiTimeline" }, uu = Object.assign(su, { props: { name: { type: String, required: true }, timeline: { type: Object }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false } }, setup: (t2) => (l2, r2) => {
|
|
2384
|
+
const s2 = $("uiIcon");
|
|
2385
|
+
return t2.loading ? (e(), a("div", Qs, [eu, i("div", tu, [i("div", lu, [i("ul", nu, [(e(), a(x, null, j(10, (t3) => i("li", { key: l2.index }, [i("div", au, [10 !== t3 ? (e(), a("span", ou)) : R("", true), ru])])), 64))])])]), iu])) : (e(), a("div", Bs, [i("div", Ls, [i("h1", As, I(t2.name), 1)]), B(i("div", Fs, [i("div", Ns, [i("ul", zs, [(e(true), a(x, null, j(t2.timeline.items, (r3, u2) => (e(), a("li", { key: u2 }, [i("div", $s, [u2 !== t2.timeline.items.length - 1 ? (e(), a("span", Hs)) : R("", true), i("div", Vs, [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", Ys, [i("div", null, [i("p", Us, [i("a", { onClick: (e2) => l2.$emit("timelineEventClicked", r3.linkId), class: "font-medium text-indigo-600 hover:text-indigo-800 cursor-pointer" }, I(r3.target), 9, qs), _(" " + I(r3.content), 1)])]), i("div", Ws, [i("time", { datetime: r3.datetime }, I(r3.date), 9, Ks)])])])])]))), 128))])])], 512), [[A, !t2.empty]]), B(i("div", Js, [i("div", Gs, [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)) }, I(t2.timeline.footerText), 1)])], 512), [[A, !t2.empty]]), B(i("div", Zs, [o(W, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Xs], 512), [[A, t2.empty]])]));
|
|
2386
|
+
} }), du = { name: "uiTopbar", props: ["navigation", "logo", "profileMenu", "brand", "accountLogo", "alerted"], components: { Disclosure: bl, DisclosureButton: hl, DisclosurePanel: yl, Menu: Tl, MenuButton: El, MenuItem: _l, MenuItems: Dl, Bars3Icon: function(t2, l2) {
|
|
2387
|
+
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" })]);
|
|
2388
|
+
}, XMarkIcon: mn } }, cu = { class: "mx-auto px-6 lg:px-8" }, pu = { class: "flex justify-between h-20" }, gu = { class: "flex" }, fu = { class: "-ml-2 mr-2 flex items-center lg:hidden" }, mu = i("span", { class: "sr-only" }, "Open main menu", -1), vu = ["src"], bu = { class: "flex items-center" }, hu = { class: "lg:ml-4 lg:flex-shrink-0 lg:flex lg:items-center hidden" }, yu = { class: "redCircle flex items-center justify-center h-4 w-4 bg-red-500 rounded-full absolute -top-0 -left-1" }, xu = [i("span", { class: "animate-ping absolute inline-flex h-4 w-4 bg-red-500 rounded-full opacity-75" }, null, -1)], wu = ["src"], ku = ["onClick"], Su = { class: "pt-2 pb-3 space-y-1" }, Cu = ["onClick"], Ou = { class: "pt-4 pb-3 border-t border-gray-200" }, Mu = { class: "flex items-center px-4 sm:px-6" }, Tu = { class: "flex-shrink-0" }, Eu = ["src"], Du = { key: 0, class: "ml-3" }, _u = { class: "text-base font-medium text-gray-800" }, Iu = { class: "text-sm font-medium text-gray-500" }, Pu = { class: "mt-3 space-y-1" }, ju = ["onClick"];
|
|
2389
|
+
const Ru = jo(du, [["render", function(l2, r2, s2, u2, d2, c2) {
|
|
2390
|
+
const p2 = $("Bars3Icon"), g2 = $("XMarkIcon"), f2 = $("DisclosureButton"), m2 = $("MenuButton"), v2 = $("MenuItem"), b2 = $("MenuItems"), h2 = $("Menu"), y2 = $("DisclosurePanel"), w2 = $("Disclosure");
|
|
2391
|
+
return e(), t(w2, { as: "nav", class: "bg-white shadow z-10" }, { default: D(({ open: u3 }) => [i("div", cu, [i("div", pu, [i("div", gu, [i("div", fu, [o(f2, { 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: D(() => [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, vu)])]), i("div", bu, [i("div", hu, [o(h2, { as: "div", class: "ml-3 relative" }, { default: D(() => [i("div", null, [B(o(m2, { class: "bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 relative" }, { default: D(() => [B(i("div", yu, xu, 512), [[A, s2.alerted]]), i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, wu)]), _: 1 }, 512), [[A, 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: D(() => [o(b2, { 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: D(() => [(e(true), a(x, null, j(s2.profileMenu, (a2) => (e(), t(v2, { key: a2.name }, { default: D(({ 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"]]) }, I(a2.name), 11, ku)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 })]), _: 1 })])])])]), o(y2, { class: "lg:hidden" }, { default: D(() => [i("div", Su, [(e(true), a(x, null, j(s2.navigation, (a2) => (e(), t(f2, { 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: D(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", a2.id) }, I(a2.name), 9, Cu)]), _: 2 }, 1032, ["class"]))), 128))]), i("div", Ou, [i("div", Mu, [i("div", Tu, [i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, Eu)]), s2.brand ? (e(), a("div", Du, [i("div", _u, I(s2.brand.title), 1), i("div", Iu, I(s2.brand.subtitle), 1)])) : R("", true)]), i("div", Pu, [(e(true), a(x, null, j(s2.profileMenu, (n2) => (e(), t(f2, { 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: D(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", n2.id) }, I(n2.name), 9, ju)]), _: 2 }, 1024))), 128))])])]), _: 1 })]), _: 1 });
|
|
2392
|
+
}]]), Bu = { chart: { type: "bar", toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff"], dataLabels: { enabled: true, formatter: function(e2, t2) {
|
|
1982
2393
|
return t2.w.globals.labels[t2.dataPointIndex] + ": " + e2;
|
|
1983
|
-
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } },
|
|
1984
|
-
const
|
|
1985
|
-
|
|
2394
|
+
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } }, Lu = { class: "chart-header flex flex-row justify-between" }, Au = { class: "text-sm font-medium text-gray-500 truncate" }, Fu = { class: "chart-content" }, Nu = { 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), $u = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Hu = [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)], Vu = { name: "uiChart" }, Yu = Object.assign(Vu, { 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 }) {
|
|
2395
|
+
const r2 = l2, s2 = t2, c2 = u(() => ({ ...s2.options, ...Bu })), p2 = u(() => s2.series), g2 = () => r2("chartUpdated"), f2 = (e2, t3, l3) => {
|
|
2396
|
+
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
1986
2397
|
};
|
|
1987
|
-
return (l3,
|
|
1988
|
-
} }),
|
|
1989
|
-
const
|
|
1990
|
-
return (
|
|
1991
|
-
} }),
|
|
1992
|
-
Object.keys(
|
|
1993
|
-
e2.component(t2,
|
|
2398
|
+
return (l3, r3) => (e(), a(x, 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", Lu, [i("div", Au, I(t2.title), 1), o(Rr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", Fu, [o(d(U), { type: l3.bar, series: p2.value, width: "100%", height: t2.height, options: c2.value, onUpdated: g2, onMounted: g2, onDataPointSelection: f2 }, null, 8, ["type", "series", "height", "options"])], 512), [[A, !t2.empty]]), B(i("div", Nu, [o(W, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), zu], 512), [[A, t2.empty]])], 2), [[A, !t2.loading]]), B(i("div", $u, Hu, 512), [[A, t2.loading]])], 64));
|
|
2399
|
+
} }), Uu = { class: "w-full flex flex-col items-center justify-center p-10 grow" }, qu = { class: "text-2xl mt-4 font-bold" }, Wu = { class: "buttons flex flex-row items-center justify-center mt-8 gap-x-1" }, Ku = { __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", Uu, [o(W, { loading: false, icon: d(un), size: "massive", color: "gray" }, null, 8, ["icon"]), i("h2", qu, I(l2.title), 1), i("p", null, I(l2.message), 1), i("div", Wu, [(e(true), a(x, null, j(l2.actions, (l3, a2) => (e(), t(X, { key: a2, loading: false, onClick: (e2) => n3.$emit("action", l3.action) }, { default: D(() => [_(I(l3.text), 1)]), _: 2 }, 1032, ["onClick"]))), 128))])])) }, Ju = i("div", { class: "fixed inset-0" }, null, -1), Gu = { class: "fixed inset-0 overflow-hidden" }, Zu = { class: "absolute inset-0 overflow-hidden" }, Xu = { class: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10" }, Qu = { class: "flex h-full flex-col overflow-y-scroll bg-white shadow-xl" }, ed = { class: "bg-indigo-700 px-4 py-6 sm:px-6" }, td = { class: "flex items-center justify-between" }, ld = { class: "ml-3 flex h-7 items-center" }, nd = i("span", { class: "absolute -inset-2.5" }, null, -1), ad = i("span", { class: "sr-only" }, "Close panel", -1), od = { class: "mt-1" }, rd = { class: "text-sm text-indigo-300" }, id = { class: "relative flex-1 px-4 py-6 sm:px-6" }, sd = { name: "uiRightSidebar" }, ud = Object.assign(sd, { props: { title: { type: String, required: true }, description: { type: String }, open: { type: Boolean, default: false } }, emits: ["closeRightBar"], setup(l2, { emit: n2 }) {
|
|
2400
|
+
const a2 = n2;
|
|
2401
|
+
return (n3, s2) => (e(), t(d(Xl), { as: "template", show: l2.open }, { default: D(() => [o(d(dl), { as: "div", class: "relative z-10", onClose: s2[1] || (s2[1] = (e2) => a2("closeRightBar")) }, { default: D(() => [Ju, i("div", Gu, [i("div", Zu, [i("div", Xu, [o(d(Gl), { 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: D(() => [o(d(cl), { class: "pointer-events-auto w-screen max-w-md" }, { default: D(() => [i("div", Qu, [i("div", ed, [i("div", td, [o(d(pl), { class: "text-base font-semibold leading-6 text-white" }, { default: D(() => [_(I(l2.title), 1)]), _: 1 }), i("div", ld, [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")) }, [nd, ad, o(d(mn), { class: "h-6 w-6 ring-0", "aria-hidden": "true" })])])]), i("div", od, [i("p", rd, I(l2.description), 1)])]), i("div", id, [r(n3.$slots, "default")])])]), _: 3 })]), _: 3 })])])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2402
|
+
} }), dd = { uiButton: X, uiIcon: W, uiCheckbox: ie, uiDropdown: wn, uiInput: Pn, uiInputFile: Wn, uiSelect: Xn, uiTag: la, uiTextArea: ua, uiToggle: ma, uiAlert: Ma, uiBreadcrumbs: La, uiCard: Ua, uiFilter: Wa, uiModal: oo, uiNotification: ho, uiTaskList: Io, uiPriceCalendar: Ir, uiChart: Vr, uiFooter: Wr, uiLoadingScreen: Gr, uiPagination: pi, uiSidebar: Ti, uiStats: zi, uiStripedCard: ls, uiTable: Ms, uiTabs: Rs, uiTimeline: uu, uiTopbar: Ru, uiFunnelChartV2: Yu, uiNoResults: Ku, uiRightSidebar: ud }, cd = { install(e2) {
|
|
2403
|
+
Object.keys(dd).forEach((t2) => {
|
|
2404
|
+
e2.component(t2, dd[t2]);
|
|
1994
2405
|
});
|
|
1995
2406
|
} };
|
|
1996
2407
|
export {
|
|
1997
|
-
|
|
2408
|
+
cd as default
|
|
1998
2409
|
};
|