@k3-tech/react-kit 0.0.68 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
5
5
  import * as React from "react";
6
- import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$7, isValidElement, PureComponent } from "react";
6
+ import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$1, isValidElement, PureComponent } from "react";
7
7
  import * as ReactDOM from "react-dom";
8
8
  import ReactDOM__default from "react-dom";
9
9
  import { useRouter, useLocation, Link as Link$1 } from "@tanstack/react-router";
@@ -4621,28 +4621,7 @@ function clsx() {
4621
4621
  for (var e2, t2, f = 0, n2 = "", o2 = arguments.length; f < o2; f++) (e2 = arguments[f]) && (t2 = r$2(e2)) && (n2 && (n2 += " "), n2 += t2);
4622
4622
  return n2;
4623
4623
  }
4624
- const concatArrays = (array1, array2) => {
4625
- const combinedArray = new Array(array1.length + array2.length);
4626
- for (let i2 = 0; i2 < array1.length; i2++) {
4627
- combinedArray[i2] = array1[i2];
4628
- }
4629
- for (let i2 = 0; i2 < array2.length; i2++) {
4630
- combinedArray[array1.length + i2] = array2[i2];
4631
- }
4632
- return combinedArray;
4633
- };
4634
- const createClassValidatorObject = (classGroupId, validator) => ({
4635
- classGroupId,
4636
- validator
4637
- });
4638
- const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators2 = null, classGroupId) => ({
4639
- nextPart,
4640
- validators: validators2,
4641
- classGroupId
4642
- });
4643
4624
  const CLASS_PART_SEPARATOR = "-";
4644
- const EMPTY_CONFLICTS = [];
4645
- const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
4646
4625
  const createClassGroupUtils = (config2) => {
4647
4626
  const classMap = createClassMap(config2);
4648
4627
  const {
@@ -4650,134 +4629,104 @@ const createClassGroupUtils = (config2) => {
4650
4629
  conflictingClassGroupModifiers
4651
4630
  } = config2;
4652
4631
  const getClassGroupId = (className) => {
4653
- if (className.startsWith("[") && className.endsWith("]")) {
4654
- return getGroupIdForArbitraryProperty(className);
4655
- }
4656
4632
  const classParts = className.split(CLASS_PART_SEPARATOR);
4657
- const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
4658
- return getGroupRecursive(classParts, startIndex, classMap);
4633
+ if (classParts[0] === "" && classParts.length !== 1) {
4634
+ classParts.shift();
4635
+ }
4636
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
4659
4637
  };
4660
4638
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
4661
- if (hasPostfixModifier) {
4662
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
4663
- const baseConflicts = conflictingClassGroups[classGroupId];
4664
- if (modifierConflicts) {
4665
- if (baseConflicts) {
4666
- return concatArrays(baseConflicts, modifierConflicts);
4667
- }
4668
- return modifierConflicts;
4669
- }
4670
- return baseConflicts || EMPTY_CONFLICTS;
4639
+ const conflicts = conflictingClassGroups[classGroupId] || [];
4640
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
4641
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
4671
4642
  }
4672
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
4643
+ return conflicts;
4673
4644
  };
4674
4645
  return {
4675
4646
  getClassGroupId,
4676
4647
  getConflictingClassGroupIds
4677
4648
  };
4678
4649
  };
4679
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
4680
- const classPathsLength = classParts.length - startIndex;
4681
- if (classPathsLength === 0) {
4650
+ const getGroupRecursive = (classParts, classPartObject) => {
4651
+ var _a2;
4652
+ if (classParts.length === 0) {
4682
4653
  return classPartObject.classGroupId;
4683
4654
  }
4684
- const currentClassPart = classParts[startIndex];
4655
+ const currentClassPart = classParts[0];
4685
4656
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
4686
- if (nextClassPartObject) {
4687
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
4688
- if (result) return result;
4657
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
4658
+ if (classGroupFromNextClassPart) {
4659
+ return classGroupFromNextClassPart;
4689
4660
  }
4690
- const validators2 = classPartObject.validators;
4691
- if (validators2 === null) {
4661
+ if (classPartObject.validators.length === 0) {
4692
4662
  return void 0;
4693
4663
  }
4694
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
4695
- const validatorsLength = validators2.length;
4696
- for (let i2 = 0; i2 < validatorsLength; i2++) {
4697
- const validatorObj = validators2[i2];
4698
- if (validatorObj.validator(classRest)) {
4699
- return validatorObj.classGroupId;
4664
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
4665
+ return (_a2 = classPartObject.validators.find(({
4666
+ validator
4667
+ }) => validator(classRest))) == null ? void 0 : _a2.classGroupId;
4668
+ };
4669
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
4670
+ const getGroupIdForArbitraryProperty = (className) => {
4671
+ if (arbitraryPropertyRegex.test(className)) {
4672
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
4673
+ const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
4674
+ if (property) {
4675
+ return "arbitrary.." + property;
4700
4676
  }
4701
4677
  }
4702
- return void 0;
4703
4678
  };
4704
- const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
4705
- const content = className.slice(1, -1);
4706
- const colonIndex = content.indexOf(":");
4707
- const property = content.slice(0, colonIndex);
4708
- return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
4709
- })();
4710
4679
  const createClassMap = (config2) => {
4711
4680
  const {
4712
4681
  theme,
4713
4682
  classGroups
4714
4683
  } = config2;
4715
- return processClassGroups(classGroups, theme);
4716
- };
4717
- const processClassGroups = (classGroups, theme) => {
4718
- const classMap = createClassPartObject();
4684
+ const classMap = {
4685
+ nextPart: /* @__PURE__ */ new Map(),
4686
+ validators: []
4687
+ };
4719
4688
  for (const classGroupId in classGroups) {
4720
- const group = classGroups[classGroupId];
4721
- processClassesRecursively(group, classMap, classGroupId, theme);
4689
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
4722
4690
  }
4723
4691
  return classMap;
4724
4692
  };
4725
4693
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
4726
- const len = classGroup.length;
4727
- for (let i2 = 0; i2 < len; i2++) {
4728
- const classDefinition = classGroup[i2];
4729
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
4730
- }
4731
- };
4732
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4733
- if (typeof classDefinition === "string") {
4734
- processStringDefinition(classDefinition, classPartObject, classGroupId);
4735
- return;
4736
- }
4737
- if (typeof classDefinition === "function") {
4738
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
4739
- return;
4740
- }
4741
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
4742
- };
4743
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
4744
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4745
- classPartObjectToEdit.classGroupId = classGroupId;
4746
- };
4747
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4748
- if (isThemeGetter(classDefinition)) {
4749
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4750
- return;
4751
- }
4752
- if (classPartObject.validators === null) {
4753
- classPartObject.validators = [];
4754
- }
4755
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
4756
- };
4757
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4758
- const entries = Object.entries(classDefinition);
4759
- const len = entries.length;
4760
- for (let i2 = 0; i2 < len; i2++) {
4761
- const [key, value] = entries[i2];
4762
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
4763
- }
4694
+ classGroup.forEach((classDefinition) => {
4695
+ if (typeof classDefinition === "string") {
4696
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4697
+ classPartObjectToEdit.classGroupId = classGroupId;
4698
+ return;
4699
+ }
4700
+ if (typeof classDefinition === "function") {
4701
+ if (isThemeGetter(classDefinition)) {
4702
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4703
+ return;
4704
+ }
4705
+ classPartObject.validators.push({
4706
+ validator: classDefinition,
4707
+ classGroupId
4708
+ });
4709
+ return;
4710
+ }
4711
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
4712
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
4713
+ });
4714
+ });
4764
4715
  };
4765
4716
  const getPart = (classPartObject, path) => {
4766
- let current = classPartObject;
4767
- const parts = path.split(CLASS_PART_SEPARATOR);
4768
- const len = parts.length;
4769
- for (let i2 = 0; i2 < len; i2++) {
4770
- const part = parts[i2];
4771
- let next = current.nextPart.get(part);
4772
- if (!next) {
4773
- next = createClassPartObject();
4774
- current.nextPart.set(part, next);
4775
- }
4776
- current = next;
4777
- }
4778
- return current;
4717
+ let currentClassPartObject = classPartObject;
4718
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
4719
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
4720
+ currentClassPartObject.nextPart.set(pathPart, {
4721
+ nextPart: /* @__PURE__ */ new Map(),
4722
+ validators: []
4723
+ });
4724
+ }
4725
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
4726
+ });
4727
+ return currentClassPartObject;
4779
4728
  };
4780
- const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
4729
+ const isThemeGetter = (func) => func.isThemeGetter;
4781
4730
  const createLruCache = (maxCacheSize) => {
4782
4731
  if (maxCacheSize < 1) {
4783
4732
  return {
@@ -4787,31 +4736,31 @@ const createLruCache = (maxCacheSize) => {
4787
4736
  };
4788
4737
  }
4789
4738
  let cacheSize = 0;
4790
- let cache2 = /* @__PURE__ */ Object.create(null);
4791
- let previousCache = /* @__PURE__ */ Object.create(null);
4739
+ let cache2 = /* @__PURE__ */ new Map();
4740
+ let previousCache = /* @__PURE__ */ new Map();
4792
4741
  const update = (key, value) => {
4793
- cache2[key] = value;
4742
+ cache2.set(key, value);
4794
4743
  cacheSize++;
4795
4744
  if (cacheSize > maxCacheSize) {
4796
4745
  cacheSize = 0;
4797
4746
  previousCache = cache2;
4798
- cache2 = /* @__PURE__ */ Object.create(null);
4747
+ cache2 = /* @__PURE__ */ new Map();
4799
4748
  }
4800
4749
  };
4801
4750
  return {
4802
4751
  get(key) {
4803
- let value = cache2[key];
4752
+ let value = cache2.get(key);
4804
4753
  if (value !== void 0) {
4805
4754
  return value;
4806
4755
  }
4807
- if ((value = previousCache[key]) !== void 0) {
4756
+ if ((value = previousCache.get(key)) !== void 0) {
4808
4757
  update(key, value);
4809
4758
  return value;
4810
4759
  }
4811
4760
  },
4812
4761
  set(key, value) {
4813
- if (key in cache2) {
4814
- cache2[key] = value;
4762
+ if (cache2.has(key)) {
4763
+ cache2.set(key, value);
4815
4764
  } else {
4816
4765
  update(key, value);
4817
4766
  }
@@ -4820,14 +4769,7 @@ const createLruCache = (maxCacheSize) => {
4820
4769
  };
4821
4770
  const IMPORTANT_MODIFIER = "!";
4822
4771
  const MODIFIER_SEPARATOR = ":";
4823
- const EMPTY_MODIFIERS = [];
4824
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
4825
- modifiers,
4826
- hasImportantModifier,
4827
- baseClassName,
4828
- maybePostfixModifierPosition,
4829
- isExternal
4830
- });
4772
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
4831
4773
  const createParseClassName = (config2) => {
4832
4774
  const {
4833
4775
  prefix,
@@ -4839,13 +4781,12 @@ const createParseClassName = (config2) => {
4839
4781
  let parenDepth = 0;
4840
4782
  let modifierStart = 0;
4841
4783
  let postfixModifierPosition;
4842
- const len = className.length;
4843
- for (let index2 = 0; index2 < len; index2++) {
4844
- const currentCharacter = className[index2];
4784
+ for (let index2 = 0; index2 < className.length; index2++) {
4785
+ let currentCharacter = className[index2];
4845
4786
  if (bracketDepth === 0 && parenDepth === 0) {
4846
4787
  if (currentCharacter === MODIFIER_SEPARATOR) {
4847
4788
  modifiers.push(className.slice(modifierStart, index2));
4848
- modifierStart = index2 + 1;
4789
+ modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
4849
4790
  continue;
4850
4791
  }
4851
4792
  if (currentCharacter === "/") {
@@ -4853,34 +4794,37 @@ const createParseClassName = (config2) => {
4853
4794
  continue;
4854
4795
  }
4855
4796
  }
4856
- if (currentCharacter === "[") bracketDepth++;
4857
- else if (currentCharacter === "]") bracketDepth--;
4858
- else if (currentCharacter === "(") parenDepth++;
4859
- else if (currentCharacter === ")") parenDepth--;
4860
- }
4861
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
4862
- let baseClassName = baseClassNameWithImportantModifier;
4863
- let hasImportantModifier = false;
4864
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
4865
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
4866
- hasImportantModifier = true;
4867
- } else if (
4868
- /**
4869
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
4870
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
4871
- */
4872
- baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
4873
- ) {
4874
- baseClassName = baseClassNameWithImportantModifier.slice(1);
4875
- hasImportantModifier = true;
4797
+ if (currentCharacter === "[") {
4798
+ bracketDepth++;
4799
+ } else if (currentCharacter === "]") {
4800
+ bracketDepth--;
4801
+ } else if (currentCharacter === "(") {
4802
+ parenDepth++;
4803
+ } else if (currentCharacter === ")") {
4804
+ parenDepth--;
4805
+ }
4876
4806
  }
4807
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
4808
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
4809
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
4877
4810
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
4878
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
4811
+ return {
4812
+ modifiers,
4813
+ hasImportantModifier,
4814
+ baseClassName,
4815
+ maybePostfixModifierPosition
4816
+ };
4879
4817
  };
4880
4818
  if (prefix) {
4881
4819
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
4882
4820
  const parseClassNameOriginal = parseClassName;
4883
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
4821
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
4822
+ isExternal: true,
4823
+ modifiers: [],
4824
+ hasImportantModifier: false,
4825
+ baseClassName: className,
4826
+ maybePostfixModifierPosition: void 0
4827
+ };
4884
4828
  }
4885
4829
  if (experimentalParseClassName) {
4886
4830
  const parseClassNameOriginal = parseClassName;
@@ -4891,35 +4835,36 @@ const createParseClassName = (config2) => {
4891
4835
  }
4892
4836
  return parseClassName;
4893
4837
  };
4838
+ const stripImportantModifier = (baseClassName) => {
4839
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
4840
+ return baseClassName.substring(0, baseClassName.length - 1);
4841
+ }
4842
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
4843
+ return baseClassName.substring(1);
4844
+ }
4845
+ return baseClassName;
4846
+ };
4894
4847
  const createSortModifiers = (config2) => {
4895
- const modifierWeights = /* @__PURE__ */ new Map();
4896
- config2.orderSensitiveModifiers.forEach((mod, index2) => {
4897
- modifierWeights.set(mod, 1e6 + index2);
4898
- });
4899
- return (modifiers) => {
4900
- const result = [];
4901
- let currentSegment = [];
4902
- for (let i2 = 0; i2 < modifiers.length; i2++) {
4903
- const modifier = modifiers[i2];
4904
- const isArbitrary = modifier[0] === "[";
4905
- const isOrderSensitive = modifierWeights.has(modifier);
4906
- if (isArbitrary || isOrderSensitive) {
4907
- if (currentSegment.length > 0) {
4908
- currentSegment.sort();
4909
- result.push(...currentSegment);
4910
- currentSegment = [];
4911
- }
4912
- result.push(modifier);
4848
+ const orderSensitiveModifiers = Object.fromEntries(config2.orderSensitiveModifiers.map((modifier) => [modifier, true]));
4849
+ const sortModifiers = (modifiers) => {
4850
+ if (modifiers.length <= 1) {
4851
+ return modifiers;
4852
+ }
4853
+ const sortedModifiers = [];
4854
+ let unsortedModifiers = [];
4855
+ modifiers.forEach((modifier) => {
4856
+ const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
4857
+ if (isPositionSensitive) {
4858
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
4859
+ unsortedModifiers = [];
4913
4860
  } else {
4914
- currentSegment.push(modifier);
4861
+ unsortedModifiers.push(modifier);
4915
4862
  }
4916
- }
4917
- if (currentSegment.length > 0) {
4918
- currentSegment.sort();
4919
- result.push(...currentSegment);
4920
- }
4921
- return result;
4863
+ });
4864
+ sortedModifiers.push(...unsortedModifiers.sort());
4865
+ return sortedModifiers;
4922
4866
  };
4867
+ return sortModifiers;
4923
4868
  };
4924
4869
  const createConfigUtils = (config2) => ({
4925
4870
  cache: createLruCache(config2.cacheSize),
@@ -4965,10 +4910,10 @@ const mergeClassList = (classList, configUtils) => {
4965
4910
  }
4966
4911
  hasPostfixModifier = false;
4967
4912
  }
4968
- const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
4913
+ const variantModifier = sortModifiers(modifiers).join(":");
4969
4914
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
4970
4915
  const classId = modifierId + classGroupId;
4971
- if (classGroupsInConflict.indexOf(classId) > -1) {
4916
+ if (classGroupsInConflict.includes(classId)) {
4972
4917
  continue;
4973
4918
  }
4974
4919
  classGroupsInConflict.push(classId);
@@ -4981,13 +4926,13 @@ const mergeClassList = (classList, configUtils) => {
4981
4926
  }
4982
4927
  return result;
4983
4928
  };
4984
- const twJoin = (...classLists) => {
4929
+ function twJoin() {
4985
4930
  let index2 = 0;
4986
4931
  let argument;
4987
4932
  let resolvedValue;
4988
4933
  let string2 = "";
4989
- while (index2 < classLists.length) {
4990
- if (argument = classLists[index2++]) {
4934
+ while (index2 < arguments.length) {
4935
+ if (argument = arguments[index2++]) {
4991
4936
  if (resolvedValue = toValue(argument)) {
4992
4937
  string2 && (string2 += " ");
4993
4938
  string2 += resolvedValue;
@@ -4995,7 +4940,7 @@ const twJoin = (...classLists) => {
4995
4940
  }
4996
4941
  }
4997
4942
  return string2;
4998
- };
4943
+ }
4999
4944
  const toValue = (mix) => {
5000
4945
  if (typeof mix === "string") {
5001
4946
  return mix;
@@ -5012,20 +4957,20 @@ const toValue = (mix) => {
5012
4957
  }
5013
4958
  return string2;
5014
4959
  };
5015
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
4960
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
5016
4961
  let configUtils;
5017
4962
  let cacheGet;
5018
4963
  let cacheSet;
5019
- let functionToCall;
5020
- const initTailwindMerge = (classList) => {
4964
+ let functionToCall = initTailwindMerge;
4965
+ function initTailwindMerge(classList) {
5021
4966
  const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
5022
4967
  configUtils = createConfigUtils(config2);
5023
4968
  cacheGet = configUtils.cache.get;
5024
4969
  cacheSet = configUtils.cache.set;
5025
4970
  functionToCall = tailwindMerge;
5026
4971
  return tailwindMerge(classList);
5027
- };
5028
- const tailwindMerge = (classList) => {
4972
+ }
4973
+ function tailwindMerge(classList) {
5029
4974
  const cachedResult = cacheGet(classList);
5030
4975
  if (cachedResult) {
5031
4976
  return cachedResult;
@@ -5033,13 +4978,13 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
5033
4978
  const result = mergeClassList(classList, configUtils);
5034
4979
  cacheSet(classList, result);
5035
4980
  return result;
4981
+ }
4982
+ return function callTailwindMerge() {
4983
+ return functionToCall(twJoin.apply(null, arguments));
5036
4984
  };
5037
- functionToCall = initTailwindMerge;
5038
- return (...args) => functionToCall(twJoin(...args));
5039
- };
5040
- const fallbackThemeArr = [];
4985
+ }
5041
4986
  const fromTheme = (key) => {
5042
- const themeGetter = (theme) => theme[key] || fallbackThemeArr;
4987
+ const themeGetter = (theme) => theme[key] || [];
5043
4988
  themeGetter.isThemeGetter = true;
5044
4989
  return themeGetter;
5045
4990
  };
@@ -7647,7 +7592,7 @@ function createContext2(rootComponentName, defaultContext) {
7647
7592
  }
7648
7593
  return [Provider2, useContext2];
7649
7594
  }
7650
- function createContextScope$2(scopeName, createContextScopeDeps = []) {
7595
+ function createContextScope(scopeName, createContextScopeDeps = []) {
7651
7596
  let defaultContexts = [];
7652
7597
  function createContext3(rootComponentName, defaultContext) {
7653
7598
  const BaseContext = React.createContext(defaultContext);
@@ -7684,9 +7629,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
7684
7629
  };
7685
7630
  };
7686
7631
  createScope.scopeName = scopeName;
7687
- return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
7632
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
7688
7633
  }
7689
- function composeContextScopes$2(...scopes) {
7634
+ function composeContextScopes(...scopes) {
7690
7635
  const baseScope = scopes[0];
7691
7636
  if (scopes.length === 1) return baseScope;
7692
7637
  const createScope = () => {
@@ -7706,18 +7651,18 @@ function composeContextScopes$2(...scopes) {
7706
7651
  createScope.scopeName = baseScope.scopeName;
7707
7652
  return createScope;
7708
7653
  }
7709
- function setRef$1(ref, value) {
7654
+ function setRef$2(ref, value) {
7710
7655
  if (typeof ref === "function") {
7711
7656
  return ref(value);
7712
7657
  } else if (ref !== null && ref !== void 0) {
7713
7658
  ref.current = value;
7714
7659
  }
7715
7660
  }
7716
- function composeRefs$1(...refs) {
7661
+ function composeRefs$2(...refs) {
7717
7662
  return (node) => {
7718
7663
  let hasCleanup = false;
7719
7664
  const cleanups = refs.map((ref) => {
7720
- const cleanup = setRef$1(ref, node);
7665
+ const cleanup = setRef$2(ref, node);
7721
7666
  if (!hasCleanup && typeof cleanup == "function") {
7722
7667
  hasCleanup = true;
7723
7668
  }
@@ -7730,7 +7675,7 @@ function composeRefs$1(...refs) {
7730
7675
  if (typeof cleanup == "function") {
7731
7676
  cleanup();
7732
7677
  } else {
7733
- setRef$1(refs[i2], null);
7678
+ setRef$2(refs[i2], null);
7734
7679
  }
7735
7680
  }
7736
7681
  };
@@ -7738,15 +7683,15 @@ function composeRefs$1(...refs) {
7738
7683
  };
7739
7684
  }
7740
7685
  function useComposedRefs$1(...refs) {
7741
- return React.useCallback(composeRefs$1(...refs), refs);
7686
+ return React.useCallback(composeRefs$2(...refs), refs);
7742
7687
  }
7743
7688
  // @__NO_SIDE_EFFECTS__
7744
- function createSlot$7(ownerName) {
7745
- const SlotClone = /* @__PURE__ */ createSlotClone$7(ownerName);
7689
+ function createSlot$1(ownerName) {
7690
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
7746
7691
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
7747
7692
  const { children, ...slotProps } = props2;
7748
7693
  const childrenArray = React.Children.toArray(children);
7749
- const slottable = childrenArray.find(isSlottable$7);
7694
+ const slottable = childrenArray.find(isSlottable$1);
7750
7695
  if (slottable) {
7751
7696
  const newElement = slottable.props.children;
7752
7697
  const newChildren = childrenArray.map((child) => {
@@ -7765,14 +7710,14 @@ function createSlot$7(ownerName) {
7765
7710
  return Slot2;
7766
7711
  }
7767
7712
  // @__NO_SIDE_EFFECTS__
7768
- function createSlotClone$7(ownerName) {
7713
+ function createSlotClone$1(ownerName) {
7769
7714
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
7770
7715
  const { children, ...slotProps } = props2;
7771
7716
  if (React.isValidElement(children)) {
7772
- const childrenRef = getElementRef$8(children);
7773
- const props22 = mergeProps$7(slotProps, children.props);
7717
+ const childrenRef = getElementRef$2(children);
7718
+ const props22 = mergeProps$1(slotProps, children.props);
7774
7719
  if (children.type !== React.Fragment) {
7775
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
7720
+ props22.ref = forwardedRef ? composeRefs$2(forwardedRef, childrenRef) : childrenRef;
7776
7721
  }
7777
7722
  return React.cloneElement(children, props22);
7778
7723
  }
@@ -7781,20 +7726,20 @@ function createSlotClone$7(ownerName) {
7781
7726
  SlotClone.displayName = `${ownerName}.SlotClone`;
7782
7727
  return SlotClone;
7783
7728
  }
7784
- var SLOTTABLE_IDENTIFIER$7 = Symbol("radix.slottable");
7729
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
7785
7730
  // @__NO_SIDE_EFFECTS__
7786
7731
  function createSlottable(ownerName) {
7787
7732
  const Slottable2 = ({ children }) => {
7788
7733
  return /* @__PURE__ */ jsx(Fragment, { children });
7789
7734
  };
7790
7735
  Slottable2.displayName = `${ownerName}.Slottable`;
7791
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER$7;
7736
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER$1;
7792
7737
  return Slottable2;
7793
7738
  }
7794
- function isSlottable$7(child) {
7795
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$7;
7739
+ function isSlottable$1(child) {
7740
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
7796
7741
  }
7797
- function mergeProps$7(slotProps, childProps) {
7742
+ function mergeProps$1(slotProps, childProps) {
7798
7743
  const overrideProps = { ...childProps };
7799
7744
  for (const propName in childProps) {
7800
7745
  const slotPropValue = slotProps[propName];
@@ -7818,7 +7763,7 @@ function mergeProps$7(slotProps, childProps) {
7818
7763
  }
7819
7764
  return { ...slotProps, ...overrideProps };
7820
7765
  }
7821
- function getElementRef$8(element) {
7766
+ function getElementRef$2(element) {
7822
7767
  var _a2, _b;
7823
7768
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
7824
7769
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -7834,7 +7779,7 @@ function getElementRef$8(element) {
7834
7779
  }
7835
7780
  function createCollection(name) {
7836
7781
  const PROVIDER_NAME2 = name + "CollectionProvider";
7837
- const [createCollectionContext, createCollectionScope2] = createContextScope$2(PROVIDER_NAME2);
7782
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
7838
7783
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
7839
7784
  PROVIDER_NAME2,
7840
7785
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -7847,7 +7792,7 @@ function createCollection(name) {
7847
7792
  };
7848
7793
  CollectionProvider.displayName = PROVIDER_NAME2;
7849
7794
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
7850
- const CollectionSlotImpl = /* @__PURE__ */ createSlot$7(COLLECTION_SLOT_NAME);
7795
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
7851
7796
  const CollectionSlot = React__default.forwardRef(
7852
7797
  (props2, forwardedRef) => {
7853
7798
  const { scope, children } = props2;
@@ -7859,7 +7804,7 @@ function createCollection(name) {
7859
7804
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
7860
7805
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
7861
7806
  const ITEM_DATA_ATTR = "data-radix-collection-item";
7862
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$7(ITEM_SLOT_NAME);
7807
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
7863
7808
  const CollectionItemSlot = React__default.forwardRef(
7864
7809
  (props2, forwardedRef) => {
7865
7810
  const { scope, children, ...itemData } = props2;
@@ -7970,7 +7915,7 @@ function useUncontrolledState$1({
7970
7915
  function isFunction$3(value) {
7971
7916
  return typeof value === "function";
7972
7917
  }
7973
- var NODES$6 = [
7918
+ var NODES = [
7974
7919
  "a",
7975
7920
  "button",
7976
7921
  "div",
@@ -7989,8 +7934,8 @@ var NODES$6 = [
7989
7934
  "svg",
7990
7935
  "ul"
7991
7936
  ];
7992
- var Primitive$6 = NODES$6.reduce((primitive, node) => {
7993
- const Slot2 = /* @__PURE__ */ createSlot$7(`Primitive.${node}`);
7937
+ var Primitive = NODES.reduce((primitive, node) => {
7938
+ const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
7994
7939
  const Node2 = React.forwardRef((props2, forwardedRef) => {
7995
7940
  const { asChild, ...primitiveProps } = props2;
7996
7941
  const Comp = asChild ? Slot2 : node;
@@ -8015,7 +7960,7 @@ var Presence = (props2) => {
8015
7960
  const { present, children } = props2;
8016
7961
  const presence = usePresence(present);
8017
7962
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
8018
- const ref = useComposedRefs$1(presence.ref, getElementRef$7(child));
7963
+ const ref = useComposedRefs$1(presence.ref, getElementRef$1(child));
8019
7964
  const forceMount = typeof children === "function";
8020
7965
  return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
8021
7966
  };
@@ -8114,7 +8059,7 @@ function usePresence(present) {
8114
8059
  function getAnimationName(styles) {
8115
8060
  return (styles == null ? void 0 : styles.animationName) || "none";
8116
8061
  }
8117
- function getElementRef$7(element) {
8062
+ function getElementRef$1(element) {
8118
8063
  var _a2, _b;
8119
8064
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8120
8065
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8138,7 +8083,7 @@ function useId$1(deterministicId) {
8138
8083
  return deterministicId || (id ? `radix-${id}` : "");
8139
8084
  }
8140
8085
  var COLLAPSIBLE_NAME = "Collapsible";
8141
- var [createCollapsibleContext, createCollapsibleScope] = createContextScope$2(COLLAPSIBLE_NAME);
8086
+ var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
8142
8087
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
8143
8088
  var Collapsible$1 = React.forwardRef(
8144
8089
  (props2, forwardedRef) => {
@@ -8165,7 +8110,7 @@ var Collapsible$1 = React.forwardRef(
8165
8110
  open,
8166
8111
  onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
8167
8112
  children: /* @__PURE__ */ jsx(
8168
- Primitive$6.div,
8113
+ Primitive.div,
8169
8114
  {
8170
8115
  "data-state": getState$7(open),
8171
8116
  "data-disabled": disabled ? "" : void 0,
@@ -8184,7 +8129,7 @@ var CollapsibleTrigger$1 = React.forwardRef(
8184
8129
  const { __scopeCollapsible, ...triggerProps } = props2;
8185
8130
  const context = useCollapsibleContext(TRIGGER_NAME$d, __scopeCollapsible);
8186
8131
  return /* @__PURE__ */ jsx(
8187
- Primitive$6.button,
8132
+ Primitive.button,
8188
8133
  {
8189
8134
  type: "button",
8190
8135
  "aria-controls": context.contentId,
@@ -8246,7 +8191,7 @@ var CollapsibleContentImpl = React.forwardRef((props2, forwardedRef) => {
8246
8191
  }
8247
8192
  }, [context.open, present]);
8248
8193
  return /* @__PURE__ */ jsx(
8249
- Primitive$6.div,
8194
+ Primitive.div,
8250
8195
  {
8251
8196
  "data-state": getState$7(context.open),
8252
8197
  "data-disabled": context.disabled ? "" : void 0,
@@ -8277,7 +8222,7 @@ function useDirection(localDir) {
8277
8222
  var ACCORDION_NAME = "Accordion";
8278
8223
  var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
8279
8224
  var [Collection$6, useCollection$6, createCollectionScope$6] = createCollection(ACCORDION_NAME);
8280
- var [createAccordionContext] = createContextScope$2(ACCORDION_NAME, [
8225
+ var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
8281
8226
  createCollectionScope$6,
8282
8227
  createCollapsibleScope
8283
8228
  ]);
@@ -8440,7 +8385,7 @@ var AccordionImpl = React__default.forwardRef(
8440
8385
  direction: dir,
8441
8386
  orientation,
8442
8387
  children: /* @__PURE__ */ jsx(Collection$6.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
8443
- Primitive$6.div,
8388
+ Primitive.div,
8444
8389
  {
8445
8390
  ...accordionProps,
8446
8391
  "data-orientation": orientation,
@@ -8501,7 +8446,7 @@ var AccordionHeader = React__default.forwardRef(
8501
8446
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
8502
8447
  const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
8503
8448
  return /* @__PURE__ */ jsx(
8504
- Primitive$6.h3,
8449
+ Primitive.h3,
8505
8450
  {
8506
8451
  "data-orientation": accordionContext.orientation,
8507
8452
  "data-state": getState$6(itemContext.open),
@@ -8623,24 +8568,55 @@ function AccordionContent({
8623
8568
  }
8624
8569
  );
8625
8570
  }
8626
- var REACT_LAZY_TYPE$6 = Symbol.for("react.lazy");
8627
- var use$6 = React[" use ".trim().toString()];
8628
- function isPromiseLike$6(value) {
8571
+ function setRef$1(ref, value) {
8572
+ if (typeof ref === "function") {
8573
+ return ref(value);
8574
+ } else if (ref !== null && ref !== void 0) {
8575
+ ref.current = value;
8576
+ }
8577
+ }
8578
+ function composeRefs$1(...refs) {
8579
+ return (node) => {
8580
+ let hasCleanup = false;
8581
+ const cleanups = refs.map((ref) => {
8582
+ const cleanup = setRef$1(ref, node);
8583
+ if (!hasCleanup && typeof cleanup == "function") {
8584
+ hasCleanup = true;
8585
+ }
8586
+ return cleanup;
8587
+ });
8588
+ if (hasCleanup) {
8589
+ return () => {
8590
+ for (let i2 = 0; i2 < cleanups.length; i2++) {
8591
+ const cleanup = cleanups[i2];
8592
+ if (typeof cleanup == "function") {
8593
+ cleanup();
8594
+ } else {
8595
+ setRef$1(refs[i2], null);
8596
+ }
8597
+ }
8598
+ };
8599
+ }
8600
+ };
8601
+ }
8602
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
8603
+ var use = React[" use ".trim().toString()];
8604
+ function isPromiseLike(value) {
8629
8605
  return typeof value === "object" && value !== null && "then" in value;
8630
8606
  }
8631
- function isLazyComponent$6(element) {
8632
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$6 && "_payload" in element && isPromiseLike$6(element._payload);
8607
+ function isLazyComponent(element) {
8608
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
8633
8609
  }
8634
8610
  // @__NO_SIDE_EFFECTS__
8635
- function createSlot$6(ownerName) {
8636
- const SlotClone = /* @__PURE__ */ createSlotClone$6(ownerName);
8611
+ function createSlot(ownerName) {
8612
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
8637
8613
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
8638
8614
  let { children, ...slotProps } = props2;
8639
- if (isLazyComponent$6(children) && typeof use$6 === "function") {
8640
- children = use$6(children._payload);
8615
+ if (isLazyComponent(children) && typeof use === "function") {
8616
+ children = use(children._payload);
8641
8617
  }
8642
8618
  const childrenArray = React.Children.toArray(children);
8643
- const slottable = childrenArray.find(isSlottable$6);
8619
+ const slottable = childrenArray.find(isSlottable);
8644
8620
  if (slottable) {
8645
8621
  const newElement = slottable.props.children;
8646
8622
  const newChildren = childrenArray.map((child) => {
@@ -8658,17 +8634,17 @@ function createSlot$6(ownerName) {
8658
8634
  Slot2.displayName = `${ownerName}.Slot`;
8659
8635
  return Slot2;
8660
8636
  }
8661
- var Slot$4 = /* @__PURE__ */ createSlot$6("Slot");
8637
+ var Slot$4 = /* @__PURE__ */ createSlot("Slot");
8662
8638
  // @__NO_SIDE_EFFECTS__
8663
- function createSlotClone$6(ownerName) {
8639
+ function createSlotClone(ownerName) {
8664
8640
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
8665
8641
  let { children, ...slotProps } = props2;
8666
- if (isLazyComponent$6(children) && typeof use$6 === "function") {
8667
- children = use$6(children._payload);
8642
+ if (isLazyComponent(children) && typeof use === "function") {
8643
+ children = use(children._payload);
8668
8644
  }
8669
8645
  if (React.isValidElement(children)) {
8670
- const childrenRef = getElementRef$6(children);
8671
- const props22 = mergeProps$6(slotProps, children.props);
8646
+ const childrenRef = getElementRef(children);
8647
+ const props22 = mergeProps(slotProps, children.props);
8672
8648
  if (children.type !== React.Fragment) {
8673
8649
  props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
8674
8650
  }
@@ -8679,11 +8655,11 @@ function createSlotClone$6(ownerName) {
8679
8655
  SlotClone.displayName = `${ownerName}.SlotClone`;
8680
8656
  return SlotClone;
8681
8657
  }
8682
- var SLOTTABLE_IDENTIFIER$6 = Symbol("radix.slottable");
8683
- function isSlottable$6(child) {
8684
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$6;
8658
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
8659
+ function isSlottable(child) {
8660
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
8685
8661
  }
8686
- function mergeProps$6(slotProps, childProps) {
8662
+ function mergeProps(slotProps, childProps) {
8687
8663
  const overrideProps = { ...childProps };
8688
8664
  for (const propName in childProps) {
8689
8665
  const slotPropValue = slotProps[propName];
@@ -8707,7 +8683,7 @@ function mergeProps$6(slotProps, childProps) {
8707
8683
  }
8708
8684
  return { ...slotProps, ...overrideProps };
8709
8685
  }
8710
- function getElementRef$6(element) {
8686
+ function getElementRef(element) {
8711
8687
  var _a2, _b;
8712
8688
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8713
8689
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8848,7 +8824,7 @@ function useSize(element) {
8848
8824
  return size2;
8849
8825
  }
8850
8826
  var CHECKBOX_NAME = "Checkbox";
8851
- var [createCheckboxContext] = createContextScope$2(CHECKBOX_NAME);
8827
+ var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
8852
8828
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
8853
8829
  function CheckboxProvider(props2) {
8854
8830
  const {
@@ -8929,7 +8905,7 @@ var CheckboxTrigger = React.forwardRef(
8929
8905
  }
8930
8906
  }, [control, setChecked]);
8931
8907
  return /* @__PURE__ */ jsx(
8932
- Primitive$6.button,
8908
+ Primitive.button,
8933
8909
  {
8934
8910
  type: "button",
8935
8911
  role: "checkbox",
@@ -9013,7 +8989,7 @@ var CheckboxIndicator = React.forwardRef(
9013
8989
  {
9014
8990
  present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
9015
8991
  children: /* @__PURE__ */ jsx(
9016
- Primitive$6.span,
8992
+ Primitive.span,
9017
8993
  {
9018
8994
  "data-state": getState$5(context.checked),
9019
8995
  "data-disabled": context.disabled ? "" : void 0,
@@ -9065,7 +9041,7 @@ var CheckboxBubbleInput = React.forwardRef(
9065
9041
  }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
9066
9042
  const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
9067
9043
  return /* @__PURE__ */ jsx(
9068
- Primitive$6.input,
9044
+ Primitive.input,
9069
9045
  {
9070
9046
  type: "checkbox",
9071
9047
  "aria-hidden": true,
@@ -9467,7 +9443,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
9467
9443
  var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
9468
9444
  function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
9469
9445
  if (isPrimitive(object1) || isPrimitive(object2)) {
9470
- return Object.is(object1, object2);
9446
+ return object1 === object2;
9471
9447
  }
9472
9448
  if (isDateObject(object1) && isDateObject(object2)) {
9473
9449
  return object1.getTime() === object2.getTime();
@@ -9489,7 +9465,7 @@ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new W
9489
9465
  }
9490
9466
  if (key !== "ref") {
9491
9467
  const val2 = object2[key];
9492
- if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
9468
+ if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1 !== val2) {
9493
9469
  return false;
9494
9470
  }
9495
9471
  }
@@ -9502,76 +9478,48 @@ function useWatch(props2) {
9502
9478
  const _defaultValue = React__default.useRef(defaultValue);
9503
9479
  const _compute = React__default.useRef(compute);
9504
9480
  const _computeFormValues = React__default.useRef(void 0);
9505
- const _prevControl = React__default.useRef(control);
9506
- const _prevName = React__default.useRef(name);
9507
9481
  _compute.current = compute;
9508
- const [value, updateValue] = React__default.useState(() => {
9509
- const defaultValue2 = control._getWatch(name, _defaultValue.current);
9510
- return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
9511
- });
9512
- const getCurrentOutput = React__default.useCallback((values) => {
9513
- const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9514
- return _compute.current ? _compute.current(formValues) : formValues;
9515
- }, [control._formValues, control._names, name]);
9516
- const refreshValue = React__default.useCallback((values) => {
9517
- if (!disabled) {
9518
- const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9519
- if (_compute.current) {
9520
- const computedFormValues = _compute.current(formValues);
9521
- if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9522
- updateValue(computedFormValues);
9523
- _computeFormValues.current = computedFormValues;
9482
+ const defaultValueMemo = React__default.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
9483
+ const [value, updateValue] = React__default.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
9484
+ useIsomorphicLayoutEffect$4(() => control._subscribe({
9485
+ name,
9486
+ formState: {
9487
+ values: true
9488
+ },
9489
+ exact,
9490
+ callback: (formState) => {
9491
+ if (!disabled) {
9492
+ const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
9493
+ if (_compute.current) {
9494
+ const computedFormValues = _compute.current(formValues);
9495
+ if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9496
+ updateValue(computedFormValues);
9497
+ _computeFormValues.current = computedFormValues;
9498
+ }
9499
+ } else {
9500
+ updateValue(formValues);
9524
9501
  }
9525
- } else {
9526
- updateValue(formValues);
9527
9502
  }
9528
9503
  }
9529
- }, [control._formValues, control._names, disabled, name]);
9530
- useIsomorphicLayoutEffect$4(() => {
9531
- if (_prevControl.current !== control || !deepEqual$1(_prevName.current, name)) {
9532
- _prevControl.current = control;
9533
- _prevName.current = name;
9534
- refreshValue();
9535
- }
9536
- return control._subscribe({
9537
- name,
9538
- formState: {
9539
- values: true
9540
- },
9541
- exact,
9542
- callback: (formState) => {
9543
- refreshValue(formState.values);
9544
- }
9545
- });
9546
- }, [control, exact, name, refreshValue]);
9504
+ }), [control, disabled, name, exact]);
9547
9505
  React__default.useEffect(() => control._removeUnmounted());
9548
- const controlChanged = _prevControl.current !== control;
9549
- const prevName = _prevName.current;
9550
- const computedOutput = React__default.useMemo(() => {
9551
- if (disabled) {
9552
- return null;
9553
- }
9554
- const nameChanged = !controlChanged && !deepEqual$1(prevName, name);
9555
- const shouldReturnImmediate = controlChanged || nameChanged;
9556
- return shouldReturnImmediate ? getCurrentOutput() : null;
9557
- }, [disabled, controlChanged, name, prevName, getCurrentOutput]);
9558
- return computedOutput !== null ? computedOutput : value;
9506
+ return value;
9559
9507
  }
9560
9508
  function useController(props2) {
9561
9509
  const methods = useFormContext();
9562
- const { name, disabled, control = methods.control, shouldUnregister, defaultValue, exact = true } = props2;
9510
+ const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props2;
9563
9511
  const isArrayField = isNameInFieldArray(control._names.array, name);
9564
9512
  const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
9565
9513
  const value = useWatch({
9566
9514
  control,
9567
9515
  name,
9568
9516
  defaultValue: defaultValueMemo,
9569
- exact
9517
+ exact: true
9570
9518
  });
9571
9519
  const formState = useFormState({
9572
9520
  control,
9573
9521
  name,
9574
- exact
9522
+ exact: true
9575
9523
  });
9576
9524
  const _props = React__default.useRef(props2);
9577
9525
  const _previousNameRef = React__default.useRef(void 0);
@@ -9788,11 +9736,10 @@ function isTraversable(value) {
9788
9736
  }
9789
9737
  function markFieldsDirty(data, fields = {}) {
9790
9738
  for (const key in data) {
9791
- const value = data[key];
9792
- if (isTraversable(value)) {
9793
- fields[key] = Array.isArray(value) ? [] : {};
9794
- markFieldsDirty(value, fields[key]);
9795
- } else if (!isUndefined(value)) {
9739
+ if (isTraversable(data[key])) {
9740
+ fields[key] = Array.isArray(data[key]) ? [] : {};
9741
+ markFieldsDirty(data[key], fields[key]);
9742
+ } else if (!isUndefined(data[key])) {
9796
9743
  fields[key] = true;
9797
9744
  }
9798
9745
  }
@@ -9803,16 +9750,14 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
9803
9750
  dirtyFieldsFromValues = markFieldsDirty(formValues);
9804
9751
  }
9805
9752
  for (const key in data) {
9806
- const value = data[key];
9807
- if (isTraversable(value)) {
9753
+ if (isTraversable(data[key])) {
9808
9754
  if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
9809
- dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
9755
+ dirtyFieldsFromValues[key] = markFieldsDirty(data[key], Array.isArray(data[key]) ? [] : {});
9810
9756
  } else {
9811
- getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9757
+ getDirtyFields(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9812
9758
  }
9813
9759
  } else {
9814
- const formValue = formValues[key];
9815
- dirtyFieldsFromValues[key] = !deepEqual$1(value, formValue);
9760
+ dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]);
9816
9761
  }
9817
9762
  }
9818
9763
  return dirtyFieldsFromValues;
@@ -10267,7 +10212,7 @@ function createFormControl(props2 = {}) {
10267
10212
  if (field) {
10268
10213
  const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
10269
10214
  isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set$1(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
10270
- _state.mount && !_state.action && _setValid();
10215
+ _state.mount && _setValid();
10271
10216
  }
10272
10217
  };
10273
10218
  const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
@@ -10878,12 +10823,8 @@ function createFormControl(props2 = {}) {
10878
10823
  watchAll: false,
10879
10824
  focus: ""
10880
10825
  };
10881
- _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
10826
+ _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
10882
10827
  _state.watch = !!_options.shouldUnregister;
10883
- _state.action = false;
10884
- if (!keepStateOptions.keepErrors) {
10885
- _formState.errors = {};
10886
- }
10887
10828
  _subjects.state.next({
10888
10829
  submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
10889
10830
  isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
@@ -11309,15 +11250,11 @@ function useForm(props2 = {}) {
11309
11250
  }
11310
11251
  }, [control, formState.isDirty]);
11311
11252
  React__default.useEffect(() => {
11312
- var _a2;
11313
11253
  if (props2.values && !deepEqual$1(props2.values, _values.current)) {
11314
11254
  control._reset(props2.values, {
11315
11255
  keepFieldsRef: true,
11316
11256
  ...control._options.resetOptions
11317
11257
  });
11318
- if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
11319
- control._setValid();
11320
- }
11321
11258
  _values.current = props2.values;
11322
11259
  updateFormState((state) => ({ ...state }));
11323
11260
  } else {
@@ -11352,7 +11289,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
11352
11289
  var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
11353
11290
  var GROUP_NAME$5 = "RovingFocusGroup";
11354
11291
  var [Collection$5, useCollection$5, createCollectionScope$5] = createCollection(GROUP_NAME$5);
11355
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$2(
11292
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
11356
11293
  GROUP_NAME$5,
11357
11294
  [createCollectionScope$5]
11358
11295
  );
@@ -11419,7 +11356,7 @@ var RovingFocusGroupImpl = React.forwardRef((props2, forwardedRef) => {
11419
11356
  []
11420
11357
  ),
11421
11358
  children: /* @__PURE__ */ jsx(
11422
- Primitive$6.div,
11359
+ Primitive.div,
11423
11360
  {
11424
11361
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
11425
11362
  "data-orientation": orientation,
@@ -11484,7 +11421,7 @@ var RovingFocusGroupItem = React.forwardRef(
11484
11421
  focusable,
11485
11422
  active,
11486
11423
  children: /* @__PURE__ */ jsx(
11487
- Primitive$6.span,
11424
+ Primitive.span,
11488
11425
  {
11489
11426
  tabIndex: isCurrentTabStop ? 0 : -1,
11490
11427
  "data-orientation": context.orientation,
@@ -11558,7 +11495,7 @@ function wrapArray$3(array2, startIndex) {
11558
11495
  var Root$e = RovingFocusGroup;
11559
11496
  var Item$2 = RovingFocusGroupItem;
11560
11497
  var TABS_NAME = "Tabs";
11561
- var [createTabsContext] = createContextScope$2(TABS_NAME, [
11498
+ var [createTabsContext] = createContextScope(TABS_NAME, [
11562
11499
  createRovingFocusGroupScope
11563
11500
  ]);
11564
11501
  var useRovingFocusGroupScope$4 = createRovingFocusGroupScope();
@@ -11593,7 +11530,7 @@ var Tabs$1 = React.forwardRef(
11593
11530
  dir: direction,
11594
11531
  activationMode,
11595
11532
  children: /* @__PURE__ */ jsx(
11596
- Primitive$6.div,
11533
+ Primitive.div,
11597
11534
  {
11598
11535
  dir: direction,
11599
11536
  "data-orientation": orientation,
@@ -11621,7 +11558,7 @@ var TabsList$1 = React.forwardRef(
11621
11558
  dir: context.dir,
11622
11559
  loop,
11623
11560
  children: /* @__PURE__ */ jsx(
11624
- Primitive$6.div,
11561
+ Primitive.div,
11625
11562
  {
11626
11563
  role: "tablist",
11627
11564
  "aria-orientation": context.orientation,
@@ -11651,7 +11588,7 @@ var TabsTrigger$1 = React.forwardRef(
11651
11588
  focusable: !disabled,
11652
11589
  active: isSelected,
11653
11590
  children: /* @__PURE__ */ jsx(
11654
- Primitive$6.button,
11591
+ Primitive.button,
11655
11592
  {
11656
11593
  type: "button",
11657
11594
  role: "tab",
@@ -11700,7 +11637,7 @@ var TabsContent$1 = React.forwardRef(
11700
11637
  return () => cancelAnimationFrame(rAF);
11701
11638
  }, []);
11702
11639
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
11703
- Primitive$6.div,
11640
+ Primitive.div,
11704
11641
  {
11705
11642
  "data-state": isSelected ? "active" : "inactive",
11706
11643
  "data-orientation": context.orientation,
@@ -11868,135 +11805,6 @@ function CardFooter({ className, ...props2 }) {
11868
11805
  }
11869
11806
  );
11870
11807
  }
11871
- var REACT_LAZY_TYPE$5 = Symbol.for("react.lazy");
11872
- var use$5 = React[" use ".trim().toString()];
11873
- function isPromiseLike$5(value) {
11874
- return typeof value === "object" && value !== null && "then" in value;
11875
- }
11876
- function isLazyComponent$5(element) {
11877
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$5 && "_payload" in element && isPromiseLike$5(element._payload);
11878
- }
11879
- // @__NO_SIDE_EFFECTS__
11880
- function createSlot$5(ownerName) {
11881
- const SlotClone = /* @__PURE__ */ createSlotClone$5(ownerName);
11882
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
11883
- let { children, ...slotProps } = props2;
11884
- if (isLazyComponent$5(children) && typeof use$5 === "function") {
11885
- children = use$5(children._payload);
11886
- }
11887
- const childrenArray = React.Children.toArray(children);
11888
- const slottable = childrenArray.find(isSlottable$5);
11889
- if (slottable) {
11890
- const newElement = slottable.props.children;
11891
- const newChildren = childrenArray.map((child) => {
11892
- if (child === slottable) {
11893
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
11894
- return React.isValidElement(newElement) ? newElement.props.children : null;
11895
- } else {
11896
- return child;
11897
- }
11898
- });
11899
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
11900
- }
11901
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
11902
- });
11903
- Slot2.displayName = `${ownerName}.Slot`;
11904
- return Slot2;
11905
- }
11906
- // @__NO_SIDE_EFFECTS__
11907
- function createSlotClone$5(ownerName) {
11908
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
11909
- let { children, ...slotProps } = props2;
11910
- if (isLazyComponent$5(children) && typeof use$5 === "function") {
11911
- children = use$5(children._payload);
11912
- }
11913
- if (React.isValidElement(children)) {
11914
- const childrenRef = getElementRef$5(children);
11915
- const props22 = mergeProps$5(slotProps, children.props);
11916
- if (children.type !== React.Fragment) {
11917
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
11918
- }
11919
- return React.cloneElement(children, props22);
11920
- }
11921
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
11922
- });
11923
- SlotClone.displayName = `${ownerName}.SlotClone`;
11924
- return SlotClone;
11925
- }
11926
- var SLOTTABLE_IDENTIFIER$5 = Symbol("radix.slottable");
11927
- function isSlottable$5(child) {
11928
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$5;
11929
- }
11930
- function mergeProps$5(slotProps, childProps) {
11931
- const overrideProps = { ...childProps };
11932
- for (const propName in childProps) {
11933
- const slotPropValue = slotProps[propName];
11934
- const childPropValue = childProps[propName];
11935
- const isHandler = /^on[A-Z]/.test(propName);
11936
- if (isHandler) {
11937
- if (slotPropValue && childPropValue) {
11938
- overrideProps[propName] = (...args) => {
11939
- const result = childPropValue(...args);
11940
- slotPropValue(...args);
11941
- return result;
11942
- };
11943
- } else if (slotPropValue) {
11944
- overrideProps[propName] = slotPropValue;
11945
- }
11946
- } else if (propName === "style") {
11947
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
11948
- } else if (propName === "className") {
11949
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
11950
- }
11951
- }
11952
- return { ...slotProps, ...overrideProps };
11953
- }
11954
- function getElementRef$5(element) {
11955
- var _a2, _b;
11956
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
11957
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11958
- if (mayWarn) {
11959
- return element.ref;
11960
- }
11961
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
11962
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11963
- if (mayWarn) {
11964
- return element.props.ref;
11965
- }
11966
- return element.props.ref || element.ref;
11967
- }
11968
- var NODES$5 = [
11969
- "a",
11970
- "button",
11971
- "div",
11972
- "form",
11973
- "h2",
11974
- "h3",
11975
- "img",
11976
- "input",
11977
- "label",
11978
- "li",
11979
- "nav",
11980
- "ol",
11981
- "p",
11982
- "select",
11983
- "span",
11984
- "svg",
11985
- "ul"
11986
- ];
11987
- var Primitive$5 = NODES$5.reduce((primitive, node) => {
11988
- const Slot2 = /* @__PURE__ */ createSlot$5(`Primitive.${node}`);
11989
- const Node2 = React.forwardRef((props2, forwardedRef) => {
11990
- const { asChild, ...primitiveProps } = props2;
11991
- const Comp = asChild ? Slot2 : node;
11992
- if (typeof window !== "undefined") {
11993
- window[Symbol.for("radix-ui")] = true;
11994
- }
11995
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
11996
- });
11997
- Node2.displayName = `Primitive.${node}`;
11998
- return { ...primitive, [node]: Node2 };
11999
- }, {});
12000
11808
  var NAME$5 = "Separator";
12001
11809
  var DEFAULT_ORIENTATION = "horizontal";
12002
11810
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -12006,7 +11814,7 @@ var Separator$3 = React.forwardRef((props2, forwardedRef) => {
12006
11814
  const ariaOrientation = orientation === "vertical" ? orientation : void 0;
12007
11815
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
12008
11816
  return /* @__PURE__ */ jsx(
12009
- Primitive$5.div,
11817
+ Primitive.div,
12010
11818
  {
12011
11819
  "data-orientation": orientation,
12012
11820
  ...semanticProps,
@@ -12447,6 +12255,212 @@ const r$1 = (t2, r2, o2) => {
12447
12255
  function n$1(e2) {
12448
12256
  return e2.replace(/\]|\[/g, "");
12449
12257
  }
12258
+ function $constructor$1(name, initializer2, params) {
12259
+ function init(inst, def) {
12260
+ var _a2;
12261
+ Object.defineProperty(inst, "_zod", {
12262
+ value: inst._zod ?? {},
12263
+ enumerable: false
12264
+ });
12265
+ (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set());
12266
+ inst._zod.traits.add(name);
12267
+ initializer2(inst, def);
12268
+ for (const k2 in _2.prototype) {
12269
+ if (!(k2 in inst))
12270
+ Object.defineProperty(inst, k2, { value: _2.prototype[k2].bind(inst) });
12271
+ }
12272
+ inst._zod.constr = _2;
12273
+ inst._zod.def = def;
12274
+ }
12275
+ const Parent = (params == null ? void 0 : params.Parent) ?? Object;
12276
+ class Definition extends Parent {
12277
+ }
12278
+ Object.defineProperty(Definition, "name", { value: name });
12279
+ function _2(def) {
12280
+ var _a2;
12281
+ const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
12282
+ init(inst, def);
12283
+ (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
12284
+ for (const fn of inst._zod.deferred) {
12285
+ fn();
12286
+ }
12287
+ return inst;
12288
+ }
12289
+ Object.defineProperty(_2, "init", { value: init });
12290
+ Object.defineProperty(_2, Symbol.hasInstance, {
12291
+ value: (inst) => {
12292
+ var _a2, _b;
12293
+ if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
12294
+ return true;
12295
+ return (_b = (_a2 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a2.traits) == null ? void 0 : _b.has(name);
12296
+ }
12297
+ });
12298
+ Object.defineProperty(_2, "name", { value: name });
12299
+ return _2;
12300
+ }
12301
+ let $ZodAsyncError$1 = class $ZodAsyncError extends Error {
12302
+ constructor() {
12303
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
12304
+ }
12305
+ };
12306
+ const globalConfig$1 = {};
12307
+ function config$1(newConfig) {
12308
+ return globalConfig$1;
12309
+ }
12310
+ function jsonStringifyReplacer$1(_2, value) {
12311
+ if (typeof value === "bigint")
12312
+ return value.toString();
12313
+ return value;
12314
+ }
12315
+ const captureStackTrace$1 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
12316
+ };
12317
+ function unwrapMessage$1(message2) {
12318
+ return typeof message2 === "string" ? message2 : message2 == null ? void 0 : message2.message;
12319
+ }
12320
+ function finalizeIssue$1(iss, ctx, config2) {
12321
+ var _a2, _b, _c, _d, _e2, _f;
12322
+ const full = { ...iss, path: iss.path ?? [] };
12323
+ if (!iss.message) {
12324
+ const message2 = unwrapMessage$1((_c = (_b = (_a2 = iss.inst) == null ? void 0 : _a2._zod.def) == null ? void 0 : _b.error) == null ? void 0 : _c.call(_b, iss)) ?? unwrapMessage$1((_d = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d.call(ctx, iss)) ?? unwrapMessage$1((_e2 = config2.customError) == null ? void 0 : _e2.call(config2, iss)) ?? unwrapMessage$1((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
12325
+ full.message = message2;
12326
+ }
12327
+ delete full.inst;
12328
+ delete full.continue;
12329
+ if (!(ctx == null ? void 0 : ctx.reportInput)) {
12330
+ delete full.input;
12331
+ }
12332
+ return full;
12333
+ }
12334
+ const initializer$2 = (inst, def) => {
12335
+ inst.name = "$ZodError";
12336
+ Object.defineProperty(inst, "_zod", {
12337
+ value: inst._zod,
12338
+ enumerable: false
12339
+ });
12340
+ Object.defineProperty(inst, "issues", {
12341
+ value: def,
12342
+ enumerable: false
12343
+ });
12344
+ inst.message = JSON.stringify(def, jsonStringifyReplacer$1, 2);
12345
+ Object.defineProperty(inst, "toString", {
12346
+ value: () => inst.message,
12347
+ enumerable: false
12348
+ });
12349
+ };
12350
+ const $ZodError$1 = $constructor$1("$ZodError", initializer$2);
12351
+ const $ZodRealError$1 = $constructor$1("$ZodError", initializer$2, { Parent: Error });
12352
+ const _parse$1 = (_Err) => (schema, value, _ctx, _params) => {
12353
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
12354
+ const result = schema._zod.run({ value, issues: [] }, ctx);
12355
+ if (result instanceof Promise) {
12356
+ throw new $ZodAsyncError$1();
12357
+ }
12358
+ if (result.issues.length) {
12359
+ const e2 = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue$1(iss, ctx, config$1())));
12360
+ captureStackTrace$1(e2, _params == null ? void 0 : _params.callee);
12361
+ throw e2;
12362
+ }
12363
+ return result.value;
12364
+ };
12365
+ const parse$2 = /* @__PURE__ */ _parse$1($ZodRealError$1);
12366
+ const _parseAsync$1 = (_Err) => async (schema, value, _ctx, params) => {
12367
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
12368
+ let result = schema._zod.run({ value, issues: [] }, ctx);
12369
+ if (result instanceof Promise)
12370
+ result = await result;
12371
+ if (result.issues.length) {
12372
+ const e2 = new ((params == null ? void 0 : params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue$1(iss, ctx, config$1())));
12373
+ captureStackTrace$1(e2, params == null ? void 0 : params.callee);
12374
+ throw e2;
12375
+ }
12376
+ return result.value;
12377
+ };
12378
+ const parseAsync$1 = /* @__PURE__ */ _parseAsync$1($ZodRealError$1);
12379
+ function t$1(r2, e2) {
12380
+ try {
12381
+ var o2 = r2();
12382
+ } catch (r3) {
12383
+ return e2(r3);
12384
+ }
12385
+ return o2 && o2.then ? o2.then(void 0, e2) : o2;
12386
+ }
12387
+ function s$1(r2, e2) {
12388
+ for (var n2 = {}; r2.length; ) {
12389
+ var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
12390
+ if (!n2[a2]) if ("unionErrors" in t2) {
12391
+ var u2 = t2.unionErrors[0].errors[0];
12392
+ n2[a2] = { message: u2.message, type: u2.code };
12393
+ } else n2[a2] = { message: i2, type: s2 };
12394
+ if ("unionErrors" in t2 && t2.unionErrors.forEach(function(e3) {
12395
+ return e3.errors.forEach(function(e4) {
12396
+ return r2.push(e4);
12397
+ });
12398
+ }), e2) {
12399
+ var c2 = n2[a2].types, f = c2 && c2[t2.code];
12400
+ n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
12401
+ }
12402
+ r2.shift();
12403
+ }
12404
+ return n2;
12405
+ }
12406
+ function i$1(r2, e2) {
12407
+ for (var n2 = {}; r2.length; ) {
12408
+ var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
12409
+ if (!n2[a2]) if ("invalid_union" === t2.code && t2.errors.length > 0) {
12410
+ var u2 = t2.errors[0][0];
12411
+ n2[a2] = { message: u2.message, type: u2.code };
12412
+ } else n2[a2] = { message: i2, type: s2 };
12413
+ if ("invalid_union" === t2.code && t2.errors.forEach(function(e3) {
12414
+ return e3.forEach(function(e4) {
12415
+ return r2.push(e4);
12416
+ });
12417
+ }), e2) {
12418
+ var c2 = n2[a2].types, f = c2 && c2[t2.code];
12419
+ n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
12420
+ }
12421
+ r2.shift();
12422
+ }
12423
+ return n2;
12424
+ }
12425
+ function a$2(o2, a2, u2) {
12426
+ if (void 0 === u2 && (u2 = {}), (function(r2) {
12427
+ return "_def" in r2 && "object" == typeof r2._def && "typeName" in r2._def;
12428
+ })(o2)) return function(n2, i2, c2) {
12429
+ try {
12430
+ return Promise.resolve(t$1(function() {
12431
+ return Promise.resolve(o2["sync" === u2.mode ? "parse" : "parseAsync"](n2, a2)).then(function(e2) {
12432
+ return c2.shouldUseNativeValidation && o$1({}, c2), { errors: {}, values: u2.raw ? Object.assign({}, n2) : e2 };
12433
+ });
12434
+ }, function(r2) {
12435
+ if ((function(r3) {
12436
+ return Array.isArray(null == r3 ? void 0 : r3.issues);
12437
+ })(r2)) return { values: {}, errors: s$2(s$1(r2.errors, !c2.shouldUseNativeValidation && "all" === c2.criteriaMode), c2) };
12438
+ throw r2;
12439
+ }));
12440
+ } catch (r2) {
12441
+ return Promise.reject(r2);
12442
+ }
12443
+ };
12444
+ if ((function(r2) {
12445
+ return "_zod" in r2 && "object" == typeof r2._zod;
12446
+ })(o2)) return function(s2, c2, f) {
12447
+ try {
12448
+ return Promise.resolve(t$1(function() {
12449
+ return Promise.resolve(("sync" === u2.mode ? parse$2 : parseAsync$1)(o2, s2, a2)).then(function(e2) {
12450
+ return f.shouldUseNativeValidation && o$1({}, f), { errors: {}, values: u2.raw ? Object.assign({}, s2) : e2 };
12451
+ });
12452
+ }, function(r2) {
12453
+ if ((function(r3) {
12454
+ return r3 instanceof $ZodError$1;
12455
+ })(r2)) return { values: {}, errors: s$2(i$1(r2.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f) };
12456
+ throw r2;
12457
+ }));
12458
+ } catch (r2) {
12459
+ return Promise.reject(r2);
12460
+ }
12461
+ };
12462
+ throw new Error("Invalid input: not a Zod schema");
12463
+ }
12450
12464
  function $constructor(name, initializer2, params) {
12451
12465
  function init(inst, def) {
12452
12466
  if (!inst._zod) {
@@ -12499,7 +12513,7 @@ function $constructor(name, initializer2, params) {
12499
12513
  Object.defineProperty(_2, "name", { value: name });
12500
12514
  return _2;
12501
12515
  }
12502
- class $ZodAsyncError extends Error {
12516
+ class $ZodAsyncError2 extends Error {
12503
12517
  constructor() {
12504
12518
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
12505
12519
  }
@@ -12958,7 +12972,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
12958
12972
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
12959
12973
  const result = schema._zod.run({ value, issues: [] }, ctx);
12960
12974
  if (result instanceof Promise) {
12961
- throw new $ZodAsyncError();
12975
+ throw new $ZodAsyncError2();
12962
12976
  }
12963
12977
  if (result.issues.length) {
12964
12978
  const e2 = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
@@ -12967,7 +12981,6 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
12967
12981
  }
12968
12982
  return result.value;
12969
12983
  };
12970
- const parse$2 = /* @__PURE__ */ _parse($ZodRealError);
12971
12984
  const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
12972
12985
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
12973
12986
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -12980,12 +12993,11 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
12980
12993
  }
12981
12994
  return result.value;
12982
12995
  };
12983
- const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
12984
12996
  const _safeParse = (_Err) => (schema, value, _ctx) => {
12985
12997
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
12986
12998
  const result = schema._zod.run({ value, issues: [] }, ctx);
12987
12999
  if (result instanceof Promise) {
12988
- throw new $ZodAsyncError();
13000
+ throw new $ZodAsyncError2();
12989
13001
  }
12990
13002
  return result.issues.length ? {
12991
13003
  success: false,
@@ -13547,7 +13559,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13547
13559
  const currLen = payload.issues.length;
13548
13560
  const _2 = ch._zod.check(payload);
13549
13561
  if (_2 instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
13550
- throw new $ZodAsyncError();
13562
+ throw new $ZodAsyncError2();
13551
13563
  }
13552
13564
  if (asyncResult || _2 instanceof Promise) {
13553
13565
  asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
@@ -13581,7 +13593,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13581
13593
  const checkResult = runChecks(payload, checks, ctx);
13582
13594
  if (checkResult instanceof Promise) {
13583
13595
  if (ctx.async === false)
13584
- throw new $ZodAsyncError();
13596
+ throw new $ZodAsyncError2();
13585
13597
  return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
13586
13598
  }
13587
13599
  return inst._zod.parse(checkResult, ctx);
@@ -13602,7 +13614,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13602
13614
  const result = inst._zod.parse(payload, ctx);
13603
13615
  if (result instanceof Promise) {
13604
13616
  if (ctx.async === false)
13605
- throw new $ZodAsyncError();
13617
+ throw new $ZodAsyncError2();
13606
13618
  return result.then((result2) => runChecks(result2, checks, ctx));
13607
13619
  }
13608
13620
  return runChecks(result, checks, ctx);
@@ -14442,7 +14454,7 @@ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def)
14442
14454
  });
14443
14455
  }
14444
14456
  if (_out instanceof Promise) {
14445
- throw new $ZodAsyncError();
14457
+ throw new $ZodAsyncError2();
14446
14458
  }
14447
14459
  payload.value = _out;
14448
14460
  return payload;
@@ -15204,91 +15216,6 @@ function _check(fn, params) {
15204
15216
  ch._zod.check = fn;
15205
15217
  return ch;
15206
15218
  }
15207
- function t$1(r2, e2) {
15208
- try {
15209
- var o2 = r2();
15210
- } catch (r3) {
15211
- return e2(r3);
15212
- }
15213
- return o2 && o2.then ? o2.then(void 0, e2) : o2;
15214
- }
15215
- function s$1(r2, e2) {
15216
- for (var n2 = {}; r2.length; ) {
15217
- var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
15218
- if (!n2[a2]) if ("unionErrors" in t2) {
15219
- var u2 = t2.unionErrors[0].errors[0];
15220
- n2[a2] = { message: u2.message, type: u2.code };
15221
- } else n2[a2] = { message: i2, type: s2 };
15222
- if ("unionErrors" in t2 && t2.unionErrors.forEach(function(e3) {
15223
- return e3.errors.forEach(function(e4) {
15224
- return r2.push(e4);
15225
- });
15226
- }), e2) {
15227
- var c2 = n2[a2].types, f = c2 && c2[t2.code];
15228
- n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
15229
- }
15230
- r2.shift();
15231
- }
15232
- return n2;
15233
- }
15234
- function i$1(r2, e2) {
15235
- for (var n2 = {}; r2.length; ) {
15236
- var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
15237
- if (!n2[a2]) if ("invalid_union" === t2.code && t2.errors.length > 0) {
15238
- var u2 = t2.errors[0][0];
15239
- n2[a2] = { message: u2.message, type: u2.code };
15240
- } else n2[a2] = { message: i2, type: s2 };
15241
- if ("invalid_union" === t2.code && t2.errors.forEach(function(e3) {
15242
- return e3.forEach(function(e4) {
15243
- return r2.push(e4);
15244
- });
15245
- }), e2) {
15246
- var c2 = n2[a2].types, f = c2 && c2[t2.code];
15247
- n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
15248
- }
15249
- r2.shift();
15250
- }
15251
- return n2;
15252
- }
15253
- function a$2(o2, a2, u2) {
15254
- if (void 0 === u2 && (u2 = {}), (function(r2) {
15255
- return "_def" in r2 && "object" == typeof r2._def && "typeName" in r2._def;
15256
- })(o2)) return function(n2, i2, c2) {
15257
- try {
15258
- return Promise.resolve(t$1(function() {
15259
- return Promise.resolve(o2["sync" === u2.mode ? "parse" : "parseAsync"](n2, a2)).then(function(e2) {
15260
- return c2.shouldUseNativeValidation && o$1({}, c2), { errors: {}, values: u2.raw ? Object.assign({}, n2) : e2 };
15261
- });
15262
- }, function(r2) {
15263
- if ((function(r3) {
15264
- return Array.isArray(null == r3 ? void 0 : r3.issues);
15265
- })(r2)) return { values: {}, errors: s$2(s$1(r2.errors, !c2.shouldUseNativeValidation && "all" === c2.criteriaMode), c2) };
15266
- throw r2;
15267
- }));
15268
- } catch (r2) {
15269
- return Promise.reject(r2);
15270
- }
15271
- };
15272
- if ((function(r2) {
15273
- return "_zod" in r2 && "object" == typeof r2._zod;
15274
- })(o2)) return function(s2, c2, f) {
15275
- try {
15276
- return Promise.resolve(t$1(function() {
15277
- return Promise.resolve(("sync" === u2.mode ? parse$2 : parseAsync$1)(o2, s2, a2)).then(function(e2) {
15278
- return f.shouldUseNativeValidation && o$1({}, f), { errors: {}, values: u2.raw ? Object.assign({}, s2) : e2 };
15279
- });
15280
- }, function(r2) {
15281
- if ((function(r3) {
15282
- return r3 instanceof $ZodError;
15283
- })(r2)) return { values: {}, errors: s$2(i$1(r2.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f) };
15284
- throw r2;
15285
- }));
15286
- } catch (r2) {
15287
- return Promise.reject(r2);
15288
- }
15289
- };
15290
- throw new Error("Invalid input: not a Zod schema");
15291
- }
15292
15219
  const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
15293
15220
  $ZodISODateTime.init(inst, def);
15294
15221
  ZodStringFormat.init(inst, def);
@@ -16264,139 +16191,10 @@ function useFormBuilder(options) {
16264
16191
  };
16265
16192
  }
16266
16193
  const FormBuilderContext = createContext(null);
16267
- var REACT_LAZY_TYPE$4 = Symbol.for("react.lazy");
16268
- var use$4 = React[" use ".trim().toString()];
16269
- function isPromiseLike$4(value) {
16270
- return typeof value === "object" && value !== null && "then" in value;
16271
- }
16272
- function isLazyComponent$4(element) {
16273
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$4 && "_payload" in element && isPromiseLike$4(element._payload);
16274
- }
16275
- // @__NO_SIDE_EFFECTS__
16276
- function createSlot$4(ownerName) {
16277
- const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
16278
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
16279
- let { children, ...slotProps } = props2;
16280
- if (isLazyComponent$4(children) && typeof use$4 === "function") {
16281
- children = use$4(children._payload);
16282
- }
16283
- const childrenArray = React.Children.toArray(children);
16284
- const slottable = childrenArray.find(isSlottable$4);
16285
- if (slottable) {
16286
- const newElement = slottable.props.children;
16287
- const newChildren = childrenArray.map((child) => {
16288
- if (child === slottable) {
16289
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
16290
- return React.isValidElement(newElement) ? newElement.props.children : null;
16291
- } else {
16292
- return child;
16293
- }
16294
- });
16295
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
16296
- }
16297
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
16298
- });
16299
- Slot2.displayName = `${ownerName}.Slot`;
16300
- return Slot2;
16301
- }
16302
- // @__NO_SIDE_EFFECTS__
16303
- function createSlotClone$4(ownerName) {
16304
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
16305
- let { children, ...slotProps } = props2;
16306
- if (isLazyComponent$4(children) && typeof use$4 === "function") {
16307
- children = use$4(children._payload);
16308
- }
16309
- if (React.isValidElement(children)) {
16310
- const childrenRef = getElementRef$4(children);
16311
- const props22 = mergeProps$4(slotProps, children.props);
16312
- if (children.type !== React.Fragment) {
16313
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
16314
- }
16315
- return React.cloneElement(children, props22);
16316
- }
16317
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
16318
- });
16319
- SlotClone.displayName = `${ownerName}.SlotClone`;
16320
- return SlotClone;
16321
- }
16322
- var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
16323
- function isSlottable$4(child) {
16324
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
16325
- }
16326
- function mergeProps$4(slotProps, childProps) {
16327
- const overrideProps = { ...childProps };
16328
- for (const propName in childProps) {
16329
- const slotPropValue = slotProps[propName];
16330
- const childPropValue = childProps[propName];
16331
- const isHandler = /^on[A-Z]/.test(propName);
16332
- if (isHandler) {
16333
- if (slotPropValue && childPropValue) {
16334
- overrideProps[propName] = (...args) => {
16335
- const result = childPropValue(...args);
16336
- slotPropValue(...args);
16337
- return result;
16338
- };
16339
- } else if (slotPropValue) {
16340
- overrideProps[propName] = slotPropValue;
16341
- }
16342
- } else if (propName === "style") {
16343
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
16344
- } else if (propName === "className") {
16345
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
16346
- }
16347
- }
16348
- return { ...slotProps, ...overrideProps };
16349
- }
16350
- function getElementRef$4(element) {
16351
- var _a2, _b;
16352
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
16353
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
16354
- if (mayWarn) {
16355
- return element.ref;
16356
- }
16357
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
16358
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
16359
- if (mayWarn) {
16360
- return element.props.ref;
16361
- }
16362
- return element.props.ref || element.ref;
16363
- }
16364
- var NODES$4 = [
16365
- "a",
16366
- "button",
16367
- "div",
16368
- "form",
16369
- "h2",
16370
- "h3",
16371
- "img",
16372
- "input",
16373
- "label",
16374
- "li",
16375
- "nav",
16376
- "ol",
16377
- "p",
16378
- "select",
16379
- "span",
16380
- "svg",
16381
- "ul"
16382
- ];
16383
- var Primitive$4 = NODES$4.reduce((primitive, node) => {
16384
- const Slot2 = /* @__PURE__ */ createSlot$4(`Primitive.${node}`);
16385
- const Node2 = React.forwardRef((props2, forwardedRef) => {
16386
- const { asChild, ...primitiveProps } = props2;
16387
- const Comp = asChild ? Slot2 : node;
16388
- if (typeof window !== "undefined") {
16389
- window[Symbol.for("radix-ui")] = true;
16390
- }
16391
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
16392
- });
16393
- Node2.displayName = `Primitive.${node}`;
16394
- return { ...primitive, [node]: Node2 };
16395
- }, {});
16396
16194
  var NAME$4 = "Label";
16397
16195
  var Label$3 = React.forwardRef((props2, forwardedRef) => {
16398
16196
  return /* @__PURE__ */ jsx(
16399
- Primitive$4.label,
16197
+ Primitive.label,
16400
16198
  {
16401
16199
  ...props2,
16402
16200
  ref: forwardedRef,
@@ -18979,32 +18777,28 @@ var useElementIds = "useId" in React__default ? function useElementIds2(_ref) {
18979
18777
  if (!id) {
18980
18778
  id = reactId;
18981
18779
  }
18982
- var elementIds = useMemo(function() {
18983
- return {
18984
- labelId: labelId || id + "-label",
18985
- menuId: menuId || id + "-menu",
18986
- getItemId: getItemId || function(index2) {
18987
- return id + "-item-" + index2;
18988
- },
18989
- toggleButtonId: toggleButtonId || id + "-toggle-button",
18990
- inputId: inputId || id + "-input"
18991
- };
18992
- }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
18993
- return elementIds;
18780
+ var elementIdsRef = useRef({
18781
+ labelId: labelId || id + "-label",
18782
+ menuId: menuId || id + "-menu",
18783
+ getItemId: getItemId || function(index2) {
18784
+ return id + "-item-" + index2;
18785
+ },
18786
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
18787
+ inputId: inputId || id + "-input"
18788
+ });
18789
+ return elementIdsRef.current;
18994
18790
  } : function useElementIds3(_ref2) {
18995
18791
  var _ref2$id = _ref2.id, id = _ref2$id === void 0 ? "downshift-" + generateId() : _ref2$id, labelId = _ref2.labelId, menuId = _ref2.menuId, getItemId = _ref2.getItemId, toggleButtonId = _ref2.toggleButtonId, inputId = _ref2.inputId;
18996
- var elementIds = useMemo(function() {
18997
- return {
18998
- labelId: labelId || id + "-label",
18999
- menuId: menuId || id + "-menu",
19000
- getItemId: getItemId || function(index2) {
19001
- return id + "-item-" + index2;
19002
- },
19003
- toggleButtonId: toggleButtonId || id + "-toggle-button",
19004
- inputId: inputId || id + "-input"
19005
- };
19006
- }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
19007
- return elementIds;
18792
+ var elementIdsRef = useRef({
18793
+ labelId: labelId || id + "-label",
18794
+ menuId: menuId || id + "-menu",
18795
+ getItemId: getItemId || function(index2) {
18796
+ return id + "-item-" + index2;
18797
+ },
18798
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
18799
+ inputId: inputId || id + "-input"
18800
+ });
18801
+ return elementIdsRef.current;
19008
18802
  };
19009
18803
  function getItemAndIndex(itemProp, indexProp, items, errorMessage) {
19010
18804
  var item, index2;
@@ -19141,22 +18935,20 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
19141
18935
  isTouchMove: false,
19142
18936
  isTouchEnd: false
19143
18937
  });
19144
- function getDownshiftElements() {
19145
- return downshiftElementsRefs.map(function(ref) {
19146
- return ref.current;
19147
- });
19148
- }
19149
18938
  useEffect(function() {
19150
18939
  if (!environment) {
19151
18940
  return noop$3;
19152
18941
  }
18942
+ var downshiftElements = downshiftElementsRefs.map(function(ref) {
18943
+ return ref.current;
18944
+ });
19153
18945
  function onMouseDown() {
19154
18946
  mouseAndTouchTrackersRef.current.isTouchEnd = false;
19155
18947
  mouseAndTouchTrackersRef.current.isMouseDown = true;
19156
18948
  }
19157
18949
  function onMouseUp(event) {
19158
18950
  mouseAndTouchTrackersRef.current.isMouseDown = false;
19159
- if (!targetWithinDownshift(event.target, getDownshiftElements(), environment)) {
18951
+ if (!targetWithinDownshift(event.target, downshiftElements, environment)) {
19160
18952
  handleBlur();
19161
18953
  }
19162
18954
  }
@@ -19169,7 +18961,7 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
19169
18961
  }
19170
18962
  function onTouchEnd(event) {
19171
18963
  mouseAndTouchTrackersRef.current.isTouchEnd = true;
19172
- if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, getDownshiftElements(), environment, false)) {
18964
+ if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElements, environment, false)) {
19173
18965
  handleBlur();
19174
18966
  }
19175
18967
  }
@@ -19708,13 +19500,9 @@ function useCombobox(userProps) {
19708
19500
  selectItem: false
19709
19501
  });
19710
19502
  }
19711
- }, [dispatch, latest]), useMemo(
19712
- function() {
19713
- return [menuRef, toggleButtonRef, inputRef];
19714
- },
19715
- // dependencies can be left empty because refs are getting mutated
19716
- []
19717
- ));
19503
+ }, [dispatch, latest]), useMemo(function() {
19504
+ return [menuRef, toggleButtonRef, inputRef];
19505
+ }, [menuRef.current, toggleButtonRef.current, inputRef.current]));
19718
19506
  var setGetterPropCallInfo = useGetterPropsCalledChecker("getInputProps", "getMenuProps");
19719
19507
  useEffect(function() {
19720
19508
  if (!isOpen) {
@@ -20213,7 +20001,7 @@ var DismissableLayer = React.forwardRef(
20213
20001
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
20214
20002
  }, []);
20215
20003
  return /* @__PURE__ */ jsx(
20216
- Primitive$6.div,
20004
+ Primitive.div,
20217
20005
  {
20218
20006
  ...layerProps,
20219
20007
  ref: composedRefs,
@@ -20246,7 +20034,7 @@ var DismissableLayerBranch = React.forwardRef((props2, forwardedRef) => {
20246
20034
  };
20247
20035
  }
20248
20036
  }, [context.branches]);
20249
- return /* @__PURE__ */ jsx(Primitive$6.div, { ...props2, ref: composedRefs });
20037
+ return /* @__PURE__ */ jsx(Primitive.div, { ...props2, ref: composedRefs });
20250
20038
  });
20251
20039
  DismissableLayerBranch.displayName = BRANCH_NAME;
20252
20040
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -20468,7 +20256,7 @@ var FocusScope = React.forwardRef((props2, forwardedRef) => {
20468
20256
  },
20469
20257
  [loop, trapped, focusScope.paused]
20470
20258
  );
20471
- return /* @__PURE__ */ jsx(Primitive$6.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
20259
+ return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
20472
20260
  });
20473
20261
  FocusScope.displayName = FOCUS_SCOPE_NAME;
20474
20262
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -22432,7 +22220,7 @@ var NAME$3 = "Arrow";
22432
22220
  var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
22433
22221
  const { children, width = 10, height = 5, ...arrowProps } = props2;
22434
22222
  return /* @__PURE__ */ jsx(
22435
- Primitive$6.svg,
22223
+ Primitive.svg,
22436
22224
  {
22437
22225
  ...arrowProps,
22438
22226
  ref: forwardedRef,
@@ -22447,7 +22235,7 @@ var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
22447
22235
  Arrow$1.displayName = NAME$3;
22448
22236
  var Root$b = Arrow$1;
22449
22237
  var POPPER_NAME = "Popper";
22450
- var [createPopperContext, createPopperScope] = createContextScope$2(POPPER_NAME);
22238
+ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
22451
22239
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
22452
22240
  var Popper = (props2) => {
22453
22241
  const { __scopePopper, children } = props2;
@@ -22470,7 +22258,7 @@ var PopperAnchor = React.forwardRef(
22470
22258
  context.onAnchorChange(anchorRef.current);
22471
22259
  }
22472
22260
  });
22473
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$6.div, { ...anchorProps, ref: composedRefs });
22261
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
22474
22262
  }
22475
22263
  );
22476
22264
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -22598,7 +22386,7 @@ var PopperContent = React.forwardRef(
22598
22386
  arrowY,
22599
22387
  shouldHideArrow: cannotCenterArrow,
22600
22388
  children: /* @__PURE__ */ jsx(
22601
- Primitive$6.div,
22389
+ Primitive.div,
22602
22390
  {
22603
22391
  "data-side": placedSide,
22604
22392
  "data-align": placedAlign,
@@ -22724,7 +22512,7 @@ var Portal$7 = React.forwardRef((props2, forwardedRef) => {
22724
22512
  const [mounted, setMounted] = React.useState(false);
22725
22513
  useLayoutEffect2(() => setMounted(true), []);
22726
22514
  const container = containerProp || mounted && ((_a2 = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a2.body);
22727
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$6.div, { ...portalProps, ref: forwardedRef }), container) : null;
22515
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
22728
22516
  });
22729
22517
  Portal$7.displayName = PORTAL_NAME$a;
22730
22518
  var getDefaultParent = function(originalTarget) {
@@ -23355,12 +23143,6 @@ function RemoveScrollSideCar(props2) {
23355
23143
  if ("touches" in event && moveDirection === "h" && target.type === "range") {
23356
23144
  return false;
23357
23145
  }
23358
- var selection = window.getSelection();
23359
- var anchorNode = selection && selection.anchorNode;
23360
- var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
23361
- if (isTouchingSelection) {
23362
- return false;
23363
- }
23364
23146
  var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
23365
23147
  if (!canBeScrolledInMainDirection) {
23366
23148
  return true;
@@ -23473,7 +23255,7 @@ var ReactRemoveScroll = React.forwardRef(function(props2, ref) {
23473
23255
  });
23474
23256
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
23475
23257
  var POPOVER_NAME = "Popover";
23476
- var [createPopoverContext] = createContextScope$2(POPOVER_NAME, [
23258
+ var [createPopoverContext] = createContextScope(POPOVER_NAME, [
23477
23259
  createPopperScope
23478
23260
  ]);
23479
23261
  var usePopperScope$4 = createPopperScope();
@@ -23537,7 +23319,7 @@ var PopoverTrigger$1 = React.forwardRef(
23537
23319
  const popperScope = usePopperScope$4(__scopePopover);
23538
23320
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
23539
23321
  const trigger = /* @__PURE__ */ jsx(
23540
- Primitive$6.button,
23322
+ Primitive.button,
23541
23323
  {
23542
23324
  type: "button",
23543
23325
  "aria-haspopup": "dialog",
@@ -23573,7 +23355,7 @@ var PopoverContent$1 = React.forwardRef(
23573
23355
  }
23574
23356
  );
23575
23357
  PopoverContent$1.displayName = CONTENT_NAME$a;
23576
- var Slot$3 = /* @__PURE__ */ createSlot$7("PopoverContent.RemoveScroll");
23358
+ var Slot$3 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
23577
23359
  var PopoverContentModal = React.forwardRef(
23578
23360
  (props2, forwardedRef) => {
23579
23361
  const context = usePopoverContext(CONTENT_NAME$a, props2.__scopePopover);
@@ -23726,7 +23508,7 @@ var PopoverClose = React.forwardRef(
23726
23508
  const { __scopePopover, ...closeProps } = props2;
23727
23509
  const context = usePopoverContext(CLOSE_NAME$1, __scopePopover);
23728
23510
  return /* @__PURE__ */ jsx(
23729
- Primitive$6.button,
23511
+ Primitive.button,
23730
23512
  {
23731
23513
  type: "button",
23732
23514
  ...closeProps,
@@ -24497,7 +24279,7 @@ var NAME$2 = "VisuallyHidden";
24497
24279
  var VisuallyHidden = React.forwardRef(
24498
24280
  (props2, forwardedRef) => {
24499
24281
  return /* @__PURE__ */ jsx(
24500
- Primitive$6.span,
24282
+ Primitive.span,
24501
24283
  {
24502
24284
  ...props2,
24503
24285
  ref: forwardedRef,
@@ -24512,7 +24294,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
24512
24294
  var SELECTION_KEYS$1 = [" ", "Enter"];
24513
24295
  var SELECT_NAME = "Select";
24514
24296
  var [Collection$4, useCollection$4, createCollectionScope$4] = createCollection(SELECT_NAME);
24515
- var [createSelectContext] = createContextScope$2(SELECT_NAME, [
24297
+ var [createSelectContext] = createContextScope(SELECT_NAME, [
24516
24298
  createCollectionScope$4,
24517
24299
  createPopperScope
24518
24300
  ]);
@@ -24649,7 +24431,7 @@ var SelectTrigger$1 = React.forwardRef(
24649
24431
  }
24650
24432
  };
24651
24433
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
24652
- Primitive$6.button,
24434
+ Primitive.button,
24653
24435
  {
24654
24436
  type: "button",
24655
24437
  role: "combobox",
@@ -24708,7 +24490,7 @@ var SelectValue$1 = React.forwardRef(
24708
24490
  onValueNodeHasChildrenChange(hasChildren);
24709
24491
  }, [onValueNodeHasChildrenChange, hasChildren]);
24710
24492
  return /* @__PURE__ */ jsx(
24711
- Primitive$6.span,
24493
+ Primitive.span,
24712
24494
  {
24713
24495
  ...valueProps,
24714
24496
  ref: composedRefs,
@@ -24723,7 +24505,7 @@ var ICON_NAME = "SelectIcon";
24723
24505
  var SelectIcon = React.forwardRef(
24724
24506
  (props2, forwardedRef) => {
24725
24507
  const { __scopeSelect, children, ...iconProps } = props2;
24726
- return /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
24508
+ return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
24727
24509
  }
24728
24510
  );
24729
24511
  SelectIcon.displayName = ICON_NAME;
@@ -24754,7 +24536,7 @@ SelectContent$1.displayName = CONTENT_NAME$9;
24754
24536
  var CONTENT_MARGIN = 10;
24755
24537
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$9);
24756
24538
  var CONTENT_IMPL_NAME = "SelectContentImpl";
24757
- var Slot$2 = /* @__PURE__ */ createSlot$7("SelectContent.RemoveScroll");
24539
+ var Slot$2 = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
24758
24540
  var SelectContentImpl = React.forwardRef(
24759
24541
  (props2, forwardedRef) => {
24760
24542
  const {
@@ -25134,7 +24916,7 @@ var SelectItemAlignedPosition = React.forwardRef((props2, forwardedRef) => {
25134
24916
  zIndex: contentZIndex
25135
24917
  },
25136
24918
  children: /* @__PURE__ */ jsx(
25137
- Primitive$6.div,
24919
+ Primitive.div,
25138
24920
  {
25139
24921
  ...popperProps,
25140
24922
  ref: composedRefs,
@@ -25208,7 +24990,7 @@ var SelectViewport = React.forwardRef(
25208
24990
  }
25209
24991
  ),
25210
24992
  /* @__PURE__ */ jsx(Collection$4.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
25211
- Primitive$6.div,
24993
+ Primitive.div,
25212
24994
  {
25213
24995
  "data-radix-select-viewport": "",
25214
24996
  role: "presentation",
@@ -25263,7 +25045,7 @@ var SelectGroup$1 = React.forwardRef(
25263
25045
  (props2, forwardedRef) => {
25264
25046
  const { __scopeSelect, ...groupProps } = props2;
25265
25047
  const groupId = useId$1();
25266
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
25048
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
25267
25049
  }
25268
25050
  );
25269
25051
  SelectGroup$1.displayName = GROUP_NAME$4;
@@ -25272,7 +25054,7 @@ var SelectLabel$1 = React.forwardRef(
25272
25054
  (props2, forwardedRef) => {
25273
25055
  const { __scopeSelect, ...labelProps } = props2;
25274
25056
  const groupContext = useSelectGroupContext(LABEL_NAME$4, __scopeSelect);
25275
- return /* @__PURE__ */ jsx(Primitive$6.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
25057
+ return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
25276
25058
  }
25277
25059
  );
25278
25060
  SelectLabel$1.displayName = LABEL_NAME$4;
@@ -25331,7 +25113,7 @@ var SelectItem$1 = React.forwardRef(
25331
25113
  disabled,
25332
25114
  textValue,
25333
25115
  children: /* @__PURE__ */ jsx(
25334
- Primitive$6.div,
25116
+ Primitive.div,
25335
25117
  {
25336
25118
  role: "option",
25337
25119
  "aria-labelledby": textId,
@@ -25414,7 +25196,7 @@ var SelectItemText = React.forwardRef(
25414
25196
  return () => onNativeOptionRemove(nativeOption);
25415
25197
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
25416
25198
  return /* @__PURE__ */ jsxs(Fragment, { children: [
25417
- /* @__PURE__ */ jsx(Primitive$6.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
25199
+ /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
25418
25200
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
25419
25201
  ] });
25420
25202
  }
@@ -25425,7 +25207,7 @@ var SelectItemIndicator = React.forwardRef(
25425
25207
  (props2, forwardedRef) => {
25426
25208
  const { __scopeSelect, ...itemIndicatorProps } = props2;
25427
25209
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
25428
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
25210
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
25429
25211
  }
25430
25212
  );
25431
25213
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -25516,7 +25298,7 @@ var SelectScrollButtonImpl = React.forwardRef((props2, forwardedRef) => {
25516
25298
  (_a2 = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a2.scrollIntoView({ block: "nearest" });
25517
25299
  }, [getItems]);
25518
25300
  return /* @__PURE__ */ jsx(
25519
- Primitive$6.div,
25301
+ Primitive.div,
25520
25302
  {
25521
25303
  "aria-hidden": true,
25522
25304
  ...scrollIndicatorProps,
@@ -25544,7 +25326,7 @@ var SEPARATOR_NAME$4 = "SelectSeparator";
25544
25326
  var SelectSeparator$1 = React.forwardRef(
25545
25327
  (props2, forwardedRef) => {
25546
25328
  const { __scopeSelect, ...separatorProps } = props2;
25547
- return /* @__PURE__ */ jsx(Primitive$6.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
25329
+ return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
25548
25330
  }
25549
25331
  );
25550
25332
  SelectSeparator$1.displayName = SEPARATOR_NAME$4;
@@ -25581,7 +25363,7 @@ var SelectBubbleInput = React.forwardRef(
25581
25363
  }
25582
25364
  }, [prevValue, value]);
25583
25365
  return /* @__PURE__ */ jsx(
25584
- Primitive$6.select,
25366
+ Primitive.select,
25585
25367
  {
25586
25368
  ...props2,
25587
25369
  style: { ...VISUALLY_HIDDEN_STYLES, ...props2.style },
@@ -25838,7 +25620,7 @@ function SelectField({
25838
25620
  }
25839
25621
  );
25840
25622
  }
25841
- var [createTooltipContext] = createContextScope$2("Tooltip", [
25623
+ var [createTooltipContext] = createContextScope("Tooltip", [
25842
25624
  createPopperScope
25843
25625
  ]);
25844
25626
  var usePopperScope$2 = createPopperScope();
@@ -25997,7 +25779,7 @@ var TooltipTrigger$1 = React.forwardRef(
25997
25779
  return () => document.removeEventListener("pointerup", handlePointerUp2);
25998
25780
  }, [handlePointerUp2]);
25999
25781
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
26000
- Primitive$6.button,
25782
+ Primitive.button,
26001
25783
  {
26002
25784
  "aria-describedby": context.open ? context.contentId : void 0,
26003
25785
  "data-state": context.stateAttribute,
@@ -26442,7 +26224,7 @@ function CheckboxField({
26442
26224
  ] });
26443
26225
  }
26444
26226
  var SWITCH_NAME = "Switch";
26445
- var [createSwitchContext] = createContextScope$2(SWITCH_NAME);
26227
+ var [createSwitchContext] = createContextScope(SWITCH_NAME);
26446
26228
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
26447
26229
  var Switch$1 = React.forwardRef(
26448
26230
  (props2, forwardedRef) => {
@@ -26470,7 +26252,7 @@ var Switch$1 = React.forwardRef(
26470
26252
  });
26471
26253
  return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
26472
26254
  /* @__PURE__ */ jsx(
26473
- Primitive$6.button,
26255
+ Primitive.button,
26474
26256
  {
26475
26257
  type: "button",
26476
26258
  role: "switch",
@@ -26515,7 +26297,7 @@ var SwitchThumb = React.forwardRef(
26515
26297
  const { __scopeSwitch, ...thumbProps } = props2;
26516
26298
  const context = useSwitchContext(THUMB_NAME$2, __scopeSwitch);
26517
26299
  return /* @__PURE__ */ jsx(
26518
- Primitive$6.span,
26300
+ Primitive.span,
26519
26301
  {
26520
26302
  "data-state": getState$2(context.checked),
26521
26303
  "data-disabled": context.disabled ? "" : void 0,
@@ -26682,7 +26464,7 @@ function SwitchField({
26682
26464
  ] });
26683
26465
  }
26684
26466
  var RADIO_NAME = "Radio";
26685
- var [createRadioContext, createRadioScope] = createContextScope$2(RADIO_NAME);
26467
+ var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
26686
26468
  var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
26687
26469
  var Radio = React.forwardRef(
26688
26470
  (props2, forwardedRef) => {
@@ -26703,7 +26485,7 @@ var Radio = React.forwardRef(
26703
26485
  const isFormControl = button ? form || !!button.closest("form") : true;
26704
26486
  return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
26705
26487
  /* @__PURE__ */ jsx(
26706
- Primitive$6.button,
26488
+ Primitive.button,
26707
26489
  {
26708
26490
  type: "button",
26709
26491
  role: "radio",
@@ -26747,7 +26529,7 @@ var RadioIndicator = React.forwardRef(
26747
26529
  const { __scopeRadio, forceMount, ...indicatorProps } = props2;
26748
26530
  const context = useRadioContext(INDICATOR_NAME$5, __scopeRadio);
26749
26531
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(
26750
- Primitive$6.span,
26532
+ Primitive.span,
26751
26533
  {
26752
26534
  "data-state": getState$1(context.checked),
26753
26535
  "data-disabled": context.disabled ? "" : void 0,
@@ -26787,7 +26569,7 @@ var RadioBubbleInput = React.forwardRef(
26787
26569
  }
26788
26570
  }, [prevChecked, checked, bubbles]);
26789
26571
  return /* @__PURE__ */ jsx(
26790
- Primitive$6.input,
26572
+ Primitive.input,
26791
26573
  {
26792
26574
  type: "radio",
26793
26575
  "aria-hidden": true,
@@ -26813,7 +26595,7 @@ function getState$1(checked) {
26813
26595
  }
26814
26596
  var ARROW_KEYS$2 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
26815
26597
  var RADIO_GROUP_NAME$4 = "RadioGroup";
26816
- var [createRadioGroupContext] = createContextScope$2(RADIO_GROUP_NAME$4, [
26598
+ var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME$4, [
26817
26599
  createRovingFocusGroupScope,
26818
26600
  createRadioScope
26819
26601
  ]);
@@ -26861,7 +26643,7 @@ var RadioGroup$2 = React.forwardRef(
26861
26643
  dir: direction,
26862
26644
  loop,
26863
26645
  children: /* @__PURE__ */ jsx(
26864
- Primitive$6.div,
26646
+ Primitive.div,
26865
26647
  {
26866
26648
  role: "radiogroup",
26867
26649
  "aria-required": required2,
@@ -28014,7 +27796,7 @@ const match = {
28014
27796
  defaultParseWidth: "any"
28015
27797
  })
28016
27798
  };
28017
- const enUS$1 = {
27799
+ const enUS = {
28018
27800
  code: "en-US",
28019
27801
  formatDistance,
28020
27802
  formatLong,
@@ -28861,7 +28643,7 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
28861
28643
  function format(date2, formatStr, options) {
28862
28644
  var _a2, _b, _c, _d, _e2, _f, _g, _h;
28863
28645
  const defaultOptions2 = getDefaultOptions();
28864
- const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS$1;
28646
+ const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
28865
28647
  const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a2 = options == null ? void 0 : options.locale) == null ? void 0 : _a2.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
28866
28648
  const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e2 = options == null ? void 0 : options.locale) == null ? void 0 : _e2.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
28867
28649
  const originalDate = toDate(date2, options == null ? void 0 : options.in);
@@ -28999,63 +28781,6 @@ function endOfBroadcastWeek(date2, dateLib) {
28999
28781
  const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
29000
28782
  return endDate;
29001
28783
  }
29002
- const enUS = {
29003
- ...enUS$1,
29004
- labels: {
29005
- labelDayButton: (date2, modifiers, options, dateLib) => {
29006
- let formatDate;
29007
- if (dateLib && typeof dateLib.format === "function") {
29008
- formatDate = dateLib.format.bind(dateLib);
29009
- } else {
29010
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29011
- }
29012
- let label = formatDate(date2, "PPPP");
29013
- if (modifiers.today)
29014
- label = `Today, ${label}`;
29015
- if (modifiers.selected)
29016
- label = `${label}, selected`;
29017
- return label;
29018
- },
29019
- labelMonthDropdown: "Choose the Month",
29020
- labelNext: "Go to the Next Month",
29021
- labelPrevious: "Go to the Previous Month",
29022
- labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
29023
- labelYearDropdown: "Choose the Year",
29024
- labelGrid: (date2, options, dateLib) => {
29025
- let formatDate;
29026
- if (dateLib && typeof dateLib.format === "function") {
29027
- formatDate = dateLib.format.bind(dateLib);
29028
- } else {
29029
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29030
- }
29031
- return formatDate(date2, "LLLL yyyy");
29032
- },
29033
- labelGridcell: (date2, modifiers, options, dateLib) => {
29034
- let formatDate;
29035
- if (dateLib && typeof dateLib.format === "function") {
29036
- formatDate = dateLib.format.bind(dateLib);
29037
- } else {
29038
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29039
- }
29040
- let label = formatDate(date2, "PPPP");
29041
- if (modifiers == null ? void 0 : modifiers.today) {
29042
- label = `Today, ${label}`;
29043
- }
29044
- return label;
29045
- },
29046
- labelNav: "Navigation bar",
29047
- labelWeekNumberHeader: "Week Number",
29048
- labelWeekday: (date2, options, dateLib) => {
29049
- let formatDate;
29050
- if (dateLib && typeof dateLib.format === "function") {
29051
- formatDate = dateLib.format.bind(dateLib);
29052
- } else {
29053
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29054
- }
29055
- return formatDate(date2, "cccc");
29056
- }
29057
- }
29058
- };
29059
28784
  class DateLib {
29060
28785
  /**
29061
28786
  * Creates an instance of `DateLib`.
@@ -29339,9 +29064,6 @@ class CalendarDay {
29339
29064
  this.displayMonth = displayMonth;
29340
29065
  this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date2, displayMonth));
29341
29066
  this.dateLib = dateLib;
29342
- this.isoDate = dateLib.format(date2, "yyyy-MM-dd");
29343
- this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
29344
- this.dateMonthId = dateLib.format(date2, "yyyy-MM");
29345
29067
  }
29346
29068
  /**
29347
29069
  * Checks if this day is equal to another `CalendarDay`, considering both the
@@ -29652,7 +29374,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
29652
29374
  return isSameDay2(date2, matcher);
29653
29375
  }
29654
29376
  if (isDatesArray(matcher, dateLib)) {
29655
- return matcher.some((matcherDate) => isSameDay2(date2, matcherDate));
29377
+ return matcher.includes(date2);
29656
29378
  }
29657
29379
  if (isDateRange(matcher)) {
29658
29380
  return rangeIncludesDate(matcher, date2, false, dateLib);
@@ -29688,7 +29410,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
29688
29410
  });
29689
29411
  }
29690
29412
  function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
29691
- const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props2;
29413
+ const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props2;
29692
29414
  const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
29693
29415
  const computedNavStart = navStart && startOfMonth2(navStart);
29694
29416
  const computedNavEnd = navEnd && endOfMonth2(navEnd);
@@ -29708,7 +29430,7 @@ function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
29708
29430
  const isDisabled = Boolean(disabled && dateMatchModifiers(date2, disabled, dateLib));
29709
29431
  const isHidden2 = Boolean(hidden && dateMatchModifiers(date2, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
29710
29432
  !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
29711
- const isToday = isSameDay2(date2, today);
29433
+ const isToday = isSameDay2(date2, today ?? dateLib.today());
29712
29434
  if (isOutside)
29713
29435
  internalModifiersMap.outside.push(day);
29714
29436
  if (isDisabled)
@@ -29856,6 +29578,60 @@ function getFormatters(customFormatters) {
29856
29578
  ...customFormatters
29857
29579
  };
29858
29580
  }
29581
+ function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
29582
+ const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
29583
+ const months = eachMonthOfInterval2({
29584
+ start: startOfYear2(displayMonth),
29585
+ end: endOfYear2(displayMonth)
29586
+ });
29587
+ const options = months.map((month) => {
29588
+ const label = formatters2.formatMonthDropdown(month, dateLib);
29589
+ const value = getMonth2(month);
29590
+ const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
29591
+ return { value, label, disabled };
29592
+ });
29593
+ return options;
29594
+ }
29595
+ function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
29596
+ let style = { ...styles == null ? void 0 : styles[UI.Day] };
29597
+ Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
29598
+ style = {
29599
+ ...style,
29600
+ ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
29601
+ };
29602
+ });
29603
+ return style;
29604
+ }
29605
+ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
29606
+ const today = dateLib.today();
29607
+ const start = ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
29608
+ const days = [];
29609
+ for (let i2 = 0; i2 < 7; i2++) {
29610
+ const day = dateLib.addDays(start, i2);
29611
+ days.push(day);
29612
+ }
29613
+ return days;
29614
+ }
29615
+ function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
29616
+ if (!navStart)
29617
+ return void 0;
29618
+ if (!navEnd)
29619
+ return void 0;
29620
+ const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
29621
+ const firstNavYear = startOfYear2(navStart);
29622
+ const lastNavYear = endOfYear2(navEnd);
29623
+ const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
29624
+ if (reverse)
29625
+ years.reverse();
29626
+ return years.map((year) => {
29627
+ const label = formatters2.formatYearDropdown(year, dateLib);
29628
+ return {
29629
+ value: getYear2(year),
29630
+ label,
29631
+ disabled: false
29632
+ };
29633
+ });
29634
+ }
29859
29635
  function labelDayButton(date2, modifiers, options, dateLib) {
29860
29636
  let label = (dateLib ?? new DateLib(options)).format(date2, "PPPP");
29861
29637
  if (modifiers.today)
@@ -29883,9 +29659,8 @@ function labelMonthDropdown(_options) {
29883
29659
  function labelNav() {
29884
29660
  return "";
29885
29661
  }
29886
- const defaultLabel = "Go to the Next Month";
29887
- function labelNext(_month, _options) {
29888
- return defaultLabel;
29662
+ function labelNext(_month) {
29663
+ return "Go to the Next Month";
29889
29664
  }
29890
29665
  function labelPrevious(_month) {
29891
29666
  return "Go to the Previous Month";
@@ -29918,87 +29693,6 @@ const defaultLabels = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
29918
29693
  labelWeekday,
29919
29694
  labelYearDropdown
29920
29695
  }, Symbol.toStringTag, { value: "Module" }));
29921
- const resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
29922
- if (customLabel)
29923
- return customLabel;
29924
- if (localeLabel) {
29925
- return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
29926
- }
29927
- return defaultLabel2;
29928
- };
29929
- function getLabels(customLabels, options) {
29930
- var _a2;
29931
- const localeLabels = ((_a2 = options.locale) == null ? void 0 : _a2.labels) ?? {};
29932
- return {
29933
- ...defaultLabels,
29934
- ...customLabels ?? {},
29935
- labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
29936
- labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
29937
- labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
29938
- labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
29939
- labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
29940
- labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
29941
- labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
29942
- labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
29943
- labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
29944
- labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
29945
- labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
29946
- };
29947
- }
29948
- function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
29949
- const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
29950
- const months = eachMonthOfInterval2({
29951
- start: startOfYear2(displayMonth),
29952
- end: endOfYear2(displayMonth)
29953
- });
29954
- const options = months.map((month) => {
29955
- const label = formatters2.formatMonthDropdown(month, dateLib);
29956
- const value = getMonth2(month);
29957
- const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
29958
- return { value, label, disabled };
29959
- });
29960
- return options;
29961
- }
29962
- function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
29963
- let style = { ...styles == null ? void 0 : styles[UI.Day] };
29964
- Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
29965
- style = {
29966
- ...style,
29967
- ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
29968
- };
29969
- });
29970
- return style;
29971
- }
29972
- function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
29973
- const referenceToday = today ?? dateLib.today();
29974
- const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
29975
- const days = [];
29976
- for (let i2 = 0; i2 < 7; i2++) {
29977
- const day = dateLib.addDays(start, i2);
29978
- days.push(day);
29979
- }
29980
- return days;
29981
- }
29982
- function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
29983
- if (!navStart)
29984
- return void 0;
29985
- if (!navEnd)
29986
- return void 0;
29987
- const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
29988
- const firstNavYear = startOfYear2(navStart);
29989
- const lastNavYear = endOfYear2(navEnd);
29990
- const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
29991
- if (reverse)
29992
- years.reverse();
29993
- return years.map((year) => {
29994
- const label = formatters2.formatYearDropdown(year, dateLib);
29995
- return {
29996
- value: getYear2(year),
29997
- label,
29998
- disabled: false
29999
- };
30000
- });
30001
- }
30002
29696
  const asHtmlElement = (element) => {
30003
29697
  if (element instanceof HTMLElement)
30004
29698
  return element;
@@ -30128,14 +29822,15 @@ function getDates(displayMonths, maxDate, props2, dateLib) {
30128
29822
  const { ISOWeek, fixedWeeks, broadcastCalendar } = props2 ?? {};
30129
29823
  const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
30130
29824
  const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
30131
- const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
30132
- const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
30133
- const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
30134
- const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
29825
+ const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
29826
+ const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
30135
29827
  const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
30136
29828
  const dates = [];
30137
29829
  for (let i2 = 0; i2 <= nOfDays; i2++) {
30138
29830
  const date2 = addDays2(startWeekFirstDate, i2);
29831
+ if (maxDate && isAfter2(date2, maxDate)) {
29832
+ break;
29833
+ }
30139
29834
  dates.push(date2);
30140
29835
  }
30141
29836
  const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
@@ -30302,7 +29997,6 @@ function useControlledValue(defaultValue, controlledValue) {
30302
29997
  return [value, setValue];
30303
29998
  }
30304
29999
  function useCalendar(props2, dateLib) {
30305
- var _a2;
30306
30000
  const [navStart, navEnd] = getNavMonths(props2, dateLib);
30307
30001
  const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
30308
30002
  const initialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
@@ -30315,44 +30009,13 @@ function useCalendar(props2, dateLib) {
30315
30009
  const newInitialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
30316
30010
  setFirstMonth(newInitialMonth);
30317
30011
  }, [props2.timeZone]);
30318
- const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
30319
- const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props2.numberOfMonths }, dateLib);
30320
- const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, {
30321
- ISOWeek: props2.ISOWeek,
30322
- fixedWeeks: props2.fixedWeeks,
30323
- broadcastCalendar: props2.broadcastCalendar
30324
- }, dateLib);
30325
- const months2 = getMonths(displayMonths, dates, {
30326
- broadcastCalendar: props2.broadcastCalendar,
30327
- fixedWeeks: props2.fixedWeeks,
30328
- ISOWeek: props2.ISOWeek,
30329
- reverseMonths: props2.reverseMonths
30330
- }, dateLib);
30331
- const weeks2 = getWeeks(months2);
30332
- const days2 = getDays(months2);
30333
- const previousMonth2 = getPreviousMonth(firstMonth, navStart, props2, dateLib);
30334
- const nextMonth2 = getNextMonth(firstMonth, navEnd, props2, dateLib);
30335
- return {
30336
- months: months2,
30337
- weeks: weeks2,
30338
- days: days2,
30339
- previousMonth: previousMonth2,
30340
- nextMonth: nextMonth2
30341
- };
30342
- }, [
30343
- dateLib,
30344
- firstMonth.getTime(),
30345
- navEnd == null ? void 0 : navEnd.getTime(),
30346
- navStart == null ? void 0 : navStart.getTime(),
30347
- props2.disableNavigation,
30348
- props2.broadcastCalendar,
30349
- (_a2 = props2.endMonth) == null ? void 0 : _a2.getTime(),
30350
- props2.fixedWeeks,
30351
- props2.ISOWeek,
30352
- props2.numberOfMonths,
30353
- props2.pagedNavigation,
30354
- props2.reverseMonths
30355
- ]);
30012
+ const displayMonths = getDisplayMonths(firstMonth, navEnd, props2, dateLib);
30013
+ const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, props2, dateLib);
30014
+ const months = getMonths(displayMonths, dates, props2, dateLib);
30015
+ const weeks = getWeeks(months);
30016
+ const days = getDays(months);
30017
+ const previousMonth = getPreviousMonth(firstMonth, navStart, props2, dateLib);
30018
+ const nextMonth = getNextMonth(firstMonth, navEnd, props2, dateLib);
30356
30019
  const { disableNavigation, onMonthChange } = props2;
30357
30020
  const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
30358
30021
  const goToMonth = (date2) => {
@@ -30720,104 +30383,38 @@ function useSelection(props2, dateLib) {
30720
30383
  return void 0;
30721
30384
  }
30722
30385
  }
30723
- function toTimeZone(date2, timeZone) {
30724
- if (date2 instanceof TZDate && date2.timeZone === timeZone) {
30725
- return date2;
30726
- }
30727
- return new TZDate(date2, timeZone);
30728
- }
30729
- function convertMatcher(matcher, timeZone) {
30730
- if (typeof matcher === "boolean" || typeof matcher === "function") {
30731
- return matcher;
30732
- }
30733
- if (matcher instanceof Date) {
30734
- return toTimeZone(matcher, timeZone);
30735
- }
30736
- if (Array.isArray(matcher)) {
30737
- return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
30738
- }
30739
- if (isDateRange(matcher)) {
30740
- return {
30741
- ...matcher,
30742
- from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
30743
- to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
30744
- };
30745
- }
30746
- if (isDateInterval(matcher)) {
30747
- return {
30748
- before: toTimeZone(matcher.before, timeZone),
30749
- after: toTimeZone(matcher.after, timeZone)
30750
- };
30751
- }
30752
- if (isDateAfterType(matcher)) {
30753
- return {
30754
- after: toTimeZone(matcher.after, timeZone)
30755
- };
30756
- }
30757
- if (isDateBeforeType(matcher)) {
30758
- return {
30759
- before: toTimeZone(matcher.before, timeZone)
30760
- };
30761
- }
30762
- return matcher;
30763
- }
30764
- function convertMatchersToTimeZone(matchers, timeZone) {
30765
- if (!matchers) {
30766
- return matchers;
30767
- }
30768
- if (Array.isArray(matchers)) {
30769
- return matchers.map((matcher) => convertMatcher(matcher, timeZone));
30770
- }
30771
- return convertMatcher(matchers, timeZone);
30772
- }
30773
30386
  function DayPicker(initialProps) {
30774
30387
  var _a2;
30775
30388
  let props2 = initialProps;
30776
- const timeZone = props2.timeZone;
30777
- if (timeZone) {
30389
+ if (props2.timeZone) {
30778
30390
  props2 = {
30779
- ...initialProps,
30780
- timeZone
30391
+ ...initialProps
30781
30392
  };
30782
30393
  if (props2.today) {
30783
- props2.today = toTimeZone(props2.today, timeZone);
30394
+ props2.today = new TZDate(props2.today, props2.timeZone);
30784
30395
  }
30785
30396
  if (props2.month) {
30786
- props2.month = toTimeZone(props2.month, timeZone);
30397
+ props2.month = new TZDate(props2.month, props2.timeZone);
30787
30398
  }
30788
30399
  if (props2.defaultMonth) {
30789
- props2.defaultMonth = toTimeZone(props2.defaultMonth, timeZone);
30400
+ props2.defaultMonth = new TZDate(props2.defaultMonth, props2.timeZone);
30790
30401
  }
30791
30402
  if (props2.startMonth) {
30792
- props2.startMonth = toTimeZone(props2.startMonth, timeZone);
30403
+ props2.startMonth = new TZDate(props2.startMonth, props2.timeZone);
30793
30404
  }
30794
30405
  if (props2.endMonth) {
30795
- props2.endMonth = toTimeZone(props2.endMonth, timeZone);
30406
+ props2.endMonth = new TZDate(props2.endMonth, props2.timeZone);
30796
30407
  }
30797
30408
  if (props2.mode === "single" && props2.selected) {
30798
- props2.selected = toTimeZone(props2.selected, timeZone);
30409
+ props2.selected = new TZDate(props2.selected, props2.timeZone);
30799
30410
  } else if (props2.mode === "multiple" && props2.selected) {
30800
- props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => toTimeZone(date2, timeZone));
30411
+ props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => new TZDate(date2, props2.timeZone));
30801
30412
  } else if (props2.mode === "range" && props2.selected) {
30802
30413
  props2.selected = {
30803
- from: props2.selected.from ? toTimeZone(props2.selected.from, timeZone) : props2.selected.from,
30804
- to: props2.selected.to ? toTimeZone(props2.selected.to, timeZone) : props2.selected.to
30414
+ from: props2.selected.from ? new TZDate(props2.selected.from, props2.timeZone) : void 0,
30415
+ to: props2.selected.to ? new TZDate(props2.selected.to, props2.timeZone) : void 0
30805
30416
  };
30806
30417
  }
30807
- if (props2.disabled !== void 0) {
30808
- props2.disabled = convertMatchersToTimeZone(props2.disabled, timeZone);
30809
- }
30810
- if (props2.hidden !== void 0) {
30811
- props2.hidden = convertMatchersToTimeZone(props2.hidden, timeZone);
30812
- }
30813
- if (props2.modifiers) {
30814
- const nextModifiers = {};
30815
- Object.keys(props2.modifiers).forEach((key) => {
30816
- var _a3;
30817
- nextModifiers[key] = convertMatchersToTimeZone((_a3 = props2.modifiers) == null ? void 0 : _a3[key], timeZone);
30818
- });
30819
- props2.modifiers = nextModifiers;
30820
- }
30821
30418
  }
30822
30419
  const { components: components2, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
30823
30420
  const locale2 = { ...enUS, ...props2.locale };
@@ -30834,7 +30431,7 @@ function DayPicker(initialProps) {
30834
30431
  dateLib: dateLib2,
30835
30432
  components: getComponents(props2.components),
30836
30433
  formatters: getFormatters(props2.formatters),
30837
- labels: getLabels(props2.labels, dateLib2.options),
30434
+ labels: { ...defaultLabels, ...props2.labels },
30838
30435
  locale: locale2,
30839
30436
  classNames: { ...getDefaultClassNames(), ...props2.classNames }
30840
30437
  };
@@ -30853,9 +30450,6 @@ function DayPicker(initialProps) {
30853
30450
  props2.labels,
30854
30451
  props2.classNames
30855
30452
  ]);
30856
- if (!props2.today) {
30857
- props2 = { ...props2, today: dateLib.today() };
30858
- }
30859
30453
  const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props2;
30860
30454
  const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
30861
30455
  const calendar = useCalendar(props2, dateLib);
@@ -30864,7 +30458,7 @@ function DayPicker(initialProps) {
30864
30458
  const { isSelected, select, selected: selectedValue } = useSelection(props2, dateLib) ?? {};
30865
30459
  const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props2, calendar, getModifiers, isSelected ?? (() => false), dateLib);
30866
30460
  const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
30867
- const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today), [dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today]);
30461
+ const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek), [dateLib, props2.ISOWeek]);
30868
30462
  const isInteractive = mode !== void 0 || onDayClick !== void 0;
30869
30463
  const handlePreviousClick = useCallback(() => {
30870
30464
  if (!previousMonth)
@@ -30882,9 +30476,6 @@ function DayPicker(initialProps) {
30882
30476
  e2.preventDefault();
30883
30477
  e2.stopPropagation();
30884
30478
  setFocused(day);
30885
- if (m2.disabled) {
30886
- return;
30887
- }
30888
30479
  select == null ? void 0 : select(day.date, m2, e2);
30889
30480
  onDayClick == null ? void 0 : onDayClick(day.date, m2, e2);
30890
30481
  }, [select, onDayClick, setFocused]);
@@ -31013,7 +30604,10 @@ function DayPicker(initialProps) {
31013
30604
  whiteSpace: "nowrap",
31014
30605
  wordWrap: "normal"
31015
30606
  } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
31016
- ) : React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
30607
+ ) : (
30608
+ // biome-ignore lint/a11y/useSemanticElements: breaking change
30609
+ React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
30610
+ )),
31017
30611
  navLayout === "around" && !props2.hideNavigation && displayIndex === numberOfMonths - 1 && React__default.createElement(
31018
30612
  components2.NextMonthButton,
31019
30613
  { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props2.animate ? "true" : void 0 },
@@ -31033,7 +30627,8 @@ function DayPicker(initialProps) {
31033
30627
  return React__default.createElement(
31034
30628
  components2.Week,
31035
30629
  { className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
31036
- showWeekNumber && React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
30630
+ showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
30631
+ React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
31037
30632
  locale
31038
30633
  }), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
31039
30634
  week.days.map((day) => {
@@ -31050,7 +30645,10 @@ function DayPicker(initialProps) {
31050
30645
  const style2 = getStyleForModifiers(modifiers, styles, props2.modifiersStyles);
31051
30646
  const className2 = getClassNamesForModifiers(modifiers, classNames, props2.modifiersClassNames);
31052
30647
  const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date2, modifiers, dateLib.options, dateLib) : void 0;
31053
- return React__default.createElement(components2.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
30648
+ return (
30649
+ // biome-ignore lint/a11y/useSemanticElements: react component
30650
+ React__default.createElement(components2.Day, { key: `${dateLib.format(date2, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date2, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date2, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib))
30651
+ );
31054
30652
  })
31055
30653
  );
31056
30654
  }))
@@ -31058,7 +30656,8 @@ function DayPicker(initialProps) {
31058
30656
  );
31059
30657
  })
31060
30658
  ),
31061
- props2.footer && React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
30659
+ props2.footer && // biome-ignore lint/a11y/useSemanticElements: react component
30660
+ React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
31062
30661
  )
31063
30662
  );
31064
30663
  }
@@ -31089,7 +30688,7 @@ function Calendar({
31089
30688
  ...formatters2
31090
30689
  },
31091
30690
  classNames: {
31092
- root: cn$1("w-fit", defaultClassNames.root),
30691
+ root: cn$1(defaultClassNames.root),
31093
30692
  months: cn$1(
31094
30693
  "flex gap-4 flex-col md:flex-row relative",
31095
30694
  defaultClassNames.months
@@ -31330,7 +30929,7 @@ function DatePicker({
31330
30929
  showOutsideDays: true
31331
30930
  }
31332
30931
  ),
31333
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-2 border-t", children: [
30932
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-2 border-t border-border", children: [
31334
30933
  /* @__PURE__ */ jsx(
31335
30934
  Button$1,
31336
30935
  {
@@ -31763,7 +31362,7 @@ function DateRangePicker({
31763
31362
  );
31764
31363
  }) }) })
31765
31364
  ] }),
31766
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 pt-3 mt-3 border-t", children: [
31365
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 pt-3 mt-3 border-t border-border", children: [
31767
31366
  /* @__PURE__ */ jsx(
31768
31367
  Button$1,
31769
31368
  {
@@ -32732,7 +32331,7 @@ function TimePicker({
32732
32331
  )
32733
32332
  ] })
32734
32333
  ] }),
32735
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t", children: [
32334
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t border-border", children: [
32736
32335
  /* @__PURE__ */ jsx(
32737
32336
  Button$1,
32738
32337
  {
@@ -33023,7 +32622,7 @@ function TimeRangePicker({
33023
32622
  }
33024
32623
  )
33025
32624
  ] }),
33026
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t", children: [
32625
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t border-border", children: [
33027
32626
  /* @__PURE__ */ jsx(
33028
32627
  Button$1,
33029
32628
  {
@@ -33376,7 +32975,7 @@ function DateTimePicker({
33376
32975
  )
33377
32976
  ] })
33378
32977
  ] }),
33379
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-2 border-t", children: [
32978
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-2 border-t border-border", children: [
33380
32979
  /* @__PURE__ */ jsx(
33381
32980
  Button$1,
33382
32981
  {
@@ -33946,7 +33545,7 @@ function DateTimeRangePicker({
33946
33545
  }
33947
33546
  )
33948
33547
  ] }),
33949
- (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t", children: [
33548
+ (props2.showFooter ?? true) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 pt-3 mt-3 border-t border-border", children: [
33950
33549
  /* @__PURE__ */ jsx(
33951
33550
  Button$1,
33952
33551
  {
@@ -36431,7 +36030,7 @@ function reducer(state, action) {
36431
36030
  function noop$1() {
36432
36031
  }
36433
36032
  var DIALOG_NAME = "Dialog";
36434
- var [createDialogContext, createDialogScope] = createContextScope$2(DIALOG_NAME);
36033
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
36435
36034
  var [DialogProvider$1, useDialogContext] = createDialogContext(DIALOG_NAME);
36436
36035
  var Dialog$1 = (props2) => {
36437
36036
  const {
@@ -36475,7 +36074,7 @@ var DialogTrigger$1 = React.forwardRef(
36475
36074
  const context = useDialogContext(TRIGGER_NAME$6, __scopeDialog);
36476
36075
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
36477
36076
  return /* @__PURE__ */ jsx(
36478
- Primitive$6.button,
36077
+ Primitive.button,
36479
36078
  {
36480
36079
  type: "button",
36481
36080
  "aria-haspopup": "dialog",
@@ -36510,7 +36109,7 @@ var DialogOverlay$1 = React.forwardRef(
36510
36109
  }
36511
36110
  );
36512
36111
  DialogOverlay$1.displayName = OVERLAY_NAME$1;
36513
- var Slot$1 = /* @__PURE__ */ createSlot$7("DialogOverlay.RemoveScroll");
36112
+ var Slot$1 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
36514
36113
  var DialogOverlayImpl = React.forwardRef(
36515
36114
  (props2, forwardedRef) => {
36516
36115
  const { __scopeDialog, ...overlayProps } = props2;
@@ -36519,7 +36118,7 @@ var DialogOverlayImpl = React.forwardRef(
36519
36118
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
36520
36119
  // ie. when `Overlay` and `Content` are siblings
36521
36120
  /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
36522
- Primitive$6.div,
36121
+ Primitive.div,
36523
36122
  {
36524
36123
  "data-state": getState(context.open),
36525
36124
  ...overlayProps,
@@ -36660,7 +36259,7 @@ var DialogTitle$1 = React.forwardRef(
36660
36259
  (props2, forwardedRef) => {
36661
36260
  const { __scopeDialog, ...titleProps } = props2;
36662
36261
  const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
36663
- return /* @__PURE__ */ jsx(Primitive$6.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
36262
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
36664
36263
  }
36665
36264
  );
36666
36265
  DialogTitle$1.displayName = TITLE_NAME$1;
@@ -36669,7 +36268,7 @@ var DialogDescription$1 = React.forwardRef(
36669
36268
  (props2, forwardedRef) => {
36670
36269
  const { __scopeDialog, ...descriptionProps } = props2;
36671
36270
  const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
36672
- return /* @__PURE__ */ jsx(Primitive$6.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
36271
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
36673
36272
  }
36674
36273
  );
36675
36274
  DialogDescription$1.displayName = DESCRIPTION_NAME$1;
@@ -36679,7 +36278,7 @@ var DialogClose$1 = React.forwardRef(
36679
36278
  const { __scopeDialog, ...closeProps } = props2;
36680
36279
  const context = useDialogContext(CLOSE_NAME, __scopeDialog);
36681
36280
  return /* @__PURE__ */ jsx(
36682
- Primitive$6.button,
36281
+ Primitive.button,
36683
36282
  {
36684
36283
  type: "button",
36685
36284
  ...closeProps,
@@ -36859,198 +36458,9 @@ function DialogDescription({
36859
36458
  }
36860
36459
  );
36861
36460
  }
36862
- function createContextScope$1(scopeName, createContextScopeDeps = []) {
36863
- let defaultContexts = [];
36864
- function createContext3(rootComponentName, defaultContext) {
36865
- const BaseContext = React.createContext(defaultContext);
36866
- BaseContext.displayName = rootComponentName + "Context";
36867
- const index2 = defaultContexts.length;
36868
- defaultContexts = [...defaultContexts, defaultContext];
36869
- const Provider2 = (props2) => {
36870
- var _a2;
36871
- const { scope, children, ...context } = props2;
36872
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
36873
- const value = React.useMemo(() => context, Object.values(context));
36874
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
36875
- };
36876
- Provider2.displayName = rootComponentName + "Provider";
36877
- function useContext2(consumerName, scope) {
36878
- var _a2;
36879
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
36880
- const context = React.useContext(Context);
36881
- if (context) return context;
36882
- if (defaultContext !== void 0) return defaultContext;
36883
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
36884
- }
36885
- return [Provider2, useContext2];
36886
- }
36887
- const createScope = () => {
36888
- const scopeContexts = defaultContexts.map((defaultContext) => {
36889
- return React.createContext(defaultContext);
36890
- });
36891
- return function useScope(scope) {
36892
- const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
36893
- return React.useMemo(
36894
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
36895
- [scope, contexts]
36896
- );
36897
- };
36898
- };
36899
- createScope.scopeName = scopeName;
36900
- return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
36901
- }
36902
- function composeContextScopes$1(...scopes) {
36903
- const baseScope = scopes[0];
36904
- if (scopes.length === 1) return baseScope;
36905
- const createScope = () => {
36906
- const scopeHooks = scopes.map((createScope2) => ({
36907
- useScope: createScope2(),
36908
- scopeName: createScope2.scopeName
36909
- }));
36910
- return function useComposedScopes(overrideScopes) {
36911
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
36912
- const scopeProps = useScope(overrideScopes);
36913
- const currentScope = scopeProps[`__scope${scopeName}`];
36914
- return { ...nextScopes2, ...currentScope };
36915
- }, {});
36916
- return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
36917
- };
36918
- };
36919
- createScope.scopeName = baseScope.scopeName;
36920
- return createScope;
36921
- }
36922
- var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
36923
- var use$3 = React[" use ".trim().toString()];
36924
- function isPromiseLike$3(value) {
36925
- return typeof value === "object" && value !== null && "then" in value;
36926
- }
36927
- function isLazyComponent$3(element) {
36928
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
36929
- }
36930
- // @__NO_SIDE_EFFECTS__
36931
- function createSlot$3(ownerName) {
36932
- const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
36933
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
36934
- let { children, ...slotProps } = props2;
36935
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
36936
- children = use$3(children._payload);
36937
- }
36938
- const childrenArray = React.Children.toArray(children);
36939
- const slottable = childrenArray.find(isSlottable$3);
36940
- if (slottable) {
36941
- const newElement = slottable.props.children;
36942
- const newChildren = childrenArray.map((child) => {
36943
- if (child === slottable) {
36944
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
36945
- return React.isValidElement(newElement) ? newElement.props.children : null;
36946
- } else {
36947
- return child;
36948
- }
36949
- });
36950
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
36951
- }
36952
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
36953
- });
36954
- Slot2.displayName = `${ownerName}.Slot`;
36955
- return Slot2;
36956
- }
36957
- // @__NO_SIDE_EFFECTS__
36958
- function createSlotClone$3(ownerName) {
36959
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
36960
- let { children, ...slotProps } = props2;
36961
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
36962
- children = use$3(children._payload);
36963
- }
36964
- if (React.isValidElement(children)) {
36965
- const childrenRef = getElementRef$3(children);
36966
- const props22 = mergeProps$3(slotProps, children.props);
36967
- if (children.type !== React.Fragment) {
36968
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
36969
- }
36970
- return React.cloneElement(children, props22);
36971
- }
36972
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
36973
- });
36974
- SlotClone.displayName = `${ownerName}.SlotClone`;
36975
- return SlotClone;
36976
- }
36977
- var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
36978
- function isSlottable$3(child) {
36979
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
36980
- }
36981
- function mergeProps$3(slotProps, childProps) {
36982
- const overrideProps = { ...childProps };
36983
- for (const propName in childProps) {
36984
- const slotPropValue = slotProps[propName];
36985
- const childPropValue = childProps[propName];
36986
- const isHandler = /^on[A-Z]/.test(propName);
36987
- if (isHandler) {
36988
- if (slotPropValue && childPropValue) {
36989
- overrideProps[propName] = (...args) => {
36990
- const result = childPropValue(...args);
36991
- slotPropValue(...args);
36992
- return result;
36993
- };
36994
- } else if (slotPropValue) {
36995
- overrideProps[propName] = slotPropValue;
36996
- }
36997
- } else if (propName === "style") {
36998
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
36999
- } else if (propName === "className") {
37000
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
37001
- }
37002
- }
37003
- return { ...slotProps, ...overrideProps };
37004
- }
37005
- function getElementRef$3(element) {
37006
- var _a2, _b;
37007
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
37008
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
37009
- if (mayWarn) {
37010
- return element.ref;
37011
- }
37012
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
37013
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
37014
- if (mayWarn) {
37015
- return element.props.ref;
37016
- }
37017
- return element.props.ref || element.ref;
37018
- }
37019
- var NODES$3 = [
37020
- "a",
37021
- "button",
37022
- "div",
37023
- "form",
37024
- "h2",
37025
- "h3",
37026
- "img",
37027
- "input",
37028
- "label",
37029
- "li",
37030
- "nav",
37031
- "ol",
37032
- "p",
37033
- "select",
37034
- "span",
37035
- "svg",
37036
- "ul"
37037
- ];
37038
- var Primitive$3 = NODES$3.reduce((primitive, node) => {
37039
- const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
37040
- const Node2 = React.forwardRef((props2, forwardedRef) => {
37041
- const { asChild, ...primitiveProps } = props2;
37042
- const Comp = asChild ? Slot2 : node;
37043
- if (typeof window !== "undefined") {
37044
- window[Symbol.for("radix-ui")] = true;
37045
- }
37046
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
37047
- });
37048
- Node2.displayName = `Primitive.${node}`;
37049
- return { ...primitive, [node]: Node2 };
37050
- }, {});
37051
36461
  var PROGRESS_NAME = "Progress";
37052
36462
  var DEFAULT_MAX = 100;
37053
- var [createProgressContext] = createContextScope$1(PROGRESS_NAME);
36463
+ var [createProgressContext] = createContextScope(PROGRESS_NAME);
37054
36464
  var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
37055
36465
  var Progress$1 = React.forwardRef(
37056
36466
  (props2, forwardedRef) => {
@@ -37071,7 +36481,7 @@ var Progress$1 = React.forwardRef(
37071
36481
  const value = isValidValueNumber(valueProp, max2) ? valueProp : null;
37072
36482
  const valueLabel = isNumber$3(value) ? getValueLabel(value, max2) : void 0;
37073
36483
  return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max: max2, children: /* @__PURE__ */ jsx(
37074
- Primitive$3.div,
36484
+ Primitive.div,
37075
36485
  {
37076
36486
  "aria-valuemax": max2,
37077
36487
  "aria-valuemin": 0,
@@ -37094,7 +36504,7 @@ var ProgressIndicator = React.forwardRef(
37094
36504
  const { __scopeProgress, ...indicatorProps } = props2;
37095
36505
  const context = useProgressContext(INDICATOR_NAME$4, __scopeProgress);
37096
36506
  return /* @__PURE__ */ jsx(
37097
- Primitive$3.div,
36507
+ Primitive.div,
37098
36508
  {
37099
36509
  "data-state": getProgressState(context.value, context.max),
37100
36510
  "data-value": context.value ?? void 0,
@@ -39522,7 +38932,7 @@ var SUB_CLOSE_KEYS = {
39522
38932
  };
39523
38933
  var MENU_NAME$1 = "Menu";
39524
38934
  var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(MENU_NAME$1);
39525
- var [createMenuContext, createMenuScope] = createContextScope$2(MENU_NAME$1, [
38935
+ var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME$1, [
39526
38936
  createCollectionScope$3,
39527
38937
  createPopperScope,
39528
38938
  createRovingFocusGroupScope
@@ -39646,7 +39056,7 @@ var MenuRootContentNonModal = React.forwardRef((props2, forwardedRef) => {
39646
39056
  }
39647
39057
  );
39648
39058
  });
39649
- var Slot = /* @__PURE__ */ createSlot$7("MenuContent.ScrollLock");
39059
+ var Slot = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
39650
39060
  var MenuContentImpl = React.forwardRef(
39651
39061
  (props2, forwardedRef) => {
39652
39062
  const {
@@ -39838,7 +39248,7 @@ var GROUP_NAME$3 = "MenuGroup";
39838
39248
  var MenuGroup = React.forwardRef(
39839
39249
  (props2, forwardedRef) => {
39840
39250
  const { __scopeMenu, ...groupProps } = props2;
39841
- return /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", ...groupProps, ref: forwardedRef });
39251
+ return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
39842
39252
  }
39843
39253
  );
39844
39254
  MenuGroup.displayName = GROUP_NAME$3;
@@ -39846,7 +39256,7 @@ var LABEL_NAME$3 = "MenuLabel";
39846
39256
  var MenuLabel = React.forwardRef(
39847
39257
  (props2, forwardedRef) => {
39848
39258
  const { __scopeMenu, ...labelProps } = props2;
39849
- return /* @__PURE__ */ jsx(Primitive$6.div, { ...labelProps, ref: forwardedRef });
39259
+ return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
39850
39260
  }
39851
39261
  );
39852
39262
  MenuLabel.displayName = LABEL_NAME$3;
@@ -39924,7 +39334,7 @@ var MenuItemImpl = React.forwardRef(
39924
39334
  disabled,
39925
39335
  textValue: textValue ?? textContent,
39926
39336
  children: /* @__PURE__ */ jsx(Item$2, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
39927
- Primitive$6.div,
39337
+ Primitive.div,
39928
39338
  {
39929
39339
  role: "menuitem",
39930
39340
  "data-highlighted": isFocused ? "" : void 0,
@@ -40035,7 +39445,7 @@ var MenuItemIndicator = React.forwardRef(
40035
39445
  {
40036
39446
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
40037
39447
  children: /* @__PURE__ */ jsx(
40038
- Primitive$6.span,
39448
+ Primitive.span,
40039
39449
  {
40040
39450
  ...itemIndicatorProps,
40041
39451
  ref: forwardedRef,
@@ -40052,7 +39462,7 @@ var MenuSeparator = React.forwardRef(
40052
39462
  (props2, forwardedRef) => {
40053
39463
  const { __scopeMenu, ...separatorProps } = props2;
40054
39464
  return /* @__PURE__ */ jsx(
40055
- Primitive$6.div,
39465
+ Primitive.div,
40056
39466
  {
40057
39467
  role: "separator",
40058
39468
  "aria-orientation": "horizontal",
@@ -40139,7 +39549,7 @@ var MenuSubTrigger = React.forwardRef(
40139
39549
  "aria-controls": subContext.contentId,
40140
39550
  "data-state": getOpenState$1(context.open),
40141
39551
  ...props2,
40142
- ref: composeRefs$1(forwardedRef, subContext.onTriggerChange),
39552
+ ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
40143
39553
  onClick: (event) => {
40144
39554
  var _a2;
40145
39555
  (_a2 = props2.onClick) == null ? void 0 : _a2.call(props2, event);
@@ -40334,7 +39744,7 @@ var Sub = MenuSub;
40334
39744
  var SubTrigger = MenuSubTrigger;
40335
39745
  var SubContent = MenuSubContent;
40336
39746
  var DROPDOWN_MENU_NAME = "DropdownMenu";
40337
- var [createDropdownMenuContext] = createContextScope$2(
39747
+ var [createDropdownMenuContext] = createContextScope(
40338
39748
  DROPDOWN_MENU_NAME,
40339
39749
  [createMenuScope]
40340
39750
  );
@@ -40381,7 +39791,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
40381
39791
  const context = useDropdownMenuContext(TRIGGER_NAME$5, __scopeDropdownMenu);
40382
39792
  const menuScope = useMenuScope$2(__scopeDropdownMenu);
40383
39793
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
40384
- Primitive$6.button,
39794
+ Primitive.button,
40385
39795
  {
40386
39796
  type: "button",
40387
39797
  id: context.triggerId,
@@ -40392,7 +39802,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
40392
39802
  "data-disabled": disabled ? "" : void 0,
40393
39803
  disabled,
40394
39804
  ...triggerProps,
40395
- ref: composeRefs$1(forwardedRef, context.triggerRef),
39805
+ ref: composeRefs$2(forwardedRef, context.triggerRef),
40396
39806
  onPointerDown: composeEventHandlers$1(props2.onPointerDown, (event) => {
40397
39807
  if (!disabled && event.button === 0 && event.ctrlKey === false) {
40398
39808
  context.onOpenToggle();
@@ -46723,7 +46133,7 @@ function dotAccessor(path) {
46723
46133
  return (row) => lodashExports.get(row, path);
46724
46134
  }
46725
46135
  var ROOT_NAME = "AlertDialog";
46726
- var [createAlertDialogContext] = createContextScope$2(ROOT_NAME, [
46136
+ var [createAlertDialogContext] = createContextScope(ROOT_NAME, [
46727
46137
  createDialogScope
46728
46138
  ]);
46729
46139
  var useDialogScope = createDialogScope();
@@ -46992,7 +46402,7 @@ function AlertDialogCancel({
46992
46402
  }
46993
46403
  const DialogContext = createContext(null);
46994
46404
  function useDialogController() {
46995
- const ctx = use$7(DialogContext);
46405
+ const ctx = use$1(DialogContext);
46996
46406
  if (!ctx)
46997
46407
  throw new Error("useDialogController must be used within DialogProvider");
46998
46408
  return ctx;
@@ -49798,7 +49208,7 @@ function ThemeBridge({ children, ...props2 }) {
49798
49208
  return /* @__PURE__ */ jsx(ThemeProviderContext, { ...props2, value, children });
49799
49209
  }
49800
49210
  const useTheme = () => {
49801
- const context = use$7(ThemeProviderContext);
49211
+ const context = use$1(ThemeProviderContext);
49802
49212
  if (context === void 0)
49803
49213
  throw new Error("useTheme must be used within a ThemeProvider");
49804
49214
  return context;
@@ -51193,135 +50603,6 @@ const Toaster$1 = /* @__PURE__ */ React__default.forwardRef(function Toaster(pro
51193
50603
  }))
51194
50604
  );
51195
50605
  });
51196
- var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
51197
- var use$2 = React[" use ".trim().toString()];
51198
- function isPromiseLike$2(value) {
51199
- return typeof value === "object" && value !== null && "then" in value;
51200
- }
51201
- function isLazyComponent$2(element) {
51202
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
51203
- }
51204
- // @__NO_SIDE_EFFECTS__
51205
- function createSlot$2(ownerName) {
51206
- const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
51207
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
51208
- let { children, ...slotProps } = props2;
51209
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
51210
- children = use$2(children._payload);
51211
- }
51212
- const childrenArray = React.Children.toArray(children);
51213
- const slottable = childrenArray.find(isSlottable$2);
51214
- if (slottable) {
51215
- const newElement = slottable.props.children;
51216
- const newChildren = childrenArray.map((child) => {
51217
- if (child === slottable) {
51218
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
51219
- return React.isValidElement(newElement) ? newElement.props.children : null;
51220
- } else {
51221
- return child;
51222
- }
51223
- });
51224
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
51225
- }
51226
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
51227
- });
51228
- Slot2.displayName = `${ownerName}.Slot`;
51229
- return Slot2;
51230
- }
51231
- // @__NO_SIDE_EFFECTS__
51232
- function createSlotClone$2(ownerName) {
51233
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
51234
- let { children, ...slotProps } = props2;
51235
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
51236
- children = use$2(children._payload);
51237
- }
51238
- if (React.isValidElement(children)) {
51239
- const childrenRef = getElementRef$2(children);
51240
- const props22 = mergeProps$2(slotProps, children.props);
51241
- if (children.type !== React.Fragment) {
51242
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
51243
- }
51244
- return React.cloneElement(children, props22);
51245
- }
51246
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
51247
- });
51248
- SlotClone.displayName = `${ownerName}.SlotClone`;
51249
- return SlotClone;
51250
- }
51251
- var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
51252
- function isSlottable$2(child) {
51253
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
51254
- }
51255
- function mergeProps$2(slotProps, childProps) {
51256
- const overrideProps = { ...childProps };
51257
- for (const propName in childProps) {
51258
- const slotPropValue = slotProps[propName];
51259
- const childPropValue = childProps[propName];
51260
- const isHandler = /^on[A-Z]/.test(propName);
51261
- if (isHandler) {
51262
- if (slotPropValue && childPropValue) {
51263
- overrideProps[propName] = (...args) => {
51264
- const result = childPropValue(...args);
51265
- slotPropValue(...args);
51266
- return result;
51267
- };
51268
- } else if (slotPropValue) {
51269
- overrideProps[propName] = slotPropValue;
51270
- }
51271
- } else if (propName === "style") {
51272
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
51273
- } else if (propName === "className") {
51274
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
51275
- }
51276
- }
51277
- return { ...slotProps, ...overrideProps };
51278
- }
51279
- function getElementRef$2(element) {
51280
- var _a2, _b;
51281
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
51282
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51283
- if (mayWarn) {
51284
- return element.ref;
51285
- }
51286
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
51287
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51288
- if (mayWarn) {
51289
- return element.props.ref;
51290
- }
51291
- return element.props.ref || element.ref;
51292
- }
51293
- var NODES$2 = [
51294
- "a",
51295
- "button",
51296
- "div",
51297
- "form",
51298
- "h2",
51299
- "h3",
51300
- "img",
51301
- "input",
51302
- "label",
51303
- "li",
51304
- "nav",
51305
- "ol",
51306
- "p",
51307
- "select",
51308
- "span",
51309
- "svg",
51310
- "ul"
51311
- ];
51312
- var Primitive$2 = NODES$2.reduce((primitive, node) => {
51313
- const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
51314
- const Node2 = React.forwardRef((props2, forwardedRef) => {
51315
- const { asChild, ...primitiveProps } = props2;
51316
- const Comp = asChild ? Slot2 : node;
51317
- if (typeof window !== "undefined") {
51318
- window[Symbol.for("radix-ui")] = true;
51319
- }
51320
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
51321
- });
51322
- Node2.displayName = `Primitive.${node}`;
51323
- return { ...primitive, [node]: Node2 };
51324
- }, {});
51325
50606
  var NAME$1 = "AspectRatio";
51326
50607
  var AspectRatio$1 = React.forwardRef(
51327
50608
  (props2, forwardedRef) => {
@@ -51338,7 +50619,7 @@ var AspectRatio$1 = React.forwardRef(
51338
50619
  },
51339
50620
  "data-radix-aspect-ratio-wrapper": "",
51340
50621
  children: /* @__PURE__ */ jsx(
51341
- Primitive$2.div,
50622
+ Primitive.div,
51342
50623
  {
51343
50624
  ...aspectRatioProps,
51344
50625
  ref: forwardedRef,
@@ -51364,195 +50645,6 @@ function AspectRatio({
51364
50645
  }) {
51365
50646
  return /* @__PURE__ */ jsx(Root$5, { "data-slot": "aspect-ratio", ...props2 });
51366
50647
  }
51367
- function createContextScope(scopeName, createContextScopeDeps = []) {
51368
- let defaultContexts = [];
51369
- function createContext3(rootComponentName, defaultContext) {
51370
- const BaseContext = React.createContext(defaultContext);
51371
- BaseContext.displayName = rootComponentName + "Context";
51372
- const index2 = defaultContexts.length;
51373
- defaultContexts = [...defaultContexts, defaultContext];
51374
- const Provider2 = (props2) => {
51375
- var _a2;
51376
- const { scope, children, ...context } = props2;
51377
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
51378
- const value = React.useMemo(() => context, Object.values(context));
51379
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
51380
- };
51381
- Provider2.displayName = rootComponentName + "Provider";
51382
- function useContext2(consumerName, scope) {
51383
- var _a2;
51384
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
51385
- const context = React.useContext(Context);
51386
- if (context) return context;
51387
- if (defaultContext !== void 0) return defaultContext;
51388
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
51389
- }
51390
- return [Provider2, useContext2];
51391
- }
51392
- const createScope = () => {
51393
- const scopeContexts = defaultContexts.map((defaultContext) => {
51394
- return React.createContext(defaultContext);
51395
- });
51396
- return function useScope(scope) {
51397
- const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
51398
- return React.useMemo(
51399
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
51400
- [scope, contexts]
51401
- );
51402
- };
51403
- };
51404
- createScope.scopeName = scopeName;
51405
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
51406
- }
51407
- function composeContextScopes(...scopes) {
51408
- const baseScope = scopes[0];
51409
- if (scopes.length === 1) return baseScope;
51410
- const createScope = () => {
51411
- const scopeHooks = scopes.map((createScope2) => ({
51412
- useScope: createScope2(),
51413
- scopeName: createScope2.scopeName
51414
- }));
51415
- return function useComposedScopes(overrideScopes) {
51416
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
51417
- const scopeProps = useScope(overrideScopes);
51418
- const currentScope = scopeProps[`__scope${scopeName}`];
51419
- return { ...nextScopes2, ...currentScope };
51420
- }, {});
51421
- return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
51422
- };
51423
- };
51424
- createScope.scopeName = baseScope.scopeName;
51425
- return createScope;
51426
- }
51427
- var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
51428
- var use$1 = React[" use ".trim().toString()];
51429
- function isPromiseLike$1(value) {
51430
- return typeof value === "object" && value !== null && "then" in value;
51431
- }
51432
- function isLazyComponent$1(element) {
51433
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
51434
- }
51435
- // @__NO_SIDE_EFFECTS__
51436
- function createSlot$1(ownerName) {
51437
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
51438
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
51439
- let { children, ...slotProps } = props2;
51440
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
51441
- children = use$1(children._payload);
51442
- }
51443
- const childrenArray = React.Children.toArray(children);
51444
- const slottable = childrenArray.find(isSlottable$1);
51445
- if (slottable) {
51446
- const newElement = slottable.props.children;
51447
- const newChildren = childrenArray.map((child) => {
51448
- if (child === slottable) {
51449
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
51450
- return React.isValidElement(newElement) ? newElement.props.children : null;
51451
- } else {
51452
- return child;
51453
- }
51454
- });
51455
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
51456
- }
51457
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
51458
- });
51459
- Slot2.displayName = `${ownerName}.Slot`;
51460
- return Slot2;
51461
- }
51462
- // @__NO_SIDE_EFFECTS__
51463
- function createSlotClone$1(ownerName) {
51464
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
51465
- let { children, ...slotProps } = props2;
51466
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
51467
- children = use$1(children._payload);
51468
- }
51469
- if (React.isValidElement(children)) {
51470
- const childrenRef = getElementRef$1(children);
51471
- const props22 = mergeProps$1(slotProps, children.props);
51472
- if (children.type !== React.Fragment) {
51473
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
51474
- }
51475
- return React.cloneElement(children, props22);
51476
- }
51477
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
51478
- });
51479
- SlotClone.displayName = `${ownerName}.SlotClone`;
51480
- return SlotClone;
51481
- }
51482
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
51483
- function isSlottable$1(child) {
51484
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
51485
- }
51486
- function mergeProps$1(slotProps, childProps) {
51487
- const overrideProps = { ...childProps };
51488
- for (const propName in childProps) {
51489
- const slotPropValue = slotProps[propName];
51490
- const childPropValue = childProps[propName];
51491
- const isHandler = /^on[A-Z]/.test(propName);
51492
- if (isHandler) {
51493
- if (slotPropValue && childPropValue) {
51494
- overrideProps[propName] = (...args) => {
51495
- const result = childPropValue(...args);
51496
- slotPropValue(...args);
51497
- return result;
51498
- };
51499
- } else if (slotPropValue) {
51500
- overrideProps[propName] = slotPropValue;
51501
- }
51502
- } else if (propName === "style") {
51503
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
51504
- } else if (propName === "className") {
51505
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
51506
- }
51507
- }
51508
- return { ...slotProps, ...overrideProps };
51509
- }
51510
- function getElementRef$1(element) {
51511
- var _a2, _b;
51512
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
51513
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51514
- if (mayWarn) {
51515
- return element.ref;
51516
- }
51517
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
51518
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51519
- if (mayWarn) {
51520
- return element.props.ref;
51521
- }
51522
- return element.props.ref || element.ref;
51523
- }
51524
- var NODES$1 = [
51525
- "a",
51526
- "button",
51527
- "div",
51528
- "form",
51529
- "h2",
51530
- "h3",
51531
- "img",
51532
- "input",
51533
- "label",
51534
- "li",
51535
- "nav",
51536
- "ol",
51537
- "p",
51538
- "select",
51539
- "span",
51540
- "svg",
51541
- "ul"
51542
- ];
51543
- var Primitive$1 = NODES$1.reduce((primitive, node) => {
51544
- const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
51545
- const Node2 = React.forwardRef((props2, forwardedRef) => {
51546
- const { asChild, ...primitiveProps } = props2;
51547
- const Comp = asChild ? Slot2 : node;
51548
- if (typeof window !== "undefined") {
51549
- window[Symbol.for("radix-ui")] = true;
51550
- }
51551
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
51552
- });
51553
- Node2.displayName = `Primitive.${node}`;
51554
- return { ...primitive, [node]: Node2 };
51555
- }, {});
51556
50648
  var shim = { exports: {} };
51557
50649
  var useSyncExternalStoreShim_production = {};
51558
50650
  /**
@@ -51721,7 +50813,7 @@ var Avatar$1 = React.forwardRef(
51721
50813
  scope: __scopeAvatar,
51722
50814
  imageLoadingStatus,
51723
50815
  onImageLoadingStatusChange: setImageLoadingStatus,
51724
- children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
50816
+ children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
51725
50817
  }
51726
50818
  );
51727
50819
  }
@@ -51743,7 +50835,7 @@ var AvatarImage$1 = React.forwardRef(
51743
50835
  handleLoadingStatusChange(imageLoadingStatus);
51744
50836
  }
51745
50837
  }, [imageLoadingStatus, handleLoadingStatusChange]);
51746
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
50838
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
51747
50839
  }
51748
50840
  );
51749
50841
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -51759,7 +50851,7 @@ var AvatarFallback$1 = React.forwardRef(
51759
50851
  return () => window.clearTimeout(timerId);
51760
50852
  }
51761
50853
  }, [delayMs]);
51762
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
50854
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
51763
50855
  }
51764
50856
  );
51765
50857
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -59797,135 +58889,6 @@ function D(_2) {
59797
58889
  function W(_2, C, h) {
59798
58890
  return _2 = h && h.length > 0 ? `${_2 + " " + h.join(" ")}` : _2, G(_2, C, D(_2), D(C), 0, 0, {});
59799
58891
  }
59800
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
59801
- var use = React[" use ".trim().toString()];
59802
- function isPromiseLike(value) {
59803
- return typeof value === "object" && value !== null && "then" in value;
59804
- }
59805
- function isLazyComponent(element) {
59806
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
59807
- }
59808
- // @__NO_SIDE_EFFECTS__
59809
- function createSlot(ownerName) {
59810
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
59811
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
59812
- let { children, ...slotProps } = props2;
59813
- if (isLazyComponent(children) && typeof use === "function") {
59814
- children = use(children._payload);
59815
- }
59816
- const childrenArray = React.Children.toArray(children);
59817
- const slottable = childrenArray.find(isSlottable);
59818
- if (slottable) {
59819
- const newElement = slottable.props.children;
59820
- const newChildren = childrenArray.map((child) => {
59821
- if (child === slottable) {
59822
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
59823
- return React.isValidElement(newElement) ? newElement.props.children : null;
59824
- } else {
59825
- return child;
59826
- }
59827
- });
59828
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
59829
- }
59830
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
59831
- });
59832
- Slot2.displayName = `${ownerName}.Slot`;
59833
- return Slot2;
59834
- }
59835
- // @__NO_SIDE_EFFECTS__
59836
- function createSlotClone(ownerName) {
59837
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
59838
- let { children, ...slotProps } = props2;
59839
- if (isLazyComponent(children) && typeof use === "function") {
59840
- children = use(children._payload);
59841
- }
59842
- if (React.isValidElement(children)) {
59843
- const childrenRef = getElementRef(children);
59844
- const props22 = mergeProps(slotProps, children.props);
59845
- if (children.type !== React.Fragment) {
59846
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
59847
- }
59848
- return React.cloneElement(children, props22);
59849
- }
59850
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
59851
- });
59852
- SlotClone.displayName = `${ownerName}.SlotClone`;
59853
- return SlotClone;
59854
- }
59855
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
59856
- function isSlottable(child) {
59857
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
59858
- }
59859
- function mergeProps(slotProps, childProps) {
59860
- const overrideProps = { ...childProps };
59861
- for (const propName in childProps) {
59862
- const slotPropValue = slotProps[propName];
59863
- const childPropValue = childProps[propName];
59864
- const isHandler = /^on[A-Z]/.test(propName);
59865
- if (isHandler) {
59866
- if (slotPropValue && childPropValue) {
59867
- overrideProps[propName] = (...args) => {
59868
- const result = childPropValue(...args);
59869
- slotPropValue(...args);
59870
- return result;
59871
- };
59872
- } else if (slotPropValue) {
59873
- overrideProps[propName] = slotPropValue;
59874
- }
59875
- } else if (propName === "style") {
59876
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
59877
- } else if (propName === "className") {
59878
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
59879
- }
59880
- }
59881
- return { ...slotProps, ...overrideProps };
59882
- }
59883
- function getElementRef(element) {
59884
- var _a2, _b;
59885
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
59886
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59887
- if (mayWarn) {
59888
- return element.ref;
59889
- }
59890
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
59891
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59892
- if (mayWarn) {
59893
- return element.props.ref;
59894
- }
59895
- return element.props.ref || element.ref;
59896
- }
59897
- var NODES = [
59898
- "a",
59899
- "button",
59900
- "div",
59901
- "form",
59902
- "h2",
59903
- "h3",
59904
- "img",
59905
- "input",
59906
- "label",
59907
- "li",
59908
- "nav",
59909
- "ol",
59910
- "p",
59911
- "select",
59912
- "span",
59913
- "svg",
59914
- "ul"
59915
- ];
59916
- var Primitive = NODES.reduce((primitive, node) => {
59917
- const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
59918
- const Node2 = React.forwardRef((props2, forwardedRef) => {
59919
- const { asChild, ...primitiveProps } = props2;
59920
- const Comp = asChild ? Slot2 : node;
59921
- if (typeof window !== "undefined") {
59922
- window[Symbol.for("radix-ui")] = true;
59923
- }
59924
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
59925
- });
59926
- Node2.displayName = `Primitive.${node}`;
59927
- return { ...primitive, [node]: Node2 };
59928
- }, {});
59929
58892
  var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o2, n2) => W(r2, o2, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o2) => {
59930
58893
  let n2 = L(() => {
59931
58894
  var e2, a2;
@@ -60121,15 +59084,15 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
60121
59084
  }
60122
59085
  if (!x2) return null;
60123
59086
  let { disabled: A, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q } = r2;
60124
- return React.createElement(Primitive.div, { ref: composeRefs$1(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
59087
+ return React.createElement(Primitive.div, { ref: composeRefs$2(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
60125
59088
  }), Ee = React.forwardRef((r2, o2) => {
60126
59089
  let { heading: n2, children: u2, forceMount: c2, ...d } = r2, f = useId$1(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId$1(), R = K(), x2 = P((S) => c2 || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
60127
59090
  k(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b2]);
60128
59091
  let C = React.useMemo(() => ({ id: f, forceMount: c2 }), [c2]);
60129
- return React.createElement(Primitive.div, { ref: composeRefs$1(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
59092
+ return React.createElement(Primitive.div, { ref: composeRefs$2(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
60130
59093
  }), ye = React.forwardRef((r2, o2) => {
60131
59094
  let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d = P((f) => !f.search);
60132
- return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$1(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
59095
+ return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$2(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
60133
59096
  }), Se = React.forwardRef((r2, o2) => {
60134
59097
  let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
60135
59098
  return React.useEffect(() => {
@@ -60151,7 +59114,7 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
60151
59114
  cancelAnimationFrame(x2), C.unobserve(m2);
60152
59115
  };
60153
59116
  }
60154
- }, []), React.createElement(Primitive.div, { ref: composeRefs$1(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$1(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
59117
+ }, []), React.createElement(Primitive.div, { ref: composeRefs$2(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$2(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
60155
59118
  }), xe = React.forwardRef((r2, o2) => {
60156
59119
  let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d, container: f, ...p2 } = r2;
60157
59120
  return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$3, { container: f }, React.createElement(Overlay$1, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$2, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, React.createElement(me, { ref: o2, ...p2 }))));
@@ -60373,7 +59336,7 @@ function CommandShortcut({
60373
59336
  );
60374
59337
  }
60375
59338
  var CONTEXT_MENU_NAME = "ContextMenu";
60376
- var [createContextMenuContext] = createContextScope$2(CONTEXT_MENU_NAME, [
59339
+ var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
60377
59340
  createMenuScope
60378
59341
  ]);
60379
59342
  var useMenuScope$1 = createMenuScope();
@@ -60436,7 +59399,7 @@ var ContextMenuTrigger$1 = React.forwardRef(
60436
59399
  return /* @__PURE__ */ jsxs(Fragment, { children: [
60437
59400
  /* @__PURE__ */ jsx(Anchor2, { ...menuScope, virtualRef }),
60438
59401
  /* @__PURE__ */ jsx(
60439
- Primitive$6.span,
59402
+ Primitive.span,
60440
59403
  {
60441
59404
  "data-state": context.open ? "open" : "closed",
60442
59405
  "data-disabled": disabled ? "" : void 0,
@@ -62534,7 +61497,7 @@ function FormMessage({ className, ...props2 }) {
62534
61497
  }
62535
61498
  var originalBodyUserSelect;
62536
61499
  var HOVERCARD_NAME = "HoverCard";
62537
- var [createHoverCardContext] = createContextScope$2(HOVERCARD_NAME, [
61500
+ var [createHoverCardContext] = createContextScope(HOVERCARD_NAME, [
62538
61501
  createPopperScope
62539
61502
  ]);
62540
61503
  var usePopperScope = createPopperScope();
@@ -62600,7 +61563,7 @@ var HoverCardTrigger$1 = React.forwardRef(
62600
61563
  const context = useHoverCardContext(TRIGGER_NAME$2, __scopeHoverCard);
62601
61564
  const popperScope = usePopperScope(__scopeHoverCard);
62602
61565
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
62603
- Primitive$6.a,
61566
+ Primitive.a,
62604
61567
  {
62605
61568
  "data-state": context.open ? "open" : "closed",
62606
61569
  ...triggerProps,
@@ -63047,7 +62010,7 @@ function InputOTPSeparator({ ...props2 }) {
63047
62010
  }
63048
62011
  var MENUBAR_NAME = "Menubar";
63049
62012
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(MENUBAR_NAME);
63050
- var [createMenubarContext] = createContextScope$2(MENUBAR_NAME, [
62013
+ var [createMenubarContext] = createContextScope(MENUBAR_NAME, [
63051
62014
  createCollectionScope$2,
63052
62015
  createRovingFocusGroupScope
63053
62016
  ]);
@@ -63106,7 +62069,7 @@ var Menubar$1 = React.forwardRef(
63106
62069
  dir: direction,
63107
62070
  currentTabStopId,
63108
62071
  onCurrentTabStopIdChange: setCurrentTabStopId,
63109
- children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
62072
+ children: /* @__PURE__ */ jsx(Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
63110
62073
  }
63111
62074
  ) }) })
63112
62075
  }
@@ -63174,7 +62137,7 @@ var MenubarTrigger$1 = React.forwardRef(
63174
62137
  focusable: !disabled,
63175
62138
  tabStopId: menuContext.value,
63176
62139
  children: /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
63177
- Primitive$6.button,
62140
+ Primitive.button,
63178
62141
  {
63179
62142
  type: "button",
63180
62143
  role: "menuitem",
@@ -63696,7 +62659,7 @@ function MenubarSubContent({
63696
62659
  var NAVIGATION_MENU_NAME = "NavigationMenu";
63697
62660
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(NAVIGATION_MENU_NAME);
63698
62661
  var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
63699
- var [createNavigationMenuContext] = createContextScope$2(
62662
+ var [createNavigationMenuContext] = createContextScope(
63700
62663
  NAVIGATION_MENU_NAME,
63701
62664
  [createCollectionScope$1, createFocusGroupCollectionScope]
63702
62665
  );
@@ -63799,7 +62762,7 @@ var NavigationMenu$1 = React.forwardRef(
63799
62762
  },
63800
62763
  onItemDismiss: () => setValue(""),
63801
62764
  children: /* @__PURE__ */ jsx(
63802
- Primitive$6.nav,
62765
+ Primitive.nav,
63803
62766
  {
63804
62767
  "aria-label": "Main",
63805
62768
  "data-orientation": orientation,
@@ -63843,7 +62806,7 @@ var NavigationMenuSub = React.forwardRef(
63843
62806
  onTriggerEnter: (itemValue) => setValue(itemValue),
63844
62807
  onItemSelect: (itemValue) => setValue(itemValue),
63845
62808
  onItemDismiss: () => setValue(""),
63846
- children: /* @__PURE__ */ jsx(Primitive$6.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
62809
+ children: /* @__PURE__ */ jsx(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
63847
62810
  }
63848
62811
  );
63849
62812
  }
@@ -63911,8 +62874,8 @@ var NavigationMenuList$1 = React.forwardRef(
63911
62874
  (props2, forwardedRef) => {
63912
62875
  const { __scopeNavigationMenu, ...listProps } = props2;
63913
62876
  const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
63914
- const list = /* @__PURE__ */ jsx(Primitive$6.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
63915
- return /* @__PURE__ */ jsx(Primitive$6.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
62877
+ const list = /* @__PURE__ */ jsx(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
62878
+ return /* @__PURE__ */ jsx(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
63916
62879
  }
63917
62880
  );
63918
62881
  NavigationMenuList$1.displayName = LIST_NAME;
@@ -63955,7 +62918,7 @@ var NavigationMenuItem$1 = React.forwardRef(
63955
62918
  onFocusProxyEnter: handleContentEntry,
63956
62919
  onRootContentClose: handleContentExit,
63957
62920
  onContentFocusOutside: handleContentExit,
63958
- children: /* @__PURE__ */ jsx(Primitive$6.li, { ...itemProps, ref: forwardedRef })
62921
+ children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })
63959
62922
  }
63960
62923
  );
63961
62924
  }
@@ -63975,7 +62938,7 @@ var NavigationMenuTrigger$1 = React.forwardRef((props2, forwardedRef) => {
63975
62938
  const open = itemContext.value === context.value;
63976
62939
  return /* @__PURE__ */ jsxs(Fragment, { children: [
63977
62940
  /* @__PURE__ */ jsx(Collection$1.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
63978
- Primitive$6.button,
62941
+ Primitive.button,
63979
62942
  {
63980
62943
  id: triggerId,
63981
62944
  disabled,
@@ -64049,7 +63012,7 @@ var NavigationMenuLink$1 = React.forwardRef(
64049
63012
  (props2, forwardedRef) => {
64050
63013
  const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props2;
64051
63014
  return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
64052
- Primitive$6.a,
63015
+ Primitive.a,
64053
63016
  {
64054
63017
  "data-active": active ? "" : void 0,
64055
63018
  "aria-current": active ? "page" : void 0,
@@ -64118,7 +63081,7 @@ var NavigationMenuIndicatorImpl = React.forwardRef((props2, forwardedRef) => {
64118
63081
  useResizeObserver$1(activeTrigger, handlePositionChange);
64119
63082
  useResizeObserver$1(context.indicatorTrack, handlePositionChange);
64120
63083
  return position ? /* @__PURE__ */ jsx(
64121
- Primitive$6.div,
63084
+ Primitive.div,
64122
63085
  {
64123
63086
  "aria-hidden": true,
64124
63087
  "data-state": isVisible ? "visible" : "hidden",
@@ -64327,7 +63290,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
64327
63290
  };
64328
63291
  useResizeObserver$1(content, handleSizeChange);
64329
63292
  return /* @__PURE__ */ jsx(
64330
- Primitive$6.div,
63293
+ Primitive.div,
64331
63294
  {
64332
63295
  "data-state": getOpenState(open),
64333
63296
  "data-orientation": context.orientation,
@@ -64348,7 +63311,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
64348
63311
  NavigationMenuContentImpl,
64349
63312
  {
64350
63313
  ...props22,
64351
- ref: composeRefs$1(ref, (node) => {
63314
+ ref: composeRefs$2(ref, (node) => {
64352
63315
  if (isActive && node) setContent(node);
64353
63316
  })
64354
63317
  }
@@ -64362,7 +63325,7 @@ var FocusGroup = React.forwardRef(
64362
63325
  (props2, forwardedRef) => {
64363
63326
  const { __scopeNavigationMenu, ...groupProps } = props2;
64364
63327
  const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
64365
- return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive$6.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
63328
+ return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
64366
63329
  }
64367
63330
  );
64368
63331
  var ARROW_KEYS$1 = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
@@ -64373,7 +63336,7 @@ var FocusGroupItem = React.forwardRef(
64373
63336
  const getItems = useFocusGroupCollection(__scopeNavigationMenu);
64374
63337
  const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
64375
63338
  return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
64376
- Primitive$6.button,
63339
+ Primitive.button,
64377
63340
  {
64378
63341
  ...groupProps,
64379
63342
  ref: forwardedRef,
@@ -66879,7 +65842,7 @@ function useStateMachine(initialState2, machine) {
66879
65842
  }, initialState2);
66880
65843
  }
66881
65844
  var SCROLL_AREA_NAME = "ScrollArea";
66882
- var [createScrollAreaContext] = createContextScope$2(SCROLL_AREA_NAME);
65845
+ var [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
66883
65846
  var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
66884
65847
  var ScrollArea$1 = React.forwardRef(
66885
65848
  (props2, forwardedRef) => {
@@ -66924,7 +65887,7 @@ var ScrollArea$1 = React.forwardRef(
66924
65887
  onCornerWidthChange: setCornerWidth,
66925
65888
  onCornerHeightChange: setCornerHeight,
66926
65889
  children: /* @__PURE__ */ jsx(
66927
- Primitive$6.div,
65890
+ Primitive.div,
66928
65891
  {
66929
65892
  dir: direction,
66930
65893
  ...scrollAreaProps,
@@ -66961,7 +65924,7 @@ var ScrollAreaViewport = React.forwardRef(
66961
65924
  }
66962
65925
  ),
66963
65926
  /* @__PURE__ */ jsx(
66964
- Primitive$6.div,
65927
+ Primitive.div,
66965
65928
  {
66966
65929
  "data-radix-scroll-area-viewport": "",
66967
65930
  ...viewportProps,
@@ -67347,7 +66310,7 @@ var ScrollAreaScrollbarImpl = React.forwardRef((props2, forwardedRef) => {
67347
66310
  onThumbPositionChange: handleThumbPositionChange,
67348
66311
  onThumbPointerDown: useCallbackRef$2(onThumbPointerDown),
67349
66312
  children: /* @__PURE__ */ jsx(
67350
- Primitive$6.div,
66313
+ Primitive.div,
67351
66314
  {
67352
66315
  ...scrollbarProps,
67353
66316
  ref: composeRefs2,
@@ -67421,7 +66384,7 @@ var ScrollAreaThumbImpl = React.forwardRef(
67421
66384
  }
67422
66385
  }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
67423
66386
  return /* @__PURE__ */ jsx(
67424
- Primitive$6.div,
66387
+ Primitive.div,
67425
66388
  {
67426
66389
  "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
67427
66390
  ...thumbProps,
@@ -67473,7 +66436,7 @@ var ScrollAreaCornerImpl = React.forwardRef((props2, forwardedRef) => {
67473
66436
  setWidth(width2);
67474
66437
  });
67475
66438
  return hasSize ? /* @__PURE__ */ jsx(
67476
- Primitive$6.div,
66439
+ Primitive.div,
67477
66440
  {
67478
66441
  ...cornerProps,
67479
66442
  ref: forwardedRef,
@@ -67641,7 +66604,7 @@ var BACK_KEYS = {
67641
66604
  };
67642
66605
  var SLIDER_NAME = "Slider";
67643
66606
  var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);
67644
- var [createSliderContext] = createContextScope$2(SLIDER_NAME, [
66607
+ var [createSliderContext] = createContextScope(SLIDER_NAME, [
67645
66608
  createCollectionScope
67646
66609
  ]);
67647
66610
  var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
@@ -67912,7 +66875,7 @@ var SliderImpl = React.forwardRef(
67912
66875
  } = props2;
67913
66876
  const context = useSliderContext(SLIDER_NAME, __scopeSlider);
67914
66877
  return /* @__PURE__ */ jsx(
67915
- Primitive$6.span,
66878
+ Primitive.span,
67916
66879
  {
67917
66880
  ...sliderProps,
67918
66881
  ref: forwardedRef,
@@ -67959,7 +66922,7 @@ var SliderTrack = React.forwardRef(
67959
66922
  const { __scopeSlider, ...trackProps } = props2;
67960
66923
  const context = useSliderContext(TRACK_NAME, __scopeSlider);
67961
66924
  return /* @__PURE__ */ jsx(
67962
- Primitive$6.span,
66925
+ Primitive.span,
67963
66926
  {
67964
66927
  "data-disabled": context.disabled ? "" : void 0,
67965
66928
  "data-orientation": context.orientation,
@@ -67985,7 +66948,7 @@ var SliderRange = React.forwardRef(
67985
66948
  const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
67986
66949
  const offsetEnd = 100 - Math.max(...percentages);
67987
66950
  return /* @__PURE__ */ jsx(
67988
- Primitive$6.span,
66951
+ Primitive.span,
67989
66952
  {
67990
66953
  "data-orientation": context.orientation,
67991
66954
  "data-disabled": context.disabled ? "" : void 0,
@@ -68046,7 +67009,7 @@ var SliderThumbImpl = React.forwardRef(
68046
67009
  },
68047
67010
  children: [
68048
67011
  /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props2.__scopeSlider, children: /* @__PURE__ */ jsx(
68049
- Primitive$6.span,
67012
+ Primitive.span,
68050
67013
  {
68051
67014
  role: "slider",
68052
67015
  "aria-label": props2["aria-label"] || label,
@@ -68099,7 +67062,7 @@ var SliderBubbleInput = React.forwardRef(
68099
67062
  }
68100
67063
  }, [prevValue, value]);
68101
67064
  return /* @__PURE__ */ jsx(
68102
- Primitive$6.input,
67065
+ Primitive.input,
68103
67066
  {
68104
67067
  style: { display: "none" },
68105
67068
  ...props2,
@@ -68264,7 +67227,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
68264
67227
  caller: NAME
68265
67228
  });
68266
67229
  return /* @__PURE__ */ jsx(
68267
- Primitive$6.button,
67230
+ Primitive.button,
68268
67231
  {
68269
67232
  type: "button",
68270
67233
  "aria-pressed": pressed,
@@ -68283,7 +67246,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
68283
67246
  Toggle$1.displayName = NAME;
68284
67247
  var Root = Toggle$1;
68285
67248
  var TOGGLE_GROUP_NAME = "ToggleGroup";
68286
- var [createToggleGroupContext] = createContextScope$2(TOGGLE_GROUP_NAME, [
67249
+ var [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
68287
67250
  createRovingFocusGroupScope
68288
67251
  ]);
68289
67252
  var useRovingFocusGroupScope = createRovingFocusGroupScope();
@@ -68385,9 +67348,9 @@ var ToggleGroupImpl = React__default.forwardRef(
68385
67348
  orientation,
68386
67349
  dir: direction,
68387
67350
  loop,
68388
- children: /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef })
67351
+ children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef })
68389
67352
  }
68390
- ) : /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef }) });
67353
+ ) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) });
68391
67354
  }
68392
67355
  );
68393
67356
  var ITEM_NAME = "ToggleGroupItem";