@inertiaui/modal-react 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- var Rn = Object.defineProperty;
2
- var Pn = (e, t, r) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var le = (e, t, r) => Pn(e, typeof t != "symbol" ? t + "" : t, r);
1
+ var Pn = Object.defineProperty;
2
+ var Rn = (e, t, r) => t in e ? Pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var le = (e, t, r) => Rn(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import * as qe from "react";
5
- import O, { createContext as ie, useState as V, useEffect as D, useContext as Z, useRef as j, createElement as Ct, useMemo as B, forwardRef as Dt, useImperativeHandle as yr, useLayoutEffect as Sn, useCallback as oe, Fragment as ue, isValidElement as $n, cloneElement as Cn, useId as Je, useSyncExternalStore as Fn, useReducer as kn, createRef as jn } from "react";
6
- import lt from "axios";
5
+ import O, { createContext as ie, useState as V, useEffect as D, useContext as Z, useRef as j, createElement as lt, useMemo as B, forwardRef as Dt, useImperativeHandle as yr, useLayoutEffect as Sn, useCallback as oe, Fragment as ue, isValidElement as $n, cloneElement as Cn, useId as Je, useSyncExternalStore as Fn, useReducer as kn, createRef as jn } from "react";
6
+ import it from "axios";
7
7
  import { router as Ye, usePage as _n } from "@inertiajs/react";
8
8
  import { mergeDataIntoQueryString as Mn } from "@inertiajs/core";
9
9
  import { createPortal as An } from "react-dom";
@@ -63,7 +63,7 @@ class Ln {
63
63
  return n;
64
64
  }
65
65
  }
66
- const ut = new Ln(), Wi = () => ut.reset(), Ui = (e, t) => ut.put(e, t), Wt = (e) => ut.get(e), Me = (e, t) => ut.get(e ? `slideover.${t}` : `modal.${t}`);
66
+ const ct = new Ln(), Ui = () => ct.reset(), Hi = (e, t) => ct.put(e, t), Wt = (e) => ct.get(e), Me = (e, t) => ct.get(e ? `slideover.${t}` : `modal.${t}`);
67
67
  var Ft = { exports: {} }, Ue = {};
68
68
  /**
69
69
  * @license React
@@ -111,14 +111,14 @@ function Nn() {
111
111
  var p = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
112
112
  function v(i) {
113
113
  {
114
- for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), R = 1; R < m; R++)
115
- b[R - 1] = arguments[R];
114
+ for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), P = 1; P < m; P++)
115
+ b[P - 1] = arguments[P];
116
116
  x("error", i, b);
117
117
  }
118
118
  }
119
119
  function x(i, m, b) {
120
120
  {
121
- var R = p.ReactDebugCurrentFrame, k = R.getStackAddendum();
121
+ var P = p.ReactDebugCurrentFrame, k = P.getStackAddendum();
122
122
  k !== "" && (m += "%s", b = b.concat([k]));
123
123
  var M = b.map(function($) {
124
124
  return String($);
@@ -136,9 +136,9 @@ function Nn() {
136
136
  i.$$typeof === te || i.getModuleId !== void 0));
137
137
  }
138
138
  function q(i, m, b) {
139
- var R = i.displayName;
140
- if (R)
141
- return R;
139
+ var P = i.displayName;
140
+ if (P)
141
+ return P;
142
142
  var k = m.displayName || m.name || "";
143
143
  return k !== "" ? b + "(" + k + ")" : b;
144
144
  }
@@ -177,8 +177,8 @@ function Nn() {
177
177
  case a:
178
178
  return q(i, i.render, "ForwardRef");
179
179
  case g:
180
- var R = i.displayName || null;
181
- return R !== null ? R : _(i.type) || "Memo";
180
+ var P = i.displayName || null;
181
+ return P !== null ? P : _(i.type) || "Memo";
182
182
  case E: {
183
183
  var k = i, M = k._payload, $ = k._init;
184
184
  try {
@@ -194,7 +194,7 @@ function Nn() {
194
194
  function Y() {
195
195
  }
196
196
  Y.__reactDisabledLog = !0;
197
- function bt() {
197
+ function Et() {
198
198
  {
199
199
  if (L === 0) {
200
200
  be = console.log, Ee = console.info, ve = console.warn, re = console.error, xe = console.group, I = console.groupCollapsed, Te = console.groupEnd;
@@ -252,18 +252,18 @@ function Nn() {
252
252
  L < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
253
253
  }
254
254
  }
255
- var Ie = p.ReactCurrentDispatcher, Re;
255
+ var Ie = p.ReactCurrentDispatcher, Pe;
256
256
  function de(i, m, b) {
257
257
  {
258
- if (Re === void 0)
258
+ if (Pe === void 0)
259
259
  try {
260
260
  throw Error();
261
261
  } catch (k) {
262
- var R = k.stack.trim().match(/\n( *(at )?)/);
263
- Re = R && R[1] || "";
262
+ var P = k.stack.trim().match(/\n( *(at )?)/);
263
+ Pe = P && P[1] || "";
264
264
  }
265
265
  return `
266
- ` + Re + i;
266
+ ` + Pe + i;
267
267
  }
268
268
  }
269
269
  var fe = !1, et;
@@ -279,12 +279,12 @@ function Nn() {
279
279
  if (b !== void 0)
280
280
  return b;
281
281
  }
282
- var R;
282
+ var P;
283
283
  fe = !0;
284
284
  var k = Error.prepareStackTrace;
285
285
  Error.prepareStackTrace = void 0;
286
286
  var M;
287
- M = Ie.current, Ie.current = null, bt();
287
+ M = Ie.current, Ie.current = null, Et();
288
288
  try {
289
289
  if (m) {
290
290
  var $ = function() {
@@ -298,14 +298,14 @@ function Nn() {
298
298
  try {
299
299
  Reflect.construct($, []);
300
300
  } catch (J) {
301
- R = J;
301
+ P = J;
302
302
  }
303
303
  Reflect.construct(i, [], $);
304
304
  } else {
305
305
  try {
306
306
  $.call();
307
307
  } catch (J) {
308
- R = J;
308
+ P = J;
309
309
  }
310
310
  i.call($.prototype);
311
311
  }
@@ -313,14 +313,14 @@ function Nn() {
313
313
  try {
314
314
  throw Error();
315
315
  } catch (J) {
316
- R = J;
316
+ P = J;
317
317
  }
318
318
  i();
319
319
  }
320
320
  } catch (J) {
321
- if (J && R && typeof J.stack == "string") {
321
+ if (J && P && typeof J.stack == "string") {
322
322
  for (var S = J.stack.split(`
323
- `), K = R.stack.split(`
323
+ `), K = P.stack.split(`
324
324
  `), N = S.length - 1, W = K.length - 1; N >= 1 && W >= 0 && S[N] !== K[W]; )
325
325
  W--;
326
326
  for (; N >= 1 && W >= 0; N--, W--)
@@ -339,8 +339,8 @@ function Nn() {
339
339
  } finally {
340
340
  fe = !1, Ie.current = M, Oe(), Error.prepareStackTrace = k;
341
341
  }
342
- var _e = i ? i.displayName || i.name : "", Pe = _e ? de(_e) : "";
343
- return typeof i == "function" && et.set(i, Pe), Pe;
342
+ var _e = i ? i.displayName || i.name : "", Re = _e ? de(_e) : "";
343
+ return typeof i == "function" && et.set(i, Re), Re;
344
344
  }
345
345
  function en(i, m, b) {
346
346
  return Kt(i, !1);
@@ -369,7 +369,7 @@ function Nn() {
369
369
  case g:
370
370
  return tt(i.type, m, b);
371
371
  case E: {
372
- var R = i, k = R._payload, M = R._init;
372
+ var P = i, k = P._payload, M = P._init;
373
373
  try {
374
374
  return tt(M(k), m, b);
375
375
  } catch {
@@ -386,7 +386,7 @@ function Nn() {
386
386
  } else
387
387
  Gt.setExtraStackFrame(null);
388
388
  }
389
- function rn(i, m, b, R, k) {
389
+ function rn(i, m, b, P, k) {
390
390
  {
391
391
  var M = Function.call.bind(Ne);
392
392
  for (var $ in i)
@@ -394,19 +394,19 @@ function Nn() {
394
394
  var S = void 0;
395
395
  try {
396
396
  if (typeof i[$] != "function") {
397
- var K = Error((R || "React class") + ": " + b + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
+ var K = Error((P || "React class") + ": " + b + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
398
398
  throw K.name = "Invariant Violation", K;
399
399
  }
400
- S = i[$](m, $, R, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
+ S = i[$](m, $, P, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
401
401
  } catch (N) {
402
402
  S = N;
403
403
  }
404
- S && !(S instanceof Error) && (rt(k), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", R || "React class", b, $, typeof S), rt(null)), S instanceof Error && !(S.message in zt) && (zt[S.message] = !0, rt(k), v("Failed %s type: %s", b, S.message), rt(null));
404
+ S && !(S instanceof Error) && (rt(k), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", b, $, typeof S), rt(null)), S instanceof Error && !(S.message in zt) && (zt[S.message] = !0, rt(k), v("Failed %s type: %s", b, S.message), rt(null));
405
405
  }
406
406
  }
407
407
  }
408
408
  var nn = Array.isArray;
409
- function Et(i) {
409
+ function xt(i) {
410
410
  return nn(i);
411
411
  }
412
412
  function ln(i) {
@@ -434,8 +434,8 @@ function Nn() {
434
434
  ref: !0,
435
435
  __self: !0,
436
436
  __source: !0
437
- }, Qt, er, xt;
438
- xt = {};
437
+ }, Qt, er, Tt;
438
+ Tt = {};
439
439
  function sn(i) {
440
440
  if (Ne.call(i, "ref")) {
441
441
  var m = Object.getOwnPropertyDescriptor(i, "ref").get;
@@ -455,7 +455,7 @@ function Nn() {
455
455
  function cn(i, m) {
456
456
  if (typeof i.ref == "string" && De.current && m && De.current.stateNode !== m) {
457
457
  var b = _(De.current.type);
458
- xt[b] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', _(De.current.type), i.ref), xt[b] = !0);
458
+ Tt[b] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', _(De.current.type), i.ref), Tt[b] = !0);
459
459
  }
460
460
  }
461
461
  function dn(i, m) {
@@ -480,7 +480,7 @@ function Nn() {
480
480
  });
481
481
  }
482
482
  }
483
- var pn = function(i, m, b, R, k, M, $) {
483
+ var pn = function(i, m, b, P, k, M, $) {
484
484
  var S = {
485
485
  // This tag allows us to uniquely identify this as a React Element
486
486
  $$typeof: t,
@@ -501,7 +501,7 @@ function Nn() {
501
501
  configurable: !1,
502
502
  enumerable: !1,
503
503
  writable: !1,
504
- value: R
504
+ value: P
505
505
  }), Object.defineProperty(S, "_source", {
506
506
  configurable: !1,
507
507
  enumerable: !1,
@@ -509,7 +509,7 @@ function Nn() {
509
509
  value: k
510
510
  }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
511
511
  };
512
- function mn(i, m, b, R, k) {
512
+ function mn(i, m, b, P, k) {
513
513
  {
514
514
  var M, $ = {}, S = null, K = null;
515
515
  b !== void 0 && (Zt(b), S = "" + b), un(m) && (Zt(m.key), S = "" + m.key), sn(m) && (K = m.ref, cn(m, k));
@@ -524,10 +524,10 @@ function Nn() {
524
524
  var W = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
525
525
  S && dn($, W), K && fn($, W);
526
526
  }
527
- return pn(i, S, K, k, R, De.current, $);
527
+ return pn(i, S, K, k, P, De.current, $);
528
528
  }
529
529
  }
530
- var Tt = p.ReactCurrentOwner, tr = p.ReactDebugCurrentFrame;
530
+ var Ot = p.ReactCurrentOwner, tr = p.ReactDebugCurrentFrame;
531
531
  function je(i) {
532
532
  if (i) {
533
533
  var m = i._owner, b = tt(i.type, i._source, m ? m.type : null);
@@ -535,15 +535,15 @@ function Nn() {
535
535
  } else
536
536
  tr.setExtraStackFrame(null);
537
537
  }
538
- var Ot;
539
- Ot = !1;
538
+ var Pt;
539
+ Pt = !1;
540
540
  function Rt(i) {
541
541
  return typeof i == "object" && i !== null && i.$$typeof === t;
542
542
  }
543
543
  function rr() {
544
544
  {
545
- if (Tt.current) {
546
- var i = _(Tt.current.type);
545
+ if (Ot.current) {
546
+ var i = _(Ot.current.type);
547
547
  if (i)
548
548
  return `
549
549
 
@@ -577,18 +577,18 @@ Check the top-level render call using <` + b + ">.");
577
577
  if (nr[b])
578
578
  return;
579
579
  nr[b] = !0;
580
- var R = "";
581
- i && i._owner && i._owner !== Tt.current && (R = " It was passed a child from " + _(i._owner.type) + "."), je(i), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, R), je(null);
580
+ var P = "";
581
+ i && i._owner && i._owner !== Ot.current && (P = " It was passed a child from " + _(i._owner.type) + "."), je(i), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, P), je(null);
582
582
  }
583
583
  }
584
584
  function ir(i, m) {
585
585
  {
586
586
  if (typeof i != "object")
587
587
  return;
588
- if (Et(i))
588
+ if (xt(i))
589
589
  for (var b = 0; b < i.length; b++) {
590
- var R = i[b];
591
- Rt(R) && lr(R, m);
590
+ var P = i[b];
591
+ Rt(P) && lr(P, m);
592
592
  }
593
593
  else if (Rt(i))
594
594
  i._store && (i._store.validated = !0);
@@ -615,10 +615,10 @@ Check the top-level render call using <` + b + ">.");
615
615
  else
616
616
  return;
617
617
  if (b) {
618
- var R = _(m);
619
- rn(b, i.props, "prop", R, i);
620
- } else if (m.PropTypes !== void 0 && !Ot) {
621
- Ot = !0;
618
+ var P = _(m);
619
+ rn(b, i.props, "prop", P, i);
620
+ } else if (m.PropTypes !== void 0 && !Pt) {
621
+ Pt = !0;
622
622
  var k = _(m);
623
623
  v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
624
624
  }
@@ -628,9 +628,9 @@ Check the top-level render call using <` + b + ">.");
628
628
  function wn(i) {
629
629
  {
630
630
  for (var m = Object.keys(i.props), b = 0; b < m.length; b++) {
631
- var R = m[b];
632
- if (R !== "children" && R !== "key") {
633
- je(i), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", R), je(null);
631
+ var P = m[b];
632
+ if (P !== "children" && P !== "key") {
633
+ je(i), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), je(null);
634
634
  break;
635
635
  }
636
636
  }
@@ -638,7 +638,7 @@ Check the top-level render call using <` + b + ">.");
638
638
  }
639
639
  }
640
640
  var ar = {};
641
- function or(i, m, b, R, k, M) {
641
+ function or(i, m, b, P, k, M) {
642
642
  {
643
643
  var $ = H(i);
644
644
  if (!$) {
@@ -647,7 +647,7 @@ Check the top-level render call using <` + b + ">.");
647
647
  var K = vn();
648
648
  K ? S += K : S += rr();
649
649
  var N;
650
- i === null ? N = "null" : Et(i) ? N = "array" : i !== void 0 && i.$$typeof === t ? (N = "<" + (_(i.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : N = typeof i, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, S);
650
+ i === null ? N = "null" : xt(i) ? N = "array" : i !== void 0 && i.$$typeof === t ? (N = "<" + (_(i.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : N = typeof i, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, S);
651
651
  }
652
652
  var W = mn(i, m, b, k, M);
653
653
  if (W == null)
@@ -655,8 +655,8 @@ Check the top-level render call using <` + b + ">.");
655
655
  if ($) {
656
656
  var ne = m.children;
657
657
  if (ne !== void 0)
658
- if (R)
659
- if (Et(ne)) {
658
+ if (P)
659
+ if (xt(ne)) {
660
660
  for (var _e = 0; _e < ne.length; _e++)
661
661
  ir(ne[_e], i);
662
662
  Object.freeze && Object.freeze(ne);
@@ -666,17 +666,17 @@ Check the top-level render call using <` + b + ">.");
666
666
  ir(ne, i);
667
667
  }
668
668
  if (Ne.call(m, "key")) {
669
- var Pe = _(i), J = Object.keys(m).filter(function(On) {
669
+ var Re = _(i), J = Object.keys(m).filter(function(On) {
670
670
  return On !== "key";
671
- }), Pt = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
672
- if (!ar[Pe + Pt]) {
671
+ }), St = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
672
+ if (!ar[Re + St]) {
673
673
  var Tn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
674
674
  v(`A props object containing a "key" prop is being spread into JSX:
675
675
  let props = %s;
676
676
  <%s {...props} />
677
677
  React keys must be passed directly to JSX without using spread:
678
678
  let props = %s;
679
- <%s key={someKey} {...props} />`, Pt, Pe, Tn, Pe), ar[Pe + Pt] = !0;
679
+ <%s key={someKey} {...props} />`, St, Re, Tn, Re), ar[Re + St] = !0;
680
680
  }
681
681
  }
682
682
  return i === n ? wn(W) : gn(W), W;
@@ -693,7 +693,7 @@ React keys must be passed directly to JSX without using spread:
693
693
  }()), He;
694
694
  }
695
695
  process.env.NODE_ENV === "production" ? Ft.exports = In() : Ft.exports = Nn();
696
- var P = Ft.exports;
696
+ var R = Ft.exports;
697
697
  function Dn(e, t) {
698
698
  return Array.isArray(e) ? e.filter((r) => !t.includes(r)) : Object.keys(e).reduce((r, n) => (t.includes(n) || (r[n] = e[n]), r), {});
699
699
  }
@@ -720,8 +720,8 @@ function Un(e, t = 3, r = 10) {
720
720
  function Be(e) {
721
721
  return e ? (e = e.replace(/_/g, "-"), e = e.replace(/-+/g, "-"), /[A-Z]/.test(e) ? (e = e.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (t, r) => r.toUpperCase()), e = e.replace(/(.)(?=[A-Z])/g, "$1-"), e.toLowerCase()) : e) : "";
722
722
  }
723
- const ct = ie(null);
724
- ct.displayName = "ModalStackContext";
723
+ const dt = ie(null);
724
+ dt.displayName = "ModalStackContext";
725
725
  let Er = null, xr = null, Ke = null, kt = null, jt = [];
726
726
  const Hn = ({ children: e }) => {
727
727
  const [t, r] = V([]), [n, l] = V({}), o = (h) => {
@@ -793,7 +793,7 @@ const Hn = ({ children: e }) => {
793
793
  le(this, "reload", (f = {}) => {
794
794
  var v;
795
795
  let p = Object.keys(this.response.props);
796
- f.only && (p = br(p, f.only)), f.except && (p = Dn(p, f.except)), (v = this.response) != null && v.url && lt.get(this.response.url, {
796
+ f.only && (p = br(p, f.only)), f.except && (p = Dn(p, f.except)), (v = this.response) != null && v.url && it.get(this.response.url, {
797
797
  headers: {
798
798
  Accept: "text/html, application/xhtml+xml",
799
799
  "X-Inertia": !0,
@@ -882,7 +882,7 @@ const Hn = ({ children: e }) => {
882
882
  });
883
883
  }
884
884
  });
885
- lt({
885
+ it({
886
886
  url: H,
887
887
  method: f,
888
888
  data: q,
@@ -914,28 +914,30 @@ const Hn = ({ children: e }) => {
914
914
  });
915
915
  }
916
916
  };
917
- return /* @__PURE__ */ P.jsx(ct.Provider, { value: y, children: e });
918
- }, dt = () => {
919
- const e = Z(ct);
917
+ return /* @__PURE__ */ R.jsx(dt.Provider, { value: y, children: e });
918
+ }, ft = () => {
919
+ const e = Z(dt);
920
920
  if (e === null)
921
921
  throw new Error("useModalStack must be used within a ModalStackProvider");
922
922
  return e;
923
- }, cr = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Hi = (e, t) => {
924
- t.initialPage && (Er = t.initialPage.version), t.resolveComponent && (xr = t.resolveComponent);
923
+ }, cr = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Bn = (e) => {
924
+ e.initialPage && (Er = e.initialPage.version), e.resolveComponent && (xr = e.resolveComponent);
925
+ }, Bi = (e, t) => {
926
+ Bn(t);
925
927
  const r = ({ Component: n, props: l, key: o }) => {
926
928
  const s = () => {
927
- const c = Ct(n, { key: o, ...l });
928
- return typeof n.layout == "function" ? n.layout(c) : Array.isArray(n.layout) ? n.layout.concat(c).reverse().reduce((d, u) => Ct(u, l, d)) : c;
929
+ const c = lt(n, { key: o, ...l });
930
+ return typeof n.layout == "function" ? n.layout(c) : Array.isArray(n.layout) ? n.layout.concat(c).reverse().reduce((d, u) => lt(u, l, d)) : c;
929
931
  };
930
- return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
932
+ return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
931
933
  s(),
932
- /* @__PURE__ */ P.jsx(Bn, {})
934
+ /* @__PURE__ */ R.jsx(Vn, {})
933
935
  ] });
934
936
  };
935
- return /* @__PURE__ */ P.jsx(Hn, { children: /* @__PURE__ */ P.jsx(e, { ...t, children: r }) });
936
- }, Bn = ({ children: e }) => {
937
+ return /* @__PURE__ */ R.jsx(Hn, { children: /* @__PURE__ */ R.jsx(e, { ...t, children: r }) });
938
+ }, Vn = ({ children: e }) => {
937
939
  var c;
938
- const t = Z(ct);
940
+ const t = Z(dt);
939
941
  let r = !1, n = !1;
940
942
  D(() => Ye.on("start", () => r = !0), []), D(() => Ye.on("finish", () => r = !1), []), D(
941
943
  () => Ye.on("navigate", function(a) {
@@ -960,15 +962,15 @@ const Hn = ({ children: e }) => {
960
962
  []
961
963
  );
962
964
  const l = (a) => (jt.length && (a.headers["X-InertiaUI-Modal-Base-Url"] = Ke), a);
963
- D(() => (lt.interceptors.request.use(l), () => lt.interceptors.request.eject(l)), []);
965
+ D(() => (it.interceptors.request.use(l), () => it.interceptors.request.eject(l)), []);
964
966
  const o = _n(), s = j();
965
967
  return D(() => {
966
968
  var u, g;
967
969
  const a = (u = o.props) == null ? void 0 : u._inertiaui_modal, d = s.current;
968
970
  s.current = a, a && d && a.component === d.component && a.url === d.url && ((g = t.stack[0]) == null || g.updateProps(a.props ?? {}));
969
- }, [(c = o.props) == null ? void 0 : c._inertiaui_modal]), /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
971
+ }, [(c = o.props) == null ? void 0 : c._inertiaui_modal]), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
970
972
  e,
971
- t.stack.length > 0 && /* @__PURE__ */ P.jsx(Or, { index: 0 })
973
+ t.stack.length > 0 && /* @__PURE__ */ R.jsx(Or, { index: 0 })
972
974
  ] });
973
975
  }, Ut = O.createContext(null);
974
976
  Ut.displayName = "ModalIndexContext";
@@ -978,16 +980,16 @@ const Tr = () => {
978
980
  throw new Error("useModalIndex must be used within a ModalIndexProvider");
979
981
  return e;
980
982
  }, Or = ({ index: e }) => {
981
- const { stack: t } = dt(), r = B(() => t[e], [t, e]);
982
- return (r == null ? void 0 : r.component) && /* @__PURE__ */ P.jsx(Ut.Provider, { value: e, children: /* @__PURE__ */ P.jsx(
983
+ const { stack: t } = ft(), r = B(() => t[e], [t, e]);
984
+ return (r == null ? void 0 : r.component) && /* @__PURE__ */ R.jsx(Ut.Provider, { value: e, children: /* @__PURE__ */ R.jsx(
983
985
  r.component,
984
986
  {
985
987
  ...r.props,
986
988
  onModalEvent: (...n) => r.emit(...n)
987
989
  }
988
990
  ) });
989
- }, Rr = Dt(({ name: e, children: t, ...r }, n) => {
990
- const l = Tr(), { stack: o, registerLocalModal: s, removeLocalModal: c } = dt(), [a, d] = V(null), u = B(() => e ? a : o[l], [e, a, l, o]), g = B(() => {
991
+ }, Pr = Dt(({ name: e, children: t, ...r }, n) => {
992
+ const l = Tr(), { stack: o, registerLocalModal: s, removeLocalModal: c } = ft(), [a, d] = V(null), u = B(() => e ? a : o[l], [e, a, l, o]), g = B(() => {
991
993
  var y;
992
994
  return (y = o.find((h) => h.shouldRender && h.index > (u == null ? void 0 : u.index))) == null ? void 0 : y.index;
993
995
  }, [l, o]), E = B(() => (u == null ? void 0 : u.config.slideover) ?? r.slideover ?? Wt("type") === "slideover", [r.slideover]), w = B(
@@ -1032,7 +1034,7 @@ const Tr = () => {
1032
1034
  shouldRender: u == null ? void 0 : u.shouldRender
1033
1035
  }),
1034
1036
  [u]
1035
- ), (u == null ? void 0 : u.shouldRender) && /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
1037
+ ), (u == null ? void 0 : u.shouldRender) && /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
1036
1038
  typeof t == "function" ? t({
1037
1039
  afterLeave: u.afterLeave,
1038
1040
  close: u.close,
@@ -1049,27 +1051,27 @@ const Tr = () => {
1049
1051
  setOpen: u.setOpen,
1050
1052
  shouldRender: u.shouldRender
1051
1053
  }) : t,
1052
- g && /* @__PURE__ */ P.jsx(Or, { index: g })
1054
+ g && /* @__PURE__ */ R.jsx(Or, { index: g })
1053
1055
  ] });
1054
1056
  });
1055
- Rr.displayName = "HeadlessModal";
1056
- function Pr(e) {
1057
+ Pr.displayName = "HeadlessModal";
1058
+ function Rr(e) {
1057
1059
  var t, r, n = "";
1058
1060
  if (typeof e == "string" || typeof e == "number") n += e;
1059
1061
  else if (typeof e == "object") if (Array.isArray(e)) {
1060
1062
  var l = e.length;
1061
- for (t = 0; t < l; t++) e[t] && (r = Pr(e[t])) && (n && (n += " "), n += r);
1063
+ for (t = 0; t < l; t++) e[t] && (r = Rr(e[t])) && (n && (n += " "), n += r);
1062
1064
  } else for (r in e) e[r] && (n && (n += " "), n += r);
1063
1065
  return n;
1064
1066
  }
1065
- function it() {
1066
- for (var e, t, r = 0, n = "", l = arguments.length; r < l; r++) (e = arguments[r]) && (t = Pr(e)) && (n && (n += " "), n += t);
1067
+ function at() {
1068
+ for (var e, t, r = 0, n = "", l = arguments.length; r < l; r++) (e = arguments[r]) && (t = Rr(e)) && (n && (n += " "), n += t);
1067
1069
  return n;
1068
1070
  }
1069
- var Vn = Object.defineProperty, Yn = (e, t, r) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, St = (e, t, r) => (Yn(e, typeof t != "symbol" ? t + "" : t, r), r);
1070
- let Xn = class {
1071
+ var Yn = Object.defineProperty, Xn = (e, t, r) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, $t = (e, t, r) => (Xn(e, typeof t != "symbol" ? t + "" : t, r), r);
1072
+ let qn = class {
1071
1073
  constructor() {
1072
- St(this, "current", this.detect()), St(this, "handoffState", "pending"), St(this, "currentId", 0);
1074
+ $t(this, "current", this.detect()), $t(this, "handoffState", "pending"), $t(this, "currentId", 0);
1073
1075
  }
1074
1076
  set(t) {
1075
1077
  this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t);
@@ -1095,11 +1097,11 @@ let Xn = class {
1095
1097
  get isHandoffComplete() {
1096
1098
  return this.handoffState === "complete";
1097
1099
  }
1098
- }, Fe = new Xn();
1099
- function ft(e) {
1100
+ }, Fe = new qn();
1101
+ function pt(e) {
1100
1102
  return Fe.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
1101
1103
  }
1102
- function pt(e) {
1104
+ function mt(e) {
1103
1105
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
1104
1106
  throw t;
1105
1107
  }));
@@ -1117,7 +1119,7 @@ function ye() {
1117
1119
  return t.add(() => clearTimeout(n));
1118
1120
  }, microTask(...r) {
1119
1121
  let n = { current: !0 };
1120
- return pt(() => {
1122
+ return mt(() => {
1121
1123
  n.current && r[0]();
1122
1124
  }), t.add(() => {
1123
1125
  n.current = !1;
@@ -1156,9 +1158,9 @@ function ke(e) {
1156
1158
  let A = function(e) {
1157
1159
  let t = ke(e);
1158
1160
  return O.useCallback((...r) => t.current(...r), [t]);
1159
- }, qn = ie(void 0);
1160
- function Kn() {
1161
- return Z(qn);
1161
+ }, Kn = ie(void 0);
1162
+ function zn() {
1163
+ return Z(Kn);
1162
1164
  }
1163
1165
  function _t(...e) {
1164
1166
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
@@ -1171,13 +1173,13 @@ function we(e, t, ...r) {
1171
1173
  let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((l) => `"${l}"`).join(", ")}.`);
1172
1174
  throw Error.captureStackTrace && Error.captureStackTrace(n, we), n;
1173
1175
  }
1174
- var at = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(at || {}), ge = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ge || {});
1176
+ var ot = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(ot || {}), ge = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ge || {});
1175
1177
  function ae() {
1176
- let e = Gn();
1177
- return oe((t) => zn({ mergeRefs: e, ...t }), [e]);
1178
+ let e = Jn();
1179
+ return oe((t) => Gn({ mergeRefs: e, ...t }), [e]);
1178
1180
  }
1179
- function zn({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: l, visible: o = !0, name: s, mergeRefs: c }) {
1180
- c = c ?? Jn;
1181
+ function Gn({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: l, visible: o = !0, name: s, mergeRefs: c }) {
1182
+ c = c ?? Zn;
1181
1183
  let a = Sr(t, e);
1182
1184
  if (o) return nt(a, r, n, s, c);
1183
1185
  let d = l ?? 0;
@@ -1196,7 +1198,7 @@ function zn({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: l, v
1196
1198
  return nt(a, r, n, s, c);
1197
1199
  }
1198
1200
  function nt(e, t = {}, r, n, l) {
1199
- let { as: o = r, children: s, refName: c = "ref", ...a } = $t(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [c]: e.ref } : {}, u = typeof s == "function" ? s(t) : s;
1201
+ let { as: o = r, children: s, refName: c = "ref", ...a } = Ct(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [c]: e.ref } : {}, u = typeof s == "function" ? s(t) : s;
1200
1202
  "className" in a && a.className && typeof a.className == "function" && (a.className = a.className(t)), a["aria-labelledby"] && a["aria-labelledby"] === a.id && (a["aria-labelledby"] = void 0);
1201
1203
  let g = {};
1202
1204
  if (t) {
@@ -1213,13 +1215,13 @@ function nt(e, t = {}, r, n, l) {
1213
1215
  `)].join(`
1214
1216
  `));
1215
1217
  } else {
1216
- let E = u.props, w = E == null ? void 0 : E.className, y = typeof w == "function" ? (...p) => _t(w(...p), a.className) : _t(w, a.className), h = y ? { className: y } : {}, f = Sr(u.props, Se($t(a, ["ref"])));
1218
+ let E = u.props, w = E == null ? void 0 : E.className, y = typeof w == "function" ? (...p) => _t(w(...p), a.className) : _t(w, a.className), h = y ? { className: y } : {}, f = Sr(u.props, Se(Ct(a, ["ref"])));
1217
1219
  for (let p in g) p in f && delete g[p];
1218
- return Cn(u, Object.assign({}, f, g, d, { ref: l(Zn(u), d.ref) }, h));
1220
+ return Cn(u, Object.assign({}, f, g, d, { ref: l(Qn(u), d.ref) }, h));
1219
1221
  }
1220
- return Ct(o, Object.assign({}, $t(a, ["ref"]), o !== ue && d, o !== ue && g), u);
1222
+ return lt(o, Object.assign({}, Ct(a, ["ref"]), o !== ue && d, o !== ue && g), u);
1221
1223
  }
1222
- function Gn() {
1224
+ function Jn() {
1223
1225
  let e = j([]), t = oe((r) => {
1224
1226
  for (let n of e.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
1225
1227
  }, []);
@@ -1227,7 +1229,7 @@ function Gn() {
1227
1229
  if (!r.every((n) => n == null)) return e.current = r, t;
1228
1230
  };
1229
1231
  }
1230
- function Jn(...e) {
1232
+ function Zn(...e) {
1231
1233
  return e.every((t) => t == null) ? void 0 : (t) => {
1232
1234
  for (let r of e) r != null && (typeof r == "function" ? r(t) : r.current = t);
1233
1235
  };
@@ -1259,23 +1261,23 @@ function Se(e) {
1259
1261
  for (let r in t) t[r] === void 0 && delete t[r];
1260
1262
  return t;
1261
1263
  }
1262
- function $t(e, t = []) {
1264
+ function Ct(e, t = []) {
1263
1265
  let r = Object.assign({}, e);
1264
1266
  for (let n of t) n in r && delete r[n];
1265
1267
  return r;
1266
1268
  }
1267
- function Zn(e) {
1269
+ function Qn(e) {
1268
1270
  return O.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
1269
1271
  }
1270
- let Qn = "span";
1271
- var ot = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(ot || {});
1272
- function el(e, t) {
1272
+ let el = "span";
1273
+ var st = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(st || {});
1274
+ function tl(e, t) {
1273
1275
  var r;
1274
1276
  let { features: n = 1, ...l } = e, o = { ref: t, "aria-hidden": (n & 2) === 2 ? !0 : (r = l["aria-hidden"]) != null ? r : void 0, hidden: (n & 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", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
1275
- return ae()({ ourProps: o, theirProps: l, slot: {}, defaultTag: Qn, name: "Hidden" });
1277
+ return ae()({ ourProps: o, theirProps: l, slot: {}, defaultTag: el, name: "Hidden" });
1276
1278
  }
1277
- let Mt = Q(el), $r = Symbol();
1278
- function tl(e, t = !0) {
1279
+ let Mt = Q(tl), $r = Symbol();
1280
+ function rl(e, t = !0) {
1279
1281
  return Object.assign(e, { [$r]: t });
1280
1282
  }
1281
1283
  function ce(...e) {
@@ -1298,7 +1300,7 @@ function Cr() {
1298
1300
  }
1299
1301
  return e;
1300
1302
  }
1301
- function rl() {
1303
+ function nl() {
1302
1304
  let [e, t] = V([]);
1303
1305
  return [e.length > 0 ? e.join(" ") : void 0, B(() => function(r) {
1304
1306
  let n = A((o) => (t((s) => [...s, o]), () => t((s) => {
@@ -1308,21 +1310,21 @@ function rl() {
1308
1310
  return O.createElement(Bt.Provider, { value: l }, r.children);
1309
1311
  }, [t])];
1310
1312
  }
1311
- let nl = "p";
1312
- function ll(e, t) {
1313
- let r = Je(), n = Kn(), { id: l = `headlessui-description-${r}`, ...o } = e, s = Cr(), c = ce(t);
1313
+ let ll = "p";
1314
+ function il(e, t) {
1315
+ let r = Je(), n = zn(), { id: l = `headlessui-description-${r}`, ...o } = e, s = Cr(), c = ce(t);
1314
1316
  z(() => s.register(l), [l, s.register]);
1315
1317
  let a = n || !1, d = B(() => ({ ...s.slot, disabled: a }), [s.slot, a]), u = { ref: c, ...s.props, id: l };
1316
- return ae()({ ourProps: u, theirProps: o, slot: d, defaultTag: nl, name: s.name || "Description" });
1318
+ return ae()({ ourProps: u, theirProps: o, slot: d, defaultTag: ll, name: s.name || "Description" });
1317
1319
  }
1318
- let il = Q(ll), al = Object.assign(il, {});
1320
+ let al = Q(il), ol = Object.assign(al, {});
1319
1321
  var Fr = ((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))(Fr || {});
1320
- let ol = ie(() => {
1322
+ let sl = ie(() => {
1321
1323
  });
1322
- function sl({ value: e, children: t }) {
1323
- return O.createElement(ol.Provider, { value: e }, t);
1324
+ function ul({ value: e, children: t }) {
1325
+ return O.createElement(sl.Provider, { value: e }, t);
1324
1326
  }
1325
- let ul = class extends Map {
1327
+ let cl = class extends Map {
1326
1328
  constructor(t) {
1327
1329
  super(), this.factory = t;
1328
1330
  }
@@ -1345,7 +1347,7 @@ function kr(e, t) {
1345
1347
  function jr(e) {
1346
1348
  return Fn(e.subscribe, e.getSnapshot, e.getSnapshot);
1347
1349
  }
1348
- let cl = new ul(() => kr(() => [], { ADD(e) {
1350
+ let dl = new cl(() => kr(() => [], { ADD(e) {
1349
1351
  return this.includes(e) ? this : [...this, e];
1350
1352
  }, REMOVE(e) {
1351
1353
  let t = this.indexOf(e);
@@ -1354,7 +1356,7 @@ let cl = new ul(() => kr(() => [], { ADD(e) {
1354
1356
  return r.splice(t, 1), r;
1355
1357
  } }));
1356
1358
  function Ae(e, t) {
1357
- let r = cl.get(t), n = Je(), l = jr(r);
1359
+ let r = dl.get(t), n = Je(), l = jr(r);
1358
1360
  if (z(() => {
1359
1361
  if (e) return r.dispatch("ADD", n), () => r.dispatch("REMOVE", n);
1360
1362
  }, [r, e]), !e) return !1;
@@ -1374,7 +1376,7 @@ function fr(e) {
1374
1376
  let n = At.get(e);
1375
1377
  n && (n["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", n["aria-hidden"]), e.inert = n.inert, At.delete(e));
1376
1378
  }
1377
- function dl(e, { allowed: t, disallowed: r } = {}) {
1379
+ function fl(e, { allowed: t, disallowed: r } = {}) {
1378
1380
  let n = Ae(e, "inert-others");
1379
1381
  z(() => {
1380
1382
  var l, o;
@@ -1384,7 +1386,7 @@ function dl(e, { allowed: t, disallowed: r } = {}) {
1384
1386
  let c = (o = t == null ? void 0 : t()) != null ? o : [];
1385
1387
  for (let a of c) {
1386
1388
  if (!a) continue;
1387
- let d = ft(a);
1389
+ let d = pt(a);
1388
1390
  if (!d) continue;
1389
1391
  let u = a.parentElement;
1390
1392
  for (; u && u !== d.body; ) {
@@ -1395,7 +1397,7 @@ function dl(e, { allowed: t, disallowed: r } = {}) {
1395
1397
  return s.dispose;
1396
1398
  }, [n, t, r]);
1397
1399
  }
1398
- function fl(e, t, r) {
1400
+ function pl(e, t, r) {
1399
1401
  let n = ke((l) => {
1400
1402
  let o = l.getBoundingClientRect();
1401
1403
  o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && r();
@@ -1416,29 +1418,29 @@ function fl(e, t, r) {
1416
1418
  return () => o.dispose();
1417
1419
  }, [t, n, e]);
1418
1420
  }
1419
- let st = ["[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(","), pl = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
1420
- var pe = ((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))(pe || {}), Lt = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Lt || {}), ml = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(ml || {});
1421
- function vl(e = document.body) {
1422
- return e == null ? [] : Array.from(e.querySelectorAll(st)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
1423
- }
1421
+ let ut = ["[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(","), ml = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
1422
+ var pe = ((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))(pe || {}), Lt = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Lt || {}), vl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(vl || {});
1424
1423
  function hl(e = document.body) {
1425
- return e == null ? [] : Array.from(e.querySelectorAll(pl)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
1424
+ return e == null ? [] : Array.from(e.querySelectorAll(ut)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
1425
+ }
1426
+ function gl(e = document.body) {
1427
+ return e == null ? [] : Array.from(e.querySelectorAll(ml)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
1426
1428
  }
1427
1429
  var _r = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(_r || {});
1428
- function gl(e, t = 0) {
1430
+ function wl(e, t = 0) {
1429
1431
  var r;
1430
- return e === ((r = ft(e)) == null ? void 0 : r.body) ? !1 : we(t, { 0() {
1431
- return e.matches(st);
1432
+ return e === ((r = pt(e)) == null ? void 0 : r.body) ? !1 : we(t, { 0() {
1433
+ return e.matches(ut);
1432
1434
  }, 1() {
1433
1435
  let n = e;
1434
1436
  for (; n !== null; ) {
1435
- if (n.matches(st)) return !0;
1437
+ if (n.matches(ut)) return !0;
1436
1438
  n = n.parentElement;
1437
1439
  }
1438
1440
  return !1;
1439
1441
  } });
1440
1442
  }
1441
- var wl = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(wl || {});
1443
+ var yl = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(yl || {});
1442
1444
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
1443
1445
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
1444
1446
  }, !0), document.addEventListener("click", (e) => {
@@ -1447,12 +1449,12 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
1447
1449
  function me(e) {
1448
1450
  e == null || e.focus({ preventScroll: !0 });
1449
1451
  }
1450
- let yl = ["textarea", "input"].join(",");
1451
- function bl(e) {
1452
+ let bl = ["textarea", "input"].join(",");
1453
+ function El(e) {
1452
1454
  var t, r;
1453
- return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, yl)) != null ? r : !1;
1455
+ return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, bl)) != null ? r : !1;
1454
1456
  }
1455
- function El(e, t = (r) => r) {
1457
+ function xl(e, t = (r) => r) {
1456
1458
  return e.slice().sort((r, n) => {
1457
1459
  let l = t(r), o = t(n);
1458
1460
  if (l === null || o === null) return 0;
@@ -1461,7 +1463,7 @@ function El(e, t = (r) => r) {
1461
1463
  });
1462
1464
  }
1463
1465
  function Ge(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: l = [] } = {}) {
1464
- let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, s = Array.isArray(e) ? r ? El(e) : e : t & 64 ? hl(e) : vl(e);
1466
+ let o = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, s = Array.isArray(e) ? r ? xl(e) : e : t & 64 ? gl(e) : hl(e);
1465
1467
  l.length > 0 && s.length > 1 && (s = s.filter((w) => !l.some((y) => y != null && "current" in y ? (y == null ? void 0 : y.current) === w : y === w))), n = n ?? o.activeElement;
1466
1468
  let c = (() => {
1467
1469
  if (t & 5) return 1;
@@ -1484,16 +1486,16 @@ function Ge(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: l = [] }
1484
1486
  }
1485
1487
  E = s[w], E == null || E.focus(d), u += c;
1486
1488
  } while (E !== o.activeElement);
1487
- return t & 6 && bl(E) && E.select(), 2;
1489
+ return t & 6 && El(E) && E.select(), 2;
1488
1490
  }
1489
1491
  function Mr() {
1490
1492
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
1491
1493
  }
1492
- function xl() {
1494
+ function Tl() {
1493
1495
  return /Android/gi.test(window.navigator.userAgent);
1494
1496
  }
1495
- function Tl() {
1496
- return Mr() || xl();
1497
+ function Ol() {
1498
+ return Mr() || Tl();
1497
1499
  }
1498
1500
  function Ve(e, t, r, n) {
1499
1501
  let l = ke(r);
@@ -1516,7 +1518,7 @@ function Ar(e, t, r, n) {
1516
1518
  }, [e, t, n]);
1517
1519
  }
1518
1520
  const pr = 30;
1519
- function Ol(e, t, r) {
1521
+ function Pl(e, t, r) {
1520
1522
  let n = Ae(e, "outside-click"), l = ke(r), o = oe(function(a, d) {
1521
1523
  if (a.defaultPrevented) return;
1522
1524
  let u = d(a);
@@ -1525,7 +1527,7 @@ function Ol(e, t, r) {
1525
1527
  return typeof w == "function" ? E(w()) : Array.isArray(w) || w instanceof Set ? w : [w];
1526
1528
  }(t);
1527
1529
  for (let E of g) if (E !== null && (E.contains(u) || a.composed && a.composedPath().includes(E))) return;
1528
- return !gl(u, _r.Loose) && u.tabIndex !== -1 && a.preventDefault(), l.current(a, u);
1530
+ return !wl(u, _r.Loose) && u.tabIndex !== -1 && a.preventDefault(), l.current(a, u);
1529
1531
  }, [l, t]), s = j(null);
1530
1532
  Ve(n, "pointerdown", (a) => {
1531
1533
  var d, u;
@@ -1534,7 +1536,7 @@ function Ol(e, t, r) {
1534
1536
  var d, u;
1535
1537
  s.current = ((u = (d = a.composedPath) == null ? void 0 : d.call(a)) == null ? void 0 : u[0]) || a.target;
1536
1538
  }, !0), Ve(n, "click", (a) => {
1537
- Tl() || s.current && (o(a, () => s.current), s.current = null);
1539
+ Ol() || s.current && (o(a, () => s.current), s.current = null);
1538
1540
  }, !0);
1539
1541
  let c = j({ x: 0, y: 0 });
1540
1542
  Ve(n, "touchstart", (a) => {
@@ -1545,7 +1547,7 @@ function Ol(e, t, r) {
1545
1547
  }, !0), Ar(n, "blur", (a) => o(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
1546
1548
  }
1547
1549
  function Ze(...e) {
1548
- return B(() => ft(...e), [...e]);
1550
+ return B(() => pt(...e), [...e]);
1549
1551
  }
1550
1552
  function Lr(e, t, r, n) {
1551
1553
  let l = ke(r);
@@ -1568,7 +1570,7 @@ function Rl() {
1568
1570
  r.style(n, "paddingRight", `${o}px`);
1569
1571
  } };
1570
1572
  }
1571
- function Pl() {
1573
+ function Sl() {
1572
1574
  return Mr() ? { before({ doc: e, d: t, meta: r }) {
1573
1575
  function n(l) {
1574
1576
  return r.containers.flatMap((o) => o()).some((o) => o.contains(l));
@@ -1611,12 +1613,12 @@ function Pl() {
1611
1613
  });
1612
1614
  } } : {};
1613
1615
  }
1614
- function Sl() {
1616
+ function $l() {
1615
1617
  return { before({ doc: e, d: t }) {
1616
1618
  t.style(e.documentElement, "overflow", "hidden");
1617
1619
  } };
1618
1620
  }
1619
- function $l(e) {
1621
+ function Cl(e) {
1620
1622
  let t = {};
1621
1623
  for (let r of e) Object.assign(t, r(t));
1622
1624
  return t;
@@ -1629,7 +1631,7 @@ let Ce = kr(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
1629
1631
  let r = this.get(e);
1630
1632
  return r && (r.count--, r.meta.delete(t)), this;
1631
1633
  }, SCROLL_PREVENT({ doc: e, d: t, meta: r }) {
1632
- let n = { doc: e, d: t, meta: $l(r) }, l = [Pl(), Rl(), Sl()];
1634
+ let n = { doc: e, d: t, meta: Cl(r) }, l = [Sl(), Rl(), $l()];
1633
1635
  l.forEach(({ before: o }) => o == null ? void 0 : o(n)), l.forEach(({ after: o }) => o == null ? void 0 : o(n));
1634
1636
  }, SCROLL_ALLOW({ d: e }) {
1635
1637
  e.dispose();
@@ -1644,20 +1646,20 @@ Ce.subscribe(() => {
1644
1646
  (l && !n || !l && n) && Ce.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && Ce.dispatch("TEARDOWN", r);
1645
1647
  }
1646
1648
  });
1647
- function Cl(e, t, r = () => ({ containers: [] })) {
1649
+ function Fl(e, t, r = () => ({ containers: [] })) {
1648
1650
  let n = jr(Ce), l = t ? n.get(t) : void 0, o = l ? l.count > 0 : !1;
1649
1651
  return z(() => {
1650
1652
  if (!(!t || !e)) return Ce.dispatch("PUSH", t, r), () => Ce.dispatch("POP", t, r);
1651
1653
  }, [e, t]), o;
1652
1654
  }
1653
- function Fl(e, t, r = () => [document.body]) {
1655
+ function kl(e, t, r = () => [document.body]) {
1654
1656
  let n = Ae(e, "scroll-lock");
1655
- Cl(n, t, (l) => {
1657
+ Fl(n, t, (l) => {
1656
1658
  var o;
1657
1659
  return { containers: [...(o = l.containers) != null ? o : [], r] };
1658
1660
  });
1659
1661
  }
1660
- function kl(e = 0) {
1662
+ function jl(e = 0) {
1661
1663
  let [t, r] = V(e), n = oe((a) => r(a), [t]), l = oe((a) => r((d) => d | a), [t]), o = oe((a) => (t & a) === a, [t]), s = oe((a) => r((d) => d & ~a), [r]), c = oe((a) => r((d) => d ^ a), [r]);
1662
1664
  return { flags: t, setFlag: n, addFlag: l, hasFlag: o, removeFlag: s, toggleFlag: c };
1663
1665
  }
@@ -1666,14 +1668,14 @@ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((mr
1666
1668
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
1667
1669
  `)), [];
1668
1670
  });
1669
- var jl = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(jl || {});
1670
- function _l(e) {
1671
+ var _l = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(_l || {});
1672
+ function Ml(e) {
1671
1673
  let t = {};
1672
1674
  for (let r in e) e[r] === !0 && (t[`data-${r}`] = "");
1673
1675
  return t;
1674
1676
  }
1675
- function Ml(e, t, r, n) {
1676
- let [l, o] = V(r), { hasFlag: s, addFlag: c, removeFlag: a } = kl(e && l ? 3 : 0), d = j(!1), u = j(!1), g = Ht();
1677
+ function Al(e, t, r, n) {
1678
+ let [l, o] = V(r), { hasFlag: s, addFlag: c, removeFlag: a } = jl(e && l ? 3 : 0), d = j(!1), u = j(!1), g = Ht();
1677
1679
  return z(() => {
1678
1680
  var E;
1679
1681
  if (e) {
@@ -1681,7 +1683,7 @@ function Ml(e, t, r, n) {
1681
1683
  r && c(3);
1682
1684
  return;
1683
1685
  }
1684
- return (E = n == null ? void 0 : n.start) == null || E.call(n, r), Al(t, { inFlight: d, prepare() {
1686
+ return (E = n == null ? void 0 : n.start) == null || E.call(n, r), Ll(t, { inFlight: d, prepare() {
1685
1687
  u.current ? u.current = !1 : u.current = d.current, d.current = !0, !u.current && (r ? (c(3), a(4)) : (c(4), a(2)));
1686
1688
  }, run() {
1687
1689
  u.current ? r ? (a(3), c(4)) : (a(4), c(3)) : r ? a(1) : c(1);
@@ -1692,15 +1694,15 @@ function Ml(e, t, r, n) {
1692
1694
  }
1693
1695
  }, [e, r, t, g]), e ? [l, { closed: s(1), enter: s(2), leave: s(4), transition: s(2) || s(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1694
1696
  }
1695
- function Al(e, { prepare: t, run: r, done: n, inFlight: l }) {
1697
+ function Ll(e, { prepare: t, run: r, done: n, inFlight: l }) {
1696
1698
  let o = ye();
1697
- return Il(e, { prepare: t, inFlight: l }), o.nextFrame(() => {
1699
+ return Nl(e, { prepare: t, inFlight: l }), o.nextFrame(() => {
1698
1700
  r(), o.requestAnimationFrame(() => {
1699
- o.add(Ll(e, n));
1701
+ o.add(Il(e, n));
1700
1702
  });
1701
1703
  }), o.dispose;
1702
1704
  }
1703
- function Ll(e, t) {
1705
+ function Il(e, t) {
1704
1706
  var r, n;
1705
1707
  let l = ye();
1706
1708
  if (!e) return l.dispose;
@@ -1713,7 +1715,7 @@ function Ll(e, t) {
1713
1715
  o || t();
1714
1716
  }), l.dispose);
1715
1717
  }
1716
- function Il(e, { inFlight: t, prepare: r }) {
1718
+ function Nl(e, { inFlight: t, prepare: r }) {
1717
1719
  if (t != null && t.current) {
1718
1720
  r();
1719
1721
  return;
@@ -1731,61 +1733,61 @@ function Vt(e, t) {
1731
1733
  }
1732
1734
  }, [n, ...t]);
1733
1735
  }
1734
- let mt = ie(null);
1735
- mt.displayName = "OpenClosedContext";
1736
+ let vt = ie(null);
1737
+ vt.displayName = "OpenClosedContext";
1736
1738
  var se = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(se || {});
1737
- function vt() {
1738
- return Z(mt);
1739
+ function ht() {
1740
+ return Z(vt);
1739
1741
  }
1740
- function Nl({ value: e, children: t }) {
1741
- return O.createElement(mt.Provider, { value: e }, t);
1742
+ function Dl({ value: e, children: t }) {
1743
+ return O.createElement(vt.Provider, { value: e }, t);
1742
1744
  }
1743
- function Dl({ children: e }) {
1744
- return O.createElement(mt.Provider, { value: null }, e);
1745
+ function Wl({ children: e }) {
1746
+ return O.createElement(vt.Provider, { value: null }, e);
1745
1747
  }
1746
- function Wl(e) {
1748
+ function Ul(e) {
1747
1749
  function t() {
1748
1750
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
1749
1751
  }
1750
1752
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
1751
1753
  }
1752
1754
  let he = [];
1753
- Wl(() => {
1755
+ Ul(() => {
1754
1756
  function e(t) {
1755
1757
  if (!(t.target instanceof HTMLElement) || t.target === document.body || he[0] === t.target) return;
1756
1758
  let r = t.target;
1757
- r = r.closest(st), he.unshift(r ?? t.target), he = he.filter((n) => n != null && n.isConnected), he.splice(10);
1759
+ r = r.closest(ut), he.unshift(r ?? t.target), he = he.filter((n) => n != null && n.isConnected), he.splice(10);
1758
1760
  }
1759
1761
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
1760
1762
  });
1761
1763
  function Ir(e) {
1762
1764
  let t = A(e), r = j(!1);
1763
1765
  D(() => (r.current = !1, () => {
1764
- r.current = !0, pt(() => {
1766
+ r.current = !0, mt(() => {
1765
1767
  r.current && t();
1766
1768
  });
1767
1769
  }), [t]);
1768
1770
  }
1769
- function Ul() {
1771
+ function Hl() {
1770
1772
  let e = typeof document > "u";
1771
1773
  return "useSyncExternalStore" in qe ? ((t) => t.useSyncExternalStore)(qe)(() => () => {
1772
1774
  }, () => !1, () => !e) : !1;
1773
1775
  }
1774
1776
  function Qe() {
1775
- let e = Ul(), [t, r] = qe.useState(Fe.isHandoffComplete);
1777
+ let e = Hl(), [t, r] = qe.useState(Fe.isHandoffComplete);
1776
1778
  return t && Fe.isHandoffComplete === !1 && r(!1), qe.useEffect(() => {
1777
1779
  t !== !0 && r(!0);
1778
1780
  }, [t]), qe.useEffect(() => Fe.handoff(), []), e ? !1 : t;
1779
1781
  }
1780
1782
  let Nr = ie(!1);
1781
- function Hl() {
1783
+ function Bl() {
1782
1784
  return Z(Nr);
1783
1785
  }
1784
1786
  function hr(e) {
1785
1787
  return O.createElement(Nr.Provider, { value: e.force }, e.children);
1786
1788
  }
1787
- function Bl(e) {
1788
- let t = Hl(), r = Z(Wr), n = Ze(e), [l, o] = V(() => {
1789
+ function Vl(e) {
1790
+ let t = Bl(), r = Z(Wr), n = Ze(e), [l, o] = V(() => {
1789
1791
  var s;
1790
1792
  if (!t && r !== null) return (s = r.current) != null ? s : null;
1791
1793
  if (Fe.isServer) return null;
@@ -1801,10 +1803,10 @@ function Bl(e) {
1801
1803
  t || r !== null && o(r.current);
1802
1804
  }, [r, o, t]), l;
1803
1805
  }
1804
- let Dr = ue, Vl = Q(function(e, t) {
1805
- let r = e, n = j(null), l = ce(tl((g) => {
1806
+ let Dr = ue, Yl = Q(function(e, t) {
1807
+ let r = e, n = j(null), l = ce(rl((g) => {
1806
1808
  n.current = g;
1807
- }), t), o = Ze(n), s = Bl(n), [c] = V(() => {
1809
+ }), t), o = Ze(n), s = Vl(n), [c] = V(() => {
1808
1810
  var g;
1809
1811
  return Fe.isServer ? null : (g = o == null ? void 0 : o.createElement("div")) != null ? g : null;
1810
1812
  }), a = Z(It), d = Qe();
@@ -1819,17 +1821,17 @@ let Dr = ue, Vl = Q(function(e, t) {
1819
1821
  let u = ae();
1820
1822
  return d ? !s || !c ? null : An(u({ ourProps: { ref: l }, theirProps: r, slot: {}, defaultTag: Dr, name: "Portal" }), c) : null;
1821
1823
  });
1822
- function Yl(e, t) {
1824
+ function Xl(e, t) {
1823
1825
  let r = ce(t), { enabled: n = !0, ...l } = e, o = ae();
1824
- return n ? O.createElement(Vl, { ...l, ref: r }) : o({ ourProps: { ref: r }, theirProps: l, slot: {}, defaultTag: Dr, name: "Portal" });
1826
+ return n ? O.createElement(Yl, { ...l, ref: r }) : o({ ourProps: { ref: r }, theirProps: l, slot: {}, defaultTag: Dr, name: "Portal" });
1825
1827
  }
1826
- let Xl = ue, Wr = ie(null);
1827
- function ql(e, t) {
1828
+ let ql = ue, Wr = ie(null);
1829
+ function Kl(e, t) {
1828
1830
  let { target: r, ...n } = e, l = { ref: ce(t) }, o = ae();
1829
- return O.createElement(Wr.Provider, { value: r }, o({ ourProps: l, theirProps: n, defaultTag: Xl, name: "Popover.Group" }));
1831
+ return O.createElement(Wr.Provider, { value: r }, o({ ourProps: l, theirProps: n, defaultTag: ql, name: "Popover.Group" }));
1830
1832
  }
1831
1833
  let It = ie(null);
1832
- function Kl() {
1834
+ function zl() {
1833
1835
  let e = Z(It), t = j([]), r = A((o) => (t.current.push(o), e && e.register(o), () => n(o))), n = A((o) => {
1834
1836
  let s = t.current.indexOf(o);
1835
1837
  s !== -1 && t.current.splice(s, 1), e && e.unregister(o);
@@ -1838,14 +1840,14 @@ function Kl() {
1838
1840
  return O.createElement(It.Provider, { value: l }, o);
1839
1841
  }, [l])];
1840
1842
  }
1841
- let zl = Q(Yl), Ur = Q(ql), Gl = Object.assign(zl, { Group: Ur });
1842
- function Jl(e, t = typeof document < "u" ? document.defaultView : null, r) {
1843
+ let Gl = Q(Xl), Ur = Q(Kl), Jl = Object.assign(Gl, { Group: Ur });
1844
+ function Zl(e, t = typeof document < "u" ? document.defaultView : null, r) {
1843
1845
  let n = Ae(e, "escape");
1844
1846
  Lr(t, "keydown", (l) => {
1845
1847
  n && (l.defaultPrevented || l.key === Fr.Escape && r(l));
1846
1848
  });
1847
1849
  }
1848
- function Zl() {
1850
+ function Ql() {
1849
1851
  var e;
1850
1852
  let [t] = V(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [r, n] = V((e = t == null ? void 0 : t.matches) != null ? e : !1);
1851
1853
  return z(() => {
@@ -1856,7 +1858,7 @@ function Zl() {
1856
1858
  return t.addEventListener("change", l), () => t.removeEventListener("change", l);
1857
1859
  }, [t]), r;
1858
1860
  }
1859
- function Ql({ defaultContainers: e = [], portals: t, mainTreeNode: r } = {}) {
1861
+ function ei({ defaultContainers: e = [], portals: t, mainTreeNode: r } = {}) {
1860
1862
  let n = Ze(r), l = A(() => {
1861
1863
  var o, s;
1862
1864
  let c = [];
@@ -1870,10 +1872,10 @@ function Ql({ defaultContainers: e = [], portals: t, mainTreeNode: r } = {}) {
1870
1872
  let Hr = ie(null);
1871
1873
  function gr({ children: e, node: t }) {
1872
1874
  let [r, n] = V(null), l = Br(t ?? r);
1873
- return O.createElement(Hr.Provider, { value: l }, e, l === null && O.createElement(Mt, { features: ot.Hidden, ref: (o) => {
1875
+ return O.createElement(Hr.Provider, { value: l }, e, l === null && O.createElement(Mt, { features: st.Hidden, ref: (o) => {
1874
1876
  var s, c;
1875
1877
  if (o) {
1876
- for (let a of (c = (s = ft(o)) == null ? void 0 : s.querySelectorAll("html > *, body > *")) != null ? c : []) if (a !== document.body && a !== document.head && a instanceof HTMLElement && a != null && a.contains(o)) {
1878
+ for (let a of (c = (s = pt(o)) == null ? void 0 : s.querySelectorAll("html > *, body > *")) != null ? c : []) if (a !== document.body && a !== document.head && a instanceof HTMLElement && a != null && a.contains(o)) {
1877
1879
  n(a);
1878
1880
  break;
1879
1881
  }
@@ -1891,7 +1893,7 @@ function Yt() {
1891
1893
  }), []), e;
1892
1894
  }
1893
1895
  var Xe = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Xe || {});
1894
- function ei() {
1896
+ function ti() {
1895
1897
  let e = j(0);
1896
1898
  return Ar(!0, "keydown", (t) => {
1897
1899
  t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
@@ -1904,16 +1906,16 @@ function Vr(e) {
1904
1906
  for (let r of e.current) r.current instanceof HTMLElement && t.add(r.current);
1905
1907
  return t;
1906
1908
  }
1907
- let ti = "div";
1909
+ let ri = "div";
1908
1910
  var $e = ((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))($e || {});
1909
- function ri(e, t) {
1911
+ function ni(e, t) {
1910
1912
  let r = j(null), n = ce(r, t), { initialFocus: l, initialFocusFallback: o, containers: s, features: c = 15, ...a } = e;
1911
1913
  Qe() || (c = 0);
1912
1914
  let d = Ze(r);
1913
- ai(c, { ownerDocument: d });
1914
- let u = oi(c, { ownerDocument: d, container: r, initialFocus: l, initialFocusFallback: o });
1915
- si(c, { ownerDocument: d, container: r, containers: s, previousActiveElement: u });
1916
- let g = ei(), E = A((v) => {
1915
+ oi(c, { ownerDocument: d });
1916
+ let u = si(c, { ownerDocument: d, container: r, initialFocus: l, initialFocusFallback: o });
1917
+ ui(c, { ownerDocument: d, container: r, containers: s, previousActiveElement: u });
1918
+ let g = ti(), E = A((v) => {
1917
1919
  let x = r.current;
1918
1920
  x && ((T) => T())(() => {
1919
1921
  we(g.current, { [Xe.Forwards]: () => {
@@ -1933,13 +1935,13 @@ function ri(e, t) {
1933
1935
  let T = v.relatedTarget;
1934
1936
  T instanceof HTMLElement && T.dataset.headlessuiFocusGuard !== "true" && (Yr(x, T) || (h.current ? Ge(r.current, we(g.current, { [Xe.Forwards]: () => pe.Next, [Xe.Backwards]: () => pe.Previous }) | pe.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && me(v.target)));
1935
1937
  } }, p = ae();
1936
- return O.createElement(O.Fragment, null, w && O.createElement(Mt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: E, features: ot.Focusable }), p({ ourProps: f, theirProps: a, defaultTag: ti, name: "FocusTrap" }), w && O.createElement(Mt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: E, features: ot.Focusable }));
1938
+ return O.createElement(O.Fragment, null, w && O.createElement(Mt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: E, features: st.Focusable }), p({ ourProps: f, theirProps: a, defaultTag: ri, name: "FocusTrap" }), w && O.createElement(Mt, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: E, features: st.Focusable }));
1937
1939
  }
1938
- let ni = Q(ri), li = Object.assign(ni, { features: $e });
1939
- function ii(e = !0) {
1940
+ let li = Q(ni), ii = Object.assign(li, { features: $e });
1941
+ function ai(e = !0) {
1940
1942
  let t = j(he.slice());
1941
1943
  return Vt(([r], [n]) => {
1942
- n === !0 && r === !1 && pt(() => {
1944
+ n === !0 && r === !1 && mt(() => {
1943
1945
  t.current.splice(0);
1944
1946
  }), n === !1 && r === !0 && (t.current = he.slice());
1945
1947
  }, [e, he, t]), A(() => {
@@ -1947,15 +1949,15 @@ function ii(e = !0) {
1947
1949
  return (r = t.current.find((n) => n != null && n.isConnected)) != null ? r : null;
1948
1950
  });
1949
1951
  }
1950
- function ai(e, { ownerDocument: t }) {
1951
- let r = !!(e & 8), n = ii(r);
1952
+ function oi(e, { ownerDocument: t }) {
1953
+ let r = !!(e & 8), n = ai(r);
1952
1954
  Vt(() => {
1953
1955
  r || (t == null ? void 0 : t.activeElement) === (t == null ? void 0 : t.body) && me(n());
1954
1956
  }, [r]), Ir(() => {
1955
1957
  r && me(n());
1956
1958
  });
1957
1959
  }
1958
- function oi(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFallback: l }) {
1960
+ function si(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFallback: l }) {
1959
1961
  let o = j(null), s = Ae(!!(e & 1), "focus-trap#initial-focus"), c = Yt();
1960
1962
  return Vt(() => {
1961
1963
  if (e === 0) return;
@@ -1964,7 +1966,7 @@ function oi(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFa
1964
1966
  return;
1965
1967
  }
1966
1968
  let a = r.current;
1967
- a && pt(() => {
1969
+ a && mt(() => {
1968
1970
  if (!c.current) return;
1969
1971
  let d = t == null ? void 0 : t.activeElement;
1970
1972
  if (n != null && n.current) {
@@ -1988,7 +1990,7 @@ function oi(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFa
1988
1990
  });
1989
1991
  }, [l, s, e]), o;
1990
1992
  }
1991
- function si(e, { ownerDocument: t, container: r, containers: n, previousActiveElement: l }) {
1993
+ function ui(e, { ownerDocument: t, container: r, containers: n, previousActiveElement: l }) {
1992
1994
  let o = Yt(), s = !!(e & 4);
1993
1995
  Lr(t == null ? void 0 : t.defaultView, "focus", (c) => {
1994
1996
  if (!s || !o.current) return;
@@ -2008,23 +2010,23 @@ function Xr(e) {
2008
2010
  var t;
2009
2011
  return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Kr) !== ue || O.Children.count(e.children) === 1;
2010
2012
  }
2011
- let ht = ie(null);
2012
- ht.displayName = "TransitionContext";
2013
- var ui = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(ui || {});
2014
- function ci() {
2015
- let e = Z(ht);
2013
+ let gt = ie(null);
2014
+ gt.displayName = "TransitionContext";
2015
+ var ci = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(ci || {});
2016
+ function di() {
2017
+ let e = Z(gt);
2016
2018
  if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2017
2019
  return e;
2018
2020
  }
2019
- function di() {
2020
- let e = Z(gt);
2021
+ function fi() {
2022
+ let e = Z(wt);
2021
2023
  if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2022
2024
  return e;
2023
2025
  }
2024
- let gt = ie(null);
2025
- gt.displayName = "NestingContext";
2026
- function wt(e) {
2027
- return "children" in e ? wt(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
2026
+ let wt = ie(null);
2027
+ wt.displayName = "NestingContext";
2028
+ function yt(e) {
2029
+ return "children" in e ? yt(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
2028
2030
  }
2029
2031
  function qr(e, t) {
2030
2032
  let r = ke(e), n = j([]), l = Yt(), o = Ht(), s = A((w, y = ge.Hidden) => {
@@ -2035,7 +2037,7 @@ function qr(e, t) {
2035
2037
  n.current[h].state = "hidden";
2036
2038
  } }), o.microTask(() => {
2037
2039
  var f;
2038
- !wt(n) && l.current && ((f = r.current) == null || f.call(r));
2040
+ !yt(n) && l.current && ((f = r.current) == null || f.call(r));
2039
2041
  }));
2040
2042
  }), c = A((w) => {
2041
2043
  let y = n.current.find(({ el: h }) => h === w);
@@ -2054,10 +2056,10 @@ function qr(e, t) {
2054
2056
  });
2055
2057
  return B(() => ({ children: n, register: c, unregister: s, onStart: g, onStop: E, wait: d, chains: u }), [c, s, n, g, E, u, d]);
2056
2058
  }
2057
- let Kr = ue, zr = at.RenderStrategy;
2058
- function fi(e, t) {
2059
+ let Kr = ue, zr = ot.RenderStrategy;
2060
+ function pi(e, t) {
2059
2061
  var r, n;
2060
- let { transition: l = !0, beforeEnter: o, afterEnter: s, beforeLeave: c, afterLeave: a, enter: d, enterFrom: u, enterTo: g, entered: E, leave: w, leaveFrom: y, leaveTo: h, ...f } = e, [p, v] = V(null), x = j(null), T = Xr(e), F = ce(...T ? [x, t, v] : t === null ? [] : [t]), X = (r = f.unmount) == null || r ? ge.Unmount : ge.Hidden, { show: U, appear: ee, initial: te } = ci(), [H, q] = V(U ? "visible" : "hidden"), G = di(), { register: _, unregister: C } = G;
2062
+ let { transition: l = !0, beforeEnter: o, afterEnter: s, beforeLeave: c, afterLeave: a, enter: d, enterFrom: u, enterTo: g, entered: E, leave: w, leaveFrom: y, leaveTo: h, ...f } = e, [p, v] = V(null), x = j(null), T = Xr(e), F = ce(...T ? [x, t, v] : t === null ? [] : [t]), X = (r = f.unmount) == null || r ? ge.Unmount : ge.Hidden, { show: U, appear: ee, initial: te } = di(), [H, q] = V(U ? "visible" : "hidden"), G = fi(), { register: _, unregister: C } = G;
2061
2063
  z(() => _(x), [_, x]), z(() => {
2062
2064
  if (X === ge.Hidden && x.current) {
2063
2065
  if (U && H !== "visible") {
@@ -2073,30 +2075,30 @@ function fi(e, t) {
2073
2075
  }, [x, H, L, T]);
2074
2076
  let be = te && !ee, Ee = ee && U && te, ve = j(!1), re = qr(() => {
2075
2077
  ve.current || (q("hidden"), C(x));
2076
- }, G), xe = A((Re) => {
2078
+ }, G), xe = A((Pe) => {
2077
2079
  ve.current = !0;
2078
- let de = Re ? "enter" : "leave";
2080
+ let de = Pe ? "enter" : "leave";
2079
2081
  re.onStart(x, de, (fe) => {
2080
2082
  fe === "enter" ? o == null || o() : fe === "leave" && (c == null || c());
2081
2083
  });
2082
- }), I = A((Re) => {
2083
- let de = Re ? "enter" : "leave";
2084
+ }), I = A((Pe) => {
2085
+ let de = Pe ? "enter" : "leave";
2084
2086
  ve.current = !1, re.onStop(x, de, (fe) => {
2085
2087
  fe === "enter" ? s == null || s() : fe === "leave" && (a == null || a());
2086
- }), de === "leave" && !wt(re) && (q("hidden"), C(x));
2088
+ }), de === "leave" && !yt(re) && (q("hidden"), C(x));
2087
2089
  });
2088
2090
  D(() => {
2089
2091
  T && l || (xe(U), I(U));
2090
2092
  }, [U, T, l]);
2091
- let Te = !(!l || !T || !L || be), [, Y] = Ml(Te, p, U, { start: xe, end: I }), bt = Se({ ref: F, className: ((n = _t(f.className, Ee && d, Ee && u, Y.enter && d, Y.enter && Y.closed && u, Y.enter && !Y.closed && g, Y.leave && w, Y.leave && !Y.closed && y, Y.leave && Y.closed && h, !Y.transition && U && E)) == null ? void 0 : n.trim()) || void 0, ..._l(Y) }), Oe = 0;
2093
+ let Te = !(!l || !T || !L || be), [, Y] = Al(Te, p, U, { start: xe, end: I }), Et = Se({ ref: F, className: ((n = _t(f.className, Ee && d, Ee && u, Y.enter && d, Y.enter && Y.closed && u, Y.enter && !Y.closed && g, Y.leave && w, Y.leave && !Y.closed && y, Y.leave && Y.closed && h, !Y.transition && U && E)) == null ? void 0 : n.trim()) || void 0, ...Ml(Y) }), Oe = 0;
2092
2094
  H === "visible" && (Oe |= se.Open), H === "hidden" && (Oe |= se.Closed), Y.enter && (Oe |= se.Opening), Y.leave && (Oe |= se.Closing);
2093
2095
  let Ie = ae();
2094
- return O.createElement(gt.Provider, { value: re }, O.createElement(Nl, { value: Oe }, Ie({ ourProps: bt, theirProps: f, defaultTag: Kr, features: zr, visible: H === "visible", name: "Transition.Child" })));
2096
+ return O.createElement(wt.Provider, { value: re }, O.createElement(Dl, { value: Oe }, Ie({ ourProps: Et, theirProps: f, defaultTag: Kr, features: zr, visible: H === "visible", name: "Transition.Child" })));
2095
2097
  }
2096
- function pi(e, t) {
2098
+ function mi(e, t) {
2097
2099
  let { show: r, appear: n = !1, unmount: l = !0, ...o } = e, s = j(null), c = Xr(e), a = ce(...c ? [s, t] : t === null ? [] : [t]);
2098
2100
  Qe();
2099
- let d = vt();
2101
+ let d = ht();
2100
2102
  if (r === void 0 && d !== null && (r = (d & se.Open) === se.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
2101
2103
  let [u, g] = V(r ? "visible" : "hidden"), E = qr(() => {
2102
2104
  r || g("hidden");
@@ -2106,7 +2108,7 @@ function pi(e, t) {
2106
2108
  }, [h, r]);
2107
2109
  let f = B(() => ({ show: r, appear: n, initial: w }), [r, n, w]);
2108
2110
  z(() => {
2109
- r ? g("visible") : !wt(E) && s.current !== null && g("hidden");
2111
+ r ? g("visible") : !yt(E) && s.current !== null && g("hidden");
2110
2112
  }, [r, E]);
2111
2113
  let p = { unmount: l }, v = A(() => {
2112
2114
  var F;
@@ -2115,58 +2117,58 @@ function pi(e, t) {
2115
2117
  var F;
2116
2118
  w && y(!1), (F = e.beforeLeave) == null || F.call(e);
2117
2119
  }), T = ae();
2118
- return O.createElement(gt.Provider, { value: E }, O.createElement(ht.Provider, { value: f }, T({ ourProps: { ...p, as: ue, children: O.createElement(Gr, { ref: a, ...p, ...o, beforeEnter: v, beforeLeave: x }) }, theirProps: {}, defaultTag: ue, features: zr, visible: u === "visible", name: "Transition" })));
2120
+ return O.createElement(wt.Provider, { value: E }, O.createElement(gt.Provider, { value: f }, T({ ourProps: { ...p, as: ue, children: O.createElement(Gr, { ref: a, ...p, ...o, beforeEnter: v, beforeLeave: x }) }, theirProps: {}, defaultTag: ue, features: zr, visible: u === "visible", name: "Transition" })));
2119
2121
  }
2120
- function mi(e, t) {
2121
- let r = Z(ht) !== null, n = vt() !== null;
2122
+ function vi(e, t) {
2123
+ let r = Z(gt) !== null, n = ht() !== null;
2122
2124
  return O.createElement(O.Fragment, null, !r && n ? O.createElement(Nt, { ref: t, ...e }) : O.createElement(Gr, { ref: t, ...e }));
2123
2125
  }
2124
- let Nt = Q(pi), Gr = Q(fi), Le = Q(mi), Jr = Object.assign(Nt, { Child: Le, Root: Nt });
2125
- var vi = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(vi || {}), hi = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(hi || {});
2126
- let gi = { 0(e, t) {
2126
+ let Nt = Q(mi), Gr = Q(pi), Le = Q(vi), Jr = Object.assign(Nt, { Child: Le, Root: Nt });
2127
+ var hi = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(hi || {}), gi = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(gi || {});
2128
+ let wi = { 0(e, t) {
2127
2129
  return e.titleId === t.id ? e : { ...e, titleId: t.id };
2128
2130
  } }, Xt = ie(null);
2129
2131
  Xt.displayName = "DialogContext";
2130
- function yt(e) {
2132
+ function bt(e) {
2131
2133
  let t = Z(Xt);
2132
2134
  if (t === null) {
2133
2135
  let r = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
2134
- throw Error.captureStackTrace && Error.captureStackTrace(r, yt), r;
2136
+ throw Error.captureStackTrace && Error.captureStackTrace(r, bt), r;
2135
2137
  }
2136
2138
  return t;
2137
2139
  }
2138
- function wi(e, t) {
2139
- return we(t.type, gi, e, t);
2140
+ function yi(e, t) {
2141
+ return we(t.type, wi, e, t);
2140
2142
  }
2141
2143
  let wr = Q(function(e, t) {
2142
2144
  let r = Je(), { id: n = `headlessui-dialog-${r}`, open: l, onClose: o, initialFocus: s, role: c = "dialog", autoFocus: a = !0, __demoMode: d = !1, unmount: u = !1, ...g } = e, E = j(!1);
2143
2145
  c = function() {
2144
2146
  return c === "dialog" || c === "alertdialog" ? c : (E.current || (E.current = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
2145
2147
  }();
2146
- let w = vt();
2148
+ let w = ht();
2147
2149
  l === void 0 && w !== null && (l = (w & se.Open) === se.Open);
2148
- let y = j(null), h = ce(y, t), f = Ze(y), p = l ? 0 : 1, [v, x] = kn(wi, { titleId: null, descriptionId: null, panelRef: jn() }), T = A(() => o(!1)), F = A((I) => x({ type: 0, id: I })), X = Qe() ? p === 0 : !1, [U, ee] = Kl(), te = { get current() {
2150
+ let y = j(null), h = ce(y, t), f = Ze(y), p = l ? 0 : 1, [v, x] = kn(yi, { titleId: null, descriptionId: null, panelRef: jn() }), T = A(() => o(!1)), F = A((I) => x({ type: 0, id: I })), X = Qe() ? p === 0 : !1, [U, ee] = zl(), te = { get current() {
2149
2151
  var I;
2150
2152
  return (I = v.panelRef.current) != null ? I : y.current;
2151
- } }, H = Br(), { resolveContainers: q } = Ql({ mainTreeNode: H, portals: U, defaultContainers: [te] }), G = w !== null ? (w & se.Closing) === se.Closing : !1;
2152
- dl(d || G ? !1 : X, { allowed: A(() => {
2153
+ } }, H = Br(), { resolveContainers: q } = ei({ mainTreeNode: H, portals: U, defaultContainers: [te] }), G = w !== null ? (w & se.Closing) === se.Closing : !1;
2154
+ fl(d || G ? !1 : X, { allowed: A(() => {
2153
2155
  var I, Te;
2154
2156
  return [(Te = (I = y.current) == null ? void 0 : I.closest("[data-headlessui-portal]")) != null ? Te : null];
2155
2157
  }), disallowed: A(() => {
2156
2158
  var I;
2157
2159
  return [(I = H == null ? void 0 : H.closest("body > *:not(#headlessui-portal-root)")) != null ? I : null];
2158
- }) }), Ol(X, q, (I) => {
2160
+ }) }), Pl(X, q, (I) => {
2159
2161
  I.preventDefault(), T();
2160
- }), Jl(X, f == null ? void 0 : f.defaultView, (I) => {
2162
+ }), Zl(X, f == null ? void 0 : f.defaultView, (I) => {
2161
2163
  I.preventDefault(), I.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), T();
2162
- }), Fl(d || G ? !1 : X, f, q), fl(X, y, T);
2163
- let [_, C] = rl(), L = B(() => [{ dialogState: p, close: T, setTitleId: F, unmount: u }, v], [p, v, T, F, u]), be = B(() => ({ open: p === 0 }), [p]), Ee = { ref: h, id: n, role: c, tabIndex: -1, "aria-modal": d ? void 0 : p === 0 ? !0 : void 0, "aria-labelledby": v.titleId, "aria-describedby": _, unmount: u }, ve = !Zl(), re = $e.None;
2164
+ }), kl(d || G ? !1 : X, f, q), pl(X, y, T);
2165
+ let [_, C] = nl(), L = B(() => [{ dialogState: p, close: T, setTitleId: F, unmount: u }, v], [p, v, T, F, u]), be = B(() => ({ open: p === 0 }), [p]), Ee = { ref: h, id: n, role: c, tabIndex: -1, "aria-modal": d ? void 0 : p === 0 ? !0 : void 0, "aria-labelledby": v.titleId, "aria-describedby": _, unmount: u }, ve = !Ql(), re = $e.None;
2164
2166
  X && !d && (re |= $e.RestoreFocus, re |= $e.TabLock, a && (re |= $e.AutoFocus), ve && (re |= $e.InitialFocus));
2165
2167
  let xe = ae();
2166
- return O.createElement(Dl, null, O.createElement(hr, { force: !0 }, O.createElement(Gl, null, O.createElement(Xt.Provider, { value: L }, O.createElement(Ur, { target: y }, O.createElement(hr, { force: !1 }, O.createElement(C, { slot: be }, O.createElement(ee, null, O.createElement(li, { initialFocus: s, initialFocusFallback: y, containers: q, features: re }, O.createElement(sl, { value: T }, xe({ ourProps: Ee, theirProps: g, slot: be, defaultTag: yi, features: bi, visible: p === 0, name: "Dialog" })))))))))));
2167
- }), yi = "div", bi = at.RenderStrategy | at.Static;
2168
- function Ei(e, t) {
2169
- let { transition: r = !1, open: n, ...l } = e, o = vt(), s = e.hasOwnProperty("open") || o !== null, c = e.hasOwnProperty("onClose");
2168
+ return O.createElement(Wl, null, O.createElement(hr, { force: !0 }, O.createElement(Jl, null, O.createElement(Xt.Provider, { value: L }, O.createElement(Ur, { target: y }, O.createElement(hr, { force: !1 }, O.createElement(C, { slot: be }, O.createElement(ee, null, O.createElement(ii, { initialFocus: s, initialFocusFallback: y, containers: q, features: re }, O.createElement(ul, { value: T }, xe({ ourProps: Ee, theirProps: g, slot: be, defaultTag: bi, features: Ei, visible: p === 0, name: "Dialog" })))))))))));
2169
+ }), bi = "div", Ei = ot.RenderStrategy | ot.Static;
2170
+ function xi(e, t) {
2171
+ let { transition: r = !1, open: n, ...l } = e, o = ht(), s = e.hasOwnProperty("open") || o !== null, c = e.hasOwnProperty("onClose");
2170
2172
  if (!s && !c) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
2171
2173
  if (!s) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
2172
2174
  if (!c) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
@@ -2174,38 +2176,38 @@ function Ei(e, t) {
2174
2176
  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}`);
2175
2177
  return (n !== void 0 || r) && !l.static ? O.createElement(gr, null, O.createElement(Jr, { show: n, transition: r, unmount: l.unmount }, O.createElement(wr, { ref: t, ...l }))) : O.createElement(gr, null, O.createElement(wr, { ref: t, open: n, ...l }));
2176
2178
  }
2177
- let xi = "div";
2178
- function Ti(e, t) {
2179
- let r = Je(), { id: n = `headlessui-dialog-panel-${r}`, transition: l = !1, ...o } = e, [{ dialogState: s, unmount: c }, a] = yt("Dialog.Panel"), d = ce(t, a.panelRef), u = B(() => ({ open: s === 0 }), [s]), g = A((f) => {
2179
+ let Ti = "div";
2180
+ function Oi(e, t) {
2181
+ let r = Je(), { id: n = `headlessui-dialog-panel-${r}`, transition: l = !1, ...o } = e, [{ dialogState: s, unmount: c }, a] = bt("Dialog.Panel"), d = ce(t, a.panelRef), u = B(() => ({ open: s === 0 }), [s]), g = A((f) => {
2180
2182
  f.stopPropagation();
2181
2183
  }), E = { ref: d, id: n, onClick: g }, w = l ? Le : ue, y = l ? { unmount: c } : {}, h = ae();
2182
- return O.createElement(w, { ...y }, h({ ourProps: E, theirProps: o, slot: u, defaultTag: xi, name: "Dialog.Panel" }));
2184
+ return O.createElement(w, { ...y }, h({ ourProps: E, theirProps: o, slot: u, defaultTag: Ti, name: "Dialog.Panel" }));
2183
2185
  }
2184
- let Oi = "div";
2186
+ let Pi = "div";
2185
2187
  function Ri(e, t) {
2186
- let { transition: r = !1, ...n } = e, [{ dialogState: l, unmount: o }] = yt("Dialog.Backdrop"), s = B(() => ({ open: l === 0 }), [l]), c = { ref: t, "aria-hidden": !0 }, a = r ? Le : ue, d = r ? { unmount: o } : {}, u = ae();
2187
- return O.createElement(a, { ...d }, u({ ourProps: c, theirProps: n, slot: s, defaultTag: Oi, name: "Dialog.Backdrop" }));
2188
+ let { transition: r = !1, ...n } = e, [{ dialogState: l, unmount: o }] = bt("Dialog.Backdrop"), s = B(() => ({ open: l === 0 }), [l]), c = { ref: t, "aria-hidden": !0 }, a = r ? Le : ue, d = r ? { unmount: o } : {}, u = ae();
2189
+ return O.createElement(a, { ...d }, u({ ourProps: c, theirProps: n, slot: s, defaultTag: Pi, name: "Dialog.Backdrop" }));
2188
2190
  }
2189
- let Pi = "h2";
2190
- function Si(e, t) {
2191
- let r = Je(), { id: n = `headlessui-dialog-title-${r}`, ...l } = e, [{ dialogState: o, setTitleId: s }] = yt("Dialog.Title"), c = ce(t);
2191
+ let Si = "h2";
2192
+ function $i(e, t) {
2193
+ let r = Je(), { id: n = `headlessui-dialog-title-${r}`, ...l } = e, [{ dialogState: o, setTitleId: s }] = bt("Dialog.Title"), c = ce(t);
2192
2194
  D(() => (s(n), () => s(null)), [n, s]);
2193
2195
  let a = B(() => ({ open: o === 0 }), [o]), d = { ref: c, id: n };
2194
- return ae()({ ourProps: d, theirProps: l, slot: a, defaultTag: Pi, name: "Dialog.Title" });
2196
+ return ae()({ ourProps: d, theirProps: l, slot: a, defaultTag: Si, name: "Dialog.Title" });
2195
2197
  }
2196
- let $i = Q(Ei), qt = Q(Ti);
2198
+ let Ci = Q(xi), qt = Q(Oi);
2197
2199
  Q(Ri);
2198
- let Ci = Q(Si), Fi = Object.assign($i, { Panel: qt, Title: Ci, Description: al });
2200
+ let Fi = Q($i), ki = Object.assign(Ci, { Panel: qt, Title: Fi, Description: ol });
2199
2201
  function Zr({ onClick: e }) {
2200
- return /* @__PURE__ */ P.jsxs(
2202
+ return /* @__PURE__ */ R.jsxs(
2201
2203
  "button",
2202
2204
  {
2203
2205
  type: "button",
2204
2206
  className: "im-close-button text-gray-400 hover:text-gray-500",
2205
2207
  onClick: e,
2206
2208
  children: [
2207
- /* @__PURE__ */ P.jsx("span", { className: "sr-only", children: "Close" }),
2208
- /* @__PURE__ */ P.jsx(
2209
+ /* @__PURE__ */ R.jsx("span", { className: "sr-only", children: "Close" }),
2210
+ /* @__PURE__ */ R.jsx(
2209
2211
  "svg",
2210
2212
  {
2211
2213
  className: "size-6",
@@ -2215,7 +2217,7 @@ function Zr({ onClick: e }) {
2215
2217
  strokeWidth: "2",
2216
2218
  stroke: "currentColor",
2217
2219
  "aria-hidden": "true",
2218
- children: /* @__PURE__ */ P.jsx(
2220
+ children: /* @__PURE__ */ R.jsx(
2219
2221
  "path",
2220
2222
  {
2221
2223
  strokeLinecap: "round",
@@ -2229,15 +2231,15 @@ function Zr({ onClick: e }) {
2229
2231
  }
2230
2232
  );
2231
2233
  }
2232
- const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ P.jsx(
2234
+ const ji = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ R.jsx(
2233
2235
  "div",
2234
2236
  {
2235
- className: it("im-modal-positioner flex min-h-full justify-center", {
2237
+ className: at("im-modal-positioner flex min-h-full justify-center", {
2236
2238
  "items-start": t.position === "top",
2237
2239
  "items-center": t.position === "center",
2238
2240
  "items-end": t.position === "bottom"
2239
2241
  }),
2240
- children: /* @__PURE__ */ P.jsx(
2242
+ children: /* @__PURE__ */ R.jsx(
2241
2243
  Le,
2242
2244
  {
2243
2245
  enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -2245,7 +2247,7 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2245
2247
  leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
2246
2248
  leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2247
2249
  afterLeave: e.afterLeave,
2248
- className: it("im-modal-wrapper w-full transition duration-300 ease-in-out", e.onTopOfStack ? "" : "blur-sm", {
2250
+ className: at("im-modal-wrapper w-full transition duration-300 ease-in-out", e.onTopOfStack ? "" : "blur-sm", {
2249
2251
  "sm:max-w-sm": t.maxWidth === "sm",
2250
2252
  "sm:max-w-md": t.maxWidth === "md",
2251
2253
  "sm:max-w-md md:max-w-lg": t.maxWidth === "lg",
@@ -2257,21 +2259,21 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2257
2259
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.maxWidth === "6xl",
2258
2260
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
2259
2261
  }),
2260
- children: /* @__PURE__ */ P.jsxs(qt, { className: `im-modal-content relative ${t.paddingClasses} ${t.panelClasses}`, children: [
2261
- t.closeButton && /* @__PURE__ */ P.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ P.jsx(Zr, { onClick: e.close }) }),
2262
+ children: /* @__PURE__ */ R.jsxs(qt, { className: `im-modal-content relative ${t.paddingClasses} ${t.panelClasses}`, children: [
2263
+ t.closeButton && /* @__PURE__ */ R.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ R.jsx(Zr, { onClick: e.close }) }),
2262
2264
  typeof r == "function" ? r({ modalContext: e, config: t }) : r
2263
2265
  ] })
2264
2266
  }
2265
2267
  )
2266
2268
  }
2267
- ) }), ji = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ P.jsx(
2269
+ ) }), _i = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ R.jsx(
2268
2270
  "div",
2269
2271
  {
2270
- className: it("im-slideover-positioner flex min-h-full items-center", {
2272
+ className: at("im-slideover-positioner flex min-h-full items-center", {
2271
2273
  "justify-start": t.position === "left",
2272
2274
  "justify-end": t.position === "right"
2273
2275
  }),
2274
- children: /* @__PURE__ */ P.jsx(
2276
+ children: /* @__PURE__ */ R.jsx(
2275
2277
  Le,
2276
2278
  {
2277
2279
  enterFrom: `opacity-0 ${t.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
@@ -2279,7 +2281,7 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2279
2281
  leaveFrom: "opacity-100 translate-x-0",
2280
2282
  leaveTo: `opacity-0 ${t.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
2281
2283
  afterLeave: e.afterLeave,
2282
- className: it("im-slideover-wrapper w-full transition duration-300 ease-in-out", e.onTopOfStack ? "" : "blur-sm", {
2284
+ className: at("im-slideover-wrapper w-full transition duration-300 ease-in-out", e.onTopOfStack ? "" : "blur-sm", {
2283
2285
  "sm:max-w-sm": t.maxWidth === "sm",
2284
2286
  "sm:max-w-md": t.maxWidth === "md",
2285
2287
  "sm:max-w-md md:max-w-lg": t.maxWidth === "lg",
@@ -2291,17 +2293,17 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2291
2293
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.maxWidth === "6xl",
2292
2294
  "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.maxWidth === "7xl"
2293
2295
  }),
2294
- children: /* @__PURE__ */ P.jsxs(qt, { className: `im-slideover-content relative ${t.paddingClasses} ${t.panelClasses}`, children: [
2295
- t.closeButton && /* @__PURE__ */ P.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ P.jsx(Zr, { onClick: e.close }) }),
2296
+ children: /* @__PURE__ */ R.jsxs(qt, { className: `im-slideover-content relative ${t.paddingClasses} ${t.panelClasses}`, children: [
2297
+ t.closeButton && /* @__PURE__ */ R.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ R.jsx(Zr, { onClick: e.close }) }),
2296
2298
  typeof r == "function" ? r({ modalContext: e, config: t }) : r
2297
2299
  ] })
2298
2300
  }
2299
2301
  )
2300
2302
  }
2301
- ) }), _i = Dt(({ name: e, children: t, ...r }, n) => {
2303
+ ) }), Mi = Dt(({ name: e, children: t, ...r }, n) => {
2302
2304
  const l = (s) => typeof t == "function" ? t(s) : t, o = j(null);
2303
- return yr(n, () => o.current, [o]), /* @__PURE__ */ P.jsx(
2304
- Rr,
2305
+ return yr(n, () => o.current, [o]), /* @__PURE__ */ R.jsx(
2306
+ Pr,
2305
2307
  {
2306
2308
  ref: o,
2307
2309
  name: e,
@@ -2321,13 +2323,13 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2321
2323
  reload: p,
2322
2324
  setOpen: v,
2323
2325
  shouldRender: x
2324
- }) => /* @__PURE__ */ P.jsx(
2326
+ }) => /* @__PURE__ */ R.jsx(
2325
2327
  Jr,
2326
2328
  {
2327
2329
  appear: !0,
2328
2330
  show: y ?? !1,
2329
- children: /* @__PURE__ */ P.jsxs(
2330
- Fi,
2331
+ children: /* @__PURE__ */ R.jsxs(
2332
+ ki,
2331
2333
  {
2332
2334
  as: "div",
2333
2335
  className: "im-dialog relative z-20",
@@ -2335,7 +2337,7 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2335
2337
  "data-inertiaui-modal-id": E,
2336
2338
  "data-inertiaui-modal-index": w,
2337
2339
  children: [
2338
- w === 0 ? /* @__PURE__ */ P.jsx(
2340
+ w === 0 ? /* @__PURE__ */ R.jsx(
2339
2341
  Le,
2340
2342
  {
2341
2343
  enter: "transition transform ease-in-out duration-300",
@@ -2344,18 +2346,18 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2344
2346
  leave: "transition transform ease-in-out duration-300",
2345
2347
  leaveFrom: "opacity-100",
2346
2348
  leaveTo: "opacity-0",
2347
- children: f ? /* @__PURE__ */ P.jsx(
2349
+ children: f ? /* @__PURE__ */ R.jsx(
2348
2350
  "div",
2349
2351
  {
2350
2352
  className: "im-backdrop fixed inset-0 z-30 bg-black/75",
2351
2353
  "aria-hidden": "true"
2352
2354
  }
2353
- ) : /* @__PURE__ */ P.jsx("div", {})
2355
+ ) : /* @__PURE__ */ R.jsx("div", {})
2354
2356
  }
2355
2357
  ) : null,
2356
- w > 0 && f ? /* @__PURE__ */ P.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
2357
- a.slideover ? /* @__PURE__ */ P.jsx(
2358
- ji,
2358
+ w > 0 && f ? /* @__PURE__ */ R.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
2359
+ a.slideover ? /* @__PURE__ */ R.jsx(
2360
+ _i,
2359
2361
  {
2360
2362
  modalContext: h,
2361
2363
  config: a,
@@ -2376,8 +2378,8 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2376
2378
  shouldRender: x
2377
2379
  })
2378
2380
  }
2379
- ) : /* @__PURE__ */ P.jsx(
2380
- ki,
2381
+ ) : /* @__PURE__ */ R.jsx(
2382
+ ji,
2381
2383
  {
2382
2384
  modalContext: h,
2383
2385
  config: a,
@@ -2407,8 +2409,8 @@ const ki = ({ modalContext: e, config: t, children: r }) => /* @__PURE__ */ P.js
2407
2409
  }
2408
2410
  );
2409
2411
  });
2410
- _i.displayName = "Modal";
2411
- const Yi = ({
2412
+ Mi.displayName = "Modal";
2413
+ const Xi = ({
2412
2414
  href: e,
2413
2415
  method: t = "get",
2414
2416
  data: r = {},
@@ -2426,7 +2428,7 @@ const Yi = ({
2426
2428
  children: y,
2427
2429
  ...h
2428
2430
  }) => {
2429
- const [f, p] = V(!1), [v, x] = V(null), { stack: T, visit: F } = dt(), X = B(() => w ?? Wt("navigate"), [w]), U = {}, ee = {};
2431
+ const [f, p] = V(!1), [v, x] = V(null), { stack: T, visit: F } = ft(), X = B(() => w ?? Wt("navigate"), [w]), U = {}, ee = {};
2430
2432
  Object.keys(h).forEach((C) => {
2431
2433
  cr.includes(C) || (C.startsWith("on") && typeof h[C] == "function" ? C.toLowerCase() in window ? U[C] = h[C] : ee[C] = h[C] : U[C] = h[C]);
2432
2434
  });
@@ -2458,7 +2460,7 @@ const Yi = ({
2458
2460
  },
2459
2461
  [e, t, r, l, o, h, q, G]
2460
2462
  );
2461
- return /* @__PURE__ */ P.jsx(
2463
+ return /* @__PURE__ */ R.jsx(
2462
2464
  n,
2463
2465
  {
2464
2466
  ...U,
@@ -2468,20 +2470,23 @@ const Yi = ({
2468
2470
  }
2469
2471
  );
2470
2472
  };
2471
- function Xi() {
2472
- return dt().stack[Tr()] ?? null;
2473
+ function qi() {
2474
+ return ft().stack[Tr()] ?? null;
2473
2475
  }
2476
+ const Ki = (e) => (t) => (t.default.layout = (r) => lt(e, {}, r), t);
2474
2477
  export {
2475
- Rr as HeadlessModal,
2476
- _i as Modal,
2477
- Yi as ModalLink,
2478
- Bn as ModalRoot,
2478
+ Pr as HeadlessModal,
2479
+ Mi as Modal,
2480
+ Xi as ModalLink,
2481
+ Vn as ModalRoot,
2479
2482
  Hn as ModalStackProvider,
2480
2483
  Wt as getConfig,
2481
- Ui as putConfig,
2482
- Hi as renderApp,
2483
- Wi as resetConfig,
2484
- Xi as useModal,
2484
+ Bn as initFromPageProps,
2485
+ Hi as putConfig,
2486
+ Bi as renderApp,
2487
+ Ui as resetConfig,
2488
+ Ki as setPageLayout,
2489
+ qi as useModal,
2485
2490
  Tr as useModalIndex,
2486
- dt as useModalStack
2491
+ ft as useModalStack
2487
2492
  };