@telepix-lab/telepix-ui 0.9.2 → 0.9.3

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.
@@ -1814,13 +1814,6 @@ function RemoveScrollSideCar(props) {
1814
1814
  if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
1815
1815
  return false;
1816
1816
  }
1817
- // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
1818
- var selection = window.getSelection();
1819
- var anchorNode = selection && selection.anchorNode;
1820
- var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
1821
- if (isTouchingSelection) {
1822
- return false;
1823
- }
1824
1817
  var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1825
1818
  if (!canBeScrolledInMainDirection) {
1826
1819
  return true;
@@ -2067,7 +2060,7 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
2067
2060
  };
2068
2061
 
2069
2062
  var DIALOG_NAME = "Dialog";
2070
- var [createDialogContext] = createContextScope(DIALOG_NAME);
2063
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
2071
2064
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
2072
2065
  var Dialog$1 = (props) => {
2073
2066
  const {
@@ -2424,7 +2417,7 @@ function useSize(element) {
2424
2417
  }
2425
2418
 
2426
2419
  var CHECKBOX_NAME = "Checkbox";
2427
- var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
2420
+ var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
2428
2421
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
2429
2422
  function CheckboxProvider(props) {
2430
2423
  const {
@@ -2701,6 +2694,10 @@ const oppositeSideMap = {
2701
2694
  bottom: 'top',
2702
2695
  top: 'bottom'
2703
2696
  };
2697
+ const oppositeAlignmentMap = {
2698
+ start: 'end',
2699
+ end: 'start'
2700
+ };
2704
2701
  function clamp$1(start, value, end) {
2705
2702
  return max(start, min(value, end));
2706
2703
  }
@@ -2719,9 +2716,9 @@ function getOppositeAxis(axis) {
2719
2716
  function getAxisLength(axis) {
2720
2717
  return axis === 'y' ? 'height' : 'width';
2721
2718
  }
2719
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
2722
2720
  function getSideAxis(placement) {
2723
- const firstChar = placement[0];
2724
- return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
2721
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
2725
2722
  }
2726
2723
  function getAlignmentAxis(placement) {
2727
2724
  return getOppositeAxis(getSideAxis(placement));
@@ -2744,7 +2741,7 @@ function getExpandedPlacements(placement) {
2744
2741
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2745
2742
  }
2746
2743
  function getOppositeAlignmentPlacement(placement) {
2747
- return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
2744
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
2748
2745
  }
2749
2746
  const lrPlacement = ['left', 'right'];
2750
2747
  const rlPlacement = ['right', 'left'];
@@ -2775,8 +2772,7 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2775
2772
  return list;
2776
2773
  }
2777
2774
  function getOppositePlacement(placement) {
2778
- const side = getSide(placement);
2779
- return oppositeSideMap[side] + placement.slice(side.length);
2775
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
2780
2776
  }
2781
2777
  function expandPaddingObject(padding) {
2782
2778
  return {
@@ -2870,74 +2866,6 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
2870
2866
  return coords;
2871
2867
  }
2872
2868
 
2873
- /**
2874
- * Resolves with an object of overflow side offsets that determine how much the
2875
- * element is overflowing a given clipping boundary on each side.
2876
- * - positive = overflowing the boundary by that number of pixels
2877
- * - negative = how many pixels left before it will overflow
2878
- * - 0 = lies flush with the boundary
2879
- * @see https://floating-ui.com/docs/detectOverflow
2880
- */
2881
- async function detectOverflow(state, options) {
2882
- var _await$platform$isEle;
2883
- if (options === void 0) {
2884
- options = {};
2885
- }
2886
- const {
2887
- x,
2888
- y,
2889
- platform,
2890
- rects,
2891
- elements,
2892
- strategy
2893
- } = state;
2894
- const {
2895
- boundary = 'clippingAncestors',
2896
- rootBoundary = 'viewport',
2897
- elementContext = 'floating',
2898
- altBoundary = false,
2899
- padding = 0
2900
- } = evaluate(options, state);
2901
- const paddingObject = getPaddingObject(padding);
2902
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
2903
- const element = elements[altBoundary ? altContext : elementContext];
2904
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
2905
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
2906
- boundary,
2907
- rootBoundary,
2908
- strategy
2909
- }));
2910
- const rect = elementContext === 'floating' ? {
2911
- x,
2912
- y,
2913
- width: rects.floating.width,
2914
- height: rects.floating.height
2915
- } : rects.reference;
2916
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
2917
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
2918
- x: 1,
2919
- y: 1
2920
- } : {
2921
- x: 1,
2922
- y: 1
2923
- };
2924
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
2925
- elements,
2926
- rect,
2927
- offsetParent,
2928
- strategy
2929
- }) : rect);
2930
- return {
2931
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
2932
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
2933
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
2934
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
2935
- };
2936
- }
2937
-
2938
- // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
2939
- const MAX_RESET_COUNT = 50;
2940
-
2941
2869
  /**
2942
2870
  * Computes the `x` and `y` coordinates that will place the floating element
2943
2871
  * next to a given reference element.
@@ -2952,10 +2880,7 @@ const computePosition$1 = async (reference, floating, config) => {
2952
2880
  middleware = [],
2953
2881
  platform
2954
2882
  } = config;
2955
- const platformWithDetectOverflow = platform.detectOverflow ? platform : {
2956
- ...platform,
2957
- detectOverflow
2958
- };
2883
+ const validMiddleware = middleware.filter(Boolean);
2959
2884
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
2960
2885
  let rects = await platform.getElementRects({
2961
2886
  reference,
@@ -2967,17 +2892,13 @@ const computePosition$1 = async (reference, floating, config) => {
2967
2892
  y
2968
2893
  } = computeCoordsFromPlacement(rects, placement, rtl);
2969
2894
  let statefulPlacement = placement;
2895
+ let middlewareData = {};
2970
2896
  let resetCount = 0;
2971
- const middlewareData = {};
2972
- for (let i = 0; i < middleware.length; i++) {
2973
- const currentMiddleware = middleware[i];
2974
- if (!currentMiddleware) {
2975
- continue;
2976
- }
2897
+ for (let i = 0; i < validMiddleware.length; i++) {
2977
2898
  const {
2978
2899
  name,
2979
2900
  fn
2980
- } = currentMiddleware;
2901
+ } = validMiddleware[i];
2981
2902
  const {
2982
2903
  x: nextX,
2983
2904
  y: nextY,
@@ -2991,7 +2912,7 @@ const computePosition$1 = async (reference, floating, config) => {
2991
2912
  strategy,
2992
2913
  middlewareData,
2993
2914
  rects,
2994
- platform: platformWithDetectOverflow,
2915
+ platform,
2995
2916
  elements: {
2996
2917
  reference,
2997
2918
  floating
@@ -2999,11 +2920,14 @@ const computePosition$1 = async (reference, floating, config) => {
2999
2920
  });
3000
2921
  x = nextX != null ? nextX : x;
3001
2922
  y = nextY != null ? nextY : y;
3002
- middlewareData[name] = {
3003
- ...middlewareData[name],
3004
- ...data
2923
+ middlewareData = {
2924
+ ...middlewareData,
2925
+ [name]: {
2926
+ ...middlewareData[name],
2927
+ ...data
2928
+ }
3005
2929
  };
3006
- if (reset && resetCount < MAX_RESET_COUNT) {
2930
+ if (reset && resetCount <= 50) {
3007
2931
  resetCount++;
3008
2932
  if (typeof reset === 'object') {
3009
2933
  if (reset.placement) {
@@ -3033,6 +2957,71 @@ const computePosition$1 = async (reference, floating, config) => {
3033
2957
  };
3034
2958
  };
3035
2959
 
2960
+ /**
2961
+ * Resolves with an object of overflow side offsets that determine how much the
2962
+ * element is overflowing a given clipping boundary on each side.
2963
+ * - positive = overflowing the boundary by that number of pixels
2964
+ * - negative = how many pixels left before it will overflow
2965
+ * - 0 = lies flush with the boundary
2966
+ * @see https://floating-ui.com/docs/detectOverflow
2967
+ */
2968
+ async function detectOverflow(state, options) {
2969
+ var _await$platform$isEle;
2970
+ if (options === void 0) {
2971
+ options = {};
2972
+ }
2973
+ const {
2974
+ x,
2975
+ y,
2976
+ platform,
2977
+ rects,
2978
+ elements,
2979
+ strategy
2980
+ } = state;
2981
+ const {
2982
+ boundary = 'clippingAncestors',
2983
+ rootBoundary = 'viewport',
2984
+ elementContext = 'floating',
2985
+ altBoundary = false,
2986
+ padding = 0
2987
+ } = evaluate(options, state);
2988
+ const paddingObject = getPaddingObject(padding);
2989
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
2990
+ const element = elements[altBoundary ? altContext : elementContext];
2991
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
2992
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
2993
+ boundary,
2994
+ rootBoundary,
2995
+ strategy
2996
+ }));
2997
+ const rect = elementContext === 'floating' ? {
2998
+ x,
2999
+ y,
3000
+ width: rects.floating.width,
3001
+ height: rects.floating.height
3002
+ } : rects.reference;
3003
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
3004
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
3005
+ x: 1,
3006
+ y: 1
3007
+ } : {
3008
+ x: 1,
3009
+ y: 1
3010
+ };
3011
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
3012
+ elements,
3013
+ rect,
3014
+ offsetParent,
3015
+ strategy
3016
+ }) : rect);
3017
+ return {
3018
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3019
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3020
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3021
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3022
+ };
3023
+ }
3024
+
3036
3025
  /**
3037
3026
  * Provides data to position an inner element of the floating element so that it
3038
3027
  * appears centered to the reference element.
@@ -3165,7 +3154,7 @@ const flip$2 = function (options) {
3165
3154
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3166
3155
  }
3167
3156
  const placements = [initialPlacement, ...fallbackPlacements];
3168
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3157
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3169
3158
  const overflows = [];
3170
3159
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3171
3160
  if (checkMainAxis) {
@@ -3272,8 +3261,7 @@ const hide$2 = function (options) {
3272
3261
  options,
3273
3262
  async fn(state) {
3274
3263
  const {
3275
- rects,
3276
- platform
3264
+ rects
3277
3265
  } = state;
3278
3266
  const {
3279
3267
  strategy = 'referenceHidden',
@@ -3282,7 +3270,7 @@ const hide$2 = function (options) {
3282
3270
  switch (strategy) {
3283
3271
  case 'referenceHidden':
3284
3272
  {
3285
- const overflow = await platform.detectOverflow(state, {
3273
+ const overflow = await detectOverflow(state, {
3286
3274
  ...detectOverflowOptions,
3287
3275
  elementContext: 'reference'
3288
3276
  });
@@ -3296,7 +3284,7 @@ const hide$2 = function (options) {
3296
3284
  }
3297
3285
  case 'escaped':
3298
3286
  {
3299
- const overflow = await platform.detectOverflow(state, {
3287
+ const overflow = await detectOverflow(state, {
3300
3288
  ...detectOverflowOptions,
3301
3289
  altBoundary: true
3302
3290
  });
@@ -3419,8 +3407,7 @@ const shift$2 = function (options) {
3419
3407
  const {
3420
3408
  x,
3421
3409
  y,
3422
- placement,
3423
- platform
3410
+ placement
3424
3411
  } = state;
3425
3412
  const {
3426
3413
  mainAxis: checkMainAxis = true,
@@ -3443,7 +3430,7 @@ const shift$2 = function (options) {
3443
3430
  x,
3444
3431
  y
3445
3432
  };
3446
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3433
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3447
3434
  const crossAxis = getSideAxis(getSide(placement));
3448
3435
  const mainAxis = getOppositeAxis(crossAxis);
3449
3436
  let mainAxisCoord = coords[mainAxis];
@@ -3575,7 +3562,7 @@ const size$2 = function (options) {
3575
3562
  apply = () => {},
3576
3563
  ...detectOverflowOptions
3577
3564
  } = evaluate(options, state);
3578
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3565
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3579
3566
  const side = getSide(placement);
3580
3567
  const alignment = getAlignment(placement);
3581
3568
  const isYAxis = getSideAxis(placement) === 'y';
@@ -3678,6 +3665,7 @@ function isShadowRoot(value) {
3678
3665
  }
3679
3666
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
3680
3667
  }
3668
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
3681
3669
  function isOverflowElement(element) {
3682
3670
  const {
3683
3671
  overflow,
@@ -3685,35 +3673,32 @@ function isOverflowElement(element) {
3685
3673
  overflowY,
3686
3674
  display
3687
3675
  } = getComputedStyle$1(element);
3688
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
3676
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
3689
3677
  }
3678
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
3690
3679
  function isTableElement(element) {
3691
- return /^(table|td|th)$/.test(getNodeName(element));
3680
+ return tableElements.has(getNodeName(element));
3692
3681
  }
3682
+ const topLayerSelectors = [':popover-open', ':modal'];
3693
3683
  function isTopLayer(element) {
3694
- try {
3695
- if (element.matches(':popover-open')) {
3696
- return true;
3684
+ return topLayerSelectors.some(selector => {
3685
+ try {
3686
+ return element.matches(selector);
3687
+ } catch (_e) {
3688
+ return false;
3697
3689
  }
3698
- } catch (_e) {
3699
- // no-op
3700
- }
3701
- try {
3702
- return element.matches(':modal');
3703
- } catch (_e) {
3704
- return false;
3705
- }
3690
+ });
3706
3691
  }
3707
- const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
3708
- const containRe = /paint|layout|strict|content/;
3709
- const isNotNone = value => !!value && value !== 'none';
3710
- let isWebKitValue;
3692
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
3693
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
3694
+ const containValues = ['paint', 'layout', 'strict', 'content'];
3711
3695
  function isContainingBlock(elementOrCss) {
3696
+ const webkit = isWebKit();
3712
3697
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
3713
3698
 
3714
3699
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
3715
3700
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
3716
- return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
3701
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
3717
3702
  }
3718
3703
  function getContainingBlock(element) {
3719
3704
  let currentNode = getParentNode(element);
@@ -3728,13 +3713,12 @@ function getContainingBlock(element) {
3728
3713
  return null;
3729
3714
  }
3730
3715
  function isWebKit() {
3731
- if (isWebKitValue == null) {
3732
- isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
3733
- }
3734
- return isWebKitValue;
3716
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
3717
+ return CSS.supports('-webkit-backdrop-filter', 'none');
3735
3718
  }
3719
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
3736
3720
  function isLastTraversableNode(node) {
3737
- return /^(html|body|#document)$/.test(getNodeName(node));
3721
+ return lastTraversableNodeNames.has(getNodeName(node));
3738
3722
  }
3739
3723
  function getComputedStyle$1(element) {
3740
3724
  return getWindow(element).getComputedStyle(element);
@@ -3790,9 +3774,8 @@ function getOverflowAncestors(node, list, traverseIframes) {
3790
3774
  if (isBody) {
3791
3775
  const frameElement = getFrameElement(win);
3792
3776
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
3793
- } else {
3794
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3795
3777
  }
3778
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3796
3779
  }
3797
3780
  function getFrameElement(win) {
3798
3781
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -3969,7 +3952,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3969
3952
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
3970
3953
  scroll = getNodeScroll(offsetParent);
3971
3954
  }
3972
- if (isOffsetParentAnElement) {
3955
+ if (isHTMLElement(offsetParent)) {
3973
3956
  const offsetRect = getBoundingClientRect(offsetParent);
3974
3957
  scale = getScale(offsetParent);
3975
3958
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -4057,6 +4040,7 @@ function getViewportRect(element, strategy) {
4057
4040
  };
4058
4041
  }
4059
4042
 
4043
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
4060
4044
  // Returns the inner client rect, subtracting scrollbars if present.
4061
4045
  function getInnerBoundingClientRect(element, strategy) {
4062
4046
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -4121,7 +4105,7 @@ function getClippingElementAncestors(element, cache) {
4121
4105
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
4122
4106
  currentContainingBlockComputedStyle = null;
4123
4107
  }
4124
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
4108
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
4125
4109
  if (shouldDropCurrentNode) {
4126
4110
  // Drop non-containing blocks.
4127
4111
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -4146,23 +4130,20 @@ function getClippingRect(_ref) {
4146
4130
  } = _ref;
4147
4131
  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4148
4132
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4149
- const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4150
- let top = firstRect.top;
4151
- let right = firstRect.right;
4152
- let bottom = firstRect.bottom;
4153
- let left = firstRect.left;
4154
- for (let i = 1; i < clippingAncestors.length; i++) {
4155
- const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4156
- top = max(rect.top, top);
4157
- right = min(rect.right, right);
4158
- bottom = min(rect.bottom, bottom);
4159
- left = max(rect.left, left);
4160
- }
4133
+ const firstClippingAncestor = clippingAncestors[0];
4134
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
4135
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
4136
+ accRect.top = max(rect.top, accRect.top);
4137
+ accRect.right = min(rect.right, accRect.right);
4138
+ accRect.bottom = min(rect.bottom, accRect.bottom);
4139
+ accRect.left = max(rect.left, accRect.left);
4140
+ return accRect;
4141
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
4161
4142
  return {
4162
- width: right - left,
4163
- height: bottom - top,
4164
- x: left,
4165
- y: top
4143
+ width: clippingRect.right - clippingRect.left,
4144
+ height: clippingRect.bottom - clippingRect.top,
4145
+ x: clippingRect.left,
4146
+ y: clippingRect.top
4166
4147
  };
4167
4148
  }
4168
4149
 
@@ -4413,7 +4394,7 @@ function autoUpdate(reference, floating, update, options) {
4413
4394
  animationFrame = false
4414
4395
  } = options;
4415
4396
  const referenceEl = unwrapElement(reference);
4416
- const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
4397
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
4417
4398
  ancestors.forEach(ancestor => {
4418
4399
  ancestorScroll && ancestor.addEventListener('scroll', update, {
4419
4400
  passive: true
@@ -4426,7 +4407,7 @@ function autoUpdate(reference, floating, update, options) {
4426
4407
  if (elementResize) {
4427
4408
  resizeObserver = new ResizeObserver(_ref => {
4428
4409
  let [firstEntry] = _ref;
4429
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4410
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
4430
4411
  // Prevent update loops when using the `size` middleware.
4431
4412
  // https://github.com/floating-ui/floating-ui/issues/1740
4432
4413
  resizeObserver.unobserve(floating);
@@ -4441,9 +4422,7 @@ function autoUpdate(reference, floating, update, options) {
4441
4422
  if (referenceEl && !animationFrame) {
4442
4423
  resizeObserver.observe(referenceEl);
4443
4424
  }
4444
- if (floating) {
4445
- resizeObserver.observe(floating);
4446
- }
4425
+ resizeObserver.observe(floating);
4447
4426
  }
4448
4427
  let frameId;
4449
4428
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -4825,39 +4804,28 @@ const arrow$1 = options => {
4825
4804
  * object may be passed.
4826
4805
  * @see https://floating-ui.com/docs/offset
4827
4806
  */
4828
- const offset = (options, deps) => {
4829
- const result = offset$1(options);
4830
- return {
4831
- name: result.name,
4832
- fn: result.fn,
4833
- options: [options, deps]
4834
- };
4835
- };
4807
+ const offset = (options, deps) => ({
4808
+ ...offset$1(options),
4809
+ options: [options, deps]
4810
+ });
4836
4811
 
4837
4812
  /**
4838
4813
  * Optimizes the visibility of the floating element by shifting it in order to
4839
4814
  * keep it in view when it will overflow the clipping boundary.
4840
4815
  * @see https://floating-ui.com/docs/shift
4841
4816
  */
4842
- const shift = (options, deps) => {
4843
- const result = shift$1(options);
4844
- return {
4845
- name: result.name,
4846
- fn: result.fn,
4847
- options: [options, deps]
4848
- };
4849
- };
4817
+ const shift = (options, deps) => ({
4818
+ ...shift$1(options),
4819
+ options: [options, deps]
4820
+ });
4850
4821
 
4851
4822
  /**
4852
4823
  * Built-in `limiter` that will stop `shift()` at a certain point.
4853
4824
  */
4854
- const limitShift = (options, deps) => {
4855
- const result = limitShift$1(options);
4856
- return {
4857
- fn: result.fn,
4858
- options: [options, deps]
4859
- };
4860
- };
4825
+ const limitShift = (options, deps) => ({
4826
+ ...limitShift$1(options),
4827
+ options: [options, deps]
4828
+ });
4861
4829
 
4862
4830
  /**
4863
4831
  * Optimizes the visibility of the floating element by flipping the `placement`
@@ -4865,14 +4833,10 @@ const limitShift = (options, deps) => {
4865
4833
  * clipping boundary. Alternative to `autoPlacement`.
4866
4834
  * @see https://floating-ui.com/docs/flip
4867
4835
  */
4868
- const flip = (options, deps) => {
4869
- const result = flip$1(options);
4870
- return {
4871
- name: result.name,
4872
- fn: result.fn,
4873
- options: [options, deps]
4874
- };
4875
- };
4836
+ const flip = (options, deps) => ({
4837
+ ...flip$1(options),
4838
+ options: [options, deps]
4839
+ });
4876
4840
 
4877
4841
  /**
4878
4842
  * Provides data that allows you to change the size of the floating element —
@@ -4880,28 +4844,20 @@ const flip = (options, deps) => {
4880
4844
  * width of the reference element.
4881
4845
  * @see https://floating-ui.com/docs/size
4882
4846
  */
4883
- const size = (options, deps) => {
4884
- const result = size$1(options);
4885
- return {
4886
- name: result.name,
4887
- fn: result.fn,
4888
- options: [options, deps]
4889
- };
4890
- };
4847
+ const size = (options, deps) => ({
4848
+ ...size$1(options),
4849
+ options: [options, deps]
4850
+ });
4891
4851
 
4892
4852
  /**
4893
4853
  * Provides data to hide the floating element in applicable situations, such as
4894
4854
  * when it is not in the same clipping context as the reference element.
4895
4855
  * @see https://floating-ui.com/docs/hide
4896
4856
  */
4897
- const hide = (options, deps) => {
4898
- const result = hide$1(options);
4899
- return {
4900
- name: result.name,
4901
- fn: result.fn,
4902
- options: [options, deps]
4903
- };
4904
- };
4857
+ const hide = (options, deps) => ({
4858
+ ...hide$1(options),
4859
+ options: [options, deps]
4860
+ });
4905
4861
 
4906
4862
  /**
4907
4863
  * Provides data to position an inner element of the floating element so that it
@@ -4909,14 +4865,10 @@ const hide = (options, deps) => {
4909
4865
  * This wraps the core `arrow` middleware to allow React refs as the element.
4910
4866
  * @see https://floating-ui.com/docs/arrow
4911
4867
  */
4912
- const arrow = (options, deps) => {
4913
- const result = arrow$1(options);
4914
- return {
4915
- name: result.name,
4916
- fn: result.fn,
4917
- options: [options, deps]
4918
- };
4919
- };
4868
+ const arrow = (options, deps) => ({
4869
+ ...arrow$1(options),
4870
+ options: [options, deps]
4871
+ });
4920
4872
 
4921
4873
  // src/arrow.tsx
4922
4874
  var NAME = "Arrow";
@@ -6231,7 +6183,7 @@ var SubTrigger = MenuSubTrigger;
6231
6183
  var SubContent = MenuSubContent;
6232
6184
 
6233
6185
  var CONTEXT_MENU_NAME = "ContextMenu";
6234
- var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
6186
+ var [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [
6235
6187
  createMenuScope
6236
6188
  ]);
6237
6189
  var useMenuScope = createMenuScope();
@@ -6514,7 +6466,7 @@ function clamp(value, [min, max]) {
6514
6466
  }
6515
6467
 
6516
6468
  var POPOVER_NAME = "Popover";
6517
- var [createPopoverContext] = createContextScope(POPOVER_NAME, [
6469
+ var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
6518
6470
  createPopperScope
6519
6471
  ]);
6520
6472
  var usePopperScope$2 = createPopperScope();
@@ -6917,7 +6869,7 @@ function getState$1(checked) {
6917
6869
  }
6918
6870
  var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
6919
6871
  var RADIO_GROUP_NAME = "RadioGroup";
6920
- var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
6872
+ var [createRadioGroupContext, createRadioGroupScope] = createContextScope(RADIO_GROUP_NAME, [
6921
6873
  createRovingFocusGroupScope,
6922
6874
  createRadioScope
6923
6875
  ]);
@@ -7056,7 +7008,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
7056
7008
  var SELECTION_KEYS = [" ", "Enter"];
7057
7009
  var SELECT_NAME = "Select";
7058
7010
  var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
7059
- var [createSelectContext] = createContextScope(SELECT_NAME, [
7011
+ var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
7060
7012
  createCollectionScope,
7061
7013
  createPopperScope
7062
7014
  ]);
@@ -8181,7 +8133,7 @@ var ItemIndicator = SelectItemIndicator;
8181
8133
  var Separator = SelectSeparator$1;
8182
8134
 
8183
8135
  var SWITCH_NAME = "Switch";
8184
- var [createSwitchContext] = createContextScope(SWITCH_NAME);
8136
+ var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
8185
8137
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
8186
8138
  var Switch$1 = React.forwardRef(
8187
8139
  (props, forwardedRef) => {
@@ -8321,7 +8273,7 @@ function getState(checked) {
8321
8273
  var Root = Switch$1;
8322
8274
  var Thumb = SwitchThumb;
8323
8275
 
8324
- var [createTooltipContext] = createContextScope("Tooltip", [
8276
+ var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
8325
8277
  createPopperScope
8326
8278
  ]);
8327
8279
  var usePopperScope = createPopperScope();
@@ -8798,36 +8750,7 @@ var Arrow2 = TooltipArrow$1;
8798
8750
 
8799
8751
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8800
8752
 
8801
- /**
8802
- * Concatenates two arrays faster than the array spread operator.
8803
- */
8804
- const concatArrays = (array1, array2) => {
8805
- // Pre-allocate for better V8 optimization
8806
- const combinedArray = new Array(array1.length + array2.length);
8807
- for (let i = 0; i < array1.length; i++) {
8808
- combinedArray[i] = array1[i];
8809
- }
8810
- for (let i = 0; i < array2.length; i++) {
8811
- combinedArray[array1.length + i] = array2[i];
8812
- }
8813
- return combinedArray;
8814
- };
8815
-
8816
- // Factory function ensures consistent object shapes
8817
- const createClassValidatorObject = (classGroupId, validator) => ({
8818
- classGroupId,
8819
- validator
8820
- });
8821
- // Factory ensures consistent ClassPartObject shape
8822
- const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({
8823
- nextPart,
8824
- validators,
8825
- classGroupId
8826
- });
8827
8753
  const CLASS_PART_SEPARATOR = '-';
8828
- const EMPTY_CONFLICTS = [];
8829
- // I use two dots here because one dot is used as prefix for class groups in plugins
8830
- const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';
8831
8754
  const createClassGroupUtils = config => {
8832
8755
  const classMap = createClassMap(config);
8833
8756
  const {
@@ -8835,73 +8758,54 @@ const createClassGroupUtils = config => {
8835
8758
  conflictingClassGroupModifiers
8836
8759
  } = config;
8837
8760
  const getClassGroupId = className => {
8838
- if (className.startsWith('[') && className.endsWith(']')) {
8839
- return getGroupIdForArbitraryProperty(className);
8840
- }
8841
8761
  const classParts = className.split(CLASS_PART_SEPARATOR);
8842
- // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.
8843
- const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;
8844
- return getGroupRecursive(classParts, startIndex, classMap);
8762
+ // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
8763
+ if (classParts[0] === '' && classParts.length !== 1) {
8764
+ classParts.shift();
8765
+ }
8766
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
8845
8767
  };
8846
8768
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
8847
- if (hasPostfixModifier) {
8848
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
8849
- const baseConflicts = conflictingClassGroups[classGroupId];
8850
- if (modifierConflicts) {
8851
- if (baseConflicts) {
8852
- // Merge base conflicts with modifier conflicts
8853
- return concatArrays(baseConflicts, modifierConflicts);
8854
- }
8855
- // Only modifier conflicts
8856
- return modifierConflicts;
8857
- }
8858
- // Fall back to without postfix if no modifier conflicts
8859
- return baseConflicts || EMPTY_CONFLICTS;
8769
+ const conflicts = conflictingClassGroups[classGroupId] || [];
8770
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
8771
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
8860
8772
  }
8861
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
8773
+ return conflicts;
8862
8774
  };
8863
8775
  return {
8864
8776
  getClassGroupId,
8865
8777
  getConflictingClassGroupIds
8866
8778
  };
8867
8779
  };
8868
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
8869
- const classPathsLength = classParts.length - startIndex;
8870
- if (classPathsLength === 0) {
8780
+ const getGroupRecursive = (classParts, classPartObject) => {
8781
+ if (classParts.length === 0) {
8871
8782
  return classPartObject.classGroupId;
8872
8783
  }
8873
- const currentClassPart = classParts[startIndex];
8784
+ const currentClassPart = classParts[0];
8874
8785
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
8875
- if (nextClassPartObject) {
8876
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
8877
- if (result) return result;
8786
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
8787
+ if (classGroupFromNextClassPart) {
8788
+ return classGroupFromNextClassPart;
8878
8789
  }
8879
- const validators = classPartObject.validators;
8880
- if (validators === null) {
8790
+ if (classPartObject.validators.length === 0) {
8881
8791
  return undefined;
8882
8792
  }
8883
- // Build classRest string efficiently by joining from startIndex onwards
8884
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
8885
- const validatorsLength = validators.length;
8886
- for (let i = 0; i < validatorsLength; i++) {
8887
- const validatorObj = validators[i];
8888
- if (validatorObj.validator(classRest)) {
8889
- return validatorObj.classGroupId;
8793
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
8794
+ return classPartObject.validators.find(({
8795
+ validator
8796
+ }) => validator(classRest))?.classGroupId;
8797
+ };
8798
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
8799
+ const getGroupIdForArbitraryProperty = className => {
8800
+ if (arbitraryPropertyRegex.test(className)) {
8801
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
8802
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
8803
+ if (property) {
8804
+ // I use two dots here because one dot is used as prefix for class groups in plugins
8805
+ return 'arbitrary..' + property;
8890
8806
  }
8891
8807
  }
8892
- return undefined;
8893
8808
  };
8894
- /**
8895
- * Get the class group ID for an arbitrary property.
8896
- *
8897
- * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
8898
- */
8899
- const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {
8900
- const content = className.slice(1, -1);
8901
- const colonIndex = content.indexOf(':');
8902
- const property = content.slice(0, colonIndex);
8903
- return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
8904
- })();
8905
8809
  /**
8906
8810
  * Exported for testing only
8907
8811
  */
@@ -8910,77 +8814,54 @@ const createClassMap = config => {
8910
8814
  theme,
8911
8815
  classGroups
8912
8816
  } = config;
8913
- return processClassGroups(classGroups, theme);
8914
- };
8915
- // Split into separate functions to maintain monomorphic call sites
8916
- const processClassGroups = (classGroups, theme) => {
8917
- const classMap = createClassPartObject();
8817
+ const classMap = {
8818
+ nextPart: new Map(),
8819
+ validators: []
8820
+ };
8918
8821
  for (const classGroupId in classGroups) {
8919
- const group = classGroups[classGroupId];
8920
- processClassesRecursively(group, classMap, classGroupId, theme);
8822
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
8921
8823
  }
8922
8824
  return classMap;
8923
8825
  };
8924
8826
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
8925
- const len = classGroup.length;
8926
- for (let i = 0; i < len; i++) {
8927
- const classDefinition = classGroup[i];
8928
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
8929
- }
8930
- };
8931
- // Split into separate functions for each type to maintain monomorphic call sites
8932
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8933
- if (typeof classDefinition === 'string') {
8934
- processStringDefinition(classDefinition, classPartObject, classGroupId);
8935
- return;
8936
- }
8937
- if (typeof classDefinition === 'function') {
8938
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
8939
- return;
8940
- }
8941
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
8942
- };
8943
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
8944
- const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
8945
- classPartObjectToEdit.classGroupId = classGroupId;
8946
- };
8947
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8948
- if (isThemeGetter(classDefinition)) {
8949
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
8950
- return;
8951
- }
8952
- if (classPartObject.validators === null) {
8953
- classPartObject.validators = [];
8954
- }
8955
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
8956
- };
8957
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8958
- const entries = Object.entries(classDefinition);
8959
- const len = entries.length;
8960
- for (let i = 0; i < len; i++) {
8961
- const [key, value] = entries[i];
8962
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
8963
- }
8827
+ classGroup.forEach(classDefinition => {
8828
+ if (typeof classDefinition === 'string') {
8829
+ const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
8830
+ classPartObjectToEdit.classGroupId = classGroupId;
8831
+ return;
8832
+ }
8833
+ if (typeof classDefinition === 'function') {
8834
+ if (isThemeGetter(classDefinition)) {
8835
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
8836
+ return;
8837
+ }
8838
+ classPartObject.validators.push({
8839
+ validator: classDefinition,
8840
+ classGroupId
8841
+ });
8842
+ return;
8843
+ }
8844
+ Object.entries(classDefinition).forEach(([key, classGroup]) => {
8845
+ processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
8846
+ });
8847
+ });
8964
8848
  };
8965
8849
  const getPart = (classPartObject, path) => {
8966
- let current = classPartObject;
8967
- const parts = path.split(CLASS_PART_SEPARATOR);
8968
- const len = parts.length;
8969
- for (let i = 0; i < len; i++) {
8970
- const part = parts[i];
8971
- let next = current.nextPart.get(part);
8972
- if (!next) {
8973
- next = createClassPartObject();
8974
- current.nextPart.set(part, next);
8850
+ let currentClassPartObject = classPartObject;
8851
+ path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
8852
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
8853
+ currentClassPartObject.nextPart.set(pathPart, {
8854
+ nextPart: new Map(),
8855
+ validators: []
8856
+ });
8975
8857
  }
8976
- current = next;
8977
- }
8978
- return current;
8858
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
8859
+ });
8860
+ return currentClassPartObject;
8979
8861
  };
8980
- // Type guard maintains monomorphic check
8981
- const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;
8862
+ const isThemeGetter = func => func.isThemeGetter;
8982
8863
 
8983
- // LRU cache implementation using plain objects for simplicity
8864
+ // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
8984
8865
  const createLruCache = maxCacheSize => {
8985
8866
  if (maxCacheSize < 1) {
8986
8867
  return {
@@ -8989,31 +8870,31 @@ const createLruCache = maxCacheSize => {
8989
8870
  };
8990
8871
  }
8991
8872
  let cacheSize = 0;
8992
- let cache = Object.create(null);
8993
- let previousCache = Object.create(null);
8873
+ let cache = new Map();
8874
+ let previousCache = new Map();
8994
8875
  const update = (key, value) => {
8995
- cache[key] = value;
8876
+ cache.set(key, value);
8996
8877
  cacheSize++;
8997
8878
  if (cacheSize > maxCacheSize) {
8998
8879
  cacheSize = 0;
8999
8880
  previousCache = cache;
9000
- cache = Object.create(null);
8881
+ cache = new Map();
9001
8882
  }
9002
8883
  };
9003
8884
  return {
9004
8885
  get(key) {
9005
- let value = cache[key];
8886
+ let value = cache.get(key);
9006
8887
  if (value !== undefined) {
9007
8888
  return value;
9008
8889
  }
9009
- if ((value = previousCache[key]) !== undefined) {
8890
+ if ((value = previousCache.get(key)) !== undefined) {
9010
8891
  update(key, value);
9011
8892
  return value;
9012
8893
  }
9013
8894
  },
9014
8895
  set(key, value) {
9015
- if (key in cache) {
9016
- cache[key] = value;
8896
+ if (cache.has(key)) {
8897
+ cache.set(key, value);
9017
8898
  } else {
9018
8899
  update(key, value);
9019
8900
  }
@@ -9022,15 +8903,7 @@ const createLruCache = maxCacheSize => {
9022
8903
  };
9023
8904
  const IMPORTANT_MODIFIER = '!';
9024
8905
  const MODIFIER_SEPARATOR = ':';
9025
- const EMPTY_MODIFIERS = [];
9026
- // Pre-allocated result object shape for consistency
9027
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
9028
- modifiers,
9029
- hasImportantModifier,
9030
- baseClassName,
9031
- maybePostfixModifierPosition,
9032
- isExternal
9033
- });
8906
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
9034
8907
  const createParseClassName = config => {
9035
8908
  const {
9036
8909
  prefix,
@@ -9043,19 +8916,17 @@ const createParseClassName = config => {
9043
8916
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
9044
8917
  */
9045
8918
  let parseClassName = className => {
9046
- // Use simple array with push for better performance
9047
8919
  const modifiers = [];
9048
8920
  let bracketDepth = 0;
9049
8921
  let parenDepth = 0;
9050
8922
  let modifierStart = 0;
9051
8923
  let postfixModifierPosition;
9052
- const len = className.length;
9053
- for (let index = 0; index < len; index++) {
9054
- const currentCharacter = className[index];
8924
+ for (let index = 0; index < className.length; index++) {
8925
+ let currentCharacter = className[index];
9055
8926
  if (bracketDepth === 0 && parenDepth === 0) {
9056
8927
  if (currentCharacter === MODIFIER_SEPARATOR) {
9057
8928
  modifiers.push(className.slice(modifierStart, index));
9058
- modifierStart = index + 1;
8929
+ modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
9059
8930
  continue;
9060
8931
  }
9061
8932
  if (currentCharacter === '/') {
@@ -9063,31 +8934,37 @@ const createParseClassName = config => {
9063
8934
  continue;
9064
8935
  }
9065
8936
  }
9066
- if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
9067
- }
9068
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
9069
- // Inline important modifier check
9070
- let baseClassName = baseClassNameWithImportantModifier;
9071
- let hasImportantModifier = false;
9072
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
9073
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
9074
- hasImportantModifier = true;
9075
- } else if (
9076
- /**
9077
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
9078
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
9079
- */
9080
- baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
9081
- baseClassName = baseClassNameWithImportantModifier.slice(1);
9082
- hasImportantModifier = true;
8937
+ if (currentCharacter === '[') {
8938
+ bracketDepth++;
8939
+ } else if (currentCharacter === ']') {
8940
+ bracketDepth--;
8941
+ } else if (currentCharacter === '(') {
8942
+ parenDepth++;
8943
+ } else if (currentCharacter === ')') {
8944
+ parenDepth--;
8945
+ }
9083
8946
  }
8947
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
8948
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
8949
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
9084
8950
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
9085
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
8951
+ return {
8952
+ modifiers,
8953
+ hasImportantModifier,
8954
+ baseClassName,
8955
+ maybePostfixModifierPosition
8956
+ };
9086
8957
  };
9087
8958
  if (prefix) {
9088
8959
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
9089
8960
  const parseClassNameOriginal = parseClassName;
9090
- parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
8961
+ parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
8962
+ isExternal: true,
8963
+ modifiers: [],
8964
+ hasImportantModifier: false,
8965
+ baseClassName: className,
8966
+ maybePostfixModifierPosition: undefined
8967
+ };
9091
8968
  }
9092
8969
  if (experimentalParseClassName) {
9093
8970
  const parseClassNameOriginal = parseClassName;
@@ -9098,6 +8975,19 @@ const createParseClassName = config => {
9098
8975
  }
9099
8976
  return parseClassName;
9100
8977
  };
8978
+ const stripImportantModifier = baseClassName => {
8979
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
8980
+ return baseClassName.substring(0, baseClassName.length - 1);
8981
+ }
8982
+ /**
8983
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
8984
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
8985
+ */
8986
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
8987
+ return baseClassName.substring(1);
8988
+ }
8989
+ return baseClassName;
8990
+ };
9101
8991
 
9102
8992
  /**
9103
8993
  * Sorts modifiers according to following schema:
@@ -9105,41 +8995,26 @@ const createParseClassName = config => {
9105
8995
  * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
9106
8996
  */
9107
8997
  const createSortModifiers = config => {
9108
- // Pre-compute weights for all known modifiers for O(1) comparison
9109
- const modifierWeights = new Map();
9110
- // Assign weights to sensitive modifiers (highest priority, but preserve order)
9111
- config.orderSensitiveModifiers.forEach((mod, index) => {
9112
- modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods
9113
- });
9114
- return modifiers => {
9115
- const result = [];
9116
- let currentSegment = [];
9117
- // Process modifiers in one pass
9118
- for (let i = 0; i < modifiers.length; i++) {
9119
- const modifier = modifiers[i];
9120
- // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)
9121
- const isArbitrary = modifier[0] === '[';
9122
- const isOrderSensitive = modifierWeights.has(modifier);
9123
- if (isArbitrary || isOrderSensitive) {
9124
- // Sort and flush current segment alphabetically
9125
- if (currentSegment.length > 0) {
9126
- currentSegment.sort();
9127
- result.push(...currentSegment);
9128
- currentSegment = [];
9129
- }
9130
- result.push(modifier);
8998
+ const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));
8999
+ const sortModifiers = modifiers => {
9000
+ if (modifiers.length <= 1) {
9001
+ return modifiers;
9002
+ }
9003
+ const sortedModifiers = [];
9004
+ let unsortedModifiers = [];
9005
+ modifiers.forEach(modifier => {
9006
+ const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];
9007
+ if (isPositionSensitive) {
9008
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
9009
+ unsortedModifiers = [];
9131
9010
  } else {
9132
- // Regular modifier - add to current segment for batch sorting
9133
- currentSegment.push(modifier);
9011
+ unsortedModifiers.push(modifier);
9134
9012
  }
9135
- }
9136
- // Sort and add any remaining segment items
9137
- if (currentSegment.length > 0) {
9138
- currentSegment.sort();
9139
- result.push(...currentSegment);
9140
- }
9141
- return result;
9013
+ });
9014
+ sortedModifiers.push(...unsortedModifiers.sort());
9015
+ return sortedModifiers;
9142
9016
  };
9017
+ return sortModifiers;
9143
9018
  };
9144
9019
  const createConfigUtils = config => ({
9145
9020
  cache: createLruCache(config.cacheSize),
@@ -9194,11 +9069,10 @@ const mergeClassList = (classList, configUtils) => {
9194
9069
  }
9195
9070
  hasPostfixModifier = false;
9196
9071
  }
9197
- // Fast path: skip sorting for empty or single modifier
9198
- const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');
9072
+ const variantModifier = sortModifiers(modifiers).join(':');
9199
9073
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
9200
9074
  const classId = modifierId + classGroupId;
9201
- if (classGroupsInConflict.indexOf(classId) > -1) {
9075
+ if (classGroupsInConflict.includes(classId)) {
9202
9076
  // Tailwind class omitted due to conflict
9203
9077
  continue;
9204
9078
  }
@@ -9223,13 +9097,13 @@ const mergeClassList = (classList, configUtils) => {
9223
9097
  *
9224
9098
  * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
9225
9099
  */
9226
- const twJoin = (...classLists) => {
9100
+ function twJoin() {
9227
9101
  let index = 0;
9228
9102
  let argument;
9229
9103
  let resolvedValue;
9230
9104
  let string = '';
9231
- while (index < classLists.length) {
9232
- if (argument = classLists[index++]) {
9105
+ while (index < arguments.length) {
9106
+ if (argument = arguments[index++]) {
9233
9107
  if (resolvedValue = toValue(argument)) {
9234
9108
  string && (string += ' ');
9235
9109
  string += resolvedValue;
@@ -9237,9 +9111,8 @@ const twJoin = (...classLists) => {
9237
9111
  }
9238
9112
  }
9239
9113
  return string;
9240
- };
9114
+ }
9241
9115
  const toValue = mix => {
9242
- // Fast path for strings
9243
9116
  if (typeof mix === 'string') {
9244
9117
  return mix;
9245
9118
  }
@@ -9255,20 +9128,20 @@ const toValue = mix => {
9255
9128
  }
9256
9129
  return string;
9257
9130
  };
9258
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
9131
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
9259
9132
  let configUtils;
9260
9133
  let cacheGet;
9261
9134
  let cacheSet;
9262
- let functionToCall;
9263
- const initTailwindMerge = classList => {
9135
+ let functionToCall = initTailwindMerge;
9136
+ function initTailwindMerge(classList) {
9264
9137
  const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
9265
9138
  configUtils = createConfigUtils(config);
9266
9139
  cacheGet = configUtils.cache.get;
9267
9140
  cacheSet = configUtils.cache.set;
9268
9141
  functionToCall = tailwindMerge;
9269
9142
  return tailwindMerge(classList);
9270
- };
9271
- const tailwindMerge = classList => {
9143
+ }
9144
+ function tailwindMerge(classList) {
9272
9145
  const cachedResult = cacheGet(classList);
9273
9146
  if (cachedResult) {
9274
9147
  return cachedResult;
@@ -9276,19 +9149,19 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
9276
9149
  const result = mergeClassList(classList, configUtils);
9277
9150
  cacheSet(classList, result);
9278
9151
  return result;
9152
+ }
9153
+ return function callTailwindMerge() {
9154
+ return functionToCall(twJoin.apply(null, arguments));
9279
9155
  };
9280
- functionToCall = initTailwindMerge;
9281
- return (...args) => functionToCall(twJoin(...args));
9282
- };
9283
- const fallbackThemeArr = [];
9156
+ }
9284
9157
  const fromTheme = key => {
9285
- const themeGetter = theme => theme[key] || fallbackThemeArr;
9158
+ const themeGetter = theme => theme[key] || [];
9286
9159
  themeGetter.isThemeGetter = true;
9287
9160
  return themeGetter;
9288
9161
  };
9289
9162
  const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
9290
9163
  const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
9291
- const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
9164
+ const fractionRegex = /^\d+\/\d+$/;
9292
9165
  const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
9293
9166
  const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
9294
9167
  const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
@@ -9314,8 +9187,6 @@ const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever
9314
9187
  const isArbitraryValue = value => arbitraryValueRegex.test(value);
9315
9188
  const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
9316
9189
  const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
9317
- const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
9318
- const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
9319
9190
  const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
9320
9191
  const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
9321
9192
  const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
@@ -9326,7 +9197,6 @@ const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLab
9326
9197
  const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
9327
9198
  const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
9328
9199
  const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
9329
- const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);
9330
9200
  // Helpers
9331
9201
  const getIsArbitraryValue = (value, testLabel, testValue) => {
9332
9202
  const result = arbitraryValueRegex.exec(value);
@@ -9355,7 +9225,6 @@ const isLabelSize = label => label === 'length' || label === 'size' || label ===
9355
9225
  const isLabelLength = label => label === 'length';
9356
9226
  const isLabelNumber = label => label === 'number';
9357
9227
  const isLabelFamilyName = label => label === 'family-name';
9358
- const isLabelWeight = label => label === 'number' || label === 'weight';
9359
9228
  const isLabelShadow = label => label === 'shadow';
9360
9229
  const getDefaultConfig = () => {
9361
9230
  /**
@@ -9414,8 +9283,6 @@ const getDefaultConfig = () => {
9414
9283
  const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
9415
9284
  const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
9416
9285
  const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9417
- const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9418
- const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9419
9286
  const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
9420
9287
  const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
9421
9288
  position: [isArbitraryVariable, isArbitraryValue]
@@ -9614,66 +9481,40 @@ const getDefaultConfig = () => {
9614
9481
  */
9615
9482
  position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
9616
9483
  /**
9617
- * Inset
9484
+ * Top / Right / Bottom / Left
9618
9485
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9619
9486
  */
9620
9487
  inset: [{
9621
9488
  inset: scaleInset()
9622
9489
  }],
9623
9490
  /**
9624
- * Inset Inline
9491
+ * Right / Left
9625
9492
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9626
9493
  */
9627
9494
  'inset-x': [{
9628
9495
  'inset-x': scaleInset()
9629
9496
  }],
9630
9497
  /**
9631
- * Inset Block
9498
+ * Top / Bottom
9632
9499
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9633
9500
  */
9634
9501
  'inset-y': [{
9635
9502
  'inset-y': scaleInset()
9636
9503
  }],
9637
9504
  /**
9638
- * Inset Inline Start
9505
+ * Start
9639
9506
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9640
- * @todo class group will be renamed to `inset-s` in next major release
9641
9507
  */
9642
9508
  start: [{
9643
- 'inset-s': scaleInset(),
9644
- /**
9645
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
9646
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
9647
- */
9648
9509
  start: scaleInset()
9649
9510
  }],
9650
9511
  /**
9651
- * Inset Inline End
9512
+ * End
9652
9513
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9653
- * @todo class group will be renamed to `inset-e` in next major release
9654
9514
  */
9655
9515
  end: [{
9656
- 'inset-e': scaleInset(),
9657
- /**
9658
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
9659
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
9660
- */
9661
9516
  end: scaleInset()
9662
9517
  }],
9663
- /**
9664
- * Inset Block Start
9665
- * @see https://tailwindcss.com/docs/top-right-bottom-left
9666
- */
9667
- 'inset-bs': [{
9668
- 'inset-bs': scaleInset()
9669
- }],
9670
- /**
9671
- * Inset Block End
9672
- * @see https://tailwindcss.com/docs/top-right-bottom-left
9673
- */
9674
- 'inset-be': [{
9675
- 'inset-be': scaleInset()
9676
- }],
9677
9518
  /**
9678
9519
  * Top
9679
9520
  * @see https://tailwindcss.com/docs/top-right-bottom-left
@@ -9940,47 +9781,33 @@ const getDefaultConfig = () => {
9940
9781
  p: scaleUnambiguousSpacing()
9941
9782
  }],
9942
9783
  /**
9943
- * Padding Inline
9784
+ * Padding X
9944
9785
  * @see https://tailwindcss.com/docs/padding
9945
9786
  */
9946
9787
  px: [{
9947
9788
  px: scaleUnambiguousSpacing()
9948
9789
  }],
9949
9790
  /**
9950
- * Padding Block
9791
+ * Padding Y
9951
9792
  * @see https://tailwindcss.com/docs/padding
9952
9793
  */
9953
9794
  py: [{
9954
9795
  py: scaleUnambiguousSpacing()
9955
9796
  }],
9956
9797
  /**
9957
- * Padding Inline Start
9798
+ * Padding Start
9958
9799
  * @see https://tailwindcss.com/docs/padding
9959
9800
  */
9960
9801
  ps: [{
9961
9802
  ps: scaleUnambiguousSpacing()
9962
9803
  }],
9963
9804
  /**
9964
- * Padding Inline End
9805
+ * Padding End
9965
9806
  * @see https://tailwindcss.com/docs/padding
9966
9807
  */
9967
9808
  pe: [{
9968
9809
  pe: scaleUnambiguousSpacing()
9969
9810
  }],
9970
- /**
9971
- * Padding Block Start
9972
- * @see https://tailwindcss.com/docs/padding
9973
- */
9974
- pbs: [{
9975
- pbs: scaleUnambiguousSpacing()
9976
- }],
9977
- /**
9978
- * Padding Block End
9979
- * @see https://tailwindcss.com/docs/padding
9980
- */
9981
- pbe: [{
9982
- pbe: scaleUnambiguousSpacing()
9983
- }],
9984
9811
  /**
9985
9812
  * Padding Top
9986
9813
  * @see https://tailwindcss.com/docs/padding
@@ -10017,47 +9844,33 @@ const getDefaultConfig = () => {
10017
9844
  m: scaleMargin()
10018
9845
  }],
10019
9846
  /**
10020
- * Margin Inline
9847
+ * Margin X
10021
9848
  * @see https://tailwindcss.com/docs/margin
10022
9849
  */
10023
9850
  mx: [{
10024
9851
  mx: scaleMargin()
10025
9852
  }],
10026
9853
  /**
10027
- * Margin Block
9854
+ * Margin Y
10028
9855
  * @see https://tailwindcss.com/docs/margin
10029
9856
  */
10030
9857
  my: [{
10031
9858
  my: scaleMargin()
10032
9859
  }],
10033
9860
  /**
10034
- * Margin Inline Start
9861
+ * Margin Start
10035
9862
  * @see https://tailwindcss.com/docs/margin
10036
9863
  */
10037
9864
  ms: [{
10038
9865
  ms: scaleMargin()
10039
9866
  }],
10040
9867
  /**
10041
- * Margin Inline End
9868
+ * Margin End
10042
9869
  * @see https://tailwindcss.com/docs/margin
10043
9870
  */
10044
9871
  me: [{
10045
9872
  me: scaleMargin()
10046
9873
  }],
10047
- /**
10048
- * Margin Block Start
10049
- * @see https://tailwindcss.com/docs/margin
10050
- */
10051
- mbs: [{
10052
- mbs: scaleMargin()
10053
- }],
10054
- /**
10055
- * Margin Block End
10056
- * @see https://tailwindcss.com/docs/margin
10057
- */
10058
- mbe: [{
10059
- mbe: scaleMargin()
10060
- }],
10061
9874
  /**
10062
9875
  * Margin Top
10063
9876
  * @see https://tailwindcss.com/docs/margin
@@ -10120,48 +9933,6 @@ const getDefaultConfig = () => {
10120
9933
  size: [{
10121
9934
  size: scaleSizing()
10122
9935
  }],
10123
- /**
10124
- * Inline Size
10125
- * @see https://tailwindcss.com/docs/width
10126
- */
10127
- 'inline-size': [{
10128
- inline: ['auto', ...scaleSizingInline()]
10129
- }],
10130
- /**
10131
- * Min-Inline Size
10132
- * @see https://tailwindcss.com/docs/min-width
10133
- */
10134
- 'min-inline-size': [{
10135
- 'min-inline': ['auto', ...scaleSizingInline()]
10136
- }],
10137
- /**
10138
- * Max-Inline Size
10139
- * @see https://tailwindcss.com/docs/max-width
10140
- */
10141
- 'max-inline-size': [{
10142
- 'max-inline': ['none', ...scaleSizingInline()]
10143
- }],
10144
- /**
10145
- * Block Size
10146
- * @see https://tailwindcss.com/docs/height
10147
- */
10148
- 'block-size': [{
10149
- block: ['auto', ...scaleSizingBlock()]
10150
- }],
10151
- /**
10152
- * Min-Block Size
10153
- * @see https://tailwindcss.com/docs/min-height
10154
- */
10155
- 'min-block-size': [{
10156
- 'min-block': ['auto', ...scaleSizingBlock()]
10157
- }],
10158
- /**
10159
- * Max-Block Size
10160
- * @see https://tailwindcss.com/docs/max-height
10161
- */
10162
- 'max-block-size': [{
10163
- 'max-block': ['none', ...scaleSizingBlock()]
10164
- }],
10165
9936
  /**
10166
9937
  * Width
10167
9938
  * @see https://tailwindcss.com/docs/width
@@ -10234,7 +10005,7 @@ const getDefaultConfig = () => {
10234
10005
  * @see https://tailwindcss.com/docs/font-weight
10235
10006
  */
10236
10007
  'font-weight': [{
10237
- font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
10008
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
10238
10009
  }],
10239
10010
  /**
10240
10011
  * Font Stretch
@@ -10248,14 +10019,7 @@ const getDefaultConfig = () => {
10248
10019
  * @see https://tailwindcss.com/docs/font-family
10249
10020
  */
10250
10021
  'font-family': [{
10251
- font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
10252
- }],
10253
- /**
10254
- * Font Feature Settings
10255
- * @see https://tailwindcss.com/docs/font-feature-settings
10256
- */
10257
- 'font-features': [{
10258
- 'font-features': [isArbitraryValue]
10022
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
10259
10023
  }],
10260
10024
  /**
10261
10025
  * Font Variant Numeric
@@ -10674,47 +10438,33 @@ const getDefaultConfig = () => {
10674
10438
  border: scaleBorderWidth()
10675
10439
  }],
10676
10440
  /**
10677
- * Border Width Inline
10441
+ * Border Width X
10678
10442
  * @see https://tailwindcss.com/docs/border-width
10679
10443
  */
10680
10444
  'border-w-x': [{
10681
10445
  'border-x': scaleBorderWidth()
10682
10446
  }],
10683
10447
  /**
10684
- * Border Width Block
10448
+ * Border Width Y
10685
10449
  * @see https://tailwindcss.com/docs/border-width
10686
10450
  */
10687
10451
  'border-w-y': [{
10688
10452
  'border-y': scaleBorderWidth()
10689
10453
  }],
10690
10454
  /**
10691
- * Border Width Inline Start
10455
+ * Border Width Start
10692
10456
  * @see https://tailwindcss.com/docs/border-width
10693
10457
  */
10694
10458
  'border-w-s': [{
10695
10459
  'border-s': scaleBorderWidth()
10696
10460
  }],
10697
10461
  /**
10698
- * Border Width Inline End
10462
+ * Border Width End
10699
10463
  * @see https://tailwindcss.com/docs/border-width
10700
10464
  */
10701
10465
  'border-w-e': [{
10702
10466
  'border-e': scaleBorderWidth()
10703
10467
  }],
10704
- /**
10705
- * Border Width Block Start
10706
- * @see https://tailwindcss.com/docs/border-width
10707
- */
10708
- 'border-w-bs': [{
10709
- 'border-bs': scaleBorderWidth()
10710
- }],
10711
- /**
10712
- * Border Width Block End
10713
- * @see https://tailwindcss.com/docs/border-width
10714
- */
10715
- 'border-w-be': [{
10716
- 'border-be': scaleBorderWidth()
10717
- }],
10718
10468
  /**
10719
10469
  * Border Width Top
10720
10470
  * @see https://tailwindcss.com/docs/border-width
@@ -10789,47 +10539,33 @@ const getDefaultConfig = () => {
10789
10539
  border: scaleColor()
10790
10540
  }],
10791
10541
  /**
10792
- * Border Color Inline
10542
+ * Border Color X
10793
10543
  * @see https://tailwindcss.com/docs/border-color
10794
10544
  */
10795
10545
  'border-color-x': [{
10796
10546
  'border-x': scaleColor()
10797
10547
  }],
10798
10548
  /**
10799
- * Border Color Block
10549
+ * Border Color Y
10800
10550
  * @see https://tailwindcss.com/docs/border-color
10801
10551
  */
10802
10552
  'border-color-y': [{
10803
10553
  'border-y': scaleColor()
10804
10554
  }],
10805
10555
  /**
10806
- * Border Color Inline Start
10556
+ * Border Color S
10807
10557
  * @see https://tailwindcss.com/docs/border-color
10808
10558
  */
10809
10559
  'border-color-s': [{
10810
10560
  'border-s': scaleColor()
10811
10561
  }],
10812
10562
  /**
10813
- * Border Color Inline End
10563
+ * Border Color E
10814
10564
  * @see https://tailwindcss.com/docs/border-color
10815
10565
  */
10816
10566
  'border-color-e': [{
10817
10567
  'border-e': scaleColor()
10818
10568
  }],
10819
- /**
10820
- * Border Color Block Start
10821
- * @see https://tailwindcss.com/docs/border-color
10822
- */
10823
- 'border-color-bs': [{
10824
- 'border-bs': scaleColor()
10825
- }],
10826
- /**
10827
- * Border Color Block End
10828
- * @see https://tailwindcss.com/docs/border-color
10829
- */
10830
- 'border-color-be': [{
10831
- 'border-be': scaleColor()
10832
- }],
10833
10569
  /**
10834
10570
  * Border Color Top
10835
10571
  * @see https://tailwindcss.com/docs/border-color
@@ -11690,47 +11426,33 @@ const getDefaultConfig = () => {
11690
11426
  'scroll-m': scaleUnambiguousSpacing()
11691
11427
  }],
11692
11428
  /**
11693
- * Scroll Margin Inline
11429
+ * Scroll Margin X
11694
11430
  * @see https://tailwindcss.com/docs/scroll-margin
11695
11431
  */
11696
11432
  'scroll-mx': [{
11697
11433
  'scroll-mx': scaleUnambiguousSpacing()
11698
11434
  }],
11699
11435
  /**
11700
- * Scroll Margin Block
11436
+ * Scroll Margin Y
11701
11437
  * @see https://tailwindcss.com/docs/scroll-margin
11702
11438
  */
11703
11439
  'scroll-my': [{
11704
11440
  'scroll-my': scaleUnambiguousSpacing()
11705
11441
  }],
11706
11442
  /**
11707
- * Scroll Margin Inline Start
11443
+ * Scroll Margin Start
11708
11444
  * @see https://tailwindcss.com/docs/scroll-margin
11709
11445
  */
11710
11446
  'scroll-ms': [{
11711
11447
  'scroll-ms': scaleUnambiguousSpacing()
11712
11448
  }],
11713
11449
  /**
11714
- * Scroll Margin Inline End
11450
+ * Scroll Margin End
11715
11451
  * @see https://tailwindcss.com/docs/scroll-margin
11716
11452
  */
11717
11453
  'scroll-me': [{
11718
11454
  'scroll-me': scaleUnambiguousSpacing()
11719
11455
  }],
11720
- /**
11721
- * Scroll Margin Block Start
11722
- * @see https://tailwindcss.com/docs/scroll-margin
11723
- */
11724
- 'scroll-mbs': [{
11725
- 'scroll-mbs': scaleUnambiguousSpacing()
11726
- }],
11727
- /**
11728
- * Scroll Margin Block End
11729
- * @see https://tailwindcss.com/docs/scroll-margin
11730
- */
11731
- 'scroll-mbe': [{
11732
- 'scroll-mbe': scaleUnambiguousSpacing()
11733
- }],
11734
11456
  /**
11735
11457
  * Scroll Margin Top
11736
11458
  * @see https://tailwindcss.com/docs/scroll-margin
@@ -11767,47 +11489,33 @@ const getDefaultConfig = () => {
11767
11489
  'scroll-p': scaleUnambiguousSpacing()
11768
11490
  }],
11769
11491
  /**
11770
- * Scroll Padding Inline
11492
+ * Scroll Padding X
11771
11493
  * @see https://tailwindcss.com/docs/scroll-padding
11772
11494
  */
11773
11495
  'scroll-px': [{
11774
11496
  'scroll-px': scaleUnambiguousSpacing()
11775
11497
  }],
11776
11498
  /**
11777
- * Scroll Padding Block
11499
+ * Scroll Padding Y
11778
11500
  * @see https://tailwindcss.com/docs/scroll-padding
11779
11501
  */
11780
11502
  'scroll-py': [{
11781
11503
  'scroll-py': scaleUnambiguousSpacing()
11782
11504
  }],
11783
11505
  /**
11784
- * Scroll Padding Inline Start
11506
+ * Scroll Padding Start
11785
11507
  * @see https://tailwindcss.com/docs/scroll-padding
11786
11508
  */
11787
11509
  'scroll-ps': [{
11788
11510
  'scroll-ps': scaleUnambiguousSpacing()
11789
11511
  }],
11790
11512
  /**
11791
- * Scroll Padding Inline End
11513
+ * Scroll Padding End
11792
11514
  * @see https://tailwindcss.com/docs/scroll-padding
11793
11515
  */
11794
11516
  'scroll-pe': [{
11795
11517
  'scroll-pe': scaleUnambiguousSpacing()
11796
11518
  }],
11797
- /**
11798
- * Scroll Padding Block Start
11799
- * @see https://tailwindcss.com/docs/scroll-padding
11800
- */
11801
- 'scroll-pbs': [{
11802
- 'scroll-pbs': scaleUnambiguousSpacing()
11803
- }],
11804
- /**
11805
- * Scroll Padding Block End
11806
- * @see https://tailwindcss.com/docs/scroll-padding
11807
- */
11808
- 'scroll-pbe': [{
11809
- 'scroll-pbe': scaleUnambiguousSpacing()
11810
- }],
11811
11519
  /**
11812
11520
  * Scroll Padding Top
11813
11521
  * @see https://tailwindcss.com/docs/scroll-padding
@@ -11942,15 +11650,15 @@ const getDefaultConfig = () => {
11942
11650
  conflictingClassGroups: {
11943
11651
  overflow: ['overflow-x', 'overflow-y'],
11944
11652
  overscroll: ['overscroll-x', 'overscroll-y'],
11945
- inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],
11653
+ inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
11946
11654
  'inset-x': ['right', 'left'],
11947
11655
  'inset-y': ['top', 'bottom'],
11948
11656
  flex: ['basis', 'grow', 'shrink'],
11949
11657
  gap: ['gap-x', 'gap-y'],
11950
- p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
11658
+ p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
11951
11659
  px: ['pr', 'pl'],
11952
11660
  py: ['pt', 'pb'],
11953
- m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],
11661
+ m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
11954
11662
  mx: ['mr', 'ml'],
11955
11663
  my: ['mt', 'mb'],
11956
11664
  size: ['w', 'h'],
@@ -11970,18 +11678,18 @@ const getDefaultConfig = () => {
11970
11678
  'rounded-b': ['rounded-br', 'rounded-bl'],
11971
11679
  'rounded-l': ['rounded-tl', 'rounded-bl'],
11972
11680
  'border-spacing': ['border-spacing-x', 'border-spacing-y'],
11973
- 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
11681
+ 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
11974
11682
  'border-w-x': ['border-w-r', 'border-w-l'],
11975
11683
  'border-w-y': ['border-w-t', 'border-w-b'],
11976
- 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
11684
+ 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
11977
11685
  'border-color-x': ['border-color-r', 'border-color-l'],
11978
11686
  'border-color-y': ['border-color-t', 'border-color-b'],
11979
11687
  translate: ['translate-x', 'translate-y', 'translate-none'],
11980
11688
  'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
11981
- 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
11689
+ 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
11982
11690
  'scroll-mx': ['scroll-mr', 'scroll-ml'],
11983
11691
  'scroll-my': ['scroll-mt', 'scroll-mb'],
11984
- 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
11692
+ 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
11985
11693
  'scroll-px': ['scroll-pr', 'scroll-pl'],
11986
11694
  'scroll-py': ['scroll-pt', 'scroll-pb'],
11987
11695
  touch: ['touch-x', 'touch-y', 'touch-pz'],
@@ -13545,7 +13253,7 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
13545
13253
 
13546
13254
  var dayjs_min = {exports: {}};
13547
13255
 
13548
- (function (module, exports$1) {
13256
+ (function (module, exports) {
13549
13257
  !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
13550
13258
  } (dayjs_min));
13551
13259