@zenuml/core 3.23.13 → 3.23.15
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/StylePanel.004c72a4.js +1756 -0
- package/dist/{close.ea3d38c2.js → close.14e1a8e7.js} +2 -2
- package/dist/{collapse-expanded.eef91e0f.js → collapse-expanded.2f655aba.js} +2 -2
- package/dist/{collapse-unexpanded.7e6a99fa.js → collapse-unexpanded.dd972c33.js} +2 -2
- package/dist/{core.6d6052eb.js → core.a0f0e58a.js} +6 -7
- package/dist/{debug.61922298.js → debug.798422e0.js} +2 -2
- package/dist/{message-arrow.c2d73269.js → message-arrow.1055a83e.js} +2 -2
- package/dist/{non-selected-cycle.fe4fc9bc.js → non-selected-cycle.0ea19a9b.js} +2 -2
- package/dist/{numbering.f85c36fe.js → numbering.bbade2e0.js} +2 -2
- package/dist/{privacy.3a6f886e.js → privacy.8cf2e0f1.js} +2 -2
- package/dist/{selected-cycle.0e4ad2a4.js → selected-cycle.259d791e.js} +2 -2
- package/dist/{theme.0c1703d7.js → theme.2657dff6.js} +2 -2
- package/dist/{tip.bf17baf6.js → tip.c12d7194.js} +2 -2
- package/dist/zenuml.esm.mjs +2 -2
- package/dist/zenuml.js +448 -448
- package/dist/{zoom-in.dc2e27ff.js → zoom-in.d281d549.js} +2 -2
- package/dist/{zoom-out.3c3e350c.js → zoom-out.c399fc6b.js} +2 -2
- package/package.json +2 -2
- package/pnpm-lock.yaml +16 -15
- package/dist/StylePanel.3d4e665f.js +0 -1812
|
@@ -1,1812 +0,0 @@
|
|
|
1
|
-
import { b as P, u as H, r as E, s as ze, w as $, g as st, d as lt, e as J, F as Ie, m as pe, t as Pe, f as Ve, n as at, p as ct, h as ft, i as ut, j as ne, U as dt, k as he, T as mt, l as pt, S as ht, q as gt, v as vt, x as yt, y as wt, P as xt, o as Le, z as bt, A as Ct, a as ge, c as At, B as Ot, C as Tt, D as St, E as Rt, G as Et, H as Pt } from "./core.6d6052eb.js";
|
|
2
|
-
const Ue = ["top", "right", "bottom", "left"], Fe = ["start", "end"], Be = /* @__PURE__ */ Ue.reduce((e, t) => e.concat(t, t + "-" + Fe[0], t + "-" + Fe[1]), []), ee = Math.min, q = Math.max, ae = Math.round, le = Math.floor, X = (e) => ({
|
|
3
|
-
x: e,
|
|
4
|
-
y: e
|
|
5
|
-
}), Lt = {
|
|
6
|
-
left: "right",
|
|
7
|
-
right: "left",
|
|
8
|
-
bottom: "top",
|
|
9
|
-
top: "bottom"
|
|
10
|
-
}, Ft = {
|
|
11
|
-
start: "end",
|
|
12
|
-
end: "start"
|
|
13
|
-
};
|
|
14
|
-
function we(e, t, n) {
|
|
15
|
-
return q(e, ee(t, n));
|
|
16
|
-
}
|
|
17
|
-
function K(e, t) {
|
|
18
|
-
return typeof e == "function" ? e(t) : e;
|
|
19
|
-
}
|
|
20
|
-
function V(e) {
|
|
21
|
-
return e.split("-")[0];
|
|
22
|
-
}
|
|
23
|
-
function W(e) {
|
|
24
|
-
return e.split("-")[1];
|
|
25
|
-
}
|
|
26
|
-
function Xe(e) {
|
|
27
|
-
return e === "x" ? "y" : "x";
|
|
28
|
-
}
|
|
29
|
-
function be(e) {
|
|
30
|
-
return e === "y" ? "height" : "width";
|
|
31
|
-
}
|
|
32
|
-
function de(e) {
|
|
33
|
-
return ["top", "bottom"].includes(V(e)) ? "y" : "x";
|
|
34
|
-
}
|
|
35
|
-
function Ce(e) {
|
|
36
|
-
return Xe(de(e));
|
|
37
|
-
}
|
|
38
|
-
function Ye(e, t, n) {
|
|
39
|
-
n === void 0 && (n = !1);
|
|
40
|
-
const i = W(e), o = Ce(e), r = be(o);
|
|
41
|
-
let s = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
42
|
-
return t.reference[r] > t.floating[r] && (s = fe(s)), [s, fe(s)];
|
|
43
|
-
}
|
|
44
|
-
function Bt(e) {
|
|
45
|
-
const t = fe(e);
|
|
46
|
-
return [ce(e), t, ce(t)];
|
|
47
|
-
}
|
|
48
|
-
function ce(e) {
|
|
49
|
-
return e.replace(/start|end/g, (t) => Ft[t]);
|
|
50
|
-
}
|
|
51
|
-
function Dt(e, t, n) {
|
|
52
|
-
const i = ["left", "right"], o = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
53
|
-
switch (e) {
|
|
54
|
-
case "top":
|
|
55
|
-
case "bottom":
|
|
56
|
-
return n ? t ? o : i : t ? i : o;
|
|
57
|
-
case "left":
|
|
58
|
-
case "right":
|
|
59
|
-
return t ? r : s;
|
|
60
|
-
default:
|
|
61
|
-
return [];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function kt(e, t, n, i) {
|
|
65
|
-
const o = W(e);
|
|
66
|
-
let r = Dt(V(e), n === "start", i);
|
|
67
|
-
return o && (r = r.map((s) => s + "-" + o), t && (r = r.concat(r.map(ce)))), r;
|
|
68
|
-
}
|
|
69
|
-
function fe(e) {
|
|
70
|
-
return e.replace(/left|right|bottom|top/g, (t) => Lt[t]);
|
|
71
|
-
}
|
|
72
|
-
function Nt(e) {
|
|
73
|
-
return {
|
|
74
|
-
top: 0,
|
|
75
|
-
right: 0,
|
|
76
|
-
bottom: 0,
|
|
77
|
-
left: 0,
|
|
78
|
-
...e
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function qe(e) {
|
|
82
|
-
return typeof e != "number" ? Nt(e) : {
|
|
83
|
-
top: e,
|
|
84
|
-
right: e,
|
|
85
|
-
bottom: e,
|
|
86
|
-
left: e
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function ue(e) {
|
|
90
|
-
const {
|
|
91
|
-
x: t,
|
|
92
|
-
y: n,
|
|
93
|
-
width: i,
|
|
94
|
-
height: o
|
|
95
|
-
} = e;
|
|
96
|
-
return {
|
|
97
|
-
width: i,
|
|
98
|
-
height: o,
|
|
99
|
-
top: n,
|
|
100
|
-
left: t,
|
|
101
|
-
right: t + i,
|
|
102
|
-
bottom: n + o,
|
|
103
|
-
x: t,
|
|
104
|
-
y: n
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function De(e, t, n) {
|
|
108
|
-
let {
|
|
109
|
-
reference: i,
|
|
110
|
-
floating: o
|
|
111
|
-
} = e;
|
|
112
|
-
const r = de(t), s = Ce(t), l = be(s), f = V(t), c = r === "y", u = i.x + i.width / 2 - o.width / 2, d = i.y + i.height / 2 - o.height / 2, g = i[l] / 2 - o[l] / 2;
|
|
113
|
-
let m;
|
|
114
|
-
switch (f) {
|
|
115
|
-
case "top":
|
|
116
|
-
m = {
|
|
117
|
-
x: u,
|
|
118
|
-
y: i.y - o.height
|
|
119
|
-
};
|
|
120
|
-
break;
|
|
121
|
-
case "bottom":
|
|
122
|
-
m = {
|
|
123
|
-
x: u,
|
|
124
|
-
y: i.y + i.height
|
|
125
|
-
};
|
|
126
|
-
break;
|
|
127
|
-
case "right":
|
|
128
|
-
m = {
|
|
129
|
-
x: i.x + i.width,
|
|
130
|
-
y: d
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
case "left":
|
|
134
|
-
m = {
|
|
135
|
-
x: i.x - o.width,
|
|
136
|
-
y: d
|
|
137
|
-
};
|
|
138
|
-
break;
|
|
139
|
-
default:
|
|
140
|
-
m = {
|
|
141
|
-
x: i.x,
|
|
142
|
-
y: i.y
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
switch (W(t)) {
|
|
146
|
-
case "start":
|
|
147
|
-
m[s] -= g * (n && c ? -1 : 1);
|
|
148
|
-
break;
|
|
149
|
-
case "end":
|
|
150
|
-
m[s] += g * (n && c ? -1 : 1);
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
return m;
|
|
154
|
-
}
|
|
155
|
-
const $t = async (e, t, n) => {
|
|
156
|
-
const {
|
|
157
|
-
placement: i = "bottom",
|
|
158
|
-
strategy: o = "absolute",
|
|
159
|
-
middleware: r = [],
|
|
160
|
-
platform: s
|
|
161
|
-
} = n, l = r.filter(Boolean), f = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
162
|
-
let c = await s.getElementRects({
|
|
163
|
-
reference: e,
|
|
164
|
-
floating: t,
|
|
165
|
-
strategy: o
|
|
166
|
-
}), {
|
|
167
|
-
x: u,
|
|
168
|
-
y: d
|
|
169
|
-
} = De(c, i, f), g = i, m = {}, a = 0;
|
|
170
|
-
for (let h = 0; h < l.length; h++) {
|
|
171
|
-
const {
|
|
172
|
-
name: v,
|
|
173
|
-
fn: y
|
|
174
|
-
} = l[h], {
|
|
175
|
-
x: w,
|
|
176
|
-
y: b,
|
|
177
|
-
data: C,
|
|
178
|
-
reset: A
|
|
179
|
-
} = await y({
|
|
180
|
-
x: u,
|
|
181
|
-
y: d,
|
|
182
|
-
initialPlacement: i,
|
|
183
|
-
placement: g,
|
|
184
|
-
strategy: o,
|
|
185
|
-
middlewareData: m,
|
|
186
|
-
rects: c,
|
|
187
|
-
platform: s,
|
|
188
|
-
elements: {
|
|
189
|
-
reference: e,
|
|
190
|
-
floating: t
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
u = w != null ? w : u, d = b != null ? b : d, m = {
|
|
194
|
-
...m,
|
|
195
|
-
[v]: {
|
|
196
|
-
...m[v],
|
|
197
|
-
...C
|
|
198
|
-
}
|
|
199
|
-
}, A && a <= 50 && (a++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (c = A.rects === !0 ? await s.getElementRects({
|
|
200
|
-
reference: e,
|
|
201
|
-
floating: t,
|
|
202
|
-
strategy: o
|
|
203
|
-
}) : A.rects), {
|
|
204
|
-
x: u,
|
|
205
|
-
y: d
|
|
206
|
-
} = De(c, g, f)), h = -1);
|
|
207
|
-
}
|
|
208
|
-
return {
|
|
209
|
-
x: u,
|
|
210
|
-
y: d,
|
|
211
|
-
placement: g,
|
|
212
|
-
strategy: o,
|
|
213
|
-
middlewareData: m
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
async function oe(e, t) {
|
|
217
|
-
var n;
|
|
218
|
-
t === void 0 && (t = {});
|
|
219
|
-
const {
|
|
220
|
-
x: i,
|
|
221
|
-
y: o,
|
|
222
|
-
platform: r,
|
|
223
|
-
rects: s,
|
|
224
|
-
elements: l,
|
|
225
|
-
strategy: f
|
|
226
|
-
} = e, {
|
|
227
|
-
boundary: c = "clippingAncestors",
|
|
228
|
-
rootBoundary: u = "viewport",
|
|
229
|
-
elementContext: d = "floating",
|
|
230
|
-
altBoundary: g = !1,
|
|
231
|
-
padding: m = 0
|
|
232
|
-
} = K(t, e), a = qe(m), v = l[g ? d === "floating" ? "reference" : "floating" : d], y = ue(await r.getClippingRect({
|
|
233
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(v))) == null || n ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
234
|
-
boundary: c,
|
|
235
|
-
rootBoundary: u,
|
|
236
|
-
strategy: f
|
|
237
|
-
})), w = d === "floating" ? {
|
|
238
|
-
x: i,
|
|
239
|
-
y: o,
|
|
240
|
-
width: s.floating.width,
|
|
241
|
-
height: s.floating.height
|
|
242
|
-
} : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), C = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
243
|
-
x: 1,
|
|
244
|
-
y: 1
|
|
245
|
-
} : {
|
|
246
|
-
x: 1,
|
|
247
|
-
y: 1
|
|
248
|
-
}, A = ue(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
249
|
-
elements: l,
|
|
250
|
-
rect: w,
|
|
251
|
-
offsetParent: b,
|
|
252
|
-
strategy: f
|
|
253
|
-
}) : w);
|
|
254
|
-
return {
|
|
255
|
-
top: (y.top - A.top + a.top) / C.y,
|
|
256
|
-
bottom: (A.bottom - y.bottom + a.bottom) / C.y,
|
|
257
|
-
left: (y.left - A.left + a.left) / C.x,
|
|
258
|
-
right: (A.right - y.right + a.right) / C.x
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
const Mt = (e) => ({
|
|
262
|
-
name: "arrow",
|
|
263
|
-
options: e,
|
|
264
|
-
async fn(t) {
|
|
265
|
-
const {
|
|
266
|
-
x: n,
|
|
267
|
-
y: i,
|
|
268
|
-
placement: o,
|
|
269
|
-
rects: r,
|
|
270
|
-
platform: s,
|
|
271
|
-
elements: l,
|
|
272
|
-
middlewareData: f
|
|
273
|
-
} = t, {
|
|
274
|
-
element: c,
|
|
275
|
-
padding: u = 0
|
|
276
|
-
} = K(e, t) || {};
|
|
277
|
-
if (c == null)
|
|
278
|
-
return {};
|
|
279
|
-
const d = qe(u), g = {
|
|
280
|
-
x: n,
|
|
281
|
-
y: i
|
|
282
|
-
}, m = Ce(o), a = be(m), h = await s.getDimensions(c), v = m === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", C = r.reference[a] + r.reference[m] - g[m] - r.floating[a], A = g[m] - r.reference[m], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
283
|
-
let p = O ? O[b] : 0;
|
|
284
|
-
(!p || !await (s.isElement == null ? void 0 : s.isElement(O))) && (p = l.floating[b] || r.floating[a]);
|
|
285
|
-
const T = C / 2 - A / 2, L = p / 2 - h[a] / 2 - 1, R = ee(d[y], L), B = ee(d[w], L), S = R, D = p - h[a] - B, F = p / 2 - h[a] / 2 + T, N = we(S, F, D), j = !f.arrow && W(o) != null && F !== N && r.reference[a] / 2 - (F < S ? R : B) - h[a] / 2 < 0, I = j ? F < S ? F - S : F - D : 0;
|
|
286
|
-
return {
|
|
287
|
-
[m]: g[m] + I,
|
|
288
|
-
data: {
|
|
289
|
-
[m]: N,
|
|
290
|
-
centerOffset: F - N - I,
|
|
291
|
-
...j && {
|
|
292
|
-
alignmentOffset: I
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
reset: j
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
function jt(e, t, n) {
|
|
300
|
-
return (e ? [...n.filter((o) => W(o) === e), ...n.filter((o) => W(o) !== e)] : n.filter((o) => V(o) === o)).filter((o) => e ? W(o) === e || (t ? ce(o) !== o : !1) : !0);
|
|
301
|
-
}
|
|
302
|
-
const Ht = function(e) {
|
|
303
|
-
return e === void 0 && (e = {}), {
|
|
304
|
-
name: "autoPlacement",
|
|
305
|
-
options: e,
|
|
306
|
-
async fn(t) {
|
|
307
|
-
var n, i, o;
|
|
308
|
-
const {
|
|
309
|
-
rects: r,
|
|
310
|
-
middlewareData: s,
|
|
311
|
-
placement: l,
|
|
312
|
-
platform: f,
|
|
313
|
-
elements: c
|
|
314
|
-
} = t, {
|
|
315
|
-
crossAxis: u = !1,
|
|
316
|
-
alignment: d,
|
|
317
|
-
allowedPlacements: g = Be,
|
|
318
|
-
autoAlignment: m = !0,
|
|
319
|
-
...a
|
|
320
|
-
} = K(e, t), h = d !== void 0 || g === Be ? jt(d || null, m, g) : g, v = await oe(t, a), y = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, w = h[y];
|
|
321
|
-
if (w == null)
|
|
322
|
-
return {};
|
|
323
|
-
const b = Ye(w, r, await (f.isRTL == null ? void 0 : f.isRTL(c.floating)));
|
|
324
|
-
if (l !== w)
|
|
325
|
-
return {
|
|
326
|
-
reset: {
|
|
327
|
-
placement: h[0]
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
const C = [v[V(w)], v[b[0]], v[b[1]]], A = [...((i = s.autoPlacement) == null ? void 0 : i.overflows) || [], {
|
|
331
|
-
placement: w,
|
|
332
|
-
overflows: C
|
|
333
|
-
}], O = h[y + 1];
|
|
334
|
-
if (O)
|
|
335
|
-
return {
|
|
336
|
-
data: {
|
|
337
|
-
index: y + 1,
|
|
338
|
-
overflows: A
|
|
339
|
-
},
|
|
340
|
-
reset: {
|
|
341
|
-
placement: O
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
const p = A.map((R) => {
|
|
345
|
-
const B = W(R.placement);
|
|
346
|
-
return [R.placement, B && u ? R.overflows.slice(0, 2).reduce((S, D) => S + D, 0) : R.overflows[0], R.overflows];
|
|
347
|
-
}).sort((R, B) => R[1] - B[1]), L = ((o = p.filter((R) => R[2].slice(
|
|
348
|
-
0,
|
|
349
|
-
W(R[0]) ? 2 : 3
|
|
350
|
-
).every((B) => B <= 0))[0]) == null ? void 0 : o[0]) || p[0][0];
|
|
351
|
-
return L !== l ? {
|
|
352
|
-
data: {
|
|
353
|
-
index: y + 1,
|
|
354
|
-
overflows: A
|
|
355
|
-
},
|
|
356
|
-
reset: {
|
|
357
|
-
placement: L
|
|
358
|
-
}
|
|
359
|
-
} : {};
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
}, Wt = function(e) {
|
|
363
|
-
return e === void 0 && (e = {}), {
|
|
364
|
-
name: "flip",
|
|
365
|
-
options: e,
|
|
366
|
-
async fn(t) {
|
|
367
|
-
var n, i;
|
|
368
|
-
const {
|
|
369
|
-
placement: o,
|
|
370
|
-
middlewareData: r,
|
|
371
|
-
rects: s,
|
|
372
|
-
initialPlacement: l,
|
|
373
|
-
platform: f,
|
|
374
|
-
elements: c
|
|
375
|
-
} = t, {
|
|
376
|
-
mainAxis: u = !0,
|
|
377
|
-
crossAxis: d = !0,
|
|
378
|
-
fallbackPlacements: g,
|
|
379
|
-
fallbackStrategy: m = "bestFit",
|
|
380
|
-
fallbackAxisSideDirection: a = "none",
|
|
381
|
-
flipAlignment: h = !0,
|
|
382
|
-
...v
|
|
383
|
-
} = K(e, t);
|
|
384
|
-
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
385
|
-
return {};
|
|
386
|
-
const y = V(o), w = V(l) === l, b = await (f.isRTL == null ? void 0 : f.isRTL(c.floating)), C = g || (w || !h ? [fe(l)] : Bt(l));
|
|
387
|
-
!g && a !== "none" && C.push(...kt(l, h, a, b));
|
|
388
|
-
const A = [l, ...C], O = await oe(t, v), p = [];
|
|
389
|
-
let T = ((i = r.flip) == null ? void 0 : i.overflows) || [];
|
|
390
|
-
if (u && p.push(O[y]), d) {
|
|
391
|
-
const S = Ye(o, s, b);
|
|
392
|
-
p.push(O[S[0]], O[S[1]]);
|
|
393
|
-
}
|
|
394
|
-
if (T = [...T, {
|
|
395
|
-
placement: o,
|
|
396
|
-
overflows: p
|
|
397
|
-
}], !p.every((S) => S <= 0)) {
|
|
398
|
-
var L, R;
|
|
399
|
-
const S = (((L = r.flip) == null ? void 0 : L.index) || 0) + 1, D = A[S];
|
|
400
|
-
if (D)
|
|
401
|
-
return {
|
|
402
|
-
data: {
|
|
403
|
-
index: S,
|
|
404
|
-
overflows: T
|
|
405
|
-
},
|
|
406
|
-
reset: {
|
|
407
|
-
placement: D
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
let F = (R = T.filter((N) => N.overflows[0] <= 0).sort((N, j) => N.overflows[1] - j.overflows[1])[0]) == null ? void 0 : R.placement;
|
|
411
|
-
if (!F)
|
|
412
|
-
switch (m) {
|
|
413
|
-
case "bestFit": {
|
|
414
|
-
var B;
|
|
415
|
-
const N = (B = T.map((j) => [j.placement, j.overflows.filter((I) => I > 0).reduce((I, rt) => I + rt, 0)]).sort((j, I) => j[1] - I[1])[0]) == null ? void 0 : B[0];
|
|
416
|
-
N && (F = N);
|
|
417
|
-
break;
|
|
418
|
-
}
|
|
419
|
-
case "initialPlacement":
|
|
420
|
-
F = l;
|
|
421
|
-
break;
|
|
422
|
-
}
|
|
423
|
-
if (o !== F)
|
|
424
|
-
return {
|
|
425
|
-
reset: {
|
|
426
|
-
placement: F
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
return {};
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
function ke(e, t) {
|
|
435
|
-
return {
|
|
436
|
-
top: e.top - t.height,
|
|
437
|
-
right: e.right - t.width,
|
|
438
|
-
bottom: e.bottom - t.height,
|
|
439
|
-
left: e.left - t.width
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
function Ne(e) {
|
|
443
|
-
return Ue.some((t) => e[t] >= 0);
|
|
444
|
-
}
|
|
445
|
-
const _t = function(e) {
|
|
446
|
-
return e === void 0 && (e = {}), {
|
|
447
|
-
name: "hide",
|
|
448
|
-
options: e,
|
|
449
|
-
async fn(t) {
|
|
450
|
-
const {
|
|
451
|
-
rects: n
|
|
452
|
-
} = t, {
|
|
453
|
-
strategy: i = "referenceHidden",
|
|
454
|
-
...o
|
|
455
|
-
} = K(e, t);
|
|
456
|
-
switch (i) {
|
|
457
|
-
case "referenceHidden": {
|
|
458
|
-
const r = await oe(t, {
|
|
459
|
-
...o,
|
|
460
|
-
elementContext: "reference"
|
|
461
|
-
}), s = ke(r, n.reference);
|
|
462
|
-
return {
|
|
463
|
-
data: {
|
|
464
|
-
referenceHiddenOffsets: s,
|
|
465
|
-
referenceHidden: Ne(s)
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
case "escaped": {
|
|
470
|
-
const r = await oe(t, {
|
|
471
|
-
...o,
|
|
472
|
-
altBoundary: !0
|
|
473
|
-
}), s = ke(r, n.floating);
|
|
474
|
-
return {
|
|
475
|
-
data: {
|
|
476
|
-
escapedOffsets: s,
|
|
477
|
-
escaped: Ne(s)
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
default:
|
|
482
|
-
return {};
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
async function zt(e, t) {
|
|
488
|
-
const {
|
|
489
|
-
placement: n,
|
|
490
|
-
platform: i,
|
|
491
|
-
elements: o
|
|
492
|
-
} = e, r = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), s = V(n), l = W(n), f = de(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, u = r && f ? -1 : 1, d = K(t, e);
|
|
493
|
-
let {
|
|
494
|
-
mainAxis: g,
|
|
495
|
-
crossAxis: m,
|
|
496
|
-
alignmentAxis: a
|
|
497
|
-
} = typeof d == "number" ? {
|
|
498
|
-
mainAxis: d,
|
|
499
|
-
crossAxis: 0,
|
|
500
|
-
alignmentAxis: null
|
|
501
|
-
} : {
|
|
502
|
-
mainAxis: 0,
|
|
503
|
-
crossAxis: 0,
|
|
504
|
-
alignmentAxis: null,
|
|
505
|
-
...d
|
|
506
|
-
};
|
|
507
|
-
return l && typeof a == "number" && (m = l === "end" ? a * -1 : a), f ? {
|
|
508
|
-
x: m * u,
|
|
509
|
-
y: g * c
|
|
510
|
-
} : {
|
|
511
|
-
x: g * c,
|
|
512
|
-
y: m * u
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
const It = function(e) {
|
|
516
|
-
return e === void 0 && (e = 0), {
|
|
517
|
-
name: "offset",
|
|
518
|
-
options: e,
|
|
519
|
-
async fn(t) {
|
|
520
|
-
var n, i;
|
|
521
|
-
const {
|
|
522
|
-
x: o,
|
|
523
|
-
y: r,
|
|
524
|
-
placement: s,
|
|
525
|
-
middlewareData: l
|
|
526
|
-
} = t, f = await zt(t, e);
|
|
527
|
-
return s === ((n = l.offset) == null ? void 0 : n.placement) && (i = l.arrow) != null && i.alignmentOffset ? {} : {
|
|
528
|
-
x: o + f.x,
|
|
529
|
-
y: r + f.y,
|
|
530
|
-
data: {
|
|
531
|
-
...f,
|
|
532
|
-
placement: s
|
|
533
|
-
}
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
}, Vt = function(e) {
|
|
538
|
-
return e === void 0 && (e = {}), {
|
|
539
|
-
name: "shift",
|
|
540
|
-
options: e,
|
|
541
|
-
async fn(t) {
|
|
542
|
-
const {
|
|
543
|
-
x: n,
|
|
544
|
-
y: i,
|
|
545
|
-
placement: o
|
|
546
|
-
} = t, {
|
|
547
|
-
mainAxis: r = !0,
|
|
548
|
-
crossAxis: s = !1,
|
|
549
|
-
limiter: l = {
|
|
550
|
-
fn: (v) => {
|
|
551
|
-
let {
|
|
552
|
-
x: y,
|
|
553
|
-
y: w
|
|
554
|
-
} = v;
|
|
555
|
-
return {
|
|
556
|
-
x: y,
|
|
557
|
-
y: w
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
},
|
|
561
|
-
...f
|
|
562
|
-
} = K(e, t), c = {
|
|
563
|
-
x: n,
|
|
564
|
-
y: i
|
|
565
|
-
}, u = await oe(t, f), d = de(V(o)), g = Xe(d);
|
|
566
|
-
let m = c[g], a = c[d];
|
|
567
|
-
if (r) {
|
|
568
|
-
const v = g === "y" ? "top" : "left", y = g === "y" ? "bottom" : "right", w = m + u[v], b = m - u[y];
|
|
569
|
-
m = we(w, m, b);
|
|
570
|
-
}
|
|
571
|
-
if (s) {
|
|
572
|
-
const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = a + u[v], b = a - u[y];
|
|
573
|
-
a = we(w, a, b);
|
|
574
|
-
}
|
|
575
|
-
const h = l.fn({
|
|
576
|
-
...t,
|
|
577
|
-
[g]: m,
|
|
578
|
-
[d]: a
|
|
579
|
-
});
|
|
580
|
-
return {
|
|
581
|
-
...h,
|
|
582
|
-
data: {
|
|
583
|
-
x: h.x - n,
|
|
584
|
-
y: h.y - i
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
};
|
|
590
|
-
function Q(e) {
|
|
591
|
-
return Ae(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
592
|
-
}
|
|
593
|
-
function k(e) {
|
|
594
|
-
var t;
|
|
595
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
596
|
-
}
|
|
597
|
-
function U(e) {
|
|
598
|
-
var t;
|
|
599
|
-
return (t = (Ae(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
600
|
-
}
|
|
601
|
-
function Ae(e) {
|
|
602
|
-
return e instanceof Node || e instanceof k(e).Node;
|
|
603
|
-
}
|
|
604
|
-
function _(e) {
|
|
605
|
-
return e instanceof Element || e instanceof k(e).Element;
|
|
606
|
-
}
|
|
607
|
-
function z(e) {
|
|
608
|
-
return e instanceof HTMLElement || e instanceof k(e).HTMLElement;
|
|
609
|
-
}
|
|
610
|
-
function $e(e) {
|
|
611
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof k(e).ShadowRoot;
|
|
612
|
-
}
|
|
613
|
-
function se(e) {
|
|
614
|
-
const {
|
|
615
|
-
overflow: t,
|
|
616
|
-
overflowX: n,
|
|
617
|
-
overflowY: i,
|
|
618
|
-
display: o
|
|
619
|
-
} = M(e);
|
|
620
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
|
|
621
|
-
}
|
|
622
|
-
function Ut(e) {
|
|
623
|
-
return ["table", "td", "th"].includes(Q(e));
|
|
624
|
-
}
|
|
625
|
-
function Oe(e) {
|
|
626
|
-
const t = Te(), n = M(e);
|
|
627
|
-
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
628
|
-
}
|
|
629
|
-
function Xt(e) {
|
|
630
|
-
let t = Y(e);
|
|
631
|
-
for (; z(t) && !te(t); ) {
|
|
632
|
-
if (Oe(t))
|
|
633
|
-
return t;
|
|
634
|
-
t = Y(t);
|
|
635
|
-
}
|
|
636
|
-
return null;
|
|
637
|
-
}
|
|
638
|
-
function Te() {
|
|
639
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
640
|
-
}
|
|
641
|
-
function te(e) {
|
|
642
|
-
return ["html", "body", "#document"].includes(Q(e));
|
|
643
|
-
}
|
|
644
|
-
function M(e) {
|
|
645
|
-
return k(e).getComputedStyle(e);
|
|
646
|
-
}
|
|
647
|
-
function me(e) {
|
|
648
|
-
return _(e) ? {
|
|
649
|
-
scrollLeft: e.scrollLeft,
|
|
650
|
-
scrollTop: e.scrollTop
|
|
651
|
-
} : {
|
|
652
|
-
scrollLeft: e.pageXOffset,
|
|
653
|
-
scrollTop: e.pageYOffset
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
function Y(e) {
|
|
657
|
-
if (Q(e) === "html")
|
|
658
|
-
return e;
|
|
659
|
-
const t = e.assignedSlot || e.parentNode || $e(e) && e.host || U(e);
|
|
660
|
-
return $e(t) ? t.host : t;
|
|
661
|
-
}
|
|
662
|
-
function Ge(e) {
|
|
663
|
-
const t = Y(e);
|
|
664
|
-
return te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : z(t) && se(t) ? t : Ge(t);
|
|
665
|
-
}
|
|
666
|
-
function ie(e, t, n) {
|
|
667
|
-
var i;
|
|
668
|
-
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
669
|
-
const o = Ge(e), r = o === ((i = e.ownerDocument) == null ? void 0 : i.body), s = k(o);
|
|
670
|
-
return r ? t.concat(s, s.visualViewport || [], se(o) ? o : [], s.frameElement && n ? ie(s.frameElement) : []) : t.concat(o, ie(o, [], n));
|
|
671
|
-
}
|
|
672
|
-
function Ke(e) {
|
|
673
|
-
const t = M(e);
|
|
674
|
-
let n = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
675
|
-
const o = z(e), r = o ? e.offsetWidth : n, s = o ? e.offsetHeight : i, l = ae(n) !== r || ae(i) !== s;
|
|
676
|
-
return l && (n = r, i = s), {
|
|
677
|
-
width: n,
|
|
678
|
-
height: i,
|
|
679
|
-
$: l
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
function Se(e) {
|
|
683
|
-
return _(e) ? e : e.contextElement;
|
|
684
|
-
}
|
|
685
|
-
function Z(e) {
|
|
686
|
-
const t = Se(e);
|
|
687
|
-
if (!z(t))
|
|
688
|
-
return X(1);
|
|
689
|
-
const n = t.getBoundingClientRect(), {
|
|
690
|
-
width: i,
|
|
691
|
-
height: o,
|
|
692
|
-
$: r
|
|
693
|
-
} = Ke(t);
|
|
694
|
-
let s = (r ? ae(n.width) : n.width) / i, l = (r ? ae(n.height) : n.height) / o;
|
|
695
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
696
|
-
x: s,
|
|
697
|
-
y: l
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
const Yt = /* @__PURE__ */ X(0);
|
|
701
|
-
function Qe(e) {
|
|
702
|
-
const t = k(e);
|
|
703
|
-
return !Te() || !t.visualViewport ? Yt : {
|
|
704
|
-
x: t.visualViewport.offsetLeft,
|
|
705
|
-
y: t.visualViewport.offsetTop
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
function qt(e, t, n) {
|
|
709
|
-
return t === void 0 && (t = !1), !n || t && n !== k(e) ? !1 : t;
|
|
710
|
-
}
|
|
711
|
-
function G(e, t, n, i) {
|
|
712
|
-
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
713
|
-
const o = e.getBoundingClientRect(), r = Se(e);
|
|
714
|
-
let s = X(1);
|
|
715
|
-
t && (i ? _(i) && (s = Z(i)) : s = Z(e));
|
|
716
|
-
const l = qt(r, n, i) ? Qe(r) : X(0);
|
|
717
|
-
let f = (o.left + l.x) / s.x, c = (o.top + l.y) / s.y, u = o.width / s.x, d = o.height / s.y;
|
|
718
|
-
if (r) {
|
|
719
|
-
const g = k(r), m = i && _(i) ? k(i) : i;
|
|
720
|
-
let a = g, h = a.frameElement;
|
|
721
|
-
for (; h && i && m !== a; ) {
|
|
722
|
-
const v = Z(h), y = h.getBoundingClientRect(), w = M(h), b = y.left + (h.clientLeft + parseFloat(w.paddingLeft)) * v.x, C = y.top + (h.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
723
|
-
f *= v.x, c *= v.y, u *= v.x, d *= v.y, f += b, c += C, a = k(h), h = a.frameElement;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
return ue({
|
|
727
|
-
width: u,
|
|
728
|
-
height: d,
|
|
729
|
-
x: f,
|
|
730
|
-
y: c
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
const Gt = [":popover-open", ":modal"];
|
|
734
|
-
function Re(e) {
|
|
735
|
-
return Gt.some((t) => {
|
|
736
|
-
try {
|
|
737
|
-
return e.matches(t);
|
|
738
|
-
} catch {
|
|
739
|
-
return !1;
|
|
740
|
-
}
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
function Kt(e) {
|
|
744
|
-
let {
|
|
745
|
-
elements: t,
|
|
746
|
-
rect: n,
|
|
747
|
-
offsetParent: i,
|
|
748
|
-
strategy: o
|
|
749
|
-
} = e;
|
|
750
|
-
const r = o === "fixed", s = U(i), l = t ? Re(t.floating) : !1;
|
|
751
|
-
if (i === s || l && r)
|
|
752
|
-
return n;
|
|
753
|
-
let f = {
|
|
754
|
-
scrollLeft: 0,
|
|
755
|
-
scrollTop: 0
|
|
756
|
-
}, c = X(1);
|
|
757
|
-
const u = X(0), d = z(i);
|
|
758
|
-
if ((d || !d && !r) && ((Q(i) !== "body" || se(s)) && (f = me(i)), z(i))) {
|
|
759
|
-
const g = G(i);
|
|
760
|
-
c = Z(i), u.x = g.x + i.clientLeft, u.y = g.y + i.clientTop;
|
|
761
|
-
}
|
|
762
|
-
return {
|
|
763
|
-
width: n.width * c.x,
|
|
764
|
-
height: n.height * c.y,
|
|
765
|
-
x: n.x * c.x - f.scrollLeft * c.x + u.x,
|
|
766
|
-
y: n.y * c.y - f.scrollTop * c.y + u.y
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
function Qt(e) {
|
|
770
|
-
return Array.from(e.getClientRects());
|
|
771
|
-
}
|
|
772
|
-
function Je(e) {
|
|
773
|
-
return G(U(e)).left + me(e).scrollLeft;
|
|
774
|
-
}
|
|
775
|
-
function Jt(e) {
|
|
776
|
-
const t = U(e), n = me(e), i = e.ownerDocument.body, o = q(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = q(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
777
|
-
let s = -n.scrollLeft + Je(e);
|
|
778
|
-
const l = -n.scrollTop;
|
|
779
|
-
return M(i).direction === "rtl" && (s += q(t.clientWidth, i.clientWidth) - o), {
|
|
780
|
-
width: o,
|
|
781
|
-
height: r,
|
|
782
|
-
x: s,
|
|
783
|
-
y: l
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
function Zt(e, t) {
|
|
787
|
-
const n = k(e), i = U(e), o = n.visualViewport;
|
|
788
|
-
let r = i.clientWidth, s = i.clientHeight, l = 0, f = 0;
|
|
789
|
-
if (o) {
|
|
790
|
-
r = o.width, s = o.height;
|
|
791
|
-
const c = Te();
|
|
792
|
-
(!c || c && t === "fixed") && (l = o.offsetLeft, f = o.offsetTop);
|
|
793
|
-
}
|
|
794
|
-
return {
|
|
795
|
-
width: r,
|
|
796
|
-
height: s,
|
|
797
|
-
x: l,
|
|
798
|
-
y: f
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
function en(e, t) {
|
|
802
|
-
const n = G(e, !0, t === "fixed"), i = n.top + e.clientTop, o = n.left + e.clientLeft, r = z(e) ? Z(e) : X(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, f = o * r.x, c = i * r.y;
|
|
803
|
-
return {
|
|
804
|
-
width: s,
|
|
805
|
-
height: l,
|
|
806
|
-
x: f,
|
|
807
|
-
y: c
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
function Me(e, t, n) {
|
|
811
|
-
let i;
|
|
812
|
-
if (t === "viewport")
|
|
813
|
-
i = Zt(e, n);
|
|
814
|
-
else if (t === "document")
|
|
815
|
-
i = Jt(U(e));
|
|
816
|
-
else if (_(t))
|
|
817
|
-
i = en(t, n);
|
|
818
|
-
else {
|
|
819
|
-
const o = Qe(e);
|
|
820
|
-
i = {
|
|
821
|
-
...t,
|
|
822
|
-
x: t.x - o.x,
|
|
823
|
-
y: t.y - o.y
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
return ue(i);
|
|
827
|
-
}
|
|
828
|
-
function Ze(e, t) {
|
|
829
|
-
const n = Y(e);
|
|
830
|
-
return n === t || !_(n) || te(n) ? !1 : M(n).position === "fixed" || Ze(n, t);
|
|
831
|
-
}
|
|
832
|
-
function tn(e, t) {
|
|
833
|
-
const n = t.get(e);
|
|
834
|
-
if (n)
|
|
835
|
-
return n;
|
|
836
|
-
let i = ie(e, [], !1).filter((l) => _(l) && Q(l) !== "body"), o = null;
|
|
837
|
-
const r = M(e).position === "fixed";
|
|
838
|
-
let s = r ? Y(e) : e;
|
|
839
|
-
for (; _(s) && !te(s); ) {
|
|
840
|
-
const l = M(s), f = Oe(s);
|
|
841
|
-
!f && l.position === "fixed" && (o = null), (r ? !f && !o : !f && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || se(s) && !f && Ze(e, s)) ? i = i.filter((u) => u !== s) : o = l, s = Y(s);
|
|
842
|
-
}
|
|
843
|
-
return t.set(e, i), i;
|
|
844
|
-
}
|
|
845
|
-
function nn(e) {
|
|
846
|
-
let {
|
|
847
|
-
element: t,
|
|
848
|
-
boundary: n,
|
|
849
|
-
rootBoundary: i,
|
|
850
|
-
strategy: o
|
|
851
|
-
} = e;
|
|
852
|
-
const s = [...n === "clippingAncestors" ? Re(t) ? [] : tn(t, this._c) : [].concat(n), i], l = s[0], f = s.reduce((c, u) => {
|
|
853
|
-
const d = Me(t, u, o);
|
|
854
|
-
return c.top = q(d.top, c.top), c.right = ee(d.right, c.right), c.bottom = ee(d.bottom, c.bottom), c.left = q(d.left, c.left), c;
|
|
855
|
-
}, Me(t, l, o));
|
|
856
|
-
return {
|
|
857
|
-
width: f.right - f.left,
|
|
858
|
-
height: f.bottom - f.top,
|
|
859
|
-
x: f.left,
|
|
860
|
-
y: f.top
|
|
861
|
-
};
|
|
862
|
-
}
|
|
863
|
-
function on(e) {
|
|
864
|
-
const {
|
|
865
|
-
width: t,
|
|
866
|
-
height: n
|
|
867
|
-
} = Ke(e);
|
|
868
|
-
return {
|
|
869
|
-
width: t,
|
|
870
|
-
height: n
|
|
871
|
-
};
|
|
872
|
-
}
|
|
873
|
-
function rn(e, t, n) {
|
|
874
|
-
const i = z(t), o = U(t), r = n === "fixed", s = G(e, !0, r, t);
|
|
875
|
-
let l = {
|
|
876
|
-
scrollLeft: 0,
|
|
877
|
-
scrollTop: 0
|
|
878
|
-
};
|
|
879
|
-
const f = X(0);
|
|
880
|
-
if (i || !i && !r)
|
|
881
|
-
if ((Q(t) !== "body" || se(o)) && (l = me(t)), i) {
|
|
882
|
-
const d = G(t, !0, r, t);
|
|
883
|
-
f.x = d.x + t.clientLeft, f.y = d.y + t.clientTop;
|
|
884
|
-
} else
|
|
885
|
-
o && (f.x = Je(o));
|
|
886
|
-
const c = s.left + l.scrollLeft - f.x, u = s.top + l.scrollTop - f.y;
|
|
887
|
-
return {
|
|
888
|
-
x: c,
|
|
889
|
-
y: u,
|
|
890
|
-
width: s.width,
|
|
891
|
-
height: s.height
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
function ve(e) {
|
|
895
|
-
return M(e).position === "static";
|
|
896
|
-
}
|
|
897
|
-
function je(e, t) {
|
|
898
|
-
return !z(e) || M(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
899
|
-
}
|
|
900
|
-
function et(e, t) {
|
|
901
|
-
const n = k(e);
|
|
902
|
-
if (Re(e))
|
|
903
|
-
return n;
|
|
904
|
-
if (!z(e)) {
|
|
905
|
-
let o = Y(e);
|
|
906
|
-
for (; o && !te(o); ) {
|
|
907
|
-
if (_(o) && !ve(o))
|
|
908
|
-
return o;
|
|
909
|
-
o = Y(o);
|
|
910
|
-
}
|
|
911
|
-
return n;
|
|
912
|
-
}
|
|
913
|
-
let i = je(e, t);
|
|
914
|
-
for (; i && Ut(i) && ve(i); )
|
|
915
|
-
i = je(i, t);
|
|
916
|
-
return i && te(i) && ve(i) && !Oe(i) ? n : i || Xt(e) || n;
|
|
917
|
-
}
|
|
918
|
-
const sn = async function(e) {
|
|
919
|
-
const t = this.getOffsetParent || et, n = this.getDimensions, i = await n(e.floating);
|
|
920
|
-
return {
|
|
921
|
-
reference: rn(e.reference, await t(e.floating), e.strategy),
|
|
922
|
-
floating: {
|
|
923
|
-
x: 0,
|
|
924
|
-
y: 0,
|
|
925
|
-
width: i.width,
|
|
926
|
-
height: i.height
|
|
927
|
-
}
|
|
928
|
-
};
|
|
929
|
-
};
|
|
930
|
-
function ln(e) {
|
|
931
|
-
return M(e).direction === "rtl";
|
|
932
|
-
}
|
|
933
|
-
const an = {
|
|
934
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Kt,
|
|
935
|
-
getDocumentElement: U,
|
|
936
|
-
getClippingRect: nn,
|
|
937
|
-
getOffsetParent: et,
|
|
938
|
-
getElementRects: sn,
|
|
939
|
-
getClientRects: Qt,
|
|
940
|
-
getDimensions: on,
|
|
941
|
-
getScale: Z,
|
|
942
|
-
isElement: _,
|
|
943
|
-
isRTL: ln
|
|
944
|
-
};
|
|
945
|
-
function cn(e, t) {
|
|
946
|
-
let n = null, i;
|
|
947
|
-
const o = U(e);
|
|
948
|
-
function r() {
|
|
949
|
-
var l;
|
|
950
|
-
clearTimeout(i), (l = n) == null || l.disconnect(), n = null;
|
|
951
|
-
}
|
|
952
|
-
function s(l, f) {
|
|
953
|
-
l === void 0 && (l = !1), f === void 0 && (f = 1), r();
|
|
954
|
-
const {
|
|
955
|
-
left: c,
|
|
956
|
-
top: u,
|
|
957
|
-
width: d,
|
|
958
|
-
height: g
|
|
959
|
-
} = e.getBoundingClientRect();
|
|
960
|
-
if (l || t(), !d || !g)
|
|
961
|
-
return;
|
|
962
|
-
const m = le(u), a = le(o.clientWidth - (c + d)), h = le(o.clientHeight - (u + g)), v = le(c), w = {
|
|
963
|
-
rootMargin: -m + "px " + -a + "px " + -h + "px " + -v + "px",
|
|
964
|
-
threshold: q(0, ee(1, f)) || 1
|
|
965
|
-
};
|
|
966
|
-
let b = !0;
|
|
967
|
-
function C(A) {
|
|
968
|
-
const O = A[0].intersectionRatio;
|
|
969
|
-
if (O !== f) {
|
|
970
|
-
if (!b)
|
|
971
|
-
return s();
|
|
972
|
-
O ? s(!1, O) : i = setTimeout(() => {
|
|
973
|
-
s(!1, 1e-7);
|
|
974
|
-
}, 1e3);
|
|
975
|
-
}
|
|
976
|
-
b = !1;
|
|
977
|
-
}
|
|
978
|
-
try {
|
|
979
|
-
n = new IntersectionObserver(C, {
|
|
980
|
-
...w,
|
|
981
|
-
root: o.ownerDocument
|
|
982
|
-
});
|
|
983
|
-
} catch {
|
|
984
|
-
n = new IntersectionObserver(C, w);
|
|
985
|
-
}
|
|
986
|
-
n.observe(e);
|
|
987
|
-
}
|
|
988
|
-
return s(!0), r;
|
|
989
|
-
}
|
|
990
|
-
function fn(e, t, n, i) {
|
|
991
|
-
i === void 0 && (i = {});
|
|
992
|
-
const {
|
|
993
|
-
ancestorScroll: o = !0,
|
|
994
|
-
ancestorResize: r = !0,
|
|
995
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
996
|
-
layoutShift: l = typeof IntersectionObserver == "function",
|
|
997
|
-
animationFrame: f = !1
|
|
998
|
-
} = i, c = Se(e), u = o || r ? [...c ? ie(c) : [], ...ie(t)] : [];
|
|
999
|
-
u.forEach((y) => {
|
|
1000
|
-
o && y.addEventListener("scroll", n, {
|
|
1001
|
-
passive: !0
|
|
1002
|
-
}), r && y.addEventListener("resize", n);
|
|
1003
|
-
});
|
|
1004
|
-
const d = c && l ? cn(c, n) : null;
|
|
1005
|
-
let g = -1, m = null;
|
|
1006
|
-
s && (m = new ResizeObserver((y) => {
|
|
1007
|
-
let [w] = y;
|
|
1008
|
-
w && w.target === c && m && (m.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1009
|
-
var b;
|
|
1010
|
-
(b = m) == null || b.observe(t);
|
|
1011
|
-
})), n();
|
|
1012
|
-
}), c && !f && m.observe(c), m.observe(t));
|
|
1013
|
-
let a, h = f ? G(e) : null;
|
|
1014
|
-
f && v();
|
|
1015
|
-
function v() {
|
|
1016
|
-
const y = G(e);
|
|
1017
|
-
h && (y.x !== h.x || y.y !== h.y || y.width !== h.width || y.height !== h.height) && n(), h = y, a = requestAnimationFrame(v);
|
|
1018
|
-
}
|
|
1019
|
-
return n(), () => {
|
|
1020
|
-
var y;
|
|
1021
|
-
u.forEach((w) => {
|
|
1022
|
-
o && w.removeEventListener("scroll", n), r && w.removeEventListener("resize", n);
|
|
1023
|
-
}), d == null || d(), (y = m) == null || y.disconnect(), m = null, f && cancelAnimationFrame(a);
|
|
1024
|
-
};
|
|
1025
|
-
}
|
|
1026
|
-
const un = It, dn = Ht, mn = Vt, pn = Wt, hn = _t, gn = Mt, vn = (e, t, n) => {
|
|
1027
|
-
const i = /* @__PURE__ */ new Map(), o = {
|
|
1028
|
-
platform: an,
|
|
1029
|
-
...n
|
|
1030
|
-
}, r = {
|
|
1031
|
-
...o.platform,
|
|
1032
|
-
_c: i
|
|
1033
|
-
};
|
|
1034
|
-
return $t(e, t, {
|
|
1035
|
-
...o,
|
|
1036
|
-
platform: r
|
|
1037
|
-
});
|
|
1038
|
-
};
|
|
1039
|
-
function yn(e) {
|
|
1040
|
-
return e != null && typeof e == "object" && "$el" in e;
|
|
1041
|
-
}
|
|
1042
|
-
function xe(e) {
|
|
1043
|
-
if (yn(e)) {
|
|
1044
|
-
const t = e.$el;
|
|
1045
|
-
return Ae(t) && Q(t) === "#comment" ? null : t;
|
|
1046
|
-
}
|
|
1047
|
-
return e;
|
|
1048
|
-
}
|
|
1049
|
-
function wn(e) {
|
|
1050
|
-
return {
|
|
1051
|
-
name: "arrow",
|
|
1052
|
-
options: e,
|
|
1053
|
-
fn(t) {
|
|
1054
|
-
const n = xe(H(e.element));
|
|
1055
|
-
return n == null ? {} : gn({
|
|
1056
|
-
element: n,
|
|
1057
|
-
padding: e.padding
|
|
1058
|
-
}).fn(t);
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
function tt(e) {
|
|
1063
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1064
|
-
}
|
|
1065
|
-
function He(e, t) {
|
|
1066
|
-
const n = tt(e);
|
|
1067
|
-
return Math.round(t * n) / n;
|
|
1068
|
-
}
|
|
1069
|
-
function xn(e, t, n) {
|
|
1070
|
-
n === void 0 && (n = {});
|
|
1071
|
-
const i = n.whileElementsMounted, o = P(() => {
|
|
1072
|
-
var p;
|
|
1073
|
-
return (p = H(n.open)) != null ? p : !0;
|
|
1074
|
-
}), r = P(() => H(n.middleware)), s = P(() => {
|
|
1075
|
-
var p;
|
|
1076
|
-
return (p = H(n.placement)) != null ? p : "bottom";
|
|
1077
|
-
}), l = P(() => {
|
|
1078
|
-
var p;
|
|
1079
|
-
return (p = H(n.strategy)) != null ? p : "absolute";
|
|
1080
|
-
}), f = P(() => {
|
|
1081
|
-
var p;
|
|
1082
|
-
return (p = H(n.transform)) != null ? p : !0;
|
|
1083
|
-
}), c = P(() => xe(e.value)), u = P(() => xe(t.value)), d = E(0), g = E(0), m = E(l.value), a = E(s.value), h = ze({}), v = E(!1), y = P(() => {
|
|
1084
|
-
const p = {
|
|
1085
|
-
position: m.value,
|
|
1086
|
-
left: "0",
|
|
1087
|
-
top: "0"
|
|
1088
|
-
};
|
|
1089
|
-
if (!u.value)
|
|
1090
|
-
return p;
|
|
1091
|
-
const T = He(u.value, d.value), L = He(u.value, g.value);
|
|
1092
|
-
return f.value ? {
|
|
1093
|
-
...p,
|
|
1094
|
-
transform: "translate(" + T + "px, " + L + "px)",
|
|
1095
|
-
...tt(u.value) >= 1.5 && {
|
|
1096
|
-
willChange: "transform"
|
|
1097
|
-
}
|
|
1098
|
-
} : {
|
|
1099
|
-
position: m.value,
|
|
1100
|
-
left: T + "px",
|
|
1101
|
-
top: L + "px"
|
|
1102
|
-
};
|
|
1103
|
-
});
|
|
1104
|
-
let w;
|
|
1105
|
-
function b() {
|
|
1106
|
-
c.value == null || u.value == null || vn(c.value, u.value, {
|
|
1107
|
-
middleware: r.value,
|
|
1108
|
-
placement: s.value,
|
|
1109
|
-
strategy: l.value
|
|
1110
|
-
}).then((p) => {
|
|
1111
|
-
d.value = p.x, g.value = p.y, m.value = p.strategy, a.value = p.placement, h.value = p.middlewareData, v.value = !0;
|
|
1112
|
-
});
|
|
1113
|
-
}
|
|
1114
|
-
function C() {
|
|
1115
|
-
typeof w == "function" && (w(), w = void 0);
|
|
1116
|
-
}
|
|
1117
|
-
function A() {
|
|
1118
|
-
if (C(), i === void 0) {
|
|
1119
|
-
b();
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
if (c.value != null && u.value != null) {
|
|
1123
|
-
w = i(c.value, u.value, b);
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
function O() {
|
|
1128
|
-
o.value || (v.value = !1);
|
|
1129
|
-
}
|
|
1130
|
-
return $([r, s, l], b, {
|
|
1131
|
-
flush: "sync"
|
|
1132
|
-
}), $([c, u], A, {
|
|
1133
|
-
flush: "sync"
|
|
1134
|
-
}), $(o, O, {
|
|
1135
|
-
flush: "sync"
|
|
1136
|
-
}), st() && lt(C), {
|
|
1137
|
-
x: J(d),
|
|
1138
|
-
y: J(g),
|
|
1139
|
-
strategy: J(m),
|
|
1140
|
-
placement: J(a),
|
|
1141
|
-
middlewareData: J(h),
|
|
1142
|
-
isPositioned: J(v),
|
|
1143
|
-
floatingStyles: y,
|
|
1144
|
-
update: b
|
|
1145
|
-
};
|
|
1146
|
-
}
|
|
1147
|
-
var bn = Object.defineProperty, Cn = (e, t, n) => t in e ? bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, An = (e, t, n) => (Cn(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
1148
|
-
function re(e) {
|
|
1149
|
-
return e == null || e.value == null ? null : e.value instanceof Node ? e.value : "$el" in e.value && e.value.$el ? re(E(e.value.$el)) : "getBoundingClientRect" in e.value ? e.value : null;
|
|
1150
|
-
}
|
|
1151
|
-
function nt(e) {
|
|
1152
|
-
return e.reduce((t, n) => n.type === Ie ? t.concat(nt(n.children)) : t.concat(n), []);
|
|
1153
|
-
}
|
|
1154
|
-
function On(e) {
|
|
1155
|
-
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
1156
|
-
}
|
|
1157
|
-
function We(e) {
|
|
1158
|
-
return e = H(e), e && (e == null ? void 0 : e.nodeType) !== Node.COMMENT_NODE;
|
|
1159
|
-
}
|
|
1160
|
-
class Tn {
|
|
1161
|
-
constructor() {
|
|
1162
|
-
An(this, "current", this.detect());
|
|
1163
|
-
}
|
|
1164
|
-
set(t) {
|
|
1165
|
-
this.current !== t && (this.current = t);
|
|
1166
|
-
}
|
|
1167
|
-
reset() {
|
|
1168
|
-
this.set(this.detect());
|
|
1169
|
-
}
|
|
1170
|
-
get isServer() {
|
|
1171
|
-
return this.current === "server";
|
|
1172
|
-
}
|
|
1173
|
-
get isClient() {
|
|
1174
|
-
return this.current === "client";
|
|
1175
|
-
}
|
|
1176
|
-
detect() {
|
|
1177
|
-
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
const Ee = new Tn();
|
|
1181
|
-
function Sn(e) {
|
|
1182
|
-
if (Ee.isServer)
|
|
1183
|
-
return null;
|
|
1184
|
-
if (e instanceof Node)
|
|
1185
|
-
return e.ownerDocument;
|
|
1186
|
-
if (Object.prototype.hasOwnProperty.call(e, "value")) {
|
|
1187
|
-
const t = re(e);
|
|
1188
|
-
if (t)
|
|
1189
|
-
return t.ownerDocument;
|
|
1190
|
-
}
|
|
1191
|
-
return document;
|
|
1192
|
-
}
|
|
1193
|
-
function Rn(e, t) {
|
|
1194
|
-
!t.vueTransition && (t.transitionName || t.transitionType) && console.warn(`[headlessui-float]: <${e} /> pass "transition-name" or "transition-type" prop, must be set "vue-transition" prop.`);
|
|
1195
|
-
}
|
|
1196
|
-
function En(e, t, n, i, o) {
|
|
1197
|
-
$([
|
|
1198
|
-
() => o.offset,
|
|
1199
|
-
() => o.flip,
|
|
1200
|
-
() => o.shift,
|
|
1201
|
-
() => o.autoPlacement,
|
|
1202
|
-
() => o.arrow,
|
|
1203
|
-
() => o.hide,
|
|
1204
|
-
() => o.middleware
|
|
1205
|
-
], () => {
|
|
1206
|
-
const r = [];
|
|
1207
|
-
(typeof o.offset == "number" || typeof o.offset == "object" || typeof o.offset == "function") && r.push(un(o.offset)), (o.flip === !0 || typeof o.flip == "number" || typeof o.flip == "object") && r.push(pn({
|
|
1208
|
-
padding: typeof o.flip == "number" ? o.flip : void 0,
|
|
1209
|
-
...typeof o.flip == "object" ? o.flip : {}
|
|
1210
|
-
})), (o.shift === !0 || typeof o.shift == "number" || typeof o.shift == "object") && r.push(mn({
|
|
1211
|
-
padding: typeof o.shift == "number" ? o.shift : void 0,
|
|
1212
|
-
...typeof o.shift == "object" ? o.shift : {}
|
|
1213
|
-
})), (o.autoPlacement === !0 || typeof o.autoPlacement == "object") && r.push(dn(
|
|
1214
|
-
typeof o.autoPlacement == "object" ? o.autoPlacement : void 0
|
|
1215
|
-
)), r.push(...typeof o.middleware == "function" ? o.middleware({
|
|
1216
|
-
referenceEl: t,
|
|
1217
|
-
floatingEl: n
|
|
1218
|
-
}) : o.middleware || []), (o.arrow === !0 || typeof o.arrow == "number") && r.push(wn({
|
|
1219
|
-
element: i,
|
|
1220
|
-
padding: o.arrow === !0 ? 0 : o.arrow
|
|
1221
|
-
})), (o.hide === !0 || typeof o.hide == "object" || Array.isArray(o.hide)) && (Array.isArray(o.hide) ? o.hide : [o.hide]).forEach((s) => {
|
|
1222
|
-
r.push(hn(
|
|
1223
|
-
typeof s == "object" ? s : void 0
|
|
1224
|
-
));
|
|
1225
|
-
}), e.value = r;
|
|
1226
|
-
}, { immediate: !0 });
|
|
1227
|
-
}
|
|
1228
|
-
function Pn(e, t, n) {
|
|
1229
|
-
let i = () => {
|
|
1230
|
-
};
|
|
1231
|
-
Ve(() => {
|
|
1232
|
-
if (e && Ee.isClient && typeof ResizeObserver < "u" && t.value && t.value instanceof Element) {
|
|
1233
|
-
const o = new ResizeObserver(([r]) => {
|
|
1234
|
-
n.value = r.borderBoxSize.reduce((s, { inlineSize: l }) => s + l, 0);
|
|
1235
|
-
});
|
|
1236
|
-
o.observe(t.value), i = () => {
|
|
1237
|
-
o.disconnect(), n.value = null;
|
|
1238
|
-
};
|
|
1239
|
-
}
|
|
1240
|
-
}), ft(() => {
|
|
1241
|
-
i();
|
|
1242
|
-
});
|
|
1243
|
-
}
|
|
1244
|
-
const Ln = (e) => {
|
|
1245
|
-
switch (e) {
|
|
1246
|
-
case "top":
|
|
1247
|
-
return "origin-bottom";
|
|
1248
|
-
case "bottom":
|
|
1249
|
-
return "origin-top";
|
|
1250
|
-
case "left":
|
|
1251
|
-
return "origin-right";
|
|
1252
|
-
case "right":
|
|
1253
|
-
return "origin-left";
|
|
1254
|
-
case "top-start":
|
|
1255
|
-
case "right-end":
|
|
1256
|
-
return "origin-bottom-left";
|
|
1257
|
-
case "top-end":
|
|
1258
|
-
case "left-end":
|
|
1259
|
-
return "origin-bottom-right";
|
|
1260
|
-
case "right-start":
|
|
1261
|
-
case "bottom-start":
|
|
1262
|
-
return "origin-top-left";
|
|
1263
|
-
case "left-start":
|
|
1264
|
-
case "bottom-end":
|
|
1265
|
-
return "origin-top-right";
|
|
1266
|
-
default:
|
|
1267
|
-
return "origin-center";
|
|
1268
|
-
}
|
|
1269
|
-
};
|
|
1270
|
-
function Fn(e, t) {
|
|
1271
|
-
const n = P(() => {
|
|
1272
|
-
if (typeof e.originClass == "function")
|
|
1273
|
-
return e.originClass(t.value);
|
|
1274
|
-
if (typeof e.originClass == "string")
|
|
1275
|
-
return e.originClass;
|
|
1276
|
-
if (e.tailwindcssOriginClass)
|
|
1277
|
-
return Ln(t.value);
|
|
1278
|
-
}), i = P(
|
|
1279
|
-
() => e.enter || n.value ? `${e.enter || ""} ${n.value || ""}` : void 0
|
|
1280
|
-
), o = P(
|
|
1281
|
-
() => e.leave || n.value ? `${e.leave || ""} ${n.value || ""}` : void 0
|
|
1282
|
-
);
|
|
1283
|
-
return { originClassRef: n, enterActiveClassRef: i, leaveActiveClassRef: o };
|
|
1284
|
-
}
|
|
1285
|
-
function ot(e, t, ...n) {
|
|
1286
|
-
if (e in t) {
|
|
1287
|
-
const o = t[e];
|
|
1288
|
-
return typeof o == "function" ? o(...n) : o;
|
|
1289
|
-
}
|
|
1290
|
-
const i = new Error(
|
|
1291
|
-
`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(
|
|
1292
|
-
t
|
|
1293
|
-
).map((o) => `"${o}"`).join(", ")}.`
|
|
1294
|
-
);
|
|
1295
|
-
throw Error.captureStackTrace && Error.captureStackTrace(i, ot), i;
|
|
1296
|
-
}
|
|
1297
|
-
const _e = [
|
|
1298
|
-
"[contentEditable=true]",
|
|
1299
|
-
"[tabindex]",
|
|
1300
|
-
"a[href]",
|
|
1301
|
-
"area[href]",
|
|
1302
|
-
"button:not([disabled])",
|
|
1303
|
-
"iframe",
|
|
1304
|
-
"input:not([disabled])",
|
|
1305
|
-
"select:not([disabled])",
|
|
1306
|
-
"textarea:not([disabled])"
|
|
1307
|
-
].map(
|
|
1308
|
-
(e) => `${e}:not([tabindex='-1'])`
|
|
1309
|
-
).join(",");
|
|
1310
|
-
var it = /* @__PURE__ */ ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(it || {});
|
|
1311
|
-
function Bn(e, t = 0) {
|
|
1312
|
-
var n;
|
|
1313
|
-
return e === ((n = Sn(e)) == null ? void 0 : n.body) ? !1 : ot(t, {
|
|
1314
|
-
0() {
|
|
1315
|
-
return e.matches(_e);
|
|
1316
|
-
},
|
|
1317
|
-
1() {
|
|
1318
|
-
let i = e;
|
|
1319
|
-
for (; i !== null; ) {
|
|
1320
|
-
if (i.matches(_e))
|
|
1321
|
-
return !0;
|
|
1322
|
-
i = i.parentElement;
|
|
1323
|
-
}
|
|
1324
|
-
return !1;
|
|
1325
|
-
}
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
1328
|
-
function ye(e, t, n) {
|
|
1329
|
-
Ee.isServer || ut((i) => {
|
|
1330
|
-
document.addEventListener(e, t, n), i(() => document.removeEventListener(e, t, n));
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
function Dn(e, t, n = P(() => !0)) {
|
|
1334
|
-
function i(r, s) {
|
|
1335
|
-
if (!n.value || r.defaultPrevented)
|
|
1336
|
-
return;
|
|
1337
|
-
const l = s(r);
|
|
1338
|
-
if (l === null || !l.getRootNode().contains(l))
|
|
1339
|
-
return;
|
|
1340
|
-
const f = function c(u) {
|
|
1341
|
-
return typeof u == "function" ? c(u()) : Array.isArray(u) || u instanceof Set ? u : [u];
|
|
1342
|
-
}(e);
|
|
1343
|
-
for (const c of f) {
|
|
1344
|
-
if (c === null)
|
|
1345
|
-
continue;
|
|
1346
|
-
const u = c instanceof HTMLElement ? c : re(c);
|
|
1347
|
-
if (u != null && u.contains(l) || r.composed && r.composedPath().includes(u))
|
|
1348
|
-
return;
|
|
1349
|
-
}
|
|
1350
|
-
return !Bn(l, it.Loose) && l.tabIndex !== -1 && r.preventDefault(), t(r, l);
|
|
1351
|
-
}
|
|
1352
|
-
const o = E(null);
|
|
1353
|
-
ye("mousedown", (r) => {
|
|
1354
|
-
var s, l;
|
|
1355
|
-
n.value && (o.value = ((l = (s = r.composedPath) == null ? void 0 : s.call(r)) == null ? void 0 : l[0]) || r.target);
|
|
1356
|
-
}, !0), ye(
|
|
1357
|
-
"click",
|
|
1358
|
-
(r) => {
|
|
1359
|
-
o.value && (i(r, () => o.value), o.value = null);
|
|
1360
|
-
},
|
|
1361
|
-
!0
|
|
1362
|
-
), ye("blur", (r) => i(
|
|
1363
|
-
r,
|
|
1364
|
-
() => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null
|
|
1365
|
-
), !0);
|
|
1366
|
-
}
|
|
1367
|
-
const kn = Symbol("ArrowContext"), x = {
|
|
1368
|
-
as: {
|
|
1369
|
-
type: [String, Function],
|
|
1370
|
-
default: "template"
|
|
1371
|
-
},
|
|
1372
|
-
floatingAs: {
|
|
1373
|
-
type: [String, Function],
|
|
1374
|
-
default: "div"
|
|
1375
|
-
},
|
|
1376
|
-
show: {
|
|
1377
|
-
type: Boolean,
|
|
1378
|
-
default: null
|
|
1379
|
-
},
|
|
1380
|
-
placement: {
|
|
1381
|
-
type: String,
|
|
1382
|
-
default: "bottom-start"
|
|
1383
|
-
},
|
|
1384
|
-
strategy: {
|
|
1385
|
-
type: String,
|
|
1386
|
-
default: "absolute"
|
|
1387
|
-
},
|
|
1388
|
-
offset: [Number, Function, Object],
|
|
1389
|
-
shift: {
|
|
1390
|
-
type: [Boolean, Number, Object],
|
|
1391
|
-
default: !1
|
|
1392
|
-
},
|
|
1393
|
-
flip: {
|
|
1394
|
-
type: [Boolean, Number, Object],
|
|
1395
|
-
default: !1
|
|
1396
|
-
},
|
|
1397
|
-
arrow: {
|
|
1398
|
-
type: [Boolean, Number],
|
|
1399
|
-
default: !1
|
|
1400
|
-
},
|
|
1401
|
-
autoPlacement: {
|
|
1402
|
-
type: [Boolean, Object],
|
|
1403
|
-
default: !1
|
|
1404
|
-
},
|
|
1405
|
-
hide: {
|
|
1406
|
-
type: [Boolean, Object, Array],
|
|
1407
|
-
default: !1
|
|
1408
|
-
},
|
|
1409
|
-
referenceHiddenClass: String,
|
|
1410
|
-
escapedClass: String,
|
|
1411
|
-
autoUpdate: {
|
|
1412
|
-
type: [Boolean, Object],
|
|
1413
|
-
default: !0
|
|
1414
|
-
},
|
|
1415
|
-
zIndex: {
|
|
1416
|
-
type: [Number, String],
|
|
1417
|
-
default: 9999
|
|
1418
|
-
},
|
|
1419
|
-
vueTransition: {
|
|
1420
|
-
type: Boolean,
|
|
1421
|
-
default: !1
|
|
1422
|
-
},
|
|
1423
|
-
transitionName: String,
|
|
1424
|
-
transitionType: String,
|
|
1425
|
-
enter: String,
|
|
1426
|
-
enterFrom: String,
|
|
1427
|
-
enterTo: String,
|
|
1428
|
-
leave: String,
|
|
1429
|
-
leaveFrom: String,
|
|
1430
|
-
leaveTo: String,
|
|
1431
|
-
originClass: [String, Function],
|
|
1432
|
-
tailwindcssOriginClass: {
|
|
1433
|
-
type: Boolean,
|
|
1434
|
-
default: !1
|
|
1435
|
-
},
|
|
1436
|
-
portal: {
|
|
1437
|
-
type: Boolean,
|
|
1438
|
-
default: !1
|
|
1439
|
-
},
|
|
1440
|
-
transform: {
|
|
1441
|
-
type: Boolean,
|
|
1442
|
-
default: !1
|
|
1443
|
-
},
|
|
1444
|
-
adaptiveWidth: {
|
|
1445
|
-
type: [Boolean, Object],
|
|
1446
|
-
default: !1
|
|
1447
|
-
},
|
|
1448
|
-
composable: {
|
|
1449
|
-
type: Boolean,
|
|
1450
|
-
default: !1
|
|
1451
|
-
},
|
|
1452
|
-
dialog: {
|
|
1453
|
-
type: Boolean,
|
|
1454
|
-
default: !1
|
|
1455
|
-
},
|
|
1456
|
-
middleware: {
|
|
1457
|
-
type: [Array, Function],
|
|
1458
|
-
default: () => []
|
|
1459
|
-
}
|
|
1460
|
-
};
|
|
1461
|
-
function Nn(e, t, n, i) {
|
|
1462
|
-
const { floatingRef: o, props: r, mounted: s, show: l, referenceHidden: f, escaped: c, placement: u, floatingStyles: d, referenceElWidth: g, updateFloating: m } = i, a = pe(
|
|
1463
|
-
{ ...r, as: r.floatingAs },
|
|
1464
|
-
t
|
|
1465
|
-
), { enterActiveClassRef: h, leaveActiveClassRef: v } = Fn(a, u), y = {
|
|
1466
|
-
show: s.value ? a.show : !1,
|
|
1467
|
-
enter: h.value,
|
|
1468
|
-
enterFrom: a.enterFrom,
|
|
1469
|
-
enterTo: a.enterTo,
|
|
1470
|
-
leave: v.value,
|
|
1471
|
-
leaveFrom: a.leaveFrom,
|
|
1472
|
-
leaveTo: a.leaveTo,
|
|
1473
|
-
onBeforeEnter() {
|
|
1474
|
-
l.value = !0;
|
|
1475
|
-
},
|
|
1476
|
-
onAfterLeave() {
|
|
1477
|
-
l.value = !1;
|
|
1478
|
-
}
|
|
1479
|
-
}, w = {
|
|
1480
|
-
name: a.transitionName,
|
|
1481
|
-
type: a.transitionType,
|
|
1482
|
-
appear: !0,
|
|
1483
|
-
...a.transitionName ? {} : {
|
|
1484
|
-
enterActiveClass: h.value,
|
|
1485
|
-
enterFromClass: a.enterFrom,
|
|
1486
|
-
enterToClass: a.enterTo,
|
|
1487
|
-
leaveActiveClass: v.value,
|
|
1488
|
-
leaveFromClass: a.leaveFrom,
|
|
1489
|
-
leaveToClass: a.leaveTo
|
|
1490
|
-
},
|
|
1491
|
-
onBeforeEnter() {
|
|
1492
|
-
l.value = !0;
|
|
1493
|
-
},
|
|
1494
|
-
onAfterLeave() {
|
|
1495
|
-
l.value = !1;
|
|
1496
|
-
}
|
|
1497
|
-
}, b = {
|
|
1498
|
-
class: [
|
|
1499
|
-
f.value ? a.referenceHiddenClass : void 0,
|
|
1500
|
-
c.value ? a.escapedClass : void 0
|
|
1501
|
-
].filter((p) => !!p).join(" "),
|
|
1502
|
-
style: {
|
|
1503
|
-
...d.value,
|
|
1504
|
-
zIndex: a.zIndex
|
|
1505
|
-
}
|
|
1506
|
-
};
|
|
1507
|
-
if (a.adaptiveWidth && typeof g.value == "number") {
|
|
1508
|
-
const p = {
|
|
1509
|
-
attribute: "width",
|
|
1510
|
-
...typeof a.adaptiveWidth == "object" ? a.adaptiveWidth : {}
|
|
1511
|
-
};
|
|
1512
|
-
b.style[p.attribute] = `${g.value}px`;
|
|
1513
|
-
}
|
|
1514
|
-
function C(p) {
|
|
1515
|
-
return a.portal ? s.value ? ne(dt, () => p) : he() : p;
|
|
1516
|
-
}
|
|
1517
|
-
function A(p) {
|
|
1518
|
-
const T = pe(
|
|
1519
|
-
b,
|
|
1520
|
-
n,
|
|
1521
|
-
a.dialog ? {} : { ref: o }
|
|
1522
|
-
);
|
|
1523
|
-
return a.as === "template" ? p : typeof a.as == "string" ? ne(a.as, T, p) : ne(a.as, T, () => p);
|
|
1524
|
-
}
|
|
1525
|
-
function O() {
|
|
1526
|
-
function p() {
|
|
1527
|
-
var T;
|
|
1528
|
-
const L = a.as === "template" ? pe(
|
|
1529
|
-
b,
|
|
1530
|
-
n,
|
|
1531
|
-
a.dialog ? {} : { ref: o }
|
|
1532
|
-
) : null, R = gt(e, L);
|
|
1533
|
-
return ((T = e.props) == null ? void 0 : T.unmount) === !1 ? (m(), R) : a.vueTransition && a.show === !1 ? he() : R;
|
|
1534
|
-
}
|
|
1535
|
-
return s.value ? a.vueTransition ? ne(mt, {
|
|
1536
|
-
...a.dialog ? { ref: o } : {},
|
|
1537
|
-
...w
|
|
1538
|
-
}, p) : ne(a.transitionChild ? pt : ht, {
|
|
1539
|
-
key: `placement-${u.value}`,
|
|
1540
|
-
...a.dialog ? { ref: o } : {},
|
|
1541
|
-
as: "template",
|
|
1542
|
-
...y
|
|
1543
|
-
}, p) : he();
|
|
1544
|
-
}
|
|
1545
|
-
return C(
|
|
1546
|
-
A(
|
|
1547
|
-
O()
|
|
1548
|
-
)
|
|
1549
|
-
);
|
|
1550
|
-
}
|
|
1551
|
-
function $n(e, t, n, i, o) {
|
|
1552
|
-
const r = E(!1), s = Pe(i, "placement"), l = Pe(i, "strategy"), f = ze({}), c = E(void 0), u = E(void 0), d = E(null), g = E(void 0), m = E(void 0), a = P(() => re(t)), h = P(() => re(n)), v = P(
|
|
1553
|
-
() => We(a) && We(h)
|
|
1554
|
-
), { placement: y, middlewareData: w, isPositioned: b, floatingStyles: C, update: A } = xn(a, h, {
|
|
1555
|
-
placement: s,
|
|
1556
|
-
strategy: l,
|
|
1557
|
-
middleware: f,
|
|
1558
|
-
transform: i.dialog ? !1 : i.transform,
|
|
1559
|
-
whileElementsMounted: i.dialog ? () => () => {
|
|
1560
|
-
} : void 0
|
|
1561
|
-
}), O = E(null);
|
|
1562
|
-
Ve(() => {
|
|
1563
|
-
r.value = !0;
|
|
1564
|
-
}), $(e, (S, D) => {
|
|
1565
|
-
S && !D ? o("show") : !S && D && o("hide");
|
|
1566
|
-
}, { immediate: !0 });
|
|
1567
|
-
function p() {
|
|
1568
|
-
v.value && (A(), o("update"));
|
|
1569
|
-
}
|
|
1570
|
-
$([s, l, f], p, { flush: "sync" }), En(
|
|
1571
|
-
f,
|
|
1572
|
-
a,
|
|
1573
|
-
h,
|
|
1574
|
-
d,
|
|
1575
|
-
i
|
|
1576
|
-
), $([w, () => i.hide, b], () => {
|
|
1577
|
-
var S, D;
|
|
1578
|
-
(i.hide === !0 || typeof i.hide == "object" || Array.isArray(i.hide)) && (c.value = ((S = w.value.hide) == null ? void 0 : S.referenceHidden) || !b.value, u.value = (D = w.value.hide) == null ? void 0 : D.escaped);
|
|
1579
|
-
}), $(w, () => {
|
|
1580
|
-
const S = w.value.arrow;
|
|
1581
|
-
g.value = S == null ? void 0 : S.x, m.value = S == null ? void 0 : S.y;
|
|
1582
|
-
}), Pn(!!i.adaptiveWidth, a, O), $([e, v], async (S, D, F) => {
|
|
1583
|
-
if (await at(), e.value && v.value && i.autoUpdate) {
|
|
1584
|
-
const N = fn(
|
|
1585
|
-
a.value,
|
|
1586
|
-
h.value,
|
|
1587
|
-
p,
|
|
1588
|
-
typeof i.autoUpdate == "object" ? i.autoUpdate : void 0
|
|
1589
|
-
);
|
|
1590
|
-
F(N);
|
|
1591
|
-
}
|
|
1592
|
-
}, { flush: "post", immediate: !0 });
|
|
1593
|
-
const T = E(!0);
|
|
1594
|
-
$(a, () => {
|
|
1595
|
-
!(a.value instanceof Element) && v.value && T.value && (T.value = !1, window.requestAnimationFrame(() => {
|
|
1596
|
-
T.value = !0, p();
|
|
1597
|
-
}));
|
|
1598
|
-
}, { flush: "sync" });
|
|
1599
|
-
const L = {
|
|
1600
|
-
referenceRef: t,
|
|
1601
|
-
placement: y
|
|
1602
|
-
}, R = {
|
|
1603
|
-
floatingRef: n,
|
|
1604
|
-
props: i,
|
|
1605
|
-
mounted: r,
|
|
1606
|
-
show: e,
|
|
1607
|
-
referenceHidden: c,
|
|
1608
|
-
escaped: u,
|
|
1609
|
-
placement: y,
|
|
1610
|
-
floatingStyles: C,
|
|
1611
|
-
referenceElWidth: O,
|
|
1612
|
-
updateFloating: p
|
|
1613
|
-
}, B = {
|
|
1614
|
-
ref: d,
|
|
1615
|
-
placement: y,
|
|
1616
|
-
x: g,
|
|
1617
|
-
y: m
|
|
1618
|
-
};
|
|
1619
|
-
return ct(kn, B), { referenceApi: L, floatingApi: R, arrowApi: B, placement: y, referenceEl: a, floatingEl: h, middlewareData: w, update: p };
|
|
1620
|
-
}
|
|
1621
|
-
({
|
|
1622
|
-
...x.as
|
|
1623
|
-
});
|
|
1624
|
-
const Mn = {
|
|
1625
|
-
as: x.as,
|
|
1626
|
-
show: x.show,
|
|
1627
|
-
placement: x.placement,
|
|
1628
|
-
strategy: x.strategy,
|
|
1629
|
-
offset: x.offset,
|
|
1630
|
-
shift: x.shift,
|
|
1631
|
-
flip: x.flip,
|
|
1632
|
-
arrow: x.arrow,
|
|
1633
|
-
autoPlacement: x.autoPlacement,
|
|
1634
|
-
autoUpdate: x.autoUpdate,
|
|
1635
|
-
zIndex: x.zIndex,
|
|
1636
|
-
vueTransition: x.vueTransition,
|
|
1637
|
-
transitionName: x.transitionName,
|
|
1638
|
-
transitionType: x.transitionType,
|
|
1639
|
-
enter: x.enter,
|
|
1640
|
-
enterFrom: x.enterFrom,
|
|
1641
|
-
enterTo: x.enterTo,
|
|
1642
|
-
leave: x.leave,
|
|
1643
|
-
leaveFrom: x.leaveFrom,
|
|
1644
|
-
leaveTo: x.leaveTo,
|
|
1645
|
-
originClass: x.originClass,
|
|
1646
|
-
tailwindcssOriginClass: x.tailwindcssOriginClass,
|
|
1647
|
-
portal: x.portal,
|
|
1648
|
-
transform: x.transform,
|
|
1649
|
-
middleware: x.middleware
|
|
1650
|
-
}, jn = {
|
|
1651
|
-
name: "FloatVirtual",
|
|
1652
|
-
inheritAttrs: !1,
|
|
1653
|
-
props: Mn,
|
|
1654
|
-
emits: ["initial", "show", "hide", "update"],
|
|
1655
|
-
setup(e, { emit: t, slots: n, attrs: i }) {
|
|
1656
|
-
var u;
|
|
1657
|
-
Rn("FloatVirtual", e);
|
|
1658
|
-
const o = E((u = e.show) != null ? u : !1), r = E({
|
|
1659
|
-
getBoundingClientRect() {
|
|
1660
|
-
return {
|
|
1661
|
-
x: 0,
|
|
1662
|
-
y: 0,
|
|
1663
|
-
top: 0,
|
|
1664
|
-
left: 0,
|
|
1665
|
-
bottom: 0,
|
|
1666
|
-
right: 0,
|
|
1667
|
-
width: 0,
|
|
1668
|
-
height: 0
|
|
1669
|
-
};
|
|
1670
|
-
}
|
|
1671
|
-
}), s = E(null), {
|
|
1672
|
-
floatingApi: l,
|
|
1673
|
-
placement: f
|
|
1674
|
-
} = $n(o, r, s, e, t);
|
|
1675
|
-
$(() => e.show, () => {
|
|
1676
|
-
var d;
|
|
1677
|
-
o.value = (d = e.show) != null ? d : !1;
|
|
1678
|
-
});
|
|
1679
|
-
function c() {
|
|
1680
|
-
o.value = !1;
|
|
1681
|
-
}
|
|
1682
|
-
return t("initial", {
|
|
1683
|
-
show: o,
|
|
1684
|
-
placement: f,
|
|
1685
|
-
reference: r,
|
|
1686
|
-
floating: s
|
|
1687
|
-
}), () => {
|
|
1688
|
-
if (!n.default)
|
|
1689
|
-
return;
|
|
1690
|
-
const d = {
|
|
1691
|
-
placement: f.value,
|
|
1692
|
-
close: c
|
|
1693
|
-
}, [g] = nt(n.default(d)).filter(On);
|
|
1694
|
-
return Nn(
|
|
1695
|
-
g,
|
|
1696
|
-
{
|
|
1697
|
-
as: e.as,
|
|
1698
|
-
show: o.value
|
|
1699
|
-
},
|
|
1700
|
-
i,
|
|
1701
|
-
l
|
|
1702
|
-
);
|
|
1703
|
-
};
|
|
1704
|
-
}
|
|
1705
|
-
};
|
|
1706
|
-
x.as, x.placement, x.strategy, x.offset, x.shift, {
|
|
1707
|
-
...x.flip
|
|
1708
|
-
}, x.arrow, x.autoPlacement, x.autoUpdate, x.zIndex, x.vueTransition, x.transitionName, x.transitionType, x.enter, x.enterFrom, x.enterTo, x.leave, x.leaveFrom, x.leaveTo, x.originClass, x.tailwindcssOriginClass, x.transform, x.middleware;
|
|
1709
|
-
const Hn = { class: "flex bg-white shadow-md z-10 rounded-md p-1" }, Wn = ["onClick"], zn = /* @__PURE__ */ vt({
|
|
1710
|
-
__name: "StylePanel",
|
|
1711
|
-
setup(e) {
|
|
1712
|
-
const t = E({ value: null }), n = yt(), i = P(
|
|
1713
|
-
() => n.getters.onContentChange || (() => {
|
|
1714
|
-
})
|
|
1715
|
-
), o = P(
|
|
1716
|
-
() => wt(n.getters.diagramElement) + xt
|
|
1717
|
-
), r = P(() => n.getters.code), s = (d) => {
|
|
1718
|
-
n.dispatch("updateCode", { code: d }), i.value(d);
|
|
1719
|
-
}, l = E([]);
|
|
1720
|
-
let f;
|
|
1721
|
-
const c = ({ show: d, reference: g, floating: m }) => {
|
|
1722
|
-
let a, h, v, y, w, b;
|
|
1723
|
-
n.commit("onMessageClick", (C, A) => {
|
|
1724
|
-
var O;
|
|
1725
|
-
if (a = C.value.start.start, h = Rt(r.value, a), v = Et(r.value, a), y = ((O = r.value.slice(h).match(/^\s*/)) == null ? void 0 : O[0]) || "", w = v.trim().startsWith("//"), w) {
|
|
1726
|
-
const p = v.trimStart().slice(2).trimStart(), T = p.indexOf("["), L = p.indexOf("]");
|
|
1727
|
-
b = Boolean(T === 0 && L), b ? l.value = p.slice(T + 1, L).split(",").map((R) => R.trim()) : l.value = [];
|
|
1728
|
-
}
|
|
1729
|
-
g.value = {
|
|
1730
|
-
getBoundingClientRect: () => A.getBoundingClientRect()
|
|
1731
|
-
}, t.value = C, d.value = !0;
|
|
1732
|
-
}), Dn(
|
|
1733
|
-
m,
|
|
1734
|
-
() => {
|
|
1735
|
-
d.value = !1, l.value = [];
|
|
1736
|
-
},
|
|
1737
|
-
P(() => d.value)
|
|
1738
|
-
), f = (C) => {
|
|
1739
|
-
var A;
|
|
1740
|
-
if (d.value = !1, !!t.value.value)
|
|
1741
|
-
if (w) {
|
|
1742
|
-
let O = "";
|
|
1743
|
-
if (b) {
|
|
1744
|
-
let p;
|
|
1745
|
-
l.value.includes(C) ? p = l.value.filter((T) => T !== C) : p = [...l.value, C], O = `${y}// [${p.filter(Boolean).join(", ")}] ${v.slice(v.indexOf("]") + 1).trimStart()}`;
|
|
1746
|
-
} else
|
|
1747
|
-
O = `${y}// [${C}] ${v.slice((((A = v.match(/\/\/*/)) == null ? void 0 : A.index) || -2) + 2).trimStart()}`;
|
|
1748
|
-
O.endsWith(`
|
|
1749
|
-
`) || (O += `
|
|
1750
|
-
`), s(
|
|
1751
|
-
r.value.slice(0, Pt(r.value, a)) + O + r.value.slice(h)
|
|
1752
|
-
);
|
|
1753
|
-
} else
|
|
1754
|
-
s(
|
|
1755
|
-
r.value.slice(0, h) + `${y}// [${C}]
|
|
1756
|
-
` + r.value.slice(h)
|
|
1757
|
-
);
|
|
1758
|
-
};
|
|
1759
|
-
}, u = [
|
|
1760
|
-
{
|
|
1761
|
-
name: "bold",
|
|
1762
|
-
content: "B",
|
|
1763
|
-
class: "font-bold"
|
|
1764
|
-
},
|
|
1765
|
-
{
|
|
1766
|
-
name: "italic",
|
|
1767
|
-
content: "I",
|
|
1768
|
-
class: "italic"
|
|
1769
|
-
},
|
|
1770
|
-
{
|
|
1771
|
-
name: "underline",
|
|
1772
|
-
content: "U",
|
|
1773
|
-
class: "underline"
|
|
1774
|
-
},
|
|
1775
|
-
{
|
|
1776
|
-
name: "strikethrough",
|
|
1777
|
-
content: "S",
|
|
1778
|
-
class: "line-through"
|
|
1779
|
-
}
|
|
1780
|
-
];
|
|
1781
|
-
return (d, g) => (Le(), bt(H(jn), {
|
|
1782
|
-
key: "tool",
|
|
1783
|
-
onInitial: c,
|
|
1784
|
-
placement: "top",
|
|
1785
|
-
offset: 5,
|
|
1786
|
-
flip: { padding: H(o) },
|
|
1787
|
-
shift: "",
|
|
1788
|
-
zIndex: "30"
|
|
1789
|
-
}, {
|
|
1790
|
-
default: Ct(() => [
|
|
1791
|
-
ge("div", Hn, [
|
|
1792
|
-
(Le(), At(Ie, null, Ot(u, (m) => ge("div", {
|
|
1793
|
-
onClick: () => H(f)(m.class),
|
|
1794
|
-
key: m.name
|
|
1795
|
-
}, [
|
|
1796
|
-
ge("div", {
|
|
1797
|
-
class: Tt(["w-6 mx-1 py-1 rounded-md text-black text-center cursor-pointer hover:bg-gray-200", [
|
|
1798
|
-
m.class,
|
|
1799
|
-
{ "bg-gray-100": l.value.includes(m.class) }
|
|
1800
|
-
]])
|
|
1801
|
-
}, St(m.content), 3)
|
|
1802
|
-
], 8, Wn)), 64))
|
|
1803
|
-
])
|
|
1804
|
-
], void 0, !0),
|
|
1805
|
-
_: 1
|
|
1806
|
-
}, 8, ["flip"]));
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
export {
|
|
1810
|
-
zn as default
|
|
1811
|
-
};
|
|
1812
|
-
//# sourceMappingURL=StylePanel.3d4e665f.js.map
|