@k3-universe/react-kit 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,8 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import React__default, { forwardRef, createElement, useLayoutEffect, useState, useRef, useCallback, useEffect, useMemo, memo as memo$1, createContext, use, useContext, Fragment as Fragment$1, isValidElement, PureComponent, useImperativeHandle, cloneElement } from "react";
4
4
  import * as ReactDOM from "react-dom";
5
- import ReactDOM__default, { flushSync } from "react-dom";
5
+ import ReactDOM__default from "react-dom";
6
+ import { useLocation, Link as Link$1 } from "@tanstack/react-router";
6
7
  /**
7
8
  * table-core
8
9
  *
@@ -13,7 +14,7 @@ import ReactDOM__default, { flushSync } from "react-dom";
13
14
  *
14
15
  * @license MIT
15
16
  */
16
- function functionalUpdate$1(updater, input) {
17
+ function functionalUpdate(updater, input) {
17
18
  return typeof updater === "function" ? updater(input) : updater;
18
19
  }
19
20
  function makeStateUpdater(key, instance) {
@@ -21,12 +22,12 @@ function makeStateUpdater(key, instance) {
21
22
  instance.setState((old) => {
22
23
  return {
23
24
  ...old,
24
- [key]: functionalUpdate$1(updater, old[key])
25
+ [key]: functionalUpdate(updater, old[key])
25
26
  };
26
27
  });
27
28
  };
28
29
  }
29
- function isFunction$5(d) {
30
+ function isFunction$4(d) {
30
31
  return d instanceof Function;
31
32
  }
32
33
  function isNumberArray(d) {
@@ -605,7 +606,7 @@ const ColumnFiltering = {
605
606
  };
606
607
  column.getFilterFn = () => {
607
608
  var _table$options$filter, _table$options$filter2;
608
- return isFunction$5(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === "auto" ? column.getAutoFilterFn() : (
609
+ return isFunction$4(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === "auto" ? column.getAutoFilterFn() : (
609
610
  // @ts-ignore
610
611
  (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn]
611
612
  );
@@ -627,7 +628,7 @@ const ColumnFiltering = {
627
628
  table.setColumnFilters((old) => {
628
629
  const filterFn = column.getFilterFn();
629
630
  const previousFilter = old == null ? void 0 : old.find((d) => d.id === column.id);
630
- const newFilter = functionalUpdate$1(value, previousFilter ? previousFilter.value : void 0);
631
+ const newFilter = functionalUpdate(value, previousFilter ? previousFilter.value : void 0);
631
632
  if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {
632
633
  var _old$filter;
633
634
  return (_old$filter = old == null ? void 0 : old.filter((d) => d.id !== column.id)) != null ? _old$filter : [];
@@ -661,7 +662,7 @@ const ColumnFiltering = {
661
662
  const leafColumns = table.getAllLeafColumns();
662
663
  const updateFn = (old) => {
663
664
  var _functionalUpdate;
664
- return (_functionalUpdate = functionalUpdate$1(updater, old)) == null ? void 0 : _functionalUpdate.filter((filter) => {
665
+ return (_functionalUpdate = functionalUpdate(updater, old)) == null ? void 0 : _functionalUpdate.filter((filter) => {
665
666
  const column = leafColumns.find((d) => d.id === filter.id);
666
667
  if (column) {
667
668
  const filterFn = column.getFilterFn();
@@ -847,7 +848,7 @@ const ColumnGrouping = {
847
848
  if (!column) {
848
849
  throw new Error();
849
850
  }
850
- return isFunction$5(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === "auto" ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
851
+ return isFunction$4(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === "auto" ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
851
852
  };
852
853
  },
853
854
  createTable: (table) => {
@@ -1450,7 +1451,7 @@ const GlobalFiltering = {
1450
1451
  const {
1451
1452
  globalFilterFn
1452
1453
  } = table.options;
1453
- return isFunction$5(globalFilterFn) ? globalFilterFn : globalFilterFn === "auto" ? table.getGlobalAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
1454
+ return isFunction$4(globalFilterFn) ? globalFilterFn : globalFilterFn === "auto" ? table.getGlobalAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
1454
1455
  };
1455
1456
  table.setGlobalFilter = (updater) => {
1456
1457
  table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);
@@ -1651,7 +1652,7 @@ const RowPagination = {
1651
1652
  };
1652
1653
  table.setPagination = (updater) => {
1653
1654
  const safeUpdater = (old) => {
1654
- let newState = functionalUpdate$1(updater, old);
1655
+ let newState = functionalUpdate(updater, old);
1655
1656
  return newState;
1656
1657
  };
1657
1658
  return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
@@ -1662,7 +1663,7 @@ const RowPagination = {
1662
1663
  };
1663
1664
  table.setPageIndex = (updater) => {
1664
1665
  table.setPagination((old) => {
1665
- let pageIndex = functionalUpdate$1(updater, old.pageIndex);
1666
+ let pageIndex = functionalUpdate(updater, old.pageIndex);
1666
1667
  const maxPageIndex = typeof table.options.pageCount === "undefined" || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;
1667
1668
  pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));
1668
1669
  return {
@@ -1681,7 +1682,7 @@ const RowPagination = {
1681
1682
  };
1682
1683
  table.setPageSize = (updater) => {
1683
1684
  table.setPagination((old) => {
1684
- const pageSize = Math.max(1, functionalUpdate$1(updater, old.pageSize));
1685
+ const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));
1685
1686
  const topRowIndex = old.pageSize * old.pageIndex;
1686
1687
  const pageIndex = Math.floor(topRowIndex / pageSize);
1687
1688
  return {
@@ -1693,7 +1694,7 @@ const RowPagination = {
1693
1694
  };
1694
1695
  table.setPageCount = (updater) => table.setPagination((old) => {
1695
1696
  var _table$options$pageCo;
1696
- let newPageCount = functionalUpdate$1(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
1697
+ let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
1697
1698
  if (typeof newPageCount === "number") {
1698
1699
  newPageCount = Math.max(-1, newPageCount);
1699
1700
  }
@@ -2290,7 +2291,7 @@ const RowSorting = {
2290
2291
  if (!column) {
2291
2292
  throw new Error();
2292
2293
  }
2293
- return isFunction$5(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === "auto" ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
2294
+ return isFunction$4(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === "auto" ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
2294
2295
  };
2295
2296
  column.toggleSorting = (desc, multi) => {
2296
2297
  const nextSortingOrder = column.getNextSortingOrder();
@@ -2493,7 +2494,7 @@ function createTable(options) {
2493
2494
  table.setState(table.initialState);
2494
2495
  },
2495
2496
  setOptions: (updater) => {
2496
- const newOptions = functionalUpdate$1(updater, table.options);
2497
+ const newOptions = functionalUpdate(updater, table.options);
2497
2498
  table.options = mergeOptions(newOptions);
2498
2499
  },
2499
2500
  getState: () => {
@@ -3155,7 +3156,7 @@ const MODIFIER_SEPARATOR = ":";
3155
3156
  const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
3156
3157
  const createParseClassName = (config2) => {
3157
3158
  const {
3158
- prefix: prefix2,
3159
+ prefix,
3159
3160
  experimentalParseClassName
3160
3161
  } = config2;
3161
3162
  let parseClassName = (className) => {
@@ -3198,8 +3199,8 @@ const createParseClassName = (config2) => {
3198
3199
  maybePostfixModifierPosition
3199
3200
  };
3200
3201
  };
3201
- if (prefix2) {
3202
- const fullPrefix = prefix2 + MODIFIER_SEPARATOR;
3202
+ if (prefix) {
3203
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
3203
3204
  const parseClassNameOriginal = parseClassName;
3204
3205
  parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
3205
3206
  isExternal: true,
@@ -6212,7 +6213,7 @@ function useControllableState$1({
6212
6213
  (nextValue) => {
6213
6214
  var _a;
6214
6215
  if (isControlled) {
6215
- const value2 = isFunction$4(nextValue) ? nextValue(prop) : nextValue;
6216
+ const value2 = isFunction$3(nextValue) ? nextValue(prop) : nextValue;
6216
6217
  if (value2 !== prop) {
6217
6218
  (_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
6218
6219
  }
@@ -6243,7 +6244,7 @@ function useUncontrolledState$1({
6243
6244
  }, [value, prevValueRef]);
6244
6245
  return [value, setValue, onChangeRef];
6245
6246
  }
6246
- function isFunction$4(value) {
6247
+ function isFunction$3(value) {
6247
6248
  return typeof value === "function";
6248
6249
  }
6249
6250
  function usePrevious(value) {
@@ -6593,7 +6594,7 @@ function CheckboxProvider(props2) {
6593
6594
  {
6594
6595
  scope: __scopeCheckbox,
6595
6596
  ...context,
6596
- children: isFunction$3(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
6597
+ children: isFunction$2(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
6597
6598
  }
6598
6599
  );
6599
6600
  }
@@ -6789,7 +6790,7 @@ var CheckboxBubbleInput = React.forwardRef(
6789
6790
  }
6790
6791
  );
6791
6792
  CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME$4;
6792
- function isFunction$3(value) {
6793
+ function isFunction$2(value) {
6793
6794
  return typeof value === "function";
6794
6795
  }
6795
6796
  function isIndeterminate$1(checked) {
@@ -7358,7 +7359,7 @@ var isObject$4 = (value) => !isNullOrUndefined(value) && !Array.isArray(value) &
7358
7359
  var getEventValue = (event) => isObject$4(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event;
7359
7360
  var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name;
7360
7361
  var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
7361
- var isPlainObject$2 = (tempObject) => {
7362
+ var isPlainObject$1 = (tempObject) => {
7362
7363
  const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
7363
7364
  return isObject$4(prototypeCopy) && prototypeCopy.hasOwnProperty("isPrototypeOf");
7364
7365
  };
@@ -7371,7 +7372,7 @@ function cloneObject(data) {
7371
7372
  copy = new Date(data);
7372
7373
  } else if (!(isWeb && (data instanceof Blob || isFileListInstance)) && (isArray || isObject$4(data))) {
7373
7374
  copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
7374
- if (!isArray && !isPlainObject$2(data)) {
7375
+ if (!isArray && !isPlainObject$1(data)) {
7375
7376
  copy = data;
7376
7377
  } else {
7377
7378
  for (const key in data) {
@@ -7506,7 +7507,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
7506
7507
  return formValues;
7507
7508
  };
7508
7509
  var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
7509
- function deepEqual$2(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
7510
+ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
7510
7511
  if (isPrimitive(object1) || isPrimitive(object2)) {
7511
7512
  return object1 === object2;
7512
7513
  }
@@ -7530,7 +7531,7 @@ function deepEqual$2(object1, object2, _internal_visited = /* @__PURE__ */ new W
7530
7531
  }
7531
7532
  if (key !== "ref") {
7532
7533
  const val2 = object2[key];
7533
- if (isDateObject(val1) && isDateObject(val2) || isObject$4(val1) && isObject$4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$2(val1, val2, _internal_visited) : val1 !== val2) {
7534
+ if (isDateObject(val1) && isDateObject(val2) || isObject$4(val1) && isObject$4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1 !== val2) {
7534
7535
  return false;
7535
7536
  }
7536
7537
  }
@@ -7557,7 +7558,7 @@ function useWatch(props2) {
7557
7558
  const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
7558
7559
  if (_compute.current) {
7559
7560
  const computedFormValues = _compute.current(formValues);
7560
- if (!deepEqual$2(computedFormValues, _computeFormValues.current)) {
7561
+ if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
7561
7562
  updateValue(computedFormValues);
7562
7563
  _computeFormValues.current = computedFormValues;
7563
7564
  }
@@ -7723,7 +7724,7 @@ var createSubject = () => {
7723
7724
  };
7724
7725
  var isEmptyObject = (value) => isObject$4(value) && !Object.keys(value).length;
7725
7726
  var isFileInput = (element) => element.type === "file";
7726
- var isFunction$2 = (value) => typeof value === "function";
7727
+ var isFunction$1 = (value) => typeof value === "function";
7727
7728
  var isHTMLElement$2 = (value) => {
7728
7729
  if (!isWeb) {
7729
7730
  return false;
@@ -7766,7 +7767,7 @@ function unset(object2, path) {
7766
7767
  }
7767
7768
  var objectHasFunction = (data) => {
7768
7769
  for (const key in data) {
7769
- if (isFunction$2(data[key])) {
7770
+ if (isFunction$1(data[key])) {
7770
7771
  return true;
7771
7772
  }
7772
7773
  }
@@ -7797,7 +7798,7 @@ function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues
7797
7798
  getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
7798
7799
  }
7799
7800
  } else {
7800
- dirtyFieldsFromValues[key] = !deepEqual$2(data[key], formValues[key]);
7801
+ dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]);
7801
7802
  }
7802
7803
  }
7803
7804
  }
@@ -7870,7 +7871,7 @@ var getValidationModes = (mode) => ({
7870
7871
  isOnTouch: mode === VALIDATION_MODE.onTouched
7871
7872
  });
7872
7873
  const ASYNC_FUNCTION = "AsyncFunction";
7873
- var hasPromiseValidation = (fieldReference) => !!fieldReference && !!fieldReference.validate && !!(isFunction$2(fieldReference.validate) && fieldReference.validate.constructor.name === ASYNC_FUNCTION || isObject$4(fieldReference.validate) && Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION));
7874
+ var hasPromiseValidation = (fieldReference) => !!fieldReference && !!fieldReference.validate && !!(isFunction$1(fieldReference.validate) && fieldReference.validate.constructor.name === ASYNC_FUNCTION || isObject$4(fieldReference.validate) && Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION));
7874
7875
  var hasValidation = (options) => options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate);
7875
7876
  var isWatched = (name, _names, isBlurEvent) => !isBlurEvent && (_names.watchAll || _names.watch.has(name) || [..._names.watch].some((watchName) => name.startsWith(watchName) && /^\.\w+/.test(name.slice(watchName.length))));
7876
7877
  const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
@@ -8075,7 +8076,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
8075
8076
  }
8076
8077
  }
8077
8078
  if (validate) {
8078
- if (isFunction$2(validate)) {
8079
+ if (isFunction$1(validate)) {
8079
8080
  const result = await validate(inputValue, formValues);
8080
8081
  const validateError = getValidateError(result, inputRef);
8081
8082
  if (validateError) {
@@ -8134,7 +8135,7 @@ function createFormControl(props2 = {}) {
8134
8135
  submitCount: 0,
8135
8136
  isDirty: false,
8136
8137
  isReady: false,
8137
- isLoading: isFunction$2(_options.defaultValues),
8138
+ isLoading: isFunction$1(_options.defaultValues),
8138
8139
  isValidating: false,
8139
8140
  isSubmitted: false,
8140
8141
  isSubmitting: false,
@@ -8271,7 +8272,7 @@ function createFormControl(props2 = {}) {
8271
8272
  _formState.isDirty = output.isDirty = _getDirty();
8272
8273
  shouldUpdateField = isPreviousDirty !== output.isDirty;
8273
8274
  }
8274
- const isCurrentFieldPristine = deepEqual$2(get(_defaultValues, name), fieldValue);
8275
+ const isCurrentFieldPristine = deepEqual$1(get(_defaultValues, name), fieldValue);
8275
8276
  isPreviousDirty = !!get(_formState.dirtyFields, name);
8276
8277
  isCurrentFieldPristine ? unset(_formState.dirtyFields, name) : set$1(_formState.dirtyFields, name, true);
8277
8278
  output.dirtyFields = _formState.dirtyFields;
@@ -8300,7 +8301,7 @@ function createFormControl(props2 = {}) {
8300
8301
  delayErrorCallback = null;
8301
8302
  error ? set$1(_formState.errors, name, error) : unset(_formState.errors, name);
8302
8303
  }
8303
- if ((error ? !deepEqual$2(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
8304
+ if ((error ? !deepEqual$1(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
8304
8305
  const updatedFormState = {
8305
8306
  ...fieldState,
8306
8307
  ...shouldUpdateValid && isBoolean$1(isValid2) ? { isValid: isValid2 } : {},
@@ -8369,7 +8370,7 @@ function createFormControl(props2 = {}) {
8369
8370
  }
8370
8371
  _names.unMount = /* @__PURE__ */ new Set();
8371
8372
  };
8372
- const _getDirty = (name, data) => !_options.disabled && (name && data && set$1(_formValues, name, data), !deepEqual$2(getValues(), _defaultValues));
8373
+ const _getDirty = (name, data) => !_options.disabled && (name && data && set$1(_formValues, name, data), !deepEqual$1(getValues(), _defaultValues));
8373
8374
  const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
8374
8375
  ..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString$2(names) ? { [names]: defaultValue } : defaultValue
8375
8376
  }, isGlobal, defaultValue);
@@ -8458,7 +8459,7 @@ function createFormControl(props2 = {}) {
8458
8459
  let isFieldValueUpdated = true;
8459
8460
  const field = get(_fields, name);
8460
8461
  const _updateIsFieldValueUpdated = (fieldValue) => {
8461
- isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual$2(fieldValue, get(_formValues, name, fieldValue));
8462
+ isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual$1(fieldValue, get(_formValues, name, fieldValue));
8462
8463
  };
8463
8464
  const validationModeBeforeSubmit = getValidationModes(_options.mode);
8464
8465
  const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
@@ -8594,7 +8595,7 @@ function createFormControl(props2 = {}) {
8594
8595
  });
8595
8596
  options && options.shouldFocus && ref && ref.focus && ref.focus();
8596
8597
  };
8597
- const watch = (name, defaultValue) => isFunction$2(name) ? _subjects.state.subscribe({
8598
+ const watch = (name, defaultValue) => isFunction$1(name) ? _subjects.state.subscribe({
8598
8599
  next: (payload) => "values" in payload && name(_getWatch(void 0, defaultValue), payload)
8599
8600
  }) : _getWatch(name, defaultValue, true);
8600
8601
  const _subscribe = (props3) => _subjects.state.subscribe({
@@ -8867,7 +8868,7 @@ function createFormControl(props2 = {}) {
8867
8868
  _state.watch = !!_options.shouldUnregister;
8868
8869
  _subjects.state.next({
8869
8870
  submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
8870
- isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$2(formValues, _defaultValues)),
8871
+ isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
8871
8872
  isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
8872
8873
  dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
8873
8874
  touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
@@ -8877,7 +8878,7 @@ function createFormControl(props2 = {}) {
8877
8878
  defaultValues: _defaultValues
8878
8879
  });
8879
8880
  };
8880
- const reset2 = (formValues, keepStateOptions) => _reset(isFunction$2(formValues) ? formValues(_formValues) : formValues, keepStateOptions);
8881
+ const reset2 = (formValues, keepStateOptions) => _reset(isFunction$1(formValues) ? formValues(_formValues) : formValues, keepStateOptions);
8881
8882
  const setFocus = (name, options = {}) => {
8882
8883
  const field = get(_fields, name);
8883
8884
  const fieldReference = field && field._f;
@@ -8885,7 +8886,7 @@ function createFormControl(props2 = {}) {
8885
8886
  const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref;
8886
8887
  if (fieldRef.focus) {
8887
8888
  fieldRef.focus();
8888
- options.shouldSelect && isFunction$2(fieldRef.select) && fieldRef.select();
8889
+ options.shouldSelect && isFunction$1(fieldRef.select) && fieldRef.select();
8889
8890
  }
8890
8891
  }
8891
8892
  };
@@ -8895,7 +8896,7 @@ function createFormControl(props2 = {}) {
8895
8896
  ...updatedFormState
8896
8897
  };
8897
8898
  };
8898
- const _resetDefaultValues = () => isFunction$2(_options.defaultValues) && _options.defaultValues().then((values) => {
8899
+ const _resetDefaultValues = () => isFunction$1(_options.defaultValues) && _options.defaultValues().then((values) => {
8899
8900
  reset2(values, _options.resetOptions);
8900
8901
  _subjects.state.next({
8901
8902
  isLoading: false
@@ -9215,7 +9216,7 @@ function useForm(props2 = {}) {
9215
9216
  const [formState, updateFormState] = React__default.useState({
9216
9217
  isDirty: false,
9217
9218
  isValidating: false,
9218
- isLoading: isFunction$2(props2.defaultValues),
9219
+ isLoading: isFunction$1(props2.defaultValues),
9219
9220
  isSubmitted: false,
9220
9221
  isSubmitting: false,
9221
9222
  isSubmitSuccessful: false,
@@ -9227,7 +9228,7 @@ function useForm(props2 = {}) {
9227
9228
  errors: props2.errors || {},
9228
9229
  disabled: props2.disabled || false,
9229
9230
  isReady: false,
9230
- defaultValues: isFunction$2(props2.defaultValues) ? void 0 : props2.defaultValues
9231
+ defaultValues: isFunction$1(props2.defaultValues) ? void 0 : props2.defaultValues
9231
9232
  });
9232
9233
  if (!_formControl.current) {
9233
9234
  if (props2.formControl) {
@@ -9235,7 +9236,7 @@ function useForm(props2 = {}) {
9235
9236
  ...props2.formControl,
9236
9237
  formState
9237
9238
  };
9238
- if (props2.defaultValues && !isFunction$2(props2.defaultValues)) {
9239
+ if (props2.defaultValues && !isFunction$1(props2.defaultValues)) {
9239
9240
  props2.formControl.reset(props2.defaultValues, props2.resetOptions);
9240
9241
  }
9241
9242
  } else {
@@ -9292,7 +9293,7 @@ function useForm(props2 = {}) {
9292
9293
  }
9293
9294
  }, [control, formState.isDirty]);
9294
9295
  React__default.useEffect(() => {
9295
- if (props2.values && !deepEqual$2(props2.values, _values.current)) {
9296
+ if (props2.values && !deepEqual$1(props2.values, _values.current)) {
9296
9297
  control._reset(props2.values, {
9297
9298
  keepFieldsRef: true,
9298
9299
  ...control._options.resetOptions
@@ -9504,7 +9505,7 @@ const allowsEval = cached(() => {
9504
9505
  return false;
9505
9506
  }
9506
9507
  });
9507
- function isPlainObject$1(o2) {
9508
+ function isPlainObject(o2) {
9508
9509
  if (isObject$3(o2) === false)
9509
9510
  return false;
9510
9511
  const ctor = o2.constructor;
@@ -9519,7 +9520,7 @@ function isPlainObject$1(o2) {
9519
9520
  return true;
9520
9521
  }
9521
9522
  function shallowClone(o2) {
9522
- if (isPlainObject$1(o2))
9523
+ if (isPlainObject(o2))
9523
9524
  return { ...o2 };
9524
9525
  return o2;
9525
9526
  }
@@ -9602,7 +9603,7 @@ function omit(schema, mask) {
9602
9603
  return clone(schema, def);
9603
9604
  }
9604
9605
  function extend(schema, shape) {
9605
- if (!isPlainObject$1(shape)) {
9606
+ if (!isPlainObject(shape)) {
9606
9607
  throw new Error("Invalid input to extend: expected a plain object");
9607
9608
  }
9608
9609
  const def = mergeDefs(schema._zod.def, {
@@ -10617,12 +10618,12 @@ const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
10617
10618
  def.pattern ?? (def.pattern = cidrv6);
10618
10619
  $ZodStringFormat.init(inst, def);
10619
10620
  inst._zod.check = (payload) => {
10620
- const [address, prefix2] = payload.value.split("/");
10621
+ const [address, prefix] = payload.value.split("/");
10621
10622
  try {
10622
- if (!prefix2)
10623
+ if (!prefix)
10623
10624
  throw new Error();
10624
- const prefixNum = Number(prefix2);
10625
- if (`${prefixNum}` !== prefix2)
10625
+ const prefixNum = Number(prefix);
10626
+ if (`${prefixNum}` !== prefix)
10626
10627
  throw new Error();
10627
10628
  if (prefixNum < 0 || prefixNum > 128)
10628
10629
  throw new Error();
@@ -11107,7 +11108,7 @@ function mergeValues(a2, b2) {
11107
11108
  if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) {
11108
11109
  return { valid: true, data: a2 };
11109
11110
  }
11110
- if (isPlainObject$1(a2) && isPlainObject$1(b2)) {
11111
+ if (isPlainObject(a2) && isPlainObject(b2)) {
11111
11112
  const bKeys = Object.keys(b2);
11112
11113
  const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1);
11113
11114
  const newObj = { ...a2, ...b2 };
@@ -11857,12 +11858,12 @@ function _includes(includes, params) {
11857
11858
  includes
11858
11859
  });
11859
11860
  }
11860
- function _startsWith(prefix2, params) {
11861
+ function _startsWith(prefix, params) {
11861
11862
  return new $ZodCheckStartsWith({
11862
11863
  check: "string_format",
11863
11864
  format: "starts_with",
11864
11865
  ...normalizeParams(params),
11865
- prefix: prefix2
11866
+ prefix
11866
11867
  });
11867
11868
  }
11868
11869
  function _endsWith(suffix, params) {
@@ -14732,7 +14733,7 @@ var isClient = typeof document !== "undefined";
14732
14733
  var noop$1 = function noop() {
14733
14734
  };
14734
14735
  var index = isClient ? useLayoutEffect : noop$1;
14735
- function deepEqual$1(a2, b2) {
14736
+ function deepEqual(a2, b2) {
14736
14737
  if (a2 === b2) {
14737
14738
  return true;
14738
14739
  }
@@ -14750,7 +14751,7 @@ function deepEqual$1(a2, b2) {
14750
14751
  length = a2.length;
14751
14752
  if (length !== b2.length) return false;
14752
14753
  for (i2 = length; i2-- !== 0; ) {
14753
- if (!deepEqual$1(a2[i2], b2[i2])) {
14754
+ if (!deepEqual(a2[i2], b2[i2])) {
14754
14755
  return false;
14755
14756
  }
14756
14757
  }
@@ -14771,7 +14772,7 @@ function deepEqual$1(a2, b2) {
14771
14772
  if (key === "_owner" && a2.$$typeof) {
14772
14773
  continue;
14773
14774
  }
14774
- if (!deepEqual$1(a2[key], b2[key])) {
14775
+ if (!deepEqual(a2[key], b2[key])) {
14775
14776
  return false;
14776
14777
  }
14777
14778
  }
@@ -14823,7 +14824,7 @@ function useFloating(options) {
14823
14824
  isPositioned: false
14824
14825
  });
14825
14826
  const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
14826
- if (!deepEqual$1(latestMiddleware, middleware)) {
14827
+ if (!deepEqual(latestMiddleware, middleware)) {
14827
14828
  setLatestMiddleware(middleware);
14828
14829
  }
14829
14830
  const [_reference, _setReference] = React.useState(null);
@@ -14870,7 +14871,7 @@ function useFloating(options) {
14870
14871
  // setting it to `true` when `open === false` (must be specified).
14871
14872
  isPositioned: openRef.current !== false
14872
14873
  };
14873
- if (isMountedRef.current && !deepEqual$1(dataRef.current, fullData)) {
14874
+ if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
14874
14875
  dataRef.current = fullData;
14875
14876
  ReactDOM.flushSync(() => {
14876
14877
  setData(fullData);
@@ -28095,9 +28096,9 @@ function requireLodash() {
28095
28096
  }
28096
28097
  return isSymbol(value) ? [value] : copyArray(stringToPath2(toString2(value)));
28097
28098
  }
28098
- function uniqueId(prefix2) {
28099
+ function uniqueId(prefix) {
28099
28100
  var id = ++idCounter2;
28100
- return toString2(prefix2) + id;
28101
+ return toString2(prefix) + id;
28101
28102
  }
28102
28103
  var add = createMathOperation(function(augend, addend) {
28103
28104
  return augend + addend;
@@ -30744,903 +30745,6 @@ function SidebarMenuSubButton({
30744
30745
  }
30745
30746
  );
30746
30747
  }
30747
- var isProduction$1 = process.env.NODE_ENV === "production";
30748
- var prefix = "Invariant failed";
30749
- function invariant(condition, message2) {
30750
- if (condition) {
30751
- return;
30752
- }
30753
- if (isProduction$1) {
30754
- throw new Error(prefix);
30755
- }
30756
- var provided = typeof message2 === "function" ? message2() : message2;
30757
- var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
30758
- throw new Error(value);
30759
- }
30760
- var isProduction = process.env.NODE_ENV === "production";
30761
- function warning(condition, message2) {
30762
- if (!isProduction) {
30763
- if (condition) {
30764
- return;
30765
- }
30766
- var text2 = "Warning: " + message2;
30767
- if (typeof console !== "undefined") {
30768
- console.warn(text2);
30769
- }
30770
- try {
30771
- throw Error(text2);
30772
- } catch (x2) {
30773
- }
30774
- }
30775
- }
30776
- function isFunction$1(d) {
30777
- return typeof d === "function";
30778
- }
30779
- function functionalUpdate(updater, previous) {
30780
- if (isFunction$1(updater)) {
30781
- return updater(previous);
30782
- }
30783
- return updater;
30784
- }
30785
- function replaceEqualDeep(prev, _next) {
30786
- if (prev === _next) {
30787
- return prev;
30788
- }
30789
- const next = _next;
30790
- const array2 = isPlainArray(prev) && isPlainArray(next);
30791
- if (array2 || isSimplePlainObject(prev) && isSimplePlainObject(next)) {
30792
- const prevItems = array2 ? prev : Object.keys(prev).concat(
30793
- Object.getOwnPropertySymbols(prev)
30794
- );
30795
- const prevSize = prevItems.length;
30796
- const nextItems = array2 ? next : Object.keys(next).concat(
30797
- Object.getOwnPropertySymbols(next)
30798
- );
30799
- const nextSize = nextItems.length;
30800
- const copy = array2 ? [] : {};
30801
- let equalItems = 0;
30802
- for (let i2 = 0; i2 < nextSize; i2++) {
30803
- const key = array2 ? i2 : nextItems[i2];
30804
- if ((!array2 && prevItems.includes(key) || array2) && prev[key] === void 0 && next[key] === void 0) {
30805
- copy[key] = void 0;
30806
- equalItems++;
30807
- } else {
30808
- copy[key] = replaceEqualDeep(prev[key], next[key]);
30809
- if (copy[key] === prev[key] && prev[key] !== void 0) {
30810
- equalItems++;
30811
- }
30812
- }
30813
- }
30814
- return prevSize === nextSize && equalItems === prevSize ? prev : copy;
30815
- }
30816
- return next;
30817
- }
30818
- function isSimplePlainObject(o2) {
30819
- return (
30820
- // all the checks from isPlainObject are more likely to hit so we perform them first
30821
- isPlainObject(o2) && Object.getOwnPropertyNames(o2).length === Object.keys(o2).length
30822
- );
30823
- }
30824
- function isPlainObject(o2) {
30825
- if (!hasObjectPrototype(o2)) {
30826
- return false;
30827
- }
30828
- const ctor = o2.constructor;
30829
- if (typeof ctor === "undefined") {
30830
- return true;
30831
- }
30832
- const prot = ctor.prototype;
30833
- if (!hasObjectPrototype(prot)) {
30834
- return false;
30835
- }
30836
- if (!prot.hasOwnProperty("isPrototypeOf")) {
30837
- return false;
30838
- }
30839
- return true;
30840
- }
30841
- function hasObjectPrototype(o2) {
30842
- return Object.prototype.toString.call(o2) === "[object Object]";
30843
- }
30844
- function isPlainArray(value) {
30845
- return Array.isArray(value) && value.length === Object.keys(value).length;
30846
- }
30847
- function getObjectKeys(obj, ignoreUndefined) {
30848
- let keys = Object.keys(obj);
30849
- if (ignoreUndefined) {
30850
- keys = keys.filter((key) => obj[key] !== void 0);
30851
- }
30852
- return keys;
30853
- }
30854
- function deepEqual(a2, b2, opts) {
30855
- if (a2 === b2) {
30856
- return true;
30857
- }
30858
- if (typeof a2 !== typeof b2) {
30859
- return false;
30860
- }
30861
- if (isPlainObject(a2) && isPlainObject(b2)) {
30862
- const ignoreUndefined = (opts == null ? void 0 : opts.ignoreUndefined) ?? true;
30863
- const aKeys = getObjectKeys(a2, ignoreUndefined);
30864
- const bKeys = getObjectKeys(b2, ignoreUndefined);
30865
- if (!(opts == null ? void 0 : opts.partial) && aKeys.length !== bKeys.length) {
30866
- return false;
30867
- }
30868
- return bKeys.every((key) => deepEqual(a2[key], b2[key], opts));
30869
- }
30870
- if (Array.isArray(a2) && Array.isArray(b2)) {
30871
- if (a2.length !== b2.length) {
30872
- return false;
30873
- }
30874
- return !a2.some((item, index2) => !deepEqual(item, b2[index2], opts));
30875
- }
30876
- return false;
30877
- }
30878
- function removeTrailingSlash(value, basepath) {
30879
- if ((value == null ? void 0 : value.endsWith("/")) && value !== "/" && value !== `${basepath}/`) {
30880
- return value.slice(0, -1);
30881
- }
30882
- return value;
30883
- }
30884
- function exactPathTest(pathName1, pathName2, basepath) {
30885
- return removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);
30886
- }
30887
- const preloadWarning = "Error preloading route! ☝️";
30888
- var withSelector = { exports: {} };
30889
- var withSelector_production = {};
30890
- var shim = { exports: {} };
30891
- var useSyncExternalStoreShim_production = {};
30892
- /**
30893
- * @license React
30894
- * use-sync-external-store-shim.production.js
30895
- *
30896
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30897
- *
30898
- * This source code is licensed under the MIT license found in the
30899
- * LICENSE file in the root directory of this source tree.
30900
- */
30901
- var hasRequiredUseSyncExternalStoreShim_production;
30902
- function requireUseSyncExternalStoreShim_production() {
30903
- if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
30904
- hasRequiredUseSyncExternalStoreShim_production = 1;
30905
- var React2 = React__default;
30906
- function is(x2, y) {
30907
- return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
30908
- }
30909
- var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
30910
- function useSyncExternalStore$2(subscribe2, getSnapshot) {
30911
- var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
30912
- useLayoutEffect3(
30913
- function() {
30914
- inst.value = value;
30915
- inst.getSnapshot = getSnapshot;
30916
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30917
- },
30918
- [subscribe2, value, getSnapshot]
30919
- );
30920
- useEffect2(
30921
- function() {
30922
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30923
- return subscribe2(function() {
30924
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30925
- });
30926
- },
30927
- [subscribe2]
30928
- );
30929
- useDebugValue(value);
30930
- return value;
30931
- }
30932
- function checkIfSnapshotChanged(inst) {
30933
- var latestGetSnapshot = inst.getSnapshot;
30934
- inst = inst.value;
30935
- try {
30936
- var nextValue = latestGetSnapshot();
30937
- return !objectIs(inst, nextValue);
30938
- } catch (error) {
30939
- return true;
30940
- }
30941
- }
30942
- function useSyncExternalStore$1(subscribe2, getSnapshot) {
30943
- return getSnapshot();
30944
- }
30945
- var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
30946
- useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim2;
30947
- return useSyncExternalStoreShim_production;
30948
- }
30949
- var useSyncExternalStoreShim_development = {};
30950
- /**
30951
- * @license React
30952
- * use-sync-external-store-shim.development.js
30953
- *
30954
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30955
- *
30956
- * This source code is licensed under the MIT license found in the
30957
- * LICENSE file in the root directory of this source tree.
30958
- */
30959
- var hasRequiredUseSyncExternalStoreShim_development;
30960
- function requireUseSyncExternalStoreShim_development() {
30961
- if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
30962
- hasRequiredUseSyncExternalStoreShim_development = 1;
30963
- "production" !== process.env.NODE_ENV && (function() {
30964
- function is(x2, y) {
30965
- return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
30966
- }
30967
- function useSyncExternalStore$2(subscribe2, getSnapshot) {
30968
- didWarnOld18Alpha || void 0 === React2.startTransition || (didWarnOld18Alpha = true, console.error(
30969
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
30970
- ));
30971
- var value = getSnapshot();
30972
- if (!didWarnUncachedGetSnapshot) {
30973
- var cachedValue = getSnapshot();
30974
- objectIs(value, cachedValue) || (console.error(
30975
- "The result of getSnapshot should be cached to avoid an infinite loop"
30976
- ), didWarnUncachedGetSnapshot = true);
30977
- }
30978
- cachedValue = useState2({
30979
- inst: { value, getSnapshot }
30980
- });
30981
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
30982
- useLayoutEffect3(
30983
- function() {
30984
- inst.value = value;
30985
- inst.getSnapshot = getSnapshot;
30986
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30987
- },
30988
- [subscribe2, value, getSnapshot]
30989
- );
30990
- useEffect2(
30991
- function() {
30992
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30993
- return subscribe2(function() {
30994
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30995
- });
30996
- },
30997
- [subscribe2]
30998
- );
30999
- useDebugValue(value);
31000
- return value;
31001
- }
31002
- function checkIfSnapshotChanged(inst) {
31003
- var latestGetSnapshot = inst.getSnapshot;
31004
- inst = inst.value;
31005
- try {
31006
- var nextValue = latestGetSnapshot();
31007
- return !objectIs(inst, nextValue);
31008
- } catch (error) {
31009
- return true;
31010
- }
31011
- }
31012
- function useSyncExternalStore$1(subscribe2, getSnapshot) {
31013
- return getSnapshot();
31014
- }
31015
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
31016
- var React2 = React__default, objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
31017
- useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim2;
31018
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
31019
- })();
31020
- return useSyncExternalStoreShim_development;
31021
- }
31022
- var hasRequiredShim;
31023
- function requireShim() {
31024
- if (hasRequiredShim) return shim.exports;
31025
- hasRequiredShim = 1;
31026
- if (process.env.NODE_ENV === "production") {
31027
- shim.exports = requireUseSyncExternalStoreShim_production();
31028
- } else {
31029
- shim.exports = requireUseSyncExternalStoreShim_development();
31030
- }
31031
- return shim.exports;
31032
- }
31033
- /**
31034
- * @license React
31035
- * use-sync-external-store-shim/with-selector.production.js
31036
- *
31037
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31038
- *
31039
- * This source code is licensed under the MIT license found in the
31040
- * LICENSE file in the root directory of this source tree.
31041
- */
31042
- var hasRequiredWithSelector_production;
31043
- function requireWithSelector_production() {
31044
- if (hasRequiredWithSelector_production) return withSelector_production;
31045
- hasRequiredWithSelector_production = 1;
31046
- var React2 = React__default, shim2 = requireShim();
31047
- function is(x2, y) {
31048
- return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
31049
- }
31050
- var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue = React2.useDebugValue;
31051
- withSelector_production.useSyncExternalStoreWithSelector = function(subscribe2, getSnapshot, getServerSnapshot, selector, isEqual) {
31052
- var instRef = useRef2(null);
31053
- if (null === instRef.current) {
31054
- var inst = { hasValue: false, value: null };
31055
- instRef.current = inst;
31056
- } else inst = instRef.current;
31057
- instRef = useMemo2(
31058
- function() {
31059
- function memoizedSelector(nextSnapshot) {
31060
- if (!hasMemo) {
31061
- hasMemo = true;
31062
- memoizedSnapshot = nextSnapshot;
31063
- nextSnapshot = selector(nextSnapshot);
31064
- if (void 0 !== isEqual && inst.hasValue) {
31065
- var currentSelection = inst.value;
31066
- if (isEqual(currentSelection, nextSnapshot))
31067
- return memoizedSelection = currentSelection;
31068
- }
31069
- return memoizedSelection = nextSnapshot;
31070
- }
31071
- currentSelection = memoizedSelection;
31072
- if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
31073
- var nextSelection = selector(nextSnapshot);
31074
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
31075
- return memoizedSnapshot = nextSnapshot, currentSelection;
31076
- memoizedSnapshot = nextSnapshot;
31077
- return memoizedSelection = nextSelection;
31078
- }
31079
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
31080
- return [
31081
- function() {
31082
- return memoizedSelector(getSnapshot());
31083
- },
31084
- null === maybeGetServerSnapshot ? void 0 : function() {
31085
- return memoizedSelector(maybeGetServerSnapshot());
31086
- }
31087
- ];
31088
- },
31089
- [getSnapshot, getServerSnapshot, selector, isEqual]
31090
- );
31091
- var value = useSyncExternalStore(subscribe2, instRef[0], instRef[1]);
31092
- useEffect2(
31093
- function() {
31094
- inst.hasValue = true;
31095
- inst.value = value;
31096
- },
31097
- [value]
31098
- );
31099
- useDebugValue(value);
31100
- return value;
31101
- };
31102
- return withSelector_production;
31103
- }
31104
- var withSelector_development = {};
31105
- /**
31106
- * @license React
31107
- * use-sync-external-store-shim/with-selector.development.js
31108
- *
31109
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31110
- *
31111
- * This source code is licensed under the MIT license found in the
31112
- * LICENSE file in the root directory of this source tree.
31113
- */
31114
- var hasRequiredWithSelector_development;
31115
- function requireWithSelector_development() {
31116
- if (hasRequiredWithSelector_development) return withSelector_development;
31117
- hasRequiredWithSelector_development = 1;
31118
- "production" !== process.env.NODE_ENV && (function() {
31119
- function is(x2, y) {
31120
- return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
31121
- }
31122
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
31123
- var React2 = React__default, shim2 = requireShim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue = React2.useDebugValue;
31124
- withSelector_development.useSyncExternalStoreWithSelector = function(subscribe2, getSnapshot, getServerSnapshot, selector, isEqual) {
31125
- var instRef = useRef2(null);
31126
- if (null === instRef.current) {
31127
- var inst = { hasValue: false, value: null };
31128
- instRef.current = inst;
31129
- } else inst = instRef.current;
31130
- instRef = useMemo2(
31131
- function() {
31132
- function memoizedSelector(nextSnapshot) {
31133
- if (!hasMemo) {
31134
- hasMemo = true;
31135
- memoizedSnapshot = nextSnapshot;
31136
- nextSnapshot = selector(nextSnapshot);
31137
- if (void 0 !== isEqual && inst.hasValue) {
31138
- var currentSelection = inst.value;
31139
- if (isEqual(currentSelection, nextSnapshot))
31140
- return memoizedSelection = currentSelection;
31141
- }
31142
- return memoizedSelection = nextSnapshot;
31143
- }
31144
- currentSelection = memoizedSelection;
31145
- if (objectIs(memoizedSnapshot, nextSnapshot))
31146
- return currentSelection;
31147
- var nextSelection = selector(nextSnapshot);
31148
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
31149
- return memoizedSnapshot = nextSnapshot, currentSelection;
31150
- memoizedSnapshot = nextSnapshot;
31151
- return memoizedSelection = nextSelection;
31152
- }
31153
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
31154
- return [
31155
- function() {
31156
- return memoizedSelector(getSnapshot());
31157
- },
31158
- null === maybeGetServerSnapshot ? void 0 : function() {
31159
- return memoizedSelector(maybeGetServerSnapshot());
31160
- }
31161
- ];
31162
- },
31163
- [getSnapshot, getServerSnapshot, selector, isEqual]
31164
- );
31165
- var value = useSyncExternalStore(subscribe2, instRef[0], instRef[1]);
31166
- useEffect2(
31167
- function() {
31168
- inst.hasValue = true;
31169
- inst.value = value;
31170
- },
31171
- [value]
31172
- );
31173
- useDebugValue(value);
31174
- return value;
31175
- };
31176
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
31177
- })();
31178
- return withSelector_development;
31179
- }
31180
- var hasRequiredWithSelector;
31181
- function requireWithSelector() {
31182
- if (hasRequiredWithSelector) return withSelector.exports;
31183
- hasRequiredWithSelector = 1;
31184
- if (process.env.NODE_ENV === "production") {
31185
- withSelector.exports = requireWithSelector_production();
31186
- } else {
31187
- withSelector.exports = requireWithSelector_development();
31188
- }
31189
- return withSelector.exports;
31190
- }
31191
- var withSelectorExports = requireWithSelector();
31192
- function useStore(store, selector = (d) => d) {
31193
- const slice = withSelectorExports.useSyncExternalStoreWithSelector(
31194
- store.subscribe,
31195
- () => store.state,
31196
- () => store.state,
31197
- selector,
31198
- shallow
31199
- );
31200
- return slice;
31201
- }
31202
- function shallow(objA, objB) {
31203
- if (Object.is(objA, objB)) {
31204
- return true;
31205
- }
31206
- if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
31207
- return false;
31208
- }
31209
- if (objA instanceof Map && objB instanceof Map) {
31210
- if (objA.size !== objB.size) return false;
31211
- for (const [k2, v] of objA) {
31212
- if (!objB.has(k2) || !Object.is(v, objB.get(k2))) return false;
31213
- }
31214
- return true;
31215
- }
31216
- if (objA instanceof Set && objB instanceof Set) {
31217
- if (objA.size !== objB.size) return false;
31218
- for (const v of objA) {
31219
- if (!objB.has(v)) return false;
31220
- }
31221
- return true;
31222
- }
31223
- if (objA instanceof Date && objB instanceof Date) {
31224
- if (objA.getTime() !== objB.getTime()) return false;
31225
- return true;
31226
- }
31227
- const keysA = Object.keys(objA);
31228
- if (keysA.length !== Object.keys(objB).length) {
31229
- return false;
31230
- }
31231
- for (let i2 = 0; i2 < keysA.length; i2++) {
31232
- if (!Object.prototype.hasOwnProperty.call(objB, keysA[i2]) || !Object.is(objA[keysA[i2]], objB[keysA[i2]])) {
31233
- return false;
31234
- }
31235
- }
31236
- return true;
31237
- }
31238
- const routerContext = React.createContext(null);
31239
- function getRouterContext() {
31240
- if (typeof document === "undefined") {
31241
- return routerContext;
31242
- }
31243
- if (window.__TSR_ROUTER_CONTEXT__) {
31244
- return window.__TSR_ROUTER_CONTEXT__;
31245
- }
31246
- window.__TSR_ROUTER_CONTEXT__ = routerContext;
31247
- return routerContext;
31248
- }
31249
- function useRouter(opts) {
31250
- const value = React.useContext(getRouterContext());
31251
- warning(
31252
- !(((opts == null ? void 0 : opts.warn) ?? true) && !value),
31253
- "useRouter must be used inside a <RouterProvider> component!"
31254
- );
31255
- return value;
31256
- }
31257
- function useRouterState(opts) {
31258
- const contextRouter = useRouter({
31259
- warn: (opts == null ? void 0 : opts.router) === void 0
31260
- });
31261
- const router = (opts == null ? void 0 : opts.router) || contextRouter;
31262
- const previousResult = useRef(void 0);
31263
- return useStore(router.__store, (state) => {
31264
- if (opts == null ? void 0 : opts.select) {
31265
- if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
31266
- const newSlice = replaceEqualDeep(
31267
- previousResult.current,
31268
- opts.select(state)
31269
- );
31270
- previousResult.current = newSlice;
31271
- return newSlice;
31272
- }
31273
- return opts.select(state);
31274
- }
31275
- return state;
31276
- });
31277
- }
31278
- const matchContext = React.createContext(void 0);
31279
- const dummyMatchContext = React.createContext(
31280
- void 0
31281
- );
31282
- function useMatch(opts) {
31283
- const nearestMatchId = React.useContext(
31284
- opts.from ? dummyMatchContext : matchContext
31285
- );
31286
- const matchSelection = useRouterState({
31287
- select: (state) => {
31288
- const match2 = state.matches.find(
31289
- (d) => opts.from ? opts.from === d.routeId : d.id === nearestMatchId
31290
- );
31291
- invariant(
31292
- !((opts.shouldThrow ?? true) && !match2),
31293
- `Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`
31294
- );
31295
- if (match2 === void 0) {
31296
- return void 0;
31297
- }
31298
- return opts.select ? opts.select(match2) : match2;
31299
- },
31300
- structuralSharing: opts.structuralSharing
31301
- });
31302
- return matchSelection;
31303
- }
31304
- function useIntersectionObserver(ref, callback, intersectionObserverOptions2 = {}, options = {}) {
31305
- React.useEffect(() => {
31306
- if (!ref.current || options.disabled || typeof IntersectionObserver !== "function") {
31307
- return;
31308
- }
31309
- const observer = new IntersectionObserver(([entry]) => {
31310
- callback(entry);
31311
- }, intersectionObserverOptions2);
31312
- observer.observe(ref.current);
31313
- return () => {
31314
- observer.disconnect();
31315
- };
31316
- }, [callback, intersectionObserverOptions2, options.disabled, ref]);
31317
- }
31318
- function useForwardedRef(ref) {
31319
- const innerRef = React.useRef(null);
31320
- React.useImperativeHandle(ref, () => innerRef.current, []);
31321
- return innerRef;
31322
- }
31323
- function useLinkProps(options, forwardedRef) {
31324
- const router = useRouter();
31325
- const [isTransitioning, setIsTransitioning] = React.useState(false);
31326
- const hasRenderFetched = React.useRef(false);
31327
- const innerRef = useForwardedRef(forwardedRef);
31328
- const {
31329
- // custom props
31330
- activeProps,
31331
- inactiveProps,
31332
- activeOptions,
31333
- to,
31334
- preload: userPreload,
31335
- preloadDelay: userPreloadDelay,
31336
- hashScrollIntoView,
31337
- replace,
31338
- startTransition,
31339
- resetScroll,
31340
- viewTransition,
31341
- // element props
31342
- children,
31343
- target,
31344
- disabled,
31345
- style,
31346
- className,
31347
- onClick,
31348
- onFocus,
31349
- onMouseEnter,
31350
- onMouseLeave,
31351
- onTouchStart,
31352
- ignoreBlocker,
31353
- // prevent these from being returned
31354
- params: _params,
31355
- search: _search,
31356
- hash: _hash,
31357
- state: _state,
31358
- mask: _mask,
31359
- reloadDocument: _reloadDocument,
31360
- unsafeRelative: _unsafeRelative,
31361
- from: _from,
31362
- _fromLocation,
31363
- ...propsSafeToSpread
31364
- } = options;
31365
- const type = React.useMemo(() => {
31366
- try {
31367
- new URL(to);
31368
- return "external";
31369
- } catch {
31370
- }
31371
- return "internal";
31372
- }, [to]);
31373
- const currentSearch = useRouterState({
31374
- select: (s2) => s2.location.search,
31375
- structuralSharing: true
31376
- });
31377
- const from = useMatch({
31378
- strict: false,
31379
- select: (match2) => options.from ?? match2.fullPath
31380
- });
31381
- const next = React.useMemo(
31382
- () => router.buildLocation({ ...options, from }),
31383
- // eslint-disable-next-line react-hooks/exhaustive-deps
31384
- [
31385
- router,
31386
- currentSearch,
31387
- options._fromLocation,
31388
- from,
31389
- options.hash,
31390
- options.to,
31391
- options.search,
31392
- options.params,
31393
- options.state,
31394
- options.mask,
31395
- options.unsafeRelative
31396
- ]
31397
- );
31398
- const isExternal = type === "external";
31399
- const preload = options.reloadDocument || isExternal ? false : userPreload ?? router.options.defaultPreload;
31400
- const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
31401
- const isActive = useRouterState({
31402
- select: (s2) => {
31403
- if (isExternal) return false;
31404
- if (activeOptions == null ? void 0 : activeOptions.exact) {
31405
- const testExact = exactPathTest(
31406
- s2.location.pathname,
31407
- next.pathname,
31408
- router.basepath
31409
- );
31410
- if (!testExact) {
31411
- return false;
31412
- }
31413
- } else {
31414
- const currentPathSplit = removeTrailingSlash(
31415
- s2.location.pathname,
31416
- router.basepath
31417
- );
31418
- const nextPathSplit = removeTrailingSlash(
31419
- next.pathname,
31420
- router.basepath
31421
- );
31422
- const pathIsFuzzyEqual = currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/");
31423
- if (!pathIsFuzzyEqual) {
31424
- return false;
31425
- }
31426
- }
31427
- if ((activeOptions == null ? void 0 : activeOptions.includeSearch) ?? true) {
31428
- const searchTest = deepEqual(s2.location.search, next.search, {
31429
- partial: !(activeOptions == null ? void 0 : activeOptions.exact),
31430
- ignoreUndefined: !(activeOptions == null ? void 0 : activeOptions.explicitUndefined)
31431
- });
31432
- if (!searchTest) {
31433
- return false;
31434
- }
31435
- }
31436
- if (activeOptions == null ? void 0 : activeOptions.includeHash) {
31437
- return s2.location.hash === next.hash;
31438
- }
31439
- return true;
31440
- }
31441
- });
31442
- const doPreload = React.useCallback(
31443
- () => {
31444
- router.preloadRoute({ ...options, from }).catch((err) => {
31445
- console.warn(err);
31446
- console.warn(preloadWarning);
31447
- });
31448
- },
31449
- // eslint-disable-next-line react-hooks/exhaustive-deps
31450
- [
31451
- router,
31452
- options.to,
31453
- options._fromLocation,
31454
- from,
31455
- options.search,
31456
- options.hash,
31457
- options.params,
31458
- options.state,
31459
- options.mask,
31460
- options.unsafeRelative,
31461
- options.hashScrollIntoView,
31462
- options.href,
31463
- options.ignoreBlocker,
31464
- options.reloadDocument,
31465
- options.replace,
31466
- options.resetScroll,
31467
- options.viewTransition
31468
- ]
31469
- );
31470
- const preloadViewportIoCallback = React.useCallback(
31471
- (entry) => {
31472
- if (entry == null ? void 0 : entry.isIntersecting) {
31473
- doPreload();
31474
- }
31475
- },
31476
- [doPreload]
31477
- );
31478
- useIntersectionObserver(
31479
- innerRef,
31480
- preloadViewportIoCallback,
31481
- intersectionObserverOptions,
31482
- { disabled: !!disabled || !(preload === "viewport") }
31483
- );
31484
- React.useEffect(() => {
31485
- if (hasRenderFetched.current) {
31486
- return;
31487
- }
31488
- if (!disabled && preload === "render") {
31489
- doPreload();
31490
- hasRenderFetched.current = true;
31491
- }
31492
- }, [disabled, doPreload, preload]);
31493
- if (isExternal) {
31494
- return {
31495
- ...propsSafeToSpread,
31496
- ref: innerRef,
31497
- type,
31498
- href: to,
31499
- ...children && { children },
31500
- ...target && { target },
31501
- ...disabled && { disabled },
31502
- ...style && { style },
31503
- ...className && { className },
31504
- ...onClick && { onClick },
31505
- ...onFocus && { onFocus },
31506
- ...onMouseEnter && { onMouseEnter },
31507
- ...onMouseLeave && { onMouseLeave },
31508
- ...onTouchStart && { onTouchStart }
31509
- };
31510
- }
31511
- const handleClick = (e) => {
31512
- if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!target || target === "_self") && e.button === 0) {
31513
- e.preventDefault();
31514
- flushSync(() => {
31515
- setIsTransitioning(true);
31516
- });
31517
- const unsub = router.subscribe("onResolved", () => {
31518
- unsub();
31519
- setIsTransitioning(false);
31520
- });
31521
- router.navigate({
31522
- ...options,
31523
- from,
31524
- replace,
31525
- resetScroll,
31526
- hashScrollIntoView,
31527
- startTransition,
31528
- viewTransition,
31529
- ignoreBlocker
31530
- });
31531
- }
31532
- };
31533
- const handleFocus = (_2) => {
31534
- if (disabled) return;
31535
- if (preload) {
31536
- doPreload();
31537
- }
31538
- };
31539
- const handleTouchStart = handleFocus;
31540
- const handleEnter = (e) => {
31541
- if (disabled || !preload) return;
31542
- if (!preloadDelay) {
31543
- doPreload();
31544
- } else {
31545
- const eventTarget = e.target;
31546
- if (timeoutMap.has(eventTarget)) {
31547
- return;
31548
- }
31549
- const id = setTimeout(() => {
31550
- timeoutMap.delete(eventTarget);
31551
- doPreload();
31552
- }, preloadDelay);
31553
- timeoutMap.set(eventTarget, id);
31554
- }
31555
- };
31556
- const handleLeave = (e) => {
31557
- if (disabled || !preload || !preloadDelay) return;
31558
- const eventTarget = e.target;
31559
- const id = timeoutMap.get(eventTarget);
31560
- if (id) {
31561
- clearTimeout(id);
31562
- timeoutMap.delete(eventTarget);
31563
- }
31564
- };
31565
- const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
31566
- const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
31567
- const resolvedClassName = [
31568
- className,
31569
- resolvedActiveProps.className,
31570
- resolvedInactiveProps.className
31571
- ].filter(Boolean).join(" ");
31572
- const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
31573
- ...style,
31574
- ...resolvedActiveProps.style,
31575
- ...resolvedInactiveProps.style
31576
- };
31577
- return {
31578
- ...propsSafeToSpread,
31579
- ...resolvedActiveProps,
31580
- ...resolvedInactiveProps,
31581
- href: disabled ? void 0 : next.maskedLocation ? router.history.createHref(next.maskedLocation.href) : router.history.createHref(next.href),
31582
- ref: innerRef,
31583
- onClick: composeHandlers([onClick, handleClick]),
31584
- onFocus: composeHandlers([onFocus, handleFocus]),
31585
- onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),
31586
- onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
31587
- onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
31588
- disabled: !!disabled,
31589
- target,
31590
- ...resolvedStyle && { style: resolvedStyle },
31591
- ...resolvedClassName && { className: resolvedClassName },
31592
- ...disabled && STATIC_DISABLED_PROPS,
31593
- ...isActive && STATIC_ACTIVE_PROPS,
31594
- ...isTransitioning && STATIC_TRANSITIONING_PROPS
31595
- };
31596
- }
31597
- const STATIC_EMPTY_OBJECT = {};
31598
- const STATIC_ACTIVE_OBJECT = { className: "active" };
31599
- const STATIC_DISABLED_PROPS = { role: "link", "aria-disabled": true };
31600
- const STATIC_ACTIVE_PROPS = { "data-status": "active", "aria-current": "page" };
31601
- const STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
31602
- const timeoutMap = /* @__PURE__ */ new WeakMap();
31603
- const intersectionObserverOptions = {
31604
- rootMargin: "100px"
31605
- };
31606
- const composeHandlers = (handlers) => (e) => {
31607
- handlers.filter(Boolean).forEach((handler) => {
31608
- if (e.defaultPrevented) return;
31609
- handler(e);
31610
- });
31611
- };
31612
- const Link$1 = React.forwardRef(
31613
- (props2, ref) => {
31614
- const { _asChild, ...rest } = props2;
31615
- const {
31616
- type: _type,
31617
- ref: innerRef,
31618
- ...linkProps
31619
- } = useLinkProps(rest, ref);
31620
- const children = typeof rest.children === "function" ? rest.children({
31621
- isActive: linkProps["data-status"] === "active"
31622
- }) : rest.children;
31623
- if (_asChild === void 0) {
31624
- delete linkProps.disabled;
31625
- }
31626
- return React.createElement(
31627
- _asChild ? _asChild : "a",
31628
- {
31629
- ...linkProps,
31630
- ref: innerRef
31631
- },
31632
- children
31633
- );
31634
- }
31635
- );
31636
- function isCtrlEvent(e) {
31637
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
31638
- }
31639
- function useLocation(opts) {
31640
- return useRouterState({
31641
- select: (state) => state.location
31642
- });
31643
- }
31644
30748
  var M = (e, i2, s2, u2, m2, a2, l, h) => {
31645
30749
  let d = document.documentElement, w = ["light", "dark"];
31646
30750
  function p2(n2) {
@@ -32104,6 +31208,149 @@ function AspectRatio({
32104
31208
  }) {
32105
31209
  return /* @__PURE__ */ jsx(Root$7, { "data-slot": "aspect-ratio", ...props2 });
32106
31210
  }
31211
+ var shim = { exports: {} };
31212
+ var useSyncExternalStoreShim_production = {};
31213
+ /**
31214
+ * @license React
31215
+ * use-sync-external-store-shim.production.js
31216
+ *
31217
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31218
+ *
31219
+ * This source code is licensed under the MIT license found in the
31220
+ * LICENSE file in the root directory of this source tree.
31221
+ */
31222
+ var hasRequiredUseSyncExternalStoreShim_production;
31223
+ function requireUseSyncExternalStoreShim_production() {
31224
+ if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
31225
+ hasRequiredUseSyncExternalStoreShim_production = 1;
31226
+ var React2 = React__default;
31227
+ function is(x2, y) {
31228
+ return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
31229
+ }
31230
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
31231
+ function useSyncExternalStore$2(subscribe2, getSnapshot) {
31232
+ var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
31233
+ useLayoutEffect3(
31234
+ function() {
31235
+ inst.value = value;
31236
+ inst.getSnapshot = getSnapshot;
31237
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31238
+ },
31239
+ [subscribe2, value, getSnapshot]
31240
+ );
31241
+ useEffect2(
31242
+ function() {
31243
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31244
+ return subscribe2(function() {
31245
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31246
+ });
31247
+ },
31248
+ [subscribe2]
31249
+ );
31250
+ useDebugValue(value);
31251
+ return value;
31252
+ }
31253
+ function checkIfSnapshotChanged(inst) {
31254
+ var latestGetSnapshot = inst.getSnapshot;
31255
+ inst = inst.value;
31256
+ try {
31257
+ var nextValue = latestGetSnapshot();
31258
+ return !objectIs(inst, nextValue);
31259
+ } catch (error) {
31260
+ return true;
31261
+ }
31262
+ }
31263
+ function useSyncExternalStore$1(subscribe2, getSnapshot) {
31264
+ return getSnapshot();
31265
+ }
31266
+ var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
31267
+ useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim2;
31268
+ return useSyncExternalStoreShim_production;
31269
+ }
31270
+ var useSyncExternalStoreShim_development = {};
31271
+ /**
31272
+ * @license React
31273
+ * use-sync-external-store-shim.development.js
31274
+ *
31275
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31276
+ *
31277
+ * This source code is licensed under the MIT license found in the
31278
+ * LICENSE file in the root directory of this source tree.
31279
+ */
31280
+ var hasRequiredUseSyncExternalStoreShim_development;
31281
+ function requireUseSyncExternalStoreShim_development() {
31282
+ if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
31283
+ hasRequiredUseSyncExternalStoreShim_development = 1;
31284
+ "production" !== process.env.NODE_ENV && (function() {
31285
+ function is(x2, y) {
31286
+ return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
31287
+ }
31288
+ function useSyncExternalStore$2(subscribe2, getSnapshot) {
31289
+ didWarnOld18Alpha || void 0 === React2.startTransition || (didWarnOld18Alpha = true, console.error(
31290
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
31291
+ ));
31292
+ var value = getSnapshot();
31293
+ if (!didWarnUncachedGetSnapshot) {
31294
+ var cachedValue = getSnapshot();
31295
+ objectIs(value, cachedValue) || (console.error(
31296
+ "The result of getSnapshot should be cached to avoid an infinite loop"
31297
+ ), didWarnUncachedGetSnapshot = true);
31298
+ }
31299
+ cachedValue = useState2({
31300
+ inst: { value, getSnapshot }
31301
+ });
31302
+ var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
31303
+ useLayoutEffect3(
31304
+ function() {
31305
+ inst.value = value;
31306
+ inst.getSnapshot = getSnapshot;
31307
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31308
+ },
31309
+ [subscribe2, value, getSnapshot]
31310
+ );
31311
+ useEffect2(
31312
+ function() {
31313
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31314
+ return subscribe2(function() {
31315
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31316
+ });
31317
+ },
31318
+ [subscribe2]
31319
+ );
31320
+ useDebugValue(value);
31321
+ return value;
31322
+ }
31323
+ function checkIfSnapshotChanged(inst) {
31324
+ var latestGetSnapshot = inst.getSnapshot;
31325
+ inst = inst.value;
31326
+ try {
31327
+ var nextValue = latestGetSnapshot();
31328
+ return !objectIs(inst, nextValue);
31329
+ } catch (error) {
31330
+ return true;
31331
+ }
31332
+ }
31333
+ function useSyncExternalStore$1(subscribe2, getSnapshot) {
31334
+ return getSnapshot();
31335
+ }
31336
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
31337
+ var React2 = React__default, objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
31338
+ useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim2;
31339
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
31340
+ })();
31341
+ return useSyncExternalStoreShim_development;
31342
+ }
31343
+ var hasRequiredShim;
31344
+ function requireShim() {
31345
+ if (hasRequiredShim) return shim.exports;
31346
+ hasRequiredShim = 1;
31347
+ if (process.env.NODE_ENV === "production") {
31348
+ shim.exports = requireUseSyncExternalStoreShim_production();
31349
+ } else {
31350
+ shim.exports = requireUseSyncExternalStoreShim_development();
31351
+ }
31352
+ return shim.exports;
31353
+ }
32107
31354
  var shimExports = requireShim();
32108
31355
  function useIsHydrated() {
32109
31356
  return shimExports.useSyncExternalStore(
@@ -43901,8 +43148,8 @@ const ChartStyle = ({ id, config: config2 }) => {
43901
43148
  {
43902
43149
  dangerouslySetInnerHTML: {
43903
43150
  __html: Object.entries(THEMES).map(
43904
- ([theme, prefix2]) => `
43905
- ${prefix2} [data-chart=${id}] {
43151
+ ([theme, prefix]) => `
43152
+ ${prefix} [data-chart=${id}] {
43906
43153
  ${colorConfig.map(([key, itemConfig]) => {
43907
43154
  var _a;
43908
43155
  const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
@@ -52871,7 +52118,7 @@ function assignOffset(defaultOffset, mobileOffset) {
52871
52118
  mobileOffset
52872
52119
  ].forEach((offset2, index2) => {
52873
52120
  const isMobile = index2 === 1;
52874
- const prefix2 = isMobile ? "--mobile-offset" : "--offset";
52121
+ const prefix = isMobile ? "--mobile-offset" : "--offset";
52875
52122
  const defaultValue = isMobile ? MOBILE_VIEWPORT_OFFSET : VIEWPORT_OFFSET;
52876
52123
  function assignAll(offset3) {
52877
52124
  [
@@ -52880,7 +52127,7 @@ function assignOffset(defaultOffset, mobileOffset) {
52880
52127
  "bottom",
52881
52128
  "left"
52882
52129
  ].forEach((key) => {
52883
- styles[`${prefix2}-${key}`] = typeof offset3 === "number" ? `${offset3}px` : offset3;
52130
+ styles[`${prefix}-${key}`] = typeof offset3 === "number" ? `${offset3}px` : offset3;
52884
52131
  });
52885
52132
  }
52886
52133
  if (typeof offset2 === "number" || typeof offset2 === "string") {
@@ -52893,9 +52140,9 @@ function assignOffset(defaultOffset, mobileOffset) {
52893
52140
  "left"
52894
52141
  ].forEach((key) => {
52895
52142
  if (offset2[key] === void 0) {
52896
- styles[`${prefix2}-${key}`] = defaultValue;
52143
+ styles[`${prefix}-${key}`] = defaultValue;
52897
52144
  } else {
52898
- styles[`${prefix2}-${key}`] = typeof offset2[key] === "number" ? `${offset2[key]}px` : offset2[key];
52145
+ styles[`${prefix}-${key}`] = typeof offset2[key] === "number" ? `${offset2[key]}px` : offset2[key];
52899
52146
  }
52900
52147
  });
52901
52148
  } else {