@sfperusacdev/sf-ui 0.2.7 → 0.2.9

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.js CHANGED
@@ -11,7 +11,7 @@ import { html as L } from "@codemirror/lang-html";
11
11
  import { javascript as R } from "@codemirror/lang-javascript";
12
12
  import { json as z } from "@codemirror/lang-json";
13
13
  import { sql as B } from "@codemirror/lang-sql";
14
- import { Circle as ee, MapContainer as V, Marker as te, Polygon as ne, Polyline as re, TileLayer as H, Tooltip as ie, useMap as U, useMapEvents as ae } from "react-leaflet";
14
+ import { Circle as ee, MapContainer as te, Marker as ne, Polygon as re, Polyline as ie, TileLayer as V, Tooltip as H, useMap as U, useMapEvents as ae } from "react-leaflet";
15
15
  import oe from "leaflet";
16
16
  import { Area as se, AreaChart as W, Bar as ce, BarChart as le, CartesianGrid as ue, Label as de, LabelList as fe, Legend as pe, Line as me, LineChart as he, PolarAngleAxis as ge, PolarGrid as _e, PolarRadiusAxis as ve, Radar as ye, RadarChart as be, ReferenceLine as xe, ResponsiveContainer as Se, Tooltip as Ce, XAxis as we, YAxis as Te } from "recharts";
17
17
  import Ee from "react-easy-crop";
@@ -2720,18 +2720,18 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2720
2720
  let O = b({
2721
2721
  name: t,
2722
2722
  control: e.control
2723
- }), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), V = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), te = p(() => {
2723
+ }), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), te = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), ne = p(() => {
2724
2724
  let e = /* @__PURE__ */ new Map();
2725
2725
  for (let t of n) e.set(t.value, t);
2726
2726
  return e;
2727
- }, [n]), ne = p(() => {
2727
+ }, [n]), re = p(() => {
2728
2728
  let e = [];
2729
- for (let t of V) {
2730
- let n = te.get(t);
2729
+ for (let t of te) {
2730
+ let n = ne.get(t);
2731
2731
  n && e.push(n);
2732
2732
  }
2733
2733
  return e;
2734
- }, [te, V]), re = p(() => {
2734
+ }, [ne, te]), ie = p(() => {
2735
2735
  let e = F.trim().toLowerCase();
2736
2736
  return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
2737
2737
  }, [n, F]);
@@ -2740,28 +2740,28 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2740
2740
  B(ee.current?.scrollTop ?? 0);
2741
2741
  }));
2742
2742
  }, [N, F]);
2743
- let H = (e) => {
2743
+ let V = (e) => {
2744
2744
  O.field.onChange(e), C?.(e);
2745
- }, ie = () => {
2745
+ }, H = () => {
2746
2746
  P(!1), I(""), R(void 0);
2747
2747
  }, U = (e) => {
2748
2748
  if (g) return;
2749
2749
  if (!o) {
2750
- H(e), ie();
2750
+ V(e), H();
2751
2751
  return;
2752
2752
  }
2753
- let t = V.includes(e) ? V.filter((t) => t !== e) : [...V, e];
2754
- H(t);
2753
+ let t = te.includes(e) ? te.filter((t) => t !== e) : [...te, e];
2754
+ V(t);
2755
2755
  }, ae = (e) => {
2756
2756
  if (!g) {
2757
2757
  if (!o) {
2758
- H("");
2758
+ V("");
2759
2759
  return;
2760
2760
  }
2761
- H(V.filter((t) => t !== e));
2761
+ V(te.filter((t) => t !== e));
2762
2762
  }
2763
2763
  }, oe = () => {
2764
- g || H(o ? [] : "");
2764
+ g || V(o ? [] : "");
2765
2765
  }, se = () => {
2766
2766
  let e = M.current;
2767
2767
  if (!e) return;
@@ -2786,7 +2786,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2786
2786
  }, [N]), u(() => {
2787
2787
  let e = (e) => {
2788
2788
  let t = e.target;
2789
- j.current?.contains(t) || ie();
2789
+ j.current?.contains(t) || H();
2790
2790
  };
2791
2791
  return document.addEventListener("pointerdown", e), () => {
2792
2792
  document.removeEventListener("pointerdown", e);
@@ -2810,12 +2810,12 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2810
2810
  onScroll: (e) => {
2811
2811
  B(e.currentTarget.scrollTop);
2812
2812
  },
2813
- children: re.length ? (() => {
2814
- let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(re.length, n + t + 12), i = n * bn, a = Math.max(0, (re.length - r) * bn), s = re.slice(n, r);
2813
+ children: ie.length ? (() => {
2814
+ let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(ie.length, n + t + 12), i = n * bn, a = Math.max(0, (ie.length - r) * bn), s = ie.slice(n, r);
2815
2815
  return /* @__PURE__ */ y(_, { children: [
2816
2816
  i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
2817
2817
  s.map((e) => {
2818
- let t = V.includes(e.value);
2818
+ let t = te.includes(e.value);
2819
2819
  return /* @__PURE__ */ y("button", {
2820
2820
  type: "button",
2821
2821
  onClick: () => U(e.value),
@@ -2871,10 +2871,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2871
2871
  withRightIcon: !0,
2872
2872
  withLeftIcon: !!D,
2873
2873
  disabled: g
2874
- }), "flex items-center gap-1.5 text-left", o && ne.length > 1 && "h-auto min-h-[2.5rem] py-2"),
2874
+ }), "flex items-center gap-1.5 text-left", o && re.length > 1 && "h-auto min-h-[2.5rem] py-2"),
2875
2875
  children: [/* @__PURE__ */ v("span", {
2876
2876
  className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
2877
- children: ne.length ? o ? /* @__PURE__ */ y(_, { children: [ne.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
2877
+ children: re.length ? o ? /* @__PURE__ */ y(_, { children: [re.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
2878
2878
  className: "inline-flex max-w-full items-center gap-1 rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-700",
2879
2879
  children: [/* @__PURE__ */ v("span", {
2880
2880
  className: "truncate",
@@ -2887,19 +2887,19 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2887
2887
  className: "rounded text-slate-400 hover:text-slate-700",
2888
2888
  children: /* @__PURE__ */ v(q, { size: 12 })
2889
2889
  })]
2890
- }, e.value)), ne.length > S && /* @__PURE__ */ y("span", {
2890
+ }, e.value)), re.length > S && /* @__PURE__ */ y("span", {
2891
2891
  className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
2892
- children: ["+", ne.length - S]
2892
+ children: ["+", re.length - S]
2893
2893
  })] }) : /* @__PURE__ */ v("span", {
2894
2894
  className: "truncate",
2895
- children: ne[0]?.label
2895
+ children: re[0]?.label
2896
2896
  }) : /* @__PURE__ */ v("span", {
2897
2897
  className: "text-slate-400",
2898
2898
  children: c
2899
2899
  })
2900
2900
  }), /* @__PURE__ */ y("span", {
2901
2901
  className: "flex items-center gap-1",
2902
- children: [ne.length > 0 && !g && /* @__PURE__ */ v("button", {
2902
+ children: [re.length > 0 && !g && /* @__PURE__ */ v("button", {
2903
2903
  type: "button",
2904
2904
  onClick: (e) => {
2905
2905
  e.stopPropagation(), oe();
@@ -3073,7 +3073,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3073
3073
  pageSize: f
3074
3074
  }), z = p(() => c ? Jt(j.field.value) : j.field.value ? [String(j.field.value)] : [], [j.field.value, c]), B = p(() => n.filter((e) => z.includes(e.value)), [n, z]), ee = (e) => {
3075
3075
  j.field.onChange(e), m?.(e);
3076
- }, V = (e) => {
3076
+ }, te = (e) => {
3077
3077
  if (u || d) return;
3078
3078
  if (!c) {
3079
3079
  ee(e), j.field.onBlur();
@@ -3081,7 +3081,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3081
3081
  }
3082
3082
  let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
3083
3083
  ee(t), j.field.onBlur();
3084
- }, te = (e) => {
3084
+ }, ne = (e) => {
3085
3085
  if (!(u || d)) {
3086
3086
  if (!c) {
3087
3087
  ee(""), j.field.onBlur();
@@ -3089,9 +3089,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3089
3089
  }
3090
3090
  ee(z.filter((t) => t !== e)), j.field.onBlur();
3091
3091
  }
3092
- }, ne = () => {
3092
+ }, re = () => {
3093
3093
  u || d || (ee(c ? [] : ""), j.field.onBlur());
3094
- }, re = p(() => [
3094
+ }, ie = p(() => [
3095
3095
  {
3096
3096
  id: "selected",
3097
3097
  header: "",
@@ -3123,9 +3123,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3123
3123
  c,
3124
3124
  u,
3125
3125
  z
3126
- ]), H = M({
3126
+ ]), V = M({
3127
3127
  data: n,
3128
- columns: re,
3128
+ columns: ie,
3129
3129
  state: {
3130
3130
  globalFilter: F,
3131
3131
  pagination: L
@@ -3147,7 +3147,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3147
3147
  return n != null && String(n).toLowerCase().includes(r);
3148
3148
  });
3149
3149
  }
3150
- }), ie = H.getRowModel().rows, U = H.getFilteredRowModel().rows.length, ae = Math.max(0, f - ie.length), oe = H.getState().pagination.pageIndex + 1, se = Math.max(1, H.getPageCount()), W = H.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
3150
+ }), H = V.getRowModel().rows, U = V.getFilteredRowModel().rows.length, ae = Math.max(0, f - H.length), oe = V.getState().pagination.pageIndex + 1, se = Math.max(1, V.getPageCount()), W = V.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
3151
3151
  return /* @__PURE__ */ v(Z, {
3152
3152
  id: N,
3153
3153
  label: a,
@@ -3171,7 +3171,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3171
3171
  disabled: u || d,
3172
3172
  placeholder: d ? "Cargando..." : x ?? "Buscar...",
3173
3173
  onBlur: () => j.field.onBlur(),
3174
- onChange: (e) => H.setGlobalFilter(e.target.value),
3174
+ onChange: (e) => V.setGlobalFilter(e.target.value),
3175
3175
  className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400 disabled:cursor-not-allowed"
3176
3176
  })]
3177
3177
  }),
@@ -3195,7 +3195,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3195
3195
  children: e.label
3196
3196
  }), !u && /* @__PURE__ */ v("button", {
3197
3197
  type: "button",
3198
- onClick: () => te(e.value),
3198
+ onClick: () => ne(e.value),
3199
3199
  className: "shrink-0 rounded text-slate-400 hover:text-slate-700",
3200
3200
  children: /* @__PURE__ */ v(q, { size: 12 })
3201
3201
  })]
@@ -3206,7 +3206,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3206
3206
  })]
3207
3207
  }), B.length > 0 && !u && !d && /* @__PURE__ */ v("button", {
3208
3208
  type: "button",
3209
- onClick: ne,
3209
+ onClick: re,
3210
3210
  className: "shrink-0 text-xs font-medium text-slate-500 hover:text-slate-900",
3211
3211
  children: "Limpiar"
3212
3212
  })]
@@ -3231,10 +3231,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3231
3231
  ]
3232
3232
  }) : /* @__PURE__ */ v("table", {
3233
3233
  className: "w-full table-fixed border-collapse text-sm",
3234
- children: /* @__PURE__ */ v("tbody", { children: ie.length ? /* @__PURE__ */ y(_, { children: [ie.map((e) => {
3234
+ children: /* @__PURE__ */ v("tbody", { children: H.length ? /* @__PURE__ */ y(_, { children: [H.map((e) => {
3235
3235
  let t = z.includes(e.original.value);
3236
3236
  return /* @__PURE__ */ v("tr", {
3237
- onClick: () => V(e.original.value),
3237
+ onClick: () => te(e.original.value),
3238
3238
  className: (0, X.default)("h-10 border-b border-slate-100 last:border-b-0", u || d ? "cursor-default" : "cursor-pointer hover:bg-slate-50", t && "bg-slate-50"),
3239
3239
  children: e.getVisibleCells().map((e) => /* @__PURE__ */ v("td", {
3240
3240
  className: (0, X.default)("px-3 py-2 align-middle text-slate-700", e.column.id === "selected" && "w-10"),
@@ -3276,8 +3276,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3276
3276
  children: [
3277
3277
  /* @__PURE__ */ v("button", {
3278
3278
  type: "button",
3279
- disabled: u || d || !H.getCanPreviousPage(),
3280
- onClick: () => H.previousPage(),
3279
+ disabled: u || d || !V.getCanPreviousPage(),
3280
+ onClick: () => V.previousPage(),
3281
3281
  className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
3282
3282
  children: "Anterior"
3283
3283
  }),
@@ -3291,8 +3291,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3291
3291
  }),
3292
3292
  /* @__PURE__ */ v("button", {
3293
3293
  type: "button",
3294
- disabled: u || d || !H.getCanNextPage(),
3295
- onClick: () => H.nextPage(),
3294
+ disabled: u || d || !V.getCanNextPage(),
3295
+ onClick: () => V.nextPage(),
3296
3296
  className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
3297
3297
  children: "Siguiente"
3298
3298
  })
@@ -4657,7 +4657,7 @@ var Er = (e) => {
4657
4657
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
4658
4658
  return !0;
4659
4659
  };
4660
- function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: V = !1, error: te, onRetry: ne, onRefresh: re, onRowClick: H, enableRowSelection: ie = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
4660
+ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: ne, onRetry: re, onRefresh: ie, onRowClick: V, enableRowSelection: H = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
4661
4661
  let [fe, pe] = h(o), [me, he] = h(() => o.length > 0 ? {} : !0), [ge, _e] = h([]), [ve, ye] = h(""), [be, xe] = h([]), [Se, Ce] = h({}), [we, Te] = h({}), [Ee, De] = h(() => Tr(i).map((e) => e.id)), [G, Oe] = h({}), [ke, Ae] = h({
4662
4662
  pageIndex: 0,
4663
4663
  pageSize: f
@@ -4674,9 +4674,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4674
4674
  }));
4675
4675
  }, Je = p(() => {
4676
4676
  let e = [];
4677
- return We && e.push("__detail"), ie && e.push("__select"), U && e.push("__actions"), e;
4677
+ return We && e.push("__detail"), H && e.push("__select"), U && e.push("__actions"), e;
4678
4678
  }, [
4679
- ie,
4679
+ H,
4680
4680
  U,
4681
4681
  We
4682
4682
  ]), K = p(() => {
@@ -4708,10 +4708,10 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4708
4708
  return e;
4709
4709
  }, [i, r]), ct = p(() => wr(i, G), [G, i]), lt = p(() => {
4710
4710
  let e = [];
4711
- return We && e.push("__detail"), ie && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
4711
+ return We && e.push("__detail"), H && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
4712
4712
  }, [
4713
4713
  Ee,
4714
- ie,
4714
+ H,
4715
4715
  U,
4716
4716
  We
4717
4717
  ]), ut = p(() => {
@@ -4783,13 +4783,13 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4783
4783
  } : null;
4784
4784
  return [
4785
4785
  ...n ? [n] : [],
4786
- ...ie ? [e] : [],
4786
+ ...H ? [e] : [],
4787
4787
  ...ct,
4788
4788
  ...t ? [t] : []
4789
4789
  ];
4790
4790
  }, [
4791
4791
  ct,
4792
- ie,
4792
+ H,
4793
4793
  U,
4794
4794
  Re,
4795
4795
  We,
@@ -4921,7 +4921,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4921
4921
  getSubRows: (e) => e.subRows,
4922
4922
  getPaginationRowModel: je ? A() : void 0,
4923
4923
  filterFns: { columnFilter: _r },
4924
- enableRowSelection: ie
4924
+ enableRowSelection: H
4925
4925
  });
4926
4926
  Ze.current = Y;
4927
4927
  let pt = je ? Y.getPrePaginationRowModel().rows.length : 0;
@@ -5234,20 +5234,20 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5234
5234
  })] }), /* @__PURE__ */ y("div", {
5235
5235
  className: "sf-table-toolbar-actions",
5236
5236
  children: [
5237
- (V || re) && /* @__PURE__ */ y("div", {
5237
+ (te || ie) && /* @__PURE__ */ y("div", {
5238
5238
  className: "flex items-center gap-2",
5239
- children: [V && /* @__PURE__ */ y("span", {
5239
+ children: [te && /* @__PURE__ */ y("span", {
5240
5240
  className: "sf-table-toolbar-status",
5241
5241
  children: [/* @__PURE__ */ v("span", {
5242
5242
  className: "sf-table-spinner sf-table-spinner--sm",
5243
5243
  "aria-hidden": "true"
5244
5244
  }), "Actualizando"]
5245
- }), re && /* @__PURE__ */ v("button", {
5245
+ }), ie && /* @__PURE__ */ v("button", {
5246
5246
  type: "button",
5247
5247
  "aria-label": "Refrescar",
5248
5248
  className: "sf-table-toolbar-btn",
5249
- disabled: V,
5250
- onClick: re,
5249
+ disabled: te,
5250
+ onClick: ie,
5251
5251
  children: /* @__PURE__ */ v(Kn, {
5252
5252
  className: "h-5 w-5",
5253
5253
  "aria-hidden": "true"
@@ -5308,7 +5308,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5308
5308
  children: "Agrupado"
5309
5309
  }),
5310
5310
  typeof R == "function" ? R(mt, { clearSelection: () => Y.resetRowSelection() }) : R,
5311
- ie && mt.length > 0 && /* @__PURE__ */ y("div", {
5311
+ H && mt.length > 0 && /* @__PURE__ */ y("div", {
5312
5312
  className: "flex items-center gap-2",
5313
5313
  children: [(() => {
5314
5314
  let e = ae?.(mt, { clearSelection: () => Y.resetRowSelection() }) ?? [];
@@ -5346,12 +5346,12 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5346
5346
  ]
5347
5347
  })]
5348
5348
  }),
5349
- te != null && /* @__PURE__ */ y("div", {
5349
+ ne != null && /* @__PURE__ */ y("div", {
5350
5350
  className: "sf-table-error",
5351
- children: [/* @__PURE__ */ v("div", { children: te }), ne && /* @__PURE__ */ v("button", {
5351
+ children: [/* @__PURE__ */ v("div", { children: ne }), re && /* @__PURE__ */ v("button", {
5352
5352
  type: "button",
5353
5353
  className: "sf-table-error__retry",
5354
- onClick: ne,
5354
+ onClick: re,
5355
5355
  children: "Reintentar"
5356
5356
  })]
5357
5357
  }),
@@ -5406,9 +5406,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5406
5406
  }) }) : /* @__PURE__ */ v(_, { children: Y.getRowModel().rows.map((e) => {
5407
5407
  let t = We && !e.getIsGrouped() && Ge(e.original) && Ke(e.id, e.original);
5408
5408
  return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
5409
- className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", H && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
5410
- onClick: H && !e.getIsGrouped() ? (t) => {
5411
- t.target.closest("button, a, input, select, label, [role=\"button\"]") || H(e.original);
5409
+ className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", V && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
5410
+ onClick: V && !e.getIsGrouped() ? (t) => {
5411
+ t.target.closest("button, a, input, select, label, [role=\"button\"]") || V(e.original);
5412
5412
  } : void 0,
5413
5413
  children: e.getVisibleCells().map((t) => {
5414
5414
  let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
@@ -9579,13 +9579,13 @@ var jr = (e) => {
9579
9579
  lng: e.lng
9580
9580
  }), a(Xo(e.lat), Xo(e.lng));
9581
9581
  }
9582
- }), /* @__PURE__ */ y(V, {
9582
+ }), /* @__PURE__ */ y(te, {
9583
9583
  center: o,
9584
9584
  zoom: n,
9585
9585
  scrollWheelZoom: !r,
9586
9586
  className: "sf-map-frame",
9587
9587
  children: [
9588
- /* @__PURE__ */ v(H, {
9588
+ /* @__PURE__ */ v(V, {
9589
9589
  attribution: ts,
9590
9590
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
9591
9591
  }),
@@ -9598,7 +9598,7 @@ var jr = (e) => {
9598
9598
  readOnly: r,
9599
9599
  onPick: a
9600
9600
  }),
9601
- /* @__PURE__ */ v(te, {
9601
+ /* @__PURE__ */ v(ne, {
9602
9602
  position: o,
9603
9603
  icon: qo,
9604
9604
  draggable: !r,
@@ -9878,9 +9878,9 @@ var jr = (e) => {
9878
9878
  comfortable: "mb-2",
9879
9879
  compact: "mb-1"
9880
9880
  }, As = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, trendDirection: s = "up-good", accentTone: c, progress: l, valueFormat: u, formatOptions: d, sparkline: f, layout: p = "stacked", variant: m = "default", size: h = "md", density: g = "comfortable", accentBar: _, iconStyle: b = "solid", labelWrap: x = !1, className: S, onClick: C, selected: w = !1, showChevron: T = !0 }) => {
9881
- let E = a != null, D = E && a >= 0, O = E ? s === "neutral" ? null : s === "down-good" ? !D : D : null, k = l ? Ss(l.value, l.max) : null, A = l?.label ?? (k === null ? void 0 : `${Math.round(k)}%`), j = _ ?? p === "stacked", M = (e) => typeof e == "number" ? xs(u, d)(e) : e, N = !l && f && f.data.length > 0, P = (e) => {
9881
+ let E = a != null, D = E && a >= 0, O = E ? s === "neutral" ? null : s === "down-good" ? !D : D : null, k = l ? Ss(l.value, l.max) : null, A = l?.label ?? (k === null ? void 0 : `${Math.round(k)}%`), j = _ ?? p === "stacked", M = (e) => typeof e == "number" ? xs(u, d)(e) : e, N = String(M(t)), P = !l && f && f.data.length > 0, F = (e) => {
9882
9882
  C && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
9883
- }, F = k !== null && /* @__PURE__ */ y("div", {
9883
+ }, I = k !== null && /* @__PURE__ */ y("div", {
9884
9884
  className: "mt-2 flex items-center gap-2",
9885
9885
  role: "progressbar",
9886
9886
  "aria-valuenow": Math.round(k),
@@ -9899,7 +9899,7 @@ var jr = (e) => {
9899
9899
  className: "shrink-0 text-xs font-semibold tabular-nums sf-card-muted",
9900
9900
  children: A
9901
9901
  })]
9902
- }), I = N && /* @__PURE__ */ v("div", {
9902
+ }), L = P && /* @__PURE__ */ v("div", {
9903
9903
  className: "mt-2",
9904
9904
  children: /* @__PURE__ */ v(_s, {
9905
9905
  data: f.data,
@@ -9909,39 +9909,41 @@ var jr = (e) => {
9909
9909
  })
9910
9910
  });
9911
9911
  if (p === "leading-icon") {
9912
- let a = c ? ys[c] : "var(--sf-kpi-accent-slate)", o = b === "soft" ? {
9913
- background: `color-mix(in srgb, ${a} 14%, var(--sf-surface))`,
9914
- color: a
9915
- } : { background: a };
9912
+ let t = c ? ys[c] : "var(--sf-kpi-accent-slate)", a = b === "soft" ? {
9913
+ background: `color-mix(in srgb, ${t} 14%, var(--sf-surface))`,
9914
+ color: t
9915
+ } : { background: t };
9916
9916
  return /* @__PURE__ */ y("div", {
9917
- className: (0, X.default)("sf-card flex items-center gap-3", ws[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", w && "sf-kpi-card--selected", S),
9917
+ className: (0, X.default)("sf-card sf-kpi-card--leading flex items-center gap-3", ws[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", w && "sf-kpi-card--selected", S),
9918
9918
  onClick: C,
9919
- onKeyDown: P,
9919
+ onKeyDown: F,
9920
9920
  role: C ? "button" : void 0,
9921
9921
  tabIndex: C ? 0 : void 0,
9922
9922
  "aria-pressed": C ? w : void 0,
9923
9923
  children: [
9924
9924
  r && /* @__PURE__ */ v("span", {
9925
9925
  className: (0, X.default)("sf-kpi-tile", Ds[h], b === "soft" && "sf-kpi-tile--soft", i),
9926
- style: o,
9926
+ style: a,
9927
9927
  "aria-hidden": "true",
9928
9928
  children: r
9929
9929
  }),
9930
9930
  /* @__PURE__ */ y("div", {
9931
- className: "min-w-0 flex-1",
9931
+ className: "sf-kpi-card__body min-w-0 flex-1",
9932
9932
  children: [
9933
9933
  /* @__PURE__ */ v("p", {
9934
9934
  className: (0, X.default)(x ? "sf-kpi-card__label--wrap" : "truncate", "text-sm font-medium sf-card-subtitle"),
9935
9935
  children: e
9936
9936
  }),
9937
9937
  /* @__PURE__ */ v("p", {
9938
- className: (0, X.default)(Es[h], "font-bold tabular-nums sf-card-title"),
9939
- children: M(t)
9938
+ className: (0, X.default)(Es[h], "sf-kpi-card__value--fit", `sf-kpi-card__value--${h}`, "font-bold tabular-nums sf-card-title"),
9939
+ style: { "--sf-kpi-value-chars": N.length },
9940
+ title: N,
9941
+ children: N
9940
9942
  }),
9941
- k === null ? N ? I : n && /* @__PURE__ */ v("p", {
9943
+ k === null ? P ? L : n && /* @__PURE__ */ v("p", {
9942
9944
  className: "mt-1 text-xs sf-card-muted",
9943
9945
  children: n
9944
- }) : F,
9946
+ }) : I,
9945
9947
  w && /* @__PURE__ */ y("p", {
9946
9948
  className: "sf-kpi-card__selected-hint",
9947
9949
  children: [/* @__PURE__ */ v(St, { "aria-hidden": "true" }), "Seleccionado"]
@@ -9959,7 +9961,7 @@ var jr = (e) => {
9959
9961
  return /* @__PURE__ */ y("div", {
9960
9962
  className: (0, X.default)("sf-card", Cs[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", S),
9961
9963
  onClick: C,
9962
- onKeyDown: P,
9964
+ onKeyDown: F,
9963
9965
  role: C ? "button" : void 0,
9964
9966
  tabIndex: C ? 0 : void 0,
9965
9967
  children: [
@@ -9988,7 +9990,7 @@ var jr = (e) => {
9988
9990
  title: typeof t == "string" ? t : void 0,
9989
9991
  children: M(t)
9990
9992
  }),
9991
- k === null ? N && I : F,
9993
+ k === null ? P && L : I,
9992
9994
  (n || o) && /* @__PURE__ */ y("div", {
9993
9995
  className: (0, X.default)("flex items-center justify-between gap-2", Os[g]),
9994
9996
  children: [n && /* @__PURE__ */ v("span", {
@@ -10622,48 +10624,77 @@ var jr = (e) => {
10622
10624
  xs: 56,
10623
10625
  sm: 80,
10624
10626
  md: 110,
10625
- lg: 150
10627
+ lg: 150,
10628
+ xl: 285
10626
10629
  }, yc = {
10630
+ xs: 6,
10631
+ sm: 8,
10632
+ md: 10,
10633
+ lg: 13,
10634
+ xl: 25
10635
+ }, bc = {
10627
10636
  xs: 13,
10628
10637
  sm: 18,
10629
10638
  md: 24,
10630
- lg: 34
10631
- }, bc = {
10639
+ lg: 34,
10640
+ xl: 64
10641
+ }, xc = {
10632
10642
  xs: 8,
10633
10643
  sm: 10,
10634
10644
  md: 11,
10635
- lg: 13
10636
- }, xc = {
10645
+ lg: 13,
10646
+ xl: 24
10647
+ }, Sc = .2, Cc = .6, wc = .86, Tc = (e, t) => {
10648
+ let n = vc[e], r = Math.min(t ?? yc[e], Math.round(n * Sc)), i = (n - r) / 2;
10649
+ return {
10650
+ dim: n,
10651
+ stroke: r,
10652
+ radius: i,
10653
+ center: n / 2,
10654
+ circumference: 2 * Math.PI * i,
10655
+ hole: n - 2 * r
10656
+ };
10657
+ }, Ec = (e, t, n) => {
10658
+ let r = Math.max(1, String(n).length), i = t * wc / (Cc * r);
10659
+ return Math.floor(Math.min(e, i) * 2) / 2;
10660
+ }, Dc = (e, t) => `${+(e / t * 100).toFixed(2)}cqw`, Oc = (e, t, n, r) => {
10661
+ let i = Ec(n, e.hole, t), a = Math.min(r, i * .6);
10662
+ return {
10663
+ "--sf-donut-dim": `${e.dim}px`,
10664
+ "--sf-donut-inset": `${+(e.stroke / e.dim * 100).toFixed(2)}%`,
10665
+ "--sf-donut-value": Dc(i, e.dim),
10666
+ "--sf-donut-label": Dc(a, e.dim)
10667
+ };
10668
+ }, kc = {
10669
+ xs: 8,
10670
+ sm: 10,
10671
+ md: 11,
10672
+ lg: 13,
10673
+ xl: 24
10674
+ }, Ac = {
10637
10675
  xs: 7,
10638
10676
  sm: 9,
10639
10677
  md: 10,
10640
- lg: 12
10641
- }, Sc = {
10642
- xs: 6,
10643
- sm: 8,
10644
- md: 10,
10645
- lg: 13
10646
- }, Cc = "var(--sf-success)", wc = "var(--sf-warning)", Tc = "var(--sf-danger)", Ec = (e, t, n) => {
10678
+ lg: 12,
10679
+ xl: 22
10680
+ }, jc = "var(--sf-success)", Mc = "var(--sf-warning)", Nc = "var(--sf-danger)", Pc = (e, t, n) => {
10647
10681
  let { warning: r, critical: i } = n;
10648
- return t ? e >= i ? Cc : e >= r ? wc : Tc : e < r ? Cc : e < i ? wc : Tc;
10649
- }, Dc = ({ value: e, label: t, sublabel: n, size: r = "md", color: i, thresholds: a = {
10682
+ return t ? e >= i ? jc : e >= r ? Mc : Nc : e < r ? jc : e < i ? Mc : Nc;
10683
+ }, Fc = ({ value: e, label: t, sublabel: n, size: r = "md", color: i, thresholds: a = {
10650
10684
  warning: 70,
10651
10685
  critical: 90
10652
10686
  }, inverse: o = !1, showValue: s = !0, strokeWidth: c, className: l }) => {
10653
- let u = Math.max(0, Math.min(100, e)), d = vc[r], f = c ?? Sc[r], p = (d - f) / 2, m = d / 2, h = 2 * Math.PI * p, g = h * (1 - u / 100), _ = i ?? Ec(u, o, a);
10687
+ let u = Math.max(0, Math.min(100, e)), d = Tc(r, c), f = d.circumference * (1 - u / 100), p = i ?? Pc(u, o, a);
10654
10688
  return /* @__PURE__ */ y("div", {
10655
10689
  className: (0, X.default)("sf-donut-gauge", l),
10656
10690
  children: [
10657
10691
  /* @__PURE__ */ y("div", {
10658
- className: "relative",
10659
- style: {
10660
- width: d,
10661
- height: d
10662
- },
10692
+ className: "sf-donut__ring",
10693
+ style: Oc(d, `${u}%`, bc[r], xc[r]),
10663
10694
  children: [/* @__PURE__ */ y("svg", {
10664
- width: d,
10665
- height: d,
10666
- viewBox: `0 0 ${d} ${d}`,
10695
+ width: "100%",
10696
+ height: "100%",
10697
+ viewBox: `0 0 ${d.dim} ${d.dim}`,
10667
10698
  style: { transform: "rotate(-90deg)" },
10668
10699
  "aria-label": t ?? "Indicador",
10669
10700
  "aria-valuemin": 0,
@@ -10671,31 +10702,30 @@ var jr = (e) => {
10671
10702
  "aria-valuenow": u,
10672
10703
  role: "progressbar",
10673
10704
  children: [/* @__PURE__ */ v("circle", {
10674
- cx: m,
10675
- cy: m,
10676
- r: p,
10705
+ cx: d.center,
10706
+ cy: d.center,
10707
+ r: d.radius,
10677
10708
  fill: "none",
10678
10709
  stroke: "var(--sf-gauge-track)",
10679
- strokeWidth: f
10710
+ strokeWidth: d.stroke
10680
10711
  }), /* @__PURE__ */ v("circle", {
10681
- cx: m,
10682
- cy: m,
10683
- r: p,
10712
+ cx: d.center,
10713
+ cy: d.center,
10714
+ r: d.radius,
10684
10715
  fill: "none",
10685
- stroke: _,
10686
- strokeWidth: f,
10716
+ stroke: p,
10717
+ strokeWidth: d.stroke,
10687
10718
  strokeLinecap: "round",
10688
- strokeDasharray: h,
10689
- strokeDashoffset: g,
10719
+ strokeDasharray: d.circumference,
10720
+ strokeDashoffset: f,
10690
10721
  style: { transition: "stroke-dashoffset 0.5s ease, stroke 0.3s ease" }
10691
10722
  })]
10692
10723
  }), s && /* @__PURE__ */ v("div", {
10693
- className: "absolute inset-0 flex items-center justify-center",
10724
+ className: "sf-donut__center",
10694
10725
  children: /* @__PURE__ */ y("span", {
10695
10726
  className: "sf-donut-gauge__value",
10696
- style: { fontSize: yc[r] },
10697
10727
  children: [u, /* @__PURE__ */ v("span", {
10698
- style: { fontSize: yc[r] * .55 },
10728
+ className: "sf-donut-gauge__unit",
10699
10729
  children: "%"
10700
10730
  })]
10701
10731
  })
@@ -10703,148 +10733,147 @@ var jr = (e) => {
10703
10733
  }),
10704
10734
  t && /* @__PURE__ */ v("span", {
10705
10735
  className: "sf-donut-gauge__label",
10706
- style: { fontSize: bc[r] },
10736
+ style: { fontSize: kc[r] },
10707
10737
  children: t
10708
10738
  }),
10709
10739
  n && /* @__PURE__ */ v("span", {
10710
10740
  className: "sf-donut-gauge__sublabel",
10711
- style: { fontSize: xc[r] },
10741
+ style: { fontSize: Ac[r] },
10712
10742
  children: n
10713
10743
  })
10714
10744
  ]
10715
10745
  });
10716
- }, Oc = ({ gauges: e, size: t = "sm", className: n }) => /* @__PURE__ */ v("div", {
10746
+ }, Ic = ({ gauges: e, size: t = "sm", className: n }) => /* @__PURE__ */ v("div", {
10717
10747
  className: (0, X.default)("flex flex-wrap items-start gap-4", n),
10718
- children: e.map((e, n) => /* @__PURE__ */ v(Dc, {
10748
+ children: e.map((e, n) => /* @__PURE__ */ v(Fc, {
10719
10749
  ...e,
10720
10750
  size: e.size ?? t
10721
10751
  }, n))
10722
- }), kc = {
10723
- xs: 56,
10724
- sm: 80,
10725
- md: 110,
10726
- lg: 150
10727
- }, Ac = {
10728
- xs: 6,
10729
- sm: 8,
10730
- md: 10,
10731
- lg: 13
10732
- }, jc = {
10733
- xs: 13,
10734
- sm: 18,
10735
- md: 24,
10736
- lg: 34
10737
- }, Mc = {
10738
- xs: 8,
10739
- sm: 10,
10740
- md: 11,
10741
- lg: 13
10742
- }, Nc = [
10752
+ }), Lc = (e) => `${Math.round(e * 100)}%`, Rc = [
10743
10753
  "var(--sf-primary)",
10744
10754
  "var(--sf-info)",
10745
10755
  "var(--sf-warning)",
10746
10756
  "var(--sf-accent)"
10747
- ], Pc = ({ segments: e, centerValue: t, centerLabel: n, size: r = "md", strokeWidth: i, showLegend: a = !0, className: o }) => {
10748
- let s = e.reduce((e, t) => e + Math.max(0, t.value), 0), c = kc[r], l = i ?? Ac[r], u = (c - l) / 2, d = c / 2, f = 2 * Math.PI * u, p = 0, m = e.map((e, t) => {
10749
- let n = Math.max(0, e.value), r = s > 0 ? n / s : 0, i = f * r, a = f * (1 - p);
10750
- return p += r, {
10757
+ ], zc = ({ segments: e, centerValue: t, centerLabel: n, size: r = "md", strokeWidth: i, showLegend: a = !0, legendVariant: o = "list", formatPct: s = Lc, className: c }) => {
10758
+ let l = e.reduce((e, t) => e + Math.max(0, t.value), 0), u = Tc(r, i), d = String(t ?? l.toLocaleString("es-PE")), f = e.map((e) => l > 0 ? Math.max(0, e.value) / l : 0), p = e.map((e, t) => {
10759
+ let n = f[t], r = u.circumference * n, i = f.slice(0, t).reduce((e, t) => e + t, 0), a = u.circumference * (1 - i);
10760
+ return {
10751
10761
  ...e,
10752
- pct: r,
10753
- color: e.color ?? Nc[t % Nc.length],
10754
- dasharray: `${i} ${f - i}`,
10762
+ pct: n,
10763
+ color: e.color ?? Rc[t % Rc.length],
10764
+ dasharray: `${r} ${u.circumference - r}`,
10755
10765
  dashoffset: a
10756
10766
  };
10757
10767
  });
10758
10768
  return /* @__PURE__ */ y("div", {
10759
- className: (0, X.default)("sf-donut-breakdown", o),
10760
- children: [/* @__PURE__ */ y("div", {
10761
- className: "relative",
10762
- style: {
10763
- width: c,
10764
- height: c
10765
- },
10766
- children: [/* @__PURE__ */ v("svg", {
10767
- width: c,
10768
- height: c,
10769
- viewBox: `0 0 ${c} ${c}`,
10770
- style: { transform: "rotate(-90deg)" },
10771
- "aria-hidden": "true",
10772
- children: s <= 0 ? /* @__PURE__ */ v("circle", {
10773
- cx: d,
10774
- cy: d,
10775
- r: u,
10776
- fill: "none",
10777
- stroke: "var(--sf-gauge-track)",
10778
- strokeWidth: l
10779
- }) : m.map((e, t) => /* @__PURE__ */ v("circle", {
10780
- cx: d,
10781
- cy: d,
10782
- r: u,
10783
- fill: "none",
10784
- stroke: e.color,
10785
- strokeWidth: l,
10786
- strokeDasharray: e.dasharray,
10787
- strokeDashoffset: e.dashoffset
10788
- }, `${e.label}-${t}`))
10789
- }), /* @__PURE__ */ y("div", {
10790
- className: "absolute inset-0 flex flex-col items-center justify-center",
10791
- children: [/* @__PURE__ */ v("span", {
10792
- className: "sf-donut-breakdown__value",
10793
- style: { fontSize: jc[r] },
10794
- children: t ?? s.toLocaleString("es-PE")
10795
- }), n && /* @__PURE__ */ v("span", {
10796
- className: "sf-donut-breakdown__label",
10797
- style: { fontSize: Mc[r] },
10798
- children: n
10769
+ className: (0, X.default)("sf-donut-breakdown", o === "stat" && "sf-donut-breakdown--stat", c),
10770
+ children: [
10771
+ /* @__PURE__ */ y("div", {
10772
+ className: "sf-donut__ring",
10773
+ style: Oc(u, d, bc[r], xc[r]),
10774
+ children: [/* @__PURE__ */ v("svg", {
10775
+ width: "100%",
10776
+ height: "100%",
10777
+ viewBox: `0 0 ${u.dim} ${u.dim}`,
10778
+ style: { transform: "rotate(-90deg)" },
10779
+ "aria-hidden": "true",
10780
+ children: l <= 0 ? /* @__PURE__ */ v("circle", {
10781
+ cx: u.center,
10782
+ cy: u.center,
10783
+ r: u.radius,
10784
+ fill: "none",
10785
+ stroke: "var(--sf-gauge-track)",
10786
+ strokeWidth: u.stroke
10787
+ }) : p.map((e, t) => /* @__PURE__ */ v("circle", {
10788
+ cx: u.center,
10789
+ cy: u.center,
10790
+ r: u.radius,
10791
+ fill: "none",
10792
+ stroke: e.color,
10793
+ strokeWidth: u.stroke,
10794
+ strokeDasharray: e.dasharray,
10795
+ strokeDashoffset: e.dashoffset
10796
+ }, `${e.label}-${t}`))
10797
+ }), /* @__PURE__ */ y("div", {
10798
+ className: "sf-donut__center",
10799
+ children: [/* @__PURE__ */ v("span", {
10800
+ className: "sf-donut-breakdown__value",
10801
+ children: d
10802
+ }), n && /* @__PURE__ */ v("span", {
10803
+ className: "sf-donut-breakdown__label",
10804
+ children: n
10805
+ })]
10799
10806
  })]
10800
- })]
10801
- }), a && /* @__PURE__ */ v("ul", {
10802
- className: "sf-donut-breakdown__legend",
10803
- children: m.map((e, t) => /* @__PURE__ */ y("li", {
10804
- className: "sf-donut-breakdown__legend-item",
10805
- children: [
10806
- /* @__PURE__ */ v("span", {
10807
- className: "sf-donut-breakdown__legend-dot",
10807
+ }),
10808
+ a && o === "stat" && /* @__PURE__ */ v("ul", {
10809
+ className: "sf-donut-breakdown__stats",
10810
+ children: p.map((e, t) => /* @__PURE__ */ y("li", {
10811
+ className: "sf-donut-breakdown__stat",
10812
+ children: [/* @__PURE__ */ v("span", {
10813
+ className: "sf-donut-breakdown__stat-dot",
10808
10814
  style: { backgroundColor: e.color },
10809
10815
  "aria-hidden": "true"
10810
- }),
10811
- /* @__PURE__ */ v("span", {
10812
- className: "sf-donut-breakdown__legend-label",
10813
- children: e.label
10814
- }),
10815
- /* @__PURE__ */ v("span", {
10816
- className: "sf-donut-breakdown__legend-value",
10816
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
10817
+ className: "sf-donut-breakdown__stat-value",
10817
10818
  children: e.value.toLocaleString("es-PE")
10818
- }),
10819
- /* @__PURE__ */ y("span", {
10820
- className: "sf-donut-breakdown__legend-pct",
10821
- children: [Math.round(e.pct * 100), "%"]
10822
- })
10823
- ]
10824
- }, `${e.label}-${t}`))
10825
- })]
10819
+ }), /* @__PURE__ */ y("div", {
10820
+ className: "sf-donut-breakdown__stat-text",
10821
+ children: [
10822
+ e.label,
10823
+ " · ",
10824
+ s(e.pct)
10825
+ ]
10826
+ })] })]
10827
+ }, `${e.label}-${t}`))
10828
+ }),
10829
+ a && o === "list" && /* @__PURE__ */ v("ul", {
10830
+ className: "sf-donut-breakdown__legend",
10831
+ children: p.map((e, t) => /* @__PURE__ */ y("li", {
10832
+ className: "sf-donut-breakdown__legend-item",
10833
+ children: [
10834
+ /* @__PURE__ */ v("span", {
10835
+ className: "sf-donut-breakdown__legend-dot",
10836
+ style: { backgroundColor: e.color },
10837
+ "aria-hidden": "true"
10838
+ }),
10839
+ /* @__PURE__ */ v("span", {
10840
+ className: "sf-donut-breakdown__legend-label",
10841
+ children: e.label
10842
+ }),
10843
+ /* @__PURE__ */ v("span", {
10844
+ className: "sf-donut-breakdown__legend-value",
10845
+ children: e.value.toLocaleString("es-PE")
10846
+ }),
10847
+ /* @__PURE__ */ v("span", {
10848
+ className: "sf-donut-breakdown__legend-pct",
10849
+ children: s(e.pct)
10850
+ })
10851
+ ]
10852
+ }, `${e.label}-${t}`))
10853
+ })
10854
+ ]
10826
10855
  });
10827
- }, Fc = {
10856
+ }, Bc = {
10828
10857
  success: "sf-event-log__dot--success",
10829
10858
  warning: "sf-event-log__dot--warning",
10830
10859
  danger: "sf-event-log__dot--danger",
10831
10860
  info: "sf-event-log__dot--info",
10832
10861
  default: "sf-event-log__dot--default"
10833
- }, Ic = {
10862
+ }, Vc = {
10834
10863
  success: "sf-event-log__icon-wrap--success",
10835
10864
  warning: "sf-event-log__icon-wrap--warning",
10836
10865
  danger: "sf-event-log__icon-wrap--danger",
10837
10866
  info: "sf-event-log__icon-wrap--info",
10838
10867
  default: "sf-event-log__icon-wrap--default"
10839
- }, Lc = {
10868
+ }, Hc = {
10840
10869
  success: "sf-alert-row-list__meta--success",
10841
10870
  warning: "sf-alert-row-list__meta--warning",
10842
10871
  danger: "sf-alert-row-list__meta--danger",
10843
10872
  info: "sf-alert-row-list__meta--info",
10844
10873
  default: "sf-alert-row-list__meta--default"
10845
- }, Rc = (e, t) => {
10874
+ }, Uc = (e, t) => {
10846
10875
  t && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
10847
- }, zc = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
10876
+ }, Wc = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
10848
10877
  let c = r ? "text-[11px]" : "text-xs", l = r ? "text-[10px]" : "text-[11px]", u = r ? "text-[9px]" : "text-[10px]", d = r ? "py-1.5" : "py-2.5";
10849
10878
  return /* @__PURE__ */ y("div", {
10850
10879
  className: (0, X.default)("sf-event-log", s),
@@ -10885,11 +10914,11 @@ var jr = (e) => {
10885
10914
  /* @__PURE__ */ v("div", {
10886
10915
  className: "mt-0.5 shrink-0",
10887
10916
  children: t.icon ? /* @__PURE__ */ v("div", {
10888
- className: (0, X.default)("sf-event-log__icon-wrap", Ic[r]),
10917
+ className: (0, X.default)("sf-event-log__icon-wrap", Vc[r]),
10889
10918
  "aria-hidden": "true",
10890
10919
  children: t.icon
10891
10920
  }) : /* @__PURE__ */ v("div", {
10892
- className: (0, X.default)("sf-event-log__dot", Fc[r]),
10921
+ className: (0, X.default)("sf-event-log__dot", Bc[r]),
10893
10922
  "aria-hidden": "true"
10894
10923
  })
10895
10924
  }),
@@ -10923,16 +10952,16 @@ var jr = (e) => {
10923
10952
  })]
10924
10953
  })]
10925
10954
  });
10926
- }, Bc = {
10955
+ }, Gc = {
10927
10956
  time: "Hora",
10928
10957
  vehicle: "Vehículo",
10929
10958
  description: "Descripción"
10930
- }, Vc = {
10959
+ }, Kc = {
10931
10960
  critical: "sf-alert-row-list__severity--critical",
10932
10961
  warning: "sf-alert-row-list__severity--warning",
10933
10962
  info: !1
10934
- }, Hc = ({ severity: e }) => {
10935
- let t = Vc[e];
10963
+ }, qc = ({ severity: e }) => {
10964
+ let t = Kc[e];
10936
10965
  return t ? /* @__PURE__ */ v("span", {
10937
10966
  className: (0, X.default)("sf-alert-row-list__severity", t),
10938
10967
  "aria-hidden": "true",
@@ -10967,7 +10996,7 @@ var jr = (e) => {
10967
10996
  })] })
10968
10997
  })
10969
10998
  }) : null;
10970
- }, Uc = ({ actions: e }) => /* @__PURE__ */ v("span", {
10999
+ }, Jc = ({ actions: e }) => /* @__PURE__ */ v("span", {
10971
11000
  className: "sf-alert-row-list__actions",
10972
11001
  children: e.map((e, t) => /* @__PURE__ */ v("button", {
10973
11002
  type: "button",
@@ -10977,9 +11006,9 @@ var jr = (e) => {
10977
11006
  },
10978
11007
  children: e.label
10979
11008
  }, t))
10980
- }), Wc = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i, density: a = "comfortable", emptyMessage: o = "Sin alertas" }) => {
11009
+ }), Yc = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i, density: a = "comfortable", emptyMessage: o = "Sin alertas" }) => {
10981
11010
  let s = {
10982
- ...Bc,
11011
+ ...Gc,
10983
11012
  ...i
10984
11013
  };
10985
11014
  return /* @__PURE__ */ y("div", {
@@ -11013,13 +11042,13 @@ var jr = (e) => {
11013
11042
  role: a ? "button" : "listitem",
11014
11043
  tabIndex: a ? 0 : void 0,
11015
11044
  onClick: a ? e.onClick : void 0,
11016
- onKeyDown: a ? (t) => Rc(t, e.onClick) : void 0
11045
+ onKeyDown: a ? (t) => Uc(t, e.onClick) : void 0
11017
11046
  };
11018
11047
  return r ? /* @__PURE__ */ y("div", {
11019
11048
  ...o,
11020
11049
  children: [
11021
11050
  /* @__PURE__ */ v("span", {
11022
- className: (0, X.default)("sf-event-log__dot", Fc[n]),
11051
+ className: (0, X.default)("sf-event-log__dot", Bc[n]),
11023
11052
  "aria-hidden": "true"
11024
11053
  }),
11025
11054
  /* @__PURE__ */ v("span", {
@@ -11028,7 +11057,7 @@ var jr = (e) => {
11028
11057
  }),
11029
11058
  /* @__PURE__ */ y("span", {
11030
11059
  className: "sf-alert-row-list__vehicle",
11031
- children: [e.severity && /* @__PURE__ */ v(Hc, { severity: e.severity }), e.vehicle]
11060
+ children: [e.severity && /* @__PURE__ */ v(qc, { severity: e.severity }), e.vehicle]
11032
11061
  }),
11033
11062
  /* @__PURE__ */ y("span", {
11034
11063
  className: "sf-alert-row-list__description",
@@ -11039,17 +11068,17 @@ var jr = (e) => {
11039
11068
  children: e.icon
11040
11069
  }), e.label]
11041
11070
  }), e.meta && /* @__PURE__ */ v("span", {
11042
- className: (0, X.default)("sf-alert-row-list__meta", Lc[n]),
11071
+ className: (0, X.default)("sf-alert-row-list__meta", Hc[n]),
11043
11072
  children: e.meta
11044
11073
  })]
11045
11074
  }),
11046
- i && /* @__PURE__ */ v(Uc, { actions: e.actions })
11075
+ i && /* @__PURE__ */ v(Jc, { actions: e.actions })
11047
11076
  ]
11048
11077
  }, t) : /* @__PURE__ */ y("div", {
11049
11078
  ...o,
11050
11079
  children: [
11051
11080
  /* @__PURE__ */ v("span", {
11052
- className: (0, X.default)("sf-event-log__dot", Fc[n]),
11081
+ className: (0, X.default)("sf-event-log__dot", Bc[n]),
11053
11082
  "aria-hidden": "true"
11054
11083
  }),
11055
11084
  /* @__PURE__ */ y("span", {
@@ -11060,20 +11089,20 @@ var jr = (e) => {
11060
11089
  }), e.label]
11061
11090
  }),
11062
11091
  e.meta && /* @__PURE__ */ v("span", {
11063
- className: (0, X.default)("sf-alert-row-list__meta", Lc[n]),
11092
+ className: (0, X.default)("sf-alert-row-list__meta", Hc[n]),
11064
11093
  children: e.meta
11065
11094
  }),
11066
11095
  e.time && /* @__PURE__ */ v("span", {
11067
11096
  className: "sf-alert-row-list__time",
11068
11097
  children: e.time
11069
11098
  }),
11070
- i && /* @__PURE__ */ v(Uc, { actions: e.actions })
11099
+ i && /* @__PURE__ */ v(Jc, { actions: e.actions })
11071
11100
  ]
11072
11101
  }, t);
11073
11102
  })
11074
11103
  ]
11075
11104
  });
11076
- }, Gc = {
11105
+ }, Xc = {
11077
11106
  success: {
11078
11107
  color: "#1F8A4C",
11079
11108
  halo: "#EAF5EE"
@@ -11094,17 +11123,17 @@ var jr = (e) => {
11094
11123
  color: "var(--sf-text-subtle, #5C7180)",
11095
11124
  halo: "var(--sf-surface-alt, #EEF0F2)"
11096
11125
  }
11097
- }, Kc = {
11126
+ }, Zc = {
11098
11127
  display: "flex",
11099
11128
  gap: 12,
11100
11129
  flexWrap: "wrap"
11101
- }, qc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11130
+ }, Qc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11102
11131
  className: (0, X.default)("sf-alert-lane", t),
11103
- style: Kc,
11132
+ style: Zc,
11104
11133
  role: "list",
11105
11134
  "aria-label": "Alertas",
11106
11135
  children: e.map((e, t) => {
11107
- let n = Gc[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
11136
+ let n = Xc[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
11108
11137
  return /* @__PURE__ */ y("div", {
11109
11138
  role: "listitem",
11110
11139
  style: {
@@ -11175,7 +11204,7 @@ var jr = (e) => {
11175
11204
  ]
11176
11205
  }, e.id ?? t);
11177
11206
  })
11178
- }), Jc = ({ tone: e = "default" }) => /* @__PURE__ */ v("span", {
11207
+ }), $c = ({ tone: e = "default" }) => /* @__PURE__ */ v("span", {
11179
11208
  className: (0, X.default)("sf-alert-summary-row__icon", `sf-alert-summary-row__icon--${e}`),
11180
11209
  "aria-hidden": "true",
11181
11210
  children: /* @__PURE__ */ y("svg", {
@@ -11212,7 +11241,7 @@ var jr = (e) => {
11212
11241
  y2: "4.71"
11213
11242
  })] })]
11214
11243
  })
11215
- }), Yc = ({ items: e, className: t, density: n = "comfortable", emptyMessage: r = "Sin alertas", showIcon: i = !1, showChevron: a = !1 }) => /* @__PURE__ */ y("div", {
11244
+ }), el = ({ items: e, className: t, density: n = "comfortable", emptyMessage: r = "Sin alertas", showIcon: i = !1, showChevron: a = !1 }) => /* @__PURE__ */ y("div", {
11216
11245
  className: (0, X.default)("sf-alert-summary-list", t),
11217
11246
  children: [e.length === 0 && /* @__PURE__ */ v("p", {
11218
11247
  className: "sf-alert-summary-list__empty",
@@ -11230,7 +11259,7 @@ var jr = (e) => {
11230
11259
  } : void 0,
11231
11260
  children: [/* @__PURE__ */ y("div", {
11232
11261
  className: "flex min-w-0 items-start gap-2",
11233
- children: [i && (e.icon ?? /* @__PURE__ */ v(Jc, { tone: e.tone })), /* @__PURE__ */ y("div", {
11262
+ children: [i && (e.icon ?? /* @__PURE__ */ v($c, { tone: e.tone })), /* @__PURE__ */ y("div", {
11234
11263
  className: "min-w-0",
11235
11264
  children: [/* @__PURE__ */ v("p", {
11236
11265
  className: "sf-alert-summary-row__label",
@@ -11267,7 +11296,7 @@ var jr = (e) => {
11267
11296
  })]
11268
11297
  }, `${e.label}-${t}`);
11269
11298
  })]
11270
- }), Xc = ({ items: e, confidence: t, updatedAt: n, className: r }) => {
11299
+ }), tl = ({ items: e, confidence: t, updatedAt: n, className: r }) => {
11271
11300
  let i = [
11272
11301
  ...e.map((e, t) => /* @__PURE__ */ y("span", {
11273
11302
  className: "sf-evidence-footnote__item",
@@ -11304,7 +11333,7 @@ var jr = (e) => {
11304
11333
  }), e]
11305
11334
  }, t))
11306
11335
  });
11307
- }, Zc = (e) => e.toLocaleString("es-PE"), Qc = ({ rows: e, planLabel: t = "Plan", realLabel: n = "Real", className: r }) => /* @__PURE__ */ y("table", {
11336
+ }, nl = (e) => e.toLocaleString("es-PE"), rl = ({ rows: e, planLabel: t = "Plan", realLabel: n = "Real", className: r }) => /* @__PURE__ */ y("table", {
11308
11337
  className: (0, X.default)("sf-comparison-table", r),
11309
11338
  children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", { children: [
11310
11339
  /* @__PURE__ */ v("th", { className: "sf-comparison-table__th sf-comparison-table__th--label" }),
@@ -11321,7 +11350,7 @@ var jr = (e) => {
11321
11350
  children: "Desviación"
11322
11351
  })
11323
11352
  ] }) }), /* @__PURE__ */ v("tbody", { children: e.map((e) => {
11324
- let t = e.valueFormat ?? Zc, n = e.direction ?? "up-good", r = e.real - e.plan, i = e.plan === 0 ? 0 : r / Math.abs(e.plan) * 100, a = n === "neutral" ? null : n === "up-good" ? r >= 0 : r <= 0;
11353
+ let t = e.valueFormat ?? nl, n = e.direction ?? "up-good", r = e.real - e.plan, i = e.plan === 0 ? 0 : r / Math.abs(e.plan) * 100, a = n === "neutral" ? null : n === "up-good" ? r >= 0 : r <= 0;
11325
11354
  return /* @__PURE__ */ y("tr", {
11326
11355
  className: "sf-comparison-table__row",
11327
11356
  children: [
@@ -11352,40 +11381,40 @@ var jr = (e) => {
11352
11381
  ]
11353
11382
  }, e.key);
11354
11383
  }) })]
11355
- }), $c = {
11384
+ }), il = {
11356
11385
  default: "",
11357
11386
  accent: "sf-card--accent",
11358
11387
  critical: "sf-card--critical",
11359
11388
  warning: "sf-card--warning",
11360
11389
  success: "sf-card--success"
11361
- }, el = {
11390
+ }, al = {
11362
11391
  1: "col-span-1",
11363
11392
  2: "col-span-1 sm:col-span-2",
11364
11393
  3: "col-span-1 sm:col-span-2 lg:col-span-3",
11365
11394
  4: "col-span-1 sm:col-span-2 lg:col-span-4",
11366
11395
  5: "col-span-1 sm:col-span-2 lg:col-span-5",
11367
11396
  6: "col-span-1 sm:col-span-2 lg:col-span-6"
11368
- }, tl = {
11397
+ }, ol = {
11369
11398
  none: "",
11370
11399
  sm: "p-3",
11371
11400
  md: "p-4",
11372
11401
  lg: "p-5"
11373
- }, nl = {
11402
+ }, sl = {
11374
11403
  visible: "",
11375
11404
  auto: "overflow-auto",
11376
11405
  hidden: "overflow-hidden"
11377
- }, rl = () => /* @__PURE__ */ v("div", {
11406
+ }, cl = () => /* @__PURE__ */ v("div", {
11378
11407
  className: "sf-card-state__spinner",
11379
11408
  role: "status",
11380
11409
  "aria-label": "Cargando",
11381
11410
  children: /* @__PURE__ */ v("span", { className: "sf-card-state__spinner-ring" })
11382
- }), il = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", look: s = "default", headerSize: c = s === "board" ? "md" : "sm", headerWrap: l = s === "board", headerDivider: u = s !== "board", footer: d, state: f = "idle", loadingMessage: p = "Cargando…", errorMessage: m = "No se pudo cargar la información.", emptyMessage: h = "Sin datos para mostrar.", onRetry: g, retryLabel: b = "Reintentar", minHeight: x, bodyOverflow: S = "visible", className: C, children: w }) => {
11411
+ }), ll = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", look: s = "default", headerSize: c = s === "board" ? "md" : "sm", headerWrap: l = s === "board", headerDivider: u = s !== "board", footer: d, state: f = "idle", loadingMessage: p = "Cargando…", errorMessage: m = "No se pudo cargar la información.", emptyMessage: h = "Sin datos para mostrar.", onRetry: g, retryLabel: b = "Reintentar", minHeight: x, bodyOverflow: S = "visible", className: C, children: w }) => {
11383
11412
  let T = x === void 0 ? void 0 : { minHeight: x }, E = f !== "idle" && /* @__PURE__ */ y("div", {
11384
11413
  className: "sf-card-state",
11385
11414
  style: T,
11386
11415
  role: f === "error" ? "alert" : f === "empty" ? "status" : void 0,
11387
11416
  children: [
11388
- f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(rl, {}), p && /* @__PURE__ */ v("p", {
11417
+ f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(cl, {}), p && /* @__PURE__ */ v("p", {
11389
11418
  className: "sf-card-state__message",
11390
11419
  children: p
11391
11420
  })] }),
@@ -11407,7 +11436,7 @@ var jr = (e) => {
11407
11436
  return /* @__PURE__ */ y("div", {
11408
11437
  role: e ? "region" : void 0,
11409
11438
  "aria-label": e,
11410
- className: (0, X.default)("sf-card flex flex-col overflow-hidden", $c[i], el[a], C),
11439
+ className: (0, X.default)("sf-card flex flex-col overflow-hidden", il[i], al[a], C),
11411
11440
  children: [
11412
11441
  (e || n || r) && /* @__PURE__ */ y("div", {
11413
11442
  className: (0, X.default)("sf-card-header", c === "md" && "sf-card-header--md", l && "sf-card-header--wrap", !u && "sf-card-header--no-divider"),
@@ -11438,7 +11467,7 @@ var jr = (e) => {
11438
11467
  ]
11439
11468
  }),
11440
11469
  /* @__PURE__ */ v("div", {
11441
- className: (0, X.default)("flex-1", tl[o], nl[S]),
11470
+ className: (0, X.default)("flex-1", ol[o], sl[S]),
11442
11471
  style: f === "idle" ? T : void 0,
11443
11472
  children: f === "idle" ? w : E
11444
11473
  }),
@@ -11448,24 +11477,24 @@ var jr = (e) => {
11448
11477
  })
11449
11478
  ]
11450
11479
  });
11451
- }, al = {
11480
+ }, ul = {
11452
11481
  2: "grid-cols-1 sm:grid-cols-2",
11453
11482
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
11454
11483
  4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
11455
11484
  5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
11456
11485
  6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6"
11457
- }, ol = {
11486
+ }, dl = {
11458
11487
  sm: "gap-2",
11459
11488
  md: "gap-3",
11460
11489
  lg: "gap-5"
11461
- }, sl = {
11490
+ }, fl = {
11462
11491
  stretch: "items-stretch",
11463
11492
  start: "items-start"
11464
- }, cl = ({ cols: e = 4, gap: t = "md", alignItems: n = "stretch", minColWidth: r, className: i, children: a }) => /* @__PURE__ */ v("div", {
11465
- className: (0, X.default)("grid", !r && al[e], ol[t], sl[n], i),
11493
+ }, pl = ({ cols: e = 4, gap: t = "md", alignItems: n = "stretch", minColWidth: r, className: i, children: a }) => /* @__PURE__ */ v("div", {
11494
+ className: (0, X.default)("grid", !r && ul[e], dl[t], fl[n], i),
11466
11495
  style: r ? { gridTemplateColumns: `repeat(auto-fit, minmax(${r}, 1fr))` } : void 0,
11467
11496
  children: a
11468
- }), ll = ({ title: e, subtitle: t, action: n, icon: r, iconSize: i = "md", variant: a = "plain", className: o, children: s }) => /* @__PURE__ */ y("section", {
11497
+ }), ml = ({ title: e, subtitle: t, action: n, icon: r, iconSize: i = "md", variant: a = "plain", className: o, children: s }) => /* @__PURE__ */ y("section", {
11469
11498
  className: (0, X.default)("flex flex-col gap-3", a === "panel" && "sf-section--panel", o),
11470
11499
  "aria-label": e,
11471
11500
  children: [/* @__PURE__ */ y("div", {
@@ -11488,13 +11517,13 @@ var jr = (e) => {
11488
11517
  children: n
11489
11518
  })]
11490
11519
  }), s]
11491
- }), ul = {
11520
+ }), hl = {
11492
11521
  slate: "sf-stat-tone--slate",
11493
11522
  emerald: "sf-stat-tone--emerald",
11494
11523
  amber: "sf-stat-tone--amber",
11495
11524
  red: "sf-stat-tone--red",
11496
11525
  blue: "sf-stat-tone--blue"
11497
- }, dl = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11526
+ }, gl = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11498
11527
  role: "list",
11499
11528
  "aria-label": "Resumen de métricas",
11500
11529
  className: (0, X.default)("flex flex-wrap items-center gap-5 border-t border-[var(--sf-border)] bg-[var(--sf-card-bg)] px-4 py-2", t),
@@ -11503,7 +11532,7 @@ var jr = (e) => {
11503
11532
  role: "listitem",
11504
11533
  children: [
11505
11534
  e.tone && /* @__PURE__ */ v("span", {
11506
- className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", ul[e.tone]),
11535
+ className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", hl[e.tone]),
11507
11536
  "aria-hidden": "true"
11508
11537
  }),
11509
11538
  /* @__PURE__ */ y("span", {
@@ -11516,7 +11545,7 @@ var jr = (e) => {
11516
11545
  })
11517
11546
  ]
11518
11547
  }, t))
11519
- }), fl = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
11548
+ }), _l = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
11520
11549
  className: "sf-card flex min-h-[480px] flex-col overflow-hidden bg-[var(--sf-page-bg)]",
11521
11550
  role: "region",
11522
11551
  "aria-label": "Dashboard",
@@ -11541,7 +11570,7 @@ var jr = (e) => {
11541
11570
  children: n
11542
11571
  })
11543
11572
  ]
11544
- }), pl = ({ title: e, onClose: t, headerAction: n, icon: r, iconSize: i = "sm", heading: a, badge: o, rows: s = [], align: c = "stack", actions: l, sectionTitle: u, items: d = [], width: f = 320, className: p }) => {
11573
+ }), vl = ({ title: e, onClose: t, headerAction: n, icon: r, iconSize: i = "sm", heading: a, badge: o, rows: s = [], align: c = "stack", actions: l, sectionTitle: u, items: d = [], width: f = 320, className: p }) => {
11545
11574
  let m = typeof f == "number" ? `${f}px` : f;
11546
11575
  return /* @__PURE__ */ y("aside", {
11547
11576
  className: (0, X.default)("sf-detail-side-panel", p),
@@ -11634,17 +11663,17 @@ var jr = (e) => {
11634
11663
  })
11635
11664
  ]
11636
11665
  });
11637
- }, ml = ({ text: e, tone: t = "info", className: n }) => /* @__PURE__ */ y("div", {
11666
+ }, yl = ({ text: e, tone: t = "info", className: n }) => /* @__PURE__ */ y("div", {
11638
11667
  className: (0, X.default)("sf-card-note", t === "warning" && "sf-card-note--warning", n),
11639
11668
  role: "note",
11640
11669
  children: [/* @__PURE__ */ v(ut, {
11641
11670
  className: "sf-card-note__icon",
11642
11671
  "aria-hidden": "true"
11643
11672
  }), /* @__PURE__ */ v("span", { children: e })]
11644
- }), hl = (e) => e >= 5 ? 5 : e === 4 ? 4 : 3, gl = ({ block: e }) => e.left && e.right ? /* @__PURE__ */ y("div", {
11673
+ }), bl = (e) => e >= 5 ? 5 : e === 4 ? 4 : 3, xl = ({ block: e }) => e.left && e.right ? /* @__PURE__ */ y("div", {
11645
11674
  className: "sf-board__split",
11646
11675
  children: [e.left, e.right]
11647
- }) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }), _l = ({ kpis: e = [], notes: t = [], hidden: n = [], hiddenTitle: r = (e) => `${e} indicador(es) no aplican a esta empresa`, detail: i, primary: a, secondary: o }) => {
11676
+ }) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }), Sl = ({ kpis: e = [], notes: t = [], hidden: n = [], hiddenTitle: r = (e) => `${e} indicador(es) no aplican a esta empresa`, detail: i, primary: a, secondary: o }) => {
11648
11677
  let s = e.filter((e) => e != null && e !== !1);
11649
11678
  return /* @__PURE__ */ y(_, { children: [
11650
11679
  (n.length > 0 || t.length > 0) && /* @__PURE__ */ y("div", {
@@ -11666,31 +11695,34 @@ var jr = (e) => {
11666
11695
  })]
11667
11696
  }),
11668
11697
  s.length > 0 && /* @__PURE__ */ v("div", {
11669
- className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${hl(s.length)}`),
11670
- children: s
11698
+ className: "sf-board__kpis-area",
11699
+ children: /* @__PURE__ */ v("div", {
11700
+ className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${bl(s.length)}`),
11701
+ children: s
11702
+ })
11671
11703
  }),
11672
11704
  i,
11673
- a && /* @__PURE__ */ v(gl, { block: a }),
11674
- o && /* @__PURE__ */ v(gl, { block: o })
11705
+ a && /* @__PURE__ */ v(xl, { block: a }),
11706
+ o && /* @__PURE__ */ v(xl, { block: o })
11675
11707
  ] });
11676
- }, vl = ({ children: e, className: t }) => {
11708
+ }, Cl = ({ children: e, className: t }) => {
11677
11709
  let n = e.filter(Boolean), r = n.length >= 3 ? 3 : 2;
11678
11710
  return /* @__PURE__ */ v("div", {
11679
11711
  className: (0, X.default)("sf-card-row", `sf-card-row--${r}`, t),
11680
11712
  children: n
11681
11713
  });
11682
- }, yl = (e) => {
11714
+ }, wl = (e) => {
11683
11715
  let [t, n] = h(0), [r, i] = h(e);
11684
11716
  return r !== e && (i(e), n(0)), u(() => {
11685
11717
  if (!e) return;
11686
11718
  let t = Date.now(), r = window.setInterval(() => n(Math.floor((Date.now() - t) / 1e3)), 1e3);
11687
11719
  return () => window.clearInterval(r);
11688
11720
  }, [e]), t;
11689
- }, bl = (e) => new Date(e).toLocaleTimeString("es-PE", {
11721
+ }, Tl = (e) => new Date(e).toLocaleTimeString("es-PE", {
11690
11722
  hour: "2-digit",
11691
11723
  minute: "2-digit"
11692
- }), xl = ({ loading: e, updatedAt: t, live: n, cutoffLabel: r, onRefresh: i, refreshLabel: a, slowAfterSeconds: o }) => {
11693
- let s = yl(!!e), c = t ? bl(t) : null, l = c ? `datos de las ${c}` : "";
11724
+ }), El = ({ loading: e, updatedAt: t, live: n, cutoffLabel: r, onRefresh: i, refreshLabel: a, slowAfterSeconds: o }) => {
11725
+ let s = wl(!!e), c = t ? Tl(t) : null, l = c ? `datos de las ${c}` : "";
11694
11726
  return e ? l = s >= o ? `calculando… ${s} s` : "calculando…" : n && c && (l = `datos en vivo · ${c}`), /* @__PURE__ */ y("div", {
11695
11727
  className: "sf-page-frame__status",
11696
11728
  "aria-live": "polite",
@@ -11714,15 +11746,15 @@ var jr = (e) => {
11714
11746
  })
11715
11747
  ]
11716
11748
  });
11717
- }, Sl = ({ title: e, subtitle: t, mode: n = "range", range: r, onApply: i, fromLabel: a = "Desde", toLabel: o = "Hasta", dayLabel: s = "Día de corte", compareFieldLabel: c = n === "day" ? "Nota" : "Comparar", validate: l, error: u = null, loading: d = !1, updatedAt: f = null, live: p = !1, cutoffLabel: m, onRefresh: g, refreshLabel: b = "Actualizar", compareLabel: x = n === "day" ? "" : "con el período anterior de igual duración", pendingLabel: S = n === "day" ? "Pulsa «Aplicar» para consultar el nuevo día" : "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: C = "Aplicar", filterAriaLabel: w = "Filtro del tablero", slowAfterSeconds: T = 3, className: E, children: D }) => {
11718
- let [O, k] = h(null), A = O && O.base.from === r.from && O.base.to === r.to ? O : null, j = A?.draft ?? r, M = A?.error ?? null, N = (e) => k({
11749
+ }, Dl = ({ title: e, subtitle: t, mode: n = "range", range: r, onApply: i, fromLabel: a = "Desde", toLabel: o = "Hasta", dayLabel: s = "Día de corte", compareFieldLabel: c = n === "day" ? "Nota" : "Comparar", validate: l, error: u = null, loading: d = !1, stale: f = !1, updatedAt: p = null, live: m = !1, cutoffLabel: g, onRefresh: b, refreshLabel: x = "Actualizar", compareLabel: S = n === "day" ? "" : "con el período anterior de igual duración", pendingLabel: C = n === "day" ? "Pulsa «Aplicar» para consultar el nuevo día" : "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: w = "Aplicar", filterAriaLabel: T = "Filtro del tablero", slowAfterSeconds: E = 3, className: D, children: O }) => {
11750
+ let [k, A] = h(null), j = k && k.base.from === r.from && k.base.to === r.to ? k : null, M = j?.draft ?? r, N = j?.error ?? null, P = (e) => A({
11719
11751
  base: r,
11720
11752
  draft: e,
11721
11753
  error: null
11722
- }), P = j.from !== r.from || j.to !== r.to;
11754
+ }), F = M.from !== r.from || M.to !== r.to;
11723
11755
  return /* @__PURE__ */ v("div", {
11724
- className: E,
11725
- children: /* @__PURE__ */ y(fl, {
11756
+ className: D,
11757
+ children: /* @__PURE__ */ y(_l, {
11726
11758
  header: /* @__PURE__ */ y("div", {
11727
11759
  className: "sf-page-frame__header",
11728
11760
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
@@ -11731,85 +11763,90 @@ var jr = (e) => {
11731
11763
  }), t && /* @__PURE__ */ v("p", {
11732
11764
  className: "sf-page-frame__subtitle",
11733
11765
  children: t
11734
- })] }), /* @__PURE__ */ v(xl, {
11766
+ })] }), /* @__PURE__ */ v(El, {
11735
11767
  loading: d,
11736
- updatedAt: f,
11737
- live: p,
11738
- cutoffLabel: m,
11739
- onRefresh: g,
11740
- refreshLabel: b,
11741
- slowAfterSeconds: T
11768
+ updatedAt: p,
11769
+ live: m,
11770
+ cutoffLabel: g,
11771
+ onRefresh: b,
11772
+ refreshLabel: x,
11773
+ slowAfterSeconds: E
11742
11774
  })]
11743
11775
  }),
11744
11776
  children: [
11745
11777
  /* @__PURE__ */ y(Aa, {
11746
- ariaLabel: w,
11778
+ ariaLabel: T,
11747
11779
  onApply: () => {
11748
- let e = l ? l(j) : null;
11749
- k({
11780
+ let e = l ? l(M) : null;
11781
+ A({
11750
11782
  base: r,
11751
- draft: j,
11783
+ draft: M,
11752
11784
  error: e
11753
- }), e || i(j);
11785
+ }), e || i(M);
11754
11786
  },
11755
- applyLabel: C,
11756
- applyLoading: d && !P,
11787
+ applyLabel: w,
11788
+ applyLoading: d && !F,
11757
11789
  children: [n === "day" ? /* @__PURE__ */ v(ja, {
11758
11790
  label: s,
11759
11791
  className: "sf-page-frame__day",
11760
11792
  children: /* @__PURE__ */ v(Ma, {
11761
- value: j.to,
11762
- onChange: (e) => N({
11763
- ...j,
11793
+ value: M.to,
11794
+ onChange: (e) => P({
11795
+ ...M,
11764
11796
  to: e
11765
11797
  })
11766
11798
  })
11767
11799
  }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ja, {
11768
11800
  label: a,
11769
11801
  children: /* @__PURE__ */ v(Ma, {
11770
- value: j.from,
11771
- onChange: (e) => N({
11772
- ...j,
11802
+ value: M.from,
11803
+ onChange: (e) => P({
11804
+ ...M,
11773
11805
  from: e
11774
11806
  })
11775
11807
  })
11776
11808
  }), /* @__PURE__ */ v(ja, {
11777
11809
  label: o,
11778
11810
  children: /* @__PURE__ */ v(Ma, {
11779
- value: j.to,
11780
- onChange: (e) => N({
11781
- ...j,
11811
+ value: M.to,
11812
+ onChange: (e) => P({
11813
+ ...M,
11782
11814
  to: e
11783
11815
  })
11784
11816
  })
11785
- })] }), (P ? S : x) && /* @__PURE__ */ v(ja, {
11817
+ })] }), (F ? C : S) && /* @__PURE__ */ v(ja, {
11786
11818
  label: c,
11787
11819
  children: /* @__PURE__ */ v("span", {
11788
11820
  className: "sf-page-frame__compare",
11789
- children: P ? S : x
11821
+ children: F ? C : S
11790
11822
  })
11791
11823
  })]
11792
11824
  }),
11793
- (M || u) && /* @__PURE__ */ v(ni, {
11825
+ (N || u) && /* @__PURE__ */ v(ni, {
11794
11826
  variant: "warning",
11795
11827
  title: "Rango no válido",
11796
- message: M ?? u
11828
+ message: N ?? u
11797
11829
  }),
11798
- u ? null : D
11830
+ u ? null : /* @__PURE__ */ v("div", {
11831
+ className: "sf-page-frame__content",
11832
+ "data-stale": f ? "" : void 0,
11833
+ "aria-busy": f || void 0,
11834
+ children: O
11835
+ })
11799
11836
  ]
11800
11837
  })
11801
11838
  });
11802
- }, Cl = [
11839
+ }, Ol = [
11803
11840
  70,
11804
11841
  55,
11805
11842
  40,
11806
11843
  25
11807
- ], wl = ({ shape: e }) => e === "chart" ? /* @__PURE__ */ v(fi, {
11844
+ ], kl = ({ shape: e }) => e === "chart" ? /* @__PURE__ */ v(fi, {
11808
11845
  variant: "block",
11809
11846
  height: 220
11810
11847
  }) : /* @__PURE__ */ v("div", {
11811
11848
  className: "sf-placeholder__rows",
11812
- children: Cl.map((t) => /* @__PURE__ */ y("div", {
11849
+ children: Ol.map((t) => /* @__PURE__ */ y("div", {
11813
11850
  className: "sf-placeholder__row",
11814
11851
  children: [/* @__PURE__ */ v(fi, {
11815
11852
  variant: "text",
@@ -11820,7 +11857,7 @@ var jr = (e) => {
11820
11857
  width: `${t}%`
11821
11858
  })]
11822
11859
  }, t))
11823
- }), Tl = ({ title: e, shape: t = "kpi", state: n = "loading", errorMessage: r = "No se pudo obtener este dato. Vuelve a intentarlo en unos minutos.", onRetry: i, className: a }) => n === "error" ? /* @__PURE__ */ v(il, {
11860
+ }), Al = ({ title: e, shape: t = "kpi", state: n = "loading", errorMessage: r = "No se pudo obtener este dato. Vuelve a intentarlo en unos minutos.", onRetry: i, className: a }) => n === "error" ? /* @__PURE__ */ v(ll, {
11824
11861
  title: e,
11825
11862
  headerSize: "md",
11826
11863
  headerDivider: !1,
@@ -11828,7 +11865,7 @@ var jr = (e) => {
11828
11865
  errorMessage: r,
11829
11866
  onRetry: i,
11830
11867
  className: a
11831
- }) : t === "kpi" ? /* @__PURE__ */ v(il, {
11868
+ }) : t === "kpi" ? /* @__PURE__ */ v(ll, {
11832
11869
  padding: "lg",
11833
11870
  className: a,
11834
11871
  children: /* @__PURE__ */ y("div", {
@@ -11858,7 +11895,7 @@ var jr = (e) => {
11858
11895
  ]
11859
11896
  })]
11860
11897
  })
11861
- }) : /* @__PURE__ */ v(il, {
11898
+ }) : /* @__PURE__ */ v(ll, {
11862
11899
  title: e,
11863
11900
  headerSize: "md",
11864
11901
  headerWrap: !0,
@@ -11867,14 +11904,14 @@ var jr = (e) => {
11867
11904
  children: /* @__PURE__ */ v("div", {
11868
11905
  role: "status",
11869
11906
  "aria-label": `Cargando ${e}`,
11870
- children: /* @__PURE__ */ v(wl, { shape: t })
11907
+ children: /* @__PURE__ */ v(kl, { shape: t })
11871
11908
  })
11872
- }), El = (e) => {
11909
+ }), jl = (e) => {
11873
11910
  let t = String(e ?? ""), n = 0;
11874
11911
  for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
11875
11912
  let r = t.slice(n);
11876
11913
  return /^[=+\-@]/.test(r) ? `'${t}` : t;
11877
- }, Dl = (e) => El(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), Ol = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", kl = (e, t) => {
11914
+ }, Ml = (e) => jl(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), Nl = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", Pl = (e, t) => {
11878
11915
  if (typeof document > "u") return;
11879
11916
  let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
11880
11917
  <?mso-application progid="Excel.Sheet"?>
@@ -11887,30 +11924,30 @@ var jr = (e) => {
11887
11924
  </Styles>
11888
11925
  <Worksheet ss:Name="Export">
11889
11926
  <Table>
11890
- <Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Dl(e.header)}</Data></Cell>`).join("")}</Row>
11927
+ <Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Ml(e.header)}</Data></Cell>`).join("")}</Row>
11891
11928
  ${e.map((e) => `<Row>${n.map((t) => {
11892
- let n = t.getValue(e), r = Ol(n);
11893
- return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Dl(n)}</Data></Cell>`;
11929
+ let n = t.getValue(e), r = Nl(n);
11930
+ return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Ml(n)}</Data></Cell>`;
11894
11931
  }).join("")}</Row>`).join("")}
11895
11932
  </Table>
11896
11933
  </Worksheet>
11897
11934
  </Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
11898
11935
  s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
11899
- }, Al = () => {
11936
+ }, Fl = () => {
11900
11937
  let [e, t] = h(null);
11901
11938
  return {
11902
11939
  open: e,
11903
11940
  toggle: (e) => t((t) => t?.id === e.id ? null : e),
11904
11941
  close: () => t(null)
11905
11942
  };
11906
- }, jl = (e, t) => `Mostrando ${e} de ${t} — exporta a Excel para ver la lista completa.`, Ml = (e) => `${e} registro${e === 1 ? "" : "s"}.`, Nl = ({ detail: e, rowMapper: t = (e) => e, subtitle: n = "Registros detrás de la cifra", countLabel: r = (e) => `${e} registros`, previewRows: i = 10, previewNote: a = jl, totalNote: o = Ml, emptyMessage: s = "Sin registros en este caso", closeLabel: c = "Cerrar detalle", exportLabel: l = "Exportar Excel", exportFilename: u = (e, t) => t ? `${e.id}-${t}` : e.id, actions: d }) => {
11943
+ }, Il = (e, t) => `Mostrando ${e} de ${t} — exporta a Excel para ver la lista completa.`, Ll = (e) => `${e} registro${e === 1 ? "" : "s"}.`, Rl = ({ detail: e, rowMapper: t = (e) => e, subtitle: n = "Registros detrás de la cifra", countLabel: r = (e) => `${e} registros`, previewRows: i = 10, previewNote: a = Il, totalNote: o = Ll, emptyMessage: s = "Sin registros en este caso", closeLabel: c = "Cerrar detalle", exportLabel: l = "Exportar Excel", exportFilename: u = (e, t) => t ? `${e.id}-${t}` : e.id, actions: d }) => {
11907
11944
  let f = e.open, [p, m] = h(null);
11908
11945
  if (!f) return null;
11909
11946
  let g = p?.specId === f.id ? p.groupId : null, _ = f.groups?.find((e) => e.id === g) ?? f.groups?.[0] ?? null, b = _ ? _.rows : f.rows, x = b.map(t), S = f.columns.map((e) => ({
11910
11947
  accessorKey: e.key,
11911
11948
  header: e.header
11912
11949
  })), C = f.groups ? f.groups.reduce((e, t) => e + t.rows.length, 0) : f.rows.length;
11913
- return /* @__PURE__ */ y(il, {
11950
+ return /* @__PURE__ */ y(ll, {
11914
11951
  title: f.title,
11915
11952
  subtitle: n,
11916
11953
  headerAction: /* @__PURE__ */ y("div", {
@@ -11945,20 +11982,23 @@ ${e.map((e) => `<Row>${n.map((t) => {
11945
11982
  label: e.title,
11946
11983
  count: e.rows.length
11947
11984
  }))
11948
- }), _.note && /* @__PURE__ */ v(ml, {
11985
+ }), _.note && /* @__PURE__ */ v(yl, {
11949
11986
  text: _.note,
11950
11987
  className: "sf-detail-panel__group-note"
11951
11988
  })]
11952
11989
  }),
11953
- /* @__PURE__ */ v(kr, {
11954
- data: x.slice(0, i),
11955
- columns: S,
11956
- title: "",
11957
- enableRowSelection: !1,
11958
- enableSorting: !1,
11959
- enableFiltering: !1,
11960
- enablePagination: !1,
11961
- emptyMessage: s
11990
+ /* @__PURE__ */ v("div", {
11991
+ className: "sf-detail-panel__table",
11992
+ children: /* @__PURE__ */ v(kr, {
11993
+ data: x.slice(0, i),
11994
+ columns: S,
11995
+ title: "",
11996
+ enableRowSelection: !1,
11997
+ enableSorting: !1,
11998
+ enableFiltering: !1,
11999
+ enablePagination: !1,
12000
+ emptyMessage: s
12001
+ })
11962
12002
  }),
11963
12003
  /* @__PURE__ */ y("div", {
11964
12004
  className: "sf-detail-panel__footer",
@@ -11977,12 +12017,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
11977
12017
  size: "sm",
11978
12018
  icon: /* @__PURE__ */ v(mt, {}),
11979
12019
  disabled: b.length === 0,
11980
- onClick: () => kl(x, {
12020
+ onClick: () => Pl(x, {
11981
12021
  filename: `${u(f, _?.id ?? null)}.xls`,
11982
12022
  columns: f.columns.map((e) => ({
11983
12023
  id: e.key,
11984
12024
  header: e.header,
11985
- getValue: (t) => String(t[e.key] ?? "")
12025
+ getValue: (t) => String(t[e.exportKey ?? e.key] ?? "")
11986
12026
  }))
11987
12027
  }),
11988
12028
  children: l
@@ -11991,8 +12031,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
11991
12031
  })
11992
12032
  ]
11993
12033
  });
11994
- }, Pl = (e) => e != null && (e.rows.length > 0 || (e.groups ?? []).some((e) => e.rows.length > 0)), Fl = ({ label: e, value: t, sublabel: n, icon: r, accentTone: i, primary: a = !1, trend: o = null, trendDirection: s = "neutral", trendLabel: c = "vs. período anterior", detail: l, spec: u }) => {
11995
- let d = Pl(u);
12034
+ }, zl = (e) => e != null && (e.rows.length > 0 || (e.groups ?? []).some((e) => e.rows.length > 0)), Bl = ({ label: e, value: t, sublabel: n, icon: r, accentTone: i, primary: a = !1, trend: o = null, trendDirection: s = "neutral", trendLabel: c = "vs. período anterior", detail: l, spec: u }) => {
12035
+ let d = zl(u);
11996
12036
  return /* @__PURE__ */ v(As, {
11997
12037
  layout: "leading-icon",
11998
12038
  size: "lg",
@@ -12010,21 +12050,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
12010
12050
  selected: u != null && l.open?.id === u.id,
12011
12051
  onClick: d ? () => l.toggle(u) : void 0
12012
12052
  });
12013
- }, Il = ({ items: e, detail: t, zeroTone: n = "success", emptyMessage: r = "Nada pendiente" }) => {
12053
+ }, Vl = ({ items: e, detail: t, zeroTone: n = "success", emptyMessage: r = "Nada pendiente" }) => {
12014
12054
  let i = e.map((e) => ({
12015
12055
  label: e.label,
12016
12056
  description: e.description,
12017
12057
  value: e.value,
12018
12058
  tone: e.count > 0 ? e.tone : n,
12019
- onClick: Pl(e.spec) ? () => t.toggle(e.spec) : void 0
12059
+ onClick: zl(e.spec) ? () => t.toggle(e.spec) : void 0
12020
12060
  }));
12021
- return /* @__PURE__ */ v(il, { children: /* @__PURE__ */ v(Yc, {
12061
+ return /* @__PURE__ */ v(ll, { children: /* @__PURE__ */ v(el, {
12022
12062
  items: i,
12023
12063
  showIcon: !0,
12024
12064
  showChevron: !0,
12025
12065
  emptyMessage: r
12026
12066
  }) });
12027
- }, Ll = ({ items: e, total: t, totalLabel: n, unit: r = "registros", previewCount: i = 5, emptyText: a, onOpen: o, openLabel: s = "Ver detalle" }) => {
12067
+ }, Hl = ({ items: e, total: t, totalLabel: n, unit: r = "registros", previewCount: i = 5, emptyText: a, onOpen: o, openLabel: s = "Ver detalle" }) => {
12028
12068
  if (t === 0) return /* @__PURE__ */ v("p", {
12029
12069
  className: "sf-detail-preview__empty",
12030
12070
  children: a
@@ -12072,7 +12112,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12072
12112
  }) })
12073
12113
  ]
12074
12114
  });
12075
- }, Rl = ({ title: e, icon: t, tone: n = "default", rows: r = [], children: i, className: a, density: o = "md" }) => {
12115
+ }, Ul = ({ title: e, icon: t, tone: n = "default", rows: r = [], children: i, className: a, density: o = "md" }) => {
12076
12116
  let s = r.length > 0 || !!i;
12077
12117
  return /* @__PURE__ */ y("section", {
12078
12118
  className: (0, X.default)("sf-detail-section", n !== "default" && `sf-detail-section--${n}`, o === "sm" && "sf-detail-section--sm", a),
@@ -12113,15 +12153,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
12113
12153
  })]
12114
12154
  })]
12115
12155
  });
12116
- }, zl = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), Bl = (e, t) => {
12156
+ }, Wl = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), Gl = (e, t) => {
12117
12157
  let n = ln(String(e ?? ""), t);
12118
12158
  return Array.from({ length: t }, (e, t) => n[t] ?? "");
12119
- }, Vl = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
12159
+ }, Kl = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
12120
12160
  let u = b({
12121
12161
  name: t,
12122
12162
  control: e.control
12123
- }), d = m([]), [f, p] = h(() => Bl(u.field.value, c)), [g, _] = h(u.field.value);
12124
- u.field.value !== g && (_(u.field.value), p(Bl(u.field.value, c)));
12163
+ }), d = m([]), [f, p] = h(() => Gl(u.field.value, c)), [g, _] = h(u.field.value);
12164
+ u.field.value !== g && (_(u.field.value), p(Gl(u.field.value, c)));
12125
12165
  let y = String(t), x = u.fieldState.error?.message ? String(u.fieldState.error.message) : void 0, S = (e) => {
12126
12166
  p(e);
12127
12167
  let t = e.join("");
@@ -12165,7 +12205,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12165
12205
  onBlur: () => u.field.onBlur(),
12166
12206
  onChange: (e) => C(t, e.target.value),
12167
12207
  onKeyDown: (e) => w(t, e),
12168
- className: zl({
12208
+ className: Wl({
12169
12209
  small: o,
12170
12210
  error: !!x,
12171
12211
  disabled: a
@@ -12173,15 +12213,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
12173
12213
  }, t))
12174
12214
  })
12175
12215
  });
12176
- }, Hl = (e) => {
12216
+ }, ql = (e) => {
12177
12217
  let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
12178
12218
  return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
12179
- }, Ul = ({ 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 }) => {
12219
+ }, Jl = ({ 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 }) => {
12180
12220
  let f = String(e.watch(t) ?? ""), p = (t, r) => {
12181
12221
  if (l === "none") return;
12182
12222
  let i = t.slice(0, 10), a = r.slice(0, 10);
12183
12223
  if (!Mn(i) || !Mn(a) || a >= i) return;
12184
- let o = l === "month-end" ? Hl(i) : i;
12224
+ let o = l === "month-end" ? ql(i) : i;
12185
12225
  e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
12186
12226
  };
12187
12227
  return /* @__PURE__ */ y("div", {
@@ -12206,16 +12246,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
12206
12246
  onChange: (n) => p(String(e.getValues(t) ?? ""), n)
12207
12247
  })]
12208
12248
  });
12209
- }, Wl = (e) => /* @__PURE__ */ v(Rn, {
12249
+ }, Yl = (e) => /* @__PURE__ */ v(Rn, {
12210
12250
  ...e,
12211
12251
  utc: !0
12212
- }), Gl = () => ({
12252
+ }), Xl = () => ({
12213
12253
  start: "",
12214
12254
  end: ""
12215
- }), Kl = () => ({
12255
+ }), Zl = () => ({
12216
12256
  start: "",
12217
12257
  end: ""
12218
- }), ql = 0, Jl = () => (ql += 1, `photo_${Date.now()}_${ql}`), Yl = (e, t) => {
12258
+ }), Ql = 0, $l = () => (Ql += 1, `photo_${Date.now()}_${Ql}`), eu = (e, t) => {
12219
12259
  if (!t || t === "*") return !0;
12220
12260
  let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
12221
12261
  return n.some((e) => {
@@ -12227,20 +12267,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
12227
12267
  }
12228
12268
  return i === t;
12229
12269
  });
12230
- }, Xl = (e, t = !1) => new Promise((n) => {
12270
+ }, tu = (e, t = !1) => new Promise((n) => {
12231
12271
  let r = document.createElement("input");
12232
12272
  r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
12233
12273
  n(Array.from(r.files ?? [])), r.remove();
12234
12274
  }, document.body.appendChild(r), r.click();
12235
- }), Zl = (e) => ({
12236
- id: Jl(),
12275
+ }), nu = (e) => ({
12276
+ id: $l(),
12237
12277
  preview: URL.createObjectURL(e),
12238
12278
  file: e
12239
- }), Ql = (e) => {
12279
+ }), ru = (e) => {
12240
12280
  URL.revokeObjectURL(e.preview);
12241
- }, $l = (e) => {
12242
- e.forEach(Ql);
12243
- }, eu = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], tu = (e, t = .92) => new Promise((n, r) => {
12281
+ }, iu = (e) => {
12282
+ e.forEach(ru);
12283
+ }, au = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], ou = (e, t = .92) => new Promise((n, r) => {
12244
12284
  let i = URL.createObjectURL(e), a = new Image();
12245
12285
  a.onload = () => {
12246
12286
  let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
@@ -12263,7 +12303,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12263
12303
  }, a.onerror = () => {
12264
12304
  URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
12265
12305
  }, a.src = i;
12266
- }), nu = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, ru = (e) => `${e.name}-${e.lastModified}-${e.size}`, iu = ({ 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: _ }) => {
12306
+ }), su = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, cu = (e) => `${e.name}-${e.lastModified}-${e.size}`, lu = ({ 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: _ }) => {
12267
12307
  let x = m(null), S = b({
12268
12308
  name: t,
12269
12309
  control: e.control
@@ -12272,7 +12312,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12272
12312
  return e ? Array.isArray(e) ? e : [e] : [];
12273
12313
  })(), L = async (e) => {
12274
12314
  if (g) for (let t of e) {
12275
- let e = ru(t);
12315
+ let e = cu(t);
12276
12316
  O((t) => new Set(t).add(e)), E((t) => ({
12277
12317
  ...t,
12278
12318
  [e]: 0
@@ -12297,7 +12337,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12297
12337
  }
12298
12338
  }
12299
12339
  }, R = (e) => {
12300
- let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && Yl(e, a)), r = e.length - n.length;
12340
+ let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && eu(e, a)), r = e.length - n.length;
12301
12341
  if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
12302
12342
  let e = [...I, ...n];
12303
12343
  S.field.onChange(e), p?.(e), L(n);
@@ -12351,7 +12391,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12351
12391
  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"),
12352
12392
  children: [/* @__PURE__ */ v("span", {
12353
12393
  className: "sf-file-drop__title",
12354
- children: C ? "Suelta aquí" : c ?? nu(I)
12394
+ children: C ? "Suelta aquí" : c ?? su(I)
12355
12395
  }), /* @__PURE__ */ y("span", {
12356
12396
  className: "sf-file-drop__hint",
12357
12397
  children: [
@@ -12366,7 +12406,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12366
12406
  className: "sf-file-list",
12367
12407
  "aria-label": "Archivos seleccionados",
12368
12408
  children: I.map((e) => {
12369
- let t = ru(e), n = T[t], r = D.has(t);
12409
+ let t = cu(e), n = T[t], r = D.has(t);
12370
12410
  return /* @__PURE__ */ y("li", {
12371
12411
  className: "sf-file-list__item",
12372
12412
  children: [/* @__PURE__ */ y("span", {
@@ -12395,7 +12435,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12395
12435
  ]
12396
12436
  })
12397
12437
  });
12398
- }, au = ({ 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: _ }) => {
12438
+ }, uu = ({ 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: _ }) => {
12399
12439
  let x = m(null), S = b({
12400
12440
  name: t,
12401
12441
  control: e.control
@@ -12485,7 +12525,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12485
12525
  ]
12486
12526
  })
12487
12527
  });
12488
- }, ou = ({ 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 }) => {
12528
+ }, du = ({ 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 }) => {
12489
12529
  let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
12490
12530
  name: t,
12491
12531
  control: e.control
@@ -12577,11 +12617,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
12577
12617
  })]
12578
12618
  })
12579
12619
  });
12580
- }, su = ({ 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 }) => {
12620
+ }, fu = ({ 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 }) => {
12581
12621
  let S = m(null), C = b({
12582
12622
  name: t,
12583
12623
  control: e.control
12584
- }), 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(() => eu(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
12624
+ }), 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(() => au(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
12585
12625
  k,
12586
12626
  a,
12587
12627
  A.length
@@ -12589,7 +12629,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12589
12629
  u(() => {
12590
12630
  N.current = A;
12591
12631
  }, [A]), u(() => () => {
12592
- for (let e of N.current) Ql(e);
12632
+ for (let e of N.current) ru(e);
12593
12633
  }, []);
12594
12634
  let P = s((e) => {
12595
12635
  C.field.onChange(e), _?.(e);
@@ -12604,7 +12644,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12604
12644
  D(`Hay imágenes que superan ${o} MB.`);
12605
12645
  return;
12606
12646
  }
12607
- let r = a - A.length, i = n.slice(0, r).map((e) => Zl(e));
12647
+ let r = a - A.length, i = n.slice(0, r).map((e) => nu(e));
12608
12648
  if (n.length > r) {
12609
12649
  D(`Solo puedes agregar ${r} imagen(es) más.`);
12610
12650
  return;
@@ -12617,7 +12657,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12617
12657
  A
12618
12658
  ]), I = s((e) => {
12619
12659
  let t = A.find((t) => t.id === e);
12620
- t && Ql(t), P(A.filter((t) => t.id !== e));
12660
+ t && ru(t), P(A.filter((t) => t.id !== e));
12621
12661
  }, [P, A]);
12622
12662
  return /* @__PURE__ */ v(Z, {
12623
12663
  id: w,
@@ -12689,19 +12729,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
12689
12729
  ]
12690
12730
  })
12691
12731
  });
12692
- }, cu = (e) => {
12732
+ }, pu = (e) => {
12693
12733
  switch (e.kind) {
12694
- case "photo": return /* @__PURE__ */ v(au, { ...e });
12695
- case "multiPhoto": return /* @__PURE__ */ v(su, { ...e });
12696
- case "signature": return /* @__PURE__ */ v(ou, { ...e });
12734
+ case "photo": return /* @__PURE__ */ v(uu, { ...e });
12735
+ case "multiPhoto": return /* @__PURE__ */ v(fu, { ...e });
12736
+ case "signature": return /* @__PURE__ */ v(du, { ...e });
12697
12737
  case "file": return /* @__PURE__ */ v(Un, { ...e });
12698
12738
  default: return null;
12699
12739
  }
12700
- }, lu = (e) => new Promise((t, n) => {
12740
+ }, mu = (e) => new Promise((t, n) => {
12701
12741
  let r = new Image();
12702
12742
  r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
12703
- }), uu = async (e, t, n, r = "image/jpeg") => {
12704
- let i = await lu(e), a = document.createElement("canvas");
12743
+ }), hu = async (e, t, n, r = "image/jpeg") => {
12744
+ let i = await mu(e), a = document.createElement("canvas");
12705
12745
  a.width = t.width, a.height = t.height;
12706
12746
  let o = a.getContext("2d");
12707
12747
  if (!o) throw Error("Canvas no disponible");
@@ -12714,7 +12754,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12714
12754
  e(new File([i], n, { type: r }));
12715
12755
  }, r, .92);
12716
12756
  });
12717
- }, du = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
12757
+ }, gu = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
12718
12758
  let [o, c] = h({
12719
12759
  x: 0,
12720
12760
  y: 0
@@ -12725,7 +12765,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12725
12765
  m(!0);
12726
12766
  try {
12727
12767
  let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
12728
- i(await uu(e, d, t, n));
12768
+ i(await hu(e, d, t, n));
12729
12769
  } finally {
12730
12770
  m(!1);
12731
12771
  }
@@ -12776,7 +12816,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12776
12816
  })
12777
12817
  ]
12778
12818
  });
12779
- }, fu = ({ 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 }) => {
12819
+ }, _u = ({ 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 }) => {
12780
12820
  let S = m(null), C = b({
12781
12821
  name: t,
12782
12822
  control: e.control
@@ -12805,7 +12845,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12805
12845
  }
12806
12846
  T(!0);
12807
12847
  try {
12808
- let t = await tu(e);
12848
+ let t = await ou(e);
12809
12849
  I(t);
12810
12850
  } finally {
12811
12851
  T(!1);
@@ -12897,7 +12937,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12897
12937
  role: "dialog",
12898
12938
  "aria-modal": "true",
12899
12939
  "aria-label": "Editor de recorte",
12900
- children: /* @__PURE__ */ v(du, {
12940
+ children: /* @__PURE__ */ v(gu, {
12901
12941
  imageUrl: E.url,
12902
12942
  fileName: E.fileName,
12903
12943
  aspect: c,
@@ -12909,7 +12949,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12909
12949
  })]
12910
12950
  })]
12911
12951
  });
12912
- }, pu = () => [], mu = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
12952
+ }, vu = () => [], yu = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
12913
12953
  className: (0, X.default)("sf-neutral-map-frame", n),
12914
12954
  children: [(e || t) && /* @__PURE__ */ y("div", {
12915
12955
  className: "sf-neutral-map-frame__header",
@@ -12921,11 +12961,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
12921
12961
  children: t
12922
12962
  })]
12923
12963
  }), r]
12924
- }), hu = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
12964
+ }), bu = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
12925
12965
  className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
12926
12966
  role: e === "error" ? "alert" : "status",
12927
12967
  children: t
12928
- }), gu = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
12968
+ }), xu = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
12929
12969
  className: (0, X.default)("sf-map-legend", t),
12930
12970
  role: "list",
12931
12971
  "aria-label": "Leyenda del mapa",
@@ -12952,7 +12992,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12952
12992
  })
12953
12993
  ]
12954
12994
  }, t))
12955
- }), _u = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
12995
+ }), Su = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
12956
12996
  className: (0, X.default)("sf-map-toolbar", i),
12957
12997
  children: [
12958
12998
  /* @__PURE__ */ y("div", {
@@ -12990,7 +13030,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12990
13030
  children: /* @__PURE__ */ v(lt, { "aria-hidden": "true" })
12991
13031
  })
12992
13032
  ]
12993
- }), vu = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
13033
+ }), Cu = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
12994
13034
  className: (0, X.default)("sf-map-vehicle-popup", a && "sf-map-vehicle-popup--interactive", o),
12995
13035
  onClick: a,
12996
13036
  onKeyDown: (e) => {
@@ -13030,7 +13070,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13030
13070
  ]
13031
13071
  })
13032
13072
  ]
13033
- }), yu = ({ title: e = "Lo que encontré aquí", items: t, loading: n, error: r, warning: i, onClose: a, className: o }) => {
13073
+ }), wu = ({ title: e = "Lo que encontré aquí", items: t, loading: n, error: r, warning: i, onClose: a, className: o }) => {
13034
13074
  let s = t.filter((e) => e.value !== void 0 && e.value !== null && e.value !== "");
13035
13075
  return /* @__PURE__ */ y("section", {
13036
13076
  className: (0, X.default)("sf-map-point-card", o),
@@ -13084,51 +13124,51 @@ ${e.map((e) => `<Row>${n.map((t) => {
13084
13124
  })
13085
13125
  ]
13086
13126
  });
13087
- }, bu = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", xu = {
13127
+ }, Tu = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", Eu = {
13088
13128
  lat: -12.0464,
13089
13129
  lng: -77.0428
13090
- }, Su = 13, Cu = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", wu = "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Tu = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", Eu = "Imagen &copy; <a href=\"https://www.esri.com\" target=\"_blank\" rel=\"noreferrer\">Esri</a>, Maxar, Earthstar Geographics", Du = {
13130
+ }, Du = 13, Ou = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", ku = "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Au = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", ju = "Imagen &copy; <a href=\"https://www.esri.com\" target=\"_blank\" rel=\"noreferrer\">Esri</a>, Maxar, Earthstar Geographics", Mu = {
13091
13131
  drawing: "basic",
13092
13132
  streetView: "none",
13093
13133
  clustering: "none",
13094
13134
  heatmap: "none"
13095
- }, Ou = {
13135
+ }, Nu = {
13096
13136
  drawing: "basic",
13097
13137
  streetView: "interactive",
13098
13138
  clustering: "client",
13099
13139
  heatmap: "weighted"
13100
- }, ku = "sf-google-maps-script", Au = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
13140
+ }, Pu = "sf-google-maps-script", Fu = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
13101
13141
  let i = new URLSearchParams({
13102
13142
  key: e,
13103
13143
  language: t,
13104
13144
  region: n
13105
13145
  });
13106
13146
  return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
13107
- }, ju = (e) => {
13147
+ }, Iu = (e) => {
13108
13148
  let t = window;
13109
13149
  return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
13110
- let i = document.getElementById(ku);
13150
+ let i = document.getElementById(Pu);
13111
13151
  if (i) {
13112
13152
  i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
13113
13153
  return;
13114
13154
  }
13115
13155
  let a = document.createElement("script");
13116
- a.id = ku, a.src = Au(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);
13156
+ a.id = Pu, a.src = Fu(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);
13117
13157
  }), t.__sfGoogleMapsPromise);
13118
- }, Mu = (e, t = "") => {
13158
+ }, Lu = (e, t = "") => {
13119
13159
  let n = e.match(/^var\((--[^,)]+)\)$/);
13120
13160
  return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
13121
- }, Nu = 111320, Pu = (e) => ({
13122
- dLat: e.radiusM / Nu,
13123
- dLng: e.radiusM / (Nu * Math.cos(e.center.lat * Math.PI / 180))
13124
- }), Fu = (e) => {
13125
- let { dLat: t, dLng: n } = Pu(e);
13161
+ }, Ru = 111320, zu = (e) => ({
13162
+ dLat: e.radiusM / Ru,
13163
+ dLng: e.radiusM / (Ru * Math.cos(e.center.lat * Math.PI / 180))
13164
+ }), Bu = (e) => {
13165
+ let { dLat: t, dLng: n } = zu(e);
13126
13166
  return {
13127
13167
  lat: e.center.lat - t * .62,
13128
13168
  lng: e.center.lng + n * .62
13129
13169
  };
13130
- }, Iu = (e, t = 72) => {
13131
- let { dLat: n, dLng: r } = Pu(e);
13170
+ }, Vu = (e, t = 72) => {
13171
+ let { dLat: n, dLng: r } = zu(e);
13132
13172
  return Array.from({ length: t + 1 }, (i, a) => {
13133
13173
  let o = a / t * 2 * Math.PI;
13134
13174
  return {
@@ -13136,42 +13176,42 @@ ${e.map((e) => `<Row>${n.map((t) => {
13136
13176
  lng: e.center.lng + r * Math.cos(o)
13137
13177
  };
13138
13178
  });
13139
- }, Lu = (e, t) => ({
13179
+ }, Hu = (e, t) => ({
13140
13180
  map: t,
13141
13181
  paths: e.points,
13142
- strokeColor: e.color ?? Mu("var(--sf-map-area-stroke)"),
13143
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-area-fill)"),
13182
+ strokeColor: e.color ?? Lu("var(--sf-map-area-stroke)"),
13183
+ fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-area-fill)"),
13144
13184
  fillOpacity: .14,
13145
13185
  strokeWeight: 2.5
13146
- }), Ru = (e, t) => ({
13186
+ }), Uu = (e, t) => ({
13147
13187
  map: t,
13148
13188
  path: e.points,
13149
- strokeColor: e.color ?? Mu("var(--sf-map-route-stroke)"),
13189
+ strokeColor: e.color ?? Lu("var(--sf-map-route-stroke)"),
13150
13190
  strokeWeight: 3.5
13151
- }), zu = (e, t) => ({
13191
+ }), Wu = (e, t) => ({
13152
13192
  map: t,
13153
13193
  center: e.center,
13154
13194
  radius: e.radiusM,
13155
- strokeColor: e.color ?? Mu("var(--sf-map-circle-stroke)"),
13156
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-circle-fill)"),
13195
+ strokeColor: e.color ?? Lu("var(--sf-map-circle-stroke)"),
13196
+ fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-circle-fill)"),
13157
13197
  fillOpacity: .16,
13158
13198
  strokeWeight: 2,
13159
13199
  clickable: !1
13160
- }), Bu = (e) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}`, Vu = (e) => Bu(`<svg xmlns="http://www.w3.org/2000/svg" width="30" height="40" viewBox="0 0 24 32"><path fill="${e}" d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6" fill="#fff"/></svg>`), Hu = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Uu = (e, t) => {
13161
- let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${Hu(t)}</text>` : "";
13200
+ }), Gu = (e) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}`, Ku = (e) => Gu(`<svg xmlns="http://www.w3.org/2000/svg" width="30" height="40" viewBox="0 0 24 32"><path fill="${e}" d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6" fill="#fff"/></svg>`), qu = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ju = (e, t) => {
13201
+ let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${qu(t)}</text>` : "";
13162
13202
  return {
13163
13203
  size: n,
13164
- url: Bu(`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}"><circle cx="${n / 2}" cy="${n / 2}" r="${r}" fill="${e}" stroke="#fff" stroke-width="2"/>${i}</svg>`)
13204
+ url: Gu(`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}"><circle cx="${n / 2}" cy="${n / 2}" r="${r}" fill="${e}" stroke="#fff" stroke-width="2"/>${i}</svg>`)
13165
13205
  };
13166
- }, Wu = Bu("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>"), Gu = (e, t, n, r) => {
13167
- let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ? Uu(e.color ?? (Mu("var(--sf-map-pin-bg)") || "#16a34a"), e.options?.text) : null;
13206
+ }, Yu = Gu("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>"), Xu = (e, t, n, r) => {
13207
+ let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ? Ju(e.color ?? (Lu("var(--sf-map-pin-bg)") || "#16a34a"), e.options?.text) : null;
13168
13208
  return {
13169
13209
  map: t,
13170
13210
  position: e.position,
13171
13211
  title: e.title ?? e.label,
13172
13212
  draggable: !n && e.options?.draggable,
13173
13213
  icon: i ? {
13174
- url: Vu(e.color ?? (Mu("var(--sf-map-pin-bg)") || "#16a34a")),
13214
+ url: Ku(e.color ?? (Lu("var(--sf-map-pin-bg)") || "#16a34a")),
13175
13215
  scaledSize: new r.Size(30, 40),
13176
13216
  anchor: new r.Point(15, 40),
13177
13217
  labelOrigin: new r.Point(15, -14)
@@ -13189,7 +13229,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13189
13229
  fontWeight: "600"
13190
13230
  } : i || s || !e.label ? void 0 : e.label.slice(0, 1).toUpperCase()
13191
13231
  };
13192
- }, Ku = ({ config: e, center: t = xu, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], circles: o = [], mapType: s = "roadmap", view: c, onViewChange: l, zoomControl: d = !0, height: f = 320, className: p, readOnly: g, onClick: _, onMarkerClick: y, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13232
+ }, Zu = ({ config: e, center: t = Eu, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], circles: o = [], mapType: s = "roadmap", view: c, onViewChange: l, zoomControl: d = !0, height: f = 320, className: p, readOnly: g, onClick: _, onMarkerClick: y, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13193
13233
  let C = m(null), w = m(null), T = m(/* @__PURE__ */ new Map()), E = m(/* @__PURE__ */ new Map()), D = m(/* @__PURE__ */ new Map()), O = m(/* @__PURE__ */ new Map()), k = m(l);
13194
13234
  u(() => {
13195
13235
  k.current = l;
@@ -13226,9 +13266,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
13226
13266
  return;
13227
13267
  }
13228
13268
  let t = !1;
13229
- return P("loading"), ju(e).then((n) => {
13269
+ return P("loading"), Iu(e).then((n) => {
13230
13270
  t || !C.current || !n.maps?.Map || (w.current = new n.maps.Map(C.current, {
13231
- center: xu,
13271
+ center: Eu,
13232
13272
  zoom: 13,
13233
13273
  mapId: e.mapId,
13234
13274
  disableDefaultUI: g,
@@ -13270,16 +13310,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
13270
13310
  }, [N]), u(() => {
13271
13311
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13272
13312
  let t = !1;
13273
- return ju(e).then((e) => {
13313
+ return Iu(e).then((e) => {
13274
13314
  let n = e.maps;
13275
13315
  t || !n?.Circle || (O.current.forEach((e) => e.forEach((e) => e.setMap?.(null))), O.current.clear(), o.forEach((e) => {
13276
- let t = w.current, r = e.color ?? Mu("var(--sf-map-circle-stroke)"), i = [new n.Circle({
13277
- ...zu(e, t),
13316
+ let t = w.current, r = e.color ?? Lu("var(--sf-map-circle-stroke)"), i = [new n.Circle({
13317
+ ...Wu(e, t),
13278
13318
  strokeOpacity: +!e.dashed
13279
13319
  })];
13280
13320
  e.dashed && i.push(new n.Polyline({
13281
13321
  map: t,
13282
- path: Iu(e),
13322
+ path: Vu(e),
13283
13323
  clickable: !1,
13284
13324
  strokeOpacity: 0,
13285
13325
  icons: [{
@@ -13295,11 +13335,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
13295
13335
  }]
13296
13336
  })), e.label && n.Point && i.push(new n.Marker({
13297
13337
  map: t,
13298
- position: Fu(e),
13338
+ position: Bu(e),
13299
13339
  clickable: !1,
13300
13340
  zIndex: 5,
13301
13341
  icon: {
13302
- url: Wu,
13342
+ url: Yu,
13303
13343
  labelOrigin: new n.Point(0, 0)
13304
13344
  },
13305
13345
  label: {
@@ -13327,7 +13367,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13327
13367
  }, []), u(() => {
13328
13368
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13329
13369
  let t = !1;
13330
- return ju(e).then((e) => {
13370
+ return Iu(e).then((e) => {
13331
13371
  if (t || !e.maps?.Marker) return;
13332
13372
  let n = new Set(r.map((e) => e.id));
13333
13373
  T.current.forEach((e, t) => {
@@ -13336,10 +13376,10 @@ ${e.map((e) => `<Row>${n.map((t) => {
13336
13376
  E.current.set(t.id, t);
13337
13377
  let n = T.current.get(t.id);
13338
13378
  if (n) {
13339
- n.marker.setPosition?.(t.position), n.marker.setOptions?.(Gu(t, w.current, g, e.maps));
13379
+ n.marker.setPosition?.(t.position), n.marker.setOptions?.(Xu(t, w.current, g, e.maps));
13340
13380
  return;
13341
13381
  }
13342
- let r = new e.maps.Marker(Gu(t, w.current, g, e.maps)), i = () => E.current.get(t.id) ?? t, a = [
13382
+ let r = new e.maps.Marker(Xu(t, w.current, g, e.maps)), i = () => E.current.get(t.id) ?? t, a = [
13343
13383
  r.addListener?.("click", () => {
13344
13384
  A.current.onMarkerClick?.({ marker: i() });
13345
13385
  }),
@@ -13383,7 +13423,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13383
13423
  ]), u(() => {
13384
13424
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13385
13425
  let t = !1;
13386
- return ju(e).then((e) => {
13426
+ return Iu(e).then((e) => {
13387
13427
  if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
13388
13428
  let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
13389
13429
  D.current.forEach((e, t) => {
@@ -13391,22 +13431,22 @@ ${e.map((e) => `<Row>${n.map((t) => {
13391
13431
  }), a.forEach((t) => {
13392
13432
  let n = `area:${t.id}`, r = D.current.get(n);
13393
13433
  if (r?.kind === "area") {
13394
- r.shape.setPaths?.(t.points), r.shape.setOptions?.(Lu(t, w.current));
13434
+ r.shape.setPaths?.(t.points), r.shape.setOptions?.(Hu(t, w.current));
13395
13435
  return;
13396
13436
  }
13397
13437
  r?.shape.setMap?.(null), D.current.set(n, {
13398
13438
  kind: "area",
13399
- shape: new e.maps.Polygon(Lu(t, w.current))
13439
+ shape: new e.maps.Polygon(Hu(t, w.current))
13400
13440
  });
13401
13441
  }), i.forEach((t) => {
13402
13442
  let n = `route:${t.id}`, r = D.current.get(n);
13403
13443
  if (r?.kind === "route") {
13404
- r.shape.setPath?.(t.points), r.shape.setOptions?.(Ru(t, w.current));
13444
+ r.shape.setPath?.(t.points), r.shape.setOptions?.(Uu(t, w.current));
13405
13445
  return;
13406
13446
  }
13407
13447
  r?.shape.setMap?.(null), D.current.set(n, {
13408
13448
  kind: "route",
13409
- shape: new e.maps.Polyline(Ru(t, w.current))
13449
+ shape: new e.maps.Polyline(Uu(t, w.current))
13410
13450
  });
13411
13451
  });
13412
13452
  }), () => {
@@ -13420,7 +13460,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13420
13460
  ]), u(() => {
13421
13461
  if (N !== "ready" || !e?.apiKey || !w.current || !_ || g) return;
13422
13462
  let t = !1, n;
13423
- return ju(e).then(() => {
13463
+ return Iu(e).then(() => {
13424
13464
  let e = w.current;
13425
13465
  t || !e?.addListener || (n = e.addListener("click", (e) => {
13426
13466
  e.latLng && (e.placeId && e.stop?.(), _({
@@ -13452,25 +13492,25 @@ ${e.map((e) => `<Row>${n.map((t) => {
13452
13492
  "aria-busy": N !== "ready" || void 0
13453
13493
  })
13454
13494
  });
13455
- }, qu = (e) => ({
13495
+ }, Qu = (e) => ({
13456
13496
  id: "google",
13457
- capabilities: Ou,
13458
- createRenderer: () => (t) => /* @__PURE__ */ v(Ku, {
13497
+ capabilities: Nu,
13498
+ createRenderer: () => (t) => /* @__PURE__ */ v(Zu, {
13459
13499
  ...t,
13460
13500
  config: e
13461
13501
  })
13462
- }), Ju = (e) => [e.lat, e.lng], Yu = (e) => oe.divIcon({
13502
+ }), $u = (e) => [e.lat, e.lng], ed = (e) => oe.divIcon({
13463
13503
  className: "",
13464
13504
  html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
13465
13505
  iconSize: [18, 18],
13466
13506
  iconAnchor: [9, 9]
13467
- }), Xu = (e) => oe.divIcon({
13507
+ }), td = (e) => oe.divIcon({
13468
13508
  className: "",
13469
13509
  html: `<div class="sf-map-pin" style="${e ? `--sf-map-pin-bg:${e};` : ""}"><svg viewBox="0 0 24 32" aria-hidden="true"><path d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6"/></svg></div>`,
13470
13510
  iconSize: [30, 40],
13471
13511
  iconAnchor: [15, 40],
13472
13512
  tooltipAnchor: [0, -40]
13473
- }), Zu = (e, t) => {
13513
+ }), nd = (e, t) => {
13474
13514
  let n = t ? 26 : 14;
13475
13515
  return oe.divIcon({
13476
13516
  className: "",
@@ -13479,12 +13519,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
13479
13519
  iconAnchor: [n / 2, n / 2],
13480
13520
  tooltipAnchor: [0, -n / 2]
13481
13521
  });
13482
- }, Qu = (e) => e.options?.variant === "pin" ? Xu(e.color) : e.options?.variant === "badge" ? Zu(e.color, e.options.text) : Yu(e.color), $u = (e) => oe.divIcon({
13522
+ }, rd = (e) => e.options?.variant === "pin" ? td(e.color) : e.options?.variant === "badge" ? nd(e.color, e.options.text) : ed(e.color), id = (e) => oe.divIcon({
13483
13523
  className: "",
13484
13524
  html: `<span class="sf-map-circle-label">${e.replace(/</g, "&lt;")}</span>`,
13485
13525
  iconSize: void 0,
13486
13526
  iconAnchor: [0, 0]
13487
- }), ed = ({ readOnly: e, onClick: t, onViewChange: n }) => (ae({
13527
+ }), ad = ({ readOnly: e, onClick: t, onViewChange: n }) => (ae({
13488
13528
  click(n) {
13489
13529
  e || t?.({ location: {
13490
13530
  lat: n.latlng.lat,
@@ -13502,27 +13542,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
13502
13542
  zoom: t.getZoom()
13503
13543
  });
13504
13544
  }
13505
- }), null), td = (e, t) => {
13545
+ }), null), od = (e, t) => {
13506
13546
  let n = e.getCenter();
13507
13547
  return e.getZoom() === t.zoom && Math.abs(n.lat - t.center.lat) < 1e-7 && Math.abs(n.lng - t.center.lng) < 1e-7;
13508
- }, nd = ({ view: e }) => {
13548
+ }, sd = ({ view: e }) => {
13509
13549
  let t = U();
13510
13550
  return u(() => {
13511
- !e || td(t, e) || t.setView(Ju(e.center), e.zoom);
13551
+ !e || od(t, e) || t.setView($u(e.center), e.zoom);
13512
13552
  }, [t, e]), null;
13513
- }, rd = () => {
13553
+ }, cd = () => {
13514
13554
  let e = U();
13515
13555
  return u(() => {
13516
13556
  if (typeof ResizeObserver > "u") return;
13517
13557
  let t = new ResizeObserver(() => e.invalidateSize());
13518
13558
  return t.observe(e.getContainer()), () => t.disconnect();
13519
13559
  }, [e]), null;
13520
- }, id = ({ center: e = xu, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], circles: a = [], mapType: o = "roadmap", view: s, onViewChange: c, zoomControl: l = !0, height: u = 320, className: d, readOnly: f, tileUrl: m = Cu, attribution: h = wu, onClick: g, onMarkerClick: _, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13521
- let C = Lo(), w = p(() => Ju(s?.center ?? e), [s?.center, e]), T = typeof u == "number" ? { height: `${u}px` } : { height: u }, E = o === "satellite";
13560
+ }, ld = ({ center: e = Eu, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], circles: a = [], mapType: o = "roadmap", view: s, onViewChange: c, zoomControl: l = !0, height: u = 320, className: d, readOnly: f, tileUrl: m = Ou, attribution: h = ku, onClick: g, onMarkerClick: _, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13561
+ let C = Lo(), w = p(() => $u(s?.center ?? e), [s?.center, e]), T = typeof u == "number" ? { height: `${u}px` } : { height: u }, E = o === "satellite";
13522
13562
  return C ? /* @__PURE__ */ v("div", {
13523
13563
  className: d,
13524
13564
  style: T,
13525
- children: /* @__PURE__ */ y(V, {
13565
+ children: /* @__PURE__ */ y(te, {
13526
13566
  center: w,
13527
13567
  zoom: s?.zoom ?? t,
13528
13568
  scrollWheelZoom: !f,
@@ -13530,54 +13570,54 @@ ${e.map((e) => `<Row>${n.map((t) => {
13530
13570
  zoomControl: l,
13531
13571
  className: "sf-map-frame",
13532
13572
  children: [
13533
- /* @__PURE__ */ v(H, {
13534
- attribution: E ? Eu : h,
13535
- url: E ? Tu : m
13573
+ /* @__PURE__ */ v(V, {
13574
+ attribution: E ? ju : h,
13575
+ url: E ? Au : m
13536
13576
  }, E ? "satellite" : "roadmap"),
13537
- /* @__PURE__ */ v(ed, {
13577
+ /* @__PURE__ */ v(ad, {
13538
13578
  readOnly: f,
13539
13579
  onClick: g,
13540
13580
  onViewChange: c
13541
13581
  }),
13542
- /* @__PURE__ */ v(nd, { view: s }),
13543
- /* @__PURE__ */ v(rd, {}),
13544
- i.map((e) => /* @__PURE__ */ v(ne, {
13545
- positions: e.points.map(Ju),
13582
+ /* @__PURE__ */ v(sd, { view: s }),
13583
+ /* @__PURE__ */ v(cd, {}),
13584
+ i.map((e) => /* @__PURE__ */ v(re, {
13585
+ positions: e.points.map($u),
13546
13586
  pathOptions: {
13547
- color: e.color ?? Mu("var(--sf-map-area-stroke)"),
13548
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-area-fill)"),
13587
+ color: e.color ?? Lu("var(--sf-map-area-stroke)"),
13588
+ fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-area-fill)"),
13549
13589
  fillOpacity: .14,
13550
13590
  weight: 2.5
13551
13591
  }
13552
13592
  }, e.id)),
13553
13593
  a.map((e) => /* @__PURE__ */ v(ee, {
13554
- center: Ju(e.center),
13594
+ center: $u(e.center),
13555
13595
  radius: e.radiusM,
13556
13596
  bubblingMouseEvents: !1,
13557
13597
  pathOptions: {
13558
- color: e.color ?? Mu("var(--sf-map-circle-stroke)"),
13559
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-circle-fill)"),
13598
+ color: e.color ?? Lu("var(--sf-map-circle-stroke)"),
13599
+ fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-circle-fill)"),
13560
13600
  fillOpacity: .16,
13561
13601
  weight: 2,
13562
13602
  dashArray: e.dashed ? "6 6" : void 0
13563
13603
  }
13564
13604
  }, e.id)),
13565
- a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(te, {
13566
- position: Ju(Fu(e)),
13567
- icon: $u(e.label ?? ""),
13605
+ a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(ne, {
13606
+ position: $u(Bu(e)),
13607
+ icon: id(e.label ?? ""),
13568
13608
  interactive: !1,
13569
13609
  keyboard: !1
13570
13610
  }, `${e.id}-label`)),
13571
- r.map((e) => /* @__PURE__ */ v(re, {
13572
- positions: e.points.map(Ju),
13611
+ r.map((e) => /* @__PURE__ */ v(ie, {
13612
+ positions: e.points.map($u),
13573
13613
  pathOptions: {
13574
- color: e.color ?? Mu("var(--sf-map-route-stroke)"),
13614
+ color: e.color ?? Lu("var(--sf-map-route-stroke)"),
13575
13615
  weight: 3.5
13576
13616
  }
13577
13617
  }, e.id)),
13578
- n.map((e) => /* @__PURE__ */ v(te, {
13579
- position: Ju(e.position),
13580
- icon: Qu(e),
13618
+ n.map((e) => /* @__PURE__ */ v(ne, {
13619
+ position: $u(e.position),
13620
+ icon: rd(e),
13581
13621
  title: e.title ?? e.label,
13582
13622
  draggable: !f && e.options?.draggable,
13583
13623
  bubblingMouseEvents: !1,
@@ -13605,7 +13645,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13605
13645
  });
13606
13646
  }
13607
13647
  },
13608
- children: e.options?.showLabel && e.label && /* @__PURE__ */ v(ie, {
13648
+ children: e.options?.showLabel && e.label && /* @__PURE__ */ v(H, {
13609
13649
  permanent: !0,
13610
13650
  direction: "top",
13611
13651
  className: "sf-map-marker-label",
@@ -13620,18 +13660,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
13620
13660
  style: T,
13621
13661
  children: "Cargando mapa…"
13622
13662
  });
13623
- }, ad = (e) => ({
13663
+ }, ud = (e) => ({
13624
13664
  id: "leaflet",
13625
- capabilities: Du,
13626
- createRenderer: () => (t) => /* @__PURE__ */ v(id, {
13665
+ capabilities: Mu,
13666
+ createRenderer: () => (t) => /* @__PURE__ */ v(ld, {
13627
13667
  ...t,
13628
13668
  tileUrl: e?.tileUrl,
13629
13669
  attribution: e?.attribution
13630
13670
  })
13631
- }), od = 6371e3, sd = (e) => e * Math.PI / 180, cd = (e, t) => {
13632
- let n = sd(t.lat - e.lat), r = sd(t.lng - e.lng), i = sd(e.lat), a = sd(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
13633
- return 2 * od * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
13634
- }, ld = () => ({
13671
+ }), dd = 6371e3, fd = (e) => e * Math.PI / 180, pd = (e, t) => {
13672
+ let n = fd(t.lat - e.lat), r = fd(t.lng - e.lng), i = fd(e.lat), a = fd(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
13673
+ return 2 * dd * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
13674
+ }, md = () => ({
13635
13675
  id: "basic",
13636
13676
  capabilities: {
13637
13677
  distance: "point-to-point",
@@ -13639,62 +13679,62 @@ ${e.map((e) => `<Row>${n.map((t) => {
13639
13679
  },
13640
13680
  async calculateDistance(e) {
13641
13681
  let t = e.origins[0], n = e.destinations[0];
13642
- return { distanceMeters: t && n ? cd(t, n) : 0 };
13682
+ return { distanceMeters: t && n ? pd(t, n) : 0 };
13643
13683
  }
13644
- }), ud = (e) => ({
13684
+ }), hd = (e) => ({
13645
13685
  lat: e.lat(),
13646
13686
  lng: e.lng()
13647
- }), dd = /^unnamed road$/i, fd = /^distrito de\s+/i, pd = /^[23456789CFGHJMPQRVWX]{4,8}\+[23456789CFGHJMPQRVWX]{0,3},?\s*/i, md = (e) => e?.replace(/^unnamed road,\s*/i, "").replace(pd, "").trim() || void 0, hd = (e, ...t) => {
13687
+ }), gd = /^unnamed road$/i, _d = /^distrito de\s+/i, vd = /^[23456789CFGHJMPQRVWX]{4,8}\+[23456789CFGHJMPQRVWX]{0,3},?\s*/i, yd = (e) => e?.replace(/^unnamed road,\s*/i, "").replace(vd, "").trim() || void 0, bd = (e, ...t) => {
13648
13688
  for (let n of t) {
13649
13689
  let t = e.address_components?.find((e) => e.types?.includes(n))?.long_name?.trim();
13650
- if (t && !(n === "route" && dd.test(t))) return t;
13690
+ if (t && !(n === "route" && gd.test(t))) return t;
13651
13691
  }
13652
- }, gd = (e, t = e.find((e) => hd(e, "route"))) => {
13692
+ }, xd = (e, t = e.find((e) => bd(e, "route"))) => {
13653
13693
  let n = (...t) => {
13654
13694
  for (let n of e) {
13655
- let e = hd(n, ...t);
13695
+ let e = bd(n, ...t);
13656
13696
  if (e) return e;
13657
13697
  }
13658
- }, r = t ? hd(t, "route") : void 0, i = t ? hd(t, "street_number") : void 0, a = e.flatMap((e) => [
13698
+ }, r = t ? bd(t, "route") : void 0, i = t ? bd(t, "street_number") : void 0, a = e.flatMap((e) => [
13659
13699
  "sublocality_level_1",
13660
13700
  "sublocality",
13661
13701
  "neighborhood"
13662
- ].map((t) => hd(e, t)).filter(Boolean)), o = a.find((e) => fd.test(e))?.replace(fd, "");
13702
+ ].map((t) => bd(e, t)).filter(Boolean)), o = a.find((e) => _d.test(e))?.replace(_d, "");
13663
13703
  return {
13664
13704
  street: r,
13665
13705
  number: i,
13666
13706
  line: r ? [r, i].filter(Boolean).join(" ") : void 0,
13667
- neighborhood: a.find((e) => !fd.test(e)),
13707
+ neighborhood: a.find((e) => !_d.test(e)),
13668
13708
  locality: n("locality"),
13669
- district: o || n("administrative_area_level_3", "locality")?.replace(fd, ""),
13709
+ district: o || n("administrative_area_level_3", "locality")?.replace(_d, ""),
13670
13710
  province: n("administrative_area_level_2"),
13671
13711
  department: n("administrative_area_level_1"),
13672
13712
  country: n("country"),
13673
13713
  postalCode: n("postal_code")
13674
13714
  };
13675
- }, _d = (e) => {
13715
+ }, Sd = (e) => {
13676
13716
  let t = e.geometry?.location;
13677
13717
  if (!t) return null;
13678
- let n = md(e.formatted_address), r = n ?? e.place_id ?? "Ubicación Google Maps";
13718
+ let n = yd(e.formatted_address), r = n ?? e.place_id ?? "Ubicación Google Maps";
13679
13719
  return {
13680
13720
  id: e.place_id ?? r,
13681
13721
  label: r,
13682
13722
  address: n,
13683
- location: ud(t),
13723
+ location: hd(t),
13684
13724
  provider: "google",
13685
- parts: e.address_components ? gd([e]) : void 0,
13725
+ parts: e.address_components ? xd([e]) : void 0,
13686
13726
  raw: e
13687
13727
  };
13688
- }, vd = (e, t) => {
13728
+ }, Cd = (e, t) => {
13689
13729
  let n = (e) => e * Math.PI / 180, r = Math.sin(n(t.lat - e.lat) / 2) ** 2 + Math.cos(n(e.lat)) * Math.cos(n(t.lat)) * Math.sin(n(t.lng - e.lng) / 2) ** 2;
13690
13730
  return 12742e3 * Math.asin(Math.sqrt(r));
13691
- }, yd = /* @__PURE__ */ new Set(["ROOFTOP", "RANGE_INTERPOLATED"]), bd = (e, t) => {
13731
+ }, wd = /* @__PURE__ */ new Set(["ROOFTOP", "RANGE_INTERPOLATED"]), Td = (e, t) => {
13692
13732
  if (t.length === 0) return null;
13693
- let n = t.filter((e) => hd(e, "route") && e.geometry?.location).map((t) => ({
13733
+ let n = t.filter((e) => bd(e, "route") && e.geometry?.location).map((t) => ({
13694
13734
  result: t,
13695
- punto: yd.has(t.geometry?.location_type ?? ""),
13696
- distancia: vd(e, ud(t.geometry.location))
13697
- })).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i = md(r.formatted_address), a = i ?? `${e.lat.toFixed(6)}, ${e.lng.toFixed(6)}`, o = gd(t, n?.result);
13735
+ punto: wd.has(t.geometry?.location_type ?? ""),
13736
+ distancia: Cd(e, hd(t.geometry.location))
13737
+ })).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i = yd(r.formatted_address), a = i ?? `${e.lat.toFixed(6)}, ${e.lng.toFixed(6)}`, o = xd(t, n?.result);
13698
13738
  return {
13699
13739
  id: r.place_id ?? a,
13700
13740
  label: a,
@@ -13707,27 +13747,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
13707
13747
  } : o,
13708
13748
  raw: r
13709
13749
  };
13710
- }, xd = (e) => ({
13750
+ }, Ed = (e) => ({
13711
13751
  id: "google",
13712
13752
  capabilities: { geocoding: "full" },
13713
13753
  async geocode(t) {
13714
- let n = (await ju(e)).maps?.Geocoder;
13754
+ let n = (await Iu(e)).maps?.Geocoder;
13715
13755
  return n ? new Promise((e) => {
13716
13756
  new n().geocode({ address: t }, (t) => {
13717
- e((t ?? []).map((e) => _d(e)).filter((e) => !!e));
13757
+ e((t ?? []).map((e) => Sd(e)).filter((e) => !!e));
13718
13758
  });
13719
13759
  }) : [];
13720
13760
  },
13721
13761
  async reverseGeocode(t) {
13722
- let n = (await ju(e)).maps?.Geocoder;
13762
+ let n = (await Iu(e)).maps?.Geocoder;
13723
13763
  return n ? new Promise((e) => {
13724
13764
  new n().geocode({ location: t }, (n) => {
13725
- e(bd(t, n ?? []));
13765
+ e(Td(t, n ?? []));
13726
13766
  });
13727
13767
  }) : null;
13728
13768
  },
13729
13769
  async placeDetails(t) {
13730
- let n = (await ju(e)).maps;
13770
+ let n = (await Iu(e)).maps;
13731
13771
  if (!n) return null;
13732
13772
  !n.places?.PlacesService && n.importLibrary && await n.importLibrary("places").catch(() => void 0);
13733
13773
  let r = n.places?.PlacesService;
@@ -13746,34 +13786,34 @@ ${e.map((e) => `<Row>${n.map((t) => {
13746
13786
  e(null);
13747
13787
  return;
13748
13788
  }
13749
- let a = _d({
13789
+ let a = Sd({
13750
13790
  ...i,
13751
13791
  place_id: i.place_id ?? t
13752
13792
  });
13753
13793
  e(a && {
13754
13794
  ...a,
13755
13795
  name: i.name?.trim() || void 0,
13756
- parts: i.address_components ? gd([i]) : void 0
13796
+ parts: i.address_components ? xd([i]) : void 0
13757
13797
  });
13758
13798
  });
13759
13799
  }) : null;
13760
13800
  }
13761
- }), Sd = (e) => e.toFixed(6), Cd = (e, t, n) => Math.min(Math.max(e, t), n), wd = (e) => Cd(e, -90, 90), Td = (e) => Cd(e, -180, 180), Ed = (e, t = 0) => {
13801
+ }), Dd = (e) => e.toFixed(6), Od = (e, t, n) => Math.min(Math.max(e, t), n), kd = (e) => Od(e, -90, 90), Ad = (e) => Od(e, -180, 180), jd = (e, t = 0) => {
13762
13802
  if (typeof e == "number") return Number.isFinite(e) ? e : t;
13763
13803
  let n = Number.parseFloat(e.trim().replace(",", "."));
13764
13804
  return Number.isFinite(n) ? n : t;
13765
- }, Dd = (e) => `${Sd(e.lat)}, ${Sd(e.lng)}`, Od = (e, t) => {
13805
+ }, Md = (e) => `${Dd(e.lat)}, ${Dd(e.lng)}`, Nd = (e, t) => {
13766
13806
  if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
13767
- let n = Ed(e.lat, t.lat), r = Ed(e.lng, t.lng);
13807
+ let n = jd(e.lat, t.lat), r = jd(e.lng, t.lng);
13768
13808
  return {
13769
- lat: wd(n),
13770
- lng: Td(r)
13809
+ lat: kd(n),
13810
+ lng: Ad(r)
13771
13811
  };
13772
- }, kd = (e, t = "Ubicación") => ({
13812
+ }, Pd = (e, t = "Ubicación") => ({
13773
13813
  id: `${e.lat}:${e.lng}`,
13774
13814
  position: e,
13775
13815
  label: t
13776
- }), Ad = (e) => {
13816
+ }), Fd = (e) => {
13777
13817
  let t = e.road, n = e.house_number;
13778
13818
  return {
13779
13819
  street: t,
@@ -13787,7 +13827,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13787
13827
  country: e.country,
13788
13828
  postalCode: e.postcode
13789
13829
  };
13790
- }, jd = () => ({
13830
+ }, Id = () => ({
13791
13831
  id: "nominatim",
13792
13832
  capabilities: { geocoding: "basic" },
13793
13833
  async geocode(e) {
@@ -13819,20 +13859,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
13819
13859
  label: Go(r.display_name),
13820
13860
  address: r.display_name,
13821
13861
  name: r.name?.trim() || void 0,
13822
- parts: Ad(r.address ?? {}),
13862
+ parts: Fd(r.address ?? {}),
13823
13863
  raw: r
13824
13864
  } : t;
13825
13865
  } catch {
13826
13866
  return t;
13827
13867
  }
13828
13868
  }
13829
- }), Md = (e) => ({
13869
+ }), Ld = (e) => ({
13830
13870
  id: e.id,
13831
13871
  capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
13832
13872
  searchPlaces(t) {
13833
13873
  return e.geocode(t);
13834
13874
  }
13835
- }), Nd = () => ({
13875
+ }), Rd = () => ({
13836
13876
  id: "basic",
13837
13877
  capabilities: {
13838
13878
  routing: "basic",
@@ -13850,31 +13890,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
13850
13890
  ]
13851
13891
  };
13852
13892
  }
13853
- }), Pd = i({}), Fd = (e) => {
13893
+ }), zd = i({}), Bd = (e) => {
13854
13894
  let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
13855
- return t === "google" && n ? xd(n) : jd();
13856
- }, Id = (e) => {
13857
- let t = e.defaultEngine === "google" ? qu(e.engines.google) : ad(e.engines.leaflet), n = Fd(e);
13895
+ return t === "google" && n ? Ed(n) : Id();
13896
+ }, Vd = (e) => {
13897
+ let t = e.defaultEngine === "google" ? Qu(e.engines.google) : ud(e.engines.leaflet), n = Bd(e);
13858
13898
  return {
13859
13899
  config: e,
13860
13900
  engine: t,
13861
13901
  geocodingService: n,
13862
- placesService: Md(n),
13863
- routingService: Nd(),
13864
- distanceService: ld()
13902
+ placesService: Ld(n),
13903
+ routingService: Rd(),
13904
+ distanceService: md()
13865
13905
  };
13866
- }, Ld = ({ maps: e, children: t }) => {
13867
- let n = p(() => ({ maps: e ? Id(e) : void 0 }), [e]);
13868
- return /* @__PURE__ */ v(Pd.Provider, {
13906
+ }, Hd = ({ maps: e, children: t }) => {
13907
+ let n = p(() => ({ maps: e ? Vd(e) : void 0 }), [e]);
13908
+ return /* @__PURE__ */ v(zd.Provider, {
13869
13909
  value: n,
13870
13910
  children: t
13871
13911
  });
13872
- }, Rd = () => c(Pd), zd = () => {
13873
- let e = Rd();
13874
- if (!e.maps) throw Error(bu);
13912
+ }, Ud = () => c(zd), Wd = () => {
13913
+ let e = Ud();
13914
+ if (!e.maps) throw Error(Tu);
13875
13915
  return e.maps;
13876
- }, Bd = () => {
13877
- let e = zd(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
13916
+ }, Gd = () => {
13917
+ let e = Wd(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
13878
13918
  return {
13879
13919
  loading: t,
13880
13920
  results: r,
@@ -13898,15 +13938,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
13898
13938
  }
13899
13939
  }, [e.geocodingService])
13900
13940
  };
13901
- }, Vd = () => {
13902
- let e = zd();
13941
+ }, Kd = () => {
13942
+ let e = Wd();
13903
13943
  return p(() => ({
13904
13944
  id: e.engine.id,
13905
13945
  capabilities: e.engine.capabilities,
13906
13946
  renderer: e.engine.createRenderer()
13907
13947
  }), [e.engine]);
13908
- }, Hd = () => zd().config, Ud = () => {
13909
- let e = zd(), [t, n] = h(!1), [r, i] = h(null), [a, o] = h(null), c = m(0), l = s(async (t, r) => {
13948
+ }, qd = () => Wd().config, Jd = () => {
13949
+ let e = Wd(), [t, n] = h(!1), [r, i] = h(null), [a, o] = h(null), c = m(0), l = s(async (t, r) => {
13910
13950
  c.current += 1;
13911
13951
  let a = c.current;
13912
13952
  n(!0), o(null);
@@ -13920,7 +13960,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13920
13960
  address: l?.address ?? s?.address,
13921
13961
  parts: {
13922
13962
  ...s?.parts,
13923
- ...Wd(l?.parts),
13963
+ ...Yd(l?.parts),
13924
13964
  ...l?.parts?.line ? { lineDistanceM: void 0 } : {}
13925
13965
  }
13926
13966
  };
@@ -13941,11 +13981,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
13941
13981
  show: u,
13942
13982
  clear: s(() => u(null), [u])
13943
13983
  };
13944
- }, Wd = (e) => Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e !== void 0 && e !== "")), Gd = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", Kd = ({ 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 }) => {
13984
+ }, Yd = (e) => Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e !== void 0 && e !== "")), Xd = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", Zd = ({ 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 }) => {
13945
13985
  let d = b({
13946
13986
  name: t,
13947
13987
  control: e.control
13948
- }), { loading: f, results: p, error: m, search: g } = Bd(), [_, x] = h(() => Gd(d.field.value)), [S, C] = h(!1), w = String(t), T = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, E = o || s, D = !E && !f && _.trim().length >= 3, O = () => {
13988
+ }), { loading: f, results: p, error: m, search: g } = Gd(), [_, x] = h(() => Xd(d.field.value)), [S, C] = h(!1), w = String(t), T = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, E = o || s, D = !E && !f && _.trim().length >= 3, O = () => {
13949
13989
  D && (C(!0), g(_));
13950
13990
  }, k = (e) => {
13951
13991
  d.field.onChange(e), l?.(e);
@@ -14025,8 +14065,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14025
14065
  ]
14026
14066
  })
14027
14067
  });
14028
- }, qd = 19, Jd = 3, Yd = (e, t) => e.zoom === t.zoom && Math.abs(e.center.lat - t.center.lat) < 1e-7 && Math.abs(e.center.lng - t.center.lng) < 1e-7, Xd = ({ title: e, description: t, center: n = xu, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], circles: s = [], mapType: c = "roadmap", onMapTypeChange: l, showControls: u, recenterTo: d, focus: f, focusZoom: m = 16, legend: g, panel: _, height: b = 360, className: x, readOnly: S, onClick: C, onMarkerClick: w, onMarkerDoubleClick: T, onMarkerDrag: E, onMarkerDragEnd: D }) => {
14029
- let O = Vd(), k = p(() => O.renderer, [O.renderer]), A = !!u || f !== void 0, j = f ? `${f.lat},${f.lng}` : "", [M, N] = h({
14068
+ }, Qd = 19, $d = 3, ef = (e, t) => e.zoom === t.zoom && Math.abs(e.center.lat - t.center.lat) < 1e-7 && Math.abs(e.center.lng - t.center.lng) < 1e-7, tf = ({ title: e, description: t, center: n = Eu, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], circles: s = [], mapType: c = "roadmap", onMapTypeChange: l, showControls: u, recenterTo: d, focus: f, focusZoom: m = 16, legend: g, panel: _, height: b = 360, className: x, readOnly: S, onClick: C, onMarkerClick: w, onMarkerDoubleClick: T, onMarkerDrag: E, onMarkerDragEnd: D }) => {
14069
+ let O = Kd(), k = p(() => O.renderer, [O.renderer]), A = !!u || f !== void 0, j = f ? `${f.lat},${f.lng}` : "", [M, N] = h({
14030
14070
  vista: {
14031
14071
  center: n,
14032
14072
  zoom: r
@@ -14048,7 +14088,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14048
14088
  };
14049
14089
  }), I = (e) => F((t) => ({
14050
14090
  ...t,
14051
- zoom: Math.min(qd, Math.max(Jd, t.zoom + e))
14091
+ zoom: Math.min(Qd, Math.max($d, t.zoom + e))
14052
14092
  })), L = k({
14053
14093
  center: n,
14054
14094
  zoom: r,
@@ -14060,7 +14100,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14060
14100
  height: b,
14061
14101
  readOnly: S,
14062
14102
  view: A ? P : void 0,
14063
- onViewChange: A ? (e) => F((t) => Yd(t, e) ? t : e) : void 0,
14103
+ onViewChange: A ? (e) => F((t) => ef(t, e) ? t : e) : void 0,
14064
14104
  zoomControl: !u,
14065
14105
  onClick: C,
14066
14106
  onMarkerClick: w,
@@ -14068,7 +14108,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14068
14108
  onMarkerDrag: E,
14069
14109
  onMarkerDragEnd: D
14070
14110
  }), R = !!l;
14071
- return /* @__PURE__ */ v(mu, {
14111
+ return /* @__PURE__ */ v(yu, {
14072
14112
  title: e,
14073
14113
  description: t,
14074
14114
  className: x,
@@ -14144,16 +14184,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
14144
14184
  ]
14145
14185
  })
14146
14186
  });
14147
- }, Zd = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
14187
+ }, nf = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
14148
14188
  let [d, f] = h(!1), [p, m] = h(null), g = b({
14149
14189
  name: t,
14150
14190
  control: e.control
14151
- }), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = Od(g.field.value, xu), w = (e) => {
14191
+ }), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = Nd(g.field.value, Eu), w = (e) => {
14152
14192
  g.field.onChange(e), l?.(e);
14153
14193
  }, T = (e, t) => {
14154
14194
  w({
14155
14195
  ...C,
14156
- [e]: Ed(t, C[e])
14196
+ [e]: jd(t, C[e])
14157
14197
  });
14158
14198
  };
14159
14199
  return /* @__PURE__ */ v(Z, {
@@ -14176,7 +14216,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14176
14216
  id: `${_}-lat`,
14177
14217
  type: "text",
14178
14218
  inputMode: "decimal",
14179
- value: Sd(C.lat),
14219
+ value: Dd(C.lat),
14180
14220
  readOnly: S,
14181
14221
  disabled: s,
14182
14222
  "aria-invalid": !!x || void 0,
@@ -14196,7 +14236,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14196
14236
  id: `${_}-lng`,
14197
14237
  type: "text",
14198
14238
  inputMode: "decimal",
14199
- value: Sd(C.lng),
14239
+ value: Dd(C.lng),
14200
14240
  readOnly: S,
14201
14241
  disabled: s,
14202
14242
  "aria-invalid": !!x || void 0,
@@ -14215,8 +14255,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14215
14255
  onClick: () => {
14216
14256
  !navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
14217
14257
  let t = {
14218
- lat: Number(Sd(e.coords.latitude)),
14219
- lng: Number(Sd(e.coords.longitude))
14258
+ lat: Number(Dd(e.coords.latitude)),
14259
+ lng: Number(Dd(e.coords.longitude))
14220
14260
  };
14221
14261
  w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
14222
14262
  }, () => {
@@ -14237,7 +14277,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14237
14277
  role: "status",
14238
14278
  children: p
14239
14279
  }),
14240
- /* @__PURE__ */ v(Xd, {
14280
+ /* @__PURE__ */ v(tf, {
14241
14281
  center: C,
14242
14282
  zoom: a,
14243
14283
  height: 220,
@@ -14249,8 +14289,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14249
14289
  }],
14250
14290
  onClick: (e) => {
14251
14291
  w({
14252
- lat: Number(Sd(e.location.lat)),
14253
- lng: Number(Sd(e.location.lng))
14292
+ lat: Number(Dd(e.location.lat)),
14293
+ lng: Number(Dd(e.location.lng))
14254
14294
  }), g.field.onBlur();
14255
14295
  }
14256
14296
  }),
@@ -14261,19 +14301,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
14261
14301
  ]
14262
14302
  })
14263
14303
  });
14264
- }, Qd = (e) => /* @__PURE__ */ v(Zd, { ...e }), $d = (e) => Array.isArray(e) ? e.map((e) => Od(e, xu)) : [], ef = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, tf = "var(--sf-map-area-stroke)", nf = "var(--sf-map-area-fill)", rf = "var(--sf-map-route-stroke)", af = ({ 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 }) => {
14304
+ }, rf = (e) => /* @__PURE__ */ v(nf, { ...e }), af = (e) => Array.isArray(e) ? e.map((e) => Nd(e, Eu)) : [], of = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, sf = "var(--sf-map-area-stroke)", cf = "var(--sf-map-area-fill)", lf = "var(--sf-map-route-stroke)", uf = ({ 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 }) => {
14265
14305
  let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
14266
14306
  name: t,
14267
14307
  control: e.control,
14268
14308
  rules: { validate: (e) => {
14269
- let t = $d(e).length;
14309
+ let t = af(e).length;
14270
14310
  return t === 0 && !a ? !0 : t < f ? p : !0;
14271
14311
  } }
14272
- }), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = $d(m.field.value), S = x.at(-1) ?? xu, C = {
14312
+ }), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = af(m.field.value), S = x.at(-1) ?? Eu, C = {
14273
14313
  id: `${h}-${n}`,
14274
14314
  points: x,
14275
- color: n === "area" ? tf : rf,
14276
- fillColor: n === "area" ? nf : void 0
14315
+ color: n === "area" ? sf : lf,
14316
+ fillColor: n === "area" ? cf : void 0
14277
14317
  }, w = (e) => {
14278
14318
  m.field.onChange(e), u?.(e);
14279
14319
  }, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
@@ -14306,7 +14346,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14306
14346
  children: "Limpiar"
14307
14347
  })]
14308
14348
  }),
14309
- /* @__PURE__ */ v(Xd, {
14349
+ /* @__PURE__ */ v(tf, {
14310
14350
  center: S,
14311
14351
  zoom: o,
14312
14352
  height: 260,
@@ -14315,7 +14355,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14315
14355
  id: `${h}-point-${t}`,
14316
14356
  position: e,
14317
14357
  label: String(t + 1),
14318
- color: n === "area" ? tf : rf,
14358
+ color: n === "area" ? sf : lf,
14319
14359
  options: { draggable: !_ }
14320
14360
  })),
14321
14361
  areas: n === "area" && x.length >= 3 ? [C] : [],
@@ -14338,7 +14378,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14338
14378
  className: "sf-map-hint",
14339
14379
  "aria-live": "polite",
14340
14380
  children: [
14341
- ef(x),
14381
+ of(x),
14342
14382
  " · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
14343
14383
  " ",
14344
14384
  /* @__PURE__ */ v("span", {
@@ -14350,38 +14390,38 @@ ${e.map((e) => `<Row>${n.map((t) => {
14350
14390
  ]
14351
14391
  })
14352
14392
  });
14353
- }, of = (e) => /* @__PURE__ */ v(af, {
14393
+ }, df = (e) => /* @__PURE__ */ v(uf, {
14354
14394
  ...e,
14355
14395
  mode: "area"
14356
- }), sf = (e) => /* @__PURE__ */ v(af, {
14396
+ }), ff = (e) => /* @__PURE__ */ v(uf, {
14357
14397
  ...e,
14358
14398
  mode: "route"
14359
- }), cf = (e) => {
14399
+ }), pf = (e) => {
14360
14400
  switch (e.kind) {
14361
- case "coordinates": return /* @__PURE__ */ v(Qd, { ...e });
14362
- case "location": return /* @__PURE__ */ v(Zd, { ...e });
14363
- case "address": return /* @__PURE__ */ v(Kd, { ...e });
14364
- case "area": return /* @__PURE__ */ v(of, { ...e });
14365
- case "route": return /* @__PURE__ */ v(sf, { ...e });
14401
+ case "coordinates": return /* @__PURE__ */ v(rf, { ...e });
14402
+ case "location": return /* @__PURE__ */ v(nf, { ...e });
14403
+ case "address": return /* @__PURE__ */ v(Zd, { ...e });
14404
+ case "area": return /* @__PURE__ */ v(df, { ...e });
14405
+ case "route": return /* @__PURE__ */ v(ff, { ...e });
14366
14406
  default: return null;
14367
14407
  }
14368
- }, lf = /^#[0-9a-fA-F]{6}$/, uf = "#".padEnd(7, "0"), df = () => {
14408
+ }, mf = /^#[0-9a-fA-F]{6}$/, hf = "#".padEnd(7, "0"), gf = () => {
14369
14409
  if (typeof document > "u") return "";
14370
14410
  let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
14371
- return lf.test(e) ? e.toLowerCase() : "";
14372
- }, ff = (e, t, n) => Math.min(n, Math.max(t, e)), pf = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), mf = () => [], hf = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], gf = () => [], _f = (e) => Array.isArray(e) ? e.map((e) => {
14411
+ return mf.test(e) ? e.toLowerCase() : "";
14412
+ }, _f = (e, t, n) => Math.min(n, Math.max(t, e)), vf = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), yf = () => [], bf = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], xf = () => [], Sf = (e) => Array.isArray(e) ? e.map((e) => {
14373
14413
  if (typeof e != "object" || !e) return null;
14374
14414
  let t = e;
14375
14415
  return {
14376
14416
  key: String(t.key ?? ""),
14377
14417
  value: String(t.value ?? "")
14378
14418
  };
14379
- }).filter((e) => e != null) : [], vf = (e = 0, t = 100) => ({
14419
+ }).filter((e) => e != null) : [], Cf = (e = 0, t = 100) => ({
14380
14420
  start: e,
14381
14421
  end: t
14382
- }), yf = (e, t = 0, n = 100) => {
14422
+ }), wf = (e, t = 0, n = 100) => {
14383
14423
  if (e && typeof e == "object" && "start" in e && "end" in e) {
14384
- let r = e, i = ff(Number(r.start), t, n), a = ff(Number(r.end), t, n);
14424
+ let r = e, i = _f(Number(r.start), t, n), a = _f(Number(r.end), t, n);
14385
14425
  return i <= a ? {
14386
14426
  start: i,
14387
14427
  end: a
@@ -14390,15 +14430,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
14390
14430
  end: i
14391
14431
  };
14392
14432
  }
14393
- return vf(t, n);
14394
- }, bf = (e, t) => {
14395
- let n = df(), r = String(t ?? (n || uf)).trim(), i = lf.test(r) ? r.toLowerCase() : uf, a = String(e ?? i).trim();
14396
- return lf.test(a) ? a.toLowerCase() : i;
14397
- }, xf = (e, t, n) => n <= t ? 0 : Math.round((ff(e, t, n) - t) / (n - t) * 100), Sf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Cf = ({ 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 }) => {
14433
+ return Cf(t, n);
14434
+ }, Tf = (e, t) => {
14435
+ let n = gf(), r = String(t ?? (n || hf)).trim(), i = mf.test(r) ? r.toLowerCase() : hf, a = String(e ?? i).trim();
14436
+ return mf.test(a) ? a.toLowerCase() : i;
14437
+ }, Ef = (e, t, n) => n <= t ? 0 : Math.round((_f(e, t, n) - t) / (n - t) * 100), Df = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Of = ({ 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 }) => {
14398
14438
  let h = b({
14399
14439
  name: t,
14400
14440
  control: e.control
14401
- }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = ff(Number(h.field.value ?? a), a, o), C = (e) => {
14441
+ }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = _f(Number(h.field.value ?? a), a, o), C = (e) => {
14402
14442
  h.field.onChange(e), p?.(e);
14403
14443
  };
14404
14444
  return /* @__PURE__ */ v(Z, {
@@ -14422,17 +14462,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
14422
14462
  "aria-invalid": !!_ || void 0,
14423
14463
  onBlur: () => h.field.onBlur(),
14424
14464
  onChange: (e) => C(Number(e.target.value)),
14425
- className: Sf(x)
14465
+ className: Df(x)
14426
14466
  }), /* @__PURE__ */ v("span", {
14427
14467
  className: "sf-slider__value",
14428
- children: pf(S, {
14468
+ children: vf(S, {
14429
14469
  suffix: c,
14430
14470
  formatValue: f
14431
14471
  })
14432
14472
  })]
14433
14473
  })
14434
14474
  });
14435
- }, wf = {
14475
+ }, kf = {
14436
14476
  slate: {
14437
14477
  wrap: "border-slate-300 bg-white",
14438
14478
  button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
@@ -14453,7 +14493,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14453
14493
  button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
14454
14494
  value: "text-blue-700"
14455
14495
  }
14456
- }, Tf = {
14496
+ }, Af = {
14457
14497
  sm: {
14458
14498
  button: "h-6 w-6",
14459
14499
  icon: "h-3 w-3",
@@ -14464,13 +14504,13 @@ ${e.map((e) => `<Row>${n.map((t) => {
14464
14504
  icon: "h-3.5 w-3.5",
14465
14505
  value: "min-w-[2.5rem] px-1.5 text-sm"
14466
14506
  }
14467
- }, Ef = (e, t) => {
14507
+ }, jf = (e, t) => {
14468
14508
  let n = (String(t).split(".")[1] ?? "").length;
14469
14509
  return Number(e.toFixed(n));
14470
- }, Df = ({ 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 }) => {
14471
- let f = wf[a], p = Tf[o], m = s || c, h = (a) => {
14510
+ }, Mf = ({ 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 }) => {
14511
+ let f = kf[a], p = Af[o], m = s || c, h = (a) => {
14472
14512
  if (m) return;
14473
- let o = Math.min(r, Math.max(n, Ef(a, i)));
14513
+ let o = Math.min(r, Math.max(n, jf(a, i)));
14474
14514
  o !== e && t(o);
14475
14515
  }, 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);
14476
14516
  return /* @__PURE__ */ y("div", {
@@ -14506,11 +14546,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14506
14546
  })
14507
14547
  ]
14508
14548
  });
14509
- }, Of = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), kf = ({ 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 }) => {
14549
+ }, Nf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Pf = ({ 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 }) => {
14510
14550
  let h = b({
14511
14551
  name: t,
14512
14552
  control: e.control
14513
- }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = yf(h.field.value, a, o), C = (e) => {
14553
+ }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = wf(h.field.value, a, o), C = (e) => {
14514
14554
  h.field.onChange(e), p?.(e);
14515
14555
  }, w = {
14516
14556
  suffix: c,
@@ -14528,7 +14568,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14528
14568
  children: [
14529
14569
  /* @__PURE__ */ v("span", {
14530
14570
  className: "sf-slider__value sf-slider__value--sm",
14531
- children: pf(S.start, w)
14571
+ children: vf(S.start, w)
14532
14572
  }),
14533
14573
  /* @__PURE__ */ y("div", {
14534
14574
  className: "grid flex-1 gap-2",
@@ -14550,7 +14590,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14550
14590
  end: Math.max(t, S.end)
14551
14591
  });
14552
14592
  },
14553
- className: Of(x)
14593
+ className: Nf(x)
14554
14594
  }), /* @__PURE__ */ v("input", {
14555
14595
  id: `${g}-end`,
14556
14596
  type: "range",
@@ -14569,21 +14609,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
14569
14609
  end: t
14570
14610
  });
14571
14611
  },
14572
- className: Of(x)
14612
+ className: Nf(x)
14573
14613
  })]
14574
14614
  }),
14575
14615
  /* @__PURE__ */ v("span", {
14576
14616
  className: "sf-slider__value sf-slider__value--sm",
14577
- children: pf(S.end, w)
14617
+ children: vf(S.end, w)
14578
14618
  })
14579
14619
  ]
14580
14620
  })
14581
14621
  });
14582
- }, Af = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
14622
+ }, Ff = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
14583
14623
  let d = b({
14584
14624
  name: t,
14585
14625
  control: e.control
14586
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = ff(Number(d.field.value ?? a), a, o), h = xf(m, a, o);
14626
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = _f(Number(d.field.value ?? a), a, o), h = Ef(m, a, o);
14587
14627
  return /* @__PURE__ */ v(Z, {
14588
14628
  id: f,
14589
14629
  label: n,
@@ -14606,21 +14646,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
14606
14646
  })
14607
14647
  }), /* @__PURE__ */ v("span", {
14608
14648
  className: "sf-progress-bar__value",
14609
- children: pf(m, {
14649
+ children: vf(m, {
14610
14650
  suffix: s,
14611
14651
  formatValue: l
14612
14652
  })
14613
14653
  })]
14614
14654
  })
14615
14655
  });
14616
- }, jf = {
14656
+ }, If = {
14617
14657
  default: "sf-progress-bar-readonly__fill--default",
14618
14658
  success: "sf-progress-bar-readonly__fill--success",
14619
14659
  warning: "sf-progress-bar-readonly__fill--warning",
14620
14660
  danger: "sf-progress-bar-readonly__fill--danger",
14621
14661
  info: "sf-progress-bar-readonly__fill--info"
14622
- }, Mf = ({ 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 }) => {
14623
- let u = ff(e, t, n), d = xf(u, t, n), f = pf(u, {
14662
+ }, Lf = ({ 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 }) => {
14663
+ let u = _f(e, t, n), d = Ef(u, t, n), f = vf(u, {
14624
14664
  suffix: a,
14625
14665
  formatValue: o
14626
14666
  });
@@ -14634,7 +14674,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14634
14674
  /* @__PURE__ */ v("div", {
14635
14675
  className: "sf-progress-bar-readonly__track",
14636
14676
  children: /* @__PURE__ */ v("div", {
14637
- className: (0, X.default)("sf-progress-bar-readonly__fill", jf[s]),
14677
+ className: (0, X.default)("sf-progress-bar-readonly__fill", If[s]),
14638
14678
  style: { width: `${d}%` },
14639
14679
  role: "progressbar",
14640
14680
  "aria-label": r ?? "Progreso",
@@ -14649,11 +14689,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14649
14689
  })
14650
14690
  ]
14651
14691
  });
14652
- }, Nf = ({ 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 }) => {
14692
+ }, Rf = ({ 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 }) => {
14653
14693
  let [f, p] = h(0), m = b({
14654
14694
  name: t,
14655
14695
  control: e.control
14656
- }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = Pf(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
14696
+ }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = zf(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
14657
14697
  m.field.onChange(e), u?.(e), m.field.onBlur();
14658
14698
  }, w = (e, t) => {
14659
14699
  if (y) return;
@@ -14693,12 +14733,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
14693
14733
  }, e))
14694
14734
  })
14695
14735
  });
14696
- }, Pf = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), Ff = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14736
+ }, zf = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), Bf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14697
14737
  let d = b({
14698
14738
  name: t,
14699
14739
  control: e.control
14700
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = bf(d.field.value), g = (e) => {
14701
- let t = bf(e, h);
14740
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Tf(d.field.value), g = (e) => {
14741
+ let t = Tf(e, h);
14702
14742
  d.field.onChange(t), l?.(t);
14703
14743
  };
14704
14744
  return /* @__PURE__ */ v(Z, {
@@ -14741,11 +14781,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14741
14781
  })]
14742
14782
  })
14743
14783
  });
14744
- }, If = ({ 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 }) => {
14784
+ }, Vf = ({ 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 }) => {
14745
14785
  let [f, p] = h(""), m = b({
14746
14786
  name: t,
14747
14787
  control: e.control
14748
- }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = hf(m.field.value), C = o != null && S.length >= o, w = (e) => {
14788
+ }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = bf(m.field.value), C = o != null && S.length >= o, w = (e) => {
14749
14789
  m.field.onChange(e), u?.(e);
14750
14790
  }, T = () => {
14751
14791
  let e = f.trim();
@@ -14797,11 +14837,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14797
14837
  })]
14798
14838
  })
14799
14839
  });
14800
- }, Lf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14840
+ }, Hf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14801
14841
  let d = b({
14802
14842
  name: t,
14803
14843
  control: e.control
14804
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = _f(d.field.value), g = (e) => {
14844
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Sf(d.field.value), g = (e) => {
14805
14845
  d.field.onChange(e), l?.(e);
14806
14846
  }, _ = (e, t, n) => {
14807
14847
  g(h.map((r, i) => i === e ? {
@@ -14886,7 +14926,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14886
14926
  })]
14887
14927
  })
14888
14928
  });
14889
- }, Rf = ({ items: e, onReorder: t, className: n }) => {
14929
+ }, Uf = ({ items: e, onReorder: t, className: n }) => {
14890
14930
  let [r, i] = h(null), a = (n) => (a) => {
14891
14931
  if (a.preventDefault(), !r) return;
14892
14932
  let o = e.findIndex((e) => e.id === r);
@@ -14912,7 +14952,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14912
14952
  })]
14913
14953
  }, e.id))
14914
14954
  });
14915
- }, zf = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
14955
+ }, Wf = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
14916
14956
  className: (0, X.default)("sf-card-radio-group", i),
14917
14957
  role: "radiogroup",
14918
14958
  "aria-label": a,
@@ -14957,7 +14997,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14957
14997
  ]
14958
14998
  }, n.value);
14959
14999
  })
14960
- }), Bf = ({ value: e, onChange: t, zones: n, label: r, disabled: i, className: a }) => {
15000
+ }), Gf = ({ value: e, onChange: t, zones: n, label: r, disabled: i, className: a }) => {
14961
15001
  let o = Math.max(0, n.findIndex((t) => t.value === e)), s = n[o], c = n.length > 1 ? o / (n.length - 1) * 100 : 0;
14962
15002
  return /* @__PURE__ */ y("div", {
14963
15003
  className: (0, X.default)("sf-semantic-slider", a),
@@ -14988,19 +15028,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
14988
15028
  })
14989
15029
  ]
14990
15030
  });
14991
- }, Vf = {
15031
+ }, Kf = {
14992
15032
  slate: "var(--sf-metric-tone-slate)",
14993
15033
  emerald: "var(--sf-metric-tone-emerald)",
14994
15034
  amber: "var(--sf-metric-tone-amber)",
14995
15035
  red: "var(--sf-metric-tone-red)",
14996
15036
  blue: "var(--sf-metric-tone-blue)"
14997
- }, Hf = [
15037
+ }, qf = [
14998
15038
  "slate",
14999
15039
  "blue",
15000
15040
  "amber",
15001
15041
  "emerald",
15002
15042
  "red"
15003
- ], Uf = ({ segments: e, onChange: t, unit: n, valueFormat: r, className: i }) => {
15043
+ ], Jf = ({ segments: e, onChange: t, unit: n, valueFormat: r, className: i }) => {
15004
15044
  let a = m(null), o = m(null), [s, c] = h(null), l = e.reduce((e, t) => e + t.value, 0), u = r ?? ((e) => `${e.toLocaleString("es-PE")}${n ? ` ${n}` : ""}`), d = (n, r, i) => {
15005
15045
  t && t(e.map((e, t) => t === n ? {
15006
15046
  ...e,
@@ -15042,14 +15082,14 @@ ${e.map((e) => `<Row>${n.map((t) => {
15042
15082
  ref: a,
15043
15083
  className: "sf-allocation-bar__track",
15044
15084
  children: e.map((n, r) => {
15045
- let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ?? Hf[r % Hf.length], c = r === e.length - 1, d = c ? 0 : n.value + e[r + 1].value, m = d > 0 ? Math.round(n.value / d * 100) : 50;
15085
+ let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ?? qf[r % qf.length], c = r === e.length - 1, d = c ? 0 : n.value + e[r + 1].value, m = d > 0 ? Math.round(n.value / d * 100) : 50;
15046
15086
  return /* @__PURE__ */ y("div", {
15047
15087
  className: "contents",
15048
15088
  children: [/* @__PURE__ */ v("div", {
15049
15089
  className: "sf-allocation-bar__seg",
15050
15090
  style: {
15051
15091
  width: `${i}%`,
15052
- backgroundColor: Vf[o]
15092
+ backgroundColor: Kf[o]
15053
15093
  },
15054
15094
  title: `${n.label} · ${u(n.value)} (${Math.round(i)}%)`
15055
15095
  }), !c && t && /* @__PURE__ */ v("div", {
@@ -15079,7 +15119,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15079
15119
  children: [
15080
15120
  /* @__PURE__ */ v("span", {
15081
15121
  className: "sf-allocation-bar__label-dot",
15082
- style: { backgroundColor: Vf[t.tone ?? Hf[e.indexOf(t) % Hf.length]] },
15122
+ style: { backgroundColor: Kf[t.tone ?? qf[e.indexOf(t) % qf.length]] },
15083
15123
  "aria-hidden": "true"
15084
15124
  }),
15085
15125
  t.label,
@@ -15093,11 +15133,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15093
15133
  })
15094
15134
  })]
15095
15135
  });
15096
- }, Wf = (e) => new Date(e).toLocaleTimeString("es-PE", {
15136
+ }, Yf = (e) => new Date(e).toLocaleTimeString("es-PE", {
15097
15137
  hour: "2-digit",
15098
15138
  minute: "2-digit"
15099
- }), Gf = ({ value: e, onChange: t, min: n, max: r, step: i, marks: a, formatValue: o, label: s, disabled: c, className: l }) => {
15100
- let u = o ?? Wf, d = r > n ? Math.min(100, Math.max(0, (e - n) / (r - n) * 100)) : 0, f = i ?? Math.max(1, Math.round((r - n) / 200));
15139
+ }), Xf = ({ value: e, onChange: t, min: n, max: r, step: i, marks: a, formatValue: o, label: s, disabled: c, className: l }) => {
15140
+ let u = o ?? Yf, d = r > n ? Math.min(100, Math.max(0, (e - n) / (r - n) * 100)) : 0, f = i ?? Math.max(1, Math.round((r - n) / 200));
15101
15141
  return /* @__PURE__ */ y("div", {
15102
15142
  className: (0, X.default)("sf-temporal-scrub", l),
15103
15143
  children: [s && /* @__PURE__ */ v("p", {
@@ -15139,7 +15179,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15139
15179
  ]
15140
15180
  })]
15141
15181
  });
15142
- }, Kf = {
15182
+ }, Zf = {
15143
15183
  group: {
15144
15184
  label: "Grupo / Entidad",
15145
15185
  labelShort: "GRP",
@@ -15158,7 +15198,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15158
15198
  rowClass: "sf-org-tree-row--role",
15159
15199
  barClass: "sf-org-tree-bar--role"
15160
15200
  }
15161
- }, qf = (e) => {
15201
+ }, Qf = (e) => {
15162
15202
  let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
15163
15203
  for (let n of e) {
15164
15204
  let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
@@ -15185,16 +15225,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
15185
15225
  hasChildren: !1
15186
15226
  });
15187
15227
  return r;
15188
- }, Jf = (e, t = Kf) => t[e] ?? Kf[e] ?? null, Yf = (e) => e.length, Xf = (e) => {
15228
+ }, $f = (e, t = Zf) => t[e] ?? Zf[e] ?? null, ep = (e) => e.length, tp = (e) => {
15189
15229
  let t = new Set(e.map((e) => e.id));
15190
15230
  return e.filter((e) => {
15191
15231
  let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
15192
15232
  return n == null || !t.has(n);
15193
15233
  });
15194
- }, Zf = ({ type: e, className: t }) => v(e === "group" ? wt : e === "role" ? Ze : Xe, {
15234
+ }, np = ({ type: e, className: t }) => v(e === "group" ? wt : e === "role" ? Ze : Xe, {
15195
15235
  className: t,
15196
15236
  "aria-hidden": "true"
15197
- }), Qf = ({ 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 = Kf, onRenderNode: _, maxHeight: b = 480, className: x }) => {
15237
+ }), rp = ({ 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 = Zf, onRenderNode: _, maxHeight: b = 480, className: x }) => {
15198
15238
  let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
15199
15239
  visible: !1,
15200
15240
  x: 0,
@@ -15217,7 +15257,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15217
15257
  window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
15218
15258
  };
15219
15259
  }, [w.visible]);
15220
- let D = p(() => qf(e), [e]), O = s((e) => {
15260
+ let D = p(() => Qf(e), [e]), O = s((e) => {
15221
15261
  let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
15222
15262
  for (; t != null;) {
15223
15263
  if (S.has(t)) return !0;
@@ -15304,7 +15344,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15304
15344
  className: "sf-org-tree__empty",
15305
15345
  children: "Sin nodos"
15306
15346
  }), k.map((e) => {
15307
- let t = Jf(e.type, g);
15347
+ let t = $f(e.type, g);
15308
15348
  return /* @__PURE__ */ v("li", {
15309
15349
  role: "treeitem",
15310
15350
  "aria-level": e.depth + 1,
@@ -15324,7 +15364,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15324
15364
  tabIndex: e.hasChildren ? 0 : -1,
15325
15365
  children: S.has(e.id) ? /* @__PURE__ */ v(vt, { className: "h-4 w-4" }) : /* @__PURE__ */ v(bt, { className: "h-4 w-4" })
15326
15366
  }),
15327
- /* @__PURE__ */ v(Zf, {
15367
+ /* @__PURE__ */ v(np, {
15328
15368
  type: e.type,
15329
15369
  className: "h-4 w-4 shrink-0 opacity-70"
15330
15370
  }),
@@ -15409,7 +15449,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15409
15449
  })
15410
15450
  ]
15411
15451
  });
15412
- }, $f = {
15452
+ }, ip = {
15413
15453
  street: {
15414
15454
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
15415
15455
  attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
@@ -15418,27 +15458,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
15418
15458
  url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
15419
15459
  attribution: "Tiles &copy; Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
15420
15460
  }
15421
- }, ep = {
15461
+ }, ap = {
15422
15462
  default: "Nodo",
15423
15463
  nap: "NAP",
15424
15464
  olt: "OLT",
15425
15465
  splitter: "Splitter"
15426
- }, tp = {
15466
+ }, op = {
15427
15467
  default: "var(--sf-accent)",
15428
15468
  nap: "var(--sf-network-kind-nap)",
15429
15469
  olt: "var(--sf-network-kind-olt)",
15430
15470
  splitter: "var(--sf-network-kind-splitter)"
15431
- }, np = {
15471
+ }, sp = {
15432
15472
  normal: "var(--sf-network-status-normal)",
15433
15473
  warning: "var(--sf-network-status-warning)",
15434
15474
  critical: "var(--sf-network-status-critical)",
15435
15475
  maintenance: "var(--sf-network-status-maintenance)"
15436
- }, rp = {
15476
+ }, cp = {
15437
15477
  normal: "Normal",
15438
15478
  warning: "Advertencia",
15439
15479
  critical: "Crítico",
15440
15480
  maintenance: "Mantenimiento"
15441
- }, ip = {
15481
+ }, lp = {
15442
15482
  backbone: {
15443
15483
  color: "var(--sf-network-edge-backbone)",
15444
15484
  weight: 2.5
@@ -15452,7 +15492,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15452
15492
  weight: 1.5,
15453
15493
  dashArray: "6 4"
15454
15494
  }
15455
- }, ap = Mu, op = (e) => {
15495
+ }, up = Lu, dp = (e) => {
15456
15496
  if (!Array.isArray(e)) return [];
15457
15497
  let t = [];
15458
15498
  for (let n of e) {
@@ -15461,24 +15501,24 @@ ${e.map((e) => `<Row>${n.map((t) => {
15461
15501
  if (!r) continue;
15462
15502
  let i = Number(e.lat), a = Number(e.lng);
15463
15503
  if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
15464
- let o = String(e.status ?? "normal"), s = o in np ? o : "normal", c = {
15504
+ let o = String(e.status ?? "normal"), s = o in sp ? o : "normal", c = {
15465
15505
  id: r,
15466
15506
  label: String(e.label ?? ""),
15467
15507
  lat: i,
15468
15508
  lng: a,
15469
15509
  status: s
15470
15510
  }, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
15471
- l in ep && (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);
15511
+ l in ap && (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);
15472
15512
  }
15473
15513
  return t;
15474
- }, sp = (e) => {
15514
+ }, fp = (e) => {
15475
15515
  if (!Array.isArray(e)) return [];
15476
15516
  let t = [];
15477
15517
  for (let n of e) {
15478
15518
  if (typeof n != "object" || !n) continue;
15479
15519
  let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
15480
15520
  if (!r || !i) continue;
15481
- let a = String(e.type ?? "backbone"), o = a in ip ? a : "backbone";
15521
+ let a = String(e.type ?? "backbone"), o = a in lp ? a : "backbone";
15482
15522
  t.push({
15483
15523
  from: r,
15484
15524
  to: i,
@@ -15486,7 +15526,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15486
15526
  });
15487
15527
  }
15488
15528
  return t;
15489
- }, cp = (e) => {
15529
+ }, pp = (e) => {
15490
15530
  let t = {
15491
15531
  normal: 0,
15492
15532
  warning: 0,
@@ -15495,18 +15535,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
15495
15535
  };
15496
15536
  for (let n of e) t[n.status] += 1;
15497
15537
  return t;
15498
- }, lp = (e) => {
15538
+ }, mp = (e) => {
15499
15539
  if (e.length === 0) return null;
15500
15540
  let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
15501
15541
  return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
15502
- }, up = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), dp = (e, t) => e.flatMap((e) => {
15542
+ }, hp = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), gp = (e, t) => e.flatMap((e) => {
15503
15543
  let n = t[e.from], r = t[e.to];
15504
15544
  return !n || !r ? [] : [{
15505
15545
  edge: e,
15506
15546
  line: [n, r]
15507
15547
  }];
15508
- }), fp = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
15509
- let i = cp(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
15548
+ }), _p = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
15549
+ let i = pp(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
15510
15550
  return /* @__PURE__ */ y("div", {
15511
15551
  className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
15512
15552
  role: "region",
@@ -15518,15 +15558,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
15518
15558
  }),
15519
15559
  /* @__PURE__ */ v("ul", {
15520
15560
  className: "space-y-1",
15521
- children: Object.keys(rp).map((e) => /* @__PURE__ */ y("li", {
15561
+ children: Object.keys(cp).map((e) => /* @__PURE__ */ y("li", {
15522
15562
  className: "sf-network-legend__item",
15523
15563
  children: [/* @__PURE__ */ y("span", {
15524
15564
  className: "flex items-center gap-2",
15525
15565
  children: [/* @__PURE__ */ v("span", {
15526
15566
  className: "inline-block h-2.5 w-2.5 rounded-full",
15527
- style: { background: np[e] },
15567
+ style: { background: sp[e] },
15528
15568
  "aria-hidden": "true"
15529
- }), rp[e]]
15569
+ }), cp[e]]
15530
15570
  }), /* @__PURE__ */ v("span", {
15531
15571
  className: "sf-network-legend__count",
15532
15572
  children: i[e]
@@ -15539,7 +15579,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15539
15579
  }), /* @__PURE__ */ v("ul", {
15540
15580
  className: "space-y-1",
15541
15581
  children: a.map((e) => {
15542
- let t = ip[e ?? "backbone"];
15582
+ let t = lp[e ?? "backbone"];
15543
15583
  return /* @__PURE__ */ y("li", {
15544
15584
  className: "sf-network-legend__item sf-network-legend__item--edge",
15545
15585
  children: [/* @__PURE__ */ v("span", {
@@ -15559,19 +15599,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
15559
15599
  })
15560
15600
  ]
15561
15601
  });
15562
- }, pp = [-12.0464, -77.0428], mp = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), hp = (e, t) => {
15563
- let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? ep[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = mp(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
15602
+ }, vp = [-12.0464, -77.0428], yp = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), bp = (e, t) => {
15603
+ let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? ap[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = yp(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
15564
15604
  return oe.divIcon({
15565
15605
  className: "sf-network-marker-root",
15566
15606
  iconAnchor: [24, 42],
15567
15607
  iconSize: [48, 48],
15568
15608
  html: `<div class="sf-network-marker${o}">
15569
15609
  <div class="sf-network-marker__label">${a}</div>
15570
- <div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${mp(String(i))}</div>
15610
+ <div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${yp(String(i))}</div>
15571
15611
  </div>`
15572
15612
  });
15573
- }, gp = ({ nodes: e }) => {
15574
- let t = U(), n = lp(e);
15613
+ }, xp = ({ nodes: e }) => {
15614
+ let t = U(), n = mp(e);
15575
15615
  return u(() => {
15576
15616
  n && t.fitBounds(n, {
15577
15617
  padding: [32, 32],
@@ -15582,8 +15622,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
15582
15622
  t,
15583
15623
  e
15584
15624
  ]), null;
15585
- }, _p = ({ nodes: e, edges: t = [], center: n = pp, 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 }) => {
15586
- let g = Lo(), [_, b] = h("street"), x = l ?? _, S = $f[x], C = p(() => up(e), [e]), w = p(() => dp(t, C), [t, C]), T = (e) => {
15625
+ }, Sp = ({ nodes: e, edges: t = [], center: n = vp, 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 }) => {
15626
+ let g = Lo(), [_, b] = h("street"), x = l ?? _, S = ip[x], C = p(() => hp(e), [e]), w = p(() => gp(t, C), [t, C]), T = (e) => {
15587
15627
  l === void 0 && b(e), u?.(e);
15588
15628
  };
15589
15629
  return /* @__PURE__ */ y("div", {
@@ -15592,31 +15632,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
15592
15632
  role: "region",
15593
15633
  "aria-label": f,
15594
15634
  children: [
15595
- g ? /* @__PURE__ */ y(V, {
15635
+ g ? /* @__PURE__ */ y(te, {
15596
15636
  center: n,
15597
15637
  zoom: r,
15598
15638
  scrollWheelZoom: !0,
15599
15639
  className: "h-full w-full",
15600
15640
  children: [
15601
- /* @__PURE__ */ v(H, {
15641
+ /* @__PURE__ */ v(V, {
15602
15642
  attribution: S.attribution,
15603
15643
  url: S.url
15604
15644
  }),
15605
- c && e.length > 0 && /* @__PURE__ */ v(gp, { nodes: e }),
15645
+ c && e.length > 0 && /* @__PURE__ */ v(xp, { nodes: e }),
15606
15646
  w.map(({ edge: e, line: t }) => {
15607
- let n = ip[e.type ?? "backbone"];
15608
- return /* @__PURE__ */ v(re, {
15647
+ let n = lp[e.type ?? "backbone"];
15648
+ return /* @__PURE__ */ v(ie, {
15609
15649
  positions: t,
15610
15650
  pathOptions: {
15611
- color: ap(n.color),
15651
+ color: up(n.color),
15612
15652
  weight: n.weight,
15613
15653
  dashArray: n.dashArray
15614
15654
  }
15615
15655
  }, `${e.from}-${e.to}-${e.type ?? "backbone"}`);
15616
15656
  }),
15617
- e.map((e) => /* @__PURE__ */ v(te, {
15657
+ e.map((e) => /* @__PURE__ */ v(ne, {
15618
15658
  position: C[e.id],
15619
- icon: hp(e, e.id === a),
15659
+ icon: bp(e, e.id === a),
15620
15660
  title: e.label,
15621
15661
  alt: `${e.label}, estado ${e.status}`,
15622
15662
  keyboard: !!o,
@@ -15640,17 +15680,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
15640
15680
  children: e === "street" ? "Mapa" : "Satélite"
15641
15681
  }, e))
15642
15682
  }),
15643
- s && e.length > 0 && /* @__PURE__ */ v(fp, {
15683
+ s && e.length > 0 && /* @__PURE__ */ v(_p, {
15644
15684
  nodes: e,
15645
15685
  edges: t
15646
15686
  })
15647
15687
  ]
15648
15688
  });
15649
- }, vp = {
15689
+ }, Cp = {
15650
15690
  edit: "sf-audit-timeline__icon-wrap--edit",
15651
15691
  sync: "sf-audit-timeline__icon-wrap--sync",
15652
15692
  create: "sf-audit-timeline__icon-wrap--create"
15653
- }, yp = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
15693
+ }, wp = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
15654
15694
  let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
15655
15695
  return /* @__PURE__ */ y("section", {
15656
15696
  className: (0, X.default)("sf-audit-timeline", a),
@@ -15689,11 +15729,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15689
15729
  /* @__PURE__ */ v("div", {
15690
15730
  className: "sf-audit-timeline__marker",
15691
15731
  children: t.icon ? /* @__PURE__ */ v("span", {
15692
- className: (0, X.default)("sf-audit-timeline__icon-wrap", vp[r]),
15732
+ className: (0, X.default)("sf-audit-timeline__icon-wrap", Cp[r]),
15693
15733
  "aria-hidden": "true",
15694
15734
  children: t.icon
15695
15735
  }) : /* @__PURE__ */ v("span", {
15696
- className: (0, X.default)("sf-audit-timeline__icon-wrap", vp[r]),
15736
+ className: (0, X.default)("sf-audit-timeline__icon-wrap", Cp[r]),
15697
15737
  "aria-hidden": "true"
15698
15738
  })
15699
15739
  }),
@@ -15729,16 +15769,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
15729
15769
  })]
15730
15770
  })]
15731
15771
  });
15732
- }, bp = {
15772
+ }, Tp = {
15733
15773
  info: "sf-record-list__icon--info",
15734
15774
  warning: "sf-record-list__icon--warning",
15735
15775
  success: "sf-record-list__icon--success",
15736
15776
  neutral: "sf-record-list__icon--neutral"
15737
- }, xp = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
15777
+ }, Ep = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
15738
15778
  className: (0, X.default)("sf-record-list__item", o),
15739
15779
  children: [
15740
15780
  e && /* @__PURE__ */ v("span", {
15741
- className: (0, X.default)("sf-record-list__icon", bp[t]),
15781
+ className: (0, X.default)("sf-record-list__icon", Tp[t]),
15742
15782
  "aria-hidden": "true",
15743
15783
  children: e
15744
15784
  }),
@@ -15763,7 +15803,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15763
15803
  children: a
15764
15804
  })
15765
15805
  ]
15766
- }), Sp = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
15806
+ }), Dp = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
15767
15807
  className: (0, X.default)("sf-record-list", r),
15768
15808
  "aria-label": i ?? (typeof e == "string" ? e : void 0),
15769
15809
  children: [(e || t) && /* @__PURE__ */ y("div", {
@@ -15777,9 +15817,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
15777
15817
  })]
15778
15818
  }), /* @__PURE__ */ v("div", {
15779
15819
  className: "sf-record-list__items",
15780
- children: n.map((e, t) => /* @__PURE__ */ v(xp, { ...e }, e.id ?? t))
15820
+ children: n.map((e, t) => /* @__PURE__ */ v(Ep, { ...e }, e.id ?? t))
15781
15821
  })]
15782
- }), Cp = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
15822
+ }), Op = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
15783
15823
  className: (0, X.default)("sf-live-chip", n),
15784
15824
  children: [/* @__PURE__ */ v("span", {
15785
15825
  className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
@@ -15788,12 +15828,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
15788
15828
  className: "sf-live-chip__label",
15789
15829
  children: e
15790
15830
  })]
15791
- }), wp = {
15831
+ }), kp = {
15792
15832
  default: "var(--sf-text, #1B2A38)",
15793
15833
  success: "#1F8A4C",
15794
15834
  warning: "#C76A12",
15795
15835
  danger: "#C0392B"
15796
- }, Tp = {
15836
+ }, Ap = {
15797
15837
  display: "flex",
15798
15838
  alignItems: "center",
15799
15839
  justifyContent: "space-between",
@@ -15804,110 +15844,110 @@ ${e.map((e) => `<Row>${n.map((t) => {
15804
15844
  border: "1px solid var(--sf-border, #E2E8EC)",
15805
15845
  borderRadius: 13,
15806
15846
  boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
15807
- }, Ep = {
15847
+ }, jp = {
15808
15848
  display: "flex",
15809
15849
  alignItems: "center",
15810
15850
  gap: 14,
15811
15851
  flexWrap: "wrap"
15812
- }, Dp = {
15852
+ }, Mp = {
15813
15853
  width: 1,
15814
15854
  height: 20,
15815
15855
  background: "var(--sf-border, #DCE3E7)"
15816
- }, Op = {
15856
+ }, Np = {
15817
15857
  fontSize: 13,
15818
15858
  fontWeight: 600,
15819
15859
  color: "var(--sf-text-subtle, #8A98A4)"
15820
- }, kp = {
15860
+ }, Pp = {
15821
15861
  fontSize: 15,
15822
15862
  fontWeight: 800,
15823
15863
  color: "var(--sf-text, #1B2A38)",
15824
15864
  fontVariantNumeric: "tabular-nums"
15825
- }, Ap = {
15865
+ }, Fp = {
15826
15866
  fontSize: 12.5,
15827
15867
  fontWeight: 800,
15828
15868
  color: "#C76A12"
15829
- }, jp = {
15869
+ }, Ip = {
15830
15870
  fontSize: 13,
15831
15871
  fontWeight: 700,
15832
15872
  color: "var(--sf-text-subtle, #5C7180)"
15833
- }, Mp = {
15873
+ }, Lp = {
15834
15874
  display: "flex",
15835
15875
  alignItems: "center",
15836
15876
  gap: 22,
15837
15877
  margin: 0
15838
- }, Np = {
15878
+ }, Rp = {
15839
15879
  display: "flex",
15840
15880
  alignItems: "baseline",
15841
15881
  gap: 6
15842
- }, Pp = {
15882
+ }, zp = {
15843
15883
  fontSize: 10.5,
15844
15884
  fontWeight: 700,
15845
15885
  letterSpacing: ".05em",
15846
15886
  textTransform: "uppercase",
15847
15887
  color: "var(--sf-text-subtle, #8A98A4)"
15848
- }, Fp = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
15888
+ }, Bp = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
15849
15889
  className: (0, X.default)("sf-live-status-bar", r),
15850
15890
  "aria-label": i,
15851
- style: Tp,
15891
+ style: Ap,
15852
15892
  children: [/* @__PURE__ */ y("div", {
15853
- style: Ep,
15893
+ style: jp,
15854
15894
  children: [
15855
- /* @__PURE__ */ v(Cp, { label: "En vivo" }),
15895
+ /* @__PURE__ */ v(Op, { label: "En vivo" }),
15856
15896
  /* @__PURE__ */ v("span", {
15857
- style: jp,
15897
+ style: Ip,
15858
15898
  children: e
15859
15899
  }),
15860
15900
  n && /* @__PURE__ */ y(_, { children: [
15861
15901
  /* @__PURE__ */ v("span", {
15862
- style: Dp,
15902
+ style: Mp,
15863
15903
  "aria-hidden": "true"
15864
15904
  }),
15865
15905
  /* @__PURE__ */ v("span", {
15866
- style: Op,
15906
+ style: Np,
15867
15907
  children: n.label ?? "Próxima salida"
15868
15908
  }),
15869
15909
  /* @__PURE__ */ v("span", {
15870
- style: kp,
15910
+ style: Pp,
15871
15911
  children: n.time
15872
15912
  }),
15873
15913
  n.countdown != null && /* @__PURE__ */ v("span", {
15874
- style: Ap,
15914
+ style: Fp,
15875
15915
  children: n.countdown
15876
15916
  })
15877
15917
  ] })
15878
15918
  ]
15879
15919
  }), /* @__PURE__ */ v("dl", {
15880
- style: Mp,
15920
+ style: Lp,
15881
15921
  children: t.map((e, t) => /* @__PURE__ */ y("div", {
15882
- style: Np,
15922
+ style: Rp,
15883
15923
  children: [/* @__PURE__ */ v("dd", {
15884
15924
  style: {
15885
15925
  margin: 0,
15886
15926
  fontSize: 20,
15887
15927
  fontWeight: 800,
15888
15928
  fontVariantNumeric: "tabular-nums",
15889
- color: wp[e.accent ?? "default"]
15929
+ color: kp[e.accent ?? "default"]
15890
15930
  },
15891
15931
  children: e.value
15892
15932
  }), /* @__PURE__ */ v("dt", {
15893
- style: Pp,
15933
+ style: zp,
15894
15934
  children: e.label
15895
15935
  })]
15896
15936
  }, e.id ?? `${e.label}-${t}`))
15897
15937
  })]
15898
- }), Ip = {
15938
+ }), Vp = {
15899
15939
  success: "sf-timeline__dot--success",
15900
15940
  warning: "sf-timeline__dot--warning",
15901
15941
  danger: "sf-timeline__dot--danger",
15902
15942
  info: "sf-timeline__dot--info",
15903
15943
  default: "sf-timeline__dot--default"
15904
- }, Lp = {
15944
+ }, Hp = {
15905
15945
  success: "sf-timeline__icon-wrap--success",
15906
15946
  warning: "sf-timeline__icon-wrap--warning",
15907
15947
  danger: "sf-timeline__icon-wrap--danger",
15908
15948
  info: "sf-timeline__icon-wrap--info",
15909
15949
  default: "sf-timeline__icon-wrap--default"
15910
- }, Rp = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
15950
+ }, Up = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
15911
15951
  className: (0, X.default)("sf-timeline", r),
15912
15952
  "aria-label": t,
15913
15953
  children: [e.length === 0 && /* @__PURE__ */ v("li", {
@@ -15926,11 +15966,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15926
15966
  /* @__PURE__ */ v("div", {
15927
15967
  className: "sf-timeline__marker",
15928
15968
  children: t.icon ? /* @__PURE__ */ v("span", {
15929
- className: (0, X.default)("sf-timeline__icon-wrap", Lp[r]),
15969
+ className: (0, X.default)("sf-timeline__icon-wrap", Hp[r]),
15930
15970
  "aria-hidden": "true",
15931
15971
  children: t.icon
15932
15972
  }) : /* @__PURE__ */ v("span", {
15933
- className: (0, X.default)("sf-timeline__dot", Ip[r]),
15973
+ className: (0, X.default)("sf-timeline__dot", Vp[r]),
15934
15974
  "aria-hidden": "true"
15935
15975
  })
15936
15976
  }),
@@ -15953,7 +15993,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15953
15993
  ]
15954
15994
  }, t.id ?? n);
15955
15995
  })]
15956
- }), zp = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
15996
+ }), Wp = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
15957
15997
  let o = m(null), [c, l] = h(0), d = s((t) => {
15958
15998
  let n = o.current;
15959
15999
  if (!n || e.length === 0) return;
@@ -16015,7 +16055,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16015
16055
  })
16016
16056
  ]
16017
16057
  });
16018
- }, Bp = ({ src: e, alt: t, aspectRatio: n = "16/9", fit: r = "cover", overlay: i = "none", children: a, rounded: o = !0, loading: s = "lazy", fallback: c, className: l, imgProps: u }) => {
16058
+ }, Gp = ({ src: e, alt: t, aspectRatio: n = "16/9", fit: r = "cover", overlay: i = "none", children: a, rounded: o = !0, loading: s = "lazy", fallback: c, className: l, imgProps: u }) => {
16019
16059
  let [d, f] = h(!1), p = !!e && !d;
16020
16060
  return /* @__PURE__ */ y("div", {
16021
16061
  className: (0, X.default)("sf-media-panel", o && "sf-media-panel--rounded", l),
@@ -16042,19 +16082,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
16042
16082
  })
16043
16083
  ]
16044
16084
  });
16045
- }, Vp = {
16085
+ }, Kp = {
16046
16086
  top: 8,
16047
16087
  right: 8,
16048
16088
  left: 0,
16049
16089
  bottom: 0
16050
- }, Hp = {
16090
+ }, qp = {
16051
16091
  top: 20,
16052
16092
  right: 8,
16053
16093
  left: 0,
16054
16094
  bottom: 0
16055
- }, Up = (e, t) => {
16095
+ }, Jp = (e, t) => {
16056
16096
  if (t !== "none") return e.stackId ?? "sf-stack";
16057
- }, Wp = (e) => e?.map((e, t) => {
16097
+ }, Yp = (e) => e?.map((e, t) => {
16058
16098
  let n = e.color ?? "var(--sf-chart-reference)", r = {
16059
16099
  stroke: n,
16060
16100
  strokeDasharray: e.strokeDasharray ?? "4 4",
@@ -16085,7 +16125,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16085
16125
  }
16086
16126
  })
16087
16127
  }, `ref-${t}`);
16088
- }), Gp = ({ 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, orientation: d = "vertical", stacking: f = "none", unit: m, yDomain: h, xAxisFormat: g, yAxisFormat: b, tooltipFormat: x, valueLabelFormat: S, showValueLabels: C = !1, referenceLines: w, onDataPointClick: T }) => {
16128
+ }), Xp = ({ 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, orientation: d = "vertical", stacking: f = "none", unit: m, yDomain: h, xAxisFormat: g, yAxisFormat: b, tooltipFormat: x, valueLabelFormat: S, showValueLabels: C = !1, referenceLines: w, onDataPointClick: T }) => {
16089
16129
  let E = e === "bar" && d === "horizontal", D = e === "line" ? "none" : f, O = D === "stacked-100", k = p(() => O ? gs(t, r) : t, [
16090
16130
  t,
16091
16131
  r,
@@ -16120,7 +16160,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16120
16160
  0,
16121
16161
  0
16122
16162
  ],
16123
- stackId: Up(e, D),
16163
+ stackId: Jp(e, D),
16124
16164
  maxBarSize: D === "none" ? 48 : void 0,
16125
16165
  children: z(e.key)
16126
16166
  }, e.key))
@@ -16156,7 +16196,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16156
16196
  fill: n,
16157
16197
  fillOpacity: .15,
16158
16198
  strokeWidth: 2,
16159
- stackId: Up(e, D),
16199
+ stackId: Jp(e, D),
16160
16200
  children: z(e.key)
16161
16201
  }, e.key);
16162
16202
  })
@@ -16173,7 +16213,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16173
16213
  children: /* @__PURE__ */ y(B, {
16174
16214
  data: k,
16175
16215
  layout: E ? "vertical" : "horizontal",
16176
- margin: C ? Hp : Vp,
16216
+ margin: C ? qp : Kp,
16177
16217
  onClick: R,
16178
16218
  children: [
16179
16219
  c && /* @__PURE__ */ v(ue, {
@@ -16211,7 +16251,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16211
16251
  formatter: L
16212
16252
  }),
16213
16253
  u && /* @__PURE__ */ v(pe, { wrapperStyle: ds }),
16214
- Wp(w),
16254
+ Yp(w),
16215
16255
  ee()
16216
16256
  ]
16217
16257
  })
@@ -16221,7 +16261,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
16221
16261
  children: o
16222
16262
  })
16223
16263
  });
16224
- }, Kp = ({ x: e, y: t, payload: n, data: r, showValues: i, format: a, color: o }) => {
16264
+ }, Zp = ({ items: e, className: t }) => /* @__PURE__ */ v("ul", {
16265
+ className: (0, X.default)("sf-chart-legend", t),
16266
+ children: e.map((e) => /* @__PURE__ */ y("li", {
16267
+ className: "sf-chart-legend__item",
16268
+ children: [/* @__PURE__ */ v("span", {
16269
+ className: "sf-chart-legend__swatch",
16270
+ style: { backgroundColor: e.color },
16271
+ "aria-hidden": "true"
16272
+ }), e.label]
16273
+ }, e.label))
16274
+ }), Qp = ({ x: e, y: t, payload: n, data: r, showValues: i, format: a, color: o }) => {
16225
16275
  let s = r.find((e) => e.label === n.value);
16226
16276
  return /* @__PURE__ */ y("g", { children: [/* @__PURE__ */ v("text", {
16227
16277
  x: e,
@@ -16242,7 +16292,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16242
16292
  },
16243
16293
  children: a(s.value, s.key)
16244
16294
  })] });
16245
- }, qp = ({ data: e, max: t = 100, color: n, height: r = 280, ariaLabel: i = "Diagnóstico", emptyMessage: a = "Sin datos para mostrar", className: o, showTooltip: s = !0, showLegend: c = !1, showValues: l = !1, valueFormat: u }) => {
16295
+ }, $p = ({ data: e, max: t = 100, color: n, height: r = 280, ariaLabel: i = "Diagnóstico", emptyMessage: a = "Sin datos para mostrar", className: o, showTooltip: s = !0, showLegend: c = !1, showValues: l = !1, valueFormat: u }) => {
16246
16296
  let d = e.length > 0, f = cs({ color: n }, 0), p = u ?? ps();
16247
16297
  return /* @__PURE__ */ v("div", {
16248
16298
  className: (0, X.default)("sf-chart", o),
@@ -16259,7 +16309,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16259
16309
  /* @__PURE__ */ v(_e, { stroke: "var(--sf-chart-grid)" }),
16260
16310
  /* @__PURE__ */ v(ge, {
16261
16311
  dataKey: "label",
16262
- tick: /* @__PURE__ */ v(Kp, {
16312
+ tick: /* @__PURE__ */ v(Qp, {
16263
16313
  x: 0,
16264
16314
  y: 0,
16265
16315
  payload: { value: "" },
@@ -16297,8 +16347,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
16297
16347
  children: a
16298
16348
  })
16299
16349
  });
16300
- }, Jp = (e) => Math.min(100, Math.max(0, e)), Yp = ({ value: e, average: t, min: n, max: r, unit: i, label: a, valueFormat: o, direction: s = "down-good", className: c }) => {
16301
- let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ? Jp((e - d) / (f - d) * 100) : 50, m = p(e), h = p(t), g = t === 0 ? 0 : (e - t) / Math.abs(t) * 100, _ = s === "neutral" ? null : s === "down-good" ? g <= 0 : g >= 0, b = Math.abs(g) >= .5;
16350
+ }, em = (e) => Math.min(100, Math.max(0, e)), tm = ({ value: e, average: t, min: n, max: r, unit: i, label: a, valueFormat: o, direction: s = "down-good", className: c }) => {
16351
+ let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ? em((e - d) / (f - d) * 100) : 50, m = p(e), h = p(t), g = t === 0 ? 0 : (e - t) / Math.abs(t) * 100, _ = s === "neutral" ? null : s === "down-good" ? g <= 0 : g >= 0, b = Math.abs(g) >= .5;
16302
16352
  return /* @__PURE__ */ y("div", {
16303
16353
  className: (0, X.default)("sf-deviation-band", c),
16304
16354
  children: [
@@ -16338,7 +16388,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16338
16388
  })
16339
16389
  ]
16340
16390
  });
16341
- }, Xp = (e, { initialPageSize: t = 10 } = {}) => {
16391
+ }, nm = (e, { initialPageSize: t = 10 } = {}) => {
16342
16392
  let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
16343
16393
  let t = n.trim().toLowerCase();
16344
16394
  return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
@@ -16365,37 +16415,37 @@ ${e.map((e) => `<Row>${n.map((t) => {
16365
16415
  ]),
16366
16416
  totalItems: l
16367
16417
  };
16368
- }, Zp = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), Qp = (e) => typeof e == "string" || typeof e == "number", $p = (e, t) => {
16369
- let n = Zp(t);
16418
+ }, rm = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), im = (e) => typeof e == "string" || typeof e == "number", am = (e, t) => {
16419
+ let n = rm(t);
16370
16420
  return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
16371
- }, em = (e, t, n) => {
16421
+ }, om = (e, t, n) => {
16372
16422
  if (t?.length) return [...t];
16373
16423
  let r = new Set(n), i = [];
16374
- for (let t in e) r.has(t) || Qp(e[t]) && i.push(t);
16424
+ for (let t in e) r.has(t) || im(e[t]) && i.push(t);
16375
16425
  return i;
16376
- }, tm = (e, t, n) => {
16377
- let r = "", i = em(e, t, n);
16426
+ }, sm = (e, t, n) => {
16427
+ let r = "", i = om(e, t, n);
16378
16428
  for (let t of i) {
16379
16429
  let n = e[t];
16380
- if (!Qp(n)) continue;
16381
- let i = $p(t, n);
16430
+ if (!im(n)) continue;
16431
+ let i = am(t, n);
16382
16432
  i && (r += `${i} `);
16383
16433
  }
16384
16434
  return r;
16385
- }, nm = (e) => {
16435
+ }, cm = (e) => {
16386
16436
  let t = e.split(";"), n = [];
16387
16437
  for (let e of t) {
16388
- let t = Zp(e);
16438
+ let t = rm(e);
16389
16439
  t.length >= 2 && n.push(t);
16390
16440
  }
16391
16441
  return n;
16392
- }, rm = (e, t) => {
16393
- let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => nm(i), [i]), u = p(() => {
16442
+ }, lm = (e, t) => {
16443
+ let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => cm(i), [i]), u = p(() => {
16394
16444
  if (!e?.length) return [];
16395
16445
  let t = [];
16396
16446
  for (let n of e) t.push({
16397
16447
  item: n,
16398
- searchIndex: tm(n, o, s)
16448
+ searchIndex: sm(n, o, s)
16399
16449
  });
16400
16450
  return t;
16401
16451
  }, [
@@ -16437,15 +16487,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
16437
16487
  };
16438
16488
  //#endregion
16439
16489
  //#region src/hooks/useArrayPaginator.ts
16440
- function im(e, t, n) {
16490
+ function um(e, t, n) {
16441
16491
  if (t <= 0) return [];
16442
16492
  let r = Math.max(0, n);
16443
16493
  return r >= e.length ? [] : e.slice(r, r + t);
16444
16494
  }
16445
- var am = (e, t, n) => {
16495
+ var dm = (e, t, n) => {
16446
16496
  let r = e?.[n], i = t?.[n];
16447
16497
  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" });
16448
- }, om = (e, t) => {
16498
+ }, fm = (e, t) => {
16449
16499
  let [n, r] = h([]), [i, a] = h(() => ({
16450
16500
  limit: Math.max(1, t?.limit ?? 100),
16451
16501
  offset: 0
@@ -16458,7 +16508,7 @@ var am = (e, t, n) => {
16458
16508
  if (e.length === 0) return [];
16459
16509
  let r = [...e];
16460
16510
  if (n.length > 0) {
16461
- let e = t?.onSortFunc ?? am, i = t?.strictSort ?? !1;
16511
+ let e = t?.onSortFunc ?? dm, i = t?.strictSort ?? !1;
16462
16512
  r.sort((t, r) => {
16463
16513
  for (let { id: a, desc: o } of n) {
16464
16514
  if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
@@ -16468,7 +16518,7 @@ var am = (e, t, n) => {
16468
16518
  return 0;
16469
16519
  });
16470
16520
  }
16471
- return im(r, o, c);
16521
+ return um(r, o, c);
16472
16522
  }, [
16473
16523
  e,
16474
16524
  o,
@@ -16487,7 +16537,7 @@ var am = (e, t, n) => {
16487
16537
  onSortChange: r,
16488
16538
  pageData: u
16489
16539
  };
16490
- }, sm = (e, t) => {
16540
+ }, pm = (e, t) => {
16491
16541
  if (typeof window > "u") return t;
16492
16542
  try {
16493
16543
  let n = window.localStorage.getItem(e);
@@ -16495,8 +16545,8 @@ var am = (e, t, n) => {
16495
16545
  } catch {
16496
16546
  return t;
16497
16547
  }
16498
- }, cm = (e, t) => {
16499
- let [n, r] = h(() => sm(e, t));
16548
+ }, mm = (e, t) => {
16549
+ let [n, r] = h(() => pm(e, t));
16500
16550
  return [n, (t) => {
16501
16551
  r((n) => {
16502
16552
  let r = typeof t == "function" ? t(n) : t;
@@ -16506,82 +16556,82 @@ var am = (e, t, n) => {
16506
16556
  return r;
16507
16557
  });
16508
16558
  }];
16509
- }, lm = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), um = (e, t) => {
16559
+ }, hm = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), gm = (e, t) => {
16510
16560
  if (typeof window > "u") return;
16511
16561
  let n = new URL(window.location.href);
16512
16562
  t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
16513
- }, dm = (e) => {
16514
- um(e, null);
16515
- }, fm = (e, t) => {
16563
+ }, _m = (e) => {
16564
+ gm(e, null);
16565
+ }, vm = (e, t) => {
16516
16566
  let [n, r] = h(() => {
16517
16567
  let n = typeof e == "function" ? e() : e;
16518
16568
  if (!t) return n;
16519
- let r = lm(t);
16520
- return r == null || r === "" ? (um(t, n), n) : r;
16569
+ let r = hm(t);
16570
+ return r == null || r === "" ? (gm(t, n), n) : r;
16521
16571
  });
16522
16572
  return [n, (e) => {
16523
16573
  r((n) => {
16524
16574
  let r = typeof e == "function" ? e(n) : e;
16525
- return t && um(t, r), r;
16575
+ return t && gm(t, r), r;
16526
16576
  });
16527
16577
  }];
16528
- }, pm = () => {
16578
+ }, ym = () => {
16529
16579
  let e = globalThis.process?.env?.NODE_ENV;
16530
16580
  return e != null && e === "development";
16531
- }, mm = (e, t) => {
16581
+ }, bm = (e, t) => {
16532
16582
  let n = x({
16533
16583
  resolver: De(e),
16534
16584
  defaultValues: t?.defaultValues
16535
16585
  }), r = (e, t) => n.handleSubmit(e, (e, n) => {
16536
- pm() && console.log(e), t?.(e, n);
16586
+ ym() && console.log(e), t?.(e, n);
16537
16587
  });
16538
16588
  return {
16539
16589
  ...n,
16540
16590
  handleSubmit: r
16541
16591
  };
16542
- }, hm = (e) => {
16543
- let t = El(e);
16592
+ }, xm = (e) => {
16593
+ let t = jl(e);
16544
16594
  return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
16545
- }, gm = (e, t) => {
16595
+ }, Sm = (e, t) => {
16546
16596
  if (typeof document > "u") return;
16547
- let n = `\uFEFF${[t.columns.map((e) => hm(e.header)).join(","), ...e.map((e) => t.columns.map((t) => hm(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
16597
+ let n = `\uFEFF${[t.columns.map((e) => xm(e.header)).join(","), ...e.map((e) => t.columns.map((t) => xm(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
16548
16598
  a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
16549
- }, _m = "Este campo es requerido", vm = "Introduce una dirección de correo electrónico válida", ym = "El correo electrónico es obligatorio", bm = "El valor de este campo es inválido", xm = "Introduce un número de celular válido", Sm = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Cm = (e = _m) => G.string().transform(Sm).required(e), wm = () => G.string().transform(Sm).default(null).nullable(), Tm = (e = ym) => G.string().transform(Sm).email(vm).required(e), Em = (e = vm) => G.string().transform(Sm).test("emailTest", e, (e) => e == null || e === "" || G.string().email().isValidSync(e)).default(null).nullable(), Dm = (e, t = bm, n = _m) => G.string().transform(Sm).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), Om = (e, t = bm) => G.string().transform(Sm).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), km = (e) => {
16599
+ }, Cm = "Este campo es requerido", wm = "Introduce una dirección de correo electrónico válida", Tm = "El correo electrónico es obligatorio", Em = "El valor de este campo es inválido", Dm = "Introduce un número de celular válido", Om = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, km = (e = Cm) => G.string().transform(Om).required(e), Am = () => G.string().transform(Om).default(null).nullable(), jm = (e = Tm) => G.string().transform(Om).email(wm).required(e), Mm = (e = wm) => G.string().transform(Om).test("emailTest", e, (e) => e == null || e === "" || G.string().email().isValidSync(e)).default(null).nullable(), Nm = (e, t = Em, n = Cm) => G.string().transform(Om).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), Pm = (e, t = Em) => G.string().transform(Om).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), Fm = (e) => {
16550
16600
  let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
16551
16601
  return {
16552
16602
  minLength: t,
16553
16603
  maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
16554
16604
  };
16555
- }, Am = (e) => {
16556
- let { minLength: t, maxLength: n } = km(e), r = /^[0-9]+$/, i = G.string().transform(Sm).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
16605
+ }, Im = (e) => {
16606
+ let { minLength: t, maxLength: n } = Fm(e), r = /^[0-9]+$/, i = G.string().transform(Om).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
16557
16607
  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;
16558
- }, jm = (e) => Am(e).required(_m), Mm = (e) => Am(e).default(null).nullable(), Nm = (e = _m) => G.boolean().typeError("El tipo de dato debe ser booleano").required(e), Pm = () => G.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), Fm = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Im = (e = _m) => G.number().transform(Fm).typeError("Debe ser numérico").required(e), Lm = () => G.number().transform(Fm).typeError("Debe ser numérico").default(null).nullable().notRequired(), Rm = (e = _m) => G.number().transform(Fm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), zm = (e = _m) => Rm(e).integer("Este campo debe ser un número entero"), Bm = () => G.number().transform(Fm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), Vm = () => Bm().integer("Este campo debe ser un número entero"), Hm = (e) => {
16608
+ }, Lm = (e) => Im(e).required(Cm), Rm = (e) => Im(e).default(null).nullable(), zm = (e = Cm) => G.boolean().typeError("El tipo de dato debe ser booleano").required(e), Bm = () => G.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), Vm = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Hm = (e = Cm) => G.number().transform(Vm).typeError("Debe ser numérico").required(e), Um = () => G.number().transform(Vm).typeError("Debe ser numérico").default(null).nullable().notRequired(), Wm = (e = Cm) => G.number().transform(Vm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), Gm = (e = Cm) => Wm(e).integer("Este campo debe ser un número entero"), Km = () => G.number().transform(Vm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), qm = () => Km().integer("Este campo debe ser un número entero"), Jm = (e) => {
16559
16609
  let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
16560
16610
  return G.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 === "" || e.match(t) != null).default(null);
16561
- }, Um = (e = xm) => Hm(e).nullable(), Wm = (e = xm) => Hm(e).required(_m), Gm = (e = _m) => G.array().of(Cm()).min(1, "Debe contener al menos un elemento").required(e), Km = () => G.array().of(wm()).default(null).nullable(), qm = {
16562
- transformNullIfEmpty: Sm,
16563
- requiredString: Cm,
16564
- nullableString: wm,
16565
- requiredEmail: Tm,
16566
- nullableEmail: Em,
16567
- requiredMatchString: Dm,
16568
- nullableOrMatchString: Om,
16569
- requiredStringNumbersOnly: jm,
16570
- nullableStringNumbersOnly: Mm,
16571
- requiredBoolean: Nm,
16572
- nullableBoolean: Pm,
16573
- requiredNumber: Im,
16574
- nullableNumber: Lm,
16575
- requiredPositiveNumber: Rm,
16576
- requiredPositiveInteger: zm,
16577
- nullablePositiveNumber: Bm,
16578
- nullablePositiveInteger: Vm,
16579
- nullableCelular: Um,
16580
- requiredCelular: Wm,
16581
- requiredStringArray: Gm,
16582
- nullableStringArray: Km
16583
- }, Jm = (e) => G.object().shape(e(qm));
16611
+ }, Ym = (e = Dm) => Jm(e).nullable(), Xm = (e = Dm) => Jm(e).required(Cm), Zm = (e = Cm) => G.array().of(km()).min(1, "Debe contener al menos un elemento").required(e), Qm = () => G.array().of(Am()).default(null).nullable(), $m = {
16612
+ transformNullIfEmpty: Om,
16613
+ requiredString: km,
16614
+ nullableString: Am,
16615
+ requiredEmail: jm,
16616
+ nullableEmail: Mm,
16617
+ requiredMatchString: Nm,
16618
+ nullableOrMatchString: Pm,
16619
+ requiredStringNumbersOnly: Lm,
16620
+ nullableStringNumbersOnly: Rm,
16621
+ requiredBoolean: zm,
16622
+ nullableBoolean: Bm,
16623
+ requiredNumber: Hm,
16624
+ nullableNumber: Um,
16625
+ requiredPositiveNumber: Wm,
16626
+ requiredPositiveInteger: Gm,
16627
+ nullablePositiveNumber: Km,
16628
+ nullablePositiveInteger: qm,
16629
+ nullableCelular: Ym,
16630
+ requiredCelular: Xm,
16631
+ requiredStringArray: Zm,
16632
+ nullableStringArray: Qm
16633
+ }, eh = (e) => G.object().shape(e($m));
16584
16634
  //#endregion
16585
- export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar, Kd as AddressSearchInput, ni as Alert, qc as AlertLane, Wc as AlertRowList, Yc as AlertSummaryList, Uf as AllocationBar, Oo as AppBarContainer, Do as AppShell, Co as AppsGridIcon, of as AreaInput, En as AsyncCardSelect, Ar as AsyncCustomTable, wn as AsyncSearchSelect, kn as AsyncSearchTableSelect, yp as AuditTimeline, za as Avatar, Ba as AvatarGroup, Ua as Badge, an as BooleanCheckbox, pa as Breadcrumb, $ as Button, Yr as ButtonGroup, ss as CHART_SERIES_COLORS, cn as COUNTRY_DIAL_CODES, sn as CURRENCY_SYMBOLS, _c as Calendar, ml as CardNote, zf as CardRadioGroup, Tn as CardSelect, zp as Carousel, Gp as Chart, $t as Checkbox, en as CheckboxGroup, Vo as CodeEditor, Ff as ColorInput, Ji as CommandPalette, Qc as ComparisonTable, Ci as ConfirmDialog, Ii as ContextMenuProvider, Qd as CoordinatesInput, _n as CurrencyInput, kr as CustomTable, lr as DEFAULT_PAGE_SIZE_OPTIONS, _l as DashboardBoard, il as DashboardCard, vl as DashboardCardRow, cl as DashboardGrid, fl as DashboardLayout, Sl as DashboardPageFrame, Tl as DashboardPlaceholder, ll as DashboardSection, dl as DashboardStatBar, Lt as DateInput, Ht as DatePicker, Ul as DateRangeFields, Rn as DateRangeInput, Wl as DateRangeUtcInput, yo as DateWeekStrip, Nl as DetailPanel, Ll as DetailPreviewList, Rl as DetailSection, pl as DetailSidePanel, Yp as DeviationBand, qp as DiagnosticRadar, Gn as DisplayField, fn as DniInput, Pc as DonutBreakdown, Dc as DonutGauge, Oc as DonutGaugeRow, Wi as Drawer, Il as DrilldownAlertList, Fl as DrilldownKPICard, Oi as DropdownMenu, ki as DropdownMenuItem, Gr as EditableDataGrid, ri as EmptyState, Zs as EntityCard, $s as EntityCardGrid, ai as ErrorView, zc as EventLog, Xc as EvidenceFootnote, Jr as ExpandableTableSection, Z as FieldLayout, iu as FileDropInput, Un as FileInput, Aa as FilterBar, Ma as FilterBarDate, ja as FilterBarField, Na as FilterBarSelect, Pa as FilterBarText, Qr as FormActions, Da as FormWizard, ca as HeightProvider, Pt as Input, La as ItineraryEditor, As as KPICard, Ms as KPIGrid, Lf as KeyValueInput, Cp as LiveChip, lo as LiveRouteBoard, Fp as LiveStatusBar, ci as LoadingView, Zd as LocationPicker, Uo as MIN_MAP_GEOCODER_QUERY_LENGTH, uc as MONTH_NAMES, Fa as MaestroLayout, mu as MapFrame, gu as MapLegend, os as MapPicker, yu as MapPointCard, hu as MapStatus, _u as MapToolbar, vu as MapVehiclePopup, Xd as MapView, ka as MasterDetailLayout, Oa as MasterDetailListItem, Bp as MediaPanel, Ti as MessageDialog, Vs as MetricBarList, Bs as MetricBarRow, xi as Modal, ac as ModuleCard, oc as ModuleCardGrid, su as MultiPhotoInput, $f as NETWORK_BASEMAPS, ip as NETWORK_EDGE_STYLES, tp as NETWORK_KIND_COLORS, ep as NETWORK_KIND_LABELS, np as NETWORK_STATUS_COLORS, rp as NETWORK_STATUS_LABELS, mr as NUMBER_FILTER_OPS, fp as NetworkLegend, _p as NetworkMap, Vi as NotificationBell, It as NumberInput, Df as NumberStepper, Kf as ORG_TREE_DEFAULT_THEMES, Ai as OptionItem, Qf as OrgTree, Vl as OtpInput, Zi as PageContainer, $i as PageHeader, fr as Pagination, ar as PaginationRangeInput, Za as PassengerBoardCard, Wt as PasswordInput, hn as PhoneInput, fu as PhotoCropInput, au as PhotoInput, Rt as Popover, Xi as ProductTour, Af as ProgressBar, Mf as ProgressBarReadonly, zi as QRView, Ls as QuickActionGrid, Is as QuickActionTile, tn as RadioGroup, kf as RangeSliderInput, Nf as RatingInput, nc as RecommendationCard, Sp as RecordList, xp as RecordListItem, li as RetryBlock, Fo as RichTextEditor, sf as RouteInput, Zr as RowActions, pn as RucInput, xu as SF_DEFAULT_MAP_CENTER, Su as SF_DEFAULT_MAP_ZOOM, Ou as SF_GOOGLE_ENGINE_CAPABILITIES, Du as SF_LEAFLET_ENGINE_CAPABILITIES, bu as SF_MAPS_CONFIG_ERROR, wu as SF_OSM_ATTRIBUTION, Cu as SF_OSM_TILE_URL, Eu as SF_SATELLITE_ATTRIBUTION, Tu as SF_SATELLITE_TILE_URL, pr as STRING_FILTER_OPS, ga as ScrollArea, Sn as SearchSelect, On as SearchTableSelect, Qt as Select, Bf as SemanticSlider, fa as Separator, Ld as SfProvider, Gi as Sheet, ea as SidePanel, oa as SidePanelContainer, ou as SignaturePad, fi as Skeleton, Cf as SliderInput, Bn as SmartDateInput, vn as SmartInput, cf as SmartMapInput, cu as SmartMediaInput, An as SmartSelect, Rf as SortableList, _s as Sparkline, si as Spinner, Fs as SplitBar, lc as StatCard, wa as Stepper, _a as SummaryItem, wo as SyncIcon, ji as TabMenuOption, Rr as TableColumnSettings, vr as TableFiltersPanel, Qi as TablePageLayout, yr as TableSortingPanel, ta as Tabs, If as TagsInput, Gf as TemporalScrub, Ft as TextArea, zn as TimeRangeInput, Rp as Timeline, vi as ToastProvider, nn as Toggle, rn as ToggleCard, Xr as ToolbarButton, Hi as Tooltip, sc as TramoCard, Zt as Transfer, Yt as TreeSelect, uo as UnitSelector, ua as Visibility, da as Visivility, dc as WEEKDAY_LABELS, So as WeekdayToggleStrip, on as YesNoSelect, Va as badgeClassName, Ha as badgeDotClassName, Hr as buildActiveFilterChips, ps as buildDefaultFormatter, mc as buildMonthGrid, qf as buildOrgTreeRows, Xt as buttonClassName, Ln as calcTimeDuration, ff as clampNumber, Ro as codeEditorClassName, _r as columnFilterFn, cp as countNetworkStatus, Yf as countOrgTreeNodes, Jm as createFormSchema, er as createLocalStorageAsyncStateStore, Zl as createPhotoItem, tu as cropImageToSquare, am as defaultOnSortFunc, Pl as detailHasRows, Gl as emptyDateRange, gf as emptyKeyValuePairs, vf as emptyNumberRange, pu as emptyPhotoItems, mf as emptyTags, Kl as emptyTimeRange, gm as exportTableCsv, kl as exportTableXlsx, Q as fieldClassName, Vr as formatColumnFilterValue, Go as formatMapGeocoderLabel, pf as formatSliderLabel, Pn as fromUtcDateIso, gr as inferInitialFilterValue, jt as inputFocusTransition, Wr as isBlankRow, hr as isColumnFilterValue, Mn as isValidDateString, Yl as isValidFileType, dp as networkEdgeLines, lp as networkMapBounds, up as networkNodePositions, Jl as nextPhotoId, Fn as normalizeDateRange, bf as normalizeHexColor, _f as normalizeKeyValuePairs, sp as normalizeNetworkEdges, op as normalizeNetworkNodes, yf as normalizeNumberRange, eu as normalizePhotoItems, hf as normalizeTags, In as normalizeTimeRange, Pm as nullableBoolean, Um as nullableCelular, Em as nullableEmail, Lm as nullableNumber, Om as nullableOrMatchString, Vm as nullablePositiveInteger, Bm as nullablePositiveNumber, wm as nullableString, Km as nullableStringArray, Mm as nullableStringNumbersOnly, Xf as orgTreeRootNodes, pc as parseYMD, xf as progressPercent, hs as rawValueKey, lm as readQueryValue, dm as removeQueryValue, Nm as requiredBoolean, Wm as requiredCelular, Tm as requiredEmail, Dm as requiredMatchString, Im as requiredNumber, zm as requiredPositiveInteger, Rm as requiredPositiveNumber, Cm as requiredString, Gm as requiredStringArray, jm as requiredStringNumbersOnly, Jf as resolveOrgTreeTheme, cs as resolveSeriesColor, Ql as revokePhotoPreview, $l as revokePhotoPreviews, ln as sanitizeDigits, Wo as searchMapAddresses, wd as sfClampLatitude, Td as sfClampLongitude, Sd as sfFormatCoordinate, Dd as sfLatLngToString, kd as sfMarkerFromLatLng, Od as sfNormalizeLatLng, Ed as sfParseCoordinate, Xl as showFilePicker, Mt as textareaClassName, mo as toIsoDate, jn as toLocalDateYMD, fc as toLocalYMD, gs as toStacked100Data, Jt as toStringArray, Nn as toUtcDateIso, Sm as transformNullIfEmpty, um as updateQueryValue, Bd as useAddressSearch, om as useArrayPaginator, Cn as useAsyncOptions, Mi as useClickAway, la as useContainerHeight, Ri as useContextMenu, mm as useCustomForm, jr as useCustomTableController, Al as useDetailPanel, Di as useDropdownClose, rm as useFilterData, Ea as useFormWizard, Lo as useIsClient, Xp as useMaestroFilter, Vd as useMapEngine, Hd as useMapsConfig, Si as useModal, fm as useQueryStringState, Ud as useReverseGeocode, Rd as useSf, zd as useSfMaps, ia as useSidePanelContainer, na as useSidePanelHandle, cm as useStoredState, Ir as useTableColumnSettings, yi as useToast, dn as validateDni, un as validateRuc, qm as validators };
16635
+ export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar, Zd as AddressSearchInput, ni as Alert, Qc as AlertLane, Yc as AlertRowList, el as AlertSummaryList, Jf as AllocationBar, Oo as AppBarContainer, Do as AppShell, Co as AppsGridIcon, df as AreaInput, En as AsyncCardSelect, Ar as AsyncCustomTable, wn as AsyncSearchSelect, kn as AsyncSearchTableSelect, wp as AuditTimeline, za as Avatar, Ba as AvatarGroup, Ua as Badge, an as BooleanCheckbox, pa as Breadcrumb, $ as Button, Yr as ButtonGroup, ss as CHART_SERIES_COLORS, cn as COUNTRY_DIAL_CODES, sn as CURRENCY_SYMBOLS, _c as Calendar, yl as CardNote, Wf as CardRadioGroup, Tn as CardSelect, Wp as Carousel, Xp as Chart, Zp as ChartLegend, $t as Checkbox, en as CheckboxGroup, Vo as CodeEditor, Bf as ColorInput, Ji as CommandPalette, rl as ComparisonTable, Ci as ConfirmDialog, Ii as ContextMenuProvider, rf as CoordinatesInput, _n as CurrencyInput, kr as CustomTable, lr as DEFAULT_PAGE_SIZE_OPTIONS, Sl as DashboardBoard, ll as DashboardCard, Cl as DashboardCardRow, pl as DashboardGrid, _l as DashboardLayout, Dl as DashboardPageFrame, Al as DashboardPlaceholder, ml as DashboardSection, gl as DashboardStatBar, Lt as DateInput, Ht as DatePicker, Jl as DateRangeFields, Rn as DateRangeInput, Yl as DateRangeUtcInput, yo as DateWeekStrip, Rl as DetailPanel, Hl as DetailPreviewList, Ul as DetailSection, vl as DetailSidePanel, tm as DeviationBand, $p as DiagnosticRadar, Gn as DisplayField, fn as DniInput, zc as DonutBreakdown, Fc as DonutGauge, Ic as DonutGaugeRow, Wi as Drawer, Vl as DrilldownAlertList, Bl as DrilldownKPICard, Oi as DropdownMenu, ki as DropdownMenuItem, Gr as EditableDataGrid, ri as EmptyState, Zs as EntityCard, $s as EntityCardGrid, ai as ErrorView, Wc as EventLog, tl as EvidenceFootnote, Jr as ExpandableTableSection, Z as FieldLayout, lu as FileDropInput, Un as FileInput, Aa as FilterBar, Ma as FilterBarDate, ja as FilterBarField, Na as FilterBarSelect, Pa as FilterBarText, Qr as FormActions, Da as FormWizard, ca as HeightProvider, Pt as Input, La as ItineraryEditor, As as KPICard, Ms as KPIGrid, Hf as KeyValueInput, Op as LiveChip, lo as LiveRouteBoard, Bp as LiveStatusBar, ci as LoadingView, nf as LocationPicker, Uo as MIN_MAP_GEOCODER_QUERY_LENGTH, uc as MONTH_NAMES, Fa as MaestroLayout, yu as MapFrame, xu as MapLegend, os as MapPicker, wu as MapPointCard, bu as MapStatus, Su as MapToolbar, Cu as MapVehiclePopup, tf as MapView, ka as MasterDetailLayout, Oa as MasterDetailListItem, Gp as MediaPanel, Ti as MessageDialog, Vs as MetricBarList, Bs as MetricBarRow, xi as Modal, ac as ModuleCard, oc as ModuleCardGrid, fu as MultiPhotoInput, ip as NETWORK_BASEMAPS, lp as NETWORK_EDGE_STYLES, op as NETWORK_KIND_COLORS, ap as NETWORK_KIND_LABELS, sp as NETWORK_STATUS_COLORS, cp as NETWORK_STATUS_LABELS, mr as NUMBER_FILTER_OPS, _p as NetworkLegend, Sp as NetworkMap, Vi as NotificationBell, It as NumberInput, Mf as NumberStepper, Zf as ORG_TREE_DEFAULT_THEMES, Ai as OptionItem, rp as OrgTree, Kl as OtpInput, Zi as PageContainer, $i as PageHeader, fr as Pagination, ar as PaginationRangeInput, Za as PassengerBoardCard, Wt as PasswordInput, hn as PhoneInput, _u as PhotoCropInput, uu as PhotoInput, Rt as Popover, Xi as ProductTour, Ff as ProgressBar, Lf as ProgressBarReadonly, zi as QRView, Ls as QuickActionGrid, Is as QuickActionTile, tn as RadioGroup, Pf as RangeSliderInput, Rf as RatingInput, nc as RecommendationCard, Dp as RecordList, Ep as RecordListItem, li as RetryBlock, Fo as RichTextEditor, ff as RouteInput, Zr as RowActions, pn as RucInput, Eu as SF_DEFAULT_MAP_CENTER, Du as SF_DEFAULT_MAP_ZOOM, Nu as SF_GOOGLE_ENGINE_CAPABILITIES, Mu as SF_LEAFLET_ENGINE_CAPABILITIES, Tu as SF_MAPS_CONFIG_ERROR, ku as SF_OSM_ATTRIBUTION, Ou as SF_OSM_TILE_URL, ju as SF_SATELLITE_ATTRIBUTION, Au as SF_SATELLITE_TILE_URL, pr as STRING_FILTER_OPS, ga as ScrollArea, Sn as SearchSelect, On as SearchTableSelect, Qt as Select, Gf as SemanticSlider, fa as Separator, Hd as SfProvider, Gi as Sheet, ea as SidePanel, oa as SidePanelContainer, du as SignaturePad, fi as Skeleton, Of as SliderInput, Bn as SmartDateInput, vn as SmartInput, pf as SmartMapInput, pu as SmartMediaInput, An as SmartSelect, Uf as SortableList, _s as Sparkline, si as Spinner, Fs as SplitBar, lc as StatCard, wa as Stepper, _a as SummaryItem, wo as SyncIcon, ji as TabMenuOption, Rr as TableColumnSettings, vr as TableFiltersPanel, Qi as TablePageLayout, yr as TableSortingPanel, ta as Tabs, Vf as TagsInput, Xf as TemporalScrub, Ft as TextArea, zn as TimeRangeInput, Up as Timeline, vi as ToastProvider, nn as Toggle, rn as ToggleCard, Xr as ToolbarButton, Hi as Tooltip, sc as TramoCard, Zt as Transfer, Yt as TreeSelect, uo as UnitSelector, ua as Visibility, da as Visivility, dc as WEEKDAY_LABELS, So as WeekdayToggleStrip, on as YesNoSelect, Va as badgeClassName, Ha as badgeDotClassName, Hr as buildActiveFilterChips, ps as buildDefaultFormatter, mc as buildMonthGrid, Qf as buildOrgTreeRows, Xt as buttonClassName, Ln as calcTimeDuration, _f as clampNumber, Ro as codeEditorClassName, _r as columnFilterFn, pp as countNetworkStatus, ep as countOrgTreeNodes, eh as createFormSchema, er as createLocalStorageAsyncStateStore, nu as createPhotoItem, ou as cropImageToSquare, dm as defaultOnSortFunc, zl as detailHasRows, Xl as emptyDateRange, xf as emptyKeyValuePairs, Cf as emptyNumberRange, vu as emptyPhotoItems, yf as emptyTags, Zl as emptyTimeRange, Sm as exportTableCsv, Pl as exportTableXlsx, Q as fieldClassName, Vr as formatColumnFilterValue, Go as formatMapGeocoderLabel, vf as formatSliderLabel, Pn as fromUtcDateIso, gr as inferInitialFilterValue, jt as inputFocusTransition, Wr as isBlankRow, hr as isColumnFilterValue, Mn as isValidDateString, eu as isValidFileType, gp as networkEdgeLines, mp as networkMapBounds, hp as networkNodePositions, $l as nextPhotoId, Fn as normalizeDateRange, Tf as normalizeHexColor, Sf as normalizeKeyValuePairs, fp as normalizeNetworkEdges, dp as normalizeNetworkNodes, wf as normalizeNumberRange, au as normalizePhotoItems, bf as normalizeTags, In as normalizeTimeRange, Bm as nullableBoolean, Ym as nullableCelular, Mm as nullableEmail, Um as nullableNumber, Pm as nullableOrMatchString, qm as nullablePositiveInteger, Km as nullablePositiveNumber, Am as nullableString, Qm as nullableStringArray, Rm as nullableStringNumbersOnly, tp as orgTreeRootNodes, pc as parseYMD, Ef as progressPercent, hs as rawValueKey, hm as readQueryValue, _m as removeQueryValue, zm as requiredBoolean, Xm as requiredCelular, jm as requiredEmail, Nm as requiredMatchString, Hm as requiredNumber, Gm as requiredPositiveInteger, Wm as requiredPositiveNumber, km as requiredString, Zm as requiredStringArray, Lm as requiredStringNumbersOnly, $f as resolveOrgTreeTheme, cs as resolveSeriesColor, ru as revokePhotoPreview, iu as revokePhotoPreviews, ln as sanitizeDigits, Wo as searchMapAddresses, kd as sfClampLatitude, Ad as sfClampLongitude, Dd as sfFormatCoordinate, Md as sfLatLngToString, Pd as sfMarkerFromLatLng, Nd as sfNormalizeLatLng, jd as sfParseCoordinate, tu as showFilePicker, Mt as textareaClassName, mo as toIsoDate, jn as toLocalDateYMD, fc as toLocalYMD, gs as toStacked100Data, Jt as toStringArray, Nn as toUtcDateIso, Om as transformNullIfEmpty, gm as updateQueryValue, Gd as useAddressSearch, fm as useArrayPaginator, Cn as useAsyncOptions, Mi as useClickAway, la as useContainerHeight, Ri as useContextMenu, bm as useCustomForm, jr as useCustomTableController, Fl as useDetailPanel, Di as useDropdownClose, lm as useFilterData, Ea as useFormWizard, Lo as useIsClient, nm as useMaestroFilter, Kd as useMapEngine, qd as useMapsConfig, Si as useModal, vm as useQueryStringState, Jd as useReverseGeocode, Ud as useSf, Wd as useSfMaps, ia as useSidePanelContainer, na as useSidePanelHandle, mm as useStoredState, Ir as useTableColumnSettings, yi as useToast, dn as validateDni, un as validateRuc, $m as validators };
16586
16636
 
16587
16637
  //# sourceMappingURL=sf-ui.js.map