prlg-ui 1.7.31 → 1.7.33
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/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +115 -115
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -486,14 +486,14 @@ const xn = (e) => ({
|
|
|
486
486
|
x: o,
|
|
487
487
|
y: n
|
|
488
488
|
}, p = lt(l), m = nt(p), g = await s.getDimensions(u), h = p === "y", $ = h ? "top" : "left", k = h ? "bottom" : "right", P = h ? "clientHeight" : "clientWidth", A = i.reference[m] + i.reference[p] - v[p] - i.floating[m], T = v[p] - i.reference[p], w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
489
|
-
let
|
|
490
|
-
(!
|
|
491
|
-
const B = A / 2 - T / 2, I =
|
|
489
|
+
let C = w ? w[P] : 0;
|
|
490
|
+
(!C || !await (s.isElement == null ? void 0 : s.isElement(w))) && (C = r.floating[P] || i.floating[m]);
|
|
491
|
+
const B = A / 2 - T / 2, I = C / 2 - g[m] / 2 - 1, O = Re(d[$], I), x = Re(d[k], I), _ = O, M = C - g[m] - x, R = C / 2 - g[m] / 2 + B, H = Xe(_, R, M), L = !a.arrow && Oe(l) != null && R !== H && i.reference[m] / 2 - (R < _ ? O : x) - g[m] / 2 < 0, te = L ? R < _ ? R - _ : R - M : 0;
|
|
492
492
|
return {
|
|
493
493
|
[p]: v[p] + te,
|
|
494
494
|
data: {
|
|
495
495
|
[p]: H,
|
|
496
|
-
centerOffset:
|
|
496
|
+
centerOffset: R - H - te,
|
|
497
497
|
...L && {
|
|
498
498
|
alignmentOffset: te
|
|
499
499
|
}
|
|
@@ -682,15 +682,15 @@ const Rn = function(e) {
|
|
|
682
682
|
let h, $;
|
|
683
683
|
d === "top" || d === "bottom" ? (h = d, $ = v === (await (s.isRTL == null ? void 0 : s.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : ($ = d, h = v === "end" ? "top" : "bottom");
|
|
684
684
|
const k = g - c.top - c.bottom, P = m - c.left - c.right, A = Re(g - c[h], k), T = Re(m - c[$], P), w = !t.middlewareData.shift;
|
|
685
|
-
let
|
|
686
|
-
if ((o = t.middlewareData.shift) != null && o.enabled.x && (B = P), (n = t.middlewareData.shift) != null && n.enabled.y && (
|
|
685
|
+
let C = A, B = T;
|
|
686
|
+
if ((o = t.middlewareData.shift) != null && o.enabled.x && (B = P), (n = t.middlewareData.shift) != null && n.enabled.y && (C = k), w && !v) {
|
|
687
687
|
const O = ie(c.left, 0), x = ie(c.right, 0), _ = ie(c.top, 0), M = ie(c.bottom, 0);
|
|
688
|
-
p ? B = m - 2 * (O !== 0 || x !== 0 ? O + x : ie(c.left, c.right)) :
|
|
688
|
+
p ? B = m - 2 * (O !== 0 || x !== 0 ? O + x : ie(c.left, c.right)) : C = g - 2 * (_ !== 0 || M !== 0 ? _ + M : ie(c.top, c.bottom));
|
|
689
689
|
}
|
|
690
690
|
await a({
|
|
691
691
|
...t,
|
|
692
692
|
availableWidth: B,
|
|
693
|
-
availableHeight:
|
|
693
|
+
availableHeight: C
|
|
694
694
|
});
|
|
695
695
|
const I = await s.getDimensions(r.floating);
|
|
696
696
|
return m !== I.width || g !== I.height ? {
|
|
@@ -1145,28 +1145,28 @@ function Ft(e, t) {
|
|
|
1145
1145
|
function zt(e, t, o) {
|
|
1146
1146
|
o === void 0 && (o = {});
|
|
1147
1147
|
const n = o.whileElementsMounted, l = V(() => {
|
|
1148
|
-
var
|
|
1149
|
-
return (
|
|
1148
|
+
var C;
|
|
1149
|
+
return (C = Ue(o.open)) != null ? C : !0;
|
|
1150
1150
|
}), i = V(() => Ue(o.middleware)), s = V(() => {
|
|
1151
|
-
var
|
|
1152
|
-
return (
|
|
1151
|
+
var C;
|
|
1152
|
+
return (C = Ue(o.placement)) != null ? C : "bottom";
|
|
1153
1153
|
}), r = V(() => {
|
|
1154
|
-
var
|
|
1155
|
-
return (
|
|
1154
|
+
var C;
|
|
1155
|
+
return (C = Ue(o.strategy)) != null ? C : "absolute";
|
|
1156
1156
|
}), a = V(() => {
|
|
1157
|
-
var
|
|
1158
|
-
return (
|
|
1157
|
+
var C;
|
|
1158
|
+
return (C = Ue(o.transform)) != null ? C : !0;
|
|
1159
1159
|
}), u = V(() => mt(e.value)), c = V(() => mt(t.value)), d = D(0), v = D(0), p = D(r.value), m = D(s.value), g = Le({}), h = D(!1), $ = V(() => {
|
|
1160
|
-
const
|
|
1160
|
+
const C = {
|
|
1161
1161
|
position: p.value,
|
|
1162
1162
|
left: "0",
|
|
1163
1163
|
top: "0"
|
|
1164
1164
|
};
|
|
1165
1165
|
if (!c.value)
|
|
1166
|
-
return
|
|
1166
|
+
return C;
|
|
1167
1167
|
const B = Ft(c.value, d.value), I = Ft(c.value, v.value);
|
|
1168
1168
|
return a.value ? {
|
|
1169
|
-
...
|
|
1169
|
+
...C,
|
|
1170
1170
|
transform: "translate(" + B + "px, " + I + "px)",
|
|
1171
1171
|
...uo(c.value) >= 1.5 && {
|
|
1172
1172
|
willChange: "transform"
|
|
@@ -1181,13 +1181,13 @@ function zt(e, t, o) {
|
|
|
1181
1181
|
function P() {
|
|
1182
1182
|
if (u.value == null || c.value == null)
|
|
1183
1183
|
return;
|
|
1184
|
-
const
|
|
1184
|
+
const C = l.value;
|
|
1185
1185
|
Jn(u.value, c.value, {
|
|
1186
1186
|
middleware: i.value,
|
|
1187
1187
|
placement: s.value,
|
|
1188
1188
|
strategy: r.value
|
|
1189
1189
|
}).then((B) => {
|
|
1190
|
-
d.value = B.x, v.value = B.y, p.value = B.strategy, m.value = B.placement, g.value = B.middlewareData, h.value =
|
|
1190
|
+
d.value = B.x, v.value = B.y, p.value = B.strategy, m.value = B.placement, g.value = B.middlewareData, h.value = C !== !1;
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
function A() {
|
|
@@ -1242,8 +1242,8 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
},
|
|
1244
1244
|
setup(e, { expose: t }) {
|
|
1245
|
-
Po((
|
|
1246
|
-
"
|
|
1245
|
+
Po((R) => ({
|
|
1246
|
+
"42c84dfa": c.value
|
|
1247
1247
|
}));
|
|
1248
1248
|
const o = e, { placement: n, offset: l, arrowVisible: i } = _o(o), s = Be("reference"), r = Be("floating"), a = Be("arrow-block"), u = Be("second-screen"), c = V(() => "23px"), d = V(() => l ? typeof l.value == "number" ? l.value + Number(c.value.split("px")[0]) : {
|
|
1249
1249
|
mainAxis: l.value?.mainAxis ? l.value?.mainAxis + Number(c.value.split("px")[0]) / 2 : Number(c.value.split("px")[0]) / 2,
|
|
@@ -1255,9 +1255,9 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1255
1255
|
}), v = D([
|
|
1256
1256
|
Ht(),
|
|
1257
1257
|
Xn({
|
|
1258
|
-
apply({ availableWidth:
|
|
1258
|
+
apply({ availableWidth: R, elements: H }) {
|
|
1259
1259
|
Object.assign(H.floating.style, {
|
|
1260
|
-
maxWidth: `${Math.max(200,
|
|
1260
|
+
maxWidth: `${Math.max(200, R)}px`
|
|
1261
1261
|
});
|
|
1262
1262
|
}
|
|
1263
1263
|
}),
|
|
@@ -1277,16 +1277,16 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1277
1277
|
Dt({ padding: 8 }),
|
|
1278
1278
|
Et(8)
|
|
1279
1279
|
]
|
|
1280
|
-
}), A = Ne(), T = D(!1), w = D(!1),
|
|
1281
|
-
|
|
1280
|
+
}), A = Ne(), T = D(!1), w = D(!1), C = gt(), B = () => {
|
|
1281
|
+
C.default && (C.default()[0].children === "v-if" || C.default()[0].children?.length === 0) || (T.value = !0);
|
|
1282
1282
|
}, I = () => {
|
|
1283
1283
|
T.value = !1, x();
|
|
1284
|
-
}, O = async (
|
|
1285
|
-
|
|
1284
|
+
}, O = async (R) => {
|
|
1285
|
+
R && R.stopPropagation(), r.value && (w.value = !0);
|
|
1286
1286
|
}, x = () => {
|
|
1287
1287
|
w.value = !1;
|
|
1288
|
-
}, _ = (
|
|
1289
|
-
const H =
|
|
1288
|
+
}, _ = (R) => {
|
|
1289
|
+
const H = R.composedPath();
|
|
1290
1290
|
if (!(u.value && H.includes(u.value))) {
|
|
1291
1291
|
if (r.value && H.includes(r.value) || s.value && H.includes(s.value)) {
|
|
1292
1292
|
setTimeout(() => {
|
|
@@ -1298,25 +1298,25 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
}, M = V(() => {
|
|
1300
1300
|
if (!m.value.arrow) return {};
|
|
1301
|
-
const { x:
|
|
1301
|
+
const { x: R, y: H } = m.value.arrow;
|
|
1302
1302
|
switch (h.value) {
|
|
1303
1303
|
case "top":
|
|
1304
1304
|
return {
|
|
1305
|
-
left:
|
|
1305
|
+
left: R ? `${R}px` : "-9px",
|
|
1306
1306
|
bottom: H ? `${H}px` : "-9px"
|
|
1307
1307
|
};
|
|
1308
1308
|
case "bottom":
|
|
1309
1309
|
default:
|
|
1310
1310
|
return {
|
|
1311
|
-
left:
|
|
1311
|
+
left: R ? `${R}px` : "-9px",
|
|
1312
1312
|
top: H ? `${H}px` : "-9px"
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
|
-
return oe(m, (
|
|
1317
|
-
T.value =
|
|
1318
|
-
}), oe(T, (
|
|
1319
|
-
|
|
1316
|
+
return oe(m, (R) => {
|
|
1317
|
+
T.value = R.hide?.referenceHidden === !1;
|
|
1318
|
+
}), oe(T, (R) => {
|
|
1319
|
+
R || x();
|
|
1320
1320
|
}), oe(o, () => {
|
|
1321
1321
|
g();
|
|
1322
1322
|
}, { deep: !0 }), ye(() => {
|
|
@@ -1336,7 +1336,7 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1336
1336
|
closeSecondScreen: x,
|
|
1337
1337
|
isOpen: T,
|
|
1338
1338
|
isSecondScreenOpen: w
|
|
1339
|
-
}), (
|
|
1339
|
+
}), (R, H) => (f(), b("div", {
|
|
1340
1340
|
class: z(["popover", { "popover--with-arrow": y(i) }])
|
|
1341
1341
|
}, [
|
|
1342
1342
|
S("div", {
|
|
@@ -1344,7 +1344,7 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1344
1344
|
ref: "reference",
|
|
1345
1345
|
onClick: B
|
|
1346
1346
|
}, [
|
|
1347
|
-
q(
|
|
1347
|
+
q(R.$slots, "trigger", {}, void 0, !0)
|
|
1348
1348
|
], 2),
|
|
1349
1349
|
N(ze, { name: "fade" }, {
|
|
1350
1350
|
default: Y(() => [
|
|
@@ -1356,11 +1356,11 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1356
1356
|
}, [
|
|
1357
1357
|
S("div", tl, [
|
|
1358
1358
|
y(i) ? (f(), b("div", ol, [
|
|
1359
|
-
q(
|
|
1359
|
+
q(R.$slots, "default", {
|
|
1360
1360
|
openSecondScreen: O,
|
|
1361
1361
|
closeSecondScreen: x
|
|
1362
1362
|
}, void 0, !0)
|
|
1363
|
-
])) : q(
|
|
1363
|
+
])) : q(R.$slots, "default", {
|
|
1364
1364
|
key: 1,
|
|
1365
1365
|
openSecondScreen: O,
|
|
1366
1366
|
closeSecondScreen: x
|
|
@@ -1384,14 +1384,14 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
1384
1384
|
ref: "second-screen",
|
|
1385
1385
|
style: ue(y(k))
|
|
1386
1386
|
}, [
|
|
1387
|
-
q(
|
|
1387
|
+
q(R.$slots, "second-screen", { closeSecondScreen: x }, void 0, !0)
|
|
1388
1388
|
], 4)) : F("", !0)
|
|
1389
1389
|
]),
|
|
1390
1390
|
_: 3
|
|
1391
1391
|
})
|
|
1392
1392
|
], 2));
|
|
1393
1393
|
}
|
|
1394
|
-
}), ll = /* @__PURE__ */ pe(nl, [["__scopeId", "data-v-
|
|
1394
|
+
}), ll = /* @__PURE__ */ pe(nl, [["__scopeId", "data-v-db77e129"]]), sl = { class: "trigger" }, il = { class: "description-column" }, al = /* @__PURE__ */ E({
|
|
1395
1395
|
__name: "DescriptionColumn",
|
|
1396
1396
|
props: {
|
|
1397
1397
|
description: {}
|
|
@@ -2202,10 +2202,10 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
2202
2202
|
const o = t, n = V(() => e.rowGroupMode), l = V(() => e.groupRowsBy), { dataWithGroup: i } = rs(n, l), { columns: s, options: r } = is(n), a = V(() => r.value.selectedMode), { selectedRows: u, isSelectedAll: c, toggleSelectRow: d, toggleSelectedAll: v } = as(a, e.data), p = D(null), m = ne(e, "currentPage"), g = ne(e, "perPage"), h = V(() => {
|
|
2203
2203
|
let A = [...e.data];
|
|
2204
2204
|
if (p.value) {
|
|
2205
|
-
const { field: w, order:
|
|
2205
|
+
const { field: w, order: C } = p.value;
|
|
2206
2206
|
A.sort((B, I) => {
|
|
2207
2207
|
const O = B[w], x = I[w];
|
|
2208
|
-
return O === x ? 0 :
|
|
2208
|
+
return O === x ? 0 : C === 1 ? O > x ? 1 : -1 : O < x ? 1 : -1;
|
|
2209
2209
|
});
|
|
2210
2210
|
}
|
|
2211
2211
|
const T = i(A);
|
|
@@ -2302,8 +2302,8 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
2302
2302
|
let x = !1;
|
|
2303
2303
|
l.value.forEach((_, M) => {
|
|
2304
2304
|
if (!_) return;
|
|
2305
|
-
const
|
|
2306
|
-
r.value.get(
|
|
2305
|
+
const R = h.value + M, H = _.offsetHeight;
|
|
2306
|
+
r.value.get(R) !== H && (r.value.set(R, H), x = !0);
|
|
2307
2307
|
}), x && c();
|
|
2308
2308
|
}, c = () => {
|
|
2309
2309
|
let x = 0;
|
|
@@ -2320,16 +2320,16 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
2320
2320
|
}), m = (x) => {
|
|
2321
2321
|
let _ = 0, M = o.items.length - 1;
|
|
2322
2322
|
for (; _ <= M; ) {
|
|
2323
|
-
const
|
|
2324
|
-
d(
|
|
2323
|
+
const R = Math.floor((_ + M) / 2);
|
|
2324
|
+
d(R) <= x ? _ = R + 1 : M = R - 1;
|
|
2325
2325
|
}
|
|
2326
2326
|
return Math.max(0, M - o.buffer);
|
|
2327
2327
|
}, g = (x, _) => {
|
|
2328
2328
|
const M = x + _;
|
|
2329
|
-
let
|
|
2330
|
-
for (;
|
|
2331
|
-
|
|
2332
|
-
return Math.min(o.items.length - 1,
|
|
2329
|
+
let R = m(x);
|
|
2330
|
+
for (; R < o.items.length && !(d(R) > M); )
|
|
2331
|
+
R++;
|
|
2332
|
+
return Math.min(o.items.length - 1, R + o.buffer);
|
|
2333
2333
|
}, h = V(() => m(i.value)), $ = V(() => g(i.value, s.value)), k = V(() => {
|
|
2334
2334
|
const x = [];
|
|
2335
2335
|
for (let _ = h.value; _ <= $.value; _++)
|
|
@@ -2344,13 +2344,13 @@ const tl = { class: "popover__content" }, ol = {
|
|
|
2344
2344
|
}, w = () => {
|
|
2345
2345
|
n.value && (s.value = n.value.clientHeight);
|
|
2346
2346
|
};
|
|
2347
|
-
let
|
|
2347
|
+
let C = null;
|
|
2348
2348
|
return ye(() => {
|
|
2349
|
-
w(), n.value && (
|
|
2349
|
+
w(), n.value && (C = new ResizeObserver(() => {
|
|
2350
2350
|
w();
|
|
2351
|
-
}),
|
|
2351
|
+
}), C.observe(n.value));
|
|
2352
2352
|
}), tt(() => {
|
|
2353
|
-
|
|
2353
|
+
C && C.disconnect();
|
|
2354
2354
|
}), oe(k, () => {
|
|
2355
2355
|
u();
|
|
2356
2356
|
}, { flush: "post" }), oe(() => o.items, () => {
|
|
@@ -2450,28 +2450,28 @@ function ms(e, t) {
|
|
|
2450
2450
|
// кастомные определения
|
|
2451
2451
|
};
|
|
2452
2452
|
function u(w) {
|
|
2453
|
-
const
|
|
2454
|
-
return
|
|
2455
|
-
required: w.substring(0,
|
|
2456
|
-
optional: w.substring(
|
|
2453
|
+
const C = w.indexOf("?");
|
|
2454
|
+
return C === -1 ? { required: w, optional: "" } : {
|
|
2455
|
+
required: w.substring(0, C),
|
|
2456
|
+
optional: w.substring(C + 1)
|
|
2457
2457
|
};
|
|
2458
2458
|
}
|
|
2459
2459
|
function c(w) {
|
|
2460
2460
|
return w in a;
|
|
2461
2461
|
}
|
|
2462
|
-
function d(w,
|
|
2463
|
-
return c(
|
|
2462
|
+
function d(w, C) {
|
|
2463
|
+
return c(C) ? a[C].test(w) : !1;
|
|
2464
2464
|
}
|
|
2465
2465
|
function v(w) {
|
|
2466
|
-
const { required:
|
|
2466
|
+
const { required: C, optional: B } = u(o), I = C + B;
|
|
2467
2467
|
let O = "", x = 0, _ = 0;
|
|
2468
2468
|
for (; _ < I.length; ) {
|
|
2469
2469
|
const M = I[_];
|
|
2470
2470
|
if (c(M))
|
|
2471
2471
|
if (x < w.length) {
|
|
2472
|
-
const
|
|
2473
|
-
if (d(
|
|
2474
|
-
O +=
|
|
2472
|
+
const R = w[x];
|
|
2473
|
+
if (d(R, M))
|
|
2474
|
+
O += R, x++;
|
|
2475
2475
|
else {
|
|
2476
2476
|
x++;
|
|
2477
2477
|
continue;
|
|
@@ -2485,19 +2485,19 @@ function ms(e, t) {
|
|
|
2485
2485
|
return O;
|
|
2486
2486
|
}
|
|
2487
2487
|
function p() {
|
|
2488
|
-
const { required: w, optional:
|
|
2489
|
-
return (w +
|
|
2488
|
+
const { required: w, optional: C } = u(o);
|
|
2489
|
+
return (w + C).replace(/[9a*]/g, n);
|
|
2490
2490
|
}
|
|
2491
2491
|
function m(w) {
|
|
2492
|
-
const { required:
|
|
2492
|
+
const { required: C, optional: B } = u(o), I = C + B;
|
|
2493
2493
|
let O = "", x = 0, _ = 0;
|
|
2494
2494
|
for (; x < w.length && _ < I.length; ) {
|
|
2495
|
-
const M = w[x],
|
|
2495
|
+
const M = w[x], R = I[_];
|
|
2496
2496
|
if (M === n) {
|
|
2497
2497
|
x++;
|
|
2498
2498
|
continue;
|
|
2499
2499
|
}
|
|
2500
|
-
c(
|
|
2500
|
+
c(R) ? d(M, R) ? (O += M, x++, _++) : x++ : (M === R && x++, _++);
|
|
2501
2501
|
}
|
|
2502
2502
|
for (; x < w.length; ) {
|
|
2503
2503
|
const M = w[x];
|
|
@@ -2505,22 +2505,22 @@ function ms(e, t) {
|
|
|
2505
2505
|
x++;
|
|
2506
2506
|
continue;
|
|
2507
2507
|
}
|
|
2508
|
-
let
|
|
2508
|
+
let R = !1, H = 0;
|
|
2509
2509
|
for (let L = 0; L < I.length; L++)
|
|
2510
2510
|
if (c(I[L])) {
|
|
2511
2511
|
if (H === O.length) {
|
|
2512
|
-
d(M, I[L]) && (O += M,
|
|
2512
|
+
d(M, I[L]) && (O += M, R = !0);
|
|
2513
2513
|
break;
|
|
2514
2514
|
}
|
|
2515
2515
|
H++;
|
|
2516
2516
|
}
|
|
2517
|
-
if (x++, !
|
|
2517
|
+
if (x++, !R)
|
|
2518
2518
|
break;
|
|
2519
2519
|
}
|
|
2520
2520
|
return O;
|
|
2521
2521
|
}
|
|
2522
2522
|
function g(w) {
|
|
2523
|
-
const { required:
|
|
2523
|
+
const { required: C } = u(o), B = C.replace(/[^9a*]/g, "").length;
|
|
2524
2524
|
return m(w).length >= B;
|
|
2525
2525
|
}
|
|
2526
2526
|
function h() {
|
|
@@ -2528,7 +2528,7 @@ function ms(e, t) {
|
|
|
2528
2528
|
if (r.value || w)
|
|
2529
2529
|
s.value = v(w);
|
|
2530
2530
|
else {
|
|
2531
|
-
const { required:
|
|
2531
|
+
const { required: C, optional: B } = u(o), I = C + B;
|
|
2532
2532
|
let O = "";
|
|
2533
2533
|
for (let x = 0; x < I.length && !c(I[x]); x++)
|
|
2534
2534
|
O += I[x];
|
|
@@ -2537,62 +2537,62 @@ function ms(e, t) {
|
|
|
2537
2537
|
}
|
|
2538
2538
|
function $(w) {
|
|
2539
2539
|
if (!w.isTrusted) return;
|
|
2540
|
-
const
|
|
2540
|
+
const C = w.target, B = C.value, I = m(B), O = v(I);
|
|
2541
2541
|
s.value = O, e.value = I, ke(() => {
|
|
2542
2542
|
const { required: x, optional: _ } = u(o), M = x + _;
|
|
2543
|
-
let
|
|
2543
|
+
let R = 0, H = 0;
|
|
2544
2544
|
for (let L = 0; L < M.length; L++)
|
|
2545
2545
|
if (c(M[L]))
|
|
2546
2546
|
if (H < I.length)
|
|
2547
2547
|
H++;
|
|
2548
2548
|
else {
|
|
2549
|
-
|
|
2549
|
+
R = L;
|
|
2550
2550
|
break;
|
|
2551
2551
|
}
|
|
2552
2552
|
if (H === I.length && I.length > 0) {
|
|
2553
2553
|
H = 0;
|
|
2554
2554
|
for (let L = 0; L < M.length; L++)
|
|
2555
2555
|
if (c(M[L]) && (H++, H === I.length)) {
|
|
2556
|
-
|
|
2556
|
+
R = L + 1;
|
|
2557
2557
|
break;
|
|
2558
2558
|
}
|
|
2559
2559
|
}
|
|
2560
|
-
|
|
2560
|
+
R = Math.min(R, O.length), C.setSelectionRange(R, R);
|
|
2561
2561
|
});
|
|
2562
2562
|
}
|
|
2563
2563
|
function k(w) {
|
|
2564
|
-
const
|
|
2564
|
+
const C = w.target;
|
|
2565
2565
|
setTimeout(() => {
|
|
2566
|
-
const B =
|
|
2566
|
+
const B = C.value, I = m(B), O = v(I);
|
|
2567
2567
|
s.value = O, e.value = I;
|
|
2568
2568
|
const { required: x, optional: _ } = u(o), M = x + _;
|
|
2569
|
-
let
|
|
2569
|
+
let R = 0, H = 0;
|
|
2570
2570
|
for (let L = 0; L < M.length; L++)
|
|
2571
2571
|
if (c(M[L]))
|
|
2572
2572
|
if (H < I.length)
|
|
2573
2573
|
H++;
|
|
2574
2574
|
else {
|
|
2575
|
-
|
|
2575
|
+
R = L;
|
|
2576
2576
|
break;
|
|
2577
2577
|
}
|
|
2578
2578
|
if (H === I.length && I.length > 0) {
|
|
2579
2579
|
H = 0;
|
|
2580
2580
|
for (let L = 0; L < M.length; L++)
|
|
2581
2581
|
if (c(M[L]) && (H++, H === I.length)) {
|
|
2582
|
-
|
|
2582
|
+
R = L + 1;
|
|
2583
2583
|
break;
|
|
2584
2584
|
}
|
|
2585
2585
|
}
|
|
2586
|
-
|
|
2586
|
+
R = Math.min(R, O.length), C.setSelectionRange(R, R);
|
|
2587
2587
|
}, 0);
|
|
2588
2588
|
}
|
|
2589
2589
|
function P(w) {
|
|
2590
|
-
const
|
|
2590
|
+
const C = w.target, B = C.selectionStart || 0;
|
|
2591
2591
|
if (w.key === "Backspace") {
|
|
2592
2592
|
if (w.metaKey || w.ctrlKey)
|
|
2593
2593
|
return;
|
|
2594
2594
|
w.preventDefault();
|
|
2595
|
-
const L =
|
|
2595
|
+
const L = C.selectionStart || 0, te = C.selectionEnd || 0;
|
|
2596
2596
|
if (L !== te) {
|
|
2597
2597
|
s.value = v(""), e.value = "", ke(() => {
|
|
2598
2598
|
const { required: se, optional: ve } = u(o), j = se + ve;
|
|
@@ -2602,7 +2602,7 @@ function ms(e, t) {
|
|
|
2602
2602
|
ce = de;
|
|
2603
2603
|
break;
|
|
2604
2604
|
}
|
|
2605
|
-
|
|
2605
|
+
C.setSelectionRange(ce, ce);
|
|
2606
2606
|
});
|
|
2607
2607
|
return;
|
|
2608
2608
|
}
|
|
@@ -2625,7 +2625,7 @@ function ms(e, t) {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
2627
|
ge = ge.slice(0, Ze) + ge.slice(Ze + 1), ve = v(ge), s.value = ve, e.value = ge, ke(() => {
|
|
2628
|
-
|
|
2628
|
+
C.setSelectionRange(j, j);
|
|
2629
2629
|
});
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
@@ -2635,7 +2635,7 @@ function ms(e, t) {
|
|
|
2635
2635
|
if (w.metaKey || w.ctrlKey)
|
|
2636
2636
|
return;
|
|
2637
2637
|
w.preventDefault();
|
|
2638
|
-
const L =
|
|
2638
|
+
const L = C.selectionStart || 0, te = C.selectionEnd || 0;
|
|
2639
2639
|
if (L !== te) {
|
|
2640
2640
|
s.value = v(""), e.value = "", ke(() => {
|
|
2641
2641
|
const { required: se, optional: ve } = u(o), j = se + ve;
|
|
@@ -2645,7 +2645,7 @@ function ms(e, t) {
|
|
|
2645
2645
|
ce = de;
|
|
2646
2646
|
break;
|
|
2647
2647
|
}
|
|
2648
|
-
|
|
2648
|
+
C.setSelectionRange(ce, ce);
|
|
2649
2649
|
});
|
|
2650
2650
|
return;
|
|
2651
2651
|
}
|
|
@@ -2671,7 +2671,7 @@ function ms(e, t) {
|
|
|
2671
2671
|
j = j.slice(0, ce) + j.slice(ce + 1);
|
|
2672
2672
|
const de = v(j);
|
|
2673
2673
|
s.value = de, e.value = j, ke(() => {
|
|
2674
|
-
|
|
2674
|
+
C.setSelectionRange(B, B);
|
|
2675
2675
|
});
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
@@ -2684,20 +2684,20 @@ function ms(e, t) {
|
|
|
2684
2684
|
w.preventDefault();
|
|
2685
2685
|
return;
|
|
2686
2686
|
}
|
|
2687
|
-
let
|
|
2687
|
+
let R = -1, H = 0;
|
|
2688
2688
|
for (let L = 0; L < x.length; L++)
|
|
2689
2689
|
if (c(x[L])) {
|
|
2690
2690
|
if (H === _.length) {
|
|
2691
|
-
|
|
2691
|
+
R = L;
|
|
2692
2692
|
break;
|
|
2693
2693
|
}
|
|
2694
2694
|
H++;
|
|
2695
2695
|
}
|
|
2696
|
-
|
|
2696
|
+
R >= 0 && !d(w.key, x[R]) && w.preventDefault();
|
|
2697
2697
|
}
|
|
2698
2698
|
function A(w) {
|
|
2699
2699
|
r.value = !0, ke(() => {
|
|
2700
|
-
const
|
|
2700
|
+
const C = w.target, { required: B, optional: I } = u(o), O = B + I;
|
|
2701
2701
|
let x = 0;
|
|
2702
2702
|
for (let _ = 0; _ < O.length; _++)
|
|
2703
2703
|
if (c(O[_])) {
|
|
@@ -2716,16 +2716,16 @@ function ms(e, t) {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
_ === je(e).length && (x = s.value.length);
|
|
2718
2718
|
}
|
|
2719
|
-
|
|
2719
|
+
C.setSelectionRange(x, x);
|
|
2720
2720
|
});
|
|
2721
2721
|
}
|
|
2722
2722
|
function T() {
|
|
2723
2723
|
r.value = !1, l && !g(s.value) ? (s.value = "", e.value = "") : je(e) || h();
|
|
2724
2724
|
}
|
|
2725
|
-
return h(), oe(() => je(e), (w,
|
|
2726
|
-
w !==
|
|
2727
|
-
}, { immediate: !0 }), oe(r, (w,
|
|
2728
|
-
w !==
|
|
2725
|
+
return h(), oe(() => je(e), (w, C) => {
|
|
2726
|
+
w !== C && h();
|
|
2727
|
+
}, { immediate: !0 }), oe(r, (w, C) => {
|
|
2728
|
+
w !== C && h();
|
|
2729
2729
|
}), {
|
|
2730
2730
|
displayValue: s,
|
|
2731
2731
|
handleInput: $,
|
|
@@ -3990,14 +3990,14 @@ const ii = (e) => ({
|
|
|
3990
3990
|
x: o,
|
|
3991
3991
|
y: n
|
|
3992
3992
|
}, p = lt(l), m = nt(p), g = await s.getDimensions(u), h = p === "y", $ = h ? "top" : "left", k = h ? "bottom" : "right", P = h ? "clientHeight" : "clientWidth", A = i.reference[m] + i.reference[p] - v[p] - i.floating[m], T = v[p] - i.reference[p], w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
3993
|
-
let
|
|
3994
|
-
(!
|
|
3995
|
-
const B = A / 2 - T / 2, I =
|
|
3993
|
+
let C = w ? w[P] : 0;
|
|
3994
|
+
(!C || !await (s.isElement == null ? void 0 : s.isElement(w))) && (C = r.floating[P] || i.floating[m]);
|
|
3995
|
+
const B = A / 2 - T / 2, I = C / 2 - g[m] / 2 - 1, O = Re(d[$], I), x = Re(d[k], I), _ = O, M = C - g[m] - x, R = C / 2 - g[m] / 2 + B, H = Xe(_, R, M), L = !a.arrow && Oe(l) != null && R !== H && i.reference[m] / 2 - (R < _ ? O : x) - g[m] / 2 < 0, te = L ? R < _ ? R - _ : R - M : 0;
|
|
3996
3996
|
return {
|
|
3997
3997
|
[p]: v[p] + te,
|
|
3998
3998
|
data: {
|
|
3999
3999
|
[p]: H,
|
|
4000
|
-
centerOffset:
|
|
4000
|
+
centerOffset: R - H - te,
|
|
4001
4001
|
...L && {
|
|
4002
4002
|
alignmentOffset: te
|
|
4003
4003
|
}
|
|
@@ -4031,24 +4031,24 @@ const ii = (e) => ({
|
|
|
4031
4031
|
return {};
|
|
4032
4032
|
const $ = Se(l), k = xe(r), P = Se(r) === r, A = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), T = v || (P || !g ? [at(r)] : mn(r)), w = m !== "none";
|
|
4033
4033
|
!v && w && T.push(...wn(r, g, m, A));
|
|
4034
|
-
const
|
|
4034
|
+
const C = [r, ...T], B = await vo(t, h), I = [];
|
|
4035
4035
|
let O = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
4036
4036
|
if (c && I.push(B[$]), d) {
|
|
4037
|
-
const
|
|
4038
|
-
I.push(B[
|
|
4037
|
+
const R = pn(l, s, A);
|
|
4038
|
+
I.push(B[R[0]], B[R[1]]);
|
|
4039
4039
|
}
|
|
4040
4040
|
if (O = [...O, {
|
|
4041
4041
|
placement: l,
|
|
4042
4042
|
overflows: I
|
|
4043
|
-
}], !I.every((
|
|
4043
|
+
}], !I.every((R) => R <= 0)) {
|
|
4044
4044
|
var x, _;
|
|
4045
|
-
const
|
|
4045
|
+
const R = (((x = i.flip) == null ? void 0 : x.index) || 0) + 1, H = C[R];
|
|
4046
4046
|
if (H && (!(d === "alignment" ? k !== xe(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4047
4047
|
// overflows the main axis.
|
|
4048
4048
|
O.every((me) => me.overflows[0] > 0 && xe(me.placement) === k)))
|
|
4049
4049
|
return {
|
|
4050
4050
|
data: {
|
|
4051
|
-
index:
|
|
4051
|
+
index: R,
|
|
4052
4052
|
overflows: O
|
|
4053
4053
|
},
|
|
4054
4054
|
reset: {
|