@inertiaui/modal-react 0.19.3 → 0.19.4

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.
@@ -2,8 +2,8 @@ var fn = Object.defineProperty;
2
2
  var mn = (e, t, n) => t in e ? fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var q = (e, t, n) => mn(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Ee from "react";
5
- import E, { createContext as H, useState as S, useEffect as M, useContext as R, useRef as O, createElement as Re, useMemo as C, forwardRef as dt, useImperativeHandle as St, useLayoutEffect as pn, useCallback as Y, Fragment as G, isValidElement as hn, cloneElement as vn, useId as Pe, useSyncExternalStore as gn, useReducer as wn, createRef as yn } from "react";
6
- import { jsx as T, jsxs as se, Fragment as ct } from "react/jsx-runtime";
5
+ import E, { createContext as H, useContext as R, useEffect as M, useRef as O, useState as S, createElement as Re, useMemo as C, forwardRef as ct, useImperativeHandle as St, useLayoutEffect as pn, useCallback as Y, Fragment as G, isValidElement as hn, cloneElement as vn, useId as Pe, useSyncExternalStore as gn, useReducer as wn, createRef as yn } from "react";
6
+ import { jsxs as se, Fragment as dt, jsx as T } from "react/jsx-runtime";
7
7
  import De from "axios";
8
8
  import { router as xe, usePage as xn } from "@inertiajs/react";
9
9
  import { mergeDataIntoQueryString as bn } from "@inertiajs/core";
@@ -47,8 +47,8 @@ class $n {
47
47
  }
48
48
  const r = t.split(".");
49
49
  let l = this.config;
50
- for (let a = 0; a < r.length - 1; a++)
51
- l = l[r[a]] = l[r[a]] || {};
50
+ for (let o = 0; o < r.length - 1; o++)
51
+ l = l[r[o]] = l[r[o]] || {};
52
52
  l[r[r.length - 1]] = n;
53
53
  }
54
54
  get(t) {
@@ -64,7 +64,7 @@ class $n {
64
64
  return r;
65
65
  }
66
66
  }
67
- const _e = new $n(), Ll = () => _e.reset(), Sl = (e, t) => _e.put(e, t), ft = (e) => _e.get(e), de = (e, t) => _e.get(e ? `slideover.${t}` : `modal.${t}`);
67
+ const _e = new $n(), Ll = () => _e.reset(), Sl = (e, t) => _e.put(e, t), ft = (e) => _e.get(e), ce = (e, t) => _e.get(e ? `slideover.${t}` : `modal.${t}`);
68
68
  function Tn(e, t) {
69
69
  return e = typeof e == "string" ? new URL(e, window.location.origin) : e, t = typeof t == "string" ? new URL(t, window.location.origin) : t, `${e.origin}${e.pathname}` == `${t.origin}${t.pathname}`;
70
70
  }
@@ -82,15 +82,15 @@ function Pn(e) {
82
82
  }
83
83
  function Mn(e, t = 3, n = 10) {
84
84
  return new Promise((r, l) => {
85
- const a = e();
86
- if (a) {
87
- r(a);
85
+ const o = e();
86
+ if (o) {
87
+ r(o);
88
88
  return;
89
89
  }
90
- let o = t * 1e3 / n;
90
+ let a = t * 1e3 / n;
91
91
  const s = setInterval(() => {
92
92
  const i = e();
93
- i && (clearInterval(s), r(i)), --o <= 0 && (clearInterval(s), l(new Error("Condition not met in time")));
93
+ i && (clearInterval(s), r(i)), --a <= 0 && (clearInterval(s), l(new Error("Condition not met in time")));
94
94
  }, n);
95
95
  });
96
96
  }
@@ -99,9 +99,9 @@ function we(e) {
99
99
  }
100
100
  const Be = H(null);
101
101
  Be.displayName = "ModalStackContext";
102
- let Ct = null, kt = null, $e = null, rt = null, Ie = [], ce = {};
102
+ let Ct = null, kt = null, $e = null, rt = null, Ie = [], de = {};
103
103
  const Ln = ({ children: e }) => {
104
- const [t, n] = S([]), [r, l] = S({}), a = (v) => {
104
+ const [t, n] = S([]), [r, l] = S({}), o = (v) => {
105
105
  n((u) => {
106
106
  const m = v([...u]), p = (g) => {
107
107
  var x;
@@ -115,10 +115,10 @@ const Ln = ({ children: e }) => {
115
115
  M(() => {
116
116
  Ie = t;
117
117
  }, [t]);
118
- class o {
118
+ class a {
119
119
  constructor(u, m, p, g, x) {
120
120
  q(this, "show", () => {
121
- a(
121
+ o(
122
122
  (u) => u.map((m) => (m.id === this.id && !m.isOpen && (m.isOpen = !0, m.shouldRender = !0), m))
123
123
  );
124
124
  });
@@ -126,7 +126,7 @@ const Ln = ({ children: e }) => {
126
126
  u ? this.show() : this.close();
127
127
  });
128
128
  q(this, "close", () => {
129
- a(
129
+ o(
130
130
  (u) => u.map((m) => {
131
131
  var p;
132
132
  return m.id === this.id && m.isOpen && (Object.keys(m.listeners).forEach((g) => {
@@ -136,7 +136,7 @@ const Ln = ({ children: e }) => {
136
136
  );
137
137
  });
138
138
  q(this, "afterLeave", () => {
139
- this.isOpen || a((u) => {
139
+ this.isOpen || o((u) => {
140
140
  const m = u.map((p) => {
141
141
  var g;
142
142
  return p.id === this.id && !p.isOpen && (p.shouldRender = !1, (g = p.afterLeaveCallback) == null || g.call(p), p.afterLeaveCallback = null), p;
@@ -181,19 +181,19 @@ const Ln = ({ children: e }) => {
181
181
  });
182
182
  });
183
183
  q(this, "updateProps", (u) => {
184
- Object.assign(this.props, u), a((m) => m);
184
+ Object.assign(this.props, u), o((m) => m);
185
185
  });
186
- if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = m.props, this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback = x, ce[this.id]) {
186
+ if (this.id = m.id ?? et(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = u, this.props = m.props, this.response = m, this.config = p ?? {}, this.onCloseCallback = g, this.afterLeaveCallback = x, de[this.id]) {
187
187
  this.config = {
188
188
  ...this.config,
189
- ...ce[this.id].config ?? {}
189
+ ...de[this.id].config ?? {}
190
190
  };
191
- const h = ce[this.id].onClose, $ = ce[this.id].onAfterLeave;
191
+ const h = de[this.id].onClose, $ = de[this.id].onAfterLeave;
192
192
  h && (this.onCloseCallback = g ? () => {
193
193
  g(), h();
194
194
  } : h), $ && (this.afterLeaveCallback = x ? () => {
195
195
  x(), $();
196
- } : $), delete ce[this.id];
196
+ } : $), delete de[this.id];
197
197
  }
198
198
  this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
199
199
  }
@@ -202,10 +202,10 @@ const Ln = ({ children: e }) => {
202
202
  }
203
203
  }
204
204
  const s = (v, u = {}, m = null, p = null) => kt(v.component).then((g) => i(g, v, u, m, p)), i = (v, u, m, p, g) => {
205
- const x = new o(v, u, m, p, g);
206
- return x.index = t.length, a((h) => [...h, x]), x.show(), x;
205
+ const x = new a(v, u, m, p, g);
206
+ return x.index = t.length, o((h) => [...h, x]), x.show(), x;
207
207
  };
208
- function d(v, u, m, p) {
208
+ function c(v, u, m, p) {
209
209
  if (!r[v])
210
210
  throw new Error(`The local modal "${v}" has not been registered.`);
211
211
  const g = i(null, {}, u, m, p);
@@ -231,7 +231,7 @@ const Ln = ({ children: e }) => {
231
231
  const j = et();
232
232
  return new Promise((_, N) => {
233
233
  if (v.startsWith("#")) {
234
- _(d(v.substring(1), g, x, h));
234
+ _(c(v.substring(1), g, x, h));
235
235
  return;
236
236
  }
237
237
  const [U, B] = bn(u, v || "", m, $);
@@ -246,7 +246,7 @@ const Ln = ({ children: e }) => {
246
246
  "X-InertiaUI-Modal-Use-Router": X ? 1 : 0,
247
247
  "X-InertiaUI-Modal-Base-Url": $e
248
248
  }, X)
249
- return rt = null, ce[j] = {
249
+ return rt = null, de[j] = {
250
250
  config: g,
251
251
  onClose: x,
252
252
  onAfterLeave: h
@@ -270,7 +270,7 @@ const Ln = ({ children: e }) => {
270
270
  N(P);
271
271
  });
272
272
  });
273
- }, c = {
273
+ }, d = {
274
274
  stack: t,
275
275
  localModals: r,
276
276
  push: i,
@@ -279,7 +279,7 @@ const Ln = ({ children: e }) => {
279
279
  closeAll: () => {
280
280
  Ie.reverse().forEach((v) => v.close());
281
281
  },
282
- reset: () => a(() => []),
282
+ reset: () => o(() => []),
283
283
  visit: y,
284
284
  visitModal: f,
285
285
  registerLocalModal: (v, u) => {
@@ -295,7 +295,7 @@ const Ln = ({ children: e }) => {
295
295
  });
296
296
  }
297
297
  };
298
- return /* @__PURE__ */ T(Be.Provider, { value: c, children: e });
298
+ return /* @__PURE__ */ T(Be.Provider, { value: d, children: e });
299
299
  }, Xe = () => {
300
300
  const e = R(Be);
301
301
  if (e === null)
@@ -303,10 +303,10 @@ const Ln = ({ children: e }) => {
303
303
  return e;
304
304
  }, xt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Sn = (e) => {
305
305
  e.initialPage && (Ct = e.initialPage.version), e.resolveComponent && (kt = e.resolveComponent);
306
- }, Fl = (e, t) => (Sn(t), /* @__PURE__ */ T(Ln, { children: /* @__PURE__ */ T(e, { ...t, children: ({ Component: r, props: l, key: a }) => /* @__PURE__ */ se(ct, { children: [
306
+ }, Fl = (e, t) => (Sn(t), /* @__PURE__ */ T(Ln, { children: /* @__PURE__ */ T(e, { ...t, children: ({ Component: r, props: l, key: o }) => /* @__PURE__ */ se(dt, { children: [
307
307
  (() => {
308
- const s = Re(r, { key: a, ...l });
309
- return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((d, f) => Re(f, l, d)) : s;
308
+ const s = Re(r, { key: o, ...l });
309
+ return typeof r.layout == "function" ? r.layout(s) : Array.isArray(r.layout) ? r.layout.concat(s).reverse().reduce((c, f) => Re(f, l, c)) : s;
310
310
  })(),
311
311
  /* @__PURE__ */ T(Fn, {})
312
312
  ] }) }) })), Fn = ({ children: e }) => {
@@ -315,17 +315,17 @@ const Ln = ({ children: e }) => {
315
315
  let n = !1, r = !1;
316
316
  M(() => xe.on("start", () => n = !0), []), M(() => xe.on("finish", () => n = !1), []), M(
317
317
  () => xe.on("navigate", function(i) {
318
- const d = i.detail.page.props._inertiaui_modal;
319
- if (!d) {
318
+ const c = i.detail.page.props._inertiaui_modal;
319
+ if (!c) {
320
320
  r && t.closeAll();
321
321
  return;
322
322
  }
323
- r = d, $e = d.baseUrl, t.pushFromResponseData(d, {}, () => {
324
- if (!d.baseUrl) {
323
+ r = c, $e = c.baseUrl, t.pushFromResponseData(c, {}, () => {
324
+ if (!c.baseUrl) {
325
325
  console.error("No base url in modal response data so cannot navigate back");
326
326
  return;
327
327
  }
328
- !n && window.location.href !== d.baseUrl && xe.visit(d.baseUrl, {
328
+ !n && window.location.href !== c.baseUrl && xe.visit(c.baseUrl, {
329
329
  preserveScroll: !0,
330
330
  preserveState: !0
331
331
  });
@@ -337,12 +337,12 @@ const Ln = ({ children: e }) => {
337
337
  );
338
338
  const l = (i) => (Ie.length && (i.headers["X-InertiaUI-Modal-Base-Url"] = $e), i);
339
339
  M(() => (De.interceptors.request.use(l), () => De.interceptors.request.eject(l)), []);
340
- const a = xn(), o = O();
340
+ const o = xn(), a = O();
341
341
  return M(() => {
342
342
  var f, y;
343
- const i = (f = a.props) == null ? void 0 : f._inertiaui_modal, d = o.current;
344
- o.current = i, i && d && i.component === d.component && Tn(i.url, d.url) && ((y = t.stack[0]) == null || y.updateProps(i.props ?? {}));
345
- }, [(s = a.props) == null ? void 0 : s._inertiaui_modal]), /* @__PURE__ */ se(ct, { children: [
343
+ const i = (f = o.props) == null ? void 0 : f._inertiaui_modal, c = a.current;
344
+ a.current = i, i && c && i.component === c.component && Tn(i.url, c.url) && ((y = t.stack[0]) == null || y.updateProps(i.props ?? {}));
345
+ }, [(s = o.props) == null ? void 0 : s._inertiaui_modal]), /* @__PURE__ */ se(dt, { children: [
346
346
  e,
347
347
  t.stack.length > 0 && /* @__PURE__ */ T(At, { index: 0 })
348
348
  ] });
@@ -362,44 +362,44 @@ const Nt = () => {
362
362
  onModalEvent: (...r) => n.emit(...r)
363
363
  }
364
364
  ) });
365
- }, It = dt(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: a = null, ...o }, s) => {
366
- const i = Nt(), { stack: d, registerLocalModal: f, removeLocalModal: y } = Xe(), [b, w] = S(null), c = C(() => e ? b : d[i], [e, b, i, d]), v = C(() => {
365
+ }, It = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, ...a }, s) => {
366
+ const i = Nt(), { stack: c, registerLocalModal: f, removeLocalModal: y } = Xe(), [b, w] = S(null), d = C(() => e ? b : c[i], [e, b, i, c]), v = C(() => {
367
367
  var h;
368
- return (h = d.find(($) => $.shouldRender && $.index > (c == null ? void 0 : c.index))) == null ? void 0 : h.index;
369
- }, [i, d]), u = C(() => (c == null ? void 0 : c.config.slideover) ?? o.slideover ?? ft("type") === "slideover", [o.slideover]), m = C(
368
+ return (h = c.find(($) => $.shouldRender && $.index > (d == null ? void 0 : d.index))) == null ? void 0 : h.index;
369
+ }, [i, c]), u = C(() => (d == null ? void 0 : d.config.slideover) ?? a.slideover ?? ft("type") === "slideover", [a.slideover]), m = C(
370
370
  () => ({
371
371
  slideover: u,
372
- closeButton: o.closeButton ?? de(u, "closeButton"),
373
- closeExplicitly: o.closeExplicitly ?? de(u, "closeExplicitly"),
374
- maxWidth: o.maxWidth ?? de(u, "maxWidth"),
375
- paddingClasses: o.paddingClasses ?? de(u, "paddingClasses"),
376
- panelClasses: o.panelClasses ?? de(u, "panelClasses"),
377
- position: o.position ?? de(u, "position"),
378
- ...c == null ? void 0 : c.config
372
+ closeButton: a.closeButton ?? ce(u, "closeButton"),
373
+ closeExplicitly: a.closeExplicitly ?? ce(u, "closeExplicitly"),
374
+ maxWidth: a.maxWidth ?? ce(u, "maxWidth"),
375
+ paddingClasses: a.paddingClasses ?? ce(u, "paddingClasses"),
376
+ panelClasses: a.panelClasses ?? ce(u, "panelClasses"),
377
+ position: a.position ?? ce(u, "position"),
378
+ ...d == null ? void 0 : d.config
379
379
  }),
380
- [o, c == null ? void 0 : c.config]
380
+ [a, d == null ? void 0 : d.config]
381
381
  );
382
382
  M(() => {
383
383
  if (e) {
384
384
  let h = null;
385
385
  return f(e, ($) => {
386
- h = $.registerEventListenersFromProps(o), w($);
386
+ h = $.registerEventListenersFromProps(a), w($);
387
387
  }), () => {
388
388
  h == null || h(), h = null, y(e);
389
389
  };
390
390
  }
391
- return c.registerEventListenersFromProps(o);
391
+ return d.registerEventListenersFromProps(a);
392
392
  }, [e]);
393
- const p = O(c);
393
+ const p = O(d);
394
394
  M(() => {
395
- p.current = c;
396
- }, [c]), M(() => {
397
- c !== null && (c.isOpen ? a == null || a() : l == null || l());
398
- }, [c == null ? void 0 : c.isOpen]);
395
+ p.current = d;
396
+ }, [d]), M(() => {
397
+ d !== null && (d.isOpen ? o == null || o() : l == null || l());
398
+ }, [d == null ? void 0 : d.isOpen]);
399
399
  const [g, x] = S(!1);
400
400
  return M(() => {
401
- g && c !== null && c.isOpen && (c.onTopOfStack ? n == null || n() : r == null || r()), x(!0);
402
- }, [c == null ? void 0 : c.onTopOfStack]), St(
401
+ g && d !== null && d.isOpen && (d.onTopOfStack ? n == null || n() : r == null || r()), x(!0);
402
+ }, [d == null ? void 0 : d.onTopOfStack]), St(
403
403
  s,
404
404
  () => ({
405
405
  afterLeave: () => {
@@ -458,23 +458,23 @@ const Nt = () => {
458
458
  return (h = p.current) == null ? void 0 : h.shouldRender;
459
459
  }
460
460
  }),
461
- [c]
462
- ), (c == null ? void 0 : c.shouldRender) && /* @__PURE__ */ se(ct, { children: [
461
+ [d]
462
+ ), (d == null ? void 0 : d.shouldRender) && /* @__PURE__ */ se(dt, { children: [
463
463
  typeof t == "function" ? t({
464
- afterLeave: c.afterLeave,
465
- close: c.close,
464
+ afterLeave: d.afterLeave,
465
+ close: d.close,
466
466
  config: m,
467
- emit: c.emit,
468
- getChildModal: c.getChildModal,
469
- getParentModal: c.getParentModal,
470
- id: c.id,
471
- index: c.index,
472
- isOpen: c.isOpen,
473
- modalContext: c,
474
- onTopOfStack: c.onTopOfStack,
475
- reload: c.reload,
476
- setOpen: c.setOpen,
477
- shouldRender: c.shouldRender
467
+ emit: d.emit,
468
+ getChildModal: d.getChildModal,
469
+ getParentModal: d.getParentModal,
470
+ id: d.id,
471
+ index: d.index,
472
+ isOpen: d.isOpen,
473
+ modalContext: d,
474
+ onTopOfStack: d.onTopOfStack,
475
+ reload: d.reload,
476
+ setOpen: d.setOpen,
477
+ shouldRender: d.shouldRender
478
478
  }) : t,
479
479
  v && /* @__PURE__ */ T(At, { index: v })
480
480
  ] });
@@ -522,9 +522,9 @@ let Nn = class {
522
522
  get isHandoffComplete() {
523
523
  return this.handoffState === "complete";
524
524
  }
525
- }, oe = new Nn();
525
+ }, ae = new Nn();
526
526
  function Ve(e) {
527
- return oe.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
527
+ return ae.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
528
528
  }
529
529
  function qe(e) {
530
530
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
@@ -532,8 +532,8 @@ function qe(e) {
532
532
  }));
533
533
  }
534
534
  function re() {
535
- let e = [], t = { addEventListener(n, r, l, a) {
536
- return n.addEventListener(r, l, a), t.add(() => n.removeEventListener(r, l, a));
535
+ let e = [], t = { addEventListener(n, r, l, o) {
536
+ return n.addEventListener(r, l, o), t.add(() => n.removeEventListener(r, l, o));
537
537
  }, requestAnimationFrame(...n) {
538
538
  let r = requestAnimationFrame(...n);
539
539
  return t.add(() => cancelAnimationFrame(r));
@@ -550,9 +550,9 @@ function re() {
550
550
  r.current = !1;
551
551
  });
552
552
  }, style(n, r, l) {
553
- let a = n.style.getPropertyValue(r);
553
+ let o = n.style.getPropertyValue(r);
554
554
  return Object.assign(n.style, { [r]: l }), this.add(() => {
555
- Object.assign(n.style, { [r]: a });
555
+ Object.assign(n.style, { [r]: o });
556
556
  });
557
557
  }, group(n) {
558
558
  let r = re();
@@ -572,7 +572,7 @@ function pt() {
572
572
  return M(() => () => e.dispose(), [e]), e;
573
573
  }
574
574
  let A = (e, t) => {
575
- oe.isServer ? M(e, t) : pn(e, t);
575
+ ae.isServer ? M(e, t) : pn(e, t);
576
576
  };
577
577
  function ue(e) {
578
578
  let t = O(e);
@@ -603,48 +603,48 @@ function W() {
603
603
  let e = Dn();
604
604
  return Y((t) => Rn({ mergeRefs: e, ...t }), [e]);
605
605
  }
606
- function Rn({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: l, visible: a = !0, name: o, mergeRefs: s }) {
606
+ function Rn({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: l, visible: o = !0, name: a, mergeRefs: s }) {
607
607
  s = s ?? jn;
608
608
  let i = Dt(t, e);
609
- if (a) return Ae(i, n, r, o, s);
610
- let d = l ?? 0;
611
- if (d & 2) {
609
+ if (o) return Ae(i, n, r, a, s);
610
+ let c = l ?? 0;
611
+ if (c & 2) {
612
612
  let { static: f = !1, ...y } = i;
613
- if (f) return Ae(y, n, r, o, s);
613
+ if (f) return Ae(y, n, r, a, s);
614
614
  }
615
- if (d & 1) {
615
+ if (c & 1) {
616
616
  let { unmount: f = !0, ...y } = i;
617
617
  return ne(f ? 0 : 1, { 0() {
618
618
  return null;
619
619
  }, 1() {
620
- return Ae({ ...y, hidden: !0, style: { display: "none" } }, n, r, o, s);
620
+ return Ae({ ...y, hidden: !0, style: { display: "none" } }, n, r, a, s);
621
621
  } });
622
622
  }
623
- return Ae(i, n, r, o, s);
623
+ return Ae(i, n, r, a, s);
624
624
  }
625
625
  function Ae(e, t = {}, n, r, l) {
626
- let { as: a = n, children: o, refName: s = "ref", ...i } = nt(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [s]: e.ref } : {}, f = typeof o == "function" ? o(t) : o;
626
+ let { as: o = n, children: a, refName: s = "ref", ...i } = nt(e, ["unmount", "static"]), c = e.ref !== void 0 ? { [s]: e.ref } : {}, f = typeof a == "function" ? a(t) : a;
627
627
  "className" in i && i.className && typeof i.className == "function" && (i.className = i.className(t)), i["aria-labelledby"] && i["aria-labelledby"] === i.id && (i["aria-labelledby"] = void 0);
628
628
  let y = {};
629
629
  if (t) {
630
630
  let b = !1, w = [];
631
- for (let [c, v] of Object.entries(t)) typeof v == "boolean" && (b = !0), v === !0 && w.push(c.replace(/([A-Z])/g, (u) => `-${u.toLowerCase()}`));
631
+ for (let [d, v] of Object.entries(t)) typeof v == "boolean" && (b = !0), v === !0 && w.push(d.replace(/([A-Z])/g, (u) => `-${u.toLowerCase()}`));
632
632
  if (b) {
633
633
  y["data-headlessui-state"] = w.join(" ");
634
- for (let c of w) y[`data-${c}`] = "";
634
+ for (let d of w) y[`data-${d}`] = "";
635
635
  }
636
636
  }
637
- if (a === G && (Object.keys(le(i)).length > 0 || Object.keys(le(y)).length > 0)) if (!hn(f) || Array.isArray(f) && f.length > 1) {
637
+ if (o === G && (Object.keys(le(i)).length > 0 || Object.keys(le(y)).length > 0)) if (!hn(f) || Array.isArray(f) && f.length > 1) {
638
638
  if (Object.keys(le(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(le(i)).concat(Object.keys(le(y))).map((b) => ` - ${b}`).join(`
639
639
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((b) => ` - ${b}`).join(`
640
640
  `)].join(`
641
641
  `));
642
642
  } else {
643
- let b = f.props, w = b == null ? void 0 : b.className, c = typeof w == "function" ? (...m) => lt(w(...m), i.className) : lt(w, i.className), v = c ? { className: c } : {}, u = Dt(f.props, le(nt(i, ["ref"])));
643
+ let b = f.props, w = b == null ? void 0 : b.className, d = typeof w == "function" ? (...m) => lt(w(...m), i.className) : lt(w, i.className), v = d ? { className: d } : {}, u = Dt(f.props, le(nt(i, ["ref"])));
644
644
  for (let m in y) m in u && delete y[m];
645
- return vn(f, Object.assign({}, u, y, d, { ref: l(Un(f), d.ref) }, v));
645
+ return vn(f, Object.assign({}, u, y, c, { ref: l(Un(f), c.ref) }, v));
646
646
  }
647
- return Re(a, Object.assign({}, nt(i, ["ref"]), a !== G && d, a !== G && y), f);
647
+ return Re(o, Object.assign({}, nt(i, ["ref"]), o !== G && c, o !== G && y), f);
648
648
  }
649
649
  function Dn() {
650
650
  let e = O([]), t = Y((n) => {
@@ -665,21 +665,21 @@ function Dt(...e) {
665
665
  let t = {}, n = {};
666
666
  for (let r of e) for (let l in r) l.startsWith("on") && typeof r[l] == "function" ? (n[l] != null || (n[l] = []), n[l].push(r[l])) : t[l] = r[l];
667
667
  if (t.disabled || t["aria-disabled"]) for (let r in n) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r) && (n[r] = [(l) => {
668
- var a;
669
- return (a = l == null ? void 0 : l.preventDefault) == null ? void 0 : a.call(l);
668
+ var o;
669
+ return (o = l == null ? void 0 : l.preventDefault) == null ? void 0 : o.call(l);
670
670
  }]);
671
- for (let r in n) Object.assign(t, { [r](l, ...a) {
672
- let o = n[r];
673
- for (let s of o) {
671
+ for (let r in n) Object.assign(t, { [r](l, ...o) {
672
+ let a = n[r];
673
+ for (let s of a) {
674
674
  if ((l instanceof Event || (l == null ? void 0 : l.nativeEvent) instanceof Event) && l.defaultPrevented) return;
675
- s(l, ...a);
675
+ s(l, ...o);
676
676
  }
677
677
  } });
678
678
  return t;
679
679
  }
680
680
  function D(e) {
681
681
  var t;
682
- return Object.assign(dt(e), { displayName: (t = e.displayName) != null ? t : e.name });
682
+ return Object.assign(ct(e), { displayName: (t = e.displayName) != null ? t : e.name });
683
683
  }
684
684
  function le(e) {
685
685
  let t = Object.assign({}, e);
@@ -698,8 +698,8 @@ let Hn = "span";
698
698
  var He = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(He || {});
699
699
  function Wn(e, t) {
700
700
  var n;
701
- let { features: r = 1, ...l } = e, a = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
702
- return W()({ ourProps: a, theirProps: l, slot: {}, defaultTag: Hn, name: "Hidden" });
701
+ let { features: r = 1, ...l } = e, o = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = l["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
702
+ return W()({ ourProps: o, theirProps: l, slot: {}, defaultTag: Hn, name: "Hidden" });
703
703
  }
704
704
  let it = D(Wn), jt = Symbol();
705
705
  function _n(e, t = !0) {
@@ -728,8 +728,8 @@ function Ut() {
728
728
  function Bn() {
729
729
  let [e, t] = S([]);
730
730
  return [e.length > 0 ? e.join(" ") : void 0, C(() => function(n) {
731
- let r = L((a) => (t((o) => [...o, a]), () => t((o) => {
732
- let s = o.slice(), i = s.indexOf(a);
731
+ let r = L((o) => (t((a) => [...a, o]), () => t((a) => {
732
+ let s = a.slice(), i = s.indexOf(o);
733
733
  return i !== -1 && s.splice(i, 1), s;
734
734
  }))), l = C(() => ({ register: r, slot: n.slot, name: n.name, props: n.props, value: n.value }), [r, n.slot, n.name, n.props, n.value]);
735
735
  return E.createElement(ht.Provider, { value: l }, n.children);
@@ -737,10 +737,10 @@ function Bn() {
737
737
  }
738
738
  let Xn = "p";
739
739
  function Vn(e, t) {
740
- let n = Pe(), r = In(), { id: l = `headlessui-description-${n}`, ...a } = e, o = Ut(), s = Z(t);
741
- A(() => o.register(l), [l, o.register]);
742
- let i = r || !1, d = C(() => ({ ...o.slot, disabled: i }), [o.slot, i]), f = { ref: s, ...o.props, id: l };
743
- return W()({ ourProps: f, theirProps: a, slot: d, defaultTag: Xn, name: o.name || "Description" });
740
+ let n = Pe(), r = In(), { id: l = `headlessui-description-${n}`, ...o } = e, a = Ut(), s = Z(t);
741
+ A(() => a.register(l), [l, a.register]);
742
+ let i = r || !1, c = C(() => ({ ...a.slot, disabled: i }), [a.slot, i]), f = { ref: s, ...a.props, id: l };
743
+ return W()({ ourProps: f, theirProps: o, slot: c, defaultTag: Xn, name: a.name || "Description" });
744
744
  }
745
745
  let qn = D(Vn), Yn = Object.assign(qn, {});
746
746
  var Ht = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Ht || {});
@@ -764,9 +764,9 @@ function Wt(e, t) {
764
764
  return n;
765
765
  }, subscribe(l) {
766
766
  return r.add(l), () => r.delete(l);
767
- }, dispatch(l, ...a) {
768
- let o = t[l].call(n, ...a);
769
- o && (n = o, r.forEach((s) => s()));
767
+ }, dispatch(l, ...o) {
768
+ let a = t[l].call(n, ...o);
769
+ a && (n = a, r.forEach((s) => s()));
770
770
  } };
771
771
  }
772
772
  function _t(e) {
@@ -785,66 +785,66 @@ function fe(e, t) {
785
785
  if (A(() => {
786
786
  if (e) return n.dispatch("ADD", r), () => n.dispatch("REMOVE", r);
787
787
  }, [n, e]), !e) return !1;
788
- let a = l.indexOf(r), o = l.length;
789
- return a === -1 && (a = o, o += 1), a === o - 1;
788
+ let o = l.indexOf(r), a = l.length;
789
+ return o === -1 && (o = a, a += 1), o === a - 1;
790
790
  }
791
- let at = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
791
+ let ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
792
792
  function bt(e) {
793
793
  var t;
794
794
  let n = (t = Te.get(e)) != null ? t : 0;
795
- return Te.set(e, n + 1), n !== 0 ? () => Et(e) : (at.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Et(e));
795
+ return Te.set(e, n + 1), n !== 0 ? () => Et(e) : (ot.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Et(e));
796
796
  }
797
797
  function Et(e) {
798
798
  var t;
799
799
  let n = (t = Te.get(e)) != null ? t : 1;
800
800
  if (n === 1 ? Te.delete(e) : Te.set(e, n - 1), n !== 1) return;
801
- let r = at.get(e);
802
- r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, at.delete(e));
801
+ let r = ot.get(e);
802
+ r && (r["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", r["aria-hidden"]), e.inert = r.inert, ot.delete(e));
803
803
  }
804
804
  function Jn(e, { allowed: t, disallowed: n } = {}) {
805
805
  let r = fe(e, "inert-others");
806
806
  A(() => {
807
- var l, a;
807
+ var l, o;
808
808
  if (!r) return;
809
- let o = re();
810
- for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && o.add(bt(i));
811
- let s = (a = t == null ? void 0 : t()) != null ? a : [];
809
+ let a = re();
810
+ for (let i of (l = n == null ? void 0 : n()) != null ? l : []) i && a.add(bt(i));
811
+ let s = (o = t == null ? void 0 : t()) != null ? o : [];
812
812
  for (let i of s) {
813
813
  if (!i) continue;
814
- let d = Ve(i);
815
- if (!d) continue;
814
+ let c = Ve(i);
815
+ if (!c) continue;
816
816
  let f = i.parentElement;
817
- for (; f && f !== d.body; ) {
818
- for (let y of f.children) s.some((b) => y.contains(b)) || o.add(bt(y));
817
+ for (; f && f !== c.body; ) {
818
+ for (let y of f.children) s.some((b) => y.contains(b)) || a.add(bt(y));
819
819
  f = f.parentElement;
820
820
  }
821
821
  }
822
- return o.dispose;
822
+ return a.dispose;
823
823
  }, [r, t, n]);
824
824
  }
825
825
  function Qn(e, t, n) {
826
826
  let r = ue((l) => {
827
- let a = l.getBoundingClientRect();
828
- a.x === 0 && a.y === 0 && a.width === 0 && a.height === 0 && n();
827
+ let o = l.getBoundingClientRect();
828
+ o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && n();
829
829
  });
830
830
  M(() => {
831
831
  if (!e) return;
832
832
  let l = t === null ? null : t instanceof HTMLElement ? t : t.current;
833
833
  if (!l) return;
834
- let a = re();
834
+ let o = re();
835
835
  if (typeof ResizeObserver < "u") {
836
- let o = new ResizeObserver(() => r.current(l));
837
- o.observe(l), a.add(() => o.disconnect());
836
+ let a = new ResizeObserver(() => r.current(l));
837
+ a.observe(l), o.add(() => a.disconnect());
838
838
  }
839
839
  if (typeof IntersectionObserver < "u") {
840
- let o = new IntersectionObserver(() => r.current(l));
841
- o.observe(l), a.add(() => o.disconnect());
840
+ let a = new IntersectionObserver(() => r.current(l));
841
+ a.observe(l), o.add(() => a.disconnect());
842
842
  }
843
- return () => a.dispose();
843
+ return () => o.dispose();
844
844
  }, [t, r, e]);
845
845
  }
846
846
  let We = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), er = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
847
- var J = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(J || {}), ot = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(ot || {}), tr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(tr || {});
847
+ var J = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(J || {}), at = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(at || {}), tr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(tr || {});
848
848
  function nr(e = document.body) {
849
849
  return e == null ? [] : Array.from(e.querySelectorAll(We)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
850
850
  }
@@ -874,33 +874,33 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
874
874
  function Q(e) {
875
875
  e == null || e.focus({ preventScroll: !0 });
876
876
  }
877
- let ar = ["textarea", "input"].join(",");
878
- function or(e) {
877
+ let or = ["textarea", "input"].join(",");
878
+ function ar(e) {
879
879
  var t, n;
880
- return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, ar)) != null ? n : !1;
880
+ return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, or)) != null ? n : !1;
881
881
  }
882
882
  function sr(e, t = (n) => n) {
883
883
  return e.slice().sort((n, r) => {
884
- let l = t(n), a = t(r);
885
- if (l === null || a === null) return 0;
886
- let o = l.compareDocumentPosition(a);
887
- return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
884
+ let l = t(n), o = t(r);
885
+ if (l === null || o === null) return 0;
886
+ let a = l.compareDocumentPosition(o);
887
+ return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
888
888
  });
889
889
  }
890
890
  function Oe(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: l = [] } = {}) {
891
- let a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, o = Array.isArray(e) ? n ? sr(e) : e : t & 64 ? rr(e) : nr(e);
892
- l.length > 0 && o.length > 1 && (o = o.filter((w) => !l.some((c) => c != null && "current" in c ? (c == null ? void 0 : c.current) === w : c === w))), r = r ?? a.activeElement;
891
+ let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, a = Array.isArray(e) ? n ? sr(e) : e : t & 64 ? rr(e) : nr(e);
892
+ l.length > 0 && a.length > 1 && (a = a.filter((w) => !l.some((d) => d != null && "current" in d ? (d == null ? void 0 : d.current) === w : d === w))), r = r ?? o.activeElement;
893
893
  let s = (() => {
894
894
  if (t & 5) return 1;
895
895
  if (t & 10) return -1;
896
896
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
897
897
  })(), i = (() => {
898
898
  if (t & 1) return 0;
899
- if (t & 2) return Math.max(0, o.indexOf(r)) - 1;
900
- if (t & 4) return Math.max(0, o.indexOf(r)) + 1;
901
- if (t & 8) return o.length - 1;
899
+ if (t & 2) return Math.max(0, a.indexOf(r)) - 1;
900
+ if (t & 4) return Math.max(0, a.indexOf(r)) + 1;
901
+ if (t & 8) return a.length - 1;
902
902
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
903
- })(), d = t & 32 ? { preventScroll: !0 } : {}, f = 0, y = o.length, b;
903
+ })(), c = t & 32 ? { preventScroll: !0 } : {}, f = 0, y = a.length, b;
904
904
  do {
905
905
  if (f >= y || f + y <= 0) return 0;
906
906
  let w = i + f;
@@ -909,9 +909,9 @@ function Oe(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: l = [] }
909
909
  if (w < 0) return 3;
910
910
  if (w >= y) return 1;
911
911
  }
912
- b = o[w], b == null || b.focus(d), f += s;
913
- } while (b !== a.activeElement);
914
- return t & 6 && or(b) && b.select(), 2;
912
+ b = a[w], b == null || b.focus(c), f += s;
913
+ } while (b !== o.activeElement);
914
+ return t & 6 && ar(b) && b.select(), 2;
915
915
  }
916
916
  function Xt() {
917
917
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
@@ -919,57 +919,57 @@ function Xt() {
919
919
  function ur() {
920
920
  return /Android/gi.test(window.navigator.userAgent);
921
921
  }
922
- function dr() {
922
+ function cr() {
923
923
  return Xt() || ur();
924
924
  }
925
925
  function ye(e, t, n, r) {
926
926
  let l = ue(n);
927
927
  M(() => {
928
928
  if (!e) return;
929
- function a(o) {
930
- l.current(o);
929
+ function o(a) {
930
+ l.current(a);
931
931
  }
932
- return document.addEventListener(t, a, r), () => document.removeEventListener(t, a, r);
932
+ return document.addEventListener(t, o, r), () => document.removeEventListener(t, o, r);
933
933
  }, [e, t, r]);
934
934
  }
935
935
  function Vt(e, t, n, r) {
936
936
  let l = ue(n);
937
937
  M(() => {
938
938
  if (!e) return;
939
- function a(o) {
940
- l.current(o);
939
+ function o(a) {
940
+ l.current(a);
941
941
  }
942
- return window.addEventListener(t, a, r), () => window.removeEventListener(t, a, r);
942
+ return window.addEventListener(t, o, r), () => window.removeEventListener(t, o, r);
943
943
  }, [e, t, r]);
944
944
  }
945
945
  const $t = 30;
946
- function cr(e, t, n) {
947
- let r = fe(e, "outside-click"), l = ue(n), a = Y(function(i, d) {
946
+ function dr(e, t, n) {
947
+ let r = fe(e, "outside-click"), l = ue(n), o = Y(function(i, c) {
948
948
  if (i.defaultPrevented) return;
949
- let f = d(i);
949
+ let f = c(i);
950
950
  if (f === null || !f.getRootNode().contains(f) || !f.isConnected) return;
951
951
  let y = function b(w) {
952
952
  return typeof w == "function" ? b(w()) : Array.isArray(w) || w instanceof Set ? w : [w];
953
953
  }(t);
954
954
  for (let b of y) if (b !== null && (b.contains(f) || i.composed && i.composedPath().includes(b))) return;
955
955
  return !lr(f, Bt.Loose) && f.tabIndex !== -1 && i.preventDefault(), l.current(i, f);
956
- }, [l, t]), o = O(null);
956
+ }, [l, t]), a = O(null);
957
957
  ye(r, "pointerdown", (i) => {
958
- var d, f;
959
- o.current = ((f = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : f[0]) || i.target;
958
+ var c, f;
959
+ a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
960
960
  }, !0), ye(r, "mousedown", (i) => {
961
- var d, f;
962
- o.current = ((f = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : f[0]) || i.target;
961
+ var c, f;
962
+ a.current = ((f = (c = i.composedPath) == null ? void 0 : c.call(i)) == null ? void 0 : f[0]) || i.target;
963
963
  }, !0), ye(r, "click", (i) => {
964
- dr() || o.current && (a(i, () => o.current), o.current = null);
964
+ cr() || a.current && (o(i, () => a.current), a.current = null);
965
965
  }, !0);
966
966
  let s = O({ x: 0, y: 0 });
967
967
  ye(r, "touchstart", (i) => {
968
968
  s.current.x = i.touches[0].clientX, s.current.y = i.touches[0].clientY;
969
969
  }, !0), ye(r, "touchend", (i) => {
970
- let d = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
971
- if (!(Math.abs(d.x - s.current.x) >= $t || Math.abs(d.y - s.current.y) >= $t)) return a(i, () => i.target instanceof HTMLElement ? i.target : null);
972
- }, !0), Vt(r, "blur", (i) => a(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
970
+ let c = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
971
+ if (!(Math.abs(c.x - s.current.x) >= $t || Math.abs(c.y - s.current.y) >= $t)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
972
+ }, !0), Vt(r, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
973
973
  }
974
974
  function Me(...e) {
975
975
  return C(() => Ve(...e), [...e]);
@@ -978,10 +978,10 @@ function qt(e, t, n, r) {
978
978
  let l = ue(n);
979
979
  M(() => {
980
980
  e = e ?? window;
981
- function a(o) {
982
- l.current(o);
981
+ function o(a) {
982
+ l.current(a);
983
983
  }
984
- return e.addEventListener(t, a, r), () => e.removeEventListener(t, a, r);
984
+ return e.addEventListener(t, o, r), () => e.removeEventListener(t, o, r);
985
985
  }, [e, t, r]);
986
986
  }
987
987
  function fr() {
@@ -991,14 +991,14 @@ function fr() {
991
991
  let r = t.documentElement, l = (n = t.defaultView) != null ? n : window;
992
992
  e = Math.max(0, l.innerWidth - r.clientWidth);
993
993
  }, after({ doc: t, d: n }) {
994
- let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), a = Math.max(0, e - l);
995
- n.style(r, "paddingRight", `${a}px`);
994
+ let r = t.documentElement, l = Math.max(0, r.clientWidth - r.offsetWidth), o = Math.max(0, e - l);
995
+ n.style(r, "paddingRight", `${o}px`);
996
996
  } };
997
997
  }
998
998
  function mr() {
999
999
  return Xt() ? { before({ doc: e, d: t, meta: n }) {
1000
1000
  function r(l) {
1001
- return n.containers.flatMap((a) => a()).some((a) => a.contains(l));
1001
+ return n.containers.flatMap((o) => o()).some((o) => o.contains(l));
1002
1002
  }
1003
1003
  t.microTask(() => {
1004
1004
  var l;
@@ -1006,13 +1006,13 @@ function mr() {
1006
1006
  let s = re();
1007
1007
  s.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => s.dispose()));
1008
1008
  }
1009
- let a = (l = window.scrollY) != null ? l : window.pageYOffset, o = null;
1009
+ let o = (l = window.scrollY) != null ? l : window.pageYOffset, a = null;
1010
1010
  t.addEventListener(e, "click", (s) => {
1011
1011
  if (s.target instanceof HTMLElement) try {
1012
1012
  let i = s.target.closest("a");
1013
1013
  if (!i) return;
1014
- let { hash: d } = new URL(i.href), f = e.querySelector(d);
1015
- f && !r(f) && (o = f);
1014
+ let { hash: c } = new URL(i.href), f = e.querySelector(c);
1015
+ f && !r(f) && (a = f);
1016
1016
  } catch {
1017
1017
  }
1018
1018
  }, !0), t.addEventListener(e, "touchstart", (s) => {
@@ -1033,7 +1033,7 @@ function mr() {
1033
1033
  }, { passive: !1 }), t.add(() => {
1034
1034
  var s;
1035
1035
  let i = (s = window.scrollY) != null ? s : window.pageYOffset;
1036
- a !== i && window.scrollTo(0, a), o && o.isConnected && (o.scrollIntoView({ block: "nearest" }), o = null);
1036
+ o !== i && window.scrollTo(0, o), a && a.isConnected && (a.scrollIntoView({ block: "nearest" }), a = null);
1037
1037
  });
1038
1038
  });
1039
1039
  } } : {};
@@ -1048,7 +1048,7 @@ function hr(e) {
1048
1048
  for (let n of e) Object.assign(t, n(t));
1049
1049
  return t;
1050
1050
  }
1051
- let ae = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1051
+ let oe = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1052
1052
  var n;
1053
1053
  let r = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: re(), meta: /* @__PURE__ */ new Set() };
1054
1054
  return r.count++, r.meta.add(t), this.set(e, r), this;
@@ -1057,36 +1057,36 @@ let ae = Wt(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1057
1057
  return n && (n.count--, n.meta.delete(t)), this;
1058
1058
  }, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
1059
1059
  let r = { doc: e, d: t, meta: hr(n) }, l = [mr(), fr(), pr()];
1060
- l.forEach(({ before: a }) => a == null ? void 0 : a(r)), l.forEach(({ after: a }) => a == null ? void 0 : a(r));
1060
+ l.forEach(({ before: o }) => o == null ? void 0 : o(r)), l.forEach(({ after: o }) => o == null ? void 0 : o(r));
1061
1061
  }, SCROLL_ALLOW({ d: e }) {
1062
1062
  e.dispose();
1063
1063
  }, TEARDOWN({ doc: e }) {
1064
1064
  this.delete(e);
1065
1065
  } });
1066
- ae.subscribe(() => {
1067
- let e = ae.getSnapshot(), t = /* @__PURE__ */ new Map();
1066
+ oe.subscribe(() => {
1067
+ let e = oe.getSnapshot(), t = /* @__PURE__ */ new Map();
1068
1068
  for (let [n] of e) t.set(n, n.documentElement.style.overflow);
1069
1069
  for (let n of e.values()) {
1070
1070
  let r = t.get(n.doc) === "hidden", l = n.count !== 0;
1071
- (l && !r || !l && r) && ae.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && ae.dispatch("TEARDOWN", n);
1071
+ (l && !r || !l && r) && oe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && oe.dispatch("TEARDOWN", n);
1072
1072
  }
1073
1073
  });
1074
1074
  function vr(e, t, n = () => ({ containers: [] })) {
1075
- let r = _t(ae), l = t ? r.get(t) : void 0, a = l ? l.count > 0 : !1;
1075
+ let r = _t(oe), l = t ? r.get(t) : void 0, o = l ? l.count > 0 : !1;
1076
1076
  return A(() => {
1077
- if (!(!t || !e)) return ae.dispatch("PUSH", t, n), () => ae.dispatch("POP", t, n);
1078
- }, [e, t]), a;
1077
+ if (!(!t || !e)) return oe.dispatch("PUSH", t, n), () => oe.dispatch("POP", t, n);
1078
+ }, [e, t]), o;
1079
1079
  }
1080
1080
  function gr(e, t, n = () => [document.body]) {
1081
1081
  let r = fe(e, "scroll-lock");
1082
1082
  vr(r, t, (l) => {
1083
- var a;
1084
- return { containers: [...(a = l.containers) != null ? a : [], n] };
1083
+ var o;
1084
+ return { containers: [...(o = l.containers) != null ? o : [], n] };
1085
1085
  });
1086
1086
  }
1087
1087
  function wr(e = 0) {
1088
- let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((d) => d | i), [t]), a = Y((i) => (t & i) === i, [t]), o = Y((i) => n((d) => d & ~i), [n]), s = Y((i) => n((d) => d ^ i), [n]);
1089
- return { flags: t, setFlag: r, addFlag: l, hasFlag: a, removeFlag: o, toggleFlag: s };
1088
+ let [t, n] = S(e), r = Y((i) => n(i), [t]), l = Y((i) => n((c) => c | i), [t]), o = Y((i) => (t & i) === i, [t]), a = Y((i) => n((c) => c & ~i), [n]), s = Y((i) => n((c) => c ^ i), [n]);
1089
+ return { flags: t, setFlag: r, addFlag: l, hasFlag: o, removeFlag: a, toggleFlag: s };
1090
1090
  }
1091
1091
  var Tt, Ot;
1092
1092
  typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Tt = process == null ? void 0 : process.env) == null ? void 0 : Tt.NODE_ENV) === "test" && typeof ((Ot = Element == null ? void 0 : Element.prototype) == null ? void 0 : Ot.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
@@ -1100,44 +1100,44 @@ function xr(e) {
1100
1100
  return t;
1101
1101
  }
1102
1102
  function br(e, t, n, r) {
1103
- let [l, a] = S(n), { hasFlag: o, addFlag: s, removeFlag: i } = wr(e && l ? 3 : 0), d = O(!1), f = O(!1), y = pt();
1103
+ let [l, o] = S(n), { hasFlag: a, addFlag: s, removeFlag: i } = wr(e && l ? 3 : 0), c = O(!1), f = O(!1), y = pt();
1104
1104
  return A(() => {
1105
1105
  var b;
1106
1106
  if (e) {
1107
- if (n && a(!0), !t) {
1107
+ if (n && o(!0), !t) {
1108
1108
  n && s(3);
1109
1109
  return;
1110
1110
  }
1111
- return (b = r == null ? void 0 : r.start) == null || b.call(r, n), Er(t, { inFlight: d, prepare() {
1112
- f.current ? f.current = !1 : f.current = d.current, d.current = !0, !f.current && (n ? (s(3), i(4)) : (s(4), i(2)));
1111
+ return (b = r == null ? void 0 : r.start) == null || b.call(r, n), Er(t, { inFlight: c, prepare() {
1112
+ f.current ? f.current = !1 : f.current = c.current, c.current = !0, !f.current && (n ? (s(3), i(4)) : (s(4), i(2)));
1113
1113
  }, run() {
1114
1114
  f.current ? n ? (i(3), s(4)) : (i(4), s(3)) : n ? i(1) : s(1);
1115
1115
  }, done() {
1116
1116
  var w;
1117
- f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (d.current = !1, i(7), n || a(!1), (w = r == null ? void 0 : r.end) == null || w.call(r, n));
1117
+ f.current && typeof t.getAnimations == "function" && t.getAnimations().length > 0 || (c.current = !1, i(7), n || o(!1), (w = r == null ? void 0 : r.end) == null || w.call(r, n));
1118
1118
  } });
1119
1119
  }
1120
- }, [e, n, t, y]), e ? [l, { closed: o(1), enter: o(2), leave: o(4), transition: o(2) || o(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1120
+ }, [e, n, t, y]), e ? [l, { closed: a(1), enter: a(2), leave: a(4), transition: a(2) || a(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1121
1121
  }
1122
1122
  function Er(e, { prepare: t, run: n, done: r, inFlight: l }) {
1123
- let a = re();
1124
- return Tr(e, { prepare: t, inFlight: l }), a.nextFrame(() => {
1125
- n(), a.requestAnimationFrame(() => {
1126
- a.add($r(e, r));
1123
+ let o = re();
1124
+ return Tr(e, { prepare: t, inFlight: l }), o.nextFrame(() => {
1125
+ n(), o.requestAnimationFrame(() => {
1126
+ o.add($r(e, r));
1127
1127
  });
1128
- }), a.dispose;
1128
+ }), o.dispose;
1129
1129
  }
1130
1130
  function $r(e, t) {
1131
1131
  var n, r;
1132
1132
  let l = re();
1133
1133
  if (!e) return l.dispose;
1134
- let a = !1;
1134
+ let o = !1;
1135
1135
  l.add(() => {
1136
- a = !0;
1136
+ o = !0;
1137
1137
  });
1138
- let o = (r = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((s) => s instanceof CSSTransition)) != null ? r : [];
1139
- return o.length === 0 ? (t(), l.dispose) : (Promise.allSettled(o.map((s) => s.finished)).then(() => {
1140
- a || t();
1138
+ let a = (r = (n = e.getAnimations) == null ? void 0 : n.call(e).filter((s) => s instanceof CSSTransition)) != null ? r : [];
1139
+ return a.length === 0 ? (t(), l.dispose) : (Promise.allSettled(a.map((s) => s.finished)).then(() => {
1140
+ o || t();
1141
1141
  }), l.dispose);
1142
1142
  }
1143
1143
  function Tr(e, { inFlight: t, prepare: n }) {
@@ -1152,7 +1152,7 @@ function vt(e, t) {
1152
1152
  let n = O([]), r = L(e);
1153
1153
  M(() => {
1154
1154
  let l = [...n.current];
1155
- for (let [a, o] of t.entries()) if (n.current[a] !== o) {
1155
+ for (let [o, a] of t.entries()) if (n.current[o] !== a) {
1156
1156
  let s = r(t, l);
1157
1157
  return n.current = t, s;
1158
1158
  }
@@ -1199,10 +1199,10 @@ function Lr() {
1199
1199
  }, () => !1, () => !e) : !1;
1200
1200
  }
1201
1201
  function Le() {
1202
- let e = Lr(), [t, n] = Ee.useState(oe.isHandoffComplete);
1203
- return t && oe.isHandoffComplete === !1 && n(!1), Ee.useEffect(() => {
1202
+ let e = Lr(), [t, n] = Ee.useState(ae.isHandoffComplete);
1203
+ return t && ae.isHandoffComplete === !1 && n(!1), Ee.useEffect(() => {
1204
1204
  t !== !0 && n(!0);
1205
- }, [t]), Ee.useEffect(() => oe.handoff(), []), e ? !1 : t;
1205
+ }, [t]), Ee.useEffect(() => ae.handoff(), []), e ? !1 : t;
1206
1206
  }
1207
1207
  let zt = H(!1);
1208
1208
  function Sr() {
@@ -1212,10 +1212,10 @@ function Pt(e) {
1212
1212
  return E.createElement(zt.Provider, { value: e.force }, e.children);
1213
1213
  }
1214
1214
  function Fr(e) {
1215
- let t = Sr(), n = R(Kt), r = Me(e), [l, a] = S(() => {
1216
- var o;
1217
- if (!t && n !== null) return (o = n.current) != null ? o : null;
1218
- if (oe.isServer) return null;
1215
+ let t = Sr(), n = R(Kt), r = Me(e), [l, o] = S(() => {
1216
+ var a;
1217
+ if (!t && n !== null) return (a = n.current) != null ? a : null;
1218
+ if (ae.isServer) return null;
1219
1219
  let s = r == null ? void 0 : r.getElementById("headlessui-portal-root");
1220
1220
  if (s) return s;
1221
1221
  if (r === null) return null;
@@ -1225,44 +1225,44 @@ function Fr(e) {
1225
1225
  return M(() => {
1226
1226
  l !== null && (r != null && r.body.contains(l) || r == null || r.body.appendChild(l));
1227
1227
  }, [l, r]), M(() => {
1228
- t || n !== null && a(n.current);
1229
- }, [n, a, t]), l;
1228
+ t || n !== null && o(n.current);
1229
+ }, [n, o, t]), l;
1230
1230
  }
1231
1231
  let Gt = G, Cr = D(function(e, t) {
1232
1232
  let n = e, r = O(null), l = Z(_n((y) => {
1233
1233
  r.current = y;
1234
- }), t), a = Me(r), o = Fr(r), [s] = S(() => {
1234
+ }), t), o = Me(r), a = Fr(r), [s] = S(() => {
1235
1235
  var y;
1236
- return oe.isServer ? null : (y = a == null ? void 0 : a.createElement("div")) != null ? y : null;
1237
- }), i = R(st), d = Le();
1236
+ return ae.isServer ? null : (y = o == null ? void 0 : o.createElement("div")) != null ? y : null;
1237
+ }), i = R(st), c = Le();
1238
1238
  A(() => {
1239
- !o || !s || o.contains(s) || (s.setAttribute("data-headlessui-portal", ""), o.appendChild(s));
1240
- }, [o, s]), A(() => {
1239
+ !a || !s || a.contains(s) || (s.setAttribute("data-headlessui-portal", ""), a.appendChild(s));
1240
+ }, [a, s]), A(() => {
1241
1241
  if (s && i) return i.register(s);
1242
1242
  }, [i, s]), Yt(() => {
1243
1243
  var y;
1244
- !o || !s || (s instanceof Node && o.contains(s) && o.removeChild(s), o.childNodes.length <= 0 && ((y = o.parentElement) == null || y.removeChild(o)));
1244
+ !a || !s || (s instanceof Node && a.contains(s) && a.removeChild(s), a.childNodes.length <= 0 && ((y = a.parentElement) == null || y.removeChild(a)));
1245
1245
  });
1246
1246
  let f = W();
1247
- return d ? !o || !s ? null : En(f({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Gt, name: "Portal" }), s) : null;
1247
+ return c ? !a || !s ? null : En(f({ ourProps: { ref: l }, theirProps: n, slot: {}, defaultTag: Gt, name: "Portal" }), s) : null;
1248
1248
  });
1249
1249
  function kr(e, t) {
1250
- let n = Z(t), { enabled: r = !0, ...l } = e, a = W();
1251
- return r ? E.createElement(Cr, { ...l, ref: n }) : a({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Gt, name: "Portal" });
1250
+ let n = Z(t), { enabled: r = !0, ...l } = e, o = W();
1251
+ return r ? E.createElement(Cr, { ...l, ref: n }) : o({ ourProps: { ref: n }, theirProps: l, slot: {}, defaultTag: Gt, name: "Portal" });
1252
1252
  }
1253
1253
  let Nr = G, Kt = H(null);
1254
1254
  function Ar(e, t) {
1255
- let { target: n, ...r } = e, l = { ref: Z(t) }, a = W();
1256
- return E.createElement(Kt.Provider, { value: n }, a({ ourProps: l, theirProps: r, defaultTag: Nr, name: "Popover.Group" }));
1255
+ let { target: n, ...r } = e, l = { ref: Z(t) }, o = W();
1256
+ return E.createElement(Kt.Provider, { value: n }, o({ ourProps: l, theirProps: r, defaultTag: Nr, name: "Popover.Group" }));
1257
1257
  }
1258
1258
  let st = H(null);
1259
1259
  function Ir() {
1260
- let e = R(st), t = O([]), n = L((a) => (t.current.push(a), e && e.register(a), () => r(a))), r = L((a) => {
1261
- let o = t.current.indexOf(a);
1262
- o !== -1 && t.current.splice(o, 1), e && e.unregister(a);
1260
+ let e = R(st), t = O([]), n = L((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = L((o) => {
1261
+ let a = t.current.indexOf(o);
1262
+ a !== -1 && t.current.splice(a, 1), e && e.unregister(o);
1263
1263
  }), l = C(() => ({ register: n, unregister: r, portals: t }), [n, r, t]);
1264
- return [t, C(() => function({ children: a }) {
1265
- return E.createElement(st.Provider, { value: l }, a);
1264
+ return [t, C(() => function({ children: o }) {
1265
+ return E.createElement(st.Provider, { value: l }, o);
1266
1266
  }, [l])];
1267
1267
  }
1268
1268
  let Rr = D(kr), Zt = D(Ar), Dr = Object.assign(Rr, { Group: Zt });
@@ -1277,30 +1277,30 @@ function Ur() {
1277
1277
  let [t] = S(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [n, r] = S((e = t == null ? void 0 : t.matches) != null ? e : !1);
1278
1278
  return A(() => {
1279
1279
  if (!t) return;
1280
- function l(a) {
1281
- r(a.matches);
1280
+ function l(o) {
1281
+ r(o.matches);
1282
1282
  }
1283
1283
  return t.addEventListener("change", l), () => t.removeEventListener("change", l);
1284
1284
  }, [t]), n;
1285
1285
  }
1286
1286
  function Hr({ defaultContainers: e = [], portals: t, mainTreeNode: n } = {}) {
1287
1287
  let r = Me(n), l = L(() => {
1288
- var a, o;
1288
+ var o, a;
1289
1289
  let s = [];
1290
1290
  for (let i of e) i !== null && (i instanceof HTMLElement ? s.push(i) : "current" in i && i.current instanceof HTMLElement && s.push(i.current));
1291
1291
  if (t != null && t.current) for (let i of t.current) s.push(i);
1292
- for (let i of (a = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? a : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (n && (i.contains(n) || i.contains((o = n == null ? void 0 : n.getRootNode()) == null ? void 0 : o.host)) || s.some((d) => i.contains(d)) || s.push(i));
1292
+ for (let i of (o = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? o : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (n && (i.contains(n) || i.contains((a = n == null ? void 0 : n.getRootNode()) == null ? void 0 : a.host)) || s.some((c) => i.contains(c)) || s.push(i));
1293
1293
  return s;
1294
1294
  });
1295
- return { resolveContainers: l, contains: L((a) => l().some((o) => o.contains(a))) };
1295
+ return { resolveContainers: l, contains: L((o) => l().some((a) => a.contains(o))) };
1296
1296
  }
1297
1297
  let Jt = H(null);
1298
1298
  function Mt({ children: e, node: t }) {
1299
1299
  let [n, r] = S(null), l = Qt(t ?? n);
1300
- return E.createElement(Jt.Provider, { value: l }, e, l === null && E.createElement(it, { features: He.Hidden, ref: (a) => {
1301
- var o, s;
1302
- if (a) {
1303
- for (let i of (s = (o = Ve(a)) == null ? void 0 : o.querySelectorAll("html > *, body > *")) != null ? s : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(a)) {
1300
+ return E.createElement(Jt.Provider, { value: l }, e, l === null && E.createElement(it, { features: He.Hidden, ref: (o) => {
1301
+ var a, s;
1302
+ if (o) {
1303
+ for (let i of (s = (a = Ve(o)) == null ? void 0 : a.querySelectorAll("html > *, body > *")) != null ? s : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(o)) {
1304
1304
  r(i);
1305
1305
  break;
1306
1306
  }
@@ -1334,28 +1334,28 @@ function en(e) {
1334
1334
  let _r = "div";
1335
1335
  var ie = ((e) => (e[e.None = 0] = "None", e[e.InitialFocus = 1] = "InitialFocus", e[e.TabLock = 2] = "TabLock", e[e.FocusLock = 4] = "FocusLock", e[e.RestoreFocus = 8] = "RestoreFocus", e[e.AutoFocus = 16] = "AutoFocus", e))(ie || {});
1336
1336
  function Br(e, t) {
1337
- let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback: a, containers: o, features: s = 15, ...i } = e;
1337
+ let n = O(null), r = Z(n, t), { initialFocus: l, initialFocusFallback: o, containers: a, features: s = 15, ...i } = e;
1338
1338
  Le() || (s = 0);
1339
- let d = Me(n);
1340
- Yr(s, { ownerDocument: d });
1341
- let f = zr(s, { ownerDocument: d, container: n, initialFocus: l, initialFocusFallback: a });
1342
- Gr(s, { ownerDocument: d, container: n, containers: o, previousActiveElement: f });
1339
+ let c = Me(n);
1340
+ Yr(s, { ownerDocument: c });
1341
+ let f = zr(s, { ownerDocument: c, container: n, initialFocus: l, initialFocusFallback: o });
1342
+ Gr(s, { ownerDocument: c, container: n, containers: a, previousActiveElement: f });
1343
1343
  let y = Wr(), b = L((p) => {
1344
1344
  let g = n.current;
1345
1345
  g && ((x) => x())(() => {
1346
1346
  ne(y.current, { [be.Forwards]: () => {
1347
- Oe(g, J.First, { skipElements: [p.relatedTarget, a] });
1347
+ Oe(g, J.First, { skipElements: [p.relatedTarget, o] });
1348
1348
  }, [be.Backwards]: () => {
1349
- Oe(g, J.Last, { skipElements: [p.relatedTarget, a] });
1349
+ Oe(g, J.Last, { skipElements: [p.relatedTarget, o] });
1350
1350
  } });
1351
1351
  });
1352
- }), w = fe(!!(s & 2), "focus-trap#tab-lock"), c = pt(), v = O(!1), u = { ref: r, onKeyDown(p) {
1353
- p.key == "Tab" && (v.current = !0, c.requestAnimationFrame(() => {
1352
+ }), w = fe(!!(s & 2), "focus-trap#tab-lock"), d = pt(), v = O(!1), u = { ref: r, onKeyDown(p) {
1353
+ p.key == "Tab" && (v.current = !0, d.requestAnimationFrame(() => {
1354
1354
  v.current = !1;
1355
1355
  }));
1356
1356
  }, onBlur(p) {
1357
1357
  if (!(s & 4)) return;
1358
- let g = en(o);
1358
+ let g = en(a);
1359
1359
  n.current instanceof HTMLElement && g.add(n.current);
1360
1360
  let x = p.relatedTarget;
1361
1361
  x instanceof HTMLElement && x.dataset.headlessuiFocusGuard !== "true" && (tn(g, x) || (v.current ? Oe(n.current, ne(y.current, { [be.Forwards]: () => J.Next, [be.Backwards]: () => J.Previous }) | J.WrapAround, { relativeTo: p.target }) : p.target instanceof HTMLElement && Q(p.target)));
@@ -1383,48 +1383,48 @@ function Yr(e, { ownerDocument: t }) {
1383
1383
  });
1384
1384
  }
1385
1385
  function zr(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFallback: l }) {
1386
- let a = O(null), o = fe(!!(e & 1), "focus-trap#initial-focus"), s = gt();
1386
+ let o = O(null), a = fe(!!(e & 1), "focus-trap#initial-focus"), s = gt();
1387
1387
  return vt(() => {
1388
1388
  if (e === 0) return;
1389
- if (!o) {
1389
+ if (!a) {
1390
1390
  l != null && l.current && Q(l.current);
1391
1391
  return;
1392
1392
  }
1393
1393
  let i = n.current;
1394
1394
  i && qe(() => {
1395
1395
  if (!s.current) return;
1396
- let d = t == null ? void 0 : t.activeElement;
1396
+ let c = t == null ? void 0 : t.activeElement;
1397
1397
  if (r != null && r.current) {
1398
- if ((r == null ? void 0 : r.current) === d) {
1399
- a.current = d;
1398
+ if ((r == null ? void 0 : r.current) === c) {
1399
+ o.current = c;
1400
1400
  return;
1401
1401
  }
1402
- } else if (i.contains(d)) {
1403
- a.current = d;
1402
+ } else if (i.contains(c)) {
1403
+ o.current = c;
1404
1404
  return;
1405
1405
  }
1406
1406
  if (r != null && r.current) Q(r.current);
1407
1407
  else {
1408
1408
  if (e & 16) {
1409
- if (Oe(i, J.First | J.AutoFocus) !== ot.Error) return;
1410
- } else if (Oe(i, J.First) !== ot.Error) return;
1409
+ if (Oe(i, J.First | J.AutoFocus) !== at.Error) return;
1410
+ } else if (Oe(i, J.First) !== at.Error) return;
1411
1411
  if (l != null && l.current && (Q(l.current), (t == null ? void 0 : t.activeElement) === l.current)) return;
1412
1412
  console.warn("There are no focusable elements inside the <FocusTrap />");
1413
1413
  }
1414
- a.current = t == null ? void 0 : t.activeElement;
1414
+ o.current = t == null ? void 0 : t.activeElement;
1415
1415
  });
1416
- }, [l, o, e]), a;
1416
+ }, [l, a, e]), o;
1417
1417
  }
1418
1418
  function Gr(e, { ownerDocument: t, container: n, containers: r, previousActiveElement: l }) {
1419
- let a = gt(), o = !!(e & 4);
1419
+ let o = gt(), a = !!(e & 4);
1420
1420
  qt(t == null ? void 0 : t.defaultView, "focus", (s) => {
1421
- if (!o || !a.current) return;
1421
+ if (!a || !o.current) return;
1422
1422
  let i = en(r);
1423
1423
  n.current instanceof HTMLElement && i.add(n.current);
1424
- let d = l.current;
1425
- if (!d) return;
1424
+ let c = l.current;
1425
+ if (!c) return;
1426
1426
  let f = s.target;
1427
- f && f instanceof HTMLElement ? tn(i, f) ? (l.current = f, Q(f)) : (s.preventDefault(), s.stopPropagation(), Q(d)) : Q(l.current);
1427
+ f && f instanceof HTMLElement ? tn(i, f) ? (l.current = f, Q(f)) : (s.preventDefault(), s.stopPropagation(), Q(c)) : Q(l.current);
1428
1428
  }, !0);
1429
1429
  }
1430
1430
  function tn(e, t) {
@@ -1454,37 +1454,37 @@ function Ze(e) {
1454
1454
  return "children" in e ? Ze(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
1455
1455
  }
1456
1456
  function rn(e, t) {
1457
- let n = ue(e), r = O([]), l = gt(), a = pt(), o = L((w, c = te.Hidden) => {
1457
+ let n = ue(e), r = O([]), l = gt(), o = pt(), a = L((w, d = te.Hidden) => {
1458
1458
  let v = r.current.findIndex(({ el: u }) => u === w);
1459
- v !== -1 && (ne(c, { [te.Unmount]() {
1459
+ v !== -1 && (ne(d, { [te.Unmount]() {
1460
1460
  r.current.splice(v, 1);
1461
1461
  }, [te.Hidden]() {
1462
1462
  r.current[v].state = "hidden";
1463
- } }), a.microTask(() => {
1463
+ } }), o.microTask(() => {
1464
1464
  var u;
1465
1465
  !Ze(r) && l.current && ((u = n.current) == null || u.call(n));
1466
1466
  }));
1467
1467
  }), s = L((w) => {
1468
- let c = r.current.find(({ el: v }) => v === w);
1469
- return c ? c.state !== "visible" && (c.state = "visible") : r.current.push({ el: w, state: "visible" }), () => o(w, te.Unmount);
1470
- }), i = O([]), d = O(Promise.resolve()), f = O({ enter: [], leave: [] }), y = L((w, c, v) => {
1471
- i.current.splice(0), t && (t.chains.current[c] = t.chains.current[c].filter(([u]) => u !== w)), t == null || t.chains.current[c].push([w, new Promise((u) => {
1468
+ let d = r.current.find(({ el: v }) => v === w);
1469
+ return d ? d.state !== "visible" && (d.state = "visible") : r.current.push({ el: w, state: "visible" }), () => a(w, te.Unmount);
1470
+ }), i = O([]), c = O(Promise.resolve()), f = O({ enter: [], leave: [] }), y = L((w, d, v) => {
1471
+ i.current.splice(0), t && (t.chains.current[d] = t.chains.current[d].filter(([u]) => u !== w)), t == null || t.chains.current[d].push([w, new Promise((u) => {
1472
1472
  i.current.push(u);
1473
- })]), t == null || t.chains.current[c].push([w, new Promise((u) => {
1474
- Promise.all(f.current[c].map(([m, p]) => p)).then(() => u());
1475
- })]), c === "enter" ? d.current = d.current.then(() => t == null ? void 0 : t.wait.current).then(() => v(c)) : v(c);
1476
- }), b = L((w, c, v) => {
1477
- Promise.all(f.current[c].splice(0).map(([u, m]) => m)).then(() => {
1473
+ })]), t == null || t.chains.current[d].push([w, new Promise((u) => {
1474
+ Promise.all(f.current[d].map(([m, p]) => p)).then(() => u());
1475
+ })]), d === "enter" ? c.current = c.current.then(() => t == null ? void 0 : t.wait.current).then(() => v(d)) : v(d);
1476
+ }), b = L((w, d, v) => {
1477
+ Promise.all(f.current[d].splice(0).map(([u, m]) => m)).then(() => {
1478
1478
  var u;
1479
1479
  (u = i.current.shift()) == null || u();
1480
- }).then(() => v(c));
1480
+ }).then(() => v(d));
1481
1481
  });
1482
- return C(() => ({ children: r, register: s, unregister: o, onStart: y, onStop: b, wait: d, chains: f }), [s, o, r, y, b, f, d]);
1482
+ return C(() => ({ children: r, register: s, unregister: a, onStart: y, onStop: b, wait: c, chains: f }), [s, a, r, y, b, f, c]);
1483
1483
  }
1484
- let ln = G, an = Ue.RenderStrategy;
1484
+ let ln = G, on = Ue.RenderStrategy;
1485
1485
  function Qr(e, t) {
1486
1486
  var n, r;
1487
- let { transition: l = !0, beforeEnter: a, afterEnter: o, beforeLeave: s, afterLeave: i, enter: d, enterFrom: f, enterTo: y, entered: b, leave: w, leaveFrom: c, leaveTo: v, ...u } = e, [m, p] = S(null), g = O(null), x = nn(e), h = Z(...x ? [g, t, p] : t === null ? [] : [t]), $ = (n = u.unmount) == null || n ? te.Unmount : te.Hidden, { show: F, appear: j, initial: _ } = Zr(), [N, U] = S(F ? "visible" : "hidden"), B = Jr(), { register: X, unregister: P } = B;
1487
+ let { transition: l = !0, beforeEnter: o, afterEnter: a, beforeLeave: s, afterLeave: i, enter: c, enterFrom: f, enterTo: y, entered: b, leave: w, leaveFrom: d, leaveTo: v, ...u } = e, [m, p] = S(null), g = O(null), x = nn(e), h = Z(...x ? [g, t, p] : t === null ? [] : [t]), $ = (n = u.unmount) == null || n ? te.Unmount : te.Hidden, { show: F, appear: j, initial: _ } = Zr(), [N, U] = S(F ? "visible" : "hidden"), B = Jr(), { register: X, unregister: P } = B;
1488
1488
  A(() => X(g), [X, g]), A(() => {
1489
1489
  if ($ === te.Hidden && g.current) {
1490
1490
  if (F && N !== "visible") {
@@ -1504,51 +1504,51 @@ function Qr(e, t) {
1504
1504
  pe.current = !0;
1505
1505
  let Ne = Qe ? "enter" : "leave";
1506
1506
  K.onStart(g, Ne, (ve) => {
1507
- ve === "enter" ? a == null || a() : ve === "leave" && (s == null || s());
1507
+ ve === "enter" ? o == null || o() : ve === "leave" && (s == null || s());
1508
1508
  });
1509
1509
  }), k = L((Qe) => {
1510
1510
  let Ne = Qe ? "enter" : "leave";
1511
1511
  pe.current = !1, K.onStop(g, Ne, (ve) => {
1512
- ve === "enter" ? o == null || o() : ve === "leave" && (i == null || i());
1512
+ ve === "enter" ? a == null || a() : ve === "leave" && (i == null || i());
1513
1513
  }), Ne === "leave" && !Ze(K) && (U("hidden"), P(g));
1514
1514
  });
1515
1515
  M(() => {
1516
1516
  x && l || (Ce(F), k(F));
1517
1517
  }, [F, x, l]);
1518
- let ke = !(!l || !x || !V || Se), [, I] = br(ke, m, F, { start: Ce, end: k }), dn = le({ ref: h, className: ((r = lt(u.className, Fe && d, Fe && f, I.enter && d, I.enter && I.closed && f, I.enter && !I.closed && y, I.leave && w, I.leave && !I.closed && c, I.leave && I.closed && v, !I.transition && F && b)) == null ? void 0 : r.trim()) || void 0, ...xr(I) }), he = 0;
1518
+ let ke = !(!l || !x || !V || Se), [, I] = br(ke, m, F, { start: Ce, end: k }), cn = le({ ref: h, className: ((r = lt(u.className, Fe && c, Fe && f, I.enter && c, I.enter && I.closed && f, I.enter && !I.closed && y, I.leave && w, I.leave && !I.closed && d, I.leave && I.closed && v, !I.transition && F && b)) == null ? void 0 : r.trim()) || void 0, ...xr(I) }), he = 0;
1519
1519
  N === "visible" && (he |= z.Open), N === "hidden" && (he |= z.Closed), I.enter && (he |= z.Opening), I.leave && (he |= z.Closing);
1520
- let cn = W();
1521
- return E.createElement(Ke.Provider, { value: K }, E.createElement(Or, { value: he }, cn({ ourProps: dn, theirProps: u, defaultTag: ln, features: an, visible: N === "visible", name: "Transition.Child" })));
1520
+ let dn = W();
1521
+ return E.createElement(Ke.Provider, { value: K }, E.createElement(Or, { value: he }, dn({ ourProps: cn, theirProps: u, defaultTag: ln, features: on, visible: N === "visible", name: "Transition.Child" })));
1522
1522
  }
1523
1523
  function el(e, t) {
1524
- let { show: n, appear: r = !1, unmount: l = !0, ...a } = e, o = O(null), s = nn(e), i = Z(...s ? [o, t] : t === null ? [] : [t]);
1524
+ let { show: n, appear: r = !1, unmount: l = !0, ...o } = e, a = O(null), s = nn(e), i = Z(...s ? [a, t] : t === null ? [] : [t]);
1525
1525
  Le();
1526
- let d = ze();
1527
- if (n === void 0 && d !== null && (n = (d & z.Open) === z.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1526
+ let c = ze();
1527
+ if (n === void 0 && c !== null && (n = (c & z.Open) === z.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1528
1528
  let [f, y] = S(n ? "visible" : "hidden"), b = rn(() => {
1529
1529
  n || y("hidden");
1530
- }), [w, c] = S(!0), v = O([n]);
1530
+ }), [w, d] = S(!0), v = O([n]);
1531
1531
  A(() => {
1532
- w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n), c(!1));
1532
+ w !== !1 && v.current[v.current.length - 1] !== n && (v.current.push(n), d(!1));
1533
1533
  }, [v, n]);
1534
1534
  let u = C(() => ({ show: n, appear: r, initial: w }), [n, r, w]);
1535
1535
  A(() => {
1536
- n ? y("visible") : !Ze(b) && o.current !== null && y("hidden");
1536
+ n ? y("visible") : !Ze(b) && a.current !== null && y("hidden");
1537
1537
  }, [n, b]);
1538
1538
  let m = { unmount: l }, p = L(() => {
1539
1539
  var h;
1540
- w && c(!1), (h = e.beforeEnter) == null || h.call(e);
1540
+ w && d(!1), (h = e.beforeEnter) == null || h.call(e);
1541
1541
  }), g = L(() => {
1542
1542
  var h;
1543
- w && c(!1), (h = e.beforeLeave) == null || h.call(e);
1543
+ w && d(!1), (h = e.beforeLeave) == null || h.call(e);
1544
1544
  }), x = W();
1545
- return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u }, x({ ourProps: { ...m, as: G, children: E.createElement(on, { ref: i, ...m, ...a, beforeEnter: p, beforeLeave: g }) }, theirProps: {}, defaultTag: G, features: an, visible: f === "visible", name: "Transition" })));
1545
+ return E.createElement(Ke.Provider, { value: b }, E.createElement(Ge.Provider, { value: u }, x({ ourProps: { ...m, as: G, children: E.createElement(an, { ref: i, ...m, ...o, beforeEnter: p, beforeLeave: g }) }, theirProps: {}, defaultTag: G, features: on, visible: f === "visible", name: "Transition" })));
1546
1546
  }
1547
1547
  function tl(e, t) {
1548
1548
  let n = R(Ge) !== null, r = ze() !== null;
1549
- return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(on, { ref: t, ...e }));
1549
+ return E.createElement(E.Fragment, null, !n && r ? E.createElement(ut, { ref: t, ...e }) : E.createElement(an, { ref: t, ...e }));
1550
1550
  }
1551
- let ut = D(el), on = D(Qr), me = D(tl), sn = Object.assign(ut, { Child: me, Root: ut });
1551
+ let ut = D(el), an = D(Qr), me = D(tl), sn = Object.assign(ut, { Child: me, Root: ut });
1552
1552
  var nl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(nl || {}), rl = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(rl || {});
1553
1553
  let ll = { 0(e, t) {
1554
1554
  return e.titleId === t.id ? e : { ...e, titleId: t.id };
@@ -1566,61 +1566,61 @@ function il(e, t) {
1566
1566
  return ne(t.type, ll, e, t);
1567
1567
  }
1568
1568
  let Lt = D(function(e, t) {
1569
- let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: a, initialFocus: o, role: s = "dialog", autoFocus: i = !0, __demoMode: d = !1, unmount: f = !1, ...y } = e, b = O(!1);
1569
+ let n = Pe(), { id: r = `headlessui-dialog-${n}`, open: l, onClose: o, initialFocus: a, role: s = "dialog", autoFocus: i = !0, __demoMode: c = !1, unmount: f = !1, ...y } = e, b = O(!1);
1570
1570
  s = function() {
1571
1571
  return s === "dialog" || s === "alertdialog" ? s : (b.current || (b.current = !0, console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
1572
1572
  }();
1573
1573
  let w = ze();
1574
1574
  l === void 0 && w !== null && (l = (w & z.Open) === z.Open);
1575
- let c = O(null), v = Z(c, t), u = Me(c), m = l ? 0 : 1, [p, g] = wn(il, { titleId: null, descriptionId: null, panelRef: yn() }), x = L(() => a(!1)), h = L((k) => g({ type: 0, id: k })), $ = Le() ? m === 0 : !1, [F, j] = Ir(), _ = { get current() {
1575
+ let d = O(null), v = Z(d, t), u = Me(d), m = l ? 0 : 1, [p, g] = wn(il, { titleId: null, descriptionId: null, panelRef: yn() }), x = L(() => o(!1)), h = L((k) => g({ type: 0, id: k })), $ = Le() ? m === 0 : !1, [F, j] = Ir(), _ = { get current() {
1576
1576
  var k;
1577
- return (k = p.panelRef.current) != null ? k : c.current;
1577
+ return (k = p.panelRef.current) != null ? k : d.current;
1578
1578
  } }, N = Qt(), { resolveContainers: U } = Hr({ mainTreeNode: N, portals: F, defaultContainers: [_] }), B = w !== null ? (w & z.Closing) === z.Closing : !1;
1579
- Jn(d || B ? !1 : $, { allowed: L(() => {
1579
+ Jn(c || B ? !1 : $, { allowed: L(() => {
1580
1580
  var k, ke;
1581
- return [(ke = (k = c.current) == null ? void 0 : k.closest("[data-headlessui-portal]")) != null ? ke : null];
1581
+ return [(ke = (k = d.current) == null ? void 0 : k.closest("[data-headlessui-portal]")) != null ? ke : null];
1582
1582
  }), disallowed: L(() => {
1583
1583
  var k;
1584
1584
  return [(k = N == null ? void 0 : N.closest("body > *:not(#headlessui-portal-root)")) != null ? k : null];
1585
- }) }), cr($, U, (k) => {
1585
+ }) }), dr($, U, (k) => {
1586
1586
  k.preventDefault(), x();
1587
1587
  }), jr($, u == null ? void 0 : u.defaultView, (k) => {
1588
1588
  k.preventDefault(), k.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), x();
1589
- }), gr(d || B ? !1 : $, u, U), Qn($, c, x);
1590
- let [X, P] = Bn(), V = C(() => [{ dialogState: m, close: x, setTitleId: h, unmount: f }, p], [m, p, x, h, f]), Se = C(() => ({ open: m === 0 }), [m]), Fe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": d ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": X, unmount: f }, pe = !Ur(), K = ie.None;
1591
- $ && !d && (K |= ie.RestoreFocus, K |= ie.TabLock, i && (K |= ie.AutoFocus), pe && (K |= ie.InitialFocus));
1589
+ }), gr(c || B ? !1 : $, u, U), Qn($, d, x);
1590
+ let [X, P] = Bn(), V = C(() => [{ dialogState: m, close: x, setTitleId: h, unmount: f }, p], [m, p, x, h, f]), Se = C(() => ({ open: m === 0 }), [m]), Fe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": c ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": X, unmount: f }, pe = !Ur(), K = ie.None;
1591
+ $ && !c && (K |= ie.RestoreFocus, K |= ie.TabLock, i && (K |= ie.AutoFocus), pe && (K |= ie.InitialFocus));
1592
1592
  let Ce = W();
1593
- return E.createElement(Pr, null, E.createElement(Pt, { force: !0 }, E.createElement(Dr, null, E.createElement(wt.Provider, { value: V }, E.createElement(Zt, { target: c }, E.createElement(Pt, { force: !1 }, E.createElement(P, { slot: Se }, E.createElement(j, null, E.createElement(Vr, { initialFocus: o, initialFocusFallback: c, containers: U, features: K }, E.createElement(Gn, { value: x }, Ce({ ourProps: Fe, theirProps: y, slot: Se, defaultTag: al, features: ol, visible: m === 0, name: "Dialog" })))))))))));
1594
- }), al = "div", ol = Ue.RenderStrategy | Ue.Static;
1593
+ return E.createElement(Pr, null, E.createElement(Pt, { force: !0 }, E.createElement(Dr, null, E.createElement(wt.Provider, { value: V }, E.createElement(Zt, { target: d }, E.createElement(Pt, { force: !1 }, E.createElement(P, { slot: Se }, E.createElement(j, null, E.createElement(Vr, { initialFocus: a, initialFocusFallback: d, containers: U, features: K }, E.createElement(Gn, { value: x }, Ce({ ourProps: Fe, theirProps: y, slot: Se, defaultTag: ol, features: al, visible: m === 0, name: "Dialog" })))))))))));
1594
+ }), ol = "div", al = Ue.RenderStrategy | Ue.Static;
1595
1595
  function sl(e, t) {
1596
- let { transition: n = !1, open: r, ...l } = e, a = ze(), o = e.hasOwnProperty("open") || a !== null, s = e.hasOwnProperty("onClose");
1597
- if (!o && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
1598
- if (!o) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
1596
+ let { transition: n = !1, open: r, ...l } = e, o = ze(), a = e.hasOwnProperty("open") || o !== null, s = e.hasOwnProperty("onClose");
1597
+ if (!a && !s) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
1598
+ if (!a) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
1599
1599
  if (!s) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
1600
- if (!a && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
1600
+ if (!o && typeof e.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);
1601
1601
  if (typeof e.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);
1602
1602
  return (r !== void 0 || n) && !l.static ? E.createElement(Mt, null, E.createElement(sn, { show: r, transition: n, unmount: l.unmount }, E.createElement(Lt, { ref: t, ...l }))) : E.createElement(Mt, null, E.createElement(Lt, { ref: t, open: r, ...l }));
1603
1603
  }
1604
1604
  let ul = "div";
1605
- function dl(e, t) {
1606
- let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...a } = e, [{ dialogState: o, unmount: s }, i] = Je("Dialog.Panel"), d = Z(t, i.panelRef), f = C(() => ({ open: o === 0 }), [o]), y = L((u) => {
1605
+ function cl(e, t) {
1606
+ let n = Pe(), { id: r = `headlessui-dialog-panel-${n}`, transition: l = !1, ...o } = e, [{ dialogState: a, unmount: s }, i] = Je("Dialog.Panel"), c = Z(t, i.panelRef), f = C(() => ({ open: a === 0 }), [a]), y = L((u) => {
1607
1607
  u.stopPropagation();
1608
- }), b = { ref: d, id: r, onClick: y }, w = l ? me : G, c = l ? { unmount: s } : {}, v = W();
1609
- return E.createElement(w, { ...c }, v({ ourProps: b, theirProps: a, slot: f, defaultTag: ul, name: "Dialog.Panel" }));
1608
+ }), b = { ref: c, id: r, onClick: y }, w = l ? me : G, d = l ? { unmount: s } : {}, v = W();
1609
+ return E.createElement(w, { ...d }, v({ ourProps: b, theirProps: o, slot: f, defaultTag: ul, name: "Dialog.Panel" }));
1610
1610
  }
1611
- let cl = "div";
1611
+ let dl = "div";
1612
1612
  function fl(e, t) {
1613
- let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: a }] = Je("Dialog.Backdrop"), o = C(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? me : G, d = n ? { unmount: a } : {}, f = W();
1614
- return E.createElement(i, { ...d }, f({ ourProps: s, theirProps: r, slot: o, defaultTag: cl, name: "Dialog.Backdrop" }));
1613
+ let { transition: n = !1, ...r } = e, [{ dialogState: l, unmount: o }] = Je("Dialog.Backdrop"), a = C(() => ({ open: l === 0 }), [l]), s = { ref: t, "aria-hidden": !0 }, i = n ? me : G, c = n ? { unmount: o } : {}, f = W();
1614
+ return E.createElement(i, { ...c }, f({ ourProps: s, theirProps: r, slot: a, defaultTag: dl, name: "Dialog.Backdrop" }));
1615
1615
  }
1616
1616
  let ml = "h2";
1617
1617
  function pl(e, t) {
1618
- let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState: a, setTitleId: o }] = Je("Dialog.Title"), s = Z(t);
1619
- M(() => (o(r), () => o(null)), [r, o]);
1620
- let i = C(() => ({ open: a === 0 }), [a]), d = { ref: s, id: r };
1621
- return W()({ ourProps: d, theirProps: l, slot: i, defaultTag: ml, name: "Dialog.Title" });
1618
+ let n = Pe(), { id: r = `headlessui-dialog-title-${n}`, ...l } = e, [{ dialogState: o, setTitleId: a }] = Je("Dialog.Title"), s = Z(t);
1619
+ M(() => (a(r), () => a(null)), [r, a]);
1620
+ let i = C(() => ({ open: o === 0 }), [o]), c = { ref: s, id: r };
1621
+ return W()({ ourProps: c, theirProps: l, slot: i, defaultTag: ml, name: "Dialog.Title" });
1622
1622
  }
1623
- let hl = D(sl), yt = D(dl);
1623
+ let hl = D(sl), yt = D(cl);
1624
1624
  D(fl);
1625
1625
  let vl = D(pl), gl = Object.assign(hl, { Panel: yt, Title: vl, Description: Yn });
1626
1626
  function un({ onClick: e }) {
@@ -1749,8 +1749,8 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1749
1749
  )
1750
1750
  }
1751
1751
  ) });
1752
- }, xl = dt(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: a = null, onAfterLeave: o = null, ...s }, i) => {
1753
- const d = (y) => typeof t == "function" ? t(y) : t, f = O(null);
1752
+ }, xl = ct(({ name: e, children: t, onFocus: n = null, onBlur: r = null, onClose: l = null, onSuccess: o = null, onAfterLeave: a = null, ...s }, i) => {
1753
+ const c = (y) => typeof t == "function" ? t(y) : t, f = O(null);
1754
1754
  return St(i, () => f.current, [f]), /* @__PURE__ */ T(
1755
1755
  It,
1756
1756
  {
@@ -1759,13 +1759,13 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1759
1759
  onFocus: n,
1760
1760
  onBlur: r,
1761
1761
  onClose: l,
1762
- onSuccess: a,
1762
+ onSuccess: o,
1763
1763
  ...s,
1764
1764
  children: ({
1765
1765
  afterLeave: y,
1766
1766
  close: b,
1767
1767
  config: w,
1768
- emit: c,
1768
+ emit: d,
1769
1769
  getChildModal: v,
1770
1770
  getParentModal: u,
1771
1771
  id: m,
@@ -1781,7 +1781,7 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1781
1781
  {
1782
1782
  appear: !0,
1783
1783
  show: g ?? !1,
1784
- afterLeave: o,
1784
+ afterLeave: a,
1785
1785
  children: /* @__PURE__ */ se(
1786
1786
  gl,
1787
1787
  {
@@ -1815,11 +1815,11 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1815
1815
  {
1816
1816
  modalContext: x,
1817
1817
  config: w,
1818
- children: d({
1818
+ children: c({
1819
1819
  afterLeave: y,
1820
1820
  close: b,
1821
1821
  config: w,
1822
- emit: c,
1822
+ emit: d,
1823
1823
  getChildModal: v,
1824
1824
  getParentModal: u,
1825
1825
  id: m,
@@ -1837,11 +1837,11 @@ const wl = ({ modalContext: e, config: t, children: n }) => {
1837
1837
  {
1838
1838
  modalContext: x,
1839
1839
  config: w,
1840
- children: d({
1840
+ children: c({
1841
1841
  afterLeave: y,
1842
1842
  close: b,
1843
1843
  config: w,
1844
- emit: c,
1844
+ emit: d,
1845
1845
  getChildModal: v,
1846
1846
  getParentModal: u,
1847
1847
  id: m,
@@ -1870,16 +1870,16 @@ const Nl = ({
1870
1870
  data: n = {},
1871
1871
  as: r = "a",
1872
1872
  headers: l = {},
1873
- queryStringArrayFormat: a = "brackets",
1874
- onAfterLeave: o = null,
1873
+ queryStringArrayFormat: o = "brackets",
1874
+ onAfterLeave: a = null,
1875
1875
  onBlur: s = null,
1876
1876
  onClose: i = null,
1877
- onError: d = null,
1877
+ onError: c = null,
1878
1878
  onFocus: f = null,
1879
1879
  onStart: y = null,
1880
1880
  onSuccess: b = null,
1881
1881
  navigate: w = null,
1882
- children: c,
1882
+ children: d,
1883
1883
  ...v
1884
1884
  }) => {
1885
1885
  const [u, m] = S(!1), [p, g] = S(null), { stack: x, visit: h } = Xe(), $ = C(() => w ?? ft("navigate"), [w]), F = {}, j = {};
@@ -1893,8 +1893,8 @@ const Nl = ({
1893
1893
  const U = Y(() => {
1894
1894
  i == null || i();
1895
1895
  }, [i]), B = Y(() => {
1896
- g(null), o == null || o();
1897
- }, [o]), X = Y(
1896
+ g(null), a == null || a();
1897
+ }, [a]), X = Y(
1898
1898
  (P) => {
1899
1899
  P == null || P.preventDefault(), !u && (e.startsWith("#") || (m(!0), y == null || y()), h(
1900
1900
  e,
@@ -1904,15 +1904,15 @@ const Nl = ({
1904
1904
  Pn(Ft(v, xt)),
1905
1905
  () => U(x.length),
1906
1906
  B,
1907
- a,
1907
+ o,
1908
1908
  $
1909
1909
  ).then((V) => {
1910
1910
  g(V), V.registerEventListenersFromProps(j), b == null || b();
1911
1911
  }).catch((V) => {
1912
- console.error(V), d == null || d(V);
1912
+ console.error(V), c == null || c(V);
1913
1913
  }).finally(() => m(!1)));
1914
1914
  },
1915
- [e, t, n, l, a, v, U, B]
1915
+ [e, t, n, l, o, v, U, B]
1916
1916
  );
1917
1917
  return /* @__PURE__ */ T(
1918
1918
  r,
@@ -1920,7 +1920,7 @@ const Nl = ({
1920
1920
  ...F,
1921
1921
  href: e,
1922
1922
  onClick: X,
1923
- children: typeof c == "function" ? c({ loading: u }) : c
1923
+ children: typeof d == "function" ? d({ loading: u }) : d
1924
1924
  }
1925
1925
  );
1926
1926
  };