@ericbutera/kaleido 0.1.7 → 0.1.8

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/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import F, { createContext as lr, useContext as It, useEffect as Ze, useState as qe, useRef as cr, useMemo as dr } from "react";
2
- import ur from "react-hot-toast";
3
- import { useNavigate as we, useSearchParams as Ye, useLocation as fr, Link as ge } from "react-router-dom";
4
- import { useForm as Ie } from "react-hook-form";
5
- import { faRightToBracket as hr, faStore as mr, faSort as pr, faSortUp as gr, faSortDown as yr } from "@fortawesome/free-solid-svg-icons";
6
- import { FontAwesomeIcon as Qe } from "@fortawesome/react-fontawesome";
7
- var Le = { exports: {} }, Ce = {};
8
- var dt;
9
- function vr() {
10
- if (dt) return Ce;
11
- dt = 1;
1
+ import F, { createContext as dr, useContext as Mt, useEffect as Ie, useState as de, useRef as ur, useMemo as fr } from "react";
2
+ import Lt from "react-hot-toast";
3
+ import { faEnvelope as hr, faRightToBracket as mr, faStore as pr, faSort as gr, faSortUp as vr, faSortDown as yr } from "@fortawesome/free-solid-svg-icons";
4
+ import { FontAwesomeIcon as Le } from "@fortawesome/react-fontawesome";
5
+ import { useLocation as it, Link as se, useNavigate as ke, useSearchParams as ot } from "react-router-dom";
6
+ import { useForm as $e } from "react-hook-form";
7
+ var De = { exports: {} }, Se = {};
8
+ var ut;
9
+ function xr() {
10
+ if (ut) return Se;
11
+ ut = 1;
12
12
  var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
13
13
  function t(s, n, a) {
14
14
  var d = null;
@@ -25,19 +25,19 @@ function vr() {
25
25
  props: a
26
26
  };
27
27
  }
28
- return Ce.Fragment = e, Ce.jsx = t, Ce.jsxs = t, Ce;
28
+ return Se.Fragment = e, Se.jsx = t, Se.jsxs = t, Se;
29
29
  }
30
- var Se = {};
31
- var ut;
30
+ var Re = {};
31
+ var ft;
32
32
  function _r() {
33
- return ut || (ut = 1, process.env.NODE_ENV !== "production" && (function() {
33
+ return ft || (ft = 1, process.env.NODE_ENV !== "production" && (function() {
34
34
  function r(m) {
35
35
  if (m == null) return null;
36
36
  if (typeof m == "function")
37
37
  return m.$$typeof === q ? null : m.displayName || m.name || null;
38
38
  if (typeof m == "string") return m;
39
39
  switch (m) {
40
- case x:
40
+ case _:
41
41
  return "Fragment";
42
42
  case R:
43
43
  return "Profiler";
@@ -47,7 +47,7 @@ function _r() {
47
47
  return "Suspense";
48
48
  case B:
49
49
  return "SuspenseList";
50
- case le:
50
+ case ce:
51
51
  return "Activity";
52
52
  }
53
53
  if (typeof m == "object")
@@ -95,7 +95,7 @@ function _r() {
95
95
  }
96
96
  }
97
97
  function s(m) {
98
- if (m === x) return "<>";
98
+ if (m === _) return "<>";
99
99
  if (typeof m == "object" && m !== null && m.$$typeof === G)
100
100
  return "<...>";
101
101
  try {
@@ -121,7 +121,7 @@ function _r() {
121
121
  }
122
122
  function u(m, E) {
123
123
  function $() {
124
- ke || (ke = !0, console.error(
124
+ je || (je = !0, console.error(
125
125
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
126
126
  E
127
127
  ));
@@ -133,14 +133,14 @@ function _r() {
133
133
  }
134
134
  function i() {
135
135
  var m = r(this.type);
136
- return re[m] || (re[m] = !0, console.error(
136
+ return te[m] || (te[m] = !0, console.error(
137
137
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
138
138
  )), m = this.props.ref, m !== void 0 ? m : null;
139
139
  }
140
- function o(m, E, $, D, Me, He) {
140
+ function o(m, E, $, D, Ze, Qe) {
141
141
  var V = $.ref;
142
142
  return m = {
143
- $$typeof: y,
143
+ $$typeof: v,
144
144
  type: m,
145
145
  key: E,
146
146
  props: $,
@@ -162,15 +162,15 @@ function _r() {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: Me
165
+ value: Ze
166
166
  }), Object.defineProperty(m, "_debugTask", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
- value: He
170
+ value: Qe
171
171
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
172
172
  }
173
- function l(m, E, $, D, Me, He) {
173
+ function c(m, E, $, D, Ze, Qe) {
174
174
  var V = E.children;
175
175
  if (V !== void 0)
176
176
  if (D)
@@ -185,10 +185,10 @@ function _r() {
185
185
  else f(V);
186
186
  if (Y.call(E, "key")) {
187
187
  V = r(m);
188
- var he = Object.keys(E).filter(function(or) {
189
- return or !== "key";
188
+ var pe = Object.keys(E).filter(function(cr) {
189
+ return cr !== "key";
190
190
  });
191
- D = 0 < he.length ? "{key: someKey, " + he.join(": ..., ") + ": ...}" : "{key: someKey}", Ee[V + D] || (he = 0 < he.length ? "{" + he.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ D = 0 < pe.length ? "{key: someKey, " + pe.join(": ..., ") + ": ...}" : "{key: someKey}", Ce[V + D] || (pe = 0 < pe.length ? "{" + pe.join(": ..., ") + ": ...}" : "{}", console.error(
192
192
  `A props object containing a "key" prop is being spread into JSX:
193
193
  let props = %s;
194
194
  <%s {...props} />
@@ -197,14 +197,14 @@ React keys must be passed directly to JSX without using spread:
197
197
  <%s key={someKey} {...props} />`,
198
198
  D,
199
199
  V,
200
- he,
200
+ pe,
201
201
  V
202
- ), Ee[V + D] = !0);
202
+ ), Ce[V + D] = !0);
203
203
  }
204
204
  if (V = null, $ !== void 0 && (t($), V = "" + $), d(E) && (t(E.key), V = "" + E.key), "key" in E) {
205
205
  $ = {};
206
- for (var Ge in E)
207
- Ge !== "key" && ($[Ge] = E[Ge]);
206
+ for (var He in E)
207
+ He !== "key" && ($[He] = E[He]);
208
208
  } else $ = E;
209
209
  return V && u(
210
210
  $,
@@ -214,17 +214,17 @@ React keys must be passed directly to JSX without using spread:
214
214
  V,
215
215
  $,
216
216
  n(),
217
- Me,
218
- He
217
+ Ze,
218
+ Qe
219
219
  );
220
220
  }
221
221
  function f(m) {
222
222
  h(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === G && (m._payload.status === "fulfilled" ? h(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
223
223
  }
224
224
  function h(m) {
225
- return typeof m == "object" && m !== null && m.$$typeof === y;
225
+ return typeof m == "object" && m !== null && m.$$typeof === v;
226
226
  }
227
- var p = F, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), G = /* @__PURE__ */ Symbol.for("react.lazy"), le = /* @__PURE__ */ Symbol.for("react.activity"), q = /* @__PURE__ */ Symbol.for("react.client.reference"), P = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, Q = Array.isArray, U = console.createTask ? console.createTask : function() {
227
+ var p = F, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), G = /* @__PURE__ */ Symbol.for("react.lazy"), ce = /* @__PURE__ */ Symbol.for("react.activity"), q = /* @__PURE__ */ Symbol.for("react.client.reference"), P = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, Q = Array.isArray, U = console.createTask ? console.createTask : function() {
228
228
  return null;
229
229
  };
230
230
  p = {
@@ -232,40 +232,40 @@ React keys must be passed directly to JSX without using spread:
232
232
  return m();
233
233
  }
234
234
  };
235
- var ke, re = {}, je = p.react_stack_bottom_frame.bind(
235
+ var je, te = {}, Ne = p.react_stack_bottom_frame.bind(
236
236
  p,
237
237
  a
238
- )(), Ne = U(s(a)), Ee = {};
239
- Se.Fragment = x, Se.jsx = function(m, E, $) {
238
+ )(), Ee = U(s(a)), Ce = {};
239
+ Re.Fragment = _, Re.jsx = function(m, E, $) {
240
240
  var D = 1e4 > P.recentlyCreatedOwnerStacks++;
241
- return l(
241
+ return c(
242
242
  m,
243
243
  E,
244
244
  $,
245
245
  !1,
246
- D ? Error("react-stack-top-frame") : je,
247
- D ? U(s(m)) : Ne
246
+ D ? Error("react-stack-top-frame") : Ne,
247
+ D ? U(s(m)) : Ee
248
248
  );
249
- }, Se.jsxs = function(m, E, $) {
249
+ }, Re.jsxs = function(m, E, $) {
250
250
  var D = 1e4 > P.recentlyCreatedOwnerStacks++;
251
- return l(
251
+ return c(
252
252
  m,
253
253
  E,
254
254
  $,
255
255
  !0,
256
- D ? Error("react-stack-top-frame") : je,
257
- D ? U(s(m)) : Ne
256
+ D ? Error("react-stack-top-frame") : Ne,
257
+ D ? U(s(m)) : Ee
258
258
  );
259
259
  };
260
- })()), Se;
260
+ })()), Re;
261
261
  }
262
- var ft;
263
- function xr() {
264
- return ft || (ft = 1, process.env.NODE_ENV === "production" ? Le.exports = vr() : Le.exports = _r()), Le.exports;
262
+ var ht;
263
+ function br() {
264
+ return ht || (ht = 1, process.env.NODE_ENV === "production" ? De.exports = xr() : De.exports = _r()), De.exports;
265
265
  }
266
- var c = xr();
267
- const ot = lr(null);
268
- function br({
266
+ var l = br();
267
+ const lt = dr(null);
268
+ function wr({
269
269
  client: r,
270
270
  config: e = {},
271
271
  children: t
@@ -275,25 +275,25 @@ function br({
275
275
  registrationEnabled: !0,
276
276
  OAuthButton: void 0
277
277
  }, ...e };
278
- return /* @__PURE__ */ c.jsx(ot.Provider, { value: { client: r, config: n }, children: t });
278
+ return /* @__PURE__ */ l.jsx(lt.Provider, { value: { client: r, config: n }, children: t });
279
279
  }
280
- function te() {
281
- const r = It(ot);
280
+ function oe() {
281
+ const r = Mt(lt);
282
282
  if (!r)
283
283
  throw new Error(
284
284
  "useAuthApi must be used within AuthProvider. Wrap your app with <AuthProvider client={yourApiClient}>"
285
285
  );
286
286
  return r.client;
287
287
  }
288
- function Mt() {
289
- const r = It(ot);
288
+ function $t() {
289
+ const r = Mt(lt);
290
290
  if (!r)
291
291
  throw new Error(
292
292
  "useAuthConfig must be used within AuthProvider. Wrap your app with <AuthProvider client={yourApiClient}>"
293
293
  );
294
294
  return r.config;
295
295
  }
296
- function lt(r, e, t = "An error occurred", s = !0) {
296
+ function ct(r, e, t = "An error occurred", s = !0) {
297
297
  const n = r;
298
298
  if (n?.errors && Object.entries(n.errors).forEach(([a, d]) => {
299
299
  e(a, {
@@ -302,100 +302,118 @@ function lt(r, e, t = "An error occurred", s = !0) {
302
302
  });
303
303
  }), s) {
304
304
  const a = n?.message || t;
305
- ur.error(a);
305
+ Lt.error(a);
306
306
  }
307
307
  }
308
- function Lt(r, e, t = "/") {
308
+ function Zt(r, e, t = "/") {
309
309
  const s = new URLSearchParams(e.search), n = s.get("origin") || s.get("redirect");
310
310
  r(n || t, { replace: !0 });
311
311
  }
312
- function oe({ children: r }) {
313
- return /* @__PURE__ */ c.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ c.jsx("div", { className: "card-body p-8", children: r }) }) });
312
+ function le({ children: r }) {
313
+ return /* @__PURE__ */ l.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ l.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ l.jsx("div", { className: "card-body p-8", children: r }) }) });
314
314
  }
315
- function wr() {
316
- const r = we(), [e] = Ye(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
317
- try {
318
- n && await s.mutateAsync(n), r("/");
319
- } catch {
320
- }
321
- };
322
- return /* @__PURE__ */ c.jsxs(oe, { children: [
323
- /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Confirm Email" }),
324
- /* @__PURE__ */ c.jsx("p", { className: "mb-4", children: "Click the button to confirm your email address." }),
325
- /* @__PURE__ */ c.jsx("div", { className: "join", children: /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary", onClick: a, children: "Confirm" }) })
315
+ function kr() {
316
+ const e = it().state.email;
317
+ return /* @__PURE__ */ l.jsxs(le, { children: [
318
+ /* @__PURE__ */ l.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
319
+ /* @__PURE__ */ l.jsx(Le, { icon: hr }),
320
+ "Check Your Email"
321
+ ] }),
322
+ /* @__PURE__ */ l.jsxs("div", { className: "mt-4 text-sm text-center", children: [
323
+ /* @__PURE__ */ l.jsxs("p", { children: [
324
+ "We've sent a confirmation link to ",
325
+ /* @__PURE__ */ l.jsx("strong", { children: e }),
326
+ "."
327
+ ] }),
328
+ /* @__PURE__ */ l.jsx("p", { className: "mt-2", children: "Click the link in the email to activate your account." })
329
+ ] }),
330
+ /* @__PURE__ */ l.jsx("div", { className: "divider" }),
331
+ /* @__PURE__ */ l.jsxs("div", { className: "join w-full justify-center", children: [
332
+ /* @__PURE__ */ l.jsx(
333
+ se,
334
+ {
335
+ to: "/resend-confirmation",
336
+ state: { email: e },
337
+ className: "btn join-item",
338
+ title: "Didn't receive the email?",
339
+ children: "Resend Confirmation"
340
+ }
341
+ ),
342
+ /* @__PURE__ */ l.jsx(se, { to: "/", className: "btn join-item", children: "Home" })
343
+ ] })
326
344
  ] });
327
345
  }
328
- function kr() {
329
- const { register: r, handleSubmit: e } = Ie({
346
+ function jr() {
347
+ const { register: r, handleSubmit: e } = $e({
330
348
  defaultValues: { email: "" }
331
- }), { useForgotPassword: t } = te(), s = t(), n = async (a) => {
349
+ }), { useForgotPassword: t } = oe(), s = t(), n = async (a) => {
332
350
  try {
333
351
  await s.mutateAsync(a.email);
334
352
  } catch {
335
353
  }
336
354
  };
337
- return /* @__PURE__ */ c.jsxs(oe, { children: [
338
- /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Forgot Password" }),
339
- /* @__PURE__ */ c.jsxs("form", { onSubmit: e(n), children: [
340
- /* @__PURE__ */ c.jsx("label", { className: "label", children: "Email" }),
341
- /* @__PURE__ */ c.jsx(
355
+ return /* @__PURE__ */ l.jsxs(le, { children: [
356
+ /* @__PURE__ */ l.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Forgot Password" }),
357
+ /* @__PURE__ */ l.jsxs("form", { onSubmit: e(n), children: [
358
+ /* @__PURE__ */ l.jsx("label", { className: "label", children: "Email" }),
359
+ /* @__PURE__ */ l.jsx(
342
360
  "input",
343
361
  {
344
362
  className: "input input-bordered w-full",
345
363
  ...r("email", { required: !0 })
346
364
  }
347
365
  ),
348
- /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Send Reset" })
366
+ /* @__PURE__ */ l.jsx("button", { className: "btn btn-primary mt-4", children: "Send Reset" })
349
367
  ] })
350
368
  ] });
351
369
  }
352
- function jr() {
370
+ function Nr() {
353
371
  const {
354
372
  register: r,
355
373
  handleSubmit: e,
356
374
  setError: t,
357
375
  formState: { errors: s, isSubmitting: n }
358
- } = Ie({
376
+ } = $e({
359
377
  defaultValues: { email: "", password: "" }
360
- }), a = we(), d = fr(), { useLoginUser: u, useCurrentUser: i } = te(), { oauthEnabled: o, registrationEnabled: l, OAuthButton: f } = Mt(), h = u(), { user: p } = i();
361
- Ze(() => {
362
- p && Lt(a, d);
378
+ }), a = ke(), d = it(), { useLoginUser: u, useCurrentUser: i } = oe(), { oauthEnabled: o, registrationEnabled: c, OAuthButton: f } = $t(), h = u(), { user: p } = i();
379
+ Ie(() => {
380
+ p && Zt(a, d);
363
381
  }, [p, a, d]);
364
- const y = async (w) => {
382
+ const v = async (w) => {
365
383
  try {
366
384
  await h.mutateAsync(w, t), a("/");
367
- } catch (x) {
368
- const M = x?.response?.status;
385
+ } catch (_) {
386
+ const M = _?.response?.status;
369
387
  if (M == 401)
370
388
  t("root", {
371
389
  type: "server",
372
390
  message: "Invalid email or password"
373
391
  });
374
392
  else if (M == 422) {
375
- const R = x?.response?.data, k = R && (R.error || R.message) || "Too many login attempts. Please try again later.";
393
+ const R = _?.response?.data, k = R && (R.error || R.message) || "Too many login attempts. Please try again later.";
376
394
  t("root", { type: "server", message: k });
377
395
  } else {
378
- const R = x?.response?.data ?? x;
379
- lt(R, t, "Failed to sign in");
396
+ const R = _?.response?.data ?? _;
397
+ ct(R, t, "Failed to sign in");
380
398
  }
381
399
  }
382
400
  };
383
- return /* @__PURE__ */ c.jsxs(oe, { children: [
384
- /* @__PURE__ */ c.jsxs("div", { className: "text-center mb-6", children: [
385
- /* @__PURE__ */ c.jsx("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4", children: /* @__PURE__ */ c.jsx(
386
- Qe,
401
+ return /* @__PURE__ */ l.jsxs(le, { children: [
402
+ /* @__PURE__ */ l.jsxs("div", { className: "text-center mb-6", children: [
403
+ /* @__PURE__ */ l.jsx("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-primary/10 rounded-full mb-4", children: /* @__PURE__ */ l.jsx(
404
+ Le,
387
405
  {
388
- icon: hr,
406
+ icon: mr,
389
407
  className: "text-3xl text-primary"
390
408
  }
391
409
  ) }),
392
- /* @__PURE__ */ c.jsx("h2", { className: "text-3xl font-bold mb-2", children: "Welcome Back" })
410
+ /* @__PURE__ */ l.jsx("h2", { className: "text-3xl font-bold mb-2", children: "Welcome Back" })
393
411
  ] }),
394
- /* @__PURE__ */ c.jsxs("form", { onSubmit: e(y), children: [
395
- s.root && /* @__PURE__ */ c.jsx("div", { className: "alert alert-error alert-soft mb-4", children: /* @__PURE__ */ c.jsx("span", { children: s.root.message }) }),
396
- /* @__PURE__ */ c.jsxs("fieldset", { className: "fieldset", children: [
397
- /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "login-email", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Email" }) }),
398
- /* @__PURE__ */ c.jsx(
412
+ /* @__PURE__ */ l.jsxs("form", { onSubmit: e(v), children: [
413
+ s.root && /* @__PURE__ */ l.jsx("div", { className: "alert alert-error alert-soft mb-4", children: /* @__PURE__ */ l.jsx("span", { children: s.root.message }) }),
414
+ /* @__PURE__ */ l.jsxs("fieldset", { className: "fieldset", children: [
415
+ /* @__PURE__ */ l.jsx("label", { className: "label", htmlFor: "login-email", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Email" }) }),
416
+ /* @__PURE__ */ l.jsx(
399
417
  "input",
400
418
  {
401
419
  id: "login-email",
@@ -405,9 +423,9 @@ function jr() {
405
423
  ...r("email", { required: "Email is required" })
406
424
  }
407
425
  ),
408
- s.email && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: s.email.message }),
409
- /* @__PURE__ */ c.jsx("label", { className: "label mt-4", htmlFor: "login-password", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Password" }) }),
410
- /* @__PURE__ */ c.jsx(
426
+ s.email && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: s.email.message }),
427
+ /* @__PURE__ */ l.jsx("label", { className: "label mt-4", htmlFor: "login-password", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Password" }) }),
428
+ /* @__PURE__ */ l.jsx(
411
429
  "input",
412
430
  {
413
431
  id: "login-password",
@@ -418,8 +436,8 @@ function jr() {
418
436
  ...r("password", { required: "Password is required" })
419
437
  }
420
438
  ),
421
- s.password && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: s.password.message }),
422
- /* @__PURE__ */ c.jsx(
439
+ s.password && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: s.password.message }),
440
+ /* @__PURE__ */ l.jsx(
423
441
  "button",
424
442
  {
425
443
  type: "submit",
@@ -430,64 +448,65 @@ function jr() {
430
448
  )
431
449
  ] })
432
450
  ] }),
433
- o && f && /* @__PURE__ */ c.jsx(f, { text: "Sign in with Google" }),
434
- /* @__PURE__ */ c.jsx("div", { className: "divider" }),
435
- /* @__PURE__ */ c.jsxs("div", { className: "join w-full justify-center", children: [
436
- /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/", children: "Home" }),
437
- /* @__PURE__ */ c.jsx(
438
- ge,
451
+ o && f && /* @__PURE__ */ l.jsx(f, { text: "Sign in with Google" }),
452
+ /* @__PURE__ */ l.jsx("div", { className: "divider" }),
453
+ /* @__PURE__ */ l.jsxs("div", { className: "join w-full justify-center", children: [
454
+ /* @__PURE__ */ l.jsx(se, { className: "btn join-item", to: "/", children: "Home" }),
455
+ /* @__PURE__ */ l.jsx(
456
+ se,
439
457
  {
440
458
  className: "btn join-item",
441
459
  to: "/signup",
442
- hidden: !l,
460
+ hidden: !c,
443
461
  children: "Create Account"
444
462
  }
445
463
  ),
446
- /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/forgot-password", children: "Forgot password" })
464
+ /* @__PURE__ */ l.jsx(se, { className: "btn join-item", to: "/forgot-password", children: "Forgot password" })
447
465
  ] })
448
466
  ] });
449
467
  }
450
- function Nr() {
451
- const r = we(), { useTokenRefresh: e } = te(), t = e?.();
452
- return Ze(() => {
468
+ function Er() {
469
+ const r = ke(), { useTokenRefresh: e } = oe(), t = e?.();
470
+ return Ie(() => {
453
471
  t?.mutateAsync?.().finally(() => r("/"));
454
- }, [r, t]), /* @__PURE__ */ c.jsx("div", { children: "Processing OAuth callback..." });
472
+ }, [r, t]), /* @__PURE__ */ l.jsx("div", { children: "Processing OAuth callback..." });
455
473
  }
456
- function Er() {
457
- const { register: r, handleSubmit: e } = Ie({
458
- defaultValues: { email: "" }
459
- }), { useResendConfirmationEmail: t } = te(), s = t(), n = async (a) => {
474
+ function Cr() {
475
+ const e = it().state?.email, { register: t, handleSubmit: s } = $e({
476
+ defaultValues: { email: e ?? "" }
477
+ }), { useResendConfirmationEmail: n } = oe(), a = n(), d = ke(), u = async (i) => {
460
478
  try {
461
- await s.mutateAsync(a);
479
+ await a.mutateAsync(i), d("/confirm-email", { state: { email: i.email } });
462
480
  } catch {
463
481
  }
464
482
  };
465
- return /* @__PURE__ */ c.jsxs(oe, { children: [
466
- /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Resend Confirmation" }),
467
- /* @__PURE__ */ c.jsxs("form", { onSubmit: e(n), children: [
468
- /* @__PURE__ */ c.jsx("label", { className: "label", children: "Email" }),
469
- /* @__PURE__ */ c.jsx(
483
+ return /* @__PURE__ */ l.jsxs(le, { children: [
484
+ /* @__PURE__ */ l.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Resend Confirmation" }),
485
+ /* @__PURE__ */ l.jsxs("form", { onSubmit: s(u), children: [
486
+ /* @__PURE__ */ l.jsx("label", { className: "label", children: "Email" }),
487
+ /* @__PURE__ */ l.jsx(
470
488
  "input",
471
489
  {
490
+ type: "email",
472
491
  className: "input input-bordered w-full",
473
- ...r("email", { required: !0 })
492
+ ...t("email", { required: !0 })
474
493
  }
475
494
  ),
476
- /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Resend" })
495
+ /* @__PURE__ */ l.jsx("button", { className: "btn btn-primary mt-4", children: "Resend" })
477
496
  ] })
478
497
  ] });
479
498
  }
480
- function Cr() {
481
- const { register: r, handleSubmit: e } = Ie({ defaultValues: { token: "", password: "" } }), { useResetPassword: t } = te(), s = t(), n = we(), [a] = Ye(), d = a.get("token") || void 0, u = async (i) => {
499
+ function Sr() {
500
+ const { register: r, handleSubmit: e } = $e({ defaultValues: { token: "", password: "" } }), { useResetPassword: t } = oe(), s = t(), n = ke(), [a] = ot(), d = a.get("token") || void 0, u = async (i) => {
482
501
  try {
483
502
  await s.mutateAsync(i), n("/");
484
503
  } catch {
485
504
  }
486
505
  };
487
- return /* @__PURE__ */ c.jsxs(oe, { children: [
488
- /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Reset Password" }),
489
- /* @__PURE__ */ c.jsxs("form", { onSubmit: e(u), children: [
490
- /* @__PURE__ */ c.jsx(
506
+ return /* @__PURE__ */ l.jsxs(le, { children: [
507
+ /* @__PURE__ */ l.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Reset Password" }),
508
+ /* @__PURE__ */ l.jsxs("form", { onSubmit: e(u), children: [
509
+ /* @__PURE__ */ l.jsx(
491
510
  "input",
492
511
  {
493
512
  type: "hidden",
@@ -495,29 +514,29 @@ function Cr() {
495
514
  defaultValue: d
496
515
  }
497
516
  ),
498
- /* @__PURE__ */ c.jsx("label", { className: "label", children: "New password" }),
499
- /* @__PURE__ */ c.jsx(
517
+ /* @__PURE__ */ l.jsx("label", { className: "label", children: "New password" }),
518
+ /* @__PURE__ */ l.jsx(
500
519
  "input",
501
520
  {
502
521
  className: "input input-bordered w-full",
503
522
  ...r("password", { required: !0 })
504
523
  }
505
524
  ),
506
- /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary mt-4", children: "Reset" })
525
+ /* @__PURE__ */ l.jsx("button", { className: "btn btn-primary mt-4", children: "Reset" })
507
526
  ] })
508
527
  ] });
509
528
  }
510
- function Sr({ redirectUrl: r = "" }) {
529
+ function Rr({ redirectUrl: r = "" }) {
511
530
  const {
512
531
  register: e,
513
532
  handleSubmit: t,
514
533
  setError: s,
515
534
  watch: n,
516
535
  formState: { errors: a, isSubmitting: d }
517
- } = Ie({
536
+ } = $e({
518
537
  defaultValues: { name: "", email: "", password: "", confirmPassword: "" }
519
- }), u = we(), i = !1, { useRegisterUser: o } = te(), l = o(), [f, h] = qe(null), p = async (y) => {
520
- if (h(null), y.password !== y.confirmPassword) {
538
+ }), u = ke(), i = !1, { useRegisterUser: o } = oe(), c = o(), [f, h] = de(null), p = async (v) => {
539
+ if (h(null), v.password !== v.confirmPassword) {
521
540
  s("confirmPassword", {
522
541
  type: "manual",
523
542
  message: "Passwords do not match"
@@ -525,21 +544,21 @@ function Sr({ redirectUrl: r = "" }) {
525
544
  return;
526
545
  }
527
546
  try {
528
- await l.mutateAsync(y, s), u("/confirm-email", { state: { email: y.email } });
547
+ await c.mutateAsync(v, s), u("/confirm-email", { state: { email: v.email } });
529
548
  } catch (w) {
530
- lt(w, s, "Failed to register account", !1);
549
+ ct(w, s, "Failed to register account", !1);
531
550
  }
532
551
  };
533
- return /* @__PURE__ */ c.jsxs(oe, { children: [
534
- /* @__PURE__ */ c.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
535
- /* @__PURE__ */ c.jsx(Qe, { icon: mr, className: "text-primary mr-2" }),
552
+ return /* @__PURE__ */ l.jsxs(le, { children: [
553
+ /* @__PURE__ */ l.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
554
+ /* @__PURE__ */ l.jsx(Le, { icon: pr, className: "text-primary mr-2" }),
536
555
  "Sign Up"
537
556
  ] }),
538
- f && /* @__PURE__ */ c.jsx("div", { role: "alert", className: "alert alert-warning alert-soft mb-4", children: /* @__PURE__ */ c.jsx("span", { children: f }) }),
539
- /* @__PURE__ */ c.jsx("form", { onSubmit: t(p), children: /* @__PURE__ */ c.jsxs("fieldset", { className: "fieldset", children: [
540
- /* @__PURE__ */ c.jsx("legend", { className: "fieldset-legend", children: "Account Details" }),
541
- /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-name", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Name" }) }),
542
- /* @__PURE__ */ c.jsx(
557
+ f && /* @__PURE__ */ l.jsx("div", { role: "alert", className: "alert alert-warning alert-soft mb-4", children: /* @__PURE__ */ l.jsx("span", { children: f }) }),
558
+ /* @__PURE__ */ l.jsx("form", { onSubmit: t(p), children: /* @__PURE__ */ l.jsxs("fieldset", { className: "fieldset", children: [
559
+ /* @__PURE__ */ l.jsx("legend", { className: "fieldset-legend", children: "Account Details" }),
560
+ /* @__PURE__ */ l.jsx("label", { className: "label", htmlFor: "signup-name", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Name" }) }),
561
+ /* @__PURE__ */ l.jsx(
543
562
  "input",
544
563
  {
545
564
  id: "signup-name",
@@ -555,9 +574,9 @@ function Sr({ redirectUrl: r = "" }) {
555
574
  })
556
575
  }
557
576
  ),
558
- a.name && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.name.message }),
559
- /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-email", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Email" }) }),
560
- /* @__PURE__ */ c.jsx(
577
+ a.name && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: a.name.message }),
578
+ /* @__PURE__ */ l.jsx("label", { className: "label", htmlFor: "signup-email", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Email" }) }),
579
+ /* @__PURE__ */ l.jsx(
561
580
  "input",
562
581
  {
563
582
  id: "signup-email",
@@ -573,9 +592,9 @@ function Sr({ redirectUrl: r = "" }) {
573
592
  })
574
593
  }
575
594
  ),
576
- a.email && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.email.message }),
577
- /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-password", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Password" }) }),
578
- /* @__PURE__ */ c.jsx(
595
+ a.email && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: a.email.message }),
596
+ /* @__PURE__ */ l.jsx("label", { className: "label", htmlFor: "signup-password", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Password" }) }),
597
+ /* @__PURE__ */ l.jsx(
579
598
  "input",
580
599
  {
581
600
  id: "signup-password",
@@ -591,9 +610,9 @@ function Sr({ redirectUrl: r = "" }) {
591
610
  })
592
611
  }
593
612
  ),
594
- a.password && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.password.message }),
595
- /* @__PURE__ */ c.jsx("label", { className: "label", htmlFor: "signup-confirm", children: /* @__PURE__ */ c.jsx("span", { className: "label-text", children: "Confirm Password" }) }),
596
- /* @__PURE__ */ c.jsx(
613
+ a.password && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: a.password.message }),
614
+ /* @__PURE__ */ l.jsx("label", { className: "label", htmlFor: "signup-confirm", children: /* @__PURE__ */ l.jsx("span", { className: "label-text", children: "Confirm Password" }) }),
615
+ /* @__PURE__ */ l.jsx(
597
616
  "input",
598
617
  {
599
618
  id: "signup-confirm",
@@ -602,12 +621,12 @@ function Sr({ redirectUrl: r = "" }) {
602
621
  className: `input input-bordered w-full ${a.confirmPassword ? "input-error" : ""}`,
603
622
  ...e("confirmPassword", {
604
623
  required: "Please confirm password",
605
- validate: (y) => y === n("password") || "Passwords do not match"
624
+ validate: (v) => v === n("password") || "Passwords do not match"
606
625
  })
607
626
  }
608
627
  ),
609
- a.confirmPassword && /* @__PURE__ */ c.jsx("span", { className: "text-error text-sm", children: a.confirmPassword.message }),
610
- /* @__PURE__ */ c.jsx(
628
+ a.confirmPassword && /* @__PURE__ */ l.jsx("span", { className: "text-error text-sm", children: a.confirmPassword.message }),
629
+ /* @__PURE__ */ l.jsx(
611
630
  "button",
612
631
  {
613
632
  type: "submit",
@@ -619,62 +638,95 @@ function Sr({ redirectUrl: r = "" }) {
619
638
  ] }) }),
620
639
  i,
621
640
  !1,
622
- /* @__PURE__ */ c.jsx("div", { className: "divider" }),
623
- /* @__PURE__ */ c.jsxs("div", { className: "join w-full justify-center", children: [
624
- /* @__PURE__ */ c.jsx(ge, { className: "btn join-item", to: "/", children: "Home" }),
625
- /* @__PURE__ */ c.jsx(ge, { to: "/login", className: "btn join-item", children: "Login" }),
626
- /* @__PURE__ */ c.jsx(ge, { to: "/forgot-password", className: "btn join-item", children: "Forgot Password" })
641
+ /* @__PURE__ */ l.jsx("div", { className: "divider" }),
642
+ /* @__PURE__ */ l.jsxs("div", { className: "join w-full justify-center", children: [
643
+ /* @__PURE__ */ l.jsx(se, { className: "btn join-item", to: "/", children: "Home" }),
644
+ /* @__PURE__ */ l.jsx(se, { to: "/login", className: "btn join-item", children: "Login" }),
645
+ /* @__PURE__ */ l.jsx(se, { to: "/forgot-password", className: "btn join-item", children: "Forgot Password" })
627
646
  ] })
628
647
  ] });
629
648
  }
630
- function Rr() {
631
- const r = we(), [e] = Ye(), { useVerifyEmail: t } = te(), s = t(), n = e.get("token"), a = async () => {
649
+ function Ar() {
650
+ const r = ke(), [e] = ot(), [t, s] = de(!1), [n, a] = de(null), [d, u] = de(!1), { useVerifyEmail: i } = oe(), o = i(), c = e.get("token"), f = async () => {
651
+ if (!c) {
652
+ a("No token provided.");
653
+ return;
654
+ }
655
+ s(!0);
632
656
  try {
633
- n && await s.mutateAsync(n), r("/");
634
- } catch {
657
+ await o.mutateAsync(c), Lt.success("Email verified! You can now log in."), r("/login");
658
+ } catch (h) {
659
+ const p = h?.response?.data, v = p?.error || p?.message || h?.message || "Verification failed.", w = String(v).toLowerCase();
660
+ (w.includes("invalid") || w.includes("expired")) && u(!0), a(String(v));
661
+ } finally {
662
+ s(!1);
635
663
  }
636
664
  };
637
- return /* @__PURE__ */ c.jsxs(oe, { children: [
638
- /* @__PURE__ */ c.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Verify Email" }),
639
- /* @__PURE__ */ c.jsx("button", { className: "btn btn-primary", onClick: a, children: "Verify" })
665
+ return Ie(() => {
666
+ c && f();
667
+ }, [c]), /* @__PURE__ */ l.jsxs(le, { children: [
668
+ /* @__PURE__ */ l.jsx("h2", { className: "text-2xl font-bold mb-4", children: "Verify Email" }),
669
+ /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
670
+ /* @__PURE__ */ l.jsx(
671
+ "button",
672
+ {
673
+ className: "btn btn-primary",
674
+ onClick: f,
675
+ disabled: t || d,
676
+ children: t ? "Verifying…" : "Verify"
677
+ }
678
+ ),
679
+ n && /* @__PURE__ */ l.jsx("div", { className: "text-sm text-center text-error mt-2", children: n }),
680
+ d && /* @__PURE__ */ l.jsxs("div", { className: "mt-2 flex flex-col items-center gap-2", children: [
681
+ /* @__PURE__ */ l.jsx("p", { className: "text-sm mb-2", children: "Token is invalid or expired. Request a new confirmation email." }),
682
+ /* @__PURE__ */ l.jsx(
683
+ "button",
684
+ {
685
+ className: "btn btn-secondary",
686
+ onClick: () => r("/resend-confirmation"),
687
+ children: "Resend Confirmation"
688
+ }
689
+ )
690
+ ] })
691
+ ] })
640
692
  ] });
641
693
  }
642
- const Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
694
+ const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
643
695
  __proto__: null,
644
- AuthLayout: oe,
645
- AuthProvider: br,
646
- ConfirmEmail: wr,
647
- ForgotPassword: kr,
648
- Login: jr,
649
- OAuthCallback: Nr,
650
- ResendConfirmation: Er,
651
- Reset: Cr,
652
- SignUp: Sr,
653
- Verify: Rr,
654
- handleFormError: lt,
655
- redirectToOrigin: Lt,
656
- useAuthApi: te,
657
- useAuthConfig: Mt
696
+ AuthLayout: le,
697
+ AuthProvider: wr,
698
+ ConfirmEmail: kr,
699
+ ForgotPassword: jr,
700
+ Login: Nr,
701
+ OAuthCallback: Er,
702
+ ResendConfirmation: Cr,
703
+ Reset: Sr,
704
+ SignUp: Rr,
705
+ Verify: Ar,
706
+ handleFormError: ct,
707
+ redirectToOrigin: Zt,
708
+ useAuthApi: oe,
709
+ useAuthConfig: $t
658
710
  }, Symbol.toStringTag, { value: "Module" }));
659
- function $t({
711
+ function Dt({
660
712
  title: r,
661
713
  children: e
662
714
  }) {
663
- return /* @__PURE__ */ c.jsxs("div", { className: "p-6", children: [
664
- /* @__PURE__ */ c.jsx("div", { className: "mb-6", children: /* @__PURE__ */ c.jsx("div", { className: "text-2xl font-bold", children: r }) }),
665
- /* @__PURE__ */ c.jsx("div", { children: e })
715
+ return /* @__PURE__ */ l.jsxs("div", { className: "p-6", children: [
716
+ /* @__PURE__ */ l.jsx("div", { className: "mb-6", children: /* @__PURE__ */ l.jsx("div", { className: "text-2xl font-bold", children: r }) }),
717
+ /* @__PURE__ */ l.jsx("div", { children: e })
666
718
  ] });
667
719
  }
668
- function Ar({
720
+ function Tr({
669
721
  icon: r,
670
722
  title: e,
671
723
  message: t,
672
724
  action: s
673
725
  }) {
674
- return /* @__PURE__ */ c.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ c.jsxs("div", { className: "card-body p-8", children: [
675
- /* @__PURE__ */ c.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
676
- r && /* @__PURE__ */ c.jsx(
677
- Qe,
726
+ return /* @__PURE__ */ l.jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/10 to-secondary/10", children: /* @__PURE__ */ l.jsx("div", { className: "card bg-base-100 shadow-soft hover:shadow-medium transition-shadow border border-base-300 w-full max-w-md mx-4", children: /* @__PURE__ */ l.jsxs("div", { className: "card-body p-8", children: [
727
+ /* @__PURE__ */ l.jsxs("h2", { className: "card-title text-2xl mb-4", children: [
728
+ r && /* @__PURE__ */ l.jsx(
729
+ Le,
678
730
  {
679
731
  icon: r,
680
732
  className: "text-neutral-content-300 mb-4"
@@ -682,11 +734,11 @@ function Ar({
682
734
  ),
683
735
  e
684
736
  ] }),
685
- /* @__PURE__ */ c.jsx("div", { className: "mt-4 text-sm text-center", children: t }),
686
- s && /* @__PURE__ */ c.jsx("div", { children: s })
737
+ /* @__PURE__ */ l.jsx("div", { className: "mt-4 text-sm text-center", children: t }),
738
+ s && /* @__PURE__ */ l.jsx("div", { children: s })
687
739
  ] }) }) });
688
740
  }
689
- function Tr({
741
+ function Or({
690
742
  isOpen: r,
691
743
  title: e,
692
744
  handleSubmit: t,
@@ -697,33 +749,33 @@ function Tr({
697
749
  onClose: u,
698
750
  onCancel: i,
699
751
  children: o,
700
- maxWidth: l = "2xl",
752
+ maxWidth: c = "2xl",
701
753
  submitLabel: f = "Save",
702
754
  cancelLabel: h = "Cancel"
703
755
  }) {
704
756
  if (!r) return null;
705
- const p = s || n, y = () => {
757
+ const p = s || n, v = () => {
706
758
  p || (i && i(), u());
707
- }, w = `max-w-${l}`;
708
- return /* @__PURE__ */ c.jsx("div", { className: "modal modal-open", onClick: y, children: /* @__PURE__ */ c.jsxs(
759
+ }, w = `max-w-${c}`;
760
+ return /* @__PURE__ */ l.jsx("div", { className: "modal modal-open", onClick: v, children: /* @__PURE__ */ l.jsxs(
709
761
  "div",
710
762
  {
711
763
  className: `modal-box ${w}`,
712
- onClick: (x) => x.stopPropagation(),
764
+ onClick: (_) => _.stopPropagation(),
713
765
  children: [
714
- /* @__PURE__ */ c.jsxs("h3", { className: "font-bold text-lg mb-4", children: [
766
+ /* @__PURE__ */ l.jsxs("h3", { className: "font-bold text-lg mb-4", children: [
715
767
  e,
716
- p && /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-xs ml-2" })
768
+ p && /* @__PURE__ */ l.jsx("span", { className: "loading loading-spinner loading-xs ml-2" })
717
769
  ] }),
718
- a !== void 0 && a > 0 && a < 100 && /* @__PURE__ */ c.jsxs("div", { className: "mb-4", children: [
719
- /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
720
- /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Uploading..." }),
721
- /* @__PURE__ */ c.jsxs("span", { className: "text-sm font-semibold", children: [
770
+ a !== void 0 && a > 0 && a < 100 && /* @__PURE__ */ l.jsxs("div", { className: "mb-4", children: [
771
+ /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
772
+ /* @__PURE__ */ l.jsx("span", { className: "text-sm", children: "Uploading..." }),
773
+ /* @__PURE__ */ l.jsxs("span", { className: "text-sm font-semibold", children: [
722
774
  a,
723
775
  "%"
724
776
  ] })
725
777
  ] }),
726
- /* @__PURE__ */ c.jsx(
778
+ /* @__PURE__ */ l.jsx(
727
779
  "progress",
728
780
  {
729
781
  className: "progress progress-primary w-full",
@@ -732,27 +784,27 @@ function Tr({
732
784
  }
733
785
  )
734
786
  ] }),
735
- /* @__PURE__ */ c.jsxs("form", { onSubmit: t((x) => d(x, { onClose: u })), children: [
787
+ /* @__PURE__ */ l.jsxs("form", { onSubmit: t((_) => d(_, { onClose: u })), children: [
736
788
  o,
737
- /* @__PURE__ */ c.jsxs("div", { className: "modal-action", children: [
738
- /* @__PURE__ */ c.jsx(
789
+ /* @__PURE__ */ l.jsxs("div", { className: "modal-action", children: [
790
+ /* @__PURE__ */ l.jsx(
739
791
  "button",
740
792
  {
741
793
  type: "button",
742
794
  className: "btn btn-ghost",
743
- onClick: y,
795
+ onClick: v,
744
796
  disabled: p,
745
797
  children: h
746
798
  }
747
799
  ),
748
- /* @__PURE__ */ c.jsxs(
800
+ /* @__PURE__ */ l.jsxs(
749
801
  "button",
750
802
  {
751
803
  type: "submit",
752
804
  className: "btn btn-primary",
753
805
  disabled: p,
754
806
  children: [
755
- p && /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-xs" }),
807
+ p && /* @__PURE__ */ l.jsx("span", { className: "loading loading-spinner loading-xs" }),
756
808
  f
757
809
  ]
758
810
  }
@@ -763,157 +815,88 @@ function Tr({
763
815
  }
764
816
  ) });
765
817
  }
766
- function Zt({
767
- page: r,
768
- perPage: e,
769
- total: t,
770
- onPageChange: s,
771
- className: n = "",
772
- visiblePages: a = 5
773
- }) {
774
- const d = Math.max(1, Math.ceil(t / e));
775
- if (d <= 1) return null;
776
- const u = (p) => {
777
- p !== r && p >= 1 && p <= d && s(p);
778
- }, i = (p) => /* @__PURE__ */ c.jsx(
779
- "button",
780
- {
781
- className: `join-item btn ${p === r ? "btn-active" : ""}`,
782
- onClick: () => u(p),
783
- children: p
784
- },
785
- p
786
- ), o = Math.max(1, Math.min(a, d));
787
- let l = r - Math.floor(o / 2);
788
- l < 1 && (l = 1);
789
- let f = l + o - 1;
790
- f > d && (f = d, l = Math.max(1, f - o + 1));
791
- const h = [];
792
- for (let p = l; p <= f; p++) h.push(p);
793
- return /* @__PURE__ */ c.jsx("div", { className: `flex justify-center ${n}`, children: /* @__PURE__ */ c.jsxs("div", { className: "join", children: [
794
- /* @__PURE__ */ c.jsx(
795
- "button",
796
- {
797
- className: "join-item btn",
798
- disabled: r === 1,
799
- onClick: () => u(r - 1),
800
- children: "«"
801
- }
802
- ),
803
- h.map((p) => i(p)),
804
- /* @__PURE__ */ c.jsx(
805
- "button",
806
- {
807
- className: "join-item btn",
808
- disabled: r === d,
809
- onClick: () => u(r + 1),
810
- children: "»"
811
- }
812
- )
813
- ] }) });
814
- }
815
- function Ks(r, e) {
816
- const t = e?.defaultPage ?? 1, s = e?.defaultPerPage ?? 25, n = {};
817
- r.page !== void 0 && r.page !== null && r.page !== t && (n.page = Number(r.page)), r.per_page !== void 0 && r.per_page !== null && r.per_page !== s && (n.per_page = Number(r.per_page));
818
- const a = {};
819
- r.sort_by && (a.sort_by = String(r.sort_by)), r.sort_order && (a.sort_order = String(r.sort_order));
820
- const d = r.q ?? r.q, u = {};
821
- return Object.keys(n).length && (u.pagination = n), d != null && String(d) !== "" && (u.q = d), Object.keys(a).length && (u.sort = a), u;
822
- }
823
- function ht(r, e) {
824
- const t = {};
825
- for (const [s, n] of r.entries())
826
- t[s] = n;
827
- return t;
828
- }
829
- function $e(r) {
830
- const e = new URLSearchParams();
831
- return Object.entries(r || {}).forEach(([t, s]) => {
832
- s != null && e.set(t, String(s));
833
- }), e;
834
- }
835
- var Or = typeof global == "object" && global && global.Object === Object && global, Pr = typeof self == "object" && self && self.Object === Object && self, Dt = Or || Pr || Function("return this")(), De = Dt.Symbol, Ft = Object.prototype, Ir = Ft.hasOwnProperty, Mr = Ft.toString, Re = De ? De.toStringTag : void 0;
836
- function Lr(r) {
837
- var e = Ir.call(r, Re), t = r[Re];
818
+ var Pr = typeof global == "object" && global && global.Object === Object && global, Ir = typeof self == "object" && self && self.Object === Object && self, Ft = Pr || Ir || Function("return this")(), ze = Ft.Symbol, zt = Object.prototype, Mr = zt.hasOwnProperty, Lr = zt.toString, Ae = ze ? ze.toStringTag : void 0;
819
+ function $r(r) {
820
+ var e = Mr.call(r, Ae), t = r[Ae];
838
821
  try {
839
- r[Re] = void 0;
822
+ r[Ae] = void 0;
840
823
  var s = !0;
841
824
  } catch {
842
825
  }
843
- var n = Mr.call(r);
844
- return s && (e ? r[Re] = t : delete r[Re]), n;
845
- }
846
- var $r = Object.prototype, Zr = $r.toString;
847
- function Dr(r) {
848
- return Zr.call(r);
826
+ var n = Lr.call(r);
827
+ return s && (e ? r[Ae] = t : delete r[Ae]), n;
849
828
  }
850
- var Fr = "[object Null]", zr = "[object Undefined]", mt = De ? De.toStringTag : void 0;
851
- function Ur(r) {
852
- return r == null ? r === void 0 ? zr : Fr : mt && mt in Object(r) ? Lr(r) : Dr(r);
829
+ var Zr = Object.prototype, Dr = Zr.toString;
830
+ function Fr(r) {
831
+ return Dr.call(r);
853
832
  }
833
+ var zr = "[object Null]", Ur = "[object Undefined]", mt = ze ? ze.toStringTag : void 0;
854
834
  function Vr(r) {
835
+ return r == null ? r === void 0 ? Ur : zr : mt && mt in Object(r) ? $r(r) : Fr(r);
836
+ }
837
+ function Br(r) {
855
838
  return r != null && typeof r == "object";
856
839
  }
857
- var Br = "[object Symbol]";
858
- function Wr(r) {
859
- return typeof r == "symbol" || Vr(r) && Ur(r) == Br;
840
+ var Wr = "[object Symbol]";
841
+ function qr(r) {
842
+ return typeof r == "symbol" || Br(r) && Vr(r) == Wr;
860
843
  }
861
- var qr = /\s/;
862
- function Yr(r) {
863
- for (var e = r.length; e-- && qr.test(r.charAt(e)); )
844
+ var Yr = /\s/;
845
+ function Qr(r) {
846
+ for (var e = r.length; e-- && Yr.test(r.charAt(e)); )
864
847
  ;
865
848
  return e;
866
849
  }
867
- var Qr = /^\s+/;
868
- function Hr(r) {
869
- return r && r.slice(0, Yr(r) + 1).replace(Qr, "");
850
+ var Hr = /^\s+/;
851
+ function Gr(r) {
852
+ return r && r.slice(0, Qr(r) + 1).replace(Hr, "");
870
853
  }
871
- function Ke(r) {
854
+ function Xe(r) {
872
855
  var e = typeof r;
873
856
  return r != null && (e == "object" || e == "function");
874
857
  }
875
- var pt = NaN, Gr = /^[-+]0x[0-9a-f]+$/i, Jr = /^0b[01]+$/i, Xr = /^0o[0-7]+$/i, Kr = parseInt;
858
+ var pt = NaN, Jr = /^[-+]0x[0-9a-f]+$/i, Xr = /^0b[01]+$/i, Kr = /^0o[0-7]+$/i, es = parseInt;
876
859
  function gt(r) {
877
860
  if (typeof r == "number")
878
861
  return r;
879
- if (Wr(r))
862
+ if (qr(r))
880
863
  return pt;
881
- if (Ke(r)) {
864
+ if (Xe(r)) {
882
865
  var e = typeof r.valueOf == "function" ? r.valueOf() : r;
883
- r = Ke(e) ? e + "" : e;
866
+ r = Xe(e) ? e + "" : e;
884
867
  }
885
868
  if (typeof r != "string")
886
869
  return r === 0 ? r : +r;
887
- r = Hr(r);
888
- var t = Jr.test(r);
889
- return t || Xr.test(r) ? Kr(r.slice(2), t ? 2 : 8) : Gr.test(r) ? pt : +r;
870
+ r = Gr(r);
871
+ var t = Xr.test(r);
872
+ return t || Kr.test(r) ? es(r.slice(2), t ? 2 : 8) : Jr.test(r) ? pt : +r;
890
873
  }
891
- var Je = function() {
892
- return Dt.Date.now();
893
- }, es = "Expected a function", ts = Math.max, rs = Math.min;
894
- function ss(r, e, t) {
895
- var s, n, a, d, u, i, o = 0, l = !1, f = !1, h = !0;
874
+ var Ge = function() {
875
+ return Ft.Date.now();
876
+ }, ts = "Expected a function", rs = Math.max, ss = Math.min;
877
+ function ns(r, e, t) {
878
+ var s, n, a, d, u, i, o = 0, c = !1, f = !1, h = !0;
896
879
  if (typeof r != "function")
897
- throw new TypeError(es);
898
- e = gt(e) || 0, Ke(t) && (l = !!t.leading, f = "maxWait" in t, a = f ? ts(gt(t.maxWait) || 0, e) : a, h = "trailing" in t ? !!t.trailing : h);
880
+ throw new TypeError(ts);
881
+ e = gt(e) || 0, Xe(t) && (c = !!t.leading, f = "maxWait" in t, a = f ? rs(gt(t.maxWait) || 0, e) : a, h = "trailing" in t ? !!t.trailing : h);
899
882
  function p(O) {
900
883
  var B = s, W = n;
901
884
  return s = n = void 0, o = O, d = r.apply(W, B), d;
902
885
  }
903
- function y(O) {
904
- return o = O, u = setTimeout(M, e), l ? p(O) : d;
886
+ function v(O) {
887
+ return o = O, u = setTimeout(M, e), c ? p(O) : d;
905
888
  }
906
889
  function w(O) {
907
890
  var B = O - i, W = O - o, G = e - B;
908
- return f ? rs(G, a - W) : G;
891
+ return f ? ss(G, a - W) : G;
909
892
  }
910
- function x(O) {
893
+ function _(O) {
911
894
  var B = O - i, W = O - o;
912
895
  return i === void 0 || B >= e || B < 0 || f && W >= a;
913
896
  }
914
897
  function M() {
915
- var O = Je();
916
- if (x(O))
898
+ var O = Ge();
899
+ if (_(O))
917
900
  return R(O);
918
901
  u = setTimeout(M, w(O));
919
902
  }
@@ -924,13 +907,13 @@ function ss(r, e, t) {
924
907
  u !== void 0 && clearTimeout(u), o = 0, s = i = n = u = void 0;
925
908
  }
926
909
  function I() {
927
- return u === void 0 ? d : R(Je());
910
+ return u === void 0 ? d : R(Ge());
928
911
  }
929
912
  function L() {
930
- var O = Je(), B = x(O);
913
+ var O = Ge(), B = _(O);
931
914
  if (s = arguments, n = this, i = O, B) {
932
915
  if (u === void 0)
933
- return y(i);
916
+ return v(i);
934
917
  if (f)
935
918
  return clearTimeout(u), u = setTimeout(M, e), p(i);
936
919
  }
@@ -938,7 +921,76 @@ function ss(r, e, t) {
938
921
  }
939
922
  return L.cancel = k, L.flush = I, L;
940
923
  }
941
- function zt({
924
+ function en(r, e) {
925
+ const t = e?.defaultPage ?? 1, s = e?.defaultPerPage ?? 25, n = {};
926
+ r.page !== void 0 && r.page !== null && r.page !== t && (n.page = Number(r.page)), r.per_page !== void 0 && r.per_page !== null && r.per_page !== s && (n.per_page = Number(r.per_page));
927
+ const a = {};
928
+ r.sort_by && (a.sort_by = String(r.sort_by)), r.sort_order && (a.sort_order = String(r.sort_order));
929
+ const d = r.q ?? r.q, u = {};
930
+ return Object.keys(n).length && (u.pagination = n), d != null && String(d) !== "" && (u.q = d), Object.keys(a).length && (u.sort = a), u;
931
+ }
932
+ function vt(r, e) {
933
+ const t = {};
934
+ for (const [s, n] of r.entries())
935
+ t[s] = n;
936
+ return t;
937
+ }
938
+ function Fe(r) {
939
+ const e = new URLSearchParams();
940
+ return Object.entries(r || {}).forEach(([t, s]) => {
941
+ s != null && e.set(t, String(s));
942
+ }), e;
943
+ }
944
+ function Ut({
945
+ page: r,
946
+ perPage: e,
947
+ total: t,
948
+ onPageChange: s,
949
+ className: n = "",
950
+ visiblePages: a = 5
951
+ }) {
952
+ const d = Math.max(1, Math.ceil(t / e));
953
+ if (d <= 1) return null;
954
+ const u = (p) => {
955
+ p !== r && p >= 1 && p <= d && s(p);
956
+ }, i = (p) => /* @__PURE__ */ l.jsx(
957
+ "button",
958
+ {
959
+ className: `join-item btn ${p === r ? "btn-active" : ""}`,
960
+ onClick: () => u(p),
961
+ children: p
962
+ },
963
+ p
964
+ ), o = Math.max(1, Math.min(a, d));
965
+ let c = r - Math.floor(o / 2);
966
+ c < 1 && (c = 1);
967
+ let f = c + o - 1;
968
+ f > d && (f = d, c = Math.max(1, f - o + 1));
969
+ const h = [];
970
+ for (let p = c; p <= f; p++) h.push(p);
971
+ return /* @__PURE__ */ l.jsx("div", { className: `flex justify-center ${n}`, children: /* @__PURE__ */ l.jsxs("div", { className: "join", children: [
972
+ /* @__PURE__ */ l.jsx(
973
+ "button",
974
+ {
975
+ className: "join-item btn",
976
+ disabled: r === 1,
977
+ onClick: () => u(r - 1),
978
+ children: "«"
979
+ }
980
+ ),
981
+ h.map((p) => i(p)),
982
+ /* @__PURE__ */ l.jsx(
983
+ "button",
984
+ {
985
+ className: "join-item btn",
986
+ disabled: r === d,
987
+ onClick: () => u(r + 1),
988
+ children: "»"
989
+ }
990
+ )
991
+ ] }) });
992
+ }
993
+ function Vt({
942
994
  title: r,
943
995
  actions: e,
944
996
  paramsSchema: t,
@@ -949,17 +1001,17 @@ function zt({
949
1001
  onRowClick: u,
950
1002
  paginationType: i = "pages"
951
1003
  }) {
952
- const [o, l] = Ye(), f = ht(o), { data: h, isLoading: p, raw: y } = s(f), w = y?.metadata?.total ?? 0, x = f.page ?? 1, M = f.per_page ?? 20, [R, k] = qe(f), I = cr(f);
953
- Ze(() => {
1004
+ const [o, c] = ot(), f = vt(o), { data: h, isLoading: p, raw: v } = s(f), w = v?.metadata?.total ?? 0, _ = f.page ?? 1, M = f.per_page ?? 20, [R, k] = de(f), I = ur(f);
1005
+ Ie(() => {
954
1006
  JSON.stringify(f) !== JSON.stringify(I.current) && (k(f), I.current = f);
955
1007
  }, [f]);
956
- const L = dr(
957
- () => ss((P) => {
958
- l($e(P));
1008
+ const L = fr(
1009
+ () => ns((P) => {
1010
+ c(Fe(P));
959
1011
  }, 300),
960
- [l]
1012
+ [c]
961
1013
  );
962
- Ze(() => () => L.cancel(), [L]);
1014
+ Ie(() => () => L.cancel(), [L]);
963
1015
  const O = (P, Y) => {
964
1016
  const Q = {
965
1017
  ...R,
@@ -977,24 +1029,24 @@ function zt({
977
1029
  };
978
1030
  k(Y), L(Y);
979
1031
  }, W = () => {
980
- L.cancel(), l($e(R));
1032
+ L.cancel(), c(Fe(R));
981
1033
  }, G = () => {
982
- const P = ht(new URLSearchParams());
983
- k(P), L.cancel(), l($e(P));
984
- }, le = (P) => {
1034
+ const P = vt(new URLSearchParams());
1035
+ k(P), L.cancel(), c(Fe(P));
1036
+ }, ce = (P) => {
985
1037
  const Y = { ...f, page: P };
986
- l($e(Y));
1038
+ c(Fe(Y));
987
1039
  }, q = r || e || n;
988
- return /* @__PURE__ */ c.jsx("div", { className: "card bg-base-100 shadow-xl", children: /* @__PURE__ */ c.jsxs("div", { className: "card-body", children: [
989
- q && /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col gap-4 mb-4", children: [
990
- /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
991
- r && /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ c.jsx("h2", { className: "card-title m-0 text-2xl font-bold", children: r }) }),
992
- e && /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-3", children: e })
1040
+ return /* @__PURE__ */ l.jsx("div", { className: "card bg-base-100 shadow-xl", children: /* @__PURE__ */ l.jsxs("div", { className: "card-body", children: [
1041
+ q && /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col gap-4 mb-4", children: [
1042
+ /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
1043
+ r && /* @__PURE__ */ l.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ l.jsx("h2", { className: "card-title m-0 text-2xl font-bold", children: r }) }),
1044
+ e && /* @__PURE__ */ l.jsx("div", { className: "flex items-center gap-3", children: e })
993
1045
  ] }),
994
- n && /* @__PURE__ */ c.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 bg-base-200/50 p-2 rounded-lg w-full", children: [
995
- /* @__PURE__ */ c.jsx("div", { className: "flex flex-wrap gap-2 justify-end flex-1", children: n(R, O) }),
996
- /* @__PURE__ */ c.jsxs("div", { className: "join", children: [
997
- /* @__PURE__ */ c.jsx(
1046
+ n && /* @__PURE__ */ l.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 bg-base-200/50 p-2 rounded-lg w-full", children: [
1047
+ /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2 justify-end flex-1", children: n(R, O) }),
1048
+ /* @__PURE__ */ l.jsxs("div", { className: "join", children: [
1049
+ /* @__PURE__ */ l.jsx(
998
1050
  "button",
999
1051
  {
1000
1052
  className: "join-item btn btn-sm btn-neutral",
@@ -1002,7 +1054,7 @@ function zt({
1002
1054
  children: "Search"
1003
1055
  }
1004
1056
  ),
1005
- /* @__PURE__ */ c.jsx(
1057
+ /* @__PURE__ */ l.jsx(
1006
1058
  "button",
1007
1059
  {
1008
1060
  className: "join-item btn btn-sm btn-ghost border-base-300",
@@ -1013,16 +1065,16 @@ function zt({
1013
1065
  ] })
1014
1066
  ] })
1015
1067
  ] }),
1016
- p ? /* @__PURE__ */ c.jsx("div", { className: "flex justify-center items-center py-10", children: /* @__PURE__ */ c.jsx("span", { className: "loading loading-spinner loading-lg" }) }) : h.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: "text-center py-8", children: d }) : /* @__PURE__ */ c.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ c.jsxs("table", { className: "table table-zebra w-full", children: [
1017
- /* @__PURE__ */ c.jsx("thead", { children: /* @__PURE__ */ c.jsx("tr", { children: a.map((P) => /* @__PURE__ */ c.jsx("th", { className: P.className, children: typeof P.header == "function" ? P.header(f, O, B) : P.header }, P.key)) }) }),
1018
- /* @__PURE__ */ c.jsx("tbody", { children: h.map((P, Y) => {
1068
+ p ? /* @__PURE__ */ l.jsx("div", { className: "flex justify-center items-center py-10", children: /* @__PURE__ */ l.jsx("span", { className: "loading loading-spinner loading-lg" }) }) : h.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: "text-center py-8", children: d }) : /* @__PURE__ */ l.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ l.jsxs("table", { className: "table table-zebra w-full", children: [
1069
+ /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsx("tr", { children: a.map((P) => /* @__PURE__ */ l.jsx("th", { className: P.className, children: typeof P.header == "function" ? P.header(f, O, B) : P.header }, P.key)) }) }),
1070
+ /* @__PURE__ */ l.jsx("tbody", { children: h.map((P, Y) => {
1019
1071
  const Q = P.id !== void 0 ? String(P.id) : `row-${Y}`;
1020
- return /* @__PURE__ */ c.jsx(
1072
+ return /* @__PURE__ */ l.jsx(
1021
1073
  "tr",
1022
1074
  {
1023
1075
  className: u ? "cursor-pointer hover:bg-base-200" : "",
1024
1076
  onClick: () => u?.(P),
1025
- children: a.map((U) => /* @__PURE__ */ c.jsx(
1077
+ children: a.map((U) => /* @__PURE__ */ l.jsx(
1026
1078
  "td",
1027
1079
  {
1028
1080
  className: U.className,
@@ -1035,40 +1087,40 @@ function zt({
1035
1087
  );
1036
1088
  }) })
1037
1089
  ] }) }),
1038
- i !== "none" && /* @__PURE__ */ c.jsx("div", { className: "mt-4", children: /* @__PURE__ */ c.jsx(
1039
- Zt,
1090
+ i !== "none" && /* @__PURE__ */ l.jsx("div", { className: "mt-4", children: /* @__PURE__ */ l.jsx(
1091
+ Ut,
1040
1092
  {
1041
- page: x,
1093
+ page: _,
1042
1094
  perPage: M,
1043
1095
  total: w,
1044
- onPageChange: le
1096
+ onPageChange: ce
1045
1097
  }
1046
1098
  ) })
1047
1099
  ] }) });
1048
1100
  }
1049
- function ns({
1101
+ function as({
1050
1102
  errors: r,
1051
1103
  className: e = ""
1052
1104
  }) {
1053
- return !Array.isArray(r) || r.length === 0 ? null : /* @__PURE__ */ c.jsx("div", { className: `alert alert-error mb-4 ${e}`.trim(), children: /* @__PURE__ */ c.jsx("ul", { className: "list-disc list-inside", children: r.map((t, s) => /* @__PURE__ */ c.jsx("li", { children: t }, s)) }) });
1105
+ return !Array.isArray(r) || r.length === 0 ? null : /* @__PURE__ */ l.jsx("div", { className: `alert alert-error mb-4 ${e}`.trim(), children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc list-inside", children: r.map((t, s) => /* @__PURE__ */ l.jsx("li", { children: t }, s)) }) });
1054
1106
  }
1055
- var as = Object.defineProperty, Fe = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, Vt = Object.prototype.propertyIsEnumerable, yt = (r, e, t) => e in r ? as(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, et = (r, e) => {
1107
+ var is = Object.defineProperty, Ue = Object.getOwnPropertySymbols, Bt = Object.prototype.hasOwnProperty, Wt = Object.prototype.propertyIsEnumerable, yt = (r, e, t) => e in r ? is(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ke = (r, e) => {
1056
1108
  for (var t in e || (e = {}))
1057
- Ut.call(e, t) && yt(r, t, e[t]);
1058
- if (Fe)
1059
- for (var t of Fe(e))
1060
- Vt.call(e, t) && yt(r, t, e[t]);
1109
+ Bt.call(e, t) && yt(r, t, e[t]);
1110
+ if (Ue)
1111
+ for (var t of Ue(e))
1112
+ Wt.call(e, t) && yt(r, t, e[t]);
1061
1113
  return r;
1062
- }, tt = (r, e) => {
1114
+ }, et = (r, e) => {
1063
1115
  var t = {};
1064
1116
  for (var s in r)
1065
- Ut.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
1066
- if (r != null && Fe)
1067
- for (var s of Fe(r))
1068
- e.indexOf(s) < 0 && Vt.call(r, s) && (t[s] = r[s]);
1117
+ Bt.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
1118
+ if (r != null && Ue)
1119
+ for (var s of Ue(r))
1120
+ e.indexOf(s) < 0 && Wt.call(r, s) && (t[s] = r[s]);
1069
1121
  return t;
1070
1122
  };
1071
- var ce;
1123
+ var ue;
1072
1124
  ((r) => {
1073
1125
  const e = class S {
1074
1126
  /*-- Constructor (low level) and fields --*/
@@ -1076,25 +1128,25 @@ var ce;
1076
1128
  // error correction level, data codeword bytes, and mask number.
1077
1129
  // This is a low-level API that most users should not use directly.
1078
1130
  // A mid-level API is the encodeSegments() function.
1079
- constructor(i, o, l, f) {
1131
+ constructor(i, o, c, f) {
1080
1132
  if (this.version = i, this.errorCorrectionLevel = o, this.modules = [], this.isFunction = [], i < S.MIN_VERSION || i > S.MAX_VERSION)
1081
1133
  throw new RangeError("Version value out of range");
1082
1134
  if (f < -1 || f > 7)
1083
1135
  throw new RangeError("Mask value out of range");
1084
1136
  this.size = i * 4 + 17;
1085
1137
  let h = [];
1086
- for (let y = 0; y < this.size; y++)
1138
+ for (let v = 0; v < this.size; v++)
1087
1139
  h.push(!1);
1088
- for (let y = 0; y < this.size; y++)
1140
+ for (let v = 0; v < this.size; v++)
1089
1141
  this.modules.push(h.slice()), this.isFunction.push(h.slice());
1090
1142
  this.drawFunctionPatterns();
1091
- const p = this.addEccAndInterleave(l);
1143
+ const p = this.addEccAndInterleave(c);
1092
1144
  if (this.drawCodewords(p), f == -1) {
1093
- let y = 1e9;
1145
+ let v = 1e9;
1094
1146
  for (let w = 0; w < 8; w++) {
1095
1147
  this.applyMask(w), this.drawFormatBits(w);
1096
- const x = this.getPenaltyScore();
1097
- x < y && (f = w, y = x), this.applyMask(w);
1148
+ const _ = this.getPenaltyScore();
1149
+ _ < v && (f = w, v = _), this.applyMask(w);
1098
1150
  }
1099
1151
  }
1100
1152
  n(0 <= f && f <= 7), this.mask = f, this.applyMask(f), this.drawFormatBits(f), this.isFunction = [];
@@ -1106,16 +1158,16 @@ var ce;
1106
1158
  // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
1107
1159
  // ecl argument if it can be done without increasing the version.
1108
1160
  static encodeText(i, o) {
1109
- const l = r.QrSegment.makeSegments(i);
1110
- return S.encodeSegments(l, o);
1161
+ const c = r.QrSegment.makeSegments(i);
1162
+ return S.encodeSegments(c, o);
1111
1163
  }
1112
1164
  // Returns a QR Code representing the given binary data at the given error correction level.
1113
1165
  // This function always encodes using the binary segment mode, not any text mode. The maximum number of
1114
1166
  // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
1115
1167
  // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
1116
1168
  static encodeBinary(i, o) {
1117
- const l = r.QrSegment.makeBytes(i);
1118
- return S.encodeSegments([l], o);
1169
+ const c = r.QrSegment.makeBytes(i);
1170
+ return S.encodeSegments([c], o);
1119
1171
  }
1120
1172
  /*-- Static factory functions (mid level) --*/
1121
1173
  // Returns a QR Code representing the given segments with the given encoding parameters.
@@ -1127,36 +1179,36 @@ var ce;
1127
1179
  // This function allows the user to create a custom sequence of segments that switches
1128
1180
  // between modes (such as alphanumeric and byte) to encode text in less space.
1129
1181
  // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
1130
- static encodeSegments(i, o, l = 1, f = 40, h = -1, p = !0) {
1131
- if (!(S.MIN_VERSION <= l && l <= f && f <= S.MAX_VERSION) || h < -1 || h > 7)
1182
+ static encodeSegments(i, o, c = 1, f = 40, h = -1, p = !0) {
1183
+ if (!(S.MIN_VERSION <= c && c <= f && f <= S.MAX_VERSION) || h < -1 || h > 7)
1132
1184
  throw new RangeError("Invalid value");
1133
- let y, w;
1134
- for (y = l; ; y++) {
1135
- const k = S.getNumDataCodewords(y, o) * 8, I = d.getTotalBits(i, y);
1185
+ let v, w;
1186
+ for (v = c; ; v++) {
1187
+ const k = S.getNumDataCodewords(v, o) * 8, I = d.getTotalBits(i, v);
1136
1188
  if (I <= k) {
1137
1189
  w = I;
1138
1190
  break;
1139
1191
  }
1140
- if (y >= f)
1192
+ if (v >= f)
1141
1193
  throw new RangeError("Data too long");
1142
1194
  }
1143
1195
  for (const k of [S.Ecc.MEDIUM, S.Ecc.QUARTILE, S.Ecc.HIGH])
1144
- p && w <= S.getNumDataCodewords(y, k) * 8 && (o = k);
1145
- let x = [];
1196
+ p && w <= S.getNumDataCodewords(v, k) * 8 && (o = k);
1197
+ let _ = [];
1146
1198
  for (const k of i) {
1147
- t(k.mode.modeBits, 4, x), t(k.numChars, k.mode.numCharCountBits(y), x);
1199
+ t(k.mode.modeBits, 4, _), t(k.numChars, k.mode.numCharCountBits(v), _);
1148
1200
  for (const I of k.getData())
1149
- x.push(I);
1201
+ _.push(I);
1150
1202
  }
1151
- n(x.length == w);
1152
- const M = S.getNumDataCodewords(y, o) * 8;
1153
- n(x.length <= M), t(0, Math.min(4, M - x.length), x), t(0, (8 - x.length % 8) % 8, x), n(x.length % 8 == 0);
1154
- for (let k = 236; x.length < M; k ^= 253)
1155
- t(k, 8, x);
1203
+ n(_.length == w);
1204
+ const M = S.getNumDataCodewords(v, o) * 8;
1205
+ n(_.length <= M), t(0, Math.min(4, M - _.length), _), t(0, (8 - _.length % 8) % 8, _), n(_.length % 8 == 0);
1206
+ for (let k = 236; _.length < M; k ^= 253)
1207
+ t(k, 8, _);
1156
1208
  let R = [];
1157
- for (; R.length * 8 < x.length; )
1209
+ for (; R.length * 8 < _.length; )
1158
1210
  R.push(0);
1159
- return x.forEach((k, I) => R[I >>> 3] |= k << 7 - (I & 7)), new S(y, o, R, h);
1211
+ return _.forEach((k, I) => R[I >>> 3] |= k << 7 - (I & 7)), new S(v, o, R, h);
1160
1212
  }
1161
1213
  /*-- Accessor methods --*/
1162
1214
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -1172,23 +1224,23 @@ var ce;
1172
1224
  /*-- Private helper methods for constructor: Drawing function modules --*/
1173
1225
  // Reads this object's version field, and draws and marks all function modules.
1174
1226
  drawFunctionPatterns() {
1175
- for (let l = 0; l < this.size; l++)
1176
- this.setFunctionModule(6, l, l % 2 == 0), this.setFunctionModule(l, 6, l % 2 == 0);
1227
+ for (let c = 0; c < this.size; c++)
1228
+ this.setFunctionModule(6, c, c % 2 == 0), this.setFunctionModule(c, 6, c % 2 == 0);
1177
1229
  this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
1178
1230
  const i = this.getAlignmentPatternPositions(), o = i.length;
1179
- for (let l = 0; l < o; l++)
1231
+ for (let c = 0; c < o; c++)
1180
1232
  for (let f = 0; f < o; f++)
1181
- l == 0 && f == 0 || l == 0 && f == o - 1 || l == o - 1 && f == 0 || this.drawAlignmentPattern(i[l], i[f]);
1233
+ c == 0 && f == 0 || c == 0 && f == o - 1 || c == o - 1 && f == 0 || this.drawAlignmentPattern(i[c], i[f]);
1182
1234
  this.drawFormatBits(0), this.drawVersion();
1183
1235
  }
1184
1236
  // Draws two copies of the format bits (with its own error correction code)
1185
1237
  // based on the given mask and this object's error correction level field.
1186
1238
  drawFormatBits(i) {
1187
1239
  const o = this.errorCorrectionLevel.formatBits << 3 | i;
1188
- let l = o;
1240
+ let c = o;
1189
1241
  for (let h = 0; h < 10; h++)
1190
- l = l << 1 ^ (l >>> 9) * 1335;
1191
- const f = (o << 10 | l) ^ 21522;
1242
+ c = c << 1 ^ (c >>> 9) * 1335;
1243
+ const f = (o << 10 | c) ^ 21522;
1192
1244
  n(f >>> 15 == 0);
1193
1245
  for (let h = 0; h <= 5; h++)
1194
1246
  this.setFunctionModule(8, h, s(f, h));
@@ -1207,56 +1259,56 @@ var ce;
1207
1259
  if (this.version < 7)
1208
1260
  return;
1209
1261
  let i = this.version;
1210
- for (let l = 0; l < 12; l++)
1262
+ for (let c = 0; c < 12; c++)
1211
1263
  i = i << 1 ^ (i >>> 11) * 7973;
1212
1264
  const o = this.version << 12 | i;
1213
1265
  n(o >>> 18 == 0);
1214
- for (let l = 0; l < 18; l++) {
1215
- const f = s(o, l), h = this.size - 11 + l % 3, p = Math.floor(l / 3);
1266
+ for (let c = 0; c < 18; c++) {
1267
+ const f = s(o, c), h = this.size - 11 + c % 3, p = Math.floor(c / 3);
1216
1268
  this.setFunctionModule(h, p, f), this.setFunctionModule(p, h, f);
1217
1269
  }
1218
1270
  }
1219
1271
  // Draws a 9*9 finder pattern including the border separator,
1220
1272
  // with the center module at (x, y). Modules can be out of bounds.
1221
1273
  drawFinderPattern(i, o) {
1222
- for (let l = -4; l <= 4; l++)
1274
+ for (let c = -4; c <= 4; c++)
1223
1275
  for (let f = -4; f <= 4; f++) {
1224
- const h = Math.max(Math.abs(f), Math.abs(l)), p = i + f, y = o + l;
1225
- 0 <= p && p < this.size && 0 <= y && y < this.size && this.setFunctionModule(p, y, h != 2 && h != 4);
1276
+ const h = Math.max(Math.abs(f), Math.abs(c)), p = i + f, v = o + c;
1277
+ 0 <= p && p < this.size && 0 <= v && v < this.size && this.setFunctionModule(p, v, h != 2 && h != 4);
1226
1278
  }
1227
1279
  }
1228
1280
  // Draws a 5*5 alignment pattern, with the center module
1229
1281
  // at (x, y). All modules must be in bounds.
1230
1282
  drawAlignmentPattern(i, o) {
1231
- for (let l = -2; l <= 2; l++)
1283
+ for (let c = -2; c <= 2; c++)
1232
1284
  for (let f = -2; f <= 2; f++)
1233
- this.setFunctionModule(i + f, o + l, Math.max(Math.abs(f), Math.abs(l)) != 1);
1285
+ this.setFunctionModule(i + f, o + c, Math.max(Math.abs(f), Math.abs(c)) != 1);
1234
1286
  }
1235
1287
  // Sets the color of a module and marks it as a function module.
1236
1288
  // Only used by the constructor. Coordinates must be in bounds.
1237
- setFunctionModule(i, o, l) {
1238
- this.modules[o][i] = l, this.isFunction[o][i] = !0;
1289
+ setFunctionModule(i, o, c) {
1290
+ this.modules[o][i] = c, this.isFunction[o][i] = !0;
1239
1291
  }
1240
1292
  /*-- Private helper methods for constructor: Codewords and masking --*/
1241
1293
  // Returns a new byte string representing the given data with the appropriate error correction
1242
1294
  // codewords appended to it, based on this object's version and error correction level.
1243
1295
  addEccAndInterleave(i) {
1244
- const o = this.version, l = this.errorCorrectionLevel;
1245
- if (i.length != S.getNumDataCodewords(o, l))
1296
+ const o = this.version, c = this.errorCorrectionLevel;
1297
+ if (i.length != S.getNumDataCodewords(o, c))
1246
1298
  throw new RangeError("Invalid argument");
1247
- const f = S.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][o], h = S.ECC_CODEWORDS_PER_BLOCK[l.ordinal][o], p = Math.floor(S.getNumRawDataModules(o) / 8), y = f - p % f, w = Math.floor(p / f);
1248
- let x = [];
1299
+ const f = S.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][o], h = S.ECC_CODEWORDS_PER_BLOCK[c.ordinal][o], p = Math.floor(S.getNumRawDataModules(o) / 8), v = f - p % f, w = Math.floor(p / f);
1300
+ let _ = [];
1249
1301
  const M = S.reedSolomonComputeDivisor(h);
1250
1302
  for (let k = 0, I = 0; k < f; k++) {
1251
- let L = i.slice(I, I + w - h + (k < y ? 0 : 1));
1303
+ let L = i.slice(I, I + w - h + (k < v ? 0 : 1));
1252
1304
  I += L.length;
1253
1305
  const O = S.reedSolomonComputeRemainder(L, M);
1254
- k < y && L.push(0), x.push(L.concat(O));
1306
+ k < v && L.push(0), _.push(L.concat(O));
1255
1307
  }
1256
1308
  let R = [];
1257
- for (let k = 0; k < x[0].length; k++)
1258
- x.forEach((I, L) => {
1259
- (k != w - h || L >= y) && R.push(I[k]);
1309
+ for (let k = 0; k < _[0].length; k++)
1310
+ _.forEach((I, L) => {
1311
+ (k != w - h || L >= v) && R.push(I[k]);
1260
1312
  });
1261
1313
  return n(R.length == p), R;
1262
1314
  }
@@ -1266,11 +1318,11 @@ var ce;
1266
1318
  if (i.length != Math.floor(S.getNumRawDataModules(this.version) / 8))
1267
1319
  throw new RangeError("Invalid argument");
1268
1320
  let o = 0;
1269
- for (let l = this.size - 1; l >= 1; l -= 2) {
1270
- l == 6 && (l = 5);
1321
+ for (let c = this.size - 1; c >= 1; c -= 2) {
1322
+ c == 6 && (c = 5);
1271
1323
  for (let f = 0; f < this.size; f++)
1272
1324
  for (let h = 0; h < 2; h++) {
1273
- const p = l - h, w = (l + 1 & 2) == 0 ? this.size - 1 - f : f;
1325
+ const p = c - h, w = (c + 1 & 2) == 0 ? this.size - 1 - f : f;
1274
1326
  !this.isFunction[w][p] && o < i.length * 8 && (this.modules[w][p] = s(i[o >>> 3], 7 - (o & 7)), o++);
1275
1327
  }
1276
1328
  }
@@ -1285,37 +1337,37 @@ var ce;
1285
1337
  if (i < 0 || i > 7)
1286
1338
  throw new RangeError("Mask value out of range");
1287
1339
  for (let o = 0; o < this.size; o++)
1288
- for (let l = 0; l < this.size; l++) {
1340
+ for (let c = 0; c < this.size; c++) {
1289
1341
  let f;
1290
1342
  switch (i) {
1291
1343
  case 0:
1292
- f = (l + o) % 2 == 0;
1344
+ f = (c + o) % 2 == 0;
1293
1345
  break;
1294
1346
  case 1:
1295
1347
  f = o % 2 == 0;
1296
1348
  break;
1297
1349
  case 2:
1298
- f = l % 3 == 0;
1350
+ f = c % 3 == 0;
1299
1351
  break;
1300
1352
  case 3:
1301
- f = (l + o) % 3 == 0;
1353
+ f = (c + o) % 3 == 0;
1302
1354
  break;
1303
1355
  case 4:
1304
- f = (Math.floor(l / 3) + Math.floor(o / 2)) % 2 == 0;
1356
+ f = (Math.floor(c / 3) + Math.floor(o / 2)) % 2 == 0;
1305
1357
  break;
1306
1358
  case 5:
1307
- f = l * o % 2 + l * o % 3 == 0;
1359
+ f = c * o % 2 + c * o % 3 == 0;
1308
1360
  break;
1309
1361
  case 6:
1310
- f = (l * o % 2 + l * o % 3) % 2 == 0;
1362
+ f = (c * o % 2 + c * o % 3) % 2 == 0;
1311
1363
  break;
1312
1364
  case 7:
1313
- f = ((l + o) % 2 + l * o % 3) % 2 == 0;
1365
+ f = ((c + o) % 2 + c * o % 3) % 2 == 0;
1314
1366
  break;
1315
1367
  default:
1316
1368
  throw new Error("Unreachable");
1317
1369
  }
1318
- !this.isFunction[o][l] && f && (this.modules[o][l] = !this.modules[o][l]);
1370
+ !this.isFunction[o][c] && f && (this.modules[o][c] = !this.modules[o][c]);
1319
1371
  }
1320
1372
  }
1321
1373
  // Calculates and returns the penalty score based on state of this QR Code's current modules.
@@ -1323,26 +1375,26 @@ var ce;
1323
1375
  getPenaltyScore() {
1324
1376
  let i = 0;
1325
1377
  for (let h = 0; h < this.size; h++) {
1326
- let p = !1, y = 0, w = [0, 0, 0, 0, 0, 0, 0];
1327
- for (let x = 0; x < this.size; x++)
1328
- this.modules[h][x] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[h][x], y = 1);
1329
- i += this.finderPenaltyTerminateAndCount(p, y, w) * S.PENALTY_N3;
1378
+ let p = !1, v = 0, w = [0, 0, 0, 0, 0, 0, 0];
1379
+ for (let _ = 0; _ < this.size; _++)
1380
+ this.modules[h][_] == p ? (v++, v == 5 ? i += S.PENALTY_N1 : v > 5 && i++) : (this.finderPenaltyAddHistory(v, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[h][_], v = 1);
1381
+ i += this.finderPenaltyTerminateAndCount(p, v, w) * S.PENALTY_N3;
1330
1382
  }
1331
1383
  for (let h = 0; h < this.size; h++) {
1332
- let p = !1, y = 0, w = [0, 0, 0, 0, 0, 0, 0];
1333
- for (let x = 0; x < this.size; x++)
1334
- this.modules[x][h] == p ? (y++, y == 5 ? i += S.PENALTY_N1 : y > 5 && i++) : (this.finderPenaltyAddHistory(y, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[x][h], y = 1);
1335
- i += this.finderPenaltyTerminateAndCount(p, y, w) * S.PENALTY_N3;
1384
+ let p = !1, v = 0, w = [0, 0, 0, 0, 0, 0, 0];
1385
+ for (let _ = 0; _ < this.size; _++)
1386
+ this.modules[_][h] == p ? (v++, v == 5 ? i += S.PENALTY_N1 : v > 5 && i++) : (this.finderPenaltyAddHistory(v, w), p || (i += this.finderPenaltyCountPatterns(w) * S.PENALTY_N3), p = this.modules[_][h], v = 1);
1387
+ i += this.finderPenaltyTerminateAndCount(p, v, w) * S.PENALTY_N3;
1336
1388
  }
1337
1389
  for (let h = 0; h < this.size - 1; h++)
1338
1390
  for (let p = 0; p < this.size - 1; p++) {
1339
- const y = this.modules[h][p];
1340
- y == this.modules[h][p + 1] && y == this.modules[h + 1][p] && y == this.modules[h + 1][p + 1] && (i += S.PENALTY_N2);
1391
+ const v = this.modules[h][p];
1392
+ v == this.modules[h][p + 1] && v == this.modules[h + 1][p] && v == this.modules[h + 1][p + 1] && (i += S.PENALTY_N2);
1341
1393
  }
1342
1394
  let o = 0;
1343
1395
  for (const h of this.modules)
1344
- o = h.reduce((p, y) => p + (y ? 1 : 0), o);
1345
- const l = this.size * this.size, f = Math.ceil(Math.abs(o * 20 - l * 10) / l) - 1;
1396
+ o = h.reduce((p, v) => p + (v ? 1 : 0), o);
1397
+ const c = this.size * this.size, f = Math.ceil(Math.abs(o * 20 - c * 10) / c) - 1;
1346
1398
  return n(0 <= f && f <= 9), i += f * S.PENALTY_N4, n(0 <= i && i <= 2568888), i;
1347
1399
  }
1348
1400
  /*-- Private helper functions --*/
@@ -1354,10 +1406,10 @@ var ce;
1354
1406
  return [];
1355
1407
  {
1356
1408
  const i = Math.floor(this.version / 7) + 2, o = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (i * 2 - 2)) * 2;
1357
- let l = [6];
1358
- for (let f = this.size - 7; l.length < i; f -= o)
1359
- l.splice(1, 0, f);
1360
- return l;
1409
+ let c = [6];
1410
+ for (let f = this.size - 7; c.length < i; f -= o)
1411
+ c.splice(1, 0, f);
1412
+ return c;
1361
1413
  }
1362
1414
  }
1363
1415
  // Returns the number of data bits that can be stored in a QR Code of the given version number, after
@@ -1368,8 +1420,8 @@ var ce;
1368
1420
  throw new RangeError("Version number out of range");
1369
1421
  let o = (16 * i + 128) * i + 64;
1370
1422
  if (i >= 2) {
1371
- const l = Math.floor(i / 7) + 2;
1372
- o -= (25 * l - 10) * l - 55, i >= 7 && (o -= 36);
1423
+ const c = Math.floor(i / 7) + 2;
1424
+ o -= (25 * c - 10) * c - 55, i >= 7 && (o -= 36);
1373
1425
  }
1374
1426
  return n(208 <= o && o <= 29648), o;
1375
1427
  }
@@ -1388,44 +1440,44 @@ var ce;
1388
1440
  for (let f = 0; f < i - 1; f++)
1389
1441
  o.push(0);
1390
1442
  o.push(1);
1391
- let l = 1;
1443
+ let c = 1;
1392
1444
  for (let f = 0; f < i; f++) {
1393
1445
  for (let h = 0; h < o.length; h++)
1394
- o[h] = S.reedSolomonMultiply(o[h], l), h + 1 < o.length && (o[h] ^= o[h + 1]);
1395
- l = S.reedSolomonMultiply(l, 2);
1446
+ o[h] = S.reedSolomonMultiply(o[h], c), h + 1 < o.length && (o[h] ^= o[h + 1]);
1447
+ c = S.reedSolomonMultiply(c, 2);
1396
1448
  }
1397
1449
  return o;
1398
1450
  }
1399
1451
  // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
1400
1452
  static reedSolomonComputeRemainder(i, o) {
1401
- let l = o.map((f) => 0);
1453
+ let c = o.map((f) => 0);
1402
1454
  for (const f of i) {
1403
- const h = f ^ l.shift();
1404
- l.push(0), o.forEach((p, y) => l[y] ^= S.reedSolomonMultiply(p, h));
1455
+ const h = f ^ c.shift();
1456
+ c.push(0), o.forEach((p, v) => c[v] ^= S.reedSolomonMultiply(p, h));
1405
1457
  }
1406
- return l;
1458
+ return c;
1407
1459
  }
1408
1460
  // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
1409
1461
  // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.
1410
1462
  static reedSolomonMultiply(i, o) {
1411
1463
  if (i >>> 8 || o >>> 8)
1412
1464
  throw new RangeError("Byte out of range");
1413
- let l = 0;
1465
+ let c = 0;
1414
1466
  for (let f = 7; f >= 0; f--)
1415
- l = l << 1 ^ (l >>> 7) * 285, l ^= (o >>> f & 1) * i;
1416
- return n(l >>> 8 == 0), l;
1467
+ c = c << 1 ^ (c >>> 7) * 285, c ^= (o >>> f & 1) * i;
1468
+ return n(c >>> 8 == 0), c;
1417
1469
  }
1418
1470
  // Can only be called immediately after a light run is added, and
1419
1471
  // returns either 0, 1, or 2. A helper function for getPenaltyScore().
1420
1472
  finderPenaltyCountPatterns(i) {
1421
1473
  const o = i[1];
1422
1474
  n(o <= this.size * 3);
1423
- const l = o > 0 && i[2] == o && i[3] == o * 3 && i[4] == o && i[5] == o;
1424
- return (l && i[0] >= o * 4 && i[6] >= o ? 1 : 0) + (l && i[6] >= o * 4 && i[0] >= o ? 1 : 0);
1475
+ const c = o > 0 && i[2] == o && i[3] == o * 3 && i[4] == o && i[5] == o;
1476
+ return (c && i[0] >= o * 4 && i[6] >= o ? 1 : 0) + (c && i[6] >= o * 4 && i[0] >= o ? 1 : 0);
1425
1477
  }
1426
1478
  // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
1427
- finderPenaltyTerminateAndCount(i, o, l) {
1428
- return i && (this.finderPenaltyAddHistory(o, l), o = 0), o += this.size, this.finderPenaltyAddHistory(o, l), this.finderPenaltyCountPatterns(l);
1479
+ finderPenaltyTerminateAndCount(i, o, c) {
1480
+ return i && (this.finderPenaltyAddHistory(o, c), o = 0), o += this.size, this.finderPenaltyAddHistory(o, c), this.finderPenaltyCountPatterns(c);
1429
1481
  }
1430
1482
  // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
1431
1483
  finderPenaltyAddHistory(i, o) {
@@ -1458,8 +1510,8 @@ var ce;
1458
1510
  function t(u, i, o) {
1459
1511
  if (i < 0 || i > 31 || u >>> i)
1460
1512
  throw new RangeError("Value out of range");
1461
- for (let l = i - 1; l >= 0; l--)
1462
- o.push(u >>> l & 1);
1513
+ for (let c = i - 1; c >= 0; c--)
1514
+ o.push(u >>> c & 1);
1463
1515
  }
1464
1516
  function s(u, i) {
1465
1517
  return (u >>> i & 1) != 0;
@@ -1473,10 +1525,10 @@ var ce;
1473
1525
  // Creates a new QR Code segment with the given attributes and data.
1474
1526
  // The character count (numChars) must agree with the mode and the bit buffer length,
1475
1527
  // but the constraint isn't checked. The given bit buffer is cloned and stored.
1476
- constructor(i, o, l) {
1477
- if (this.mode = i, this.numChars = o, this.bitData = l, o < 0)
1528
+ constructor(i, o, c) {
1529
+ if (this.mode = i, this.numChars = o, this.bitData = c, o < 0)
1478
1530
  throw new RangeError("Invalid argument");
1479
- this.bitData = l.slice();
1531
+ this.bitData = c.slice();
1480
1532
  }
1481
1533
  /*-- Static factory functions (mid level) --*/
1482
1534
  // Returns a segment representing the given binary data encoded in
@@ -1484,8 +1536,8 @@ var ce;
1484
1536
  // can be converted to UTF-8 bytes and encoded as a byte mode segment.
1485
1537
  static makeBytes(i) {
1486
1538
  let o = [];
1487
- for (const l of i)
1488
- t(l, 8, o);
1539
+ for (const c of i)
1540
+ t(c, 8, o);
1489
1541
  return new Z(Z.Mode.BYTE, i.length, o);
1490
1542
  }
1491
1543
  // Returns a segment representing the given string of decimal digits encoded in numeric mode.
@@ -1493,9 +1545,9 @@ var ce;
1493
1545
  if (!Z.isNumeric(i))
1494
1546
  throw new RangeError("String contains non-numeric characters");
1495
1547
  let o = [];
1496
- for (let l = 0; l < i.length; ) {
1497
- const f = Math.min(i.length - l, 3);
1498
- t(parseInt(i.substring(l, l + f), 10), f * 3 + 1, o), l += f;
1548
+ for (let c = 0; c < i.length; ) {
1549
+ const f = Math.min(i.length - c, 3);
1550
+ t(parseInt(i.substring(c, c + f), 10), f * 3 + 1, o), c += f;
1499
1551
  }
1500
1552
  return new Z(Z.Mode.NUMERIC, i.length, o);
1501
1553
  }
@@ -1505,12 +1557,12 @@ var ce;
1505
1557
  static makeAlphanumeric(i) {
1506
1558
  if (!Z.isAlphanumeric(i))
1507
1559
  throw new RangeError("String contains unencodable characters in alphanumeric mode");
1508
- let o = [], l;
1509
- for (l = 0; l + 2 <= i.length; l += 2) {
1510
- let f = Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(l)) * 45;
1511
- f += Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(l + 1)), t(f, 11, o);
1560
+ let o = [], c;
1561
+ for (c = 0; c + 2 <= i.length; c += 2) {
1562
+ let f = Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(c)) * 45;
1563
+ f += Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(c + 1)), t(f, 11, o);
1512
1564
  }
1513
- return l < i.length && t(Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(l)), 6, o), new Z(Z.Mode.ALPHANUMERIC, i.length, o);
1565
+ return c < i.length && t(Z.ALPHANUMERIC_CHARSET.indexOf(i.charAt(c)), 6, o), new Z(Z.Mode.ALPHANUMERIC, i.length, o);
1514
1566
  }
1515
1567
  // Returns a new mutable list of zero or more segments to represent the given Unicode text string.
1516
1568
  // The result may use various segment modes and switch modes to optimize the length of the bit stream.
@@ -1552,28 +1604,28 @@ var ce;
1552
1604
  // (Package-private) Calculates and returns the number of bits needed to encode the given segments at
1553
1605
  // the given version. The result is infinity if a segment has too many characters to fit its length field.
1554
1606
  static getTotalBits(i, o) {
1555
- let l = 0;
1607
+ let c = 0;
1556
1608
  for (const f of i) {
1557
1609
  const h = f.mode.numCharCountBits(o);
1558
1610
  if (f.numChars >= 1 << h)
1559
1611
  return 1 / 0;
1560
- l += 4 + h + f.bitData.length;
1612
+ c += 4 + h + f.bitData.length;
1561
1613
  }
1562
- return l;
1614
+ return c;
1563
1615
  }
1564
1616
  // Returns a new array of bytes representing the given string encoded in UTF-8.
1565
1617
  static toUtf8ByteArray(i) {
1566
1618
  i = encodeURI(i);
1567
1619
  let o = [];
1568
- for (let l = 0; l < i.length; l++)
1569
- i.charAt(l) != "%" ? o.push(i.charCodeAt(l)) : (o.push(parseInt(i.substring(l + 1, l + 3), 16)), l += 2);
1620
+ for (let c = 0; c < i.length; c++)
1621
+ i.charAt(c) != "%" ? o.push(i.charCodeAt(c)) : (o.push(parseInt(i.substring(c + 1, c + 3), 16)), c += 2);
1570
1622
  return o;
1571
1623
  }
1572
1624
  };
1573
1625
  a.NUMERIC_REGEX = /^[0-9]*$/, a.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, a.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
1574
1626
  let d = a;
1575
1627
  r.QrSegment = a;
1576
- })(ce || (ce = {}));
1628
+ })(ue || (ue = {}));
1577
1629
  ((r) => {
1578
1630
  ((e) => {
1579
1631
  const t = class {
@@ -1585,7 +1637,7 @@ var ce;
1585
1637
  };
1586
1638
  t.LOW = new t(0, 1), t.MEDIUM = new t(1, 0), t.QUARTILE = new t(2, 3), t.HIGH = new t(3, 2), e.Ecc = t;
1587
1639
  })(r.QrCode || (r.QrCode = {}));
1588
- })(ce || (ce = {}));
1640
+ })(ue || (ue = {}));
1589
1641
  ((r) => {
1590
1642
  ((e) => {
1591
1643
  const t = class {
@@ -1602,15 +1654,15 @@ var ce;
1602
1654
  };
1603
1655
  t.NUMERIC = new t(1, [10, 12, 14]), t.ALPHANUMERIC = new t(2, [9, 11, 13]), t.BYTE = new t(4, [8, 16, 16]), t.KANJI = new t(8, [8, 10, 12]), t.ECI = new t(7, [0, 0, 0]), e.Mode = t;
1604
1656
  })(r.QrSegment || (r.QrSegment = {}));
1605
- })(ce || (ce = {}));
1606
- var pe = ce;
1607
- var is = {
1608
- L: pe.QrCode.Ecc.LOW,
1609
- M: pe.QrCode.Ecc.MEDIUM,
1610
- Q: pe.QrCode.Ecc.QUARTILE,
1611
- H: pe.QrCode.Ecc.HIGH
1612
- }, Bt = 128, Wt = "L", qt = "#FFFFFF", Yt = "#000000", Qt = !1, Ht = 1, os = 4, ls = 0, cs = 0.1;
1613
- function Gt(r, e = 0) {
1657
+ })(ue || (ue = {}));
1658
+ var ve = ue;
1659
+ var os = {
1660
+ L: ve.QrCode.Ecc.LOW,
1661
+ M: ve.QrCode.Ecc.MEDIUM,
1662
+ Q: ve.QrCode.Ecc.QUARTILE,
1663
+ H: ve.QrCode.Ecc.HIGH
1664
+ }, qt = 128, Yt = "L", Qt = "#FFFFFF", Ht = "#000000", Gt = !1, Jt = 1, ls = 4, cs = 0, ds = 0.1;
1665
+ function Xt(r, e = 0) {
1614
1666
  const t = [];
1615
1667
  return r.forEach(function(s, n) {
1616
1668
  let a = null;
@@ -1633,25 +1685,25 @@ function Gt(r, e = 0) {
1633
1685
  });
1634
1686
  }), t.join("");
1635
1687
  }
1636
- function Jt(r, e) {
1688
+ function Kt(r, e) {
1637
1689
  return r.slice().map((t, s) => s < e.y || s >= e.y + e.h ? t : t.map((n, a) => a < e.x || a >= e.x + e.w ? n : !1));
1638
1690
  }
1639
- function ds(r, e, t, s) {
1691
+ function us(r, e, t, s) {
1640
1692
  if (s == null)
1641
1693
  return null;
1642
- const n = r.length + t * 2, a = Math.floor(e * cs), d = n / e, u = (s.width || a) * d, i = (s.height || a) * d, o = s.x == null ? r.length / 2 - u / 2 : s.x * d, l = s.y == null ? r.length / 2 - i / 2 : s.y * d, f = s.opacity == null ? 1 : s.opacity;
1694
+ const n = r.length + t * 2, a = Math.floor(e * ds), d = n / e, u = (s.width || a) * d, i = (s.height || a) * d, o = s.x == null ? r.length / 2 - u / 2 : s.x * d, c = s.y == null ? r.length / 2 - i / 2 : s.y * d, f = s.opacity == null ? 1 : s.opacity;
1643
1695
  let h = null;
1644
1696
  if (s.excavate) {
1645
- let y = Math.floor(o), w = Math.floor(l), x = Math.ceil(u + o - y), M = Math.ceil(i + l - w);
1646
- h = { x: y, y: w, w: x, h: M };
1697
+ let v = Math.floor(o), w = Math.floor(c), _ = Math.ceil(u + o - v), M = Math.ceil(i + c - w);
1698
+ h = { x: v, y: w, w: _, h: M };
1647
1699
  }
1648
1700
  const p = s.crossOrigin;
1649
- return { x: o, y: l, h: i, w: u, excavation: h, opacity: f, crossOrigin: p };
1701
+ return { x: o, y: c, h: i, w: u, excavation: h, opacity: f, crossOrigin: p };
1650
1702
  }
1651
- function us(r, e) {
1652
- return e != null ? Math.max(Math.floor(e), 0) : r ? os : ls;
1703
+ function fs(r, e) {
1704
+ return e != null ? Math.max(Math.floor(e), 0) : r ? ls : cs;
1653
1705
  }
1654
- function Xt({
1706
+ function er({
1655
1707
  value: r,
1656
1708
  level: e,
1657
1709
  minVersion: t,
@@ -1662,60 +1714,60 @@ function Xt({
1662
1714
  boostLevel: u
1663
1715
  }) {
1664
1716
  let i = F.useMemo(() => {
1665
- const y = (Array.isArray(r) ? r : [r]).reduce((w, x) => (w.push(...pe.QrSegment.makeSegments(x)), w), []);
1666
- return pe.QrCode.encodeSegments(
1667
- y,
1668
- is[e],
1717
+ const v = (Array.isArray(r) ? r : [r]).reduce((w, _) => (w.push(...ve.QrSegment.makeSegments(_)), w), []);
1718
+ return ve.QrCode.encodeSegments(
1719
+ v,
1720
+ os[e],
1669
1721
  t,
1670
1722
  void 0,
1671
1723
  void 0,
1672
1724
  u
1673
1725
  );
1674
1726
  }, [r, e, t, u]);
1675
- const { cells: o, margin: l, numCells: f, calculatedImageSettings: h } = F.useMemo(() => {
1727
+ const { cells: o, margin: c, numCells: f, calculatedImageSettings: h } = F.useMemo(() => {
1676
1728
  let p = i.getModules();
1677
- const y = us(s, n), w = p.length + y * 2, x = ds(
1729
+ const v = fs(s, n), w = p.length + v * 2, _ = us(
1678
1730
  p,
1679
1731
  d,
1680
- y,
1732
+ v,
1681
1733
  a
1682
1734
  );
1683
1735
  return {
1684
1736
  cells: p,
1685
- margin: y,
1737
+ margin: v,
1686
1738
  numCells: w,
1687
- calculatedImageSettings: x
1739
+ calculatedImageSettings: _
1688
1740
  };
1689
1741
  }, [i, d, a, s, n]);
1690
1742
  return {
1691
1743
  qrcode: i,
1692
- margin: l,
1744
+ margin: c,
1693
1745
  cells: o,
1694
1746
  numCells: f,
1695
1747
  calculatedImageSettings: h
1696
1748
  };
1697
1749
  }
1698
- var fs = (function() {
1750
+ var hs = (function() {
1699
1751
  try {
1700
1752
  new Path2D().addPath(new Path2D());
1701
1753
  } catch {
1702
1754
  return !1;
1703
1755
  }
1704
1756
  return !0;
1705
- })(), hs = F.forwardRef(
1757
+ })(), ms = F.forwardRef(
1706
1758
  function(e, t) {
1707
1759
  const s = e, {
1708
1760
  value: n,
1709
- size: a = Bt,
1710
- level: d = Wt,
1711
- bgColor: u = qt,
1712
- fgColor: i = Yt,
1713
- includeMargin: o = Qt,
1714
- minVersion: l = Ht,
1761
+ size: a = qt,
1762
+ level: d = Yt,
1763
+ bgColor: u = Qt,
1764
+ fgColor: i = Ht,
1765
+ includeMargin: o = Gt,
1766
+ minVersion: c = Jt,
1715
1767
  boostLevel: f,
1716
1768
  marginSize: h,
1717
1769
  imageSettings: p
1718
- } = s, w = tt(s, [
1770
+ } = s, w = et(s, [
1719
1771
  "value",
1720
1772
  "size",
1721
1773
  "level",
@@ -1726,15 +1778,15 @@ var fs = (function() {
1726
1778
  "boostLevel",
1727
1779
  "marginSize",
1728
1780
  "imageSettings"
1729
- ]), { style: x } = w, M = tt(w, ["style"]), R = p?.src, k = F.useRef(null), I = F.useRef(null), L = F.useCallback(
1781
+ ]), { style: _ } = w, M = et(w, ["style"]), R = p?.src, k = F.useRef(null), I = F.useRef(null), L = F.useCallback(
1730
1782
  (Q) => {
1731
1783
  k.current = Q, typeof t == "function" ? t(Q) : t && (t.current = Q);
1732
1784
  },
1733
1785
  [t]
1734
- ), [O, B] = F.useState(!1), { margin: W, cells: G, numCells: le, calculatedImageSettings: q } = Xt({
1786
+ ), [O, B] = F.useState(!1), { margin: W, cells: G, numCells: ce, calculatedImageSettings: q } = er({
1735
1787
  value: n,
1736
1788
  level: d,
1737
- minVersion: l,
1789
+ minVersion: c,
1738
1790
  boostLevel: f,
1739
1791
  includeMargin: o,
1740
1792
  marginSize: h,
@@ -1746,21 +1798,21 @@ var fs = (function() {
1746
1798
  const Q = k.current, U = Q.getContext("2d");
1747
1799
  if (!U)
1748
1800
  return;
1749
- let ke = G;
1750
- const re = I.current, je = q != null && re !== null && re.complete && re.naturalHeight !== 0 && re.naturalWidth !== 0;
1751
- je && q.excavation != null && (ke = Jt(
1801
+ let je = G;
1802
+ const te = I.current, Ne = q != null && te !== null && te.complete && te.naturalHeight !== 0 && te.naturalWidth !== 0;
1803
+ Ne && q.excavation != null && (je = Kt(
1752
1804
  G,
1753
1805
  q.excavation
1754
1806
  ));
1755
- const Ne = window.devicePixelRatio || 1;
1756
- Q.height = Q.width = a * Ne;
1757
- const Ee = a / le * Ne;
1758
- U.scale(Ee, Ee), U.fillStyle = u, U.fillRect(0, 0, le, le), U.fillStyle = i, fs ? U.fill(new Path2D(Gt(ke, W))) : G.forEach(function(m, E) {
1807
+ const Ee = window.devicePixelRatio || 1;
1808
+ Q.height = Q.width = a * Ee;
1809
+ const Ce = a / ce * Ee;
1810
+ U.scale(Ce, Ce), U.fillStyle = u, U.fillRect(0, 0, ce, ce), U.fillStyle = i, hs ? U.fill(new Path2D(Xt(je, W))) : G.forEach(function(m, E) {
1759
1811
  m.forEach(function($, D) {
1760
1812
  $ && U.fillRect(D + W, E + W, 1, 1);
1761
1813
  });
1762
- }), q && (U.globalAlpha = q.opacity), je && U.drawImage(
1763
- re,
1814
+ }), q && (U.globalAlpha = q.opacity), Ne && U.drawImage(
1815
+ te,
1764
1816
  q.x + W,
1765
1817
  q.y + W,
1766
1818
  q.w,
@@ -1770,7 +1822,7 @@ var fs = (function() {
1770
1822
  }), F.useEffect(() => {
1771
1823
  B(!1);
1772
1824
  }, [R]);
1773
- const P = et({ height: a, width: a }, x);
1825
+ const P = Ke({ height: a, width: a }, _);
1774
1826
  let Y = null;
1775
1827
  return R != null && (Y = /* @__PURE__ */ F.createElement(
1776
1828
  "img",
@@ -1786,7 +1838,7 @@ var fs = (function() {
1786
1838
  }
1787
1839
  )), /* @__PURE__ */ F.createElement(F.Fragment, null, /* @__PURE__ */ F.createElement(
1788
1840
  "canvas",
1789
- et({
1841
+ Ke({
1790
1842
  style: P,
1791
1843
  height: a,
1792
1844
  width: a,
@@ -1796,22 +1848,22 @@ var fs = (function() {
1796
1848
  ), Y);
1797
1849
  }
1798
1850
  );
1799
- hs.displayName = "QRCodeCanvas";
1800
- var Kt = F.forwardRef(
1851
+ ms.displayName = "QRCodeCanvas";
1852
+ var tr = F.forwardRef(
1801
1853
  function(e, t) {
1802
1854
  const s = e, {
1803
1855
  value: n,
1804
- size: a = Bt,
1805
- level: d = Wt,
1806
- bgColor: u = qt,
1807
- fgColor: i = Yt,
1808
- includeMargin: o = Qt,
1809
- minVersion: l = Ht,
1856
+ size: a = qt,
1857
+ level: d = Yt,
1858
+ bgColor: u = Qt,
1859
+ fgColor: i = Ht,
1860
+ includeMargin: o = Gt,
1861
+ minVersion: c = Jt,
1810
1862
  boostLevel: f,
1811
1863
  title: h,
1812
1864
  marginSize: p,
1813
- imageSettings: y
1814
- } = s, w = tt(s, [
1865
+ imageSettings: v
1866
+ } = s, w = et(s, [
1815
1867
  "value",
1816
1868
  "size",
1817
1869
  "level",
@@ -1823,37 +1875,37 @@ var Kt = F.forwardRef(
1823
1875
  "title",
1824
1876
  "marginSize",
1825
1877
  "imageSettings"
1826
- ]), { margin: x, cells: M, numCells: R, calculatedImageSettings: k } = Xt({
1878
+ ]), { margin: _, cells: M, numCells: R, calculatedImageSettings: k } = er({
1827
1879
  value: n,
1828
1880
  level: d,
1829
- minVersion: l,
1881
+ minVersion: c,
1830
1882
  boostLevel: f,
1831
1883
  includeMargin: o,
1832
1884
  marginSize: p,
1833
- imageSettings: y,
1885
+ imageSettings: v,
1834
1886
  size: a
1835
1887
  });
1836
1888
  let I = M, L = null;
1837
- y != null && k != null && (k.excavation != null && (I = Jt(
1889
+ v != null && k != null && (k.excavation != null && (I = Kt(
1838
1890
  M,
1839
1891
  k.excavation
1840
1892
  )), L = /* @__PURE__ */ F.createElement(
1841
1893
  "image",
1842
1894
  {
1843
- href: y.src,
1895
+ href: v.src,
1844
1896
  height: k.h,
1845
1897
  width: k.w,
1846
- x: k.x + x,
1847
- y: k.y + x,
1898
+ x: k.x + _,
1899
+ y: k.y + _,
1848
1900
  preserveAspectRatio: "none",
1849
1901
  opacity: k.opacity,
1850
1902
  crossOrigin: k.crossOrigin
1851
1903
  }
1852
1904
  ));
1853
- const O = Gt(I, x);
1905
+ const O = Xt(I, _);
1854
1906
  return /* @__PURE__ */ F.createElement(
1855
1907
  "svg",
1856
- et({
1908
+ Ke({
1857
1909
  height: a,
1858
1910
  width: a,
1859
1911
  viewBox: `0 0 ${R} ${R}`,
@@ -1874,8 +1926,8 @@ var Kt = F.forwardRef(
1874
1926
  );
1875
1927
  }
1876
1928
  );
1877
- Kt.displayName = "QRCodeSVG";
1878
- const ms = (r, e = "qr-code", t = 4) => {
1929
+ tr.displayName = "QRCodeSVG";
1930
+ const ps = (r, e = "qr-code", t = 4) => {
1879
1931
  const s = document.getElementById(r);
1880
1932
  if (!s) return;
1881
1933
  let n = new XMLSerializer().serializeToString(s);
@@ -1890,14 +1942,14 @@ const ms = (r, e = "qr-code", t = 4) => {
1890
1942
  )), /width="[^"]*"/.test(n) ? n = n.replace(/width="[^"]*"/, `width="${u}"`) : n = n.replace(/<svg(\s+)/, `<svg width="${u}" `), /height="[^"]*"/.test(n) ? n = n.replace(/height="[^"]*"/, `height="${i}"`) : n = n.replace(/<svg(\s+)/, `<svg height="${i}" `);
1891
1943
  const o = document.createElement("canvas");
1892
1944
  o.width = u, o.height = i;
1893
- const l = o.getContext("2d"), f = new Image();
1945
+ const c = o.getContext("2d"), f = new Image();
1894
1946
  f.onload = () => {
1895
- l?.drawImage(f, 0, 0, o.width, o.height);
1947
+ c?.drawImage(f, 0, 0, o.width, o.height);
1896
1948
  const h = o.toDataURL("image/png"), p = document.createElement("a");
1897
1949
  p.download = `${e}.png`, p.href = h, p.click();
1898
1950
  }, f.src = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(n)));
1899
1951
  };
1900
- function ps({
1952
+ function gs({
1901
1953
  id: r = "qr-code",
1902
1954
  value: e,
1903
1955
  size: t = 200,
@@ -1906,15 +1958,15 @@ function ps({
1906
1958
  showDownloads: a = !0
1907
1959
  }) {
1908
1960
  const d = n || e.replace(/[^a-z0-9_-]/gi, "-").slice(0, 40) || "qr-code";
1909
- return /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col items-start ", children: [
1910
- /* @__PURE__ */ c.jsx("div", { className: "bg-base-100 p-4 rounded-lg", children: /* @__PURE__ */ c.jsx(Kt, { id: r, value: e, size: t, level: s }) }),
1911
- a && /* @__PURE__ */ c.jsx("div", { className: "join justify-center self-center", children: /* @__PURE__ */ c.jsx(gs, { id: r, fileBase: d }) })
1961
+ return /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col items-start ", children: [
1962
+ /* @__PURE__ */ l.jsx("div", { className: "bg-base-100 p-4 rounded-lg", children: /* @__PURE__ */ l.jsx(tr, { id: r, value: e, size: t, level: s }) }),
1963
+ a && /* @__PURE__ */ l.jsx("div", { className: "join justify-center self-center", children: /* @__PURE__ */ l.jsx(vs, { id: r, fileBase: d }) })
1912
1964
  ] });
1913
1965
  }
1914
- function gs({ id: r, fileBase: e }) {
1915
- const [t, s] = qe(8), n = (a) => a === 8 ? "large" : a === 4 ? "medium" : "small";
1916
- return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1917
- /* @__PURE__ */ c.jsxs(
1966
+ function vs({ id: r, fileBase: e }) {
1967
+ const [t, s] = de(8), n = (a) => a === 8 ? "large" : a === 4 ? "medium" : "small";
1968
+ return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1969
+ /* @__PURE__ */ l.jsxs(
1918
1970
  "select",
1919
1971
  {
1920
1972
  className: "select join-item",
@@ -1922,24 +1974,24 @@ function gs({ id: r, fileBase: e }) {
1922
1974
  onChange: (a) => s(Number(a.target.value)),
1923
1975
  "aria-label": "Download scale",
1924
1976
  children: [
1925
- /* @__PURE__ */ c.jsx("option", { value: 8, children: "Large" }),
1926
- /* @__PURE__ */ c.jsx("option", { value: 4, children: "Medium" }),
1927
- /* @__PURE__ */ c.jsx("option", { value: 2, children: "Small" })
1977
+ /* @__PURE__ */ l.jsx("option", { value: 8, children: "Large" }),
1978
+ /* @__PURE__ */ l.jsx("option", { value: 4, children: "Medium" }),
1979
+ /* @__PURE__ */ l.jsx("option", { value: 2, children: "Small" })
1928
1980
  ]
1929
1981
  }
1930
1982
  ),
1931
- /* @__PURE__ */ c.jsx(
1983
+ /* @__PURE__ */ l.jsx(
1932
1984
  "button",
1933
1985
  {
1934
1986
  className: "btn btn-secondary join-item",
1935
- onClick: () => ms(r, `${e}-${n(t)}`, t),
1987
+ onClick: () => ps(r, `${e}-${n(t)}`, t),
1936
1988
  title: `Download ${t}x`,
1937
1989
  children: "Download"
1938
1990
  }
1939
1991
  )
1940
1992
  ] });
1941
1993
  }
1942
- function Te(r) {
1994
+ function Oe(r) {
1943
1995
  if (!r) return "";
1944
1996
  try {
1945
1997
  return new Date(r).toLocaleString();
@@ -1984,15 +2036,15 @@ var T;
1984
2036
  }
1985
2037
  r.joinValues = s, r.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
1986
2038
  })(T || (T = {}));
1987
- var vt;
2039
+ var xt;
1988
2040
  (function(r) {
1989
2041
  r.mergeShapes = (e, t) => ({
1990
2042
  ...e,
1991
2043
  ...t
1992
2044
  // second overwrites first
1993
2045
  });
1994
- })(vt || (vt = {}));
1995
- const _ = T.arrayToEnum([
2046
+ })(xt || (xt = {}));
2047
+ const x = T.arrayToEnum([
1996
2048
  "string",
1997
2049
  "nan",
1998
2050
  "number",
@@ -2013,26 +2065,26 @@ const _ = T.arrayToEnum([
2013
2065
  "never",
2014
2066
  "map",
2015
2067
  "set"
2016
- ]), se = (r) => {
2068
+ ]), re = (r) => {
2017
2069
  switch (typeof r) {
2018
2070
  case "undefined":
2019
- return _.undefined;
2071
+ return x.undefined;
2020
2072
  case "string":
2021
- return _.string;
2073
+ return x.string;
2022
2074
  case "number":
2023
- return Number.isNaN(r) ? _.nan : _.number;
2075
+ return Number.isNaN(r) ? x.nan : x.number;
2024
2076
  case "boolean":
2025
- return _.boolean;
2077
+ return x.boolean;
2026
2078
  case "function":
2027
- return _.function;
2079
+ return x.function;
2028
2080
  case "bigint":
2029
- return _.bigint;
2081
+ return x.bigint;
2030
2082
  case "symbol":
2031
- return _.symbol;
2083
+ return x.symbol;
2032
2084
  case "object":
2033
- return Array.isArray(r) ? _.array : r === null ? _.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? _.promise : typeof Map < "u" && r instanceof Map ? _.map : typeof Set < "u" && r instanceof Set ? _.set : typeof Date < "u" && r instanceof Date ? _.date : _.object;
2085
+ return Array.isArray(r) ? x.array : r === null ? x.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? x.promise : typeof Map < "u" && r instanceof Map ? x.map : typeof Set < "u" && r instanceof Set ? x.set : typeof Date < "u" && r instanceof Date ? x.date : x.object;
2034
2086
  default:
2035
- return _.unknown;
2087
+ return x.unknown;
2036
2088
  }
2037
2089
  }, g = T.arrayToEnum([
2038
2090
  "invalid_type",
@@ -2116,11 +2168,11 @@ class ee extends Error {
2116
2168
  }
2117
2169
  }
2118
2170
  ee.create = (r) => new ee(r);
2119
- const rt = (r, e) => {
2171
+ const tt = (r, e) => {
2120
2172
  let t;
2121
2173
  switch (r.code) {
2122
2174
  case g.invalid_type:
2123
- r.received === _.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
2175
+ r.received === x.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
2124
2176
  break;
2125
2177
  case g.invalid_literal:
2126
2178
  t = `Invalid literal value, expected ${JSON.stringify(r.expected, T.jsonStringifyReplacer)}`;
@@ -2172,8 +2224,8 @@ const rt = (r, e) => {
2172
2224
  }
2173
2225
  return { message: t };
2174
2226
  };
2175
- let ys = rt;
2176
- function vs() {
2227
+ let ys = tt;
2228
+ function xs() {
2177
2229
  return ys;
2178
2230
  }
2179
2231
  const _s = (r) => {
@@ -2197,8 +2249,8 @@ const _s = (r) => {
2197
2249
  message: u
2198
2250
  };
2199
2251
  };
2200
- function v(r, e) {
2201
- const t = vs(), s = _s({
2252
+ function y(r, e) {
2253
+ const t = xs(), s = _s({
2202
2254
  issueData: e,
2203
2255
  data: r.data,
2204
2256
  path: r.path,
@@ -2209,7 +2261,7 @@ function v(r, e) {
2209
2261
  // then schema-bound map if available
2210
2262
  t,
2211
2263
  // then global override map
2212
- t === rt ? void 0 : rt
2264
+ t === tt ? void 0 : tt
2213
2265
  // then global default map
2214
2266
  ].filter((n) => !!n)
2215
2267
  });
@@ -2258,7 +2310,7 @@ class H {
2258
2310
  }
2259
2311
  const j = Object.freeze({
2260
2312
  status: "aborted"
2261
- }), Oe = (r) => ({ status: "dirty", value: r }), J = (r) => ({ status: "valid", value: r }), _t = (r) => r.status === "aborted", xt = (r) => r.status === "dirty", ye = (r) => r.status === "valid", ze = (r) => typeof Promise < "u" && r instanceof Promise;
2313
+ }), Pe = (r) => ({ status: "dirty", value: r }), J = (r) => ({ status: "valid", value: r }), _t = (r) => r.status === "aborted", bt = (r) => r.status === "dirty", ye = (r) => r.status === "valid", Ve = (r) => typeof Promise < "u" && r instanceof Promise;
2262
2314
  var b;
2263
2315
  (function(r) {
2264
2316
  r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e?.message;
@@ -2271,7 +2323,7 @@ class ae {
2271
2323
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
2272
2324
  }
2273
2325
  }
2274
- const bt = (r, e) => {
2326
+ const wt = (r, e) => {
2275
2327
  if (ye(e))
2276
2328
  return { success: !0, data: e.value };
2277
2329
  if (!r.common.issues.length)
@@ -2302,13 +2354,13 @@ class A {
2302
2354
  return this._def.description;
2303
2355
  }
2304
2356
  _getType(e) {
2305
- return se(e.data);
2357
+ return re(e.data);
2306
2358
  }
2307
2359
  _getOrReturnCtx(e, t) {
2308
2360
  return t || {
2309
2361
  common: e.parent.common,
2310
2362
  data: e.data,
2311
- parsedType: se(e.data),
2363
+ parsedType: re(e.data),
2312
2364
  schemaErrorMap: this._def.errorMap,
2313
2365
  path: e.path,
2314
2366
  parent: e.parent
@@ -2320,7 +2372,7 @@ class A {
2320
2372
  ctx: {
2321
2373
  common: e.parent.common,
2322
2374
  data: e.data,
2323
- parsedType: se(e.data),
2375
+ parsedType: re(e.data),
2324
2376
  schemaErrorMap: this._def.errorMap,
2325
2377
  path: e.path,
2326
2378
  parent: e.parent
@@ -2329,7 +2381,7 @@ class A {
2329
2381
  }
2330
2382
  _parseSync(e) {
2331
2383
  const t = this._parse(e);
2332
- if (ze(t))
2384
+ if (Ve(t))
2333
2385
  throw new Error("Synchronous parse encountered promise.");
2334
2386
  return t;
2335
2387
  }
@@ -2354,9 +2406,9 @@ class A {
2354
2406
  schemaErrorMap: this._def.errorMap,
2355
2407
  parent: null,
2356
2408
  data: e,
2357
- parsedType: se(e)
2409
+ parsedType: re(e)
2358
2410
  }, n = this._parseSync({ data: e, path: s.path, parent: s });
2359
- return bt(s, n);
2411
+ return wt(s, n);
2360
2412
  }
2361
2413
  "~validate"(e) {
2362
2414
  const t = {
@@ -2368,7 +2420,7 @@ class A {
2368
2420
  schemaErrorMap: this._def.errorMap,
2369
2421
  parent: null,
2370
2422
  data: e,
2371
- parsedType: se(e)
2423
+ parsedType: re(e)
2372
2424
  };
2373
2425
  if (!this["~standard"].async)
2374
2426
  try {
@@ -2407,9 +2459,9 @@ class A {
2407
2459
  schemaErrorMap: this._def.errorMap,
2408
2460
  parent: null,
2409
2461
  data: e,
2410
- parsedType: se(e)
2411
- }, n = this._parse({ data: e, path: s.path, parent: s }), a = await (ze(n) ? n : Promise.resolve(n));
2412
- return bt(s, a);
2462
+ parsedType: re(e)
2463
+ }, n = this._parse({ data: e, path: s.path, parent: s }), a = await (Ve(n) ? n : Promise.resolve(n));
2464
+ return wt(s, a);
2413
2465
  }
2414
2466
  refine(e, t) {
2415
2467
  const s = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
@@ -2425,7 +2477,7 @@ class A {
2425
2477
  return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
2426
2478
  }
2427
2479
  _refinement(e) {
2428
- return new xe({
2480
+ return new be({
2429
2481
  schema: this,
2430
2482
  typeName: N.ZodEffects,
2431
2483
  effect: { type: "refinement", refinement: e }
@@ -2445,7 +2497,7 @@ class A {
2445
2497
  return ne.create(this, this._def);
2446
2498
  }
2447
2499
  nullable() {
2448
- return be.create(this, this._def);
2500
+ return we.create(this, this._def);
2449
2501
  }
2450
2502
  nullish() {
2451
2503
  return this.nullable().optional();
@@ -2454,16 +2506,16 @@ class A {
2454
2506
  return X.create(this);
2455
2507
  }
2456
2508
  promise() {
2457
- return We.create(this, this._def);
2509
+ return Ye.create(this, this._def);
2458
2510
  }
2459
2511
  or(e) {
2460
- return Ve.create([this, e], this._def);
2512
+ return We.create([this, e], this._def);
2461
2513
  }
2462
2514
  and(e) {
2463
- return Be.create(this, e, this._def);
2515
+ return qe.create(this, e, this._def);
2464
2516
  }
2465
2517
  transform(e) {
2466
- return new xe({
2518
+ return new be({
2467
2519
  ...C(this._def),
2468
2520
  schema: this,
2469
2521
  typeName: N.ZodEffects,
@@ -2472,7 +2524,7 @@ class A {
2472
2524
  }
2473
2525
  default(e) {
2474
2526
  const t = typeof e == "function" ? e : () => e;
2475
- return new nt({
2527
+ return new st({
2476
2528
  ...C(this._def),
2477
2529
  innerType: this,
2478
2530
  defaultValue: t,
@@ -2480,7 +2532,7 @@ class A {
2480
2532
  });
2481
2533
  }
2482
2534
  brand() {
2483
- return new Us({
2535
+ return new Vs({
2484
2536
  typeName: N.ZodBranded,
2485
2537
  type: this,
2486
2538
  ...C(this._def)
@@ -2488,7 +2540,7 @@ class A {
2488
2540
  }
2489
2541
  catch(e) {
2490
2542
  const t = typeof e == "function" ? e : () => e;
2491
- return new at({
2543
+ return new nt({
2492
2544
  ...C(this._def),
2493
2545
  innerType: this,
2494
2546
  catchValue: t,
@@ -2503,10 +2555,10 @@ class A {
2503
2555
  });
2504
2556
  }
2505
2557
  pipe(e) {
2506
- return ct.create(this, e);
2558
+ return dt.create(this, e);
2507
2559
  }
2508
2560
  readonly() {
2509
- return it.create(this);
2561
+ return at.create(this);
2510
2562
  }
2511
2563
  isOptional() {
2512
2564
  return this.safeParse(void 0).success;
@@ -2515,28 +2567,28 @@ class A {
2515
2567
  return this.safeParse(null).success;
2516
2568
  }
2517
2569
  }
2518
- const xs = /^c[^\s-]{8,}$/i, bs = /^[0-9a-z]+$/, ws = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ks = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, js = /^[a-z0-9_-]{21}$/i, Ns = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Es = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Cs = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ss = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2519
- let Xe;
2520
- const Rs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, As = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Ts = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Os = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ps = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Is = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, er = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ms = new RegExp(`^${er}$`);
2521
- function tr(r) {
2570
+ const bs = /^c[^\s-]{8,}$/i, ws = /^[0-9a-z]+$/, ks = /^[0-9A-HJKMNP-TV-Z]{26}$/i, js = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ns = /^[a-z0-9_-]{21}$/i, Es = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Cs = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ss = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Rs = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2571
+ let Je;
2572
+ const As = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ts = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Os = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ps = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Is = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ms = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, rr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ls = new RegExp(`^${rr}$`);
2573
+ function sr(r) {
2522
2574
  let e = "[0-5]\\d";
2523
2575
  r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`);
2524
2576
  const t = r.precision ? "+" : "?";
2525
2577
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
2526
2578
  }
2527
- function Ls(r) {
2528
- return new RegExp(`^${tr(r)}$`);
2529
- }
2530
2579
  function $s(r) {
2531
- let e = `${er}T${tr(r)}`;
2580
+ return new RegExp(`^${sr(r)}$`);
2581
+ }
2582
+ function Zs(r) {
2583
+ let e = `${rr}T${sr(r)}`;
2532
2584
  const t = [];
2533
2585
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
2534
2586
  }
2535
- function Zs(r, e) {
2536
- return !!((e === "v4" || !e) && Rs.test(r) || (e === "v6" || !e) && Ts.test(r));
2537
- }
2538
2587
  function Ds(r, e) {
2539
- if (!Ns.test(r))
2588
+ return !!((e === "v4" || !e) && As.test(r) || (e === "v6" || !e) && Os.test(r));
2589
+ }
2590
+ function Fs(r, e) {
2591
+ if (!Es.test(r))
2540
2592
  return !1;
2541
2593
  try {
2542
2594
  const [t] = r.split(".");
@@ -2548,16 +2600,16 @@ function Ds(r, e) {
2548
2600
  return !1;
2549
2601
  }
2550
2602
  }
2551
- function Fs(r, e) {
2552
- return !!((e === "v4" || !e) && As.test(r) || (e === "v6" || !e) && Os.test(r));
2603
+ function zs(r, e) {
2604
+ return !!((e === "v4" || !e) && Ts.test(r) || (e === "v6" || !e) && Ps.test(r));
2553
2605
  }
2554
2606
  class K extends A {
2555
2607
  _parse(e) {
2556
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== _.string) {
2608
+ if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== x.string) {
2557
2609
  const a = this._getOrReturnCtx(e);
2558
- return v(a, {
2610
+ return y(a, {
2559
2611
  code: g.invalid_type,
2560
- expected: _.string,
2612
+ expected: x.string,
2561
2613
  received: a.parsedType
2562
2614
  }), j;
2563
2615
  }
@@ -2565,7 +2617,7 @@ class K extends A {
2565
2617
  let n;
2566
2618
  for (const a of this._def.checks)
2567
2619
  if (a.kind === "min")
2568
- e.data.length < a.value && (n = this._getOrReturnCtx(e, n), v(n, {
2620
+ e.data.length < a.value && (n = this._getOrReturnCtx(e, n), y(n, {
2569
2621
  code: g.too_small,
2570
2622
  minimum: a.value,
2571
2623
  type: "string",
@@ -2574,7 +2626,7 @@ class K extends A {
2574
2626
  message: a.message
2575
2627
  }), s.dirty());
2576
2628
  else if (a.kind === "max")
2577
- e.data.length > a.value && (n = this._getOrReturnCtx(e, n), v(n, {
2629
+ e.data.length > a.value && (n = this._getOrReturnCtx(e, n), y(n, {
2578
2630
  code: g.too_big,
2579
2631
  maximum: a.value,
2580
2632
  type: "string",
@@ -2584,14 +2636,14 @@ class K extends A {
2584
2636
  }), s.dirty());
2585
2637
  else if (a.kind === "length") {
2586
2638
  const d = e.data.length > a.value, u = e.data.length < a.value;
2587
- (d || u) && (n = this._getOrReturnCtx(e, n), d ? v(n, {
2639
+ (d || u) && (n = this._getOrReturnCtx(e, n), d ? y(n, {
2588
2640
  code: g.too_big,
2589
2641
  maximum: a.value,
2590
2642
  type: "string",
2591
2643
  inclusive: !0,
2592
2644
  exact: !0,
2593
2645
  message: a.message
2594
- }) : u && v(n, {
2646
+ }) : u && y(n, {
2595
2647
  code: g.too_small,
2596
2648
  minimum: a.value,
2597
2649
  type: "string",
@@ -2600,43 +2652,43 @@ class K extends A {
2600
2652
  message: a.message
2601
2653
  }), s.dirty());
2602
2654
  } else if (a.kind === "email")
2603
- Cs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2655
+ Ss.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2604
2656
  validation: "email",
2605
2657
  code: g.invalid_string,
2606
2658
  message: a.message
2607
2659
  }), s.dirty());
2608
2660
  else if (a.kind === "emoji")
2609
- Xe || (Xe = new RegExp(Ss, "u")), Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2661
+ Je || (Je = new RegExp(Rs, "u")), Je.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2610
2662
  validation: "emoji",
2611
2663
  code: g.invalid_string,
2612
2664
  message: a.message
2613
2665
  }), s.dirty());
2614
2666
  else if (a.kind === "uuid")
2615
- ks.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2667
+ js.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2616
2668
  validation: "uuid",
2617
2669
  code: g.invalid_string,
2618
2670
  message: a.message
2619
2671
  }), s.dirty());
2620
2672
  else if (a.kind === "nanoid")
2621
- js.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2673
+ Ns.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2622
2674
  validation: "nanoid",
2623
2675
  code: g.invalid_string,
2624
2676
  message: a.message
2625
2677
  }), s.dirty());
2626
2678
  else if (a.kind === "cuid")
2627
- xs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2679
+ bs.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2628
2680
  validation: "cuid",
2629
2681
  code: g.invalid_string,
2630
2682
  message: a.message
2631
2683
  }), s.dirty());
2632
2684
  else if (a.kind === "cuid2")
2633
- bs.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2685
+ ws.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2634
2686
  validation: "cuid2",
2635
2687
  code: g.invalid_string,
2636
2688
  message: a.message
2637
2689
  }), s.dirty());
2638
2690
  else if (a.kind === "ulid")
2639
- ws.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2691
+ ks.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2640
2692
  validation: "ulid",
2641
2693
  code: g.invalid_string,
2642
2694
  message: a.message
@@ -2645,61 +2697,61 @@ class K extends A {
2645
2697
  try {
2646
2698
  new URL(e.data);
2647
2699
  } catch {
2648
- n = this._getOrReturnCtx(e, n), v(n, {
2700
+ n = this._getOrReturnCtx(e, n), y(n, {
2649
2701
  validation: "url",
2650
2702
  code: g.invalid_string,
2651
2703
  message: a.message
2652
2704
  }), s.dirty();
2653
2705
  }
2654
- else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2706
+ else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2655
2707
  validation: "regex",
2656
2708
  code: g.invalid_string,
2657
2709
  message: a.message
2658
- }), s.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(e, n), v(n, {
2710
+ }), s.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(e, n), y(n, {
2659
2711
  code: g.invalid_string,
2660
2712
  validation: { includes: a.value, position: a.position },
2661
2713
  message: a.message
2662
- }), s.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (n = this._getOrReturnCtx(e, n), v(n, {
2714
+ }), s.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (n = this._getOrReturnCtx(e, n), y(n, {
2663
2715
  code: g.invalid_string,
2664
2716
  validation: { startsWith: a.value },
2665
2717
  message: a.message
2666
- }), s.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (n = this._getOrReturnCtx(e, n), v(n, {
2718
+ }), s.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (n = this._getOrReturnCtx(e, n), y(n, {
2667
2719
  code: g.invalid_string,
2668
2720
  validation: { endsWith: a.value },
2669
2721
  message: a.message
2670
- }), s.dirty()) : a.kind === "datetime" ? $s(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2722
+ }), s.dirty()) : a.kind === "datetime" ? Zs(a).test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2671
2723
  code: g.invalid_string,
2672
2724
  validation: "datetime",
2673
2725
  message: a.message
2674
- }), s.dirty()) : a.kind === "date" ? Ms.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2726
+ }), s.dirty()) : a.kind === "date" ? Ls.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2675
2727
  code: g.invalid_string,
2676
2728
  validation: "date",
2677
2729
  message: a.message
2678
- }), s.dirty()) : a.kind === "time" ? Ls(a).test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2730
+ }), s.dirty()) : a.kind === "time" ? $s(a).test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2679
2731
  code: g.invalid_string,
2680
2732
  validation: "time",
2681
2733
  message: a.message
2682
- }), s.dirty()) : a.kind === "duration" ? Es.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2734
+ }), s.dirty()) : a.kind === "duration" ? Cs.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2683
2735
  validation: "duration",
2684
2736
  code: g.invalid_string,
2685
2737
  message: a.message
2686
- }), s.dirty()) : a.kind === "ip" ? Zs(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2738
+ }), s.dirty()) : a.kind === "ip" ? Ds(e.data, a.version) || (n = this._getOrReturnCtx(e, n), y(n, {
2687
2739
  validation: "ip",
2688
2740
  code: g.invalid_string,
2689
2741
  message: a.message
2690
- }), s.dirty()) : a.kind === "jwt" ? Ds(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), v(n, {
2742
+ }), s.dirty()) : a.kind === "jwt" ? Fs(e.data, a.alg) || (n = this._getOrReturnCtx(e, n), y(n, {
2691
2743
  validation: "jwt",
2692
2744
  code: g.invalid_string,
2693
2745
  message: a.message
2694
- }), s.dirty()) : a.kind === "cidr" ? Fs(e.data, a.version) || (n = this._getOrReturnCtx(e, n), v(n, {
2746
+ }), s.dirty()) : a.kind === "cidr" ? zs(e.data, a.version) || (n = this._getOrReturnCtx(e, n), y(n, {
2695
2747
  validation: "cidr",
2696
2748
  code: g.invalid_string,
2697
2749
  message: a.message
2698
- }), s.dirty()) : a.kind === "base64" ? Ps.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2750
+ }), s.dirty()) : a.kind === "base64" ? Is.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2699
2751
  validation: "base64",
2700
2752
  code: g.invalid_string,
2701
2753
  message: a.message
2702
- }), s.dirty()) : a.kind === "base64url" ? Is.test(e.data) || (n = this._getOrReturnCtx(e, n), v(n, {
2754
+ }), s.dirty()) : a.kind === "base64url" ? Ms.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
2703
2755
  validation: "base64url",
2704
2756
  code: g.invalid_string,
2705
2757
  message: a.message
@@ -2934,50 +2986,50 @@ K.create = (r) => new K({
2934
2986
  coerce: r?.coerce ?? !1,
2935
2987
  ...C(r)
2936
2988
  });
2937
- function zs(r, e) {
2989
+ function Us(r, e) {
2938
2990
  const t = (r.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, a = Number.parseInt(r.toFixed(n).replace(".", "")), d = Number.parseInt(e.toFixed(n).replace(".", ""));
2939
2991
  return a % d / 10 ** n;
2940
2992
  }
2941
- class de extends A {
2993
+ class fe extends A {
2942
2994
  constructor() {
2943
2995
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
2944
2996
  }
2945
2997
  _parse(e) {
2946
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== _.number) {
2998
+ if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== x.number) {
2947
2999
  const a = this._getOrReturnCtx(e);
2948
- return v(a, {
3000
+ return y(a, {
2949
3001
  code: g.invalid_type,
2950
- expected: _.number,
3002
+ expected: x.number,
2951
3003
  received: a.parsedType
2952
3004
  }), j;
2953
3005
  }
2954
3006
  let s;
2955
3007
  const n = new H();
2956
3008
  for (const a of this._def.checks)
2957
- a.kind === "int" ? T.isInteger(e.data) || (s = this._getOrReturnCtx(e, s), v(s, {
3009
+ a.kind === "int" ? T.isInteger(e.data) || (s = this._getOrReturnCtx(e, s), y(s, {
2958
3010
  code: g.invalid_type,
2959
3011
  expected: "integer",
2960
3012
  received: "float",
2961
3013
  message: a.message
2962
- }), n.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), v(s, {
3014
+ }), n.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), y(s, {
2963
3015
  code: g.too_small,
2964
3016
  minimum: a.value,
2965
3017
  type: "number",
2966
3018
  inclusive: a.inclusive,
2967
3019
  exact: !1,
2968
3020
  message: a.message
2969
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), v(s, {
3021
+ }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), y(s, {
2970
3022
  code: g.too_big,
2971
3023
  maximum: a.value,
2972
3024
  type: "number",
2973
3025
  inclusive: a.inclusive,
2974
3026
  exact: !1,
2975
3027
  message: a.message
2976
- }), n.dirty()) : a.kind === "multipleOf" ? zs(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), v(s, {
3028
+ }), n.dirty()) : a.kind === "multipleOf" ? Us(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), y(s, {
2977
3029
  code: g.not_multiple_of,
2978
3030
  multipleOf: a.value,
2979
3031
  message: a.message
2980
- }), n.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (s = this._getOrReturnCtx(e, s), v(s, {
3032
+ }), n.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (s = this._getOrReturnCtx(e, s), y(s, {
2981
3033
  code: g.not_finite,
2982
3034
  message: a.message
2983
3035
  }), n.dirty()) : T.assertNever(a);
@@ -2996,7 +3048,7 @@ class de extends A {
2996
3048
  return this.setLimit("max", e, !1, b.toString(t));
2997
3049
  }
2998
3050
  setLimit(e, t, s, n) {
2999
- return new de({
3051
+ return new fe({
3000
3052
  ...this._def,
3001
3053
  checks: [
3002
3054
  ...this._def.checks,
@@ -3010,7 +3062,7 @@ class de extends A {
3010
3062
  });
3011
3063
  }
3012
3064
  _addCheck(e) {
3013
- return new de({
3065
+ return new fe({
3014
3066
  ...this._def,
3015
3067
  checks: [...this._def.checks, e]
3016
3068
  });
@@ -3104,13 +3156,13 @@ class de extends A {
3104
3156
  return Number.isFinite(t) && Number.isFinite(e);
3105
3157
  }
3106
3158
  }
3107
- de.create = (r) => new de({
3159
+ fe.create = (r) => new fe({
3108
3160
  checks: [],
3109
3161
  typeName: N.ZodNumber,
3110
3162
  coerce: r?.coerce || !1,
3111
3163
  ...C(r)
3112
3164
  });
3113
- class ue extends A {
3165
+ class he extends A {
3114
3166
  constructor() {
3115
3167
  super(...arguments), this.min = this.gte, this.max = this.lte;
3116
3168
  }
@@ -3121,24 +3173,24 @@ class ue extends A {
3121
3173
  } catch {
3122
3174
  return this._getInvalidInput(e);
3123
3175
  }
3124
- if (this._getType(e) !== _.bigint)
3176
+ if (this._getType(e) !== x.bigint)
3125
3177
  return this._getInvalidInput(e);
3126
3178
  let s;
3127
3179
  const n = new H();
3128
3180
  for (const a of this._def.checks)
3129
- a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), v(s, {
3181
+ a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), y(s, {
3130
3182
  code: g.too_small,
3131
3183
  type: "bigint",
3132
3184
  minimum: a.value,
3133
3185
  inclusive: a.inclusive,
3134
3186
  message: a.message
3135
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), v(s, {
3187
+ }), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), y(s, {
3136
3188
  code: g.too_big,
3137
3189
  type: "bigint",
3138
3190
  maximum: a.value,
3139
3191
  inclusive: a.inclusive,
3140
3192
  message: a.message
3141
- }), n.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (s = this._getOrReturnCtx(e, s), v(s, {
3193
+ }), n.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (s = this._getOrReturnCtx(e, s), y(s, {
3142
3194
  code: g.not_multiple_of,
3143
3195
  multipleOf: a.value,
3144
3196
  message: a.message
@@ -3147,9 +3199,9 @@ class ue extends A {
3147
3199
  }
3148
3200
  _getInvalidInput(e) {
3149
3201
  const t = this._getOrReturnCtx(e);
3150
- return v(t, {
3202
+ return y(t, {
3151
3203
  code: g.invalid_type,
3152
- expected: _.bigint,
3204
+ expected: x.bigint,
3153
3205
  received: t.parsedType
3154
3206
  }), j;
3155
3207
  }
@@ -3166,7 +3218,7 @@ class ue extends A {
3166
3218
  return this.setLimit("max", e, !1, b.toString(t));
3167
3219
  }
3168
3220
  setLimit(e, t, s, n) {
3169
- return new ue({
3221
+ return new he({
3170
3222
  ...this._def,
3171
3223
  checks: [
3172
3224
  ...this._def.checks,
@@ -3180,7 +3232,7 @@ class ue extends A {
3180
3232
  });
3181
3233
  }
3182
3234
  _addCheck(e) {
3183
- return new ue({
3235
+ return new he({
3184
3236
  ...this._def,
3185
3237
  checks: [...this._def.checks, e]
3186
3238
  });
@@ -3237,57 +3289,57 @@ class ue extends A {
3237
3289
  return e;
3238
3290
  }
3239
3291
  }
3240
- ue.create = (r) => new ue({
3292
+ he.create = (r) => new he({
3241
3293
  checks: [],
3242
3294
  typeName: N.ZodBigInt,
3243
3295
  coerce: r?.coerce ?? !1,
3244
3296
  ...C(r)
3245
3297
  });
3246
- class Ue extends A {
3298
+ class Be extends A {
3247
3299
  _parse(e) {
3248
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== _.boolean) {
3300
+ if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== x.boolean) {
3249
3301
  const s = this._getOrReturnCtx(e);
3250
- return v(s, {
3302
+ return y(s, {
3251
3303
  code: g.invalid_type,
3252
- expected: _.boolean,
3304
+ expected: x.boolean,
3253
3305
  received: s.parsedType
3254
3306
  }), j;
3255
3307
  }
3256
3308
  return J(e.data);
3257
3309
  }
3258
3310
  }
3259
- Ue.create = (r) => new Ue({
3311
+ Be.create = (r) => new Be({
3260
3312
  typeName: N.ZodBoolean,
3261
3313
  coerce: r?.coerce || !1,
3262
3314
  ...C(r)
3263
3315
  });
3264
- class ve extends A {
3316
+ class xe extends A {
3265
3317
  _parse(e) {
3266
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== _.date) {
3318
+ if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== x.date) {
3267
3319
  const a = this._getOrReturnCtx(e);
3268
- return v(a, {
3320
+ return y(a, {
3269
3321
  code: g.invalid_type,
3270
- expected: _.date,
3322
+ expected: x.date,
3271
3323
  received: a.parsedType
3272
3324
  }), j;
3273
3325
  }
3274
3326
  if (Number.isNaN(e.data.getTime())) {
3275
3327
  const a = this._getOrReturnCtx(e);
3276
- return v(a, {
3328
+ return y(a, {
3277
3329
  code: g.invalid_date
3278
3330
  }), j;
3279
3331
  }
3280
3332
  const s = new H();
3281
3333
  let n;
3282
3334
  for (const a of this._def.checks)
3283
- a.kind === "min" ? e.data.getTime() < a.value && (n = this._getOrReturnCtx(e, n), v(n, {
3335
+ a.kind === "min" ? e.data.getTime() < a.value && (n = this._getOrReturnCtx(e, n), y(n, {
3284
3336
  code: g.too_small,
3285
3337
  message: a.message,
3286
3338
  inclusive: !0,
3287
3339
  exact: !1,
3288
3340
  minimum: a.value,
3289
3341
  type: "date"
3290
- }), s.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (n = this._getOrReturnCtx(e, n), v(n, {
3342
+ }), s.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (n = this._getOrReturnCtx(e, n), y(n, {
3291
3343
  code: g.too_big,
3292
3344
  message: a.message,
3293
3345
  inclusive: !0,
@@ -3301,7 +3353,7 @@ class ve extends A {
3301
3353
  };
3302
3354
  }
3303
3355
  _addCheck(e) {
3304
- return new ve({
3356
+ return new xe({
3305
3357
  ...this._def,
3306
3358
  checks: [...this._def.checks, e]
3307
3359
  });
@@ -3333,64 +3385,64 @@ class ve extends A {
3333
3385
  return e != null ? new Date(e) : null;
3334
3386
  }
3335
3387
  }
3336
- ve.create = (r) => new ve({
3388
+ xe.create = (r) => new xe({
3337
3389
  checks: [],
3338
3390
  coerce: r?.coerce || !1,
3339
3391
  typeName: N.ZodDate,
3340
3392
  ...C(r)
3341
3393
  });
3342
- class wt extends A {
3394
+ class kt extends A {
3343
3395
  _parse(e) {
3344
- if (this._getType(e) !== _.symbol) {
3396
+ if (this._getType(e) !== x.symbol) {
3345
3397
  const s = this._getOrReturnCtx(e);
3346
- return v(s, {
3398
+ return y(s, {
3347
3399
  code: g.invalid_type,
3348
- expected: _.symbol,
3400
+ expected: x.symbol,
3349
3401
  received: s.parsedType
3350
3402
  }), j;
3351
3403
  }
3352
3404
  return J(e.data);
3353
3405
  }
3354
3406
  }
3355
- wt.create = (r) => new wt({
3407
+ kt.create = (r) => new kt({
3356
3408
  typeName: N.ZodSymbol,
3357
3409
  ...C(r)
3358
3410
  });
3359
- class kt extends A {
3411
+ class jt extends A {
3360
3412
  _parse(e) {
3361
- if (this._getType(e) !== _.undefined) {
3413
+ if (this._getType(e) !== x.undefined) {
3362
3414
  const s = this._getOrReturnCtx(e);
3363
- return v(s, {
3415
+ return y(s, {
3364
3416
  code: g.invalid_type,
3365
- expected: _.undefined,
3417
+ expected: x.undefined,
3366
3418
  received: s.parsedType
3367
3419
  }), j;
3368
3420
  }
3369
3421
  return J(e.data);
3370
3422
  }
3371
3423
  }
3372
- kt.create = (r) => new kt({
3424
+ jt.create = (r) => new jt({
3373
3425
  typeName: N.ZodUndefined,
3374
3426
  ...C(r)
3375
3427
  });
3376
- class jt extends A {
3428
+ class Nt extends A {
3377
3429
  _parse(e) {
3378
- if (this._getType(e) !== _.null) {
3430
+ if (this._getType(e) !== x.null) {
3379
3431
  const s = this._getOrReturnCtx(e);
3380
- return v(s, {
3432
+ return y(s, {
3381
3433
  code: g.invalid_type,
3382
- expected: _.null,
3434
+ expected: x.null,
3383
3435
  received: s.parsedType
3384
3436
  }), j;
3385
3437
  }
3386
3438
  return J(e.data);
3387
3439
  }
3388
3440
  }
3389
- jt.create = (r) => new jt({
3441
+ Nt.create = (r) => new Nt({
3390
3442
  typeName: N.ZodNull,
3391
3443
  ...C(r)
3392
3444
  });
3393
- class Nt extends A {
3445
+ class Et extends A {
3394
3446
  constructor() {
3395
3447
  super(...arguments), this._any = !0;
3396
3448
  }
@@ -3398,11 +3450,11 @@ class Nt extends A {
3398
3450
  return J(e.data);
3399
3451
  }
3400
3452
  }
3401
- Nt.create = (r) => new Nt({
3453
+ Et.create = (r) => new Et({
3402
3454
  typeName: N.ZodAny,
3403
3455
  ...C(r)
3404
3456
  });
3405
- class Et extends A {
3457
+ class Ct extends A {
3406
3458
  constructor() {
3407
3459
  super(...arguments), this._unknown = !0;
3408
3460
  }
@@ -3410,16 +3462,16 @@ class Et extends A {
3410
3462
  return J(e.data);
3411
3463
  }
3412
3464
  }
3413
- Et.create = (r) => new Et({
3465
+ Ct.create = (r) => new Ct({
3414
3466
  typeName: N.ZodUnknown,
3415
3467
  ...C(r)
3416
3468
  });
3417
3469
  class ie extends A {
3418
3470
  _parse(e) {
3419
3471
  const t = this._getOrReturnCtx(e);
3420
- return v(t, {
3472
+ return y(t, {
3421
3473
  code: g.invalid_type,
3422
- expected: _.never,
3474
+ expected: x.never,
3423
3475
  received: t.parsedType
3424
3476
  }), j;
3425
3477
  }
@@ -3428,35 +3480,35 @@ ie.create = (r) => new ie({
3428
3480
  typeName: N.ZodNever,
3429
3481
  ...C(r)
3430
3482
  });
3431
- class Ct extends A {
3483
+ class St extends A {
3432
3484
  _parse(e) {
3433
- if (this._getType(e) !== _.undefined) {
3485
+ if (this._getType(e) !== x.undefined) {
3434
3486
  const s = this._getOrReturnCtx(e);
3435
- return v(s, {
3487
+ return y(s, {
3436
3488
  code: g.invalid_type,
3437
- expected: _.void,
3489
+ expected: x.void,
3438
3490
  received: s.parsedType
3439
3491
  }), j;
3440
3492
  }
3441
3493
  return J(e.data);
3442
3494
  }
3443
3495
  }
3444
- Ct.create = (r) => new Ct({
3496
+ St.create = (r) => new St({
3445
3497
  typeName: N.ZodVoid,
3446
3498
  ...C(r)
3447
3499
  });
3448
3500
  class X extends A {
3449
3501
  _parse(e) {
3450
3502
  const { ctx: t, status: s } = this._processInputParams(e), n = this._def;
3451
- if (t.parsedType !== _.array)
3452
- return v(t, {
3503
+ if (t.parsedType !== x.array)
3504
+ return y(t, {
3453
3505
  code: g.invalid_type,
3454
- expected: _.array,
3506
+ expected: x.array,
3455
3507
  received: t.parsedType
3456
3508
  }), j;
3457
3509
  if (n.exactLength !== null) {
3458
3510
  const d = t.data.length > n.exactLength.value, u = t.data.length < n.exactLength.value;
3459
- (d || u) && (v(t, {
3511
+ (d || u) && (y(t, {
3460
3512
  code: d ? g.too_big : g.too_small,
3461
3513
  minimum: u ? n.exactLength.value : void 0,
3462
3514
  maximum: d ? n.exactLength.value : void 0,
@@ -3466,14 +3518,14 @@ class X extends A {
3466
3518
  message: n.exactLength.message
3467
3519
  }), s.dirty());
3468
3520
  }
3469
- if (n.minLength !== null && t.data.length < n.minLength.value && (v(t, {
3521
+ if (n.minLength !== null && t.data.length < n.minLength.value && (y(t, {
3470
3522
  code: g.too_small,
3471
3523
  minimum: n.minLength.value,
3472
3524
  type: "array",
3473
3525
  inclusive: !0,
3474
3526
  exact: !1,
3475
3527
  message: n.minLength.message
3476
- }), s.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (v(t, {
3528
+ }), s.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (y(t, {
3477
3529
  code: g.too_big,
3478
3530
  maximum: n.maxLength.value,
3479
3531
  type: "array",
@@ -3518,12 +3570,12 @@ X.create = (r, e) => new X({
3518
3570
  typeName: N.ZodArray,
3519
3571
  ...C(e)
3520
3572
  });
3521
- function me(r) {
3573
+ function ge(r) {
3522
3574
  if (r instanceof z) {
3523
3575
  const e = {};
3524
3576
  for (const t in r.shape) {
3525
3577
  const s = r.shape[t];
3526
- e[t] = ne.create(me(s));
3578
+ e[t] = ne.create(ge(s));
3527
3579
  }
3528
3580
  return new z({
3529
3581
  ...r._def,
@@ -3531,8 +3583,8 @@ function me(r) {
3531
3583
  });
3532
3584
  } else return r instanceof X ? new X({
3533
3585
  ...r._def,
3534
- type: me(r.element)
3535
- }) : r instanceof ne ? ne.create(me(r.unwrap())) : r instanceof be ? be.create(me(r.unwrap())) : r instanceof fe ? fe.create(r.items.map((e) => me(e))) : r;
3586
+ type: ge(r.element)
3587
+ }) : r instanceof ne ? ne.create(ge(r.unwrap())) : r instanceof we ? we.create(ge(r.unwrap())) : r instanceof me ? me.create(r.items.map((e) => ge(e))) : r;
3536
3588
  }
3537
3589
  class z extends A {
3538
3590
  constructor() {
@@ -3545,11 +3597,11 @@ class z extends A {
3545
3597
  return this._cached = { shape: e, keys: t }, this._cached;
3546
3598
  }
3547
3599
  _parse(e) {
3548
- if (this._getType(e) !== _.object) {
3600
+ if (this._getType(e) !== x.object) {
3549
3601
  const o = this._getOrReturnCtx(e);
3550
- return v(o, {
3602
+ return y(o, {
3551
3603
  code: g.invalid_type,
3552
- expected: _.object,
3604
+ expected: x.object,
3553
3605
  received: o.parsedType
3554
3606
  }), j;
3555
3607
  }
@@ -3559,49 +3611,49 @@ class z extends A {
3559
3611
  d.includes(o) || u.push(o);
3560
3612
  const i = [];
3561
3613
  for (const o of d) {
3562
- const l = a[o], f = n.data[o];
3614
+ const c = a[o], f = n.data[o];
3563
3615
  i.push({
3564
3616
  key: { status: "valid", value: o },
3565
- value: l._parse(new ae(n, f, n.path, o)),
3617
+ value: c._parse(new ae(n, f, n.path, o)),
3566
3618
  alwaysSet: o in n.data
3567
3619
  });
3568
3620
  }
3569
3621
  if (this._def.catchall instanceof ie) {
3570
3622
  const o = this._def.unknownKeys;
3571
3623
  if (o === "passthrough")
3572
- for (const l of u)
3624
+ for (const c of u)
3573
3625
  i.push({
3574
- key: { status: "valid", value: l },
3575
- value: { status: "valid", value: n.data[l] }
3626
+ key: { status: "valid", value: c },
3627
+ value: { status: "valid", value: n.data[c] }
3576
3628
  });
3577
3629
  else if (o === "strict")
3578
- u.length > 0 && (v(n, {
3630
+ u.length > 0 && (y(n, {
3579
3631
  code: g.unrecognized_keys,
3580
3632
  keys: u
3581
3633
  }), s.dirty());
3582
3634
  else if (o !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
3583
3635
  } else {
3584
3636
  const o = this._def.catchall;
3585
- for (const l of u) {
3586
- const f = n.data[l];
3637
+ for (const c of u) {
3638
+ const f = n.data[c];
3587
3639
  i.push({
3588
- key: { status: "valid", value: l },
3640
+ key: { status: "valid", value: c },
3589
3641
  value: o._parse(
3590
- new ae(n, f, n.path, l)
3642
+ new ae(n, f, n.path, c)
3591
3643
  //, ctx.child(key), value, getParsedType(value)
3592
3644
  ),
3593
- alwaysSet: l in n.data
3645
+ alwaysSet: c in n.data
3594
3646
  });
3595
3647
  }
3596
3648
  }
3597
3649
  return n.common.async ? Promise.resolve().then(async () => {
3598
3650
  const o = [];
3599
- for (const l of i) {
3600
- const f = await l.key, h = await l.value;
3651
+ for (const c of i) {
3652
+ const f = await c.key, h = await c.value;
3601
3653
  o.push({
3602
3654
  key: f,
3603
3655
  value: h,
3604
- alwaysSet: l.alwaysSet
3656
+ alwaysSet: c.alwaysSet
3605
3657
  });
3606
3658
  }
3607
3659
  return o;
@@ -3767,7 +3819,7 @@ class z extends A {
3767
3819
  * @deprecated
3768
3820
  */
3769
3821
  deepPartial() {
3770
- return me(this);
3822
+ return ge(this);
3771
3823
  }
3772
3824
  partial(e) {
3773
3825
  const t = {};
@@ -3797,7 +3849,7 @@ class z extends A {
3797
3849
  });
3798
3850
  }
3799
3851
  keyof() {
3800
- return rr(T.objectKeys(this.shape));
3852
+ return nr(T.objectKeys(this.shape));
3801
3853
  }
3802
3854
  }
3803
3855
  z.create = (r, e) => new z({
@@ -3821,7 +3873,7 @@ z.lazycreate = (r, e) => new z({
3821
3873
  typeName: N.ZodObject,
3822
3874
  ...C(e)
3823
3875
  });
3824
- class Ve extends A {
3876
+ class We extends A {
3825
3877
  _parse(e) {
3826
3878
  const { ctx: t } = this._processInputParams(e), s = this._def.options;
3827
3879
  function n(a) {
@@ -3832,7 +3884,7 @@ class Ve extends A {
3832
3884
  if (u.result.status === "dirty")
3833
3885
  return t.common.issues.push(...u.ctx.common.issues), u.result;
3834
3886
  const d = a.map((u) => new ee(u.ctx.common.issues));
3835
- return v(t, {
3887
+ return y(t, {
3836
3888
  code: g.invalid_union,
3837
3889
  unionErrors: d
3838
3890
  }), j;
@@ -3867,19 +3919,19 @@ class Ve extends A {
3867
3919
  issues: []
3868
3920
  },
3869
3921
  parent: null
3870
- }, l = i._parseSync({
3922
+ }, c = i._parseSync({
3871
3923
  data: t.data,
3872
3924
  path: t.path,
3873
3925
  parent: o
3874
3926
  });
3875
- if (l.status === "valid")
3876
- return l;
3877
- l.status === "dirty" && !a && (a = { result: l, ctx: o }), o.common.issues.length && d.push(o.common.issues);
3927
+ if (c.status === "valid")
3928
+ return c;
3929
+ c.status === "dirty" && !a && (a = { result: c, ctx: o }), o.common.issues.length && d.push(o.common.issues);
3878
3930
  }
3879
3931
  if (a)
3880
3932
  return t.common.issues.push(...a.ctx.common.issues), a.result;
3881
3933
  const u = d.map((i) => new ee(i));
3882
- return v(t, {
3934
+ return y(t, {
3883
3935
  code: g.invalid_union,
3884
3936
  unionErrors: u
3885
3937
  }), j;
@@ -3889,44 +3941,44 @@ class Ve extends A {
3889
3941
  return this._def.options;
3890
3942
  }
3891
3943
  }
3892
- Ve.create = (r, e) => new Ve({
3944
+ We.create = (r, e) => new We({
3893
3945
  options: r,
3894
3946
  typeName: N.ZodUnion,
3895
3947
  ...C(e)
3896
3948
  });
3897
- function st(r, e) {
3898
- const t = se(r), s = se(e);
3949
+ function rt(r, e) {
3950
+ const t = re(r), s = re(e);
3899
3951
  if (r === e)
3900
3952
  return { valid: !0, data: r };
3901
- if (t === _.object && s === _.object) {
3953
+ if (t === x.object && s === x.object) {
3902
3954
  const n = T.objectKeys(e), a = T.objectKeys(r).filter((u) => n.indexOf(u) !== -1), d = { ...r, ...e };
3903
3955
  for (const u of a) {
3904
- const i = st(r[u], e[u]);
3956
+ const i = rt(r[u], e[u]);
3905
3957
  if (!i.valid)
3906
3958
  return { valid: !1 };
3907
3959
  d[u] = i.data;
3908
3960
  }
3909
3961
  return { valid: !0, data: d };
3910
- } else if (t === _.array && s === _.array) {
3962
+ } else if (t === x.array && s === x.array) {
3911
3963
  if (r.length !== e.length)
3912
3964
  return { valid: !1 };
3913
3965
  const n = [];
3914
3966
  for (let a = 0; a < r.length; a++) {
3915
- const d = r[a], u = e[a], i = st(d, u);
3967
+ const d = r[a], u = e[a], i = rt(d, u);
3916
3968
  if (!i.valid)
3917
3969
  return { valid: !1 };
3918
3970
  n.push(i.data);
3919
3971
  }
3920
3972
  return { valid: !0, data: n };
3921
- } else return t === _.date && s === _.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
3973
+ } else return t === x.date && s === x.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
3922
3974
  }
3923
- class Be extends A {
3975
+ class qe extends A {
3924
3976
  _parse(e) {
3925
3977
  const { status: t, ctx: s } = this._processInputParams(e), n = (a, d) => {
3926
3978
  if (_t(a) || _t(d))
3927
3979
  return j;
3928
- const u = st(a.value, d.value);
3929
- return u.valid ? ((xt(a) || xt(d)) && t.dirty(), { status: t.value, value: u.data }) : (v(s, {
3980
+ const u = rt(a.value, d.value);
3981
+ return u.valid ? ((bt(a) || bt(d)) && t.dirty(), { status: t.value, value: u.data }) : (y(s, {
3930
3982
  code: g.invalid_intersection_types
3931
3983
  }), j);
3932
3984
  };
@@ -3952,30 +4004,30 @@ class Be extends A {
3952
4004
  }));
3953
4005
  }
3954
4006
  }
3955
- Be.create = (r, e, t) => new Be({
4007
+ qe.create = (r, e, t) => new qe({
3956
4008
  left: r,
3957
4009
  right: e,
3958
4010
  typeName: N.ZodIntersection,
3959
4011
  ...C(t)
3960
4012
  });
3961
- class fe extends A {
4013
+ class me extends A {
3962
4014
  _parse(e) {
3963
4015
  const { status: t, ctx: s } = this._processInputParams(e);
3964
- if (s.parsedType !== _.array)
3965
- return v(s, {
4016
+ if (s.parsedType !== x.array)
4017
+ return y(s, {
3966
4018
  code: g.invalid_type,
3967
- expected: _.array,
4019
+ expected: x.array,
3968
4020
  received: s.parsedType
3969
4021
  }), j;
3970
4022
  if (s.data.length < this._def.items.length)
3971
- return v(s, {
4023
+ return y(s, {
3972
4024
  code: g.too_small,
3973
4025
  minimum: this._def.items.length,
3974
4026
  inclusive: !0,
3975
4027
  exact: !1,
3976
4028
  type: "array"
3977
4029
  }), j;
3978
- !this._def.rest && s.data.length > this._def.items.length && (v(s, {
4030
+ !this._def.rest && s.data.length > this._def.items.length && (y(s, {
3979
4031
  code: g.too_big,
3980
4032
  maximum: this._def.items.length,
3981
4033
  inclusive: !0,
@@ -3992,23 +4044,23 @@ class fe extends A {
3992
4044
  return this._def.items;
3993
4045
  }
3994
4046
  rest(e) {
3995
- return new fe({
4047
+ return new me({
3996
4048
  ...this._def,
3997
4049
  rest: e
3998
4050
  });
3999
4051
  }
4000
4052
  }
4001
- fe.create = (r, e) => {
4053
+ me.create = (r, e) => {
4002
4054
  if (!Array.isArray(r))
4003
4055
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
4004
- return new fe({
4056
+ return new me({
4005
4057
  items: r,
4006
4058
  typeName: N.ZodTuple,
4007
4059
  rest: null,
4008
4060
  ...C(e)
4009
4061
  });
4010
4062
  };
4011
- class St extends A {
4063
+ class Rt extends A {
4012
4064
  get keySchema() {
4013
4065
  return this._def.keyType;
4014
4066
  }
@@ -4017,10 +4069,10 @@ class St extends A {
4017
4069
  }
4018
4070
  _parse(e) {
4019
4071
  const { status: t, ctx: s } = this._processInputParams(e);
4020
- if (s.parsedType !== _.map)
4021
- return v(s, {
4072
+ if (s.parsedType !== x.map)
4073
+ return y(s, {
4022
4074
  code: g.invalid_type,
4023
- expected: _.map,
4075
+ expected: x.map,
4024
4076
  received: s.parsedType
4025
4077
  }), j;
4026
4078
  const n = this._def.keyType, a = this._def.valueType, d = [...s.data.entries()].map(([u, i], o) => ({
@@ -4031,49 +4083,49 @@ class St extends A {
4031
4083
  const u = /* @__PURE__ */ new Map();
4032
4084
  return Promise.resolve().then(async () => {
4033
4085
  for (const i of d) {
4034
- const o = await i.key, l = await i.value;
4035
- if (o.status === "aborted" || l.status === "aborted")
4086
+ const o = await i.key, c = await i.value;
4087
+ if (o.status === "aborted" || c.status === "aborted")
4036
4088
  return j;
4037
- (o.status === "dirty" || l.status === "dirty") && t.dirty(), u.set(o.value, l.value);
4089
+ (o.status === "dirty" || c.status === "dirty") && t.dirty(), u.set(o.value, c.value);
4038
4090
  }
4039
4091
  return { status: t.value, value: u };
4040
4092
  });
4041
4093
  } else {
4042
4094
  const u = /* @__PURE__ */ new Map();
4043
4095
  for (const i of d) {
4044
- const o = i.key, l = i.value;
4045
- if (o.status === "aborted" || l.status === "aborted")
4096
+ const o = i.key, c = i.value;
4097
+ if (o.status === "aborted" || c.status === "aborted")
4046
4098
  return j;
4047
- (o.status === "dirty" || l.status === "dirty") && t.dirty(), u.set(o.value, l.value);
4099
+ (o.status === "dirty" || c.status === "dirty") && t.dirty(), u.set(o.value, c.value);
4048
4100
  }
4049
4101
  return { status: t.value, value: u };
4050
4102
  }
4051
4103
  }
4052
4104
  }
4053
- St.create = (r, e, t) => new St({
4105
+ Rt.create = (r, e, t) => new Rt({
4054
4106
  valueType: e,
4055
4107
  keyType: r,
4056
4108
  typeName: N.ZodMap,
4057
4109
  ...C(t)
4058
4110
  });
4059
- class Pe extends A {
4111
+ class Me extends A {
4060
4112
  _parse(e) {
4061
4113
  const { status: t, ctx: s } = this._processInputParams(e);
4062
- if (s.parsedType !== _.set)
4063
- return v(s, {
4114
+ if (s.parsedType !== x.set)
4115
+ return y(s, {
4064
4116
  code: g.invalid_type,
4065
- expected: _.set,
4117
+ expected: x.set,
4066
4118
  received: s.parsedType
4067
4119
  }), j;
4068
4120
  const n = this._def;
4069
- n.minSize !== null && s.data.size < n.minSize.value && (v(s, {
4121
+ n.minSize !== null && s.data.size < n.minSize.value && (y(s, {
4070
4122
  code: g.too_small,
4071
4123
  minimum: n.minSize.value,
4072
4124
  type: "set",
4073
4125
  inclusive: !0,
4074
4126
  exact: !1,
4075
4127
  message: n.minSize.message
4076
- }), t.dirty()), n.maxSize !== null && s.data.size > n.maxSize.value && (v(s, {
4128
+ }), t.dirty()), n.maxSize !== null && s.data.size > n.maxSize.value && (y(s, {
4077
4129
  code: g.too_big,
4078
4130
  maximum: n.maxSize.value,
4079
4131
  type: "set",
@@ -4084,10 +4136,10 @@ class Pe extends A {
4084
4136
  const a = this._def.valueType;
4085
4137
  function d(i) {
4086
4138
  const o = /* @__PURE__ */ new Set();
4087
- for (const l of i) {
4088
- if (l.status === "aborted")
4139
+ for (const c of i) {
4140
+ if (c.status === "aborted")
4089
4141
  return j;
4090
- l.status === "dirty" && t.dirty(), o.add(l.value);
4142
+ c.status === "dirty" && t.dirty(), o.add(c.value);
4091
4143
  }
4092
4144
  return { status: t.value, value: o };
4093
4145
  }
@@ -4095,13 +4147,13 @@ class Pe extends A {
4095
4147
  return s.common.async ? Promise.all(u).then((i) => d(i)) : d(u);
4096
4148
  }
4097
4149
  min(e, t) {
4098
- return new Pe({
4150
+ return new Me({
4099
4151
  ...this._def,
4100
4152
  minSize: { value: e, message: b.toString(t) }
4101
4153
  });
4102
4154
  }
4103
4155
  max(e, t) {
4104
- return new Pe({
4156
+ return new Me({
4105
4157
  ...this._def,
4106
4158
  maxSize: { value: e, message: b.toString(t) }
4107
4159
  });
@@ -4113,14 +4165,14 @@ class Pe extends A {
4113
4165
  return this.min(1, e);
4114
4166
  }
4115
4167
  }
4116
- Pe.create = (r, e) => new Pe({
4168
+ Me.create = (r, e) => new Me({
4117
4169
  valueType: r,
4118
4170
  minSize: null,
4119
4171
  maxSize: null,
4120
4172
  typeName: N.ZodSet,
4121
4173
  ...C(e)
4122
4174
  });
4123
- class Rt extends A {
4175
+ class At extends A {
4124
4176
  get schema() {
4125
4177
  return this._def.getter();
4126
4178
  }
@@ -4129,16 +4181,16 @@ class Rt extends A {
4129
4181
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
4130
4182
  }
4131
4183
  }
4132
- Rt.create = (r, e) => new Rt({
4184
+ At.create = (r, e) => new At({
4133
4185
  getter: r,
4134
4186
  typeName: N.ZodLazy,
4135
4187
  ...C(e)
4136
4188
  });
4137
- class At extends A {
4189
+ class Tt extends A {
4138
4190
  _parse(e) {
4139
4191
  if (e.data !== this._def.value) {
4140
4192
  const t = this._getOrReturnCtx(e);
4141
- return v(t, {
4193
+ return y(t, {
4142
4194
  received: t.data,
4143
4195
  code: g.invalid_literal,
4144
4196
  expected: this._def.value
@@ -4150,12 +4202,12 @@ class At extends A {
4150
4202
  return this._def.value;
4151
4203
  }
4152
4204
  }
4153
- At.create = (r, e) => new At({
4205
+ Tt.create = (r, e) => new Tt({
4154
4206
  value: r,
4155
4207
  typeName: N.ZodLiteral,
4156
4208
  ...C(e)
4157
4209
  });
4158
- function rr(r, e) {
4210
+ function nr(r, e) {
4159
4211
  return new _e({
4160
4212
  values: r,
4161
4213
  typeName: N.ZodEnum,
@@ -4166,7 +4218,7 @@ class _e extends A {
4166
4218
  _parse(e) {
4167
4219
  if (typeof e.data != "string") {
4168
4220
  const t = this._getOrReturnCtx(e), s = this._def.values;
4169
- return v(t, {
4221
+ return y(t, {
4170
4222
  expected: T.joinValues(s),
4171
4223
  received: t.parsedType,
4172
4224
  code: g.invalid_type
@@ -4174,7 +4226,7 @@ class _e extends A {
4174
4226
  }
4175
4227
  if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
4176
4228
  const t = this._getOrReturnCtx(e), s = this._def.values;
4177
- return v(t, {
4229
+ return y(t, {
4178
4230
  received: t.data,
4179
4231
  code: g.invalid_enum_value,
4180
4232
  options: s
@@ -4216,13 +4268,13 @@ class _e extends A {
4216
4268
  });
4217
4269
  }
4218
4270
  }
4219
- _e.create = rr;
4220
- class Tt extends A {
4271
+ _e.create = nr;
4272
+ class Ot extends A {
4221
4273
  _parse(e) {
4222
4274
  const t = T.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
4223
- if (s.parsedType !== _.string && s.parsedType !== _.number) {
4275
+ if (s.parsedType !== x.string && s.parsedType !== x.number) {
4224
4276
  const n = T.objectValues(t);
4225
- return v(s, {
4277
+ return y(s, {
4226
4278
  expected: T.joinValues(n),
4227
4279
  received: s.parsedType,
4228
4280
  code: g.invalid_type
@@ -4230,7 +4282,7 @@ class Tt extends A {
4230
4282
  }
4231
4283
  if (this._cache || (this._cache = new Set(T.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
4232
4284
  const n = T.objectValues(t);
4233
- return v(s, {
4285
+ return y(s, {
4234
4286
  received: s.data,
4235
4287
  code: g.invalid_enum_value,
4236
4288
  options: n
@@ -4242,36 +4294,36 @@ class Tt extends A {
4242
4294
  return this._def.values;
4243
4295
  }
4244
4296
  }
4245
- Tt.create = (r, e) => new Tt({
4297
+ Ot.create = (r, e) => new Ot({
4246
4298
  values: r,
4247
4299
  typeName: N.ZodNativeEnum,
4248
4300
  ...C(e)
4249
4301
  });
4250
- class We extends A {
4302
+ class Ye extends A {
4251
4303
  unwrap() {
4252
4304
  return this._def.type;
4253
4305
  }
4254
4306
  _parse(e) {
4255
4307
  const { ctx: t } = this._processInputParams(e);
4256
- if (t.parsedType !== _.promise && t.common.async === !1)
4257
- return v(t, {
4308
+ if (t.parsedType !== x.promise && t.common.async === !1)
4309
+ return y(t, {
4258
4310
  code: g.invalid_type,
4259
- expected: _.promise,
4311
+ expected: x.promise,
4260
4312
  received: t.parsedType
4261
4313
  }), j;
4262
- const s = t.parsedType === _.promise ? t.data : Promise.resolve(t.data);
4314
+ const s = t.parsedType === x.promise ? t.data : Promise.resolve(t.data);
4263
4315
  return J(s.then((n) => this._def.type.parseAsync(n, {
4264
4316
  path: t.path,
4265
4317
  errorMap: t.common.contextualErrorMap
4266
4318
  })));
4267
4319
  }
4268
4320
  }
4269
- We.create = (r, e) => new We({
4321
+ Ye.create = (r, e) => new Ye({
4270
4322
  type: r,
4271
4323
  typeName: N.ZodPromise,
4272
4324
  ...C(e)
4273
4325
  });
4274
- class xe extends A {
4326
+ class be extends A {
4275
4327
  innerType() {
4276
4328
  return this._def.schema;
4277
4329
  }
@@ -4281,7 +4333,7 @@ class xe extends A {
4281
4333
  _parse(e) {
4282
4334
  const { status: t, ctx: s } = this._processInputParams(e), n = this._def.effect || null, a = {
4283
4335
  addIssue: (d) => {
4284
- v(s, d), d.fatal ? t.abort() : t.dirty();
4336
+ y(s, d), d.fatal ? t.abort() : t.dirty();
4285
4337
  },
4286
4338
  get path() {
4287
4339
  return s.path;
@@ -4298,7 +4350,7 @@ class xe extends A {
4298
4350
  path: s.path,
4299
4351
  parent: s
4300
4352
  });
4301
- return i.status === "aborted" ? j : i.status === "dirty" || t.value === "dirty" ? Oe(i.value) : i;
4353
+ return i.status === "aborted" ? j : i.status === "dirty" || t.value === "dirty" ? Pe(i.value) : i;
4302
4354
  });
4303
4355
  {
4304
4356
  if (t.value === "aborted")
@@ -4308,7 +4360,7 @@ class xe extends A {
4308
4360
  path: s.path,
4309
4361
  parent: s
4310
4362
  });
4311
- return u.status === "aborted" ? j : u.status === "dirty" || t.value === "dirty" ? Oe(u.value) : u;
4363
+ return u.status === "aborted" ? j : u.status === "dirty" || t.value === "dirty" ? Pe(u.value) : u;
4312
4364
  }
4313
4365
  }
4314
4366
  if (n.type === "refinement") {
@@ -4351,13 +4403,13 @@ class xe extends A {
4351
4403
  T.assertNever(n);
4352
4404
  }
4353
4405
  }
4354
- xe.create = (r, e, t) => new xe({
4406
+ be.create = (r, e, t) => new be({
4355
4407
  schema: r,
4356
4408
  typeName: N.ZodEffects,
4357
4409
  effect: e,
4358
4410
  ...C(t)
4359
4411
  });
4360
- xe.createWithPreprocess = (r, e, t) => new xe({
4412
+ be.createWithPreprocess = (r, e, t) => new be({
4361
4413
  schema: e,
4362
4414
  effect: { type: "preprocess", transform: r },
4363
4415
  typeName: N.ZodEffects,
@@ -4365,7 +4417,7 @@ xe.createWithPreprocess = (r, e, t) => new xe({
4365
4417
  });
4366
4418
  class ne extends A {
4367
4419
  _parse(e) {
4368
- return this._getType(e) === _.undefined ? J(void 0) : this._def.innerType._parse(e);
4420
+ return this._getType(e) === x.undefined ? J(void 0) : this._def.innerType._parse(e);
4369
4421
  }
4370
4422
  unwrap() {
4371
4423
  return this._def.innerType;
@@ -4376,24 +4428,24 @@ ne.create = (r, e) => new ne({
4376
4428
  typeName: N.ZodOptional,
4377
4429
  ...C(e)
4378
4430
  });
4379
- class be extends A {
4431
+ class we extends A {
4380
4432
  _parse(e) {
4381
- return this._getType(e) === _.null ? J(null) : this._def.innerType._parse(e);
4433
+ return this._getType(e) === x.null ? J(null) : this._def.innerType._parse(e);
4382
4434
  }
4383
4435
  unwrap() {
4384
4436
  return this._def.innerType;
4385
4437
  }
4386
4438
  }
4387
- be.create = (r, e) => new be({
4439
+ we.create = (r, e) => new we({
4388
4440
  innerType: r,
4389
4441
  typeName: N.ZodNullable,
4390
4442
  ...C(e)
4391
4443
  });
4392
- class nt extends A {
4444
+ class st extends A {
4393
4445
  _parse(e) {
4394
4446
  const { ctx: t } = this._processInputParams(e);
4395
4447
  let s = t.data;
4396
- return t.parsedType === _.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
4448
+ return t.parsedType === x.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
4397
4449
  data: s,
4398
4450
  path: t.path,
4399
4451
  parent: t
@@ -4403,13 +4455,13 @@ class nt extends A {
4403
4455
  return this._def.innerType;
4404
4456
  }
4405
4457
  }
4406
- nt.create = (r, e) => new nt({
4458
+ st.create = (r, e) => new st({
4407
4459
  innerType: r,
4408
4460
  typeName: N.ZodDefault,
4409
4461
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
4410
4462
  ...C(e)
4411
4463
  });
4412
- class at extends A {
4464
+ class nt extends A {
4413
4465
  _parse(e) {
4414
4466
  const { ctx: t } = this._processInputParams(e), s = {
4415
4467
  ...t,
@@ -4424,7 +4476,7 @@ class at extends A {
4424
4476
  ...s
4425
4477
  }
4426
4478
  });
4427
- return ze(n) ? n.then((a) => ({
4479
+ return Ve(n) ? n.then((a) => ({
4428
4480
  status: "valid",
4429
4481
  value: a.status === "valid" ? a.value : this._def.catchValue({
4430
4482
  get error() {
@@ -4446,30 +4498,30 @@ class at extends A {
4446
4498
  return this._def.innerType;
4447
4499
  }
4448
4500
  }
4449
- at.create = (r, e) => new at({
4501
+ nt.create = (r, e) => new nt({
4450
4502
  innerType: r,
4451
4503
  typeName: N.ZodCatch,
4452
4504
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
4453
4505
  ...C(e)
4454
4506
  });
4455
- class Ot extends A {
4507
+ class Pt extends A {
4456
4508
  _parse(e) {
4457
- if (this._getType(e) !== _.nan) {
4509
+ if (this._getType(e) !== x.nan) {
4458
4510
  const s = this._getOrReturnCtx(e);
4459
- return v(s, {
4511
+ return y(s, {
4460
4512
  code: g.invalid_type,
4461
- expected: _.nan,
4513
+ expected: x.nan,
4462
4514
  received: s.parsedType
4463
4515
  }), j;
4464
4516
  }
4465
4517
  return { status: "valid", value: e.data };
4466
4518
  }
4467
4519
  }
4468
- Ot.create = (r) => new Ot({
4520
+ Pt.create = (r) => new Pt({
4469
4521
  typeName: N.ZodNaN,
4470
4522
  ...C(r)
4471
4523
  });
4472
- class Us extends A {
4524
+ class Vs extends A {
4473
4525
  _parse(e) {
4474
4526
  const { ctx: t } = this._processInputParams(e), s = t.data;
4475
4527
  return this._def.type._parse({
@@ -4482,7 +4534,7 @@ class Us extends A {
4482
4534
  return this._def.type;
4483
4535
  }
4484
4536
  }
4485
- class ct extends A {
4537
+ class dt extends A {
4486
4538
  _parse(e) {
4487
4539
  const { status: t, ctx: s } = this._processInputParams(e);
4488
4540
  if (s.common.async)
@@ -4492,7 +4544,7 @@ class ct extends A {
4492
4544
  path: s.path,
4493
4545
  parent: s
4494
4546
  });
4495
- return a.status === "aborted" ? j : a.status === "dirty" ? (t.dirty(), Oe(a.value)) : this._def.out._parseAsync({
4547
+ return a.status === "aborted" ? j : a.status === "dirty" ? (t.dirty(), Pe(a.value)) : this._def.out._parseAsync({
4496
4548
  data: a.value,
4497
4549
  path: s.path,
4498
4550
  parent: s
@@ -4515,23 +4567,23 @@ class ct extends A {
4515
4567
  }
4516
4568
  }
4517
4569
  static create(e, t) {
4518
- return new ct({
4570
+ return new dt({
4519
4571
  in: e,
4520
4572
  out: t,
4521
4573
  typeName: N.ZodPipeline
4522
4574
  });
4523
4575
  }
4524
4576
  }
4525
- class it extends A {
4577
+ class at extends A {
4526
4578
  _parse(e) {
4527
4579
  const t = this._def.innerType._parse(e), s = (n) => (ye(n) && (n.value = Object.freeze(n.value)), n);
4528
- return ze(t) ? t.then((n) => s(n)) : s(t);
4580
+ return Ve(t) ? t.then((n) => s(n)) : s(t);
4529
4581
  }
4530
4582
  unwrap() {
4531
4583
  return this._def.innerType;
4532
4584
  }
4533
4585
  }
4534
- it.create = (r, e) => new it({
4586
+ at.create = (r, e) => new at({
4535
4587
  innerType: r,
4536
4588
  typeName: N.ZodReadonly,
4537
4589
  ...C(e)
@@ -4540,48 +4592,48 @@ var N;
4540
4592
  (function(r) {
4541
4593
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
4542
4594
  })(N || (N = {}));
4543
- const Ae = K.create;
4544
- de.create;
4545
- ue.create;
4546
- Ue.create;
4547
- ve.create;
4595
+ const Te = K.create;
4596
+ fe.create;
4597
+ he.create;
4598
+ Be.create;
4599
+ xe.create;
4548
4600
  ie.create;
4549
4601
  X.create;
4550
- const Vs = z.create;
4551
- Ve.create;
4552
- Be.create;
4553
- fe.create;
4554
- _e.create;
4602
+ const Bs = z.create;
4555
4603
  We.create;
4604
+ qe.create;
4605
+ me.create;
4606
+ _e.create;
4607
+ Ye.create;
4556
4608
  ne.create;
4557
- be.create;
4558
- const Pt = {
4609
+ we.create;
4610
+ const It = {
4559
4611
  string: ((r) => K.create({ ...r, coerce: !0 })),
4560
- number: ((r) => de.create({ ...r, coerce: !0 })),
4561
- boolean: ((r) => Ue.create({
4612
+ number: ((r) => fe.create({ ...r, coerce: !0 })),
4613
+ boolean: ((r) => Be.create({
4562
4614
  ...r,
4563
4615
  coerce: !0
4564
4616
  })),
4565
- bigint: ((r) => ue.create({ ...r, coerce: !0 })),
4566
- date: ((r) => ve.create({ ...r, coerce: !0 }))
4567
- }, Bs = Vs({
4568
- q: Ae().optional(),
4569
- task_type: Ae().optional(),
4570
- status: Ae().optional(),
4571
- from_date: Ae().optional(),
4572
- to_date: Ae().optional(),
4573
- page: Pt.number().int().positive().default(1),
4574
- per_page: Pt.number().int().positive().default(20)
4617
+ bigint: ((r) => he.create({ ...r, coerce: !0 })),
4618
+ date: ((r) => xe.create({ ...r, coerce: !0 }))
4619
+ }, Ws = Bs({
4620
+ q: Te().optional(),
4621
+ task_type: Te().optional(),
4622
+ status: Te().optional(),
4623
+ from_date: Te().optional(),
4624
+ to_date: Te().optional(),
4625
+ page: It.number().int().positive().default(1),
4626
+ per_page: It.number().int().positive().default(20)
4575
4627
  });
4576
- function sr(r) {
4628
+ function ar(r) {
4577
4629
  return { data: [], isLoading: !1, raw: { metadata: { total: 0 } } };
4578
4630
  }
4579
- function nr(r) {
4631
+ function ir(r) {
4580
4632
  return { data: null, isLoading: !1 };
4581
4633
  }
4582
- function ar({ setSelectedTask: r }) {
4634
+ function or({ setSelectedTask: r }) {
4583
4635
  const e = (s) => {
4584
- const { data: n, raw: a, isLoading: d } = sr();
4636
+ const { data: n, raw: a, isLoading: d } = ar();
4585
4637
  return {
4586
4638
  data: n ?? [],
4587
4639
  isLoading: d,
@@ -4594,7 +4646,7 @@ function ar({ setSelectedTask: r }) {
4594
4646
  {
4595
4647
  key: "attempts",
4596
4648
  header: "Attempts",
4597
- render: (s) => /* @__PURE__ */ c.jsxs("span", { children: [
4649
+ render: (s) => /* @__PURE__ */ l.jsxs("span", { children: [
4598
4650
  s.attempts,
4599
4651
  "/",
4600
4652
  s.max_attempts
@@ -4604,24 +4656,24 @@ function ar({ setSelectedTask: r }) {
4604
4656
  key: "error",
4605
4657
  header: "Error",
4606
4658
  className: "max-w-xs truncate",
4607
- render: (s) => /* @__PURE__ */ c.jsx("span", { title: s.error || "", children: s.error })
4659
+ render: (s) => /* @__PURE__ */ l.jsx("span", { title: s.error || "", children: s.error })
4608
4660
  },
4609
4661
  {
4610
4662
  key: "created_at",
4611
4663
  header: "Created",
4612
- render: (s) => Te(s.created_at)
4664
+ render: (s) => Oe(s.created_at)
4613
4665
  }
4614
4666
  ];
4615
- return /* @__PURE__ */ c.jsx(
4616
- zt,
4667
+ return /* @__PURE__ */ l.jsx(
4668
+ Vt,
4617
4669
  {
4618
4670
  title: "Background Tasks",
4619
- paramsSchema: Bs,
4671
+ paramsSchema: Ws,
4620
4672
  useQuery: e,
4621
4673
  columns: t,
4622
4674
  onRowClick: r,
4623
- renderFilters: (s, n) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
4624
- /* @__PURE__ */ c.jsx(
4675
+ renderFilters: (s, n) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4676
+ /* @__PURE__ */ l.jsx(
4625
4677
  "input",
4626
4678
  {
4627
4679
  type: "search",
@@ -4631,38 +4683,38 @@ function ar({ setSelectedTask: r }) {
4631
4683
  onChange: (a) => n("q", a.target.value)
4632
4684
  }
4633
4685
  ),
4634
- /* @__PURE__ */ c.jsxs(
4686
+ /* @__PURE__ */ l.jsxs(
4635
4687
  "select",
4636
4688
  {
4637
4689
  className: "select select-sm select-bordered w-40",
4638
4690
  value: s.task_type || "",
4639
4691
  onChange: (a) => n("task_type", a.target.value),
4640
4692
  children: [
4641
- /* @__PURE__ */ c.jsx("option", { value: "", children: "All Types" }),
4642
- /* @__PURE__ */ c.jsx("option", { value: "email_registration", children: "Email Registration" }),
4643
- /* @__PURE__ */ c.jsx("option", { value: "email_password_reset", children: "Email Password Reset" }),
4644
- /* @__PURE__ */ c.jsx("option", { value: "email_notification", children: "Email Notification" }),
4645
- /* @__PURE__ */ c.jsx("option", { value: "resize_image", children: "Resize Image" }),
4646
- /* @__PURE__ */ c.jsx("option", { value: "zip_import", children: "Zip Import" })
4693
+ /* @__PURE__ */ l.jsx("option", { value: "", children: "All Types" }),
4694
+ /* @__PURE__ */ l.jsx("option", { value: "email_registration", children: "Email Registration" }),
4695
+ /* @__PURE__ */ l.jsx("option", { value: "email_password_reset", children: "Email Password Reset" }),
4696
+ /* @__PURE__ */ l.jsx("option", { value: "email_notification", children: "Email Notification" }),
4697
+ /* @__PURE__ */ l.jsx("option", { value: "resize_image", children: "Resize Image" }),
4698
+ /* @__PURE__ */ l.jsx("option", { value: "zip_import", children: "Zip Import" })
4647
4699
  ]
4648
4700
  }
4649
4701
  ),
4650
- /* @__PURE__ */ c.jsxs(
4702
+ /* @__PURE__ */ l.jsxs(
4651
4703
  "select",
4652
4704
  {
4653
4705
  className: "select select-sm select-bordered w-40",
4654
4706
  value: s.status || "",
4655
4707
  onChange: (a) => n("status", a.target.value),
4656
4708
  children: [
4657
- /* @__PURE__ */ c.jsx("option", { value: "", children: "All Statuses" }),
4658
- /* @__PURE__ */ c.jsx("option", { value: "pending", children: "Pending" }),
4659
- /* @__PURE__ */ c.jsx("option", { value: "running", children: "Running" }),
4660
- /* @__PURE__ */ c.jsx("option", { value: "completed", children: "Completed" }),
4661
- /* @__PURE__ */ c.jsx("option", { value: "failed", children: "Failed" })
4709
+ /* @__PURE__ */ l.jsx("option", { value: "", children: "All Statuses" }),
4710
+ /* @__PURE__ */ l.jsx("option", { value: "pending", children: "Pending" }),
4711
+ /* @__PURE__ */ l.jsx("option", { value: "running", children: "Running" }),
4712
+ /* @__PURE__ */ l.jsx("option", { value: "completed", children: "Completed" }),
4713
+ /* @__PURE__ */ l.jsx("option", { value: "failed", children: "Failed" })
4662
4714
  ]
4663
4715
  }
4664
4716
  ),
4665
- /* @__PURE__ */ c.jsx(
4717
+ /* @__PURE__ */ l.jsx(
4666
4718
  "input",
4667
4719
  {
4668
4720
  type: "date",
@@ -4675,7 +4727,7 @@ function ar({ setSelectedTask: r }) {
4675
4727
  }
4676
4728
  }
4677
4729
  ),
4678
- /* @__PURE__ */ c.jsx(
4730
+ /* @__PURE__ */ l.jsx(
4679
4731
  "input",
4680
4732
  {
4681
4733
  type: "date",
@@ -4693,68 +4745,68 @@ function ar({ setSelectedTask: r }) {
4693
4745
  }
4694
4746
  );
4695
4747
  }
4696
- function ir({ selectedTask: r, setSelectedTask: e }) {
4697
- const s = nr(r?.id).data ?? null;
4748
+ function lr({ selectedTask: r, setSelectedTask: e }) {
4749
+ const s = ir(r?.id).data ?? null;
4698
4750
  if (!r) return null;
4699
4751
  const n = s?.payload ?? r.payload ?? null;
4700
- return /* @__PURE__ */ c.jsx(
4752
+ return /* @__PURE__ */ l.jsx(
4701
4753
  "div",
4702
4754
  {
4703
4755
  className: "modal modal-open",
4704
4756
  role: "dialog",
4705
4757
  onClick: () => e(null),
4706
- children: /* @__PURE__ */ c.jsxs("div", { className: "modal-box max-w-3xl", onClick: (a) => a.stopPropagation(), children: [
4707
- /* @__PURE__ */ c.jsxs("h3", { className: "font-bold text-lg", children: [
4758
+ children: /* @__PURE__ */ l.jsxs("div", { className: "modal-box max-w-3xl", onClick: (a) => a.stopPropagation(), children: [
4759
+ /* @__PURE__ */ l.jsxs("h3", { className: "font-bold text-lg", children: [
4708
4760
  "Task #",
4709
4761
  r.id,
4710
4762
  " — ",
4711
4763
  r.task_type
4712
4764
  ] }),
4713
- /* @__PURE__ */ c.jsxs("div", { className: "mt-4 grid grid-cols-2 gap-4 text-sm", children: [
4714
- /* @__PURE__ */ c.jsxs("div", { children: [
4715
- /* @__PURE__ */ c.jsx("strong", { children: "Status:" }),
4765
+ /* @__PURE__ */ l.jsxs("div", { className: "mt-4 grid grid-cols-2 gap-4 text-sm", children: [
4766
+ /* @__PURE__ */ l.jsxs("div", { children: [
4767
+ /* @__PURE__ */ l.jsx("strong", { children: "Status:" }),
4716
4768
  " ",
4717
4769
  r.status
4718
4770
  ] }),
4719
- /* @__PURE__ */ c.jsxs("div", { children: [
4720
- /* @__PURE__ */ c.jsx("strong", { children: "Attempts:" }),
4771
+ /* @__PURE__ */ l.jsxs("div", { children: [
4772
+ /* @__PURE__ */ l.jsx("strong", { children: "Attempts:" }),
4721
4773
  " ",
4722
4774
  r.attempts,
4723
4775
  "/",
4724
4776
  r.max_attempts
4725
4777
  ] }),
4726
- /* @__PURE__ */ c.jsxs("div", { children: [
4727
- /* @__PURE__ */ c.jsx("strong", { children: "Scheduled:" }),
4778
+ /* @__PURE__ */ l.jsxs("div", { children: [
4779
+ /* @__PURE__ */ l.jsx("strong", { children: "Scheduled:" }),
4728
4780
  " ",
4729
4781
  r.scheduled_for ?? "—"
4730
4782
  ] }),
4731
- /* @__PURE__ */ c.jsxs("div", { children: [
4732
- /* @__PURE__ */ c.jsx("strong", { children: "Started:" }),
4783
+ /* @__PURE__ */ l.jsxs("div", { children: [
4784
+ /* @__PURE__ */ l.jsx("strong", { children: "Started:" }),
4733
4785
  " ",
4734
- Te(r.started_at)
4786
+ Oe(r.started_at)
4735
4787
  ] }),
4736
- /* @__PURE__ */ c.jsxs("div", { children: [
4737
- /* @__PURE__ */ c.jsx("strong", { children: "Completed:" }),
4788
+ /* @__PURE__ */ l.jsxs("div", { children: [
4789
+ /* @__PURE__ */ l.jsx("strong", { children: "Completed:" }),
4738
4790
  " ",
4739
- Te(r.completed_at)
4791
+ Oe(r.completed_at)
4740
4792
  ] }),
4741
- /* @__PURE__ */ c.jsxs("div", { children: [
4742
- /* @__PURE__ */ c.jsx("strong", { children: "Created:" }),
4793
+ /* @__PURE__ */ l.jsxs("div", { children: [
4794
+ /* @__PURE__ */ l.jsx("strong", { children: "Created:" }),
4743
4795
  " ",
4744
- Te(r.created_at)
4796
+ Oe(r.created_at)
4745
4797
  ] }),
4746
- /* @__PURE__ */ c.jsxs("div", { children: [
4747
- /* @__PURE__ */ c.jsx("strong", { children: "Updated:" }),
4798
+ /* @__PURE__ */ l.jsxs("div", { children: [
4799
+ /* @__PURE__ */ l.jsx("strong", { children: "Updated:" }),
4748
4800
  " ",
4749
- Te(r.updated_at)
4801
+ Oe(r.updated_at)
4750
4802
  ] }),
4751
- /* @__PURE__ */ c.jsxs("div", { className: "col-span-2", children: [
4752
- /* @__PURE__ */ c.jsx("strong", { children: "Error:" }),
4753
- /* @__PURE__ */ c.jsx("div", { className: "whitespace-pre-wrap", children: r.error ?? "—" })
4803
+ /* @__PURE__ */ l.jsxs("div", { className: "col-span-2", children: [
4804
+ /* @__PURE__ */ l.jsx("strong", { children: "Error:" }),
4805
+ /* @__PURE__ */ l.jsx("div", { className: "whitespace-pre-wrap", children: r.error ?? "—" })
4754
4806
  ] }),
4755
- /* @__PURE__ */ c.jsxs("div", { className: "col-span-2", children: [
4756
- /* @__PURE__ */ c.jsx("strong", { children: "Payload:" }),
4757
- /* @__PURE__ */ c.jsx("pre", { className: "bg-base-200 p-2 rounded max-h-48 overflow-auto text-xs", children: (() => {
4807
+ /* @__PURE__ */ l.jsxs("div", { className: "col-span-2", children: [
4808
+ /* @__PURE__ */ l.jsx("strong", { children: "Payload:" }),
4809
+ /* @__PURE__ */ l.jsx("pre", { className: "bg-base-200 p-2 rounded max-h-48 overflow-auto text-xs", children: (() => {
4758
4810
  const a = n;
4759
4811
  if (a == null) return "—";
4760
4812
  try {
@@ -4766,35 +4818,35 @@ function ir({ selectedTask: r, setSelectedTask: e }) {
4766
4818
  })() })
4767
4819
  ] })
4768
4820
  ] }),
4769
- /* @__PURE__ */ c.jsx("div", { className: "modal-action", children: /* @__PURE__ */ c.jsx("button", { className: "btn", onClick: () => e(null), children: "Close" }) })
4821
+ /* @__PURE__ */ l.jsx("div", { className: "modal-action", children: /* @__PURE__ */ l.jsx("button", { className: "btn", onClick: () => e(null), children: "Close" }) })
4770
4822
  ] })
4771
4823
  }
4772
4824
  );
4773
4825
  }
4774
- const rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4826
+ const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4775
4827
  __proto__: null,
4776
- AdminLayout: $t,
4777
- AlertCard: Ar,
4778
- GenericFormModal: Tr,
4779
- GenericList: zt,
4780
- ModalErrors: ns,
4781
- Pagination: Zt,
4782
- QRCodeGenerator: ps,
4783
- TasksList: ar,
4784
- TasksModal: ir
4828
+ AdminLayout: Dt,
4829
+ AlertCard: Tr,
4830
+ GenericFormModal: Or,
4831
+ GenericList: Vt,
4832
+ ModalErrors: as,
4833
+ Pagination: Ut,
4834
+ QRCodeGenerator: gs,
4835
+ TasksList: or,
4836
+ TasksModal: lr
4785
4837
  }, Symbol.toStringTag, { value: "Module" }));
4786
- function Ws() {
4787
- const [r, e] = qe(null);
4788
- return /* @__PURE__ */ c.jsxs($t, { title: "Tasks", children: [
4789
- /* @__PURE__ */ c.jsx(ar, { setSelectedTask: e }),
4790
- /* @__PURE__ */ c.jsx(ir, { selectedTask: r, setSelectedTask: e })
4838
+ function qs() {
4839
+ const [r, e] = de(null);
4840
+ return /* @__PURE__ */ l.jsxs(Dt, { title: "Tasks", children: [
4841
+ /* @__PURE__ */ l.jsx(or, { setSelectedTask: e }),
4842
+ /* @__PURE__ */ l.jsx(lr, { selectedTask: r, setSelectedTask: e })
4791
4843
  ] });
4792
4844
  }
4793
- const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4845
+ const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4794
4846
  __proto__: null,
4795
- AdminTasks: Ws
4847
+ AdminTasks: qs
4796
4848
  }, Symbol.toStringTag, { value: "Module" }));
4797
- function nn({
4849
+ function an({
4798
4850
  label: r,
4799
4851
  field: e,
4800
4852
  params: t,
@@ -4802,22 +4854,22 @@ function nn({
4802
4854
  setFilters: n,
4803
4855
  className: a = ""
4804
4856
  }) {
4805
- const d = t.sort_by, u = t.sort_order, i = d === e, o = i ? u === "asc" ? gr : yr : pr, l = () => {
4857
+ const d = t.sort_by, u = t.sort_order, i = d === e, o = i ? u === "asc" ? vr : yr : gr, c = () => {
4806
4858
  let f = "asc";
4807
4859
  i && u === "asc" && (f = "desc"), n ? n({
4808
4860
  sort_by: e,
4809
4861
  sort_order: f
4810
4862
  }) : (s("sort_by", e), s("sort_order", f));
4811
4863
  };
4812
- return /* @__PURE__ */ c.jsxs(
4864
+ return /* @__PURE__ */ l.jsxs(
4813
4865
  "div",
4814
4866
  {
4815
4867
  className: `cursor-pointer hover:bg-base-200 transition-colors flex items-center gap-2 select-none ${a}`,
4816
- onClick: l,
4868
+ onClick: c,
4817
4869
  children: [
4818
4870
  r,
4819
- /* @__PURE__ */ c.jsx(
4820
- Qe,
4871
+ /* @__PURE__ */ l.jsx(
4872
+ Le,
4821
4873
  {
4822
4874
  icon: o,
4823
4875
  className: i ? "text-primary" : "text-base-content/30"
@@ -4827,13 +4879,13 @@ function nn({
4827
4879
  }
4828
4880
  );
4829
4881
  }
4830
- function an() {
4882
+ function on() {
4831
4883
  return {
4832
- useList: (r) => sr(),
4833
- useGet: (r) => nr()
4884
+ useList: (r) => ar(),
4885
+ useGet: (r) => ir()
4834
4886
  };
4835
4887
  }
4836
- function on(r, e) {
4888
+ function ln(r, e) {
4837
4889
  const t = {};
4838
4890
  e.defaults && Object.assign(t, e.defaults);
4839
4891
  for (const [s, n] of Object.entries(r || {}))
@@ -4852,19 +4904,19 @@ function on(r, e) {
4852
4904
  return t;
4853
4905
  }
4854
4906
  export {
4855
- $t as AdminLayout,
4856
- br as AuthProvider,
4857
- zt as GenericList,
4858
- Zt as Pagination,
4859
- nn as SortHeader,
4860
- Xs as auth,
4861
- Ks as buildApiQuery,
4862
- rn as components,
4863
- sn as pages,
4864
- ht as parseParams,
4865
- $e as toSearchParams,
4866
- te as useAuthApi,
4867
- Mt as useAuthConfig,
4868
- an as useTasksApi,
4869
- on as validateParams
4907
+ Dt as AdminLayout,
4908
+ wr as AuthProvider,
4909
+ Vt as GenericList,
4910
+ Ut as Pagination,
4911
+ an as SortHeader,
4912
+ Ks as auth,
4913
+ en as buildApiQuery,
4914
+ sn as components,
4915
+ nn as pages,
4916
+ vt as parseParams,
4917
+ Fe as toSearchParams,
4918
+ oe as useAuthApi,
4919
+ $t as useAuthConfig,
4920
+ on as useTasksApi,
4921
+ ln as validateParams
4870
4922
  };