@deck9/ui 0.14.7 → 0.14.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/ui.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, computed as w, openBlock as R, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as T, normalizeClass as A, createElementVNode as I, toDisplayString as B, createVNode as N, ref as O, getCurrentInstance as In, onMounted as ee, watch as Z, Fragment as be, withDirectives as $n, vModelText as An, normalizeStyle as Ft, cloneVNode as Mn, h as Ce, inject as he, provide as ye, watchEffect as xe, nextTick as j, onUnmounted as Fe, toRaw as X, shallowRef as Vn, getCurrentScope as Nn, onScopeDispose as Fn, shallowReadonly as me, withCtx as W, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Un, isRef as Hn, renderList as jt, createTextVNode as Wn } from "vue";
1
+ import { defineComponent as $, computed as k, openBlock as E, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as T, normalizeClass as A, createElementVNode as I, toDisplayString as B, createVNode as N, ref as O, getCurrentInstance as In, onMounted as ee, watch as Z, Fragment as be, withDirectives as $n, vModelText as An, normalizeStyle as Ft, cloneVNode as Mn, h as Ce, inject as he, provide as ye, watchEffect as xe, nextTick as j, onUnmounted as Fe, toRaw as X, shallowRef as Vn, getCurrentScope as Nn, onScopeDispose as Fn, shallowReadonly as me, withCtx as W, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Un, isRef as Hn, renderList as jt, createTextVNode as Wn } from "vue";
2
2
  import { FontAwesomeIcon as Kn } from "@fortawesome/vue-fontawesome";
3
3
  import { library as lt } from "@fortawesome/fontawesome-svg-core";
4
4
  import * as h from "@fortawesome/free-solid-svg-icons";
@@ -105,11 +105,11 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
105
105
  name: { default: "user" }
106
106
  },
107
107
  setup(e) {
108
- const t = e, l = w(() => xt.includes(t.name) ? "fab" : "fas"), o = w(() => qn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
108
+ const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() => qn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
109
109
  "could not load icon, because it is not available",
110
110
  t.name
111
111
  ), !1));
112
- return (n, r) => o.value ? (R(), K(P(Kn), ot({
112
+ return (n, r) => o.value ? (E(), K(P(Kn), ot({
113
113
  key: 0,
114
114
  icon: [l.value, n.name]
115
115
  }, n.$attrs), null, 16, ["icon"])) : M("", !0);
@@ -117,7 +117,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
117
117
  }), Xn = ["aria-label", "tabindex"], Yn = {
118
118
  key: 0,
119
119
  class: "absolute inset-0 flex items-center justify-center"
120
- }, Rr = /* @__PURE__ */ $({
120
+ }, Er = /* @__PURE__ */ $({
121
121
  __name: "Button",
122
122
  props: {
123
123
  label: {},
@@ -130,7 +130,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
130
130
  },
131
131
  emits: ["onClick"],
132
132
  setup(e, { emit: t }) {
133
- const l = t, o = e, n = w(() => {
133
+ const l = t, o = e, n = k(() => {
134
134
  const u = {
135
135
  "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
136
136
  "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
@@ -138,7 +138,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
138
138
  "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
139
139
  }, c = {
140
140
  "pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
141
- }, s = {
141
+ }, a = {
142
142
  "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": o.size === "small",
143
143
  "px-5 py-2 text-sm leading-4 font-medium rounded-lg": o.size === "medium",
144
144
  "px-8 py-3 text-base leading-6 font-medium rounded-lg": o.size === "large"
@@ -146,16 +146,16 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
146
146
  return {
147
147
  ...u,
148
148
  ...c,
149
- ...s
149
+ ...a
150
150
  };
151
- }), r = w(() => {
151
+ }), r = k(() => {
152
152
  const u = {
153
153
  "mr-2 -ml-1": ["small", "medium"].includes(o.size) && o.iconPosition === "left",
154
154
  "mr-4 -ml-2": ["large"].includes(o.size) && o.iconPosition === "left"
155
155
  }, c = {
156
156
  "ml-3 -mr-1": ["small", "medium"].includes(o.size) && o.iconPosition === "right",
157
157
  "ml-3 -mr-3": ["large"].includes(o.size) && o.iconPosition === "right"
158
- }, s = {
158
+ }, a = {
159
159
  "text-white": o.color === "primary",
160
160
  "text-blue-600": o.color === "light",
161
161
  "text-grey-50": o.color === "dark"
@@ -163,13 +163,13 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
163
163
  return {
164
164
  ...u,
165
165
  ...c,
166
- ...s
166
+ ...a
167
167
  };
168
168
  });
169
169
  function i() {
170
170
  o.isDisabled || l("onClick");
171
171
  }
172
- return (u, c) => (R(), T("button", {
172
+ return (u, c) => (E(), T("button", {
173
173
  class: A(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
174
174
  type: "button",
175
175
  "aria-label": u.label,
@@ -179,19 +179,19 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
179
179
  I("div", {
180
180
  class: A(!u.isLoading || "invisible")
181
181
  }, [
182
- u.icon && u.iconPosition === "left" ? (R(), K(U, {
182
+ u.icon && u.iconPosition === "left" ? (E(), K(U, {
183
183
  key: 0,
184
184
  name: u.icon,
185
185
  class: A(r.value)
186
186
  }, null, 8, ["name", "class"])) : M("", !0),
187
187
  I("span", null, B(u.label), 1),
188
- u.icon && u.iconPosition === "right" ? (R(), K(U, {
188
+ u.icon && u.iconPosition === "right" ? (E(), K(U, {
189
189
  key: 1,
190
190
  name: u.icon,
191
191
  class: A(r.value)
192
192
  }, null, 8, ["name", "class"])) : M("", !0)
193
193
  ], 2),
194
- u.isLoading ? (R(), T("span", Yn, [
194
+ u.isLoading ? (E(), T("span", Yn, [
195
195
  N(U, {
196
196
  class: "animate-spin",
197
197
  name: "circle-notch"
@@ -232,7 +232,7 @@ function qt(e, t, l) {
232
232
  const to = { class: "relative flex items-start" }, no = { class: "flex items-center h-5" }, oo = ["checked", "id"], lo = { class: "ml-2 text-sm leading-5" }, ro = ["for"], io = {
233
233
  key: 0,
234
234
  class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
235
- }, Er = /* @__PURE__ */ $({
235
+ }, Rr = /* @__PURE__ */ $({
236
236
  __name: "Checkbox",
237
237
  props: {
238
238
  id: { default: qt() },
@@ -245,7 +245,7 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
245
245
  const l = t, o = (n) => {
246
246
  l("update:modelValue", n.target.checked);
247
247
  };
248
- return (n, r) => (R(), T("div", to, [
248
+ return (n, r) => (E(), T("div", to, [
249
249
  I("div", no, [
250
250
  I("input", {
251
251
  class: "h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",
@@ -260,7 +260,7 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
260
260
  for: n.id,
261
261
  class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
262
262
  }, B(n.label), 9, ro),
263
- n.description ? (R(), T("p", io, B(n.description), 1)) : M("", !0)
263
+ n.description ? (E(), T("p", io, B(n.description), 1)) : M("", !0)
264
264
  ])
265
265
  ]));
266
266
  }
@@ -273,7 +273,7 @@ function ao() {
273
273
  }
274
274
  function so(e) {
275
275
  const t = ao();
276
- return w(() => (t.value, !!e()));
276
+ return k(() => (t.value, !!e()));
277
277
  }
278
278
  function uo(e = {}) {
279
279
  const { initialValue: t = "" } = e, l = so(() => typeof window < "u" && "EyeDropper" in window), o = O(t);
@@ -389,15 +389,15 @@ class Co {
389
389
  this._setter(t);
390
390
  }
391
391
  }
392
- function Ro(e, t, l = !1) {
392
+ function Eo(e, t, l = !1) {
393
393
  let o, n;
394
394
  const r = po(e);
395
395
  return r ? (o = e, n = co) : (o = e.get, n = e.set), new Co(o, n, r || !n, l);
396
396
  }
397
- let Xe, Rt = "__VUE_INSTANCE_SETTERS__";
398
- (Xe = St()[Rt]) || (Xe = St()[Rt] = []), Xe.push((e) => e);
399
- let Eo = !1;
400
- const Ye = (e, t) => Ro(e, t, Eo);
397
+ let Xe, Et = "__VUE_INSTANCE_SETTERS__";
398
+ (Xe = St()[Et]) || (Xe = St()[Et] = []), Xe.push((e) => e);
399
+ let Ro = !1;
400
+ const Ye = (e, t) => Eo(e, t, Ro);
401
401
  function rt(e) {
402
402
  const t = Ye(() => ({
403
403
  "pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
@@ -430,81 +430,92 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
430
430
  placeholder: {},
431
431
  size: { default: "medium" },
432
432
  icon: {},
433
+ min: {},
434
+ max: {},
433
435
  isDisabled: { type: Boolean, default: !1 },
434
436
  block: { type: Boolean },
435
437
  showColorPicker: { type: Boolean }
436
438
  },
437
439
  emits: ["update:modelValue"],
438
440
  setup(e, { expose: t, emit: l }) {
439
- const o = e, n = O(o.modelValue ?? "");
441
+ const o = e, n = O(null), r = O(o.modelValue ?? "");
440
442
  Z(
441
443
  () => o.modelValue,
442
- (p) => {
443
- typeof p < "u" && p !== n.value && (n.value = p);
444
+ (y) => {
445
+ typeof y < "u" && y !== r.value && (r.value = y);
444
446
  }
445
447
  );
446
- const r = l, { inputClasses: i, disabledClasses: u, textSizeClasses: c } = rt(o), s = w(() => o.type === "color" ? "text" : o.type), {
447
- isSupported: a,
448
- open: d,
449
- sRGBHex: v
450
- } = uo(), f = () => {
451
- d();
448
+ const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
449
+ isSupported: d,
450
+ open: m,
451
+ sRGBHex: f
452
+ } = uo(), v = () => {
453
+ m();
452
454
  };
453
- Z(v, (p) => {
454
- n.value = p, r("update:modelValue", p);
455
+ Z(f, (y) => {
456
+ r.value = y, i("update:modelValue", y);
455
457
  });
456
- const g = function(p) {
457
- n.value = (p == null ? void 0 : p.target).value, r("update:modelValue", (p == null ? void 0 : p.target).value);
458
- }, m = O(null);
458
+ const p = function(y) {
459
+ const x = (y == null ? void 0 : y.target).value;
460
+ if (o.type === "number" && o.min && parseInt(x) < o.min) {
461
+ r.value = o.min, n.value.value = r.value.toString(), i("update:modelValue", o.min);
462
+ return;
463
+ }
464
+ if (o.type === "number" && o.max && parseInt(x) > o.max) {
465
+ r.value = o.max, n.value.value = r.value.toString(), i("update:modelValue", o.max);
466
+ return;
467
+ }
468
+ r.value = (y == null ? void 0 : y.target).value, i("update:modelValue", r.value);
469
+ }, b = O(null);
459
470
  return t({
460
471
  focus: () => {
461
- o.isDisabled || m.value.focus();
472
+ o.isDisabled || b.value.focus();
462
473
  }
463
- }), (p, S) => (R(), T("div", {
464
- class: A(["relative", [p.block ? "w-full block" : "inline-block"]])
474
+ }), (y, x) => (E(), T("div", {
475
+ class: A(["relative", [y.block ? "w-full block" : "inline-block"]])
465
476
  }, [
466
477
  I("input", ot({
467
- class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(i), P(c), P(u)]],
468
- placeholder: p.placeholder,
478
+ class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(u), P(a), P(c)]],
479
+ placeholder: y.placeholder,
469
480
  type: s.value,
470
- tabindex: p.isDisabled ? "-1" : void 0,
471
- value: n.value
472
- }, p.$attrs, {
473
- ref_key: "input",
474
- ref: m,
475
- onInput: g
481
+ tabindex: y.isDisabled ? "-1" : void 0,
482
+ value: r.value
483
+ }, y.$attrs, {
484
+ ref_key: "inputElement",
485
+ ref: n,
486
+ onInput: p
476
487
  }), null, 16, Do),
477
- p.type === "color" ? (R(), T(be, { key: 0 }, [
488
+ y.type === "color" ? (E(), T(be, { key: 0 }, [
478
489
  I("label", Po, [
479
490
  $n(I("input", {
480
491
  class: "invisible",
481
492
  type: "color",
482
- "onUpdate:modelValue": S[0] || (S[0] = (y) => n.value = y),
483
- onInput: g
493
+ "onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
494
+ onInput: p
484
495
  }, null, 544), [
485
- [An, n.value]
496
+ [An, r.value]
486
497
  ]),
487
498
  I("span", {
488
499
  class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
489
- style: Ft(`background-color: ${n.value}`)
500
+ style: Ft(`background-color: ${r.value}`)
490
501
  }, null, 4)
491
502
  ]),
492
- P(a) && p.showColorPicker ? (R(), T("button", {
503
+ P(d) && y.showColorPicker ? (E(), T("button", {
493
504
  key: 0,
494
505
  type: "button",
495
506
  class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
496
- onClick: f
507
+ onClick: v
497
508
  }, [
498
509
  N(U, {
499
510
  size: "xs",
500
511
  name: "eyedropper"
501
512
  })
502
513
  ])) : M("", !0)
503
- ], 64)) : p.icon ? (R(), T("span", {
514
+ ], 64)) : y.icon ? (E(), T("span", {
504
515
  key: 1,
505
- class: A(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(c)])
516
+ class: A(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(a)])
506
517
  }, [
507
- N(U, { name: p.icon }, null, 8, ["name"])
518
+ N(U, { name: y.icon }, null, 8, ["name"])
508
519
  ], 2)) : M("", !0)
509
520
  ], 2));
510
521
  }
@@ -519,9 +530,9 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
519
530
  description: {}
520
531
  },
521
532
  setup(e) {
522
- return (t, l) => (R(), T("span", To, [
533
+ return (t, l) => (E(), T("span", To, [
523
534
  I("label", { for: t.id }, B(t.label), 9, Lo),
524
- t.description ? (R(), T("span", Io, B(t.description), 1)) : M("", !0)
535
+ t.description ? (E(), T("span", Io, B(t.description), 1)) : M("", !0)
525
536
  ]));
526
537
  }
527
538
  });
@@ -533,7 +544,7 @@ function G(e, t, ...l) {
533
544
  let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
534
545
  throw Error.captureStackTrace && Error.captureStackTrace(o, G), o;
535
546
  }
536
- var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}), $o = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))($o || {});
547
+ var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}), $o = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))($o || {});
537
548
  function z({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
538
549
  var r;
539
550
  let i = Qt(o, l), u = Object.assign(n, { props: i });
@@ -551,29 +562,29 @@ function z({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n
551
562
  }
552
563
  function Ze({ props: e, attrs: t, slots: l, slot: o, name: n }) {
553
564
  var r, i;
554
- let { as: u, ...c } = it(e, ["unmount", "static"]), s = (r = l.default) == null ? void 0 : r.call(l, o), a = {};
565
+ let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
555
566
  if (o) {
556
- let d = !1, v = [];
557
- for (let [f, g] of Object.entries(o))
558
- typeof g == "boolean" && (d = !0), g === !0 && v.push(f);
559
- d && (a["data-headlessui-state"] = v.join(" "));
567
+ let d = !1, m = [];
568
+ for (let [f, v] of Object.entries(o))
569
+ typeof v == "boolean" && (d = !0), v === !0 && m.push(f);
570
+ d && (s["data-headlessui-state"] = m.join(" "));
560
571
  }
561
572
  if (u === "template") {
562
- if (s = Zt(s ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
563
- let [d, ...v] = s ?? [];
564
- if (!Ao(d) || v.length > 0)
565
- throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((m) => m.trim()).filter((m, b, p) => p.indexOf(m) === b).sort((m, b) => m.localeCompare(b)).map((m) => ` - ${m}`).join(`
566
- `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(`
573
+ if (a = Zt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
574
+ let [d, ...m] = a ?? [];
575
+ if (!Ao(d) || m.length > 0)
576
+ throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((p) => p.trim()).filter((p, b, g) => g.indexOf(p) === b).sort((p, b) => p.localeCompare(b)).map((p) => ` - ${p}`).join(`
577
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((p) => ` - ${p}`).join(`
567
578
  `)].join(`
568
579
  `));
569
- let f = Qt((i = d.props) != null ? i : {}, c), g = Mn(d, f);
570
- for (let m in f)
571
- m.startsWith("on") && (g.props || (g.props = {}), g.props[m] = f[m]);
572
- return g;
580
+ let f = Qt((i = d.props) != null ? i : {}, c), v = Mn(d, f);
581
+ for (let p in f)
582
+ p.startsWith("on") && (v.props || (v.props = {}), v.props[p] = f[p]);
583
+ return v;
573
584
  }
574
- return Array.isArray(s) && s.length === 1 ? s[0] : s;
585
+ return Array.isArray(a) && a.length === 1 ? a[0] : a;
575
586
  }
576
- return Ce(u, Object.assign({}, c, a), { default: () => s });
587
+ return Ce(u, Object.assign({}, c, s), { default: () => a });
577
588
  }
578
589
  function Zt(e) {
579
590
  return e.flatMap((t) => t.type === be ? Zt(t.children) : [t]);
@@ -636,7 +647,7 @@ function en(e, t) {
636
647
  case 0:
637
648
  return l.findIndex((i) => !t.resolveDisabled(i));
638
649
  case 1: {
639
- let i = l.slice().reverse().findIndex((u, c, s) => n !== -1 && s.length - c - 1 >= n ? !1 : !t.resolveDisabled(u));
650
+ let i = l.slice().reverse().findIndex((u, c, a) => n !== -1 && a.length - c - 1 >= n ? !1 : !t.resolveDisabled(u));
640
651
  return i === -1 ? i : l.length - 1 - i;
641
652
  }
642
653
  case 2:
@@ -655,7 +666,7 @@ function en(e, t) {
655
666
  })();
656
667
  return r === -1 ? o : r;
657
668
  }
658
- function E(e) {
669
+ function R(e) {
659
670
  var t;
660
671
  return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value;
661
672
  }
@@ -667,7 +678,7 @@ function nn() {
667
678
  function on(e) {
668
679
  ye(tn, e);
669
680
  }
670
- function Et(e, t) {
681
+ function Rt(e, t) {
671
682
  if (e)
672
683
  return e;
673
684
  let l = t ?? "button";
@@ -675,12 +686,12 @@ function Et(e, t) {
675
686
  return "button";
676
687
  }
677
688
  function at(e, t) {
678
- let l = O(Et(e.value.type, e.value.as));
689
+ let l = O(Rt(e.value.type, e.value.as));
679
690
  return ee(() => {
680
- l.value = Et(e.value.type, e.value.as);
691
+ l.value = Rt(e.value.type, e.value.as);
681
692
  }), xe(() => {
682
693
  var o;
683
- l.value || E(t) && E(t) instanceof HTMLButtonElement && !((o = E(t)) != null && o.hasAttribute("type")) && (l.value = "button");
694
+ l.value || R(t) && R(t) instanceof HTMLButtonElement && !((o = R(t)) != null && o.hasAttribute("type")) && (l.value = "button");
684
695
  }), l;
685
696
  }
686
697
  var Fo = Object.defineProperty, Bo = (e, t, l) => t in e ? Fo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Dt = (e, t, l) => (Bo(e, typeof t != "symbol" ? t + "" : t, l), l);
@@ -714,7 +725,7 @@ function ut(e) {
714
725
  if (e instanceof Node)
715
726
  return e.ownerDocument;
716
727
  if (e != null && e.hasOwnProperty("value")) {
717
- let t = E(e);
728
+ let t = R(e);
718
729
  if (t)
719
730
  return t.ownerDocument;
720
731
  }
@@ -788,14 +799,14 @@ function Xo(e, t) {
788
799
  function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
789
800
  var r;
790
801
  let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ? l ? ct(e) : e : ln(e);
791
- n.length > 0 && u.length > 1 && (u = u.filter((g) => !n.includes(g))), o = o ?? i.activeElement;
802
+ n.length > 0 && u.length > 1 && (u = u.filter((v) => !n.includes(v))), o = o ?? i.activeElement;
792
803
  let c = (() => {
793
804
  if (t & 5)
794
805
  return 1;
795
806
  if (t & 10)
796
807
  return -1;
797
808
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
798
- })(), s = (() => {
809
+ })(), a = (() => {
799
810
  if (t & 1)
800
811
  return 0;
801
812
  if (t & 2)
@@ -805,20 +816,20 @@ function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
805
816
  if (t & 8)
806
817
  return u.length - 1;
807
818
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
808
- })(), a = t & 32 ? { preventScroll: !0 } : {}, d = 0, v = u.length, f;
819
+ })(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0, m = u.length, f;
809
820
  do {
810
- if (d >= v || d + v <= 0)
821
+ if (d >= m || d + m <= 0)
811
822
  return 0;
812
- let g = s + d;
823
+ let v = a + d;
813
824
  if (t & 16)
814
- g = (g + v) % v;
825
+ v = (v + m) % m;
815
826
  else {
816
- if (g < 0)
827
+ if (v < 0)
817
828
  return 3;
818
- if (g >= v)
829
+ if (v >= m)
819
830
  return 1;
820
831
  }
821
- f = u[g], f == null || f.focus(a), d += c;
832
+ f = u[v], f == null || f.focus(s), d += c;
822
833
  } while (f !== i.activeElement);
823
834
  return t & 6 && qo(f) && f.select(), 2;
824
835
  }
@@ -832,21 +843,21 @@ function Zo(e, t, l) {
832
843
  window.addEventListener(e, t, l), o(() => window.removeEventListener(e, t, l));
833
844
  });
834
845
  }
835
- function an(e, t, l = w(() => !0)) {
846
+ function an(e, t, l = k(() => !0)) {
836
847
  function o(r, i) {
837
848
  if (!l.value || r.defaultPrevented)
838
849
  return;
839
850
  let u = i(r);
840
851
  if (u === null || !u.getRootNode().contains(u))
841
852
  return;
842
- let c = function s(a) {
843
- return typeof a == "function" ? s(a()) : Array.isArray(a) || a instanceof Set ? a : [a];
853
+ let c = function a(s) {
854
+ return typeof s == "function" ? a(s()) : Array.isArray(s) || s instanceof Set ? s : [s];
844
855
  }(e);
845
- for (let s of c) {
846
- if (s === null)
856
+ for (let a of c) {
857
+ if (a === null)
847
858
  continue;
848
- let a = s instanceof HTMLElement ? s : E(s);
849
- if (a != null && a.contains(u) || r.composed && r.composedPath().includes(a))
859
+ let s = a instanceof HTMLElement ? a : R(a);
860
+ if (s != null && s.contains(u) || r.composed && r.composedPath().includes(s))
850
861
  return;
851
862
  }
852
863
  return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
@@ -897,8 +908,8 @@ function Qo(e) {
897
908
  }
898
909
  }
899
910
  function fn(e, t, l) {
900
- let o = O(l == null ? void 0 : l.value), n = w(() => e.value !== void 0);
901
- return [w(() => n.value ? e.value : o.value), function(r) {
911
+ let o = O(l == null ? void 0 : l.value), n = k(() => e.value !== void 0);
912
+ return [k(() => n.value ? e.value : o.value), function(r) {
902
913
  return n.value || (o.value = r), t == null ? void 0 : t(r);
903
914
  }];
904
915
  }
@@ -929,13 +940,13 @@ function el({ slot: e = O({}), name: t = "Description", props: l = {} } = {}) {
929
940
  i !== -1 && o.value.splice(i, 1);
930
941
  };
931
942
  }
932
- return ye(mn, { register: n, slot: e, name: t, props: l }), w(() => o.value.length > 0 ? o.value.join(" ") : void 0);
943
+ return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
933
944
  }
934
945
  $({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
935
946
  let o = Jo();
936
947
  return ee(() => Fe(o.register(e.id))), () => {
937
- let { name: n = "Description", slot: r = O({}), props: i = {} } = o, { id: u, ...c } = e, s = { ...Object.entries(i).reduce((a, [d, v]) => Object.assign(a, { [d]: P(v) }), {}), id: u };
938
- return z({ ourProps: s, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
948
+ let { name: n = "Description", slot: r = O({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, m]) => Object.assign(s, { [d]: P(m) }), {}), id: u };
949
+ return z({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
939
950
  };
940
951
  } });
941
952
  let _t = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
@@ -972,7 +983,7 @@ function tl(e) {
972
983
  function vn(e) {
973
984
  let t = O(""), l = O("");
974
985
  return () => {
975
- let o = E(e);
986
+ let o = R(e);
976
987
  if (!o)
977
988
  return "";
978
989
  let n = o.innerText;
@@ -999,82 +1010,82 @@ function De(e) {
999
1010
  return t;
1000
1011
  }
1001
1012
  let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => nl }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: l, emit: o }) {
1002
- let n = O(1), r = O(null), i = O(null), u = O(null), c = O([]), s = O(""), a = O(null), d = O(1);
1003
- function v(y = (x) => x) {
1004
- let x = a.value !== null ? c.value[a.value] : null, k = ct(y(c.value.slice()), (C) => E(C.dataRef.domRef)), _ = x ? k.indexOf(x) : null;
1005
- return _ === -1 && (_ = null), { options: k, activeOptionIndex: _ };
1013
+ let n = O(1), r = O(null), i = O(null), u = O(null), c = O([]), a = O(""), s = O(null), d = O(1);
1014
+ function m(x = (w) => w) {
1015
+ let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (C) => R(C.dataRef.domRef)), _ = w ? S.indexOf(w) : null;
1016
+ return _ === -1 && (_ = null), { options: S, activeOptionIndex: _ };
1006
1017
  }
1007
- let f = w(() => e.multiple ? 1 : 0), [g, m] = fn(w(() => e.modelValue), (y) => o("update:modelValue", y), w(() => e.defaultValue)), b = w(() => g.value === void 0 ? G(f.value, { 1: [], 0: void 0 }) : g.value), p = { listboxState: n, value: b, mode: f, compare(y, x) {
1018
+ let f = k(() => e.multiple ? 1 : 0), [v, p] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), b = k(() => v.value === void 0 ? G(f.value, { 1: [], 0: void 0 }) : v.value), g = { listboxState: n, value: b, mode: f, compare(x, w) {
1008
1019
  if (typeof e.by == "string") {
1009
- let k = e.by;
1010
- return (y == null ? void 0 : y[k]) === (x == null ? void 0 : x[k]);
1020
+ let S = e.by;
1021
+ return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
1011
1022
  }
1012
- return e.by(y, x);
1013
- }, orientation: w(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: w(() => e.disabled), options: c, searchQuery: s, activeOptionIndex: a, activationTrigger: d, closeListbox() {
1014
- e.disabled || n.value !== 1 && (n.value = 1, a.value = null);
1023
+ return e.by(x, w);
1024
+ }, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger: d, closeListbox() {
1025
+ e.disabled || n.value !== 1 && (n.value = 1, s.value = null);
1015
1026
  }, openListbox() {
1016
1027
  e.disabled || n.value !== 0 && (n.value = 0);
1017
- }, goToOption(y, x, k) {
1028
+ }, goToOption(x, w, S) {
1018
1029
  if (e.disabled || n.value === 1)
1019
1030
  return;
1020
- let _ = v(), C = en(y === L.Specific ? { focus: L.Specific, id: x } : { focus: y }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (F) => F.id, resolveDisabled: (F) => F.dataRef.disabled });
1021
- s.value = "", a.value = C, d.value = k ?? 1, c.value = _.options;
1022
- }, search(y) {
1031
+ let _ = m(), C = en(x === L.Specific ? { focus: L.Specific, id: w } : { focus: x }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (F) => F.id, resolveDisabled: (F) => F.dataRef.disabled });
1032
+ a.value = "", s.value = C, d.value = S ?? 1, c.value = _.options;
1033
+ }, search(x) {
1023
1034
  if (e.disabled || n.value === 1)
1024
1035
  return;
1025
- let x = s.value !== "" ? 0 : 1;
1026
- s.value += y.toLowerCase();
1027
- let k = (a.value !== null ? c.value.slice(a.value + x).concat(c.value.slice(0, a.value + x)) : c.value).find((C) => C.dataRef.textValue.startsWith(s.value) && !C.dataRef.disabled), _ = k ? c.value.indexOf(k) : -1;
1028
- _ === -1 || _ === a.value || (a.value = _, d.value = 1);
1036
+ let w = a.value !== "" ? 0 : 1;
1037
+ a.value += x.toLowerCase();
1038
+ let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((C) => C.dataRef.textValue.startsWith(a.value) && !C.dataRef.disabled), _ = S ? c.value.indexOf(S) : -1;
1039
+ _ === -1 || _ === s.value || (s.value = _, d.value = 1);
1029
1040
  }, clearSearch() {
1030
- e.disabled || n.value !== 1 && s.value !== "" && (s.value = "");
1031
- }, registerOption(y, x) {
1032
- let k = v((_) => [..._, { id: y, dataRef: x }]);
1033
- c.value = k.options, a.value = k.activeOptionIndex;
1034
- }, unregisterOption(y) {
1035
- let x = v((k) => {
1036
- let _ = k.findIndex((C) => C.id === y);
1037
- return _ !== -1 && k.splice(_, 1), k;
1041
+ e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
1042
+ }, registerOption(x, w) {
1043
+ let S = m((_) => [..._, { id: x, dataRef: w }]);
1044
+ c.value = S.options, s.value = S.activeOptionIndex;
1045
+ }, unregisterOption(x) {
1046
+ let w = m((S) => {
1047
+ let _ = S.findIndex((C) => C.id === x);
1048
+ return _ !== -1 && S.splice(_, 1), S;
1038
1049
  });
1039
- c.value = x.options, a.value = x.activeOptionIndex, d.value = 1;
1040
- }, theirOnChange(y) {
1041
- e.disabled || m(y);
1042
- }, select(y) {
1043
- e.disabled || m(G(f.value, { 0: () => y, 1: () => {
1044
- let x = X(p.value.value).slice(), k = X(y), _ = x.findIndex((C) => p.compare(k, X(C)));
1045
- return _ === -1 ? x.push(k) : x.splice(_, 1), x;
1050
+ c.value = w.options, s.value = w.activeOptionIndex, d.value = 1;
1051
+ }, theirOnChange(x) {
1052
+ e.disabled || p(x);
1053
+ }, select(x) {
1054
+ e.disabled || p(G(f.value, { 0: () => x, 1: () => {
1055
+ let w = X(g.value.value).slice(), S = X(x), _ = w.findIndex((C) => g.compare(S, X(C)));
1056
+ return _ === -1 ? w.push(S) : w.splice(_, 1), w;
1046
1057
  } }));
1047
1058
  } };
1048
- an([i, u], (y, x) => {
1049
- var k;
1050
- p.closeListbox(), ze(x, je.Loose) || (y.preventDefault(), (k = E(i)) == null || k.focus());
1051
- }, w(() => n.value === 0)), ye(gn, p), on(w(() => G(n.value, { 0: te.Open, 1: te.Closed })));
1052
- let S = w(() => {
1053
- var y;
1054
- return (y = E(i)) == null ? void 0 : y.closest("form");
1059
+ an([i, u], (x, w) => {
1060
+ var S;
1061
+ g.closeListbox(), ze(w, je.Loose) || (x.preventDefault(), (S = R(i)) == null || S.focus());
1062
+ }, k(() => n.value === 0)), ye(gn, g), on(k(() => G(n.value, { 0: te.Open, 1: te.Closed })));
1063
+ let y = k(() => {
1064
+ var x;
1065
+ return (x = R(i)) == null ? void 0 : x.closest("form");
1055
1066
  });
1056
1067
  return ee(() => {
1057
- Z([S], () => {
1058
- if (!S.value || e.defaultValue === void 0)
1068
+ Z([y], () => {
1069
+ if (!y.value || e.defaultValue === void 0)
1059
1070
  return;
1060
- function y() {
1061
- p.theirOnChange(e.defaultValue);
1071
+ function x() {
1072
+ g.theirOnChange(e.defaultValue);
1062
1073
  }
1063
- return S.value.addEventListener("reset", y), () => {
1064
- var x;
1065
- (x = S.value) == null || x.removeEventListener("reset", y);
1074
+ return y.value.addEventListener("reset", x), () => {
1075
+ var w;
1076
+ (w = y.value) == null || w.removeEventListener("reset", x);
1066
1077
  };
1067
1078
  }, { immediate: !0 });
1068
1079
  }), () => {
1069
- let { name: y, modelValue: x, disabled: k, form: _, ...C } = e, F = { open: n.value === 0, disabled: k, value: b.value };
1070
- return Ce(be, [...y != null && b.value != null ? un({ [y]: b.value }).map(([re, _e]) => Ce(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], z({ ourProps: {}, theirProps: { ...l, ...it(C, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: F, slots: t, attrs: l, name: "Listbox" })]);
1080
+ let { name: x, modelValue: w, disabled: S, form: _, ...C } = e, F = { open: n.value === 0, disabled: S, value: b.value };
1081
+ return Ce(be, [...x != null && b.value != null ? un({ [x]: b.value }).map(([re, _e]) => Ce(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], z({ ourProps: {}, theirProps: { ...l, ...it(C, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: F, slots: t, attrs: l, name: "Listbox" })]);
1071
1082
  };
1072
1083
  } });
1073
1084
  $({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
1074
1085
  let o = De("ListboxLabel");
1075
1086
  function n() {
1076
1087
  var r;
1077
- (r = E(o.buttonRef)) == null || r.focus({ preventScroll: !0 });
1088
+ (r = R(o.buttonRef)) == null || r.focus({ preventScroll: !0 });
1078
1089
  }
1079
1090
  return () => {
1080
1091
  let r = { open: o.listboxState.value === 0, disabled: o.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: o.labelRef, onClick: n };
@@ -1084,105 +1095,105 @@ $({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label
1084
1095
  let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
1085
1096
  let n = De("ListboxButton");
1086
1097
  o({ el: n.buttonRef, $el: n.buttonRef });
1087
- function r(s) {
1088
- switch (s.key) {
1098
+ function r(a) {
1099
+ switch (a.key) {
1089
1100
  case D.Space:
1090
1101
  case D.Enter:
1091
1102
  case D.ArrowDown:
1092
- s.preventDefault(), n.openListbox(), j(() => {
1093
- var a;
1094
- (a = E(n.optionsRef)) == null || a.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.First);
1103
+ a.preventDefault(), n.openListbox(), j(() => {
1104
+ var s;
1105
+ (s = R(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.First);
1095
1106
  });
1096
1107
  break;
1097
1108
  case D.ArrowUp:
1098
- s.preventDefault(), n.openListbox(), j(() => {
1099
- var a;
1100
- (a = E(n.optionsRef)) == null || a.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.Last);
1109
+ a.preventDefault(), n.openListbox(), j(() => {
1110
+ var s;
1111
+ (s = R(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.Last);
1101
1112
  });
1102
1113
  break;
1103
1114
  }
1104
1115
  }
1105
- function i(s) {
1106
- switch (s.key) {
1116
+ function i(a) {
1117
+ switch (a.key) {
1107
1118
  case D.Space:
1108
- s.preventDefault();
1119
+ a.preventDefault();
1109
1120
  break;
1110
1121
  }
1111
1122
  }
1112
- function u(s) {
1123
+ function u(a) {
1113
1124
  n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), j(() => {
1114
- var a;
1115
- return (a = E(n.buttonRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1116
- })) : (s.preventDefault(), n.openListbox(), il(() => {
1117
- var a;
1118
- return (a = E(n.optionsRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1125
+ var s;
1126
+ return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1127
+ })) : (a.preventDefault(), n.openListbox(), il(() => {
1128
+ var s;
1129
+ return (s = R(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1119
1130
  })));
1120
1131
  }
1121
- let c = at(w(() => ({ as: e.as, type: t.type })), n.buttonRef);
1132
+ let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
1122
1133
  return () => {
1123
- var s, a;
1124
- let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: v, ...f } = e, g = { ref: n.buttonRef, id: v, type: c.value, "aria-haspopup": "listbox", "aria-controls": (s = E(n.optionsRef)) == null ? void 0 : s.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(a = E(n.labelRef)) == null ? void 0 : a.id, v].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
1125
- return z({ ourProps: g, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
1134
+ var a, s;
1135
+ let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: m, ...f } = e, v = { ref: n.buttonRef, id: m, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = R(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = R(n.labelRef)) == null ? void 0 : s.id, m].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
1136
+ return z({ ourProps: v, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
1126
1137
  };
1127
1138
  } }), ul = $({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
1128
1139
  let n = De("ListboxOptions"), r = O(null);
1129
1140
  o({ el: n.optionsRef, $el: n.optionsRef });
1130
- function i(s) {
1131
- switch (r.value && clearTimeout(r.value), s.key) {
1141
+ function i(a) {
1142
+ switch (r.value && clearTimeout(r.value), a.key) {
1132
1143
  case D.Space:
1133
1144
  if (n.searchQuery.value !== "")
1134
- return s.preventDefault(), s.stopPropagation(), n.search(s.key);
1145
+ return a.preventDefault(), a.stopPropagation(), n.search(a.key);
1135
1146
  case D.Enter:
1136
- if (s.preventDefault(), s.stopPropagation(), n.activeOptionIndex.value !== null) {
1137
- let a = n.options.value[n.activeOptionIndex.value];
1138
- n.select(a.dataRef.value);
1147
+ if (a.preventDefault(), a.stopPropagation(), n.activeOptionIndex.value !== null) {
1148
+ let s = n.options.value[n.activeOptionIndex.value];
1149
+ n.select(s.dataRef.value);
1139
1150
  }
1140
1151
  n.mode.value === 0 && (n.closeListbox(), j(() => {
1141
- var a;
1142
- return (a = E(n.buttonRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1152
+ var s;
1153
+ return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1143
1154
  }));
1144
1155
  break;
1145
1156
  case G(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
1146
- return s.preventDefault(), s.stopPropagation(), n.goToOption(L.Next);
1157
+ return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Next);
1147
1158
  case G(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
1148
- return s.preventDefault(), s.stopPropagation(), n.goToOption(L.Previous);
1159
+ return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Previous);
1149
1160
  case D.Home:
1150
1161
  case D.PageUp:
1151
- return s.preventDefault(), s.stopPropagation(), n.goToOption(L.First);
1162
+ return a.preventDefault(), a.stopPropagation(), n.goToOption(L.First);
1152
1163
  case D.End:
1153
1164
  case D.PageDown:
1154
- return s.preventDefault(), s.stopPropagation(), n.goToOption(L.Last);
1165
+ return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Last);
1155
1166
  case D.Escape:
1156
- s.preventDefault(), s.stopPropagation(), n.closeListbox(), j(() => {
1157
- var a;
1158
- return (a = E(n.buttonRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1167
+ a.preventDefault(), a.stopPropagation(), n.closeListbox(), j(() => {
1168
+ var s;
1169
+ return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1159
1170
  });
1160
1171
  break;
1161
1172
  case D.Tab:
1162
- s.preventDefault(), s.stopPropagation();
1173
+ a.preventDefault(), a.stopPropagation();
1163
1174
  break;
1164
1175
  default:
1165
- s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
1176
+ a.key.length === 1 && (n.search(a.key), r.value = setTimeout(() => n.clearSearch(), 350));
1166
1177
  break;
1167
1178
  }
1168
1179
  }
1169
- let u = nn(), c = w(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
1180
+ let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
1170
1181
  return () => {
1171
- var s, a, d, v;
1172
- let f = { open: n.listboxState.value === 0 }, { id: g, ...m } = e, b = { "aria-activedescendant": n.activeOptionIndex.value === null || (s = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : s.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (v = (a = E(n.labelRef)) == null ? void 0 : a.id) != null ? v : (d = E(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: g, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
1173
- return z({ ourProps: b, theirProps: m, slot: f, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
1182
+ var a, s, d, m;
1183
+ let f = { open: n.listboxState.value === 0 }, { id: v, ...p } = e, b = { "aria-activedescendant": n.activeOptionIndex.value === null || (a = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : a.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (m = (s = R(n.labelRef)) == null ? void 0 : s.id) != null ? m : (d = R(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: v, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
1184
+ return z({ ourProps: b, theirProps: p, slot: f, attrs: t, slots: l, features: Ee.RenderStrategy | Ee.Static, visible: c.value, name: "ListboxOptions" });
1174
1185
  };
1175
1186
  } }), cl = $({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
1176
1187
  let n = De("ListboxOption"), r = O(null);
1177
1188
  o({ el: r, $el: r });
1178
- let i = w(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = w(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((p) => n.compare(X(p), X(e.value))) })), c = w(() => G(n.mode.value, { 1: () => {
1179
- var p;
1180
- let S = X(n.value.value);
1181
- return ((p = n.options.value.find((y) => S.some((x) => n.compare(X(x), X(y.dataRef.value))))) == null ? void 0 : p.id) === e.id;
1182
- }, 0: () => u.value })), s = vn(r), a = w(() => ({ disabled: e.disabled, value: e.value, get textValue() {
1183
- return s();
1189
+ let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((g) => n.compare(X(g), X(e.value))) })), c = k(() => G(n.mode.value, { 1: () => {
1190
+ var g;
1191
+ let y = X(n.value.value);
1192
+ return ((g = n.options.value.find((x) => y.some((w) => n.compare(X(w), X(x.dataRef.value))))) == null ? void 0 : g.id) === e.id;
1193
+ }, 0: () => u.value })), a = vn(r), s = k(() => ({ disabled: e.disabled, value: e.value, get textValue() {
1194
+ return a();
1184
1195
  }, domRef: r }));
1185
- ee(() => n.registerOption(e.id, a)), Fe(() => n.unregisterOption(e.id)), ee(() => {
1196
+ ee(() => n.registerOption(e.id, s)), Fe(() => n.unregisterOption(e.id)), ee(() => {
1186
1197
  Z([n.listboxState, u], () => {
1187
1198
  n.listboxState.value === 0 && u.value && G(n.mode.value, { 1: () => {
1188
1199
  c.value && n.goToOption(L.Specific, e.id);
@@ -1192,36 +1203,36 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
1192
1203
  }, { immediate: !0 });
1193
1204
  }), xe(() => {
1194
1205
  n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && j(() => {
1195
- var p, S;
1196
- return (S = (p = E(r)) == null ? void 0 : p.scrollIntoView) == null ? void 0 : S.call(p, { block: "nearest" });
1206
+ var g, y;
1207
+ return (y = (g = R(r)) == null ? void 0 : g.scrollIntoView) == null ? void 0 : y.call(g, { block: "nearest" });
1197
1208
  });
1198
1209
  });
1199
- function d(p) {
1210
+ function d(g) {
1200
1211
  if (e.disabled)
1201
- return p.preventDefault();
1212
+ return g.preventDefault();
1202
1213
  n.select(e.value), n.mode.value === 0 && (n.closeListbox(), j(() => {
1203
- var S;
1204
- return (S = E(n.buttonRef)) == null ? void 0 : S.focus({ preventScroll: !0 });
1214
+ var y;
1215
+ return (y = R(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
1205
1216
  }));
1206
1217
  }
1207
- function v() {
1218
+ function m() {
1208
1219
  if (e.disabled)
1209
1220
  return n.goToOption(L.Nothing);
1210
1221
  n.goToOption(L.Specific, e.id);
1211
1222
  }
1212
1223
  let f = pn();
1213
- function g(p) {
1214
- f.update(p);
1224
+ function v(g) {
1225
+ f.update(g);
1215
1226
  }
1216
- function m(p) {
1217
- f.wasMoved(p) && (e.disabled || i.value || n.goToOption(L.Specific, e.id, 0));
1227
+ function p(g) {
1228
+ f.wasMoved(g) && (e.disabled || i.value || n.goToOption(L.Specific, e.id, 0));
1218
1229
  }
1219
- function b(p) {
1220
- f.wasMoved(p) && (e.disabled || i.value && n.goToOption(L.Nothing));
1230
+ function b(g) {
1231
+ f.wasMoved(g) && (e.disabled || i.value && n.goToOption(L.Nothing));
1221
1232
  }
1222
1233
  return () => {
1223
- let { disabled: p } = e, S = { active: i.value, selected: u.value, disabled: p }, { id: y, value: x, disabled: k, ..._ } = e, C = { id: y, ref: r, role: "option", tabIndex: p === !0 ? void 0 : -1, "aria-disabled": p === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: v, onPointerenter: g, onMouseenter: g, onPointermove: m, onMousemove: m, onPointerleave: b, onMouseleave: b };
1224
- return z({ ourProps: C, theirProps: _, slot: S, attrs: l, slots: t, name: "ListboxOption" });
1234
+ let { disabled: g } = e, y = { active: i.value, selected: u.value, disabled: g }, { id: x, value: w, disabled: S, ..._ } = e, C = { id: x, ref: r, role: "option", tabIndex: g === !0 ? void 0 : -1, "aria-disabled": g === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: m, onPointerenter: v, onMouseenter: v, onPointermove: p, onMousemove: p, onPointerleave: b, onMouseleave: b };
1235
+ return z({ ourProps: C, theirProps: _, slot: y, attrs: l, slots: t, name: "ListboxOption" });
1225
1236
  };
1226
1237
  } });
1227
1238
  var dl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(dl || {}), fl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(fl || {});
@@ -1238,175 +1249,175 @@ function Ue(e) {
1238
1249
  return t;
1239
1250
  }
1240
1251
  let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
1241
- let o = O(1), n = O(null), r = O(null), i = O([]), u = O(""), c = O(null), s = O(1);
1242
- function a(v = (f) => f) {
1243
- let f = c.value !== null ? i.value[c.value] : null, g = ct(v(i.value.slice()), (b) => E(b.dataRef.domRef)), m = f ? g.indexOf(f) : null;
1244
- return m === -1 && (m = null), { items: g, activeItemIndex: m };
1252
+ let o = O(1), n = O(null), r = O(null), i = O([]), u = O(""), c = O(null), a = O(1);
1253
+ function s(m = (f) => f) {
1254
+ let f = c.value !== null ? i.value[c.value] : null, v = ct(m(i.value.slice()), (b) => R(b.dataRef.domRef)), p = f ? v.indexOf(f) : null;
1255
+ return p === -1 && (p = null), { items: v, activeItemIndex: p };
1245
1256
  }
1246
- let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: s, closeMenu: () => {
1257
+ let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
1247
1258
  o.value = 1, c.value = null;
1248
- }, openMenu: () => o.value = 0, goToItem(v, f, g) {
1249
- let m = a(), b = en(v === L.Specific ? { focus: L.Specific, id: f } : { focus: v }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (p) => p.id, resolveDisabled: (p) => p.dataRef.disabled });
1250
- u.value = "", c.value = b, s.value = g ?? 1, i.value = m.items;
1251
- }, search(v) {
1259
+ }, openMenu: () => o.value = 0, goToItem(m, f, v) {
1260
+ let p = s(), b = en(m === L.Specific ? { focus: L.Specific, id: f } : { focus: m }, { resolveItems: () => p.items, resolveActiveIndex: () => p.activeItemIndex, resolveId: (g) => g.id, resolveDisabled: (g) => g.dataRef.disabled });
1261
+ u.value = "", c.value = b, a.value = v ?? 1, i.value = p.items;
1262
+ }, search(m) {
1252
1263
  let f = u.value !== "" ? 0 : 1;
1253
- u.value += v.toLowerCase();
1254
- let g = (c.value !== null ? i.value.slice(c.value + f).concat(i.value.slice(0, c.value + f)) : i.value).find((b) => b.dataRef.textValue.startsWith(u.value) && !b.dataRef.disabled), m = g ? i.value.indexOf(g) : -1;
1255
- m === -1 || m === c.value || (c.value = m, s.value = 1);
1264
+ u.value += m.toLowerCase();
1265
+ let v = (c.value !== null ? i.value.slice(c.value + f).concat(i.value.slice(0, c.value + f)) : i.value).find((b) => b.dataRef.textValue.startsWith(u.value) && !b.dataRef.disabled), p = v ? i.value.indexOf(v) : -1;
1266
+ p === -1 || p === c.value || (c.value = p, a.value = 1);
1256
1267
  }, clearSearch() {
1257
1268
  u.value = "";
1258
- }, registerItem(v, f) {
1259
- let g = a((m) => [...m, { id: v, dataRef: f }]);
1260
- i.value = g.items, c.value = g.activeItemIndex, s.value = 1;
1261
- }, unregisterItem(v) {
1262
- let f = a((g) => {
1263
- let m = g.findIndex((b) => b.id === v);
1264
- return m !== -1 && g.splice(m, 1), g;
1269
+ }, registerItem(m, f) {
1270
+ let v = s((p) => [...p, { id: m, dataRef: f }]);
1271
+ i.value = v.items, c.value = v.activeItemIndex, a.value = 1;
1272
+ }, unregisterItem(m) {
1273
+ let f = s((v) => {
1274
+ let p = v.findIndex((b) => b.id === m);
1275
+ return p !== -1 && v.splice(p, 1), v;
1265
1276
  });
1266
- i.value = f.items, c.value = f.activeItemIndex, s.value = 1;
1277
+ i.value = f.items, c.value = f.activeItemIndex, a.value = 1;
1267
1278
  } };
1268
- return an([n, r], (v, f) => {
1269
- var g;
1270
- d.closeMenu(), ze(f, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
1271
- }, w(() => o.value === 0)), ye(bn, d), on(w(() => G(o.value, { 0: te.Open, 1: te.Closed }))), () => {
1272
- let v = { open: o.value === 0, close: d.closeMenu };
1273
- return z({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
1279
+ return an([n, r], (m, f) => {
1280
+ var v;
1281
+ d.closeMenu(), ze(f, je.Loose) || (m.preventDefault(), (v = R(n)) == null || v.focus());
1282
+ }, k(() => o.value === 0)), ye(bn, d), on(k(() => G(o.value, { 0: te.Open, 1: te.Closed }))), () => {
1283
+ let m = { open: o.value === 0, close: d.closeMenu };
1284
+ return z({ ourProps: {}, theirProps: e, slot: m, slots: t, attrs: l, name: "Menu" });
1274
1285
  };
1275
1286
  } }), vl = $({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
1276
1287
  let n = Ue("MenuButton");
1277
1288
  o({ el: n.buttonRef, $el: n.buttonRef });
1278
- function r(s) {
1279
- switch (s.key) {
1289
+ function r(a) {
1290
+ switch (a.key) {
1280
1291
  case D.Space:
1281
1292
  case D.Enter:
1282
1293
  case D.ArrowDown:
1283
- s.preventDefault(), s.stopPropagation(), n.openMenu(), j(() => {
1284
- var a;
1285
- (a = E(n.itemsRef)) == null || a.focus({ preventScroll: !0 }), n.goToItem(L.First);
1294
+ a.preventDefault(), a.stopPropagation(), n.openMenu(), j(() => {
1295
+ var s;
1296
+ (s = R(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.First);
1286
1297
  });
1287
1298
  break;
1288
1299
  case D.ArrowUp:
1289
- s.preventDefault(), s.stopPropagation(), n.openMenu(), j(() => {
1290
- var a;
1291
- (a = E(n.itemsRef)) == null || a.focus({ preventScroll: !0 }), n.goToItem(L.Last);
1300
+ a.preventDefault(), a.stopPropagation(), n.openMenu(), j(() => {
1301
+ var s;
1302
+ (s = R(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.Last);
1292
1303
  });
1293
1304
  break;
1294
1305
  }
1295
1306
  }
1296
- function i(s) {
1297
- switch (s.key) {
1307
+ function i(a) {
1308
+ switch (a.key) {
1298
1309
  case D.Space:
1299
- s.preventDefault();
1310
+ a.preventDefault();
1300
1311
  break;
1301
1312
  }
1302
1313
  }
1303
- function u(s) {
1314
+ function u(a) {
1304
1315
  e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), j(() => {
1305
- var a;
1306
- return (a = E(n.buttonRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1307
- })) : (s.preventDefault(), n.openMenu(), pl(() => {
1308
- var a;
1309
- return (a = E(n.itemsRef)) == null ? void 0 : a.focus({ preventScroll: !0 });
1316
+ var s;
1317
+ return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1318
+ })) : (a.preventDefault(), n.openMenu(), pl(() => {
1319
+ var s;
1320
+ return (s = R(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1310
1321
  })));
1311
1322
  }
1312
- let c = at(w(() => ({ as: e.as, type: t.type })), n.buttonRef);
1323
+ let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
1313
1324
  return () => {
1314
- var s;
1315
- let a = { open: n.menuState.value === 0 }, { id: d, ...v } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (s = E(n.itemsRef)) == null ? void 0 : s.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
1316
- return z({ ourProps: f, theirProps: v, slot: a, attrs: t, slots: l, name: "MenuButton" });
1325
+ var a;
1326
+ let s = { open: n.menuState.value === 0 }, { id: d, ...m } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = R(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
1327
+ return z({ ourProps: f, theirProps: m, slot: s, attrs: t, slots: l, name: "MenuButton" });
1317
1328
  };
1318
1329
  } }), gl = $({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
1319
1330
  let n = Ue("MenuItems"), r = O(null);
1320
- o({ el: n.itemsRef, $el: n.itemsRef }), zo({ container: w(() => E(n.itemsRef)), enabled: w(() => n.menuState.value === 0), accept(a) {
1321
- return a.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : a.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1322
- }, walk(a) {
1323
- a.setAttribute("role", "none");
1331
+ o({ el: n.itemsRef, $el: n.itemsRef }), zo({ container: k(() => R(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
1332
+ return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1333
+ }, walk(s) {
1334
+ s.setAttribute("role", "none");
1324
1335
  } });
1325
- function i(a) {
1336
+ function i(s) {
1326
1337
  var d;
1327
- switch (r.value && clearTimeout(r.value), a.key) {
1338
+ switch (r.value && clearTimeout(r.value), s.key) {
1328
1339
  case D.Space:
1329
1340
  if (n.searchQuery.value !== "")
1330
- return a.preventDefault(), a.stopPropagation(), n.search(a.key);
1341
+ return s.preventDefault(), s.stopPropagation(), n.search(s.key);
1331
1342
  case D.Enter:
1332
- if (a.preventDefault(), a.stopPropagation(), n.activeItemIndex.value !== null) {
1333
- let v = n.items.value[n.activeItemIndex.value];
1334
- (d = E(v.dataRef.domRef)) == null || d.click();
1343
+ if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
1344
+ let m = n.items.value[n.activeItemIndex.value];
1345
+ (d = R(m.dataRef.domRef)) == null || d.click();
1335
1346
  }
1336
- n.closeMenu(), rn(E(n.buttonRef));
1347
+ n.closeMenu(), rn(R(n.buttonRef));
1337
1348
  break;
1338
1349
  case D.ArrowDown:
1339
- return a.preventDefault(), a.stopPropagation(), n.goToItem(L.Next);
1350
+ return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Next);
1340
1351
  case D.ArrowUp:
1341
- return a.preventDefault(), a.stopPropagation(), n.goToItem(L.Previous);
1352
+ return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Previous);
1342
1353
  case D.Home:
1343
1354
  case D.PageUp:
1344
- return a.preventDefault(), a.stopPropagation(), n.goToItem(L.First);
1355
+ return s.preventDefault(), s.stopPropagation(), n.goToItem(L.First);
1345
1356
  case D.End:
1346
1357
  case D.PageDown:
1347
- return a.preventDefault(), a.stopPropagation(), n.goToItem(L.Last);
1358
+ return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Last);
1348
1359
  case D.Escape:
1349
- a.preventDefault(), a.stopPropagation(), n.closeMenu(), j(() => {
1350
- var v;
1351
- return (v = E(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
1360
+ s.preventDefault(), s.stopPropagation(), n.closeMenu(), j(() => {
1361
+ var m;
1362
+ return (m = R(n.buttonRef)) == null ? void 0 : m.focus({ preventScroll: !0 });
1352
1363
  });
1353
1364
  break;
1354
1365
  case D.Tab:
1355
- a.preventDefault(), a.stopPropagation(), n.closeMenu(), j(() => Xo(E(n.buttonRef), a.shiftKey ? tt.Previous : tt.Next));
1366
+ s.preventDefault(), s.stopPropagation(), n.closeMenu(), j(() => Xo(R(n.buttonRef), s.shiftKey ? tt.Previous : tt.Next));
1356
1367
  break;
1357
1368
  default:
1358
- a.key.length === 1 && (n.search(a.key), r.value = setTimeout(() => n.clearSearch(), 350));
1369
+ s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
1359
1370
  break;
1360
1371
  }
1361
1372
  }
1362
- function u(a) {
1363
- switch (a.key) {
1373
+ function u(s) {
1374
+ switch (s.key) {
1364
1375
  case D.Space:
1365
- a.preventDefault();
1376
+ s.preventDefault();
1366
1377
  break;
1367
1378
  }
1368
1379
  }
1369
- let c = nn(), s = w(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
1380
+ let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
1370
1381
  return () => {
1371
- var a, d;
1372
- let v = { open: n.menuState.value === 0 }, { id: f, ...g } = e, m = { "aria-activedescendant": n.activeItemIndex.value === null || (a = n.items.value[n.activeItemIndex.value]) == null ? void 0 : a.id, "aria-labelledby": (d = E(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
1373
- return z({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: s.value, name: "MenuItems" });
1382
+ var s, d;
1383
+ let m = { open: n.menuState.value === 0 }, { id: f, ...v } = e, p = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = R(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
1384
+ return z({ ourProps: p, theirProps: v, slot: m, attrs: t, slots: l, features: Ee.RenderStrategy | Ee.Static, visible: a.value, name: "MenuItems" });
1374
1385
  };
1375
1386
  } }), bl = $({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
1376
1387
  let n = Ue("MenuItem"), r = O(null);
1377
1388
  o({ el: r, $el: r });
1378
- let i = w(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = w(() => ({ disabled: e.disabled, get textValue() {
1389
+ let i = k(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = k(() => ({ disabled: e.disabled, get textValue() {
1379
1390
  return u();
1380
1391
  }, domRef: r }));
1381
1392
  ee(() => n.registerItem(e.id, c)), Fe(() => n.unregisterItem(e.id)), xe(() => {
1382
1393
  n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && j(() => {
1383
- var m, b;
1384
- return (b = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : b.call(m, { block: "nearest" });
1394
+ var p, b;
1395
+ return (b = (p = R(r)) == null ? void 0 : p.scrollIntoView) == null ? void 0 : b.call(p, { block: "nearest" });
1385
1396
  });
1386
1397
  });
1387
- function s(m) {
1398
+ function a(p) {
1388
1399
  if (e.disabled)
1389
- return m.preventDefault();
1390
- n.closeMenu(), rn(E(n.buttonRef));
1400
+ return p.preventDefault();
1401
+ n.closeMenu(), rn(R(n.buttonRef));
1391
1402
  }
1392
- function a() {
1403
+ function s() {
1393
1404
  if (e.disabled)
1394
1405
  return n.goToItem(L.Nothing);
1395
1406
  n.goToItem(L.Specific, e.id);
1396
1407
  }
1397
1408
  let d = pn();
1398
- function v(m) {
1399
- d.update(m);
1409
+ function m(p) {
1410
+ d.update(p);
1400
1411
  }
1401
- function f(m) {
1402
- d.wasMoved(m) && (e.disabled || i.value || n.goToItem(L.Specific, e.id, 0));
1412
+ function f(p) {
1413
+ d.wasMoved(p) && (e.disabled || i.value || n.goToItem(L.Specific, e.id, 0));
1403
1414
  }
1404
- function g(m) {
1405
- d.wasMoved(m) && (e.disabled || i.value && n.goToItem(L.Nothing));
1415
+ function v(p) {
1416
+ d.wasMoved(p) && (e.disabled || i.value && n.goToItem(L.Nothing));
1406
1417
  }
1407
1418
  return () => {
1408
- let { disabled: m } = e, b = { active: i.value, disabled: m, close: n.closeMenu }, { id: p, ...S } = e;
1409
- return z({ ourProps: { id: p, ref: r, role: "menuitem", tabIndex: m === !0 ? void 0 : -1, "aria-disabled": m === !0 ? !0 : void 0, disabled: void 0, onClick: s, onFocus: a, onPointerenter: v, onMouseenter: v, onPointermove: f, onMousemove: f, onPointerleave: g, onMouseleave: g }, theirProps: { ...l, ...S }, slot: b, attrs: l, slots: t, name: "MenuItem" });
1419
+ let { disabled: p } = e, b = { active: i.value, disabled: p, close: n.closeMenu }, { id: g, ...y } = e;
1420
+ return z({ ourProps: { id: g, ref: r, role: "menuitem", tabIndex: p === !0 ? void 0 : -1, "aria-disabled": p === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: m, onMouseenter: m, onPointermove: f, onMousemove: f, onPointerleave: v, onMouseleave: v }, theirProps: { ...l, ...y }, slot: b, attrs: l, slots: t, name: "MenuItem" });
1410
1421
  };
1411
1422
  } }), hn = Symbol("LabelContext");
1412
1423
  function yn() {
@@ -1425,18 +1436,18 @@ function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
1425
1436
  i !== -1 && o.value.splice(i, 1);
1426
1437
  };
1427
1438
  }
1428
- return ye(hn, { register: n, slot: e, name: t, props: l }), w(() => o.value.length > 0 ? o.value.join(" ") : void 0);
1439
+ return ye(hn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
1429
1440
  }
1430
1441
  $({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${J()}` } }, setup(e, { slots: t, attrs: l }) {
1431
1442
  let o = yn();
1432
1443
  return ee(() => Fe(o.register(e.id))), () => {
1433
- let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...s } = e, a = { ...Object.entries(i).reduce((d, [v, f]) => Object.assign(d, { [v]: P(f) }), {}), id: u };
1434
- return c && (delete a.onClick, delete a.htmlFor, delete s.onClick), z({ ourProps: a, theirProps: s, slot: r, attrs: l, slots: t, name: n });
1444
+ let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [m, f]) => Object.assign(d, { [m]: P(f) }), {}), id: u };
1445
+ return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), z({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
1435
1446
  };
1436
1447
  } });
1437
1448
  let xn = Symbol("GroupContext");
1438
1449
  $({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
1439
- let o = O(null), n = hl({ name: "SwitchLabel", props: { htmlFor: w(() => {
1450
+ let o = O(null), n = hl({ name: "SwitchLabel", props: { htmlFor: k(() => {
1440
1451
  var i;
1441
1452
  return (i = o.value) == null ? void 0 : i.id;
1442
1453
  }), onClick(i) {
@@ -1445,40 +1456,40 @@ $({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "templa
1445
1456
  return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => z({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
1446
1457
  } });
1447
1458
  let yl = $({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${J()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: l, slots: o, expose: n }) {
1448
- let r = he(xn, null), [i, u] = fn(w(() => e.modelValue), (b) => t("update:modelValue", b), w(() => e.defaultChecked));
1459
+ let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (b) => t("update:modelValue", b), k(() => e.defaultChecked));
1449
1460
  function c() {
1450
1461
  u(!i.value);
1451
1462
  }
1452
- let s = O(null), a = r === null ? s : r.switchRef, d = at(w(() => ({ as: e.as, type: l.type })), a);
1453
- n({ el: a, $el: a });
1454
- function v(b) {
1463
+ let a = O(null), s = r === null ? a : r.switchRef, d = at(k(() => ({ as: e.as, type: l.type })), s);
1464
+ n({ el: s, $el: s });
1465
+ function m(b) {
1455
1466
  b.preventDefault(), c();
1456
1467
  }
1457
1468
  function f(b) {
1458
1469
  b.key === D.Space ? (b.preventDefault(), c()) : b.key === D.Enter && Qo(b.currentTarget);
1459
1470
  }
1460
- function g(b) {
1471
+ function v(b) {
1461
1472
  b.preventDefault();
1462
1473
  }
1463
- let m = w(() => {
1464
- var b, p;
1465
- return (p = (b = E(a)) == null ? void 0 : b.closest) == null ? void 0 : p.call(b, "form");
1474
+ let p = k(() => {
1475
+ var b, g;
1476
+ return (g = (b = R(s)) == null ? void 0 : b.closest) == null ? void 0 : g.call(b, "form");
1466
1477
  });
1467
1478
  return ee(() => {
1468
- Z([m], () => {
1469
- if (!m.value || e.defaultChecked === void 0)
1479
+ Z([p], () => {
1480
+ if (!p.value || e.defaultChecked === void 0)
1470
1481
  return;
1471
1482
  function b() {
1472
1483
  u(e.defaultChecked);
1473
1484
  }
1474
- return m.value.addEventListener("reset", b), () => {
1475
- var p;
1476
- (p = m.value) == null || p.removeEventListener("reset", b);
1485
+ return p.value.addEventListener("reset", b), () => {
1486
+ var g;
1487
+ (g = p.value) == null || g.removeEventListener("reset", b);
1477
1488
  };
1478
1489
  }, { immediate: !0 });
1479
1490
  }), () => {
1480
- let { id: b, name: p, value: S, form: y, ...x } = e, k = { checked: i.value }, _ = { id: b, ref: a, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: v, onKeyup: f, onKeypress: g };
1481
- return Ce(be, [p != null && i.value != null ? Ce(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: y, name: p, value: S })) : null, z({ ourProps: _, theirProps: { ...l, ...it(x, ["modelValue", "defaultChecked"]) }, slot: k, attrs: l, slots: o, name: "Switch" })]);
1491
+ let { id: b, name: g, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: b, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: m, onKeyup: f, onKeypress: v };
1492
+ return Ce(be, [g != null && i.value != null ? Ce(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: g, value: y })) : null, z({ ourProps: _, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
1482
1493
  };
1483
1494
  } });
1484
1495
  const Ae = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
@@ -1551,7 +1562,7 @@ function Cl(e, t, l, o) {
1551
1562
  function Ve(e) {
1552
1563
  return e.replace(/left|right|bottom|top/g, (t) => xl[t]);
1553
1564
  }
1554
- function Rl(e) {
1565
+ function El(e) {
1555
1566
  return {
1556
1567
  top: 0,
1557
1568
  right: 0,
@@ -1560,8 +1571,8 @@ function Rl(e) {
1560
1571
  ...e
1561
1572
  };
1562
1573
  }
1563
- function El(e) {
1564
- return typeof e != "number" ? Rl(e) : {
1574
+ function Rl(e) {
1575
+ return typeof e != "number" ? El(e) : {
1565
1576
  top: e,
1566
1577
  right: e,
1567
1578
  bottom: e,
@@ -1582,18 +1593,18 @@ function It(e, t, l) {
1582
1593
  reference: o,
1583
1594
  floating: n
1584
1595
  } = e;
1585
- const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), s = r === "y", a = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2, v = o[u] / 2 - n[u] / 2;
1596
+ const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2, m = o[u] / 2 - n[u] / 2;
1586
1597
  let f;
1587
1598
  switch (c) {
1588
1599
  case "top":
1589
1600
  f = {
1590
- x: a,
1601
+ x: s,
1591
1602
  y: o.y - n.height
1592
1603
  };
1593
1604
  break;
1594
1605
  case "bottom":
1595
1606
  f = {
1596
- x: a,
1607
+ x: s,
1597
1608
  y: o.y + o.height
1598
1609
  };
1599
1610
  break;
@@ -1617,10 +1628,10 @@ function It(e, t, l) {
1617
1628
  }
1618
1629
  switch (We(t)) {
1619
1630
  case "start":
1620
- f[i] -= v * (l && s ? -1 : 1);
1631
+ f[i] -= m * (l && a ? -1 : 1);
1621
1632
  break;
1622
1633
  case "end":
1623
- f[i] += v * (l && s ? -1 : 1);
1634
+ f[i] += m * (l && a ? -1 : 1);
1624
1635
  break;
1625
1636
  }
1626
1637
  return f;
@@ -1632,59 +1643,59 @@ const Dl = async (e, t, l) => {
1632
1643
  middleware: r = [],
1633
1644
  platform: i
1634
1645
  } = l, u = r.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
1635
- let s = await i.getElementRects({
1646
+ let a = await i.getElementRects({
1636
1647
  reference: e,
1637
1648
  floating: t,
1638
1649
  strategy: n
1639
1650
  }), {
1640
- x: a,
1651
+ x: s,
1641
1652
  y: d
1642
- } = It(s, o, c), v = o, f = {}, g = 0;
1643
- for (let m = 0; m < u.length; m++) {
1653
+ } = It(a, o, c), m = o, f = {}, v = 0;
1654
+ for (let p = 0; p < u.length; p++) {
1644
1655
  const {
1645
1656
  name: b,
1646
- fn: p
1647
- } = u[m], {
1648
- x: S,
1649
- y,
1650
- data: x,
1651
- reset: k
1652
- } = await p({
1653
- x: a,
1657
+ fn: g
1658
+ } = u[p], {
1659
+ x: y,
1660
+ y: x,
1661
+ data: w,
1662
+ reset: S
1663
+ } = await g({
1664
+ x: s,
1654
1665
  y: d,
1655
1666
  initialPlacement: o,
1656
- placement: v,
1667
+ placement: m,
1657
1668
  strategy: n,
1658
1669
  middlewareData: f,
1659
- rects: s,
1670
+ rects: a,
1660
1671
  platform: i,
1661
1672
  elements: {
1662
1673
  reference: e,
1663
1674
  floating: t
1664
1675
  }
1665
1676
  });
1666
- if (a = S ?? a, d = y ?? d, f = {
1677
+ if (s = y ?? s, d = x ?? d, f = {
1667
1678
  ...f,
1668
1679
  [b]: {
1669
1680
  ...f[b],
1670
- ...x
1681
+ ...w
1671
1682
  }
1672
- }, k && g <= 50) {
1673
- g++, typeof k == "object" && (k.placement && (v = k.placement), k.rects && (s = k.rects === !0 ? await i.getElementRects({
1683
+ }, S && v <= 50) {
1684
+ v++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
1674
1685
  reference: e,
1675
1686
  floating: t,
1676
1687
  strategy: n
1677
- }) : k.rects), {
1678
- x: a,
1688
+ }) : S.rects), {
1689
+ x: s,
1679
1690
  y: d
1680
- } = It(s, v, c)), m = -1;
1691
+ } = It(a, m, c)), p = -1;
1681
1692
  continue;
1682
1693
  }
1683
1694
  }
1684
1695
  return {
1685
- x: a,
1696
+ x: s,
1686
1697
  y: d,
1687
- placement: v,
1698
+ placement: m,
1688
1699
  strategy: n,
1689
1700
  middlewareData: f
1690
1701
  };
@@ -1700,36 +1711,36 @@ async function On(e, t) {
1700
1711
  elements: u,
1701
1712
  strategy: c
1702
1713
  } = e, {
1703
- boundary: s = "clippingAncestors",
1704
- rootBoundary: a = "viewport",
1714
+ boundary: a = "clippingAncestors",
1715
+ rootBoundary: s = "viewport",
1705
1716
  elementContext: d = "floating",
1706
- altBoundary: v = !1,
1717
+ altBoundary: m = !1,
1707
1718
  padding: f = 0
1708
- } = He(t, e), g = El(f), b = u[v ? d === "floating" ? "reference" : "floating" : d], p = Ne(await r.getClippingRect({
1719
+ } = He(t, e), v = Rl(f), b = u[m ? d === "floating" ? "reference" : "floating" : d], g = Ne(await r.getClippingRect({
1709
1720
  element: (l = await (r.isElement == null ? void 0 : r.isElement(b))) == null || l ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
1710
- boundary: s,
1711
- rootBoundary: a,
1721
+ boundary: a,
1722
+ rootBoundary: s,
1712
1723
  strategy: c
1713
- })), S = d === "floating" ? {
1724
+ })), y = d === "floating" ? {
1714
1725
  ...i.floating,
1715
1726
  x: o,
1716
1727
  y: n
1717
- } : i.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), x = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
1728
+ } : i.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), w = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
1718
1729
  x: 1,
1719
1730
  y: 1
1720
1731
  } : {
1721
1732
  x: 1,
1722
1733
  y: 1
1723
- }, k = Ne(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1724
- rect: S,
1725
- offsetParent: y,
1734
+ }, S = Ne(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1735
+ rect: y,
1736
+ offsetParent: x,
1726
1737
  strategy: c
1727
- }) : S);
1738
+ }) : y);
1728
1739
  return {
1729
- top: (p.top - k.top + g.top) / x.y,
1730
- bottom: (k.bottom - p.bottom + g.bottom) / x.y,
1731
- left: (p.left - k.left + g.left) / x.x,
1732
- right: (k.right - p.right + g.right) / x.x
1740
+ top: (g.top - S.top + v.top) / w.y,
1741
+ bottom: (S.bottom - g.bottom + v.bottom) / w.y,
1742
+ left: (g.left - S.left + v.left) / w.x,
1743
+ right: (S.right - g.right + v.right) / w.x
1733
1744
  };
1734
1745
  }
1735
1746
  const Pl = function(e) {
@@ -1744,24 +1755,24 @@ const Pl = function(e) {
1744
1755
  rects: i,
1745
1756
  initialPlacement: u,
1746
1757
  platform: c,
1747
- elements: s
1758
+ elements: a
1748
1759
  } = t, {
1749
- mainAxis: a = !0,
1760
+ mainAxis: s = !0,
1750
1761
  crossAxis: d = !0,
1751
- fallbackPlacements: v,
1762
+ fallbackPlacements: m,
1752
1763
  fallbackStrategy: f = "bestFit",
1753
- fallbackAxisSideDirection: g = "none",
1754
- flipAlignment: m = !0,
1764
+ fallbackAxisSideDirection: v = "none",
1765
+ flipAlignment: p = !0,
1755
1766
  ...b
1756
1767
  } = He(e, t);
1757
1768
  if ((l = r.arrow) != null && l.alignmentOffset)
1758
1769
  return {};
1759
- const p = ce(n), S = ce(u) === u, y = await (c.isRTL == null ? void 0 : c.isRTL(s.floating)), x = v || (S || !m ? [Ve(u)] : Sl(u));
1760
- !v && g !== "none" && x.push(...Cl(u, m, g, y));
1761
- const k = [u, ...x], _ = await On(t, b), C = [];
1770
+ const g = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = m || (y || !p ? [Ve(u)] : Sl(u));
1771
+ !m && v !== "none" && w.push(...Cl(u, p, v, x));
1772
+ const S = [u, ...w], _ = await On(t, b), C = [];
1762
1773
  let F = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1763
- if (a && C.push(_[p]), d) {
1764
- const se = kl(n, i, y);
1774
+ if (s && C.push(_[g]), d) {
1775
+ const se = kl(n, i, x);
1765
1776
  C.push(_[se[0]], _[se[1]]);
1766
1777
  }
1767
1778
  if (F = [...F, {
@@ -1769,7 +1780,7 @@ const Pl = function(e) {
1769
1780
  overflows: C
1770
1781
  }], !C.every((se) => se <= 0)) {
1771
1782
  var re, _e;
1772
- const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = k[se];
1783
+ const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
1773
1784
  if (bt)
1774
1785
  return {
1775
1786
  data: {
@@ -1809,11 +1820,11 @@ async function _l(e, t) {
1809
1820
  placement: l,
1810
1821
  platform: o,
1811
1822
  elements: n
1812
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", s = ["left", "top"].includes(i) ? -1 : 1, a = r && c ? -1 : 1, d = He(t, e);
1823
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d = He(t, e);
1813
1824
  let {
1814
- mainAxis: v,
1825
+ mainAxis: m,
1815
1826
  crossAxis: f,
1816
- alignmentAxis: g
1827
+ alignmentAxis: v
1817
1828
  } = typeof d == "number" ? {
1818
1829
  mainAxis: d,
1819
1830
  crossAxis: 0,
@@ -1824,12 +1835,12 @@ async function _l(e, t) {
1824
1835
  alignmentAxis: null,
1825
1836
  ...d
1826
1837
  };
1827
- return u && typeof g == "number" && (f = u === "end" ? g * -1 : g), c ? {
1828
- x: f * a,
1829
- y: v * s
1838
+ return u && typeof v == "number" && (f = u === "end" ? v * -1 : v), c ? {
1839
+ x: f * s,
1840
+ y: m * a
1830
1841
  } : {
1831
- x: v * s,
1832
- y: f * a
1842
+ x: m * a,
1843
+ y: f * s
1833
1844
  };
1834
1845
  }
1835
1846
  const Tl = function(e) {
@@ -1869,39 +1880,39 @@ const Tl = function(e) {
1869
1880
  limiter: u = {
1870
1881
  fn: (b) => {
1871
1882
  let {
1872
- x: p,
1873
- y: S
1883
+ x: g,
1884
+ y
1874
1885
  } = b;
1875
1886
  return {
1876
- x: p,
1877
- y: S
1887
+ x: g,
1888
+ y
1878
1889
  };
1879
1890
  }
1880
1891
  },
1881
1892
  ...c
1882
- } = He(e, t), s = {
1893
+ } = He(e, t), a = {
1883
1894
  x: l,
1884
1895
  y: o
1885
- }, a = await On(t, c), d = Ke(ce(n)), v = wn(d);
1886
- let f = s[v], g = s[d];
1896
+ }, s = await On(t, c), d = Ke(ce(n)), m = wn(d);
1897
+ let f = a[m], v = a[d];
1887
1898
  if (r) {
1888
- const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", S = f + a[b], y = f - a[p];
1889
- f = Lt(S, f, y);
1899
+ const b = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", y = f + s[b], x = f - s[g];
1900
+ f = Lt(y, f, x);
1890
1901
  }
1891
1902
  if (i) {
1892
- const b = d === "y" ? "top" : "left", p = d === "y" ? "bottom" : "right", S = g + a[b], y = g - a[p];
1893
- g = Lt(S, g, y);
1903
+ const b = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = v + s[b], x = v - s[g];
1904
+ v = Lt(y, v, x);
1894
1905
  }
1895
- const m = u.fn({
1906
+ const p = u.fn({
1896
1907
  ...t,
1897
- [v]: f,
1898
- [d]: g
1908
+ [m]: f,
1909
+ [d]: v
1899
1910
  });
1900
1911
  return {
1901
- ...m,
1912
+ ...p,
1902
1913
  data: {
1903
- x: m.x - l,
1904
- y: m.y - o
1914
+ x: p.x - l,
1915
+ y: p.y - o
1905
1916
  }
1906
1917
  };
1907
1918
  }
@@ -1989,13 +2000,13 @@ function Cn(e) {
1989
2000
  const t = ge(e);
1990
2001
  return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && Pe(t) ? t : Cn(t);
1991
2002
  }
1992
- function Ee(e, t, l) {
2003
+ function Re(e, t, l) {
1993
2004
  var o;
1994
2005
  t === void 0 && (t = []), l === void 0 && (l = !0);
1995
2006
  const n = Cn(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
1996
- return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
2007
+ return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Re(i.frameElement) : []) : t.concat(n, Re(n, [], l));
1997
2008
  }
1998
- function Rn(e) {
2009
+ function En(e) {
1999
2010
  const t = q(e);
2000
2011
  let l = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
2001
2012
  const n = Q(e), r = n ? e.offsetWidth : l, i = n ? e.offsetHeight : o, u = Me(l) !== r || Me(o) !== i;
@@ -2016,7 +2027,7 @@ function ve(e) {
2016
2027
  width: o,
2017
2028
  height: n,
2018
2029
  $: r
2019
- } = Rn(t);
2030
+ } = En(t);
2020
2031
  let i = (r ? Me(l.width) : l.width) / o, u = (r ? Me(l.height) : l.height) / n;
2021
2032
  return (!i || !Number.isFinite(i)) && (i = 1), (!u || !Number.isFinite(u)) && (u = 1), {
2022
2033
  x: i,
@@ -2024,7 +2035,7 @@ function ve(e) {
2024
2035
  };
2025
2036
  }
2026
2037
  const Al = /* @__PURE__ */ ae(0);
2027
- function En(e) {
2038
+ function Rn(e) {
2028
2039
  const t = H(e);
2029
2040
  return !mt() || !t.visualViewport ? Al : {
2030
2041
  x: t.visualViewport.offsetLeft,
@@ -2039,21 +2050,21 @@ function de(e, t, l, o) {
2039
2050
  const n = e.getBoundingClientRect(), r = vt(e);
2040
2051
  let i = ae(1);
2041
2052
  t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
2042
- const u = Ml(r, l, o) ? En(r) : ae(0);
2043
- let c = (n.left + u.x) / i.x, s = (n.top + u.y) / i.y, a = n.width / i.x, d = n.height / i.y;
2053
+ const u = Ml(r, l, o) ? Rn(r) : ae(0);
2054
+ let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, d = n.height / i.y;
2044
2055
  if (r) {
2045
- const v = H(r), f = o && oe(o) ? H(o) : o;
2046
- let g = v.frameElement;
2047
- for (; g && o && f !== v; ) {
2048
- const m = ve(g), b = g.getBoundingClientRect(), p = q(g), S = b.left + (g.clientLeft + parseFloat(p.paddingLeft)) * m.x, y = b.top + (g.clientTop + parseFloat(p.paddingTop)) * m.y;
2049
- c *= m.x, s *= m.y, a *= m.x, d *= m.y, c += S, s += y, g = H(g).frameElement;
2056
+ const m = H(r), f = o && oe(o) ? H(o) : o;
2057
+ let v = m.frameElement;
2058
+ for (; v && o && f !== m; ) {
2059
+ const p = ve(v), b = v.getBoundingClientRect(), g = q(v), y = b.left + (v.clientLeft + parseFloat(g.paddingLeft)) * p.x, x = b.top + (v.clientTop + parseFloat(g.paddingTop)) * p.y;
2060
+ c *= p.x, a *= p.y, s *= p.x, d *= p.y, c += y, a += x, v = H(v).frameElement;
2050
2061
  }
2051
2062
  }
2052
2063
  return Ne({
2053
- width: a,
2064
+ width: s,
2054
2065
  height: d,
2055
2066
  x: c,
2056
- y: s
2067
+ y: a
2057
2068
  });
2058
2069
  }
2059
2070
  function Vl(e) {
@@ -2071,8 +2082,8 @@ function Vl(e) {
2071
2082
  }, u = ae(1);
2072
2083
  const c = ae(0);
2073
2084
  if ((n || !n && o !== "fixed") && ((ne(l) !== "body" || Pe(r)) && (i = qe(l)), Q(l))) {
2074
- const s = de(l);
2075
- u = ve(l), c.x = s.x + l.clientLeft, c.y = s.y + l.clientTop;
2085
+ const a = de(l);
2086
+ u = ve(l), c.x = a.x + l.clientLeft, c.y = a.y + l.clientTop;
2076
2087
  }
2077
2088
  return {
2078
2089
  width: t.width * u.x,
@@ -2103,8 +2114,8 @@ function Bl(e, t) {
2103
2114
  let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
2104
2115
  if (n) {
2105
2116
  r = n.width, i = n.height;
2106
- const s = mt();
2107
- (!s || s && t === "fixed") && (u = n.offsetLeft, c = n.offsetTop);
2117
+ const a = mt();
2118
+ (!a || a && t === "fixed") && (u = n.offsetLeft, c = n.offsetTop);
2108
2119
  }
2109
2120
  return {
2110
2121
  width: r,
@@ -2114,12 +2125,12 @@ function Bl(e, t) {
2114
2125
  };
2115
2126
  }
2116
2127
  function jl(e, t) {
2117
- const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Q(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, s = o * r.y;
2128
+ const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Q(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = o * r.y;
2118
2129
  return {
2119
2130
  width: i,
2120
2131
  height: u,
2121
2132
  x: c,
2122
- y: s
2133
+ y: a
2123
2134
  };
2124
2135
  }
2125
2136
  function At(e, t, l) {
@@ -2131,7 +2142,7 @@ function At(e, t, l) {
2131
2142
  else if (oe(t))
2132
2143
  o = jl(t, l);
2133
2144
  else {
2134
- const n = En(e);
2145
+ const n = Rn(e);
2135
2146
  o = {
2136
2147
  ...t,
2137
2148
  x: t.x - n.x,
@@ -2148,12 +2159,12 @@ function zl(e, t) {
2148
2159
  const l = t.get(e);
2149
2160
  if (l)
2150
2161
  return l;
2151
- let o = Ee(e, [], !1).filter((u) => oe(u) && ne(u) !== "body"), n = null;
2162
+ let o = Re(e, [], !1).filter((u) => oe(u) && ne(u) !== "body"), n = null;
2152
2163
  const r = q(e).position === "fixed";
2153
2164
  let i = r ? ge(e) : e;
2154
2165
  for (; oe(i) && !Ge(i); ) {
2155
2166
  const u = q(i), c = pt(i);
2156
- !c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Pe(i) && !c && Pn(e, i)) ? o = o.filter((a) => a !== i) : n = u, i = ge(i);
2167
+ !c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Pe(i) && !c && Pn(e, i)) ? o = o.filter((s) => s !== i) : n = u, i = ge(i);
2157
2168
  }
2158
2169
  return t.set(e, o), o;
2159
2170
  }
@@ -2164,9 +2175,9 @@ function Ul(e) {
2164
2175
  rootBoundary: o,
2165
2176
  strategy: n
2166
2177
  } = e;
2167
- const i = [...l === "clippingAncestors" ? zl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((s, a) => {
2168
- const d = At(t, a, n);
2169
- return s.top = ue(d.top, s.top), s.right = Ae(d.right, s.right), s.bottom = Ae(d.bottom, s.bottom), s.left = ue(d.left, s.left), s;
2178
+ const i = [...l === "clippingAncestors" ? zl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
2179
+ const d = At(t, s, n);
2180
+ return a.top = ue(d.top, a.top), a.right = Ae(d.right, a.right), a.bottom = Ae(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
2170
2181
  }, At(t, u, n));
2171
2182
  return {
2172
2183
  width: c.right - c.left,
@@ -2179,7 +2190,7 @@ function Hl(e) {
2179
2190
  const {
2180
2191
  width: t,
2181
2192
  height: l
2182
- } = Rn(e);
2193
+ } = En(e);
2183
2194
  return {
2184
2195
  width: t,
2185
2196
  height: l
@@ -2194,8 +2205,8 @@ function Wl(e, t, l) {
2194
2205
  const c = ae(0);
2195
2206
  if (o || !o && !r)
2196
2207
  if ((ne(t) !== "body" || Pe(n)) && (u = qe(t)), o) {
2197
- const s = de(t, !0, r, t);
2198
- c.x = s.x + t.clientLeft, c.y = s.y + t.clientTop;
2208
+ const a = de(t, !0, r, t);
2209
+ c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
2199
2210
  } else
2200
2211
  n && (c.x = Dn(n));
2201
2212
  return {
@@ -2257,37 +2268,37 @@ function Xl(e, t) {
2257
2268
  function i(u, c) {
2258
2269
  u === void 0 && (u = !1), c === void 0 && (c = 1), r();
2259
2270
  const {
2260
- left: s,
2261
- top: a,
2271
+ left: a,
2272
+ top: s,
2262
2273
  width: d,
2263
- height: v
2274
+ height: m
2264
2275
  } = e.getBoundingClientRect();
2265
- if (u || t(), !d || !v)
2276
+ if (u || t(), !d || !m)
2266
2277
  return;
2267
- const f = Ie(a), g = Ie(n.clientWidth - (s + d)), m = Ie(n.clientHeight - (a + v)), b = Ie(s), S = {
2268
- rootMargin: -f + "px " + -g + "px " + -m + "px " + -b + "px",
2278
+ const f = Ie(s), v = Ie(n.clientWidth - (a + d)), p = Ie(n.clientHeight - (s + m)), b = Ie(a), y = {
2279
+ rootMargin: -f + "px " + -v + "px " + -p + "px " + -b + "px",
2269
2280
  threshold: ue(0, Ae(1, c)) || 1
2270
2281
  };
2271
- let y = !0;
2272
- function x(k) {
2273
- const _ = k[0].intersectionRatio;
2282
+ let x = !0;
2283
+ function w(S) {
2284
+ const _ = S[0].intersectionRatio;
2274
2285
  if (_ !== c) {
2275
- if (!y)
2286
+ if (!x)
2276
2287
  return i();
2277
2288
  _ ? i(!1, _) : o = setTimeout(() => {
2278
2289
  i(!1, 1e-7);
2279
2290
  }, 100);
2280
2291
  }
2281
- y = !1;
2292
+ x = !1;
2282
2293
  }
2283
2294
  try {
2284
- l = new IntersectionObserver(x, {
2285
- ...S,
2295
+ l = new IntersectionObserver(w, {
2296
+ ...y,
2286
2297
  // Handle <iframe>s
2287
2298
  root: n.ownerDocument
2288
2299
  });
2289
2300
  } catch {
2290
- l = new IntersectionObserver(x, S);
2301
+ l = new IntersectionObserver(w, y);
2291
2302
  }
2292
2303
  l.observe(e);
2293
2304
  }
@@ -2301,30 +2312,30 @@ function Yl(e, t, l, o) {
2301
2312
  elementResize: i = typeof ResizeObserver == "function",
2302
2313
  layoutShift: u = typeof IntersectionObserver == "function",
2303
2314
  animationFrame: c = !1
2304
- } = o, s = vt(e), a = n || r ? [...s ? Ee(s) : [], ...Ee(t)] : [];
2305
- a.forEach((p) => {
2306
- n && p.addEventListener("scroll", l, {
2315
+ } = o, a = vt(e), s = n || r ? [...a ? Re(a) : [], ...Re(t)] : [];
2316
+ s.forEach((g) => {
2317
+ n && g.addEventListener("scroll", l, {
2307
2318
  passive: !0
2308
- }), r && p.addEventListener("resize", l);
2319
+ }), r && g.addEventListener("resize", l);
2309
2320
  });
2310
- const d = s && u ? Xl(s, l) : null;
2311
- let v = -1, f = null;
2312
- i && (f = new ResizeObserver((p) => {
2313
- let [S] = p;
2314
- S && S.target === s && f && (f.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
2321
+ const d = a && u ? Xl(a, l) : null;
2322
+ let m = -1, f = null;
2323
+ i && (f = new ResizeObserver((g) => {
2324
+ let [y] = g;
2325
+ y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
2315
2326
  f && f.observe(t);
2316
2327
  })), l();
2317
- }), s && !c && f.observe(s), f.observe(t));
2318
- let g, m = c ? de(e) : null;
2328
+ }), a && !c && f.observe(a), f.observe(t));
2329
+ let v, p = c ? de(e) : null;
2319
2330
  c && b();
2320
2331
  function b() {
2321
- const p = de(e);
2322
- m && (p.x !== m.x || p.y !== m.y || p.width !== m.width || p.height !== m.height) && l(), m = p, g = requestAnimationFrame(b);
2332
+ const g = de(e);
2333
+ p && (g.x !== p.x || g.y !== p.y || g.width !== p.width || g.height !== p.height) && l(), p = g, v = requestAnimationFrame(b);
2323
2334
  }
2324
2335
  return l(), () => {
2325
- a.forEach((p) => {
2326
- n && p.removeEventListener("scroll", l), r && p.removeEventListener("resize", l);
2327
- }), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(g);
2336
+ s.forEach((g) => {
2337
+ n && g.removeEventListener("scroll", l), r && g.removeEventListener("resize", l);
2338
+ }), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(v);
2328
2339
  };
2329
2340
  }
2330
2341
  const Zl = Ll, Ql = Pl, Jl = (e, t, l) => {
@@ -2359,31 +2370,31 @@ function Nt(e, t) {
2359
2370
  }
2360
2371
  function tr(e, t, l) {
2361
2372
  l === void 0 && (l = {});
2362
- const o = l.whileElementsMounted, n = w(() => {
2373
+ const o = l.whileElementsMounted, n = k(() => {
2363
2374
  var C;
2364
2375
  return (C = P(l.open)) != null ? C : !0;
2365
- }), r = w(() => P(l.middleware)), i = w(() => {
2376
+ }), r = k(() => P(l.middleware)), i = k(() => {
2366
2377
  var C;
2367
2378
  return (C = P(l.placement)) != null ? C : "bottom";
2368
- }), u = w(() => {
2379
+ }), u = k(() => {
2369
2380
  var C;
2370
2381
  return (C = P(l.strategy)) != null ? C : "absolute";
2371
- }), c = w(() => {
2382
+ }), c = k(() => {
2372
2383
  var C;
2373
2384
  return (C = P(l.transform)) != null ? C : !0;
2374
- }), s = w(() => Vt(e.value)), a = w(() => Vt(t.value)), d = O(0), v = O(0), f = O(u.value), g = O(i.value), m = Vn({}), b = O(!1), p = w(() => {
2385
+ }), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d = O(0), m = O(0), f = O(u.value), v = O(i.value), p = Vn({}), b = O(!1), g = k(() => {
2375
2386
  const C = {
2376
2387
  position: f.value,
2377
2388
  left: "0",
2378
2389
  top: "0"
2379
2390
  };
2380
- if (!a.value)
2391
+ if (!s.value)
2381
2392
  return C;
2382
- const F = Nt(a.value, d.value), re = Nt(a.value, v.value);
2393
+ const F = Nt(s.value, d.value), re = Nt(s.value, m.value);
2383
2394
  return c.value ? {
2384
2395
  ...C,
2385
2396
  transform: "translate(" + F + "px, " + re + "px)",
2386
- ...Tn(a.value) >= 1.5 && {
2397
+ ...Tn(s.value) >= 1.5 && {
2387
2398
  willChange: "transform"
2388
2399
  }
2389
2400
  } : {
@@ -2392,47 +2403,47 @@ function tr(e, t, l) {
2392
2403
  top: re + "px"
2393
2404
  };
2394
2405
  });
2395
- let S;
2396
- function y() {
2397
- s.value == null || a.value == null || Jl(s.value, a.value, {
2406
+ let y;
2407
+ function x() {
2408
+ a.value == null || s.value == null || Jl(a.value, s.value, {
2398
2409
  middleware: r.value,
2399
2410
  placement: i.value,
2400
2411
  strategy: u.value
2401
2412
  }).then((C) => {
2402
- d.value = C.x, v.value = C.y, f.value = C.strategy, g.value = C.placement, m.value = C.middlewareData, b.value = !0;
2413
+ d.value = C.x, m.value = C.y, f.value = C.strategy, v.value = C.placement, p.value = C.middlewareData, b.value = !0;
2403
2414
  });
2404
2415
  }
2405
- function x() {
2406
- typeof S == "function" && (S(), S = void 0);
2416
+ function w() {
2417
+ typeof y == "function" && (y(), y = void 0);
2407
2418
  }
2408
- function k() {
2409
- if (x(), o === void 0) {
2410
- y();
2419
+ function S() {
2420
+ if (w(), o === void 0) {
2421
+ x();
2411
2422
  return;
2412
2423
  }
2413
- if (s.value != null && a.value != null) {
2414
- S = o(s.value, a.value, y);
2424
+ if (a.value != null && s.value != null) {
2425
+ y = o(a.value, s.value, x);
2415
2426
  return;
2416
2427
  }
2417
2428
  }
2418
2429
  function _() {
2419
2430
  n.value || (b.value = !1);
2420
2431
  }
2421
- return Z([r, i, u], y, {
2432
+ return Z([r, i, u], x, {
2422
2433
  flush: "sync"
2423
- }), Z([s, a], k, {
2434
+ }), Z([a, s], S, {
2424
2435
  flush: "sync"
2425
2436
  }), Z(n, _, {
2426
2437
  flush: "sync"
2427
- }), Nn() && Fn(x), {
2438
+ }), Nn() && Fn(w), {
2428
2439
  x: me(d),
2429
- y: me(v),
2440
+ y: me(m),
2430
2441
  strategy: me(f),
2431
- placement: me(g),
2432
- middlewareData: me(m),
2442
+ placement: me(v),
2443
+ middlewareData: me(p),
2433
2444
  isPositioned: me(b),
2434
- floatingStyles: p,
2435
- update: y
2445
+ floatingStyles: g,
2446
+ update: x
2436
2447
  };
2437
2448
  }
2438
2449
  const _r = /* @__PURE__ */ $({
@@ -2447,7 +2458,7 @@ const _r = /* @__PURE__ */ $({
2447
2458
  whileElementsMounted: Yl,
2448
2459
  middleware: [Tl(6), Ql(), Zl({ padding: 6 })]
2449
2460
  });
2450
- return (i, u) => (R(), K(P(ml), {
2461
+ return (i, u) => (E(), K(P(ml), {
2451
2462
  as: "div",
2452
2463
  class: "inline-block text-left"
2453
2464
  }, {
@@ -2467,7 +2478,7 @@ const _r = /* @__PURE__ */ $({
2467
2478
  ]),
2468
2479
  _: 3
2469
2480
  }, 512),
2470
- (R(), K(Bn, {
2481
+ (E(), K(Bn, {
2471
2482
  to: typeof i.usePortal == "string" ? i.usePortal : "body",
2472
2483
  disabled: !i.usePortal
2473
2484
  }, [
@@ -2517,9 +2528,9 @@ const _r = /* @__PURE__ */ $({
2517
2528
  as: {}
2518
2529
  },
2519
2530
  setup(e) {
2520
- return (t, l) => (R(), K(P(bl), jn(zn({ disabled: t.disabled })), {
2531
+ return (t, l) => (E(), K(P(bl), jn(zn({ disabled: t.disabled })), {
2521
2532
  default: W(({ active: o }) => [
2522
- (R(), K(Un(t.as || "span"), {
2533
+ (E(), K(Un(t.as || "span"), {
2523
2534
  class: A(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
2524
2535
  o ? "bg-grey-200" : "",
2525
2536
  t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
@@ -2527,7 +2538,7 @@ const _r = /* @__PURE__ */ $({
2527
2538
  }, {
2528
2539
  default: W(() => [
2529
2540
  I("span", null, B(t.label), 1),
2530
- t.meta ? (R(), T("span", nr, B(t.meta), 1)) : M("", !0)
2541
+ t.meta ? (E(), T("span", nr, B(t.meta), 1)) : M("", !0)
2531
2542
  ]),
2532
2543
  _: 2
2533
2544
  }, 1032, ["class"]))
@@ -2564,15 +2575,15 @@ const _r = /* @__PURE__ */ $({
2564
2575
  return Z(
2565
2576
  () => l.modelValue,
2566
2577
  (c) => {
2567
- var s;
2568
- c && c.id !== ((s = o.value) == null ? void 0 : s.id) && (o.value = c);
2578
+ var a;
2579
+ c && c.id !== ((a = o.value) == null ? void 0 : a.id) && (o.value = c);
2569
2580
  }
2570
2581
  ), Z(o, (c) => {
2571
2582
  c && n("update:modelValue", c);
2572
- }), (c, s) => (R(), K(P(al), {
2583
+ }), (c, a) => (E(), K(P(al), {
2573
2584
  as: "div",
2574
2585
  modelValue: P(o),
2575
- "onUpdate:modelValue": s[0] || (s[0] = (a) => Hn(o) ? o.value = a : null),
2586
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => Hn(o) ? o.value = s : null),
2576
2587
  disabled: c.isDisabled
2577
2588
  }, {
2578
2589
  default: W(() => [
@@ -2581,14 +2592,14 @@ const _r = /* @__PURE__ */ $({
2581
2592
  class: A(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [P(r), P(u), P(i)]])
2582
2593
  }, {
2583
2594
  default: W(() => {
2584
- var a;
2595
+ var s;
2585
2596
  return [
2586
- c.icon ? (R(), T("span", lr, [
2597
+ c.icon ? (E(), T("span", lr, [
2587
2598
  N(U, {
2588
- name: ((a = P(o)) == null ? void 0 : a.icon) ?? c.icon
2599
+ name: ((s = P(o)) == null ? void 0 : s.icon) ?? c.icon
2589
2600
  }, null, 8, ["name"])
2590
2601
  ])) : M("", !0),
2591
- P(o) ? (R(), T("span", rr, B(P(o).label), 1)) : (R(), T("span", ir, B(c.placeholder), 1)),
2602
+ P(o) ? (E(), T("span", rr, B(P(o).label), 1)) : (E(), T("span", ir, B(c.placeholder), 1)),
2592
2603
  I("span", ar, [
2593
2604
  N(U, {
2594
2605
  class: "text-grey-400",
@@ -2608,37 +2619,37 @@ const _r = /* @__PURE__ */ $({
2608
2619
  default: W(() => [
2609
2620
  N(P(ul), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
2610
2621
  default: W(() => [
2611
- (R(!0), T(be, null, jt(c.options, (a) => (R(), K(P(cl), {
2622
+ (E(!0), T(be, null, jt(c.options, (s) => (E(), K(P(cl), {
2612
2623
  as: "template",
2613
- key: a.id,
2614
- value: a,
2615
- disabled: a.disabled
2624
+ key: s.id,
2625
+ value: s,
2626
+ disabled: s.disabled
2616
2627
  }, {
2617
- default: W(({ active: d, selected: v }) => [
2628
+ default: W(({ active: d, selected: m }) => [
2618
2629
  I("li", {
2619
2630
  class: A([
2620
2631
  d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
2621
2632
  "cursor-default select-none relative py-2 pl-3 pr-12",
2622
- { "opacity-50 bg-grey-100": a.disabled }
2633
+ { "opacity-50 bg-grey-100": s.disabled }
2623
2634
  ])
2624
2635
  }, [
2625
2636
  I("div", sr, [
2626
- a.disabled && c.disabledBadge ? (R(), T("span", ur, B(c.disabledBadge), 1)) : M("", !0)
2637
+ s.disabled && c.disabledBadge ? (E(), T("span", ur, B(c.disabledBadge), 1)) : M("", !0)
2627
2638
  ]),
2628
2639
  I("span", {
2629
2640
  class: A([
2630
- v ? "font-semibold" : "font-normal",
2641
+ m ? "font-semibold" : "font-normal",
2631
2642
  "block truncate"
2632
2643
  ])
2633
2644
  }, [
2634
- a.icon ? (R(), K(U, {
2645
+ s.icon ? (E(), K(U, {
2635
2646
  key: 0,
2636
2647
  class: "inline-block mr-1",
2637
- name: a.icon
2648
+ name: s.icon
2638
2649
  }, null, 8, ["name"])) : M("", !0),
2639
- Wn(" " + B(a.label), 1)
2650
+ Wn(" " + B(s.label), 1)
2640
2651
  ], 2),
2641
- v ? (R(), T("span", {
2652
+ m ? (E(), T("span", {
2642
2653
  key: 0,
2643
2654
  class: A([
2644
2655
  d ? "text-blue-100" : "text-blue-500",
@@ -2693,24 +2704,24 @@ const _r = /* @__PURE__ */ $({
2693
2704
  margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
2694
2705
  };
2695
2706
  });
2696
- return (o, n) => (R(), T("div", cr, [
2707
+ return (o, n) => (E(), T("div", cr, [
2697
2708
  I("div", dr, [
2698
- o.avatar ? (R(), T("div", fr)) : M("", !0),
2699
- o.title ? (R(), T("div", pr)) : M("", !0)
2709
+ o.avatar ? (E(), T("div", fr)) : M("", !0),
2710
+ o.title ? (E(), T("div", pr)) : M("", !0)
2700
2711
  ]),
2701
- o.lines > 0 ? (R(), T("div", mr, [
2702
- (R(!0), T(be, null, jt(P(l), (r, i) => (R(), T("div", {
2712
+ o.lines > 0 ? (E(), T("div", mr, [
2713
+ (E(!0), T(be, null, jt(P(l), (r, i) => (E(), T("div", {
2703
2714
  class: A(["h-4 bg-current rounded-lg", r.margin]),
2704
2715
  key: i
2705
2716
  }, null, 2))), 128))
2706
2717
  ])) : M("", !0),
2707
- o.footer ? (R(), T("div", vr)) : M("", !0)
2718
+ o.footer ? (E(), T("div", vr)) : M("", !0)
2708
2719
  ]));
2709
2720
  }
2710
2721
  }), $r = /* @__PURE__ */ $({
2711
2722
  __name: "Spinner",
2712
2723
  setup(e) {
2713
- return (t, l) => (R(), K(P(U), {
2724
+ return (t, l) => (E(), K(P(U), {
2714
2725
  class: "animate-spin",
2715
2726
  name: "circle-notch"
2716
2727
  }));
@@ -2730,13 +2741,13 @@ const _r = /* @__PURE__ */ $({
2730
2741
  },
2731
2742
  emits: ["onClick", "onClickSplit"],
2732
2743
  setup(e, { emit: t }) {
2733
- const l = t, o = e, n = w(() => {
2734
- const s = {
2744
+ const l = t, o = e, n = k(() => {
2745
+ const a = {
2735
2746
  "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
2736
2747
  "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
2737
2748
  "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": o.color === "dark",
2738
2749
  "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
2739
- }, a = {
2750
+ }, s = {
2740
2751
  "px-4 py-1 text-xs leading-5 mono-100": o.size === "small",
2741
2752
  "px-5 py-2 text-sm leading-4 font-medium": o.size === "medium",
2742
2753
  "px-8 pr-4 py-3 text-base leading-6 font-medium": o.size === "large"
@@ -2744,26 +2755,26 @@ const _r = /* @__PURE__ */ $({
2744
2755
  "pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
2745
2756
  };
2746
2757
  return {
2747
- ...s,
2758
+ ...a,
2748
2759
  ...d,
2749
- ...a
2760
+ ...s
2750
2761
  };
2751
- }), r = w(() => {
2752
- const s = {
2762
+ }), r = k(() => {
2763
+ const a = {
2753
2764
  "border-l-white/50 border-l": o.color === "primary",
2754
2765
  "border-l-blue-100 border-l": o.color === "light",
2755
2766
  "border-l-grey-600 border-l": o.color === "dark",
2756
2767
  "border-l-red-600 border-l": o.color === "danger"
2757
- }, a = {
2768
+ }, s = {
2758
2769
  "pl-2 pr-3": o.size === "small",
2759
2770
  "pl-3 pr-3": o.size === "medium",
2760
2771
  "pl-4 pr-5": o.size === "large"
2761
2772
  };
2762
2773
  return {
2763
- ...s,
2764
- ...a
2774
+ ...a,
2775
+ ...s
2765
2776
  };
2766
- }), i = w(() => ({
2777
+ }), i = k(() => ({
2767
2778
  ...{
2768
2779
  "text-white": o.color === "primary",
2769
2780
  "text-blue-600": o.color === "light",
@@ -2776,20 +2787,20 @@ const _r = /* @__PURE__ */ $({
2776
2787
  function c() {
2777
2788
  o.isDisabled || l("onClickSplit");
2778
2789
  }
2779
- return (s, a) => (R(), T("div", gr, [
2790
+ return (a, s) => (E(), T("div", gr, [
2780
2791
  I("button", {
2781
2792
  type: "button",
2782
- "aria-label": s.label,
2783
- tabindex: s.isDisabled ? "-1" : void 0,
2793
+ "aria-label": a.label,
2794
+ tabindex: a.isDisabled ? "-1" : void 0,
2784
2795
  class: A(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
2785
2796
  onClick: u
2786
2797
  }, [
2787
2798
  I("div", {
2788
- class: A(!s.isLoading || "invisible")
2799
+ class: A(!a.isLoading || "invisible")
2789
2800
  }, [
2790
- I("span", null, B(s.label), 1)
2801
+ I("span", null, B(a.label), 1)
2791
2802
  ], 2),
2792
- s.isLoading ? (R(), T("span", hr, [
2803
+ a.isLoading ? (E(), T("span", hr, [
2793
2804
  N(U, {
2794
2805
  class: "ml-3 animate-spin",
2795
2806
  name: "circle-notch"
@@ -2803,7 +2814,7 @@ const _r = /* @__PURE__ */ $({
2803
2814
  }, [
2804
2815
  N(U, {
2805
2816
  class: A([i.value]),
2806
- name: s.icon
2817
+ name: a.icon
2807
2818
  }, null, 8, ["class", "name"])
2808
2819
  ], 2)
2809
2820
  ]));
@@ -2823,7 +2834,7 @@ const _r = /* @__PURE__ */ $({
2823
2834
  const l = t, o = (n) => {
2824
2835
  l("update:modelValue", n), l("change", n);
2825
2836
  };
2826
- return (n, r) => (R(), K(P(yl), {
2837
+ return (n, r) => (E(), K(P(yl), {
2827
2838
  modelValue: n.modelValue,
2828
2839
  label: n.label,
2829
2840
  class: A([n.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
@@ -2856,19 +2867,19 @@ const _r = /* @__PURE__ */ $({
2856
2867
  setup(e, { expose: t, emit: l }) {
2857
2868
  const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(d) {
2858
2869
  n("update:modelValue", (d == null ? void 0 : d.target).value);
2859
- }, s = O(null);
2870
+ }, a = O(null);
2860
2871
  return t({
2861
2872
  focus: () => {
2862
- o.isDisabled || s.value.focus();
2873
+ o.isDisabled || a.value.focus();
2863
2874
  }
2864
- }), (d, v) => (R(), T("div", xr, [
2875
+ }), (d, m) => (E(), T("div", xr, [
2865
2876
  I("textarea", ot({
2866
2877
  class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(r), P(u), P(i)]],
2867
2878
  tabindex: d.isDisabled ? "-1" : void 0,
2868
2879
  value: d.modelValue ?? ""
2869
2880
  }, d.$attrs, {
2870
2881
  ref_key: "input",
2871
- ref: s,
2882
+ ref: a,
2872
2883
  cols: "56",
2873
2884
  rows: "8",
2874
2885
  onInput: c
@@ -2878,8 +2889,8 @@ const _r = /* @__PURE__ */ $({
2878
2889
  }
2879
2890
  });
2880
2891
  export {
2881
- Rr as D9Button,
2882
- Er as D9Checkbox,
2892
+ Er as D9Button,
2893
+ Rr as D9Checkbox,
2883
2894
  U as D9Icon,
2884
2895
  Dr as D9Input,
2885
2896
  Pr as D9Label,