@deck9/ui 0.12.5 → 0.12.7

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.
@@ -29,39 +29,34 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { defineComponent, computed as computed$2, unref, openBlock, createBlock, mergeProps, createCommentVNode, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createVNode, getCurrentInstance, onMounted, nextTick, ref, watch, Fragment, withDirectives, vModelText, normalizeStyle, cloneVNode, h as h$2, inject, provide, watchEffect, onUnmounted, toRaw as toRaw$1, withCtx, renderSlot, Teleport, Transition, normalizeProps, guardReactiveProps, isRef, renderList, createTextVNode } from "vue";
32
+ import { defineComponent, computed as computed$2, unref, openBlock, createBlock, mergeProps, createCommentVNode, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createVNode, getCurrentInstance, onMounted, nextTick, ref, watch, Fragment, withDirectives, vModelText, normalizeStyle, cloneVNode, h as h$1, inject, provide, watchEffect, onUnmounted, toRaw as toRaw$1, withCtx, renderSlot, Teleport, Transition, normalizeProps, guardReactiveProps, isRef, renderList, createTextVNode } from "vue";
33
33
  import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
34
34
  import { library } from "@fortawesome/fontawesome-svg-core";
35
35
  import * as fasIcons from "@fortawesome/free-solid-svg-icons";
36
- /*!
37
- * Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
38
- * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
39
- * Copyright 2022 Fonticons, Inc.
40
- */
41
- var faFacebook = {
42
- prefix: "fab",
43
- iconName: "facebook",
44
- icon: [512, 512, [62e3], "f09a", "M504 256C504 119 393 8 256 8S8 119 8 256c0 123.8 90.69 226.4 209.3 245V327.7h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.3 482.4 504 379.8 504 256z"]
45
- };
46
- var faGithub = {
36
+ var faLinkedin = {
47
37
  prefix: "fab",
48
- iconName: "github",
49
- icon: [496, 512, [], "f09b", "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]
38
+ iconName: "linkedin",
39
+ icon: [448, 512, [], "f08c", "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]
50
40
  };
51
41
  var faInstagram = {
52
42
  prefix: "fab",
53
43
  iconName: "instagram",
54
44
  icon: [448, 512, [], "f16d", "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]
55
45
  };
56
- var faLinkedin = {
46
+ var faFacebook = {
57
47
  prefix: "fab",
58
- iconName: "linkedin",
59
- icon: [448, 512, [], "f08c", "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]
48
+ iconName: "facebook",
49
+ icon: [512, 512, [62e3], "f09a", "M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"]
50
+ };
51
+ var faGithub = {
52
+ prefix: "fab",
53
+ iconName: "github",
54
+ icon: [496, 512, [], "f09b", "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]
60
55
  };
61
56
  var faTwitter = {
62
57
  prefix: "fab",
63
58
  iconName: "twitter",
64
- icon: [512, 512, [], "f099", "M459.4 151.7c.325 4.548 .325 9.097 .325 13.65 0 138.7-105.6 298.6-298.6 298.6-59.45 0-114.7-17.22-161.1-47.11 8.447 .974 16.57 1.299 25.34 1.299 49.06 0 94.21-16.57 130.3-44.83-46.13-.975-84.79-31.19-98.11-72.77 6.498 .974 12.99 1.624 19.82 1.624 9.421 0 18.84-1.3 27.61-3.573-48.08-9.747-84.14-51.98-84.14-102.1v-1.299c13.97 7.797 30.21 12.67 47.43 13.32-28.26-18.84-46.78-51.01-46.78-87.39 0-19.49 5.197-37.36 14.29-52.95 51.65 63.67 129.3 105.3 216.4 109.8-1.624-7.797-2.599-15.92-2.599-24.04 0-57.83 46.78-104.9 104.9-104.9 30.21 0 57.5 12.67 76.67 33.14 23.72-4.548 46.46-13.32 66.6-25.34-7.798 24.37-24.37 44.83-46.13 57.83 21.12-2.273 41.58-8.122 60.43-16.24-14.29 20.79-32.16 39.31-52.63 54.25z"]
59
+ icon: [512, 512, [], "f099", "M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]
65
60
  };
66
61
  var prefix = "fas";
67
62
  var iconName = "numeric-input";
@@ -226,8 +221,8 @@ function validate(uuid) {
226
221
  return typeof uuid === "string" && REGEX.test(uuid);
227
222
  }
228
223
  var byteToHex = [];
229
- for (var i$1 = 0; i$1 < 256; ++i$1) {
230
- byteToHex.push((i$1 + 256).toString(16).substr(1));
224
+ for (var i = 0; i < 256; ++i) {
225
+ byteToHex.push((i + 256).toString(16).substr(1));
231
226
  }
232
227
  function stringify(arr) {
233
228
  var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
@@ -244,8 +239,8 @@ function v4(options, buf, offset) {
244
239
  rnds[8] = rnds[8] & 63 | 128;
245
240
  if (buf) {
246
241
  offset = offset || 0;
247
- for (var i2 = 0; i2 < 16; ++i2) {
248
- buf[offset + i2] = rnds[i2];
242
+ for (var i = 0; i < 16; ++i) {
243
+ buf[offset + i] = rnds[i];
249
244
  }
250
245
  return buf;
251
246
  }
@@ -412,8 +407,8 @@ const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
412
407
  const newTracked = (dep) => (dep.n & trackOpBit) > 0;
413
408
  const initDepMarkers = ({ deps }) => {
414
409
  if (deps.length) {
415
- for (let i2 = 0; i2 < deps.length; i2++) {
416
- deps[i2].w |= trackOpBit;
410
+ for (let i = 0; i < deps.length; i++) {
411
+ deps[i].w |= trackOpBit;
417
412
  }
418
413
  }
419
414
  };
@@ -421,8 +416,8 @@ const finalizeDepMarkers = (effect2) => {
421
416
  const { deps } = effect2;
422
417
  if (deps.length) {
423
418
  let ptr = 0;
424
- for (let i2 = 0; i2 < deps.length; i2++) {
425
- const dep = deps[i2];
419
+ for (let i = 0; i < deps.length; i++) {
420
+ const dep = deps[i];
426
421
  if (wasTracked(dep) && !newTracked(dep)) {
427
422
  dep.delete(effect2);
428
423
  } else {
@@ -498,8 +493,8 @@ class ReactiveEffect {
498
493
  function cleanupEffect(effect2) {
499
494
  const { deps } = effect2;
500
495
  if (deps.length) {
501
- for (let i2 = 0; i2 < deps.length; i2++) {
502
- deps[i2].delete(effect2);
496
+ for (let i = 0; i < deps.length; i++) {
497
+ deps[i].delete(effect2);
503
498
  }
504
499
  deps.length = 0;
505
500
  }
@@ -556,17 +551,20 @@ function trackRefValue(ref2) {
556
551
  }
557
552
  function triggerRefValue(ref2, newVal) {
558
553
  ref2 = toRaw(ref2);
559
- if (ref2.dep) {
554
+ const dep = ref2.dep;
555
+ if (dep) {
560
556
  {
561
- triggerEffects(ref2.dep);
557
+ triggerEffects(dep);
562
558
  }
563
559
  }
564
560
  }
561
+ var _a$1;
565
562
  class ComputedRefImpl {
566
563
  constructor(getter, _setter, isReadonly, isSSR) {
567
564
  this._setter = _setter;
568
565
  this.dep = void 0;
569
566
  this.__v_isRef = true;
567
+ this[_a$1] = false;
570
568
  this._dirty = true;
571
569
  this.effect = new ReactiveEffect(getter, () => {
572
570
  if (!this._dirty) {
@@ -591,6 +589,7 @@ class ComputedRefImpl {
591
589
  this._setter(newValue);
592
590
  }
593
591
  }
592
+ _a$1 = "__v_isReadonly";
594
593
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
595
594
  let getter;
596
595
  let setter;
@@ -800,63 +799,98 @@ function u$2(r2, n2, ...a2) {
800
799
  let t2 = new Error(`Tried to handle "${r2}" but there is no handler defined. Only defined handlers are: ${Object.keys(n2).map((e2) => `"${e2}"`).join(", ")}.`);
801
800
  throw Error.captureStackTrace && Error.captureStackTrace(t2, u$2), t2;
802
801
  }
803
- var h$1 = ((t2) => (t2[t2.None = 0] = "None", t2[t2.RenderStrategy = 1] = "RenderStrategy", t2[t2.Static = 2] = "Static", t2))(h$1 || {}), b$2 = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(b$2 || {});
804
- function k(_a2) {
805
- var _b = _a2, { visible: n2 = true, features: r2 = 0 } = _b, e2 = __objRest(_b, ["visible", "features"]);
806
- var t2;
807
- if (n2 || r2 & 2 && e2.props.static)
808
- return i(e2);
809
- if (r2 & 1) {
810
- let a2 = (t2 = e2.props.unmount) == null || t2 ? 0 : 1;
811
- return u$2(a2, { [0]() {
802
+ var N$1 = ((o2) => (o2[o2.None = 0] = "None", o2[o2.RenderStrategy = 1] = "RenderStrategy", o2[o2.Static = 2] = "Static", o2))(N$1 || {}), S$2 = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(S$2 || {});
803
+ function H$1(_a2) {
804
+ var _b = _a2, { visible: r2 = true, features: t2 = 0, ourProps: e2, theirProps: o2 } = _b, i = __objRest(_b, ["visible", "features", "ourProps", "theirProps"]);
805
+ var a2;
806
+ let n2 = j(o2, e2), l2 = Object.assign(i, { props: n2 });
807
+ if (r2 || t2 & 2 && n2.static)
808
+ return y$1(l2);
809
+ if (t2 & 1) {
810
+ let d2 = (a2 = n2.unmount) == null || a2 ? 0 : 1;
811
+ return u$2(d2, { [0]() {
812
812
  return null;
813
813
  }, [1]() {
814
- return i(__spreadProps(__spreadValues({}, e2), { props: __spreadProps(__spreadValues({}, e2.props), { hidden: true, style: { display: "none" } }) }));
814
+ return y$1(__spreadProps(__spreadValues({}, i), { props: __spreadProps(__spreadValues({}, n2), { hidden: true, style: { display: "none" } }) }));
815
815
  } });
816
816
  }
817
- return i(e2);
818
- }
819
- function i({ props: n2, attrs: r2, slots: e2, slot: t2, name: a2 }) {
820
- var c2;
821
- let _a2 = R(n2, ["unmount", "static"]), { as: d } = _a2, s2 = __objRest(_a2, ["as"]), o2 = (c2 = e2.default) == null ? void 0 : c2.call(e2, t2), u2 = {};
822
- if (d === "template") {
823
- if (Object.keys(s2).length > 0 || Object.keys(r2).length > 0) {
824
- let [p2, ...f2] = o2 != null ? o2 : [];
825
- if (!j(p2) || f2.length > 0)
826
- throw new Error(['Passing props on "template"!', "", `The current component <${a2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s2).concat(Object.keys(r2)).map((l2) => ` - ${l2}`).join(`
827
- `), "", "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((l2) => ` - ${l2}`).join(`
817
+ return y$1(l2);
818
+ }
819
+ function y$1({ props: r2, attrs: t2, slots: e2, slot: o2, name: i }) {
820
+ var m2, h2;
821
+ let _a2 = T$2(r2, ["unmount", "static"]), { as: n2 } = _a2, l2 = __objRest(_a2, ["as"]), a2 = (m2 = e2.default) == null ? void 0 : m2.call(e2, o2), d2 = {};
822
+ if (o2) {
823
+ let u2 = false, c2 = [];
824
+ for (let [p2, f2] of Object.entries(o2))
825
+ typeof f2 == "boolean" && (u2 = true), f2 === true && c2.push(p2);
826
+ u2 && (d2["data-headlessui-state"] = c2.join(" "));
827
+ }
828
+ if (n2 === "template") {
829
+ if (a2 = b$2(a2 != null ? a2 : []), Object.keys(l2).length > 0 || Object.keys(t2).length > 0) {
830
+ let [u2, ...c2] = a2 != null ? a2 : [];
831
+ if (!v$1(u2) || c2.length > 0)
832
+ throw new Error(['Passing props on "template"!', "", `The current component <${i} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l2).concat(Object.keys(t2)).map((s2) => s2.trim()).filter((s2, g, R) => R.indexOf(s2) === g).sort((s2, g) => s2.localeCompare(g)).map((s2) => ` - ${s2}`).join(`
833
+ `), "", "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((s2) => ` - ${s2}`).join(`
828
834
  `)].join(`
829
835
  `));
830
- return cloneVNode(p2, Object.assign({}, s2, u2));
836
+ let p2 = j((h2 = u2.props) != null ? h2 : {}, l2), f2 = cloneVNode(u2, p2);
837
+ for (let s2 in p2)
838
+ s2.startsWith("on") && (f2.props || (f2.props = {}), f2.props[s2] = p2[s2]);
839
+ return f2;
831
840
  }
832
- return Array.isArray(o2) && o2.length === 1 ? o2[0] : o2;
833
- }
834
- return h$2(d, Object.assign({}, s2, u2), o2);
841
+ return Array.isArray(a2) && a2.length === 1 ? a2[0] : a2;
842
+ }
843
+ return h$1(n2, Object.assign({}, l2, d2), { default: () => a2 });
844
+ }
845
+ function b$2(r2) {
846
+ return r2.flatMap((t2) => t2.type === Fragment ? b$2(t2.children) : [t2]);
847
+ }
848
+ function j(...r2) {
849
+ if (r2.length === 0)
850
+ return {};
851
+ if (r2.length === 1)
852
+ return r2[0];
853
+ let t2 = {}, e2 = {};
854
+ for (let i of r2)
855
+ for (let n2 in i)
856
+ n2.startsWith("on") && typeof i[n2] == "function" ? (e2[n2] != null || (e2[n2] = []), e2[n2].push(i[n2])) : t2[n2] = i[n2];
857
+ if (t2.disabled || t2["aria-disabled"])
858
+ return Object.assign(t2, Object.fromEntries(Object.keys(e2).map((i) => [i, void 0])));
859
+ for (let i in e2)
860
+ Object.assign(t2, { [i](n2, ...l2) {
861
+ let a2 = e2[i];
862
+ for (let d2 of a2) {
863
+ if (n2 instanceof Event && n2.defaultPrevented)
864
+ return;
865
+ d2(n2, ...l2);
866
+ }
867
+ } });
868
+ return t2;
835
869
  }
836
- function S$1(n2) {
837
- let r2 = Object.assign({}, n2);
838
- for (let e2 in r2)
839
- r2[e2] === void 0 && delete r2[e2];
840
- return r2;
870
+ function K$1(r2) {
871
+ let t2 = Object.assign({}, r2);
872
+ for (let e2 in t2)
873
+ t2[e2] === void 0 && delete t2[e2];
874
+ return t2;
841
875
  }
842
- function R(n2, r2 = []) {
843
- let e2 = Object.assign({}, n2);
844
- for (let t2 of r2)
845
- t2 in e2 && delete e2[t2];
876
+ function T$2(r2, t2 = []) {
877
+ let e2 = Object.assign({}, r2);
878
+ for (let o2 of t2)
879
+ o2 in e2 && delete e2[o2];
846
880
  return e2;
847
881
  }
848
- function j(n2) {
849
- return n2 == null ? false : typeof n2.type == "string" || typeof n2.type == "object" || typeof n2.type == "function";
882
+ function v$1(r2) {
883
+ return r2 == null ? false : typeof r2.type == "string" || typeof r2.type == "object" || typeof r2.type == "function";
850
884
  }
851
- let e$2 = 0;
852
- function n$1() {
853
- return ++e$2;
885
+ let e$1 = 0;
886
+ function n$2() {
887
+ return ++e$1;
854
888
  }
855
- function t$2() {
856
- return n$1();
889
+ function t$1() {
890
+ return n$2();
857
891
  }
858
- var o = ((r2) => (r2.Space = " ", r2.Enter = "Enter", r2.Escape = "Escape", r2.Backspace = "Backspace", r2.Delete = "Delete", r2.ArrowLeft = "ArrowLeft", r2.ArrowUp = "ArrowUp", r2.ArrowRight = "ArrowRight", r2.ArrowDown = "ArrowDown", r2.Home = "Home", r2.End = "End", r2.PageUp = "PageUp", r2.PageDown = "PageDown", r2.Tab = "Tab", r2))(o || {});
859
- function f$1(r2) {
892
+ var o$1 = ((r2) => (r2.Space = " ", r2.Enter = "Enter", r2.Escape = "Escape", r2.Backspace = "Backspace", r2.Delete = "Delete", r2.ArrowLeft = "ArrowLeft", r2.ArrowUp = "ArrowUp", r2.ArrowRight = "ArrowRight", r2.ArrowDown = "ArrowDown", r2.Home = "Home", r2.End = "End", r2.PageUp = "PageUp", r2.PageDown = "PageDown", r2.Tab = "Tab", r2))(o$1 || {});
893
+ function f$3(r2) {
860
894
  throw new Error("Unexpected object: " + r2);
861
895
  }
862
896
  var a$2 = ((e2) => (e2[e2.First = 0] = "First", e2[e2.Previous = 1] = "Previous", e2[e2.Next = 2] = "Next", e2[e2.Last = 3] = "Last", e2[e2.Specific = 4] = "Specific", e2[e2.Nothing = 5] = "Nothing", e2))(a$2 || {});
@@ -864,18 +898,18 @@ function x(r2, n2) {
864
898
  let t2 = n2.resolveItems();
865
899
  if (t2.length <= 0)
866
900
  return null;
867
- let l2 = n2.resolveActiveIndex(), s2 = l2 != null ? l2 : -1, d = (() => {
901
+ let l2 = n2.resolveActiveIndex(), s2 = l2 != null ? l2 : -1, d2 = (() => {
868
902
  switch (r2.focus) {
869
903
  case 0:
870
904
  return t2.findIndex((e2) => !n2.resolveDisabled(e2));
871
905
  case 1: {
872
- let e2 = t2.slice().reverse().findIndex((i2, c2, u2) => s2 !== -1 && u2.length - c2 - 1 >= s2 ? false : !n2.resolveDisabled(i2));
906
+ let e2 = t2.slice().reverse().findIndex((i, c2, u2) => s2 !== -1 && u2.length - c2 - 1 >= s2 ? false : !n2.resolveDisabled(i));
873
907
  return e2 === -1 ? e2 : t2.length - 1 - e2;
874
908
  }
875
909
  case 2:
876
- return t2.findIndex((e2, i2) => i2 <= s2 ? false : !n2.resolveDisabled(e2));
910
+ return t2.findIndex((e2, i) => i <= s2 ? false : !n2.resolveDisabled(e2));
877
911
  case 3: {
878
- let e2 = t2.slice().reverse().findIndex((i2) => !n2.resolveDisabled(i2));
912
+ let e2 = t2.slice().reverse().findIndex((i) => !n2.resolveDisabled(i));
879
913
  return e2 === -1 ? e2 : t2.length - 1 - e2;
880
914
  }
881
915
  case 4:
@@ -883,23 +917,24 @@ function x(r2, n2) {
883
917
  case 5:
884
918
  return null;
885
919
  default:
886
- f$1(r2);
920
+ f$3(r2);
887
921
  }
888
922
  })();
889
- return d === -1 ? l2 : d;
923
+ return d2 === -1 ? l2 : d2;
890
924
  }
891
- function t$1(l2) {
892
- return l2 == null || l2.value == null ? null : "$el" in l2.value ? l2.value.$el : l2.value;
925
+ function o(n2) {
926
+ var l2;
927
+ return n2 == null || n2.value == null ? null : (l2 = n2.value.$el) != null ? l2 : n2.value;
893
928
  }
894
- let n = Symbol("Context");
895
- var l = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(l || {});
896
- function p$2() {
897
- return inject(n, null);
929
+ let n$1 = Symbol("Context");
930
+ var l = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(l || {});
931
+ function p$3() {
932
+ return inject(n$1, null);
898
933
  }
899
- function c$1(o2) {
900
- provide(n, o2);
934
+ function c(o2) {
935
+ provide(n$1, o2);
901
936
  }
902
- function r(t2, e2) {
937
+ function r$1(t2, e2) {
903
938
  if (t2)
904
939
  return t2;
905
940
  let n2 = e2 != null ? e2 : "button";
@@ -907,116 +942,189 @@ function r(t2, e2) {
907
942
  return "button";
908
943
  }
909
944
  function b$1(t2, e2) {
910
- let n2 = ref(r(t2.value.type, t2.value.as));
945
+ let n2 = ref(r$1(t2.value.type, t2.value.as));
911
946
  return onMounted(() => {
912
- n2.value = r(t2.value.type, t2.value.as);
947
+ n2.value = r$1(t2.value.type, t2.value.as);
913
948
  }), watchEffect(() => {
914
- var o2;
915
- n2.value || !t$1(e2) || t$1(e2) instanceof HTMLButtonElement && !((o2 = t$1(e2)) != null && o2.hasAttribute("type")) && (n2.value = "button");
949
+ var o$12;
950
+ n2.value || o(e2) && o(e2) instanceof HTMLButtonElement && !((o$12 = o(e2)) != null && o$12.hasAttribute("type")) && (n2.value = "button");
916
951
  }), n2;
917
952
  }
918
- function e$1(n2) {
919
- if (typeof window == "undefined")
953
+ class t {
954
+ constructor() {
955
+ this.current = this.detect();
956
+ this.currentId = 0;
957
+ }
958
+ set(e2) {
959
+ this.current !== e2 && (this.currentId = 0, this.current = e2);
960
+ }
961
+ reset() {
962
+ this.set(this.detect());
963
+ }
964
+ nextId() {
965
+ return ++this.currentId;
966
+ }
967
+ get isServer() {
968
+ return this.current === "server";
969
+ }
970
+ get isClient() {
971
+ return this.current === "client";
972
+ }
973
+ detect() {
974
+ return typeof window == "undefined" || typeof document == "undefined" ? "server" : "client";
975
+ }
976
+ }
977
+ let n = new t();
978
+ function m(r2) {
979
+ if (n.isServer)
920
980
  return null;
921
- if (n2 instanceof Node)
922
- return n2.ownerDocument;
923
- if (n2 != null && n2.hasOwnProperty("value")) {
924
- let o2 = t$1(n2);
925
- if (o2)
926
- return o2.ownerDocument;
981
+ if (r2 instanceof Node)
982
+ return r2.ownerDocument;
983
+ if (r2 != null && r2.hasOwnProperty("value")) {
984
+ let n2 = o(r2);
985
+ if (n2)
986
+ return n2.ownerDocument;
927
987
  }
928
988
  return document;
929
989
  }
930
- function p$1({ container: e2, accept: t2, walk: d, enabled: o2 }) {
990
+ function p$2({ container: e2, accept: t2, walk: d2, enabled: o2 }) {
931
991
  watchEffect(() => {
932
992
  let r2 = e2.value;
933
993
  if (!r2 || o2 !== void 0 && !o2.value)
934
994
  return;
935
- let l2 = e$1(e2);
995
+ let l2 = m(e2);
936
996
  if (!l2)
937
997
  return;
938
998
  let c2 = Object.assign((f2) => t2(f2), { acceptNode: t2 }), n2 = l2.createTreeWalker(r2, NodeFilter.SHOW_ELEMENT, c2, false);
939
999
  for (; n2.nextNode(); )
940
- d(n2.currentNode);
1000
+ d2(n2.currentNode);
941
1001
  });
942
1002
  }
943
- let c = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
944
- var L = ((o2) => (o2[o2.First = 1] = "First", o2[o2.Previous = 2] = "Previous", o2[o2.Next = 4] = "Next", o2[o2.Last = 8] = "Last", o2[o2.WrapAround = 16] = "WrapAround", o2[o2.NoScroll = 32] = "NoScroll", o2))(L || {}), N = ((n2) => (n2[n2.Error = 0] = "Error", n2[n2.Overflow = 1] = "Overflow", n2[n2.Success = 2] = "Success", n2[n2.Underflow = 3] = "Underflow", n2))(N || {}), T$1 = ((t2) => (t2[t2.Previous = -1] = "Previous", t2[t2.Next = 1] = "Next", t2))(T$1 || {});
945
- var M = ((t2) => (t2[t2.Strict = 0] = "Strict", t2[t2.Loose = 1] = "Loose", t2))(M || {});
946
- function F(e2, r2 = 0) {
947
- var t2;
948
- return e2 === ((t2 = e$1(e2)) == null ? void 0 : t2.body) ? false : u$2(r2, { [0]() {
949
- return e2.matches(c);
1003
+ let f$2 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
1004
+ var N = ((r2) => (r2[r2.First = 1] = "First", r2[r2.Previous = 2] = "Previous", r2[r2.Next = 4] = "Next", r2[r2.Last = 8] = "Last", r2[r2.WrapAround = 16] = "WrapAround", r2[r2.NoScroll = 32] = "NoScroll", r2))(N || {}), T$1 = ((o2) => (o2[o2.Error = 0] = "Error", o2[o2.Overflow = 1] = "Overflow", o2[o2.Success = 2] = "Success", o2[o2.Underflow = 3] = "Underflow", o2))(T$1 || {}), h = ((n2) => (n2[n2.Previous = -1] = "Previous", n2[n2.Next = 1] = "Next", n2))(h || {});
1005
+ function d$2(e2 = document.body) {
1006
+ return e2 == null ? [] : Array.from(e2.querySelectorAll(f$2)).sort((t2, n2) => Math.sign((t2.tabIndex || Number.MAX_SAFE_INTEGER) - (n2.tabIndex || Number.MAX_SAFE_INTEGER)));
1007
+ }
1008
+ var F = ((n2) => (n2[n2.Strict = 0] = "Strict", n2[n2.Loose = 1] = "Loose", n2))(F || {});
1009
+ function S$1(e2, t2 = 0) {
1010
+ var n2;
1011
+ return e2 === ((n2 = m(e2)) == null ? void 0 : n2.body) ? false : u$2(t2, { [0]() {
1012
+ return e2.matches(f$2);
950
1013
  }, [1]() {
951
1014
  let l2 = e2;
952
1015
  for (; l2 !== null; ) {
953
- if (l2.matches(c))
1016
+ if (l2.matches(f$2))
954
1017
  return true;
955
1018
  l2 = l2.parentElement;
956
1019
  }
957
1020
  return false;
958
1021
  } });
959
1022
  }
960
- function w$2(e2, r2 = (t2) => t2) {
961
- return e2.slice().sort((t2, l2) => {
962
- let n2 = r2(t2), i2 = r2(l2);
963
- if (n2 === null || i2 === null)
964
- return 0;
965
- let o2 = n2.compareDocumentPosition(i2);
966
- return o2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
1023
+ function v(e2) {
1024
+ let t2 = m(e2);
1025
+ nextTick(() => {
1026
+ t2 && !S$1(t2.activeElement, 0) && H(e2);
967
1027
  });
968
1028
  }
969
- function w$1(e2, n2, t2) {
970
- typeof window != "undefined" && watchEffect((o2) => {
971
- window.addEventListener(e2, n2, t2), o2(() => window.removeEventListener(e2, n2, t2));
1029
+ function H(e2) {
1030
+ e2 == null || e2.focus({ preventScroll: true });
1031
+ }
1032
+ let w = ["textarea", "input"].join(",");
1033
+ function A$1(e2) {
1034
+ var t2, n2;
1035
+ return (n2 = (t2 = e2 == null ? void 0 : e2.matches) == null ? void 0 : t2.call(e2, w)) != null ? n2 : false;
1036
+ }
1037
+ function I(e2, t2 = (n2) => n2) {
1038
+ return e2.slice().sort((n2, l2) => {
1039
+ let o2 = t2(n2), i = t2(l2);
1040
+ if (o2 === null || i === null)
1041
+ return 0;
1042
+ let r2 = o2.compareDocumentPosition(i);
1043
+ return r2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : r2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
972
1044
  });
973
1045
  }
974
- function t(e2) {
975
- typeof queueMicrotask == "function" ? queueMicrotask(e2) : Promise.resolve().then(e2).catch((o2) => setTimeout(() => {
976
- throw o2;
977
- }));
1046
+ function D(e2, t2) {
1047
+ return O(d$2(), t2, { relativeTo: e2 });
1048
+ }
1049
+ function O(e2, t2, { sorted: n2 = true, relativeTo: l2 = null, skipElements: o2 = [] } = {}) {
1050
+ var m2;
1051
+ let i = (m2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : e2 == null ? void 0 : e2.ownerDocument) != null ? m2 : document, r2 = Array.isArray(e2) ? n2 ? I(e2) : e2 : d$2(e2);
1052
+ o2.length > 0 && r2.length > 1 && (r2 = r2.filter((s2) => !o2.includes(s2))), l2 = l2 != null ? l2 : i.activeElement;
1053
+ let x2 = (() => {
1054
+ if (t2 & 5)
1055
+ return 1;
1056
+ if (t2 & 10)
1057
+ return -1;
1058
+ throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
1059
+ })(), p2 = (() => {
1060
+ if (t2 & 1)
1061
+ return 0;
1062
+ if (t2 & 2)
1063
+ return Math.max(0, r2.indexOf(l2)) - 1;
1064
+ if (t2 & 4)
1065
+ return Math.max(0, r2.indexOf(l2)) + 1;
1066
+ if (t2 & 8)
1067
+ return r2.length - 1;
1068
+ throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
1069
+ })(), M2 = t2 & 32 ? { preventScroll: true } : {}, c2 = 0, a2 = r2.length, u2;
1070
+ do {
1071
+ if (c2 >= a2 || c2 + a2 <= 0)
1072
+ return 0;
1073
+ let s2 = p2 + c2;
1074
+ if (t2 & 16)
1075
+ s2 = (s2 + a2) % a2;
1076
+ else {
1077
+ if (s2 < 0)
1078
+ return 3;
1079
+ if (s2 >= a2)
1080
+ return 1;
1081
+ }
1082
+ u2 = r2[s2], u2 == null || u2.focus(M2), c2 += x2;
1083
+ } while (u2 !== i.activeElement);
1084
+ return t2 & 6 && A$1(u2) && u2.select(), u2.hasAttribute("tabindex") || u2.setAttribute("tabindex", "0"), 2;
978
1085
  }
979
- var s$1 = ((n2) => (n2[n2.None = 1] = "None", n2[n2.IgnoreScrollbars = 2] = "IgnoreScrollbars", n2))(s$1 || {});
980
- function w(f2, a2, n2 = 1) {
981
- let i2 = false;
982
- function l2(r2) {
983
- if (i2)
1086
+ function u$1(e2, t2, n$12) {
1087
+ n.isServer || watchEffect((o2) => {
1088
+ document.addEventListener(e2, t2, n$12), o2(() => document.removeEventListener(e2, t2, n$12));
1089
+ });
1090
+ }
1091
+ function y(f2, m2, i = computed$2(() => true)) {
1092
+ function a2(e2, u2) {
1093
+ if (!i.value || e2.defaultPrevented)
984
1094
  return;
985
- i2 = true, t(() => {
986
- i2 = false;
987
- });
988
- let o2 = r2.target;
989
- if (!o2.ownerDocument.documentElement.contains(o2))
1095
+ let n2 = u2(e2);
1096
+ if (n2 === null || !n2.getRootNode().contains(n2))
990
1097
  return;
991
- let c2 = function t2(e2) {
992
- return typeof e2 == "function" ? t2(e2()) : Array.isArray(e2) || e2 instanceof Set ? e2 : [e2];
1098
+ let c2 = function o2(t2) {
1099
+ return typeof t2 == "function" ? o2(t2()) : Array.isArray(t2) || t2 instanceof Set ? t2 : [t2];
993
1100
  }(f2);
994
- if ((n2 & 2) === 2) {
995
- let t2 = 20, e2 = o2.ownerDocument.documentElement;
996
- if (r2.clientX > e2.clientWidth - t2 || r2.clientX < t2 || r2.clientY > e2.clientHeight - t2 || r2.clientY < t2)
997
- return;
998
- }
999
- for (let t2 of c2) {
1000
- if (t2 === null)
1101
+ for (let o$12 of c2) {
1102
+ if (o$12 === null)
1001
1103
  continue;
1002
- let e2 = t2 instanceof HTMLElement ? t2 : t$1(t2);
1003
- if (e2 != null && e2.contains(o2))
1104
+ let t2 = o$12 instanceof HTMLElement ? o$12 : o(o$12);
1105
+ if (t2 != null && t2.contains(n2) || e2.composed && e2.composedPath().includes(t2))
1004
1106
  return;
1005
1107
  }
1006
- a2(r2, o2);
1108
+ return !S$1(n2, F.Loose) && n2.tabIndex !== -1 && e2.preventDefault(), m2(e2, n2);
1007
1109
  }
1008
- w$1("pointerdown", l2), w$1("mousedown", l2);
1110
+ let r2 = ref(null);
1111
+ u$1("mousedown", (e2) => {
1112
+ var u2, n2;
1113
+ i.value && (r2.value = ((n2 = (u2 = e2.composedPath) == null ? void 0 : u2.call(e2)) == null ? void 0 : n2[0]) || e2.target);
1114
+ }, true), u$1("click", (e2) => {
1115
+ r2.value && (a2(e2, () => r2.value), r2.value = null);
1116
+ }, true), u$1("blur", (e2) => a2(e2, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
1009
1117
  }
1010
1118
  var a$1 = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(a$1 || {});
1011
- let m = defineComponent({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(r2, { slots: t2, attrs: o2 }) {
1119
+ let f$1 = defineComponent({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(r2, { slots: t2, attrs: d2 }) {
1012
1120
  return () => {
1013
- let _a2 = r2, { features: e2 } = _a2, d = __objRest(_a2, ["features"]), n2 = { "aria-hidden": (e2 & 2) === 2 ? true : void 0, style: __spreadValues({ position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" }, (e2 & 4) === 4 && (e2 & 2) !== 2 && { display: "none" }) };
1014
- return k({ props: __spreadValues(__spreadValues({}, d), n2), slot: {}, attrs: o2, slots: t2, name: "Hidden" });
1121
+ let _a2 = r2, { features: e2 } = _a2, o2 = __objRest(_a2, ["features"]), n2 = { "aria-hidden": (e2 & 2) === 2 ? true : void 0, style: __spreadValues({ position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" }, (e2 & 4) === 4 && (e2 & 2) !== 2 && { display: "none" }) };
1122
+ return H$1({ ourProps: n2, theirProps: o2, slot: {}, attrs: d2, slots: t2, name: "Hidden" });
1015
1123
  };
1016
1124
  } });
1017
1125
  function e(n2 = {}, r2 = null, t2 = []) {
1018
- for (let [i2, o2] of Object.entries(n2))
1019
- f(t2, s(r2, i2), o2);
1126
+ for (let [i, o2] of Object.entries(n2))
1127
+ f(t2, s(r2, i), o2);
1020
1128
  return t2;
1021
1129
  }
1022
1130
  function s(n2, r2) {
@@ -1024,505 +1132,565 @@ function s(n2, r2) {
1024
1132
  }
1025
1133
  function f(n2, r2, t2) {
1026
1134
  if (Array.isArray(t2))
1027
- for (let [i2, o2] of t2.entries())
1028
- f(n2, s(r2, i2.toString()), o2);
1135
+ for (let [i, o2] of t2.entries())
1136
+ f(n2, s(r2, i.toString()), o2);
1029
1137
  else
1030
1138
  t2 instanceof Date ? n2.push([r2, t2.toISOString()]) : typeof t2 == "boolean" ? n2.push([r2, t2 ? "1" : "0"]) : typeof t2 == "string" ? n2.push([r2, t2]) : typeof t2 == "number" ? n2.push([r2, `${t2}`]) : t2 == null ? n2.push([r2, ""]) : e(t2, r2, n2);
1031
1139
  }
1032
- function p(n2) {
1140
+ function p$1(n2) {
1033
1141
  var t2;
1034
1142
  let r2 = (t2 = n2 == null ? void 0 : n2.form) != null ? t2 : n2.closest("form");
1035
- if (!!r2) {
1036
- for (let i2 of r2.elements)
1037
- if (i2.tagName === "INPUT" && i2.type === "submit" || i2.tagName === "BUTTON" && i2.type === "submit" || i2.nodeName === "INPUT" && i2.type === "image") {
1038
- i2.click();
1143
+ if (r2) {
1144
+ for (let i of r2.elements)
1145
+ if (i.tagName === "INPUT" && i.type === "submit" || i.tagName === "BUTTON" && i.type === "submit" || i.nodeName === "INPUT" && i.type === "image") {
1146
+ i.click();
1039
1147
  return;
1040
1148
  }
1041
1149
  }
1042
1150
  }
1043
- let u$1 = Symbol("DescriptionContext");
1044
- function h() {
1045
- let n2 = inject(u$1, null);
1046
- if (n2 === null)
1151
+ function d$1(u2, e2, r2) {
1152
+ let i = ref(r2 == null ? void 0 : r2.value), f2 = computed$2(() => u2.value !== void 0);
1153
+ return [computed$2(() => f2.value ? u2.value : i.value), function(t2) {
1154
+ return f2.value || (i.value = t2), e2 == null ? void 0 : e2(t2);
1155
+ }];
1156
+ }
1157
+ function r(e2) {
1158
+ return [e2.screenX, e2.screenY];
1159
+ }
1160
+ function u() {
1161
+ let e2 = ref([-1, -1]);
1162
+ return { wasMoved(n2) {
1163
+ let t2 = r(n2);
1164
+ return e2.value[0] === t2[0] && e2.value[1] === t2[1] ? false : (e2.value = t2, true);
1165
+ }, update(n2) {
1166
+ e2.value = r(n2);
1167
+ } };
1168
+ }
1169
+ let p = Symbol("DescriptionContext");
1170
+ function b() {
1171
+ let t2 = inject(p, null);
1172
+ if (t2 === null)
1047
1173
  throw new Error("Missing parent");
1048
- return n2;
1174
+ return t2;
1049
1175
  }
1050
- function P$1({ slot: n2 = ref({}), name: o2 = "Description", props: s2 = {} } = {}) {
1176
+ function M({ slot: t2 = ref({}), name: i = "Description", props: o2 = {} } = {}) {
1051
1177
  let e2 = ref([]);
1052
- function t2(r2) {
1053
- return e2.value.push(r2), () => {
1054
- let i2 = e2.value.indexOf(r2);
1055
- i2 !== -1 && e2.value.splice(i2, 1);
1178
+ function s2(n2) {
1179
+ return e2.value.push(n2), () => {
1180
+ let r2 = e2.value.indexOf(n2);
1181
+ r2 !== -1 && e2.value.splice(r2, 1);
1056
1182
  };
1057
1183
  }
1058
- return provide(u$1, { register: t2, slot: n2, name: o2, props: s2 }), computed$2(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
1184
+ return provide(p, { register: s2, slot: t2, name: i, props: o2 }), computed$2(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
1059
1185
  }
1060
- let S = defineComponent({ name: "Description", props: { as: { type: [Object, String], default: "p" } }, setup(n2, { attrs: o2, slots: s2 }) {
1061
- let e2 = h(), t2 = `headlessui-description-${t$2()}`;
1062
- return onMounted(() => onUnmounted(e2.register(t2))), () => {
1063
- let { name: r2 = "Description", slot: i2 = ref({}), props: c2 = {} } = e2, l2 = n2, d = __spreadProps(__spreadValues({}, Object.entries(c2).reduce((f2, [a2, g]) => Object.assign(f2, { [a2]: unref(g) }), {})), { id: t2 });
1064
- return k({ props: __spreadValues(__spreadValues({}, l2), d), slot: i2.value, attrs: o2, slots: s2, name: r2 });
1186
+ let E$1 = defineComponent({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${t$1()}` } }, setup(t2, { attrs: i, slots: o2 }) {
1187
+ let e2 = b();
1188
+ return onMounted(() => onUnmounted(e2.register(t2.id))), () => {
1189
+ let { name: s2 = "Description", slot: n2 = ref({}), props: r2 = {} } = e2, _a2 = t2, { id: d2 } = _a2, l2 = __objRest(_a2, ["id"]), c2 = __spreadProps(__spreadValues({}, Object.entries(r2).reduce((f2, [a2, g]) => Object.assign(f2, { [a2]: unref(g) }), {})), { id: d2 });
1190
+ return H$1({ ourProps: c2, theirProps: l2, slot: n2.value, attrs: i, slots: o2, name: s2 });
1065
1191
  };
1066
1192
  } });
1067
- var le = ((n2) => (n2[n2.Open = 0] = "Open", n2[n2.Closed = 1] = "Closed", n2))(le || {}), ne = ((n2) => (n2[n2.Single = 0] = "Single", n2[n2.Multi = 1] = "Multi", n2))(ne || {}), ue = ((n2) => (n2[n2.Pointer = 0] = "Pointer", n2[n2.Other = 1] = "Other", n2))(ue || {});
1068
- function re(i2) {
1069
- requestAnimationFrame(() => requestAnimationFrame(i2));
1070
- }
1071
- let H = Symbol("ListboxContext");
1072
- function P(i2) {
1073
- let x2 = inject(H, null);
1074
- if (x2 === null) {
1075
- let n2 = new Error(`<${i2} /> is missing a parent <Listbox /> component.`);
1076
- throw Error.captureStackTrace && Error.captureStackTrace(n2, P), n2;
1077
- }
1078
- return x2;
1079
- }
1080
- let we = defineComponent({ name: "Listbox", emits: { "update:modelValue": (i2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, horizontal: { type: [Boolean], default: false }, modelValue: { type: [Object, String, Number, Boolean] }, name: { type: String, optional: true }, multiple: { type: [Boolean], default: false } }, inheritAttrs: false, setup(i2, { slots: x$1, attrs: n2, emit: S2 }) {
1081
- let e$12 = ref(1), p2 = ref(null), d = ref(null), m$1 = ref(null), s2 = ref([]), O = ref(""), t2 = ref(null), l$1 = ref(1);
1082
- function w$12(o2 = (a2) => a2) {
1083
- let a2 = t2.value !== null ? s2.value[t2.value] : null, u2 = w$2(o2(s2.value.slice()), (g) => t$1(g.dataRef.domRef)), f2 = a2 ? u2.indexOf(a2) : null;
1084
- return f2 === -1 && (f2 = null), { options: u2, activeOptionIndex: f2 };
1085
- }
1086
- let y = computed$2(() => i2.modelValue), T2 = computed$2(() => i2.multiple ? 1 : 0), r2 = { listboxState: e$12, value: y, mode: T2, compare(o2, a2) {
1087
- return o2 === a2;
1088
- }, orientation: computed$2(() => i2.horizontal ? "horizontal" : "vertical"), labelRef: p2, buttonRef: d, optionsRef: m$1, disabled: computed$2(() => i2.disabled), options: s2, searchQuery: O, activeOptionIndex: t2, activationTrigger: l$1, closeListbox() {
1089
- i2.disabled || e$12.value !== 1 && (e$12.value = 1, t2.value = null);
1193
+ function se(t2, b2) {
1194
+ return t2 === b2;
1195
+ }
1196
+ var de = ((u2) => (u2[u2.Open = 0] = "Open", u2[u2.Closed = 1] = "Closed", u2))(de || {}), fe = ((u2) => (u2[u2.Single = 0] = "Single", u2[u2.Multi = 1] = "Multi", u2))(fe || {}), pe = ((u2) => (u2[u2.Pointer = 0] = "Pointer", u2[u2.Other = 1] = "Other", u2))(pe || {});
1197
+ function ce(t2) {
1198
+ requestAnimationFrame(() => requestAnimationFrame(t2));
1199
+ }
1200
+ let U = Symbol("ListboxContext");
1201
+ function E(t2) {
1202
+ let b2 = inject(U, null);
1203
+ if (b2 === null) {
1204
+ let u2 = new Error(`<${t2} /> is missing a parent <Listbox /> component.`);
1205
+ throw Error.captureStackTrace && Error.captureStackTrace(u2, E), u2;
1206
+ }
1207
+ return b2;
1208
+ }
1209
+ let Ee = defineComponent({ name: "Listbox", emits: { "update:modelValue": (t2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], default: () => se }, horizontal: { type: [Boolean], default: false }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, name: { type: String, optional: true }, multiple: { type: [Boolean], default: false } }, inheritAttrs: false, setup(t2, { slots: b2, attrs: u2, emit: L }) {
1210
+ let e$12 = ref(1), d2 = ref(null), m2 = ref(null), x$1 = ref(null), f2 = ref([]), o$12 = ref(""), i = ref(null), w2 = ref(1);
1211
+ function R(a2 = (l2) => l2) {
1212
+ let l2 = i.value !== null ? f2.value[i.value] : null, r2 = I(a2(f2.value.slice()), (S2) => o(S2.dataRef.domRef)), s2 = l2 ? r2.indexOf(l2) : null;
1213
+ return s2 === -1 && (s2 = null), { options: r2, activeOptionIndex: s2 };
1214
+ }
1215
+ let h2 = computed$2(() => t2.multiple ? 1 : 0), [y$12, M2] = d$1(computed$2(() => t2.modelValue === void 0 ? u$2(h2.value, { [1]: [], [0]: void 0 }) : t2.modelValue), (a2) => L("update:modelValue", a2), computed$2(() => t2.defaultValue)), n2 = { listboxState: e$12, value: y$12, mode: h2, compare(a2, l2) {
1216
+ if (typeof t2.by == "string") {
1217
+ let r2 = t2.by;
1218
+ return (a2 == null ? void 0 : a2[r2]) === (l2 == null ? void 0 : l2[r2]);
1219
+ }
1220
+ return t2.by(a2, l2);
1221
+ }, orientation: computed$2(() => t2.horizontal ? "horizontal" : "vertical"), labelRef: d2, buttonRef: m2, optionsRef: x$1, disabled: computed$2(() => t2.disabled), options: f2, searchQuery: o$12, activeOptionIndex: i, activationTrigger: w2, closeListbox() {
1222
+ t2.disabled || e$12.value !== 1 && (e$12.value = 1, i.value = null);
1090
1223
  }, openListbox() {
1091
- i2.disabled || e$12.value !== 0 && (e$12.value = 0);
1092
- }, goToOption(o2, a2, u2) {
1093
- if (i2.disabled || e$12.value === 1)
1224
+ t2.disabled || e$12.value !== 0 && (e$12.value = 0);
1225
+ }, goToOption(a2, l2, r2) {
1226
+ if (t2.disabled || e$12.value === 1)
1094
1227
  return;
1095
- let f2 = w$12(), g = x(o2 === a$2.Specific ? { focus: a$2.Specific, id: a2 } : { focus: o2 }, { resolveItems: () => f2.options, resolveActiveIndex: () => f2.activeOptionIndex, resolveId: (h2) => h2.id, resolveDisabled: (h2) => h2.dataRef.disabled });
1096
- O.value = "", t2.value = g, l$1.value = u2 != null ? u2 : 1, s2.value = f2.options;
1097
- }, search(o2) {
1098
- if (i2.disabled || e$12.value === 1)
1228
+ let s2 = R(), S2 = x(a2 === a$2.Specific ? { focus: a$2.Specific, id: l2 } : { focus: a2 }, { resolveItems: () => s2.options, resolveActiveIndex: () => s2.activeOptionIndex, resolveId: (D2) => D2.id, resolveDisabled: (D2) => D2.dataRef.disabled });
1229
+ o$12.value = "", i.value = S2, w2.value = r2 != null ? r2 : 1, f2.value = s2.options;
1230
+ }, search(a2) {
1231
+ if (t2.disabled || e$12.value === 1)
1099
1232
  return;
1100
- let u2 = O.value !== "" ? 0 : 1;
1101
- O.value += o2.toLowerCase();
1102
- let g = (t2.value !== null ? s2.value.slice(t2.value + u2).concat(s2.value.slice(0, t2.value + u2)) : s2.value).find((V) => V.dataRef.textValue.startsWith(O.value) && !V.dataRef.disabled), h2 = g ? s2.value.indexOf(g) : -1;
1103
- h2 === -1 || h2 === t2.value || (t2.value = h2, l$1.value = 1);
1233
+ let r2 = o$12.value !== "" ? 0 : 1;
1234
+ o$12.value += a2.toLowerCase();
1235
+ let S2 = (i.value !== null ? f2.value.slice(i.value + r2).concat(f2.value.slice(0, i.value + r2)) : f2.value).find((j2) => j2.dataRef.textValue.startsWith(o$12.value) && !j2.dataRef.disabled), D2 = S2 ? f2.value.indexOf(S2) : -1;
1236
+ D2 === -1 || D2 === i.value || (i.value = D2, w2.value = 1);
1104
1237
  }, clearSearch() {
1105
- i2.disabled || e$12.value !== 1 && O.value !== "" && (O.value = "");
1106
- }, registerOption(o2, a2) {
1107
- let u2 = w$12((f2) => [...f2, { id: o2, dataRef: a2 }]);
1108
- s2.value = u2.options, t2.value = u2.activeOptionIndex;
1109
- }, unregisterOption(o2) {
1110
- let a2 = w$12((u2) => {
1111
- let f2 = u2.findIndex((g) => g.id === o2);
1112
- return f2 !== -1 && u2.splice(f2, 1), u2;
1238
+ t2.disabled || e$12.value !== 1 && o$12.value !== "" && (o$12.value = "");
1239
+ }, registerOption(a2, l2) {
1240
+ let r2 = R((s2) => [...s2, { id: a2, dataRef: l2 }]);
1241
+ f2.value = r2.options, i.value = r2.activeOptionIndex;
1242
+ }, unregisterOption(a2) {
1243
+ let l2 = R((r2) => {
1244
+ let s2 = r2.findIndex((S2) => S2.id === a2);
1245
+ return s2 !== -1 && r2.splice(s2, 1), r2;
1113
1246
  });
1114
- s2.value = a2.options, t2.value = a2.activeOptionIndex, l$1.value = 1;
1115
- }, select(o2) {
1116
- i2.disabled || S2("update:modelValue", u$2(T2.value, { [0]: () => o2, [1]: () => {
1117
- let a2 = toRaw$1(r2.value.value).slice(), u2 = toRaw$1(o2), f2 = a2.findIndex((g) => r2.compare(u2, toRaw$1(g)));
1118
- return f2 === -1 ? a2.push(u2) : a2.splice(f2, 1), a2;
1247
+ f2.value = l2.options, i.value = l2.activeOptionIndex, w2.value = 1;
1248
+ }, select(a2) {
1249
+ t2.disabled || M2(u$2(h2.value, { [0]: () => a2, [1]: () => {
1250
+ let l2 = toRaw$1(n2.value.value).slice(), r2 = toRaw$1(a2), s2 = l2.findIndex((S2) => n2.compare(r2, toRaw$1(S2)));
1251
+ return s2 === -1 ? l2.push(r2) : l2.splice(s2, 1), l2;
1119
1252
  } }));
1120
1253
  } };
1121
- return w([d, m$1], (o2, a2) => {
1122
- var u2;
1123
- e$12.value === 0 && (r2.closeListbox(), F(a2, M.Loose) || (o2.preventDefault(), (u2 = t$1(d)) == null || u2.focus()));
1124
- }), provide(H, r2), c$1(computed$2(() => u$2(e$12.value, { [0]: l.Open, [1]: l.Closed }))), () => {
1125
- let _a2 = i2, { name: o2, modelValue: a2, disabled: u2 } = _a2, f2 = __objRest(_a2, ["name", "modelValue", "disabled"]), g = { open: e$12.value === 0, disabled: u2 };
1126
- return h$2(Fragment, [...o2 != null && a2 != null ? e({ [o2]: a2 }).map(([h2, V]) => h$2(m, S$1({ features: a$1.Hidden, key: h2, as: "input", type: "hidden", hidden: true, readOnly: true, name: h2, value: V }))) : [], k({ props: __spreadValues(__spreadValues({}, n2), R(f2, ["onUpdate:modelValue", "horizontal", "multiple", "by"])), slot: g, slots: x$1, attrs: n2, name: "Listbox" })]);
1254
+ y([m2, x$1], (a2, l2) => {
1255
+ var r2;
1256
+ n2.closeListbox(), S$1(l2, F.Loose) || (a2.preventDefault(), (r2 = o(m2)) == null || r2.focus());
1257
+ }, computed$2(() => e$12.value === 0)), provide(U, n2), c(computed$2(() => u$2(e$12.value, { [0]: l.Open, [1]: l.Closed })));
1258
+ let p2 = computed$2(() => {
1259
+ var a2;
1260
+ return (a2 = o(m2)) == null ? void 0 : a2.closest("form");
1261
+ });
1262
+ return onMounted(() => {
1263
+ watch([p2], () => {
1264
+ if (!p2.value || t2.defaultValue === void 0)
1265
+ return;
1266
+ function a2() {
1267
+ n2.select(t2.defaultValue);
1268
+ }
1269
+ return p2.value.addEventListener("reset", a2), () => {
1270
+ var l2;
1271
+ (l2 = p2.value) == null || l2.removeEventListener("reset", a2);
1272
+ };
1273
+ }, { immediate: true });
1274
+ }), () => {
1275
+ let _a2 = t2, { name: a2, modelValue: l2, disabled: r2 } = _a2, s2 = __objRest(_a2, ["name", "modelValue", "disabled"]), S2 = { open: e$12.value === 0, disabled: r2, value: y$12.value };
1276
+ return h$1(Fragment, [...a2 != null && y$12.value != null ? e({ [a2]: y$12.value }).map(([D2, j2]) => h$1(f$1, K$1({ features: a$1.Hidden, key: D2, as: "input", type: "hidden", hidden: true, readOnly: true, name: D2, value: j2 }))) : [], H$1({ ourProps: {}, theirProps: __spreadValues(__spreadValues({}, u2), T$2(s2, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"])), slot: S2, slots: b2, attrs: u2, name: "Listbox" })]);
1127
1277
  };
1128
1278
  } });
1129
- defineComponent({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" } }, setup(i2, { attrs: x2, slots: n2 }) {
1130
- let S2 = P("ListboxLabel"), e2 = `headlessui-listbox-label-${t$2()}`;
1131
- function p2() {
1132
- var d;
1133
- (d = t$1(S2.buttonRef)) == null || d.focus({ preventScroll: true });
1279
+ defineComponent({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${t$1()}` } }, setup(t2, { attrs: b2, slots: u2 }) {
1280
+ let L = E("ListboxLabel");
1281
+ function e2() {
1282
+ var d2;
1283
+ (d2 = o(L.buttonRef)) == null || d2.focus({ preventScroll: true });
1134
1284
  }
1135
1285
  return () => {
1136
- let d = { open: S2.listboxState.value === 0, disabled: S2.disabled.value }, m2 = { id: e2, ref: S2.labelRef, onClick: p2 };
1137
- return k({ props: __spreadValues(__spreadValues({}, i2), m2), slot: d, attrs: x2, slots: n2, name: "ListboxLabel" });
1286
+ let d2 = { open: L.listboxState.value === 0, disabled: L.disabled.value }, _a2 = t2, { id: m2 } = _a2, x2 = __objRest(_a2, ["id"]), f2 = { id: m2, ref: L.labelRef, onClick: e2 };
1287
+ return H$1({ ourProps: f2, theirProps: x2, slot: d2, attrs: b2, slots: u2, name: "ListboxLabel" });
1138
1288
  };
1139
1289
  } });
1140
- let ke = defineComponent({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" } }, setup(i2, { attrs: x2, slots: n2, expose: S2 }) {
1141
- let e2 = P("ListboxButton"), p2 = `headlessui-listbox-button-${t$2()}`;
1142
- S2({ el: e2.buttonRef, $el: e2.buttonRef });
1143
- function d(t2) {
1144
- switch (t2.key) {
1145
- case o.Space:
1146
- case o.Enter:
1147
- case o.ArrowDown:
1148
- t2.preventDefault(), e2.openListbox(), nextTick(() => {
1149
- var l2;
1150
- (l2 = t$1(e2.optionsRef)) == null || l2.focus({ preventScroll: true }), e2.value.value || e2.goToOption(a$2.First);
1290
+ let Ae = defineComponent({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${t$1()}` } }, setup(t2, { attrs: b2, slots: u2, expose: L }) {
1291
+ let e2 = E("ListboxButton");
1292
+ L({ el: e2.buttonRef, $el: e2.buttonRef });
1293
+ function d2(o$2) {
1294
+ switch (o$2.key) {
1295
+ case o$1.Space:
1296
+ case o$1.Enter:
1297
+ case o$1.ArrowDown:
1298
+ o$2.preventDefault(), e2.openListbox(), nextTick(() => {
1299
+ var i;
1300
+ (i = o(e2.optionsRef)) == null || i.focus({ preventScroll: true }), e2.value.value || e2.goToOption(a$2.First);
1151
1301
  });
1152
1302
  break;
1153
- case o.ArrowUp:
1154
- t2.preventDefault(), e2.openListbox(), nextTick(() => {
1155
- var l2;
1156
- (l2 = t$1(e2.optionsRef)) == null || l2.focus({ preventScroll: true }), e2.value.value || e2.goToOption(a$2.Last);
1303
+ case o$1.ArrowUp:
1304
+ o$2.preventDefault(), e2.openListbox(), nextTick(() => {
1305
+ var i;
1306
+ (i = o(e2.optionsRef)) == null || i.focus({ preventScroll: true }), e2.value.value || e2.goToOption(a$2.Last);
1157
1307
  });
1158
1308
  break;
1159
1309
  }
1160
1310
  }
1161
- function m2(t2) {
1162
- switch (t2.key) {
1163
- case o.Space:
1164
- t2.preventDefault();
1311
+ function m2(o2) {
1312
+ switch (o2.key) {
1313
+ case o$1.Space:
1314
+ o2.preventDefault();
1165
1315
  break;
1166
1316
  }
1167
1317
  }
1168
- function s2(t2) {
1318
+ function x2(o$12) {
1169
1319
  e2.disabled.value || (e2.listboxState.value === 0 ? (e2.closeListbox(), nextTick(() => {
1170
- var l2;
1171
- return (l2 = t$1(e2.buttonRef)) == null ? void 0 : l2.focus({ preventScroll: true });
1172
- })) : (t2.preventDefault(), e2.openListbox(), re(() => {
1173
- var l2;
1174
- return (l2 = t$1(e2.optionsRef)) == null ? void 0 : l2.focus({ preventScroll: true });
1320
+ var i;
1321
+ return (i = o(e2.buttonRef)) == null ? void 0 : i.focus({ preventScroll: true });
1322
+ })) : (o$12.preventDefault(), e2.openListbox(), ce(() => {
1323
+ var i;
1324
+ return (i = o(e2.optionsRef)) == null ? void 0 : i.focus({ preventScroll: true });
1175
1325
  })));
1176
1326
  }
1177
- let O = b$1(computed$2(() => ({ as: i2.as, type: x2.type })), e2.buttonRef);
1327
+ let f2 = b$1(computed$2(() => ({ as: t2.as, type: b2.type })), e2.buttonRef);
1178
1328
  return () => {
1179
- var w2, y;
1180
- let t2 = { open: e2.listboxState.value === 0, disabled: e2.disabled.value }, l2 = { ref: e2.buttonRef, id: p2, type: O.value, "aria-haspopup": true, "aria-controls": (w2 = t$1(e2.optionsRef)) == null ? void 0 : w2.id, "aria-expanded": e2.disabled.value ? void 0 : e2.listboxState.value === 0, "aria-labelledby": e2.labelRef.value ? [(y = t$1(e2.labelRef)) == null ? void 0 : y.id, p2].join(" ") : void 0, disabled: e2.disabled.value === true ? true : void 0, onKeydown: d, onKeyup: m2, onClick: s2 };
1181
- return k({ props: __spreadValues(__spreadValues({}, i2), l2), slot: t2, attrs: x2, slots: n2, name: "ListboxButton" });
1329
+ var h2, y2;
1330
+ let o$12 = { open: e2.listboxState.value === 0, disabled: e2.disabled.value, value: e2.value.value }, _a2 = t2, { id: i } = _a2, w2 = __objRest(_a2, ["id"]), R = { ref: e2.buttonRef, id: i, type: f2.value, "aria-haspopup": "listbox", "aria-controls": (h2 = o(e2.optionsRef)) == null ? void 0 : h2.id, "aria-expanded": e2.disabled.value ? void 0 : e2.listboxState.value === 0, "aria-labelledby": e2.labelRef.value ? [(y2 = o(e2.labelRef)) == null ? void 0 : y2.id, i].join(" ") : void 0, disabled: e2.disabled.value === true ? true : void 0, onKeydown: d2, onKeyup: m2, onClick: x2 };
1331
+ return H$1({ ourProps: R, theirProps: w2, slot: o$12, attrs: b2, slots: u2, name: "ListboxButton" });
1182
1332
  };
1183
- } }), Ce = defineComponent({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true } }, setup(i2, { attrs: x2, slots: n2, expose: S2 }) {
1184
- let e2 = P("ListboxOptions"), p2 = `headlessui-listbox-options-${t$2()}`, d = ref(null);
1185
- S2({ el: e2.optionsRef, $el: e2.optionsRef });
1186
- function m2(t2) {
1187
- switch (d.value && clearTimeout(d.value), t2.key) {
1188
- case o.Space:
1333
+ } }), Fe = defineComponent({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: () => `headlessui-listbox-options-${t$1()}` } }, setup(t2, { attrs: b2, slots: u2, expose: L }) {
1334
+ let e2 = E("ListboxOptions"), d2 = ref(null);
1335
+ L({ el: e2.optionsRef, $el: e2.optionsRef });
1336
+ function m2(o$2) {
1337
+ switch (d2.value && clearTimeout(d2.value), o$2.key) {
1338
+ case o$1.Space:
1189
1339
  if (e2.searchQuery.value !== "")
1190
- return t2.preventDefault(), t2.stopPropagation(), e2.search(t2.key);
1191
- case o.Enter:
1192
- if (t2.preventDefault(), t2.stopPropagation(), e2.activeOptionIndex.value !== null) {
1193
- let l2 = e2.options.value[e2.activeOptionIndex.value];
1194
- e2.select(l2.dataRef.value);
1340
+ return o$2.preventDefault(), o$2.stopPropagation(), e2.search(o$2.key);
1341
+ case o$1.Enter:
1342
+ if (o$2.preventDefault(), o$2.stopPropagation(), e2.activeOptionIndex.value !== null) {
1343
+ let i = e2.options.value[e2.activeOptionIndex.value];
1344
+ e2.select(i.dataRef.value);
1195
1345
  }
1196
1346
  e2.mode.value === 0 && (e2.closeListbox(), nextTick(() => {
1197
- var l2;
1198
- return (l2 = t$1(e2.buttonRef)) == null ? void 0 : l2.focus({ preventScroll: true });
1347
+ var i;
1348
+ return (i = o(e2.buttonRef)) == null ? void 0 : i.focus({ preventScroll: true });
1199
1349
  }));
1200
1350
  break;
1201
- case u$2(e2.orientation.value, { vertical: o.ArrowDown, horizontal: o.ArrowRight }):
1202
- return t2.preventDefault(), t2.stopPropagation(), e2.goToOption(a$2.Next);
1203
- case u$2(e2.orientation.value, { vertical: o.ArrowUp, horizontal: o.ArrowLeft }):
1204
- return t2.preventDefault(), t2.stopPropagation(), e2.goToOption(a$2.Previous);
1205
- case o.Home:
1206
- case o.PageUp:
1207
- return t2.preventDefault(), t2.stopPropagation(), e2.goToOption(a$2.First);
1208
- case o.End:
1209
- case o.PageDown:
1210
- return t2.preventDefault(), t2.stopPropagation(), e2.goToOption(a$2.Last);
1211
- case o.Escape:
1212
- t2.preventDefault(), t2.stopPropagation(), e2.closeListbox(), nextTick(() => {
1213
- var l2;
1214
- return (l2 = t$1(e2.buttonRef)) == null ? void 0 : l2.focus({ preventScroll: true });
1351
+ case u$2(e2.orientation.value, { vertical: o$1.ArrowDown, horizontal: o$1.ArrowRight }):
1352
+ return o$2.preventDefault(), o$2.stopPropagation(), e2.goToOption(a$2.Next);
1353
+ case u$2(e2.orientation.value, { vertical: o$1.ArrowUp, horizontal: o$1.ArrowLeft }):
1354
+ return o$2.preventDefault(), o$2.stopPropagation(), e2.goToOption(a$2.Previous);
1355
+ case o$1.Home:
1356
+ case o$1.PageUp:
1357
+ return o$2.preventDefault(), o$2.stopPropagation(), e2.goToOption(a$2.First);
1358
+ case o$1.End:
1359
+ case o$1.PageDown:
1360
+ return o$2.preventDefault(), o$2.stopPropagation(), e2.goToOption(a$2.Last);
1361
+ case o$1.Escape:
1362
+ o$2.preventDefault(), o$2.stopPropagation(), e2.closeListbox(), nextTick(() => {
1363
+ var i;
1364
+ return (i = o(e2.buttonRef)) == null ? void 0 : i.focus({ preventScroll: true });
1215
1365
  });
1216
1366
  break;
1217
- case o.Tab:
1218
- t2.preventDefault(), t2.stopPropagation();
1367
+ case o$1.Tab:
1368
+ o$2.preventDefault(), o$2.stopPropagation();
1219
1369
  break;
1220
1370
  default:
1221
- t2.key.length === 1 && (e2.search(t2.key), d.value = setTimeout(() => e2.clearSearch(), 350));
1371
+ o$2.key.length === 1 && (e2.search(o$2.key), d2.value = setTimeout(() => e2.clearSearch(), 350));
1222
1372
  break;
1223
1373
  }
1224
1374
  }
1225
- let s2 = p$2(), O = computed$2(() => s2 !== null ? s2.value === l.Open : e2.listboxState.value === 0);
1375
+ let x2 = p$3(), f2 = computed$2(() => x2 !== null ? (x2.value & l.Open) === l.Open : e2.listboxState.value === 0);
1226
1376
  return () => {
1227
- var y, T2, r2, o2;
1228
- let t2 = { open: e2.listboxState.value === 0 }, l2 = { "aria-activedescendant": e2.activeOptionIndex.value === null || (y = e2.options.value[e2.activeOptionIndex.value]) == null ? void 0 : y.id, "aria-multiselectable": e2.mode.value === 1 ? true : void 0, "aria-labelledby": (o2 = (T2 = t$1(e2.labelRef)) == null ? void 0 : T2.id) != null ? o2 : (r2 = t$1(e2.buttonRef)) == null ? void 0 : r2.id, "aria-orientation": e2.orientation.value, id: p2, onKeydown: m2, role: "listbox", tabIndex: 0, ref: e2.optionsRef };
1229
- return k({ props: __spreadValues(__spreadValues({}, i2), l2), slot: t2, attrs: x2, slots: n2, features: h$1.RenderStrategy | h$1.Static, visible: O.value, name: "ListboxOptions" });
1377
+ var h2, y2, M2, n2;
1378
+ let o$12 = { open: e2.listboxState.value === 0 }, _a2 = t2, { id: i } = _a2, w2 = __objRest(_a2, ["id"]), R = { "aria-activedescendant": e2.activeOptionIndex.value === null || (h2 = e2.options.value[e2.activeOptionIndex.value]) == null ? void 0 : h2.id, "aria-multiselectable": e2.mode.value === 1 ? true : void 0, "aria-labelledby": (n2 = (y2 = o(e2.labelRef)) == null ? void 0 : y2.id) != null ? n2 : (M2 = o(e2.buttonRef)) == null ? void 0 : M2.id, "aria-orientation": e2.orientation.value, id: i, onKeydown: m2, role: "listbox", tabIndex: 0, ref: e2.optionsRef };
1379
+ return H$1({ ourProps: R, theirProps: w2, slot: o$12, attrs: b2, slots: u2, features: N$1.RenderStrategy | N$1.Static, visible: f2.value, name: "ListboxOptions" });
1230
1380
  };
1231
- } }), Me = defineComponent({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false } }, setup(i2, { slots: x2, attrs: n2, expose: S2 }) {
1232
- let e2 = P("ListboxOption"), p2 = `headlessui-listbox-option-${t$2()}`, d = ref(null);
1233
- S2({ el: d, $el: d });
1234
- let m2 = computed$2(() => e2.activeOptionIndex.value !== null ? e2.options.value[e2.activeOptionIndex.value].id === p2 : false), s2 = computed$2(() => u$2(e2.mode.value, { [0]: () => e2.compare(toRaw$1(e2.value.value), toRaw$1(i2.value)), [1]: () => toRaw$1(e2.value.value).some((r2) => e2.compare(toRaw$1(r2), toRaw$1(i2.value))) })), O = computed$2(() => u$2(e2.mode.value, { [1]: () => {
1235
- var o2;
1236
- let r2 = toRaw$1(e2.value.value);
1237
- return ((o2 = e2.options.value.find((a2) => r2.some((u2) => e2.compare(toRaw$1(u2), toRaw$1(a2.dataRef.value))))) == null ? void 0 : o2.id) === p2;
1238
- }, [0]: () => s2.value })), t2 = computed$2(() => ({ disabled: i2.disabled, value: i2.value, textValue: "", domRef: d }));
1381
+ } }), Be = defineComponent({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false }, id: { type: String, default: () => `headlessui-listbox.option-${t$1()}` } }, setup(t2, { slots: b2, attrs: u$12, expose: L }) {
1382
+ let e2 = E("ListboxOption"), d2 = ref(null);
1383
+ L({ el: d2, $el: d2 });
1384
+ let m2 = computed$2(() => e2.activeOptionIndex.value !== null ? e2.options.value[e2.activeOptionIndex.value].id === t2.id : false), x2 = computed$2(() => u$2(e2.mode.value, { [0]: () => e2.compare(toRaw$1(e2.value.value), toRaw$1(t2.value)), [1]: () => toRaw$1(e2.value.value).some((n2) => e2.compare(toRaw$1(n2), toRaw$1(t2.value))) })), f2 = computed$2(() => u$2(e2.mode.value, { [1]: () => {
1385
+ var p2;
1386
+ let n2 = toRaw$1(e2.value.value);
1387
+ return ((p2 = e2.options.value.find((a2) => n2.some((l2) => e2.compare(toRaw$1(l2), toRaw$1(a2.dataRef.value))))) == null ? void 0 : p2.id) === t2.id;
1388
+ }, [0]: () => x2.value })), o$12 = computed$2(() => ({ disabled: t2.disabled, value: t2.value, textValue: "", domRef: d2 }));
1239
1389
  onMounted(() => {
1240
- var o2, a2;
1241
- let r2 = (a2 = (o2 = t$1(d)) == null ? void 0 : o2.textContent) == null ? void 0 : a2.toLowerCase().trim();
1242
- r2 !== void 0 && (t2.value.textValue = r2);
1243
- }), onMounted(() => e2.registerOption(p2, t2)), onUnmounted(() => e2.unregisterOption(p2)), onMounted(() => {
1244
- watch([e2.listboxState, s2], () => {
1245
- e2.listboxState.value === 0 && (!s2.value || u$2(e2.mode.value, { [1]: () => {
1246
- O.value && e2.goToOption(a$2.Specific, p2);
1390
+ var p2, a2;
1391
+ let n2 = (a2 = (p2 = o(d2)) == null ? void 0 : p2.textContent) == null ? void 0 : a2.toLowerCase().trim();
1392
+ n2 !== void 0 && (o$12.value.textValue = n2);
1393
+ }), onMounted(() => e2.registerOption(t2.id, o$12)), onUnmounted(() => e2.unregisterOption(t2.id)), onMounted(() => {
1394
+ watch([e2.listboxState, x2], () => {
1395
+ e2.listboxState.value === 0 && x2.value && u$2(e2.mode.value, { [1]: () => {
1396
+ f2.value && e2.goToOption(a$2.Specific, t2.id);
1247
1397
  }, [0]: () => {
1248
- e2.goToOption(a$2.Specific, p2);
1249
- } }));
1398
+ e2.goToOption(a$2.Specific, t2.id);
1399
+ } });
1250
1400
  }, { immediate: true });
1251
1401
  }), watchEffect(() => {
1252
- e2.listboxState.value === 0 && (!m2.value || e2.activationTrigger.value !== 0 && nextTick(() => {
1253
- var r2, o2;
1254
- return (o2 = (r2 = t$1(d)) == null ? void 0 : r2.scrollIntoView) == null ? void 0 : o2.call(r2, { block: "nearest" });
1255
- }));
1402
+ e2.listboxState.value === 0 && m2.value && e2.activationTrigger.value !== 0 && nextTick(() => {
1403
+ var n2, p2;
1404
+ return (p2 = (n2 = o(d2)) == null ? void 0 : n2.scrollIntoView) == null ? void 0 : p2.call(n2, { block: "nearest" });
1405
+ });
1256
1406
  });
1257
- function l2(r2) {
1258
- if (i2.disabled)
1259
- return r2.preventDefault();
1260
- e2.select(i2.value), e2.mode.value === 0 && (e2.closeListbox(), nextTick(() => {
1261
- var o2;
1262
- return (o2 = t$1(e2.buttonRef)) == null ? void 0 : o2.focus({ preventScroll: true });
1407
+ function i(n2) {
1408
+ if (t2.disabled)
1409
+ return n2.preventDefault();
1410
+ e2.select(t2.value), e2.mode.value === 0 && (e2.closeListbox(), nextTick(() => {
1411
+ var p2;
1412
+ return (p2 = o(e2.buttonRef)) == null ? void 0 : p2.focus({ preventScroll: true });
1263
1413
  }));
1264
1414
  }
1265
1415
  function w2() {
1266
- if (i2.disabled)
1416
+ if (t2.disabled)
1267
1417
  return e2.goToOption(a$2.Nothing);
1268
- e2.goToOption(a$2.Specific, p2);
1418
+ e2.goToOption(a$2.Specific, t2.id);
1419
+ }
1420
+ let R = u();
1421
+ function h2(n2) {
1422
+ R.update(n2);
1269
1423
  }
1270
- function y() {
1271
- i2.disabled || m2.value || e2.goToOption(a$2.Specific, p2, 0);
1424
+ function y2(n2) {
1425
+ R.wasMoved(n2) && (t2.disabled || m2.value || e2.goToOption(a$2.Specific, t2.id, 0));
1272
1426
  }
1273
- function T2() {
1274
- i2.disabled || !m2.value || e2.goToOption(a$2.Nothing);
1427
+ function M2(n2) {
1428
+ R.wasMoved(n2) && (t2.disabled || m2.value && e2.goToOption(a$2.Nothing));
1275
1429
  }
1276
1430
  return () => {
1277
- let { disabled: r2 } = i2, o2 = { active: m2.value, selected: s2.value, disabled: r2 }, a2 = { id: p2, ref: d, role: "option", tabIndex: r2 === true ? void 0 : -1, "aria-disabled": r2 === true ? true : void 0, "aria-selected": s2.value === true ? s2.value : void 0, disabled: void 0, onClick: l2, onFocus: w2, onPointermove: y, onMousemove: y, onPointerleave: T2, onMouseleave: T2 };
1278
- return k({ props: __spreadValues(__spreadValues({}, R(i2, ["value", "disabled"])), a2), slot: o2, attrs: n2, slots: x2, name: "ListboxOption" });
1431
+ let { disabled: n2 } = t2, p2 = { active: m2.value, selected: x2.value, disabled: n2 }, _a2 = t2, { id: a2, value: l2, disabled: r2 } = _a2, s2 = __objRest(_a2, ["id", "value", "disabled"]), S2 = { id: a2, ref: d2, role: "option", tabIndex: n2 === true ? void 0 : -1, "aria-disabled": n2 === true ? true : void 0, "aria-selected": x2.value, disabled: void 0, onClick: i, onFocus: w2, onPointerenter: h2, onMouseenter: h2, onPointermove: y2, onMousemove: y2, onPointerleave: M2, onMouseleave: M2 };
1432
+ return H$1({ ourProps: S2, theirProps: s2, slot: p2, attrs: u$12, slots: b2, name: "ListboxOption" });
1279
1433
  };
1280
1434
  } });
1281
- var W = ((i2) => (i2[i2.Open = 0] = "Open", i2[i2.Closed = 1] = "Closed", i2))(W || {}), J = ((i2) => (i2[i2.Pointer = 0] = "Pointer", i2[i2.Other = 1] = "Other", i2))(J || {});
1282
- function z(o2) {
1283
- requestAnimationFrame(() => requestAnimationFrame(o2));
1284
- }
1285
- let E = Symbol("MenuContext");
1286
- function D(o2) {
1287
- let S2 = inject(E, null);
1288
- if (S2 === null) {
1289
- let i2 = new Error(`<${o2} /> is missing a parent <Menu /> component.`);
1290
- throw Error.captureStackTrace && Error.captureStackTrace(i2, D), i2;
1291
- }
1292
- return S2;
1293
- }
1294
- let fe = defineComponent({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(o2, { slots: S2, attrs: i2 }) {
1295
- let v = ref(1), e2 = ref(null), p2 = ref(null), r2 = ref([]), f2 = ref(""), d = ref(null), I = ref(1);
1296
- function l$1(u2 = (n2) => n2) {
1297
- let n2 = d.value !== null ? r2.value[d.value] : null, a2 = w$2(u2(r2.value.slice()), (R2) => t$1(R2.dataRef.domRef)), s2 = n2 ? a2.indexOf(n2) : null;
1298
- return s2 === -1 && (s2 = null), { items: a2, activeItemIndex: s2 };
1299
- }
1300
- let t2 = { menuState: v, buttonRef: e2, itemsRef: p2, items: r2, searchQuery: f2, activeItemIndex: d, activationTrigger: I, closeMenu: () => {
1301
- v.value = 1, d.value = null;
1302
- }, openMenu: () => v.value = 0, goToItem(u2, n2, a2) {
1303
- let s2 = l$1(), R2 = x(u2 === a$2.Specific ? { focus: a$2.Specific, id: n2 } : { focus: u2 }, { resolveItems: () => s2.items, resolveActiveIndex: () => s2.activeItemIndex, resolveId: (M2) => M2.id, resolveDisabled: (M2) => M2.dataRef.disabled });
1304
- f2.value = "", d.value = R2, I.value = a2 != null ? a2 : 1, r2.value = s2.items;
1435
+ var X = ((l2) => (l2[l2.Open = 0] = "Open", l2[l2.Closed = 1] = "Closed", l2))(X || {}), Y = ((l2) => (l2[l2.Pointer = 0] = "Pointer", l2[l2.Other = 1] = "Other", l2))(Y || {});
1436
+ function Z(a2) {
1437
+ requestAnimationFrame(() => requestAnimationFrame(a2));
1438
+ }
1439
+ let A = Symbol("MenuContext");
1440
+ function P(a2) {
1441
+ let b2 = inject(A, null);
1442
+ if (b2 === null) {
1443
+ let l2 = new Error(`<${a2} /> is missing a parent <Menu /> component.`);
1444
+ throw Error.captureStackTrace && Error.captureStackTrace(l2, P), l2;
1445
+ }
1446
+ return b2;
1447
+ }
1448
+ let ge = defineComponent({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(a2, { slots: b2, attrs: l$1 }) {
1449
+ let g = ref(1), e2 = ref(null), m2 = ref(null), s2 = ref([]), p2 = ref(""), d2 = ref(null), o$12 = ref(1);
1450
+ function t2(u2 = (r2) => r2) {
1451
+ let r2 = d2.value !== null ? s2.value[d2.value] : null, n2 = I(u2(s2.value.slice()), (I2) => o(I2.dataRef.domRef)), i = r2 ? n2.indexOf(r2) : null;
1452
+ return i === -1 && (i = null), { items: n2, activeItemIndex: i };
1453
+ }
1454
+ let v2 = { menuState: g, buttonRef: e2, itemsRef: m2, items: s2, searchQuery: p2, activeItemIndex: d2, activationTrigger: o$12, closeMenu: () => {
1455
+ g.value = 1, d2.value = null;
1456
+ }, openMenu: () => g.value = 0, goToItem(u2, r2, n2) {
1457
+ let i = t2(), I2 = x(u2 === a$2.Specific ? { focus: a$2.Specific, id: r2 } : { focus: u2 }, { resolveItems: () => i.items, resolveActiveIndex: () => i.activeItemIndex, resolveId: (M2) => M2.id, resolveDisabled: (M2) => M2.dataRef.disabled });
1458
+ p2.value = "", d2.value = I2, o$12.value = n2 != null ? n2 : 1, s2.value = i.items;
1305
1459
  }, search(u2) {
1306
- let a2 = f2.value !== "" ? 0 : 1;
1307
- f2.value += u2.toLowerCase();
1308
- let R2 = (d.value !== null ? r2.value.slice(d.value + a2).concat(r2.value.slice(0, d.value + a2)) : r2.value).find((k2) => k2.dataRef.textValue.startsWith(f2.value) && !k2.dataRef.disabled), M2 = R2 ? r2.value.indexOf(R2) : -1;
1309
- M2 === -1 || M2 === d.value || (d.value = M2, I.value = 1);
1460
+ let n2 = p2.value !== "" ? 0 : 1;
1461
+ p2.value += u2.toLowerCase();
1462
+ let I2 = (d2.value !== null ? s2.value.slice(d2.value + n2).concat(s2.value.slice(0, d2.value + n2)) : s2.value).find((O2) => O2.dataRef.textValue.startsWith(p2.value) && !O2.dataRef.disabled), M2 = I2 ? s2.value.indexOf(I2) : -1;
1463
+ M2 === -1 || M2 === d2.value || (d2.value = M2, o$12.value = 1);
1310
1464
  }, clearSearch() {
1311
- f2.value = "";
1312
- }, registerItem(u2, n2) {
1313
- let a2 = l$1((s2) => [...s2, { id: u2, dataRef: n2 }]);
1314
- r2.value = a2.items, d.value = a2.activeItemIndex, I.value = 1;
1465
+ p2.value = "";
1466
+ }, registerItem(u2, r2) {
1467
+ let n2 = t2((i) => [...i, { id: u2, dataRef: r2 }]);
1468
+ s2.value = n2.items, d2.value = n2.activeItemIndex, o$12.value = 1;
1315
1469
  }, unregisterItem(u2) {
1316
- let n2 = l$1((a2) => {
1317
- let s2 = a2.findIndex((R2) => R2.id === u2);
1318
- return s2 !== -1 && a2.splice(s2, 1), a2;
1470
+ let r2 = t2((n2) => {
1471
+ let i = n2.findIndex((I2) => I2.id === u2);
1472
+ return i !== -1 && n2.splice(i, 1), n2;
1319
1473
  });
1320
- r2.value = n2.items, d.value = n2.activeItemIndex, I.value = 1;
1474
+ s2.value = r2.items, d2.value = r2.activeItemIndex, o$12.value = 1;
1321
1475
  } };
1322
- return w([e2, p2], (u2, n2) => {
1323
- var a2;
1324
- v.value === 0 && (t2.closeMenu(), F(n2, M.Loose) || (u2.preventDefault(), (a2 = t$1(e2)) == null || a2.focus()));
1325
- }), provide(E, t2), c$1(computed$2(() => u$2(v.value, { [0]: l.Open, [1]: l.Closed }))), () => {
1326
- let u2 = { open: v.value === 0 };
1327
- return k({ props: o2, slot: u2, slots: S2, attrs: i2, name: "Menu" });
1476
+ return y([e2, m2], (u2, r2) => {
1477
+ var n2;
1478
+ v2.closeMenu(), S$1(r2, F.Loose) || (u2.preventDefault(), (n2 = o(e2)) == null || n2.focus());
1479
+ }, computed$2(() => g.value === 0)), provide(A, v2), c(computed$2(() => u$2(g.value, { [0]: l.Open, [1]: l.Closed }))), () => {
1480
+ let u2 = { open: g.value === 0, close: v2.closeMenu };
1481
+ return H$1({ ourProps: {}, theirProps: a2, slot: u2, slots: b2, attrs: l$1, name: "Menu" });
1328
1482
  };
1329
- } }), me = defineComponent({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" } }, setup(o$1, { attrs: S2, slots: i2, expose: v }) {
1330
- let e2 = D("MenuButton"), p2 = `headlessui-menu-button-${t$2()}`;
1331
- v({ el: e2.buttonRef, $el: e2.buttonRef });
1332
- function r2(l2) {
1333
- switch (l2.key) {
1334
- case o.Space:
1335
- case o.Enter:
1336
- case o.ArrowDown:
1337
- l2.preventDefault(), l2.stopPropagation(), e2.openMenu(), nextTick(() => {
1483
+ } }), Se = defineComponent({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${t$1()}` } }, setup(a2, { attrs: b2, slots: l2, expose: g }) {
1484
+ let e2 = P("MenuButton");
1485
+ g({ el: e2.buttonRef, $el: e2.buttonRef });
1486
+ function m2(o$2) {
1487
+ switch (o$2.key) {
1488
+ case o$1.Space:
1489
+ case o$1.Enter:
1490
+ case o$1.ArrowDown:
1491
+ o$2.preventDefault(), o$2.stopPropagation(), e2.openMenu(), nextTick(() => {
1338
1492
  var t2;
1339
- (t2 = t$1(e2.itemsRef)) == null || t2.focus({ preventScroll: true }), e2.goToItem(a$2.First);
1493
+ (t2 = o(e2.itemsRef)) == null || t2.focus({ preventScroll: true }), e2.goToItem(a$2.First);
1340
1494
  });
1341
1495
  break;
1342
- case o.ArrowUp:
1343
- l2.preventDefault(), l2.stopPropagation(), e2.openMenu(), nextTick(() => {
1496
+ case o$1.ArrowUp:
1497
+ o$2.preventDefault(), o$2.stopPropagation(), e2.openMenu(), nextTick(() => {
1344
1498
  var t2;
1345
- (t2 = t$1(e2.itemsRef)) == null || t2.focus({ preventScroll: true }), e2.goToItem(a$2.Last);
1499
+ (t2 = o(e2.itemsRef)) == null || t2.focus({ preventScroll: true }), e2.goToItem(a$2.Last);
1346
1500
  });
1347
1501
  break;
1348
1502
  }
1349
1503
  }
1350
- function f2(l2) {
1351
- switch (l2.key) {
1352
- case o.Space:
1353
- l2.preventDefault();
1504
+ function s2(o2) {
1505
+ switch (o2.key) {
1506
+ case o$1.Space:
1507
+ o2.preventDefault();
1354
1508
  break;
1355
1509
  }
1356
1510
  }
1357
- function d(l2) {
1358
- o$1.disabled || (e2.menuState.value === 0 ? (e2.closeMenu(), nextTick(() => {
1511
+ function p2(o$12) {
1512
+ a2.disabled || (e2.menuState.value === 0 ? (e2.closeMenu(), nextTick(() => {
1359
1513
  var t2;
1360
- return (t2 = t$1(e2.buttonRef)) == null ? void 0 : t2.focus({ preventScroll: true });
1361
- })) : (l2.preventDefault(), l2.stopPropagation(), e2.openMenu(), z(() => {
1514
+ return (t2 = o(e2.buttonRef)) == null ? void 0 : t2.focus({ preventScroll: true });
1515
+ })) : (o$12.preventDefault(), e2.openMenu(), Z(() => {
1362
1516
  var t2;
1363
- return (t2 = t$1(e2.itemsRef)) == null ? void 0 : t2.focus({ preventScroll: true });
1517
+ return (t2 = o(e2.itemsRef)) == null ? void 0 : t2.focus({ preventScroll: true });
1364
1518
  })));
1365
1519
  }
1366
- let I = b$1(computed$2(() => ({ as: o$1.as, type: S2.type })), e2.buttonRef);
1520
+ let d2 = b$1(computed$2(() => ({ as: a2.as, type: b2.type })), e2.buttonRef);
1367
1521
  return () => {
1368
- var u2;
1369
- let l2 = { open: e2.menuState.value === 0 }, t2 = { ref: e2.buttonRef, id: p2, type: I.value, "aria-haspopup": true, "aria-controls": (u2 = t$1(e2.itemsRef)) == null ? void 0 : u2.id, "aria-expanded": o$1.disabled ? void 0 : e2.menuState.value === 0, onKeydown: r2, onKeyup: f2, onClick: d };
1370
- return k({ props: __spreadValues(__spreadValues({}, o$1), t2), slot: l2, attrs: S2, slots: i2, name: "MenuButton" });
1522
+ var r2;
1523
+ let o$12 = { open: e2.menuState.value === 0 }, _a2 = a2, { id: t2 } = _a2, v2 = __objRest(_a2, ["id"]), u2 = { ref: e2.buttonRef, id: t2, type: d2.value, "aria-haspopup": "menu", "aria-controls": (r2 = o(e2.itemsRef)) == null ? void 0 : r2.id, "aria-expanded": a2.disabled ? void 0 : e2.menuState.value === 0, onKeydown: m2, onKeyup: s2, onClick: p2 };
1524
+ return H$1({ ourProps: u2, theirProps: v2, slot: o$12, attrs: b2, slots: l2, name: "MenuButton" });
1371
1525
  };
1372
- } }), pe = defineComponent({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true } }, setup(o$1, { attrs: S2, slots: i2, expose: v }) {
1373
- let e2 = D("MenuItems"), p2 = `headlessui-menu-items-${t$2()}`, r2 = ref(null);
1374
- v({ el: e2.itemsRef, $el: e2.itemsRef }), p$1({ container: computed$2(() => t$1(e2.itemsRef)), enabled: computed$2(() => e2.menuState.value === 0), accept(t2) {
1526
+ } }), be = defineComponent({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: () => `headlessui-menu-items-${t$1()}` } }, setup(a2, { attrs: b2, slots: l$1, expose: g }) {
1527
+ let e2 = P("MenuItems"), m2 = ref(null);
1528
+ g({ el: e2.itemsRef, $el: e2.itemsRef }), p$2({ container: computed$2(() => o(e2.itemsRef)), enabled: computed$2(() => e2.menuState.value === 0), accept(t2) {
1375
1529
  return t2.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : t2.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1376
1530
  }, walk(t2) {
1377
1531
  t2.setAttribute("role", "none");
1378
1532
  } });
1379
- function f2(t2) {
1380
- var u2;
1381
- switch (r2.value && clearTimeout(r2.value), t2.key) {
1382
- case o.Space:
1533
+ function s2(t2) {
1534
+ var v$12;
1535
+ switch (m2.value && clearTimeout(m2.value), t2.key) {
1536
+ case o$1.Space:
1383
1537
  if (e2.searchQuery.value !== "")
1384
1538
  return t2.preventDefault(), t2.stopPropagation(), e2.search(t2.key);
1385
- case o.Enter:
1539
+ case o$1.Enter:
1386
1540
  if (t2.preventDefault(), t2.stopPropagation(), e2.activeItemIndex.value !== null) {
1387
- let a2 = e2.items.value[e2.activeItemIndex.value];
1388
- (u2 = t$1(a2.dataRef.domRef)) == null || u2.click();
1541
+ let r2 = e2.items.value[e2.activeItemIndex.value];
1542
+ (v$12 = o(r2.dataRef.domRef)) == null || v$12.click();
1389
1543
  }
1390
- e2.closeMenu(), nextTick(() => {
1391
- var n2;
1392
- return (n2 = t$1(e2.buttonRef)) == null ? void 0 : n2.focus({ preventScroll: true });
1393
- });
1544
+ e2.closeMenu(), v(o(e2.buttonRef));
1394
1545
  break;
1395
- case o.ArrowDown:
1546
+ case o$1.ArrowDown:
1396
1547
  return t2.preventDefault(), t2.stopPropagation(), e2.goToItem(a$2.Next);
1397
- case o.ArrowUp:
1548
+ case o$1.ArrowUp:
1398
1549
  return t2.preventDefault(), t2.stopPropagation(), e2.goToItem(a$2.Previous);
1399
- case o.Home:
1400
- case o.PageUp:
1550
+ case o$1.Home:
1551
+ case o$1.PageUp:
1401
1552
  return t2.preventDefault(), t2.stopPropagation(), e2.goToItem(a$2.First);
1402
- case o.End:
1403
- case o.PageDown:
1553
+ case o$1.End:
1554
+ case o$1.PageDown:
1404
1555
  return t2.preventDefault(), t2.stopPropagation(), e2.goToItem(a$2.Last);
1405
- case o.Escape:
1556
+ case o$1.Escape:
1406
1557
  t2.preventDefault(), t2.stopPropagation(), e2.closeMenu(), nextTick(() => {
1407
- var n2;
1408
- return (n2 = t$1(e2.buttonRef)) == null ? void 0 : n2.focus({ preventScroll: true });
1558
+ var u2;
1559
+ return (u2 = o(e2.buttonRef)) == null ? void 0 : u2.focus({ preventScroll: true });
1409
1560
  });
1410
1561
  break;
1411
- case o.Tab:
1412
- t2.preventDefault(), t2.stopPropagation();
1562
+ case o$1.Tab:
1563
+ t2.preventDefault(), t2.stopPropagation(), e2.closeMenu(), nextTick(() => D(o(e2.buttonRef), t2.shiftKey ? N.Previous : N.Next));
1413
1564
  break;
1414
1565
  default:
1415
- t2.key.length === 1 && (e2.search(t2.key), r2.value = setTimeout(() => e2.clearSearch(), 350));
1566
+ t2.key.length === 1 && (e2.search(t2.key), m2.value = setTimeout(() => e2.clearSearch(), 350));
1416
1567
  break;
1417
1568
  }
1418
1569
  }
1419
- function d(t2) {
1570
+ function p2(t2) {
1420
1571
  switch (t2.key) {
1421
- case o.Space:
1572
+ case o$1.Space:
1422
1573
  t2.preventDefault();
1423
1574
  break;
1424
1575
  }
1425
1576
  }
1426
- let I = p$2(), l$1 = computed$2(() => I !== null ? I.value === l.Open : e2.menuState.value === 0);
1577
+ let d2 = p$3(), o$2 = computed$2(() => d2 !== null ? (d2.value & l.Open) === l.Open : e2.menuState.value === 0);
1427
1578
  return () => {
1428
- var a2, s2;
1429
- let t2 = { open: e2.menuState.value === 0 }, u2 = { "aria-activedescendant": e2.activeItemIndex.value === null || (a2 = e2.items.value[e2.activeItemIndex.value]) == null ? void 0 : a2.id, "aria-labelledby": (s2 = t$1(e2.buttonRef)) == null ? void 0 : s2.id, id: p2, onKeydown: f2, onKeyup: d, role: "menu", tabIndex: 0, ref: e2.itemsRef };
1430
- return k({ props: __spreadValues(__spreadValues({}, o$1), u2), slot: t2, attrs: S2, slots: i2, features: h$1.RenderStrategy | h$1.Static, visible: l$1.value, name: "MenuItems" });
1579
+ var n2, i;
1580
+ let t2 = { open: e2.menuState.value === 0 }, _a2 = a2, { id: v2 } = _a2, u2 = __objRest(_a2, ["id"]), r2 = { "aria-activedescendant": e2.activeItemIndex.value === null || (n2 = e2.items.value[e2.activeItemIndex.value]) == null ? void 0 : n2.id, "aria-labelledby": (i = o(e2.buttonRef)) == null ? void 0 : i.id, id: v2, onKeydown: s2, onKeyup: p2, role: "menu", tabIndex: 0, ref: e2.itemsRef };
1581
+ return H$1({ ourProps: r2, theirProps: u2, slot: t2, attrs: b2, slots: l$1, features: N$1.RenderStrategy | N$1.Static, visible: o$2.value, name: "MenuItems" });
1431
1582
  };
1432
- } }), ve = defineComponent({ name: "MenuItem", props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false } }, setup(o2, { slots: S2, attrs: i2, expose: v }) {
1433
- let e2 = D("MenuItem"), p2 = `headlessui-menu-item-${t$2()}`, r2 = ref(null);
1434
- v({ el: r2, $el: r2 });
1435
- let f2 = computed$2(() => e2.activeItemIndex.value !== null ? e2.items.value[e2.activeItemIndex.value].id === p2 : false), d = computed$2(() => ({ disabled: o2.disabled, textValue: "", domRef: r2 }));
1583
+ } }), Me = defineComponent({ name: "MenuItem", inheritAttrs: false, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false }, id: { type: String, default: () => `headlessui-menu-item-${t$1()}` } }, setup(a2, { slots: b2, attrs: l2, expose: g }) {
1584
+ let e2 = P("MenuItem"), m2 = ref(null);
1585
+ g({ el: m2, $el: m2 });
1586
+ let s2 = computed$2(() => e2.activeItemIndex.value !== null ? e2.items.value[e2.activeItemIndex.value].id === a2.id : false), p2 = computed$2(() => ({ disabled: a2.disabled, textValue: "", domRef: m2 }));
1436
1587
  onMounted(() => {
1437
- var a2, s2;
1438
- let n2 = (s2 = (a2 = t$1(r2)) == null ? void 0 : a2.textContent) == null ? void 0 : s2.toLowerCase().trim();
1439
- n2 !== void 0 && (d.value.textValue = n2);
1440
- }), onMounted(() => e2.registerItem(p2, d)), onUnmounted(() => e2.unregisterItem(p2)), watchEffect(() => {
1441
- e2.menuState.value === 0 && (!f2.value || e2.activationTrigger.value !== 0 && nextTick(() => {
1442
- var n2, a2;
1443
- return (a2 = (n2 = t$1(r2)) == null ? void 0 : n2.scrollIntoView) == null ? void 0 : a2.call(n2, { block: "nearest" });
1444
- }));
1588
+ var i, I2;
1589
+ let n2 = (I2 = (i = o(m2)) == null ? void 0 : i.textContent) == null ? void 0 : I2.toLowerCase().trim();
1590
+ n2 !== void 0 && (p2.value.textValue = n2);
1591
+ }), onMounted(() => e2.registerItem(a2.id, p2)), onUnmounted(() => e2.unregisterItem(a2.id)), watchEffect(() => {
1592
+ e2.menuState.value === 0 && s2.value && e2.activationTrigger.value !== 0 && nextTick(() => {
1593
+ var n2, i;
1594
+ return (i = (n2 = o(m2)) == null ? void 0 : n2.scrollIntoView) == null ? void 0 : i.call(n2, { block: "nearest" });
1595
+ });
1445
1596
  });
1446
- function I(n2) {
1447
- if (o2.disabled)
1597
+ function d2(n2) {
1598
+ if (a2.disabled)
1448
1599
  return n2.preventDefault();
1449
- e2.closeMenu(), nextTick(() => {
1450
- var a2;
1451
- return (a2 = t$1(e2.buttonRef)) == null ? void 0 : a2.focus({ preventScroll: true });
1452
- });
1600
+ e2.closeMenu(), v(o(e2.buttonRef));
1453
1601
  }
1454
- function l2() {
1455
- if (o2.disabled)
1602
+ function o$12() {
1603
+ if (a2.disabled)
1456
1604
  return e2.goToItem(a$2.Nothing);
1457
- e2.goToItem(a$2.Specific, p2);
1605
+ e2.goToItem(a$2.Specific, a2.id);
1606
+ }
1607
+ let t2 = u();
1608
+ function v$12(n2) {
1609
+ t2.update(n2);
1458
1610
  }
1459
- function t2() {
1460
- o2.disabled || f2.value || e2.goToItem(a$2.Specific, p2, 0);
1611
+ function u$12(n2) {
1612
+ t2.wasMoved(n2) && (a2.disabled || s2.value || e2.goToItem(a$2.Specific, a2.id, 0));
1461
1613
  }
1462
- function u2() {
1463
- o2.disabled || !f2.value || e2.goToItem(a$2.Nothing);
1614
+ function r2(n2) {
1615
+ t2.wasMoved(n2) && (a2.disabled || s2.value && e2.goToItem(a$2.Nothing));
1464
1616
  }
1465
1617
  return () => {
1466
- let { disabled: n2 } = o2, a2 = { active: f2.value, disabled: n2 };
1467
- return k({ props: __spreadValues(__spreadValues({}, o2), { id: p2, ref: r2, role: "menuitem", tabIndex: n2 === true ? void 0 : -1, "aria-disabled": n2 === true ? true : void 0, onClick: I, onFocus: l2, onPointermove: t2, onMousemove: t2, onPointerleave: u2, onMouseleave: u2 }), slot: a2, attrs: i2, slots: S2, name: "MenuItem" });
1618
+ let { disabled: n2 } = a2, i = { active: s2.value, disabled: n2, close: e2.closeMenu }, _a2 = a2, { id: I2 } = _a2, M2 = __objRest(_a2, ["id"]);
1619
+ return H$1({ ourProps: { id: I2, ref: m2, role: "menuitem", tabIndex: n2 === true ? void 0 : -1, "aria-disabled": n2 === true ? true : void 0, disabled: void 0, onClick: d2, onFocus: o$12, onPointerenter: v$12, onMouseenter: v$12, onPointermove: u$12, onMousemove: u$12, onPointerleave: r2, onMouseleave: r2 }, theirProps: __spreadValues(__spreadValues({}, l2), M2), slot: i, attrs: l2, slots: b2, name: "MenuItem" });
1468
1620
  };
1469
1621
  } });
1470
- let u = Symbol("LabelContext");
1471
- function a() {
1472
- let t2 = inject(u, null);
1622
+ let a = Symbol("LabelContext");
1623
+ function d() {
1624
+ let t2 = inject(a, null);
1473
1625
  if (t2 === null) {
1474
1626
  let n2 = new Error("You used a <Label /> component, but it is not inside a parent.");
1475
- throw Error.captureStackTrace && Error.captureStackTrace(n2, a), n2;
1627
+ throw Error.captureStackTrace && Error.captureStackTrace(n2, d), n2;
1476
1628
  }
1477
1629
  return t2;
1478
1630
  }
1479
- function K({ slot: t2 = {}, name: n2 = "Label", props: i2 = {} } = {}) {
1631
+ function K({ slot: t2 = {}, name: n2 = "Label", props: i = {} } = {}) {
1480
1632
  let e2 = ref([]);
1481
- function r2(o2) {
1482
- return e2.value.push(o2), () => {
1483
- let l2 = e2.value.indexOf(o2);
1484
- l2 !== -1 && e2.value.splice(l2, 1);
1633
+ function l2(r2) {
1634
+ return e2.value.push(r2), () => {
1635
+ let o2 = e2.value.indexOf(r2);
1636
+ o2 !== -1 && e2.value.splice(o2, 1);
1485
1637
  };
1486
1638
  }
1487
- return provide(u, { register: r2, slot: t2, name: n2, props: i2 }), computed$2(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
1639
+ return provide(a, { register: l2, slot: t2, name: n2, props: i }), computed$2(() => e2.value.length > 0 ? e2.value.join(" ") : void 0);
1488
1640
  }
1489
- let T = defineComponent({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false } }, setup(t2, { slots: n2, attrs: i2 }) {
1490
- let e2 = a(), r2 = `headlessui-label-${t$2()}`;
1491
- return onMounted(() => onUnmounted(e2.register(r2))), () => {
1492
- let { name: o2 = "Label", slot: l2 = {}, props: p2 = {} } = e2, _a2 = t2, { passive: d } = _a2, c2 = __objRest(_a2, ["passive"]), f2 = __spreadProps(__spreadValues({}, Object.entries(p2).reduce((m2, [b2, g]) => Object.assign(m2, { [b2]: unref(g) }), {})), { id: r2 }), s2 = __spreadValues(__spreadValues({}, c2), f2);
1493
- return d && delete s2.onClick, k({ props: s2, slot: l2, attrs: i2, slots: n2, name: o2 });
1641
+ let T = defineComponent({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-label-${t$1()}` } }, setup(t2, { slots: n2, attrs: i }) {
1642
+ let e2 = d();
1643
+ return onMounted(() => onUnmounted(e2.register(t2.id))), () => {
1644
+ let { name: l2 = "Label", slot: r2 = {}, props: o2 = {} } = e2, _a2 = t2, { id: p2, passive: c2 } = _a2, s2 = __objRest(_a2, ["id", "passive"]), u2 = __spreadProps(__spreadValues({}, Object.entries(o2).reduce((f2, [b2, g]) => Object.assign(f2, { [b2]: unref(g) }), {})), { id: p2 });
1645
+ return c2 && (delete u2.onClick, delete s2.onClick), H$1({ ourProps: u2, theirProps: s2, slot: r2, attrs: i, slots: n2, name: l2 });
1494
1646
  };
1495
1647
  } });
1496
- let b = Symbol("GroupContext");
1497
- defineComponent({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(l2, { slots: a2, attrs: i2 }) {
1498
- let n2 = ref(null), u2 = K({ name: "SwitchLabel", props: { onClick() {
1499
- !n2.value || (n2.value.click(), n2.value.focus({ preventScroll: true }));
1500
- } } }), t2 = P$1({ name: "SwitchDescription" });
1501
- return provide(b, { switchRef: n2, labelledby: u2, describedby: t2 }), () => k({ props: l2, slot: {}, slots: a2, attrs: i2, name: "SwitchGroup" });
1648
+ let S = Symbol("GroupContext");
1649
+ defineComponent({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(l2, { slots: c2, attrs: o2 }) {
1650
+ let r2 = ref(null), p2 = K({ name: "SwitchLabel", props: { onClick() {
1651
+ r2.value && (r2.value.click(), r2.value.focus({ preventScroll: true }));
1652
+ } } }), t2 = M({ name: "SwitchDescription" });
1653
+ return provide(S, { switchRef: r2, labelledby: p2, describedby: t2 }), () => H$1({ theirProps: l2, ourProps: {}, slot: {}, slots: c2, attrs: o2, name: "SwitchGroup" });
1502
1654
  } });
1503
- let Y = defineComponent({ name: "Switch", emits: { "update:modelValue": (l2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: false }, name: { type: String, optional: true }, value: { type: String, optional: true } }, inheritAttrs: false, setup(l2, { emit: a2, attrs: i2, slots: n2, expose: u2 }) {
1504
- let t2 = inject(b, null), p$12 = `headlessui-switch-${t$2()}`;
1505
- function c2() {
1506
- a2("update:modelValue", !l2.modelValue);
1507
- }
1508
- let h2 = ref(null), r2 = t2 === null ? h2 : t2.switchRef, S2 = b$1(computed$2(() => ({ as: l2.as, type: i2.type })), r2);
1509
- u2({ el: r2, $el: r2 });
1510
- function w2(e2) {
1511
- e2.preventDefault(), c2();
1655
+ let ue = defineComponent({ name: "Switch", emits: { "update:modelValue": (l2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: true }, name: { type: String, optional: true }, value: { type: String, optional: true }, id: { type: String, default: () => `headlessui-switch-${t$1()}` } }, inheritAttrs: false, setup(l2, { emit: c2, attrs: o$2, slots: r2, expose: p2 }) {
1656
+ let t2 = inject(S, null), [i, s2] = d$1(computed$2(() => l2.modelValue), (e2) => c2("update:modelValue", e2), computed$2(() => l2.defaultChecked));
1657
+ function f2() {
1658
+ s2(!i.value);
1512
1659
  }
1513
- function v(e2) {
1514
- e2.key === o.Space ? (e2.preventDefault(), c2()) : e2.key === o.Enter && p(e2.currentTarget);
1660
+ let w2 = ref(null), u2 = t2 === null ? w2 : t2.switchRef, k = b$1(computed$2(() => ({ as: l2.as, type: o$2.type })), u2);
1661
+ p2({ el: u2, $el: u2 });
1662
+ function C(e2) {
1663
+ e2.preventDefault(), f2();
1515
1664
  }
1516
1665
  function g(e2) {
1666
+ e2.key === o$1.Space ? (e2.preventDefault(), f2()) : e2.key === o$1.Enter && p$1(e2.currentTarget);
1667
+ }
1668
+ function R(e2) {
1517
1669
  e2.preventDefault();
1518
1670
  }
1519
- return () => {
1520
- let _a2 = l2, { name: e2, value: R2, modelValue: o2 } = _a2, k$1 = __objRest(_a2, ["name", "value", "modelValue"]), D2 = { checked: o2 }, K2 = { id: p$12, ref: r2, role: "switch", type: S2.value, tabIndex: 0, "aria-checked": o2, "aria-labelledby": t2 == null ? void 0 : t2.labelledby.value, "aria-describedby": t2 == null ? void 0 : t2.describedby.value, onClick: w2, onKeyup: v, onKeypress: g };
1521
- return h$2(Fragment, [e2 != null && o2 != null ? h$2(m, S$1({ features: a$1.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: o2, name: e2, value: R2 })) : null, k({ props: __spreadValues(__spreadValues(__spreadValues({}, i2), k$1), K2), slot: D2, attrs: i2, slots: n2, name: "Switch" })]);
1671
+ let a2 = computed$2(() => {
1672
+ var e2, n2;
1673
+ return (n2 = (e2 = o(u2)) == null ? void 0 : e2.closest) == null ? void 0 : n2.call(e2, "form");
1674
+ });
1675
+ return onMounted(() => {
1676
+ watch([a2], () => {
1677
+ if (!a2.value || l2.defaultChecked === void 0)
1678
+ return;
1679
+ function e2() {
1680
+ s2(l2.defaultChecked);
1681
+ }
1682
+ return a2.value.addEventListener("reset", e2), () => {
1683
+ var n2;
1684
+ (n2 = a2.value) == null || n2.removeEventListener("reset", e2);
1685
+ };
1686
+ }, { immediate: true });
1687
+ }), () => {
1688
+ let _a2 = l2, { id: e2, name: n2, value: D2 } = _a2, E2 = __objRest(_a2, ["id", "name", "value"]), K2 = { checked: i.value }, L = { id: e2, ref: u2, role: "switch", type: k.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": t2 == null ? void 0 : t2.labelledby.value, "aria-describedby": t2 == null ? void 0 : t2.describedby.value, onClick: C, onKeyup: g, onKeypress: R };
1689
+ return h$1(Fragment, [n2 != null && i.value != null ? h$1(f$1, K$1({ features: a$1.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: i.value, name: n2, value: D2 })) : null, H$1({ ourProps: L, theirProps: __spreadValues(__spreadValues({}, o$2), T$2(E2, ["modelValue", "defaultChecked"])), slot: K2, attrs: o$2, slots: r2, name: "Switch" })]);
1522
1690
  };
1523
1691
  } });
1524
1692
  T;
1525
- S;
1693
+ E$1;
1526
1694
  function getWindow(node) {
1527
1695
  if (node == null) {
1528
1696
  return window;
@@ -1549,32 +1717,47 @@ function isShadowRoot(node) {
1549
1717
  return node instanceof OwnElement || node instanceof ShadowRoot;
1550
1718
  }
1551
1719
  var round = Math.round;
1552
- function getBoundingClientRect(element, includeScale) {
1720
+ function getUAString() {
1721
+ var uaData = navigator.userAgentData;
1722
+ if (uaData != null && uaData.brands) {
1723
+ return uaData.brands.map(function(item) {
1724
+ return item.brand + "/" + item.version;
1725
+ }).join(" ");
1726
+ }
1727
+ return navigator.userAgent;
1728
+ }
1729
+ function isLayoutViewport() {
1730
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
1731
+ }
1732
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
1553
1733
  if (includeScale === void 0) {
1554
1734
  includeScale = false;
1555
1735
  }
1556
- var rect = element.getBoundingClientRect();
1736
+ if (isFixedStrategy === void 0) {
1737
+ isFixedStrategy = false;
1738
+ }
1739
+ var clientRect = element.getBoundingClientRect();
1557
1740
  var scaleX = 1;
1558
1741
  var scaleY = 1;
1559
- if (isHTMLElement(element) && includeScale) {
1560
- var offsetHeight = element.offsetHeight;
1561
- var offsetWidth = element.offsetWidth;
1562
- if (offsetWidth > 0) {
1563
- scaleX = round(rect.width) / offsetWidth || 1;
1564
- }
1565
- if (offsetHeight > 0) {
1566
- scaleY = round(rect.height) / offsetHeight || 1;
1567
- }
1568
- }
1742
+ if (includeScale && isHTMLElement(element)) {
1743
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
1744
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
1745
+ }
1746
+ var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
1747
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
1748
+ var x2 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
1749
+ var y2 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
1750
+ var width2 = clientRect.width / scaleX;
1751
+ var height2 = clientRect.height / scaleY;
1569
1752
  return {
1570
- width: rect.width / scaleX,
1571
- height: rect.height / scaleY,
1572
- top: rect.top / scaleY,
1573
- right: rect.right / scaleX,
1574
- bottom: rect.bottom / scaleY,
1575
- left: rect.left / scaleX,
1576
- x: rect.left / scaleX,
1577
- y: rect.top / scaleY
1753
+ width: width2,
1754
+ height: height2,
1755
+ top: y2,
1756
+ right: x2 + width2,
1757
+ bottom: y2 + height2,
1758
+ left: x2,
1759
+ x: x2,
1760
+ y: y2
1578
1761
  };
1579
1762
  }
1580
1763
  function getWindowScroll(node) {
@@ -1628,7 +1811,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1628
1811
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
1629
1812
  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1630
1813
  var documentElement = getDocumentElement(offsetParent);
1631
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
1814
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
1632
1815
  var scroll = {
1633
1816
  scrollLeft: 0,
1634
1817
  scrollTop: 0
@@ -1710,8 +1893,8 @@ function getTrueOffsetParent(element) {
1710
1893
  return element.offsetParent;
1711
1894
  }
1712
1895
  function getContainingBlock(element) {
1713
- var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
1714
- var isIE = navigator.userAgent.indexOf("Trident") !== -1;
1896
+ var isFirefox = /firefox/i.test(getUAString());
1897
+ var isIE = /Trident/i.test(getUAString());
1715
1898
  if (isIE && isHTMLElement(element)) {
1716
1899
  var elementCss = getComputedStyle(element);
1717
1900
  if (elementCss.position === "fixed") {
@@ -2072,27 +2255,27 @@ var unsetSides = {
2072
2255
  left: "auto"
2073
2256
  };
2074
2257
  function roundOffsetsByDPR(_ref) {
2075
- var x2 = _ref.x, y = _ref.y;
2258
+ var x2 = _ref.x, y2 = _ref.y;
2076
2259
  var win = window;
2077
2260
  var dpr = win.devicePixelRatio || 1;
2078
2261
  return {
2079
2262
  x: round(x2 * dpr) / dpr || 0,
2080
- y: round(y * dpr) / dpr || 0
2263
+ y: round(y2 * dpr) / dpr || 0
2081
2264
  };
2082
2265
  }
2083
2266
  function mapToStyles(_ref2) {
2084
2267
  var _Object$assign2;
2085
2268
  var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
2086
- var _offsets$x = offsets.x, x2 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y;
2269
+ var _offsets$x = offsets.x, x2 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y2 = _offsets$y === void 0 ? 0 : _offsets$y;
2087
2270
  var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
2088
2271
  x: x2,
2089
- y
2272
+ y: y2
2090
2273
  }) : {
2091
2274
  x: x2,
2092
- y
2275
+ y: y2
2093
2276
  };
2094
2277
  x2 = _ref3.x;
2095
- y = _ref3.y;
2278
+ y2 = _ref3.y;
2096
2279
  var hasX = offsets.hasOwnProperty("x");
2097
2280
  var hasY = offsets.hasOwnProperty("y");
2098
2281
  var sideX = left;
@@ -2113,8 +2296,8 @@ function mapToStyles(_ref2) {
2113
2296
  if (placement === top || (placement === left || placement === right) && variation === end) {
2114
2297
  sideY = bottom;
2115
2298
  var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
2116
- y -= offsetY - popperRect.height;
2117
- y *= gpuAcceleration ? 1 : -1;
2299
+ y2 -= offsetY - popperRect.height;
2300
+ y2 *= gpuAcceleration ? 1 : -1;
2118
2301
  }
2119
2302
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
2120
2303
  sideX = right;
@@ -2128,18 +2311,18 @@ function mapToStyles(_ref2) {
2128
2311
  }, adaptive && unsetSides);
2129
2312
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
2130
2313
  x: x2,
2131
- y
2314
+ y: y2
2132
2315
  }) : {
2133
2316
  x: x2,
2134
- y
2317
+ y: y2
2135
2318
  };
2136
2319
  x2 = _ref4.x;
2137
- y = _ref4.y;
2320
+ y2 = _ref4.y;
2138
2321
  if (gpuAcceleration) {
2139
2322
  var _Object$assign;
2140
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x2 + "px, " + y + "px)" : "translate3d(" + x2 + "px, " + y + "px, 0)", _Object$assign));
2323
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x2 + "px, " + y2 + "px)" : "translate3d(" + x2 + "px, " + y2 + "px, 0)", _Object$assign));
2141
2324
  }
2142
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x2 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
2325
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ? x2 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
2143
2326
  }
2144
2327
  function computeStyles(_ref5) {
2145
2328
  var state = _ref5.state, options = _ref5.options;
@@ -2281,12 +2464,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2281
2464
  const placement = props.position === "left" ? "bottom-end" : "bottom-start";
2282
2465
  const [button, container] = usePopper({ placement });
2283
2466
  return (_ctx, _cache) => {
2284
- return openBlock(), createBlock(unref(fe), {
2467
+ return openBlock(), createBlock(unref(ge), {
2285
2468
  as: "div",
2286
2469
  class: "relative inline-block text-left"
2287
2470
  }, {
2288
2471
  default: withCtx(({ open }) => [
2289
- createVNode(unref(me), {
2472
+ createVNode(unref(Se), {
2290
2473
  class: "focus:outline-none",
2291
2474
  ref_key: "button",
2292
2475
  ref: button
@@ -2319,7 +2502,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2319
2502
  "leave-to-class": "transform -translate-y-2 opacity-0"
2320
2503
  }, {
2321
2504
  default: withCtx(() => [
2322
- createVNode(unref(pe), {
2505
+ createVNode(unref(be), {
2323
2506
  class: normalizeClass([
2324
2507
  {
2325
2508
  "absolute left-0 origin-top-left": !__props.usePortal && __props.position === "right",
@@ -2357,7 +2540,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2357
2540
  },
2358
2541
  setup(__props) {
2359
2542
  return (_ctx, _cache) => {
2360
- return openBlock(), createBlock(unref(ve), normalizeProps(guardReactiveProps({ disabled: __props.disabled })), {
2543
+ return openBlock(), createBlock(unref(Me), normalizeProps(guardReactiveProps({ disabled: __props.disabled })), {
2361
2544
  default: withCtx(({ active }) => [
2362
2545
  createElementVNode("span", mergeProps({
2363
2546
  class: ["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
@@ -2423,7 +2606,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2423
2606
  }
2424
2607
  });
2425
2608
  return (_ctx, _cache) => {
2426
- return openBlock(), createBlock(unref(we), {
2609
+ return openBlock(), createBlock(unref(Ee), {
2427
2610
  as: "div",
2428
2611
  modelValue: unref(selected),
2429
2612
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selected) ? selected.value = $event : null),
@@ -2431,7 +2614,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2431
2614
  }, {
2432
2615
  default: withCtx(() => [
2433
2616
  createElementVNode("div", _hoisted_1$3, [
2434
- createVNode(unref(ke), {
2617
+ createVNode(unref(Ae), {
2435
2618
  class: normalizeClass(["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", [unref(inputClasses), unref(textSizeClasses), unref(disabledClasses)]])
2436
2619
  }, {
2437
2620
  default: withCtx(() => {
@@ -2460,10 +2643,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2460
2643
  "leave-to-class": "opacity-0"
2461
2644
  }, {
2462
2645
  default: withCtx(() => [
2463
- createVNode(unref(Ce), { 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" }, {
2646
+ createVNode(unref(Fe), { 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" }, {
2464
2647
  default: withCtx(() => [
2465
2648
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
2466
- return openBlock(), createBlock(unref(Me), {
2649
+ return openBlock(), createBlock(unref(Be), {
2467
2650
  as: "template",
2468
2651
  key: item.id,
2469
2652
  value: item,
@@ -2607,7 +2790,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2607
2790
  emits("change", newValue);
2608
2791
  };
2609
2792
  return (_ctx, _cache) => {
2610
- return openBlock(), createBlock(unref(Y), {
2793
+ return openBlock(), createBlock(unref(ue), {
2611
2794
  modelValue: __props.modelValue,
2612
2795
  label: __props.label,
2613
2796
  class: normalizeClass([__props.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"]),