@sfperusacdev/sf-ui 0.1.21 → 0.1.22
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/sf-ui.css +1 -1
- package/dist/sf-ui.js +418 -382
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/inputs/Input.d.ts +5 -1
- package/dist/types/src/components/range-inputs/DateRangeFields.d.ts +37 -0
- package/dist/types/src/components/range-inputs/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/sf-ui.js
CHANGED
|
@@ -1308,45 +1308,48 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
1308
1308
|
children: i
|
|
1309
1309
|
})
|
|
1310
1310
|
]
|
|
1311
|
-
}), gt = (e) => /(^|\s)!?w-\S+/.test(e ?? ""), Q = ({ small: e, error: t, className: n, withRightIcon: r, disabled: i, readOnly: a }) => (0, X.default)(!gt(n) && "w-full", "rounded-md border text-sm text-slate-900 shadow-sm outline-none", "placeholder:text-slate-400 focus:border-slate-400 focus:ring-2 focus:ring-slate-200", "disabled:cursor-not-allowed disabled:opacity-60", e ? "h-8 px-2" : "h-10 px-3", r && "pr-10", i || a ? "bg-slate-50" : "bg-white", t ? "border-red-500 focus:border-red-500 focus:ring-red-100" : "border-slate-300", n), _t = "transition-[border-color,box-shadow,background-color] duration-200 ease-out", vt = ({ small: e, error: t, className: n }) => (0, X.default)("sf-input", "sf-input--textarea", e && "sf-input--sm", t && "sf-input--error", n), yt = ({ form: e, name: t, label: n, info: r, required: i, type: a = "text", className: o, placeholder: s, readOnly: c,
|
|
1312
|
-
let
|
|
1311
|
+
}), gt = (e) => /(^|\s)!?w-\S+/.test(e ?? ""), Q = ({ small: e, error: t, className: n, withRightIcon: r, disabled: i, readOnly: a }) => (0, X.default)(!gt(n) && "w-full", "rounded-md border text-sm text-slate-900 shadow-sm outline-none", "placeholder:text-slate-400 focus:border-slate-400 focus:ring-2 focus:ring-slate-200", "disabled:cursor-not-allowed disabled:opacity-60", e ? "h-8 px-2" : "h-10 px-3", r && "pr-10", i || a ? "bg-slate-50" : "bg-white", t ? "border-red-500 focus:border-red-500 focus:ring-red-100" : "border-slate-300", n), _t = "transition-[border-color,box-shadow,background-color] duration-200 ease-out", vt = ({ small: e, error: t, className: n }) => (0, X.default)("sf-input", "sf-input--textarea", e && "sf-input--sm", t && "sf-input--error", n), yt = ({ form: e, name: t, label: n, info: r, required: i, type: a = "text", className: o, placeholder: s, readOnly: c, min: l, max: u, step: d, onChange: f, icon: p, small: m, onIconClick: h, onRefresh: g }) => {
|
|
1312
|
+
let _ = b({
|
|
1313
1313
|
name: t,
|
|
1314
1314
|
control: e.control
|
|
1315
|
-
}),
|
|
1315
|
+
}), x = String(t), S = _.fieldState.error, C = p ?? (h ? Ge : void 0);
|
|
1316
1316
|
return /* @__PURE__ */ v(Z, {
|
|
1317
|
-
id:
|
|
1317
|
+
id: x,
|
|
1318
1318
|
label: n,
|
|
1319
1319
|
info: r,
|
|
1320
1320
|
required: i,
|
|
1321
|
-
onRefresh:
|
|
1322
|
-
error:
|
|
1321
|
+
onRefresh: g,
|
|
1322
|
+
error: S?.message ? String(S.message) : void 0,
|
|
1323
1323
|
children: /* @__PURE__ */ y("div", {
|
|
1324
1324
|
className: "relative",
|
|
1325
1325
|
children: [/* @__PURE__ */ v("input", {
|
|
1326
|
-
id:
|
|
1327
|
-
name:
|
|
1326
|
+
id: x,
|
|
1327
|
+
name: _.field.name,
|
|
1328
1328
|
type: a,
|
|
1329
|
-
value: String(
|
|
1329
|
+
value: String(_.field.value ?? ""),
|
|
1330
1330
|
placeholder: s,
|
|
1331
1331
|
readOnly: c,
|
|
1332
|
-
|
|
1332
|
+
min: l,
|
|
1333
|
+
max: u,
|
|
1334
|
+
step: d,
|
|
1335
|
+
onBlur: () => _.field.onBlur(),
|
|
1333
1336
|
onChange: (e) => {
|
|
1334
1337
|
let t = e.target.value;
|
|
1335
|
-
|
|
1338
|
+
_.field.onChange(t), f?.(t);
|
|
1336
1339
|
},
|
|
1337
1340
|
className: Q({
|
|
1338
|
-
small:
|
|
1339
|
-
error: !!
|
|
1341
|
+
small: m,
|
|
1342
|
+
error: !!S,
|
|
1340
1343
|
className: o,
|
|
1341
|
-
withRightIcon: !!
|
|
1344
|
+
withRightIcon: !!C,
|
|
1342
1345
|
readOnly: c
|
|
1343
1346
|
})
|
|
1344
|
-
}),
|
|
1347
|
+
}), C && /* @__PURE__ */ v("button", {
|
|
1345
1348
|
type: "button",
|
|
1346
|
-
onClick:
|
|
1347
|
-
disabled: !
|
|
1348
|
-
className: (0, X.default)("absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-slate-500",
|
|
1349
|
-
children: /* @__PURE__ */ v(
|
|
1349
|
+
onClick: h,
|
|
1350
|
+
disabled: !h,
|
|
1351
|
+
className: (0, X.default)("absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-slate-500", h && "hover:text-slate-900", !h && "cursor-default"),
|
|
1352
|
+
children: /* @__PURE__ */ v(C, { size: m ? 16 : 18 })
|
|
1350
1353
|
})]
|
|
1351
1354
|
})
|
|
1352
1355
|
});
|
|
@@ -10044,16 +10047,49 @@ var sr = (e) => {
|
|
|
10044
10047
|
}, t))
|
|
10045
10048
|
})
|
|
10046
10049
|
});
|
|
10047
|
-
}, Ys = (e) =>
|
|
10050
|
+
}, Ys = (e) => {
|
|
10051
|
+
let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
|
|
10052
|
+
return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
|
|
10053
|
+
}, Xs = ({ form: e, startName: t, endName: n, startLabel: r = "Desde", endLabel: i = "Hasta", required: a, endRequired: o, small: s, readOnlyEnd: c, adjustEnd: l = "start", onEndAdjusted: u, className: d }) => {
|
|
10054
|
+
let f = String(e.watch(t) ?? ""), p = (t, r) => {
|
|
10055
|
+
if (l === "none") return;
|
|
10056
|
+
let i = t.slice(0, 10), a = r.slice(0, 10);
|
|
10057
|
+
if (!_n(i) || !_n(a) || a >= i) return;
|
|
10058
|
+
let o = l === "month-end" ? Ys(i) : i;
|
|
10059
|
+
e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
|
|
10060
|
+
};
|
|
10061
|
+
return /* @__PURE__ */ y("div", {
|
|
10062
|
+
className: (0, X.default)("sf-date-range-fields", d),
|
|
10063
|
+
children: [/* @__PURE__ */ v(yt, {
|
|
10064
|
+
form: e,
|
|
10065
|
+
name: t,
|
|
10066
|
+
label: r,
|
|
10067
|
+
type: "date",
|
|
10068
|
+
required: a,
|
|
10069
|
+
small: s,
|
|
10070
|
+
onChange: (t) => p(t, String(e.getValues(n) ?? ""))
|
|
10071
|
+
}), /* @__PURE__ */ v(yt, {
|
|
10072
|
+
form: e,
|
|
10073
|
+
name: n,
|
|
10074
|
+
label: i,
|
|
10075
|
+
type: "date",
|
|
10076
|
+
required: o ?? a,
|
|
10077
|
+
small: s,
|
|
10078
|
+
readOnly: c,
|
|
10079
|
+
min: _n(f.slice(0, 10)) ? f.slice(0, 10) : void 0,
|
|
10080
|
+
onChange: (n) => p(String(e.getValues(t) ?? ""), n)
|
|
10081
|
+
})]
|
|
10082
|
+
});
|
|
10083
|
+
}, Zs = (e) => /* @__PURE__ */ v(Cn, {
|
|
10048
10084
|
...e,
|
|
10049
10085
|
utc: !0
|
|
10050
|
-
}),
|
|
10086
|
+
}), Qs = () => ({
|
|
10051
10087
|
start: "",
|
|
10052
10088
|
end: ""
|
|
10053
|
-
}),
|
|
10089
|
+
}), $s = () => ({
|
|
10054
10090
|
start: "",
|
|
10055
10091
|
end: ""
|
|
10056
|
-
}),
|
|
10092
|
+
}), ec = 0, tc = () => (ec += 1, `photo_${Date.now()}_${ec}`), nc = (e, t) => {
|
|
10057
10093
|
if (!t || t === "*") return !0;
|
|
10058
10094
|
let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
|
|
10059
10095
|
return n.some((e) => {
|
|
@@ -10065,20 +10101,20 @@ var sr = (e) => {
|
|
|
10065
10101
|
}
|
|
10066
10102
|
return i === t;
|
|
10067
10103
|
});
|
|
10068
|
-
},
|
|
10104
|
+
}, rc = (e, t = !1) => new Promise((n) => {
|
|
10069
10105
|
let r = document.createElement("input");
|
|
10070
10106
|
r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
|
|
10071
10107
|
n(Array.from(r.files ?? [])), r.remove();
|
|
10072
10108
|
}, document.body.appendChild(r), r.click();
|
|
10073
|
-
}),
|
|
10074
|
-
id:
|
|
10109
|
+
}), ic = (e) => ({
|
|
10110
|
+
id: tc(),
|
|
10075
10111
|
preview: URL.createObjectURL(e),
|
|
10076
10112
|
file: e
|
|
10077
|
-
}),
|
|
10113
|
+
}), ac = (e) => {
|
|
10078
10114
|
URL.revokeObjectURL(e.preview);
|
|
10079
|
-
},
|
|
10080
|
-
e.forEach(
|
|
10081
|
-
},
|
|
10115
|
+
}, oc = (e) => {
|
|
10116
|
+
e.forEach(ac);
|
|
10117
|
+
}, sc = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], cc = (e, t = .92) => new Promise((n, r) => {
|
|
10082
10118
|
let i = URL.createObjectURL(e), a = new Image();
|
|
10083
10119
|
a.onload = () => {
|
|
10084
10120
|
let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
|
|
@@ -10101,7 +10137,7 @@ var sr = (e) => {
|
|
|
10101
10137
|
}, a.onerror = () => {
|
|
10102
10138
|
URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
|
|
10103
10139
|
}, a.src = i;
|
|
10104
|
-
}),
|
|
10140
|
+
}), lc = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, uc = (e) => `${e.name}-${e.lastModified}-${e.size}`, dc = ({ form: e, name: t, label: n, info: r, required: i, accept: a = "*", multiple: o = !1, maxSizeMb: s = 10, dropLabel: c, readOnly: l, disabled: u, small: d, className: f, onChange: p, onUpload: g, onRefresh: _ }) => {
|
|
10105
10141
|
let x = m(null), S = b({
|
|
10106
10142
|
name: t,
|
|
10107
10143
|
control: e.control
|
|
@@ -10110,7 +10146,7 @@ var sr = (e) => {
|
|
|
10110
10146
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
10111
10147
|
})(), L = async (e) => {
|
|
10112
10148
|
if (g) for (let t of e) {
|
|
10113
|
-
let e =
|
|
10149
|
+
let e = uc(t);
|
|
10114
10150
|
O((t) => new Set(t).add(e)), E((t) => ({
|
|
10115
10151
|
...t,
|
|
10116
10152
|
[e]: 0
|
|
@@ -10135,7 +10171,7 @@ var sr = (e) => {
|
|
|
10135
10171
|
}
|
|
10136
10172
|
}
|
|
10137
10173
|
}, ee = (e) => {
|
|
10138
|
-
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t &&
|
|
10174
|
+
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && nc(e, a)), r = e.length - n.length;
|
|
10139
10175
|
if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
|
|
10140
10176
|
let e = [...I, ...n];
|
|
10141
10177
|
S.field.onChange(e), p?.(e), L(n);
|
|
@@ -10189,7 +10225,7 @@ var sr = (e) => {
|
|
|
10189
10225
|
className: (0, X.default)("sf-file-drop", C && "sf-file-drop--dragging", !P && "sf-file-drop--interactive", P && "sf-file-drop--disabled", d ? "sf-file-drop--sm" : "sf-file-drop--md", N && "sf-file-drop--error"),
|
|
10190
10226
|
children: [/* @__PURE__ */ v("span", {
|
|
10191
10227
|
className: "sf-file-drop__title",
|
|
10192
|
-
children: C ? "Suelta aquí" : c ??
|
|
10228
|
+
children: C ? "Suelta aquí" : c ?? lc(I)
|
|
10193
10229
|
}), /* @__PURE__ */ y("span", {
|
|
10194
10230
|
className: "sf-file-drop__hint",
|
|
10195
10231
|
children: [
|
|
@@ -10204,7 +10240,7 @@ var sr = (e) => {
|
|
|
10204
10240
|
className: "sf-file-list",
|
|
10205
10241
|
"aria-label": "Archivos seleccionados",
|
|
10206
10242
|
children: I.map((e) => {
|
|
10207
|
-
let t =
|
|
10243
|
+
let t = uc(e), n = T[t], r = D.has(t);
|
|
10208
10244
|
return /* @__PURE__ */ y("li", {
|
|
10209
10245
|
className: "sf-file-list__item",
|
|
10210
10246
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -10233,7 +10269,7 @@ var sr = (e) => {
|
|
|
10233
10269
|
]
|
|
10234
10270
|
})
|
|
10235
10271
|
});
|
|
10236
|
-
},
|
|
10272
|
+
}, fc = ({ form: e, name: t, label: n, info: r, required: i, capture: a, maxSizeMb: o = 5, readOnly: c, disabled: l, small: d, className: f, onChange: g, onRefresh: _ }) => {
|
|
10237
10273
|
let x = m(null), S = b({
|
|
10238
10274
|
name: t,
|
|
10239
10275
|
control: e.control
|
|
@@ -10322,7 +10358,7 @@ var sr = (e) => {
|
|
|
10322
10358
|
]
|
|
10323
10359
|
})
|
|
10324
10360
|
});
|
|
10325
|
-
},
|
|
10361
|
+
}, pc = ({ form: e, name: t, label: n, info: r, required: i, width: a = 400, height: o = 160, readOnly: c, disabled: l, className: d, onChange: f, onRefresh: p }) => {
|
|
10326
10362
|
let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
|
|
10327
10363
|
name: t,
|
|
10328
10364
|
control: e.control
|
|
@@ -10414,11 +10450,11 @@ var sr = (e) => {
|
|
|
10414
10450
|
})]
|
|
10415
10451
|
})
|
|
10416
10452
|
});
|
|
10417
|
-
},
|
|
10453
|
+
}, mc = ({ form: e, name: t, label: n, info: r, required: i, max: a = 10, maxSizeMb: o = 5, camera: c = !1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
10418
10454
|
let S = m(null), C = b({
|
|
10419
10455
|
name: t,
|
|
10420
10456
|
control: e.control
|
|
10421
|
-
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() =>
|
|
10457
|
+
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() => sc(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
|
|
10422
10458
|
k,
|
|
10423
10459
|
a,
|
|
10424
10460
|
A.length
|
|
@@ -10426,7 +10462,7 @@ var sr = (e) => {
|
|
|
10426
10462
|
u(() => {
|
|
10427
10463
|
N.current = A;
|
|
10428
10464
|
}, [A]), u(() => () => {
|
|
10429
|
-
for (let e of N.current)
|
|
10465
|
+
for (let e of N.current) ac(e);
|
|
10430
10466
|
}, []);
|
|
10431
10467
|
let P = s((e) => {
|
|
10432
10468
|
C.field.onChange(e), _?.(e);
|
|
@@ -10441,7 +10477,7 @@ var sr = (e) => {
|
|
|
10441
10477
|
D(`Hay imágenes que superan ${o} MB.`);
|
|
10442
10478
|
return;
|
|
10443
10479
|
}
|
|
10444
|
-
let r = a - A.length, i = n.slice(0, r).map((e) =>
|
|
10480
|
+
let r = a - A.length, i = n.slice(0, r).map((e) => ic(e));
|
|
10445
10481
|
if (n.length > r) {
|
|
10446
10482
|
D(`Solo puedes agregar ${r} imagen(es) más.`);
|
|
10447
10483
|
return;
|
|
@@ -10454,7 +10490,7 @@ var sr = (e) => {
|
|
|
10454
10490
|
A
|
|
10455
10491
|
]), I = s((e) => {
|
|
10456
10492
|
let t = A.find((t) => t.id === e);
|
|
10457
|
-
t &&
|
|
10493
|
+
t && ac(t), P(A.filter((t) => t.id !== e));
|
|
10458
10494
|
}, [P, A]);
|
|
10459
10495
|
return /* @__PURE__ */ v(Z, {
|
|
10460
10496
|
id: w,
|
|
@@ -10526,19 +10562,19 @@ var sr = (e) => {
|
|
|
10526
10562
|
]
|
|
10527
10563
|
})
|
|
10528
10564
|
});
|
|
10529
|
-
},
|
|
10565
|
+
}, hc = (e) => {
|
|
10530
10566
|
switch (e.kind) {
|
|
10531
|
-
case "photo": return /* @__PURE__ */ v(
|
|
10532
|
-
case "multiPhoto": return /* @__PURE__ */ v(
|
|
10533
|
-
case "signature": return /* @__PURE__ */ v(
|
|
10567
|
+
case "photo": return /* @__PURE__ */ v(fc, { ...e });
|
|
10568
|
+
case "multiPhoto": return /* @__PURE__ */ v(mc, { ...e });
|
|
10569
|
+
case "signature": return /* @__PURE__ */ v(pc, { ...e });
|
|
10534
10570
|
case "file": return /* @__PURE__ */ v(On, { ...e });
|
|
10535
10571
|
default: return null;
|
|
10536
10572
|
}
|
|
10537
|
-
},
|
|
10573
|
+
}, gc = (e) => new Promise((t, n) => {
|
|
10538
10574
|
let r = new Image();
|
|
10539
10575
|
r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
|
|
10540
|
-
}),
|
|
10541
|
-
let i = await
|
|
10576
|
+
}), _c = async (e, t, n, r = "image/jpeg") => {
|
|
10577
|
+
let i = await gc(e), a = document.createElement("canvas");
|
|
10542
10578
|
a.width = t.width, a.height = t.height;
|
|
10543
10579
|
let o = a.getContext("2d");
|
|
10544
10580
|
if (!o) throw Error("Canvas no disponible");
|
|
@@ -10551,7 +10587,7 @@ var sr = (e) => {
|
|
|
10551
10587
|
e(new File([i], n, { type: r }));
|
|
10552
10588
|
}, r, .92);
|
|
10553
10589
|
});
|
|
10554
|
-
},
|
|
10590
|
+
}, vc = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
|
|
10555
10591
|
let [o, c] = h({
|
|
10556
10592
|
x: 0,
|
|
10557
10593
|
y: 0
|
|
@@ -10561,7 +10597,7 @@ var sr = (e) => {
|
|
|
10561
10597
|
if (d) {
|
|
10562
10598
|
m(!0);
|
|
10563
10599
|
try {
|
|
10564
|
-
i(await
|
|
10600
|
+
i(await _c(e, d, t, t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg"));
|
|
10565
10601
|
} finally {
|
|
10566
10602
|
m(!1);
|
|
10567
10603
|
}
|
|
@@ -10612,7 +10648,7 @@ var sr = (e) => {
|
|
|
10612
10648
|
})
|
|
10613
10649
|
]
|
|
10614
10650
|
});
|
|
10615
|
-
},
|
|
10651
|
+
}, yc = ({ form: e, name: t, label: n, info: r, required: i, maxSizeMb: a = 5, interactive: o = !0, aspect: c = 1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
10616
10652
|
let S = m(null), C = b({
|
|
10617
10653
|
name: t,
|
|
10618
10654
|
control: e.control
|
|
@@ -10641,7 +10677,7 @@ var sr = (e) => {
|
|
|
10641
10677
|
}
|
|
10642
10678
|
T(!0);
|
|
10643
10679
|
try {
|
|
10644
|
-
I(await
|
|
10680
|
+
I(await cc(e));
|
|
10645
10681
|
} finally {
|
|
10646
10682
|
T(!1);
|
|
10647
10683
|
}
|
|
@@ -10731,7 +10767,7 @@ var sr = (e) => {
|
|
|
10731
10767
|
role: "dialog",
|
|
10732
10768
|
"aria-modal": "true",
|
|
10733
10769
|
"aria-label": "Editor de recorte",
|
|
10734
|
-
children: /* @__PURE__ */ v(
|
|
10770
|
+
children: /* @__PURE__ */ v(vc, {
|
|
10735
10771
|
imageUrl: E.url,
|
|
10736
10772
|
fileName: E.fileName,
|
|
10737
10773
|
aspect: c,
|
|
@@ -10743,7 +10779,7 @@ var sr = (e) => {
|
|
|
10743
10779
|
})]
|
|
10744
10780
|
})]
|
|
10745
10781
|
});
|
|
10746
|
-
},
|
|
10782
|
+
}, bc = () => [], xc = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
10747
10783
|
className: (0, X.default)("sf-neutral-map-frame", n),
|
|
10748
10784
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
10749
10785
|
className: "sf-neutral-map-frame__header",
|
|
@@ -10755,63 +10791,63 @@ var sr = (e) => {
|
|
|
10755
10791
|
children: t
|
|
10756
10792
|
})]
|
|
10757
10793
|
}), r]
|
|
10758
|
-
}),
|
|
10794
|
+
}), Sc = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
|
|
10759
10795
|
className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
|
|
10760
10796
|
role: e === "error" ? "alert" : "status",
|
|
10761
10797
|
children: t
|
|
10762
|
-
}),
|
|
10798
|
+
}), Cc = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", wc = {
|
|
10763
10799
|
lat: -12.0464,
|
|
10764
10800
|
lng: -77.0428
|
|
10765
|
-
},
|
|
10801
|
+
}, Tc = 13, Ec = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Dc = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Oc = {
|
|
10766
10802
|
drawing: "basic",
|
|
10767
10803
|
streetView: "none",
|
|
10768
10804
|
clustering: "none",
|
|
10769
10805
|
heatmap: "none"
|
|
10770
|
-
},
|
|
10806
|
+
}, kc = {
|
|
10771
10807
|
drawing: "basic",
|
|
10772
10808
|
streetView: "interactive",
|
|
10773
10809
|
clustering: "client",
|
|
10774
10810
|
heatmap: "weighted"
|
|
10775
|
-
},
|
|
10811
|
+
}, Ac = "sf-google-maps-script", jc = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
|
|
10776
10812
|
let i = new URLSearchParams({
|
|
10777
10813
|
key: e,
|
|
10778
10814
|
language: t,
|
|
10779
10815
|
region: n
|
|
10780
10816
|
});
|
|
10781
10817
|
return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
|
|
10782
|
-
},
|
|
10818
|
+
}, Mc = (e) => {
|
|
10783
10819
|
let t = window;
|
|
10784
10820
|
return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
|
|
10785
|
-
let i = document.getElementById(
|
|
10821
|
+
let i = document.getElementById(Ac);
|
|
10786
10822
|
if (i) {
|
|
10787
10823
|
i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
|
|
10788
10824
|
return;
|
|
10789
10825
|
}
|
|
10790
10826
|
let a = document.createElement("script");
|
|
10791
|
-
a.id =
|
|
10827
|
+
a.id = Ac, a.src = jc(e), a.async = !0, a.defer = !0, a.addEventListener("load", () => n(t.google ?? {})), a.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps."))), document.head.appendChild(a);
|
|
10792
10828
|
}), t.__sfGoogleMapsPromise);
|
|
10793
|
-
},
|
|
10829
|
+
}, Nc = (e, t = "") => {
|
|
10794
10830
|
let n = e.match(/^var\((--[^,)]+)\)$/);
|
|
10795
10831
|
return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
|
|
10796
|
-
},
|
|
10832
|
+
}, Pc = (e, t) => ({
|
|
10797
10833
|
map: t,
|
|
10798
10834
|
paths: e.points,
|
|
10799
|
-
strokeColor: e.color ??
|
|
10800
|
-
fillColor: e.fillColor ?? e.color ??
|
|
10835
|
+
strokeColor: e.color ?? Nc("var(--sf-map-area-stroke)"),
|
|
10836
|
+
fillColor: e.fillColor ?? e.color ?? Nc("var(--sf-map-area-fill)"),
|
|
10801
10837
|
fillOpacity: .14,
|
|
10802
10838
|
strokeWeight: 2.5
|
|
10803
|
-
}),
|
|
10839
|
+
}), Fc = (e, t) => ({
|
|
10804
10840
|
map: t,
|
|
10805
10841
|
path: e.points,
|
|
10806
|
-
strokeColor: e.color ??
|
|
10842
|
+
strokeColor: e.color ?? Nc("var(--sf-map-route-stroke)"),
|
|
10807
10843
|
strokeWeight: 3.5
|
|
10808
|
-
}),
|
|
10844
|
+
}), Ic = (e, t, n) => ({
|
|
10809
10845
|
map: t,
|
|
10810
10846
|
position: e.position,
|
|
10811
10847
|
title: e.title ?? e.label,
|
|
10812
10848
|
label: e.label ? e.label.slice(0, 1).toUpperCase() : void 0,
|
|
10813
10849
|
draggable: !n && e.options?.draggable
|
|
10814
|
-
}),
|
|
10850
|
+
}), Lc = ({ config: e, center: t = wc, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], height: o = 320, className: s, readOnly: c, onClick: l, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: p, onMarkerDragEnd: g }) => {
|
|
10815
10851
|
let _ = m(null), y = m(null), b = m(/* @__PURE__ */ new Map()), x = m(/* @__PURE__ */ new Map()), S = m(/* @__PURE__ */ new Map()), C = m({
|
|
10816
10852
|
onMarkerClick: d,
|
|
10817
10853
|
onMarkerDoubleClick: f,
|
|
@@ -10844,9 +10880,9 @@ var sr = (e) => {
|
|
|
10844
10880
|
return;
|
|
10845
10881
|
}
|
|
10846
10882
|
let t = !1;
|
|
10847
|
-
return D("loading"),
|
|
10883
|
+
return D("loading"), Mc(e).then((n) => {
|
|
10848
10884
|
t || !_.current || !n.maps?.Map || (y.current = new n.maps.Map(_.current, {
|
|
10849
|
-
center:
|
|
10885
|
+
center: wc,
|
|
10850
10886
|
zoom: 13,
|
|
10851
10887
|
mapId: e.mapId,
|
|
10852
10888
|
disableDefaultUI: c
|
|
@@ -10865,7 +10901,7 @@ var sr = (e) => {
|
|
|
10865
10901
|
}, []), u(() => {
|
|
10866
10902
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
10867
10903
|
let t = !1;
|
|
10868
|
-
return
|
|
10904
|
+
return Mc(e).then((e) => {
|
|
10869
10905
|
if (t || !e.maps?.Marker) return;
|
|
10870
10906
|
let n = new Set(r.map((e) => e.id));
|
|
10871
10907
|
b.current.forEach((e, t) => {
|
|
@@ -10874,10 +10910,10 @@ var sr = (e) => {
|
|
|
10874
10910
|
x.current.set(t.id, t);
|
|
10875
10911
|
let n = b.current.get(t.id);
|
|
10876
10912
|
if (n) {
|
|
10877
|
-
n.marker.setPosition?.(t.position), n.marker.setOptions?.(
|
|
10913
|
+
n.marker.setPosition?.(t.position), n.marker.setOptions?.(Ic(t, y.current, c));
|
|
10878
10914
|
return;
|
|
10879
10915
|
}
|
|
10880
|
-
let r = new e.maps.Marker(
|
|
10916
|
+
let r = new e.maps.Marker(Ic(t, y.current, c)), i = () => x.current.get(t.id) ?? t, a = [
|
|
10881
10917
|
r.addListener?.("click", () => {
|
|
10882
10918
|
C.current.onMarkerClick?.({ marker: i() });
|
|
10883
10919
|
}),
|
|
@@ -10921,7 +10957,7 @@ var sr = (e) => {
|
|
|
10921
10957
|
]), u(() => {
|
|
10922
10958
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
10923
10959
|
let t = !1;
|
|
10924
|
-
return
|
|
10960
|
+
return Mc(e).then((e) => {
|
|
10925
10961
|
if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
|
|
10926
10962
|
let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
|
|
10927
10963
|
S.current.forEach((e, t) => {
|
|
@@ -10929,22 +10965,22 @@ var sr = (e) => {
|
|
|
10929
10965
|
}), a.forEach((t) => {
|
|
10930
10966
|
let n = `area:${t.id}`, r = S.current.get(n);
|
|
10931
10967
|
if (r?.kind === "area") {
|
|
10932
|
-
r.shape.setPaths?.(t.points), r.shape.setOptions?.(
|
|
10968
|
+
r.shape.setPaths?.(t.points), r.shape.setOptions?.(Pc(t, y.current));
|
|
10933
10969
|
return;
|
|
10934
10970
|
}
|
|
10935
10971
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
10936
10972
|
kind: "area",
|
|
10937
|
-
shape: new e.maps.Polygon(
|
|
10973
|
+
shape: new e.maps.Polygon(Pc(t, y.current))
|
|
10938
10974
|
});
|
|
10939
10975
|
}), i.forEach((t) => {
|
|
10940
10976
|
let n = `route:${t.id}`, r = S.current.get(n);
|
|
10941
10977
|
if (r?.kind === "route") {
|
|
10942
|
-
r.shape.setPath?.(t.points), r.shape.setOptions?.(
|
|
10978
|
+
r.shape.setPath?.(t.points), r.shape.setOptions?.(Fc(t, y.current));
|
|
10943
10979
|
return;
|
|
10944
10980
|
}
|
|
10945
10981
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
10946
10982
|
kind: "route",
|
|
10947
|
-
shape: new e.maps.Polyline(
|
|
10983
|
+
shape: new e.maps.Polyline(Fc(t, y.current))
|
|
10948
10984
|
});
|
|
10949
10985
|
});
|
|
10950
10986
|
}), () => {
|
|
@@ -10958,7 +10994,7 @@ var sr = (e) => {
|
|
|
10958
10994
|
]), u(() => {
|
|
10959
10995
|
if (E !== "ready" || !e?.apiKey || !y.current || !l || c) return;
|
|
10960
10996
|
let t = !1, n;
|
|
10961
|
-
return
|
|
10997
|
+
return Mc(e).then(() => {
|
|
10962
10998
|
let e = y.current;
|
|
10963
10999
|
t || !e?.addListener || (n = e.addListener("click", (e) => {
|
|
10964
11000
|
e.latLng && l({ location: {
|
|
@@ -10987,25 +11023,25 @@ var sr = (e) => {
|
|
|
10987
11023
|
"aria-busy": E !== "ready" || void 0
|
|
10988
11024
|
})
|
|
10989
11025
|
});
|
|
10990
|
-
},
|
|
11026
|
+
}, Rc = (e) => ({
|
|
10991
11027
|
id: "google",
|
|
10992
|
-
capabilities:
|
|
10993
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11028
|
+
capabilities: kc,
|
|
11029
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(Lc, {
|
|
10994
11030
|
...t,
|
|
10995
11031
|
config: e
|
|
10996
11032
|
})
|
|
10997
|
-
}),
|
|
11033
|
+
}), zc = (e) => [e.lat, e.lng], Bc = (e) => ae.divIcon({
|
|
10998
11034
|
className: "",
|
|
10999
11035
|
html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
|
|
11000
11036
|
iconSize: [18, 18],
|
|
11001
11037
|
iconAnchor: [9, 9]
|
|
11002
|
-
}),
|
|
11038
|
+
}), Vc = ({ readOnly: e, onClick: t }) => (ie({ click(n) {
|
|
11003
11039
|
e || t?.({ location: {
|
|
11004
11040
|
lat: n.latlng.lat,
|
|
11005
11041
|
lng: n.latlng.lng
|
|
11006
11042
|
} });
|
|
11007
|
-
} }), null),
|
|
11008
|
-
let g = co(), _ = p(() =>
|
|
11043
|
+
} }), null), Hc = ({ center: e = wc, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], height: a = 320, className: o, readOnly: s, tileUrl: c = Ec, attribution: l = Dc, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11044
|
+
let g = co(), _ = p(() => zc(e), [e]), b = typeof a == "number" ? { height: `${a}px` } : { height: a };
|
|
11009
11045
|
return g ? /* @__PURE__ */ v("div", {
|
|
11010
11046
|
className: o,
|
|
11011
11047
|
style: b,
|
|
@@ -11020,29 +11056,29 @@ var sr = (e) => {
|
|
|
11020
11056
|
attribution: l,
|
|
11021
11057
|
url: c
|
|
11022
11058
|
}),
|
|
11023
|
-
/* @__PURE__ */ v(
|
|
11059
|
+
/* @__PURE__ */ v(Vc, {
|
|
11024
11060
|
readOnly: s,
|
|
11025
11061
|
onClick: u
|
|
11026
11062
|
}),
|
|
11027
11063
|
i.map((e) => /* @__PURE__ */ v(B, {
|
|
11028
|
-
positions: e.points.map(
|
|
11064
|
+
positions: e.points.map(zc),
|
|
11029
11065
|
pathOptions: {
|
|
11030
|
-
color: e.color ??
|
|
11031
|
-
fillColor: e.fillColor ?? e.color ??
|
|
11066
|
+
color: e.color ?? Nc("var(--sf-map-area-stroke)"),
|
|
11067
|
+
fillColor: e.fillColor ?? e.color ?? Nc("var(--sf-map-area-fill)"),
|
|
11032
11068
|
fillOpacity: .14,
|
|
11033
11069
|
weight: 2.5
|
|
11034
11070
|
}
|
|
11035
11071
|
}, e.id)),
|
|
11036
11072
|
r.map((e) => /* @__PURE__ */ v(V, {
|
|
11037
|
-
positions: e.points.map(
|
|
11073
|
+
positions: e.points.map(zc),
|
|
11038
11074
|
pathOptions: {
|
|
11039
|
-
color: e.color ??
|
|
11075
|
+
color: e.color ?? Nc("var(--sf-map-route-stroke)"),
|
|
11040
11076
|
weight: 3.5
|
|
11041
11077
|
}
|
|
11042
11078
|
}, e.id)),
|
|
11043
11079
|
n.map((e) => /* @__PURE__ */ v(ne, {
|
|
11044
|
-
position:
|
|
11045
|
-
icon:
|
|
11080
|
+
position: zc(e.position),
|
|
11081
|
+
icon: Bc(e.color),
|
|
11046
11082
|
title: e.title ?? e.label,
|
|
11047
11083
|
draggable: !s && e.options?.draggable,
|
|
11048
11084
|
bubblingMouseEvents: !1,
|
|
@@ -11079,18 +11115,18 @@ var sr = (e) => {
|
|
|
11079
11115
|
style: b,
|
|
11080
11116
|
children: "Cargando mapa…"
|
|
11081
11117
|
});
|
|
11082
|
-
},
|
|
11118
|
+
}, Uc = (e) => ({
|
|
11083
11119
|
id: "leaflet",
|
|
11084
|
-
capabilities:
|
|
11085
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11120
|
+
capabilities: Oc,
|
|
11121
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(Hc, {
|
|
11086
11122
|
...t,
|
|
11087
11123
|
tileUrl: e?.tileUrl,
|
|
11088
11124
|
attribution: e?.attribution
|
|
11089
11125
|
})
|
|
11090
|
-
}),
|
|
11091
|
-
let n =
|
|
11092
|
-
return 2 *
|
|
11093
|
-
},
|
|
11126
|
+
}), Wc = 6371e3, Gc = (e) => e * Math.PI / 180, Kc = (e, t) => {
|
|
11127
|
+
let n = Gc(t.lat - e.lat), r = Gc(t.lng - e.lng), i = Gc(e.lat), a = Gc(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
|
|
11128
|
+
return 2 * Wc * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
|
|
11129
|
+
}, qc = () => ({
|
|
11094
11130
|
id: "basic",
|
|
11095
11131
|
capabilities: {
|
|
11096
11132
|
distance: "point-to-point",
|
|
@@ -11098,12 +11134,12 @@ var sr = (e) => {
|
|
|
11098
11134
|
},
|
|
11099
11135
|
async calculateDistance(e) {
|
|
11100
11136
|
let t = e.origins[0], n = e.destinations[0];
|
|
11101
|
-
return { distanceMeters: t && n ?
|
|
11137
|
+
return { distanceMeters: t && n ? Kc(t, n) : 0 };
|
|
11102
11138
|
}
|
|
11103
|
-
}),
|
|
11139
|
+
}), Jc = (e) => ({
|
|
11104
11140
|
lat: e.lat(),
|
|
11105
11141
|
lng: e.lng()
|
|
11106
|
-
}),
|
|
11142
|
+
}), Yc = (e) => {
|
|
11107
11143
|
let t = e.geometry?.location;
|
|
11108
11144
|
if (!t) return null;
|
|
11109
11145
|
let n = e.formatted_address ?? e.place_id ?? "Ubicación Google Maps";
|
|
@@ -11111,45 +11147,45 @@ var sr = (e) => {
|
|
|
11111
11147
|
id: e.place_id ?? n,
|
|
11112
11148
|
label: n,
|
|
11113
11149
|
address: e.formatted_address,
|
|
11114
|
-
location:
|
|
11150
|
+
location: Jc(t),
|
|
11115
11151
|
provider: "google",
|
|
11116
11152
|
raw: e
|
|
11117
11153
|
};
|
|
11118
|
-
},
|
|
11154
|
+
}, Xc = (e) => ({
|
|
11119
11155
|
id: "google",
|
|
11120
11156
|
capabilities: { geocoding: "full" },
|
|
11121
11157
|
async geocode(t) {
|
|
11122
|
-
let n = (await
|
|
11158
|
+
let n = (await Mc(e)).maps?.Geocoder;
|
|
11123
11159
|
return n ? new Promise((e) => {
|
|
11124
11160
|
new n().geocode({ address: t }, (t) => {
|
|
11125
|
-
e((t ?? []).map((e) =>
|
|
11161
|
+
e((t ?? []).map((e) => Yc(e)).filter((e) => !!e));
|
|
11126
11162
|
});
|
|
11127
11163
|
}) : [];
|
|
11128
11164
|
},
|
|
11129
11165
|
async reverseGeocode(t) {
|
|
11130
|
-
let n = (await
|
|
11166
|
+
let n = (await Mc(e)).maps?.Geocoder;
|
|
11131
11167
|
return n ? new Promise((e) => {
|
|
11132
11168
|
new n().geocode({ location: t }, (t) => {
|
|
11133
|
-
e(
|
|
11169
|
+
e(Yc(t?.[0] ?? {}));
|
|
11134
11170
|
});
|
|
11135
11171
|
}) : null;
|
|
11136
11172
|
}
|
|
11137
|
-
}),
|
|
11173
|
+
}), Zc = (e) => e.toFixed(6), Qc = (e, t, n) => Math.min(Math.max(e, t), n), $c = (e) => Qc(e, -90, 90), el = (e) => Qc(e, -180, 180), tl = (e, t = 0) => {
|
|
11138
11174
|
if (typeof e == "number") return Number.isFinite(e) ? e : t;
|
|
11139
11175
|
let n = Number.parseFloat(e.trim().replace(",", "."));
|
|
11140
11176
|
return Number.isFinite(n) ? n : t;
|
|
11141
|
-
},
|
|
11177
|
+
}, nl = (e) => `${Zc(e.lat)}, ${Zc(e.lng)}`, rl = (e, t) => {
|
|
11142
11178
|
if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
|
|
11143
|
-
let n =
|
|
11179
|
+
let n = tl(e.lat, t.lat), r = tl(e.lng, t.lng);
|
|
11144
11180
|
return {
|
|
11145
|
-
lat:
|
|
11146
|
-
lng:
|
|
11181
|
+
lat: $c(n),
|
|
11182
|
+
lng: el(r)
|
|
11147
11183
|
};
|
|
11148
|
-
},
|
|
11184
|
+
}, il = (e, t = "Ubicación") => ({
|
|
11149
11185
|
id: `${e.lat}:${e.lng}`,
|
|
11150
11186
|
position: e,
|
|
11151
11187
|
label: t
|
|
11152
|
-
}),
|
|
11188
|
+
}), al = () => ({
|
|
11153
11189
|
id: "nominatim",
|
|
11154
11190
|
capabilities: { geocoding: "basic" },
|
|
11155
11191
|
async geocode(e) {
|
|
@@ -11173,13 +11209,13 @@ var sr = (e) => {
|
|
|
11173
11209
|
provider: "nominatim"
|
|
11174
11210
|
};
|
|
11175
11211
|
}
|
|
11176
|
-
}),
|
|
11212
|
+
}), ol = (e) => ({
|
|
11177
11213
|
id: e.id,
|
|
11178
11214
|
capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
|
|
11179
11215
|
searchPlaces(t) {
|
|
11180
11216
|
return e.geocode(t);
|
|
11181
11217
|
}
|
|
11182
|
-
}),
|
|
11218
|
+
}), sl = () => ({
|
|
11183
11219
|
id: "basic",
|
|
11184
11220
|
capabilities: {
|
|
11185
11221
|
routing: "basic",
|
|
@@ -11197,31 +11233,31 @@ var sr = (e) => {
|
|
|
11197
11233
|
]
|
|
11198
11234
|
};
|
|
11199
11235
|
}
|
|
11200
|
-
}),
|
|
11236
|
+
}), cl = i({}), ll = (e) => {
|
|
11201
11237
|
let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
|
|
11202
|
-
return t === "google" && n ?
|
|
11203
|
-
},
|
|
11204
|
-
let t = e.defaultEngine === "google" ?
|
|
11238
|
+
return t === "google" && n ? Xc(n) : al();
|
|
11239
|
+
}, ul = (e) => {
|
|
11240
|
+
let t = e.defaultEngine === "google" ? Rc(e.engines.google) : Uc(e.engines.leaflet), n = ll(e);
|
|
11205
11241
|
return {
|
|
11206
11242
|
config: e,
|
|
11207
11243
|
engine: t,
|
|
11208
11244
|
geocodingService: n,
|
|
11209
|
-
placesService:
|
|
11210
|
-
routingService:
|
|
11211
|
-
distanceService:
|
|
11245
|
+
placesService: ol(n),
|
|
11246
|
+
routingService: sl(),
|
|
11247
|
+
distanceService: qc()
|
|
11212
11248
|
};
|
|
11213
|
-
},
|
|
11214
|
-
let n = p(() => ({ maps: e ?
|
|
11215
|
-
return /* @__PURE__ */ v(
|
|
11249
|
+
}, dl = ({ maps: e, children: t }) => {
|
|
11250
|
+
let n = p(() => ({ maps: e ? ul(e) : void 0 }), [e]);
|
|
11251
|
+
return /* @__PURE__ */ v(cl.Provider, {
|
|
11216
11252
|
value: n,
|
|
11217
11253
|
children: t
|
|
11218
11254
|
});
|
|
11219
|
-
},
|
|
11220
|
-
let e =
|
|
11221
|
-
if (!e.maps) throw Error(
|
|
11255
|
+
}, fl = () => c(cl), pl = () => {
|
|
11256
|
+
let e = fl();
|
|
11257
|
+
if (!e.maps) throw Error(Cc);
|
|
11222
11258
|
return e.maps;
|
|
11223
|
-
},
|
|
11224
|
-
let e =
|
|
11259
|
+
}, ml = () => {
|
|
11260
|
+
let e = pl(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
|
|
11225
11261
|
return {
|
|
11226
11262
|
loading: t,
|
|
11227
11263
|
results: r,
|
|
@@ -11245,18 +11281,18 @@ var sr = (e) => {
|
|
|
11245
11281
|
}
|
|
11246
11282
|
}, [e.geocodingService])
|
|
11247
11283
|
};
|
|
11248
|
-
},
|
|
11249
|
-
let e =
|
|
11284
|
+
}, hl = () => {
|
|
11285
|
+
let e = pl();
|
|
11250
11286
|
return p(() => ({
|
|
11251
11287
|
id: e.engine.id,
|
|
11252
11288
|
capabilities: e.engine.capabilities,
|
|
11253
11289
|
renderer: e.engine.createRenderer()
|
|
11254
11290
|
}), [e.engine]);
|
|
11255
|
-
},
|
|
11291
|
+
}, gl = () => pl().config, _l = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", vl = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Buscar dirección", readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11256
11292
|
let d = b({
|
|
11257
11293
|
name: t,
|
|
11258
11294
|
control: e.control
|
|
11259
|
-
}), { loading: f, results: p, error: m, search: g } =
|
|
11295
|
+
}), { loading: f, results: p, error: m, search: g } = ml(), [_, x] = h(() => _l(d.field.value)), S = String(t), C = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, w = o || s, T = (e) => {
|
|
11260
11296
|
d.field.onChange(e), l?.(e);
|
|
11261
11297
|
};
|
|
11262
11298
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11323,9 +11359,9 @@ var sr = (e) => {
|
|
|
11323
11359
|
]
|
|
11324
11360
|
})
|
|
11325
11361
|
});
|
|
11326
|
-
},
|
|
11327
|
-
let g =
|
|
11328
|
-
return /* @__PURE__ */ v(
|
|
11362
|
+
}, yl = ({ title: e, description: t, center: n = wc, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], height: s = 360, className: c, readOnly: l, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11363
|
+
let g = hl();
|
|
11364
|
+
return /* @__PURE__ */ v(xc, {
|
|
11329
11365
|
title: e,
|
|
11330
11366
|
description: t,
|
|
11331
11367
|
className: c,
|
|
@@ -11344,16 +11380,16 @@ var sr = (e) => {
|
|
|
11344
11380
|
onMarkerDragEnd: h
|
|
11345
11381
|
})
|
|
11346
11382
|
});
|
|
11347
|
-
},
|
|
11383
|
+
}, bl = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11348
11384
|
let [d, f] = h(!1), [p, m] = h(null), g = b({
|
|
11349
11385
|
name: t,
|
|
11350
11386
|
control: e.control
|
|
11351
|
-
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C =
|
|
11387
|
+
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = rl(g.field.value, wc), w = (e) => {
|
|
11352
11388
|
g.field.onChange(e), l?.(e);
|
|
11353
11389
|
}, T = (e, t) => {
|
|
11354
11390
|
w({
|
|
11355
11391
|
...C,
|
|
11356
|
-
[e]:
|
|
11392
|
+
[e]: tl(t, C[e])
|
|
11357
11393
|
});
|
|
11358
11394
|
};
|
|
11359
11395
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11376,7 +11412,7 @@ var sr = (e) => {
|
|
|
11376
11412
|
id: `${_}-lat`,
|
|
11377
11413
|
type: "text",
|
|
11378
11414
|
inputMode: "decimal",
|
|
11379
|
-
value:
|
|
11415
|
+
value: Zc(C.lat),
|
|
11380
11416
|
readOnly: S,
|
|
11381
11417
|
disabled: s,
|
|
11382
11418
|
"aria-invalid": !!x || void 0,
|
|
@@ -11396,7 +11432,7 @@ var sr = (e) => {
|
|
|
11396
11432
|
id: `${_}-lng`,
|
|
11397
11433
|
type: "text",
|
|
11398
11434
|
inputMode: "decimal",
|
|
11399
|
-
value:
|
|
11435
|
+
value: Zc(C.lng),
|
|
11400
11436
|
readOnly: S,
|
|
11401
11437
|
disabled: s,
|
|
11402
11438
|
"aria-invalid": !!x || void 0,
|
|
@@ -11415,8 +11451,8 @@ var sr = (e) => {
|
|
|
11415
11451
|
onClick: () => {
|
|
11416
11452
|
!navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
|
|
11417
11453
|
w({
|
|
11418
|
-
lat: Number(
|
|
11419
|
-
lng: Number(
|
|
11454
|
+
lat: Number(Zc(e.coords.latitude)),
|
|
11455
|
+
lng: Number(Zc(e.coords.longitude))
|
|
11420
11456
|
}), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
|
|
11421
11457
|
}, () => {
|
|
11422
11458
|
m("No se pudo obtener la ubicación. Marca el punto en el mapa."), f(!1);
|
|
@@ -11436,7 +11472,7 @@ var sr = (e) => {
|
|
|
11436
11472
|
role: "status",
|
|
11437
11473
|
children: p
|
|
11438
11474
|
}),
|
|
11439
|
-
/* @__PURE__ */ v(
|
|
11475
|
+
/* @__PURE__ */ v(yl, {
|
|
11440
11476
|
center: C,
|
|
11441
11477
|
zoom: a,
|
|
11442
11478
|
height: 220,
|
|
@@ -11448,8 +11484,8 @@ var sr = (e) => {
|
|
|
11448
11484
|
}],
|
|
11449
11485
|
onClick: (e) => {
|
|
11450
11486
|
w({
|
|
11451
|
-
lat: Number(
|
|
11452
|
-
lng: Number(
|
|
11487
|
+
lat: Number(Zc(e.location.lat)),
|
|
11488
|
+
lng: Number(Zc(e.location.lng))
|
|
11453
11489
|
}), g.field.onBlur();
|
|
11454
11490
|
}
|
|
11455
11491
|
}),
|
|
@@ -11460,19 +11496,19 @@ var sr = (e) => {
|
|
|
11460
11496
|
]
|
|
11461
11497
|
})
|
|
11462
11498
|
});
|
|
11463
|
-
},
|
|
11499
|
+
}, xl = (e) => /* @__PURE__ */ v(bl, { ...e }), Sl = (e) => Array.isArray(e) ? e.map((e) => rl(e, wc)) : [], Cl = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, wl = "var(--sf-map-area-stroke)", Tl = "var(--sf-map-area-fill)", El = "var(--sf-map-route-stroke)", Dl = ({ form: e, name: t, mode: n, label: r, info: i, required: a = !0, zoom: o = 13, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
11464
11500
|
let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
|
|
11465
11501
|
name: t,
|
|
11466
11502
|
control: e.control,
|
|
11467
11503
|
rules: { validate: (e) => {
|
|
11468
|
-
let t =
|
|
11504
|
+
let t = Sl(e).length;
|
|
11469
11505
|
return t === 0 && !a ? !0 : t < f ? p : !0;
|
|
11470
11506
|
} }
|
|
11471
|
-
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x =
|
|
11507
|
+
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = Sl(m.field.value), S = x.at(-1) ?? wc, C = {
|
|
11472
11508
|
id: `${h}-${n}`,
|
|
11473
11509
|
points: x,
|
|
11474
|
-
color: n === "area" ?
|
|
11475
|
-
fillColor: n === "area" ?
|
|
11510
|
+
color: n === "area" ? wl : El,
|
|
11511
|
+
fillColor: n === "area" ? Tl : void 0
|
|
11476
11512
|
}, w = (e) => {
|
|
11477
11513
|
m.field.onChange(e), u?.(e);
|
|
11478
11514
|
}, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
|
|
@@ -11505,7 +11541,7 @@ var sr = (e) => {
|
|
|
11505
11541
|
children: "Limpiar"
|
|
11506
11542
|
})]
|
|
11507
11543
|
}),
|
|
11508
|
-
/* @__PURE__ */ v(
|
|
11544
|
+
/* @__PURE__ */ v(yl, {
|
|
11509
11545
|
center: S,
|
|
11510
11546
|
zoom: o,
|
|
11511
11547
|
height: 260,
|
|
@@ -11514,7 +11550,7 @@ var sr = (e) => {
|
|
|
11514
11550
|
id: `${h}-point-${t}`,
|
|
11515
11551
|
position: e,
|
|
11516
11552
|
label: String(t + 1),
|
|
11517
|
-
color: n === "area" ?
|
|
11553
|
+
color: n === "area" ? wl : El,
|
|
11518
11554
|
options: { draggable: !_ }
|
|
11519
11555
|
})),
|
|
11520
11556
|
areas: n === "area" && x.length >= 3 ? [C] : [],
|
|
@@ -11537,7 +11573,7 @@ var sr = (e) => {
|
|
|
11537
11573
|
className: "sf-map-hint",
|
|
11538
11574
|
"aria-live": "polite",
|
|
11539
11575
|
children: [
|
|
11540
|
-
|
|
11576
|
+
Cl(x),
|
|
11541
11577
|
" · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
|
|
11542
11578
|
" ",
|
|
11543
11579
|
/* @__PURE__ */ v("span", {
|
|
@@ -11549,38 +11585,38 @@ var sr = (e) => {
|
|
|
11549
11585
|
]
|
|
11550
11586
|
})
|
|
11551
11587
|
});
|
|
11552
|
-
},
|
|
11588
|
+
}, Ol = (e) => /* @__PURE__ */ v(Dl, {
|
|
11553
11589
|
...e,
|
|
11554
11590
|
mode: "area"
|
|
11555
|
-
}),
|
|
11591
|
+
}), kl = (e) => /* @__PURE__ */ v(Dl, {
|
|
11556
11592
|
...e,
|
|
11557
11593
|
mode: "route"
|
|
11558
|
-
}),
|
|
11594
|
+
}), Al = (e) => {
|
|
11559
11595
|
switch (e.kind) {
|
|
11560
|
-
case "coordinates": return /* @__PURE__ */ v(
|
|
11561
|
-
case "location": return /* @__PURE__ */ v(
|
|
11562
|
-
case "address": return /* @__PURE__ */ v(
|
|
11563
|
-
case "area": return /* @__PURE__ */ v(
|
|
11564
|
-
case "route": return /* @__PURE__ */ v(
|
|
11596
|
+
case "coordinates": return /* @__PURE__ */ v(xl, { ...e });
|
|
11597
|
+
case "location": return /* @__PURE__ */ v(bl, { ...e });
|
|
11598
|
+
case "address": return /* @__PURE__ */ v(vl, { ...e });
|
|
11599
|
+
case "area": return /* @__PURE__ */ v(Ol, { ...e });
|
|
11600
|
+
case "route": return /* @__PURE__ */ v(kl, { ...e });
|
|
11565
11601
|
default: return null;
|
|
11566
11602
|
}
|
|
11567
|
-
},
|
|
11603
|
+
}, jl = /^#[0-9a-fA-F]{6}$/, Ml = "#".padEnd(7, "0"), Nl = () => {
|
|
11568
11604
|
if (typeof document > "u") return "";
|
|
11569
11605
|
let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
|
|
11570
|
-
return
|
|
11571
|
-
},
|
|
11606
|
+
return jl.test(e) ? e.toLowerCase() : "";
|
|
11607
|
+
}, Pl = (e, t, n) => Math.min(n, Math.max(t, e)), Fl = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), Il = () => [], Ll = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], Rl = () => [], zl = (e) => Array.isArray(e) ? e.map((e) => {
|
|
11572
11608
|
if (typeof e != "object" || !e) return null;
|
|
11573
11609
|
let t = e;
|
|
11574
11610
|
return {
|
|
11575
11611
|
key: String(t.key ?? ""),
|
|
11576
11612
|
value: String(t.value ?? "")
|
|
11577
11613
|
};
|
|
11578
|
-
}).filter((e) => e != null) : [],
|
|
11614
|
+
}).filter((e) => e != null) : [], Bl = (e = 0, t = 100) => ({
|
|
11579
11615
|
start: e,
|
|
11580
11616
|
end: t
|
|
11581
|
-
}),
|
|
11617
|
+
}), Vl = (e, t = 0, n = 100) => {
|
|
11582
11618
|
if (e && typeof e == "object" && "start" in e && "end" in e) {
|
|
11583
|
-
let r = e, i =
|
|
11619
|
+
let r = e, i = Pl(Number(r.start), t, n), a = Pl(Number(r.end), t, n);
|
|
11584
11620
|
return i <= a ? {
|
|
11585
11621
|
start: i,
|
|
11586
11622
|
end: a
|
|
@@ -11589,15 +11625,15 @@ var sr = (e) => {
|
|
|
11589
11625
|
end: i
|
|
11590
11626
|
};
|
|
11591
11627
|
}
|
|
11592
|
-
return
|
|
11593
|
-
},
|
|
11594
|
-
let n =
|
|
11595
|
-
return
|
|
11596
|
-
},
|
|
11628
|
+
return Bl(t, n);
|
|
11629
|
+
}, Hl = (e, t) => {
|
|
11630
|
+
let n = Nl(), r = String(t ?? (n || Ml)).trim(), i = jl.test(r) ? r.toLowerCase() : Ml, a = String(e ?? i).trim();
|
|
11631
|
+
return jl.test(a) ? a.toLowerCase() : i;
|
|
11632
|
+
}, Ul = (e, t, n) => n <= t ? 0 : Math.round((Pl(e, t, n) - t) / (n - t) * 100), Wl = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Gl = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
11597
11633
|
let h = b({
|
|
11598
11634
|
name: t,
|
|
11599
11635
|
control: e.control
|
|
11600
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
11636
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = Pl(Number(h.field.value ?? a), a, o), C = (e) => {
|
|
11601
11637
|
h.field.onChange(e), p?.(e);
|
|
11602
11638
|
};
|
|
11603
11639
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11621,17 +11657,17 @@ var sr = (e) => {
|
|
|
11621
11657
|
"aria-invalid": !!_ || void 0,
|
|
11622
11658
|
onBlur: () => h.field.onBlur(),
|
|
11623
11659
|
onChange: (e) => C(Number(e.target.value)),
|
|
11624
|
-
className:
|
|
11660
|
+
className: Wl(x)
|
|
11625
11661
|
}), /* @__PURE__ */ v("span", {
|
|
11626
11662
|
className: "sf-slider__value",
|
|
11627
|
-
children:
|
|
11663
|
+
children: Fl(S, {
|
|
11628
11664
|
suffix: c,
|
|
11629
11665
|
formatValue: f
|
|
11630
11666
|
})
|
|
11631
11667
|
})]
|
|
11632
11668
|
})
|
|
11633
11669
|
});
|
|
11634
|
-
},
|
|
11670
|
+
}, Kl = {
|
|
11635
11671
|
slate: {
|
|
11636
11672
|
wrap: "border-slate-300 bg-white",
|
|
11637
11673
|
button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
|
|
@@ -11652,7 +11688,7 @@ var sr = (e) => {
|
|
|
11652
11688
|
button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
|
|
11653
11689
|
value: "text-blue-700"
|
|
11654
11690
|
}
|
|
11655
|
-
},
|
|
11691
|
+
}, ql = {
|
|
11656
11692
|
sm: {
|
|
11657
11693
|
button: "h-6 w-6",
|
|
11658
11694
|
icon: "h-3 w-3",
|
|
@@ -11663,13 +11699,13 @@ var sr = (e) => {
|
|
|
11663
11699
|
icon: "h-3.5 w-3.5",
|
|
11664
11700
|
value: "min-w-[2.5rem] px-1.5 text-sm"
|
|
11665
11701
|
}
|
|
11666
|
-
},
|
|
11702
|
+
}, Jl = (e, t) => {
|
|
11667
11703
|
let n = (String(t).split(".")[1] ?? "").length;
|
|
11668
11704
|
return Number(e.toFixed(n));
|
|
11669
|
-
},
|
|
11670
|
-
let f =
|
|
11705
|
+
}, Yl = ({ value: e, onChange: t, min: n = 0, max: r = Infinity, step: i = 1, tone: a = "slate", size: o = "md", disabled: s = !1, readOnly: c = !1, ariaLabel: l, formatValue: u, className: d }) => {
|
|
11706
|
+
let f = Kl[a], p = ql[o], m = s || c, h = (a) => {
|
|
11671
11707
|
if (m) return;
|
|
11672
|
-
let o = Math.min(r, Math.max(n,
|
|
11708
|
+
let o = Math.min(r, Math.max(n, Jl(a, i)));
|
|
11673
11709
|
o !== e && t(o);
|
|
11674
11710
|
}, g = e <= n, _ = e >= r, b = u ? u(e) : String(e), x = (0, X.default)("flex items-center justify-center font-bold leading-none transition-colors disabled:cursor-not-allowed disabled:opacity-40", f.button, p.button);
|
|
11675
11711
|
return /* @__PURE__ */ y("div", {
|
|
@@ -11705,11 +11741,11 @@ var sr = (e) => {
|
|
|
11705
11741
|
})
|
|
11706
11742
|
]
|
|
11707
11743
|
});
|
|
11708
|
-
},
|
|
11744
|
+
}, Xl = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Zl = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
11709
11745
|
let h = b({
|
|
11710
11746
|
name: t,
|
|
11711
11747
|
control: e.control
|
|
11712
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
11748
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = Vl(h.field.value, a, o), C = (e) => {
|
|
11713
11749
|
h.field.onChange(e), p?.(e);
|
|
11714
11750
|
}, w = {
|
|
11715
11751
|
suffix: c,
|
|
@@ -11727,7 +11763,7 @@ var sr = (e) => {
|
|
|
11727
11763
|
children: [
|
|
11728
11764
|
/* @__PURE__ */ v("span", {
|
|
11729
11765
|
className: "sf-slider__value sf-slider__value--sm",
|
|
11730
|
-
children:
|
|
11766
|
+
children: Fl(S.start, w)
|
|
11731
11767
|
}),
|
|
11732
11768
|
/* @__PURE__ */ y("div", {
|
|
11733
11769
|
className: "grid flex-1 gap-2",
|
|
@@ -11749,7 +11785,7 @@ var sr = (e) => {
|
|
|
11749
11785
|
end: Math.max(t, S.end)
|
|
11750
11786
|
});
|
|
11751
11787
|
},
|
|
11752
|
-
className:
|
|
11788
|
+
className: Xl(x)
|
|
11753
11789
|
}), /* @__PURE__ */ v("input", {
|
|
11754
11790
|
id: `${g}-end`,
|
|
11755
11791
|
type: "range",
|
|
@@ -11768,21 +11804,21 @@ var sr = (e) => {
|
|
|
11768
11804
|
end: t
|
|
11769
11805
|
});
|
|
11770
11806
|
},
|
|
11771
|
-
className:
|
|
11807
|
+
className: Xl(x)
|
|
11772
11808
|
})]
|
|
11773
11809
|
}),
|
|
11774
11810
|
/* @__PURE__ */ v("span", {
|
|
11775
11811
|
className: "sf-slider__value sf-slider__value--sm",
|
|
11776
|
-
children:
|
|
11812
|
+
children: Fl(S.end, w)
|
|
11777
11813
|
})
|
|
11778
11814
|
]
|
|
11779
11815
|
})
|
|
11780
11816
|
});
|
|
11781
|
-
},
|
|
11817
|
+
}, Ql = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
|
|
11782
11818
|
let d = b({
|
|
11783
11819
|
name: t,
|
|
11784
11820
|
control: e.control
|
|
11785
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m =
|
|
11821
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = Pl(Number(d.field.value ?? a), a, o), h = Ul(m, a, o);
|
|
11786
11822
|
return /* @__PURE__ */ v(Z, {
|
|
11787
11823
|
id: f,
|
|
11788
11824
|
label: n,
|
|
@@ -11805,21 +11841,21 @@ var sr = (e) => {
|
|
|
11805
11841
|
})
|
|
11806
11842
|
}), /* @__PURE__ */ v("span", {
|
|
11807
11843
|
className: "sf-progress-bar__value",
|
|
11808
|
-
children:
|
|
11844
|
+
children: Fl(m, {
|
|
11809
11845
|
suffix: s,
|
|
11810
11846
|
formatValue: l
|
|
11811
11847
|
})
|
|
11812
11848
|
})]
|
|
11813
11849
|
})
|
|
11814
11850
|
});
|
|
11815
|
-
},
|
|
11851
|
+
}, $l = {
|
|
11816
11852
|
default: "sf-progress-bar-readonly__fill--default",
|
|
11817
11853
|
success: "sf-progress-bar-readonly__fill--success",
|
|
11818
11854
|
warning: "sf-progress-bar-readonly__fill--warning",
|
|
11819
11855
|
danger: "sf-progress-bar-readonly__fill--danger",
|
|
11820
11856
|
info: "sf-progress-bar-readonly__fill--info"
|
|
11821
|
-
},
|
|
11822
|
-
let u =
|
|
11857
|
+
}, eu = ({ value: e, min: t = 0, max: n = 100, label: r, showValue: i = !0, suffix: a, formatValue: o, tone: s = "default", size: c = "md", className: l }) => {
|
|
11858
|
+
let u = Pl(e, t, n), d = Ul(u, t, n), f = Fl(u, {
|
|
11823
11859
|
suffix: a,
|
|
11824
11860
|
formatValue: o
|
|
11825
11861
|
});
|
|
@@ -11833,7 +11869,7 @@ var sr = (e) => {
|
|
|
11833
11869
|
/* @__PURE__ */ v("div", {
|
|
11834
11870
|
className: "sf-progress-bar-readonly__track",
|
|
11835
11871
|
children: /* @__PURE__ */ v("div", {
|
|
11836
|
-
className: (0, X.default)("sf-progress-bar-readonly__fill",
|
|
11872
|
+
className: (0, X.default)("sf-progress-bar-readonly__fill", $l[s]),
|
|
11837
11873
|
style: { width: `${d}%` },
|
|
11838
11874
|
role: "progressbar",
|
|
11839
11875
|
"aria-label": r ?? "Progreso",
|
|
@@ -11848,11 +11884,11 @@ var sr = (e) => {
|
|
|
11848
11884
|
})
|
|
11849
11885
|
]
|
|
11850
11886
|
});
|
|
11851
|
-
},
|
|
11887
|
+
}, tu = ({ form: e, name: t, label: n, info: r, required: i, stars: a = 5, readOnly: o, disabled: s, small: c, className: l, onChange: u, onRefresh: d }) => {
|
|
11852
11888
|
let [f, p] = h(0), m = b({
|
|
11853
11889
|
name: t,
|
|
11854
11890
|
control: e.control
|
|
11855
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x =
|
|
11891
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = nu(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
|
|
11856
11892
|
m.field.onChange(e), u?.(e), m.field.onBlur();
|
|
11857
11893
|
}, w = (e, t) => {
|
|
11858
11894
|
if (y) return;
|
|
@@ -11892,12 +11928,12 @@ var sr = (e) => {
|
|
|
11892
11928
|
}, e))
|
|
11893
11929
|
})
|
|
11894
11930
|
});
|
|
11895
|
-
},
|
|
11931
|
+
}, nu = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), ru = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11896
11932
|
let d = b({
|
|
11897
11933
|
name: t,
|
|
11898
11934
|
control: e.control
|
|
11899
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
11900
|
-
let t =
|
|
11935
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Hl(d.field.value), g = (e) => {
|
|
11936
|
+
let t = Hl(e, h);
|
|
11901
11937
|
d.field.onChange(t), l?.(t);
|
|
11902
11938
|
};
|
|
11903
11939
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11940,11 +11976,11 @@ var sr = (e) => {
|
|
|
11940
11976
|
})]
|
|
11941
11977
|
})
|
|
11942
11978
|
});
|
|
11943
|
-
},
|
|
11979
|
+
}, iu = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Escribe y presiona Enter", maxItems: o, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
11944
11980
|
let [f, p] = h(""), m = b({
|
|
11945
11981
|
name: t,
|
|
11946
11982
|
control: e.control
|
|
11947
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S =
|
|
11983
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = Ll(m.field.value), C = o != null && S.length >= o, w = (e) => {
|
|
11948
11984
|
m.field.onChange(e), u?.(e);
|
|
11949
11985
|
}, T = () => {
|
|
11950
11986
|
let e = f.trim();
|
|
@@ -11996,11 +12032,11 @@ var sr = (e) => {
|
|
|
11996
12032
|
})]
|
|
11997
12033
|
})
|
|
11998
12034
|
});
|
|
11999
|
-
},
|
|
12035
|
+
}, au = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12000
12036
|
let d = b({
|
|
12001
12037
|
name: t,
|
|
12002
12038
|
control: e.control
|
|
12003
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
12039
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = zl(d.field.value), g = (e) => {
|
|
12004
12040
|
d.field.onChange(e), l?.(e);
|
|
12005
12041
|
}, _ = (e, t, n) => {
|
|
12006
12042
|
g(h.map((r, i) => i === e ? {
|
|
@@ -12085,7 +12121,7 @@ var sr = (e) => {
|
|
|
12085
12121
|
})]
|
|
12086
12122
|
})
|
|
12087
12123
|
});
|
|
12088
|
-
},
|
|
12124
|
+
}, ou = ({ items: e, onReorder: t, className: n }) => {
|
|
12089
12125
|
let [r, i] = h(null), a = (n) => (a) => {
|
|
12090
12126
|
if (a.preventDefault(), !r) return;
|
|
12091
12127
|
let o = e.findIndex((e) => e.id === r);
|
|
@@ -12111,7 +12147,7 @@ var sr = (e) => {
|
|
|
12111
12147
|
})]
|
|
12112
12148
|
}, e.id))
|
|
12113
12149
|
});
|
|
12114
|
-
},
|
|
12150
|
+
}, su = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
|
|
12115
12151
|
className: (0, X.default)("sf-card-radio-group", i),
|
|
12116
12152
|
role: "radiogroup",
|
|
12117
12153
|
"aria-label": a,
|
|
@@ -12148,7 +12184,7 @@ var sr = (e) => {
|
|
|
12148
12184
|
]
|
|
12149
12185
|
}, n.value);
|
|
12150
12186
|
})
|
|
12151
|
-
}),
|
|
12187
|
+
}), cu = {
|
|
12152
12188
|
group: {
|
|
12153
12189
|
label: "Grupo / Entidad",
|
|
12154
12190
|
labelShort: "GRP",
|
|
@@ -12167,7 +12203,7 @@ var sr = (e) => {
|
|
|
12167
12203
|
rowClass: "sf-org-tree-row--role",
|
|
12168
12204
|
barClass: "sf-org-tree-bar--role"
|
|
12169
12205
|
}
|
|
12170
|
-
},
|
|
12206
|
+
}, lu = (e) => {
|
|
12171
12207
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
|
|
12172
12208
|
for (let n of e) {
|
|
12173
12209
|
let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
|
|
@@ -12194,16 +12230,16 @@ var sr = (e) => {
|
|
|
12194
12230
|
hasChildren: !1
|
|
12195
12231
|
});
|
|
12196
12232
|
return r;
|
|
12197
|
-
},
|
|
12233
|
+
}, uu = (e, t = cu) => t[e] ?? cu[e] ?? null, du = (e) => e.length, fu = (e) => {
|
|
12198
12234
|
let t = new Set(e.map((e) => e.id));
|
|
12199
12235
|
return e.filter((e) => {
|
|
12200
12236
|
let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12201
12237
|
return n == null || !t.has(n);
|
|
12202
12238
|
});
|
|
12203
|
-
},
|
|
12239
|
+
}, pu = ({ type: e, className: t }) => v(e === "group" ? ut : e === "role" ? Ve : q, {
|
|
12204
12240
|
className: t,
|
|
12205
12241
|
"aria-hidden": "true"
|
|
12206
|
-
}),
|
|
12242
|
+
}), mu = ({ nodes: e, title: t = "Estructura", subtitle: n, loading: r = !1, error: i = null, onRefresh: a, canEdit: o = !1, onAddNode: c, onEditNode: l, onDeleteNode: d, showLegend: f = !1, themes: g = cu, onRenderNode: _, maxHeight: b = 480, className: x }) => {
|
|
12207
12243
|
let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
|
|
12208
12244
|
visible: !1,
|
|
12209
12245
|
x: 0,
|
|
@@ -12226,7 +12262,7 @@ var sr = (e) => {
|
|
|
12226
12262
|
window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
|
|
12227
12263
|
};
|
|
12228
12264
|
}, [w.visible]);
|
|
12229
|
-
let D = p(() =>
|
|
12265
|
+
let D = p(() => lu(e), [e]), O = s((e) => {
|
|
12230
12266
|
let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12231
12267
|
for (; t != null;) {
|
|
12232
12268
|
if (S.has(t)) return !0;
|
|
@@ -12313,7 +12349,7 @@ var sr = (e) => {
|
|
|
12313
12349
|
className: "sf-org-tree__empty",
|
|
12314
12350
|
children: "Sin nodos"
|
|
12315
12351
|
}), k.map((e) => {
|
|
12316
|
-
let t =
|
|
12352
|
+
let t = uu(e.type, g);
|
|
12317
12353
|
return /* @__PURE__ */ v("li", {
|
|
12318
12354
|
role: "treeitem",
|
|
12319
12355
|
"aria-level": e.depth + 1,
|
|
@@ -12333,7 +12369,7 @@ var sr = (e) => {
|
|
|
12333
12369
|
tabIndex: e.hasChildren ? 0 : -1,
|
|
12334
12370
|
children: S.has(e.id) ? /* @__PURE__ */ v(it, { className: "h-4 w-4" }) : /* @__PURE__ */ v(ot, { className: "h-4 w-4" })
|
|
12335
12371
|
}),
|
|
12336
|
-
/* @__PURE__ */ v(
|
|
12372
|
+
/* @__PURE__ */ v(pu, {
|
|
12337
12373
|
type: e.type,
|
|
12338
12374
|
className: "h-4 w-4 shrink-0 opacity-70"
|
|
12339
12375
|
}),
|
|
@@ -12418,7 +12454,7 @@ var sr = (e) => {
|
|
|
12418
12454
|
})
|
|
12419
12455
|
]
|
|
12420
12456
|
});
|
|
12421
|
-
},
|
|
12457
|
+
}, hu = {
|
|
12422
12458
|
street: {
|
|
12423
12459
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
12424
12460
|
attribution: "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
|
|
@@ -12427,27 +12463,27 @@ var sr = (e) => {
|
|
|
12427
12463
|
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
12428
12464
|
attribution: "Tiles © Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
|
|
12429
12465
|
}
|
|
12430
|
-
},
|
|
12466
|
+
}, gu = {
|
|
12431
12467
|
default: "Nodo",
|
|
12432
12468
|
nap: "NAP",
|
|
12433
12469
|
olt: "OLT",
|
|
12434
12470
|
splitter: "Splitter"
|
|
12435
|
-
},
|
|
12471
|
+
}, _u = {
|
|
12436
12472
|
default: "var(--sf-accent)",
|
|
12437
12473
|
nap: "var(--sf-network-kind-nap)",
|
|
12438
12474
|
olt: "var(--sf-network-kind-olt)",
|
|
12439
12475
|
splitter: "var(--sf-network-kind-splitter)"
|
|
12440
|
-
},
|
|
12476
|
+
}, vu = {
|
|
12441
12477
|
normal: "var(--sf-network-status-normal)",
|
|
12442
12478
|
warning: "var(--sf-network-status-warning)",
|
|
12443
12479
|
critical: "var(--sf-network-status-critical)",
|
|
12444
12480
|
maintenance: "var(--sf-network-status-maintenance)"
|
|
12445
|
-
},
|
|
12481
|
+
}, yu = {
|
|
12446
12482
|
normal: "Normal",
|
|
12447
12483
|
warning: "Advertencia",
|
|
12448
12484
|
critical: "Crítico",
|
|
12449
12485
|
maintenance: "Mantenimiento"
|
|
12450
|
-
},
|
|
12486
|
+
}, bu = {
|
|
12451
12487
|
backbone: {
|
|
12452
12488
|
color: "var(--sf-network-edge-backbone)",
|
|
12453
12489
|
weight: 2.5
|
|
@@ -12461,7 +12497,7 @@ var sr = (e) => {
|
|
|
12461
12497
|
weight: 1.5,
|
|
12462
12498
|
dashArray: "6 4"
|
|
12463
12499
|
}
|
|
12464
|
-
},
|
|
12500
|
+
}, xu = Nc, Su = (e) => {
|
|
12465
12501
|
if (!Array.isArray(e)) return [];
|
|
12466
12502
|
let t = [];
|
|
12467
12503
|
for (let n of e) {
|
|
@@ -12470,24 +12506,24 @@ var sr = (e) => {
|
|
|
12470
12506
|
if (!r) continue;
|
|
12471
12507
|
let i = Number(e.lat), a = Number(e.lng);
|
|
12472
12508
|
if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
|
|
12473
|
-
let o = String(e.status ?? "normal"), s = o in
|
|
12509
|
+
let o = String(e.status ?? "normal"), s = o in vu ? o : "normal", c = {
|
|
12474
12510
|
id: r,
|
|
12475
12511
|
label: String(e.label ?? ""),
|
|
12476
12512
|
lat: i,
|
|
12477
12513
|
lng: a,
|
|
12478
12514
|
status: s
|
|
12479
12515
|
}, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
|
|
12480
|
-
l in
|
|
12516
|
+
l in gu && (c.kind = l), e.value != null && Number.isFinite(Number(e.value)) && (c.value = Number(e.value)), e.icon != null && (c.icon = String(e.icon)), t.push(c);
|
|
12481
12517
|
}
|
|
12482
12518
|
return t;
|
|
12483
|
-
},
|
|
12519
|
+
}, Cu = (e) => {
|
|
12484
12520
|
if (!Array.isArray(e)) return [];
|
|
12485
12521
|
let t = [];
|
|
12486
12522
|
for (let n of e) {
|
|
12487
12523
|
if (typeof n != "object" || !n) continue;
|
|
12488
12524
|
let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
|
|
12489
12525
|
if (!r || !i) continue;
|
|
12490
|
-
let a = String(e.type ?? "backbone"), o = a in
|
|
12526
|
+
let a = String(e.type ?? "backbone"), o = a in bu ? a : "backbone";
|
|
12491
12527
|
t.push({
|
|
12492
12528
|
from: r,
|
|
12493
12529
|
to: i,
|
|
@@ -12495,7 +12531,7 @@ var sr = (e) => {
|
|
|
12495
12531
|
});
|
|
12496
12532
|
}
|
|
12497
12533
|
return t;
|
|
12498
|
-
},
|
|
12534
|
+
}, wu = (e) => {
|
|
12499
12535
|
let t = {
|
|
12500
12536
|
normal: 0,
|
|
12501
12537
|
warning: 0,
|
|
@@ -12504,18 +12540,18 @@ var sr = (e) => {
|
|
|
12504
12540
|
};
|
|
12505
12541
|
for (let n of e) t[n.status] += 1;
|
|
12506
12542
|
return t;
|
|
12507
|
-
},
|
|
12543
|
+
}, Tu = (e) => {
|
|
12508
12544
|
if (e.length === 0) return null;
|
|
12509
12545
|
let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
|
|
12510
12546
|
return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
|
|
12511
|
-
},
|
|
12547
|
+
}, Eu = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), Du = (e, t) => e.flatMap((e) => {
|
|
12512
12548
|
let n = t[e.from], r = t[e.to];
|
|
12513
12549
|
return !n || !r ? [] : [{
|
|
12514
12550
|
edge: e,
|
|
12515
12551
|
line: [n, r]
|
|
12516
12552
|
}];
|
|
12517
|
-
}),
|
|
12518
|
-
let i =
|
|
12553
|
+
}), Ou = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
|
|
12554
|
+
let i = wu(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
|
|
12519
12555
|
return /* @__PURE__ */ y("div", {
|
|
12520
12556
|
className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
|
|
12521
12557
|
role: "region",
|
|
@@ -12527,15 +12563,15 @@ var sr = (e) => {
|
|
|
12527
12563
|
}),
|
|
12528
12564
|
/* @__PURE__ */ v("ul", {
|
|
12529
12565
|
className: "space-y-1",
|
|
12530
|
-
children: Object.keys(
|
|
12566
|
+
children: Object.keys(yu).map((e) => /* @__PURE__ */ y("li", {
|
|
12531
12567
|
className: "sf-network-legend__item",
|
|
12532
12568
|
children: [/* @__PURE__ */ y("span", {
|
|
12533
12569
|
className: "flex items-center gap-2",
|
|
12534
12570
|
children: [/* @__PURE__ */ v("span", {
|
|
12535
12571
|
className: "inline-block h-2.5 w-2.5 rounded-full",
|
|
12536
|
-
style: { background:
|
|
12572
|
+
style: { background: vu[e] },
|
|
12537
12573
|
"aria-hidden": "true"
|
|
12538
|
-
}),
|
|
12574
|
+
}), yu[e]]
|
|
12539
12575
|
}), /* @__PURE__ */ v("span", {
|
|
12540
12576
|
className: "sf-network-legend__count",
|
|
12541
12577
|
children: i[e]
|
|
@@ -12548,7 +12584,7 @@ var sr = (e) => {
|
|
|
12548
12584
|
}), /* @__PURE__ */ v("ul", {
|
|
12549
12585
|
className: "space-y-1",
|
|
12550
12586
|
children: a.map((e) => {
|
|
12551
|
-
let t =
|
|
12587
|
+
let t = bu[e ?? "backbone"];
|
|
12552
12588
|
return /* @__PURE__ */ y("li", {
|
|
12553
12589
|
className: "sf-network-legend__item sf-network-legend__item--edge",
|
|
12554
12590
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -12568,19 +12604,19 @@ var sr = (e) => {
|
|
|
12568
12604
|
})
|
|
12569
12605
|
]
|
|
12570
12606
|
});
|
|
12571
|
-
},
|
|
12572
|
-
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ??
|
|
12607
|
+
}, ku = [-12.0464, -77.0428], Au = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), ju = (e, t) => {
|
|
12608
|
+
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? gu[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = Au(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
|
|
12573
12609
|
return ae.divIcon({
|
|
12574
12610
|
className: "sf-network-marker-root",
|
|
12575
12611
|
iconAnchor: [24, 42],
|
|
12576
12612
|
iconSize: [48, 48],
|
|
12577
12613
|
html: `<div class="sf-network-marker${o}">
|
|
12578
12614
|
<div class="sf-network-marker__label">${a}</div>
|
|
12579
|
-
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${
|
|
12615
|
+
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${Au(String(i))}</div>
|
|
12580
12616
|
</div>`
|
|
12581
12617
|
});
|
|
12582
|
-
},
|
|
12583
|
-
let t = re(), n =
|
|
12618
|
+
}, Mu = ({ nodes: e }) => {
|
|
12619
|
+
let t = re(), n = Tu(e);
|
|
12584
12620
|
return u(() => {
|
|
12585
12621
|
n && t.fitBounds(n, {
|
|
12586
12622
|
padding: [32, 32],
|
|
@@ -12591,8 +12627,8 @@ var sr = (e) => {
|
|
|
12591
12627
|
t,
|
|
12592
12628
|
e
|
|
12593
12629
|
]), null;
|
|
12594
|
-
},
|
|
12595
|
-
let g = co(), [_, b] = h("street"), x = l ?? _, S =
|
|
12630
|
+
}, Nu = ({ nodes: e, edges: t = [], center: n = ku, zoom: r = 12, height: i = 420, selectedNodeId: a, onNodeClick: o, showLegend: s = !0, fitBoundsToNodes: c = !0, basemap: l, onBasemapChange: u, showBasemapSwitcher: d = !1, ariaLabel: f = "Mapa de red", className: m }) => {
|
|
12631
|
+
let g = co(), [_, b] = h("street"), x = l ?? _, S = hu[x], C = p(() => Eu(e), [e]), w = p(() => Du(t, C), [t, C]), T = (e) => {
|
|
12596
12632
|
l === void 0 && b(e), u?.(e);
|
|
12597
12633
|
};
|
|
12598
12634
|
return /* @__PURE__ */ y("div", {
|
|
@@ -12611,13 +12647,13 @@ var sr = (e) => {
|
|
|
12611
12647
|
attribution: S.attribution,
|
|
12612
12648
|
url: S.url
|
|
12613
12649
|
}),
|
|
12614
|
-
c && e.length > 0 && /* @__PURE__ */ v(
|
|
12650
|
+
c && e.length > 0 && /* @__PURE__ */ v(Mu, { nodes: e }),
|
|
12615
12651
|
w.map(({ edge: e, line: t }) => {
|
|
12616
|
-
let n =
|
|
12652
|
+
let n = bu[e.type ?? "backbone"];
|
|
12617
12653
|
return /* @__PURE__ */ v(V, {
|
|
12618
12654
|
positions: t,
|
|
12619
12655
|
pathOptions: {
|
|
12620
|
-
color:
|
|
12656
|
+
color: xu(n.color),
|
|
12621
12657
|
weight: n.weight,
|
|
12622
12658
|
dashArray: n.dashArray
|
|
12623
12659
|
}
|
|
@@ -12625,7 +12661,7 @@ var sr = (e) => {
|
|
|
12625
12661
|
}),
|
|
12626
12662
|
e.map((e) => /* @__PURE__ */ v(ne, {
|
|
12627
12663
|
position: C[e.id],
|
|
12628
|
-
icon:
|
|
12664
|
+
icon: ju(e, e.id === a),
|
|
12629
12665
|
title: e.label,
|
|
12630
12666
|
alt: `${e.label}, estado ${e.status}`,
|
|
12631
12667
|
keyboard: !!o,
|
|
@@ -12649,17 +12685,17 @@ var sr = (e) => {
|
|
|
12649
12685
|
children: e === "street" ? "Mapa" : "Satélite"
|
|
12650
12686
|
}, e))
|
|
12651
12687
|
}),
|
|
12652
|
-
s && e.length > 0 && /* @__PURE__ */ v(
|
|
12688
|
+
s && e.length > 0 && /* @__PURE__ */ v(Ou, {
|
|
12653
12689
|
nodes: e,
|
|
12654
12690
|
edges: t
|
|
12655
12691
|
})
|
|
12656
12692
|
]
|
|
12657
12693
|
});
|
|
12658
|
-
},
|
|
12694
|
+
}, Pu = {
|
|
12659
12695
|
edit: "sf-audit-timeline__icon-wrap--edit",
|
|
12660
12696
|
sync: "sf-audit-timeline__icon-wrap--sync",
|
|
12661
12697
|
create: "sf-audit-timeline__icon-wrap--create"
|
|
12662
|
-
},
|
|
12698
|
+
}, Fu = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
|
|
12663
12699
|
let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
|
|
12664
12700
|
return /* @__PURE__ */ y("section", {
|
|
12665
12701
|
className: (0, X.default)("sf-audit-timeline", a),
|
|
@@ -12698,11 +12734,11 @@ var sr = (e) => {
|
|
|
12698
12734
|
/* @__PURE__ */ v("div", {
|
|
12699
12735
|
className: "sf-audit-timeline__marker",
|
|
12700
12736
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
12701
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
12737
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Pu[r]),
|
|
12702
12738
|
"aria-hidden": "true",
|
|
12703
12739
|
children: t.icon
|
|
12704
12740
|
}) : /* @__PURE__ */ v("span", {
|
|
12705
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
12741
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Pu[r]),
|
|
12706
12742
|
"aria-hidden": "true"
|
|
12707
12743
|
})
|
|
12708
12744
|
}),
|
|
@@ -12738,16 +12774,16 @@ var sr = (e) => {
|
|
|
12738
12774
|
})]
|
|
12739
12775
|
})]
|
|
12740
12776
|
});
|
|
12741
|
-
},
|
|
12777
|
+
}, Iu = {
|
|
12742
12778
|
info: "sf-record-list__icon--info",
|
|
12743
12779
|
warning: "sf-record-list__icon--warning",
|
|
12744
12780
|
success: "sf-record-list__icon--success",
|
|
12745
12781
|
neutral: "sf-record-list__icon--neutral"
|
|
12746
|
-
},
|
|
12782
|
+
}, Lu = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
|
|
12747
12783
|
className: (0, X.default)("sf-record-list__item", o),
|
|
12748
12784
|
children: [
|
|
12749
12785
|
e && /* @__PURE__ */ v("span", {
|
|
12750
|
-
className: (0, X.default)("sf-record-list__icon",
|
|
12786
|
+
className: (0, X.default)("sf-record-list__icon", Iu[t]),
|
|
12751
12787
|
"aria-hidden": "true",
|
|
12752
12788
|
children: e
|
|
12753
12789
|
}),
|
|
@@ -12772,7 +12808,7 @@ var sr = (e) => {
|
|
|
12772
12808
|
children: a
|
|
12773
12809
|
})
|
|
12774
12810
|
]
|
|
12775
|
-
}),
|
|
12811
|
+
}), Ru = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
|
|
12776
12812
|
className: (0, X.default)("sf-record-list", r),
|
|
12777
12813
|
"aria-label": i ?? (typeof e == "string" ? e : void 0),
|
|
12778
12814
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
@@ -12786,9 +12822,9 @@ var sr = (e) => {
|
|
|
12786
12822
|
})]
|
|
12787
12823
|
}), /* @__PURE__ */ v("div", {
|
|
12788
12824
|
className: "sf-record-list__items",
|
|
12789
|
-
children: n.map((e, t) => /* @__PURE__ */ v(
|
|
12825
|
+
children: n.map((e, t) => /* @__PURE__ */ v(Lu, { ...e }, e.id ?? t))
|
|
12790
12826
|
})]
|
|
12791
|
-
}),
|
|
12827
|
+
}), zu = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
|
|
12792
12828
|
className: (0, X.default)("sf-live-chip", n),
|
|
12793
12829
|
children: [/* @__PURE__ */ v("span", {
|
|
12794
12830
|
className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
|
|
@@ -12797,12 +12833,12 @@ var sr = (e) => {
|
|
|
12797
12833
|
className: "sf-live-chip__label",
|
|
12798
12834
|
children: e
|
|
12799
12835
|
})]
|
|
12800
|
-
}),
|
|
12836
|
+
}), Bu = {
|
|
12801
12837
|
default: "var(--sf-text, #1B2A38)",
|
|
12802
12838
|
success: "#1F8A4C",
|
|
12803
12839
|
warning: "#C76A12",
|
|
12804
12840
|
danger: "#C0392B"
|
|
12805
|
-
},
|
|
12841
|
+
}, Vu = {
|
|
12806
12842
|
display: "flex",
|
|
12807
12843
|
alignItems: "center",
|
|
12808
12844
|
justifyContent: "space-between",
|
|
@@ -12813,110 +12849,110 @@ var sr = (e) => {
|
|
|
12813
12849
|
border: "1px solid var(--sf-border, #E2E8EC)",
|
|
12814
12850
|
borderRadius: 13,
|
|
12815
12851
|
boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
|
|
12816
|
-
},
|
|
12852
|
+
}, Hu = {
|
|
12817
12853
|
display: "flex",
|
|
12818
12854
|
alignItems: "center",
|
|
12819
12855
|
gap: 14,
|
|
12820
12856
|
flexWrap: "wrap"
|
|
12821
|
-
},
|
|
12857
|
+
}, Uu = {
|
|
12822
12858
|
width: 1,
|
|
12823
12859
|
height: 20,
|
|
12824
12860
|
background: "var(--sf-border, #DCE3E7)"
|
|
12825
|
-
},
|
|
12861
|
+
}, Wu = {
|
|
12826
12862
|
fontSize: 13,
|
|
12827
12863
|
fontWeight: 600,
|
|
12828
12864
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
12829
|
-
},
|
|
12865
|
+
}, Gu = {
|
|
12830
12866
|
fontSize: 15,
|
|
12831
12867
|
fontWeight: 800,
|
|
12832
12868
|
color: "var(--sf-text, #1B2A38)",
|
|
12833
12869
|
fontVariantNumeric: "tabular-nums"
|
|
12834
|
-
},
|
|
12870
|
+
}, Ku = {
|
|
12835
12871
|
fontSize: 12.5,
|
|
12836
12872
|
fontWeight: 800,
|
|
12837
12873
|
color: "#C76A12"
|
|
12838
|
-
},
|
|
12874
|
+
}, qu = {
|
|
12839
12875
|
fontSize: 13,
|
|
12840
12876
|
fontWeight: 700,
|
|
12841
12877
|
color: "var(--sf-text-subtle, #5C7180)"
|
|
12842
|
-
},
|
|
12878
|
+
}, Ju = {
|
|
12843
12879
|
display: "flex",
|
|
12844
12880
|
alignItems: "center",
|
|
12845
12881
|
gap: 22,
|
|
12846
12882
|
margin: 0
|
|
12847
|
-
},
|
|
12883
|
+
}, Yu = {
|
|
12848
12884
|
display: "flex",
|
|
12849
12885
|
alignItems: "baseline",
|
|
12850
12886
|
gap: 6
|
|
12851
|
-
},
|
|
12887
|
+
}, Xu = {
|
|
12852
12888
|
fontSize: 10.5,
|
|
12853
12889
|
fontWeight: 700,
|
|
12854
12890
|
letterSpacing: ".05em",
|
|
12855
12891
|
textTransform: "uppercase",
|
|
12856
12892
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
12857
|
-
},
|
|
12893
|
+
}, Zu = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
|
|
12858
12894
|
className: (0, X.default)("sf-live-status-bar", r),
|
|
12859
12895
|
"aria-label": i,
|
|
12860
|
-
style:
|
|
12896
|
+
style: Vu,
|
|
12861
12897
|
children: [/* @__PURE__ */ y("div", {
|
|
12862
|
-
style:
|
|
12898
|
+
style: Hu,
|
|
12863
12899
|
children: [
|
|
12864
|
-
/* @__PURE__ */ v(
|
|
12900
|
+
/* @__PURE__ */ v(zu, { label: "En vivo" }),
|
|
12865
12901
|
/* @__PURE__ */ v("span", {
|
|
12866
|
-
style:
|
|
12902
|
+
style: qu,
|
|
12867
12903
|
children: e
|
|
12868
12904
|
}),
|
|
12869
12905
|
n && /* @__PURE__ */ y(_, { children: [
|
|
12870
12906
|
/* @__PURE__ */ v("span", {
|
|
12871
|
-
style:
|
|
12907
|
+
style: Uu,
|
|
12872
12908
|
"aria-hidden": "true"
|
|
12873
12909
|
}),
|
|
12874
12910
|
/* @__PURE__ */ v("span", {
|
|
12875
|
-
style:
|
|
12911
|
+
style: Wu,
|
|
12876
12912
|
children: n.label ?? "Próxima salida"
|
|
12877
12913
|
}),
|
|
12878
12914
|
/* @__PURE__ */ v("span", {
|
|
12879
|
-
style:
|
|
12915
|
+
style: Gu,
|
|
12880
12916
|
children: n.time
|
|
12881
12917
|
}),
|
|
12882
12918
|
n.countdown != null && /* @__PURE__ */ v("span", {
|
|
12883
|
-
style:
|
|
12919
|
+
style: Ku,
|
|
12884
12920
|
children: n.countdown
|
|
12885
12921
|
})
|
|
12886
12922
|
] })
|
|
12887
12923
|
]
|
|
12888
12924
|
}), /* @__PURE__ */ v("dl", {
|
|
12889
|
-
style:
|
|
12925
|
+
style: Ju,
|
|
12890
12926
|
children: t.map((e, t) => /* @__PURE__ */ y("div", {
|
|
12891
|
-
style:
|
|
12927
|
+
style: Yu,
|
|
12892
12928
|
children: [/* @__PURE__ */ v("dd", {
|
|
12893
12929
|
style: {
|
|
12894
12930
|
margin: 0,
|
|
12895
12931
|
fontSize: 20,
|
|
12896
12932
|
fontWeight: 800,
|
|
12897
12933
|
fontVariantNumeric: "tabular-nums",
|
|
12898
|
-
color:
|
|
12934
|
+
color: Bu[e.accent ?? "default"]
|
|
12899
12935
|
},
|
|
12900
12936
|
children: e.value
|
|
12901
12937
|
}), /* @__PURE__ */ v("dt", {
|
|
12902
|
-
style:
|
|
12938
|
+
style: Xu,
|
|
12903
12939
|
children: e.label
|
|
12904
12940
|
})]
|
|
12905
12941
|
}, e.id ?? `${e.label}-${t}`))
|
|
12906
12942
|
})]
|
|
12907
|
-
}),
|
|
12943
|
+
}), Qu = {
|
|
12908
12944
|
success: "sf-timeline__dot--success",
|
|
12909
12945
|
warning: "sf-timeline__dot--warning",
|
|
12910
12946
|
danger: "sf-timeline__dot--danger",
|
|
12911
12947
|
info: "sf-timeline__dot--info",
|
|
12912
12948
|
default: "sf-timeline__dot--default"
|
|
12913
|
-
},
|
|
12949
|
+
}, $u = {
|
|
12914
12950
|
success: "sf-timeline__icon-wrap--success",
|
|
12915
12951
|
warning: "sf-timeline__icon-wrap--warning",
|
|
12916
12952
|
danger: "sf-timeline__icon-wrap--danger",
|
|
12917
12953
|
info: "sf-timeline__icon-wrap--info",
|
|
12918
12954
|
default: "sf-timeline__icon-wrap--default"
|
|
12919
|
-
},
|
|
12955
|
+
}, ed = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
|
|
12920
12956
|
className: (0, X.default)("sf-timeline", r),
|
|
12921
12957
|
"aria-label": t,
|
|
12922
12958
|
children: [e.length === 0 && /* @__PURE__ */ v("li", {
|
|
@@ -12935,11 +12971,11 @@ var sr = (e) => {
|
|
|
12935
12971
|
/* @__PURE__ */ v("div", {
|
|
12936
12972
|
className: "sf-timeline__marker",
|
|
12937
12973
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
12938
|
-
className: (0, X.default)("sf-timeline__icon-wrap",
|
|
12974
|
+
className: (0, X.default)("sf-timeline__icon-wrap", $u[r]),
|
|
12939
12975
|
"aria-hidden": "true",
|
|
12940
12976
|
children: t.icon
|
|
12941
12977
|
}) : /* @__PURE__ */ v("span", {
|
|
12942
|
-
className: (0, X.default)("sf-timeline__dot",
|
|
12978
|
+
className: (0, X.default)("sf-timeline__dot", Qu[r]),
|
|
12943
12979
|
"aria-hidden": "true"
|
|
12944
12980
|
})
|
|
12945
12981
|
}),
|
|
@@ -12962,7 +12998,7 @@ var sr = (e) => {
|
|
|
12962
12998
|
]
|
|
12963
12999
|
}, t.id ?? n);
|
|
12964
13000
|
})]
|
|
12965
|
-
}),
|
|
13001
|
+
}), td = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
|
|
12966
13002
|
let o = m(null), [c, l] = h(0), d = s((t) => {
|
|
12967
13003
|
let n = o.current;
|
|
12968
13004
|
if (!n || e.length === 0) return;
|
|
@@ -13024,36 +13060,36 @@ var sr = (e) => {
|
|
|
13024
13060
|
})
|
|
13025
13061
|
]
|
|
13026
13062
|
});
|
|
13027
|
-
},
|
|
13063
|
+
}, nd = [
|
|
13028
13064
|
"var(--sf-chart-1)",
|
|
13029
13065
|
"var(--sf-chart-2)",
|
|
13030
13066
|
"var(--sf-chart-3)",
|
|
13031
13067
|
"var(--sf-chart-4)",
|
|
13032
13068
|
"var(--sf-chart-5)"
|
|
13033
|
-
],
|
|
13069
|
+
], rd = (e, t) => e.color ?? nd[t % nd.length], id = {
|
|
13034
13070
|
borderRadius: "0.375rem",
|
|
13035
13071
|
border: "1px solid var(--sf-chart-tooltip-border)",
|
|
13036
13072
|
background: "var(--sf-chart-tooltip-bg)",
|
|
13037
13073
|
fontSize: "0.75rem",
|
|
13038
13074
|
color: "var(--sf-chart-tooltip-text)"
|
|
13039
|
-
},
|
|
13075
|
+
}, ad = {
|
|
13040
13076
|
fill: "var(--sf-chart-axis)",
|
|
13041
13077
|
fontSize: 11
|
|
13042
|
-
},
|
|
13078
|
+
}, od = {
|
|
13043
13079
|
fontSize: "0.75rem",
|
|
13044
13080
|
color: "var(--sf-chart-axis)"
|
|
13045
|
-
},
|
|
13081
|
+
}, sd = {
|
|
13046
13082
|
top: 8,
|
|
13047
13083
|
right: 8,
|
|
13048
13084
|
left: 0,
|
|
13049
13085
|
bottom: 0
|
|
13050
|
-
},
|
|
13086
|
+
}, cd = {
|
|
13051
13087
|
bar: {
|
|
13052
13088
|
Root: ue,
|
|
13053
13089
|
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(le, {
|
|
13054
13090
|
dataKey: e.key,
|
|
13055
13091
|
name: e.label ?? e.key,
|
|
13056
|
-
fill:
|
|
13092
|
+
fill: rd(e, t),
|
|
13057
13093
|
radius: [
|
|
13058
13094
|
4,
|
|
13059
13095
|
4,
|
|
@@ -13065,7 +13101,7 @@ var sr = (e) => {
|
|
|
13065
13101
|
line: {
|
|
13066
13102
|
Root: me,
|
|
13067
13103
|
renderSeries: (e) => e.map((e, t) => {
|
|
13068
|
-
let n =
|
|
13104
|
+
let n = rd(e, t);
|
|
13069
13105
|
return /* @__PURE__ */ v(pe, {
|
|
13070
13106
|
type: "monotone",
|
|
13071
13107
|
dataKey: e.key,
|
|
@@ -13083,7 +13119,7 @@ var sr = (e) => {
|
|
|
13083
13119
|
area: {
|
|
13084
13120
|
Root: ce,
|
|
13085
13121
|
renderSeries: (e) => e.map((e, t) => {
|
|
13086
|
-
let n =
|
|
13122
|
+
let n = rd(e, t);
|
|
13087
13123
|
return /* @__PURE__ */ v(se, {
|
|
13088
13124
|
type: "monotone",
|
|
13089
13125
|
dataKey: e.key,
|
|
@@ -13095,8 +13131,8 @@ var sr = (e) => {
|
|
|
13095
13131
|
}, e.key);
|
|
13096
13132
|
})
|
|
13097
13133
|
}
|
|
13098
|
-
},
|
|
13099
|
-
let { Root: d, renderSeries: f } =
|
|
13134
|
+
}, ld = ({ type: e, data: t, xKey: n, series: r, height: i = 280, ariaLabel: a, emptyMessage: o = "Sin datos para mostrar", className: s, showGrid: c = !0, showTooltip: l = !0, showLegend: u = r.length > 1 }) => {
|
|
13135
|
+
let { Root: d, renderSeries: f } = cd[e], p = t.length > 0 && r.length > 0;
|
|
13100
13136
|
return /* @__PURE__ */ v("div", {
|
|
13101
13137
|
className: (0, X.default)("sf-chart", s),
|
|
13102
13138
|
style: { height: i },
|
|
@@ -13107,7 +13143,7 @@ var sr = (e) => {
|
|
|
13107
13143
|
height: "100%",
|
|
13108
13144
|
children: /* @__PURE__ */ y(d, {
|
|
13109
13145
|
data: t,
|
|
13110
|
-
margin:
|
|
13146
|
+
margin: sd,
|
|
13111
13147
|
children: [
|
|
13112
13148
|
c && /* @__PURE__ */ v(de, {
|
|
13113
13149
|
strokeDasharray: "3 3",
|
|
@@ -13115,16 +13151,16 @@ var sr = (e) => {
|
|
|
13115
13151
|
}),
|
|
13116
13152
|
/* @__PURE__ */ v(_e, {
|
|
13117
13153
|
dataKey: n,
|
|
13118
|
-
tick:
|
|
13154
|
+
tick: ad,
|
|
13119
13155
|
axisLine: { stroke: "var(--sf-chart-grid)" }
|
|
13120
13156
|
}),
|
|
13121
13157
|
/* @__PURE__ */ v(ve, {
|
|
13122
|
-
tick:
|
|
13158
|
+
tick: ad,
|
|
13123
13159
|
axisLine: { stroke: "var(--sf-chart-grid)" },
|
|
13124
13160
|
width: 48
|
|
13125
13161
|
}),
|
|
13126
|
-
l && /* @__PURE__ */ v(ge, { contentStyle:
|
|
13127
|
-
u && /* @__PURE__ */ v(fe, { wrapperStyle:
|
|
13162
|
+
l && /* @__PURE__ */ v(ge, { contentStyle: id }),
|
|
13163
|
+
u && /* @__PURE__ */ v(fe, { wrapperStyle: od }),
|
|
13128
13164
|
f(r)
|
|
13129
13165
|
]
|
|
13130
13166
|
})
|
|
@@ -13134,8 +13170,8 @@ var sr = (e) => {
|
|
|
13134
13170
|
children: o
|
|
13135
13171
|
})
|
|
13136
13172
|
});
|
|
13137
|
-
},
|
|
13138
|
-
let c = p(() =>
|
|
13173
|
+
}, ud = ({ data: e, dataKey: t, height: n = 40, width: r = "100%", color: i, ariaLabel: a = "Tendencia", emptyMessage: o = "Sin datos", className: s }) => {
|
|
13174
|
+
let c = p(() => rd({ color: i }, 0), [i]), l = e.length > 0, u = p(() => ({
|
|
13139
13175
|
top: 4,
|
|
13140
13176
|
right: 4,
|
|
13141
13177
|
left: 4,
|
|
@@ -13170,7 +13206,7 @@ var sr = (e) => {
|
|
|
13170
13206
|
children: o
|
|
13171
13207
|
})
|
|
13172
13208
|
});
|
|
13173
|
-
},
|
|
13209
|
+
}, dd = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
13174
13210
|
className: (0, X.default)("inline-block h-[1em] w-[1em]", e),
|
|
13175
13211
|
stroke: "currentColor",
|
|
13176
13212
|
fill: "currentColor",
|
|
@@ -13179,7 +13215,7 @@ var sr = (e) => {
|
|
|
13179
13215
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13180
13216
|
"aria-hidden": "true",
|
|
13181
13217
|
children: /* @__PURE__ */ v("path", { d: "M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z" })
|
|
13182
|
-
}),
|
|
13218
|
+
}), fd = (e, { initialPageSize: t = 10 } = {}) => {
|
|
13183
13219
|
let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
|
|
13184
13220
|
let t = n.trim().toLowerCase();
|
|
13185
13221
|
return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
|
|
@@ -13206,37 +13242,37 @@ var sr = (e) => {
|
|
|
13206
13242
|
]),
|
|
13207
13243
|
totalItems: l
|
|
13208
13244
|
};
|
|
13209
|
-
},
|
|
13210
|
-
let n =
|
|
13245
|
+
}, pd = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), md = (e) => typeof e == "string" || typeof e == "number", hd = (e, t) => {
|
|
13246
|
+
let n = pd(t);
|
|
13211
13247
|
return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
|
|
13212
|
-
},
|
|
13248
|
+
}, gd = (e, t, n) => {
|
|
13213
13249
|
if (t?.length) return [...t];
|
|
13214
13250
|
let r = new Set(n), i = [];
|
|
13215
|
-
for (let t in e) r.has(t) ||
|
|
13251
|
+
for (let t in e) r.has(t) || md(e[t]) && i.push(t);
|
|
13216
13252
|
return i;
|
|
13217
|
-
},
|
|
13218
|
-
let r = "", i =
|
|
13253
|
+
}, _d = (e, t, n) => {
|
|
13254
|
+
let r = "", i = gd(e, t, n);
|
|
13219
13255
|
for (let t of i) {
|
|
13220
13256
|
let n = e[t];
|
|
13221
|
-
if (!
|
|
13222
|
-
let i =
|
|
13257
|
+
if (!md(n)) continue;
|
|
13258
|
+
let i = hd(t, n);
|
|
13223
13259
|
i && (r += `${i} `);
|
|
13224
13260
|
}
|
|
13225
13261
|
return r;
|
|
13226
|
-
},
|
|
13262
|
+
}, vd = (e) => {
|
|
13227
13263
|
let t = e.split(";"), n = [];
|
|
13228
13264
|
for (let e of t) {
|
|
13229
|
-
let t =
|
|
13265
|
+
let t = pd(e);
|
|
13230
13266
|
t.length >= 2 && n.push(t);
|
|
13231
13267
|
}
|
|
13232
13268
|
return n;
|
|
13233
|
-
},
|
|
13234
|
-
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() =>
|
|
13269
|
+
}, yd = (e, t) => {
|
|
13270
|
+
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => vd(i), [i]), u = p(() => {
|
|
13235
13271
|
if (!e?.length) return [];
|
|
13236
13272
|
let t = [];
|
|
13237
13273
|
for (let n of e) t.push({
|
|
13238
13274
|
item: n,
|
|
13239
|
-
searchIndex:
|
|
13275
|
+
searchIndex: _d(n, o, s)
|
|
13240
13276
|
});
|
|
13241
13277
|
return t;
|
|
13242
13278
|
}, [
|
|
@@ -13278,15 +13314,15 @@ var sr = (e) => {
|
|
|
13278
13314
|
};
|
|
13279
13315
|
//#endregion
|
|
13280
13316
|
//#region src/hooks/useArrayPaginator.ts
|
|
13281
|
-
function
|
|
13317
|
+
function bd(e, t, n) {
|
|
13282
13318
|
if (t <= 0) return [];
|
|
13283
13319
|
let r = Math.max(0, n);
|
|
13284
13320
|
return r >= e.length ? [] : e.slice(r, r + t);
|
|
13285
13321
|
}
|
|
13286
|
-
var
|
|
13322
|
+
var xd = (e, t, n) => {
|
|
13287
13323
|
let r = e?.[n], i = t?.[n];
|
|
13288
13324
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : typeof r == "boolean" && typeof i == "boolean" ? Number(r) - Number(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : typeof r == "string" && typeof i == "string" ? r.localeCompare(i, void 0, { sensitivity: "base" }) : String(r).localeCompare(String(i), void 0, { sensitivity: "base" });
|
|
13289
|
-
},
|
|
13325
|
+
}, Sd = (e, t) => {
|
|
13290
13326
|
let [n, r] = h([]), [i, a] = h(() => ({
|
|
13291
13327
|
limit: Math.max(1, t?.limit ?? 100),
|
|
13292
13328
|
offset: 0
|
|
@@ -13299,7 +13335,7 @@ var yd = (e, t, n) => {
|
|
|
13299
13335
|
if (e.length === 0) return [];
|
|
13300
13336
|
let r = [...e];
|
|
13301
13337
|
if (n.length > 0) {
|
|
13302
|
-
let e = t?.onSortFunc ??
|
|
13338
|
+
let e = t?.onSortFunc ?? xd, i = t?.strictSort ?? !1;
|
|
13303
13339
|
r.sort((t, r) => {
|
|
13304
13340
|
for (let { id: a, desc: o } of n) {
|
|
13305
13341
|
if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
|
|
@@ -13309,7 +13345,7 @@ var yd = (e, t, n) => {
|
|
|
13309
13345
|
return 0;
|
|
13310
13346
|
});
|
|
13311
13347
|
}
|
|
13312
|
-
return
|
|
13348
|
+
return bd(r, o, c);
|
|
13313
13349
|
}, [
|
|
13314
13350
|
e,
|
|
13315
13351
|
o,
|
|
@@ -13328,7 +13364,7 @@ var yd = (e, t, n) => {
|
|
|
13328
13364
|
onSortChange: r,
|
|
13329
13365
|
pageData: u
|
|
13330
13366
|
};
|
|
13331
|
-
},
|
|
13367
|
+
}, Cd = (e, t) => {
|
|
13332
13368
|
if (typeof window > "u") return t;
|
|
13333
13369
|
try {
|
|
13334
13370
|
let n = window.localStorage.getItem(e);
|
|
@@ -13336,8 +13372,8 @@ var yd = (e, t, n) => {
|
|
|
13336
13372
|
} catch {
|
|
13337
13373
|
return t;
|
|
13338
13374
|
}
|
|
13339
|
-
},
|
|
13340
|
-
let [n, r] = h(() =>
|
|
13375
|
+
}, wd = (e, t) => {
|
|
13376
|
+
let [n, r] = h(() => Cd(e, t));
|
|
13341
13377
|
return [n, (t) => {
|
|
13342
13378
|
r((n) => {
|
|
13343
13379
|
let r = typeof t == "function" ? t(n) : t;
|
|
@@ -13347,52 +13383,52 @@ var yd = (e, t, n) => {
|
|
|
13347
13383
|
return r;
|
|
13348
13384
|
});
|
|
13349
13385
|
}];
|
|
13350
|
-
},
|
|
13386
|
+
}, Td = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), Ed = (e, t) => {
|
|
13351
13387
|
if (typeof window > "u") return;
|
|
13352
13388
|
let n = new URL(window.location.href);
|
|
13353
13389
|
t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
|
|
13354
|
-
},
|
|
13355
|
-
|
|
13356
|
-
},
|
|
13390
|
+
}, Dd = (e) => {
|
|
13391
|
+
Ed(e, null);
|
|
13392
|
+
}, Od = (e, t) => {
|
|
13357
13393
|
let [n, r] = h(() => {
|
|
13358
13394
|
let n = typeof e == "function" ? e() : e;
|
|
13359
13395
|
if (!t) return n;
|
|
13360
|
-
let r =
|
|
13361
|
-
return r == null || r === "" ? (
|
|
13396
|
+
let r = Td(t);
|
|
13397
|
+
return r == null || r === "" ? (Ed(t, n), n) : r;
|
|
13362
13398
|
});
|
|
13363
13399
|
return [n, (e) => {
|
|
13364
13400
|
r((n) => {
|
|
13365
13401
|
let r = typeof e == "function" ? e(n) : e;
|
|
13366
|
-
return t &&
|
|
13402
|
+
return t && Ed(t, r), r;
|
|
13367
13403
|
});
|
|
13368
13404
|
}];
|
|
13369
|
-
},
|
|
13405
|
+
}, kd = () => {
|
|
13370
13406
|
let e = globalThis.process?.env?.NODE_ENV;
|
|
13371
13407
|
return e != null && e === "development";
|
|
13372
|
-
},
|
|
13408
|
+
}, Ad = (e, t) => {
|
|
13373
13409
|
let n = x({
|
|
13374
13410
|
resolver: ye(e),
|
|
13375
13411
|
defaultValues: t?.defaultValues
|
|
13376
13412
|
}), r = (e, t) => n.handleSubmit(e, (e, n) => {
|
|
13377
|
-
|
|
13413
|
+
kd() && console.log(e), t?.(e, n);
|
|
13378
13414
|
});
|
|
13379
13415
|
return {
|
|
13380
13416
|
...n,
|
|
13381
13417
|
handleSubmit: r
|
|
13382
13418
|
};
|
|
13383
|
-
},
|
|
13419
|
+
}, jd = (e) => {
|
|
13384
13420
|
let t = String(e ?? ""), n = 0;
|
|
13385
13421
|
for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
|
|
13386
13422
|
let r = t.slice(n);
|
|
13387
13423
|
return /^[=+\-@]/.test(r) ? `'${t}` : t;
|
|
13388
|
-
},
|
|
13389
|
-
let t =
|
|
13424
|
+
}, Md = (e) => {
|
|
13425
|
+
let t = jd(e);
|
|
13390
13426
|
return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
13391
|
-
},
|
|
13427
|
+
}, Nd = (e, t) => {
|
|
13392
13428
|
if (typeof document > "u") return;
|
|
13393
|
-
let n = `\uFEFF${[t.columns.map((e) =>
|
|
13429
|
+
let n = `\uFEFF${[t.columns.map((e) => Md(e.header)).join(","), ...e.map((e) => t.columns.map((t) => Md(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
13394
13430
|
a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
|
|
13395
|
-
},
|
|
13431
|
+
}, Pd = (e) => jd(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Fd = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", Id = (e, t) => {
|
|
13396
13432
|
if (typeof document > "u") return;
|
|
13397
13433
|
let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
|
|
13398
13434
|
<?mso-application progid="Excel.Sheet"?>
|
|
@@ -13405,51 +13441,51 @@ var yd = (e, t, n) => {
|
|
|
13405
13441
|
</Styles>
|
|
13406
13442
|
<Worksheet ss:Name="Export">
|
|
13407
13443
|
<Table>
|
|
13408
|
-
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${
|
|
13444
|
+
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Pd(e.header)}</Data></Cell>`).join("")}</Row>
|
|
13409
13445
|
${e.map((e) => `<Row>${n.map((t) => {
|
|
13410
|
-
let n = t.getValue(e), r =
|
|
13411
|
-
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) :
|
|
13446
|
+
let n = t.getValue(e), r = Fd(n);
|
|
13447
|
+
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Pd(n)}</Data></Cell>`;
|
|
13412
13448
|
}).join("")}</Row>`).join("")}
|
|
13413
13449
|
</Table>
|
|
13414
13450
|
</Worksheet>
|
|
13415
13451
|
</Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
13416
13452
|
s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
|
|
13417
|
-
},
|
|
13453
|
+
}, Ld = "Este campo es requerido", Rd = "Introduce una dirección de correo electrónico válida", zd = "El correo electrónico es obligatorio", Bd = "El valor de este campo es inválido", Vd = "Introduce un número de celular válido", Hd = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Ud = (e = Ld) => U.string().transform(Hd).required(e), Wd = () => U.string().transform(Hd).default(null).nullable(), Gd = (e = zd) => U.string().transform(Hd).email(Rd).required(e), Kd = (e = Rd) => U.string().transform(Hd).test("emailTest", e, (e) => e == null || e === "" ? !0 : U.string().email().isValidSync(e)).default(null).nullable(), qd = (e, t = Bd, n = Ld) => U.string().transform(Hd).trim().test("rgxValidation", t, (t) => t == null || t === "" ? !0 : t.match(e) != null).required(n), Jd = (e, t = Bd) => U.string().transform(Hd).test("rgxValidation", t, (t) => t == null || t === "" ? !0 : t.match(e) != null).default(null).nullable(), Yd = (e) => {
|
|
13418
13454
|
let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
|
|
13419
13455
|
return {
|
|
13420
13456
|
minLength: t,
|
|
13421
13457
|
maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
|
|
13422
13458
|
};
|
|
13423
|
-
},
|
|
13424
|
-
let { minLength: t, maxLength: n } =
|
|
13459
|
+
}, Xd = (e) => {
|
|
13460
|
+
let { minLength: t, maxLength: n } = Yd(e), r = /^[0-9]+$/, i = U.string().transform(Hd).test("rgxValidation", (e, t) => e == null || e === "" ? !0 : e.match(r) == null ? t.createError({ message: "El campo debe contener solo caracteres numéricos" }) : !0);
|
|
13425
13461
|
return t != null && (i = i.min(t, `El campo debe tener al menos ${t} caracteres`)), n != null && (i = i.max(n, `La longitud máxima permitida es de ${n} caracteres`)), i;
|
|
13426
|
-
},
|
|
13462
|
+
}, Zd = (e) => Xd(e).required(Ld), Qd = (e) => Xd(e).default(null).nullable(), $d = (e = Ld) => U.boolean().typeError("El tipo de dato debe ser booleano").required(e), ef = () => U.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), tf = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, nf = (e = Ld) => U.number().transform(tf).typeError("Debe ser numérico").required(e), rf = () => U.number().transform(tf).typeError("Debe ser numérico").default(null).nullable().notRequired(), af = (e = Ld) => U.number().transform(tf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), of = (e = Ld) => af(e).integer("Este campo debe ser un número entero"), sf = () => U.number().transform(tf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), cf = () => sf().integer("Este campo debe ser un número entero"), lf = (e) => {
|
|
13427
13463
|
let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
|
|
13428
13464
|
return U.string().transform((e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim().startsWith("+") ? e.trim() : `+51 ${e.trim()}` : e).test("rgxValidation", e, (e) => e == null || e === "" ? !0 : e.match(t) != null).default(null);
|
|
13429
|
-
},
|
|
13430
|
-
transformNullIfEmpty:
|
|
13431
|
-
requiredString:
|
|
13432
|
-
nullableString:
|
|
13433
|
-
requiredEmail:
|
|
13434
|
-
nullableEmail:
|
|
13435
|
-
requiredMatchString:
|
|
13436
|
-
nullableOrMatchString:
|
|
13437
|
-
requiredStringNumbersOnly:
|
|
13438
|
-
nullableStringNumbersOnly:
|
|
13439
|
-
requiredBoolean:
|
|
13440
|
-
nullableBoolean:
|
|
13441
|
-
requiredNumber:
|
|
13442
|
-
nullableNumber:
|
|
13443
|
-
requiredPositiveNumber:
|
|
13444
|
-
requiredPositiveInteger:
|
|
13445
|
-
nullablePositiveNumber:
|
|
13446
|
-
nullablePositiveInteger:
|
|
13447
|
-
nullableCelular:
|
|
13448
|
-
requiredCelular:
|
|
13449
|
-
requiredStringArray:
|
|
13450
|
-
nullableStringArray:
|
|
13451
|
-
},
|
|
13465
|
+
}, uf = (e = Vd) => lf(e).nullable(), df = (e = Vd) => lf(e).required(Ld), ff = (e = Ld) => U.array().of(Ud()).min(1, "Debe contener al menos un elemento").required(e), pf = () => U.array().of(Wd()).default(null).nullable(), mf = {
|
|
13466
|
+
transformNullIfEmpty: Hd,
|
|
13467
|
+
requiredString: Ud,
|
|
13468
|
+
nullableString: Wd,
|
|
13469
|
+
requiredEmail: Gd,
|
|
13470
|
+
nullableEmail: Kd,
|
|
13471
|
+
requiredMatchString: qd,
|
|
13472
|
+
nullableOrMatchString: Jd,
|
|
13473
|
+
requiredStringNumbersOnly: Zd,
|
|
13474
|
+
nullableStringNumbersOnly: Qd,
|
|
13475
|
+
requiredBoolean: $d,
|
|
13476
|
+
nullableBoolean: ef,
|
|
13477
|
+
requiredNumber: nf,
|
|
13478
|
+
nullableNumber: rf,
|
|
13479
|
+
requiredPositiveNumber: af,
|
|
13480
|
+
requiredPositiveInteger: of,
|
|
13481
|
+
nullablePositiveNumber: sf,
|
|
13482
|
+
nullablePositiveInteger: cf,
|
|
13483
|
+
nullableCelular: uf,
|
|
13484
|
+
requiredCelular: df,
|
|
13485
|
+
requiredStringArray: ff,
|
|
13486
|
+
nullableStringArray: pf
|
|
13487
|
+
}, hf = (e) => U.object().shape(e(mf));
|
|
13452
13488
|
//#endregion
|
|
13453
|
-
export { Rr as AccessDenied, Ui as Accordion, Or as ActionButton, hr as ActiveFiltersBar,
|
|
13489
|
+
export { Rr as AccessDenied, Ui as Accordion, Or as ActionButton, hr as ActiveFiltersBar, vl as AddressSearchInput, Ar as Alert, Ps as AlertLane, js as AlertRowList, $a as AppBarContainer, Qa as AppShell, Ol as AreaInput, dn as AsyncCardSelect, or as AsyncCustomTable, ln as AsyncSearchSelect, mn as AsyncSearchTableSelect, Fu as AuditTimeline, pa as Avatar, ma as AvatarGroup, _a as Badge, Ut as BooleanCheckbox, Vi as Breadcrumb, $ as Button, Cr as ButtonGroup, nd as CHART_SERIES_COLORS, Kt as COUNTRY_DIAL_CODES, Gt as CURRENCY_SYMBOLS, ms as Calendar, su as CardRadioGroup, un as CardSelect, td as Carousel, ld as Chart, Rt as Checkbox, zt as CheckboxGroup, po as CodeEditor, ru as ColorInput, Si as CommandPalette, Zr as ConfirmDialog, ui as ContextMenuProvider, xl as CoordinatesInput, tn as CurrencyInput, ar as CustomTable, Rs as DashboardCard, Vs as DashboardGrid, Gs as DashboardLayout, Hs as DashboardSection, Ws as DashboardStatBar, St as DateInput, Dt as DatePicker, Xs as DateRangeFields, Cn as DateRangeInput, Zs as DateRangeUtcInput, Ka as DateWeekStrip, An as DisplayField, Xt as DniInput, ws as DonutGauge, Ts as DonutGaugeRow, vi as Drawer, ni as DropdownMenu, ri as DropdownMenuItem, yr as EditableDataGrid, jr as EmptyState, Xo as EntityCard, Qo as EntityCardGrid, Nr as ErrorView, As as EventLog, Sr as ExpandableTableSection, Z as FieldLayout, dc as FileDropInput, On as FileInput, ia as FilterBar, oa as FilterBarDate, aa as FilterBarField, sa as FilterBarSelect, ca as FilterBarText, Er as FormActions, ta as FormWizard, Ii as HeightProvider, yt as Input, da as ItineraryEditor, Fo as KPICard, Lo as KPIGrid, au as KeyValueInput, zu as LiveChip, La as LiveRouteBoard, Zu as LiveStatusBar, Ir as LoadingView, bl as LocationPicker, ho as MIN_MAP_GEOCODER_QUERY_LENGTH, ss as MONTH_NAMES, la as MaestroLayout, xc as MapFrame, Mo as MapPicker, Sc as MapStatus, yl as MapView, ra as MasterDetailLayout, na as MasterDetailListItem, $r as MessageDialog, Bo as MetricBarList, zo as MetricBarRow, Yr as Modal, is as ModuleCard, as as ModuleCardGrid, mc as MultiPhotoInput, hu as NETWORK_BASEMAPS, bu as NETWORK_EDGE_STYLES, _u as NETWORK_KIND_COLORS, gu as NETWORK_KIND_LABELS, vu as NETWORK_STATUS_COLORS, yu as NETWORK_STATUS_LABELS, Wn as NUMBER_FILTER_OPS, Ou as NetworkLegend, Nu as NetworkMap, hi as NotificationBell, xt as NumberInput, Yl as NumberStepper, cu as ORG_TREE_DEFAULT_THEMES, ii as OptionItem, mu as OrgTree, Js as OtpInput, Ti as PageContainer, Di as PageHeader, Hn as PaginationRangeInput, Ta as PassengerBoardCard, kt as PasswordInput, $t as PhoneInput, yc as PhotoCropInput, fc as PhotoInput, Ct as Popover, wi as ProductTour, Ql as ProgressBar, eu as ProgressBarReadonly, pi as QRView, Bt as RadioGroup, Zl as RangeSliderInput, tu as RatingInput, ts as RecommendationCard, Ru as RecordList, Lu as RecordListItem, Lr as RetryBlock, oo as RichTextEditor, kl as RouteInput, Tr as RowActions, Zt as RucInput, wc as SF_DEFAULT_MAP_CENTER, Tc as SF_DEFAULT_MAP_ZOOM, kc as SF_GOOGLE_ENGINE_CAPABILITIES, Oc as SF_LEAFLET_ENGINE_CAPABILITIES, Cc as SF_MAPS_CONFIG_ERROR, Dc as SF_OSM_ATTRIBUTION, Ec as SF_OSM_TILE_URL, Un as STRING_FILTER_OPS, Wi as ScrollArea, sn as SearchSelect, pn as SearchTableSelect, Lt as Select, Bi as Separator, dl as SfProvider, yi as Sheet, Oi as SidePanel, Pi as SidePanelContainer, pc as SignaturePad, Br as Skeleton, Gl as SliderInput, Tn as SmartDateInput, nn as SmartInput, Al as SmartMapInput, hc as SmartMediaInput, hn as SmartSelect, ou as SortableList, ud as Sparkline, Fr as Spinner, Qi as Stepper, Gi as SummaryItem, dd as SyncIcon, ai as TabMenuOption, mr as TableColumnSettings, Jn as TableFiltersPanel, Ei as TablePageLayout, Yn as TableSortingPanel, ki as Tabs, iu as TagsInput, bt as TextArea, wn as TimeRangeInput, ed as Timeline, Kr as ToastProvider, Vt as Toggle, Ht as ToggleCard, wr as ToolbarButton, gi as Tooltip, os as TramoCard, It as Transfer, Pt as TreeSelect, Ra as UnitSelector, Ri as Visibility, zi as Visivility, cs as WEEKDAY_LABELS, Ya as WeekdayToggleStrip, Wt as YesNoSelect, ha as badgeClassName, ga as badgeDotClassName, vr as buildActiveFilterChips, ds as buildMonthGrid, lu as buildOrgTreeRows, Ft as buttonClassName, Sn as calcTimeDuration, Pl as clampNumber, lo as codeEditorClassName, qn as columnFilterFn, wu as countNetworkStatus, du as countOrgTreeNodes, hf as createFormSchema, Ln as createLocalStorageAsyncStateStore, ic as createPhotoItem, cc as cropImageToSquare, xd as defaultOnSortFunc, Qs as emptyDateRange, Rl as emptyKeyValuePairs, Bl as emptyNumberRange, bc as emptyPhotoItems, Il as emptyTags, $s as emptyTimeRange, Nd as exportTableCsv, Id as exportTableXlsx, Q as fieldClassName, _r as formatColumnFilterValue, _o as formatMapGeocoderLabel, Fl as formatSliderLabel, yn as fromUtcDateIso, Kn as inferInitialFilterValue, _t as inputFocusTransition, Gn as isColumnFilterValue, _n as isValidDateString, nc as isValidFileType, Du as networkEdgeLines, Tu as networkMapBounds, Eu as networkNodePositions, tc as nextPhotoId, bn as normalizeDateRange, Hl as normalizeHexColor, zl as normalizeKeyValuePairs, Cu as normalizeNetworkEdges, Su as normalizeNetworkNodes, Vl as normalizeNumberRange, sc as normalizePhotoItems, Ll as normalizeTags, xn as normalizeTimeRange, ef as nullableBoolean, uf as nullableCelular, Kd as nullableEmail, rf as nullableNumber, Jd as nullableOrMatchString, cf as nullablePositiveInteger, sf as nullablePositiveNumber, Wd as nullableString, pf as nullableStringArray, Qd as nullableStringNumbersOnly, fu as orgTreeRootNodes, us as parseYMD, Ul as progressPercent, Td as readQueryValue, Dd as removeQueryValue, $d as requiredBoolean, df as requiredCelular, Gd as requiredEmail, qd as requiredMatchString, nf as requiredNumber, of as requiredPositiveInteger, af as requiredPositiveNumber, Ud as requiredString, ff as requiredStringArray, Zd as requiredStringNumbersOnly, uu as resolveOrgTreeTheme, rd as resolveSeriesColor, ac as revokePhotoPreview, oc as revokePhotoPreviews, qt as sanitizeDigits, go as searchMapAddresses, $c as sfClampLatitude, el as sfClampLongitude, Zc as sfFormatCoordinate, nl as sfLatLngToString, il as sfMarkerFromLatLng, rl as sfNormalizeLatLng, tl as sfParseCoordinate, rc as showFilePicker, vt as textareaClassName, Va as toIsoDate, gn as toLocalDateYMD, ls as toLocalYMD, Nt as toStringArray, vn as toUtcDateIso, Hd as transformNullIfEmpty, Ed as updateQueryValue, ml as useAddressSearch, Sd as useArrayPaginator, cn as useAsyncOptions, oi as useClickAway, Li as useContainerHeight, fi as useContextMenu, Ad as useCustomForm, sr as useCustomTableController, ti as useDropdownClose, yd as useFilterData, ea as useFormWizard, co as useIsClient, fd as useMaestroFilter, hl as useMapEngine, gl as useMapsConfig, Xr as useModal, Od as useQueryStringState, fl as useSf, pl as useSfMaps, Mi as useSidePanelContainer, Ai as useSidePanelHandle, wd as useStoredState, fr as useTableColumnSettings, qr as useToast, Yt as validateDni, Jt as validateRuc, mf as validators };
|
|
13454
13490
|
|
|
13455
13491
|
//# sourceMappingURL=sf-ui.js.map
|