unframer 2.25.5 → 2.26.0

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.
Files changed (117) hide show
  1. package/dist/babel-jsx.d.ts +15 -0
  2. package/dist/babel-jsx.d.ts.map +1 -0
  3. package/dist/babel-jsx.js +223 -0
  4. package/dist/babel-jsx.js.map +1 -0
  5. package/dist/babel-plugin-imports.d.ts +0 -6
  6. package/dist/babel-plugin-imports.d.ts.map +1 -1
  7. package/dist/babel-plugin-imports.js +2 -135
  8. package/dist/babel-plugin-imports.js.map +1 -1
  9. package/dist/cli.d.ts +1 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +31 -6
  12. package/dist/cli.js.map +1 -1
  13. package/dist/css.js +13 -13
  14. package/dist/esbuild.d.ts.map +1 -1
  15. package/dist/esbuild.js +5 -5
  16. package/dist/esbuild.js.map +1 -1
  17. package/dist/example-code.test.js +39 -39
  18. package/dist/example-code.test.js.map +1 -1
  19. package/dist/exporter.d.ts.map +1 -1
  20. package/dist/exporter.js +137 -87
  21. package/dist/exporter.js.map +1 -1
  22. package/dist/flat-cache-interceptor.d.ts +27 -0
  23. package/dist/flat-cache-interceptor.d.ts.map +1 -0
  24. package/dist/flat-cache-interceptor.js +99 -0
  25. package/dist/flat-cache-interceptor.js.map +1 -0
  26. package/dist/framer.d.ts.map +1 -1
  27. package/dist/framer.js +837 -684
  28. package/dist/framer.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/react.d.ts.map +1 -1
  32. package/dist/react.js +15 -3
  33. package/dist/react.js.map +1 -1
  34. package/dist/sentry.d.ts.map +1 -1
  35. package/dist/sentry.js +1 -16
  36. package/dist/sentry.js.map +1 -1
  37. package/dist/undici-dispatcher.d.ts +2 -0
  38. package/dist/undici-dispatcher.d.ts.map +1 -0
  39. package/dist/undici-dispatcher.js +13 -0
  40. package/dist/undici-dispatcher.js.map +1 -0
  41. package/dist/utils.d.ts +3 -3
  42. package/dist/utils.d.ts.map +1 -1
  43. package/dist/utils.js +4 -10
  44. package/dist/utils.js.map +1 -1
  45. package/dist/utils.test.d.ts +2 -0
  46. package/dist/utils.test.d.ts.map +1 -0
  47. package/dist/utils.test.js +143 -0
  48. package/dist/utils.test.js.map +1 -0
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/esm/babel-jsx.d.ts +15 -0
  52. package/esm/babel-jsx.d.ts.map +1 -0
  53. package/esm/babel-jsx.js +219 -0
  54. package/esm/babel-jsx.js.map +1 -0
  55. package/esm/babel-plugin-imports.d.ts +0 -6
  56. package/esm/babel-plugin-imports.d.ts.map +1 -1
  57. package/esm/babel-plugin-imports.js +2 -134
  58. package/esm/babel-plugin-imports.js.map +1 -1
  59. package/esm/cli.d.ts +1 -0
  60. package/esm/cli.d.ts.map +1 -1
  61. package/esm/cli.js +31 -6
  62. package/esm/cli.js.map +1 -1
  63. package/esm/css.js +13 -13
  64. package/esm/esbuild.d.ts.map +1 -1
  65. package/esm/esbuild.js +4 -4
  66. package/esm/esbuild.js.map +1 -1
  67. package/esm/example-code.test.js +40 -40
  68. package/esm/example-code.test.js.map +1 -1
  69. package/esm/exporter.d.ts.map +1 -1
  70. package/esm/exporter.js +100 -50
  71. package/esm/exporter.js.map +1 -1
  72. package/esm/flat-cache-interceptor.d.ts +27 -0
  73. package/esm/flat-cache-interceptor.d.ts.map +1 -0
  74. package/esm/flat-cache-interceptor.js +95 -0
  75. package/esm/flat-cache-interceptor.js.map +1 -0
  76. package/esm/framer.d.ts.map +1 -1
  77. package/esm/framer.js +813 -672
  78. package/esm/framer.js.map +1 -1
  79. package/esm/index.d.ts +1 -1
  80. package/esm/index.d.ts.map +1 -1
  81. package/esm/react.d.ts.map +1 -1
  82. package/esm/react.js +15 -3
  83. package/esm/react.js.map +1 -1
  84. package/esm/sentry.d.ts.map +1 -1
  85. package/esm/sentry.js +1 -16
  86. package/esm/sentry.js.map +1 -1
  87. package/esm/undici-dispatcher.d.ts +2 -0
  88. package/esm/undici-dispatcher.d.ts.map +1 -0
  89. package/esm/undici-dispatcher.js +10 -0
  90. package/esm/undici-dispatcher.js.map +1 -0
  91. package/esm/utils.d.ts +3 -3
  92. package/esm/utils.d.ts.map +1 -1
  93. package/esm/utils.js +3 -9
  94. package/esm/utils.js.map +1 -1
  95. package/esm/utils.test.d.ts +2 -0
  96. package/esm/utils.test.d.ts.map +1 -0
  97. package/esm/utils.test.js +141 -0
  98. package/esm/utils.test.js.map +1 -0
  99. package/esm/version.d.ts +1 -1
  100. package/esm/version.js +1 -1
  101. package/package.json +8 -10
  102. package/src/babel-jsx.ts +277 -0
  103. package/src/babel-plugin-imports.ts +6 -169
  104. package/src/cli.ts +45 -6
  105. package/src/css.ts +13 -13
  106. package/src/esbuild.ts +5 -4
  107. package/src/example-code.test.ts +40 -41
  108. package/src/exporter.ts +124 -54
  109. package/src/flat-cache-interceptor.ts +114 -0
  110. package/src/framer.js +902 -739
  111. package/src/index.ts +1 -1
  112. package/src/react.tsx +15 -1
  113. package/src/sentry.ts +1 -20
  114. package/src/undici-dispatcher.ts +13 -0
  115. package/src/utils.test.ts +148 -0
  116. package/src/utils.ts +4 -17
  117. package/src/version.ts +1 -1
package/dist/framer.js CHANGED
@@ -36,12 +36,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.DataContext = exports.Data = exports.CycleVariantState = exports.CustomCursorHost = exports.cubicBezierAsString = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectMotionValues = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelMicrotask = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.AsyncMotionValueAnimation = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.animationMapKey = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.alpha = exports.addPointerInfo = exports.activeAnimations = exports.acceleratedValues = exports.combinedCSSRules = void 0;
40
- exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.findValueType = exports.findDimensionValueType = exports.Fetcher = exports.environment = exports.easingDefinitionToFunction = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.DOMKeyframesResolver = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.dimensionValueTypes = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.degrees = exports.defaultValueTypes = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = void 0;
41
- exports.mixLinearColor = exports.mixComplex = exports.mixColor = exports.mirrorEasing = exports.millisecondsToSeconds = exports.microtask = exports.maxGeneratorDuration = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.KeyframeResolver = exports.JSAnimation = exports.isZeroValueString = exports.isPrimaryPointer = exports.isNumericalString = exports.isNodeOrChild = exports.isMotionValue = exports.isEasingArray = exports.isDragging = exports.isCSSVariableToken = exports.isCSSVariableName = exports.isBrowser = exports.isBezierDefinition = exports.invisibleValues = exports.invariant = exports.InternalID = exports.Image = exports.hsla = exports.hex = exports.GroupAnimationWithThen = exports.GroupAnimation = exports.GracefullyDegradingErrorBoundary = exports.getValueAsType = exports.getDefaultValueType = exports.generateLinearEasing = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = void 0;
42
- exports.scale = exports.RichText = exports.rgbUnit = exports.rgba = exports.reverseEasing = exports.ResolveLinks = exports.RenderTarget = exports.Rect = exports.readTransformValue = exports.RadialGradient = exports.QueryEngine = exports.QueryCache = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.progressPercentage = exports.progress = exports.PresenceContext = exports.positionalKeys = exports.Polygon = exports.pipe = exports.percent = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.numberValueTypes = exports.number = exports.NotFoundError = exports.noop = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.NativeAnimationWrapper = exports.NativeAnimationExtended = exports.NativeAnimation = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mixNumber = void 0;
43
- exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = exports.WindowContext = exports.WillChangeMotionValue = exports.warning = exports.vw = exports.visualElementStore = exports.VisualElement = exports.ViewTransitionBuilder = exports.vh = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.transformValueTypes = exports.transformProps = exports.transformPropOrder = exports.time = exports.Text = exports.testValueType = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.SVG = exports.supportsScrollTimeline = exports.supportsPartialKeyframes = exports.supportsLinearEasing = exports.supportsFlags = exports.supportedWaapiEasing = exports.SubscriptionManager = exports.StyleSheetContext = exports.statsBuffer = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.secondsToMilliseconds = exports.Scroll = void 0;
44
- exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = void 0;
39
+ exports.CustomCursorHost = exports.cubicBezierAsString = exports.createBox = exports.ConvertColor = exports.ControlType = exports.Container = exports.ConstraintValues = exports.ConstraintMask = exports.ComponentViewportProvider = exports.ComponentContainerContext = exports.complex = exports.combinedCSSRulesForPreview = exports.ColorMixModelType = exports.ColorFormat = exports.color = exports.Color = exports.collectMotionValues = exports.clamp = exports.circOut = exports.circInOut = exports.circIn = exports.cancelSync = exports.cancelMicrotask = exports.cancelFrame = exports.callEach = exports.BoxShadow = exports.BezierAnimator = exports.backOut = exports.backInOut = exports.backIn = exports.BackgroundImage = exports.attrEffect = exports.AsyncMotionValueAnimation = exports.AnyInterpolation = exports.anticipate = exports.animations = exports.animationMapKey = exports.AnimateSharedLayout = exports.AnimatePresence = exports.animateMini = exports.animate = exports.Animatable = exports.AnchorLinkTarget = exports.alpha = exports.addStyleValue = exports.addPointerInfo = exports.addAttrValue = exports.activeAnimations = exports.acceleratedValues = exports.combinedCSSRules = void 0;
40
+ exports.framerAppearTransformTemplateToken = exports.framerAppearIdKey = exports.framerAppearEffects = exports.framerAppearAnimationScriptKey = exports.FramerAnimation = exports.frameFromElements = exports.frameFromElement = exports.frameData = exports.frame = exports.Frame = exports.FormSelect = exports.FormPlainTextInput = exports.FormContainer = exports.FormBooleanInput = exports.fontStore = exports.FontSourceNames = exports.FlatTree = exports.findValueType = exports.findDimensionValueType = exports.Fetcher = exports.environment = exports.easingDefinitionToFunction = exports.easeOut = exports.easeInOut = exports.easeIn = exports.Draggable = exports.DragControls = exports.domMin = exports.domMax = exports.DOMKeyframesResolver = exports.domAnimation = exports.DOM = exports.distance = exports.dispatchKeyDownEvent = exports.dimensionValueTypes = exports.DimensionType = exports.devicePresets = exports.DeviceCodeComponent = exports.LayoutGroupContext = exports.DeprecatedLayoutGroupContext = exports.DeprecatedFrameWithEvents = exports.DeprecatedComponentContainer = exports.degrees = exports.defaultValueTypes = exports.defaultDeviceProps = exports.DataObserverContext = exports.DataObserver = exports.DataContext = exports.Data = exports.CycleVariantState = void 0;
41
+ exports.millisecondsToSeconds = exports.microtask = exports.maxGeneratorDuration = exports.makeUseVisualState = exports.MainLoop = exports.m = exports.localPackageFallbackIdentifier = exports.loadFont = exports.Link = exports.LinearGradient = exports.Line = exports.LibraryFeaturesProvider = exports.LazyValue = exports.LayoutIdContext = exports.LayoutGroup = exports.Layer = exports.KeyframeResolver = exports.JSAnimation = exports.isZeroValueString = exports.isPrimaryPointer = exports.isNumericalString = exports.isNodeOrChild = exports.isMotionValue = exports.isEasingArray = exports.isDragging = exports.isCSSVariableToken = exports.isCSSVariableName = exports.isBrowser = exports.isBezierDefinition = exports.invisibleValues = exports.invariant = exports.InternalID = exports.Instance = exports.Image = exports.hsla = exports.hex = exports.GroupAnimationWithThen = exports.GroupAnimation = exports.GracefullyDegradingErrorBoundary = exports.getValueAsType = exports.getDefaultValueType = exports.generateLinearEasing = exports.GeneratedComponentContext = exports.GamepadContext = exports.FrameWithMotion = exports.frameSteps = exports.FramerEventSession = exports.FramerEventListener = exports.FramerEvent = exports.framerCSSMarker = void 0;
42
+ exports.ResolveLinks = exports.RenderTarget = exports.Rect = exports.readTransformValue = exports.RadialGradient = exports.QueryEngine = exports.QueryCache = exports.px = exports.PropertyStore = exports.PropertyOverrides = exports.propEffect = exports.progressPercentage = exports.progress = exports.PresenceContext = exports.positionalKeys = exports.Polygon = exports.pipe = exports.percent = exports.PathVariablesContext = exports.PathSegment = exports.pathDefaults = exports.ParentSizeState = exports.Page = exports.optimizedAppearDataAttribute = exports.optimizeAppearTransformTemplate = exports.optimizeAppear = exports.ObservableObject = exports.numberValueTypes = exports.number = exports.NotFoundError = exports.noop = exports.nestedLinksCollector = exports.NavigationTransitionType = exports.NavigationConsumer = exports.NavigationCallbackProvider = exports.NavigateTo = exports.NativeAnimationWrapper = exports.NativeAnimationExtended = exports.NativeAnimation = exports.Reorder = exports.MotionValue = exports.MotionGlobalConfig = exports.MotionContext = exports.MotionConfigContext = exports.motion = exports.mixNumber = exports.mixLinearColor = exports.mixComplex = exports.mixColor = exports.mirrorEasing = void 0;
43
+ exports.WindowContext = exports.WillChangeMotionValue = exports.warning = exports.vw = exports.visualElementStore = exports.VisualElement = exports.ViewTransitionBuilder = exports.vh = exports.version = exports.VectorGroup = exports.Vector = exports.VariantSelector = exports.ValueInterpolation = exports.useProvidedWindow = exports.useIsomorphicLayoutEffect = exports.useAnimation = exports.transformValueTypes = exports.transformProps = exports.transformPropOrder = exports.time = exports.Text = exports.testValueType = exports.systemFontFamilyName = exports.sync = exports.SwitchLayoutGroupContext = exports.svgEffect = exports.SVG = exports.supportsScrollTimeline = exports.supportsPartialKeyframes = exports.supportsLinearEasing = exports.supportsFlags = exports.supportedWaapiEasing = exports.SubscriptionManager = exports.StyleSheetContext = exports.styleEffect = exports.statsBuffer = exports.Stack = exports.SSRVariants = exports.SpringAnimator = exports.SmartComponentScopedContainer = exports.Size = exports.sharedSVGManager = exports.Shadow = exports.secondsToMilliseconds = exports.Scroll = exports.scale = exports.RichText = exports.rgbUnit = exports.rgba = exports.reverseEasing = void 0;
44
+ exports.LocaleInfoContext = exports.FormContext = exports.FetchClientProvider = exports.FramerLink = exports.wrap = exports.withVariantFX = exports.withVariantAppearEffect = exports.withV1StrokeFX = exports.withStyleAppearEffect = exports.withParallaxTransform = exports.withMeasuredSize = exports.withGeneratedLayoutId = exports.withFX = exports.withCSS = void 0;
45
45
  exports._injectRuntime = _injectRuntime;
46
46
  exports.addActionControls = addActionControls;
47
47
  exports.addFonts = addFonts;
@@ -56,6 +56,7 @@ exports.animateVisualElement = animateVisualElement;
56
56
  exports.animationControls = animationControls;
57
57
  exports.annotateTypeOnStringify = annotateTypeOnStringify;
58
58
  exports.applyPxDefaults = applyPxDefaults;
59
+ exports.attachSpring = attachSpring;
59
60
  exports.AutomaticLayoutIds = AutomaticLayoutIds;
60
61
  exports.backgroundImageFromProps = backgroundImageFromProps;
61
62
  exports.buildTransform = buildTransform2;
@@ -138,7 +139,9 @@ exports.isFramerGamepadKeydownData = isFramerGamepadKeydownData;
138
139
  exports.isFramerPageLink = isFramerPageLink;
139
140
  exports.isGapEnabled = isGapEnabled;
140
141
  exports.isGenerator = isGenerator;
142
+ exports.isHTMLElement = isHTMLElement;
141
143
  exports.isMotionComponent = isMotionComponent;
144
+ exports.isObject = isObject;
142
145
  exports.isOfAnnotatedType = isOfAnnotatedType;
143
146
  exports.isOverride = isOverride;
144
147
  exports.isReactDefinition = isReactDefinition;
@@ -146,6 +149,8 @@ exports.isRelativeNumber = isRelativeNumber;
146
149
  exports.isShallowEqualArray = isShallowEqualArray;
147
150
  exports.isStaticRenderer = isStaticRenderer;
148
151
  exports.isStraightCurve = isStraightCurve;
152
+ exports.isSVGElement = isSVGElement;
153
+ exports.isSVGSVGElement = isSVGSVGElement;
149
154
  exports.isValidMotionProp = isValidMotionProp;
150
155
  exports.isWaapiSupportedEasing = isWaapiSupportedEasing;
151
156
  exports.keyframes = keyframes;
@@ -203,12 +208,12 @@ exports.setGlobalRenderEnvironment = setGlobalRenderEnvironment;
203
208
  exports.setStyle = setStyle;
204
209
  exports.shouldOpenLinkInNewTab = shouldOpenLinkInNewTab;
205
210
  exports.spring = spring;
211
+ exports.springValue = springValue;
206
212
  exports.stagger = stagger;
207
213
  exports.startAnimation = startAnimation;
208
214
  exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
209
215
  exports.startWaapiAnimation = startWaapiAnimation;
210
216
  exports.steps = steps;
211
- exports.styleEffect = styleEffect;
212
217
  exports.supportsBrowserAnimation = supportsBrowserAnimation;
213
218
  exports.throttle = throttle;
214
219
  exports.toFlexDirection = toFlexDirection;
@@ -317,7 +322,7 @@ exports.withShape = withShape;
317
322
  exports.yieldToMain = yieldToMain;
318
323
  exports.Router = Router;
319
324
  const chunk_A2PMVMFI_js_1 = require("./framer-chunks/chunk-A2PMVMFI.js");
320
- // /:https://app.framerstatic.com/chunk-IGW3TQSG.mjs
325
+ // /:https://app.framerstatic.com/chunk-A6RUM2JZ.mjs
321
326
  const react_1 = require("react");
322
327
  const react_2 = require("react");
323
328
  const react_3 = require("react");
@@ -372,255 +377,6 @@ var useIsomorphicLayoutEffect = isBrowser ? react_2.useLayoutEffect : react_2.us
372
377
  exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
373
378
  var PresenceContext = /* @__PURE__ */ (0, react_1.createContext)(null);
374
379
  exports.PresenceContext = PresenceContext;
375
- var MotionConfigContext = (0, react_1.createContext)({
376
- transformPagePoint: (p) => p,
377
- isStatic: false,
378
- reducedMotion: 'never',
379
- });
380
- exports.MotionConfigContext = MotionConfigContext;
381
- function usePresence(subscribe = true) {
382
- const context = (0, react_3.useContext)(PresenceContext);
383
- if (context === null)
384
- return [true, null,];
385
- const { isPresent: isPresent2, onExitComplete, register, } = context;
386
- const id4 = (0, react_3.useId)();
387
- (0, react_2.useEffect)(() => {
388
- if (subscribe) {
389
- return register(id4);
390
- }
391
- }, [subscribe,]);
392
- const safeToRemove = (0, react_3.useCallback)(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
393
- return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
394
- }
395
- function useIsPresent() {
396
- return isPresent((0, react_3.useContext)(PresenceContext));
397
- }
398
- function isPresent(context) {
399
- return context === null ? true : context.isPresent;
400
- }
401
- function useConstant(init) {
402
- const ref = (0, react_4.useRef)(null);
403
- if (ref.current === null) {
404
- ref.current = init();
405
- }
406
- return ref.current;
407
- }
408
- var PopChildMeasure = class extends React2.Component {
409
- getSnapshotBeforeUpdate(prevProps) {
410
- const element = this.props.childRef.current;
411
- if (element && prevProps.isPresent && !this.props.isPresent) {
412
- const parent = element.offsetParent;
413
- const parentWidth = parent instanceof HTMLElement ? parent.offsetWidth || 0 : 0;
414
- const size = this.props.sizeRef.current;
415
- size.height = element.offsetHeight || 0;
416
- size.width = element.offsetWidth || 0;
417
- size.top = element.offsetTop;
418
- size.left = element.offsetLeft;
419
- size.right = parentWidth - size.width - size.left;
420
- }
421
- return null;
422
- }
423
- /**
424
- * Required with getSnapshotBeforeUpdate to stop React complaining.
425
- */
426
- componentDidUpdate() { }
427
- render() {
428
- return this.props.children;
429
- }
430
- };
431
- function PopChild({ children, isPresent: isPresent2, anchorX, }) {
432
- const id4 = (0, react_3.useId)();
433
- const ref = (0, react_4.useRef)(null);
434
- const size = (0, react_4.useRef)({
435
- width: 0,
436
- height: 0,
437
- top: 0,
438
- left: 0,
439
- right: 0,
440
- });
441
- const { nonce, } = (0, react_3.useContext)(MotionConfigContext);
442
- (0, react_5.useInsertionEffect)(() => {
443
- const { width, height, top, left, right, } = size.current;
444
- if (isPresent2 || !ref.current || !width || !height)
445
- return;
446
- const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
447
- ref.current.dataset.motionPopId = id4;
448
- const style2 = document.createElement('style');
449
- if (nonce)
450
- style2.nonce = nonce;
451
- document.head.appendChild(style2);
452
- if (style2.sheet) {
453
- style2.sheet.insertRule(`
454
- [data-motion-pop-id="${id4}"] {
455
- position: absolute !important;
456
- width: ${width}px !important;
457
- height: ${height}px !important;
458
- ${x}px !important;
459
- top: ${top}px !important;
460
- }
461
- `);
462
- }
463
- return () => {
464
- if (document.head.contains(style2)) {
465
- document.head.removeChild(style2);
466
- }
467
- };
468
- }, [isPresent2,]);
469
- return (0, jsx_runtime_1.jsx)(PopChildMeasure, {
470
- isPresent: isPresent2,
471
- childRef: ref,
472
- sizeRef: size,
473
- children: React2.cloneElement(children, {
474
- ref,
475
- }),
476
- });
477
- }
478
- var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
479
- const presenceChildren = useConstant(newChildrenMap);
480
- const id4 = (0, react_3.useId)();
481
- let isReusedContext = true;
482
- let context = (0, react_4.useMemo)(() => {
483
- isReusedContext = false;
484
- return {
485
- id: id4,
486
- initial,
487
- isPresent: isPresent2,
488
- custom,
489
- onExitComplete: (childId) => {
490
- presenceChildren.set(childId, true);
491
- for (const isComplete of presenceChildren.values()) {
492
- if (!isComplete)
493
- return;
494
- }
495
- onExitComplete && onExitComplete();
496
- },
497
- register: (childId) => {
498
- presenceChildren.set(childId, false);
499
- return () => presenceChildren.delete(childId);
500
- },
501
- };
502
- }, [isPresent2, presenceChildren, onExitComplete,]);
503
- if (presenceAffectsLayout && isReusedContext) {
504
- context = {
505
- ...context,
506
- };
507
- }
508
- (0, react_4.useMemo)(() => {
509
- presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
510
- }, [isPresent2,]);
511
- React2.useEffect(() => {
512
- !isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
513
- }, [isPresent2,]);
514
- if (mode === 'popLayout') {
515
- children = (0, jsx_runtime_1.jsx)(PopChild, {
516
- isPresent: isPresent2,
517
- anchorX,
518
- children,
519
- });
520
- }
521
- return (0, jsx_runtime_1.jsx)(PresenceContext.Provider, {
522
- value: context,
523
- children,
524
- });
525
- };
526
- function newChildrenMap() {
527
- return /* @__PURE__ */ new Map();
528
- }
529
- var getChildKey = (child) => child.key || '';
530
- function onlyElements(children) {
531
- const filtered = [];
532
- react_6.Children.forEach(children, (child) => {
533
- if ((0, react_6.isValidElement)(child))
534
- filtered.push(child);
535
- });
536
- return filtered;
537
- }
538
- var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
539
- const [isParentPresent, safeToRemove,] = usePresence(propagate);
540
- const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
541
- const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
542
- const isInitialRender = (0, react_4.useRef)(true);
543
- const pendingPresentChildren = (0, react_4.useRef)(presentChildren);
544
- const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
545
- const [diffedChildren, setDiffedChildren,] = (0, react_4.useState)(presentChildren);
546
- const [renderedChildren, setRenderedChildren,] = (0, react_4.useState)(presentChildren);
547
- useIsomorphicLayoutEffect(() => {
548
- isInitialRender.current = false;
549
- pendingPresentChildren.current = presentChildren;
550
- for (let i = 0; i < renderedChildren.length; i++) {
551
- const key7 = getChildKey(renderedChildren[i]);
552
- if (!presentKeys.includes(key7)) {
553
- if (exitComplete.get(key7) !== true) {
554
- exitComplete.set(key7, false);
555
- }
556
- }
557
- else {
558
- exitComplete.delete(key7);
559
- }
560
- }
561
- }, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
562
- const exitingChildren = [];
563
- if (presentChildren !== diffedChildren) {
564
- let nextChildren = [...presentChildren,];
565
- for (let i = 0; i < renderedChildren.length; i++) {
566
- const child = renderedChildren[i];
567
- const key7 = getChildKey(child);
568
- if (!presentKeys.includes(key7)) {
569
- nextChildren.splice(i, 0, child);
570
- exitingChildren.push(child);
571
- }
572
- }
573
- if (mode === 'wait' && exitingChildren.length) {
574
- nextChildren = exitingChildren;
575
- }
576
- setRenderedChildren(onlyElements(nextChildren));
577
- setDiffedChildren(presentChildren);
578
- return null;
579
- }
580
- if (false) {
581
- console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
582
- }
583
- const { forceRender, } = (0, react_3.useContext)(LayoutGroupContext);
584
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
585
- children: renderedChildren.map((child) => {
586
- const key7 = getChildKey(child);
587
- const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
588
- const onExit = () => {
589
- if (exitComplete.has(key7)) {
590
- exitComplete.set(key7, true);
591
- }
592
- else {
593
- return;
594
- }
595
- let isEveryExitComplete = true;
596
- exitComplete.forEach((isExitComplete) => {
597
- if (!isExitComplete)
598
- isEveryExitComplete = false;
599
- });
600
- if (isEveryExitComplete) {
601
- forceRender == null ? void 0 : forceRender();
602
- setRenderedChildren(pendingPresentChildren.current);
603
- propagate && (safeToRemove == null ? void 0 : safeToRemove());
604
- onExitComplete && onExitComplete();
605
- }
606
- };
607
- return (0, jsx_runtime_1.jsx)(PresenceChild, {
608
- isPresent: isPresent2,
609
- initial: !isInitialRender.current || initial ? void 0 : false,
610
- custom,
611
- presenceAffectsLayout,
612
- mode,
613
- onExitComplete: isPresent2 ? void 0 : onExit,
614
- anchorX,
615
- children: child,
616
- }, key7);
617
- }),
618
- });
619
- };
620
- exports.AnimatePresence = AnimatePresence;
621
- var DeprecatedLayoutGroupContext = (0, react_1.createContext)(null);
622
- exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
623
- exports.LayoutGroupContext = DeprecatedLayoutGroupContext;
624
380
  function addUniqueItem(arr, item) {
625
381
  if (arr.indexOf(item) === -1)
626
382
  arr.push(item);
@@ -667,6 +423,9 @@ var MotionGlobalConfig = {};
667
423
  exports.MotionGlobalConfig = MotionGlobalConfig;
668
424
  var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
669
425
  exports.isNumericalString = isNumericalString;
426
+ function isObject(value) {
427
+ return typeof value === 'object' && value !== null;
428
+ }
670
429
  var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
671
430
  exports.isZeroValueString = isZeroValueString;
672
431
  // @__NO_SIDE_EFFECTS__
@@ -1908,13 +1667,11 @@ var JSAnimation = class extends WithPromise {
1908
1667
  this.currentTime = 0;
1909
1668
  this.holdTime = null;
1910
1669
  this.playbackSpeed = 1;
1911
- this.stop = (sync2 = true) => {
1670
+ this.stop = () => {
1912
1671
  var _a, _b;
1913
- if (sync2) {
1914
- const { motionValue: motionValue2, } = this.options;
1915
- if (motionValue2 && motionValue2.updatedAt !== time.now()) {
1916
- this.tick(time.now());
1917
- }
1672
+ const { motionValue: motionValue2, } = this.options;
1673
+ if (motionValue2 && motionValue2.updatedAt !== time.now()) {
1674
+ this.tick(time.now());
1918
1675
  }
1919
1676
  this.isStopped = true;
1920
1677
  if (this.state === 'idle')
@@ -2718,14 +2475,17 @@ var NativeAnimationExtended = class extends NativeAnimation {
2718
2475
  }
2719
2476
  };
2720
2477
  exports.NativeAnimationExtended = NativeAnimationExtended;
2721
- var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform', // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
2722
- // or until we implement support for linear() easing.
2478
+ function isHTMLElement(element) {
2479
+ return isObject(element) && 'offsetHeight' in element;
2480
+ }
2481
+ var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform', // TODO: Could be re-enabled now we have support for linear() easing
2723
2482
  // "background-color"
2724
2483
  ]);
2725
2484
  var supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, 'animate'));
2726
2485
  function supportsBrowserAnimation(options) {
2486
+ var _a;
2727
2487
  const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, } = options;
2728
- if (!motionValue2 || !motionValue2.owner || !(motionValue2.owner.current instanceof HTMLElement)) {
2488
+ if (!isHTMLElement((_a = motionValue2 == null ? void 0 : motionValue2.owner) == null ? void 0 : _a.current)) {
2729
2489
  return false;
2730
2490
  }
2731
2491
  const { onUpdate, transformTemplate: transformTemplate2, } = motionValue2.owner.getProps();
@@ -3362,6 +3122,123 @@ function resolveElements(elementOrSelector, scope, selectorCache) {
3362
3122
  }
3363
3123
  return Array.from(elementOrSelector);
3364
3124
  }
3125
+ var getValueAsType = (value, type) => {
3126
+ return type && typeof value === 'number' ? type.transform(value) : value;
3127
+ };
3128
+ exports.getValueAsType = getValueAsType;
3129
+ function camelToDash(str) {
3130
+ return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
3131
+ }
3132
+ function createSelectorEffect(subjectEffect) {
3133
+ return (subject, values) => {
3134
+ const elements = resolveElements(subject);
3135
+ const subscriptions = [];
3136
+ for (const element of elements) {
3137
+ const remove2 = subjectEffect(element, values);
3138
+ subscriptions.push(remove2);
3139
+ }
3140
+ return () => {
3141
+ for (const remove2 of subscriptions)
3142
+ remove2();
3143
+ };
3144
+ };
3145
+ }
3146
+ var MotionValueState = class {
3147
+ constructor() {
3148
+ this.latest = {};
3149
+ this.values = /* @__PURE__ */ new Map();
3150
+ }
3151
+ set(name, value, render, computed, useDefaultValueType = true) {
3152
+ const existingValue = this.values.get(name);
3153
+ if (existingValue) {
3154
+ existingValue.onRemove();
3155
+ }
3156
+ const onChange = () => {
3157
+ const v = value.get();
3158
+ if (useDefaultValueType) {
3159
+ this.latest[name] = getValueAsType(v, numberValueTypes[name]);
3160
+ }
3161
+ else {
3162
+ this.latest[name] = v;
3163
+ }
3164
+ render && frame.render(render);
3165
+ };
3166
+ onChange();
3167
+ const cancelOnChange = value.on('change', onChange);
3168
+ computed && value.addDependent(computed);
3169
+ const remove2 = () => {
3170
+ cancelOnChange();
3171
+ render && cancelFrame(render);
3172
+ this.values.delete(name);
3173
+ computed && value.removeDependent(computed);
3174
+ };
3175
+ this.values.set(name, {
3176
+ value,
3177
+ onRemove: remove2,
3178
+ });
3179
+ return remove2;
3180
+ }
3181
+ get(name) {
3182
+ var _a;
3183
+ return (_a = this.values.get(name)) == null ? void 0 : _a.value;
3184
+ }
3185
+ destroy() {
3186
+ for (const value of this.values.values()) {
3187
+ value.onRemove();
3188
+ }
3189
+ }
3190
+ };
3191
+ function createEffect(addValue) {
3192
+ const stateCache = /* @__PURE__ */ new WeakMap();
3193
+ const subscriptions = [];
3194
+ return (subject, values) => {
3195
+ const state = stateCache.get(subject) ?? new MotionValueState();
3196
+ stateCache.set(subject, state);
3197
+ for (const key7 in values) {
3198
+ const value = values[key7];
3199
+ const remove2 = addValue(subject, state, key7, value);
3200
+ subscriptions.push(remove2);
3201
+ }
3202
+ return () => {
3203
+ for (const cancel of subscriptions)
3204
+ cancel();
3205
+ };
3206
+ };
3207
+ }
3208
+ function canSetAsProperty(element, name) {
3209
+ if (!(name in element))
3210
+ return false;
3211
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||
3212
+ Object.getOwnPropertyDescriptor(element, name);
3213
+ return descriptor && typeof descriptor.set === 'function';
3214
+ }
3215
+ var addAttrValue = (element, state, key7, value) => {
3216
+ const isProp = canSetAsProperty(element, key7);
3217
+ const name = isProp ? key7 : key7.startsWith('data') || key7.startsWith('aria') ? camelToDash(key7) : key7;
3218
+ const render = isProp
3219
+ ? () => {
3220
+ element[name] = state.latest[key7];
3221
+ }
3222
+ : () => {
3223
+ const v = state.latest[key7];
3224
+ if (v === null || v === void 0) {
3225
+ element.removeAttribute(name);
3226
+ }
3227
+ else {
3228
+ element.setAttribute(name, String(v));
3229
+ }
3230
+ };
3231
+ return state.set(key7, value, render);
3232
+ };
3233
+ exports.addAttrValue = addAttrValue;
3234
+ var attrEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addAttrValue));
3235
+ exports.attrEffect = attrEffect;
3236
+ var propEffect = /* @__PURE__ */ createEffect((subject, state, key7, value) => {
3237
+ return state.set(key7, value, () => {
3238
+ subject[key7] = state.latest[key7];
3239
+ }, void 0, false);
3240
+ });
3241
+ exports.propEffect = propEffect;
3365
3242
  var MAX_VELOCITY_DELTA = 30;
3366
3243
  var isFloat = (value) => {
3367
3244
  return !isNaN(parseFloat(value));
@@ -3654,49 +3531,6 @@ exports.MotionValue = MotionValue;
3654
3531
  function motionValue(init, options) {
3655
3532
  return new MotionValue(init, options);
3656
3533
  }
3657
- var getValueAsType = (value, type) => {
3658
- return type && typeof value === 'number' ? type.transform(value) : value;
3659
- };
3660
- exports.getValueAsType = getValueAsType;
3661
- var MotionValueState = class {
3662
- constructor() {
3663
- this.latest = {};
3664
- this.values = /* @__PURE__ */ new Map();
3665
- }
3666
- set(name, value, render, computed) {
3667
- const existingValue = this.values.get(name);
3668
- if (existingValue) {
3669
- existingValue.onRemove();
3670
- }
3671
- const onChange = () => {
3672
- this.latest[name] = getValueAsType(value.get(), numberValueTypes[name]);
3673
- render && frame.render(render);
3674
- };
3675
- onChange();
3676
- const cancelOnChange = value.on('change', onChange);
3677
- computed && value.addDependent(computed);
3678
- const remove2 = () => {
3679
- cancelOnChange();
3680
- render && cancelFrame(render);
3681
- this.values.delete(name);
3682
- computed && value.removeDependent(computed);
3683
- };
3684
- this.values.set(name, {
3685
- value,
3686
- onRemove: remove2,
3687
- });
3688
- return remove2;
3689
- }
3690
- get(name) {
3691
- var _a;
3692
- return (_a = this.values.get(name)) == null ? void 0 : _a.value;
3693
- }
3694
- destroy() {
3695
- for (const value of this.values.values()) {
3696
- value.onRemove();
3697
- }
3698
- }
3699
- };
3700
3534
  var translateAlias = {
3701
3535
  x: 'translateX',
3702
3536
  y: 'translateY',
@@ -3727,36 +3561,32 @@ function buildTransform(state) {
3727
3561
  }
3728
3562
  return transformIsDefault ? 'none' : transform2.trim();
3729
3563
  }
3730
- var stateMap = /* @__PURE__ */ new WeakMap();
3731
- function styleEffect(subject, values) {
3732
- const elements = resolveElements(subject);
3733
- const subscriptions = [];
3734
- for (let i = 0; i < elements.length; i++) {
3735
- const element = elements[i];
3736
- const state = stateMap.get(element) ?? new MotionValueState();
3737
- stateMap.set(element, state);
3738
- for (const key7 in values) {
3739
- const value = values[key7];
3740
- const remove2 = addValue(element, state, key7, value);
3741
- subscriptions.push(remove2);
3742
- }
3743
- }
3744
- return () => {
3745
- for (const cancel of subscriptions)
3746
- cancel();
3747
- };
3748
- }
3749
- function addValue(element, state, key7, value) {
3564
+ var originProps = /* @__PURE__ */ new Set(['originX', 'originY', 'originZ',]);
3565
+ var addStyleValue = (element, state, key7, value) => {
3750
3566
  let render = void 0;
3751
3567
  let computed = void 0;
3752
3568
  if (transformProps.has(key7)) {
3753
3569
  if (!state.get('transform')) {
3570
+ if (!isHTMLElement(element) && !state.get('transformBox')) {
3571
+ addStyleValue(element, state, 'transformBox', new MotionValue('fill-box'));
3572
+ }
3754
3573
  state.set('transform', new MotionValue('none'), () => {
3755
3574
  element.style.transform = buildTransform(state);
3756
3575
  });
3757
3576
  }
3758
3577
  computed = state.get('transform');
3759
3578
  }
3579
+ else if (originProps.has(key7)) {
3580
+ if (!state.get('transformOrigin')) {
3581
+ state.set('transformOrigin', new MotionValue(''), () => {
3582
+ const originX = state.latest.originX ?? '50%';
3583
+ const originY = state.latest.originY ?? '50%';
3584
+ const originZ = state.latest.originZ ?? 0;
3585
+ element.style.transformOrigin = `${originX} ${originY} ${originZ}`;
3586
+ });
3587
+ }
3588
+ computed = state.get('transformOrigin');
3589
+ }
3760
3590
  else if (isCSSVar(key7)) {
3761
3591
  render = () => {
3762
3592
  element.style.setProperty(key7, state.latest[key7]);
@@ -3768,6 +3598,40 @@ function addValue(element, state, key7, value) {
3768
3598
  };
3769
3599
  }
3770
3600
  return state.set(key7, value, render, computed);
3601
+ };
3602
+ exports.addStyleValue = addStyleValue;
3603
+ var styleEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addStyleValue));
3604
+ exports.styleEffect = styleEffect;
3605
+ var toPx = px.transform;
3606
+ function addSVGPathValue(element, state, key7, value) {
3607
+ frame.render(() => element.setAttribute('pathLength', '1'));
3608
+ if (key7 === 'pathOffset') {
3609
+ return state.set(key7, value, () => element.setAttribute('stroke-dashoffset', toPx(-state.latest[key7])));
3610
+ }
3611
+ else {
3612
+ if (!state.get('stroke-dasharray')) {
3613
+ state.set('stroke-dasharray', new MotionValue('1 1'), () => {
3614
+ const { pathLength = 1, pathSpacing, } = state.latest;
3615
+ element.setAttribute('stroke-dasharray', `${toPx(pathLength)} ${toPx(pathSpacing ?? 1 - Number(pathLength))}`);
3616
+ });
3617
+ }
3618
+ return state.set(key7, value, void 0, state.get('stroke-dasharray'));
3619
+ }
3620
+ }
3621
+ var addSVGValue = (element, state, key7, value) => {
3622
+ if (key7.startsWith('path')) {
3623
+ return addSVGPathValue(element, state, key7, value);
3624
+ }
3625
+ else if (key7.startsWith('attr')) {
3626
+ return addAttrValue(element, state, convertAttrKey(key7), value);
3627
+ }
3628
+ const handler = key7 in element.style ? addStyleValue : addAttrValue;
3629
+ return handler(element, state, key7, value);
3630
+ };
3631
+ var svgEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addSVGValue));
3632
+ exports.svgEffect = svgEffect;
3633
+ function convertAttrKey(key7) {
3634
+ return key7.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase());
3771
3635
  }
3772
3636
  var { schedule: microtask, cancel: cancelMicrotask, } = /* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
3773
3637
  exports.microtask = microtask;
@@ -3935,7 +3799,7 @@ function press(targetOrSelector, onPressStart, options = {}) {
3935
3799
  targets.forEach((target) => {
3936
3800
  const pointerDownTarget = options.useGlobalTarget ? window : target;
3937
3801
  pointerDownTarget.addEventListener('pointerdown', startPress, eventOptions);
3938
- if (target instanceof HTMLElement) {
3802
+ if (isHTMLElement(target)) {
3939
3803
  target.addEventListener('focus', (event) => enableKeyboardPress(event, eventOptions));
3940
3804
  if (!isElementKeyboardAccessible(target) && !target.hasAttribute('tabindex')) {
3941
3805
  target.tabIndex = 0;
@@ -4070,6 +3934,12 @@ function recordStats() {
4070
3934
  frame.postRender(record, true);
4071
3935
  return reportStats;
4072
3936
  }
3937
+ function isSVGElement(element) {
3938
+ return isObject(element) && 'ownerSVGElement' in element;
3939
+ }
3940
+ function isSVGSVGElement(element) {
3941
+ return isSVGElement(element) && element.tagName === 'svg';
3942
+ }
4073
3943
  function transform(...args) {
4074
3944
  const useImmediate = !Array.isArray(args[0]);
4075
3945
  const argOffset = useImmediate ? 0 : -1;
@@ -4102,6 +3972,56 @@ function mapValue(inputValue, inputRange, outputRange, options) {
4102
3972
  const map2 = transform(inputRange, outputRange, options);
4103
3973
  return transformValue(() => map2(inputValue.get()));
4104
3974
  }
3975
+ var isMotionValue = (value) => Boolean(value && value.getVelocity);
3976
+ function springValue(source, options) {
3977
+ const initialValue = isMotionValue(source) ? source.get() : source;
3978
+ const value = motionValue(initialValue);
3979
+ attachSpring(value, source, options);
3980
+ return value;
3981
+ }
3982
+ function attachSpring(value, source, options) {
3983
+ const initialValue = value.get();
3984
+ let activeAnimation = null;
3985
+ let latestValue = initialValue;
3986
+ let latestSetter;
3987
+ const unit = typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0;
3988
+ const stopAnimation2 = () => {
3989
+ if (activeAnimation) {
3990
+ activeAnimation.stop();
3991
+ activeAnimation = null;
3992
+ }
3993
+ };
3994
+ const startAnimation2 = () => {
3995
+ stopAnimation2();
3996
+ activeAnimation = new JSAnimation({
3997
+ keyframes: [asNumber(value.get()), asNumber(latestValue),],
3998
+ velocity: value.getVelocity(),
3999
+ type: 'spring',
4000
+ restDelta: 1e-3,
4001
+ restSpeed: 0.01,
4002
+ ...options,
4003
+ onUpdate: latestSetter,
4004
+ });
4005
+ };
4006
+ value.attach((v, set) => {
4007
+ latestValue = v;
4008
+ latestSetter = (latest) => set(parseValue(latest, unit));
4009
+ frame.postRender(startAnimation2);
4010
+ return value.get();
4011
+ }, stopAnimation2);
4012
+ let unsubscribe = void 0;
4013
+ if (isMotionValue(source)) {
4014
+ unsubscribe = source.on('change', (v) => value.set(parseValue(v, unit)));
4015
+ value.on('destroy', unsubscribe);
4016
+ }
4017
+ return unsubscribe;
4018
+ }
4019
+ function parseValue(v, unit) {
4020
+ return unit ? v + unit : v;
4021
+ }
4022
+ function asNumber(v) {
4023
+ return typeof v === 'number' ? v : parseFloat(v);
4024
+ }
4105
4025
  var valueTypes = [...dimensionValueTypes, color, complex,];
4106
4026
  var findValueType = (v) => valueTypes.find(testValueType(v));
4107
4027
  exports.findValueType = findValueType;
@@ -4386,6 +4306,255 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
4386
4306
  return acc;
4387
4307
  }, {});
4388
4308
  exports.cancelSync = cancelSync;
4309
+ var MotionConfigContext = (0, react_1.createContext)({
4310
+ transformPagePoint: (p) => p,
4311
+ isStatic: false,
4312
+ reducedMotion: 'never',
4313
+ });
4314
+ exports.MotionConfigContext = MotionConfigContext;
4315
+ function usePresence(subscribe = true) {
4316
+ const context = (0, react_3.useContext)(PresenceContext);
4317
+ if (context === null)
4318
+ return [true, null,];
4319
+ const { isPresent: isPresent2, onExitComplete, register, } = context;
4320
+ const id4 = (0, react_3.useId)();
4321
+ (0, react_2.useEffect)(() => {
4322
+ if (subscribe) {
4323
+ return register(id4);
4324
+ }
4325
+ }, [subscribe,]);
4326
+ const safeToRemove = (0, react_3.useCallback)(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
4327
+ return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
4328
+ }
4329
+ function useIsPresent() {
4330
+ return isPresent((0, react_3.useContext)(PresenceContext));
4331
+ }
4332
+ function isPresent(context) {
4333
+ return context === null ? true : context.isPresent;
4334
+ }
4335
+ function useConstant(init) {
4336
+ const ref = (0, react_4.useRef)(null);
4337
+ if (ref.current === null) {
4338
+ ref.current = init();
4339
+ }
4340
+ return ref.current;
4341
+ }
4342
+ var PopChildMeasure = class extends React2.Component {
4343
+ getSnapshotBeforeUpdate(prevProps) {
4344
+ const element = this.props.childRef.current;
4345
+ if (element && prevProps.isPresent && !this.props.isPresent) {
4346
+ const parent = element.offsetParent;
4347
+ const parentWidth = isHTMLElement(parent) ? parent.offsetWidth || 0 : 0;
4348
+ const size = this.props.sizeRef.current;
4349
+ size.height = element.offsetHeight || 0;
4350
+ size.width = element.offsetWidth || 0;
4351
+ size.top = element.offsetTop;
4352
+ size.left = element.offsetLeft;
4353
+ size.right = parentWidth - size.width - size.left;
4354
+ }
4355
+ return null;
4356
+ }
4357
+ /**
4358
+ * Required with getSnapshotBeforeUpdate to stop React complaining.
4359
+ */
4360
+ componentDidUpdate() { }
4361
+ render() {
4362
+ return this.props.children;
4363
+ }
4364
+ };
4365
+ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4366
+ const id4 = (0, react_3.useId)();
4367
+ const ref = (0, react_4.useRef)(null);
4368
+ const size = (0, react_4.useRef)({
4369
+ width: 0,
4370
+ height: 0,
4371
+ top: 0,
4372
+ left: 0,
4373
+ right: 0,
4374
+ });
4375
+ const { nonce, } = (0, react_3.useContext)(MotionConfigContext);
4376
+ (0, react_5.useInsertionEffect)(() => {
4377
+ const { width, height, top, left, right, } = size.current;
4378
+ if (isPresent2 || !ref.current || !width || !height)
4379
+ return;
4380
+ const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
4381
+ ref.current.dataset.motionPopId = id4;
4382
+ const style2 = document.createElement('style');
4383
+ if (nonce)
4384
+ style2.nonce = nonce;
4385
+ document.head.appendChild(style2);
4386
+ if (style2.sheet) {
4387
+ style2.sheet.insertRule(`
4388
+ [data-motion-pop-id="${id4}"] {
4389
+ position: absolute !important;
4390
+ width: ${width}px !important;
4391
+ height: ${height}px !important;
4392
+ ${x}px !important;
4393
+ top: ${top}px !important;
4394
+ }
4395
+ `);
4396
+ }
4397
+ return () => {
4398
+ if (document.head.contains(style2)) {
4399
+ document.head.removeChild(style2);
4400
+ }
4401
+ };
4402
+ }, [isPresent2,]);
4403
+ return (0, jsx_runtime_1.jsx)(PopChildMeasure, {
4404
+ isPresent: isPresent2,
4405
+ childRef: ref,
4406
+ sizeRef: size,
4407
+ children: React2.cloneElement(children, {
4408
+ ref,
4409
+ }),
4410
+ });
4411
+ }
4412
+ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
4413
+ const presenceChildren = useConstant(newChildrenMap);
4414
+ const id4 = (0, react_3.useId)();
4415
+ let isReusedContext = true;
4416
+ let context = (0, react_4.useMemo)(() => {
4417
+ isReusedContext = false;
4418
+ return {
4419
+ id: id4,
4420
+ initial,
4421
+ isPresent: isPresent2,
4422
+ custom,
4423
+ onExitComplete: (childId) => {
4424
+ presenceChildren.set(childId, true);
4425
+ for (const isComplete of presenceChildren.values()) {
4426
+ if (!isComplete)
4427
+ return;
4428
+ }
4429
+ onExitComplete && onExitComplete();
4430
+ },
4431
+ register: (childId) => {
4432
+ presenceChildren.set(childId, false);
4433
+ return () => presenceChildren.delete(childId);
4434
+ },
4435
+ };
4436
+ }, [isPresent2, presenceChildren, onExitComplete,]);
4437
+ if (presenceAffectsLayout && isReusedContext) {
4438
+ context = {
4439
+ ...context,
4440
+ };
4441
+ }
4442
+ (0, react_4.useMemo)(() => {
4443
+ presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
4444
+ }, [isPresent2,]);
4445
+ React2.useEffect(() => {
4446
+ !isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
4447
+ }, [isPresent2,]);
4448
+ if (mode === 'popLayout') {
4449
+ children = (0, jsx_runtime_1.jsx)(PopChild, {
4450
+ isPresent: isPresent2,
4451
+ anchorX,
4452
+ children,
4453
+ });
4454
+ }
4455
+ return (0, jsx_runtime_1.jsx)(PresenceContext.Provider, {
4456
+ value: context,
4457
+ children,
4458
+ });
4459
+ };
4460
+ function newChildrenMap() {
4461
+ return /* @__PURE__ */ new Map();
4462
+ }
4463
+ var getChildKey = (child) => child.key || '';
4464
+ function onlyElements(children) {
4465
+ const filtered = [];
4466
+ react_6.Children.forEach(children, (child) => {
4467
+ if ((0, react_6.isValidElement)(child))
4468
+ filtered.push(child);
4469
+ });
4470
+ return filtered;
4471
+ }
4472
+ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
4473
+ const [isParentPresent, safeToRemove,] = usePresence(propagate);
4474
+ const presentChildren = (0, react_4.useMemo)(() => onlyElements(children), [children,]);
4475
+ const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
4476
+ const isInitialRender = (0, react_4.useRef)(true);
4477
+ const pendingPresentChildren = (0, react_4.useRef)(presentChildren);
4478
+ const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
4479
+ const [diffedChildren, setDiffedChildren,] = (0, react_4.useState)(presentChildren);
4480
+ const [renderedChildren, setRenderedChildren,] = (0, react_4.useState)(presentChildren);
4481
+ useIsomorphicLayoutEffect(() => {
4482
+ isInitialRender.current = false;
4483
+ pendingPresentChildren.current = presentChildren;
4484
+ for (let i = 0; i < renderedChildren.length; i++) {
4485
+ const key7 = getChildKey(renderedChildren[i]);
4486
+ if (!presentKeys.includes(key7)) {
4487
+ if (exitComplete.get(key7) !== true) {
4488
+ exitComplete.set(key7, false);
4489
+ }
4490
+ }
4491
+ else {
4492
+ exitComplete.delete(key7);
4493
+ }
4494
+ }
4495
+ }, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
4496
+ const exitingChildren = [];
4497
+ if (presentChildren !== diffedChildren) {
4498
+ let nextChildren = [...presentChildren,];
4499
+ for (let i = 0; i < renderedChildren.length; i++) {
4500
+ const child = renderedChildren[i];
4501
+ const key7 = getChildKey(child);
4502
+ if (!presentKeys.includes(key7)) {
4503
+ nextChildren.splice(i, 0, child);
4504
+ exitingChildren.push(child);
4505
+ }
4506
+ }
4507
+ if (mode === 'wait' && exitingChildren.length) {
4508
+ nextChildren = exitingChildren;
4509
+ }
4510
+ setRenderedChildren(onlyElements(nextChildren));
4511
+ setDiffedChildren(presentChildren);
4512
+ return null;
4513
+ }
4514
+ if (false) {
4515
+ console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
4516
+ }
4517
+ const { forceRender, } = (0, react_3.useContext)(LayoutGroupContext);
4518
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {
4519
+ children: renderedChildren.map((child) => {
4520
+ const key7 = getChildKey(child);
4521
+ const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
4522
+ const onExit = () => {
4523
+ if (exitComplete.has(key7)) {
4524
+ exitComplete.set(key7, true);
4525
+ }
4526
+ else {
4527
+ return;
4528
+ }
4529
+ let isEveryExitComplete = true;
4530
+ exitComplete.forEach((isExitComplete) => {
4531
+ if (!isExitComplete)
4532
+ isEveryExitComplete = false;
4533
+ });
4534
+ if (isEveryExitComplete) {
4535
+ forceRender == null ? void 0 : forceRender();
4536
+ setRenderedChildren(pendingPresentChildren.current);
4537
+ propagate && (safeToRemove == null ? void 0 : safeToRemove());
4538
+ onExitComplete && onExitComplete();
4539
+ }
4540
+ };
4541
+ return (0, jsx_runtime_1.jsx)(PresenceChild, {
4542
+ isPresent: isPresent2,
4543
+ initial: !isInitialRender.current || initial ? void 0 : false,
4544
+ custom,
4545
+ presenceAffectsLayout,
4546
+ mode,
4547
+ onExitComplete: isPresent2 ? void 0 : onExit,
4548
+ anchorX,
4549
+ children: child,
4550
+ }, key7);
4551
+ }),
4552
+ });
4553
+ };
4554
+ exports.AnimatePresence = AnimatePresence;
4555
+ var DeprecatedLayoutGroupContext = (0, react_1.createContext)(null);
4556
+ exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
4557
+ exports.LayoutGroupContext = DeprecatedLayoutGroupContext;
4389
4558
  function useIsMounted() {
4390
4559
  const isMounted = (0, react_4.useRef)(false);
4391
4560
  useIsomorphicLayoutEffect(() => {
@@ -4584,9 +4753,9 @@ function MotionConfig({ children, isValidProp, ...config }) {
4584
4753
  }
4585
4754
  var MotionContext = /* @__PURE__ */ (0, react_1.createContext)({});
4586
4755
  exports.MotionContext = MotionContext;
4587
- var camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2').toLowerCase();
4756
+ var camelToDash2 = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2').toLowerCase();
4588
4757
  var optimizedAppearDataId = 'framerAppearId';
4589
- var optimizedAppearDataAttribute = 'data-' + camelToDash(optimizedAppearDataId);
4758
+ var optimizedAppearDataAttribute = 'data-' + camelToDash2(optimizedAppearDataId);
4590
4759
  exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute;
4591
4760
  var SwitchLayoutGroupContext = (0, react_1.createContext)({});
4592
4761
  exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
@@ -4812,7 +4981,6 @@ function addScaleCorrector(correctors) {
4812
4981
  }
4813
4982
  }
4814
4983
  }
4815
- var isMotionValue = (value) => Boolean(value && value.getVelocity);
4816
4984
  var translateAlias2 = {
4817
4985
  x: 'translateX',
4818
4986
  y: 'translateY',
@@ -5047,59 +5215,6 @@ function useHTMLProps(props, visualState) {
5047
5215
  htmlProps.style = style2;
5048
5216
  return htmlProps;
5049
5217
  }
5050
- var lowercaseSVGElements = [
5051
- 'animate',
5052
- 'circle',
5053
- 'defs',
5054
- 'desc',
5055
- 'ellipse',
5056
- 'g',
5057
- 'image',
5058
- 'line',
5059
- 'filter',
5060
- 'marker',
5061
- 'mask',
5062
- 'metadata',
5063
- 'path',
5064
- 'pattern',
5065
- 'polygon',
5066
- 'polyline',
5067
- 'rect',
5068
- 'stop',
5069
- 'switch',
5070
- 'symbol',
5071
- 'svg',
5072
- 'text',
5073
- 'tspan',
5074
- 'use',
5075
- 'view',
5076
- ];
5077
- function isSVGComponent(Component33) {
5078
- if (
5079
- /**
5080
- * If it's not a string, it's a custom React component. Currently we only support
5081
- * HTML custom React components.
5082
- */
5083
- typeof Component33 !== 'string' ||
5084
- /**
5085
- * If it contains a dash, the element is a custom HTML webcomponent.
5086
- */
5087
- Component33.includes('-')) {
5088
- return false;
5089
- }
5090
- else if (
5091
- /**
5092
- * If it's in our list of lowercase SVG tags, it's an SVG component
5093
- */
5094
- lowercaseSVGElements.indexOf(Component33) > -1 ||
5095
- /**
5096
- * If it contains a capital letter, it's an SVG component
5097
- */
5098
- /[A-Z]/u.test(Component33)) {
5099
- return true;
5100
- }
5101
- return false;
5102
- }
5103
5218
  var dashKeys = {
5104
5219
  offset: 'stroke-dashoffset',
5105
5220
  array: 'stroke-dasharray',
@@ -5177,6 +5292,59 @@ function useSVGProps(props, visualState, _isStatic, Component33) {
5177
5292
  }
5178
5293
  return visualProps;
5179
5294
  }
5295
+ var lowercaseSVGElements = [
5296
+ 'animate',
5297
+ 'circle',
5298
+ 'defs',
5299
+ 'desc',
5300
+ 'ellipse',
5301
+ 'g',
5302
+ 'image',
5303
+ 'line',
5304
+ 'filter',
5305
+ 'marker',
5306
+ 'mask',
5307
+ 'metadata',
5308
+ 'path',
5309
+ 'pattern',
5310
+ 'polygon',
5311
+ 'polyline',
5312
+ 'rect',
5313
+ 'stop',
5314
+ 'switch',
5315
+ 'symbol',
5316
+ 'svg',
5317
+ 'text',
5318
+ 'tspan',
5319
+ 'use',
5320
+ 'view',
5321
+ ];
5322
+ function isSVGComponent(Component33) {
5323
+ if (
5324
+ /**
5325
+ * If it's not a string, it's a custom React component. Currently we only support
5326
+ * HTML custom React components.
5327
+ */
5328
+ typeof Component33 !== 'string' ||
5329
+ /**
5330
+ * If it contains a dash, the element is a custom HTML webcomponent.
5331
+ */
5332
+ Component33.includes('-')) {
5333
+ return false;
5334
+ }
5335
+ else if (
5336
+ /**
5337
+ * If it's in our list of lowercase SVG tags, it's an SVG component
5338
+ */
5339
+ lowercaseSVGElements.indexOf(Component33) > -1 ||
5340
+ /**
5341
+ * If it contains a capital letter, it's an SVG component
5342
+ */
5343
+ /[A-Z]/u.test(Component33)) {
5344
+ return true;
5345
+ }
5346
+ return false;
5347
+ }
5180
5348
  function createUseRender(forwardMotionProps = false) {
5181
5349
  const useRender = (Component33, props, ref, { latestValues, }, isStatic) => {
5182
5350
  const useVisualProps = isSVGComponent(Component33) ? useSVGProps : useHTMLProps;
@@ -7348,12 +7516,9 @@ function animateSingleValue(value, keyframes2, options) {
7348
7516
  motionValue$1.start(animateMotionValue('', motionValue$1, keyframes2, options));
7349
7517
  return motionValue$1.animation;
7350
7518
  }
7351
- function isSVGElement(element) {
7352
- return element instanceof SVGElement && element.tagName !== 'svg';
7353
- }
7354
7519
  var borders = ['TopLeft', 'TopRight', 'BottomLeft', 'BottomRight',];
7355
7520
  var numBorders = borders.length;
7356
- var asNumber = (value) => typeof value === 'string' ? parseFloat(value) : value;
7521
+ var asNumber2 = (value) => typeof value === 'string' ? parseFloat(value) : value;
7357
7522
  var isPx = (value) => typeof value === 'number' || px.test(value);
7358
7523
  function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
7359
7524
  if (shouldCrossfadeOpacity) {
@@ -7373,7 +7538,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
7373
7538
  leadRadius || (leadRadius = 0);
7374
7539
  const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
7375
7540
  if (canMix) {
7376
- target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress2), 0);
7541
+ target[borderLabel] = Math.max(mixNumber(asNumber2(followRadius), asNumber2(leadRadius), progress2), 0);
7377
7542
  if (percent.test(leadRadius) || percent.test(followRadius)) {
7378
7543
  target[borderLabel] += '%';
7379
7544
  }
@@ -7714,7 +7879,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7714
7879
  mount(instance) {
7715
7880
  if (this.instance)
7716
7881
  return;
7717
- this.isSVG = isSVGElement(instance);
7882
+ this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);
7718
7883
  this.instance = instance;
7719
7884
  const { layoutId, layout: layout2, visualElement, } = this.options;
7720
7885
  if (visualElement && !visualElement.current) {
@@ -7758,7 +7923,6 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7758
7923
  this.resumingFrom = this.resumeFrom;
7759
7924
  this.resumingFrom.resumingFrom = void 0;
7760
7925
  }
7761
- this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
7762
7926
  const animationOptions = {
7763
7927
  ...getValueTransition(layoutTransition, 'layout'),
7764
7928
  onPlay: onLayoutAnimationStart,
@@ -7769,6 +7933,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7769
7933
  animationOptions.type = false;
7770
7934
  }
7771
7935
  this.startAnimation(animationOptions);
7936
+ this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
7772
7937
  }
7773
7938
  else {
7774
7939
  if (!hasLayoutChanged) {
@@ -8294,8 +8459,8 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
8294
8459
  startAnimation(options) {
8295
8460
  var _a, _b, _c;
8296
8461
  this.notifyListeners('animationStart');
8297
- (_a = this.currentAnimation) == null ? void 0 : _a.stop(false);
8298
- (_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop(false);
8462
+ (_a = this.currentAnimation) == null ? void 0 : _a.stop();
8463
+ (_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop();
8299
8464
  if (this.pendingAnimation) {
8300
8465
  cancelFrame(this.pendingAnimation);
8301
8466
  this.pendingAnimation = void 0;
@@ -8339,7 +8504,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
8339
8504
  finishAnimation() {
8340
8505
  if (this.currentAnimation) {
8341
8506
  this.mixTargetDelta && this.mixTargetDelta(animationTarget);
8342
- this.currentAnimation.stop(false);
8507
+ this.currentAnimation.stop();
8343
8508
  }
8344
8509
  this.completeAnimation();
8345
8510
  }
@@ -8529,7 +8694,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
8529
8694
  resetTree() {
8530
8695
  this.root.nodes.forEach((node) => {
8531
8696
  var _a;
8532
- return (_a = node.currentAnimation) == null ? void 0 : _a.stop(false);
8697
+ return (_a = node.currentAnimation) == null ? void 0 : _a.stop();
8533
8698
  });
8534
8699
  this.root.nodes.forEach(clearMeasurements);
8535
8700
  this.root.sharedNodes.clear();
@@ -9027,7 +9192,7 @@ var camelCaseAttributes = /* @__PURE__ */ new Set([
9027
9192
  function renderSVG(element, renderState, _styleProp, projection) {
9028
9193
  renderHTML(element, renderState, void 0, projection);
9029
9194
  for (const key7 in renderState.attrs) {
9030
- element.setAttribute(!camelCaseAttributes.has(key7) ? camelToDash(key7) : key7, renderState.attrs[key7]);
9195
+ element.setAttribute(!camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7, renderState.attrs[key7]);
9031
9196
  }
9032
9197
  }
9033
9198
  var SVGVisualElement = class extends DOMVisualElement {
@@ -9045,7 +9210,7 @@ var SVGVisualElement = class extends DOMVisualElement {
9045
9210
  const defaultType = getDefaultValueType(key7);
9046
9211
  return defaultType ? defaultType.default || 0 : 0;
9047
9212
  }
9048
- key7 = !camelCaseAttributes.has(key7) ? camelToDash(key7) : key7;
9213
+ key7 = !camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7;
9049
9214
  return instance.getAttribute(key7);
9050
9215
  }
9051
9216
  scrapeMotionValuesFromProps(props, prevProps, visualElement) {
@@ -9108,7 +9273,7 @@ function getElementSize(target, borderBoxSize) {
9108
9273
  height: blockSize,
9109
9274
  };
9110
9275
  }
9111
- else if (target instanceof SVGElement && 'getBBox' in target) {
9276
+ else if (isSVGElement(target) && 'getBBox' in target) {
9112
9277
  return target.getBBox();
9113
9278
  }
9114
9279
  else {
@@ -9244,7 +9409,7 @@ function calcInset(element, container) {
9244
9409
  };
9245
9410
  let current2 = element;
9246
9411
  while (current2 && current2 !== container) {
9247
- if (current2 instanceof HTMLElement) {
9412
+ if (isHTMLElement(current2)) {
9248
9413
  inset2.x += current2.offsetLeft;
9249
9414
  inset2.y += current2.offsetTop;
9250
9415
  current2 = current2.offsetParent;
@@ -9402,8 +9567,8 @@ function measure(container, target = container, info) {
9402
9567
  }
9403
9568
  function createOnScrollHandler(element, onScroll, info, options = {}) {
9404
9569
  return {
9405
- measure: () => measure(element, options.target, info),
9406
- update: (time2) => {
9570
+ measure: (time2) => {
9571
+ measure(element, options.target, info);
9407
9572
  updateScrollInfo(element, info, time2);
9408
9573
  if (options.offset || options.target) {
9409
9574
  resolveOffsets(element, info, options);
@@ -9429,23 +9594,17 @@ function scrollInfo(onScroll, { container = document.scrollingElement, ...option
9429
9594
  containerHandlers.add(containerHandler);
9430
9595
  if (!scrollListeners.has(container)) {
9431
9596
  const measureAll = () => {
9432
- for (const handler of containerHandlers)
9433
- handler.measure();
9434
- };
9435
- const updateAll = () => {
9436
9597
  for (const handler of containerHandlers) {
9437
- handler.update(frameData.timestamp);
9598
+ handler.measure(frameData.timestamp);
9438
9599
  }
9600
+ frame.preUpdate(notifyAll2);
9439
9601
  };
9440
9602
  const notifyAll2 = () => {
9441
- for (const handler of containerHandlers)
9603
+ for (const handler of containerHandlers) {
9442
9604
  handler.notify();
9605
+ }
9443
9606
  };
9444
- const listener2 = () => {
9445
- frame.read(measureAll);
9446
- frame.read(updateAll);
9447
- frame.preUpdate(notifyAll2);
9448
- };
9607
+ const listener2 = () => frame.read(measureAll);
9449
9608
  scrollListeners.set(container, listener2);
9450
9609
  const target = getEventTarget(container);
9451
9610
  window.addEventListener('resize', listener2, {
@@ -9631,74 +9790,6 @@ function useMotionTemplate(fragments, ...values) {
9631
9790
  }
9632
9791
  return useCombineMotionValues(values.filter(isMotionValue), buildValue);
9633
9792
  }
9634
- function useSpring(source, config = {}) {
9635
- const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
9636
- const activeSpringAnimation = (0, react_4.useRef)(null);
9637
- const initialValue = useConstant(() => isMotionValue(source) ? source.get() : source);
9638
- const unit = useConstant(() => typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0);
9639
- const value = useMotionValue(initialValue);
9640
- const latestValue = (0, react_4.useRef)(initialValue);
9641
- const latestSetter = (0, react_4.useRef)(noop);
9642
- const startAnimation2 = () => {
9643
- stopAnimation2();
9644
- activeSpringAnimation.current = new JSAnimation({
9645
- keyframes: [asNumber2(value.get()), asNumber2(latestValue.current),],
9646
- velocity: value.getVelocity(),
9647
- type: 'spring',
9648
- restDelta: 1e-3,
9649
- restSpeed: 0.01,
9650
- ...config,
9651
- onUpdate: latestSetter.current,
9652
- });
9653
- };
9654
- const stopAnimation2 = () => {
9655
- if (activeSpringAnimation.current) {
9656
- activeSpringAnimation.current.stop();
9657
- }
9658
- };
9659
- (0, react_5.useInsertionEffect)(() => {
9660
- return value.attach((v, set) => {
9661
- if (isStatic)
9662
- return set(v);
9663
- latestValue.current = v;
9664
- latestSetter.current = (latest) => set(parseValue(latest, unit));
9665
- frame.postRender(startAnimation2);
9666
- return value.get();
9667
- }, stopAnimation2);
9668
- }, [JSON.stringify(config),]);
9669
- useIsomorphicLayoutEffect(() => {
9670
- if (isMotionValue(source)) {
9671
- return source.on('change', (v) => value.set(parseValue(v, unit)));
9672
- }
9673
- }, [value, unit,]);
9674
- return value;
9675
- }
9676
- function parseValue(v, unit) {
9677
- return unit ? v + unit : v;
9678
- }
9679
- function asNumber2(v) {
9680
- return typeof v === 'number' ? v : parseFloat(v);
9681
- }
9682
- function useAnimationFrame(callback) {
9683
- const initialTimestamp = (0, react_4.useRef)(0);
9684
- const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
9685
- (0, react_2.useEffect)(() => {
9686
- if (isStatic)
9687
- return;
9688
- const provideTimeSinceStart = ({ timestamp, delta, }) => {
9689
- if (!initialTimestamp.current)
9690
- initialTimestamp.current = timestamp;
9691
- callback(timestamp - initialTimestamp.current, delta);
9692
- };
9693
- frame.update(provideTimeSinceStart, true);
9694
- return () => cancelFrame(provideTimeSinceStart);
9695
- }, [callback,]);
9696
- }
9697
- function useTime() {
9698
- const time2 = useMotionValue(0);
9699
- useAnimationFrame((t) => time2.set(t));
9700
- return time2;
9701
- }
9702
9793
  function useComputed(compute) {
9703
9794
  collectMotionValues.current = [];
9704
9795
  compute();
@@ -9726,6 +9817,38 @@ function useListTransform(values, transformer) {
9726
9817
  return transformer(latest);
9727
9818
  });
9728
9819
  }
9820
+ function useSpring(source, options = {}) {
9821
+ const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
9822
+ const getFromSource = () => isMotionValue(source) ? source.get() : source;
9823
+ if (isStatic) {
9824
+ return useTransform(getFromSource);
9825
+ }
9826
+ const value = useMotionValue(getFromSource());
9827
+ (0, react_5.useInsertionEffect)(() => {
9828
+ return attachSpring(value, source, options);
9829
+ }, [value, JSON.stringify(options),]);
9830
+ return value;
9831
+ }
9832
+ function useAnimationFrame(callback) {
9833
+ const initialTimestamp = (0, react_4.useRef)(0);
9834
+ const { isStatic, } = (0, react_3.useContext)(MotionConfigContext);
9835
+ (0, react_2.useEffect)(() => {
9836
+ if (isStatic)
9837
+ return;
9838
+ const provideTimeSinceStart = ({ timestamp, delta, }) => {
9839
+ if (!initialTimestamp.current)
9840
+ initialTimestamp.current = timestamp;
9841
+ callback(timestamp - initialTimestamp.current, delta);
9842
+ };
9843
+ frame.update(provideTimeSinceStart, true);
9844
+ return () => cancelFrame(provideTimeSinceStart);
9845
+ }, [callback,]);
9846
+ }
9847
+ function useTime() {
9848
+ const time2 = useMotionValue(0);
9849
+ useAnimationFrame((t) => time2.set(t));
9850
+ return time2;
9851
+ }
9729
9852
  function useVelocity(value) {
9730
9853
  const velocity = useMotionValue(value.getVelocity());
9731
9854
  const updateVelocity = () => {
@@ -10128,7 +10251,7 @@ function createDOMVisualElement(element) {
10128
10251
  latestValues: {},
10129
10252
  },
10130
10253
  };
10131
- const node = isSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
10254
+ const node = isSVGElement(element) && !isSVGSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
10132
10255
  node.mount(element);
10133
10256
  visualElementStore.set(element, node);
10134
10257
  }
@@ -10836,7 +10959,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
10836
10959
  return startDelay + delay2;
10837
10960
  };
10838
10961
  }
10839
- // /:https://app.framerstatic.com/framer.7ISJZ3TZ.mjs
10962
+ // /:https://app.framerstatic.com/framer.C2MZBAEL.mjs
10840
10963
  const react_10 = require("react");
10841
10964
  const react_11 = __importDefault(require("react"));
10842
10965
  const react_12 = require("react");
@@ -10845,6 +10968,7 @@ const react_14 = require("react");
10845
10968
  const react_dom_1 = __importDefault(require("react-dom"));
10846
10969
  const react_15 = require("react");
10847
10970
  const react_16 = require("react");
10971
+ const react_17 = require("react");
10848
10972
  var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
10849
10973
  var require_hsluv = (0, chunk_A2PMVMFI_js_1.__commonJS)({
10850
10974
  '../../../node_modules/hsluv/dist/hsluv.cjs'(exports) {
@@ -12041,10 +12165,10 @@ function useCurrentRouteId() {
12041
12165
  }
12042
12166
  function useOnRouteChange(cb) {
12043
12167
  const currentRoute = useCurrentRoute();
12044
- const [lastRoute, setLastRoute,] = react_11.default.useState(currentRoute);
12045
- if (isEqual(lastRoute, currentRoute) || !currentRoute)
12168
+ const lastRoute = react_11.default.useRef(currentRoute);
12169
+ if (isEqual(lastRoute.current, currentRoute) || !currentRoute)
12046
12170
  return;
12047
- setLastRoute(currentRoute);
12171
+ lastRoute.current = currentRoute;
12048
12172
  cb(currentRoute);
12049
12173
  }
12050
12174
  function useRoute(routeId) {
@@ -12117,7 +12241,7 @@ function isNumber2(value) {
12117
12241
  function isArray(value) {
12118
12242
  return Array.isArray(value);
12119
12243
  }
12120
- function isObject(value) {
12244
+ function isObject2(value) {
12121
12245
  return value !== null && typeof value === 'object' && !isArray(value);
12122
12246
  }
12123
12247
  function isUndefined(value) {
@@ -12133,7 +12257,7 @@ function isValidDate(value) {
12133
12257
  return value instanceof Date && !Number.isNaN(value.getTime());
12134
12258
  }
12135
12259
  function isGenerator2(value) {
12136
- return isObject(value) && isFunction(value.return);
12260
+ return isObject2(value) && isFunction(value.return);
12137
12261
  }
12138
12262
  var noop2 = () => { };
12139
12263
  var isWindow = typeof window !== 'undefined';
@@ -12239,7 +12363,9 @@ function interactionResponse(options) {
12239
12363
  setTimeout(resolve, 100);
12240
12364
  frame.read(() => {
12241
12365
  void schedulerYield(options).then(resolve);
12242
- });
12366
+ }, false,
12367
+ // In some cases, interactionResponse might be called in a rAF. This means, we should right away call `schedulerYield`, as the next paint follows immediately.
12368
+ true);
12243
12369
  });
12244
12370
  }
12245
12371
  function schedulerYield(options) {
@@ -13144,7 +13270,7 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
13144
13270
  }
13145
13271
  function isHistoryState(data2) {
13146
13272
  const routeIdKey = 'routeId';
13147
- return isObject(data2) && isString(data2[routeIdKey]);
13273
+ return isObject2(data2) && isString(data2[routeIdKey]);
13148
13274
  }
13149
13275
  function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {
13150
13276
  performance.mark('framer-history-replace');
@@ -13224,7 +13350,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
13224
13350
  if (((_a = window.navigation) == null ? void 0 : _a.transition) &&
13225
13351
  ((_c = (_b = window.navigation) == null ? void 0 : _b.transition) == null ? void 0 : _c.navigationType) !== 'traverse')
13226
13352
  return;
13227
- if (!isObject(state))
13353
+ if (!isObject2(state))
13228
13354
  return;
13229
13355
  const { routeId, hash: hash2, pathVariables, localeId, } = state;
13230
13356
  if (!isString(routeId))
@@ -13235,7 +13361,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
13235
13361
  const stopMonitoringINPRelatedInputs = monitorINPRelatedInputs();
13236
13362
  void nextRender.promise.finally(stopMonitoringINPRelatedInputs);
13237
13363
  const changeRoute = () => {
13238
- setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0, true, nextRender, false);
13364
+ setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject2(pathVariables) ? pathVariables : void 0, true, nextRender, false);
13239
13365
  };
13240
13366
  const viewTransition = await startViewTransition2(currentRouteId.current, routeId, changeRoute);
13241
13367
  const navigationTransition = (_d = window.navigation) == null ? void 0 : _d.transition;
@@ -13282,7 +13408,7 @@ function getHashForRoute(hash2, route, hashVariables) {
13282
13408
  if (!resolvedHash)
13283
13409
  return void 0;
13284
13410
  const variables = Object.assign({}, route == null ? void 0 : route.elements, hashVariables);
13285
- return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => String(variables[p1] ?? m2));
13411
+ return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => variables[p1] ?? m2);
13286
13412
  }
13287
13413
  function getPathForRoute(route, { currentRoutePath, currentPathVariables, hash: hash2, pathVariables, hashVariables, relative: relative2 = true, preserveQueryParams, onlyHash = false, siteCanonicalURL, }) {
13288
13414
  const resolvedHash = getHashForRoute(hash2, route, hashVariables);
@@ -14684,7 +14810,7 @@ var Interpolation = {
14684
14810
  var NumberInterpolation = {
14685
14811
  interpolate(from, to) {
14686
14812
  [from, to,] = Interpolation.handleUndefined(from, to);
14687
- const a1 = +from;
14813
+ const a1 = from;
14688
14814
  const b1 = to - a1;
14689
14815
  return (progress2) => {
14690
14816
  const value = a1 + b1 * progress2;
@@ -15363,7 +15489,7 @@ function rgbToHsv(r, g, b) {
15363
15489
  const max = Math.max(r, g, b);
15364
15490
  const min = Math.min(r, g, b);
15365
15491
  const d = max - min;
15366
- let h;
15492
+ let h = 0;
15367
15493
  const s = max === 0 ? 0 : d / max;
15368
15494
  const v = max;
15369
15495
  if (max === min) {
@@ -15926,7 +16052,7 @@ var Color = /* @__PURE__ */ (() => {
15926
16052
  return false;
15927
16053
  };
15928
16054
  Color2.isColorObject = (color2) => {
15929
- return isObject(color2) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
16055
+ return isObject2(color2) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
15930
16056
  typeof color2.h === 'number' && typeof color2.s === 'number' && typeof color2.l === 'number' && typeof color2.a === 'number' &&
15931
16057
  typeof color2.roundA === 'number' && typeof color2.format === 'string';
15932
16058
  };
@@ -20437,7 +20563,7 @@ function injectComponentCSSRules() {
20437
20563
  }
20438
20564
  }
20439
20565
  function isReactComponent(component) {
20440
- return isObject(component) || isFunction(component);
20566
+ return isObject2(component) || isFunction(component);
20441
20567
  }
20442
20568
  var optionalKey = 'optional';
20443
20569
  function controlIsOptional(control) {
@@ -20468,14 +20594,14 @@ function getControlDefaultValue(control) {
20468
20594
  case 'number':
20469
20595
  return isNumber2(control.defaultValue) ? control.defaultValue : void 0;
20470
20596
  case 'transition':
20471
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20597
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20472
20598
  case 'border':
20473
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20599
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20474
20600
  case 'font':
20475
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20601
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20476
20602
  case 'object': {
20477
- const value = isObject(control.defaultValue) ? control.defaultValue : {};
20478
- if (isObject(control.controls)) {
20603
+ const value = isObject2(control.defaultValue) ? control.defaultValue : {};
20604
+ if (isObject2(control.controls)) {
20479
20605
  applyControlDefaultsToDefaultProps(value, control.controls);
20480
20606
  }
20481
20607
  return value;
@@ -20524,7 +20650,7 @@ function applyControlDefaultsToDefaultProps(defaultProps, controls) {
20524
20650
  }
20525
20651
  }
20526
20652
  function getDefaultProps(component) {
20527
- if (isObject(component.defaultProps)) {
20653
+ if (isObject2(component.defaultProps)) {
20528
20654
  return component.defaultProps;
20529
20655
  }
20530
20656
  const defaultProps = {};
@@ -22834,7 +22960,7 @@ function unwrapInlinedDisplayContents(element) {
22834
22960
  function useMeasureLayout(props, ref, getChildren = () => [], options = {}) {
22835
22961
  const { id: id3, visible, _needsMeasure, } = props;
22836
22962
  const { skipHook = false, } = options;
22837
- const inCodeComponent = Boolean((0, react_3.useContext)(ComponentContainerContext));
22963
+ const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
22838
22964
  const onCanvas = RenderTarget.current() === RenderTarget.canvas;
22839
22965
  useIsomorphicLayoutEffect2(() => {
22840
22966
  if (!onCanvas || inCodeComponent || skipHook) {
@@ -23136,7 +23262,7 @@ var LinearGradient = {
23136
23262
  * @param value -
23137
23263
  */
23138
23264
  isLinearGradient: (value) => {
23139
- return isObject(value) && linearGradientKeys.every((key7) => key7 in value) &&
23265
+ return isObject2(value) && linearGradientKeys.every((key7) => key7 in value) &&
23140
23266
  (isSimpleGradient(value) || isMultiStopGradient(value));
23141
23267
  },
23142
23268
  /** @internal */
@@ -23159,7 +23285,7 @@ var RadialGradient = {
23159
23285
  * @public
23160
23286
  */
23161
23287
  isRadialGradient: (value) => {
23162
- return isObject(value) && radialGradientKeys.every((key7) => key7 in value) &&
23288
+ return isObject2(value) && radialGradientKeys.every((key7) => key7 in value) &&
23163
23289
  (isSimpleGradient(value) || isMultiStopGradient(value));
23164
23290
  },
23165
23291
  /** @internal */
@@ -23389,7 +23515,7 @@ function useStyleAndRect(props) {
23389
23515
  react_11.default.useInsertionEffect(() => {
23390
23516
  injectComponentCSSRules();
23391
23517
  }, []);
23392
- const inCodeComponent = Boolean((0, react_3.useContext)(ComponentContainerContext));
23518
+ const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
23393
23519
  const { style: style2, _initialStyle, __fromCanvasComponent, size, } = props;
23394
23520
  const unwrappedProps = unwrapFrameProps(props);
23395
23521
  const constraintsRect = useConstraints(unwrappedProps);
@@ -23553,7 +23679,7 @@ var VisibleFrame = /* @__PURE__ */ (0, react_7.forwardRef)(function VisibleFrame
23553
23679
  }
23554
23680
  useMeasureLayout(props, ref);
23555
23681
  const backgroundImage = backgroundImageFromProps(props);
23556
- const inCodeComponent = Boolean((0, react_3.useContext)(ComponentContainerContext));
23682
+ const inCodeComponent = (0, react_3.useContext)(ComponentContainerContext);
23557
23683
  const parentSize = resolveParentSize(propsWithOverrides, unwrappedProps, rect, inCodeComponent);
23558
23684
  const wrappedContent = useProvideParentSize(
23559
23685
  /* @__PURE__ */ (0, jsx_runtime_2.jsxs)(jsx_runtime_1.Fragment, {
@@ -23750,7 +23876,7 @@ var SharedLayoutRoot = class extends react_9.Component {
23750
23876
  var _a;
23751
23877
  if (!this.scheduledPromotion || !this.lead || !this.follow)
23752
23878
  return null;
23753
- const needsReset = !!((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
23879
+ const needsReset = ((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
23754
23880
  this.lead.projectionNodes.forEach((projectionNode) => {
23755
23881
  var _a2;
23756
23882
  projectionNode == null ? void 0 : projectionNode.promote({
@@ -23825,7 +23951,7 @@ function setRef(ref, value) {
23825
23951
  }
23826
23952
  }
23827
23953
  function isMutableRef(ref) {
23828
- return isObject(ref) && 'current' in ref;
23954
+ return isObject2(ref) && 'current' in ref;
23829
23955
  }
23830
23956
  function refHasValue(ref) {
23831
23957
  return isMutableRef(ref) && ref.current !== null;
@@ -23946,6 +24072,21 @@ var SharedIntersectionObserver = class {
23946
24072
  }
23947
24073
  };
23948
24074
  var SharedIntersectionObserverContext = /* @__PURE__ */ (0, react_1.createContext)(/* @__PURE__ */ new Map());
24075
+ function observeElement(observers2, key7, element, root, callback, rootMargin, threshold) {
24076
+ let observer2 = observers2.get(key7);
24077
+ if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
24078
+ observer2 = new SharedIntersectionObserver({
24079
+ root: root == null ? void 0 : root.current,
24080
+ rootMargin,
24081
+ threshold,
24082
+ });
24083
+ observers2.set(key7, observer2);
24084
+ }
24085
+ observer2.observeElementWithCallback(element, callback);
24086
+ return () => {
24087
+ observer2.unobserve(element);
24088
+ };
24089
+ }
23949
24090
  function _useSharedIntersectionObserver(ref, callback, options) {
23950
24091
  const key7 = useConstant2(() => `${options.rootMargin}`);
23951
24092
  const observers2 = (0, react_3.useContext)(SharedIntersectionObserverContext);
@@ -23955,19 +24096,7 @@ function _useSharedIntersectionObserver(ref, callback, options) {
23955
24096
  return;
23956
24097
  if (element === null)
23957
24098
  return;
23958
- let observer2 = observers2.get(key7);
23959
- if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
23960
- observer2 = new SharedIntersectionObserver({
23961
- root: root == null ? void 0 : root.current,
23962
- rootMargin,
23963
- threshold,
23964
- });
23965
- observers2.set(key7, observer2);
23966
- }
23967
- observer2.observeElementWithCallback(element, callback);
23968
- return () => {
23969
- observer2 == null ? void 0 : observer2.unobserve(element);
23970
- };
24099
+ return observeElement(observers2, key7, element, root, callback, rootMargin, threshold);
23971
24100
  }, [enabled, callback, root, rootMargin, threshold,]);
23972
24101
  }
23973
24102
  var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
@@ -24042,7 +24171,7 @@ var LayoutTree = class extends react_9.Component {
24042
24171
  this.isExiting = isExiting;
24043
24172
  if (isLead === void 0)
24044
24173
  return true;
24045
- const hasBecomeLead = !this.props.isLead && !!isLead;
24174
+ const hasBecomeLead = !this.props.isLead && isLead;
24046
24175
  const hasExitBeenCancelled = this.props.isExiting && !isExiting;
24047
24176
  const shouldPromote = hasBecomeLead || hasExitBeenCancelled;
24048
24177
  const shouldDemote = !!this.props.isLead && !isLead;
@@ -25428,7 +25557,7 @@ function containerContent(item) {
25428
25557
  const position = (_a = item == null ? void 0 : item.transition) == null ? void 0 : _a.position;
25429
25558
  const shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;
25430
25559
  const shouldStretchHeight = !position || position.top !== void 0 && position.bottom !== void 0;
25431
- const canStretchStyle = 'style' in child.props ? isObject(child.props.style) : true;
25560
+ const canStretchStyle = 'style' in child.props ? isObject2(child.props.style) : true;
25432
25561
  if (shouldStretchWidth) {
25433
25562
  const canStretchWidth = 'width' in child.props;
25434
25563
  if (canStretchWidth)
@@ -26596,7 +26725,7 @@ function hasRadius(props) {
26596
26725
  }
26597
26726
  function getRadiusValue(value) {
26598
26727
  let num = Number(value);
26599
- if (typeof value === 'string' && Number.isNaN(Number(num))) {
26728
+ if (typeof value === 'string' && Number.isNaN(num)) {
26600
26729
  return value;
26601
26730
  }
26602
26731
  else if (isAnimatable2(value)) {
@@ -27720,7 +27849,7 @@ function makePaddingString({ top, left, bottom, right, }) {
27720
27849
  var Stack = /* @__PURE__ */ (() => {
27721
27850
  const StackInner = react_11.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
27722
27851
  const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className: className2, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle, ...containerProps } = stackProps;
27723
- const useFlexboxGap = Boolean(externalUseFlexboxGap || wrap2);
27852
+ const useFlexboxGap = externalUseFlexboxGap || wrap2;
27724
27853
  const stackRef = react_11.default.useRef(null);
27725
27854
  const flexDirection = toFlexDirection(direction);
27726
27855
  const isReverse = isReverseDirection(flexDirection);
@@ -28131,7 +28260,7 @@ var Page = /* @__PURE__ */ react_11.default.forwardRef(function Page2(props, for
28131
28260
  }
28132
28261
  const updateOnResize = react_11.default.useCallback(() => {
28133
28262
  if (!hasFixedSize)
28134
- setForceUpdateCount((v) => v + 1);
28263
+ (0, react_12.startTransition)(() => setForceUpdateCount((v) => v + 1));
28135
28264
  }, [hasFixedSize,]);
28136
28265
  react_11.default.useEffect(() => {
28137
28266
  if (RenderTarget.current() !== RenderTarget.preview)
@@ -29338,7 +29467,7 @@ var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) =>
29338
29467
  : updatedSize;
29339
29468
  return react_11.default.cloneElement(child, update);
29340
29469
  });
29341
- }, [dragDirection, children,]);
29470
+ }, [dragDirection, children, fromCanvasComponent,]);
29342
29471
  };
29343
29472
  var numberFromOptionalMotionValue = (value) => {
29344
29473
  return typeof value === 'number' ? value : value.get();
@@ -29619,7 +29748,6 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
29619
29748
  preserve3d: containerProps.preserve3d,
29620
29749
  children: [
29621
29750
  /* @__PURE__ */ (0, jsx_runtime_1.jsx)(EmptyState, {
29622
- children,
29623
29751
  size: {
29624
29752
  width: isFiniteNumber(containerProps.width) ? containerProps.width : '100%',
29625
29753
  height: isFiniteNumber(containerProps.height) ? containerProps.height : '100%',
@@ -29627,6 +29755,7 @@ var EmulatedScroll = /* @__PURE__ */ react_11.default.forwardRef(function Emulat
29627
29755
  insideUserCodeComponent: !containerProps.__fromCodeComponentNode,
29628
29756
  title: 'Scroll',
29629
29757
  description: 'Click and drag the connector to any frame on the canvas \u2192',
29758
+ children,
29630
29759
  }),
29631
29760
  useUpdateChildSize({
29632
29761
  dragDirection: direction,
@@ -30770,8 +30899,8 @@ var AnimationCollector = class {
30770
30899
  const initial = props.__framer__presenceInitial ?? props.initial;
30771
30900
  const animate3 = props.__framer__presenceAnimate ?? props.animate;
30772
30901
  const config = {
30773
- initial: isObject(initial) ? initial : void 0,
30774
- animate: isObject(animate3) ? animate3 : void 0,
30902
+ initial: isObject2(initial) ? initial : void 0,
30903
+ animate: isObject2(animate3) ? animate3 : void 0,
30775
30904
  transformTemplate: isString(transformTemplate2) ? transformTemplate2 : void 0,
30776
30905
  };
30777
30906
  for (const variantId of variants)
@@ -30937,6 +31066,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30937
31066
  const values = useConstant2(makeFXValues);
30938
31067
  const mirrorStateRef = (0, react_4.useRef)(false);
30939
31068
  const delay2 = useDelay();
31069
+ const animationPromiseRef = (0, react_4.useRef)(null);
30940
31070
  const animateValues = (0, react_3.useCallback)(async () => {
30941
31071
  if (!loop)
30942
31072
  return;
@@ -30945,10 +31075,10 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30945
31075
  const to = mirror ? defaultFXValues : loop;
30946
31076
  const from = mirror ? loop : defaultFXValues;
30947
31077
  mirrorStateRef.current = !mirrorStateRef.current;
30948
- return Promise.all(effectValuesKeys.map((key7) => {
31078
+ animationPromiseRef.current = Promise.all(effectValuesKeys.map((key7) => {
30949
31079
  if (shouldReduceMotion && key7 !== 'opacity')
30950
31080
  return;
30951
- values[key7].set(from[key7] ?? defaultFXValues[key7]);
31081
+ values[key7].jump(from[key7] ?? defaultFXValues[key7]);
30952
31082
  return new Promise((resolve) => {
30953
31083
  const opts = {
30954
31084
  ...transition,
@@ -30960,6 +31090,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30960
31090
  }
30961
31091
  });
30962
31092
  }));
31093
+ return animationPromiseRef.current;
30963
31094
  }, [loop, loopRepeatType, loopTransition, shouldReduceMotion,]);
30964
31095
  const [isRunning, setIsRunning,] = (0, react_4.useState)(false);
30965
31096
  const shouldRunRef = (0, react_4.useRef)(false);
@@ -30968,7 +31099,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30968
31099
  return;
30969
31100
  await animateValues();
30970
31101
  await delay2(loopRepeatDelay ?? 0);
30971
- await animateLoop();
31102
+ void animateLoop();
30972
31103
  }, [animateValues, delay2, loopEffectEnabled, loopRepeatDelay,]);
30973
31104
  const start2 = (0, react_3.useCallback)(() => {
30974
31105
  if (shouldRunRef.current)
@@ -31020,15 +31151,26 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
31020
31151
  }, [start2, stop, loopPauseOffscreen, hasLoop,]);
31021
31152
  (0, react_2.useEffect)(() => {
31022
31153
  return () => stop();
31023
- }, []);
31154
+ }, [stop,]);
31155
+ const isIntersectingRef = (0, react_4.useRef)(false);
31156
+ const stopAfterAnimationEnds = (0, react_3.useCallback)(async () => {
31157
+ if (!animationPromiseRef.current)
31158
+ return;
31159
+ await animationPromiseRef.current;
31160
+ if (isIntersectingRef.current)
31161
+ return;
31162
+ stop();
31163
+ }, [stop,]);
31024
31164
  const startAndStopBasedOnIntersection = (0, react_3.useCallback)((entry) => {
31025
31165
  if (entry.isIntersecting) {
31166
+ isIntersectingRef.current = true;
31026
31167
  start2();
31027
31168
  }
31028
31169
  else {
31029
- stop();
31170
+ isIntersectingRef.current = false;
31171
+ void stopAfterAnimationEnds();
31030
31172
  }
31031
- }, [start2, stop,]);
31173
+ }, [start2, stopAfterAnimationEnds,]);
31032
31174
  useSharedIntersectionObserver(ref, startAndStopBasedOnIntersection, {
31033
31175
  enabled: hasLoop && loopPauseOffscreen,
31034
31176
  });
@@ -31090,7 +31232,7 @@ function useParallax(options, ref, visibilityStyle) {
31090
31232
  };
31091
31233
  }
31092
31234
  function getTransition(value) {
31093
- if (isString(value) || !isObject(value))
31235
+ if (isString(value) || !isObject2(value))
31094
31236
  return void 0;
31095
31237
  return value == null ? void 0 : value.transition;
31096
31238
  }
@@ -31102,7 +31244,7 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
31102
31244
  return resolve();
31103
31245
  const motionValue2 = effect.values[key7];
31104
31246
  motionValue2.stop();
31105
- let value = !isObject(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31247
+ let value = !isObject2(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31106
31248
  if (isMotionValue(value))
31107
31249
  value = value.get();
31108
31250
  if (!isNumber2(value))
@@ -31145,14 +31287,14 @@ function usePresenceAnimation({ initial: motionInitial, animate: motionAnimate,
31145
31287
  });
31146
31288
  const effect = useConstant2(() => {
31147
31289
  const base = initial ?? style2;
31148
- if (!isObject(base)) {
31290
+ if (!isObject2(base)) {
31149
31291
  return {
31150
31292
  values: makeFXValues(),
31151
31293
  };
31152
31294
  }
31153
31295
  const defaults = {};
31154
31296
  for (const key7 in base) {
31155
- const value = isObject(base) ? base[key7] : void 0;
31297
+ const value = isObject2(base) ? base[key7] : void 0;
31156
31298
  if (!isNumber2(value))
31157
31299
  continue;
31158
31300
  defaults[key7] = value;
@@ -31698,10 +31840,10 @@ var add2 = (values) => values.reduce((sum, value) => sum += value, 0);
31698
31840
  var multiply = (values) => values.reduce((sum, value) => sum = sum * value, 1);
31699
31841
  var reactRefObjectKey = 'current';
31700
31842
  function isReactRefObject(value) {
31701
- return isObject(value) && reactRefObjectKey in value;
31843
+ return isObject2(value) && reactRefObjectKey in value;
31702
31844
  }
31703
31845
  function addMotionValueStyle(style2, values) {
31704
- if (!style2 || !isObject(style2))
31846
+ if (!style2 || !isObject2(style2))
31705
31847
  return values;
31706
31848
  for (const key7 in style2) {
31707
31849
  const value = style2[key7];
@@ -31894,7 +32036,7 @@ var SynchronousSuspenseErrorBoundary = class extends react_9.Component {
31894
32036
  if (!isSuspense426Error(error))
31895
32037
  return;
31896
32038
  const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
31897
- console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.community/.');
32039
+ console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
31898
32040
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
31899
32041
  sendTrackingEvent('published_site_load_recoverable_error', {
31900
32042
  message: String(error),
@@ -31968,7 +32110,7 @@ function logError(...args) {
31968
32110
  function shouldEnableCodeBoundaries() {
31969
32111
  return RenderTarget.current() !== RenderTarget.canvas;
31970
32112
  }
31971
- function CodeComponentBoundary({ errorMessage, fallback, children, }) {
32113
+ function CodeComponentBoundary({ getErrorMessage, fallback, children, }) {
31972
32114
  if (!shouldEnableCodeBoundaries()) {
31973
32115
  return children;
31974
32116
  }
@@ -31976,7 +32118,7 @@ function CodeComponentBoundary({ errorMessage, fallback, children, }) {
31976
32118
  fallback,
31977
32119
  children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ClientSideErrorBoundary, {
31978
32120
  fallback,
31979
- errorMessage,
32121
+ getErrorMessage,
31980
32122
  children,
31981
32123
  }),
31982
32124
  });
@@ -31994,7 +32136,7 @@ var ClientSideErrorBoundary = class extends react_9.Component {
31994
32136
  };
31995
32137
  }
31996
32138
  componentDidCatch(error, errorInfo) {
31997
- logError(this.props.errorMessage, errorInfo == null ? void 0 : errorInfo.componentStack);
32139
+ logError(this.props.getErrorMessage(), errorInfo == null ? void 0 : errorInfo.componentStack);
31998
32140
  collectErrorToAnalytics(error, errorInfo);
31999
32141
  }
32000
32142
  render() {
@@ -32130,7 +32272,7 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
32130
32272
  const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.level, isAuthoredByUser ?? false, isModuleExternal ?? false, inComponentSlot ?? false);
32131
32273
  if (shouldWrapWithBoundary) {
32132
32274
  children = /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
32133
- errorMessage: getErrorMessageForComponent(scopeId, nodeId),
32275
+ getErrorMessage: getErrorMessageForComponent.bind(null, scopeId, nodeId),
32134
32276
  fallback: null,
32135
32277
  children,
32136
32278
  });
@@ -32967,7 +33109,7 @@ function useDynamicMotionOrigin(initialPlacement, alignment) {
32967
33109
  function childrenWithOrigin(child, { x, y, }) {
32968
33110
  if (!child || !isReactChild(child) || !isReactElement(child))
32969
33111
  return null;
32970
- if (!isObject(child.props.style) && !isUndefined(child.props.style))
33112
+ if (!isObject2(child.props.style) && !isUndefined(child.props.style))
32971
33113
  return null;
32972
33114
  const style2 = {
32973
33115
  ...child.props.style,
@@ -33116,6 +33258,15 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33116
33258
  ],
33117
33259
  }), getPortalContainer(portalSelector, inComponent));
33118
33260
  }
33261
+ var Instance = /* @__PURE__ */ react_11.default.forwardRef(function Instance2({ Component: Component17, ...props }, ref) {
33262
+ return Component17
33263
+ ? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
33264
+ ...props,
33265
+ ref,
33266
+ })
33267
+ : null;
33268
+ });
33269
+ exports.Instance = Instance;
33119
33270
  var GracefullyDegradingErrorBoundary = class extends react_9.Component {
33120
33271
  constructor() {
33121
33272
  super(...arguments);
@@ -33124,7 +33275,7 @@ var GracefullyDegradingErrorBoundary = class extends react_9.Component {
33124
33275
  });
33125
33276
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'message', 'Made UI non-interactive due to an error');
33126
33277
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageFatal', 'Fatal error');
33127
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.community/');
33278
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.com/contact/');
33128
33279
  }
33129
33280
  static getDerivedStateFromError(error) {
33130
33281
  return {
@@ -33140,7 +33291,7 @@ var GracefullyDegradingErrorBoundary = class extends react_9.Component {
33140
33291
 
33141
33292
  `, error);
33142
33293
  const sampleRate = Math.random();
33143
- if (sampleRate > 0.25)
33294
+ if (sampleRate > 0.5)
33144
33295
  return;
33145
33296
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
33146
33297
  sendTrackingEvent('published_site_load_error', {
@@ -34484,7 +34635,7 @@ async function submitForm(action, data2, projectHash) {
34484
34635
  }
34485
34636
  }
34486
34637
  function responseHasError(response) {
34487
- return typeof response === 'object' && response !== null && 'error' in response && isObject(response.error) &&
34638
+ return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
34488
34639
  'message' in response.error && typeof response.error.message === 'string';
34489
34640
  }
34490
34641
  function isSamePage(a, b) {
@@ -34672,7 +34823,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34672
34823
  if (isString(localeOrLocaleId)) {
34673
34824
  localeId = localeOrLocaleId;
34674
34825
  }
34675
- else if (isObject(localeOrLocaleId)) {
34826
+ else if (isObject2(localeOrLocaleId)) {
34676
34827
  localeId = localeOrLocaleId.id;
34677
34828
  }
34678
34829
  const defaultLocale = locales.find(({ id: id3, }) => id3 === defaultLocaleId);
@@ -34696,7 +34847,6 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34696
34847
  });
34697
34848
  if (!localeResult)
34698
34849
  return;
34699
- const currentPathVariables2 = currentPathVariablesRef.current;
34700
34850
  const currentStatePaginationInfo = isHistoryState(window.history.state) ? window.history.state.paginationInfo : void 0;
34701
34851
  const currentPath = localeResult.path;
34702
34852
  currentPathVariablesRef.current = localeResult.pathVariables;
@@ -34706,7 +34856,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34706
34856
  return;
34707
34857
  return pushHistoryState({
34708
34858
  routeId: currentRouteId2,
34709
- pathVariables: currentPathVariables2,
34859
+ pathVariables: localeResult.pathVariables,
34710
34860
  localeId: nextLocale.id,
34711
34861
  paginationInfo: currentStatePaginationInfo,
34712
34862
  }, currentPath, ignorePushStateWrapper);
@@ -35387,14 +35537,13 @@ _subscribers2 = /* @__PURE__ */ new WeakMap();
35387
35537
  _results = /* @__PURE__ */ new WeakMap();
35388
35538
  _SSRResults = /* @__PURE__ */ new WeakMap();
35389
35539
  _onlyPrefetched = /* @__PURE__ */ new WeakMap();
35390
- function useFetchRequests(requests, disabled) {
35540
+ function useFetchRequestsForChildren(requests, disabled, children) {
35391
35541
  const fetchClient = React2.useContext(FetchClientContext);
35392
35542
  if (!fetchClient) {
35393
35543
  throw new Error('useFetchRequest must be used within a FetchClientProvider');
35394
35544
  }
35395
35545
  const isRestoringCache = React2.useContext(IsRestoringCacheContext);
35396
35546
  const [observer2,] = React2.useState(() => new RequestsObserver(fetchClient, requests));
35397
- const [result, setResult,] = React2.useState(() => observer2.getServerResults());
35398
35547
  React2.useLayoutEffect(() => {
35399
35548
  if (disabled)
35400
35549
  return;
@@ -35403,19 +35552,16 @@ function useFetchRequests(requests, disabled) {
35403
35552
  });
35404
35553
  }, [requests, observer2, disabled,]);
35405
35554
  React2.useEffect(() => {
35555
+ return () => observer2.unmount();
35556
+ }, [observer2,]);
35557
+ const subscribe = React2.useCallback((onChange) => {
35406
35558
  if (isRestoringCache || disabled)
35407
- return;
35408
- const unsubscribe = observer2.subscribe(() => {
35409
- React2.startTransition(() => {
35410
- setResult(observer2.getResults());
35411
- });
35412
- });
35413
- return () => {
35414
- unsubscribe();
35415
- observer2.unmount();
35416
- };
35417
- }, [observer2, disabled, isRestoringCache,]);
35418
- return result;
35559
+ return noop4;
35560
+ return observer2.subscribe(onChange);
35561
+ }, [disabled, observer2, isRestoringCache,]);
35562
+ const synchronousData = React2.useSyncExternalStore(subscribe, observer2.getResults, observer2.getServerResults);
35563
+ const deferredData = React2.useDeferredValue(synchronousData);
35564
+ return useMemoOne(() => children(deferredData.data, deferredData.status), [deferredData, children,]);
35419
35565
  }
35420
35566
  function usePrefetch() {
35421
35567
  const fetchClient = React2.useContext(FetchClientContext);
@@ -35556,8 +35702,7 @@ var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ (0, re
35556
35702
  exports.ResolveLinks = ResolveLinks;
35557
35703
  var Fetcher = /* @__PURE__ */ React2.forwardRef(function Fetcher2({ requests, disabled, children, ...rest }, ref) {
35558
35704
  const cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref);
35559
- const { data: data2, status, } = useFetchRequests(requests, disabled);
35560
- const childrenWithValues = children(data2, status);
35705
+ const childrenWithValues = useFetchRequestsForChildren(requests, disabled, children);
35561
35706
  return cloneWithPropsAndRef(childrenWithValues, rest);
35562
35707
  });
35563
35708
  exports.Fetcher = Fetcher;
@@ -35591,19 +35736,19 @@ function isAnyCollection(value) {
35591
35736
  return isAnyLegacyCollection(value) || isAnyDatabaseCollection(value);
35592
35737
  }
35593
35738
  function isLegacyCollection(value) {
35594
- return isArray(value) && value.every(isObject);
35739
+ return isArray(value) && value.every(isObject2);
35595
35740
  }
35596
35741
  function isLegacyLocalizedCollection(value) {
35597
- return isObject(value) && isFunction(value.read) && isFunction(value.preload);
35742
+ return isObject2(value) && isFunction(value.read) && isFunction(value.preload);
35598
35743
  }
35599
35744
  function isAnyLegacyCollection(value) {
35600
35745
  return isLegacyCollection(value) || isLegacyLocalizedCollection(value);
35601
35746
  }
35602
35747
  function isDatabaseCollection(value) {
35603
- return isObject(value) && isObject(value.schema);
35748
+ return isObject2(value) && isObject2(value.schema);
35604
35749
  }
35605
35750
  function isLocalizedDatabaseCollection(value) {
35606
- return isObject(value) && isObject(value.collectionByLocaleId);
35751
+ return isObject2(value) && isObject2(value.collectionByLocaleId);
35607
35752
  }
35608
35753
  function isAnyDatabaseCollection(value) {
35609
35754
  return isDatabaseCollection(value) || isLocalizedDatabaseCollection(value);
@@ -36483,7 +36628,7 @@ function Hash(value) {
36483
36628
  return value;
36484
36629
  }
36485
36630
  function isHashable(value) {
36486
- return isObject(value) && isFunction(value.getHash);
36631
+ return isObject2(value) && isFunction(value.getHash);
36487
36632
  }
36488
36633
  function calculateHash(name, ...values) {
36489
36634
  const hashes = values.map((value) => {
@@ -39996,7 +40141,7 @@ function getCollectionId(collection) {
39996
40141
  return id3;
39997
40142
  }
39998
40143
  function replaceCollection(_, value) {
39999
- if (isObject(value) && value.type === 'Collection' && isAnyCollection(value.data)) {
40144
+ if (isObject2(value) && value.type === 'Collection' && isAnyCollection(value.data)) {
40000
40145
  return getCollectionId(value.data);
40001
40146
  }
40002
40147
  return value;
@@ -40234,7 +40379,7 @@ function useDataRecord(collection, variables) {
40234
40379
  const pageRecord = collection.find((record2) => {
40235
40380
  return Object.entries(variables).every(([key7, value,]) => {
40236
40381
  const recordValue = record2[key7];
40237
- if (value === void 0 || recordValue === void 0 || isObject(value) || isObject(recordValue)) {
40382
+ if (value === void 0 || recordValue === void 0 || isObject2(value) || isObject2(recordValue)) {
40238
40383
  return false;
40239
40384
  }
40240
40385
  return String(value) === String(recordValue);
@@ -40279,7 +40424,7 @@ function useSiteRefs() {
40279
40424
  }, [path,]);
40280
40425
  }
40281
40426
  function isFramerGamepadKeydownData(value) {
40282
- return isObject(value) && value.mapping !== void 0;
40427
+ return isObject2(value) && value.mapping !== void 0;
40283
40428
  }
40284
40429
  function gamepadInputsHaveChanged(previous, current2) {
40285
40430
  if (previous.length !== current2.length)
@@ -40537,14 +40682,9 @@ function useOnAppear(callback) {
40537
40682
  default: callback,
40538
40683
  });
40539
40684
  }
40540
- async function setOverflow(blockDocumentScrolling, show, yieldBefore = true) {
40685
+ function setOverflow(blockDocumentScrolling, show) {
40541
40686
  if (blockDocumentScrolling === false)
40542
40687
  return;
40543
- if (yieldBefore) {
40544
- await yieldToMain({
40545
- continueAfter: 'paint',
40546
- });
40547
- }
40548
40688
  frame.render(() => {
40549
40689
  const htmlStyle = document.documentElement.style;
40550
40690
  if (show) {
@@ -40557,18 +40697,27 @@ async function setOverflow(blockDocumentScrolling, show, yieldBefore = true) {
40557
40697
  }
40558
40698
  function useOverlayState({ blockDocumentScrolling = true, } = {}) {
40559
40699
  const [showOverlay, setShowOverlay,] = react_11.default.useState(false);
40560
- const callback = react_11.default.useCallback((show) => {
40561
- setShowOverlay(show);
40562
- void setOverflow(blockDocumentScrolling, show);
40700
+ const callback = react_11.default.useCallback(async (show) => {
40701
+ await yieldToMain({
40702
+ priority: 'user-blocking',
40703
+ continueAfter: 'paint',
40704
+ });
40705
+ (0, react_12.startTransition)(() => setShowOverlay(show));
40706
+ setOverflow(blockDocumentScrolling, show);
40563
40707
  }, [blockDocumentScrolling,]);
40564
40708
  react_11.default.useEffect(() => () => {
40565
- void setOverflow(blockDocumentScrolling, false, false);
40709
+ void yieldToMain({
40710
+ priority: 'user-blocking',
40711
+ continueAfter: 'paint',
40712
+ }).then(() => {
40713
+ setOverflow(blockDocumentScrolling, false);
40714
+ });
40566
40715
  }, [blockDocumentScrolling,]);
40567
40716
  return [showOverlay, callback,];
40568
40717
  }
40569
40718
  var key4 = 'page';
40570
40719
  function isRoute(route) {
40571
- return isObject(route) && key4 in route && route.page !== void 0;
40720
+ return isObject2(route) && key4 in route && route.page !== void 0;
40572
40721
  }
40573
40722
  async function componentForRoute(route) {
40574
40723
  if (!isRoute(route))
@@ -40586,7 +40735,7 @@ async function componentForRoute(route) {
40586
40735
  }
40587
40736
  var preloadKey2 = 'preload';
40588
40737
  function withPreload(component) {
40589
- return !!component && isObject(component) && preloadKey2 in component;
40738
+ return !!component && isObject2(component) && preloadKey2 in component;
40590
40739
  }
40591
40740
  function usePrototypeNavigate({ preload, } = {}) {
40592
40741
  const navigation = useNavigation();
@@ -40704,7 +40853,7 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
40704
40853
  const entries = Object.entries(pathVariables ?? {}).filter(([, value,]) => {
40705
40854
  if (isUndefined(value))
40706
40855
  return false;
40707
- if (isObject(value))
40856
+ if (isObject2(value))
40708
40857
  return false;
40709
40858
  return true;
40710
40859
  });
@@ -40740,65 +40889,45 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
40740
40889
  }));
40741
40890
  }
40742
40891
  function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspendedLoadingState = false) {
40892
+ var _a, _b, _c, _d;
40893
+ const [isPending, startLoadingTransition,] = (0, react_16.useTransition)();
40743
40894
  const totalPages = Math.ceil(totalSize / pageSize);
40744
- const [paginationInfo, setPaginationInfo,] = (0, react_4.useState)(() => {
40745
- var _a, _b, _c, _d;
40746
- const currentPage = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
40747
- ? void 0
40748
- : _b.paginationInfo) == null
40749
- ? void 0
40750
- : _c[hash2]) == null
40751
- ? void 0
40752
- : _d.currentPage) ?? 1;
40895
+ const [currentPage, setCurrentPage,] = (0, react_4.useState)(((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
40896
+ ? void 0
40897
+ : _b.paginationInfo) == null
40898
+ ? void 0
40899
+ : _c[hash2]) == null
40900
+ ? void 0
40901
+ : _d.currentPage) ?? 1);
40902
+ const paginationInfo = (0, react_4.useMemo)(() => {
40753
40903
  return {
40754
40904
  currentPage,
40755
40905
  totalPages,
40756
- isLoading: false,
40906
+ isLoading: isPending,
40757
40907
  };
40758
- });
40759
- (0, react_2.useEffect)(() => {
40760
- (0, react_12.startTransition)(() => {
40761
- setPaginationInfo((current2) => {
40762
- if (current2.totalPages === totalPages)
40763
- return current2;
40764
- return {
40765
- ...current2,
40766
- totalPages,
40767
- };
40768
- });
40769
- });
40770
- }, [totalPages,]);
40908
+ }, [currentPage, totalPages, isPending,]);
40771
40909
  (0, react_2.useEffect)(() => {
40772
40910
  pushLoadMoreHistory(hash2, paginationInfo);
40773
40911
  }, [hash2, paginationInfo,]);
40774
40912
  const onCanvas = useIsOnFramerCanvas();
40775
- const loadMore = (0, react_3.useCallback)(() => {
40913
+ const loadMore = (0, react_3.useCallback)(async () => {
40776
40914
  if (onCanvas)
40777
40915
  return;
40778
- if (paginationInfo.currentPage >= paginationInfo.totalPages)
40916
+ if (currentPage >= totalPages)
40779
40917
  return;
40780
- if (!paginateWithSuspendedLoadingState) {
40781
- (0, react_12.startTransition)(() => {
40782
- setPaginationInfo((info) => ({
40783
- ...info,
40784
- currentPage: Math.min(info.currentPage + 1, info.totalPages),
40785
- isLoading: false,
40786
- }));
40787
- });
40788
- return;
40789
- }
40790
- setPaginationInfo((info) => ({
40791
- ...info,
40792
- isLoading: true,
40793
- }));
40794
- requestAnimationFrame(() => {
40795
- setPaginationInfo((info) => ({
40796
- ...info,
40797
- currentPage: Math.min(info.currentPage + 1, info.totalPages),
40798
- isLoading: false,
40799
- }));
40918
+ await yieldToMain({
40919
+ priority: 'user-blocking',
40920
+ continueAfter: 'paint',
40800
40921
  });
40801
- }, [onCanvas, paginationInfo.currentPage, paginationInfo.totalPages, paginateWithSuspendedLoadingState,]);
40922
+ const renderNextPage = (startTransition14) => {
40923
+ startTransition14(() => {
40924
+ setCurrentPage((_currentPage) => Math.min(_currentPage + 1, totalPages));
40925
+ });
40926
+ };
40927
+ if (!paginateWithSuspendedLoadingState)
40928
+ return renderNextPage(react_12.startTransition);
40929
+ return renderNextPage(startLoadingTransition);
40930
+ }, [currentPage, totalPages, paginateWithSuspendedLoadingState,]);
40802
40931
  return {
40803
40932
  paginationInfo,
40804
40933
  loadMore,
@@ -40919,15 +41048,16 @@ function useRunCallbackIfPageIsVisible() {
40919
41048
  }, [clean,]);
40920
41049
  }
40921
41050
  function useRunCallbackIfElementIsInView() {
40922
- const observerRef = (0, react_4.useRef)(null);
41051
+ const observerRefCleanup = (0, react_4.useRef)();
40923
41052
  const isInViewRef = (0, react_4.useRef)(false);
40924
41053
  const callbackRef = (0, react_4.useRef)();
41054
+ const observers2 = (0, react_3.useContext)(SharedIntersectionObserverContext);
40925
41055
  (0, react_2.useEffect)(() => {
40926
41056
  return () => {
40927
41057
  var _a;
40928
- (_a = observerRef.current) == null ? void 0 : _a.disconnect();
41058
+ (_a = observerRefCleanup.current) == null ? void 0 : _a.call(observerRefCleanup);
40929
41059
  callbackRef.current = void 0;
40930
- observerRef.current = null;
41060
+ observerRefCleanup.current = void 0;
40931
41061
  };
40932
41062
  }, []);
40933
41063
  return (0, react_3.useCallback)((callback, ref) => {
@@ -40936,23 +41066,24 @@ function useRunCallbackIfElementIsInView() {
40936
41066
  return;
40937
41067
  }
40938
41068
  callbackRef.current = callback;
40939
- if (observerRef.current)
41069
+ if (observerRefCleanup.current)
40940
41070
  return;
40941
- const observer2 = new IntersectionObserver((entries) => {
40942
- var _a;
40943
- let isIntersecting = false;
40944
- for (let i = 0; i < entries.length; ++i) {
40945
- const entry = entries[i];
40946
- isIntersecting = entry.isIntersecting;
40947
- }
40948
- isInViewRef.current = isIntersecting;
40949
- if (!isIntersecting)
41071
+ let queuedMicrotask = false;
41072
+ const observerCallback = (entry) => {
41073
+ isInViewRef.current = entry.isIntersecting;
41074
+ if (queuedMicrotask)
40950
41075
  return;
40951
- (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef);
40952
- });
40953
- observerRef.current = observer2;
40954
- observer2.observe(ref.current);
40955
- }, []);
41076
+ queuedMicrotask = true;
41077
+ queueMicrotask(() => {
41078
+ var _a;
41079
+ if (!isInViewRef.current)
41080
+ return;
41081
+ queuedMicrotask = false;
41082
+ (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef);
41083
+ });
41084
+ };
41085
+ observerRefCleanup.current = observeElement(observers2, 'undefined', ref.current, null, observerCallback);
41086
+ }, [observers2,]);
40956
41087
  }
40957
41088
  function useUpdateIfVisible(ref) {
40958
41089
  const runUpdateIfPageIsVisible = useRunCallbackIfPageIsVisible();
@@ -40970,20 +41101,27 @@ var globalWaitingForClickPromise;
40970
41101
  var globalWaitingForClickResolve;
40971
41102
  async function getPromiseWithFallback() {
40972
41103
  return new Promise((resolve) => {
40973
- const resolveFn = () => {
41104
+ let resolveFn = resolve;
41105
+ setTimeout(() => {
41106
+ if (!resolveFn)
41107
+ return;
41108
+ performance.mark('wait-for-click-fallback');
41109
+ resolveFn();
41110
+ }, 150);
41111
+ globalWaitingForClickResolve = () => {
40974
41112
  resolve();
40975
- clearTimeout(timeout);
41113
+ resolveFn = void 0;
40976
41114
  };
40977
- const timeout = setTimeout(resolveFn, 150);
40978
- globalWaitingForClickResolve = resolveFn;
40979
41115
  });
40980
41116
  }
40981
41117
  function globalWaitForClickListener(event) {
40982
41118
  if (event.button === 0) {
41119
+ performance.mark('pointerdown-listener');
40983
41120
  globalWaitingForClickPromise = getPromiseWithFallback();
40984
41121
  }
40985
41122
  }
40986
41123
  function globalClickReceivedListener() {
41124
+ performance.mark('click-received-listener');
40987
41125
  globalWaitingForClickPromise = void 0;
40988
41126
  globalWaitingForClickResolve == null ? void 0 : globalWaitingForClickResolve();
40989
41127
  globalWaitingForClickResolve = void 0;
@@ -41039,13 +41177,17 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
41039
41177
  internalState.current.gestureVariant = nextGesture;
41040
41178
  const yieldOnTap = yieldOnTapFeatureOn && internalState.current.isPressedHasUpdated;
41041
41179
  if (yieldOnTap && globalWaitingForClickPromise) {
41180
+ performance.mark('wait-for-tap-start');
41042
41181
  await globalWaitingForClickPromise;
41182
+ performance.measure('wait-for-tap', 'wait-for-tap-start');
41043
41183
  }
41044
41184
  if (yieldOnTap) {
41185
+ performance.mark('yield-on-tap-start');
41045
41186
  await yieldToMain({
41046
41187
  priority: 'user-blocking',
41047
41188
  continueAfter: 'paint',
41048
41189
  });
41190
+ performance.measure('yield-on-tap', 'yield-on-tap-start');
41049
41191
  }
41050
41192
  const { isHovered: isHovered2, isPressed: isPressed2, isHoveredHasUpdated, isPressedHasUpdated, } = internalState.current;
41051
41193
  if (isHovered2 || isHoveredHasUpdated || isPressed2 || isPressedHasUpdated) {
@@ -41170,7 +41312,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41170
41312
  if (shouldWrapWithBoundary) {
41171
41313
  if (appliedOverride.status === 'success') {
41172
41314
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CodeComponentBoundary, {
41173
- errorMessage: getErrorMessageForOverride(scopeId, nodeId),
41315
+ getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
41174
41316
  fallback: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
41175
41317
  ...props,
41176
41318
  ref,
@@ -41398,7 +41540,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
41398
41540
  });
41399
41541
  });
41400
41542
  }, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,]);
41401
- useScrollDirectionChange(scrollDirection, setVariant, {
41543
+ useScrollDirectionChange(scrollDirection, (variant) => react_11.default.startTransition(() => setVariant(variant)), {
41402
41544
  enabled: variantAppearEffectEnabled,
41403
41545
  repeat: !animateOnce,
41404
41546
  });
@@ -41407,7 +41549,7 @@ var withVariantAppearEffect = (Component17) => react_11.default.forwardRef((prop
41407
41549
  return;
41408
41550
  const useObscuredVariant = !options.targets && !options.scrollDirection;
41409
41551
  const target = useObscuredVariant ? options.obscuredVariantId : void 0;
41410
- react_11.default.startTransition(() => setVariant(target));
41552
+ (0, react_12.startTransition)(() => setVariant(target));
41411
41553
  });
41412
41554
  if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
41413
41555
  return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component17, {
@@ -43251,10 +43393,10 @@ function loadVariationAxes(source) {
43251
43393
  }
43252
43394
  }
43253
43395
  function isValidVariationAxesData(data2) {
43254
- return isObject(data2) && Object.values(data2).every(isValidVariationAxes);
43396
+ return isObject2(data2) && Object.values(data2).every(isValidVariationAxes);
43255
43397
  }
43256
43398
  function isVariationAxis2(data2) {
43257
- return isObject(data2) && isString(data2.tag);
43399
+ return isObject2(data2) && isString(data2.tag);
43258
43400
  }
43259
43401
  function isValidVariationAxes(data2) {
43260
43402
  return Array.isArray(data2) && data2.every(isVariationAxis2);
@@ -43263,10 +43405,13 @@ var FontStore = class {
43263
43405
  constructor() {
43264
43406
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'enabled', false);
43265
43407
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'bySelector', /* @__PURE__ */ new Map());
43408
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'loadedSelectors', /* @__PURE__ */ new Set());
43266
43409
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getGoogleFontsListPromise');
43267
43410
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getFontshareFontsListPromise');
43268
43411
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'getBuiltInFontsListPromise');
43269
- (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'loadedSelectors', /* @__PURE__ */ new Set());
43412
+ (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'customFontsImportPromise', new Promise((resolve) => {
43413
+ this.resolveCustomFontsImportPromise = resolve;
43414
+ }));
43270
43415
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'local');
43271
43416
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'google');
43272
43417
  (0, chunk_A2PMVMFI_js_1.__publicField)(this, 'fontshare');
@@ -43343,9 +43488,13 @@ var FontStore = class {
43343
43488
  this.bySelector.delete(key7);
43344
43489
  }
43345
43490
  });
43346
- for (const font of this.custom.importFonts(assets)) {
43491
+ const importedFonts = this.custom.importFonts(assets);
43492
+ for (const font of importedFonts) {
43347
43493
  this.addFont(font);
43348
43494
  }
43495
+ if (importedFonts.length > 0) {
43496
+ this.resolveCustomFontsImportPromise();
43497
+ }
43349
43498
  }
43350
43499
  getFontFamily(info) {
43351
43500
  const fontFamily = this[info.source].getFontFamilyByName(info.name);
@@ -43501,6 +43650,12 @@ var FontStore = class {
43501
43650
  warnOnce2('Failed to load built-in fonts:', error);
43502
43651
  }));
43503
43652
  }
43653
+ const shouldImportCustomFonts = selectors.some((selector) => selector.startsWith(customFontSelectorPrefix));
43654
+ if (shouldImportCustomFonts) {
43655
+ importPromises.push(this.customFontsImportPromise.catch((error) => {
43656
+ warnOnce2('Failed to load custom fonts:', error);
43657
+ }));
43658
+ }
43504
43659
  if (importPromises.length > 0) {
43505
43660
  await Promise.all(importPromises);
43506
43661
  }
@@ -43777,10 +43932,9 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
43777
43932
  className: cx(textInputWrapperClassName, inputWrapperClassName, className2),
43778
43933
  ...rest,
43779
43934
  children: type === 'textarea'
43780
- ? /* @__PURE__ */ (0, react_8.createElement)(motion.textarea, {
43935
+ ? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.textarea, {
43781
43936
  ...dataProps,
43782
43937
  ...eventHandlers,
43783
- key: defaultValue,
43784
43938
  required,
43785
43939
  autoFocus,
43786
43940
  name: inputName,
@@ -43788,11 +43942,10 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
43788
43942
  className: inputClassName,
43789
43943
  defaultValue,
43790
43944
  maxLength,
43791
- })
43792
- : /* @__PURE__ */ (0, react_8.createElement)(motion.input, {
43945
+ }, defaultValue)
43946
+ : /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, {
43793
43947
  ...dataProps,
43794
43948
  ...eventHandlers,
43795
- key: defaultValue,
43796
43949
  type,
43797
43950
  required,
43798
43951
  autoFocus,
@@ -43804,7 +43957,7 @@ var PlainTextInput = /* @__PURE__ */ (0, react_7.forwardRef)(function FormPlainT
43804
43957
  max,
43805
43958
  step: step2,
43806
43959
  maxLength,
43807
- }),
43960
+ }, defaultValue),
43808
43961
  });
43809
43962
  });
43810
43963
  var iconSize2 = 16;
@@ -45031,7 +45184,7 @@ function processRichTextChildren(element, stylesPresetsClassNames, plainText, an
45031
45184
  children = [anchorLink,];
45032
45185
  }
45033
45186
  }
45034
- return (0, react_16.cloneElement)(element, props, ...children);
45187
+ return (0, react_17.cloneElement)(element, props, ...children);
45035
45188
  }
45036
45189
  function generateHeadingSlug(children, slugCounters) {
45037
45190
  const headingText = children.map(extractTextFromReactNode).join('');
@@ -45058,7 +45211,7 @@ function extractTextFromReactNode(node) {
45058
45211
  var RichText2 = /* @__PURE__ */ (0, react_7.forwardRef)(function RichText3({ children, html, htmlFromDesign, ...props }, ref) {
45059
45212
  const content = html || children || htmlFromDesign;
45060
45213
  if (isString(content)) {
45061
- if (!props.stylesPresetsClassName && isObject(props.stylesPresetsClassNames)) {
45214
+ if (!props.stylesPresetsClassName && isObject2(props.stylesPresetsClassNames)) {
45062
45215
  props.stylesPresetsClassName = Object.values(props.stylesPresetsClassNames).join(' ');
45063
45216
  }
45064
45217
  const contentProp = {
@@ -47109,7 +47262,7 @@ var VectorGroup = /* @__PURE__ */ (() => {
47109
47262
  exports.VectorGroup = VectorGroup;
47110
47263
  var key6 = 'calculatedPaths';
47111
47264
  function withShape(target) {
47112
- if (!isObject(target))
47265
+ if (!isObject2(target))
47113
47266
  return false;
47114
47267
  return key6 in target;
47115
47268
  }
@@ -47348,7 +47501,7 @@ function inspect(item, max, l) {
47348
47501
  if (item === void 0) {
47349
47502
  return 'undefined';
47350
47503
  }
47351
- if (isObject(item) && isFunction(item.toInspect)) {
47504
+ if (isObject2(item) && isFunction(item.toInspect)) {
47352
47505
  return item.toInspect();
47353
47506
  }
47354
47507
  if (isString(item)) {
@@ -47361,7 +47514,7 @@ function inspect(item, max, l) {
47361
47514
  let code = item.toString().slice('function '.length).replace(/\n/gu, '').replace(/\s+/gu, ' ');
47362
47515
  const limit = 50;
47363
47516
  if (code.length > limit && l > 0) {
47364
- code = `${code.slice(0, +limit + 1 || void 0).trim()}\u2026 }`;
47517
+ code = `${code.slice(0, limit + 1).trim()}\u2026 }`;
47365
47518
  }
47366
47519
  return `<Function ${code}>`;
47367
47520
  }
@@ -47371,7 +47524,7 @@ function inspect(item, max, l) {
47371
47524
  }
47372
47525
  return `[${item.map((i) => inspect(i, max, (l || 0) + 1)).join(', ')}]`;
47373
47526
  }
47374
- if (isObject(item)) {
47527
+ if (isObject2(item)) {
47375
47528
  let objectInfo;
47376
47529
  const objectType = inspectObjectType(item);
47377
47530
  if (/HTML\w+?Element/u.test(objectType)) {
@@ -47450,8 +47603,8 @@ var package_default = {
47450
47603
  '@types/react': '^18.2.67',
47451
47604
  '@types/react-dom': '^18.2.22',
47452
47605
  '@types/yargs': '^17.0.33',
47453
- '@typescript-eslint/eslint-plugin': '^8.29.1',
47454
- '@typescript-eslint/parser': '^8.29.1',
47606
+ '@typescript-eslint/eslint-plugin': '^8.32.1',
47607
+ '@typescript-eslint/parser': '^8.32.1',
47455
47608
  chalk: '^4.1.2',
47456
47609
  eslint: '^8.57.1',
47457
47610
  'eslint-plugin-framer-studio': 'workspace:*',
@@ -47467,7 +47620,7 @@ var package_default = {
47467
47620
  yargs: '^17.7.2',
47468
47621
  },
47469
47622
  peerDependencies: {
47470
- 'framer-motion': '12.11.4',
47623
+ 'framer-motion': '12.14.0',
47471
47624
  react: '^18.2.0',
47472
47625
  'react-dom': '^18.2.0',
47473
47626
  },