@directo-ui/web 1.3.0 → 1.4.0

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/wari.js CHANGED
@@ -1,7 +1,8 @@
1
- import { useEffect as e, useId as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { a as e, c as t, i as n, o as r, r as i, s as a, t as o } from "./ChipGroup-DkJz118c.js";
2
+ import { useEffect as s, useId as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
3
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
3
4
  //#region src/wari/statuses.ts
4
- var l = [
5
+ var g = [
5
6
  {
6
7
  value: "libre",
7
8
  label: "Libre"
@@ -42,183 +43,181 @@ var l = [
42
43
  value: "empalmado",
43
44
  label: "Empalmado"
44
45
  }
45
- ], u = (e) => l.find((t) => t.value === e)?.label ?? e;
46
+ ], _ = (e) => g.find((t) => t.value === e)?.label ?? e;
46
47
  //#endregion
47
48
  //#region src/wari/StatusTag.tsx
48
- function d({ status: e, size: t = "md", color: n, children: r, className: i, style: a, ...o }) {
49
- let c = n ? {
50
- "--ds-status-bg": n.background,
51
- "--ds-status-fg": n.foreground
52
- } : void 0, l = r ?? (e && e !== "todos" ? u(e) : "Todos");
53
- return /* @__PURE__ */ s("span", {
54
- ...o,
55
- className: ["ds-status", i].filter(Boolean).join(" "),
49
+ function v({ status: e, size: t = "md", dot: n = !1, color: r, children: i, className: a, style: o, ...s }) {
50
+ let c = r ? {
51
+ "--ds-status-bg": r.background,
52
+ "--ds-status-fg": r.foreground
53
+ } : void 0, l = i ?? (e && e !== "todos" ? _(e) : "Todos");
54
+ return /* @__PURE__ */ m("span", {
55
+ ...s,
56
+ className: ["ds-status", a].filter(Boolean).join(" "),
56
57
  "data-status": e,
57
58
  "data-size": t,
59
+ "data-dot": n || void 0,
58
60
  style: c ? {
59
61
  ...c,
60
- ...a
61
- } : a,
62
- children: /* @__PURE__ */ s("span", { children: l })
62
+ ...o
63
+ } : o,
64
+ children: /* @__PURE__ */ m("span", { children: l })
63
65
  });
64
66
  }
65
67
  //#endregion
66
68
  //#region src/wari/logic.ts
67
- function f(e) {
69
+ function y(e) {
68
70
  return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().trim();
69
71
  }
70
- function p(e, t) {
71
- let n = f(t);
72
- return n ? e.filter((e) => f(e.label).includes(n)) : [...e];
72
+ function b(e, t) {
73
+ let n = y(t);
74
+ return n ? e.filter((e) => y(e.label).includes(n)) : [...e];
73
75
  }
74
- function m(e, t) {
76
+ function x(e, t) {
75
77
  let n = new Set(e);
76
78
  return t.filter((e) => n.has(e.value)).map((e) => e.value);
77
79
  }
78
- function h(e, t, n) {
80
+ function S(e, t, n) {
79
81
  let r = n.find((e) => e.value === t);
80
82
  if (!r || r.disabled) return [...e];
81
83
  let i = new Set(e);
82
- return i.has(t) ? i.delete(t) : i.add(t), m(i, n);
84
+ return i.has(t) ? i.delete(t) : i.add(t), x(i, n);
83
85
  }
84
- function g(e, t) {
86
+ function C(e, t) {
85
87
  let n = t.filter((e) => !e.disabled), r = n.filter((t) => e.includes(t.value)).length;
86
88
  return r === 0 ? "none" : r === n.length ? "all" : "some";
87
89
  }
88
- function _(e, t) {
90
+ function w(e, t) {
89
91
  let n = t.filter((t) => t.disabled && e.includes(t.value)).map((e) => e.value);
90
- return g(e, t) === "all" ? m(n, t) : m([...n, ...t.filter((e) => !e.disabled).map((e) => e.value)], t);
92
+ return C(e, t) === "all" ? x(n, t) : x([...n, ...t.filter((e) => !e.disabled).map((e) => e.value)], t);
91
93
  }
92
- function v(e) {
94
+ function T(e) {
93
95
  return e <= 0 ? "" : e === 1 ? "1 elemento seleccionado" : `${e} elementos seleccionados`;
94
96
  }
95
97
  //#endregion
96
98
  //#region src/wari/MultiSelect.tsx
97
- var y = Symbol("all");
98
- function b({ options: n, value: o, defaultValue: l, onChange: u, label: f, "aria-label": m, placeholder: b = "Seleccionar", searchPlaceholder: x = "Buscar…", allLabel: S = "Todos", maxTags: C = 2, supportingText: w, summary: T = !0, emptyMessage: E = "Sin coincidencias", error: D = !1, disabled: O = !1, required: k, name: A, id: j, className: M, size: N = "md" }) {
99
- let P = t(), F = j ?? P, I = `${F}-listbox`, L = `${F}-label`, R = `${F}-hint`, ee = (e) => `${F}-option-${e}`, [z, B] = a(() => l ?? []), V = o ?? z, [H, te] = a(!1), [U, ne] = a(""), [re, W] = a(0), ie = i(null), G = i(null), ae = r(() => p(n, U), [n, U]), K = S && !U && n.length > 0 ? [y, ...ae] : ae, q = Math.min(re, K.length - 1), J = g(V, n), oe = n.some((e) => e.status || e.color), Y = n.filter((e) => V.includes(e.value)).length, se = w ?? (T === !1 ? "" : typeof T == "function" ? T(Y, n.length) : v(Y));
100
- e(() => {
101
- if (!H) return;
99
+ var E = Symbol("all");
100
+ function D({ options: e, value: t, defaultValue: n, onChange: r, label: a, "aria-label": o, placeholder: l = "Seleccionar", searchPlaceholder: p = "Buscar…", allLabel: g = "Todos", maxTags: _ = 2, supportingText: y, summary: x = !0, emptyMessage: D = "Sin coincidencias", error: O = !1, disabled: k = !1, required: A, name: j, id: M, className: N, size: P = "md" }) {
101
+ let F = c(), I = M ?? F, L = `${I}-listbox`, R = `${I}-label`, ee = `${I}-hint`, z = (e) => `${I}-option-${e}`, [B, V] = f(() => n ?? []), H = t ?? B, [U, te] = f(!1), [ne, re] = f(""), [W, G] = f(0), K = d(null), ie = d(null), q = u(() => b(e, ne), [e, ne]), ae = g && !ne && e.length > 0 ? [E, ...q] : q, J = Math.min(W, ae.length - 1), oe = C(H, e), se = e.some((e) => e.status || e.color), ce = e.filter((e) => H.includes(e.value)).length, le = y ?? (x === !1 ? "" : typeof x == "function" ? x(ce, e.length) : T(ce));
102
+ s(() => {
103
+ if (!U) return;
102
104
  let e = (e) => {
103
- ie.current?.contains(e.target) || (te(!1), ne(""));
105
+ K.current?.contains(e.target) || (te(!1), re(""));
104
106
  };
105
107
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
106
- }, [H]), e(() => {
107
- H && q >= 0 && document.getElementById(`${F}-option-${q}`)?.scrollIntoView?.({ block: "nearest" });
108
+ }, [U]), s(() => {
109
+ U && J >= 0 && document.getElementById(`${I}-option-${J}`)?.scrollIntoView?.({ block: "nearest" });
108
110
  }, [
109
- H,
110
- q,
111
- F
111
+ U,
112
+ J,
113
+ I
112
114
  ]);
113
- let X = (e) => {
114
- o === void 0 && B(e), u?.(e);
115
- }, ce = () => {
116
- te(!1), ne("");
117
- }, Z = (e) => {
118
- O || (te(!0), W(e));
119
- }, Q = (e) => X(e === y ? _(V, n) : h(V, e.value, n)), le = (e, t, n) => oe ? /* @__PURE__ */ s(d, {
115
+ let Y = (e) => {
116
+ t === void 0 && V(e), r?.(e);
117
+ }, ue = () => {
118
+ te(!1), re("");
119
+ }, X = (e) => {
120
+ k || (te(!0), G(e));
121
+ }, Z = (t) => Y(t === E ? w(H, e) : S(H, t.value, e)), Q = (e, t, n) => se ? /* @__PURE__ */ m(v, {
120
122
  status: t,
121
123
  color: n,
122
124
  children: e
123
- }) : /* @__PURE__ */ s("span", {
125
+ }) : /* @__PURE__ */ m("span", {
124
126
  className: "ds-multiselect-option-label",
125
127
  children: e
126
- }), ue = (e) => {
127
- let t = K.length - 1;
128
+ }), de = (e) => {
129
+ let t = ae.length - 1;
128
130
  switch (e.key) {
129
131
  case "ArrowDown":
130
- e.preventDefault(), H ? W(Math.min(q + 1, t)) : Z(0);
132
+ e.preventDefault(), U ? G(Math.min(J + 1, t)) : X(0);
131
133
  break;
132
134
  case "ArrowUp":
133
- e.preventDefault(), H ? W(Math.max(q - 1, 0)) : Z(t);
135
+ e.preventDefault(), U ? G(Math.max(J - 1, 0)) : X(t);
134
136
  break;
135
137
  case "Home":
136
138
  case "End":
137
- H && (e.preventDefault(), W(e.key === "Home" ? 0 : t));
139
+ U && (e.preventDefault(), G(e.key === "Home" ? 0 : t));
138
140
  break;
139
141
  case "Enter":
140
- e.preventDefault(), H ? K[q] && Q(K[q]) : Z(0);
142
+ e.preventDefault(), U ? ae[J] && Z(ae[J]) : X(0);
141
143
  break;
142
144
  case "Escape":
143
- H && (e.preventDefault(), U ? (ne(""), W(0)) : ce());
145
+ U && (e.preventDefault(), ne ? (re(""), G(0)) : ue());
144
146
  break;
145
- case "Tab": ce();
147
+ case "Tab": ue();
146
148
  }
147
- }, de = (e) => {
148
- O || e.target === G.current || (e.preventDefault(), G.current?.focus(), H ? ce() : Z(0));
149
+ }, fe = (e) => {
150
+ k || e.target === ie.current || (e.preventDefault(), ie.current?.focus(), U ? ue() : X(0));
149
151
  }, $ = (e) => {
150
152
  let t = e.relatedTarget;
151
- t && !ie.current?.contains(t) && ce();
152
- }, fe = n.filter((e) => V.includes(e.value)), pe = Math.max(0, fe.length - C);
153
- return /* @__PURE__ */ c("div", {
154
- ref: ie,
153
+ t && !K.current?.contains(t) && ue();
154
+ }, pe = e.filter((e) => H.includes(e.value)), me = Math.max(0, pe.length - _);
155
+ return /* @__PURE__ */ h("div", {
156
+ ref: K,
155
157
  className: [
156
158
  "ds-input",
157
159
  "ds-multiselect",
158
- M
160
+ N
159
161
  ].filter(Boolean).join(" "),
160
- "data-open": H,
161
- "data-error": D,
162
- "data-disabled": O,
163
- "data-size": N,
162
+ "data-open": U,
163
+ "data-error": O,
164
+ "data-disabled": k,
165
+ "data-size": P,
164
166
  onBlur: $,
165
167
  children: [
166
- f && /* @__PURE__ */ c("label", {
167
- id: L,
168
- htmlFor: F,
169
- children: [f, k && /* @__PURE__ */ s("span", {
170
- className: "ds-input-required",
171
- "aria-hidden": "true",
172
- children: "*"
173
- })]
168
+ a && /* @__PURE__ */ m(i, {
169
+ id: R,
170
+ htmlFor: I,
171
+ required: A,
172
+ children: a
174
173
  }),
175
- /* @__PURE__ */ c("div", {
174
+ /* @__PURE__ */ h("div", {
176
175
  className: "ds-multiselect-anchor",
177
- children: [/* @__PURE__ */ c("div", {
176
+ children: [/* @__PURE__ */ h("div", {
178
177
  className: "ds-input-shell",
179
- onMouseDown: de,
178
+ onMouseDown: fe,
180
179
  children: [
181
- Y > 0 && /* @__PURE__ */ c("div", {
180
+ ce > 0 && /* @__PURE__ */ h("div", {
182
181
  className: "ds-multiselect-values",
183
182
  "aria-hidden": "true",
184
- children: [J === "all" && S ? le(S, "todos") : fe.slice(0, C).map((e) => /* @__PURE__ */ s("span", { children: le(e.label, e.status, e.color) }, e.value)), !(J === "all" && S) && pe > 0 && /* @__PURE__ */ c("span", {
183
+ children: [oe === "all" && g ? Q(g, "todos") : pe.slice(0, _).map((e) => /* @__PURE__ */ m("span", { children: Q(e.label, e.status, e.color) }, e.value)), !(oe === "all" && g) && me > 0 && /* @__PURE__ */ h("span", {
185
184
  className: "ds-multiselect-more",
186
- children: ["+", pe]
185
+ children: ["+", me]
187
186
  })]
188
187
  }),
189
- /* @__PURE__ */ s("input", {
190
- ref: G,
191
- id: F,
188
+ /* @__PURE__ */ m("input", {
189
+ ref: ie,
190
+ id: I,
192
191
  className: "ds-multiselect-input",
193
192
  type: "text",
194
193
  role: "combobox",
195
194
  autoComplete: "off",
196
- "aria-expanded": H,
197
- "aria-controls": I,
195
+ "aria-expanded": U,
196
+ "aria-controls": L,
198
197
  "aria-autocomplete": "list",
199
- "aria-activedescendant": H && q >= 0 ? ee(q) : void 0,
200
- "aria-label": f ? void 0 : m,
201
- "aria-invalid": D || void 0,
202
- "aria-required": k || void 0,
203
- "aria-describedby": se ? R : void 0,
204
- placeholder: H ? x : Y ? "" : b,
205
- value: U,
206
- disabled: O,
198
+ "aria-activedescendant": U && J >= 0 ? z(J) : void 0,
199
+ "aria-label": a ? void 0 : o,
200
+ "aria-invalid": O || void 0,
201
+ "aria-required": A || void 0,
202
+ "aria-describedby": le ? ee : void 0,
203
+ placeholder: U ? p : ce ? "" : l,
204
+ value: ne,
205
+ disabled: k,
207
206
  onChange: (e) => {
208
- ne(e.target.value), te(!0), W(0);
207
+ re(e.target.value), te(!0), G(0);
209
208
  },
210
209
  onClick: () => {
211
- H || Z(0);
210
+ U || X(0);
212
211
  },
213
- onKeyDown: ue
212
+ onKeyDown: de
214
213
  }),
215
- /* @__PURE__ */ s("button", {
214
+ /* @__PURE__ */ m("button", {
216
215
  type: "button",
217
216
  className: "ds-multiselect-caret",
218
217
  tabIndex: -1,
219
218
  "aria-hidden": "true",
220
- disabled: O,
221
- children: /* @__PURE__ */ s("svg", {
219
+ disabled: k,
220
+ children: /* @__PURE__ */ m("svg", {
222
221
  width: "16",
223
222
  height: "16",
224
223
  viewBox: "0 0 16 16",
@@ -227,61 +226,61 @@ function b({ options: n, value: o, defaultValue: l, onChange: u, label: f, "aria
227
226
  strokeWidth: "1.8",
228
227
  strokeLinecap: "round",
229
228
  strokeLinejoin: "round",
230
- children: /* @__PURE__ */ s("path", { d: "m4 6 4 4 4-4" })
229
+ children: /* @__PURE__ */ m("path", { d: "m4 6 4 4 4-4" })
231
230
  })
232
231
  })
233
232
  ]
234
- }), H && /* @__PURE__ */ c("ul", {
235
- id: I,
233
+ }), U && /* @__PURE__ */ h("ul", {
234
+ id: L,
236
235
  className: "ds-multiselect-list",
237
236
  role: "listbox",
238
237
  "aria-multiselectable": "true",
239
- "aria-labelledby": f ? L : void 0,
240
- "aria-label": f ? void 0 : m,
241
- children: [K.map((e, t) => {
242
- let n = e === y, r = !n && !!e.disabled, i = n ? J === "all" : V.includes(e.value);
243
- return /* @__PURE__ */ c("li", {
244
- id: ee(t),
238
+ "aria-labelledby": a ? R : void 0,
239
+ "aria-label": a ? void 0 : o,
240
+ children: [ae.map((e, t) => {
241
+ let n = e === E, r = !n && !!e.disabled, i = n ? oe === "all" : H.includes(e.value);
242
+ return /* @__PURE__ */ h("li", {
243
+ id: z(t),
245
244
  role: "option",
246
245
  className: "ds-multiselect-option",
247
246
  "aria-selected": i,
248
247
  "aria-disabled": r || void 0,
249
- "data-active": t === q,
250
- "data-indeterminate": n && J === "some",
248
+ "data-active": t === J,
249
+ "data-indeterminate": n && oe === "some",
251
250
  onMouseDown: (e) => e.preventDefault(),
252
251
  onMouseMove: () => {
253
- t !== q && W(t);
252
+ t !== J && G(t);
254
253
  },
255
254
  onClick: () => {
256
- r || (Q(e), W(t));
255
+ r || (Z(e), G(t));
257
256
  },
258
257
  children: [
259
- /* @__PURE__ */ s("span", {
258
+ /* @__PURE__ */ m("span", {
260
259
  className: "ds-multiselect-check",
261
260
  "aria-hidden": "true"
262
261
  }),
263
- n ? le(S, "todos") : le(e.label, e.status, e.color),
264
- !n && e.description != null && /* @__PURE__ */ s("span", {
262
+ n ? Q(g, "todos") : Q(e.label, e.status, e.color),
263
+ !n && e.description != null && /* @__PURE__ */ m("span", {
265
264
  className: "ds-multiselect-option-label",
266
265
  children: e.description
267
266
  })
268
267
  ]
269
268
  }, n ? "__all__" : e.value);
270
- }), K.length === 0 && /* @__PURE__ */ s("li", {
269
+ }), ae.length === 0 && /* @__PURE__ */ m("li", {
271
270
  className: "ds-multiselect-empty",
272
271
  role: "presentation",
273
- children: E
272
+ children: D
274
273
  })]
275
274
  })]
276
275
  }),
277
- se && /* @__PURE__ */ s("small", {
278
- id: R,
276
+ le && /* @__PURE__ */ m("small", {
277
+ id: ee,
279
278
  "aria-live": "polite",
280
- children: se
279
+ children: le
281
280
  }),
282
- A && V.map((e) => /* @__PURE__ */ s("input", {
281
+ j && H.map((e) => /* @__PURE__ */ m("input", {
283
282
  type: "hidden",
284
- name: A,
283
+ name: j,
285
284
  value: e
286
285
  }, e))
287
286
  ]
@@ -289,14 +288,14 @@ function b({ options: n, value: o, defaultValue: l, onChange: u, label: f, "aria
289
288
  }
290
289
  //#endregion
291
290
  //#region src/wari/WariStatusSelect.tsx
292
- function x({ statuses: e, descriptions: t, onChange: n, label: r = "Estado", ...i }) {
293
- let a = l.filter((t) => !e || e.includes(t.value)).map((e) => ({
291
+ function O({ statuses: e, descriptions: t, onChange: n, label: r = "Estado", ...i }) {
292
+ let a = g.filter((t) => !e || e.includes(t.value)).map((e) => ({
294
293
  value: e.value,
295
294
  label: e.label,
296
295
  status: e.value,
297
296
  description: t?.[e.value]
298
297
  }));
299
- return /* @__PURE__ */ s(b, {
298
+ return /* @__PURE__ */ m(D, {
300
299
  ...i,
301
300
  label: r,
302
301
  options: a,
@@ -305,11 +304,11 @@ function x({ statuses: e, descriptions: t, onChange: n, label: r = "Estado", ...
305
304
  }
306
305
  //#endregion
307
306
  //#region src/wari/datetime.ts
308
- var S = (e, t = 2) => String(e).padStart(t, "0");
309
- function C(e, t, n) {
310
- return `${S(e, 4)}-${S(t + 1)}-${S(n)}`;
307
+ var k = (e, t = 2) => String(e).padStart(t, "0");
308
+ function A(e, t, n) {
309
+ return `${k(e, 4)}-${k(t + 1)}-${k(n)}`;
311
310
  }
312
- function w(e) {
311
+ function j(e) {
313
312
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e ?? "");
314
313
  if (!t) return null;
315
314
  let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]), a = new Date(n, r, i);
@@ -319,37 +318,37 @@ function w(e) {
319
318
  day: i
320
319
  } : null;
321
320
  }
322
- function T(e = /* @__PURE__ */ new Date()) {
323
- return C(e.getFullYear(), e.getMonth(), e.getDate());
321
+ function M(e = /* @__PURE__ */ new Date()) {
322
+ return A(e.getFullYear(), e.getMonth(), e.getDate());
324
323
  }
325
- function E(e) {
326
- let t = w(e);
327
- return t ? `${S(t.day)}/${S(t.month + 1)}/${S(t.year % 100)}` : "";
324
+ function N(e) {
325
+ let t = j(e);
326
+ return t ? `${k(t.day)}/${k(t.month + 1)}/${k(t.year % 100)}` : "";
328
327
  }
329
- function D(e) {
328
+ function P(e) {
330
329
  let t = /^\s*(\d{1,2})[/.-](\d{1,2})[/.-](\d{2}|\d{4})\s*$/.exec(e);
331
330
  if (!t) return null;
332
- let n = C(t[3].length === 2 ? 2e3 + Number(t[3]) : Number(t[3]), Number(t[2]) - 1, Number(t[1]));
333
- return w(n) ? n : null;
331
+ let n = A(t[3].length === 2 ? 2e3 + Number(t[3]) : Number(t[3]), Number(t[2]) - 1, Number(t[1]));
332
+ return j(n) ? n : null;
334
333
  }
335
- function O(e, t, n) {
334
+ function F(e, t, n) {
336
335
  return (!t || e >= t) && (!n || e <= n);
337
336
  }
338
- function k(e, t, n) {
337
+ function I(e, t, n) {
339
338
  let r = new Date(e, t + n, 1);
340
339
  return {
341
340
  year: r.getFullYear(),
342
341
  month: r.getMonth()
343
342
  };
344
343
  }
345
- function A(e, t, n = 0) {
344
+ function L(e, t, n = 0) {
346
345
  let r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = [];
347
346
  for (let n = 0; n < 6; n++) {
348
347
  let a = [];
349
348
  for (let i = 0; i < 7; i++) {
350
349
  let o = new Date(e, t, 1 - r + n * 7 + i);
351
350
  a.push({
352
- iso: C(o.getFullYear(), o.getMonth(), o.getDate()),
351
+ iso: A(o.getFullYear(), o.getMonth(), o.getDate()),
353
352
  day: o.getDate(),
354
353
  outside: o.getMonth() !== t
355
354
  });
@@ -358,34 +357,34 @@ function A(e, t, n = 0) {
358
357
  }
359
358
  return i;
360
359
  }
361
- function j(e, t) {
362
- let n = w(e);
360
+ function R(e, t) {
361
+ let n = j(e);
363
362
  if (!n) return e;
364
363
  let r = new Date(n.year, n.month, n.day + t);
365
- return C(r.getFullYear(), r.getMonth(), r.getDate());
364
+ return A(r.getFullYear(), r.getMonth(), r.getDate());
366
365
  }
367
- function M(e, t) {
368
- let n = w(e);
366
+ function ee(e, t) {
367
+ let n = j(e);
369
368
  if (!n) return e;
370
- let r = k(n.year, n.month, t), i = new Date(r.year, r.month + 1, 0).getDate();
371
- return C(r.year, r.month, Math.min(n.day, i));
369
+ let r = I(n.year, n.month, t), i = new Date(r.year, r.month + 1, 0).getDate();
370
+ return A(r.year, r.month, Math.min(n.day, i));
372
371
  }
373
- function N(e = "es", t = "long") {
372
+ function z(e = "es", t = "long") {
374
373
  let n = new Intl.DateTimeFormat(e, {
375
374
  month: t,
376
375
  timeZone: "UTC"
377
376
  });
378
377
  return Array.from({ length: 12 }, (e, t) => n.format(new Date(Date.UTC(2024, t, 1))).replace(".", ""));
379
378
  }
380
- function P(e = "es", t = 0, n = "narrow") {
379
+ function B(e = "es", t = 0, n = "narrow") {
381
380
  let r = new Intl.DateTimeFormat(e, {
382
381
  weekday: n,
383
382
  timeZone: "UTC"
384
383
  });
385
384
  return Array.from({ length: 7 }, (e, n) => r.format(new Date(Date.UTC(2024, 0, 7 + (n + t) % 7))));
386
385
  }
387
- function F(e, t = "es") {
388
- let n = w(e);
386
+ function V(e, t = "es") {
387
+ let n = j(e);
389
388
  return n ? new Intl.DateTimeFormat(t, {
390
389
  weekday: "long",
391
390
  day: "numeric",
@@ -394,7 +393,7 @@ function F(e, t = "es") {
394
393
  timeZone: "UTC"
395
394
  }).format(new Date(Date.UTC(n.year, n.month, n.day))) : "";
396
395
  }
397
- function I(e) {
396
+ function H(e) {
398
397
  let t = /^(\d{1,2}):(\d{2})$/.exec(e ?? "");
399
398
  if (!t) return null;
400
399
  let n = Number(t[1]), r = Number(t[2]);
@@ -403,43 +402,43 @@ function I(e) {
403
402
  minutes: r
404
403
  } : null;
405
404
  }
406
- function L(e, t) {
407
- return `${S(e)}:${S(t)}`;
405
+ function U(e, t) {
406
+ return `${k(e)}:${k(t)}`;
408
407
  }
409
- function R(e) {
408
+ function te(e) {
410
409
  return {
411
410
  hour: e % 12 == 0 ? 12 : e % 12,
412
411
  period: e < 12 ? "AM" : "PM"
413
412
  };
414
413
  }
415
- function ee(e, t) {
414
+ function ne(e, t) {
416
415
  return e % 12 + (t === "PM" ? 12 : 0);
417
416
  }
418
- function z(e) {
419
- let t = I(e);
417
+ function re(e) {
418
+ let t = H(e);
420
419
  if (!t) return "";
421
- let { hour: n, period: r } = R(t.hours);
422
- return `${S(n)}:${S(t.minutes)} ${r}`;
420
+ let { hour: n, period: r } = te(t.hours);
421
+ return `${k(n)}:${k(t.minutes)} ${r}`;
423
422
  }
424
- function B(e) {
423
+ function W(e) {
425
424
  let t = /^\s*(\d{1,2})(?::?(\d{2}))?\s*([ap])?\.?\s*m?\.?\s*$/i.exec(e);
426
425
  if (!t) return null;
427
426
  let n = Number(t[1]), r = t[2] ? Number(t[2]) : 0, i = t[3]?.toLowerCase();
428
427
  if (r > 59) return null;
429
428
  if (i) {
430
429
  if (n < 1 || n > 12) return null;
431
- n = ee(n, i === "p" ? "PM" : "AM");
430
+ n = ne(n, i === "p" ? "PM" : "AM");
432
431
  } else if (n > 23) return null;
433
- return L(n, r);
432
+ return U(n, r);
434
433
  }
435
- function V(e, t, n, r) {
434
+ function G(e, t, n, r) {
436
435
  let i = e % t / t * Math.PI * 2;
437
436
  return {
438
437
  x: r + n * Math.sin(i),
439
438
  y: r - n * Math.cos(i)
440
439
  };
441
440
  }
442
- function H(e, t, n, r) {
441
+ function K(e, t, n, r) {
443
442
  let i = (Math.atan2(e - n, n - t) * 180 / Math.PI + 360) % 360;
444
443
  if (r === "hour") {
445
444
  let e = Math.round(i / 30) % 12;
@@ -447,7 +446,7 @@ function H(e, t, n, r) {
447
446
  }
448
447
  return Math.round(i / 6) % 60;
449
448
  }
450
- var te = (e) => S(e), U = {
449
+ var ie = (e) => k(e), q = {
451
450
  width: 20,
452
451
  height: 20,
453
452
  viewBox: "0 0 24 24",
@@ -457,18 +456,18 @@ var te = (e) => S(e), U = {
457
456
  strokeLinecap: "round",
458
457
  strokeLinejoin: "round",
459
458
  "aria-hidden": !0
460
- }, ne = () => /* @__PURE__ */ c("svg", {
461
- ...U,
459
+ }, ae = () => /* @__PURE__ */ h("svg", {
460
+ ...q,
462
461
  children: [
463
- /* @__PURE__ */ s("rect", {
462
+ /* @__PURE__ */ m("rect", {
464
463
  x: "3.5",
465
464
  y: "5",
466
465
  width: "17",
467
466
  height: "15.5",
468
467
  rx: "2.5"
469
468
  }),
470
- /* @__PURE__ */ s("path", { d: "M3.5 9.5h17M8 3v4M16 3v4" }),
471
- /* @__PURE__ */ s("rect", {
469
+ /* @__PURE__ */ m("path", { d: "M3.5 9.5h17M8 3v4M16 3v4" }),
470
+ /* @__PURE__ */ m("rect", {
472
471
  x: "11",
473
472
  y: "13",
474
473
  width: "2.4",
@@ -478,83 +477,83 @@ var te = (e) => S(e), U = {
478
477
  stroke: "none"
479
478
  })
480
479
  ]
481
- }), re = ({ size: e = 20 }) => /* @__PURE__ */ c("svg", {
482
- ...U,
480
+ }), J = ({ size: e = 20 }) => /* @__PURE__ */ h("svg", {
481
+ ...q,
483
482
  width: e,
484
483
  height: e,
485
- children: [/* @__PURE__ */ s("circle", {
484
+ children: [/* @__PURE__ */ m("circle", {
486
485
  cx: "12",
487
486
  cy: "12",
488
487
  r: "8.5"
489
- }), /* @__PURE__ */ s("path", { d: "M12 7.5V12l3 2" })]
490
- }), W = () => /* @__PURE__ */ s("svg", {
491
- ...U,
492
- children: /* @__PURE__ */ s("path", { d: "m14.5 6-6 6 6 6" })
493
- }), ie = () => /* @__PURE__ */ s("svg", {
494
- ...U,
495
- children: /* @__PURE__ */ s("path", { d: "m9.5 6 6 6-6 6" })
496
- }), G = () => /* @__PURE__ */ s("svg", {
497
- ...U,
488
+ }), /* @__PURE__ */ m("path", { d: "M12 7.5V12l3 2" })]
489
+ }), oe = () => /* @__PURE__ */ m("svg", {
490
+ ...q,
491
+ children: /* @__PURE__ */ m("path", { d: "m14.5 6-6 6 6 6" })
492
+ }), se = () => /* @__PURE__ */ m("svg", {
493
+ ...q,
494
+ children: /* @__PURE__ */ m("path", { d: "m9.5 6 6 6-6 6" })
495
+ }), ce = () => /* @__PURE__ */ m("svg", {
496
+ ...q,
498
497
  width: 18,
499
498
  height: 18,
500
- children: /* @__PURE__ */ s("path", {
499
+ children: /* @__PURE__ */ m("path", {
501
500
  d: "m7 10 5 5 5-5",
502
501
  fill: "currentColor",
503
502
  stroke: "none"
504
503
  })
505
- }), ae = () => /* @__PURE__ */ s("svg", {
506
- ...U,
504
+ }), le = () => /* @__PURE__ */ m("svg", {
505
+ ...q,
507
506
  width: 24,
508
507
  height: 24,
509
- children: /* @__PURE__ */ s("path", { d: "m5 12.5 4.5 4.5L19 7.5" })
510
- }), K = () => /* @__PURE__ */ c("svg", {
511
- ...U,
512
- children: [/* @__PURE__ */ s("rect", {
508
+ children: /* @__PURE__ */ m("path", { d: "m5 12.5 4.5 4.5L19 7.5" })
509
+ }), Y = () => /* @__PURE__ */ h("svg", {
510
+ ...q,
511
+ children: [/* @__PURE__ */ m("rect", {
513
512
  x: "2.5",
514
513
  y: "6",
515
514
  width: "19",
516
515
  height: "12",
517
516
  rx: "2"
518
- }), /* @__PURE__ */ s("path", { d: "M6 9.5h.01M9 9.5h.01M12 9.5h.01M15 9.5h.01M18 9.5h.01M7 14.5h10" })]
519
- }), q = () => /* @__PURE__ */ s("svg", {
520
- ...U,
517
+ }), /* @__PURE__ */ m("path", { d: "M6 9.5h.01M9 9.5h.01M12 9.5h.01M15 9.5h.01M18 9.5h.01M7 14.5h10" })]
518
+ }), ue = () => /* @__PURE__ */ m("svg", {
519
+ ...q,
521
520
  width: 24,
522
521
  height: 24,
523
- children: /* @__PURE__ */ s("path", { d: "M6 4v8M6 16v4M12 4v2M12 10v10M18 4v10M18 18v2M4 14h4M10 8h4M16 16h4" })
524
- }), J = () => /* @__PURE__ */ s("svg", {
525
- ...U,
526
- children: /* @__PURE__ */ s("path", { d: "m6 9.5 6 6 6-6" })
527
- }), oe = () => /* @__PURE__ */ s("svg", {
528
- ...U,
522
+ children: /* @__PURE__ */ m("path", { d: "M6 4v8M6 16v4M12 4v2M12 10v10M18 4v10M18 18v2M4 14h4M10 8h4M16 16h4" })
523
+ }), X = () => /* @__PURE__ */ m("svg", {
524
+ ...q,
525
+ children: /* @__PURE__ */ m("path", { d: "m6 9.5 6 6 6-6" })
526
+ }), Z = () => /* @__PURE__ */ m("svg", {
527
+ ...q,
529
528
  width: 16,
530
529
  height: 16,
531
- children: /* @__PURE__ */ s("path", { d: "M5 12h14" })
532
- }), Y = () => /* @__PURE__ */ s("svg", {
533
- ...U,
530
+ children: /* @__PURE__ */ m("path", { d: "M5 12h14" })
531
+ }), Q = () => /* @__PURE__ */ m("svg", {
532
+ ...q,
534
533
  width: 16,
535
534
  height: 16,
536
- children: /* @__PURE__ */ s("path", { d: "M12 5v14M5 12h14" })
537
- }), se = {
538
- ...U,
535
+ children: /* @__PURE__ */ m("path", { d: "M12 5v14M5 12h14" })
536
+ }), de = {
537
+ ...q,
539
538
  width: 12,
540
539
  height: 12,
541
540
  strokeWidth: 2
542
- }, X = () => /* @__PURE__ */ c("svg", {
543
- ...se,
544
- children: [/* @__PURE__ */ s("circle", {
541
+ }, fe = () => /* @__PURE__ */ h("svg", {
542
+ ...de,
543
+ children: [/* @__PURE__ */ m("circle", {
545
544
  cx: "12",
546
545
  cy: "8",
547
546
  r: "4",
548
547
  fill: "currentColor",
549
548
  stroke: "none"
550
- }), /* @__PURE__ */ s("path", {
549
+ }), /* @__PURE__ */ m("path", {
551
550
  d: "M4.5 20.5c1-4 4-6 7.5-6s6.5 2 7.5 6",
552
551
  fill: "currentColor",
553
552
  stroke: "none"
554
553
  })]
555
- }), ce = () => /* @__PURE__ */ c("svg", {
556
- ...se,
557
- children: [/* @__PURE__ */ s("rect", {
554
+ }), $ = () => /* @__PURE__ */ h("svg", {
555
+ ...de,
556
+ children: [/* @__PURE__ */ m("rect", {
558
557
  x: "6",
559
558
  y: "7",
560
559
  width: "12",
@@ -562,10 +561,10 @@ var te = (e) => S(e), U = {
562
561
  rx: "2",
563
562
  fill: "currentColor",
564
563
  stroke: "none"
565
- }), /* @__PURE__ */ s("path", { d: "M9.5 7V4.5h5V7M9 22v-2M15 22v-2" })]
566
- }), Z = () => /* @__PURE__ */ c("svg", {
567
- ...se,
568
- children: [/* @__PURE__ */ s("rect", {
564
+ }), /* @__PURE__ */ m("path", { d: "M9.5 7V4.5h5V7M9 22v-2M15 22v-2" })]
565
+ }), pe = () => /* @__PURE__ */ h("svg", {
566
+ ...de,
567
+ children: [/* @__PURE__ */ m("rect", {
569
568
  x: "2.5",
570
569
  y: "8.5",
571
570
  width: "19",
@@ -573,228 +572,228 @@ var te = (e) => S(e), U = {
573
572
  rx: "2",
574
573
  fill: "currentColor",
575
574
  stroke: "none"
576
- }), /* @__PURE__ */ s("path", { d: "M9 8.5V6.5h6v2" })]
577
- }), Q = () => /* @__PURE__ */ c("svg", {
578
- ...U,
575
+ }), /* @__PURE__ */ m("path", { d: "M9 8.5V6.5h6v2" })]
576
+ }), me = () => /* @__PURE__ */ h("svg", {
577
+ ...q,
579
578
  width: 24,
580
579
  height: 24,
581
580
  children: [
582
- /* @__PURE__ */ s("rect", {
581
+ /* @__PURE__ */ m("rect", {
583
582
  x: "3.5",
584
583
  y: "3.5",
585
584
  width: "17",
586
585
  height: "17",
587
586
  rx: "2.5"
588
587
  }),
589
- /* @__PURE__ */ s("circle", {
588
+ /* @__PURE__ */ m("circle", {
590
589
  cx: "12",
591
590
  cy: "10",
592
591
  r: "3"
593
592
  }),
594
- /* @__PURE__ */ s("path", { d: "M6.5 20c.9-2.7 3-4 5.5-4s4.6 1.3 5.5 4" })
593
+ /* @__PURE__ */ m("path", { d: "M6.5 20c.9-2.7 3-4 5.5-4s4.6 1.3 5.5 4" })
595
594
  ]
596
- }), le = () => /* @__PURE__ */ c("svg", {
597
- ...U,
595
+ }), he = () => /* @__PURE__ */ h("svg", {
596
+ ...q,
598
597
  width: 24,
599
598
  height: 24,
600
- children: [/* @__PURE__ */ s("circle", {
599
+ children: [/* @__PURE__ */ m("circle", {
601
600
  cx: "10.5",
602
601
  cy: "10.5",
603
602
  r: "6.5"
604
- }), /* @__PURE__ */ s("path", { d: "m20 20-4.8-4.8" })]
605
- }), ue = () => /* @__PURE__ */ s("svg", {
606
- ...U,
603
+ }), /* @__PURE__ */ m("path", { d: "m20 20-4.8-4.8" })]
604
+ }), ge = () => /* @__PURE__ */ m("svg", {
605
+ ...q,
607
606
  width: 16,
608
607
  height: 16,
609
- children: /* @__PURE__ */ s("path", { d: "M12 4v16M4 12h16" })
610
- }), de = () => /* @__PURE__ */ s("svg", {
611
- ...U,
608
+ children: /* @__PURE__ */ m("path", { d: "M12 4v16M4 12h16" })
609
+ }), _e = () => /* @__PURE__ */ m("svg", {
610
+ ...q,
612
611
  width: 16,
613
612
  height: 16,
614
- children: /* @__PURE__ */ s("path", { d: "M5 3.5h3.2l1.6 4-2 1.3a10.5 10.5 0 0 0 5.4 5.4l1.3-2 4 1.6V17a2 2 0 0 1-2 2A15.5 15.5 0 0 1 3 5.5a2 2 0 0 1 2-2Z" })
615
- }), $ = () => /* @__PURE__ */ c("svg", {
616
- ...U,
613
+ children: /* @__PURE__ */ m("path", { d: "M5 3.5h3.2l1.6 4-2 1.3a10.5 10.5 0 0 0 5.4 5.4l1.3-2 4 1.6V17a2 2 0 0 1-2 2A15.5 15.5 0 0 1 3 5.5a2 2 0 0 1 2-2Z" })
614
+ }), ve = () => /* @__PURE__ */ h("svg", {
615
+ ...q,
617
616
  width: 16,
618
617
  height: 16,
619
- children: [/* @__PURE__ */ s("circle", {
618
+ children: [/* @__PURE__ */ m("circle", {
620
619
  cx: "12",
621
620
  cy: "12",
622
621
  r: "9",
623
622
  fill: "currentColor",
624
623
  stroke: "none"
625
- }), /* @__PURE__ */ s("path", {
624
+ }), /* @__PURE__ */ m("path", {
626
625
  d: "M12 11v5.5M12 7.6v.1",
627
626
  stroke: "#fff",
628
627
  strokeWidth: 2.4
629
628
  })]
630
- }), fe = () => /* @__PURE__ */ c("svg", {
631
- ...U,
629
+ }), ye = () => /* @__PURE__ */ h("svg", {
630
+ ...q,
632
631
  width: 16,
633
632
  height: 16,
634
- children: [/* @__PURE__ */ s("path", {
633
+ children: [/* @__PURE__ */ m("path", {
635
634
  d: "M4 20h4.5L19 9.5 14.5 5 4 15.5z",
636
635
  fill: "currentColor",
637
636
  stroke: "none"
638
- }), /* @__PURE__ */ s("path", { d: "M13 20h7" })]
639
- }), pe = () => /* @__PURE__ */ s("svg", {
640
- ...U,
637
+ }), /* @__PURE__ */ m("path", { d: "M13 20h7" })]
638
+ }), be = () => /* @__PURE__ */ m("svg", {
639
+ ...q,
641
640
  width: 16,
642
641
  height: 16,
643
- children: /* @__PURE__ */ s("path", { d: "M4.5 6.5h15M9.5 6.5V4.5h5v2M6.5 6.5l1 13h9l1-13M10.5 10v6M13.5 10v6" })
644
- }), me = () => /* @__PURE__ */ c("svg", {
645
- ...U,
642
+ children: /* @__PURE__ */ m("path", { d: "M4.5 6.5h15M9.5 6.5V4.5h5v2M6.5 6.5l1 13h9l1-13M10.5 10v6M13.5 10v6" })
643
+ }), xe = () => /* @__PURE__ */ h("svg", {
644
+ ...q,
646
645
  width: 24,
647
646
  height: 24,
648
- children: [/* @__PURE__ */ s("path", { d: "M6 5h9.5a3.5 3.5 0 0 1 0 7h-7a3.5 3.5 0 0 0 0 7H17" }), /* @__PURE__ */ s("circle", {
647
+ children: [/* @__PURE__ */ m("path", { d: "M6 5h9.5a3.5 3.5 0 0 1 0 7h-7a3.5 3.5 0 0 0 0 7H17" }), /* @__PURE__ */ m("circle", {
649
648
  cx: "19",
650
649
  cy: "19",
651
650
  r: "2",
652
651
  fill: "currentColor",
653
652
  stroke: "none"
654
653
  })]
655
- }), he = () => /* @__PURE__ */ s("svg", {
656
- ...U,
654
+ }), Se = () => /* @__PURE__ */ m("svg", {
655
+ ...q,
657
656
  width: 16,
658
657
  height: 16,
659
- children: /* @__PURE__ */ s("path", { d: "M4 9a8 8 0 0 1 14-3l2 2M20 4v4h-4M20 15a8 8 0 0 1-14 3l-2-2M4 20v-4h4" })
660
- }), ge = () => /* @__PURE__ */ s("svg", {
661
- ...U,
658
+ children: /* @__PURE__ */ m("path", { d: "M4 9a8 8 0 0 1 14-3l2 2M20 4v4h-4M20 15a8 8 0 0 1-14 3l-2-2M4 20v-4h4" })
659
+ }), Ce = () => /* @__PURE__ */ m("svg", {
660
+ ...q,
662
661
  width: 18,
663
662
  height: 18,
664
- children: /* @__PURE__ */ s("path", { d: "M5 7h14M5 12h14M5 17h14" })
665
- }), _e = () => /* @__PURE__ */ s("svg", {
666
- ...U,
663
+ children: /* @__PURE__ */ m("path", { d: "M5 7h14M5 12h14M5 17h14" })
664
+ }), we = () => /* @__PURE__ */ m("svg", {
665
+ ...q,
667
666
  width: 18,
668
667
  height: 18,
669
- children: /* @__PURE__ */ s("path", { d: "M6 6l12 12M18 6 6 18" })
670
- }), ve = () => /* @__PURE__ */ s("svg", {
671
- ...U,
668
+ children: /* @__PURE__ */ m("path", { d: "M6 6l12 12M18 6 6 18" })
669
+ }), Te = () => /* @__PURE__ */ m("svg", {
670
+ ...q,
672
671
  width: 16,
673
672
  height: 16,
674
673
  strokeWidth: 2.4,
675
- children: /* @__PURE__ */ s("circle", {
674
+ children: /* @__PURE__ */ m("circle", {
676
675
  cx: "12",
677
676
  cy: "12",
678
677
  r: "7.5"
679
678
  })
680
- }), ye = () => /* @__PURE__ */ s("svg", {
681
- ...U,
679
+ }), Ee = () => /* @__PURE__ */ m("svg", {
680
+ ...q,
682
681
  width: 16,
683
682
  height: 16,
684
683
  strokeWidth: 2.4,
685
- children: /* @__PURE__ */ s("rect", {
684
+ children: /* @__PURE__ */ m("rect", {
686
685
  x: "4.5",
687
686
  y: "4.5",
688
687
  width: "15",
689
688
  height: "15",
690
689
  rx: "1.5"
691
690
  })
692
- }), be = () => /* @__PURE__ */ c("svg", {
693
- ...U,
691
+ }), De = () => /* @__PURE__ */ h("svg", {
692
+ ...q,
694
693
  width: 16,
695
694
  height: 16,
696
- children: [/* @__PURE__ */ s("circle", {
695
+ children: [/* @__PURE__ */ m("circle", {
697
696
  cx: "10",
698
697
  cy: "8",
699
698
  r: "3.5"
700
- }), /* @__PURE__ */ s("path", { d: "M3.5 20c.8-3.5 3.3-5.5 6.5-5.5s5.7 2 6.5 5.5M18 8v6M15 11h6" })]
701
- }), xe = () => /* @__PURE__ */ c("svg", {
702
- ...U,
699
+ }), /* @__PURE__ */ m("path", { d: "M3.5 20c.8-3.5 3.3-5.5 6.5-5.5s5.7 2 6.5 5.5M18 8v6M15 11h6" })]
700
+ }), Oe = () => /* @__PURE__ */ h("svg", {
701
+ ...q,
703
702
  width: 16,
704
703
  height: 16,
705
- children: [/* @__PURE__ */ s("circle", {
704
+ children: [/* @__PURE__ */ m("circle", {
706
705
  cx: "12",
707
706
  cy: "8",
708
707
  r: "3.5"
709
- }), /* @__PURE__ */ s("path", { d: "M5 20c.8-3.5 3.6-5.5 7-5.5s6.2 2 7 5.5" })]
710
- }), Se = () => /* @__PURE__ */ c("svg", {
711
- ...U,
708
+ }), /* @__PURE__ */ m("path", { d: "M5 20c.8-3.5 3.6-5.5 7-5.5s6.2 2 7 5.5" })]
709
+ }), ke = () => /* @__PURE__ */ h("svg", {
710
+ ...q,
712
711
  width: 16,
713
712
  height: 16,
714
- children: [/* @__PURE__ */ s("circle", {
713
+ children: [/* @__PURE__ */ m("circle", {
715
714
  cx: "12",
716
715
  cy: "12",
717
716
  r: "9.5",
718
717
  fill: "currentColor",
719
718
  stroke: "none"
720
- }), /* @__PURE__ */ s("path", {
719
+ }), /* @__PURE__ */ m("path", {
721
720
  d: "M12 7.5v9M7.5 12h9",
722
721
  stroke: "#fff",
723
722
  strokeWidth: 2.2
724
723
  })]
725
- }), Ce = () => /* @__PURE__ */ c("svg", {
726
- ...U,
724
+ }), Ae = () => /* @__PURE__ */ h("svg", {
725
+ ...q,
727
726
  width: 16,
728
727
  height: 16,
729
- children: [/* @__PURE__ */ s("circle", {
728
+ children: [/* @__PURE__ */ m("circle", {
730
729
  cx: "12",
731
730
  cy: "12",
732
731
  r: "9.5",
733
732
  fill: "currentColor",
734
733
  stroke: "none"
735
- }), /* @__PURE__ */ s("path", {
734
+ }), /* @__PURE__ */ m("path", {
736
735
  d: "m9 9 6 6M15 9l-6 6",
737
736
  stroke: "#fff",
738
737
  strokeWidth: 2
739
738
  })]
740
- }), we = () => /* @__PURE__ */ c("svg", {
741
- ...U,
739
+ }), je = () => /* @__PURE__ */ h("svg", {
740
+ ...q,
742
741
  width: 16,
743
742
  height: 16,
744
- children: [/* @__PURE__ */ s("path", { d: "M5 3.5h3.2l1.6 4-2 1.3a10.5 10.5 0 0 0 5.4 5.4l1.3-2 4 1.6V17a2 2 0 0 1-2 2A15.5 15.5 0 0 1 3 5.5a2 2 0 0 1 2-2Z" }), /* @__PURE__ */ s("path", { d: "M15 4h5M15 7h5M17 10h3" })]
743
+ children: [/* @__PURE__ */ m("path", { d: "M5 3.5h3.2l1.6 4-2 1.3a10.5 10.5 0 0 0 5.4 5.4l1.3-2 4 1.6V17a2 2 0 0 1-2 2A15.5 15.5 0 0 1 3 5.5a2 2 0 0 1 2-2Z" }), /* @__PURE__ */ m("path", { d: "M15 4h5M15 7h5M17 10h3" })]
745
744
  });
746
745
  //#endregion
747
746
  //#region src/wari/WariDateField.tsx
748
- function Te({ label: n, value: r, defaultValue: o = "", onChange: l, min: u, max: d, placeholder: f = "dd/mm/aa", supportingText: p, error: m = !1, required: h, disabled: g = !1, name: _, id: v, locale: y = "es", weekStartsOn: b = 0, cancelLabel: x = "Cancelar", okLabel: S = "Aceptar", align: C = "start", className: I }) {
749
- let L = t(), R = v ?? L, ee = `${R}-hint`, [z, B] = a(o), V = r ?? z, [H, te] = a(() => E(V)), [U, re] = a(!1), [K, q] = a(!1), [J, oe] = a("days"), [Y, se] = a(""), [X, ce] = a(""), [Z, Q] = a(() => {
750
- let e = w(V) ?? w(T());
747
+ function Me({ label: e, value: t, defaultValue: n = "", onChange: r, min: a, max: o, placeholder: l = "dd/mm/aa", supportingText: u, error: p = !1, required: g, disabled: _ = !1, name: v, id: y, locale: b = "es", weekStartsOn: x = 0, cancelLabel: S = "Cancelar", okLabel: C = "Aceptar", align: w = "start", className: T }) {
748
+ let E = c(), D = y ?? E, O = `${D}-hint`, [k, A] = f(n), H = t ?? k, [U, te] = f(() => N(H)), [ne, re] = f(!1), [W, G] = f(!1), [K, ie] = f("days"), [q, J] = f(""), [Y, ue] = f(""), [X, Z] = f(() => {
749
+ let e = j(H) ?? j(M());
751
750
  return {
752
751
  year: e.year,
753
752
  month: e.month
754
753
  };
755
- }), le = i(null), ue = i(null), de = i(null), $ = i(!1), fe = U ? H : E(V), pe = N(y, "long"), me = N(y, "short"), he = P(y, b), ge = P(y, b, "long"), _e = T(), ve = w(u)?.year ?? Z.year - 50, ye = w(d)?.year ?? Z.year + 50, be = (e) => {
756
- r === void 0 && B(e), e !== V && l?.(e);
757
- }, xe = (e) => u && e < u ? u : d && e > d ? d : e, Se = () => {
758
- if (g) return;
759
- let e = xe(w(V) ? V : _e), t = w(e);
760
- se(w(V) ? V : ""), ce(e), Q({
754
+ }), Q = d(null), de = d(null), fe = d(null), $ = d(!1), pe = ne ? U : N(H), me = z(b, "long"), he = z(b, "short"), ge = B(b, x), _e = B(b, x, "long"), ve = M(), ye = j(a)?.year ?? X.year - 50, be = j(o)?.year ?? X.year + 50, xe = (e) => {
755
+ t === void 0 && A(e), e !== H && r?.(e);
756
+ }, Se = (e) => a && e < a ? a : o && e > o ? o : e, Ce = () => {
757
+ if (_) return;
758
+ let e = Se(j(H) ? H : ve), t = j(e);
759
+ J(j(H) ? H : ""), ue(e), Z({
761
760
  year: t.year,
762
761
  month: t.month
763
- }), oe("days"), $.current = !0, q(!0);
764
- }, Ce = (e = !0) => {
765
- q(!1), e && ue.current?.focus();
762
+ }), ie("days"), $.current = !0, G(!0);
763
+ }, we = (e = !0) => {
764
+ G(!1), e && de.current?.focus();
766
765
  };
767
- e(() => {
768
- if (!K) return;
766
+ s(() => {
767
+ if (!W) return;
769
768
  let e = (e) => {
770
- le.current?.contains(e.target) || q(!1);
769
+ Q.current?.contains(e.target) || G(!1);
771
770
  };
772
771
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
773
- }, [K]), e(() => {
774
- if (!K || !$.current) return;
772
+ }, [W]), s(() => {
773
+ if (!W || !$.current) return;
775
774
  $.current = !1;
776
- let e = J === "days" ? de.current?.querySelector(`[data-iso="${X}"]`) : de.current?.querySelector(".ds-wpicker-option[tabindex=\"0\"]");
777
- e?.focus(), J !== "days" && e?.scrollIntoView?.({ block: "center" });
775
+ let e = K === "days" ? fe.current?.querySelector(`[data-iso="${Y}"]`) : fe.current?.querySelector(".ds-wpicker-option[tabindex=\"0\"]");
776
+ e?.focus(), K !== "days" && e?.scrollIntoView?.({ block: "center" });
778
777
  });
779
- let we = (e) => {
780
- let t = xe(e), n = w(t);
781
- ce(t), (n.year !== Z.year || n.month !== Z.month) && Q({
778
+ let Te = (e) => {
779
+ let t = Se(e), n = j(t);
780
+ ue(t), (n.year !== X.year || n.month !== X.month) && Z({
782
781
  year: n.year,
783
782
  month: n.month
784
783
  }), $.current = !0;
785
- }, Te = (e) => {
784
+ }, Ee = (e) => {
786
785
  let t = {
787
- ArrowLeft: () => j(X, -1),
788
- ArrowRight: () => j(X, 1),
789
- ArrowUp: () => j(X, -7),
790
- ArrowDown: () => j(X, 7),
791
- PageUp: () => M(X, e.shiftKey ? -12 : -1),
792
- PageDown: () => M(X, e.shiftKey ? 12 : 1),
793
- Home: () => j(X, -(((/* @__PURE__ */ new Date(`${X}T00:00`)).getDay() - b + 7) % 7)),
794
- End: () => j(X, 6 - ((/* @__PURE__ */ new Date(`${X}T00:00`)).getDay() - b + 7) % 7)
786
+ ArrowLeft: () => R(Y, -1),
787
+ ArrowRight: () => R(Y, 1),
788
+ ArrowUp: () => R(Y, -7),
789
+ ArrowDown: () => R(Y, 7),
790
+ PageUp: () => ee(Y, e.shiftKey ? -12 : -1),
791
+ PageDown: () => ee(Y, e.shiftKey ? 12 : 1),
792
+ Home: () => R(Y, -(((/* @__PURE__ */ new Date(`${Y}T00:00`)).getDay() - x + 7) % 7)),
793
+ End: () => R(Y, 6 - ((/* @__PURE__ */ new Date(`${Y}T00:00`)).getDay() - x + 7) % 7)
795
794
  };
796
- t[e.key] && (e.preventDefault(), we(t[e.key]()));
797
- }, Ee = (e) => {
795
+ t[e.key] && (e.preventDefault(), Te(t[e.key]()));
796
+ }, De = (e) => {
798
797
  let t = [...e.currentTarget.querySelectorAll(".ds-wpicker-option")], n = t.indexOf(document.activeElement), r = {
799
798
  ArrowDown: n + 1,
800
799
  ArrowUp: n - 1,
@@ -802,261 +801,258 @@ function Te({ label: n, value: r, defaultValue: o = "", onChange: l, min: u, max
802
801
  End: t.length - 1
803
802
  }[e.key];
804
803
  r !== void 0 && (e.preventDefault(), t[Math.max(0, Math.min(r, t.length - 1))]?.focus());
805
- }, De = (e) => {
806
- e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), J === "days" ? Ce() : (oe("days"), $.current = !0));
807
- }, Oe = () => {
808
- if (re(!1), !H.trim()) {
809
- be("");
804
+ }, Oe = (e) => {
805
+ e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), K === "days" ? we() : (ie("days"), $.current = !0));
806
+ }, ke = () => {
807
+ if (re(!1), !U.trim()) {
808
+ xe("");
810
809
  return;
811
810
  }
812
- let e = D(H);
813
- e && O(e, u, d) && be(e);
814
- }, ke = (e) => {
815
- let t = e.relatedTarget;
816
- K && t && !le.current?.contains(t) && q(!1);
811
+ let e = P(U);
812
+ e && F(e, a, o) && xe(e);
817
813
  }, Ae = (e) => {
818
- Q(e);
819
- let t = w(X)?.day ?? 1, n = new Date(e.year, e.month + 1, 0).getDate();
820
- ce(xe(`${String(e.year).padStart(4, "0")}-${String(e.month + 1).padStart(2, "0")}-${String(Math.min(t, n)).padStart(2, "0")}`)), oe("days"), $.current = !0;
821
- }, je = k(Z.year, Z.month, -1), Me = k(Z.year, Z.month, 1), Ne = !!u && `${je.year}-${String(je.month + 1).padStart(2, "0")}-31` < u, Pe = !!d && `${Me.year}-${String(Me.month + 1).padStart(2, "0")}-01` > d, Fe = Array.from({ length: ye - ve + 1 }, (e, t) => ve + t);
822
- return /* @__PURE__ */ c("div", {
823
- ref: le,
814
+ let t = e.relatedTarget;
815
+ W && t && !Q.current?.contains(t) && G(!1);
816
+ }, je = (e) => {
817
+ Z(e);
818
+ let t = j(Y)?.day ?? 1, n = new Date(e.year, e.month + 1, 0).getDate();
819
+ ue(Se(`${String(e.year).padStart(4, "0")}-${String(e.month + 1).padStart(2, "0")}-${String(Math.min(t, n)).padStart(2, "0")}`)), ie("days"), $.current = !0;
820
+ }, Me = I(X.year, X.month, -1), Ne = I(X.year, X.month, 1), Pe = !!a && `${Me.year}-${String(Me.month + 1).padStart(2, "0")}-31` < a, Fe = !!o && `${Ne.year}-${String(Ne.month + 1).padStart(2, "0")}-01` > o, Ie = Array.from({ length: be - ye + 1 }, (e, t) => ye + t);
821
+ return /* @__PURE__ */ h("div", {
822
+ ref: Q,
824
823
  className: [
825
824
  "ds-input",
826
825
  "ds-wfield",
827
- I
826
+ T
828
827
  ].filter(Boolean).join(" "),
829
- "data-open": K,
830
- "data-error": m,
831
- "data-disabled": g,
832
- "data-align": C,
833
- onBlur: ke,
828
+ "data-open": W,
829
+ "data-error": p,
830
+ "data-disabled": _,
831
+ "data-align": w,
832
+ onBlur: Ae,
834
833
  children: [
835
- n && /* @__PURE__ */ c("label", {
836
- htmlFor: R,
837
- children: [n, h && /* @__PURE__ */ s("span", {
838
- className: "ds-input-required",
839
- "aria-hidden": "true",
840
- children: "*"
841
- })]
834
+ e && /* @__PURE__ */ m(i, {
835
+ htmlFor: D,
836
+ required: g,
837
+ children: e
842
838
  }),
843
- /* @__PURE__ */ c("div", {
839
+ /* @__PURE__ */ h("div", {
844
840
  className: "ds-wfield-anchor",
845
- children: [/* @__PURE__ */ c("div", {
841
+ children: [/* @__PURE__ */ h("div", {
846
842
  className: "ds-input-shell",
847
- children: [/* @__PURE__ */ s("input", {
848
- id: R,
843
+ children: [/* @__PURE__ */ m("input", {
844
+ id: D,
849
845
  type: "text",
850
846
  inputMode: "numeric",
851
847
  autoComplete: "off",
852
- placeholder: f,
853
- value: fe,
854
- disabled: g,
855
- required: h,
856
- "aria-invalid": m || void 0,
857
- "aria-describedby": p ? ee : void 0,
848
+ placeholder: l,
849
+ value: pe,
850
+ disabled: _,
851
+ required: g,
852
+ "aria-invalid": p || void 0,
853
+ "aria-describedby": u ? O : void 0,
858
854
  onChange: (e) => {
859
855
  re(!0), te(e.target.value);
860
856
  },
861
857
  onFocus: () => {
862
- re(!0), te(E(V));
858
+ re(!0), te(N(H));
863
859
  },
864
- onBlur: Oe,
860
+ onBlur: ke,
865
861
  onKeyDown: (e) => {
866
- e.key === "Enter" && (e.preventDefault(), Oe()), e.key === "ArrowDown" && (e.altKey || !K) && (e.preventDefault(), Oe(), Se());
862
+ e.key === "Enter" && (e.preventDefault(), ke()), e.key === "ArrowDown" && (e.altKey || !W) && (e.preventDefault(), ke(), Ce());
867
863
  }
868
- }), /* @__PURE__ */ s("button", {
869
- ref: ue,
864
+ }), /* @__PURE__ */ m("button", {
865
+ ref: de,
870
866
  type: "button",
871
867
  className: "ds-wfield-trigger",
872
- disabled: g,
873
- "aria-label": `Elegir fecha${V ? `, ${F(V, y)}` : ""}`,
868
+ disabled: _,
869
+ "aria-label": `Elegir fecha${H ? `, ${V(H, b)}` : ""}`,
874
870
  "aria-haspopup": "dialog",
875
- "aria-expanded": K,
876
- onClick: () => K ? Ce() : Se(),
877
- children: /* @__PURE__ */ s(ne, {})
871
+ "aria-expanded": W,
872
+ onClick: () => W ? we() : Ce(),
873
+ children: /* @__PURE__ */ m(ae, {})
878
874
  })]
879
- }), K && /* @__PURE__ */ c("div", {
880
- ref: de,
875
+ }), W && /* @__PURE__ */ h("div", {
876
+ ref: fe,
881
877
  className: "ds-wpicker",
882
878
  "data-kind": "date",
883
- "data-view": J,
879
+ "data-view": K,
884
880
  role: "dialog",
885
881
  "aria-label": "Elegir fecha",
886
- onKeyDown: De,
882
+ onKeyDown: Oe,
887
883
  children: [
888
- /* @__PURE__ */ c("div", {
884
+ /* @__PURE__ */ h("div", {
889
885
  className: "ds-wpicker-head",
890
- children: [/* @__PURE__ */ c("div", {
886
+ children: [/* @__PURE__ */ h("div", {
891
887
  className: "ds-wpicker-nav",
892
888
  "data-part": "month",
893
889
  children: [
894
- /* @__PURE__ */ s("button", {
890
+ /* @__PURE__ */ m("button", {
895
891
  type: "button",
896
892
  className: "ds-wpicker-icon",
897
893
  "aria-label": "Mes anterior",
898
- disabled: Ne || J !== "days",
899
- onClick: () => Q(je),
900
- children: /* @__PURE__ */ s(W, {})
894
+ disabled: Pe || K !== "days",
895
+ onClick: () => Z(Me),
896
+ children: /* @__PURE__ */ m(oe, {})
901
897
  }),
902
- /* @__PURE__ */ c("button", {
898
+ /* @__PURE__ */ h("button", {
903
899
  type: "button",
904
900
  className: "ds-wpicker-menu",
905
901
  "aria-haspopup": "listbox",
906
- "aria-expanded": J === "months",
907
- "aria-label": `Elegir mes, ${pe[Z.month]}`,
902
+ "aria-expanded": K === "months",
903
+ "aria-label": `Elegir mes, ${me[X.month]}`,
908
904
  onClick: () => {
909
- oe(J === "months" ? "days" : "months"), $.current = !0;
905
+ ie(K === "months" ? "days" : "months"), $.current = !0;
910
906
  },
911
- children: [me[Z.month], /* @__PURE__ */ s(G, {})]
907
+ children: [he[X.month], /* @__PURE__ */ m(ce, {})]
912
908
  }),
913
- /* @__PURE__ */ s("button", {
909
+ /* @__PURE__ */ m("button", {
914
910
  type: "button",
915
911
  className: "ds-wpicker-icon",
916
912
  "aria-label": "Mes siguiente",
917
- disabled: Pe || J !== "days",
918
- onClick: () => Q(Me),
919
- children: /* @__PURE__ */ s(ie, {})
913
+ disabled: Fe || K !== "days",
914
+ onClick: () => Z(Ne),
915
+ children: /* @__PURE__ */ m(se, {})
920
916
  })
921
917
  ]
922
- }), /* @__PURE__ */ c("div", {
918
+ }), /* @__PURE__ */ h("div", {
923
919
  className: "ds-wpicker-nav",
924
920
  "data-part": "year",
925
921
  children: [
926
- /* @__PURE__ */ s("button", {
922
+ /* @__PURE__ */ m("button", {
927
923
  type: "button",
928
924
  className: "ds-wpicker-icon",
929
925
  "aria-label": "Año anterior",
930
- disabled: Z.year - 1 < ve || J !== "days",
931
- onClick: () => Q({
932
- ...Z,
933
- year: Z.year - 1
926
+ disabled: X.year - 1 < ye || K !== "days",
927
+ onClick: () => Z({
928
+ ...X,
929
+ year: X.year - 1
934
930
  }),
935
- children: /* @__PURE__ */ s(W, {})
931
+ children: /* @__PURE__ */ m(oe, {})
936
932
  }),
937
- /* @__PURE__ */ c("button", {
933
+ /* @__PURE__ */ h("button", {
938
934
  type: "button",
939
935
  className: "ds-wpicker-menu",
940
936
  "aria-haspopup": "listbox",
941
- "aria-expanded": J === "years",
942
- "aria-label": `Elegir año, ${Z.year}`,
937
+ "aria-expanded": K === "years",
938
+ "aria-label": `Elegir año, ${X.year}`,
943
939
  onClick: () => {
944
- oe(J === "years" ? "days" : "years"), $.current = !0;
940
+ ie(K === "years" ? "days" : "years"), $.current = !0;
945
941
  },
946
- children: [Z.year, /* @__PURE__ */ s(G, {})]
942
+ children: [X.year, /* @__PURE__ */ m(ce, {})]
947
943
  }),
948
- /* @__PURE__ */ s("button", {
944
+ /* @__PURE__ */ m("button", {
949
945
  type: "button",
950
946
  className: "ds-wpicker-icon",
951
947
  "aria-label": "Año siguiente",
952
- disabled: Z.year + 1 > ye || J !== "days",
953
- onClick: () => Q({
954
- ...Z,
955
- year: Z.year + 1
948
+ disabled: X.year + 1 > be || K !== "days",
949
+ onClick: () => Z({
950
+ ...X,
951
+ year: X.year + 1
956
952
  }),
957
- children: /* @__PURE__ */ s(ie, {})
953
+ children: /* @__PURE__ */ m(se, {})
958
954
  })
959
955
  ]
960
956
  })]
961
957
  }),
962
- J === "days" && /* @__PURE__ */ c("table", {
958
+ K === "days" && /* @__PURE__ */ h("table", {
963
959
  className: "ds-wpicker-grid",
964
960
  role: "grid",
965
- "aria-label": `${pe[Z.month]} ${Z.year}`,
966
- onKeyDown: Te,
967
- children: [/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: he.map((e, t) => /* @__PURE__ */ s("th", {
961
+ "aria-label": `${me[X.month]} ${X.year}`,
962
+ onKeyDown: Ee,
963
+ children: [/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ m("tr", { children: ge.map((e, t) => /* @__PURE__ */ m("th", {
968
964
  scope: "col",
969
- abbr: ge[t],
965
+ abbr: _e[t],
970
966
  children: e
971
- }, t)) }) }), /* @__PURE__ */ s("tbody", { children: A(Z.year, Z.month, b).map((e, t) => /* @__PURE__ */ s("tr", { children: e.map((e) => {
972
- let t = !O(e.iso, u, d);
973
- return /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s("button", {
967
+ }, t)) }) }), /* @__PURE__ */ m("tbody", { children: L(X.year, X.month, x).map((e, t) => /* @__PURE__ */ m("tr", { children: e.map((e) => {
968
+ let t = !F(e.iso, a, o);
969
+ return /* @__PURE__ */ m("td", { children: /* @__PURE__ */ m("button", {
974
970
  type: "button",
975
971
  className: "ds-wpicker-day",
976
972
  "data-iso": e.iso,
977
973
  "data-outside": e.outside,
978
- "data-today": e.iso === _e,
979
- "aria-selected": e.iso === Y,
974
+ "data-today": e.iso === ve,
975
+ "aria-selected": e.iso === q,
980
976
  "aria-disabled": t || void 0,
981
- "aria-label": F(e.iso, y),
982
- tabIndex: e.iso === X ? 0 : -1,
977
+ "aria-label": V(e.iso, b),
978
+ tabIndex: e.iso === Y ? 0 : -1,
983
979
  onClick: () => {
984
- t || (se(e.iso), we(e.iso));
980
+ t || (J(e.iso), Te(e.iso));
985
981
  },
986
982
  children: e.day
987
983
  }) }, e.iso);
988
984
  }) }, t)) })]
989
985
  }),
990
- J === "months" && /* @__PURE__ */ s("div", {
986
+ K === "months" && /* @__PURE__ */ m("div", {
991
987
  className: "ds-wpicker-list",
992
988
  role: "listbox",
993
989
  "aria-label": "Meses",
994
- onKeyDown: Ee,
995
- children: pe.map((e, t) => /* @__PURE__ */ c("button", {
990
+ onKeyDown: De,
991
+ children: me.map((e, t) => /* @__PURE__ */ h("button", {
996
992
  type: "button",
997
993
  role: "option",
998
994
  className: "ds-wpicker-option",
999
- "aria-selected": t === Z.month,
1000
- tabIndex: t === Z.month ? 0 : -1,
1001
- onClick: () => Ae({
1002
- year: Z.year,
995
+ "aria-selected": t === X.month,
996
+ tabIndex: t === X.month ? 0 : -1,
997
+ onClick: () => je({
998
+ year: X.year,
1003
999
  month: t
1004
1000
  }),
1005
- children: [/* @__PURE__ */ s(ae, {}), e]
1001
+ children: [/* @__PURE__ */ m(le, {}), e]
1006
1002
  }, e))
1007
1003
  }),
1008
- J === "years" && /* @__PURE__ */ s("div", {
1004
+ K === "years" && /* @__PURE__ */ m("div", {
1009
1005
  className: "ds-wpicker-list",
1010
1006
  role: "listbox",
1011
1007
  "aria-label": "Años",
1012
- onKeyDown: Ee,
1013
- children: Fe.map((e) => /* @__PURE__ */ c("button", {
1008
+ onKeyDown: De,
1009
+ children: Ie.map((e) => /* @__PURE__ */ h("button", {
1014
1010
  type: "button",
1015
1011
  role: "option",
1016
1012
  className: "ds-wpicker-option",
1017
- "aria-selected": e === Z.year,
1018
- tabIndex: e === Z.year ? 0 : -1,
1019
- onClick: () => Ae({
1013
+ "aria-selected": e === X.year,
1014
+ tabIndex: e === X.year ? 0 : -1,
1015
+ onClick: () => je({
1020
1016
  year: e,
1021
- month: Z.month
1017
+ month: X.month
1022
1018
  }),
1023
- children: [/* @__PURE__ */ s(ae, {}), e]
1019
+ children: [/* @__PURE__ */ m(le, {}), e]
1024
1020
  }, e))
1025
1021
  }),
1026
- /* @__PURE__ */ c("div", {
1022
+ /* @__PURE__ */ h("div", {
1027
1023
  className: "ds-wpicker-actions",
1028
- children: [/* @__PURE__ */ s("button", {
1024
+ children: [/* @__PURE__ */ m("button", {
1029
1025
  type: "button",
1030
1026
  className: "ds-wpicker-action",
1031
- onClick: () => Ce(),
1032
- children: x
1033
- }), /* @__PURE__ */ s("button", {
1027
+ onClick: () => we(),
1028
+ children: S
1029
+ }), /* @__PURE__ */ m("button", {
1034
1030
  type: "button",
1035
1031
  className: "ds-wpicker-action",
1036
1032
  onClick: () => {
1037
- Y && be(Y), Ce();
1033
+ q && xe(q), we();
1038
1034
  },
1039
- children: S
1035
+ children: C
1040
1036
  })]
1041
1037
  })
1042
1038
  ]
1043
1039
  })]
1044
1040
  }),
1045
- p && /* @__PURE__ */ s("small", {
1046
- id: ee,
1047
- children: p
1041
+ u && /* @__PURE__ */ m("small", {
1042
+ id: O,
1043
+ children: u
1048
1044
  }),
1049
- _ && /* @__PURE__ */ s("input", {
1045
+ v && /* @__PURE__ */ m("input", {
1050
1046
  type: "hidden",
1051
- name: _,
1052
- value: V
1047
+ name: v,
1048
+ value: H
1053
1049
  })
1054
1050
  ]
1055
1051
  });
1056
1052
  }
1057
1053
  //#endregion
1058
1054
  //#region src/wari/WariTimeField.tsx
1059
- var Ee = 256, De = Ee / 2, Oe = 100, ke = [
1055
+ var Ne = 256, Pe = Ne / 2, Fe = 100, Ie = [
1060
1056
  12,
1061
1057
  1,
1062
1058
  2,
@@ -1069,7 +1065,7 @@ var Ee = 256, De = Ee / 2, Oe = 100, ke = [
1069
1065
  9,
1070
1066
  10,
1071
1067
  11
1072
- ], Ae = [
1068
+ ], Le = [
1073
1069
  0,
1074
1070
  5,
1075
1071
  10,
@@ -1083,282 +1079,279 @@ var Ee = 256, De = Ee / 2, Oe = 100, ke = [
1083
1079
  50,
1084
1080
  55
1085
1081
  ];
1086
- function je({ label: n, value: r, defaultValue: o = "", onChange: l, placeholder: u = "hh:mm", supportingText: d, error: f = !1, required: p, disabled: m = !1, name: h, id: g, title: _ = "Selecciona la hora", cancelLabel: v = "Cancelar", okLabel: y = "Aceptar", align: b = "start", className: x }) {
1087
- let S = t(), C = g ?? S, w = `${C}-hint`, [T, E] = a(o), D = r ?? T, [O, k] = a(""), [A, j] = a(!1), [M, N] = a(!1), [P, F] = a(12), [U, ne] = a(0), [W, ie] = a("AM"), [G, ae] = a("hour"), [q, J] = a("dial"), oe = i(null), Y = i(null), se = i(null), X = i(null), ce = i(!1), Z = A ? O : z(D), Q = (e) => {
1088
- r === void 0 && E(e), e !== D && l?.(e);
1089
- }, le = () => {
1090
- if (m) return;
1091
- let e = I(D) ?? {
1082
+ function Re({ label: e, value: t, defaultValue: n = "", onChange: r, placeholder: a = "hh:mm", supportingText: o, error: l = !1, required: u, disabled: p = !1, name: g, id: _, title: v = "Selecciona la hora", cancelLabel: y = "Cancelar", okLabel: b = "Aceptar", align: x = "start", className: S }) {
1083
+ let C = c(), w = _ ?? C, T = `${w}-hint`, [E, D] = f(n), O = t ?? E, [k, A] = f(""), [j, M] = f(!1), [N, P] = f(!1), [F, I] = f(12), [L, R] = f(0), [ee, z] = f("AM"), [B, V] = f("hour"), [q, ae] = f("dial"), oe = d(null), se = d(null), ce = d(null), le = d(null), ue = d(!1), X = j ? k : re(O), Z = (e) => {
1084
+ t === void 0 && D(e), e !== O && r?.(e);
1085
+ }, Q = () => {
1086
+ if (p) return;
1087
+ let e = H(O) ?? {
1092
1088
  hours: 12,
1093
1089
  minutes: 0
1094
- }, t = R(e.hours);
1095
- F(t.hour), ne(e.minutes), ie(t.period), ae("hour"), N(!0);
1096
- }, ue = (e = !0) => {
1097
- N(!1), e && Y.current?.focus();
1098
- }, de = () => {
1099
- Q(L(ee(P, W), U)), ue();
1090
+ }, t = te(e.hours);
1091
+ I(t.hour), R(e.minutes), z(t.period), V("hour"), P(!0);
1092
+ }, de = (e = !0) => {
1093
+ P(!1), e && se.current?.focus();
1094
+ }, fe = () => {
1095
+ Z(U(ne(F, ee), L)), de();
1100
1096
  };
1101
- e(() => {
1102
- if (!M) return;
1103
- se.current?.focus(), se.current?.select();
1097
+ s(() => {
1098
+ if (!N) return;
1099
+ ce.current?.focus(), ce.current?.select();
1104
1100
  let e = (e) => {
1105
- oe.current?.contains(e.target) || N(!1);
1101
+ oe.current?.contains(e.target) || P(!1);
1106
1102
  };
1107
1103
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1108
- }, [M]);
1104
+ }, [N]);
1109
1105
  let $ = () => {
1110
- if (j(!1), !O.trim()) {
1111
- Q("");
1106
+ if (M(!1), !k.trim()) {
1107
+ Z("");
1112
1108
  return;
1113
1109
  }
1114
- let e = B(O);
1115
- e && Q(e);
1116
- }, fe = (e) => {
1117
- let t = e.currentTarget.getBoundingClientRect(), n = Ee / t.width, r = H((e.clientX - t.left) * n, (e.clientY - t.top) * n, De, G);
1118
- G === "hour" ? F(r) : ne(r);
1119
- }, pe = (e, t) => {
1120
- let n = e.key === "ArrowUp" ? 1 : e.key === "ArrowDown" ? -1 : 0;
1121
- n && (e.preventDefault(), t === "hour" ? F((e) => (e - 1 + n + 12) % 12 + 1) : ne((e) => (e + n + 60) % 60)), e.key === "Enter" && (e.preventDefault(), de());
1110
+ let e = W(k);
1111
+ e && Z(e);
1112
+ }, pe = (e) => {
1113
+ let t = e.currentTarget.getBoundingClientRect(), n = Ne / t.width, r = K((e.clientX - t.left) * n, (e.clientY - t.top) * n, Pe, B);
1114
+ B === "hour" ? I(r) : R(r);
1122
1115
  }, me = (e, t) => {
1116
+ let n = e.key === "ArrowUp" ? 1 : e.key === "ArrowDown" ? -1 : 0;
1117
+ n && (e.preventDefault(), t === "hour" ? I((e) => (e - 1 + n + 12) % 12 + 1) : R((e) => (e + n + 60) % 60)), e.key === "Enter" && (e.preventDefault(), fe());
1118
+ }, he = (e, t) => {
1123
1119
  let n = e.replace(/\D/g, "").slice(-2);
1124
1120
  if (!n) return;
1125
1121
  let r = Number(n);
1126
- t === "hour" ? (r >= 1 && r <= 12 ? F(r) : r > 12 && Number(n.slice(-1)) >= 1 && F(Number(n.slice(-1))), (n.length === 2 || r > 1) && (ae("minute"), X.current?.focus(), X.current?.select())) : ne(r <= 59 ? r : Number(n.slice(-1)));
1127
- }, he = (e) => {
1122
+ t === "hour" ? (r >= 1 && r <= 12 ? I(r) : r > 12 && Number(n.slice(-1)) >= 1 && I(Number(n.slice(-1))), (n.length === 2 || r > 1) && (V("minute"), le.current?.focus(), le.current?.select())) : R(r <= 59 ? r : Number(n.slice(-1)));
1123
+ }, ge = (e) => {
1128
1124
  let t = e.relatedTarget;
1129
- M && t && !oe.current?.contains(t) && N(!1);
1130
- }, ge = G === "hour" ? P : U, _e = G === "hour" ? P % 12 * 30 : U * 6, ve = G === "hour" ? ke : Ae;
1131
- return /* @__PURE__ */ c("div", {
1125
+ N && t && !oe.current?.contains(t) && P(!1);
1126
+ }, _e = B === "hour" ? F : L, ve = B === "hour" ? F % 12 * 30 : L * 6, ye = B === "hour" ? Ie : Le;
1127
+ return /* @__PURE__ */ h("div", {
1132
1128
  ref: oe,
1133
1129
  className: [
1134
1130
  "ds-input",
1135
1131
  "ds-wfield",
1136
- x
1132
+ S
1137
1133
  ].filter(Boolean).join(" "),
1138
- "data-open": M,
1139
- "data-error": f,
1140
- "data-disabled": m,
1141
- "data-align": b,
1142
- onBlur: he,
1134
+ "data-open": N,
1135
+ "data-error": l,
1136
+ "data-disabled": p,
1137
+ "data-align": x,
1138
+ onBlur: ge,
1143
1139
  children: [
1144
- n && /* @__PURE__ */ c("label", {
1145
- htmlFor: C,
1146
- children: [n, p && /* @__PURE__ */ s("span", {
1147
- className: "ds-input-required",
1148
- "aria-hidden": "true",
1149
- children: "*"
1150
- })]
1140
+ e && /* @__PURE__ */ m(i, {
1141
+ htmlFor: w,
1142
+ required: u,
1143
+ children: e
1151
1144
  }),
1152
- /* @__PURE__ */ c("div", {
1145
+ /* @__PURE__ */ h("div", {
1153
1146
  className: "ds-wfield-anchor",
1154
- children: [/* @__PURE__ */ c("div", {
1147
+ children: [/* @__PURE__ */ h("div", {
1155
1148
  className: "ds-input-shell",
1156
- children: [/* @__PURE__ */ s("input", {
1157
- id: C,
1149
+ children: [/* @__PURE__ */ m("input", {
1150
+ id: w,
1158
1151
  type: "text",
1159
1152
  autoComplete: "off",
1160
- placeholder: u,
1161
- value: Z,
1162
- disabled: m,
1163
- required: p,
1164
- "aria-invalid": f || void 0,
1165
- "aria-describedby": d ? w : void 0,
1153
+ placeholder: a,
1154
+ value: X,
1155
+ disabled: p,
1156
+ required: u,
1157
+ "aria-invalid": l || void 0,
1158
+ "aria-describedby": o ? T : void 0,
1166
1159
  onChange: (e) => {
1167
- j(!0), k(e.target.value);
1160
+ M(!0), A(e.target.value);
1168
1161
  },
1169
1162
  onFocus: () => {
1170
- j(!0), k(z(D));
1163
+ M(!0), A(re(O));
1171
1164
  },
1172
1165
  onBlur: $,
1173
1166
  onKeyDown: (e) => {
1174
- e.key === "Enter" && (e.preventDefault(), $()), e.key === "ArrowDown" && (e.altKey || !M) && (e.preventDefault(), $(), le());
1167
+ e.key === "Enter" && (e.preventDefault(), $()), e.key === "ArrowDown" && (e.altKey || !N) && (e.preventDefault(), $(), Q());
1175
1168
  }
1176
- }), /* @__PURE__ */ s("button", {
1177
- ref: Y,
1169
+ }), /* @__PURE__ */ m("button", {
1170
+ ref: se,
1178
1171
  type: "button",
1179
1172
  className: "ds-wfield-trigger",
1180
- disabled: m,
1181
- "aria-label": `Elegir hora${D ? `, ${z(D)}` : ""}`,
1173
+ disabled: p,
1174
+ "aria-label": `Elegir hora${O ? `, ${re(O)}` : ""}`,
1182
1175
  "aria-haspopup": "dialog",
1183
- "aria-expanded": M,
1184
- onClick: () => M ? ue() : le(),
1185
- children: /* @__PURE__ */ s(re, {})
1176
+ "aria-expanded": N,
1177
+ onClick: () => N ? de() : Q(),
1178
+ children: /* @__PURE__ */ m(J, {})
1186
1179
  })]
1187
- }), M && /* @__PURE__ */ c("div", {
1180
+ }), N && /* @__PURE__ */ h("div", {
1188
1181
  className: "ds-wpicker",
1189
1182
  "data-kind": "time",
1190
1183
  "data-input": q,
1191
1184
  role: "dialog",
1192
- "aria-label": _,
1185
+ "aria-label": v,
1193
1186
  onKeyDown: (e) => {
1194
- e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), ue());
1187
+ e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), de());
1195
1188
  },
1196
1189
  children: [
1197
- /* @__PURE__ */ s("div", {
1190
+ /* @__PURE__ */ m("div", {
1198
1191
  className: "ds-wpicker-title",
1199
- children: _
1192
+ children: v
1200
1193
  }),
1201
- /* @__PURE__ */ c("div", {
1194
+ /* @__PURE__ */ h("div", {
1202
1195
  className: "ds-wtime-body",
1203
- children: [/* @__PURE__ */ c("div", {
1196
+ children: [/* @__PURE__ */ h("div", {
1204
1197
  className: "ds-wtime-inputs",
1205
- children: [/* @__PURE__ */ c("div", {
1198
+ children: [/* @__PURE__ */ h("div", {
1206
1199
  className: "ds-wtime-fields",
1207
1200
  children: [
1208
- /* @__PURE__ */ s("input", {
1209
- ref: se,
1201
+ /* @__PURE__ */ m("input", {
1202
+ ref: ce,
1210
1203
  className: "ds-wtime-box",
1211
1204
  inputMode: "numeric",
1212
1205
  "aria-label": "Hora",
1213
- "data-active": G === "hour",
1214
- value: te(P),
1206
+ "data-active": B === "hour",
1207
+ value: ie(F),
1215
1208
  onFocus: (e) => {
1216
- ae("hour"), e.currentTarget.select();
1209
+ V("hour"), e.currentTarget.select();
1217
1210
  },
1218
- onChange: (e) => me(e.target.value, "hour"),
1219
- onKeyDown: (e) => pe(e, "hour")
1211
+ onChange: (e) => he(e.target.value, "hour"),
1212
+ onKeyDown: (e) => me(e, "hour")
1220
1213
  }),
1221
- /* @__PURE__ */ s("span", {
1214
+ /* @__PURE__ */ m("span", {
1222
1215
  className: "ds-wtime-sep",
1223
1216
  "aria-hidden": "true",
1224
1217
  children: ":"
1225
1218
  }),
1226
- /* @__PURE__ */ s("input", {
1227
- ref: X,
1219
+ /* @__PURE__ */ m("input", {
1220
+ ref: le,
1228
1221
  className: "ds-wtime-box",
1229
1222
  inputMode: "numeric",
1230
1223
  "aria-label": "Minutos",
1231
- "data-active": G === "minute",
1232
- value: te(U),
1224
+ "data-active": B === "minute",
1225
+ value: ie(L),
1233
1226
  onFocus: (e) => {
1234
- ae("minute"), e.currentTarget.select();
1227
+ V("minute"), e.currentTarget.select();
1235
1228
  },
1236
- onChange: (e) => me(e.target.value, "minute"),
1237
- onKeyDown: (e) => pe(e, "minute")
1229
+ onChange: (e) => he(e.target.value, "minute"),
1230
+ onKeyDown: (e) => me(e, "minute")
1238
1231
  })
1239
1232
  ]
1240
- }), /* @__PURE__ */ s("div", {
1233
+ }), /* @__PURE__ */ m("div", {
1241
1234
  className: "ds-wtime-period",
1242
1235
  role: "group",
1243
1236
  "aria-label": "AM o PM",
1244
- children: ["AM", "PM"].map((e) => /* @__PURE__ */ s("button", {
1237
+ children: ["AM", "PM"].map((e) => /* @__PURE__ */ m("button", {
1245
1238
  type: "button",
1246
- "aria-pressed": W === e,
1247
- onClick: () => ie(e),
1239
+ "aria-pressed": ee === e,
1240
+ onClick: () => z(e),
1248
1241
  children: e
1249
1242
  }, e))
1250
1243
  })]
1251
- }), /* @__PURE__ */ c("div", {
1244
+ }), /* @__PURE__ */ h("div", {
1252
1245
  className: "ds-wtime-dial",
1253
1246
  "aria-hidden": "true",
1254
1247
  onPointerDown: (e) => {
1255
- ce.current = !0, e.currentTarget.setPointerCapture?.(e.pointerId), e.preventDefault(), fe(e);
1248
+ ue.current = !0, e.currentTarget.setPointerCapture?.(e.pointerId), e.preventDefault(), pe(e);
1256
1249
  },
1257
1250
  onPointerMove: (e) => {
1258
- ce.current && fe(e);
1251
+ ue.current && pe(e);
1259
1252
  },
1260
1253
  onPointerUp: () => {
1261
- ce.current = !1, G === "hour" && (ae("minute"), X.current?.focus());
1254
+ ue.current = !1, B === "hour" && (V("minute"), le.current?.focus());
1262
1255
  },
1263
1256
  children: [
1264
- /* @__PURE__ */ s("span", {
1257
+ /* @__PURE__ */ m("span", {
1265
1258
  className: "ds-wtime-hand",
1266
1259
  style: {
1267
- width: Oe,
1268
- transform: `rotate(${_e - 90}deg)`
1260
+ width: Fe,
1261
+ transform: `rotate(${ve - 90}deg)`
1269
1262
  }
1270
1263
  }),
1271
- /* @__PURE__ */ s("span", { className: "ds-wtime-center" }),
1272
- ve.map((e) => {
1273
- let t = V(e, G === "hour" ? 12 : 60, Oe, De);
1274
- return /* @__PURE__ */ s("span", {
1264
+ /* @__PURE__ */ m("span", { className: "ds-wtime-center" }),
1265
+ ye.map((e) => {
1266
+ let t = G(e, B === "hour" ? 12 : 60, Fe, Pe);
1267
+ return /* @__PURE__ */ m("span", {
1275
1268
  className: "ds-wtime-num",
1276
- "data-selected": e === ge,
1269
+ "data-selected": e === _e,
1277
1270
  style: {
1278
- left: `${t.x / Ee * 100}%`,
1279
- top: `${t.y / Ee * 100}%`
1271
+ left: `${t.x / Ne * 100}%`,
1272
+ top: `${t.y / Ne * 100}%`
1280
1273
  },
1281
- children: G === "hour" ? e : te(e)
1274
+ children: B === "hour" ? e : ie(e)
1282
1275
  }, e);
1283
1276
  })
1284
1277
  ]
1285
1278
  })]
1286
1279
  }),
1287
- /* @__PURE__ */ c("div", {
1280
+ /* @__PURE__ */ h("div", {
1288
1281
  className: "ds-wpicker-actions",
1289
1282
  children: [
1290
- /* @__PURE__ */ s("button", {
1283
+ /* @__PURE__ */ m("button", {
1291
1284
  type: "button",
1292
1285
  className: "ds-wpicker-mode",
1293
1286
  "aria-label": q === "dial" ? "Escribir la hora" : "Usar el reloj",
1294
- onClick: () => J(q === "dial" ? "keyboard" : "dial"),
1295
- children: s(q === "dial" ? K : re, {})
1287
+ onClick: () => ae(q === "dial" ? "keyboard" : "dial"),
1288
+ children: m(q === "dial" ? Y : J, {})
1296
1289
  }),
1297
- /* @__PURE__ */ s("span", { className: "ds-wpicker-actions-spacer" }),
1298
- /* @__PURE__ */ s("button", {
1290
+ /* @__PURE__ */ m("span", { className: "ds-wpicker-actions-spacer" }),
1291
+ /* @__PURE__ */ m("button", {
1299
1292
  type: "button",
1300
1293
  className: "ds-wpicker-action",
1301
- onClick: () => ue(),
1302
- children: v
1294
+ onClick: () => de(),
1295
+ children: y
1303
1296
  }),
1304
- /* @__PURE__ */ s("button", {
1297
+ /* @__PURE__ */ m("button", {
1305
1298
  type: "button",
1306
1299
  className: "ds-wpicker-action",
1307
- onClick: de,
1308
- children: y
1300
+ onClick: fe,
1301
+ children: b
1309
1302
  })
1310
1303
  ]
1311
1304
  })
1312
1305
  ]
1313
1306
  })]
1314
1307
  }),
1315
- d && /* @__PURE__ */ s("small", {
1316
- id: w,
1317
- children: d
1308
+ o && /* @__PURE__ */ m("small", {
1309
+ id: T,
1310
+ children: o
1318
1311
  }),
1319
- h && /* @__PURE__ */ s("input", {
1312
+ g && /* @__PURE__ */ m("input", {
1320
1313
  type: "hidden",
1321
- name: h,
1322
- value: D
1314
+ name: g,
1315
+ value: O
1323
1316
  })
1324
1317
  ]
1325
1318
  });
1326
1319
  }
1327
1320
  //#endregion
1328
1321
  //#region src/wari/WariSchedule.tsx
1329
- function Me({ title: e = "Horario", headingLevel: n = 3, date: r, defaultDate: i, onDateChange: a, time: o, defaultTime: l, onTimeChange: u, dateLabel: d = "Fecha", timeLabel: f = "Hora de recojo", minDate: p, maxDate: m, dateName: h, timeName: g, required: _ = !0, disabled: v, dateError: y, timeError: b, dateSupportingText: x, timeSupportingText: S, locale: C, weekStartsOn: w, className: T }) {
1330
- let E = t(), D = `h${n}`;
1331
- return /* @__PURE__ */ c("section", {
1322
+ function ze({ title: e = "Horario", headingLevel: t = 3, date: n, defaultDate: r, onDateChange: i, time: a, defaultTime: o, onTimeChange: s, dateLabel: l = "Fecha", timeLabel: u = "Hora de recojo", minDate: d, maxDate: f, dateName: p, timeName: g, required: _ = !0, disabled: v, dateError: y, timeError: b, dateSupportingText: x, timeSupportingText: S, locale: C, weekStartsOn: w, className: T }) {
1323
+ let E = c(), D = `h${t}`;
1324
+ return /* @__PURE__ */ h("section", {
1332
1325
  className: ["ds-wschedule", T].filter(Boolean).join(" "),
1333
1326
  "aria-labelledby": E,
1334
- children: [/* @__PURE__ */ c("header", {
1327
+ children: [/* @__PURE__ */ h("header", {
1335
1328
  className: "ds-wschedule-header",
1336
- children: [/* @__PURE__ */ s(re, { size: 24 }), /* @__PURE__ */ s(D, {
1329
+ children: [/* @__PURE__ */ m(J, { size: 24 }), /* @__PURE__ */ m(D, {
1337
1330
  id: E,
1338
1331
  className: "ds-wschedule-title",
1339
1332
  children: e
1340
1333
  })]
1341
- }), /* @__PURE__ */ c("div", {
1334
+ }), /* @__PURE__ */ h("div", {
1342
1335
  className: "ds-wschedule-fields",
1343
- children: [/* @__PURE__ */ s(Te, {
1344
- label: d,
1345
- value: r,
1346
- defaultValue: i,
1347
- onChange: a,
1348
- min: p,
1349
- max: m,
1350
- name: h,
1336
+ children: [/* @__PURE__ */ m(Me, {
1337
+ label: l,
1338
+ value: n,
1339
+ defaultValue: r,
1340
+ onChange: i,
1341
+ min: d,
1342
+ max: f,
1343
+ name: p,
1351
1344
  required: _,
1352
1345
  disabled: v,
1353
1346
  error: y,
1354
1347
  supportingText: x,
1355
1348
  locale: C,
1356
1349
  weekStartsOn: w
1357
- }), /* @__PURE__ */ s(je, {
1358
- label: f,
1359
- value: o,
1360
- defaultValue: l,
1361
- onChange: u,
1350
+ }), /* @__PURE__ */ m(Re, {
1351
+ label: u,
1352
+ value: a,
1353
+ defaultValue: o,
1354
+ onChange: s,
1362
1355
  name: g,
1363
1356
  required: _,
1364
1357
  disabled: v,
@@ -1371,7 +1364,7 @@ function Me({ title: e = "Horario", headingLevel: n = 3, date: r, defaultDate: i
1371
1364
  }
1372
1365
  //#endregion
1373
1366
  //#region src/wari/trip.ts
1374
- var Ne = [
1367
+ var Be = [
1375
1368
  {
1376
1369
  value: "lite",
1377
1370
  label: "Lite",
@@ -1409,7 +1402,7 @@ var Ne = [
1409
1402
  luggageAlt: 10,
1410
1403
  hourlyPrice: 140
1411
1404
  }
1412
- ], Pe = [
1405
+ ], Ve = [
1413
1406
  {
1414
1407
  value: "carseat",
1415
1408
  label: "Carseat",
@@ -1453,7 +1446,7 @@ var Ne = [
1453
1446
  inputMode: "decimal"
1454
1447
  }]
1455
1448
  }
1456
- ], Fe = [
1449
+ ], He = [
1457
1450
  {
1458
1451
  value: "efectivo",
1459
1452
  label: "Efectivo"
@@ -1466,7 +1459,7 @@ var Ne = [
1466
1459
  value: "vale",
1467
1460
  label: "Vale corporativo"
1468
1461
  }
1469
- ], Ie = {
1462
+ ], Ue = {
1470
1463
  service: "lite",
1471
1464
  hourly: !1,
1472
1465
  delivery: !1,
@@ -1476,9 +1469,9 @@ var Ne = [
1476
1469
  extraFields: {},
1477
1470
  vehicles: 1,
1478
1471
  payment: "efectivo"
1479
- }, Le = (e) => `S/${Number.isInteger(e) ? e : e.toFixed(2)}`;
1480
- function Re(e, t) {
1481
- let n = t.hourly && e.hourlyPrice != null ? `Desde ${Le(e.hourlyPrice)}` : null, r = !t.hourly && !t.delivery ? {
1472
+ }, We = (e) => `S/${Number.isInteger(e) ? e : e.toFixed(2)}`;
1473
+ function Ge(e, t) {
1474
+ let n = t.hourly && e.hourlyPrice != null ? `Desde ${We(e.hourlyPrice)}` : null, r = !t.hourly && !t.delivery ? {
1482
1475
  passengers: e.passengers,
1483
1476
  luggage: e.luggage,
1484
1477
  luggageAlt: e.luggageAlt
@@ -1490,10 +1483,10 @@ function Re(e, t) {
1490
1483
  label: i.join(", ")
1491
1484
  };
1492
1485
  }
1493
- function ze(e, t = 1, n = 99) {
1486
+ function Ke(e, t = 1, n = 99) {
1494
1487
  return Number.isFinite(e) ? Math.min(n, Math.max(t, Math.round(e))) : t;
1495
1488
  }
1496
- function Be(e, t, n) {
1489
+ function qe(e, t, n) {
1497
1490
  let r = t.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
1498
1491
  if (!r) return -1;
1499
1492
  let i = e.length;
@@ -1503,16 +1496,16 @@ function Be(e, t, n) {
1503
1496
  }
1504
1497
  return -1;
1505
1498
  }
1506
- function Ve(e, t, n = Pe) {
1499
+ function Je(e, t, n = Ve) {
1507
1500
  let r = new Set(e);
1508
1501
  return r.has(t) ? r.delete(t) : r.add(t), n.filter((e) => r.has(e.value)).map((e) => e.value);
1509
1502
  }
1510
- function He(e, t, n = Pe) {
1503
+ function Ye(e, t, n = Ve) {
1511
1504
  let r = {};
1512
- for (let i of n) i.maxQuantity && e.includes(i.value) && (r[i.value] = ze(t[i.value] ?? 1, 1, i.maxQuantity));
1505
+ for (let i of n) i.maxQuantity && e.includes(i.value) && (r[i.value] = Ke(t[i.value] ?? 1, 1, i.maxQuantity));
1513
1506
  return r;
1514
1507
  }
1515
- function Ue(e, t, n = Pe) {
1508
+ function Xe(e, t, n = Ve) {
1516
1509
  let r = {};
1517
1510
  for (let i of n) {
1518
1511
  if (!i.choices?.length || !e.includes(i.value)) continue;
@@ -1521,181 +1514,178 @@ function Ue(e, t, n = Pe) {
1521
1514
  }
1522
1515
  return r;
1523
1516
  }
1524
- function We(e, t, n = Pe) {
1517
+ function Ze(e, t, n = Ve) {
1525
1518
  let r = {};
1526
1519
  for (let i of n) i.fields?.length && e.includes(i.value) && (r[i.value] = Object.fromEntries(i.fields.map((e) => [e.name, t[i.value]?.[e.name] ?? ""])));
1527
1520
  return r;
1528
1521
  }
1529
- function Ge(e, t = {}, n = Pe) {
1530
- let r = Ue(e, t.extraChoices ?? {}, n), i = He(e, t.extraQuantities ?? {}, n);
1522
+ function Qe(e, t = {}, n = Ve) {
1523
+ let r = Xe(e, t.extraChoices ?? {}, n), i = Ye(e, t.extraQuantities ?? {}, n);
1531
1524
  for (let [e, t] of Object.entries(r)) i[e] = t.length;
1532
1525
  return {
1533
1526
  extraQuantities: i,
1534
1527
  extraChoices: r,
1535
- extraFields: We(e, t.extraFields ?? {}, n)
1528
+ extraFields: Ze(e, t.extraFields ?? {}, n)
1536
1529
  };
1537
1530
  }
1538
1531
  //#endregion
1539
1532
  //#region src/wari/WariSelect.tsx
1540
- function Ke({ label: n, "aria-label": r, options: o, value: l, defaultValue: u = "", onChange: d, placeholder: f = "Seleccionar", supportingText: p, error: m = !1, required: h, disabled: g = !1, name: _, id: v, className: y }) {
1541
- let b = t(), x = v ?? b, S = `${x}-label`, C = `${x}-value`, w = `${x}-listbox`, T = `${x}-hint`, [E, D] = a(u), O = l ?? E, [k, A] = a(!1), [j, M] = a(0), N = i(null), P = i(null), F = i({
1533
+ function $e({ label: e, "aria-label": t, options: n, value: r, defaultValue: a = "", onChange: o, placeholder: l = "Seleccionar", supportingText: u, error: p = !1, required: g, disabled: _ = !1, name: v, id: y, className: b }) {
1534
+ let x = c(), S = y ?? x, C = `${S}-label`, w = `${S}-value`, T = `${S}-listbox`, E = `${S}-hint`, [D, O] = f(a), k = r ?? D, [A, j] = f(!1), [M, N] = f(0), P = d(null), F = d(null), I = d({
1542
1535
  text: "",
1543
1536
  at: 0
1544
- }), I = o.findIndex((e) => e.value === O), L = o[I], R = (e) => !!o[e] && !o[e].disabled, ee = (e) => {
1545
- let t = o[e];
1546
- t && !t.disabled && (l === void 0 && D(t.value), t.value !== O && d?.(t.value));
1547
- }, z = (e) => {
1548
- g || (M(Math.max(0, e)), A(!0));
1549
- }, B = (e, t) => {
1550
- let n = e;
1551
- for (let e = 0; e < o.length; e++) {
1552
- if (n = Math.min(o.length - 1, Math.max(0, n + t)), R(n)) return n;
1553
- if (n === 0 || n === o.length - 1) break;
1537
+ }), L = n.findIndex((e) => e.value === k), R = n[L], ee = (e) => !!n[e] && !n[e].disabled, z = (e) => {
1538
+ let t = n[e];
1539
+ t && !t.disabled && (r === void 0 && O(t.value), t.value !== k && o?.(t.value));
1540
+ }, B = (e) => {
1541
+ _ || (N(Math.max(0, e)), j(!0));
1542
+ }, V = (e, t) => {
1543
+ let r = e;
1544
+ for (let e = 0; e < n.length; e++) {
1545
+ if (r = Math.min(n.length - 1, Math.max(0, r + t)), ee(r)) return r;
1546
+ if (r === 0 || r === n.length - 1) break;
1554
1547
  }
1555
1548
  return e;
1556
1549
  };
1557
- return e(() => {
1558
- if (!k) return;
1559
- document.getElementById(`${x}-option-${j}`)?.scrollIntoView?.({ block: "nearest" });
1550
+ return s(() => {
1551
+ if (!A) return;
1552
+ document.getElementById(`${S}-option-${M}`)?.scrollIntoView?.({ block: "nearest" });
1560
1553
  let e = (e) => {
1561
- N.current?.contains(e.target) || A(!1);
1554
+ P.current?.contains(e.target) || j(!1);
1562
1555
  };
1563
1556
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1564
1557
  }, [
1565
- k,
1566
- j,
1567
- x
1568
- ]), /* @__PURE__ */ c("div", {
1569
- ref: N,
1558
+ A,
1559
+ M,
1560
+ S
1561
+ ]), /* @__PURE__ */ h("div", {
1562
+ ref: P,
1570
1563
  className: [
1571
1564
  "ds-input",
1572
1565
  "ds-wfield",
1573
1566
  "ds-wselect",
1574
- y
1567
+ b
1575
1568
  ].filter(Boolean).join(" "),
1576
- "data-open": k,
1577
- "data-error": m,
1578
- "data-disabled": g,
1569
+ "data-open": A,
1570
+ "data-error": p,
1571
+ "data-disabled": _,
1579
1572
  "data-label": "lg",
1580
1573
  onBlur: (e) => {
1581
1574
  let t = e.relatedTarget;
1582
- k && t && !N.current?.contains(t) && A(!1);
1575
+ A && t && !P.current?.contains(t) && j(!1);
1583
1576
  },
1584
1577
  children: [
1585
- n && /* @__PURE__ */ c("label", {
1586
- id: S,
1587
- onClick: () => P.current?.focus(),
1588
- children: [n, h && /* @__PURE__ */ s("span", {
1589
- className: "ds-input-required",
1590
- "aria-hidden": "true",
1591
- children: "*"
1592
- })]
1578
+ e && /* @__PURE__ */ m(i, {
1579
+ id: C,
1580
+ required: g,
1581
+ onClick: () => F.current?.focus(),
1582
+ children: e
1593
1583
  }),
1594
- /* @__PURE__ */ c("div", {
1584
+ /* @__PURE__ */ h("div", {
1595
1585
  className: "ds-wfield-anchor",
1596
- children: [/* @__PURE__ */ c("div", {
1597
- ref: P,
1586
+ children: [/* @__PURE__ */ h("div", {
1587
+ ref: F,
1598
1588
  className: "ds-input-shell",
1599
1589
  role: "combobox",
1600
- tabIndex: g ? -1 : 0,
1590
+ tabIndex: _ ? -1 : 0,
1601
1591
  "aria-haspopup": "listbox",
1602
- "aria-expanded": k,
1603
- "aria-controls": w,
1604
- "aria-labelledby": n ? `${S} ${C}` : void 0,
1605
- "aria-label": n ? void 0 : r,
1606
- "aria-activedescendant": k ? `${x}-option-${j}` : void 0,
1607
- "aria-disabled": g || void 0,
1608
- "aria-required": h || void 0,
1609
- "aria-invalid": m || void 0,
1610
- "aria-describedby": p ? T : void 0,
1611
- onClick: () => k ? A(!1) : z(I >= 0 ? I : 0),
1592
+ "aria-expanded": A,
1593
+ "aria-controls": T,
1594
+ "aria-labelledby": e ? `${C} ${w}` : void 0,
1595
+ "aria-label": e ? void 0 : t,
1596
+ "aria-activedescendant": A ? `${S}-option-${M}` : void 0,
1597
+ "aria-disabled": _ || void 0,
1598
+ "aria-required": g || void 0,
1599
+ "aria-invalid": p || void 0,
1600
+ "aria-describedby": u ? E : void 0,
1601
+ onClick: () => A ? j(!1) : B(L >= 0 ? L : 0),
1612
1602
  onKeyDown: (e) => {
1613
- if (g) return;
1614
- let t = I >= 0 ? I : 0;
1603
+ if (_) return;
1604
+ let t = L >= 0 ? L : 0;
1615
1605
  switch (e.key) {
1616
1606
  case "ArrowDown":
1617
- e.preventDefault(), k ? M(B(j, 1)) : z(t);
1607
+ e.preventDefault(), A ? N(V(M, 1)) : B(t);
1618
1608
  return;
1619
1609
  case "ArrowUp":
1620
- e.preventDefault(), k ? M(B(j, -1)) : z(t);
1610
+ e.preventDefault(), A ? N(V(M, -1)) : B(t);
1621
1611
  return;
1622
1612
  case "Home":
1623
- e.preventDefault(), z(B(-1, 1));
1613
+ e.preventDefault(), B(V(-1, 1));
1624
1614
  return;
1625
1615
  case "End":
1626
- e.preventDefault(), z(B(o.length, -1));
1616
+ e.preventDefault(), B(V(n.length, -1));
1627
1617
  return;
1628
1618
  case "PageDown":
1629
1619
  case "PageUp":
1630
- k && (e.preventDefault(), M(B(j, e.key === "PageDown" ? 10 : -10)));
1620
+ A && (e.preventDefault(), N(V(M, e.key === "PageDown" ? 10 : -10)));
1631
1621
  return;
1632
1622
  case "Enter":
1633
1623
  case " ":
1634
- e.preventDefault(), k ? (ee(j), A(!1)) : z(t);
1624
+ e.preventDefault(), A ? (z(M), j(!1)) : B(t);
1635
1625
  return;
1636
1626
  case "Escape":
1637
- k && (e.preventDefault(), A(!1));
1627
+ A && (e.preventDefault(), j(!1));
1638
1628
  return;
1639
1629
  case "Tab":
1640
- k && (ee(j), A(!1));
1630
+ A && (z(M), j(!1));
1641
1631
  return;
1642
1632
  }
1643
1633
  if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
1644
- let n = Date.now();
1645
- F.current = {
1646
- text: n - F.current.at < 600 ? F.current.text + e.key : e.key,
1647
- at: n
1634
+ let r = Date.now();
1635
+ I.current = {
1636
+ text: r - I.current.at < 600 ? I.current.text + e.key : e.key,
1637
+ at: r
1648
1638
  };
1649
- let r = k ? j : t, i = Be(o, F.current.text, F.current.text.length > 1 ? r - 1 : r);
1650
- i >= 0 && (k ? M(i) : z(i));
1639
+ let i = A ? M : t, a = qe(n, I.current.text, I.current.text.length > 1 ? i - 1 : i);
1640
+ a >= 0 && (A ? N(a) : B(a));
1651
1641
  }
1652
1642
  },
1653
1643
  children: [
1654
- /* @__PURE__ */ c("span", {
1655
- id: C,
1644
+ /* @__PURE__ */ h("span", {
1645
+ id: w,
1656
1646
  className: "ds-wselect-value",
1657
- "data-placeholder": !L,
1658
- children: [L ? L.label : f, L?.metaLabel && /* @__PURE__ */ c("span", {
1647
+ "data-placeholder": !R,
1648
+ children: [R ? R.label : l, R?.metaLabel && /* @__PURE__ */ h("span", {
1659
1649
  className: "ds-wvisually-hidden",
1660
- children: [", ", L.metaLabel]
1650
+ children: [", ", R.metaLabel]
1661
1651
  })]
1662
1652
  }),
1663
- L?.meta && /* @__PURE__ */ s("span", {
1653
+ R?.meta && /* @__PURE__ */ m("span", {
1664
1654
  "aria-hidden": "true",
1665
1655
  style: { display: "contents" },
1666
- children: L.meta
1656
+ children: R.meta
1667
1657
  }),
1668
- /* @__PURE__ */ s("span", {
1658
+ /* @__PURE__ */ m("span", {
1669
1659
  className: "ds-wselect-caret",
1670
1660
  "aria-hidden": "true",
1671
- children: /* @__PURE__ */ s(J, {})
1661
+ children: /* @__PURE__ */ m(X, {})
1672
1662
  })
1673
1663
  ]
1674
- }), k && /* @__PURE__ */ s("ul", {
1675
- id: w,
1664
+ }), A && /* @__PURE__ */ m("ul", {
1665
+ id: T,
1676
1666
  className: "ds-wselect-list",
1677
1667
  role: "listbox",
1678
- "aria-labelledby": n ? S : void 0,
1679
- "aria-label": n ? void 0 : r,
1680
- children: o.map((e, t) => /* @__PURE__ */ c("li", {
1681
- id: `${x}-option-${t}`,
1668
+ "aria-labelledby": e ? C : void 0,
1669
+ "aria-label": e ? void 0 : t,
1670
+ children: n.map((e, t) => /* @__PURE__ */ h("li", {
1671
+ id: `${S}-option-${t}`,
1682
1672
  role: "option",
1683
1673
  className: "ds-wselect-option",
1684
- "aria-selected": e.value === O,
1674
+ "aria-selected": e.value === k,
1685
1675
  "aria-disabled": e.disabled || void 0,
1686
- "data-active": t === j,
1676
+ "data-active": t === M,
1687
1677
  "aria-label": e.metaLabel ? `${e.label}, ${e.metaLabel}` : void 0,
1688
1678
  onMouseDown: (e) => e.preventDefault(),
1689
1679
  onMouseMove: () => {
1690
- t !== j && !e.disabled && M(t);
1680
+ t !== M && !e.disabled && N(t);
1691
1681
  },
1692
1682
  onClick: () => {
1693
- e.disabled || (ee(t), A(!1), P.current?.focus());
1683
+ e.disabled || (z(t), j(!1), F.current?.focus());
1694
1684
  },
1695
- children: [/* @__PURE__ */ s("span", {
1685
+ children: [/* @__PURE__ */ m("span", {
1696
1686
  className: "ds-wselect-label",
1697
1687
  children: e.label
1698
- }), e.meta && /* @__PURE__ */ s("span", {
1688
+ }), e.meta && /* @__PURE__ */ m("span", {
1699
1689
  "aria-hidden": "true",
1700
1690
  style: { display: "contents" },
1701
1691
  children: e.meta
@@ -1703,66 +1693,66 @@ function Ke({ label: n, "aria-label": r, options: o, value: l, defaultValue: u =
1703
1693
  }, e.value))
1704
1694
  })]
1705
1695
  }),
1706
- p && /* @__PURE__ */ s("small", {
1707
- id: T,
1708
- children: p
1696
+ u && /* @__PURE__ */ m("small", {
1697
+ id: E,
1698
+ children: u
1709
1699
  }),
1710
- _ && /* @__PURE__ */ s("input", {
1700
+ v && /* @__PURE__ */ m("input", {
1711
1701
  type: "hidden",
1712
- name: _,
1713
- value: O
1702
+ name: v,
1703
+ value: k
1714
1704
  })
1715
1705
  ]
1716
1706
  });
1717
1707
  }
1718
1708
  //#endregion
1719
1709
  //#region src/wari/WariStepper.tsx
1720
- function qe({ label: e, "aria-label": n, variant: r = "filled", value: i, defaultValue: o = 1, onChange: l, min: u = 1, max: d = 99, name: f, id: p, disabled: m = !1, supportingText: h, className: g }) {
1721
- let _ = t(), v = p ?? _, [y, b] = a(() => ze(o, u, d)), x = i ?? y, [S, C] = a(null), w = (e) => {
1722
- let t = ze(e, u, d);
1723
- i === void 0 && b(t), t !== x && l?.(t);
1710
+ function et({ label: e, "aria-label": t, variant: n = "filled", value: r, defaultValue: i = 1, onChange: a, min: o = 1, max: s = 99, name: l, id: u, disabled: d = !1, supportingText: p, className: g }) {
1711
+ let _ = c(), v = u ?? _, [y, b] = f(() => Ke(i, o, s)), x = r ?? y, [S, C] = f(null), w = (e) => {
1712
+ let t = Ke(e, o, s);
1713
+ r === void 0 && b(t), t !== x && a?.(t);
1724
1714
  }, T = () => {
1725
1715
  S !== null && (S.trim() && w(Number(S)), C(null));
1726
- }, E = (e ?? n ?? "cantidad").toLowerCase();
1727
- return /* @__PURE__ */ c("div", {
1716
+ }, E = (e ?? t ?? "cantidad").toLowerCase();
1717
+ return /* @__PURE__ */ h("div", {
1728
1718
  className: [
1729
1719
  "ds-input",
1730
1720
  "ds-wfield",
1731
1721
  "ds-wstepper",
1732
1722
  g
1733
1723
  ].filter(Boolean).join(" "),
1734
- "data-disabled": m,
1724
+ "data-disabled": d,
1735
1725
  "data-label": "lg",
1736
- "data-variant": r,
1726
+ "data-variant": n,
1737
1727
  children: [
1738
- e && /* @__PURE__ */ s("label", {
1728
+ e && /* @__PURE__ */ m("label", {
1739
1729
  htmlFor: v,
1740
1730
  children: e
1741
1731
  }),
1742
- /* @__PURE__ */ c("div", {
1732
+ /* @__PURE__ */ h("div", {
1743
1733
  className: "ds-input-shell",
1744
1734
  children: [
1745
- /* @__PURE__ */ s("button", {
1735
+ /* @__PURE__ */ m("button", {
1746
1736
  type: "button",
1747
1737
  className: "ds-wstepper-button",
1748
1738
  "aria-label": `Disminuir ${E}`,
1749
1739
  "aria-controls": v,
1750
- disabled: m || x <= u,
1740
+ disabled: d || x <= o,
1751
1741
  onClick: () => w(x - 1),
1752
- children: /* @__PURE__ */ s(oe, {})
1742
+ children: /* @__PURE__ */ m(Z, {})
1753
1743
  }),
1754
- /* @__PURE__ */ s("input", {
1744
+ /* @__PURE__ */ m("input", {
1755
1745
  id: v,
1756
1746
  type: "text",
1757
1747
  inputMode: "numeric",
1758
1748
  role: "spinbutton",
1759
- name: f,
1760
- disabled: m,
1761
- "aria-label": e ? void 0 : n,
1749
+ name: l,
1750
+ disabled: d,
1751
+ "aria-label": e ? void 0 : t,
1762
1752
  "aria-valuenow": x,
1763
- "aria-valuemin": u,
1764
- "aria-valuemax": d,
1765
- "aria-describedby": h ? `${v}-hint` : void 0,
1753
+ "aria-valuemin": o,
1754
+ "aria-valuemax": s,
1755
+ "aria-describedby": p ? `${v}-hint` : void 0,
1766
1756
  value: S ?? String(x),
1767
1757
  onChange: (e) => C(e.target.value.replace(/\D/g, "")),
1768
1758
  onBlur: T,
@@ -1772,46 +1762,46 @@ function qe({ label: e, "aria-label": n, variant: r = "filled", value: i, defaul
1772
1762
  ArrowDown: x - 1,
1773
1763
  PageUp: x + 10,
1774
1764
  PageDown: x - 10,
1775
- Home: u,
1776
- End: d
1765
+ Home: o,
1766
+ End: s
1777
1767
  };
1778
1768
  e.key in t && (e.preventDefault(), C(null), w(t[e.key])), e.key === "Enter" && (e.preventDefault(), T());
1779
1769
  }
1780
1770
  }),
1781
- /* @__PURE__ */ s("button", {
1771
+ /* @__PURE__ */ m("button", {
1782
1772
  type: "button",
1783
1773
  className: "ds-wstepper-button",
1784
1774
  "aria-label": `Aumentar ${E}`,
1785
1775
  "aria-controls": v,
1786
- disabled: m || x >= d,
1776
+ disabled: d || x >= s,
1787
1777
  onClick: () => w(x + 1),
1788
- children: /* @__PURE__ */ s(Y, {})
1778
+ children: /* @__PURE__ */ m(Q, {})
1789
1779
  })
1790
1780
  ]
1791
1781
  }),
1792
- h && /* @__PURE__ */ s("small", {
1782
+ p && /* @__PURE__ */ m("small", {
1793
1783
  id: `${v}-hint`,
1794
- children: h
1784
+ children: p
1795
1785
  })
1796
1786
  ]
1797
1787
  });
1798
1788
  }
1799
1789
  //#endregion
1800
1790
  //#region src/wari/WariSwitchList.tsx
1801
- function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l, quantities: u, defaultQuantities: d = {}, onQuantitiesChange: f, choices: p, defaultChoices: m = {}, onChoicesChange: h, fields: g, defaultFields: _ = {}, onFieldsChange: v, orientation: y = "vertical", name: b, disabled: x = !1, className: S }) {
1802
- let C = t(), [w, T] = a(i), E = r ?? w, [D] = a(() => Ge(i, {
1803
- extraQuantities: d,
1804
- extraChoices: m,
1791
+ function tt({ legend: e, items: t, value: n, defaultValue: r = [], onChange: i, quantities: a, defaultQuantities: o = {}, onQuantitiesChange: s, choices: l, defaultChoices: u = {}, onChoicesChange: d, fields: g, defaultFields: _ = {}, onFieldsChange: v, orientation: y = "vertical", name: b, disabled: x = !1, className: S }) {
1792
+ let C = c(), [w, T] = f(r), E = n ?? w, [D] = f(() => Qe(r, {
1793
+ extraQuantities: o,
1794
+ extraChoices: u,
1805
1795
  extraFields: _
1806
- }, n)), [O, k] = a(D.extraQuantities), [A, j] = a(D.extraChoices), [M, N] = a(D.extraFields), P = u ?? O, F = p ?? A, I = g ?? M, L = (e, t) => {
1807
- let i = new Set(E);
1808
- t ? i.add(e) : i.delete(e);
1809
- let a = n.filter((e) => i.has(e.value)).map((e) => e.value), o = Ge(a, {
1796
+ }, t)), [O, k] = f(D.extraQuantities), [A, j] = f(D.extraChoices), [M, N] = f(D.extraFields), P = a ?? O, F = l ?? A, I = g ?? M, L = (e, r) => {
1797
+ let o = new Set(E);
1798
+ r ? o.add(e) : o.delete(e);
1799
+ let s = t.filter((e) => o.has(e.value)).map((e) => e.value), c = Qe(s, {
1810
1800
  extraQuantities: P,
1811
1801
  extraChoices: F,
1812
1802
  extraFields: I
1813
- }, n);
1814
- r === void 0 && T(a), u === void 0 && k(o.extraQuantities), p === void 0 && j(o.extraChoices), g === void 0 && N(o.extraFields), l?.(a, o.extraQuantities, o.extraChoices, o.extraFields);
1803
+ }, t);
1804
+ n === void 0 && T(s), a === void 0 && k(c.extraQuantities), l === void 0 && j(c.extraChoices), g === void 0 && N(c.extraFields), i?.(s, c.extraQuantities, c.extraChoices, c.extraFields);
1815
1805
  }, R = (e, t, n) => {
1816
1806
  let r = {
1817
1807
  ...I,
@@ -1826,7 +1816,7 @@ function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l,
1826
1816
  ...P,
1827
1817
  [e]: t
1828
1818
  };
1829
- u === void 0 && k(n), f?.(n);
1819
+ a === void 0 && k(n), s?.(n);
1830
1820
  }, z = (e, t, n) => {
1831
1821
  let r = {
1832
1822
  ...F,
@@ -1835,82 +1825,82 @@ function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l,
1835
1825
  ...P,
1836
1826
  [e]: t.length
1837
1827
  };
1838
- p === void 0 && j(r), u === void 0 && k(i), h?.(r, i), n && requestAnimationFrame(() => {
1828
+ l === void 0 && j(r), a === void 0 && k(i), d?.(r, i), n && requestAnimationFrame(() => {
1839
1829
  let e = document.getElementById(n)?.querySelectorAll("[role=\"combobox\"]");
1840
1830
  e?.[e.length - 1]?.focus();
1841
1831
  });
1842
1832
  };
1843
- return /* @__PURE__ */ c("fieldset", {
1833
+ return /* @__PURE__ */ h("fieldset", {
1844
1834
  className: ["ds-wswitches", S].filter(Boolean).join(" "),
1845
1835
  "data-orientation": y,
1846
1836
  disabled: x,
1847
- children: [/* @__PURE__ */ s("legend", { children: e }), n.map((e, t) => {
1848
- let n = E.includes(e.value), r = !!e.choices?.length, i = !!e.fields?.length, a = !!(e.description || e.note || e.maxQuantity || r || i), l = `${C}-panel-${t}`, u = `${C}-desc-${t}`, d = F[e.value] ?? [], f = e.maxQuantity ?? 1;
1849
- return /* @__PURE__ */ c("div", {
1837
+ children: [/* @__PURE__ */ m("legend", { children: e }), t.map((e, t) => {
1838
+ let n = E.includes(e.value), r = !!e.choices?.length, i = !!e.fields?.length, a = !!(e.description || e.note || e.maxQuantity || r || i), o = `${C}-panel-${t}`, s = `${C}-desc-${t}`, c = F[e.value] ?? [], l = e.maxQuantity ?? 1;
1839
+ return /* @__PURE__ */ h("div", {
1850
1840
  className: "ds-wswitch-item",
1851
- children: [/* @__PURE__ */ c("label", {
1841
+ children: [/* @__PURE__ */ h("label", {
1852
1842
  className: "ds-wswitch",
1853
- children: [/* @__PURE__ */ s("span", { children: e.label }), /* @__PURE__ */ s("input", {
1843
+ children: [/* @__PURE__ */ m("span", { children: e.label }), /* @__PURE__ */ m("input", {
1854
1844
  type: "checkbox",
1855
1845
  role: "switch",
1856
1846
  name: b,
1857
1847
  value: e.value,
1858
1848
  checked: n,
1859
1849
  disabled: e.disabled,
1860
- "aria-controls": a ? l : void 0,
1850
+ "aria-controls": a ? o : void 0,
1861
1851
  "aria-expanded": a ? n : void 0,
1862
- "aria-describedby": a && n && e.description ? u : void 0,
1852
+ "aria-describedby": a && n && e.description ? s : void 0,
1863
1853
  onChange: (t) => L(e.value, t.target.checked)
1864
1854
  })]
1865
- }), a && /* @__PURE__ */ s("div", {
1866
- id: l,
1855
+ }), a && /* @__PURE__ */ m("div", {
1856
+ id: o,
1867
1857
  className: "ds-wswitch-panel",
1868
1858
  hidden: !n,
1869
- children: n && /* @__PURE__ */ c(o, { children: [
1870
- e.description && /* @__PURE__ */ s("p", {
1871
- id: u,
1859
+ children: n && /* @__PURE__ */ h(p, { children: [
1860
+ e.description && /* @__PURE__ */ m("p", {
1861
+ id: s,
1872
1862
  className: "ds-wswitch-desc",
1873
1863
  children: e.description
1874
1864
  }),
1875
- r && /* @__PURE__ */ s("div", {
1865
+ r && /* @__PURE__ */ m("div", {
1876
1866
  className: "ds-wswitch-units",
1877
1867
  role: "group",
1878
1868
  "aria-label": e.label,
1879
- children: d.map((t, n) => /* @__PURE__ */ c("div", {
1869
+ children: c.map((t, n) => /* @__PURE__ */ h("div", {
1880
1870
  className: "ds-wswitch-unit",
1881
1871
  children: [
1882
- /* @__PURE__ */ s(Ke, {
1872
+ /* @__PURE__ */ m($e, {
1883
1873
  "aria-label": `${e.label} ${n + 1}`,
1884
1874
  options: e.choices,
1885
1875
  value: t,
1886
1876
  disabled: x || e.disabled,
1887
1877
  name: b ? `${b}.${e.value}` : void 0,
1888
- onChange: (t) => z(e.value, d.map((e, r) => r === n ? t : e))
1878
+ onChange: (t) => z(e.value, c.map((e, r) => r === n ? t : e))
1889
1879
  }),
1890
- d.length > 1 && /* @__PURE__ */ s("button", {
1880
+ c.length > 1 && /* @__PURE__ */ m("button", {
1891
1881
  type: "button",
1892
1882
  className: "ds-wswitch-unit-button",
1893
1883
  "aria-label": `Quitar ${e.label} ${n + 1}`,
1894
1884
  disabled: x || e.disabled,
1895
- onClick: () => z(e.value, d.filter((e, t) => t !== n), l),
1896
- children: /* @__PURE__ */ s(pe, {})
1885
+ onClick: () => z(e.value, c.filter((e, t) => t !== n), o),
1886
+ children: /* @__PURE__ */ m(be, {})
1897
1887
  }),
1898
- n === d.length - 1 && d.length < f && /* @__PURE__ */ s("button", {
1888
+ n === c.length - 1 && c.length < l && /* @__PURE__ */ m("button", {
1899
1889
  type: "button",
1900
1890
  className: "ds-wswitch-unit-button",
1901
1891
  "aria-label": `Agregar otro ${e.label}`,
1902
1892
  disabled: x || e.disabled,
1903
- onClick: () => z(e.value, [...d, e.choices[0].value], l),
1904
- children: /* @__PURE__ */ s(Y, {})
1893
+ onClick: () => z(e.value, [...c, e.choices[0].value], o),
1894
+ children: /* @__PURE__ */ m(Q, {})
1905
1895
  })
1906
1896
  ]
1907
1897
  }, n))
1908
1898
  }),
1909
- i && /* @__PURE__ */ s("div", {
1899
+ i && /* @__PURE__ */ m("div", {
1910
1900
  className: "ds-wswitch-fields",
1911
1901
  role: "group",
1912
1902
  "aria-label": e.label,
1913
- children: e.fields.map((t) => /* @__PURE__ */ s("input", {
1903
+ children: e.fields.map((t) => /* @__PURE__ */ m("input", {
1914
1904
  className: "ds-wswitch-field",
1915
1905
  type: "text",
1916
1906
  inputMode: t.inputMode ?? "text",
@@ -1925,7 +1915,7 @@ function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l,
1925
1915
  onChange: (n) => R(e.value, t.name, n.target.value)
1926
1916
  }, t.name))
1927
1917
  }),
1928
- !r && e.maxQuantity != null && /* @__PURE__ */ s(qe, {
1918
+ !r && e.maxQuantity != null && /* @__PURE__ */ m(et, {
1929
1919
  "aria-label": `Cantidad de ${e.label}`,
1930
1920
  variant: "outlined",
1931
1921
  min: 1,
@@ -1935,7 +1925,7 @@ function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l,
1935
1925
  name: b ? `${b}.${e.value}` : void 0,
1936
1926
  onChange: (t) => ee(e.value, t)
1937
1927
  }),
1938
- e.note && /* @__PURE__ */ s("p", {
1928
+ e.note && /* @__PURE__ */ m("p", {
1939
1929
  className: "ds-wswitch-note",
1940
1930
  role: "note",
1941
1931
  children: e.note
@@ -1948,36 +1938,36 @@ function Je({ legend: e, items: n, value: r, defaultValue: i = [], onChange: l,
1948
1938
  }
1949
1939
  //#endregion
1950
1940
  //#region src/wari/WariServiceMeta.tsx
1951
- function Ye({ service: e, hourly: t = !1, delivery: n = !1 }) {
1952
- let r = Re(e, {
1941
+ function nt({ service: e, hourly: t = !1, delivery: n = !1 }) {
1942
+ let r = Ge(e, {
1953
1943
  hourly: t,
1954
1944
  delivery: n
1955
1945
  });
1956
- return /* @__PURE__ */ c("span", {
1946
+ return /* @__PURE__ */ h("span", {
1957
1947
  className: "ds-wmeta",
1958
1948
  children: [
1959
- r.delivery && /* @__PURE__ */ s("span", {
1949
+ r.delivery && /* @__PURE__ */ m("span", {
1960
1950
  className: "ds-wmeta-badge",
1961
1951
  children: "Envío"
1962
1952
  }),
1963
- r.price && /* @__PURE__ */ s("span", {
1953
+ r.price && /* @__PURE__ */ m("span", {
1964
1954
  className: "ds-wmeta-item",
1965
1955
  children: r.price
1966
1956
  }),
1967
- r.capacity && /* @__PURE__ */ c(o, { children: [
1968
- /* @__PURE__ */ c("span", {
1957
+ r.capacity && /* @__PURE__ */ h(p, { children: [
1958
+ /* @__PURE__ */ h("span", {
1969
1959
  className: "ds-wmeta-item",
1970
- children: [/* @__PURE__ */ s(X, {}), r.capacity.passengers]
1960
+ children: [/* @__PURE__ */ m(fe, {}), r.capacity.passengers]
1971
1961
  }),
1972
- /* @__PURE__ */ c("span", {
1962
+ /* @__PURE__ */ h("span", {
1973
1963
  className: "ds-wmeta-item",
1974
- children: [/* @__PURE__ */ s(ce, {}), r.capacity.luggage]
1964
+ children: [/* @__PURE__ */ m($, {}), r.capacity.luggage]
1975
1965
  }),
1976
- r.capacity.luggageAlt != null && /* @__PURE__ */ c("span", {
1966
+ r.capacity.luggageAlt != null && /* @__PURE__ */ h("span", {
1977
1967
  className: "ds-wmeta-item",
1978
1968
  children: [
1979
1969
  "o ",
1980
- /* @__PURE__ */ s(Z, {}),
1970
+ /* @__PURE__ */ m(pe, {}),
1981
1971
  r.capacity.luggageAlt
1982
1972
  ]
1983
1973
  })
@@ -1987,17 +1977,17 @@ function Ye({ service: e, hourly: t = !1, delivery: n = !1 }) {
1987
1977
  }
1988
1978
  //#endregion
1989
1979
  //#region src/wari/WariTripAttributes.tsx
1990
- function Xe({ title: e = "Atributos del viaje", headingLevel: n = 3, value: r, defaultValue: i, onChange: o, services: l = Ne, extras: u = Pe, paymentMethods: d = Fe, maxVehicles: f = 10, name: p, disabled: m = !1, serviceLabel: h = "Tipo de servicio", vehiclesLabel: g = "Cantidad de vehículos", paymentLabel: _ = "Método de pago", hourlyLabel: v = "Por horas", deliveryLabel: y = "Envíos", className: b }) {
1991
- let x = t(), [S, C] = a(() => ({
1992
- ...Ie,
1993
- ...i
1994
- })), w = r ?? S, T = (e) => {
1980
+ function rt({ title: e = "Atributos del viaje", headingLevel: t = 3, value: n, defaultValue: r, onChange: i, services: a = Be, extras: o = Ve, paymentMethods: s = He, maxVehicles: l = 10, name: u, disabled: d = !1, serviceLabel: p = "Tipo de servicio", vehiclesLabel: g = "Cantidad de vehículos", paymentLabel: _ = "Método de pago", hourlyLabel: v = "Por horas", deliveryLabel: y = "Envíos", className: b }) {
1981
+ let x = c(), [S, C] = f(() => ({
1982
+ ...Ue,
1983
+ ...r
1984
+ })), w = n ?? S, T = (e) => {
1995
1985
  let t = {
1996
1986
  ...w,
1997
1987
  ...e
1998
1988
  };
1999
- r === void 0 && C(t), o?.(t);
2000
- }, E = (e) => p ? `${p}.${e}` : void 0, D = `h${n}`, O = {
1989
+ n === void 0 && C(t), i?.(t);
1990
+ }, E = (e) => u ? `${u}.${e}` : void 0, D = `h${t}`, O = {
2001
1991
  hourly: w.hourly,
2002
1992
  delivery: w.delivery
2003
1993
  }, k = [{
@@ -2007,46 +1997,46 @@ function Xe({ title: e = "Atributos del viaje", headingLevel: n = 3, value: r, d
2007
1997
  value: "delivery",
2008
1998
  label: y
2009
1999
  }];
2010
- return /* @__PURE__ */ c("section", {
2000
+ return /* @__PURE__ */ h("section", {
2011
2001
  className: [
2012
2002
  "ds-wcard",
2013
2003
  "ds-wtrip",
2014
2004
  b
2015
2005
  ].filter(Boolean).join(" "),
2016
2006
  "aria-labelledby": x,
2017
- children: [/* @__PURE__ */ c("header", {
2007
+ children: [/* @__PURE__ */ h("header", {
2018
2008
  className: "ds-wcard-header",
2019
- children: [/* @__PURE__ */ s(q, {}), /* @__PURE__ */ s(D, {
2009
+ children: [/* @__PURE__ */ m(ue, {}), /* @__PURE__ */ m(D, {
2020
2010
  id: x,
2021
2011
  className: "ds-wcard-title",
2022
2012
  children: e
2023
2013
  })]
2024
- }), /* @__PURE__ */ c("div", {
2014
+ }), /* @__PURE__ */ h("div", {
2025
2015
  className: "ds-wcard-body",
2026
2016
  children: [
2027
- /* @__PURE__ */ c("div", {
2017
+ /* @__PURE__ */ h("div", {
2028
2018
  className: "ds-wtrip-service",
2029
- children: [/* @__PURE__ */ s(Ke, {
2030
- label: h,
2019
+ children: [/* @__PURE__ */ m($e, {
2020
+ label: p,
2031
2021
  value: w.service,
2032
2022
  onChange: (e) => T({ service: e }),
2033
- disabled: m,
2023
+ disabled: d,
2034
2024
  name: E("service"),
2035
- options: l.map((e) => ({
2025
+ options: a.map((e) => ({
2036
2026
  value: e.value,
2037
2027
  label: e.label,
2038
2028
  disabled: e.disabled,
2039
- meta: /* @__PURE__ */ s(Ye, {
2029
+ meta: /* @__PURE__ */ m(nt, {
2040
2030
  service: e,
2041
2031
  ...O
2042
2032
  }),
2043
- metaLabel: Re(e, O).label
2033
+ metaLabel: Ge(e, O).label
2044
2034
  }))
2045
- }), /* @__PURE__ */ s(Je, {
2035
+ }), /* @__PURE__ */ m(tt, {
2046
2036
  legend: "Modalidad del viaje",
2047
2037
  orientation: "horizontal",
2048
2038
  items: k,
2049
- disabled: m,
2039
+ disabled: d,
2050
2040
  value: k.filter((e) => w[e.value]).map((e) => e.value),
2051
2041
  onChange: (e) => T({
2052
2042
  hourly: e.includes("hourly"),
@@ -2055,9 +2045,9 @@ function Xe({ title: e = "Atributos del viaje", headingLevel: n = 3, value: r, d
2055
2045
  name: E("mode")
2056
2046
  })]
2057
2047
  }),
2058
- /* @__PURE__ */ s(Je, {
2048
+ /* @__PURE__ */ m(tt, {
2059
2049
  legend: "Extras",
2060
- items: u,
2050
+ items: o,
2061
2051
  value: w.extras,
2062
2052
  quantities: w.extraQuantities ?? {},
2063
2053
  choices: w.extraChoices ?? {},
@@ -2074,24 +2064,24 @@ function Xe({ title: e = "Atributos del viaje", headingLevel: n = 3, value: r, d
2074
2064
  extraChoices: e,
2075
2065
  extraQuantities: t
2076
2066
  }),
2077
- disabled: m,
2067
+ disabled: d,
2078
2068
  name: E("extras")
2079
2069
  }),
2080
- /* @__PURE__ */ s(qe, {
2070
+ /* @__PURE__ */ m(et, {
2081
2071
  label: g,
2082
2072
  value: w.vehicles,
2083
2073
  onChange: (e) => T({ vehicles: e }),
2084
2074
  min: 1,
2085
- max: f,
2086
- disabled: m,
2075
+ max: l,
2076
+ disabled: d,
2087
2077
  name: E("vehicles")
2088
2078
  }),
2089
- /* @__PURE__ */ s(Ke, {
2079
+ /* @__PURE__ */ m($e, {
2090
2080
  label: _,
2091
2081
  value: w.payment,
2092
2082
  onChange: (e) => T({ payment: e }),
2093
- options: d,
2094
- disabled: m,
2083
+ options: s,
2084
+ disabled: d,
2095
2085
  name: E("payment")
2096
2086
  })
2097
2087
  ]
@@ -2100,9 +2090,9 @@ function Xe({ title: e = "Atributos del viaje", headingLevel: n = 3, value: r, d
2100
2090
  }
2101
2091
  //#endregion
2102
2092
  //#region src/wari/WariClientSearch.tsx
2103
- function Ze({ title: e = "Cliente / usuario", headingLevel: n = 3, value: r, defaultValue: i = "", onChange: l, onSearch: u, onCreate: d, createHref: f, createLabel: p = "Crear usuario", placeholder: m = "Puedes filtrar por nombre o número", searchLabel: h = "Buscar cliente por nombre o número", name: g = "q", action: _, loading: v = !1, loadingLabel: y = "Buscando cliente…", showCreate: b, showSearch: x = !0, hoverable: S = !0, disabled: C = !1, children: w, className: T }) {
2104
- let E = t(), D = t(), [O, k] = a(i), A = r ?? O, j = `h${n}`, M = /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(ue, {}), p] }), N = b ?? (!A.trim() && !v);
2105
- return /* @__PURE__ */ c("section", {
2093
+ function it({ title: e = "Cliente / usuario", headingLevel: t = 3, value: n, defaultValue: r = "", onChange: i, onSearch: a, onCreate: o, createHref: s, createLabel: l = "Crear usuario", placeholder: u = "Puedes filtrar por nombre o número", searchLabel: d = "Buscar cliente por nombre o número", name: g = "q", action: _, loading: v = !1, loadingLabel: y = "Buscando cliente…", showCreate: b, showSearch: x = !0, hoverable: S = !0, disabled: C = !1, children: w, className: T }) {
2094
+ let E = c(), D = c(), [O, k] = f(r), A = n ?? O, j = `h${t}`, M = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ge, {}), l] }), N = b ?? (!A.trim() && !v);
2095
+ return /* @__PURE__ */ h("section", {
2106
2096
  className: [
2107
2097
  "ds-wcard",
2108
2098
  "ds-wclient",
@@ -2112,63 +2102,63 @@ function Ze({ title: e = "Cliente / usuario", headingLevel: n = 3, value: r, def
2112
2102
  "data-hover": S ? "lift" : void 0,
2113
2103
  "aria-busy": v || void 0,
2114
2104
  children: [
2115
- /* @__PURE__ */ c("header", {
2105
+ /* @__PURE__ */ h("header", {
2116
2106
  className: "ds-wcard-header",
2117
2107
  children: [
2118
- /* @__PURE__ */ s(Q, {}),
2119
- /* @__PURE__ */ s(j, {
2108
+ /* @__PURE__ */ m(me, {}),
2109
+ /* @__PURE__ */ m(j, {
2120
2110
  id: E,
2121
2111
  className: "ds-wcard-title",
2122
2112
  title: e,
2123
2113
  children: e
2124
2114
  }),
2125
- N ? f ? /* @__PURE__ */ s("a", {
2115
+ N ? s ? /* @__PURE__ */ m("a", {
2126
2116
  className: "ds-wcard-action",
2127
- href: f,
2117
+ href: s,
2128
2118
  children: M
2129
- }) : d && /* @__PURE__ */ s("button", {
2119
+ }) : o && /* @__PURE__ */ m("button", {
2130
2120
  type: "button",
2131
2121
  className: "ds-wcard-action",
2132
- onClick: d,
2122
+ onClick: o,
2133
2123
  disabled: C,
2134
2124
  children: M
2135
2125
  }) : null
2136
2126
  ]
2137
2127
  }),
2138
- x && /* @__PURE__ */ c("form", {
2128
+ x && /* @__PURE__ */ h("form", {
2139
2129
  role: "search",
2140
2130
  className: "ds-input ds-wsearch",
2141
2131
  action: _,
2142
2132
  onSubmit: (e) => {
2143
- _ || e.preventDefault(), u?.(A.trim());
2133
+ _ || e.preventDefault(), a?.(A.trim());
2144
2134
  },
2145
- children: [/* @__PURE__ */ s("label", {
2135
+ children: [/* @__PURE__ */ m("label", {
2146
2136
  htmlFor: D,
2147
2137
  className: "ds-wvisually-hidden",
2148
- children: h
2149
- }), /* @__PURE__ */ c("div", {
2138
+ children: d
2139
+ }), /* @__PURE__ */ h("div", {
2150
2140
  className: "ds-input-shell",
2151
- children: [/* @__PURE__ */ s(le, {}), /* @__PURE__ */ s("input", {
2141
+ children: [/* @__PURE__ */ m(he, {}), /* @__PURE__ */ m("input", {
2152
2142
  id: D,
2153
2143
  type: "search",
2154
2144
  name: g,
2155
2145
  value: A,
2156
- placeholder: m,
2146
+ placeholder: u,
2157
2147
  autoComplete: "off",
2158
2148
  disabled: C,
2159
2149
  enterKeyHint: "search",
2160
2150
  onChange: (e) => {
2161
- r === void 0 && k(e.target.value), l?.(e.target.value);
2151
+ n === void 0 && k(e.target.value), i?.(e.target.value);
2162
2152
  }
2163
2153
  })]
2164
2154
  })]
2165
2155
  }),
2166
- v && /* @__PURE__ */ s("div", {
2156
+ v && /* @__PURE__ */ m("div", {
2167
2157
  className: "ds-wclient-progress",
2168
2158
  role: "progressbar",
2169
2159
  "aria-label": y
2170
2160
  }),
2171
- w != null && /* @__PURE__ */ s("div", {
2161
+ w != null && /* @__PURE__ */ m("div", {
2172
2162
  className: "ds-wclient-results",
2173
2163
  children: w
2174
2164
  })
@@ -2177,91 +2167,91 @@ function Ze({ title: e = "Cliente / usuario", headingLevel: n = 3, value: r, def
2177
2167
  }
2178
2168
  //#endregion
2179
2169
  //#region src/wari/WariClientDetails.tsx
2180
- function Qe({ name: e, company: t, phone: n, vip: r, tone: i, onRates: a, ratesLabel: o = "Tarifas", onInfo: l, infoLabel: u = "Ver información del cliente", onEdit: d, editLabel: f = "Editar cliente", notes: p, notesLabel: m = "Observaciones del cliente", notesHint: h = "(no editable)", children: g, disabled: _ = !1, className: v }) {
2181
- let y = a || l || d, b = i ?? (r === !1 ? "info" : "warning");
2182
- return /* @__PURE__ */ c("div", {
2170
+ function at({ name: e, company: t, phone: n, vip: r, tone: i, onRates: a, ratesLabel: o = "Tarifas", onInfo: s, infoLabel: c = "Ver información del cliente", onEdit: l, editLabel: u = "Editar cliente", notes: d, notesLabel: f = "Observaciones del cliente", notesHint: p = "(no editable)", children: g, disabled: _ = !1, className: v }) {
2171
+ let y = a || s || l, b = i ?? (r === !1 ? "info" : "warning");
2172
+ return /* @__PURE__ */ h("div", {
2183
2173
  className: ["ds-wclient-details", v].filter(Boolean).join(" "),
2184
2174
  children: [
2185
- /* @__PURE__ */ c("div", {
2175
+ /* @__PURE__ */ h("div", {
2186
2176
  className: "ds-wclient-summary",
2187
- children: [/* @__PURE__ */ c("div", {
2177
+ children: [/* @__PURE__ */ h("div", {
2188
2178
  className: "ds-wclient-banner",
2189
2179
  "data-tone": b,
2190
2180
  children: [
2191
- /* @__PURE__ */ s("p", {
2181
+ /* @__PURE__ */ m("p", {
2192
2182
  className: "ds-wclient-name",
2193
2183
  title: e,
2194
2184
  children: e
2195
2185
  }),
2196
- t && /* @__PURE__ */ s("span", {
2186
+ t && /* @__PURE__ */ m("span", {
2197
2187
  className: "ds-wclient-company",
2198
2188
  title: t,
2199
2189
  children: t
2200
2190
  }),
2201
- n && /* @__PURE__ */ c("a", {
2191
+ n && /* @__PURE__ */ h("a", {
2202
2192
  className: "ds-wclient-phone",
2203
2193
  href: `tel:${n.replace(/[^\d+]/g, "")}`,
2204
- children: [/* @__PURE__ */ s(de, {}), n]
2194
+ children: [/* @__PURE__ */ m(_e, {}), n]
2205
2195
  })
2206
2196
  ]
2207
- }), y && /* @__PURE__ */ c("div", {
2197
+ }), y && /* @__PURE__ */ h("div", {
2208
2198
  className: "ds-wclient-actions",
2209
- children: [a && /* @__PURE__ */ s("button", {
2199
+ children: [a && /* @__PURE__ */ m("button", {
2210
2200
  type: "button",
2211
2201
  className: "ds-wclient-rates",
2212
2202
  onClick: a,
2213
2203
  disabled: _,
2214
2204
  children: o
2215
- }), (l || d) && /* @__PURE__ */ c("div", { children: [l && /* @__PURE__ */ s("button", {
2205
+ }), (s || l) && /* @__PURE__ */ h("div", { children: [s && /* @__PURE__ */ m("button", {
2216
2206
  type: "button",
2217
2207
  className: "ds-wclient-icon",
2218
- "aria-label": u,
2219
- title: u,
2220
- onClick: l,
2208
+ "aria-label": c,
2209
+ title: c,
2210
+ onClick: s,
2221
2211
  disabled: _,
2222
- children: /* @__PURE__ */ s($, {})
2223
- }), d && /* @__PURE__ */ s("button", {
2212
+ children: /* @__PURE__ */ m(ve, {})
2213
+ }), l && /* @__PURE__ */ m("button", {
2224
2214
  type: "button",
2225
2215
  className: "ds-wclient-icon",
2226
- "aria-label": f,
2227
- title: f,
2228
- onClick: d,
2216
+ "aria-label": u,
2217
+ title: u,
2218
+ onClick: l,
2229
2219
  disabled: _,
2230
- children: /* @__PURE__ */ s(fe, {})
2220
+ children: /* @__PURE__ */ m(ye, {})
2231
2221
  })] })]
2232
2222
  })]
2233
2223
  }),
2234
- g != null && /* @__PURE__ */ s("div", {
2224
+ g != null && /* @__PURE__ */ m("div", {
2235
2225
  className: "ds-wclient-fields",
2236
2226
  children: g
2237
2227
  }),
2238
- p != null && /* @__PURE__ */ c("div", {
2228
+ d != null && /* @__PURE__ */ h("div", {
2239
2229
  className: "ds-wclient-notes",
2240
- children: [/* @__PURE__ */ c("span", { children: [
2241
- m,
2230
+ children: [/* @__PURE__ */ h("span", { children: [
2231
+ f,
2242
2232
  " ",
2243
- /* @__PURE__ */ s("em", { children: h })
2244
- ] }), /* @__PURE__ */ s("p", { children: p })]
2233
+ /* @__PURE__ */ m("em", { children: p })
2234
+ ] }), /* @__PURE__ */ m("p", { children: d })]
2245
2235
  })
2246
2236
  ]
2247
2237
  });
2248
2238
  }
2249
2239
  //#endregion
2250
2240
  //#region src/wari/motion.ts
2251
- var $e = "cubic-bezier(.2, .8, .2, 1)";
2252
- function et() {
2241
+ var ot = "cubic-bezier(.2, .8, .2, 1)";
2242
+ function st() {
2253
2243
  return typeof window > "u" || typeof window.matchMedia != "function" || window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2254
2244
  }
2255
- var tt = (e) => typeof e.animate == "function";
2256
- function nt(e) {
2245
+ var ct = (e) => typeof e.animate == "function";
2246
+ function lt(e) {
2257
2247
  let t = /* @__PURE__ */ new Map();
2258
- return !e || et() || e.querySelectorAll("[data-motion]").forEach((e) => t.set(e.dataset.motion, e.getBoundingClientRect())), t;
2248
+ return !e || st() || e.querySelectorAll("[data-motion]").forEach((e) => t.set(e.dataset.motion, e.getBoundingClientRect())), t;
2259
2249
  }
2260
- function rt(e, t) {
2261
- if (!e || t.size === 0 || et()) return;
2250
+ function ut(e, t) {
2251
+ if (!e || t.size === 0 || st()) return;
2262
2252
  let n = 0;
2263
2253
  e.querySelectorAll("[data-motion]").forEach((r) => {
2264
- if (!tt(r)) return;
2254
+ if (!ct(r)) return;
2265
2255
  let i = t.get(r.dataset.motion);
2266
2256
  if (!i) {
2267
2257
  r.animate([{
@@ -2272,7 +2262,7 @@ function rt(e, t) {
2272
2262
  transform: "none"
2273
2263
  }], {
2274
2264
  duration: 240,
2275
- easing: $e,
2265
+ easing: ot,
2276
2266
  delay: Math.min(n++, 6) * 35,
2277
2267
  fill: "backwards"
2278
2268
  });
@@ -2282,12 +2272,12 @@ function rt(e, t) {
2282
2272
  let a = r.getBoundingClientRect(), o = i.left - a.left, s = i.top - a.top;
2283
2273
  Math.abs(o) < 1 && Math.abs(s) < 1 || r.animate([{ transform: `translate(${o}px, ${s}px)` }, { transform: "none" }], {
2284
2274
  duration: 280,
2285
- easing: $e
2275
+ easing: ot
2286
2276
  });
2287
2277
  });
2288
2278
  }
2289
- function it(e, t) {
2290
- if (!e || !tt(e) || et()) {
2279
+ function dt(e, t) {
2280
+ if (!e || !ct(e) || st()) {
2291
2281
  t();
2292
2282
  return;
2293
2283
  }
@@ -2308,42 +2298,42 @@ function it(e, t) {
2308
2298
  }
2309
2299
  //#endregion
2310
2300
  //#region src/wari/route.ts
2311
- var at = 0;
2312
- function ot(e = {}) {
2313
- return at += 1, {
2314
- id: `stop-${Date.now().toString(36)}-${at}`,
2301
+ var ft = 0;
2302
+ function pt(e = {}) {
2303
+ return ft += 1, {
2304
+ id: `stop-${Date.now().toString(36)}-${ft}`,
2315
2305
  address: "",
2316
2306
  reference: "",
2317
2307
  passenger: null,
2318
2308
  ...e
2319
2309
  };
2320
2310
  }
2321
- function st() {
2311
+ function mt() {
2322
2312
  return {
2323
- stops: [ot(), ot()],
2313
+ stops: [pt(), pt()],
2324
2314
  passenger: null,
2325
2315
  tolls: [""]
2326
2316
  };
2327
2317
  }
2328
- var ct = () => ({
2318
+ var ht = () => ({
2329
2319
  name: "",
2330
2320
  phone: ""
2331
2321
  });
2332
- function lt(e, t, n) {
2322
+ function gt(e, t, n) {
2333
2323
  if (t === n || t < 0 || n < 0 || t >= e.length || n >= e.length) return [...e];
2334
2324
  let r = [...e], [i] = r.splice(t, 1);
2335
2325
  return r.splice(n, 0, i), r;
2336
2326
  }
2337
- function ut(e) {
2327
+ function _t(e) {
2338
2328
  return {
2339
2329
  ...e,
2340
2330
  stops: [...e.stops].reverse()
2341
2331
  };
2342
2332
  }
2343
- function dt(e, t = 10) {
2344
- return e.length >= t ? [...e] : [...e, ot()];
2333
+ function vt(e, t = 10) {
2334
+ return e.length >= t ? [...e] : [...e, pt()];
2345
2335
  }
2346
- function ft(e, t) {
2336
+ function yt(e, t) {
2347
2337
  return t < 0 || t >= e.length ? [...e] : e.length <= 2 ? e.map((e, n) => n === t ? {
2348
2338
  ...e,
2349
2339
  address: "",
@@ -2353,36 +2343,36 @@ function ft(e, t) {
2353
2343
  passenger: null
2354
2344
  } : e) : e.filter((e, n) => n !== t);
2355
2345
  }
2356
- function pt(e, t, n) {
2346
+ function bt(e, t, n) {
2357
2347
  return e.map((e, r) => r === t ? {
2358
2348
  ...e,
2359
2349
  ...n
2360
2350
  } : e);
2361
2351
  }
2362
- function mt(e, t = 5) {
2352
+ function xt(e, t = 5) {
2363
2353
  return e.length >= t ? [...e] : [...e, ""];
2364
2354
  }
2365
- function ht(e, t) {
2355
+ function St(e, t) {
2366
2356
  return e.length <= 1 ? [""] : e.filter((e, n) => n !== t);
2367
2357
  }
2368
- function gt(e) {
2358
+ function Ct(e) {
2369
2359
  return e.reduce((e, t) => {
2370
2360
  let n = Number(t.replace(",", "."));
2371
2361
  return Number.isFinite(n) && n > 0 ? e + n : e;
2372
2362
  }, 0);
2373
2363
  }
2374
- function _t(e) {
2364
+ function wt(e) {
2375
2365
  return e === 0 ? "¿Dónde recogemos al cliente?" : "¿A dónde lo llevamos?";
2376
2366
  }
2377
- function vt(e) {
2367
+ function Tt(e) {
2378
2368
  return e === 0 ? "Origen" : `Destino ${e}`;
2379
2369
  }
2380
- function yt(e) {
2370
+ function Et(e) {
2381
2371
  let t = e?.stops?.length ? e.stops.map((e) => ({
2382
2372
  passenger: null,
2383
2373
  ...e
2384
- })) : st().stops;
2385
- for (; t.length < 2;) t.push(ot());
2374
+ })) : mt().stops;
2375
+ for (; t.length < 2;) t.push(pt());
2386
2376
  return {
2387
2377
  stops: t,
2388
2378
  passenger: e?.passenger ?? null,
@@ -2391,56 +2381,56 @@ function yt(e) {
2391
2381
  }
2392
2382
  //#endregion
2393
2383
  //#region src/wari/WariRoute.tsx
2394
- var bt = /* @__PURE__ */ new WeakMap();
2395
- function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d, onChange: f, onInvert: p, maxStops: m = 10, maxTolls: h = 5, showPassengers: g = !0, showTolls: _ = !0, invertingLabel: v = "Invirtiendo direcciones...", invertedMessage: y = "Direcciones invertidas con éxito", routePassengerNote: b = "Este pasajero será el registrado para todas las direcciones de la ruta.", disabled: x = !1, className: S }) {
2396
- let C = t(), [w, T] = a(() => yt(d)), E = u ? yt(u) : w, [D, O] = a(!1), [k, A] = a(!1), [j, M] = a(null), [N, P] = a(null), F = i(null), I = () => typeof document > "u" ? null : document.getElementById(`${C}-title`)?.closest(".ds-wroute"), L = () => {
2384
+ var Dt = /* @__PURE__ */ new WeakMap();
2385
+ function Ot({ title: e = "Ruta", headingLevel: t = 3, value: n, defaultValue: r, onChange: i, onInvert: a, maxStops: o = 10, maxTolls: u = 5, showPassengers: g = !0, showTolls: _ = !0, invertingLabel: v = "Invirtiendo direcciones...", invertedMessage: y = "Direcciones invertidas con éxito", routePassengerNote: b = "Este pasajero será el registrado para todas las direcciones de la ruta.", disabled: x = !1, className: S }) {
2386
+ let C = c(), [w, T] = f(() => Et(r)), E = n ? Et(n) : w, [D, O] = f(!1), [k, A] = f(!1), [j, M] = f(null), [N, P] = f(null), F = d(null), I = () => typeof document > "u" ? null : document.getElementById(`${C}-title`)?.closest(".ds-wroute"), L = () => {
2397
2387
  let e = I();
2398
- e && bt.set(e, nt(e));
2388
+ e && Dt.set(e, lt(e));
2399
2389
  };
2400
- n(() => {
2401
- let e = I(), t = e && bt.get(e);
2402
- e && t && (bt.delete(e), rt(e, t));
2390
+ l(() => {
2391
+ let e = I(), t = e && Dt.get(e);
2392
+ e && t && (Dt.delete(e), ut(e, t));
2403
2393
  });
2404
- let R = (e, t) => it(e.currentTarget.closest("[data-motion]"), t), ee = `h${l}`, z = (e) => {
2405
- L(), u === void 0 && T(e), f?.(e);
2394
+ let R = (e, t) => dt(e.currentTarget.closest("[data-motion]"), t), ee = `h${t}`, z = (e) => {
2395
+ L(), n === void 0 && T(e), i?.(e);
2406
2396
  }, B = (e) => z({
2407
2397
  ...E,
2408
2398
  ...e
2409
2399
  });
2410
- e(() => {
2400
+ s(() => {
2411
2401
  if (!k) return;
2412
2402
  let e = window.setTimeout(() => A(!1), 3e3);
2413
2403
  return () => window.clearTimeout(e);
2414
2404
  }, [k]);
2415
2405
  let V = async () => {
2416
- let e = ut(E);
2406
+ let e = _t(E);
2417
2407
  A(!1);
2418
- let t = p?.(e);
2408
+ let t = a?.(e);
2419
2409
  if (t && typeof t.then == "function") {
2420
2410
  L(), O(!0);
2421
2411
  try {
2422
2412
  let n = await t;
2423
- z(n ? yt(n) : e), A(!0);
2413
+ z(n ? Et(n) : e), A(!0);
2424
2414
  } catch {} finally {
2425
2415
  O(!1);
2426
2416
  }
2427
2417
  } else z(e), A(!0);
2428
2418
  }, H = (e) => requestAnimationFrame(() => {
2429
2419
  F.current?.querySelector(`[data-stop="${e}"] .ds-wroute-handle`)?.focus();
2430
- }), te = (e, t) => {
2420
+ }), U = (e, t) => {
2431
2421
  let n = e.key === "ArrowUp" ? t - 1 : e.key === "ArrowDown" ? t + 1 : -1;
2432
2422
  if (n < 0 || n >= E.stops.length) return;
2433
2423
  e.preventDefault();
2434
2424
  let r = E.stops[t].id;
2435
- B({ stops: lt(E.stops, t, n) }), H(r);
2436
- }, U = (e, t) => {
2437
- e.preventDefault(), j !== null && B({ stops: lt(E.stops, j, t) }), M(null), P(null);
2438
- }, ne = (e, t, n) => /* @__PURE__ */ c("div", {
2425
+ B({ stops: gt(E.stops, t, n) }), H(r);
2426
+ }, te = (e, t) => {
2427
+ e.preventDefault(), j !== null && B({ stops: gt(E.stops, j, t) }), M(null), P(null);
2428
+ }, ne = (e, t, n) => /* @__PURE__ */ h("div", {
2439
2429
  className: "ds-wroute-passenger",
2440
2430
  role: "group",
2441
2431
  "aria-label": `Pasajero: ${n}`,
2442
2432
  children: [
2443
- /* @__PURE__ */ c("label", { children: [/* @__PURE__ */ s(xe, {}), /* @__PURE__ */ s("input", {
2433
+ /* @__PURE__ */ h("label", { children: [/* @__PURE__ */ m(Oe, {}), /* @__PURE__ */ m("input", {
2444
2434
  className: "ds-wroute-input",
2445
2435
  type: "text",
2446
2436
  autoComplete: "name",
@@ -2453,7 +2443,7 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2453
2443
  name: n.target.value
2454
2444
  })
2455
2445
  })] }),
2456
- /* @__PURE__ */ c("label", { children: [/* @__PURE__ */ s(de, {}), /* @__PURE__ */ s("input", {
2446
+ /* @__PURE__ */ h("label", { children: [/* @__PURE__ */ m(_e, {}), /* @__PURE__ */ m("input", {
2457
2447
  className: "ds-wroute-input",
2458
2448
  type: "tel",
2459
2449
  autoComplete: "tel",
@@ -2467,17 +2457,17 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2467
2457
  phone: n.target.value
2468
2458
  })
2469
2459
  })] }),
2470
- /* @__PURE__ */ s("button", {
2460
+ /* @__PURE__ */ m("button", {
2471
2461
  type: "button",
2472
2462
  className: "ds-wroute-clear",
2473
2463
  "aria-label": `Quitar pasajero: ${n}`,
2474
2464
  disabled: x,
2475
2465
  onClick: (e) => R(e, () => t(null)),
2476
- children: /* @__PURE__ */ s(Ce, {})
2466
+ children: /* @__PURE__ */ m(Ae, {})
2477
2467
  })
2478
2468
  ]
2479
2469
  });
2480
- return /* @__PURE__ */ c("section", {
2470
+ return /* @__PURE__ */ h("section", {
2481
2471
  className: [
2482
2472
  "ds-wcard",
2483
2473
  "ds-wroute",
@@ -2485,62 +2475,62 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2485
2475
  ].filter(Boolean).join(" "),
2486
2476
  "aria-labelledby": `${C}-title`,
2487
2477
  "aria-busy": D || void 0,
2488
- children: [/* @__PURE__ */ c("header", {
2478
+ children: [/* @__PURE__ */ h("header", {
2489
2479
  className: "ds-wcard-header",
2490
2480
  children: [
2491
- /* @__PURE__ */ s(me, {}),
2492
- /* @__PURE__ */ s(ee, {
2481
+ /* @__PURE__ */ m(xe, {}),
2482
+ /* @__PURE__ */ m(ee, {
2493
2483
  id: `${C}-title`,
2494
2484
  className: "ds-wcard-title",
2495
- children: r
2485
+ children: e
2496
2486
  }),
2497
- g && !E.passenger && !D && /* @__PURE__ */ c("button", {
2487
+ g && !E.passenger && !D && /* @__PURE__ */ h("button", {
2498
2488
  type: "button",
2499
2489
  className: "ds-wroute-pill",
2500
2490
  "data-motion": "pill",
2501
2491
  disabled: x,
2502
- onClick: () => B({ passenger: ct() }),
2503
- children: [/* @__PURE__ */ s(Y, {}), "Añadir pasajero (ruta completa)"]
2492
+ onClick: () => B({ passenger: ht() }),
2493
+ children: [/* @__PURE__ */ m(Q, {}), "Añadir pasajero (ruta completa)"]
2504
2494
  }),
2505
- /* @__PURE__ */ s("span", { className: "ds-wroute-header-spacer" }),
2506
- /* @__PURE__ */ c("button", {
2495
+ /* @__PURE__ */ m("span", { className: "ds-wroute-header-spacer" }),
2496
+ /* @__PURE__ */ h("button", {
2507
2497
  type: "button",
2508
2498
  className: "ds-wroute-link",
2509
2499
  disabled: x || D,
2510
2500
  onClick: V,
2511
- children: [/* @__PURE__ */ s(he, {}), "Invertir"]
2501
+ children: [/* @__PURE__ */ m(Se, {}), "Invertir"]
2512
2502
  })
2513
2503
  ]
2514
- }), D ? /* @__PURE__ */ c("div", {
2504
+ }), D ? /* @__PURE__ */ h("div", {
2515
2505
  className: "ds-wroute-status",
2516
2506
  role: "status",
2517
2507
  "data-motion": "status",
2518
- children: [/* @__PURE__ */ s("div", {
2508
+ children: [/* @__PURE__ */ m("div", {
2519
2509
  className: "ds-wclient-progress",
2520
2510
  role: "progressbar",
2521
2511
  "aria-label": v
2522
2512
  }), v]
2523
- }) : /* @__PURE__ */ c(o, { children: [
2524
- k && /* @__PURE__ */ s("p", {
2513
+ }) : /* @__PURE__ */ h(p, { children: [
2514
+ k && /* @__PURE__ */ m("p", {
2525
2515
  className: "ds-wroute-success",
2526
2516
  role: "status",
2527
2517
  children: y
2528
2518
  }),
2529
- E.passenger && /* @__PURE__ */ c("div", {
2519
+ E.passenger && /* @__PURE__ */ h("div", {
2530
2520
  className: "ds-wroute-passenger-block",
2531
2521
  "data-motion": "route-passenger",
2532
- children: [ne(E.passenger, (e) => B({ passenger: e }), "ruta completa"), /* @__PURE__ */ s("p", {
2522
+ children: [ne(E.passenger, (e) => B({ passenger: e }), "ruta completa"), /* @__PURE__ */ m("p", {
2533
2523
  className: "ds-wroute-info",
2534
2524
  children: b
2535
2525
  })]
2536
2526
  }),
2537
- /* @__PURE__ */ s("ol", {
2527
+ /* @__PURE__ */ m("ol", {
2538
2528
  ref: F,
2539
2529
  className: "ds-wroute-stops",
2540
2530
  "aria-label": "Paradas",
2541
2531
  children: E.stops.map((e, t) => {
2542
- let n = vt(t);
2543
- return /* @__PURE__ */ c("li", {
2532
+ let n = Tt(t);
2533
+ return /* @__PURE__ */ h("li", {
2544
2534
  className: "ds-wroute-stop",
2545
2535
  "data-stop": e.id,
2546
2536
  "data-motion": `stop:${e.id}`,
@@ -2549,56 +2539,56 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2549
2539
  onDragOver: (e) => {
2550
2540
  j !== null && (e.preventDefault(), P(t));
2551
2541
  },
2552
- onDrop: (e) => U(e, t),
2542
+ onDrop: (e) => te(e, t),
2553
2543
  children: [
2554
- /* @__PURE__ */ s("button", {
2544
+ /* @__PURE__ */ m("button", {
2555
2545
  type: "button",
2556
2546
  className: "ds-wroute-handle",
2557
2547
  draggable: !x,
2558
2548
  disabled: x,
2559
2549
  "aria-label": `Mover ${n}`,
2560
2550
  "aria-describedby": `${C}-move-hint`,
2561
- onKeyDown: (e) => te(e, t),
2551
+ onKeyDown: (e) => U(e, t),
2562
2552
  onDragStart: (n) => {
2563
2553
  M(t), n.dataTransfer.effectAllowed = "move", n.dataTransfer.setData("text/plain", e.id);
2564
2554
  },
2565
2555
  onDragEnd: () => {
2566
2556
  M(null), P(null);
2567
2557
  },
2568
- children: /* @__PURE__ */ s(ge, {})
2558
+ children: /* @__PURE__ */ m(Ce, {})
2569
2559
  }),
2570
- /* @__PURE__ */ c("div", {
2560
+ /* @__PURE__ */ h("div", {
2571
2561
  className: "ds-wroute-stop-box",
2572
2562
  children: [
2573
- /* @__PURE__ */ c("div", {
2563
+ /* @__PURE__ */ h("div", {
2574
2564
  className: "ds-wroute-stop-main",
2575
2565
  children: [
2576
- /* @__PURE__ */ c("label", {
2566
+ /* @__PURE__ */ h("label", {
2577
2567
  className: "ds-wroute-address",
2578
- children: [s(t === 0 ? ve : ye, {}), /* @__PURE__ */ s("input", {
2568
+ children: [m(t === 0 ? Te : Ee, {}), /* @__PURE__ */ m("input", {
2579
2569
  className: "ds-wroute-input",
2580
2570
  type: "text",
2581
2571
  autoComplete: "off",
2582
- placeholder: _t(t),
2572
+ placeholder: wt(t),
2583
2573
  "aria-label": `Dirección: ${n}`,
2584
2574
  value: e.address,
2585
2575
  disabled: x,
2586
- onChange: (e) => B({ stops: pt(E.stops, t, { address: e.target.value }) })
2576
+ onChange: (e) => B({ stops: bt(E.stops, t, { address: e.target.value }) })
2587
2577
  })]
2588
2578
  }),
2589
- /* @__PURE__ */ c("span", {
2579
+ /* @__PURE__ */ h("span", {
2590
2580
  className: "ds-wroute-zone",
2591
- children: [/* @__PURE__ */ s("strong", { children: "Zona" }), e.zone || "Sin definir"]
2581
+ children: [/* @__PURE__ */ m("strong", { children: "Zona" }), e.zone || "Sin definir"]
2592
2582
  }),
2593
- e.price != null && /* @__PURE__ */ s("span", {
2583
+ e.price != null && /* @__PURE__ */ m("span", {
2594
2584
  className: "ds-wroute-price",
2595
- children: Le(e.price)
2585
+ children: We(e.price)
2596
2586
  })
2597
2587
  ]
2598
2588
  }),
2599
- /* @__PURE__ */ c("div", {
2589
+ /* @__PURE__ */ h("div", {
2600
2590
  className: "ds-wroute-stop-extra",
2601
- children: [/* @__PURE__ */ s("input", {
2591
+ children: [/* @__PURE__ */ m("input", {
2602
2592
  className: "ds-wroute-input ds-wroute-input-sm",
2603
2593
  type: "text",
2604
2594
  autoComplete: "off",
@@ -2606,68 +2596,68 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2606
2596
  "aria-label": `Referencia: ${n}`,
2607
2597
  value: e.reference,
2608
2598
  disabled: x,
2609
- onChange: (e) => B({ stops: pt(E.stops, t, { reference: e.target.value }) })
2610
- }), g && !e.passenger && /* @__PURE__ */ c("button", {
2599
+ onChange: (e) => B({ stops: bt(E.stops, t, { reference: e.target.value }) })
2600
+ }), g && !e.passenger && /* @__PURE__ */ h("button", {
2611
2601
  type: "button",
2612
2602
  className: "ds-wroute-stop-passenger",
2613
2603
  disabled: x,
2614
2604
  "aria-label": `Añadir pasajero: ${n}`,
2615
- onClick: () => B({ stops: pt(E.stops, t, { passenger: ct() }) }),
2616
- children: [/* @__PURE__ */ s(be, {}), "Añadir Pasajero"]
2605
+ onClick: () => B({ stops: bt(E.stops, t, { passenger: ht() }) }),
2606
+ children: [/* @__PURE__ */ m(De, {}), "Añadir Pasajero"]
2617
2607
  })]
2618
2608
  }),
2619
- e.passenger && /* @__PURE__ */ s("div", {
2609
+ e.passenger && /* @__PURE__ */ m("div", {
2620
2610
  className: "ds-wroute-stop-passenger-wrap",
2621
2611
  "data-motion": `passenger:${e.id}`,
2622
- children: ne(e.passenger, (e) => B({ stops: pt(E.stops, t, { passenger: e }) }), n)
2612
+ children: ne(e.passenger, (e) => B({ stops: bt(E.stops, t, { passenger: e }) }), n)
2623
2613
  })
2624
2614
  ]
2625
2615
  }),
2626
- /* @__PURE__ */ s("button", {
2616
+ /* @__PURE__ */ m("button", {
2627
2617
  type: "button",
2628
2618
  className: "ds-wroute-remove",
2629
2619
  "aria-label": E.stops.length > 2 ? `Quitar ${n}` : `Vaciar ${n}`,
2630
2620
  disabled: x,
2631
2621
  onClick: (e) => {
2632
- let n = () => B({ stops: ft(E.stops, t) });
2622
+ let n = () => B({ stops: yt(E.stops, t) });
2633
2623
  E.stops.length > 2 ? R(e, n) : n();
2634
2624
  },
2635
- children: /* @__PURE__ */ s(_e, {})
2625
+ children: /* @__PURE__ */ m(we, {})
2636
2626
  })
2637
2627
  ]
2638
2628
  }, e.id);
2639
2629
  })
2640
2630
  }),
2641
- /* @__PURE__ */ s("span", {
2631
+ /* @__PURE__ */ m("span", {
2642
2632
  id: `${C}-move-hint`,
2643
2633
  className: "ds-wvisually-hidden",
2644
2634
  children: "Arrastra o usa las flechas arriba y abajo para cambiar el orden."
2645
2635
  }),
2646
- /* @__PURE__ */ c("button", {
2636
+ /* @__PURE__ */ h("button", {
2647
2637
  type: "button",
2648
2638
  className: "ds-wroute-add",
2649
2639
  "data-motion": "add",
2650
- disabled: x || E.stops.length >= m,
2640
+ disabled: x || E.stops.length >= o,
2651
2641
  onClick: () => {
2652
- let e = dt(E.stops, m);
2642
+ let e = vt(E.stops, o);
2653
2643
  B({ stops: e }), requestAnimationFrame(() => F.current?.querySelector(`[data-stop="${e[e.length - 1].id}"] input`)?.focus());
2654
2644
  },
2655
- children: [/* @__PURE__ */ s(Se, {}), "Agregar destino"]
2645
+ children: [/* @__PURE__ */ m(ke, {}), "Agregar destino"]
2656
2646
  }),
2657
- _ && /* @__PURE__ */ c("div", {
2647
+ _ && /* @__PURE__ */ h("div", {
2658
2648
  className: "ds-wroute-tolls",
2659
2649
  role: "group",
2660
2650
  "aria-label": "Peajes",
2661
2651
  "data-motion": "tolls",
2662
- children: [E.tolls.map((e, t) => /* @__PURE__ */ c("div", {
2652
+ children: [E.tolls.map((e, t) => /* @__PURE__ */ h("div", {
2663
2653
  className: "ds-wroute-toll",
2664
2654
  "data-motion": `toll:${t}`,
2665
2655
  children: [
2666
- /* @__PURE__ */ c("label", {
2656
+ /* @__PURE__ */ h("label", {
2667
2657
  htmlFor: `${C}-toll-${t}`,
2668
2658
  children: ["Peaje ", t + 1]
2669
2659
  }),
2670
- /* @__PURE__ */ s("input", {
2660
+ /* @__PURE__ */ m("input", {
2671
2661
  id: `${C}-toll-${t}`,
2672
2662
  className: "ds-wroute-input",
2673
2663
  type: "text",
@@ -2677,21 +2667,21 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2677
2667
  disabled: x,
2678
2668
  onChange: (e) => B({ tolls: E.tolls.map((n, r) => r === t ? e.target.value : n) })
2679
2669
  }),
2680
- E.tolls.length > 1 && /* @__PURE__ */ s("button", {
2670
+ E.tolls.length > 1 && /* @__PURE__ */ m("button", {
2681
2671
  type: "button",
2682
2672
  className: "ds-wroute-clear",
2683
2673
  "aria-label": `Quitar peaje ${t + 1}`,
2684
2674
  disabled: x,
2685
- onClick: (e) => R(e, () => B({ tolls: ht(E.tolls, t) })),
2686
- children: /* @__PURE__ */ s(_e, {})
2675
+ onClick: (e) => R(e, () => B({ tolls: St(E.tolls, t) })),
2676
+ children: /* @__PURE__ */ m(we, {})
2687
2677
  })
2688
2678
  ]
2689
- }, t)), /* @__PURE__ */ c("button", {
2679
+ }, t)), /* @__PURE__ */ h("button", {
2690
2680
  type: "button",
2691
2681
  className: "ds-wroute-toll-add",
2692
- disabled: x || E.tolls.length >= h,
2693
- onClick: () => B({ tolls: mt(E.tolls, h) }),
2694
- children: [/* @__PURE__ */ s(Se, {}), "Agregar peaje"]
2682
+ disabled: x || E.tolls.length >= u,
2683
+ onClick: () => B({ tolls: xt(E.tolls, u) }),
2684
+ children: [/* @__PURE__ */ m(ke, {}), "Agregar peaje"]
2695
2685
  })]
2696
2686
  })
2697
2687
  ] })]
@@ -2699,30 +2689,30 @@ function xt({ title: r = "Ruta", headingLevel: l = 3, value: u, defaultValue: d,
2699
2689
  }
2700
2690
  //#endregion
2701
2691
  //#region src/wari/WariPassengerField.tsx
2702
- function St({ value: e, defaultValue: t, onChange: n, onClear: r, loading: i = !1, loadingLabel: o = "Buscando pasajero…", label: l = "Pasajero", namePlaceholder: u = "Nombre del pasajero", phonePlaceholder: d = "Ingresa el número del pasajero", nameLabel: f = "Nombre del pasajero", phoneLabel: p = "Número del pasajero", clearLabel: m = "Quitar pasajero", showClear: h = !0, nameInputName: g, phoneInputName: _, disabled: v = !1, className: y }) {
2703
- let [b, x] = a(() => ({
2704
- ...ct(),
2692
+ function kt({ value: e, defaultValue: t, onChange: n, onClear: r, loading: i = !1, loadingLabel: a = "Buscando pasajero…", label: o = "Pasajero", namePlaceholder: s = "Nombre del pasajero", phonePlaceholder: c = "Ingresa el número del pasajero", nameLabel: l = "Nombre del pasajero", phoneLabel: u = "Número del pasajero", clearLabel: d = "Quitar pasajero", showClear: p = !0, nameInputName: g, phoneInputName: _, disabled: v = !1, className: y }) {
2693
+ let [b, x] = f(() => ({
2694
+ ...ht(),
2705
2695
  ...t
2706
2696
  })), S = e ?? b, C = (t) => {
2707
2697
  e === void 0 && x(t), n?.(t);
2708
2698
  };
2709
- return /* @__PURE__ */ c("div", {
2699
+ return /* @__PURE__ */ h("div", {
2710
2700
  className: ["ds-wpassenger", y].filter(Boolean).join(" "),
2711
2701
  role: "group",
2712
- "aria-label": l,
2702
+ "aria-label": o,
2713
2703
  "aria-busy": i || void 0,
2714
- children: [/* @__PURE__ */ c("div", {
2704
+ children: [/* @__PURE__ */ h("div", {
2715
2705
  className: "ds-wpassenger-row",
2716
2706
  children: [
2717
- /* @__PURE__ */ c("label", {
2707
+ /* @__PURE__ */ h("label", {
2718
2708
  className: "ds-wpassenger-field",
2719
- children: [/* @__PURE__ */ s(xe, {}), /* @__PURE__ */ s("input", {
2709
+ children: [/* @__PURE__ */ m(Oe, {}), /* @__PURE__ */ m("input", {
2720
2710
  className: "ds-wpassenger-input",
2721
2711
  type: "text",
2722
2712
  autoComplete: "name",
2723
2713
  name: g,
2724
- placeholder: u,
2725
- "aria-label": f,
2714
+ placeholder: s,
2715
+ "aria-label": l,
2726
2716
  value: S.name,
2727
2717
  disabled: v,
2728
2718
  onChange: (e) => C({
@@ -2731,16 +2721,16 @@ function St({ value: e, defaultValue: t, onChange: n, onClear: r, loading: i = !
2731
2721
  })
2732
2722
  })]
2733
2723
  }),
2734
- /* @__PURE__ */ c("label", {
2724
+ /* @__PURE__ */ h("label", {
2735
2725
  className: "ds-wpassenger-field",
2736
- children: [S.phone ? /* @__PURE__ */ s(we, {}) : /* @__PURE__ */ s(de, {}), /* @__PURE__ */ s("input", {
2726
+ children: [S.phone ? /* @__PURE__ */ m(je, {}) : /* @__PURE__ */ m(_e, {}), /* @__PURE__ */ m("input", {
2737
2727
  className: "ds-wpassenger-input",
2738
2728
  type: "tel",
2739
2729
  autoComplete: "tel",
2740
2730
  inputMode: "tel",
2741
2731
  name: _,
2742
- placeholder: d,
2743
- "aria-label": p,
2732
+ placeholder: c,
2733
+ "aria-label": u,
2744
2734
  value: S.phone,
2745
2735
  disabled: v,
2746
2736
  onChange: (e) => C({
@@ -2749,26 +2739,158 @@ function St({ value: e, defaultValue: t, onChange: n, onClear: r, loading: i = !
2749
2739
  })
2750
2740
  })]
2751
2741
  }),
2752
- h && /* @__PURE__ */ s("button", {
2742
+ p && /* @__PURE__ */ m("button", {
2753
2743
  type: "button",
2754
2744
  className: "ds-wpassenger-clear",
2755
- "aria-label": m,
2756
- title: m,
2745
+ "aria-label": d,
2746
+ title: d,
2757
2747
  disabled: v,
2758
2748
  onClick: () => {
2759
- C(ct()), r?.();
2749
+ C(ht()), r?.();
2760
2750
  },
2761
- children: /* @__PURE__ */ s(Ce, {})
2751
+ children: /* @__PURE__ */ m(Ae, {})
2762
2752
  })
2763
2753
  ]
2764
- }), i && /* @__PURE__ */ s("div", {
2754
+ }), i && /* @__PURE__ */ m("div", {
2765
2755
  className: "ds-wclient-progress ds-wpassenger-progress",
2766
2756
  role: "progressbar",
2767
- "aria-label": o
2757
+ "aria-label": a
2768
2758
  })]
2769
2759
  });
2770
2760
  }
2771
2761
  //#endregion
2772
- export { b as MultiSelect, d as StatusTag, Qe as WariClientDetails, Ze as WariClientSearch, Te as WariDateField, St as WariPassengerField, xt as WariRoute, Me as WariSchedule, Ke as WariSelect, Ye as WariServiceMeta, x as WariStatusSelect, qe as WariStepper, Je as WariSwitchList, je as WariTimeField, Xe as WariTripAttributes, dt as addStop, mt as addToll, A as calendarWeeks, ze as clampCount, ot as createStop, st as defaultRouteValue, Ie as defaultTripAttributes, ct as emptyPassenger, p as filterOptions, E as formatDisplayDate, z as formatDisplayTime, Le as formatSoles, ut as invertRoute, lt as moveStop, yt as normalizeRoute, f as normalizeSearch, D as parseDisplayDate, B as parseDisplayTime, w as parseISODate, I as parseTime24, ft as removeStop, ht as removeToll, g as selectionState, v as selectionSummary, Re as serviceMeta, vt as stopLabel, _t as stopPlaceholder, Ue as syncExtraChoices, We as syncExtraFields, He as syncExtraQuantities, Ge as syncExtras, C as toISODate, T as todayISO, _ as toggleAll, Ve as toggleExtra, h as toggleValue, gt as tollsTotal, Be as typeaheadIndex, pt as updateStop, Pe as wariExtras, Fe as wariPaymentMethods, Ne as wariServices, u as wariStatusLabel, l as wariStatuses };
2762
+ //#region src/wari/inbox.ts
2763
+ var At = [
2764
+ {
2765
+ value: "historial",
2766
+ label: "Historial"
2767
+ },
2768
+ {
2769
+ value: "mensajes",
2770
+ label: "Mensajes"
2771
+ },
2772
+ {
2773
+ value: "incidencias",
2774
+ label: "Incidencias/ suspensiones/ bloqueos"
2775
+ },
2776
+ {
2777
+ value: "equipo",
2778
+ label: "Log. Equipo"
2779
+ }
2780
+ ], jt = {
2781
+ mensajes: [
2782
+ {
2783
+ value: "todos",
2784
+ label: "Todos"
2785
+ },
2786
+ {
2787
+ value: "conductor",
2788
+ label: "Del conductor"
2789
+ },
2790
+ {
2791
+ value: "personales",
2792
+ label: "Personales"
2793
+ },
2794
+ {
2795
+ value: "masivos",
2796
+ label: "Masivos"
2797
+ }
2798
+ ],
2799
+ incidencias: [
2800
+ {
2801
+ value: "todos",
2802
+ label: "Todos"
2803
+ },
2804
+ {
2805
+ value: "incidencia",
2806
+ label: "Incidencia"
2807
+ },
2808
+ {
2809
+ value: "suspension",
2810
+ label: "Suspensión"
2811
+ },
2812
+ {
2813
+ value: "bloqueo-cliente",
2814
+ label: "Bloqueo cliente"
2815
+ },
2816
+ {
2817
+ value: "bloqueo-empresa",
2818
+ label: "Bloqueo empresa"
2819
+ }
2820
+ ]
2821
+ }, Mt = "M3.5 4.5h17a.8.8 0 0 1 .6 1.3L14.5 13v5.6a.8.8 0 0 1-.4.7l-3.4 1.9a.8.8 0 0 1-1.2-.7V13L2.9 5.8a.8.8 0 0 1 .6-1.3Z", Nt = "M15 4h5v5M20 4l-6 6M9 20H4v-5M4 20l6-6M4 9V4h5M4 4l6 6M20 15v5h-5M20 20l-6-6", Pt = ({ path: e, filled: t }) => /* @__PURE__ */ m("svg", {
2822
+ viewBox: "0 0 24 24",
2823
+ width: 16,
2824
+ height: 16,
2825
+ "aria-hidden": "true",
2826
+ fill: t ? "currentColor" : "none",
2827
+ stroke: t ? "none" : "currentColor",
2828
+ strokeWidth: 2,
2829
+ strokeLinecap: "round",
2830
+ strokeLinejoin: "round",
2831
+ children: /* @__PURE__ */ m("path", { d: e })
2832
+ });
2833
+ function Ft({ label: i = "Bandeja interna del conductor", tabs: s = At, tab: c, defaultTab: l, onTabChange: u, filters: d = jt, filter: g, onFilterChange: _, onAdvancedFilters: v, advancedFiltersLabel: y = "Filtros avanzados", onViewAll: b, viewAllLabel: x = "Ver lista completa", actions: S, children: C, className: w }) {
2834
+ let [T, E] = f(l ?? s[0]?.value ?? ""), D = c ?? T, [O, k] = f({}), A = d[D] ?? [], j = A.length ? g ?? O[D] ?? A[0].value : void 0, M = typeof C == "function" ? C({
2835
+ tab: D,
2836
+ filter: j
2837
+ }) : C;
2838
+ return /* @__PURE__ */ m("section", {
2839
+ className: ["ds-winbox", w].filter(Boolean).join(" "),
2840
+ "aria-label": i,
2841
+ children: /* @__PURE__ */ h(a, {
2842
+ value: D,
2843
+ onValueChange: (e) => {
2844
+ E(e), u?.(e);
2845
+ },
2846
+ children: [/* @__PURE__ */ m(e, {
2847
+ variant: "segmented",
2848
+ children: s.map((e) => /* @__PURE__ */ m(n, {
2849
+ value: e.value,
2850
+ disabled: e.disabled,
2851
+ children: e.label
2852
+ }, e.value))
2853
+ }), s.map((e) => /* @__PURE__ */ m(r, {
2854
+ value: e.value,
2855
+ children: e.value === D && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
2856
+ className: "ds-winbox-toolbar",
2857
+ children: [A.length > 0 && j !== void 0 && /* @__PURE__ */ m(o, {
2858
+ label: `Filtrar ${e.label.toLowerCase()}`,
2859
+ variant: "brand",
2860
+ options: A,
2861
+ value: j,
2862
+ onChange: (e) => {
2863
+ k((t) => ({
2864
+ ...t,
2865
+ [D]: e
2866
+ })), _?.(e, D);
2867
+ }
2868
+ }), (S || v || b) && /* @__PURE__ */ h("div", {
2869
+ className: "ds-winbox-actions",
2870
+ children: [
2871
+ S,
2872
+ v && /* @__PURE__ */ m(t, {
2873
+ variant: "secondary",
2874
+ leftIcon: /* @__PURE__ */ m(Pt, {
2875
+ path: "M3.5 4.5h17a.8.8 0 0 1 .6 1.3L14.5 13v5.6a.8.8 0 0 1-.4.7l-3.4 1.9a.8.8 0 0 1-1.2-.7V13L2.9 5.8a.8.8 0 0 1 .6-1.3Z",
2876
+ filled: !0
2877
+ }),
2878
+ onClick: () => v(D),
2879
+ children: y
2880
+ }),
2881
+ b && /* @__PURE__ */ m(t, {
2882
+ leftIcon: /* @__PURE__ */ m(Pt, { path: "M15 4h5v5M20 4l-6 6M9 20H4v-5M4 20l6-6M4 9V4h5M4 4l6 6M20 15v5h-5M20 20l-6-6" }),
2883
+ onClick: () => b(D),
2884
+ children: x
2885
+ })
2886
+ ]
2887
+ })]
2888
+ }), M] })
2889
+ }, e.value))]
2890
+ })
2891
+ });
2892
+ }
2893
+ //#endregion
2894
+ export { D as MultiSelect, v as StatusTag, at as WariClientDetails, it as WariClientSearch, Me as WariDateField, Ft as WariDriverInbox, kt as WariPassengerField, Ot as WariRoute, ze as WariSchedule, $e as WariSelect, nt as WariServiceMeta, O as WariStatusSelect, et as WariStepper, tt as WariSwitchList, Re as WariTimeField, rt as WariTripAttributes, vt as addStop, xt as addToll, L as calendarWeeks, Ke as clampCount, pt as createStop, mt as defaultRouteValue, Ue as defaultTripAttributes, ht as emptyPassenger, Nt as expandIconPath, b as filterOptions, N as formatDisplayDate, re as formatDisplayTime, We as formatSoles, Mt as funnelIconPath, _t as invertRoute, gt as moveStop, Et as normalizeRoute, y as normalizeSearch, P as parseDisplayDate, W as parseDisplayTime, j as parseISODate, H as parseTime24, yt as removeStop, St as removeToll, C as selectionState, T as selectionSummary, Ge as serviceMeta, Tt as stopLabel, wt as stopPlaceholder, Xe as syncExtraChoices, Ze as syncExtraFields, Ye as syncExtraQuantities, Qe as syncExtras, A as toISODate, M as todayISO, w as toggleAll, Je as toggleExtra, S as toggleValue, Ct as tollsTotal, qe as typeaheadIndex, bt as updateStop, Ve as wariExtras, jt as wariInboxFilters, At as wariInboxTabs, He as wariPaymentMethods, Be as wariServices, _ as wariStatusLabel, g as wariStatuses };
2773
2895
 
2774
2896
  //# sourceMappingURL=wari.js.map