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VC,EAAQ,EAAC,KACTC,EAAO,EAAC,MACRC,EAAQ,EAAC,QACTC,EAAU,EAAC,QACXC,EAAU,GACRR,EAEEwE,GAAgB,OAAUzE,EAAMI,EAAiB,GAARD,EAAYD,GACrDwE,GAAc,OAAQD,EAAenE,EAAe,EAARD,EAAWH,GAIvDyE,EAAyB,KADVlE,EAAyB,IADzBD,EAAkB,GAARD,IAI/B,OAAO,OAAcL,GAASS,IAAMX,GAAO0E,EAAcC,EAC3D,C,kDC5CO,SAASC,EAAQ5E,EAAMgB,EAAQd,GACpC,OAAO,OAAQF,GAAOgB,EAAQd,EAChC,C,kDCCO,SAAS2E,EAAU7E,EAAMgB,EAAQd,GACtC,OAAO,OAAUF,GAAOgB,EAAQd,EAClC,C","sources":["webpack://@finviz/website/../node_modules/events/events.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/7HVFURXT.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/KPEX55MY.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/P4IRICAX.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/AXB53BZF.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/QYJ6MIDR.js","webpack://@finviz/website/../node_modules/@ariakit/core/esm/select/select-store.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/S5WQ44SQ.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/T7VMP3TM.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/YF2ICFG4.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/YUOJWFSO.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/SWSPTQMT.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/menu/menu-group-label.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/36LIF33V.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/YORGHBM4.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/menu/menu-group.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/popover/popover-provider.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/select/select-label.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/XRBJGF7I.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/select/select-popover.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/select/select-provider.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/WTCO46W5.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/ZOBNYESQ.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/select/select-renderer.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/DR55NYVS.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/__chunks/UD53QJDV.js","webpack://@finviz/website/../node_modules/@ariakit/react-core/esm/select/select.js","webpack://@finviz/website/../node_modules/date-fns/_lib/normalizeInterval.js","webpack://@finviz/website/../node_modules/date-fns/add.js","webpack://@finviz/website/../node_modules/date-fns/addMonths.js","webpack://@finviz/website/../node_modules/date-fns/endOfDay.js","webpack://@finviz/website/../node_modules/date-fns/endOfMonth.js","webpack://@finviz/website/../node_modules/date-fns/differenceInDays.js","webpack://@finviz/website/../node_modules/date-fns/_lib/getRoundingMethod.js","webpack://@finviz/website/../node_modules/date-fns/differenceInHours.js","webpack://@finviz/website/../node_modules/date-fns/differenceInMilliseconds.js","webpack://@finviz/website/../node_modules/date-fns/differenceInMinutes.js","webpack://@finviz/website/../node_modules/date-fns/compareAsc.js","webpack://@finviz/website/../node_modules/date-fns/differenceInCalendarMonths.js","webpack://@finviz/website/../node_modules/date-fns/isLastDayOfMonth.js","webpack://@finviz/website/../node_modules/date-fns/differenceInMonths.js","webpack://@finviz/website/../node_modules/date-fns/differenceInSeconds.js","webpack://@finviz/website/../node_modules/date-fns/differenceInCalendarYears.js","webpack://@finviz/website/../node_modules/date-fns/differenceInYears.js","webpack://@finviz/website/../node_modules/date-fns/intervalToDuration.js","webpack://@finviz/website/../node_modules/date-fns/sub.js","webpack://@finviz/website/../node_modules/date-fns/subDays.js","webpack://@finviz/website/../node_modules/date-fns/subMonths.js"],"sourcesContent":["// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n  ? R.apply\n  : function ReflectApply(target, receiver, args) {\n    return Function.prototype.apply.call(target, receiver, args);\n  }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n  ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target)\n      .concat(Object.getOwnPropertySymbols(target));\n  };\n} else {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target);\n  };\n}\n\nfunction ProcessEmitWarning(warning) {\n  if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n  return value !== value;\n}\n\nfunction EventEmitter() {\n  EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n  if (typeof listener !== 'function') {\n    throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n  }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n  enumerable: true,\n  get: function() {\n    return defaultMaxListeners;\n  },\n  set: function(arg) {\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n      throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n    }\n    defaultMaxListeners = arg;\n  }\n});\n\nEventEmitter.init = function() {\n\n  if (this._events === undefined ||\n      this._events === Object.getPrototypeOf(this)._events) {\n    this._events = Object.create(null);\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n    throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n  }\n  this._maxListeners = n;\n  return this;\n};\n\nfunction _getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n  var args = [];\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n  var doError = (type === 'error');\n\n  var events = this._events;\n  if (events !== undefined)\n    doError = (doError && events.error === undefined);\n  else if (!doError)\n    return false;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    var er;\n    if (args.length > 0)\n      er = args[0];\n    if (er instanceof Error) {\n      // Note: The comments on the `throw` lines are intentional, they show\n      // up in Node's output if this results in an unhandled exception.\n      throw er; // Unhandled 'error' event\n    }\n    // At least give some kind of context to the user\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n    err.context = er;\n    throw err; // Unhandled 'error' event\n  }\n\n  var handler = events[type];\n\n  if (handler === undefined)\n    return false;\n\n  if (typeof handler === 'function') {\n    ReflectApply(handler, this, args);\n  } else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      ReflectApply(listeners[i], this, args);\n  }\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  checkListener(listener);\n\n  events = target._events;\n  if (events === undefined) {\n    events = target._events = Object.create(null);\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener !== undefined) {\n      target.emit('newListener', type,\n                  listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (existing === undefined) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] =\n        prepend ? [listener, existing] : [existing, listener];\n      // If we've already got an array, just append.\n    } else if (prepend) {\n      existing.unshift(listener);\n    } else {\n      existing.push(listener);\n    }\n\n    // Check for listener leak\n    m = _getMaxListeners(target);\n    if (m > 0 && existing.length > m && !existing.warned) {\n      existing.warned = true;\n      // No error code for this since it is a Warning\n      // eslint-disable-next-line no-restricted-syntax\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\n                          existing.length + ' ' + String(type) + ' listeners ' +\n                          'added. Use emitter.setMaxListeners() to ' +\n                          'increase limit');\n      w.name = 'MaxListenersExceededWarning';\n      w.emitter = target;\n      w.type = type;\n      w.count = existing.length;\n      ProcessEmitWarning(w);\n    }\n  }\n\n  return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction onceWrapper() {\n  if (!this.fired) {\n    this.target.removeListener(this.type, this.wrapFn);\n    this.fired = true;\n    if (arguments.length === 0)\n      return this.listener.call(this.target);\n    return this.listener.apply(this.target, arguments);\n  }\n}\n\nfunction _onceWrap(target, type, listener) {\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n  var wrapped = onceWrapper.bind(state);\n  wrapped.listener = listener;\n  state.wrapFn = wrapped;\n  return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  checkListener(listener);\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      checkListener(listener);\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      checkListener(listener);\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      list = events[type];\n      if (list === undefined)\n        return this;\n\n      if (list === listener || list.listener === listener) {\n        if (--this._eventsCount === 0)\n          this._events = Object.create(null);\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length - 1; i >= 0; i--) {\n          if (list[i] === listener || list[i].listener === listener) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (position === 0)\n          list.shift();\n        else {\n          spliceOne(list, position);\n        }\n\n        if (list.length === 1)\n          events[type] = list[0];\n\n        if (events.removeListener !== undefined)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events, i;\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (events.removeListener === undefined) {\n        if (arguments.length === 0) {\n          this._events = Object.create(null);\n          this._eventsCount = 0;\n        } else if (events[type] !== undefined) {\n          if (--this._eventsCount === 0)\n            this._events = Object.create(null);\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = Object.keys(events);\n        var key;\n        for (i = 0; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = Object.create(null);\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners !== undefined) {\n        // LIFO order\n        for (i = listeners.length - 1; i >= 0; i--) {\n          this.removeListener(type, listeners[i]);\n        }\n      }\n\n      return this;\n    };\n\nfunction _listeners(target, type, unwrap) {\n  var events = target._events;\n\n  if (events === undefined)\n    return [];\n\n  var evlistener = events[type];\n  if (evlistener === undefined)\n    return [];\n\n  if (typeof evlistener === 'function')\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n  return unwrap ?\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n  return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events !== undefined) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener !== undefined) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n  var copy = new Array(n);\n  for (var i = 0; i < n; ++i)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction spliceOne(list, index) {\n  for (; index + 1 < list.length; index++)\n    list[index] = list[index + 1];\n  list.pop();\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n\nfunction once(emitter, name) {\n  return new Promise(function (resolve, reject) {\n    function errorListener(err) {\n      emitter.removeListener(name, resolver);\n      reject(err);\n    }\n\n    function resolver() {\n      if (typeof emitter.removeListener === 'function') {\n        emitter.removeListener('error', errorListener);\n      }\n      resolve([].slice.call(arguments));\n    };\n\n    eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n    if (name !== 'error') {\n      addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n    }\n  });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n  if (typeof emitter.on === 'function') {\n    eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n  }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n  if (typeof emitter.on === 'function') {\n    if (flags.once) {\n      emitter.once(name, listener);\n    } else {\n      emitter.on(name, listener);\n    }\n  } else if (typeof emitter.addEventListener === 'function') {\n    // EventTarget does not have `error` event semantics like Node\n    // EventEmitters, we do not listen for `error` events here.\n    emitter.addEventListener(name, function wrapListener(arg) {\n      // IE does not have builtin `{ once: true }` support so we\n      // have to do it manually.\n      if (flags.once) {\n        emitter.removeEventListener(name, wrapListener);\n      }\n      listener(arg);\n    });\n  } else {\n    throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n  }\n}\n","\"use client\";\n\n// src/group/group-label-context.tsx\nimport { createContext } from \"react\";\nvar GroupLabelContext = createContext(void 0);\n\nexport {\n  GroupLabelContext\n};\n","\"use client\";\nimport {\n  CompositeContextProvider,\n  CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n  PopoverContextProvider,\n  PopoverScopedContextProvider\n} from \"./MTZPJQMC.js\";\nimport {\n  createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/select/select-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n  [PopoverContextProvider, CompositeContextProvider],\n  [PopoverScopedContextProvider, CompositeScopedContextProvider]\n);\nvar useSelectContext = ctx.useContext;\nvar useSelectScopedContext = ctx.useScopedContext;\nvar useSelectProviderContext = ctx.useProviderContext;\nvar SelectContextProvider = ctx.ContextProvider;\nvar SelectScopedContextProvider = ctx.ScopedContextProvider;\nvar SelectItemCheckedContext = createContext(false);\nvar SelectHeadingContext = createContext(null);\n\nexport {\n  useSelectContext,\n  useSelectScopedContext,\n  useSelectProviderContext,\n  SelectContextProvider,\n  SelectScopedContextProvider,\n  SelectItemCheckedContext,\n  SelectHeadingContext\n};\n","\"use client\";\nimport {\n  useButton\n} from \"./X5NMLKT6.js\";\nimport {\n  useDisclosureProviderContext\n} from \"./S6EF7IVO.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useBooleanEvent,\n  useEvent,\n  useMergeRefs,\n  useMetadataProps\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/disclosure/disclosure.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useRef, useState } from \"react\";\nvar TagName = \"button\";\nvar symbol = Symbol(\"disclosure\");\nvar useDisclosure = createHook(\n  function useDisclosure2(_a) {\n    var _b = _a, { store, toggleOnClick = true } = _b, props = __objRest(_b, [\"store\", \"toggleOnClick\"]);\n    const context = useDisclosureProviderContext();\n    store = store || context;\n    invariant(\n      store,\n      process.env.NODE_ENV !== \"production\" && \"Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component.\"\n    );\n    const ref = useRef(null);\n    const [expanded, setExpanded] = useState(false);\n    const disclosureElement = store.useState(\"disclosureElement\");\n    const open = store.useState(\"open\");\n    useEffect(() => {\n      let isCurrentDisclosure = disclosureElement === ref.current;\n      if (!(disclosureElement == null ? void 0 : disclosureElement.isConnected)) {\n        store == null ? void 0 : store.setDisclosureElement(ref.current);\n        isCurrentDisclosure = true;\n      }\n      setExpanded(open && isCurrentDisclosure);\n    }, [disclosureElement, store, open]);\n    const onClickProp = props.onClick;\n    const toggleOnClickProp = useBooleanEvent(toggleOnClick);\n    const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);\n    const onClick = useEvent((event) => {\n      onClickProp == null ? void 0 : onClickProp(event);\n      if (event.defaultPrevented) return;\n      if (isDuplicate) return;\n      if (!toggleOnClickProp(event)) return;\n      store == null ? void 0 : store.setDisclosureElement(event.currentTarget);\n      store == null ? void 0 : store.toggle();\n    });\n    const contentElement = store.useState(\"contentElement\");\n    props = __spreadProps(__spreadValues(__spreadValues({\n      \"aria-expanded\": expanded,\n      \"aria-controls\": contentElement == null ? void 0 : contentElement.id\n    }, metadataProps), props), {\n      ref: useMergeRefs(ref, props.ref),\n      onClick\n    });\n    props = useButton(props);\n    return props;\n  }\n);\nvar Disclosure = forwardRef(function Disclosure2(props) {\n  const htmlProps = useDisclosure(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useDisclosure,\n  Disclosure\n};\n","\"use client\";\nimport {\n  useDisclosure\n} from \"./P4IRICAX.js\";\nimport {\n  useDialogProviderContext\n} from \"./RS7LB2H4.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  __objRest,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/dialog/dialog-disclosure.tsx\nimport { getPopupRole } from \"@ariakit/core/utils/dom\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nvar TagName = \"button\";\nvar useDialogDisclosure = createHook(\n  function useDialogDisclosure2(_a) {\n    var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n    const context = useDialogProviderContext();\n    store = store || context;\n    invariant(\n      store,\n      process.env.NODE_ENV !== \"production\" && \"DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component.\"\n    );\n    const contentElement = store.useState(\"contentElement\");\n    props = __spreadValues({\n      \"aria-haspopup\": getPopupRole(contentElement, \"dialog\")\n    }, props);\n    props = useDisclosure(__spreadValues({ store }, props));\n    return props;\n  }\n);\nvar DialogDisclosure = forwardRef(function DialogDisclosure2(props) {\n  const htmlProps = useDialogDisclosure(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useDialogDisclosure,\n  DialogDisclosure\n};\n","\"use client\";\nimport {\n  useDialogDisclosure\n} from \"./AXB53BZF.js\";\nimport {\n  usePopoverAnchor\n} from \"./OMU7RWRV.js\";\nimport {\n  PopoverScopedContextProvider,\n  usePopoverProviderContext\n} from \"./MTZPJQMC.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useEvent,\n  useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-disclosure.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nvar usePopoverDisclosure = createHook(function usePopoverDisclosure2(_a) {\n  var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n  const context = usePopoverProviderContext();\n  store = store || context;\n  invariant(\n    store,\n    process.env.NODE_ENV !== \"production\" && \"PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component.\"\n  );\n  const onClickProp = props.onClick;\n  const onClick = useEvent((event) => {\n    store == null ? void 0 : store.setAnchorElement(event.currentTarget);\n    onClickProp == null ? void 0 : onClickProp(event);\n  });\n  props = useWrapElement(\n    props,\n    (element) => /* @__PURE__ */ jsx(PopoverScopedContextProvider, { value: store, children: element }),\n    [store]\n  );\n  props = __spreadProps(__spreadValues({}, props), {\n    onClick\n  });\n  props = usePopoverAnchor(__spreadValues({ store }, props));\n  props = useDialogDisclosure(__spreadValues({ store }, props));\n  return props;\n});\nvar PopoverDisclosure = forwardRef(function PopoverDisclosure2(props) {\n  const htmlProps = usePopoverDisclosure(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  usePopoverDisclosure,\n  PopoverDisclosure\n};\n","\"use client\";\nimport {\n  createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport \"../__chunks/CYQWQL4J.js\";\nimport {\n  toArray\n} from \"../__chunks/7PRQYBBV.js\";\nimport {\n  createPopoverStore\n} from \"../__chunks/ME2CUF3F.js\";\nimport \"../__chunks/FZZ2AVHF.js\";\nimport \"../__chunks/RCQ5P4YE.js\";\nimport {\n  batch,\n  createStore,\n  mergeStore,\n  omit,\n  setup,\n  sync,\n  throwOnConflictingProps\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n  defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-store.ts\nfunction createSelectStore(_a = {}) {\n  var _b = _a, {\n    combobox\n  } = _b, props = __objRest(_b, [\n    \"combobox\"\n  ]);\n  const store = mergeStore(\n    props.store,\n    omit(combobox, [\n      \"value\",\n      \"items\",\n      \"renderedItems\",\n      \"baseElement\",\n      \"arrowElement\",\n      \"anchorElement\",\n      \"contentElement\",\n      \"popoverElement\",\n      \"disclosureElement\"\n    ])\n  );\n  throwOnConflictingProps(props, store);\n  const syncState = store.getState();\n  const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n    store,\n    virtualFocus: defaultValue(\n      props.virtualFocus,\n      syncState.virtualFocus,\n      true\n    ),\n    includesBaseElement: defaultValue(\n      props.includesBaseElement,\n      syncState.includesBaseElement,\n      false\n    ),\n    activeId: defaultValue(\n      props.activeId,\n      syncState.activeId,\n      props.defaultActiveId,\n      null\n    ),\n    orientation: defaultValue(\n      props.orientation,\n      syncState.orientation,\n      \"vertical\"\n    )\n  }));\n  const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {\n    store,\n    placement: defaultValue(\n      props.placement,\n      syncState.placement,\n      \"bottom-start\"\n    )\n  }));\n  const initialValue = new String(\"\");\n  const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), popover.getState()), {\n    value: defaultValue(\n      props.value,\n      syncState.value,\n      props.defaultValue,\n      initialValue\n    ),\n    setValueOnMove: defaultValue(\n      props.setValueOnMove,\n      syncState.setValueOnMove,\n      false\n    ),\n    labelElement: defaultValue(syncState.labelElement, null),\n    selectElement: defaultValue(syncState.selectElement, null),\n    listElement: defaultValue(syncState.listElement, null)\n  });\n  const select = createStore(initialState, composite, popover, store);\n  setup(\n    select,\n    () => sync(select, [\"value\", \"items\"], (state) => {\n      if (state.value !== initialValue) return;\n      if (!state.items.length) return;\n      const item = state.items.find(\n        (item2) => !item2.disabled && item2.value != null\n      );\n      if ((item == null ? void 0 : item.value) == null) return;\n      select.setState(\"value\", item.value);\n    })\n  );\n  setup(\n    select,\n    () => sync(select, [\"mounted\"], (state) => {\n      if (state.mounted) return;\n      select.setState(\"activeId\", initialState.activeId);\n    })\n  );\n  setup(\n    select,\n    () => sync(select, [\"mounted\", \"items\", \"value\"], (state) => {\n      if (combobox) return;\n      if (state.mounted) return;\n      const values = toArray(state.value);\n      const lastValue = values[values.length - 1];\n      if (lastValue == null) return;\n      const item = state.items.find(\n        (item2) => !item2.disabled && item2.value === lastValue\n      );\n      if (!item) return;\n      select.setState(\"activeId\", item.id);\n    })\n  );\n  setup(\n    select,\n    () => batch(select, [\"setValueOnMove\", \"moves\"], (state) => {\n      const { mounted, value, activeId } = select.getState();\n      if (!state.setValueOnMove && mounted) return;\n      if (Array.isArray(value)) return;\n      if (!state.moves) return;\n      if (!activeId) return;\n      const item = composite.item(activeId);\n      if (!item || item.disabled || item.value == null) return;\n      select.setState(\"value\", item.value);\n    })\n  );\n  return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, composite), popover), select), {\n    combobox,\n    setValue: (value) => select.setState(\"value\", value),\n    setLabelElement: (element) => select.setState(\"labelElement\", element),\n    setSelectElement: (element) => select.setState(\"selectElement\", element),\n    setListElement: (element) => select.setState(\"listElement\", element)\n  });\n}\nexport {\n  createSelectStore\n};\n","\"use client\";\nimport {\n  useComboboxProviderContext\n} from \"./VEVQD5MH.js\";\nimport {\n  useCompositeStoreOptions,\n  useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n  usePopoverStoreProps\n} from \"./O2PQ2652.js\";\nimport {\n  useStore,\n  useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n  useUpdateEffect\n} from \"./ABQUS43J.js\";\nimport {\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-store.ts\nimport * as Core from \"@ariakit/core/select/select-store\";\nfunction useSelectStoreOptions(props) {\n  const combobox = useComboboxProviderContext();\n  props = __spreadProps(__spreadValues({}, props), {\n    combobox: props.combobox !== void 0 ? props.combobox : combobox\n  });\n  return useCompositeStoreOptions(props);\n}\nfunction useSelectStoreProps(store, update, props) {\n  useUpdateEffect(update, [props.combobox]);\n  useStoreProps(store, props, \"value\", \"setValue\");\n  useStoreProps(store, props, \"setValueOnMove\");\n  return Object.assign(\n    usePopoverStoreProps(\n      useCompositeStoreProps(store, update, props),\n      update,\n      props\n    ),\n    { combobox: props.combobox }\n  );\n}\nfunction useSelectStore(props = {}) {\n  props = useSelectStoreOptions(props);\n  const [store, update] = useStore(Core.createSelectStore, props);\n  return useSelectStoreProps(store, update, props);\n}\n\nexport {\n  useSelectStoreOptions,\n  useSelectStoreProps,\n  useSelectStore\n};\n","\"use client\";\nimport {\n  flipItems\n} from \"./5VQZOHHZ.js\";\nimport {\n  useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useEvent\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-typeahead.tsx\nimport {\n  getDocument,\n  isTextField,\n  sortBasedOnDOMPosition\n} from \"@ariakit/core/utils/dom\";\nimport { isSelfTarget } from \"@ariakit/core/utils/events\";\nimport {\n  invariant,\n  normalizeString,\n  removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { useRef } from \"react\";\nvar TagName = \"div\";\nvar chars = \"\";\nfunction clearChars() {\n  chars = \"\";\n}\nfunction isValidTypeaheadEvent(event) {\n  const target = event.target;\n  if (target && isTextField(target)) return false;\n  if (event.key === \" \" && chars.length) return true;\n  return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\\p{Letter}\\p{Number}]$/u.test(event.key);\n}\nfunction isSelfTargetOrItem(event, items) {\n  if (isSelfTarget(event)) return true;\n  const target = event.target;\n  if (!target) return false;\n  const isItem = items.some((item) => item.element === target);\n  return isItem;\n}\nfunction getEnabledItems(items) {\n  return items.filter((item) => !item.disabled);\n}\nfunction itemTextStartsWith(item, text) {\n  var _a;\n  const itemText = ((_a = item.element) == null ? void 0 : _a.textContent) || item.children || // The composite item object itself doesn't include a value property, but\n  // other components like Select do. Since CompositeTypeahead is a generic\n  // component that can be used with those as well, we also consider the value\n  // property as a fallback for the typeahead text content.\n  \"value\" in item && item.value;\n  if (!itemText) return false;\n  return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase());\n}\nfunction getSameInitialItems(items, char, activeId) {\n  if (!activeId) return items;\n  const activeItem = items.find((item) => item.id === activeId);\n  if (!activeItem) return items;\n  if (!itemTextStartsWith(activeItem, char)) return items;\n  if (chars !== char && itemTextStartsWith(activeItem, chars)) return items;\n  chars = char;\n  return flipItems(\n    items.filter((item) => itemTextStartsWith(item, chars)),\n    activeId\n  ).filter((item) => item.id !== activeId);\n}\nvar useCompositeTypeahead = createHook(function useCompositeTypeahead2(_a) {\n  var _b = _a, { store, typeahead = true } = _b, props = __objRest(_b, [\"store\", \"typeahead\"]);\n  const context = useCompositeContext();\n  store = store || context;\n  invariant(\n    store,\n    process.env.NODE_ENV !== \"production\" && \"CompositeTypeahead must be a Composite component\"\n  );\n  const onKeyDownCaptureProp = props.onKeyDownCapture;\n  const cleanupTimeoutRef = useRef(0);\n  const onKeyDownCapture = useEvent((event) => {\n    onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);\n    if (event.defaultPrevented) return;\n    if (!typeahead) return;\n    if (!store) return;\n    if (!isValidTypeaheadEvent(event)) {\n      return clearChars();\n    }\n    const { renderedItems, items, activeId, id } = store.getState();\n    let enabledItems = getEnabledItems(\n      items.length > renderedItems.length ? items : renderedItems\n    );\n    const document = getDocument(event.currentTarget);\n    const selector = `[data-offscreen-id=\"${id}\"]`;\n    const offscreenItems = document.querySelectorAll(selector);\n    for (const element of offscreenItems) {\n      const disabled = element.ariaDisabled === \"true\" || \"disabled\" in element && !!element.disabled;\n      enabledItems.push({ id: element.id, element, disabled });\n    }\n    if (offscreenItems.length) {\n      enabledItems = sortBasedOnDOMPosition(enabledItems, (i) => i.element);\n    }\n    if (!isSelfTargetOrItem(event, enabledItems)) return clearChars();\n    event.preventDefault();\n    window.clearTimeout(cleanupTimeoutRef.current);\n    cleanupTimeoutRef.current = window.setTimeout(() => {\n      chars = \"\";\n    }, 500);\n    const char = event.key.toLowerCase();\n    chars += char;\n    enabledItems = getSameInitialItems(enabledItems, char, activeId);\n    const item = enabledItems.find((item2) => itemTextStartsWith(item2, chars));\n    if (item) {\n      store.move(item.id);\n    } else {\n      clearChars();\n    }\n  });\n  props = __spreadProps(__spreadValues({}, props), {\n    onKeyDownCapture\n  });\n  return removeUndefinedValues(props);\n});\nvar CompositeTypeahead = forwardRef(function CompositeTypeahead2(props) {\n  const htmlProps = useCompositeTypeahead(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useCompositeTypeahead,\n  CompositeTypeahead\n};\n","\"use client\";\nimport {\n  useCompositeHover\n} from \"./UQQRIHDV.js\";\nimport {\n  SelectItemCheckedContext,\n  useSelectScopedContext\n} from \"./KPEX55MY.js\";\nimport {\n  useCompositeItem\n} from \"./P2CTZE2T.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef,\n  memo\n} from \"./LMDWO4NN.js\";\nimport {\n  useStoreStateObject\n} from \"./YV4JVR4I.js\";\nimport {\n  useBooleanEvent,\n  useEvent,\n  useId,\n  useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-item.tsx\nimport { getPopupItemRole } from \"@ariakit/core/utils/dom\";\nimport { isDownloading, isOpeningInNewTab } from \"@ariakit/core/utils/events\";\nimport { disabledFromProps, invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isSelected(storeValue, itemValue) {\n  if (itemValue == null) return;\n  if (storeValue == null) return false;\n  if (Array.isArray(storeValue)) {\n    return storeValue.includes(itemValue);\n  }\n  return storeValue === itemValue;\n}\nvar useSelectItem = createHook(\n  function useSelectItem2(_a) {\n    var _b = _a, {\n      store,\n      value,\n      getItem: getItemProp,\n      hideOnClick,\n      setValueOnClick = value != null,\n      preventScrollOnKeyDown = true,\n      focusOnHover = true\n    } = _b, props = __objRest(_b, [\n      \"store\",\n      \"value\",\n      \"getItem\",\n      \"hideOnClick\",\n      \"setValueOnClick\",\n      \"preventScrollOnKeyDown\",\n      \"focusOnHover\"\n    ]);\n    var _a2;\n    const context = useSelectScopedContext();\n    store = store || context;\n    invariant(\n      store,\n      process.env.NODE_ENV !== \"production\" && \"SelectItem must be wrapped in a SelectList or SelectPopover component.\"\n    );\n    const id = useId(props.id);\n    const disabled = disabledFromProps(props);\n    const { listElement, multiSelectable, selected, autoFocus } = useStoreStateObject(store, {\n      listElement: \"listElement\",\n      multiSelectable(state) {\n        return Array.isArray(state.value);\n      },\n      selected(state) {\n        return isSelected(state.value, value);\n      },\n      autoFocus(state) {\n        if (value == null) return false;\n        if (state.value == null) return false;\n        if (state.activeId !== id && (store == null ? void 0 : store.item(state.activeId))) {\n          return false;\n        }\n        if (Array.isArray(state.value)) {\n          return state.value[state.value.length - 1] === value;\n        }\n        return state.value === value;\n      }\n    });\n    const getItem = useCallback(\n      (item) => {\n        const nextItem = __spreadProps(__spreadValues({}, item), {\n          value: disabled ? void 0 : value,\n          children: value\n        });\n        if (getItemProp) {\n          return getItemProp(nextItem);\n        }\n        return nextItem;\n      },\n      [disabled, value, getItemProp]\n    );\n    hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;\n    const onClickProp = props.onClick;\n    const setValueOnClickProp = useBooleanEvent(setValueOnClick);\n    const hideOnClickProp = useBooleanEvent(hideOnClick);\n    const onClick = useEvent((event) => {\n      onClickProp == null ? void 0 : onClickProp(event);\n      if (event.defaultPrevented) return;\n      if (isDownloading(event)) return;\n      if (isOpeningInNewTab(event)) return;\n      if (setValueOnClickProp(event) && value != null) {\n        store == null ? void 0 : store.setValue((prevValue) => {\n          if (!Array.isArray(prevValue)) return value;\n          if (prevValue.includes(value)) {\n            return prevValue.filter((v) => v !== value);\n          }\n          return [...prevValue, value];\n        });\n      }\n      if (hideOnClickProp(event)) {\n        store == null ? void 0 : store.hide();\n      }\n    });\n    props = useWrapElement(\n      props,\n      (element) => /* @__PURE__ */ jsx(SelectItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }),\n      [selected]\n    );\n    props = __spreadProps(__spreadValues({\n      id,\n      role: getPopupItemRole(listElement),\n      \"aria-selected\": selected,\n      children: value\n    }, props), {\n      autoFocus: (_a2 = props.autoFocus) != null ? _a2 : autoFocus,\n      onClick\n    });\n    props = useCompositeItem(__spreadValues({\n      store,\n      getItem,\n      preventScrollOnKeyDown\n    }, props));\n    const focusOnHoverProp = useBooleanEvent(focusOnHover);\n    props = useCompositeHover(__spreadProps(__spreadValues({\n      store\n    }, props), {\n      // We have to disable focusOnHover when the popup is closed, otherwise\n      // the active item will change to null (the container) when the popup is\n      // closed by clicking on an item.\n      focusOnHover(event) {\n        if (!focusOnHoverProp(event)) return false;\n        const state = store == null ? void 0 : store.getState();\n        return !!(state == null ? void 0 : state.open);\n      }\n    }));\n    return props;\n  }\n);\nvar SelectItem = memo(\n  forwardRef(function SelectItem2(props) {\n    const htmlProps = useSelectItem(props);\n    return createElement(TagName, htmlProps);\n  })\n);\n\nexport {\n  useSelectItem,\n  SelectItem\n};\n","\"use client\";\nimport {\n  useComboboxStore\n} from \"../__chunks/FEOFMWBY.js\";\nimport {\n  ComboboxContextProvider\n} from \"../__chunks/VEVQD5MH.js\";\nimport \"../__chunks/3XAVFTCA.js\";\nimport \"../__chunks/4CMBR7SL.js\";\nimport \"../__chunks/C3IKGW5T.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/O2PQ2652.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/combobox/combobox-provider.tsx\nimport { jsx } from \"react/jsx-runtime\";\nfunction ComboboxProvider(props = {}) {\n  const store = useComboboxStore(props);\n  return /* @__PURE__ */ jsx(ComboboxContextProvider, { value: store, children: props.children });\n}\nexport {\n  ComboboxProvider\n};\n","\"use client\";\nimport {\n  GroupLabelContext\n} from \"./7HVFURXT.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useId,\n  useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\nimport {\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/group/group-label.tsx\nimport { removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useContext } from \"react\";\nvar TagName = \"div\";\nvar useGroupLabel = createHook(\n  function useGroupLabel2(props) {\n    const setLabelId = useContext(GroupLabelContext);\n    const id = useId(props.id);\n    useSafeLayoutEffect(() => {\n      setLabelId == null ? void 0 : setLabelId(id);\n      return () => setLabelId == null ? void 0 : setLabelId(void 0);\n    }, [setLabelId, id]);\n    props = __spreadValues({\n      id,\n      \"aria-hidden\": true\n    }, props);\n    return removeUndefinedValues(props);\n  }\n);\nvar GroupLabel = forwardRef(function GroupLabel2(props) {\n  const htmlProps = useGroupLabel(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useGroupLabel,\n  GroupLabel\n};\n","\"use client\";\nimport {\n  useGroupLabel\n} from \"./YUOJWFSO.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  __objRest\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-group-label.tsx\nvar TagName = \"div\";\nvar useCompositeGroupLabel = createHook(function useCompositeGroupLabel2(_a) {\n  var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n  props = useGroupLabel(props);\n  return props;\n});\nvar CompositeGroupLabel = forwardRef(function CompositeGroupLabel2(props) {\n  const htmlProps = useCompositeGroupLabel(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useCompositeGroupLabel,\n  CompositeGroupLabel\n};\n","\"use client\";\nimport {\n  useCompositeGroupLabel\n} from \"../__chunks/SWSPTQMT.js\";\nimport \"../__chunks/YUOJWFSO.js\";\nimport \"../__chunks/7HVFURXT.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-group-label.tsx\nvar TagName = \"div\";\nvar useMenuGroupLabel = createHook(\n  function useMenuGroupLabel2(props) {\n    props = useCompositeGroupLabel(props);\n    return props;\n  }\n);\nvar MenuGroupLabel = forwardRef(function MenuGroupLabel2(props) {\n  const htmlProps = useMenuGroupLabel(props);\n  return createElement(TagName, htmlProps);\n});\nexport {\n  MenuGroupLabel,\n  useMenuGroupLabel\n};\n","\"use client\";\nimport {\n  GroupLabelContext\n} from \"./7HVFURXT.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/group/group.tsx\nimport { removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useGroup = createHook(\n  function useGroup2(props) {\n    const [labelId, setLabelId] = useState();\n    props = useWrapElement(\n      props,\n      (element) => /* @__PURE__ */ jsx(GroupLabelContext.Provider, { value: setLabelId, children: element }),\n      []\n    );\n    props = __spreadValues({\n      role: \"group\",\n      \"aria-labelledby\": labelId\n    }, props);\n    return removeUndefinedValues(props);\n  }\n);\nvar Group = forwardRef(function Group2(props) {\n  const htmlProps = useGroup(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useGroup,\n  Group\n};\n","\"use client\";\nimport {\n  useGroup\n} from \"./36LIF33V.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  __objRest\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-group.tsx\nvar TagName = \"div\";\nvar useCompositeGroup = createHook(\n  function useCompositeGroup2(_a) {\n    var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n    props = useGroup(props);\n    return props;\n  }\n);\nvar CompositeGroup = forwardRef(function CompositeGroup2(props) {\n  const htmlProps = useCompositeGroup(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useCompositeGroup,\n  CompositeGroup\n};\n","\"use client\";\nimport {\n  useCompositeGroup\n} from \"../__chunks/YORGHBM4.js\";\nimport \"../__chunks/36LIF33V.js\";\nimport \"../__chunks/7HVFURXT.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-group.tsx\nvar TagName = \"div\";\nvar useMenuGroup = createHook(\n  function useMenuGroup2(props) {\n    props = useCompositeGroup(props);\n    return props;\n  }\n);\nvar MenuGroup = forwardRef(function MenuGroup2(props) {\n  const htmlProps = useMenuGroup(props);\n  return createElement(TagName, htmlProps);\n});\nexport {\n  MenuGroup,\n  useMenuGroup\n};\n","\"use client\";\nimport {\n  PopoverContextProvider\n} from \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LMDWO4NN.js\";\nimport {\n  usePopoverStore\n} from \"../__chunks/O2PQ2652.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/popover/popover-provider.tsx\nimport { jsx } from \"react/jsx-runtime\";\nfunction PopoverProvider(props = {}) {\n  const store = usePopoverStore(props);\n  return /* @__PURE__ */ jsx(PopoverContextProvider, { value: store, children: props.children });\n}\nexport {\n  PopoverProvider\n};\n","\"use client\";\nimport {\n  useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef,\n  memo\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n  useEvent,\n  useId,\n  useMergeRefs\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-label.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nvar useSelectLabel = createHook(\n  function useSelectLabel2(_a) {\n    var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n    const context = useSelectProviderContext();\n    store = store || context;\n    invariant(\n      store,\n      process.env.NODE_ENV !== \"production\" && \"SelectLabel must receive a `store` prop or be wrapped in a SelectProvider component.\"\n    );\n    const id = useId(props.id);\n    const onClickProp = props.onClick;\n    const onClick = useEvent((event) => {\n      onClickProp == null ? void 0 : onClickProp(event);\n      if (event.defaultPrevented) return;\n      queueMicrotask(() => {\n        const select = store == null ? void 0 : store.getState().selectElement;\n        select == null ? void 0 : select.focus();\n      });\n    });\n    props = __spreadProps(__spreadValues({\n      id\n    }, props), {\n      ref: useMergeRefs(store.setLabelElement, props.ref),\n      onClick,\n      style: __spreadValues({\n        cursor: \"default\"\n      }, props.style)\n    });\n    return removeUndefinedValues(props);\n  }\n);\nvar SelectLabel = memo(\n  forwardRef(function SelectLabel2(props) {\n    const htmlProps = useSelectLabel(props);\n    return createElement(TagName, htmlProps);\n  })\n);\nexport {\n  SelectLabel,\n  useSelectLabel\n};\n","\"use client\";\nimport {\n  useCompositeTypeahead\n} from \"./T7VMP3TM.js\";\nimport {\n  SelectHeadingContext,\n  SelectScopedContextProvider,\n  useSelectContext\n} from \"./KPEX55MY.js\";\nimport {\n  useComposite\n} from \"./ITI7HKP4.js\";\nimport {\n  isHidden\n} from \"./VGCJ63VH.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useAttribute,\n  useBooleanEvent,\n  useEvent,\n  useId,\n  useMergeRefs,\n  useTransactionState,\n  useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-list.tsx\nimport { isSelfTarget } from \"@ariakit/core/utils/events\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { createContext, useContext, useEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar SelectListContext = createContext(null);\nvar useSelectList = createHook(\n  function useSelectList2(_a) {\n    var _b = _a, {\n      store,\n      resetOnEscape = true,\n      hideOnEnter = true,\n      focusOnMove = true,\n      composite,\n      alwaysVisible\n    } = _b, props = __objRest(_b, [\n      \"store\",\n      \"resetOnEscape\",\n      \"hideOnEnter\",\n      \"focusOnMove\",\n      \"composite\",\n      \"alwaysVisible\"\n    ]);\n    const context = useSelectContext();\n    store = store || context;\n    invariant(\n      store,\n      process.env.NODE_ENV !== \"production\" && \"SelectList must receive a `store` prop or be wrapped in a SelectProvider component.\"\n    );\n    const id = useId(props.id);\n    const value = store.useState(\"value\");\n    const multiSelectable = Array.isArray(value);\n    const [defaultValue, setDefaultValue] = useState(value);\n    const mounted = store.useState(\"mounted\");\n    useEffect(() => {\n      if (mounted) return;\n      setDefaultValue(value);\n    }, [mounted, value]);\n    resetOnEscape = resetOnEscape && !multiSelectable;\n    const onKeyDownProp = props.onKeyDown;\n    const resetOnEscapeProp = useBooleanEvent(resetOnEscape);\n    const hideOnEnterProp = useBooleanEvent(hideOnEnter);\n    const onKeyDown = useEvent((event) => {\n      onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n      if (event.defaultPrevented) return;\n      if (event.key === \"Escape\" && resetOnEscapeProp(event)) {\n        store == null ? void 0 : store.setValue(defaultValue);\n      }\n      if (event.key === \" \" || event.key === \"Enter\") {\n        if (isSelfTarget(event) && hideOnEnterProp(event)) {\n          event.preventDefault();\n          store == null ? void 0 : store.hide();\n        }\n      }\n    });\n    const headingContext = useContext(SelectHeadingContext);\n    const headingState = useState();\n    const [headingId, setHeadingId] = headingContext || headingState;\n    const headingContextValue = useMemo(\n      () => [headingId, setHeadingId],\n      [headingId]\n    );\n    const [childStore, setChildStore] = useState(null);\n    const setStore = useContext(SelectListContext);\n    useEffect(() => {\n      if (!setStore) return;\n      setStore(store);\n      return () => setStore(null);\n    }, [setStore, store]);\n    props = useWrapElement(\n      props,\n      (element2) => /* @__PURE__ */ jsx(SelectScopedContextProvider, { value: store, children: /* @__PURE__ */ jsx(SelectListContext.Provider, { value: setChildStore, children: /* @__PURE__ */ jsx(SelectHeadingContext.Provider, { value: headingContextValue, children: element2 }) }) }),\n      [store, headingContextValue]\n    );\n    const hasCombobox = !!store.combobox;\n    composite = composite != null ? composite : !hasCombobox && childStore !== store;\n    const [element, setElement] = useTransactionState(\n      composite ? store.setListElement : null\n    );\n    const role = useAttribute(element, \"role\", props.role);\n    const isCompositeRole = role === \"listbox\" || role === \"menu\" || role === \"tree\" || role === \"grid\";\n    const ariaMultiSelectable = composite || isCompositeRole ? multiSelectable || void 0 : void 0;\n    const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n    const style = hidden ? __spreadProps(__spreadValues({}, props.style), { display: \"none\" }) : props.style;\n    if (composite) {\n      props = __spreadValues({\n        role: \"listbox\",\n        \"aria-multiselectable\": ariaMultiSelectable\n      }, props);\n    }\n    const labelId = store.useState(\n      (state) => {\n        var _a2;\n        return headingId || ((_a2 = state.labelElement) == null ? void 0 : _a2.id);\n      }\n    );\n    props = __spreadProps(__spreadValues({\n      id,\n      \"aria-labelledby\": labelId,\n      hidden\n    }, props), {\n      ref: useMergeRefs(setElement, props.ref),\n      style,\n      onKeyDown\n    });\n    props = useComposite(__spreadProps(__spreadValues({ store }, props), { composite }));\n    props = useCompositeTypeahead(__spreadValues({ store, typeahead: !hasCombobox }, props));\n    return props;\n  }\n);\nvar SelectList = forwardRef(function SelectList2(props) {\n  const htmlProps = useSelectList(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useSelectList,\n  SelectList\n};\n","\"use client\";\nimport {\n  useSelectList\n} from \"../__chunks/XRBJGF7I.js\";\nimport \"../__chunks/T7VMP3TM.js\";\nimport {\n  useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport {\n  usePopover\n} from \"../__chunks/T6C2RYFI.js\";\nimport {\n  createDialogComponent\n} from \"../__chunks/JC64G2H7.js\";\nimport \"../__chunks/63FEHJZV.js\";\nimport \"../__chunks/KZAQFFOU.js\";\nimport \"../__chunks/IGR4SXG2.js\";\nimport \"../__chunks/ESSM74HH.js\";\nimport \"../__chunks/BGQ3KQ5M.js\";\nimport \"../__chunks/YKJECYU7.js\";\nimport \"../__chunks/TOU75OXH.js\";\nimport \"../__chunks/WBDYNH73.js\";\nimport \"../__chunks/2PGBN2Y4.js\";\nimport \"../__chunks/63XF7ACK.js\";\nimport \"../__chunks/HLTQOHKZ.js\";\nimport \"../__chunks/677M2CI3.js\";\nimport \"../__chunks/6GXEOXGT.js\";\nimport \"../__chunks/AOUGVQZ3.js\";\nimport \"../__chunks/K2ZF5NU7.js\";\nimport \"../__chunks/ZWYATQFU.js\";\nimport \"../__chunks/5M6RIVE2.js\";\nimport \"../__chunks/O37CNYMR.js\";\nimport \"../__chunks/W3VI7GFU.js\";\nimport \"../__chunks/AOQQTIBO.js\";\nimport \"../__chunks/CZ4GFWYL.js\";\nimport \"../__chunks/VGCJ63VH.js\";\nimport \"../__chunks/XL7CSKGW.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport \"../__chunks/XX67R432.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n  __objRest,\n  __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-popover.tsx\nvar TagName = \"div\";\nvar useSelectPopover = createHook(\n  function useSelectPopover2(_a) {\n    var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\"]);\n    const context = useSelectProviderContext();\n    store = store || context;\n    props = useSelectList(__spreadValues({ store, alwaysVisible }, props));\n    props = usePopover(__spreadValues({ store, alwaysVisible }, props));\n    return props;\n  }\n);\nvar SelectPopover = createDialogComponent(\n  forwardRef(function SelectPopover2(props) {\n    const htmlProps = useSelectPopover(props);\n    return createElement(TagName, htmlProps);\n  }),\n  useSelectProviderContext\n);\nexport {\n  SelectPopover,\n  useSelectPopover\n};\n","\"use client\";\nimport {\n  useSelectStore\n} from \"../__chunks/S5WQ44SQ.js\";\nimport \"../__chunks/VEVQD5MH.js\";\nimport {\n  SelectContextProvider\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/4CMBR7SL.js\";\nimport \"../__chunks/C3IKGW5T.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/O2PQ2652.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-provider.tsx\nimport { jsx } from \"react/jsx-runtime\";\nfunction SelectProvider(props = {}) {\n  const store = useSelectStore(props);\n  return /* @__PURE__ */ jsx(SelectContextProvider, { value: store, children: props.children });\n}\nexport {\n  SelectProvider\n};\n","\"use client\";\nimport {\n  useCollectionContext\n} from \"./VDHZ5F7K.js\";\nimport {\n  createElement,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n  useBooleanEvent,\n  useEvent,\n  useForceUpdate,\n  useId,\n  useMergeRefs,\n  useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/collection/collection-renderer.tsx\nimport { getScrollingElement, getWindow } from \"@ariakit/core/utils/dom\";\nimport { invariant, shallowEqual } from \"@ariakit/core/utils/misc\";\nimport {\n  createContext,\n  useCallback,\n  useContext,\n  useEffect,\n  useMemo,\n  useRef,\n  useState\n} from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar CollectionRendererContext = createContext(null);\nfunction createTask() {\n  let raf = 0;\n  const run = (cb) => {\n    if (raf) return;\n    raf = requestAnimationFrame(() => {\n      raf = 0;\n      cb();\n    });\n  };\n  const cancel = () => {\n    cancelAnimationFrame(raf);\n    raf = 0;\n  };\n  return { run, cancel };\n}\nfunction findNearestIndex(items, target, getValue) {\n  let left = 0;\n  let right = getItemsLength(items) - 1;\n  while (left <= right) {\n    const index = (left + right) / 2 | 0;\n    const value = getValue(index);\n    if (value === target) return index;\n    else if (value < target) left = index + 1;\n    else right = index - 1;\n  }\n  if (left > 0) return left - 1;\n  return 0;\n}\nfunction getItemsLength(items) {\n  return typeof items === \"number\" ? items : items.length;\n}\nfunction getItemObject(item) {\n  if (!item || typeof item !== \"object\") {\n    return { value: item };\n  }\n  return item;\n}\nfunction getItemId(item, index, baseId) {\n  var _a;\n  invariant(baseId, \"CollectionRenderer must be given an `id` prop.\");\n  const defaultId = `${baseId}/${index}`;\n  return (_a = getItemObject(item).id) != null ? _a : defaultId;\n}\nfunction getItem(items, index) {\n  if (typeof items === \"number\") {\n    if (index >= items) return null;\n    return {};\n  }\n  const item = items[index];\n  if (!item) return null;\n  if (typeof item === \"object\") return item;\n  return { value: item };\n}\nfunction getItemSize(item, horizontal, fallbackElement) {\n  var _a, _b, _c, _d, _e;\n  const itemObject = getItemObject(item);\n  horizontal = itemObject.orientation === \"horizontal\" || horizontal;\n  const prop = horizontal ? \"width\" : \"height\";\n  const style = itemObject.style;\n  if (style) {\n    const size = style[prop];\n    if (typeof size === \"number\") return size;\n  }\n  const items = itemObject.items;\n  if (items == null ? void 0 : items.length) {\n    const hasSameOrientation = !itemObject.orientation || horizontal && itemObject.orientation === \"horizontal\" || !horizontal && itemObject.orientation === \"vertical\";\n    const paddingStart = (_b = (_a = itemObject.paddingStart) != null ? _a : itemObject.padding) != null ? _b : 0;\n    const paddingEnd = (_d = (_c = itemObject.paddingEnd) != null ? _c : itemObject.padding) != null ? _d : 0;\n    const padding = hasSameOrientation ? paddingStart + paddingEnd : 0;\n    const initialSize = ((_e = itemObject.gap) != null ? _e : 0) * (items.length - 1) + padding;\n    if (hasSameOrientation && itemObject.itemSize) {\n      return initialSize + itemObject.itemSize * items.length;\n    }\n    const totalSize = items.reduce(\n      (sum, item2) => sum + getItemSize(item2, horizontal),\n      initialSize\n    );\n    if (totalSize !== initialSize) return totalSize;\n  }\n  const element = fallbackElement !== false ? itemObject.element || fallbackElement : null;\n  if (element == null ? void 0 : element.isConnected) {\n    return element.getBoundingClientRect()[prop];\n  }\n  return 0;\n}\nfunction getAverageSize(props) {\n  const length = getItemsLength(props.items);\n  let currentIndex = 0;\n  let averageSize = props.estimatedItemSize;\n  const setAverageSize = (size) => {\n    const prevIndex = currentIndex;\n    currentIndex = currentIndex + 1;\n    averageSize = (averageSize * prevIndex + size) / currentIndex;\n  };\n  for (let index = 0; index < length; index += 1) {\n    const item = getItem(props.items, index);\n    const itemId = getItemId(item, index, props.baseId);\n    const itemData = props.data.get(itemId);\n    const fallbackElement = props.elements.get(itemId);\n    const size = getItemSize(item, props.horizontal, fallbackElement);\n    if (size) {\n      setAverageSize(size);\n    } else if (itemData == null ? void 0 : itemData.rendered) {\n      setAverageSize(itemData.end - itemData.start);\n    }\n  }\n  return averageSize;\n}\nfunction getScrollOffset(scroller, horizontal) {\n  if (\"scrollX\" in scroller) {\n    return horizontal ? scroller.scrollX : scroller.scrollY;\n  }\n  return horizontal ? scroller.scrollLeft : scroller.scrollTop;\n}\nfunction getViewport(scroller) {\n  const { defaultView, documentElement } = scroller.ownerDocument;\n  if (scroller === documentElement) return defaultView;\n  return scroller;\n}\nfunction useScroller(rendererRef) {\n  const [scroller, setScroller] = useState(null);\n  useEffect(() => {\n    const renderer = rendererRef == null ? void 0 : rendererRef.current;\n    if (!renderer) return;\n    const scroller2 = getScrollingElement(renderer);\n    if (!scroller2) return;\n    setScroller(scroller2);\n  }, [rendererRef]);\n  return scroller;\n}\nfunction getRendererOffset(renderer, scroller, horizontal) {\n  const win = getWindow(renderer);\n  const htmlElement = win == null ? void 0 : win.document.documentElement;\n  const rendererRect = renderer.getBoundingClientRect();\n  const rendererOffset = horizontal ? rendererRect.left : rendererRect.top;\n  if (scroller === htmlElement) {\n    const scrollOffset2 = getScrollOffset(win, horizontal);\n    return scrollOffset2 + rendererOffset;\n  }\n  const scrollerRect = scroller.getBoundingClientRect();\n  const scrollerOffset = horizontal ? scrollerRect.left : scrollerRect.top;\n  const scrollOffset = getScrollOffset(scroller, horizontal);\n  return rendererOffset - scrollerOffset + scrollOffset;\n}\nfunction getOffsets(renderer, scroller, horizontal) {\n  const scrollOffset = getScrollOffset(scroller, horizontal);\n  const rendererOffset = getRendererOffset(renderer, scroller, horizontal);\n  const scrollSize = horizontal ? scroller.clientWidth : scroller.clientHeight;\n  const start = scrollOffset - rendererOffset;\n  const end = start + scrollSize;\n  return { start, end };\n}\nfunction getItemsEnd(props) {\n  const length = getItemsLength(props.items);\n  const totalPadding = props.paddingStart + props.paddingEnd;\n  if (!length) return totalPadding;\n  const lastIndex = length - 1;\n  const totalGap = lastIndex * props.gap;\n  if (props.itemSize != null) {\n    return length * props.itemSize + totalGap + totalPadding;\n  }\n  const defaultEnd = length * props.estimatedItemSize + totalGap + totalPadding;\n  if (!props.baseId) return defaultEnd;\n  const lastItem = getItem(props.items, lastIndex);\n  const lastItemId = getItemId(lastItem, lastIndex, props.baseId);\n  const lastItemData = props.data.get(lastItemId);\n  if (lastItemData == null ? void 0 : lastItemData.end) return lastItemData.end + props.paddingEnd;\n  if (!Array.isArray(props.items)) return defaultEnd;\n  const end = props.items.reduce(\n    (sum, item) => sum + getItemSize(item, props.horizontal, false),\n    0\n  );\n  if (!end) return defaultEnd;\n  return end + totalGap + totalPadding;\n}\nfunction getData(props) {\n  var _a;\n  const length = getItemsLength(props.items);\n  let nextData;\n  let start = props.paddingStart;\n  const avgSize = getAverageSize(props);\n  for (let index = 0; index < length; index += 1) {\n    const item = getItem(props.items, index);\n    const itemId = getItemId(item, index, props.baseId);\n    const itemData = props.data.get(itemId);\n    const prevRendered = (_a = itemData == null ? void 0 : itemData.rendered) != null ? _a : false;\n    const setSize = (size2, rendered = prevRendered) => {\n      start = start ? start + props.gap : start;\n      const end = start + size2;\n      const nextItemData = { index, rendered, start, end };\n      if (!shallowEqual(itemData, nextItemData)) {\n        if (!nextData) {\n          nextData = new Map(props.data);\n        }\n        nextData.set(itemId, { index, rendered, start, end });\n      }\n      start = end;\n    };\n    const size = getItemSize(\n      item,\n      props.horizontal,\n      props.elements.get(itemId)\n    );\n    if (size) {\n      setSize(size, true);\n    } else if (itemData == null ? void 0 : itemData.rendered) {\n      setSize(itemData.end - itemData.start, true);\n    } else {\n      setSize(avgSize);\n    }\n  }\n  return nextData;\n}\nfunction useCollectionRenderer(_a) {\n  var _b = _a, {\n    store,\n    items: itemsProp,\n    initialItems = 0,\n    gap = 0,\n    itemSize,\n    estimatedItemSize = 40,\n    overscan: overscanProp,\n    orientation: orientationProp,\n    padding = 0,\n    paddingStart = padding,\n    paddingEnd = padding,\n    persistentIndices,\n    renderOnScroll = true,\n    renderOnResize = !!renderOnScroll,\n    children: renderItem\n  } = _b, props = __objRest(_b, [\n    \"store\",\n    \"items\",\n    \"initialItems\",\n    \"gap\",\n    \"itemSize\",\n    \"estimatedItemSize\",\n    \"overscan\",\n    \"orientation\",\n    \"padding\",\n    \"paddingStart\",\n    \"paddingEnd\",\n    \"persistentIndices\",\n    \"renderOnScroll\",\n    \"renderOnResize\",\n    \"children\"\n  ]);\n  var _a2, _b2;\n  const context = useCollectionContext();\n  store = store || context;\n  const items = useStoreState(\n    store,\n    (state) => itemsProp != null ? itemsProp : state == null ? void 0 : state.items\n  );\n  invariant(\n    items != null,\n    process.env.NODE_ENV !== \"production\" && \"CollectionRenderer must be either wrapped in a Collection component or be given an `items` prop.\"\n  );\n  let parent = useContext(CollectionRendererContext);\n  if (store && (parent == null ? void 0 : parent.store) !== store) {\n    parent = null;\n  }\n  const parentData = parent == null ? void 0 : parent.childrenData;\n  const orientation = (_a2 = orientationProp != null ? orientationProp : parent == null ? void 0 : parent.orientation) != null ? _a2 : \"vertical\";\n  const overscan = (_b2 = overscanProp != null ? overscanProp : parent == null ? void 0 : parent.overscan) != null ? _b2 : 1;\n  const ref = useRef(null);\n  const baseId = useId(props.id);\n  const horizontal = orientation === \"horizontal\";\n  const elements = useMemo(() => /* @__PURE__ */ new Map(), []);\n  const [elementsUpdated, updateElements] = useForceUpdate();\n  const [defaultVisibleIndices, setVisibleIndices] = useState(() => {\n    if (!initialItems) return [];\n    const length = getItemsLength(items);\n    const initialLength = Math.min(length, Math.abs(initialItems));\n    return Array.from({ length: initialLength }, (_, index) => {\n      if (initialItems < 0) return length - index - 1;\n      return index;\n    });\n  });\n  const visibleIndices = useMemo(() => {\n    if (!persistentIndices) return defaultVisibleIndices;\n    const nextIndices = defaultVisibleIndices.slice();\n    for (const index of persistentIndices) {\n      if (index < 0) continue;\n      if (nextIndices.includes(index)) continue;\n      nextIndices.push(index);\n    }\n    nextIndices.sort((a, b) => a - b);\n    if (shallowEqual(defaultVisibleIndices, nextIndices)) {\n      return defaultVisibleIndices;\n    }\n    return nextIndices;\n  }, [defaultVisibleIndices, persistentIndices]);\n  const [data, setData] = useState(() => {\n    if (!baseId) return /* @__PURE__ */ new Map();\n    const data2 = (parentData == null ? void 0 : parentData.get(baseId)) || /* @__PURE__ */ new Map();\n    if (itemSize != null) return data2;\n    if (!items) return data2;\n    const nextData = getData({\n      baseId,\n      items,\n      data: data2,\n      gap,\n      elements,\n      horizontal,\n      paddingStart,\n      itemSize,\n      estimatedItemSize\n    });\n    return nextData || data2;\n  });\n  const totalSize = useMemo(() => {\n    return getItemsEnd({\n      baseId,\n      items,\n      data,\n      gap,\n      horizontal,\n      itemSize,\n      estimatedItemSize,\n      paddingStart,\n      paddingEnd\n    });\n  }, [\n    baseId,\n    items,\n    data,\n    gap,\n    horizontal,\n    itemSize,\n    estimatedItemSize,\n    paddingStart,\n    paddingEnd\n  ]);\n  useEffect(() => {\n    if (!baseId) return;\n    parentData == null ? void 0 : parentData.set(baseId, data);\n  }, [baseId, parentData, data]);\n  useEffect(() => {\n    if (itemSize != null) return;\n    if (!baseId) return;\n    if (!items) return;\n    const nextData = getData({\n      baseId,\n      items,\n      data,\n      gap,\n      elements,\n      horizontal,\n      paddingStart,\n      itemSize,\n      estimatedItemSize\n    });\n    if (nextData) {\n      setData(nextData);\n    }\n  }, [\n    elementsUpdated,\n    itemSize,\n    baseId,\n    items,\n    data,\n    gap,\n    elements,\n    horizontal,\n    paddingStart,\n    estimatedItemSize\n  ]);\n  const scroller = useScroller(items ? ref : null);\n  const offsetsRef = useRef({ start: 0, end: 0 });\n  const processVisibleIndices = useCallback(() => {\n    const offsets = offsetsRef.current;\n    if (!items) return;\n    if (!baseId) return;\n    if (!offsets.end) return;\n    if (!data.size && !itemSize) return;\n    const length = getItemsLength(items);\n    const getItemOffset = (index, prop = \"start\") => {\n      var _a3;\n      if (itemSize) {\n        const start2 = itemSize * index + gap * index + paddingStart;\n        if (prop === \"start\") return start2;\n        return start2 + itemSize;\n      }\n      const item = getItem(items, index);\n      const itemId = getItemId(item, index, baseId);\n      const itemData = data.get(itemId);\n      return (_a3 = itemData == null ? void 0 : itemData[prop]) != null ? _a3 : 0;\n    };\n    const initialStart = findNearestIndex(items, offsets.start, getItemOffset);\n    let initialEnd = initialStart;\n    while (initialEnd < length && getItemOffset(initialEnd) < offsets.end) {\n      initialEnd += 1;\n    }\n    const finalOverscan = initialEnd - initialStart ? overscan : 0;\n    const start = Math.max(initialStart - finalOverscan, 0);\n    const end = Math.min(initialEnd + finalOverscan, length);\n    const indices = Array.from(\n      { length: end - start },\n      (_, index) => index + start\n    );\n    setVisibleIndices((prevIndices) => {\n      if (shallowEqual(prevIndices, indices)) return prevIndices;\n      return indices;\n    });\n  }, [\n    elementsUpdated,\n    items,\n    baseId,\n    data,\n    itemSize,\n    gap,\n    paddingStart,\n    overscan\n  ]);\n  useEffect(processVisibleIndices, [processVisibleIndices]);\n  const processVisibleIndicesEvent = useEvent(processVisibleIndices);\n  useEffect(() => {\n    const renderer = ref.current;\n    if (!renderer) return;\n    if (!scroller) return;\n    offsetsRef.current = getOffsets(renderer, scroller, horizontal);\n    processVisibleIndicesEvent();\n  }, [scroller, horizontal, processVisibleIndicesEvent]);\n  const mayRenderOnScroll = !!renderOnScroll;\n  const renderOnScrollProp = useBooleanEvent(renderOnScroll);\n  useEffect(() => {\n    if (!mayRenderOnScroll) return;\n    const renderer = ref.current;\n    if (!renderer) return;\n    if (!scroller) return;\n    const viewport = getViewport(scroller);\n    if (!viewport) return;\n    const task = createTask();\n    const onScroll = (event) => {\n      task.run(() => {\n        if (!renderOnScrollProp(event)) return;\n        offsetsRef.current = getOffsets(renderer, scroller, horizontal);\n        processVisibleIndicesEvent();\n      });\n    };\n    viewport.addEventListener(\"scroll\", onScroll, { passive: true });\n    return () => {\n      task.cancel();\n      viewport.removeEventListener(\"scroll\", onScroll);\n    };\n  }, [\n    mayRenderOnScroll,\n    scroller,\n    renderOnScrollProp,\n    horizontal,\n    processVisibleIndicesEvent\n  ]);\n  const mayRenderOnResize = !!renderOnResize;\n  const renderOnResizeProp = useBooleanEvent(renderOnResize);\n  useEffect(() => {\n    if (!mayRenderOnResize) return;\n    const renderer = ref.current;\n    if (!renderer) return;\n    if (!scroller) return;\n    const viewport = getViewport(scroller);\n    if (!viewport) return;\n    const task = createTask();\n    if (viewport === scroller) {\n      if (typeof ResizeObserver !== \"function\") return;\n      let firstRun = true;\n      const observer = new ResizeObserver(() => {\n        if (firstRun) {\n          firstRun = false;\n          return;\n        }\n        task.run(() => {\n          if (!renderOnResizeProp(scroller)) return;\n          offsetsRef.current = getOffsets(renderer, scroller, horizontal);\n          processVisibleIndicesEvent();\n        });\n      });\n      observer.observe(scroller);\n      return () => {\n        task.cancel();\n        observer.disconnect();\n      };\n    }\n    const onResize = () => {\n      task.run(() => {\n        if (!renderOnResizeProp(scroller)) return;\n        offsetsRef.current = getOffsets(renderer, scroller, horizontal);\n        processVisibleIndicesEvent();\n      });\n    };\n    viewport.addEventListener(\"resize\", onResize, { passive: true });\n    return () => {\n      task.cancel();\n      viewport.removeEventListener(\"resize\", onResize);\n    };\n  }, [\n    mayRenderOnResize,\n    scroller,\n    renderOnResizeProp,\n    horizontal,\n    processVisibleIndicesEvent\n  ]);\n  useEffect(() => {\n    if (typeof IntersectionObserver !== \"function\") return;\n    const renderer = ref.current;\n    if (!renderer) return;\n    if (!scroller) return;\n    const viewport = getViewport(scroller);\n    if (!viewport) return;\n    const observer = new IntersectionObserver(\n      () => {\n        offsetsRef.current = getOffsets(renderer, scroller, horizontal);\n        processVisibleIndicesEvent();\n      },\n      { root: scroller === viewport ? scroller : null }\n    );\n    observer.observe(renderer);\n    return () => {\n      observer.disconnect();\n    };\n  }, [scroller, processVisibleIndicesEvent]);\n  const elementObserver = useMemo(() => {\n    if (typeof ResizeObserver !== \"function\") return;\n    return new ResizeObserver(() => {\n      flushSync(updateElements);\n    });\n  }, [updateElements]);\n  const itemRef = useCallback(\n    (element) => {\n      if (!element) return;\n      if (itemSize) return;\n      updateElements();\n      elements.set(element.id, element);\n      elementObserver == null ? void 0 : elementObserver.observe(element);\n    },\n    [itemSize, elements, updateElements, elementObserver]\n  );\n  const getItemProps = useCallback(\n    (item, index) => {\n      var _a3, _b3;\n      const itemId = getItemId(item, index, baseId);\n      const offset = itemSize ? paddingStart + itemSize * index + gap * index : (_b3 = (_a3 = data.get(itemId)) == null ? void 0 : _a3.start) != null ? _b3 : 0;\n      const baseItemProps = {\n        id: itemId,\n        ref: itemRef,\n        index,\n        style: {\n          position: \"absolute\",\n          left: horizontal ? offset : 0,\n          top: horizontal ? 0 : offset\n        }\n      };\n      if (itemSize) {\n        baseItemProps.style[horizontal ? \"width\" : \"height\"] = itemSize;\n      }\n      if (item == null) return baseItemProps;\n      const itemProps = getItemObject(item);\n      return __spreadProps(__spreadValues(__spreadValues({}, itemProps), baseItemProps), {\n        style: __spreadValues(__spreadValues({}, itemProps.style), baseItemProps.style)\n      });\n    },\n    [baseId, data, itemSize, paddingStart, gap, horizontal, itemRef]\n  );\n  const itemsProps = useMemo(() => {\n    return visibleIndices.map((index) => {\n      if (index < 0) return;\n      const item = getItem(items, index);\n      if (!item) return;\n      return getItemProps(item, index);\n    }).filter((value) => value != null);\n  }, [items, visibleIndices, getItemProps]);\n  const children = itemsProps == null ? void 0 : itemsProps.map((itemProps) => {\n    return renderItem == null ? void 0 : renderItem(itemProps);\n  });\n  const styleProp = props.style;\n  const sizeProperty = horizontal ? \"width\" : \"height\";\n  const style = useMemo(\n    () => __spreadValues({\n      flex: \"none\",\n      position: \"relative\",\n      [sizeProperty]: totalSize\n    }, styleProp),\n    [styleProp, sizeProperty, totalSize]\n  );\n  const childrenData = useMemo(() => /* @__PURE__ */ new Map(), []);\n  const providerValue = useMemo(\n    () => ({ store, orientation, overscan, childrenData }),\n    [store, orientation, overscan, childrenData]\n  );\n  props = useWrapElement(\n    props,\n    (element) => /* @__PURE__ */ jsx(CollectionRendererContext.Provider, { value: providerValue, children: element }),\n    [providerValue]\n  );\n  props = __spreadProps(__spreadValues({\n    id: baseId\n  }, props), {\n    style,\n    ref: useMergeRefs(ref, props.ref)\n  });\n  return __spreadProps(__spreadValues({}, props), { children });\n}\nvar CollectionRenderer = forwardRef(function CollectionRenderer2(props) {\n  const htmlProps = useCollectionRenderer(props);\n  return createElement(TagName, htmlProps);\n});\nvar getCollectionRendererItem = getItem;\nvar getCollectionRendererItemId = getItemId;\n\nexport {\n  useCollectionRenderer,\n  CollectionRenderer,\n  getCollectionRendererItem,\n  getCollectionRendererItemId\n};\n","\"use client\";\nimport {\n  getCollectionRendererItemId,\n  useCollectionRenderer\n} from \"./WTCO46W5.js\";\nimport {\n  useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n  createElement,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n  useId\n} from \"./ABQUS43J.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-renderer.tsx\nimport { useMemo } from \"react\";\nvar TagName = \"div\";\nfunction getItemObject(item) {\n  if (!item || typeof item !== \"object\") {\n    return { value: item };\n  }\n  return item;\n}\nfunction countItems(items) {\n  if (!items) return [0];\n  if (typeof items === \"number\") {\n    return Array.from({ length: items }, (_, index) => index + 1);\n  }\n  return items.reduce((count, item, index) => {\n    var _a, _b;\n    const object = getItemObject(item);\n    if (!object.items) {\n    }\n    if (!object.items) {\n      count[index] = index + 1;\n      return count;\n    }\n    const prevCount = (_a = count[index - 1]) != null ? _a : 0;\n    const itemsCount = (_b = countItems(object.items)[object.items.length - 1]) != null ? _b : 0;\n    count[index] = prevCount + itemsCount;\n    return count;\n  }, []);\n}\nfunction findFirst(items, offset = 1) {\n  for (let index = offset > 0 ? 0 : items.length - 1; index >= 0 && index < items.length; index += offset) {\n    const item = items[index];\n    const object = getItemObject(item);\n    if (object.items && findFirst(object.items, offset) !== -1) return index;\n    if (!object.disabled) return index;\n  }\n  return -1;\n}\nfunction findLast(items) {\n  return findFirst(items, -1);\n}\nfunction findById(items, id, baseId) {\n  return items.findIndex((item, index) => {\n    var _a;\n    const itemId = getCollectionRendererItemId(item, index, baseId);\n    if (itemId === id) return true;\n    const object = getItemObject(item);\n    if ((_a = object.items) == null ? void 0 : _a.length) return findById(object.items, id, itemId) !== -1;\n    const ids = id.split(\"/\");\n    if (ids.length === 1) return false;\n    return ids.some((id2) => itemId === id2);\n  });\n}\nfunction useCompositeRenderer(_a) {\n  var _b = _a, {\n    store,\n    orientation: orientationProp,\n    persistentIndices: persistentIndicesProp,\n    children: renderItem,\n    \"aria-setsize\": ariaSetSize,\n    \"aria-posinset\": ariaPosInSet = 1\n  } = _b, props = __objRest(_b, [\n    \"store\",\n    \"orientation\",\n    \"persistentIndices\",\n    \"children\",\n    \"aria-setsize\",\n    \"aria-posinset\"\n  ]);\n  const context = useCompositeContext();\n  store = store || context;\n  const orientation = useStoreState(\n    store,\n    (state) => (orientationProp != null ? orientationProp : (state == null ? void 0 : state.orientation) === \"both\") ? \"vertical\" : state == null ? void 0 : state.orientation\n  );\n  const items = useStoreState(store, (state) => {\n    var _a2;\n    if (!state) return props.items;\n    if (\"mounted\" in state && !state.mounted) return 0;\n    return (_a2 = props.items) != null ? _a2 : state.items;\n  });\n  const id = useId(props.id);\n  const itemsCount = useMemo(() => countItems(items), [items]);\n  const setSize = useMemo(\n    () => {\n      var _a2;\n      return (_a2 = ariaSetSize != null ? ariaSetSize : itemsCount[itemsCount.length - 1]) != null ? _a2 : 0;\n    },\n    [ariaSetSize, itemsCount]\n  );\n  const firstIndex = useMemo(() => {\n    if (!items) return -1;\n    if (typeof items === \"number\") return 0;\n    if (!items.length) return -1;\n    return findFirst(items);\n  }, [items]);\n  const lastIndex = useMemo(() => {\n    if (!items) return -1;\n    if (typeof items === \"number\") return items - 1;\n    if (!items.length) return -1;\n    return findLast(items);\n  }, [items]);\n  const activeId = useStoreState(store, \"activeId\");\n  const activeIndex = useMemo(() => {\n    if (!id) return -1;\n    if (!items) return -1;\n    if (activeId == null) return -1;\n    if (typeof items === \"number\") return -1;\n    if (!items.length) return -1;\n    return findById(items, activeId, id);\n  }, [id, items, activeId]);\n  const persistentIndices = useMemo(() => {\n    const indices = [firstIndex, activeIndex, lastIndex].filter(\n      (index) => index >= 0\n    );\n    if (persistentIndicesProp) {\n      return [...persistentIndicesProp, ...indices];\n    }\n    return indices;\n  }, [firstIndex, activeIndex, lastIndex, persistentIndicesProp]);\n  return useCollectionRenderer(__spreadProps(__spreadValues({\n    id,\n    store,\n    orientation,\n    persistentIndices\n  }, props), {\n    children: (item) => {\n      var _a2;\n      const nextItem = __spreadProps(__spreadValues({}, item), {\n        \"aria-setsize\": setSize,\n        \"aria-posinset\": ariaPosInSet + ((_a2 = itemsCount[item.index - 1]) != null ? _a2 : 0)\n      });\n      return renderItem == null ? void 0 : renderItem(nextItem);\n    }\n  }));\n}\nvar CompositeRenderer = forwardRef(function CompositeRenderer2(props) {\n  const htmlProps = useCompositeRenderer(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useCompositeRenderer,\n  CompositeRenderer\n};\n","\"use client\";\nimport {\n  useCompositeRenderer\n} from \"../__chunks/ZOBNYESQ.js\";\nimport {\n  getCollectionRendererItem,\n  getCollectionRendererItemId\n} from \"../__chunks/WTCO46W5.js\";\nimport {\n  useSelectContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n  createElement,\n  forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n  useStoreState\n} from \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n  __objRest,\n  __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-renderer.tsx\nimport { toArray } from \"@ariakit/core/utils/array\";\nimport { useMemo } from \"react\";\nvar TagName = \"div\";\nfunction getItemObject(item) {\n  if (!item || typeof item !== \"object\") {\n    return { value: `${item}` };\n  }\n  return item;\n}\nfunction findIndicesByValue(items, value) {\n  var _a;\n  const values = toArray(value);\n  const indices = [];\n  for (const [index, item] of items.entries()) {\n    if (indices.length === values.length) break;\n    const object = getItemObject(item);\n    if (object.value != null && values.includes(object.value)) {\n      indices.push(index);\n    } else if ((_a = object.items) == null ? void 0 : _a.length) {\n      const childIndices = findIndicesByValue(object.items, value);\n      if (childIndices.length) {\n        indices.push(index);\n      }\n    }\n  }\n  return indices;\n}\nfunction useSelectRenderer(_a) {\n  var _b = _a, {\n    store,\n    orientation: orientationProp,\n    persistentIndices: persistentIndicesProp,\n    items: itemsProp,\n    value: valueProp\n  } = _b, props = __objRest(_b, [\n    \"store\",\n    \"orientation\",\n    \"persistentIndices\",\n    \"items\",\n    \"value\"\n  ]);\n  const context = useSelectContext();\n  store = store || context;\n  const items = useStoreState(store, (state) => {\n    if (!state) return itemsProp;\n    if (!state.mounted) return 0;\n    return itemsProp != null ? itemsProp : state.items;\n  });\n  const value = useStoreState(store, (state) => valueProp != null ? valueProp : state == null ? void 0 : state.value);\n  const valueIndices = useMemo(() => {\n    if (!items) return [];\n    if (value == null) return [];\n    if (typeof items === \"number\") return [];\n    if (!items.length) return [];\n    return findIndicesByValue(items, value);\n  }, [items, value]);\n  const persistentIndices = useMemo(() => {\n    if (persistentIndicesProp) {\n      return [...persistentIndicesProp, ...valueIndices];\n    }\n    return valueIndices;\n  }, [valueIndices, persistentIndicesProp]);\n  return useCompositeRenderer(__spreadValues({\n    store,\n    items,\n    persistentIndices\n  }, props));\n}\nvar SelectRenderer = forwardRef(function SelectRenderer2(props) {\n  const htmlProps = useSelectRenderer(props);\n  return createElement(TagName, htmlProps);\n});\nexport {\n  SelectRenderer,\n  getCollectionRendererItem as getSelectRendererItem,\n  getCollectionRendererItemId as getSelectRendererItemId\n};\n","\"use client\";\nimport {\n  usePopoverContext\n} from \"./MTZPJQMC.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-disclosure-arrow.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"span\";\nvar pointsMap = {\n  top: \"4,10 8,6 12,10\",\n  right: \"6,4 10,8 6,12\",\n  bottom: \"4,6 8,10 12,6\",\n  left: \"10,4 6,8 10,12\"\n};\nvar usePopoverDisclosureArrow = createHook(function usePopoverDisclosureArrow2(_a) {\n  var _b = _a, { store, placement } = _b, props = __objRest(_b, [\"store\", \"placement\"]);\n  const context = usePopoverContext();\n  store = store || context;\n  invariant(\n    store,\n    process.env.NODE_ENV !== \"production\" && \"PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component.\"\n  );\n  const position = store.useState((state) => placement || state.placement);\n  const dir = position.split(\"-\")[0];\n  const points = pointsMap[dir];\n  const children = useMemo(\n    () => /* @__PURE__ */ jsx(\n      \"svg\",\n      {\n        display: \"block\",\n        fill: \"none\",\n        stroke: \"currentColor\",\n        strokeLinecap: \"round\",\n        strokeLinejoin: \"round\",\n        strokeWidth: 1.5,\n        viewBox: \"0 0 16 16\",\n        height: \"1em\",\n        width: \"1em\",\n        children: /* @__PURE__ */ jsx(\"polyline\", { points })\n      }\n    ),\n    [points]\n  );\n  props = __spreadProps(__spreadValues({\n    children,\n    \"aria-hidden\": true\n  }, props), {\n    style: __spreadValues({\n      width: \"1em\",\n      height: \"1em\",\n      pointerEvents: \"none\"\n    }, props.style)\n  });\n  return removeUndefinedValues(props);\n});\nvar PopoverDisclosureArrow = forwardRef(\n  function PopoverDisclosureArrow2(props) {\n    const htmlProps = usePopoverDisclosureArrow(props);\n    return createElement(TagName, htmlProps);\n  }\n);\n\nexport {\n  usePopoverDisclosureArrow,\n  PopoverDisclosureArrow\n};\n","\"use client\";\nimport {\n  usePopoverDisclosureArrow\n} from \"./DR55NYVS.js\";\nimport {\n  useSelectContext\n} from \"./KPEX55MY.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n  __objRest,\n  __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-arrow.tsx\nvar TagName = \"span\";\nvar useSelectArrow = createHook(\n  function useSelectArrow2(_a) {\n    var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n    const context = useSelectContext();\n    store = store || context;\n    props = usePopoverDisclosureArrow(__spreadValues({ store }, props));\n    return props;\n  }\n);\nvar SelectArrow = forwardRef(function SelectArrow2(props) {\n  const htmlProps = useSelectArrow(props);\n  return createElement(TagName, htmlProps);\n});\n\nexport {\n  useSelectArrow,\n  SelectArrow\n};\n","\"use client\";\nimport {\n  usePopoverDisclosure\n} from \"../__chunks/QYJ6MIDR.js\";\nimport \"../__chunks/AXB53BZF.js\";\nimport \"../__chunks/P4IRICAX.js\";\nimport \"../__chunks/OMU7RWRV.js\";\nimport {\n  SelectArrow\n} from \"../__chunks/UD53QJDV.js\";\nimport \"../__chunks/DR55NYVS.js\";\nimport \"../__chunks/X5NMLKT6.js\";\nimport {\n  useCompositeTypeahead\n} from \"../__chunks/T7VMP3TM.js\";\nimport {\n  SelectScopedContextProvider,\n  useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n  createElement,\n  createHook,\n  forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n  useBooleanEvent,\n  useEvent,\n  useMergeRefs,\n  useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n  __objRest,\n  __spreadProps,\n  __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select.tsx\nimport { toArray } from \"@ariakit/core/utils/array\";\nimport { getPopupRole } from \"@ariakit/core/utils/dom\";\nimport { queueBeforeEvent } from \"@ariakit/core/utils/events\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nfunction getSelectedValues(select) {\n  return Array.from(select.selectedOptions).map((option) => option.value);\n}\nfunction nextWithValue(store, next) {\n  return () => {\n    const nextId = next();\n    if (!nextId) return;\n    let i = 0;\n    let nextItem = store.item(nextId);\n    const firstItem = nextItem;\n    while (nextItem && nextItem.value == null) {\n      const nextId2 = next(++i);\n      if (!nextId2) return;\n      nextItem = store.item(nextId2);\n      if (nextItem === firstItem) break;\n    }\n    return nextItem == null ? void 0 : nextItem.id;\n  };\n}\nvar useSelect = createHook(function useSelect2(_a) {\n  var _b = _a, {\n    store,\n    name,\n    form,\n    required,\n    showOnKeyDown = true,\n    moveOnKeyDown = true,\n    toggleOnPress = true,\n    toggleOnClick = toggleOnPress\n  } = _b, props = __objRest(_b, [\n    \"store\",\n    \"name\",\n    \"form\",\n    \"required\",\n    \"showOnKeyDown\",\n    \"moveOnKeyDown\",\n    \"toggleOnPress\",\n    \"toggleOnClick\"\n  ]);\n  const context = useSelectProviderContext();\n  store = store || context;\n  invariant(\n    store,\n    process.env.NODE_ENV !== \"production\" && \"Select must receive a `store` prop or be wrapped in a SelectProvider component.\"\n  );\n  const onKeyDownProp = props.onKeyDown;\n  const showOnKeyDownProp = useBooleanEvent(showOnKeyDown);\n  const moveOnKeyDownProp = useBooleanEvent(moveOnKeyDown);\n  const placement = store.useState(\"placement\");\n  const dir = placement.split(\"-\")[0];\n  const value = store.useState(\"value\");\n  const multiSelectable = Array.isArray(value);\n  const onKeyDown = useEvent((event) => {\n    var _a2;\n    onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n    if (event.defaultPrevented) return;\n    if (!store) return;\n    const { orientation, items: items2, activeId } = store.getState();\n    const isVertical = orientation !== \"horizontal\";\n    const isHorizontal = orientation !== \"vertical\";\n    const isGrid = !!((_a2 = items2.find((item) => !item.disabled && item.value != null)) == null ? void 0 : _a2.rowId);\n    const moveKeyMap = {\n      ArrowUp: (isGrid || isVertical) && nextWithValue(store, store.up),\n      ArrowRight: (isGrid || isHorizontal) && nextWithValue(store, store.next),\n      ArrowDown: (isGrid || isVertical) && nextWithValue(store, store.down),\n      ArrowLeft: (isGrid || isHorizontal) && nextWithValue(store, store.previous)\n    };\n    const getId = moveKeyMap[event.key];\n    if (getId && moveOnKeyDownProp(event)) {\n      event.preventDefault();\n      store.move(getId());\n    }\n    const isTopOrBottom = dir === \"top\" || dir === \"bottom\";\n    const isLeft = dir === \"left\";\n    const isRight = dir === \"right\";\n    const canShowKeyMap = {\n      ArrowDown: isTopOrBottom,\n      ArrowUp: isTopOrBottom,\n      ArrowLeft: isLeft,\n      ArrowRight: isRight\n    };\n    const canShow = canShowKeyMap[event.key];\n    if (canShow && showOnKeyDownProp(event)) {\n      event.preventDefault();\n      store.move(activeId);\n      queueBeforeEvent(event.currentTarget, \"keyup\", store.show);\n    }\n  });\n  props = useWrapElement(\n    props,\n    (element) => /* @__PURE__ */ jsx(SelectScopedContextProvider, { value: store, children: element }),\n    [store]\n  );\n  const [autofill, setAutofill] = useState(false);\n  const nativeSelectChangedRef = useRef(false);\n  useEffect(() => {\n    const nativeSelectChanged = nativeSelectChangedRef.current;\n    nativeSelectChangedRef.current = false;\n    if (nativeSelectChanged) return;\n    setAutofill(false);\n  }, [value]);\n  const labelId = store.useState((state) => {\n    var _a2;\n    return (_a2 = state.labelElement) == null ? void 0 : _a2.id;\n  });\n  const label = props[\"aria-label\"];\n  const labelledBy = props[\"aria-labelledby\"] || labelId;\n  const items = store.useState((state) => {\n    if (!name) return;\n    return state.items;\n  });\n  const values = useMemo(() => {\n    return [...new Set(items == null ? void 0 : items.map((i) => i.value).filter((v) => v != null))];\n  }, [items]);\n  props = useWrapElement(\n    props,\n    (element) => {\n      if (!name) return element;\n      return /* @__PURE__ */ jsxs(Fragment, { children: [\n        /* @__PURE__ */ jsxs(\n          \"select\",\n          {\n            style: {\n              border: 0,\n              clip: \"rect(0 0 0 0)\",\n              height: \"1px\",\n              margin: \"-1px\",\n              overflow: \"hidden\",\n              padding: 0,\n              position: \"absolute\",\n              whiteSpace: \"nowrap\",\n              width: \"1px\"\n            },\n            tabIndex: -1,\n            \"aria-hidden\": true,\n            \"aria-label\": label,\n            \"aria-labelledby\": labelledBy,\n            name,\n            form,\n            required,\n            value,\n            multiple: multiSelectable,\n            onFocus: () => {\n              var _a2;\n              return (_a2 = store == null ? void 0 : store.getState().selectElement) == null ? void 0 : _a2.focus();\n            },\n            onChange: (event) => {\n              nativeSelectChangedRef.current = true;\n              setAutofill(true);\n              store == null ? void 0 : store.setValue(\n                multiSelectable ? getSelectedValues(event.target) : event.target.value\n              );\n            },\n            children: [\n              toArray(value).map((value2) => {\n                if (value2 == null) return null;\n                if (values.includes(value2)) return null;\n                return /* @__PURE__ */ jsx(\"option\", { value: value2, children: value2 }, value2);\n              }),\n              values.map((value2) => /* @__PURE__ */ jsx(\"option\", { value: value2, children: value2 }, value2))\n            ]\n          }\n        ),\n        element\n      ] });\n    },\n    [\n      store,\n      label,\n      labelledBy,\n      name,\n      form,\n      required,\n      value,\n      multiSelectable,\n      values\n    ]\n  );\n  const children = /* @__PURE__ */ jsxs(Fragment, { children: [\n    value,\n    /* @__PURE__ */ jsx(SelectArrow, {})\n  ] });\n  const contentElement = store.useState(\"contentElement\");\n  props = __spreadProps(__spreadValues({\n    role: \"combobox\",\n    \"aria-autocomplete\": \"none\",\n    \"aria-labelledby\": labelId,\n    \"aria-haspopup\": getPopupRole(contentElement, \"listbox\"),\n    \"data-autofill\": autofill || void 0,\n    \"data-name\": name,\n    children\n  }, props), {\n    ref: useMergeRefs(store.setSelectElement, props.ref),\n    onKeyDown\n  });\n  props = usePopoverDisclosure(__spreadValues({ store, toggleOnClick }, props));\n  props = useCompositeTypeahead(__spreadValues({ store }, props));\n  return props;\n});\nvar Select = forwardRef(function Select2(props) {\n  const htmlProps = useSelect(props);\n  return createElement(TagName, htmlProps);\n});\nexport {\n  Select,\n  useSelect\n};\n","import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n  const [start, end] = normalizeDates(context, interval.start, interval.end);\n  return { start, end };\n}\n","import { addDays } from \"./addDays.js\";\nimport { addMonths } from \"./addMonths.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link add} function options.\n */\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes, and seconds to be added.\n * @param options - An object with options\n *\n * @returns The new date with the seconds added\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport function add(date, duration, options) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  // Add years and months\n  const _date = toDate(date, options?.in);\n  const dateWithMonths =\n    months || years ? addMonths(_date, months + years * 12) : _date;\n\n  // Add weeks and days\n  const dateWithDays =\n    days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;\n\n  // Add days, hours, minutes, and seconds\n  const minutesToAdd = minutes + hours * 60;\n  const secondsToAdd = seconds + minutesToAdd * 60;\n  const msToAdd = secondsToAdd * 1000;\n\n  return constructFrom(options?.in || date, +dateWithDays + msToAdd);\n}\n\n// Fallback for modularized imports:\nexport default add;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  const dayOfMonth = _date.getDate();\n\n  // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n  const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n  endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n  const daysInMonth = endOfDesiredMonth.getDate();\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    _date.setFullYear(\n      endOfDesiredMonth.getFullYear(),\n      endOfDesiredMonth.getMonth(),\n      dayOfMonth,\n    );\n    return _date;\n  }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const month = _date.getMonth();\n  _date.setFullYear(_date.getFullYear(), month + 1, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\n\n/**\n * The {@link differenceInDays} function options.\n */\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n *   new Date(2020, 5, 1),\n *   new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const sign = compareLocalAsc(laterDate_, earlierDate_);\n  const difference = Math.abs(\n    differenceInCalendarDays(laterDate_, earlierDate_),\n  );\n\n  laterDate_.setDate(laterDate_.getDate() - sign * difference);\n\n  // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n  // If so, result must be decreased by 1 in absolute value\n  const isLastDayNotFull = Number(\n    compareLocalAsc(laterDate_, earlierDate_) === -sign,\n  );\n\n  const result = sign * (difference - isLastDayNotFull);\n  // Prevent negative zero\n  return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(laterDate, earlierDate) {\n  const diff =\n    laterDate.getFullYear() - earlierDate.getFullYear() ||\n    laterDate.getMonth() - earlierDate.getMonth() ||\n    laterDate.getDate() - earlierDate.getDate() ||\n    laterDate.getHours() - earlierDate.getHours() ||\n    laterDate.getMinutes() - earlierDate.getMinutes() ||\n    laterDate.getSeconds() - earlierDate.getSeconds() ||\n    laterDate.getMilliseconds() - earlierDate.getMilliseconds();\n\n  if (diff < 0) return -1;\n  if (diff > 0) return 1;\n\n  // Return 0 if diff is 0; return NaN if diff is NaN\n  return diff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n","export function getRoundingMethod(method) {\n  return (number) => {\n    const round = method ? Math[method] : Math.trunc;\n    const result = round(number);\n    // Prevent negative zero\n    return result === 0 ? 0 : result;\n  };\n}\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInHour } from \"./constants.js\";\n\n/**\n * The {@link differenceInHours} function options.\n */\n\n/**\n * @name differenceInHours\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of hours\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * const result = differenceInHours(\n *   new Date(2014, 6, 2, 19, 0),\n *   new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\nexport function differenceInHours(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  const diff = (+laterDate_ - +earlierDate_) / millisecondsInHour;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInHours;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n *   new Date(2014, 6, 2, 12, 30, 21, 700),\n *   new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(laterDate, earlierDate) {\n  return +toDate(laterDate) - +toDate(earlierDate);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { millisecondsInMinute } from \"./constants.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInMinutes} function options.\n */\n\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of minutes\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n *   new Date(2014, 6, 2, 12, 20, 0),\n *   new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n *   new Date(2000, 0, 1, 10, 0, 0),\n *   new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\nexport function differenceInMinutes(dateLeft, dateRight, options) {\n  const diff =\n    differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMinutes;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n  const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n  if (diff < 0) return -1;\n  else if (diff > 0) return 1;\n\n  // Return 0 if diff is 0; return NaN if diff is NaN\n  return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n  const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n  return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { endOfDay } from \"./endOfDay.js\";\nimport { endOfMonth } from \"./endOfMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  return +endOfDay(_date, options) === +endOfMonth(_date, options);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n  const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    laterDate,\n    earlierDate,\n  );\n\n  const sign = compareAsc(workingLaterDate, earlierDate_);\n  const difference = Math.abs(\n    differenceInCalendarMonths(workingLaterDate, earlierDate_),\n  );\n\n  if (difference < 1) return 0;\n\n  if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n    workingLaterDate.setDate(30);\n\n  workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n  let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n  if (\n    isLastDayOfMonth(laterDate_) &&\n    difference === 1 &&\n    compareAsc(laterDate_, earlierDate_) === 1\n  ) {\n    isLastMonthNotFull = false;\n  }\n\n  const result = sign * (difference - +isLastMonthNotFull);\n  return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n *   new Date(2014, 6, 2, 12, 30, 20, 0),\n *   new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(laterDate, earlierDate, options) {\n  const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarYears} function options.\n */\n\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n\n * @returns The number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * );\n * //=> 2\n */\nexport function differenceInCalendarYears(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  return laterDate_.getFullYear() - earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarYears;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarYears } from \"./differenceInCalendarYears.js\";\n\n/**\n * The {@link differenceInYears} function options.\n */\n\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\nexport function differenceInYears(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  // -1 if the left date is earlier than the right date\n  // 2023-12-31 - 2024-01-01 = -1\n  const sign = compareAsc(laterDate_, earlierDate_);\n\n  // First calculate the difference in calendar years\n  // 2024-01-01 - 2023-12-31 = 1 year\n  const diff = Math.abs(differenceInCalendarYears(laterDate_, earlierDate_));\n\n  // Now we need to calculate if the difference is full. To do that we set\n  // both dates to the same year and check if the both date's month and day\n  // form a full year.\n  laterDate_.setFullYear(1584);\n  earlierDate_.setFullYear(1584);\n\n  // For it to be true, when the later date is indeed later than the earlier date\n  // (2026-02-01 - 2023-12-10 = 3 years), the difference is full if\n  // the normalized later date is also later than the normalized earlier date.\n  // In our example, 1584-02-01 is earlier than 1584-12-10, so the difference\n  // is partial, hence we need to subtract 1 from the difference 3 - 1 = 2.\n  const partial = compareAsc(laterDate_, earlierDate_) === -sign;\n\n  const result = sign * (diff - +partial);\n\n  // Prevent negative zero\n  return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInYears;\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { add } from \"./add.js\";\nimport { differenceInDays } from \"./differenceInDays.js\";\nimport { differenceInHours } from \"./differenceInHours.js\";\nimport { differenceInMinutes } from \"./differenceInMinutes.js\";\nimport { differenceInMonths } from \"./differenceInMonths.js\";\nimport { differenceInSeconds } from \"./differenceInSeconds.js\";\nimport { differenceInYears } from \"./differenceInYears.js\";\n\n/**\n * The {@link intervalToDuration} function options.\n */\n\n/**\n * @name intervalToDuration\n * @category Common Helpers\n * @summary Convert interval to duration\n *\n * @description\n * Convert an interval object to a duration object.\n *\n * @param interval - The interval to convert to duration\n * @param options - The context options\n *\n * @returns The duration object\n *\n * @example\n * // Get the duration between January 15, 1929 and April 4, 1968.\n * intervalToDuration({\n *   start: new Date(1929, 0, 15, 12, 0, 0),\n *   end: new Date(1968, 3, 4, 19, 5, 0)\n * });\n * //=> { years: 39, months: 2, days: 20, hours: 7, minutes: 5, seconds: 0 }\n */\nexport function intervalToDuration(interval, options) {\n  const { start, end } = normalizeInterval(options?.in, interval);\n  const duration = {};\n\n  const years = differenceInYears(end, start);\n  if (years) duration.years = years;\n\n  const remainingMonths = add(start, { years: duration.years });\n  const months = differenceInMonths(end, remainingMonths);\n  if (months) duration.months = months;\n\n  const remainingDays = add(remainingMonths, { months: duration.months });\n  const days = differenceInDays(end, remainingDays);\n  if (days) duration.days = days;\n\n  const remainingHours = add(remainingDays, { days: duration.days });\n  const hours = differenceInHours(end, remainingHours);\n  if (hours) duration.hours = hours;\n\n  const remainingMinutes = add(remainingHours, { hours: duration.hours });\n  const minutes = differenceInMinutes(end, remainingMinutes);\n  if (minutes) duration.minutes = minutes;\n\n  const remainingSeconds = add(remainingMinutes, { minutes: duration.minutes });\n  const seconds = differenceInSeconds(end, remainingSeconds);\n  if (seconds) duration.seconds = seconds;\n\n  return duration;\n}\n\n// Fallback for modularized imports:\nexport default intervalToDuration;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { subDays } from \"./subDays.js\";\nimport { subMonths } from \"./subMonths.js\";\n\n/**\n * The {@link sub} function options.\n */\n\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n * @param options - An object with options\n *\n * | Key     | Description                        |\n * |---------|------------------------------------|\n * | years   | Amount of years to be subtracted   |\n * | months  | Amount of months to be subtracted  |\n * | weeks   | Amount of weeks to be subtracted   |\n * | days    | Amount of days to be subtracted    |\n * | hours   | Amount of hours to be subtracted   |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns The new date with the seconds subtracted\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\nexport function sub(date, duration, options) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  const withoutMonths = subMonths(date, months + years * 12, options);\n  const withoutDays = subDays(withoutMonths, days + weeks * 7, options);\n\n  const minutesToSub = minutes + hours * 60;\n  const secondsToSub = seconds + minutesToSub * 60;\n  const msToSub = secondsToSub * 1000;\n\n  return constructFrom(options?.in || date, +withoutDays - msToSub);\n}\n\n// Fallback for modularized imports:\nexport default sub;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n  return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n  return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n"],"names":["ReflectOwnKeys","R","Reflect","ReflectApply","apply","target","receiver","args","Function","prototype","call","ownKeys","Object","getOwnPropertySymbols","getOwnPropertyNames","concat","NumberIsNaN","Number","isNaN","value","EventEmitter","init","this","module","exports","once","emitter","name","Promise","resolve","reject","errorListener","err","removeListener","resolver","slice","arguments","eventTargetAgnosticAddListener","handler","flags","on","addErrorHandlerIfEventEmitter","_events","undefined","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","TypeError","_getMaxListeners","that","_addListener","type","prepend","m","events","existing","warning","create","newListener","emit","unshift","push","length","warned","w","Error","String","count","console","warn","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","bind","_listeners","unwrap","evlistener","arr","ret","Array","i","unwrapListeners","arrayClone","listenerCount","n","copy","addEventListener","wrapListener","arg","removeEventListener","defineProperty","enumerable","get","set","RangeError","getPrototypeOf","setMaxListeners","getMaxListeners","doError","error","er","message","context","len","listeners","addListener","prependListener","prependOnceListener","list","position","originalListener","shift","index","pop","spliceOne","off","removeAllListeners","key","keys","rawListeners","eventNames","GroupLabelContext","createContext","ctx","useSelectContext","useContext","useSelectScopedContext","useScopedContext","useSelectProviderContext","useProviderContext","SelectContextProvider","ContextProvider","SelectScopedContextProvider","ScopedContextProvider","SelectItemCheckedContext","SelectHeadingContext","symbol","Symbol","useDisclosure","_a","_b","store","toggleOnClick","props","ref","useRef","expanded","setExpanded","useState","disclosureElement","open","useEffect","isCurrentDisclosure","current","isConnected","setDisclosureElement","onClickProp","onClick","toggleOnClickProp","isDuplicate","metadataProps","event","defaultPrevented","currentTarget","toggle","contentElement","id","htmlProps","useDialogDisclosure","usePopoverDisclosure","setAnchorElement","element","jsx","children","PopoverDisclosure","createSelectStore","combobox","syncState","getState","composite","virtualFocus","includesBaseElement","activeId","defaultActiveId","orientation","popover","placement","initialValue","initialState","defaultValue","setValueOnMove","labelElement","selectElement","listElement","select","items","item","find","item2","disabled","setState","mounted","values","lastValue","isArray","moves","setValue","setLabelElement","setSelectElement","setListElement","useSelectStore","useSelectStoreOptions","update","assign","useSelectStoreProps","chars","clearChars","itemTextStartsWith","text","itemText","textContent","trim","toLowerCase","startsWith","useCompositeTypeahead","typeahead","onKeyDownCaptureProp","onKeyDownCapture","cleanupTimeoutRef","ctrlKey","altKey","metaKey","test","isValidTypeaheadEvent","renderedItems","enabledItems","filter","getEnabledItems","selector","offscreenItems","querySelectorAll","ariaDisabled","some","isSelfTargetOrItem","preventDefault","window","clearTimeout","setTimeout","char","activeItem","getSameInitialItems","move","useSelectItem","_a2","getItem","getItemProp","hideOnClick","setValueOnClick","preventScrollOnKeyDown","focusOnHover","multiSelectable","selected","autoFocus","storeValue","itemValue","includes","isSelected","useCallback","nextItem","setValueOnClickProp","hideOnClickProp","prevValue","v","hide","Provider","role","focusOnHoverProp","SelectItem","ComboboxProvider","useGroupLabel","setLabelId","useCompositeGroupLabel","useMenuGroupLabel","MenuGroupLabel","useGroup","labelId","useCompositeGroup","useMenuGroup","MenuGroup","PopoverProvider","useSelectLabel","queueMicrotask","focus","style","cursor","SelectLabel","SelectListContext","useSelectList","resetOnEscape","hideOnEnter","focusOnMove","alwaysVisible","setDefaultValue","onKeyDownProp","onKeyDown","resetOnEscapeProp","hideOnEnterProp","headingContext","headingState","headingId","setHeadingId","headingContextValue","useMemo","childStore","setChildStore","setStore","element2","hasCombobox","setElement","ariaMultiSelectable","hidden","display","useSelectPopover","SelectPopover","SelectProvider","CollectionRendererContext","createTask","raf","run","cb","requestAnimationFrame","cancel","cancelAnimationFrame","getItemsLength","getItemObject","getItemId","baseId","defaultId","getItemSize","horizontal","fallbackElement","_c","_d","_e","itemObject","prop","size","hasSameOrientation","paddingStart","padding","paddingEnd","initialSize","gap","itemSize","totalSize","reduce","sum","getBoundingClientRect","getScrollOffset","scroller","scrollX","scrollY","scrollLeft","scrollTop","getViewport","defaultView","documentElement","ownerDocument","getOffsets","renderer","scrollOffset","rendererOffset","win","htmlElement","document","rendererRect","left","top","scrollerRect","getRendererOffset","start","end","clientWidth","clientHeight","getData","nextData","avgSize","currentIndex","averageSize","estimatedItemSize","setAverageSize","prevIndex","itemId","itemData","data","elements","rendered","getAverageSize","prevRendered","setSize","size2","nextItemData","Map","useCollectionRenderer","_b2","itemsProp","initialItems","overscan","overscanProp","orientationProp","persistentIndices","renderOnScroll","renderOnResize","renderItem","parent","parentData","childrenData","elementsUpdated","updateElements","defaultVisibleIndices","setVisibleIndices","initialLength","Math","min","abs","from","_","visibleIndices","nextIndices","sort","a","b","setData","data2","totalPadding","lastIndex","totalGap","defaultEnd","lastItemId","lastItemData","getItemsEnd","rendererRef","setScroller","scroller2","useScroller","offsetsRef","processVisibleIndices","offsets","getItemOffset","_a3","start2","initialStart","getValue","right","findNearestIndex","initialEnd","finalOverscan","max","indices","prevIndices","processVisibleIndicesEvent","mayRenderOnScroll","renderOnScrollProp","viewport","task","onScroll","passive","mayRenderOnResize","renderOnResizeProp","ResizeObserver","firstRun","observer","observe","disconnect","onResize","IntersectionObserver","root","elementObserver","flushSync","itemRef","getItemProps","_b3","offset","baseItemProps","itemProps","itemsProps","map","styleProp","sizeProperty","flex","providerValue","getCollectionRendererItemId","countItems","object","prevCount","itemsCount","findFirst","findById","findIndex","ids","split","id2","useCompositeRenderer","persistentIndicesProp","ariaSetSize","ariaPosInSet","firstIndex","findLast","activeIndex","findIndicesByValue","entries","useSelectRenderer","valueProp","valueIndices","SelectRenderer","pointsMap","bottom","usePopoverDisclosureArrow","dir","points","fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","viewBox","height","width","pointerEvents","useSelectArrow","SelectArrow","nextWithValue","next","nextId","firstItem","nextId2","useSelect","form","required","showOnKeyDown","moveOnKeyDown","toggleOnPress","showOnKeyDownProp","moveOnKeyDownProp","items2","isVertical","isHorizontal","isGrid","rowId","getId","ArrowUp","up","ArrowRight","ArrowDown","down","ArrowLeft","previous","isTopOrBottom","show","autofill","setAutofill","nativeSelectChangedRef","nativeSelectChanged","label","labelledBy","Set","jsxs","Fragment","border","clip","margin","overflow","whiteSpace","tabIndex","multiple","onFocus","onChange","selectedOptions","option","value2","Select","normalizeInterval","interval","add","date","duration","options","years","months","weeks","days","hours","minutes","seconds","_date","in","dateWithMonths","dateWithDays","msToAdd","addMonths","amount","NaN","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","setFullYear","getFullYear","endOfDay","setHours","endOfMonth","month","differenceInDays","laterDate","earlierDate","laterDate_","earlierDate_","normalizeDates","sign","compareLocalAsc","difference","differenceInCalendarDays","setDate","result","diff","getHours","getMinutes","getSeconds","getMilliseconds","getRoundingMethod","method","number","trunc","differenceInHours","roundingMethod","differenceInMilliseconds","toDate","differenceInMinutes","dateLeft","dateRight","compareAsc","differenceInCalendarMonths","isLastDayOfMonth","differenceInMonths","workingLaterDate","isLastMonthNotFull","differenceInSeconds","differenceInCalendarYears","differenceInYears","intervalToDuration","remainingMonths","remainingDays","remainingHours","remainingMinutes","sub","withoutMonths","withoutDays","msToSub","subDays","subMonths"],"sourceRoot":""}