unframer 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/framer.js CHANGED
@@ -18,7 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  }
19
19
  return t;
20
20
  };
21
- // https :https://app.framerstatic.com/chunk-AJGVEDRA.js
21
+ // https :https://app.framerstatic.com/chunk-DUHOOT7P.js
22
22
  import { createContext, } from 'react';
23
23
  import { useEffect, useLayoutEffect, } from 'react';
24
24
  import { jsx, jsxs, } from 'react/jsx-runtime';
@@ -1220,6 +1220,9 @@ function hslaToRgba({ hue, saturation, lightness, alpha: alpha2, }) {
1220
1220
  alpha: alpha2,
1221
1221
  };
1222
1222
  }
1223
+ function mixImmediate(a, b) {
1224
+ return (p) => p > 0 ? b : a;
1225
+ }
1223
1226
  var mixLinearColor = (from, to, v) => {
1224
1227
  const fromExpo = from * from;
1225
1228
  const expo = v * (to * to - fromExpo) + fromExpo;
@@ -1229,7 +1232,9 @@ var colorTypes = [hex, rgba, hsla,];
1229
1232
  var getColorType = (v) => colorTypes.find((type) => type.test(v));
1230
1233
  function asRGBA(color2) {
1231
1234
  const type = getColorType(color2);
1232
- invariant(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
1235
+ warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
1236
+ if (!Boolean(type))
1237
+ return false;
1233
1238
  let model = type.parse(color2);
1234
1239
  if (type === hsla) {
1235
1240
  model = hslaToRgba(model);
@@ -1239,6 +1244,9 @@ function asRGBA(color2) {
1239
1244
  var mixColor = (from, to) => {
1240
1245
  const fromRGBA = asRGBA(from);
1241
1246
  const toRGBA = asRGBA(to);
1247
+ if (!fromRGBA || !toRGBA) {
1248
+ return mixImmediate(from, to);
1249
+ }
1242
1250
  const blended = Object.assign({}, fromRGBA);
1243
1251
  return (v) => {
1244
1252
  blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
@@ -1267,9 +1275,6 @@ function mixVisibility(origin, target) {
1267
1275
  return (p) => p >= 1 ? target : origin;
1268
1276
  }
1269
1277
  }
1270
- function mixImmediate(a, b) {
1271
- return (p) => p > 0 ? b : a;
1272
- }
1273
1278
  function mixNumber2(a, b) {
1274
1279
  return (p) => mixNumber(a, b, p);
1275
1280
  }
@@ -2290,14 +2295,17 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
2290
2295
  return;
2291
2296
  super.readKeyframes();
2292
2297
  for (let i = 0; i < unresolvedKeyframes.length; i++) {
2293
- const keyframe = unresolvedKeyframes[i];
2294
- if (typeof keyframe === 'string' && isCSSVariableToken(keyframe)) {
2295
- const resolved = getVariableValue(keyframe, element.current);
2296
- if (resolved !== void 0) {
2297
- unresolvedKeyframes[i] = resolved;
2298
- }
2299
- if (i === unresolvedKeyframes.length - 1) {
2300
- this.finalKeyframe = keyframe;
2298
+ let keyframe = unresolvedKeyframes[i];
2299
+ if (typeof keyframe === 'string') {
2300
+ keyframe = keyframe.trim();
2301
+ if (isCSSVariableToken(keyframe)) {
2302
+ const resolved = getVariableValue(keyframe, element.current);
2303
+ if (resolved !== void 0) {
2304
+ unresolvedKeyframes[i] = resolved;
2305
+ }
2306
+ if (i === unresolvedKeyframes.length - 1) {
2307
+ this.finalKeyframe = keyframe;
2308
+ }
2301
2309
  }
2302
2310
  }
2303
2311
  }
@@ -2696,7 +2704,7 @@ var MotionValue = class {
2696
2704
  * @internal
2697
2705
  */
2698
2706
  constructor(init, options = {}) {
2699
- this.version = '11.2.6';
2707
+ this.version = '11.2.10';
2700
2708
  this.canTrackVelocity = null;
2701
2709
  this.events = {};
2702
2710
  this.updateAndNotify = (v, render = true) => {
@@ -2993,6 +3001,95 @@ function isTransitionDefined(_f) {
2993
3001
  function getValueTransition(transition, key7) {
2994
3002
  return transition[key7] || transition['default'] || transition;
2995
3003
  }
3004
+ function observeTimeline(update, timeline) {
3005
+ let prevProgress;
3006
+ const onFrame = () => {
3007
+ const { currentTime, } = timeline;
3008
+ const percentage = currentTime === null ? 0 : currentTime.value;
3009
+ const progress2 = percentage / 100;
3010
+ if (prevProgress !== progress2) {
3011
+ update(progress2);
3012
+ }
3013
+ prevProgress = progress2;
3014
+ };
3015
+ frame.update(onFrame, true);
3016
+ return () => cancelFrame(onFrame);
3017
+ }
3018
+ var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
3019
+ var GroupPlaybackControls = class {
3020
+ constructor(animations2) {
3021
+ this.stop = () => this.runAll('stop');
3022
+ this.animations = animations2.filter(Boolean);
3023
+ }
3024
+ then(onResolve, onReject) {
3025
+ return Promise.all(this.animations).then(onResolve).catch(onReject);
3026
+ }
3027
+ /**
3028
+ * TODO: Filter out cancelled or stopped animations before returning
3029
+ */
3030
+ getAll(propName) {
3031
+ return this.animations[0][propName];
3032
+ }
3033
+ setAll(propName, newValue) {
3034
+ for (let i = 0; i < this.animations.length; i++) {
3035
+ this.animations[i][propName] = newValue;
3036
+ }
3037
+ }
3038
+ attachTimeline(timeline) {
3039
+ const cancelAll = this.animations.map((animation) => {
3040
+ if (supportsScrollTimeline() && animation.attachTimeline) {
3041
+ animation.attachTimeline(timeline);
3042
+ }
3043
+ else {
3044
+ animation.pause();
3045
+ return observeTimeline((progress2) => {
3046
+ animation.time = animation.duration * progress2;
3047
+ }, timeline);
3048
+ }
3049
+ });
3050
+ return () => {
3051
+ cancelAll.forEach((cancelTimeline, i) => {
3052
+ if (cancelTimeline)
3053
+ cancelTimeline();
3054
+ this.animations[i].stop();
3055
+ });
3056
+ };
3057
+ }
3058
+ get time() {
3059
+ return this.getAll('time');
3060
+ }
3061
+ set time(time2) {
3062
+ this.setAll('time', time2);
3063
+ }
3064
+ get speed() {
3065
+ return this.getAll('speed');
3066
+ }
3067
+ set speed(speed) {
3068
+ this.setAll('speed', speed);
3069
+ }
3070
+ get duration() {
3071
+ let max = 0;
3072
+ for (let i = 0; i < this.animations.length; i++) {
3073
+ max = Math.max(max, this.animations[i].duration);
3074
+ }
3075
+ return max;
3076
+ }
3077
+ runAll(methodName) {
3078
+ this.animations.forEach((controls) => controls[methodName]());
3079
+ }
3080
+ play() {
3081
+ this.runAll('play');
3082
+ }
3083
+ pause() {
3084
+ this.runAll('pause');
3085
+ }
3086
+ cancel() {
3087
+ this.runAll('cancel');
3088
+ }
3089
+ complete() {
3090
+ this.runAll('complete');
3091
+ }
3092
+ };
2996
3093
  var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
2997
3094
  const valueTransition = getValueTransition(transition, name) || {};
2998
3095
  const delay2 = valueTransition.delay || transition.delay || 0;
@@ -3036,7 +3133,7 @@ var animateMotionValue = (name, value, target, transition = {}, element, isHando
3036
3133
  options.onUpdate(finalKeyframe);
3037
3134
  options.onComplete();
3038
3135
  });
3039
- return;
3136
+ return new GroupPlaybackControls([]);
3040
3137
  }
3041
3138
  }
3042
3139
  if (!isHandoff && AcceleratedAnimation.supports(options)) {
@@ -3066,6 +3163,9 @@ function setTarget(visualElement, definition) {
3066
3163
  setMotionValue(visualElement, key7, value);
3067
3164
  }
3068
3165
  }
3166
+ function getOptimisedAppearId(visualElement) {
3167
+ return visualElement.getProps()[optimizedAppearDataAttribute];
3168
+ }
3069
3169
  function shouldBlockAnimation({ protectedKeys, needsAnimating, }, key7) {
3070
3170
  const shouldBlock = protectedKeys.hasOwnProperty(key7) && needsAnimating[key7] !== true;
3071
3171
  needsAnimating[key7] = false;
@@ -3088,8 +3188,7 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
3088
3188
  const valueTransition = Object.assign({ delay: delay2, elapsed: 0 }, getValueTransition(transition || {}, key7));
3089
3189
  let isHandoff = false;
3090
3190
  if (window.HandoffAppearAnimations) {
3091
- const props = visualElement.getProps();
3092
- const appearId = props[optimizedAppearDataAttribute];
3191
+ const appearId = getOptimisedAppearId(visualElement);
3093
3192
  if (appearId) {
3094
3193
  const elapsed = window.HandoffAppearAnimations(appearId, key7, value, frame);
3095
3194
  if (elapsed !== null) {
@@ -3593,7 +3692,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3593
3692
  willChange.add(key7);
3594
3693
  }
3595
3694
  if (false) {
3596
- warnOnce(nextValue.version === '11.2.6', `Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.6 may not work as expected.`);
3695
+ warnOnce(nextValue.version === '11.2.10', `Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.10 may not work as expected.`);
3597
3696
  }
3598
3697
  }
3599
3698
  else if (isMotionValue(prevValue)) {
@@ -5858,6 +5957,24 @@ function resetDistortingTransform(key7, visualElement, values, sharedAnimationVa
5858
5957
  }
5859
5958
  }
5860
5959
  }
5960
+ function isOptimisedAppearTree(projectionNode) {
5961
+ projectionNode.hasCheckedOptimisedAppear = true;
5962
+ if (projectionNode.root === projectionNode)
5963
+ return false;
5964
+ const { visualElement, } = projectionNode.options;
5965
+ if (!visualElement) {
5966
+ return false;
5967
+ }
5968
+ else if (getOptimisedAppearId(visualElement)) {
5969
+ return true;
5970
+ }
5971
+ else if (projectionNode.parent && !projectionNode.parent.hasCheckedOptimisedAppear) {
5972
+ return isOptimisedAppearTree(projectionNode.parent);
5973
+ }
5974
+ else {
5975
+ return false;
5976
+ }
5977
+ }
5861
5978
  function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {
5862
5979
  return class ProjectionNode {
5863
5980
  constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {
@@ -5877,6 +5994,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
5877
5994
  this.isSVG = false;
5878
5995
  this.needsReset = false;
5879
5996
  this.shouldResetTransform = false;
5997
+ this.hasCheckedOptimisedAppear = false;
5880
5998
  this.treeScale = {
5881
5999
  x: 1,
5882
6000
  y: 1,
@@ -6025,9 +6143,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6025
6143
  if (this.isUpdateBlocked())
6026
6144
  return;
6027
6145
  this.isUpdating = true;
6028
- if (window.HandoffCancelAllAnimations) {
6029
- window.HandoffCancelAllAnimations();
6030
- }
6031
6146
  this.nodes && this.nodes.forEach(resetSkewAndRotation);
6032
6147
  this.animationId++;
6033
6148
  }
@@ -6041,6 +6156,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6041
6156
  this.options.onExitComplete && this.options.onExitComplete();
6042
6157
  return;
6043
6158
  }
6159
+ if (window.HandoffCancelAllAnimations && isOptimisedAppearTree(this)) {
6160
+ window.HandoffCancelAllAnimations();
6161
+ }
6044
6162
  !this.root.isUpdating && this.root.startUpdate();
6045
6163
  if (this.isLayoutDirty)
6046
6164
  return;
@@ -6630,16 +6748,16 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6630
6748
  if (!this.isVisible) {
6631
6749
  return hiddenVisibility;
6632
6750
  }
6633
- const styles = {
6751
+ const styles2 = {
6634
6752
  visibility: '',
6635
6753
  };
6636
6754
  const transformTemplate2 = this.getTransformTemplate();
6637
6755
  if (this.needsReset) {
6638
6756
  this.needsReset = false;
6639
- styles.opacity = '';
6640
- styles.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || '';
6641
- styles.transform = transformTemplate2 ? transformTemplate2(this.latestValues, '') : 'none';
6642
- return styles;
6757
+ styles2.opacity = '';
6758
+ styles2.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || '';
6759
+ styles2.transform = transformTemplate2 ? transformTemplate2(this.latestValues, '') : 'none';
6760
+ return styles2;
6643
6761
  }
6644
6762
  const lead = this.getLead();
6645
6763
  if (!this.projectionDelta || !this.layout || !lead.target) {
@@ -6657,14 +6775,14 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6657
6775
  }
6658
6776
  const valuesToRender = lead.animationValues || lead.latestValues;
6659
6777
  this.applyTransformsToTarget();
6660
- styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
6778
+ styles2.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
6661
6779
  if (transformTemplate2) {
6662
- styles.transform = transformTemplate2(valuesToRender, styles.transform);
6780
+ styles2.transform = transformTemplate2(valuesToRender, styles2.transform);
6663
6781
  }
6664
6782
  const { x, y, } = this.projectionDelta;
6665
- styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
6783
+ styles2.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
6666
6784
  if (lead.animationValues) {
6667
- styles.opacity = lead === this
6785
+ styles2.opacity = lead === this
6668
6786
  ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0
6669
6787
  ? _b
6670
6788
  : 1
@@ -6673,7 +6791,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6673
6791
  : valuesToRender.opacityExit;
6674
6792
  }
6675
6793
  else {
6676
- styles.opacity = lead === this
6794
+ styles2.opacity = lead === this
6677
6795
  ? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : ''
6678
6796
  : valuesToRender.opacityExit !== void 0
6679
6797
  ? valuesToRender.opacityExit
@@ -6683,23 +6801,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6683
6801
  if (valuesToRender[key7] === void 0)
6684
6802
  continue;
6685
6803
  const { correct, applyTo, } = scaleCorrectors[key7];
6686
- const corrected = styles.transform === 'none' ? valuesToRender[key7] : correct(valuesToRender[key7], lead);
6804
+ const corrected = styles2.transform === 'none' ? valuesToRender[key7] : correct(valuesToRender[key7], lead);
6687
6805
  if (applyTo) {
6688
6806
  const num = applyTo.length;
6689
6807
  for (let i = 0; i < num; i++) {
6690
- styles[applyTo[i]] = corrected;
6808
+ styles2[applyTo[i]] = corrected;
6691
6809
  }
6692
6810
  }
6693
6811
  else {
6694
- styles[key7] = corrected;
6812
+ styles2[key7] = corrected;
6695
6813
  }
6696
6814
  }
6697
6815
  if (this.options.layoutId) {
6698
- styles.pointerEvents = lead === this
6816
+ styles2.pointerEvents = lead === this
6699
6817
  ? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || ''
6700
6818
  : 'none';
6701
6819
  }
6702
- return styles;
6820
+ return styles2;
6703
6821
  }
6704
6822
  clearSnapshot() {
6705
6823
  this.resumeFrom = this.snapshot = void 0;
@@ -8175,97 +8293,6 @@ var wrap = (min, max, v) => {
8175
8293
  const rangeSize = max - min;
8176
8294
  return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
8177
8295
  };
8178
- function observeTimeline(update, timeline) {
8179
- let prevProgress;
8180
- const onFrame = () => {
8181
- const { currentTime, } = timeline;
8182
- const percentage = currentTime === null ? 0 : currentTime.value;
8183
- const progress2 = percentage / 100;
8184
- if (prevProgress !== progress2) {
8185
- update(progress2);
8186
- }
8187
- prevProgress = progress2;
8188
- };
8189
- frame.update(onFrame, true);
8190
- return () => cancelFrame(onFrame);
8191
- }
8192
- var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
8193
- var GroupPlaybackControls = class {
8194
- constructor(animations2) {
8195
- this.animations = animations2.filter(Boolean);
8196
- }
8197
- then(onResolve, onReject) {
8198
- return Promise.all(this.animations).then(onResolve).catch(onReject);
8199
- }
8200
- /**
8201
- * TODO: Filter out cancelled or stopped animations before returning
8202
- */
8203
- getAll(propName) {
8204
- return this.animations[0][propName];
8205
- }
8206
- setAll(propName, newValue) {
8207
- for (let i = 0; i < this.animations.length; i++) {
8208
- this.animations[i][propName] = newValue;
8209
- }
8210
- }
8211
- attachTimeline(timeline) {
8212
- const cancelAll = this.animations.map((animation) => {
8213
- if (supportsScrollTimeline() && animation.attachTimeline) {
8214
- animation.attachTimeline(timeline);
8215
- }
8216
- else {
8217
- animation.pause();
8218
- return observeTimeline((progress2) => {
8219
- animation.time = animation.duration * progress2;
8220
- }, timeline);
8221
- }
8222
- });
8223
- return () => {
8224
- cancelAll.forEach((cancelTimeline, i) => {
8225
- if (cancelTimeline)
8226
- cancelTimeline();
8227
- this.animations[i].stop();
8228
- });
8229
- };
8230
- }
8231
- get time() {
8232
- return this.getAll('time');
8233
- }
8234
- set time(time2) {
8235
- this.setAll('time', time2);
8236
- }
8237
- get speed() {
8238
- return this.getAll('speed');
8239
- }
8240
- set speed(speed) {
8241
- this.setAll('speed', speed);
8242
- }
8243
- get duration() {
8244
- let max = 0;
8245
- for (let i = 0; i < this.animations.length; i++) {
8246
- max = Math.max(max, this.animations[i].duration);
8247
- }
8248
- return max;
8249
- }
8250
- runAll(methodName) {
8251
- this.animations.forEach((controls) => controls[methodName]());
8252
- }
8253
- play() {
8254
- this.runAll('play');
8255
- }
8256
- pause() {
8257
- this.runAll('pause');
8258
- }
8259
- stop() {
8260
- this.runAll('stop');
8261
- }
8262
- cancel() {
8263
- this.runAll('cancel');
8264
- }
8265
- complete() {
8266
- this.runAll('complete');
8267
- }
8268
- };
8269
8296
  function isDOMKeyframes(keyframes2) {
8270
8297
  return typeof keyframes2 === 'object' && !Array.isArray(keyframes2);
8271
8298
  }
@@ -8963,7 +8990,7 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
8963
8990
  acc[key7] = (process2) => cancelFrame(process2);
8964
8991
  return acc;
8965
8992
  }, {});
8966
- // https :https://app.framerstatic.com/framer.W4GEXVYP.js
8993
+ // https :https://app.framerstatic.com/framer.IBCXHSKM.js
8967
8994
  import React4 from 'react';
8968
8995
  import { startTransition as startTransition2, } from 'react';
8969
8996
  import { Suspense as Suspense2, } from 'react';
@@ -10094,11 +10121,11 @@ var require_resize_observer_umd = __commonJS({
10094
10121
  };
10095
10122
  return Scheduler2;
10096
10123
  }();
10097
- var scheduler = new Scheduler();
10124
+ var scheduler2 = new Scheduler();
10098
10125
  var updateCount = function (n) {
10099
- !watching && n > 0 && scheduler.start();
10126
+ !watching && n > 0 && scheduler2.start();
10100
10127
  watching += n;
10101
- !watching && scheduler.stop();
10128
+ !watching && scheduler2.stop();
10102
10129
  };
10103
10130
  var skipNotifyOnElement = function (target) {
10104
10131
  return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === 'inline';
@@ -10156,7 +10183,7 @@ var require_resize_observer_umd = __commonJS({
10156
10183
  firstObservation && resizeObservers.push(detail);
10157
10184
  detail.observationTargets.push(new ResizeObservation(target, options && options.box));
10158
10185
  updateCount(1);
10159
- scheduler.schedule();
10186
+ scheduler2.schedule();
10160
10187
  }
10161
10188
  };
10162
10189
  ResizeObserverController2.unobserve = function (resizeObserver, target) {
@@ -10895,11 +10922,8 @@ function lazy(factory) {
10895
10922
  let factoryPromise;
10896
10923
  let LoadedComponent;
10897
10924
  const Component15 = React4.forwardRef(function LazyWithPreload(props, ref) {
10898
- return React4.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, Object.assign(ref
10899
- ? {
10900
- ref,
10901
- }
10902
- : {}, props));
10925
+ return React4.createElement(LoadedComponent !== null && LoadedComponent !== void 0 ? LoadedComponent : LazyComponent, ref
10926
+ ? Object.assign({ ref }, props) : props);
10903
10927
  });
10904
10928
  Component15.preload = () => {
10905
10929
  if (!factoryPromise) {
@@ -10924,7 +10948,24 @@ function getRouteElementId(route, hash2) {
10924
10948
  return void 0;
10925
10949
  }
10926
10950
  function isBot(userAgent) {
10927
- return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/i.test(userAgent);
10951
+ return /bot|Mediapartners-Google|Google-PageRenderer|yandex|ia_archiver/iu.test(userAgent);
10952
+ }
10953
+ function yieldToMain(isHighPriority) {
10954
+ if ('scheduler' in window) {
10955
+ const options = {
10956
+ priority: isHighPriority ? 'user-blocking' : 'user-visible',
10957
+ };
10958
+ if ('yield' in scheduler)
10959
+ return scheduler.yield(options);
10960
+ if ('postTask' in scheduler)
10961
+ return scheduler.postTask(() => { }, options);
10962
+ }
10963
+ if (isHighPriority) {
10964
+ return Promise.resolve();
10965
+ }
10966
+ return new Promise((resolve) => {
10967
+ setTimeout(resolve, 0);
10968
+ });
10928
10969
  }
10929
10970
  function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
10930
10971
  return __awaiter(this, void 0, void 0, function* () {
@@ -11534,19 +11575,20 @@ function switchLocale(options) {
11534
11575
  routeId: options.routeId,
11535
11576
  pathVariables: result.pathVariables,
11536
11577
  localeId: options.nextLocale.id,
11537
- paginationInfo: options.paginationInfo,
11578
+ paginationInfo: window.history.state.paginationInfo,
11538
11579
  }, result.path);
11539
11580
  }
11540
11581
  catch (_f) { }
11541
11582
  return result;
11542
11583
  });
11543
11584
  }
11544
- function pushLoadMoreHistory(paginationInfo) {
11585
+ function pushLoadMoreHistory(hash2, paginationInfo) {
11545
11586
  try {
11546
11587
  const currentHistoryState = window.history.state;
11547
11588
  if (!isHistoryState(currentHistoryState))
11548
11589
  return;
11549
- replaceHistoryState(Object.assign(Object.assign({}, currentHistoryState), { paginationInfo }));
11590
+ const newPaginationInfo = Object.assign(Object.assign({}, currentHistoryState.paginationInfo), { [hash2]: paginationInfo });
11591
+ replaceHistoryState(Object.assign(Object.assign({}, currentHistoryState), { paginationInfo: newPaginationInfo }));
11550
11592
  }
11551
11593
  catch (_f) { }
11552
11594
  }
@@ -11617,17 +11659,80 @@ function turnOnReactEventHandling() {
11617
11659
  eventsToStop.forEach((event) => document.body.removeEventListener(event, stopFn, options));
11618
11660
  eventsToStop = void 0;
11619
11661
  }
11620
- var hydrated = false;
11621
- function OnHydrationEnd({ addHydrationEndMarker, turnOffEventHandlerHack, }) {
11662
+ function measureSafe(name, start, end) {
11663
+ try {
11664
+ performance.measure(name, start, end);
11665
+ }
11666
+ catch (e) {
11667
+ console.warn(`Could not measure ${name}`, e);
11668
+ }
11669
+ }
11670
+ var hydrationEffectHasRun = false;
11671
+ var hydrationInsertionEffectHasRun = false;
11672
+ var hydrationLayoutEffectHasRun = false;
11673
+ function OnHydrationEnd({ addHydrationMarkers, turnOffEventHandlerHack, }) {
11674
+ const hydrationMarkPrefix = 'framer-hydration-';
11675
+ const hydrationStart = `${hydrationMarkPrefix}start`;
11676
+ const hydrationRenderEnd = `${hydrationMarkPrefix}render-end`;
11677
+ const hydrationLayoutEffectsEnd = `${hydrationMarkPrefix}layout-effects-end`;
11678
+ const hydrationEffectsEnd = `${hydrationMarkPrefix}effects-end`;
11679
+ const hydrationFP = `${hydrationMarkPrefix}first-paint`;
11680
+ useInsertionEffect(() => {
11681
+ if (hydrationInsertionEffectHasRun)
11682
+ return;
11683
+ hydrationInsertionEffectHasRun = true;
11684
+ if (addHydrationMarkers) {
11685
+ performance.mark(hydrationRenderEnd);
11686
+ measureSafe(`${hydrationMarkPrefix}render`, hydrationStart, hydrationRenderEnd);
11687
+ }
11688
+ }, []);
11622
11689
  useLayoutEffect(() => {
11623
- if (hydrated)
11690
+ if (hydrationLayoutEffectHasRun)
11691
+ return;
11692
+ hydrationLayoutEffectHasRun = true;
11693
+ if (addHydrationMarkers) {
11694
+ performance.mark(hydrationLayoutEffectsEnd);
11695
+ measureSafe(`${hydrationMarkPrefix}layout-effects`, hydrationRenderEnd, hydrationLayoutEffectsEnd);
11696
+ }
11697
+ requestAnimationFrame(() => {
11698
+ var _a, _b, _c;
11699
+ const browserRenderStart = `${hydrationMarkPrefix}browser-render-start`;
11700
+ if (addHydrationMarkers) {
11701
+ performance.mark(browserRenderStart);
11702
+ measureSafe(`${hydrationMarkPrefix}uho`, (_b = (_a = performance.getEntriesByName(hydrationEffectsEnd)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null &&
11703
+ _b !== void 0
11704
+ ? _b
11705
+ : (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd)[0]) === null || _c === void 0
11706
+ ? void 0
11707
+ : _c.name, browserRenderStart);
11708
+ }
11709
+ setTimeout(() => {
11710
+ if (turnOffEventHandlerHack) {
11711
+ turnOnReactEventHandling();
11712
+ }
11713
+ if (addHydrationMarkers) {
11714
+ performance.mark(hydrationFP);
11715
+ measureSafe(`${hydrationMarkPrefix}time-to-first-paint`, hydrationStart, hydrationFP);
11716
+ measureSafe(`${hydrationMarkPrefix}browser-render`, browserRenderStart, hydrationFP);
11717
+ }
11718
+ }, 0);
11719
+ });
11720
+ }, []);
11721
+ useEffect(() => {
11722
+ var _a, _b, _c;
11723
+ if (hydrationEffectHasRun)
11624
11724
  return;
11625
- hydrated = true;
11626
- if (turnOffEventHandlerHack)
11725
+ hydrationEffectHasRun = true;
11726
+ if (turnOffEventHandlerHack) {
11627
11727
  turnOnReactEventHandling();
11628
- if (addHydrationEndMarker) {
11629
- performance.mark('framer-hydration-end');
11630
- performance.measure('framer-hydration', 'framer-hydration-start', 'framer-hydration-end');
11728
+ }
11729
+ if (addHydrationMarkers) {
11730
+ performance.mark(hydrationEffectsEnd);
11731
+ measureSafe(`${hydrationMarkPrefix}effects`, (_b = (_a = performance.getEntriesByName(hydrationFP)[0]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0
11732
+ ? _b
11733
+ : (_c = performance.getEntriesByName(hydrationLayoutEffectsEnd)[0]) === null || _c === void 0
11734
+ ? void 0
11735
+ : _c.name, hydrationEffectsEnd);
11631
11736
  }
11632
11737
  }, []);
11633
11738
  return null;
@@ -11702,25 +11807,15 @@ function SuspenseThatPreservesDom({ children, }) {
11702
11807
  });
11703
11808
  }
11704
11809
  var defaultLocaleId = 'default';
11705
- var noopAsync = () => __awaiter(void 0, void 0, void 0, function* () { });
11706
- var defaultCollectionListPaginationInfo = {
11707
- paginationInfo: void 0,
11708
- setPaginationInfo: noopAsync,
11709
- loadMore: noopAsync,
11710
- };
11711
- var CollectionListPaginationInfoContext = /* @__PURE__ */ React4.createContext(defaultCollectionListPaginationInfo);
11712
- function useCollectionListPaginationInfo() {
11713
- return React4.useContext(CollectionListPaginationInfoContext);
11714
- }
11715
11810
  function useForceUpdate2() {
11716
11811
  const [_, setForcedRenderCount,] = React4.useState(0);
11717
11812
  return [_, React4.useCallback(() => setForcedRenderCount((v) => v + 1), []),];
11718
11813
  }
11719
- var noopAsync2 = () => __awaiter(void 0, void 0, void 0, function* () { });
11814
+ var noopAsync = () => __awaiter(void 0, void 0, void 0, function* () { });
11720
11815
  var defaultLocaleInfo = {
11721
11816
  activeLocale: null,
11722
11817
  locales: [],
11723
- setLocale: noopAsync2,
11818
+ setLocale: noopAsync,
11724
11819
  };
11725
11820
  var LocaleInfoContext = /* @__PURE__ */ React4.createContext(defaultLocaleInfo);
11726
11821
  function useLocaleInfo() {
@@ -11785,8 +11880,7 @@ function useScheduleRenderSideEffects(dep) {
11785
11880
  actions.current.push(cb);
11786
11881
  }, []);
11787
11882
  }
11788
- function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = [], preserveQueryParams = false, enableImproveInpDuringHydration = false, shouldMarkHydrationEnd = false, }) {
11789
- var _a, _b;
11883
+ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = [], preserveQueryParams = false, enableImproveInpDuringHydration = false, addHydrationMarkers = false, }) {
11790
11884
  useReplaceInitialState({
11791
11885
  disabled: disableHistory,
11792
11886
  routeId: initialRoute,
@@ -11800,41 +11894,16 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11800
11894
  const currentLocaleIdRef = React4.useRef(initialLocaleId);
11801
11895
  const currentLocaleId = currentLocaleIdRef.current;
11802
11896
  const activeLocale = React4.useMemo(() => {
11803
- var _a2;
11804
- return (_a2 = locales.find(({ id: id3, }) => {
11897
+ var _a;
11898
+ return (_a = locales.find(({ id: id3, }) => {
11805
11899
  if (!currentLocaleId)
11806
11900
  return id3 === defaultLocaleId;
11807
11901
  return id3 === currentLocaleId;
11808
- })) !== null && _a2 !== void 0
11809
- ? _a2
11902
+ })) !== null && _a !== void 0
11903
+ ? _a
11810
11904
  : null;
11811
11905
  }, [currentLocaleId, locales,]);
11812
11906
  const [dep, forceUpdate,] = useForceUpdate2();
11813
- const [paginationInfo, setPaginationInfo,] = React4.useState(typeof window !== 'undefined'
11814
- ? (_b = (_a = window === null || window === void 0 ? void 0 : window.history) === null || _a === void 0 ? void 0 : _a.state) ===
11815
- null || _b === void 0
11816
- ? void 0
11817
- : _b.pagination
11818
- : void 0);
11819
- const collectionListPaginationInfo = React4.useMemo(() => {
11820
- return {
11821
- paginationInfo,
11822
- setPaginationInfo: (newPaginationInfo) => __awaiter(this, void 0, void 0, function* () {
11823
- startTransition2(() => {
11824
- setPaginationInfo(newPaginationInfo);
11825
- });
11826
- }),
11827
- loadMore: () => __awaiter(this, void 0, void 0, function* () {
11828
- if ((paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.type) !== 'loadMore')
11829
- return;
11830
- const newPaginationInfo = Object.assign(Object.assign({}, paginationInfo), { currentPage: paginationInfo.currentPage + 1 });
11831
- pushLoadMoreHistory(newPaginationInfo);
11832
- startTransition2(() => {
11833
- setPaginationInfo(newPaginationInfo);
11834
- });
11835
- }),
11836
- };
11837
- }, [paginationInfo,]);
11838
11907
  const localeInfo = React4.useMemo(() => {
11839
11908
  return {
11840
11909
  activeLocale,
@@ -11865,7 +11934,6 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11865
11934
  pathVariables: currentPathVariablesRef.current,
11866
11935
  collectionUtils,
11867
11936
  preserveQueryParams,
11868
- paginationInfo,
11869
11937
  });
11870
11938
  if (!localeResult)
11871
11939
  return;
@@ -11877,17 +11945,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11877
11945
  catch (_f) { }
11878
11946
  }),
11879
11947
  };
11880
- }, [
11881
- activeLocale,
11882
- collectionUtils,
11883
- forceUpdate,
11884
- locales,
11885
- monitorNextRender,
11886
- paginationInfo,
11887
- preserveQueryParams,
11888
- routes,
11889
- startViewTransition2,
11890
- ]);
11948
+ }, [activeLocale, collectionUtils, forceUpdate, locales, monitorNextRender, preserveQueryParams, routes, startViewTransition2,]);
11891
11949
  const scheduleSideEffect = useScheduleRenderSideEffects(dep);
11892
11950
  const setCurrentRouteId = React4.useCallback((routeId, localeId, hash2, pathVariables, smoothScroll = false, isHistoryTransition = false) => {
11893
11951
  currentRouteRef.current = routeId;
@@ -11901,11 +11959,11 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11901
11959
  }, [forceUpdate, monitorNextRender, scheduleSideEffect,]);
11902
11960
  usePopStateHandler(currentRouteRef, setCurrentRouteId);
11903
11961
  const navigate = React4.useCallback((routeId, hash2, pathVariables, smoothScroll) => {
11904
- var _a2, _b2;
11962
+ var _a, _b;
11905
11963
  const newRoute = routes[routeId];
11906
11964
  if (pathVariables) {
11907
11965
  const inUse = /* @__PURE__ */ new Set();
11908
- const path = (_a2 = newRoute === null || newRoute === void 0 ? void 0 : newRoute.path) !== null && _a2 !== void 0 ? _a2 : '/';
11966
+ const path = (_a = newRoute === null || newRoute === void 0 ? void 0 : newRoute.path) !== null && _a !== void 0 ? _a : '/';
11909
11967
  for (const match of path.matchAll(pathVariablesRegExp)) {
11910
11968
  const usedVariable = match[1];
11911
11969
  if (usedVariable === void 0) {
@@ -11923,7 +11981,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11923
11981
  routeId,
11924
11982
  pathVariables,
11925
11983
  })) {
11926
- if (((_b2 = window.history.state) === null || _b2 === void 0 ? void 0 : _b2.hash) !== hash2) {
11984
+ if (((_b = window.history.state) === null || _b === void 0 ? void 0 : _b.hash) !== hash2) {
11927
11985
  if (!disableHistory) {
11928
11986
  const route = routes[routeId];
11929
11987
  if (route) {
@@ -11982,26 +12040,23 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
11982
12040
  api,
11983
12041
  children: jsx(LocaleInfoContext.Provider, {
11984
12042
  value: localeInfo,
11985
- children: jsx(CollectionListPaginationInfoContext.Provider, {
11986
- value: collectionListPaginationInfo,
11987
- children: jsxs(SuspenseThatPreservesDom, {
11988
- children: [
11989
- jsx(ErrorBoundary, {
11990
- notFoundPage,
11991
- defaultPageStyle,
11992
- forceUpdateKey: dep,
11993
- children: jsx(React4.Fragment, {
11994
- children: pageExistsInCurrentLocale
11995
- ? renderPage(current.page, defaultPageStyle)
11996
- : notFoundPage && renderPage(notFoundPage, defaultPageStyle),
11997
- }, remountKey),
11998
- }),
11999
- jsx(OnHydrationEnd, {
12000
- addHydrationEndMarker: shouldMarkHydrationEnd,
12001
- turnOffEventHandlerHack: enableImproveInpDuringHydration,
12002
- }),
12003
- ],
12004
- }),
12043
+ children: jsxs(SuspenseThatPreservesDom, {
12044
+ children: [
12045
+ jsx(ErrorBoundary, {
12046
+ notFoundPage,
12047
+ defaultPageStyle,
12048
+ forceUpdateKey: dep,
12049
+ children: jsx(React4.Fragment, {
12050
+ children: pageExistsInCurrentLocale
12051
+ ? renderPage(current.page, defaultPageStyle)
12052
+ : notFoundPage && renderPage(notFoundPage, defaultPageStyle),
12053
+ }, remountKey),
12054
+ }),
12055
+ jsx(OnHydrationEnd, {
12056
+ addHydrationMarkers,
12057
+ turnOffEventHandlerHack: enableImproveInpDuringHydration,
12058
+ }),
12059
+ ],
12005
12060
  }),
12006
12061
  }),
12007
12062
  });
@@ -12187,22 +12242,30 @@ function useRoute(routeId) {
12187
12242
  var shouldPreloadBasedOnUA = /* @__PURE__ */ (() => typeof window !== 'undefined' && !isBot(navigator.userAgent))();
12188
12243
  function useRoutePreloader(routeIds, enabled = true) {
12189
12244
  const { getRoute, } = useRouter();
12190
- React4.useEffect(() => {
12245
+ useEffect(() => {
12191
12246
  if (!getRoute || !enabled || !shouldPreloadBasedOnUA)
12192
12247
  return;
12193
12248
  for (const routeId of routeIds) {
12194
- const route = getRoute(routeId);
12195
- if (route === null || route === void 0 ? void 0 : route.page)
12196
- preloadComponent(route.page);
12249
+ void preloadRoute(getRoute(routeId));
12197
12250
  }
12198
12251
  }, [routeIds, getRoute, enabled,]);
12199
12252
  }
12200
- function preloadComponent(component) {
12201
- if (!shouldPreloadBasedOnUA)
12202
- return;
12203
- if (isLazyComponentType(component)) {
12204
- void component.preload();
12205
- }
12253
+ function preloadRoute(route) {
12254
+ return __awaiter(this, void 0, void 0, function* () {
12255
+ if (!shouldPreloadBasedOnUA || !route)
12256
+ return;
12257
+ const component = route.page;
12258
+ if (!component || !isLazyComponentType(component))
12259
+ return;
12260
+ yield yieldToMain();
12261
+ try {
12262
+ yield component.preload();
12263
+ }
12264
+ catch (e) {
12265
+ if (false)
12266
+ console.warn('Preload failed', route, e);
12267
+ }
12268
+ });
12206
12269
  }
12207
12270
  function useRouteAnchor(routeId, { elementId, hash: linkHash, } = {}) {
12208
12271
  const { navigate, currentPathVariables, preserveQueryParams, } = useRouter();
@@ -17697,8 +17760,8 @@ function injectComponentCSSRules() {
17697
17760
  if (didInject)
17698
17761
  return;
17699
17762
  didInject = true;
17700
- const styles = RenderTarget.current() === RenderTarget.preview ? combinedCSSRulesForPreview : combinedCSSRules;
17701
- for (const rule of styles) {
17763
+ const styles2 = RenderTarget.current() === RenderTarget.preview ? combinedCSSRulesForPreview : combinedCSSRules;
17764
+ for (const rule of styles2) {
17702
17765
  injectCSSRule(rule, void 0, void 0);
17703
17766
  }
17704
17767
  }
@@ -19769,26 +19832,26 @@ function backgroundImageFromProps(props) {
19769
19832
  return applyForwardOverrides(backgroundImage, props);
19770
19833
  }
19771
19834
  function collectBorderStyleForProps(props, style, collapseEqualBorders = true) {
19772
- const { borderWidth, borderStyle, borderColor, } = props;
19773
- if (!borderWidth) {
19835
+ const { borderWidth: borderWidth2, borderStyle, borderColor, } = props;
19836
+ if (!borderWidth2) {
19774
19837
  return;
19775
19838
  }
19776
19839
  let borderTop;
19777
19840
  let borderBottom;
19778
19841
  let borderLeft;
19779
19842
  let borderRight;
19780
- if (typeof borderWidth === 'number') {
19843
+ if (typeof borderWidth2 === 'number') {
19781
19844
  borderTop =
19782
19845
  borderBottom =
19783
19846
  borderLeft =
19784
19847
  borderRight =
19785
- borderWidth;
19848
+ borderWidth2;
19786
19849
  }
19787
19850
  else {
19788
- borderTop = borderWidth.top || 0;
19789
- borderBottom = borderWidth.bottom || 0;
19790
- borderLeft = borderWidth.left || 0;
19791
- borderRight = borderWidth.right || 0;
19851
+ borderTop = borderWidth2.top || 0;
19852
+ borderBottom = borderWidth2.bottom || 0;
19853
+ borderLeft = borderWidth2.left || 0;
19854
+ borderRight = borderWidth2.right || 0;
19792
19855
  }
19793
19856
  if (borderTop === 0 && borderBottom === 0 && borderLeft === 0 && borderRight === 0) {
19794
19857
  return;
@@ -19832,7 +19895,7 @@ function Border(props) {
19832
19895
  });
19833
19896
  }
19834
19897
  function htmlElementAsMotionComponent(asElem) {
19835
- return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion(asElem) : motion['div'];
19898
+ return asElem && asElem !== 'search' && asElem !== 'slot' && asElem !== 'template' ? motion[asElem] : motion['div'];
19836
19899
  }
19837
19900
  var isChrome2 = /* @__PURE__ */ isChrome();
19838
19901
  function layoutHintDataPropsForCenter(center) {
@@ -19869,23 +19932,7 @@ function processOverrideForwarding(props, children) {
19869
19932
  };
19870
19933
  }
19871
19934
  }
19872
- let _forwardedOverrides = props._forwardedOverrides;
19873
- const extractions = props._overrideForwardingDescription;
19874
- if (extractions) {
19875
- _forwardedOverrides = void 0;
19876
- for (const key7 in extractions) {
19877
- const propName = extractions[key7];
19878
- const value = props[propName];
19879
- if (value !== void 0) {
19880
- if (!_forwardedOverrides) {
19881
- _forwardedOverrides = {};
19882
- props = Object.assign({}, props);
19883
- }
19884
- _forwardedOverrides[key7] = props[propName];
19885
- delete props[propName];
19886
- }
19887
- }
19888
- }
19935
+ const _forwardedOverrides = props._forwardedOverrides;
19889
19936
  if (!_forwardedOverrides) {
19890
19937
  return {
19891
19938
  props,
@@ -23017,7 +23064,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
23017
23064
  }
23018
23065
  render() {
23019
23066
  countNodeRender();
23020
- const { visible, id: id3, className, } = this.props;
23067
+ const { visible, id: id3, className: className2, } = this.props;
23021
23068
  if (!visible) {
23022
23069
  return null;
23023
23070
  }
@@ -23031,7 +23078,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
23031
23078
  id: id3,
23032
23079
  style,
23033
23080
  ref: this.setElement,
23034
- className,
23081
+ className: className2,
23035
23082
  children: [
23036
23083
  /* @__PURE__ */ jsx(ProvideParentSize, {
23037
23084
  parentSize,
@@ -23042,19 +23089,7 @@ var DeprecatedFrame = /* @__PURE__ */ (() => {
23042
23089
  });
23043
23090
  }
23044
23091
  layoutChildren() {
23045
- let _forwardedOverrides = this.props._forwardedOverrides;
23046
- const extractions = this.props._overrideForwardingDescription;
23047
- if (extractions) {
23048
- let added = false;
23049
- _forwardedOverrides = {};
23050
- for (const [key7, value,] of Object.entries(extractions)) {
23051
- added = true;
23052
- _forwardedOverrides[key7] = asRecord(this.props)[value];
23053
- }
23054
- if (!added) {
23055
- _forwardedOverrides = void 0;
23056
- }
23057
- }
23092
+ const _forwardedOverrides = this.props._forwardedOverrides;
23058
23093
  let children = React4.Children.map(this.props.children, (child) => {
23059
23094
  if (isConstraintSupportingChild(child)) {
23060
23095
  return React4.cloneElement(child, {
@@ -24483,17 +24518,14 @@ function backdropTapAction(transition, goBackAction) {
24483
24518
  if (transition.goBackOnTapOutside !== false)
24484
24519
  return goBackAction;
24485
24520
  }
24486
- function NavigationStyleSheet() {
24487
- React4.useInsertionEffect(() => {
24488
- injectComponentCSSRules();
24489
- }, []);
24490
- return null;
24491
- }
24492
24521
  function NavigationWrapper(props) {
24493
24522
  const resetProjection = useResetProjection();
24494
24523
  const skipLayoutAnimation = useInstantLayoutTransition();
24495
- return /* @__PURE__ */ jsxs(Navigation, Object.assign(Object.assign({}, props), { resetProjection,
24496
- skipLayoutAnimation, children: [props.children, /* @__PURE__ */ jsx(NavigationStyleSheet, {}),] }));
24524
+ React4.useInsertionEffect(() => {
24525
+ injectComponentCSSRules();
24526
+ }, []);
24527
+ return /* @__PURE__ */ jsx(Navigation, Object.assign(Object.assign({}, props), { resetProjection,
24528
+ skipLayoutAnimation, children: props.children }));
24497
24529
  }
24498
24530
  var import_hoist_non_react_statics3 = __toESM(require_hoist_non_react_statics_cjs(), 1);
24499
24531
  var NavigateTo = /* @__PURE__ */ ((NavigateTo2) => {
@@ -24584,6 +24616,40 @@ function transitionDirectionToSide(direction) {
24584
24616
  }
24585
24617
  var AnimateSharedLayout = (props) => props.children;
24586
24618
  var Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents);
24619
+ function useInfiniteScroll({ ref: elementRef, loadMore, rootMargin = '0px', threshold, paginationInfo, }) {
24620
+ const callback = React4.useCallback((entries) => {
24621
+ const entry = entries[0];
24622
+ const isIntersecting = entry == null ? void 0 : entry.isIntersecting;
24623
+ if (isIntersecting)
24624
+ loadMore();
24625
+ }, [loadMore,]);
24626
+ React4.useEffect(() => {
24627
+ if (!elementRef.current)
24628
+ return;
24629
+ const observer2 = new IntersectionObserver(callback, {
24630
+ rootMargin,
24631
+ threshold,
24632
+ });
24633
+ observer2.observe(elementRef.current);
24634
+ return () => {
24635
+ observer2.disconnect();
24636
+ };
24637
+ }, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,]);
24638
+ }
24639
+ function withInfiniteScroll(Component15) {
24640
+ return React4.forwardRef((_f, ref) => {
24641
+ var { __paginationInfo, __loadMore } = _f, props = __rest(_f, ["__paginationInfo", "__loadMore"]);
24642
+ const backupRef = React4.useRef(null);
24643
+ const infiniteScrollRef = ref !== null && ref !== void 0 ? ref : backupRef;
24644
+ useInfiniteScroll({
24645
+ rootMargin: '500px',
24646
+ loadMore: __loadMore,
24647
+ ref: infiniteScrollRef,
24648
+ paginationInfo: __paginationInfo,
24649
+ });
24650
+ return /* @__PURE__ */ jsx(Component15, Object.assign(Object.assign({}, props), { ref: infiniteScrollRef }));
24651
+ });
24652
+ }
24587
24653
  var import_process2 = __toESM(require_browser(), 1);
24588
24654
  function debounce(fn, time2) {
24589
24655
  let timeout;
@@ -24739,7 +24805,7 @@ function useSafariGapFix(gap, ref, display) {
24739
24805
  var Stack = /* @__PURE__ */ (() => {
24740
24806
  const StackInner = React4.forwardRef(function StackInner2(stackProps, forwardedRef) {
24741
24807
  var _f, _j;
24742
- const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle } = stackProps, containerProps = __rest(stackProps, ["as", "direction", "distribution", "alignment", "gap", "wrap", "useFlexboxGap", "children", "style", "className", "willChangeTransform", "__fromCodeComponentNode", "parentSize", "__contentWrapperStyle"]);
24808
+ 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 } = stackProps, containerProps = __rest(stackProps, ["as", "direction", "distribution", "alignment", "gap", "wrap", "useFlexboxGap", "children", "style", "className", "willChangeTransform", "__fromCodeComponentNode", "parentSize", "__contentWrapperStyle"]);
24743
24809
  const useFlexboxGap = Boolean(externalUseFlexboxGap || wrap2);
24744
24810
  const stackRef = React4.useRef(null);
24745
24811
  const onBeforeLayoutMeasure = useSafariGapFix(gap, stackRef, 'flex');
@@ -24798,8 +24864,7 @@ var Stack = /* @__PURE__ */ (() => {
24798
24864
  if (styleProp == null ? void 0 : styleProp.height)
24799
24865
  contentWrapperStyle.height = styleProp == null ? void 0 : styleProp.height;
24800
24866
  }
24801
- return /* @__PURE__ */ jsx(FrameWithMotion, Object.assign(Object.assign(Object.assign(Object.assign({ as, background: fromCanvasComponent ? void 0 : 'none' }, props), { layoutId, ref: useForwardedRef(forwardedRef, stackRef) }), attributes), { style,
24802
- className, layoutScroll: true, children: /* @__PURE__ */ jsx(motion.div, {
24867
+ return /* @__PURE__ */ jsx(FrameWithMotion, Object.assign(Object.assign(Object.assign(Object.assign({ as, background: fromCanvasComponent ? void 0 : 'none' }, props), { layoutId, ref: useForwardedRef(forwardedRef, stackRef) }), attributes), { style, className: className2, layoutScroll: true, children: /* @__PURE__ */ jsx(motion.div, {
24803
24868
  'data-framer-stack-content-wrapper': true,
24804
24869
  'data-framer-stack-direction-reverse': isReverse,
24805
24870
  'data-framer-stack-gap-enabled': gapEnabled,
@@ -26957,7 +27022,7 @@ function useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnima
26957
27022
  [offset,]);
26958
27023
  }
26959
27024
  var NativeScroll = /* @__PURE__ */ React4.forwardRef(function NativeScroll2(props, forwardedRef) {
26960
- const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className,
27025
+ const { direction = 'vertical', scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className: className2,
26961
27026
  // Not (yet) supported
26962
27027
  directionLock: _directionLock = false, wheelEnabled: _wheelEnabled = true, scrollAnimate: _scrollAnimate, dragTransition: _dragTransition, dragMomentum: _dragMomentum, dragElastic: _dragElastic, overdragEnabled: _overdragEnabled = true, onScrollStart: _onScrollStart, onScrollEnd: _onScrollEnd, onDragStart: _onDragStart, onDrag: _onDrag, onDragEnd: _onDragEnd, onUpdate: _onUpdate, onDirectionLock: _onDirectionLock, layoutId: specificLayoutId, native: _native } = props,
26963
27028
  // Rest
@@ -27004,7 +27069,7 @@ var NativeScroll = /* @__PURE__ */ React4.forwardRef(function NativeScroll2(prop
27004
27069
  }
27005
27070
  : {};
27006
27071
  return /* @__PURE__ */ jsxs(FrameWithMotion, Object.assign(Object.assign(Object.assign({ ref, 'data-framer-component-type': 'NativeScroll', background: 'none' }, containerProps), size), { onScroll,
27007
- layoutId, onBeforeLayoutMeasure: updateScrollOffsetHandler, layoutScroll: true, className: cx(className, `direction-${direction}`, !scrollBarVisible && 'scrollbar-hidden'), children: [
27072
+ layoutId, onBeforeLayoutMeasure: updateScrollOffsetHandler, layoutScroll: true, className: cx(className2, `direction-${direction}`, !scrollBarVisible && 'scrollbar-hidden'), children: [
27008
27073
  /* @__PURE__ */ jsx(EmptyState, {
27009
27074
  children,
27010
27075
  size: {
@@ -28134,6 +28199,31 @@ function ComponentPresetsConsumer({ componentIdentifier, children, }) {
28134
28199
  const presetProps = (_f = componentPresets[componentIdentifier]) !== null && _f !== void 0 ? _f : {};
28135
28200
  return children(presetProps);
28136
28201
  }
28202
+ function setRef(ref, value) {
28203
+ if (isFunction(ref)) {
28204
+ ref(value);
28205
+ }
28206
+ else if (isMutableRef(ref)) {
28207
+ ref.current = value;
28208
+ }
28209
+ }
28210
+ function isMutableRef(ref) {
28211
+ return isObject2(ref) && 'current' in ref;
28212
+ }
28213
+ function createRefWithCallback(ref, callback) {
28214
+ return {
28215
+ get current() {
28216
+ return ref.current;
28217
+ },
28218
+ set current(value) {
28219
+ ref.current = value;
28220
+ callback(value);
28221
+ },
28222
+ };
28223
+ }
28224
+ function mergeRefs(...refs) {
28225
+ return (value) => refs.forEach((ref) => setRef(ref, value));
28226
+ }
28137
28227
  function useCloneChildrenWithPropsAndRef(forwardedRef) {
28138
28228
  const hook = useConstant2(() => createHook(forwardedRef));
28139
28229
  hook.useSetup(forwardedRef);
@@ -28216,17 +28306,6 @@ function createRefFunction(state) {
28216
28306
  setRef(prevForwardedRef, value);
28217
28307
  };
28218
28308
  }
28219
- function setRef(ref, value) {
28220
- if (isFunction(ref)) {
28221
- ref(value);
28222
- }
28223
- else if (isMutableRef(ref)) {
28224
- ref.current = value;
28225
- }
28226
- }
28227
- function isMutableRef(ref) {
28228
- return isObject2(ref) && 'current' in ref;
28229
- }
28230
28309
  var ComponentViewportContext = /* @__PURE__ */ React4.createContext({});
28231
28310
  function useComponentViewport() {
28232
28311
  return React4.useContext(ComponentViewportContext);
@@ -28323,8 +28402,8 @@ var withCSS = (Component15, escapedCSS, componentSerializationId) => React4.forw
28323
28402
  React4.useInsertionEffect(() => {
28324
28403
  if (componentSerializationId && componentsWithServerRenderedStyles.has(componentSerializationId))
28325
28404
  return;
28326
- const css = Array.isArray(escapedCSS) ? escapedCSS : escapedCSS.split('\n');
28327
- css.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
28405
+ const css2 = Array.isArray(escapedCSS) ? escapedCSS : escapedCSS.split('\n');
28406
+ css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
28328
28407
  }, []);
28329
28408
  return /* @__PURE__ */ jsx(Component15, Object.assign(Object.assign({}, props), { ref }));
28330
28409
  });
@@ -29074,7 +29153,7 @@ function childrenWithOrigin(child, { x, y, }) {
29074
29153
  }
29075
29154
  function Floating(_f) {
29076
29155
  var _j;
29077
- var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } = _f, rest = __rest(_f, ["alignment", "placement", "safeArea", "offsetX", "offsetY", "anchorRef", "className", "children", "portalSelector", "zIndex", "collisionDetection", "collisionDetectionPadding", "onDismiss"]);
29156
+ var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } = _f, rest = __rest(_f, ["alignment", "placement", "safeArea", "offsetX", "offsetY", "anchorRef", "className", "children", "portalSelector", "zIndex", "collisionDetection", "collisionDetectionPadding", "onDismiss"]);
29078
29157
  const floatingPositionRef = React4.useRef(null);
29079
29158
  const safeAreaRef = React4.useRef(null);
29080
29159
  const contentRef = React4.useRef(null);
@@ -29144,7 +29223,7 @@ function Floating(_f) {
29144
29223
  onDismiss,
29145
29224
  });
29146
29225
  return ReactDOM.createPortal(
29147
- /* @__PURE__ */ jsxs('div', Object.assign(Object.assign({ ref: floatingPositionRef, className, style: {
29226
+ /* @__PURE__ */ jsxs('div', Object.assign(Object.assign({ ref: floatingPositionRef, className: className2, style: {
29148
29227
  // Initially rendered as hidden, but the layout effect will set
29149
29228
  // to visible when the position is calculated.
29150
29229
  visibility: 'hidden',
@@ -29329,6 +29408,102 @@ function navigateFromAttributes(navigate, element, implicitPathVariables) {
29329
29408
  navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
29330
29409
  return true;
29331
29410
  }
29411
+ var PRELOAD_AFTER_MS = 500;
29412
+ var OBSERVER_THRESHOLD = 0.9;
29413
+ var LOW_MEMORY_THRESHOLD = 1.7;
29414
+ var MAX_CONCURRENT_PRELOADS_SLOW_NETWORK = 4;
29415
+ var MAX_CONCURRENT_PRELOADS_FAST_NETWORK = Infinity;
29416
+ var nodeToRoute = /* @__PURE__ */ new WeakMap();
29417
+ var preloadedRoutes = /* @__PURE__ */ new Set();
29418
+ var routeToNodesInViewport = /* @__PURE__ */ new Map();
29419
+ function getObserveRouteForPreloadingFn() {
29420
+ var _a;
29421
+ const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || {};
29422
+ const lowDeviceMemory = navigator.deviceMemory && navigator.deviceMemory > LOW_MEMORY_THRESHOLD;
29423
+ let effectiveType, preloadDisabled, maxPreloadAmount;
29424
+ function updateConnection() {
29425
+ effectiveType = connection.effectiveType || '';
29426
+ preloadDisabled = connection.saveData || effectiveType.includes('2g');
29427
+ maxPreloadAmount = effectiveType === '3g' || lowDeviceMemory
29428
+ ? MAX_CONCURRENT_PRELOADS_SLOW_NETWORK
29429
+ : MAX_CONCURRENT_PRELOADS_FAST_NETWORK;
29430
+ }
29431
+ (_a = connection.addEventListener) == null ? void 0 : _a.call(connection, 'change', updateConnection);
29432
+ updateConnection();
29433
+ const observer2 = new IntersectionObserver(onPreloadIntersectionChange, {
29434
+ threshold: OBSERVER_THRESHOLD,
29435
+ });
29436
+ let activePreloadsAmount = 0;
29437
+ function preloadTimeout(route, target) {
29438
+ return __awaiter(this, void 0, void 0, function* () {
29439
+ if (preloadDisabled)
29440
+ return;
29441
+ const nodesInViewport = routeToNodesInViewport.get(route);
29442
+ if (!(nodesInViewport == null ? void 0 : nodesInViewport.size) || preloadedRoutes.has(route))
29443
+ return;
29444
+ ++activePreloadsAmount;
29445
+ preloadedRoutes.add(route);
29446
+ const preloadDone = preloadRoute(route).catch(() => {
29447
+ if (false) {
29448
+ throw new Error('Error in preloadRoute during preloadTimeout. This should never happen as it introduces bugs. Please make sure preloadRoute does not throw.');
29449
+ }
29450
+ });
29451
+ observer2.unobserve(target);
29452
+ nodeToRoute.delete(target);
29453
+ for (const node of nodesInViewport) {
29454
+ observer2.unobserve(node);
29455
+ nodeToRoute.delete(node);
29456
+ }
29457
+ nodesInViewport.clear();
29458
+ routeToNodesInViewport.delete(route);
29459
+ yield preloadDone;
29460
+ --activePreloadsAmount;
29461
+ });
29462
+ }
29463
+ function onPreloadIntersectionChange(entries) {
29464
+ var _f;
29465
+ var _a2;
29466
+ for (const entry of entries) {
29467
+ const target = entry.target;
29468
+ const route = nodeToRoute.get(target);
29469
+ if (!route || preloadedRoutes.has(route)) {
29470
+ observer2.unobserve(target);
29471
+ nodeToRoute.delete(target);
29472
+ continue;
29473
+ }
29474
+ const nodes = routeToNodesInViewport.get(route);
29475
+ const amountOfNodesInViewport = (_f = ((_a2 = routeToNodesInViewport.get(route)) == null ? void 0 : _a2.size)) !== null && _f !== void 0 ? _f : 0;
29476
+ if (entry.isIntersecting) {
29477
+ if (activePreloadsAmount >= maxPreloadAmount)
29478
+ continue;
29479
+ if (nodes)
29480
+ nodes.add(target);
29481
+ else
29482
+ routeToNodesInViewport.set(route, /* @__PURE__ */ new Set([target,]));
29483
+ setTimeout(preloadTimeout.bind(void 0, route, target), PRELOAD_AFTER_MS);
29484
+ }
29485
+ else {
29486
+ if (nodes)
29487
+ nodes.delete(target);
29488
+ if (amountOfNodesInViewport <= 1)
29489
+ routeToNodesInViewport.delete(route);
29490
+ }
29491
+ }
29492
+ }
29493
+ return (route, node) => {
29494
+ if (preloadedRoutes.has(route))
29495
+ return;
29496
+ nodeToRoute.set(node, route);
29497
+ observer2.observe(node);
29498
+ return () => {
29499
+ nodeToRoute.delete(node);
29500
+ observer2.unobserve(node);
29501
+ };
29502
+ };
29503
+ }
29504
+ var observeRouteForPreloading =
29505
+ // this also guards `window`
29506
+ !shouldPreloadBasedOnUA || typeof IntersectionObserver === 'undefined' ? null : /* @__PURE__ */ getObserveRouteForPreloadingFn();
29332
29507
  var noLocale = {};
29333
29508
  var resolveSlugCache = /* @__PURE__ */ new WeakMap();
29334
29509
  function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale) {
@@ -29395,10 +29570,10 @@ function linkFromFramerPageLink(link) {
29395
29570
  };
29396
29571
  }
29397
29572
  var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
29398
- var PathVariablesContext = /* @__PURE__ */ React4.createContext(void 0);
29573
+ var PathVariablesContext = /* @__PURE__ */ createContext(void 0);
29399
29574
  function useImplicitPathVariables() {
29400
29575
  var _a;
29401
- const contextPathVariables = React4.useContext(PathVariablesContext);
29576
+ const contextPathVariables = useContext3(PathVariablesContext);
29402
29577
  const currentPathVariables = (_a = useCurrentRoute()) == null ? void 0 : _a.pathVariables;
29403
29578
  const pathVariables = contextPathVariables || currentPathVariables;
29404
29579
  return pathVariables;
@@ -29422,7 +29597,7 @@ function linkMatchesRoute(route, { webPageId, hash: hash2, pathVariables, }, imp
29422
29597
  }
29423
29598
  function useLinkMatchesRoute(link) {
29424
29599
  const route = useCurrentRoute();
29425
- const contextPathVariables = React4.useContext(PathVariablesContext);
29600
+ const contextPathVariables = useContext3(PathVariablesContext);
29426
29601
  if (!route)
29427
29602
  return false;
29428
29603
  const pageLink = isString22(link) ? linkFromFramerPageLink(link) : link;
@@ -29479,41 +29654,6 @@ function createOnClickLinkHandler(router, routeId, elementId, combinedPathVariab
29479
29654
  (_b = router.navigate) == null ? void 0 : _b.call(router, routeId, elementId, combinedPathVariables, smoothScroll);
29480
29655
  });
29481
29656
  }
29482
- function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll) {
29483
- const isInternal = isInternalURL(href);
29484
- if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
29485
- return propsForLink(href, openInNewTab);
29486
- }
29487
- try {
29488
- const [pathnameWithQueryParams, hash2,] = href.split('#', 2);
29489
- assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.');
29490
- const [pathname,] = pathnameWithQueryParams.split('?', 2);
29491
- assert(pathname !== void 0, 'A href must have a defined pathname.');
29492
- const { routeId, pathVariables, } = inferInitialRouteFromPath(router.routes, pathname);
29493
- const route = router.getRoute(routeId);
29494
- if (route) {
29495
- preloadComponent(route.page);
29496
- const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables);
29497
- const path = getPathForRoute(route, {
29498
- currentRoutePath: currentRoute.path,
29499
- currentPathVariables: currentRoute.pathVariables,
29500
- // The hash value is already fully resolved so we don't need to
29501
- // provide any hashVariables.
29502
- hash: hash2 || void 0,
29503
- pathVariables: combinedPathVariables,
29504
- preserveQueryParams: router.preserveQueryParams,
29505
- });
29506
- const anchorTarget = getTargetAttrValue(openInNewTab, true);
29507
- return {
29508
- href: path,
29509
- target: anchorTarget,
29510
- onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll),
29511
- };
29512
- }
29513
- }
29514
- catch (_f) { }
29515
- return propsForLink(href, openInNewTab);
29516
- }
29517
29657
  function resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, collectionUtils, activeLocale) {
29518
29658
  return __awaiter(this, void 0, void 0, function* () {
29519
29659
  function handleSlugs(unresolvedSlugs) {
@@ -29573,14 +29713,92 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
29573
29713
  }
29574
29714
  return result;
29575
29715
  }
29576
- var Link = /* @__PURE__ */ React4.forwardRef((_f, forwardedRef) => {
29716
+ function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll) {
29717
+ const isInternal = isInternalURL(href);
29718
+ if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
29719
+ return propsForLink(href, openInNewTab);
29720
+ }
29721
+ try {
29722
+ const [pathnameWithQueryParams, hash2,] = href.split('#', 2);
29723
+ assert(pathnameWithQueryParams !== void 0, 'A href must have a defined pathname.');
29724
+ const [pathname,] = pathnameWithQueryParams.split('?', 2);
29725
+ assert(pathname !== void 0, 'A href must have a defined pathname.');
29726
+ const { routeId, pathVariables, } = inferInitialRouteFromPath(router.routes, pathname);
29727
+ const route = router.getRoute(routeId);
29728
+ if (route) {
29729
+ const combinedPathVariables = Object.assign({}, implicitPathVariables, pathVariables);
29730
+ const path = getPathForRoute(route, {
29731
+ currentRoutePath: currentRoute.path,
29732
+ currentPathVariables: currentRoute.pathVariables,
29733
+ // The hash value is already fully resolved so we don't need to
29734
+ // provide any hashVariables.
29735
+ hash: hash2 || void 0,
29736
+ pathVariables: combinedPathVariables,
29737
+ preserveQueryParams: router.preserveQueryParams,
29738
+ });
29739
+ const anchorTarget = getTargetAttrValue(openInNewTab, true);
29740
+ return {
29741
+ href: path,
29742
+ target: anchorTarget,
29743
+ onClick: createOnClickLinkHandler(router, routeId, hash2 || void 0, combinedPathVariables, smoothScroll),
29744
+ };
29745
+ }
29746
+ }
29747
+ catch (_f) { }
29748
+ return propsForLink(href, openInNewTab);
29749
+ }
29750
+ function getRouteFromPageLink(pageLink, router, currentRoute) {
29751
+ var _a;
29752
+ if (isString22(pageLink)) {
29753
+ const isInternal = isInternalURL(pageLink);
29754
+ if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
29755
+ return;
29756
+ }
29757
+ const [pathnameWithQueryParams,] = pageLink.split('#', 2);
29758
+ if (pathnameWithQueryParams === void 0)
29759
+ return;
29760
+ const [pathname,] = pathnameWithQueryParams.split('?', 2);
29761
+ if (pathname === void 0)
29762
+ return;
29763
+ const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
29764
+ return router.getRoute(routeId);
29765
+ }
29766
+ const { webPageId, } = pageLink;
29767
+ return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
29768
+ }
29769
+ var Link = /* @__PURE__ */ forwardRef((_f, forwardedRef) => {
29577
29770
  var { children, href, openInNewTab, smoothScroll } = _f, restProps = __rest(_f, ["children", "href", "openInNewTab", "smoothScroll"]);
29578
29771
  const router = useRouter();
29579
29772
  const currentRoute = useCurrentRoute();
29580
29773
  const implicitPathVariables = useImplicitPathVariables();
29581
29774
  const { activeLocale, } = useLocaleInfo();
29775
+ const fallbackRef = useRef(null);
29776
+ const stableObserverChildRef = useMemo(() => {
29777
+ let cleanupFn;
29778
+ const observerCallback = (node) => {
29779
+ var _a;
29780
+ if (node === null) {
29781
+ cleanupFn == null ? void 0 : cleanupFn();
29782
+ cleanupFn = void 0;
29783
+ return;
29784
+ }
29785
+ const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
29786
+ if (!pageLink)
29787
+ return;
29788
+ const route = getRouteFromPageLink(pageLink, router, currentRoute);
29789
+ if (!route)
29790
+ return;
29791
+ cleanupFn = (_a = observeRouteForPreloading) == null ? void 0 : _a(route, node);
29792
+ };
29793
+ const hasRef = isValidElement(children) && 'ref' in children;
29794
+ if (hasRef && isMutableRef(children.ref))
29795
+ return createRefWithCallback(children.ref, observerCallback);
29796
+ if (hasRef && isFunction(children.ref))
29797
+ return mergeRefs(children.ref, observerCallback);
29798
+ return createRefWithCallback(fallbackRef, observerCallback);
29799
+ }, [href, router, currentRoute, children,]);
29582
29800
  const clone = useCloneChildrenWithPropsAndRef(forwardedRef);
29583
- const props = React4.useMemo(() => {
29801
+ const props = useMemo(() => {
29584
29802
  var _a;
29585
29803
  if (!href)
29586
29804
  return {};
@@ -29591,13 +29809,11 @@ var Link = /* @__PURE__ */ React4.forwardRef((_f, forwardedRef) => {
29591
29809
  return propsForRoutePath(pageLink, openInNewTab, router, currentRoute, implicitPathVariables, smoothScroll);
29592
29810
  }
29593
29811
  const { webPageId, hash: hash2, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs, } = pageLink;
29594
- const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
29595
29812
  const resolvedSlugs = resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
29596
- if (route)
29597
- preloadComponent(route.page);
29598
- const combinedPathVariable = Object.assign({}, implicitPathVariables, pathVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.path);
29599
- const combinedHashVariable = Object.assign({}, implicitPathVariables, hashVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.hash);
29813
+ const combinedPathVariable = Object.assign(Object.assign(Object.assign({}, implicitPathVariables), pathVariables), (resolvedSlugs == null ? void 0 : resolvedSlugs.path));
29814
+ const combinedHashVariable = Object.assign(Object.assign(Object.assign({}, implicitPathVariables), hashVariables), (resolvedSlugs == null ? void 0 : resolvedSlugs.hash));
29600
29815
  const anchorTarget = getTargetAttrValue(openInNewTab, true);
29816
+ const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
29601
29817
  const resolvedHref = getPathForRoute(route, {
29602
29818
  currentRoutePath: currentRoute == null ? void 0 : currentRoute.path,
29603
29819
  currentPathVariables: currentRoute == null ? void 0 : currentRoute.pathVariables,
@@ -29614,7 +29830,7 @@ var Link = /* @__PURE__ */ React4.forwardRef((_f, forwardedRef) => {
29614
29830
  'data-framer-page-link-current': currentRoute && linkMatchesRoute(currentRoute, pageLink, implicitPathVariables) || void 0,
29615
29831
  };
29616
29832
  }, [href, router, activeLocale, implicitPathVariables, openInNewTab, currentRoute, smoothScroll,]);
29617
- return clone(children, Object.assign(Object.assign({}, restProps), props));
29833
+ return clone(children, Object.assign(Object.assign(Object.assign({}, restProps), props), { ref: stableObserverChildRef }));
29618
29834
  });
29619
29835
  function resolveLink(href, router, implicitPathVariables) {
29620
29836
  return resolveLinkInternal(href, router, implicitPathVariables);
@@ -29656,7 +29872,7 @@ function resolvePageScope(pageLink, router) {
29656
29872
  preserveQueryParams: false,
29657
29873
  });
29658
29874
  }
29659
- function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration, shouldMarkHydrationEnd = false, }) {
29875
+ function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration, addHydrationMarkers = false, }) {
29660
29876
  React4.useEffect(() => {
29661
29877
  if (isWebsite)
29662
29878
  return;
@@ -29680,7 +29896,7 @@ function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, co
29680
29896
  },
29681
29897
  preserveQueryParams,
29682
29898
  enableImproveInpDuringHydration,
29683
- shouldMarkHydrationEnd,
29899
+ addHydrationMarkers,
29684
29900
  }),
29685
29901
  }),
29686
29902
  });
@@ -32694,7 +32910,8 @@ function useQueryData(query) {
32694
32910
  return cached.read();
32695
32911
  }
32696
32912
  function useQueryCount(query) {
32697
- const collection = useQueryData(query);
32913
+ const countQuery = Object.assign(Object.assign({}, query), { select: [] });
32914
+ const collection = useQueryData(countQuery);
32698
32915
  return collection.length;
32699
32916
  }
32700
32917
  function getWhereExpressionFromPathVariables(pathVariables) {
@@ -32735,25 +32952,30 @@ function getWhereExpressionFromPathVariables(pathVariables) {
32735
32952
  right: expression,
32736
32953
  }));
32737
32954
  }
32738
- function useLoadMorePaginatedQuery(query, pageSize) {
32739
- const { paginationInfo, setPaginationInfo, } = useCollectionListPaginationInfo();
32955
+ function useLoadMorePaginatedQuery(query, pageSize, hash2) {
32740
32956
  const count = useQueryCount(query);
32741
- const initialPaginationInfo = useMemo(() => {
32957
+ const [paginationInfo, setPaginationInfo,] = useState(() => {
32958
+ var _f;
32959
+ var _a, _b, _c, _d;
32742
32960
  const totalPages = Math.ceil(count / pageSize);
32961
+ const currentPage = (_f = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
32962
+ ? void 0
32963
+ : _b.paginationInfo) == null
32964
+ ? void 0
32965
+ : _c[hash2]) == null
32966
+ ? void 0
32967
+ : _d.currentPage)) !== null && _f !== void 0 ? _f : 1;
32743
32968
  return {
32744
- currentPage: 1,
32969
+ currentPage,
32745
32970
  totalPages,
32746
- type: 'loadMore',
32971
+ isLoading: false,
32747
32972
  };
32748
- }, [count, pageSize,]);
32973
+ });
32749
32974
  useEffect(() => {
32750
- if (!paginationInfo) {
32751
- setPaginationInfo(initialPaginationInfo);
32752
- }
32753
- }, [count, initialPaginationInfo, paginationInfo, setPaginationInfo,]);
32975
+ pushLoadMoreHistory(hash2, paginationInfo);
32976
+ }, [hash2, paginationInfo,]);
32754
32977
  const paginatedQuery = useMemo(() => {
32755
- const currentPaginationInfo = paginationInfo !== null && paginationInfo !== void 0 ? paginationInfo : initialPaginationInfo;
32756
- let limit = pageSize * currentPaginationInfo.currentPage;
32978
+ let limit = pageSize * paginationInfo.currentPage;
32757
32979
  if (query.limit) {
32758
32980
  if (query.limit.type !== 'LiteralValue' || typeof query.limit.value !== 'number') {
32759
32981
  throw new Error('Unexpected type for query limit');
@@ -32764,8 +32986,23 @@ function useLoadMorePaginatedQuery(query, pageSize) {
32764
32986
  type: 'LiteralValue',
32765
32987
  value: limit,
32766
32988
  } });
32767
- }, [initialPaginationInfo, query, pageSize, paginationInfo,]);
32768
- return paginatedQuery;
32989
+ }, [query, pageSize, paginationInfo,]);
32990
+ const onCanvas = useIsOnFramerCanvas();
32991
+ const loadMore = useCallback(() => {
32992
+ if (onCanvas)
32993
+ return;
32994
+ if (paginationInfo.currentPage >= paginationInfo.totalPages)
32995
+ return;
32996
+ setPaginationInfo((info) => (Object.assign(Object.assign({}, info), { isLoading: true })));
32997
+ requestAnimationFrame(() => {
32998
+ setPaginationInfo((info) => (Object.assign(Object.assign({}, info), { currentPage: Math.min(info.currentPage + 1, info.totalPages), isLoading: false })));
32999
+ });
33000
+ }, [onCanvas, paginationInfo.currentPage, paginationInfo.totalPages,]);
33001
+ return {
33002
+ paginatedQuery,
33003
+ paginationInfo,
33004
+ loadMore,
33005
+ };
32769
33006
  }
32770
33007
  function createGestureVariant(variant, type) {
32771
33008
  return `${variant}-${type}`;
@@ -32818,9 +33055,10 @@ var CycleVariantState = /* @__PURE__ */ Symbol('cycle');
32818
33055
  function useVariantState({ variant, defaultVariant: externalDefaultVariant, transitions: externalTransitions, enabledGestures: externalEnabledGestures, cycleOrder: externalCycleOrder = [], variantProps: variantProps2 = {}, variantClassNames = {}, }) {
32819
33056
  const forceUpdate = useForceUpdate3();
32820
33057
  const validBaseVariants = useConstant2(() => new Set(externalCycleOrder));
32821
- const internalState = useRef({
33058
+ const internalState = React4.useRef({
32822
33059
  isHovered: false,
32823
33060
  isPressed: false,
33061
+ hasPressedVariants: true,
32824
33062
  baseVariant: safeBaseVariant(variant, externalDefaultVariant, validBaseVariants),
32825
33063
  lastVariant: variant,
32826
33064
  gestureVariant: void 0,
@@ -32832,14 +33070,14 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
32832
33070
  cycleOrder: externalCycleOrder,
32833
33071
  transitions: externalTransitions,
32834
33072
  });
32835
- const resolveNextVariant = useCallback((targetBaseVariant) => {
33073
+ const resolveNextVariant = React4.useCallback((targetBaseVariant) => {
32836
33074
  const { isHovered: isHovered2, isPressed: isPressed2, enabledGestures: enabledGestures2, defaultVariant: defaultVariant2, } = internalState.current;
32837
33075
  const nextBaseVariant = safeBaseVariant(targetBaseVariant, defaultVariant2, validBaseVariants);
32838
33076
  const gesture = getGesture(enabledGestures2 == null ? void 0 : enabledGestures2[nextBaseVariant], isHovered2, isPressed2);
32839
33077
  const nextGestureVariant = gesture ? createGestureVariant(nextBaseVariant, gesture) : void 0;
32840
33078
  return [nextBaseVariant, nextGestureVariant,];
32841
33079
  }, [validBaseVariants,]);
32842
- const setGestureState = useCallback(({ isHovered: isHovered2, isPressed: isPressed2, }) => {
33080
+ const setGestureState = React4.useCallback(({ isHovered: isHovered2, isPressed: isPressed2, }) => {
32843
33081
  if (isHovered2 !== void 0)
32844
33082
  internalState.current.isHovered = isHovered2;
32845
33083
  if (isPressed2 !== void 0)
@@ -32849,10 +33087,10 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
32849
33087
  if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
32850
33088
  internalState.current.baseVariant = nextBase || defaultVariant2;
32851
33089
  internalState.current.gestureVariant = nextGesture;
32852
- startTransition2(forceUpdate);
33090
+ forceUpdate();
32853
33091
  }
32854
33092
  }, [resolveNextVariant, forceUpdate,]);
32855
- const setVariant = useCallback((proposedVariant) => {
33093
+ const setVariant = React4.useCallback((proposedVariant) => {
32856
33094
  const { defaultVariant: defaultVariant2, cycleOrder, baseVariant: baseVariant2, gestureVariant: gestureVariant2, } = internalState.current;
32857
33095
  const nextBaseVariant = proposedVariant === CycleVariantState
32858
33096
  ? nextVariant(cycleOrder || [], baseVariant2 || defaultVariant2)
@@ -32861,7 +33099,7 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
32861
33099
  if (nextBase !== baseVariant2 || nextGesture !== gestureVariant2) {
32862
33100
  internalState.current.baseVariant = nextBase || defaultVariant2;
32863
33101
  internalState.current.gestureVariant = nextGesture;
32864
- startTransition2(forceUpdate);
33102
+ forceUpdate();
32865
33103
  }
32866
33104
  }, [resolveNextVariant, forceUpdate,]);
32867
33105
  if (variant !== internalState.current.lastVariant) {
@@ -32874,12 +33112,37 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
32874
33112
  }
32875
33113
  const { baseVariant, gestureVariant, defaultVariant, enabledGestures, isHovered, isPressed, } = internalState.current;
32876
33114
  const addVariantProps = useAddVariantProps(internalState.current.baseVariant, internalState.current.gestureVariant, variantProps2);
32877
- return useMemo(() => {
33115
+ return React4.useMemo(() => {
32878
33116
  const variants = [];
32879
33117
  if (baseVariant !== defaultVariant)
32880
33118
  variants.push(baseVariant);
32881
33119
  if (gestureVariant)
32882
33120
  variants.push(gestureVariant);
33121
+ const gestures = enabledGestures == null ? void 0 : enabledGestures[baseVariant];
33122
+ const gestureHandlers = {};
33123
+ if (gestures == null ? void 0 : gestures.hover) {
33124
+ Object.assign(gestureHandlers, {
33125
+ onMouseEnter: () => setGestureState({
33126
+ isHovered: true,
33127
+ }),
33128
+ onMouseLeave: () => setGestureState({
33129
+ isHovered: false,
33130
+ }),
33131
+ });
33132
+ }
33133
+ if (gestures == null ? void 0 : gestures.pressed) {
33134
+ Object.assign(gestureHandlers, {
33135
+ onTapStart: () => setGestureState({
33136
+ isPressed: true,
33137
+ }),
33138
+ onTapCancel: () => setGestureState({
33139
+ isPressed: false,
33140
+ }),
33141
+ onTap: () => setGestureState({
33142
+ isPressed: false,
33143
+ }),
33144
+ });
33145
+ }
32883
33146
  return {
32884
33147
  variants,
32885
33148
  baseVariant,
@@ -32888,7 +33151,8 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
32888
33151
  setVariant,
32889
33152
  setGestureState,
32890
33153
  addVariantProps,
32891
- classNames: cx(createVariantClassName(baseVariant, variantClassNames), getGesture(enabledGestures == null ? void 0 : enabledGestures[baseVariant], isHovered, isPressed)),
33154
+ gestureHandlers,
33155
+ classNames: cx(createVariantClassName(baseVariant, variantClassNames), getGesture(gestures, isHovered, isPressed)),
32892
33156
  };
32893
33157
  }, [
32894
33158
  baseVariant,
@@ -33727,8 +33991,8 @@ var LocalFontSource = class {
33727
33991
  };
33728
33992
  const aliases = /* @__PURE__ */ new Map();
33729
33993
  const weights = [400, 100, 200, 300, 500, 600, 700, 800, 900,];
33730
- const styles = ['normal', 'italic',];
33731
- for (const style of styles) {
33994
+ const styles2 = ['normal', 'italic',];
33995
+ for (const style of styles2) {
33732
33996
  for (const weight of weights) {
33733
33997
  const variant = createVariantName(weight, style);
33734
33998
  const alias = `__SystemDefault-${weight}-${style}__`;
@@ -34637,13 +34901,10 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
34637
34901
  },
34638
34902
  });
34639
34903
  }
34640
- renderErrorPlaceholder(file, error) {
34904
+ renderErrorPlaceholder(error) {
34641
34905
  const { RenderPlaceholder, } = runtime;
34642
34906
  return /* @__PURE__ */ jsx(FrameWithMotion, Object.assign(Object.assign({}, this.props), { background: null, children: /* @__PURE__ */ jsx(RenderPlaceholder, {
34643
- error: {
34644
- error,
34645
- file,
34646
- },
34907
+ error,
34647
34908
  }) }));
34648
34909
  }
34649
34910
  render() {
@@ -34656,13 +34917,23 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
34656
34917
  if (noChildren) {
34657
34918
  const errorComponent = runtime.componentLoader.errorForIdentifier(componentIdentifier);
34658
34919
  if (errorComponent) {
34659
- return this.renderErrorPlaceholder(errorComponent.file, errorComponent.error);
34920
+ const title = `Error in ${errorComponent.file}`;
34921
+ const message = errorComponent.error;
34922
+ return this.renderErrorPlaceholder({
34923
+ title,
34924
+ message,
34925
+ });
34660
34926
  }
34661
34927
  }
34662
34928
  if (error && error.children === children) {
34663
34929
  const component = runtime.componentLoader.componentForIdentifier(componentIdentifier);
34664
34930
  const file = component ? component.file : '???';
34665
- return this.renderErrorPlaceholder(file, error.message);
34931
+ const title = `Error in ${file}`;
34932
+ const message = error.message;
34933
+ return this.renderErrorPlaceholder({
34934
+ title,
34935
+ message,
34936
+ });
34666
34937
  }
34667
34938
  (_b = (_a2 = asRecord(safeWindow))['__checkComponentBudget__']) == null ? void 0 : _b.call(_a2);
34668
34939
  let frameProps = this.props;
@@ -34813,8 +35084,8 @@ function formReducer(_state, { type, }) {
34813
35084
  function preventDefault(e) {
34814
35085
  e.preventDefault();
34815
35086
  }
34816
- var FormContainer = (_f) => {
34817
- var { action, formId, disabled, children, redirectUrl } = _f, props = __rest(_f, ["action", "formId", "disabled", "children", "redirectUrl"]);
35087
+ var FormContainer = /* @__PURE__ */ React4.forwardRef((_f, ref) => {
35088
+ var { action, formId, disabled, children, redirectUrl, onSuccess, onError } = _f, props = __rest(_f, ["action", "formId", "disabled", "children", "redirectUrl", "onSuccess", "onError"]);
34818
35089
  const [state, dispatch,] = React4.useReducer(formReducer, {
34819
35090
  state: disabled ? 'disabled' : void 0,
34820
35091
  });
@@ -34860,6 +35131,7 @@ var FormContainer = (_f) => {
34860
35131
  dispatch({
34861
35132
  type: 'success',
34862
35133
  });
35134
+ onSuccess == null ? void 0 : onSuccess();
34863
35135
  if (redirectUrl) {
34864
35136
  yield redirectTo(redirectUrl);
34865
35137
  }
@@ -34868,6 +35140,7 @@ var FormContainer = (_f) => {
34868
35140
  dispatch({
34869
35141
  type: 'error',
34870
35142
  });
35143
+ onError == null ? void 0 : onError();
34871
35144
  }
34872
35145
  });
34873
35146
  const handleKeyDown = (event) => {
@@ -34880,8 +35153,8 @@ var FormContainer = (_f) => {
34880
35153
  void handleSubmit(event);
34881
35154
  }
34882
35155
  };
34883
- return /* @__PURE__ */ jsx(motion.form, Object.assign(Object.assign({}, props), { 'data-formid': formId, onSubmit: isSubmitEnabled ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, children: children(state) }));
34884
- };
35156
+ return /* @__PURE__ */ jsx(motion.form, Object.assign(Object.assign({}, props), { 'data-formid': formId, onSubmit: isSubmitEnabled ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, ref, children: children(state) }));
35157
+ });
34885
35158
  function submitForm(action, data2) {
34886
35159
  return __awaiter(this, void 0, void 0, function* () {
34887
35160
  const proofOfWork = yield calculateProofOfWork();
@@ -34935,21 +35208,56 @@ var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2
34935
35208
  FormInputStyleVariableNames2['FontLineHeight'] = '--framer-input-font-line-height';
34936
35209
  FormInputStyleVariableNames2['PlaceholderColor'] = '--framer-input-placeholder-color';
34937
35210
  FormInputStyleVariableNames2['BoxShadow'] = '--framer-input-box-shadow';
34938
- FormInputStyleVariableNames2['ZIndex'] = '--framer-input-z-index';
34939
35211
  FormInputStyleVariableNames2['FocusedBorderColor'] = '--framer-input-focused-border-color';
34940
35212
  FormInputStyleVariableNames2['FocusedBorderWidth'] = '--framer-input-focused-border-width';
34941
35213
  FormInputStyleVariableNames2['FocusedBorderStyle'] = '--framer-input-focused-border-style';
34942
35214
  FormInputStyleVariableNames2['FocusedBackground'] = '--framer-input-focused-background';
34943
35215
  FormInputStyleVariableNames2['FocusedBoxShadow'] = '--framer-input-focused-box-shadow';
34944
35216
  FormInputStyleVariableNames2['FocusedTransition'] = '--framer-input-focused-transition';
35217
+ FormInputStyleVariableNames2['BooleanCheckedIconURL'] = '--framer-input-boolean-icon';
35218
+ FormInputStyleVariableNames2['BooleanCheckedBackground'] = '--framer-input-boolean-checked-background';
35219
+ FormInputStyleVariableNames2['BooleanCheckedBorderColor'] = '--framer-input-boolean-checked-border-color';
35220
+ FormInputStyleVariableNames2['BooleanCheckedBorderWidth'] = '--framer-input-boolean-checked-border-width';
35221
+ FormInputStyleVariableNames2['BooleanCheckedBorderStyle'] = '--framer-input-boolean-checked-border-style';
35222
+ FormInputStyleVariableNames2['BooleanCheckedBoxShadow'] = '--framer-input-boolean-checked-box-shadow';
35223
+ FormInputStyleVariableNames2['BooleanCheckedTransition'] = '--framer-input-boolean-checked-transition';
35224
+ FormInputStyleVariableNames2['InvalidTextColor'] = '--framer-input-invalid-text-color';
34945
35225
  return FormInputStyleVariableNames2;
34946
35226
  })(FormInputStyleVariableNames || {});
34947
35227
  var Var = FormInputStyleVariableNames;
34948
- var inputClassName = 'framer-form-input';
34949
- var inputWrapperClassName = 'framer-form-input-wrapper';
34950
- function cssVar(a, b) {
34951
- return `var(${a}, var(${b}))`;
35228
+ var inputClassName = /* @__PURE__ */ (() => 'framer-form-input')();
35229
+ var inputWrapperClassName = /* @__PURE__ */ (() => 'framer-form-input-wrapper')();
35230
+ var emptyValueClassName = /* @__PURE__ */ (() => 'framer-form-input-empty')();
35231
+ var forcedFocusClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-focus')();
35232
+ var forcedCheckedClassName = /* @__PURE__ */ (() => 'framer-form-input-forced-checked')();
35233
+ function cssValue(value) {
35234
+ if (typeof value === 'number')
35235
+ return value;
35236
+ if (value.startsWith('--'))
35237
+ return css.variable(value);
35238
+ if (value === '')
35239
+ return '""';
35240
+ return value;
35241
+ }
35242
+ function css(selector, declaration) {
35243
+ let output = ' ';
35244
+ for (const key7 in declaration) {
35245
+ output += `${key7.replace(/([A-Z])/gu, '-$1').toLowerCase()}: ${cssValue(declaration[key7])}; `;
35246
+ }
35247
+ return selector + ' {' + output + '}';
34952
35248
  }
35249
+ ((css2) => {
35250
+ function variable(...variables) {
35251
+ const lastItem = variables[variables.length - 1];
35252
+ let value = lastItem.startsWith('--') ? `var(${lastItem})` : lastItem;
35253
+ for (let index = variables.length - 2; index >= 0; index--) {
35254
+ const element = variables[index];
35255
+ value = `var(${element}, ${value})`;
35256
+ }
35257
+ return value;
35258
+ }
35259
+ css2.variable = variable;
35260
+ })(css || (css = {}));
34953
35261
  var sharedInputCSS = [`.${inputClassName} {
34954
35262
  padding: var(${Var.Padding});
34955
35263
  background: var(${Var.Background});
@@ -34968,28 +35276,28 @@ var sharedInputCSS = [`.${inputClassName} {
34968
35276
  border-top-right-radius: var(${Var.BorderRadiusTopRight});
34969
35277
  border-bottom-right-radius: var(${Var.BorderRadiusBottomRight});
34970
35278
  border-bottom-left-radius: var(${Var.BorderRadiusBottomLeft});
34971
- z-index: var(${Var.ZIndex});
34972
35279
  letter-spacing: var(${Var.FontLetterSpacing});
34973
35280
  text-align: var(${Var.FontTextAlignment});
34974
35281
  line-height: var(${Var.FontLineHeight});
34975
35282
  transition: var(${Var.FocusedTransition});
34976
35283
  transition-property: background, box-shadow;
34977
35284
  }`,];
34978
- var focusInputCSS = [
35285
+ var focusInputCSS =
35286
+ /* @__PURE__ */ (() => [
34979
35287
  `.${inputClassName}:focus-visible { outline: none; }`,
34980
- `.${inputClassName}:focus {
34981
- background: ${cssVar(Var.FocusedBackground, Var.Background)};
34982
- box-shadow: ${cssVar(Var.FocusedBoxShadow, Var.BoxShadow)};
35288
+ `.${inputClassName}:focus, .${inputClassName}.${forcedFocusClassName} {
35289
+ background: ${css.variable(Var.FocusedBackground, Var.Background)};
35290
+ box-shadow: ${css.variable(Var.FocusedBoxShadow, Var.BoxShadow)};
34983
35291
  }`,
34984
- `.${inputWrapperClassName}:focus-within::after {
34985
- border-color: ${cssVar(Var.FocusedBorderColor, Var.BorderColor)};
34986
- border-style: ${cssVar(Var.FocusedBorderStyle, Var.BorderStyle)};
34987
- border-top-width: ${cssVar(Var.FocusedBorderWidth, Var.BorderTopWidth)};
34988
- border-right-width: ${cssVar(Var.FocusedBorderWidth, Var.BorderRightWidth)};
34989
- border-bottom-width: ${cssVar(Var.FocusedBorderWidth, Var.BorderBottomWidth)};
34990
- border-left-width: ${cssVar(Var.FocusedBorderWidth, Var.BorderLeftWidth)};
35292
+ `.${inputWrapperClassName}:focus-within::after, .${inputWrapperClassName}.${forcedFocusClassName}::after {
35293
+ border-color: ${css.variable(Var.FocusedBorderColor, Var.BorderColor)};
35294
+ border-style: ${css.variable(Var.FocusedBorderStyle, Var.BorderStyle)};
35295
+ border-top-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderTopWidth)};
35296
+ border-right-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderRightWidth)};
35297
+ border-bottom-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderBottomWidth)};
35298
+ border-left-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderLeftWidth)};
34991
35299
  }`,
34992
- ];
35300
+ ])();
34993
35301
  var inputBorderCSS = [
34994
35302
  `.${inputWrapperClassName} {
34995
35303
  position: relative;
@@ -35022,13 +35330,26 @@ var passwordManagerIgnoreDataProps = {
35022
35330
  'data-1p-ignore': true,
35023
35331
  // LastPass
35024
35332
  'data-lpignore': true,
35025
- };
35026
- var sensibleInputDefaults = {
35333
+ // Dashlane
35334
+ // https://support.dashlane.com/hc/en-us/articles/4420122792594-Optimize-your-web-forms-for-Dashlane-Autofill
35335
+ 'data-form-type': 'other',
35336
+ // autocomplete="off" is a generic property that disables autofilling. It
35337
+ // is not always respected by some browsers or password managers.
35027
35338
  autocomplete: 'off',
35028
35339
  };
35029
35340
  var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInput(props, ref) {
35030
- const { style, inputName, type, required, autoFocus, placeholder, value, min, max, step: step2 } = props, rest = __rest(props, ["style", "inputName", "type", "required", "autoFocus", "placeholder", "value", "min", "max", "step"]);
35031
- const dataProps = Object.assign(Object.assign({}, sensibleInputDefaults), passwordManagerIgnoreDataProps);
35341
+ const { autoFocus, className: className2, inputName, max, min, onBlur, onFocus, onInvalid, placeholder, required, step: step2, style, type, value, autofillEnabled, canvasPreviewClassName } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "max", "min", "onBlur", "onFocus", "onInvalid", "placeholder", "required", "step", "style", "type", "value", "autofillEnabled", "canvasPreviewClassName"]);
35342
+ const [hasValue, setHasValue,] = React4.useState(!!value);
35343
+ const dataProps = autofillEnabled === false ? passwordManagerIgnoreDataProps : void 0;
35344
+ const eventProps = {
35345
+ onBlur,
35346
+ onFocus,
35347
+ onInvalid,
35348
+ };
35349
+ const onChange = React4.useCallback((e) => {
35350
+ const newValue = e.target.value;
35351
+ setHasValue(!!newValue);
35352
+ }, []);
35032
35353
  switch (type) {
35033
35354
  case 'hidden':
35034
35355
  return /* @__PURE__ */ jsx(motion.input, {
@@ -35038,17 +35359,24 @@ var PlainTextInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInp
35038
35359
  });
35039
35360
  case 'textarea':
35040
35361
  return /* @__PURE__ */ jsx(motion.div, Object.assign(Object.assign({ ref,
35041
- style }, rest), { className: cx(inputWrapperClassName, props.className), children: /* @__PURE__ */ jsx(motion.textarea, Object.assign(Object.assign({ id: inputName }, dataProps), { required,
35042
- autoFocus, name: inputName, placeholder, className: inputClassName, value })) }));
35362
+ style, className: cx(inputWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ jsx(motion.textarea, Object.assign(Object.assign(Object.assign({ id: inputName }, dataProps), eventProps), { required,
35363
+ autoFocus, name: inputName, placeholder, className: cx(inputClassName, canvasPreviewClassName), value })) }));
35043
35364
  default:
35044
35365
  return /* @__PURE__ */ jsx(motion.div, Object.assign(Object.assign({ ref,
35045
- style }, rest), { className: cx(inputWrapperClassName, props.className), children: /* @__PURE__ */ jsx(motion.input, Object.assign(Object.assign({ id: inputName }, dataProps), { type,
35366
+ style, className: cx(inputWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ jsx(motion.input, Object.assign(Object.assign(Object.assign({ id: inputName }, dataProps), eventProps), { type,
35046
35367
  required,
35047
- autoFocus, name: inputName, placeholder, className: inputClassName, value,
35368
+ autoFocus, name: inputName, placeholder, className: cx(inputClassName, canvasPreviewClassName, !hasValue && emptyValueClassName), onChange,
35369
+ value,
35048
35370
  min,
35049
35371
  max, step: step2 })) }));
35050
35372
  }
35051
35373
  });
35374
+ var iconSpacing = /* @__PURE__ */ (() => 10)();
35375
+ var iconSize = /* @__PURE__ */ (() => 14)();
35376
+ var defaultDateIcon =
35377
+ /* @__PURE__ */ (() => `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2H2Z' fill='currentColor' opacity='.3'/%3E%3Cpath d='M2.25 4.25a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2h-5.5a2 2 0 0 1-2-2ZM2 5.75h9.5' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3C/svg%3E`)();
35378
+ var defaultTimeIcon =
35379
+ /* @__PURE__ */ (() => `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${iconSize}' height='${iconSize}'%3E%3Cpath d='M1.5 7a5.5 5.5 0 1 1 11 0 5.5 5.5 0 1 1-11 0Z' fill='transparent' stroke-width='1.5' stroke='currentColor'/%3E%3Cpath d='M6.75 7.25v-3m0 3h2' fill='transparent' stroke-width='1.5' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E`)();
35052
35380
  var FormPlainTextInput2 =
35053
35381
  /* @__PURE__ */ (() => withCSS(PlainTextInput, [
35054
35382
  ...sharedInputCSS,
@@ -35061,20 +35389,166 @@ var FormPlainTextInput2 =
35061
35389
  resize: var(${'--framer-textarea-resize'});
35062
35390
  min-height: var(${'--framer-textarea-min-height'});
35063
35391
  }`,
35392
+ `.${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit {
35393
+ color:var(${'--framer-input-placeholder-color'});
35394
+ -webkit-text-fill-color: var(${'--framer-input-placeholder-color'});
35395
+ }`,
35396
+ `.${inputClassName}[type="date"]::before, .${inputClassName}[type="time"]::before {
35397
+ content: "";
35398
+ display: block;
35399
+ position: absolute;
35400
+ padding: var(${'--framer-input-padding'});
35401
+ padding-left: ${iconSpacing}px;
35402
+ right: 0;
35403
+ top: 0;
35404
+ bottom: 0;
35405
+ width: ${iconSize}px;
35406
+ box-sizing: content-box;
35407
+
35408
+ pointer-events: none;
35409
+ mask-repeat: no-repeat;
35410
+ mask-position: ${iconSpacing}px center;
35411
+ border: none;
35412
+ background-color: #999;
35413
+ }`,
35414
+ `.${inputClassName}[type="date"]::before {
35415
+ mask-image: url("${defaultDateIcon}");
35416
+ }`,
35417
+ `.${inputClassName}[type="time"]::before {
35418
+ mask-image: url("${defaultTimeIcon}");
35419
+ }`,
35420
+ // Hide the native date picker icon, but still allow the user to click it.
35421
+ `.${inputClassName}::-webkit-calendar-picker-indicator {
35422
+ opacity: 0;
35423
+ padding: var(${'--framer-input-padding'});
35424
+ padding-right: 0;
35425
+ padding-left: ${iconSpacing}px;
35426
+ width: ${iconSize}px;
35427
+ height: ${iconSize}px;
35428
+ }`,
35064
35429
  ]))();
35430
+ var className = 'framer-form-boolean-input';
35431
+ var BooleanInput = /* @__PURE__ */ React4.forwardRef(function FormPlainTextInput3(props, ref) {
35432
+ const { inputName, type = 'checkbox', defaultChecked, canvasPreviewClassName } = props, rest = __rest(props, ["inputName", "type", "defaultChecked", "canvasPreviewClassName"]);
35433
+ const isCanvas = useIsOnFramerCanvas();
35434
+ const attributes = isCanvas
35435
+ ? {
35436
+ checked: defaultChecked,
35437
+ }
35438
+ : {
35439
+ defaultChecked,
35440
+ };
35441
+ return /* @__PURE__ */ jsx(motion.input, Object.assign(Object.assign(Object.assign({}, rest), attributes), { readOnly: isCanvas, ref, id: inputName, type, name: inputName, className: cx(className, props.className, canvasPreviewClassName) }));
35442
+ });
35443
+ var defaultCheckedIcon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 4 8 L 6.5 10.5 L 11.5 5.5" fill="transparent" stroke-width="2" stroke="rgb(255, 255, 255)" stroke-linecap="round" stroke-linejoin="round"></path></svg>`;
35444
+ var borderWidth = `var(${'--framer-input-border-top-width'}) var(${'--framer-input-border-right-width'}) var(${'--framer-input-border-bottom-width'}) var(${'--framer-input-border-left-width'})`;
35445
+ var borderRadius = `var(${'--framer-input-border-radius-top-left'}) var(${'--framer-input-border-radius-top-right'}) var(${'--framer-input-border-radius-bottom-right'}) var(${'--framer-input-border-radius-bottom-left'})`;
35446
+ var styles = /* @__PURE__ */ (() => [
35447
+ css(`.${className}`, {
35448
+ '-webkit-appearance': 'none',
35449
+ // background-color: #fff; fixes a bug on iOS where the checkbox shows
35450
+ // through the appearance: none;
35451
+ alignItems: 'center',
35452
+ appearance: 'none',
35453
+ backgroundColor: '#fff',
35454
+ background: '--framer-input-background',
35455
+ borderRadius,
35456
+ boxShadow: '--framer-input-box-shadow',
35457
+ display: 'flex',
35458
+ justifyContent: 'center',
35459
+ margin: 0,
35460
+ overflow: 'hidden',
35461
+ position: 'relative',
35462
+ transition: '--framer-input-boolean-checked-transition',
35463
+ transitionProperty: 'box-shadow, background',
35464
+ }),
35465
+ // The after element styles the border of the checkbox to conform to
35466
+ // framer's inset border model.
35467
+ css(`.${className}::after`, {
35468
+ background: 'transparent',
35469
+ borderColor: css.variable('--framer-input-border-color', 'transparent'),
35470
+ borderRadius,
35471
+ borderStyle: '--framer-input-border-style',
35472
+ borderWidth,
35473
+ boxSizing: 'border-box',
35474
+ content: '',
35475
+ display: 'block',
35476
+ inset: 0,
35477
+ position: 'absolute',
35478
+ transition: '--framer-input-boolean-checked-transition',
35479
+ transitionProperty: 'border-color, border-width, border-style',
35480
+ }),
35481
+ // The before element is used to display the check mark icon. It is
35482
+ // faded in when the input is checked.
35483
+ css(`.${className}::before`, {
35484
+ // Use the icon url if it's provided, falling back to a default check
35485
+ // mark. Radio inputs will be code-generated with a "none" value for the
35486
+ // variable if an image isn't provided which will prevent this fallback
35487
+ // in those cases.
35488
+ backgroundImage: css.variable('--framer-input-boolean-icon', `url('${defaultCheckedIcon}')`),
35489
+ backgroundPosition: 'center',
35490
+ backgroundRepeat: 'no-repeat',
35491
+ backgroundSize: 'contain',
35492
+ content: '',
35493
+ display: 'block',
35494
+ height: '100%',
35495
+ opacity: 0,
35496
+ transition: '--framer-input-boolean-checked-transition',
35497
+ transitionProperty: 'opacity',
35498
+ width: '100%',
35499
+ }),
35500
+ css(`.${className}:checked, .${className}.${forcedCheckedClassName}`, {
35501
+ // When not set, the styles when checked shouldn't clear the default
35502
+ // styles.
35503
+ backgroundColor: css.variable('--framer-input-boolean-checked-background', '--framer-input-background'),
35504
+ boxShadow: css.variable('--framer-input-boolean-checked-box-shadow', '--framer-input-box-shadow'),
35505
+ }),
35506
+ css(`.${className}:checked::before, .${className}.${forcedCheckedClassName}::before`, {
35507
+ opacity: 1,
35508
+ }),
35509
+ css(`.${className}:checked::after, .${className}.${forcedCheckedClassName}::after`, {
35510
+ // When not set, the styles when checked shouldn't clear the default
35511
+ // styles.
35512
+ borderColor: css.variable('--framer-input-boolean-checked-border-color', '--framer-input-border-color', 'transparent'),
35513
+ borderStyle: css.variable('--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
35514
+ borderWidth: css.variable('--framer-input-boolean-checked-border-width', borderWidth),
35515
+ }),
35516
+ css(`.${className}:focus, .${className}.${forcedFocusClassName}`, {
35517
+ backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-background'),
35518
+ boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-box-shadow'),
35519
+ }),
35520
+ css(`.${className}:focus-visible`, {
35521
+ outline: 'none',
35522
+ }),
35523
+ css(`.${className}:focus::after, .${className}.${forcedFocusClassName}::after`, {
35524
+ // When not set, the styles when focused shouldn't clear the checked
35525
+ // styles.
35526
+ borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color', 'transparent'),
35527
+ borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style', 'solid'),
35528
+ borderWidth: css.variable('--framer-input-focused-border-width', borderWidth),
35529
+ }),
35530
+ css(`.${className}:focus:checked`, {
35531
+ backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-boolean-checked-background', '--framer-input-background'),
35532
+ boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-boolean-checked-box-shadow', '--framer-input-box-shadow'),
35533
+ }),
35534
+ css(`.${className}:focus:checked::after`, {
35535
+ borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
35536
+ borderWidth: css.variable('--framer-input-focused-border-width', '--framer-input-boolean-checked-border-width', borderWidth),
35537
+ }),
35538
+ ])();
35539
+ var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles);
35065
35540
  var Select = /* @__PURE__ */ React4.forwardRef(function Select2(props, measureRef) {
35066
- const { style, inputName, required, autoFocus, selectOptions, selectDefaultValue, } = props;
35067
- return /* @__PURE__ */ jsx(motion.div, {
35068
- ref: measureRef,
35069
- style,
35070
- className: cx(inputWrapperClassName, selectWrapperClassName, props.className),
35071
- children: /* @__PURE__ */ jsx(motion.select, {
35541
+ const { autoFocus, className: className2, inputName, onBlur, onFocus, onInvalid, required, selectDefaultValue, selectOptions, style, canvasPreviewClassName } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "onBlur", "onFocus", "onInvalid", "required", "selectDefaultValue", "selectOptions", "style", "canvasPreviewClassName"]);
35542
+ return /* @__PURE__ */ jsx(motion.div, Object.assign(Object.assign({ ref: measureRef, style, className: cx(inputWrapperClassName, selectWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ jsx(motion.select, {
35072
35543
  id: inputName,
35073
35544
  name: inputName,
35074
35545
  autoFocus,
35075
35546
  required,
35076
- className: inputClassName,
35547
+ className: cx(inputClassName, canvasPreviewClassName),
35077
35548
  defaultValue: selectDefaultValue,
35549
+ onBlur,
35550
+ onFocus,
35551
+ onInvalid,
35078
35552
  children: selectOptions == null ? void 0 : selectOptions.map((option, index) => {
35079
35553
  var _f, _j;
35080
35554
  switch (option.type) {
@@ -35088,8 +35562,7 @@ var Select = /* @__PURE__ */ React4.forwardRef(function Select2(props, measureRe
35088
35562
  }, index);
35089
35563
  }
35090
35564
  }),
35091
- }, selectDefaultValue),
35092
- });
35565
+ }, selectDefaultValue) }));
35093
35566
  });
35094
35567
  var selectWrapperClassName = 'framer-form-select-wrapper';
35095
35568
  var selectArrowSize = 16;
@@ -35118,6 +35591,9 @@ var FormSelect = /* @__PURE__ */ (() => withCSS(Select, [
35118
35591
  background-position: center center;
35119
35592
  border: none;
35120
35593
  }`,
35594
+ `select.${inputClassName}:required:invalid {
35595
+ color: var(${'--framer-input-invalid-text-color'});
35596
+ }`,
35121
35597
  ]))();
35122
35598
  var Image2 = /* @__PURE__ */ React4.forwardRef(function Image3(props, ref) {
35123
35599
  const { background, children, alt } = props, rest = __rest(props, ["background", "children", "alt"]);
@@ -35284,7 +35760,7 @@ var deprecatedRichTextPlaceholder = '{{ text-placeholder }}';
35284
35760
  var richTextWrapperClassName = 'rich-text-wrapper';
35285
35761
  var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props, forwardedRef) {
35286
35762
  var _f, _j;
35287
- const { id: id3, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = 'top', isEditable = false, willChangeTransform, environment: environment2 = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children } = props, rest = __rest(props, ["id", "name", "html", "htmlFromDesign", "text", "textFromDesign", "fonts", "width", "height", "left", "right", "top", "bottom", "center", "className", "stylesPresetsClassName", "visible", "opacity", "rotation", "verticalAlignment", "isEditable", "willChangeTransform", "environment", "withExternalLayout", "positionSticky", "positionStickyTop", "positionStickyRight", "positionStickyBottom", "positionStickyLeft", "__htmlStructure", "__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "children"]);
35763
+ const { id: id3, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className: className2, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = 'top', isEditable = false, willChangeTransform, environment: environment2 = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children } = props, rest = __rest(props, ["id", "name", "html", "htmlFromDesign", "text", "textFromDesign", "fonts", "width", "height", "left", "right", "top", "bottom", "center", "className", "stylesPresetsClassName", "visible", "opacity", "rotation", "verticalAlignment", "isEditable", "willChangeTransform", "environment", "withExternalLayout", "positionSticky", "positionStickyTop", "positionStickyRight", "positionStickyBottom", "positionStickyLeft", "__htmlStructure", "__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "children"]);
35288
35764
  const parentSize = useParentSize();
35289
35765
  const layoutId = useLayoutId2(props);
35290
35766
  const fallbackLayoutRef = useRef(null);
@@ -35401,7 +35877,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
35401
35877
  }
35402
35878
  Object.assign(style, props.style);
35403
35879
  return /* @__PURE__ */ jsx(motion.div, Object.assign(Object.assign({ id: id3, ref: layoutRef }, rest), { style,
35404
- layoutId, 'data-framer-name': name, 'data-framer-component-type': 'DeprecatedRichText', 'data-center': center, className: cx(className, stylesPresetsClassName, richTextWrapperClassName), transformTemplate: template, dangerouslySetInnerHTML: {
35880
+ layoutId, 'data-framer-name': name, 'data-framer-component-type': 'DeprecatedRichText', 'data-center': center, className: cx(className2, stylesPresetsClassName, richTextWrapperClassName), transformTemplate: template, dangerouslySetInnerHTML: {
35405
35881
  __html: innerHTMLWithReplacedFramerPageLinks,
35406
35882
  } }));
35407
35883
  });
@@ -36182,7 +36658,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
36182
36658
  render() {
36183
36659
  var _f;
36184
36660
  countNodeRender();
36185
- const _j = this.props, { id: id3, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width } = _j, rest = __rest(_j, ["id", "visible", "style", "fill", "svg", "intrinsicHeight", "intrinsicWidth", "title", "description", "layoutId", "className", "variants", "withExternalLayout", "innerRef", "svgContentId", "height", "opacity", "width"]);
36661
+ const _j = this.props, { id: id3, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className: className2, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width } = _j, rest = __rest(_j, ["id", "visible", "style", "fill", "svg", "intrinsicHeight", "intrinsicWidth", "title", "description", "layoutId", "className", "variants", "withExternalLayout", "innerRef", "svgContentId", "height", "opacity", "width"]);
36186
36662
  if (!withExternalLayout && (!visible || !id3))
36187
36663
  return null;
36188
36664
  const identifier = (_f = id3 !== null && id3 !== void 0 ? id3 : layoutId) !== null && _f !== void 0 ? _f : 'svg';
@@ -36319,8 +36795,7 @@ var SVGComponent = /* @__PURE__ */ (() => {
36319
36795
  }
36320
36796
  const MotionComponent = htmlElementAsMotionComponent(this.props.as);
36321
36797
  const { href, target, rel, onClick, } = this.props;
36322
- return /* @__PURE__ */ jsxs(MotionComponent, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataProps), rest), { layoutId, transformTemplate: hasTransformTemplate ? transformTemplate(this.props.center) : void 0, id: id3, ref: innerRef, style: outerStyle, className,
36323
- variants, tabIndex: this.props.tabIndex, role: title || description ? 'img' : void 0, 'aria-label': title, 'aria-description': description }), {
36798
+ return /* @__PURE__ */ jsxs(MotionComponent, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataProps), rest), { layoutId, transformTemplate: hasTransformTemplate ? transformTemplate(this.props.center) : void 0, id: id3, ref: innerRef, style: outerStyle, className: className2, variants, tabIndex: this.props.tabIndex, role: title || description ? 'img' : void 0, 'aria-label': title, 'aria-description': description }), {
36324
36799
  href,
36325
36800
  target,
36326
36801
  rel,
@@ -36440,7 +36915,7 @@ var TextComponent = /* @__PURE__ */ (() => {
36440
36915
  });
36441
36916
  __publicField(this, 'renderMain', (inCodeComponent) => {
36442
36917
  countNodeRender();
36443
- const _f = this.props, { font, visible, alignment, willChangeTransform, opacity, id: id3, layoutId, className, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex } = _f, rest = __rest(_f, ["font", "visible", "alignment", "willChangeTransform", "opacity", "id", "layoutId", "className", "transition", "variants", "name", "__fromCanvasComponent", "_initialStyle", "widthType", "heightType", "_usesDOMRect", "autoSize", "style", "fontLoadStatus", "matchesCurrentRoute", "preload", "tabIndex"]);
36918
+ const _f = this.props, { font, visible, alignment, willChangeTransform, opacity, id: id3, layoutId, className: className2, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex } = _f, rest = __rest(_f, ["font", "visible", "alignment", "willChangeTransform", "opacity", "id", "layoutId", "className", "transition", "variants", "name", "__fromCanvasComponent", "_initialStyle", "widthType", "heightType", "_usesDOMRect", "autoSize", "style", "fontLoadStatus", "matchesCurrentRoute", "preload", "tabIndex"]);
36444
36919
  if (!visible) {
36445
36920
  return null;
36446
36921
  }
@@ -36508,7 +36983,7 @@ var TextComponent = /* @__PURE__ */ (() => {
36508
36983
  const tabIndexProps = getTabIndexProps(tabIndex);
36509
36984
  return /* @__PURE__ */ jsx(motion.div, Object.assign(Object.assign(Object.assign(Object.assign({ layoutId, id: id3 }, tabIndexProps), dataProps), rest), { style, transformTemplate: centeringTransformTemplate, dangerouslySetInnerHTML: {
36510
36985
  __html: rawHTML,
36511
- }, 'data-center': this.props.center, className: cx(className, matchesCurrentRoute && 'isCurrent'), transition,
36986
+ }, 'data-center': this.props.center, className: cx(className2, matchesCurrentRoute && 'isCurrent'), transition,
36512
36987
  variants, ref: this.setElement }));
36513
36988
  }
36514
36989
  });
@@ -37561,7 +38036,7 @@ function loadJSON(url) {
37561
38036
  }).then((res) => res.json());
37562
38037
  }
37563
38038
  function inspectObjectType(item) {
37564
- let className;
38039
+ let className2;
37565
38040
  if ((item.constructor !== null ? item.constructor.name : void 0) !== null &&
37566
38041
  (item.constructor !== null ? item.constructor.name : void 0) !== 'Object') {
37567
38042
  return item.constructor.name;
@@ -37578,15 +38053,15 @@ function inspectObjectType(item) {
37578
38053
  return null;
37579
38054
  };
37580
38055
  if (item.toString) {
37581
- className = extract(item.toString());
37582
- if (className) {
37583
- return className;
38056
+ className2 = extract(item.toString());
38057
+ if (className2) {
38058
+ return className2;
37584
38059
  }
37585
38060
  }
37586
38061
  if (item.constructor !== null ? item.constructor.toString : void 0) {
37587
- className = extract(item.constructor !== null ? item.constructor.toString() : void 0);
37588
- if (className) {
37589
- return className.replace('Constructor', '');
38062
+ className2 = extract(item.constructor !== null ? item.constructor.toString() : void 0);
38063
+ if (className2) {
38064
+ return className2.replace('Constructor', '');
37590
38065
  }
37591
38066
  }
37592
38067
  return 'Object';
@@ -37729,7 +38204,7 @@ var package_default = {
37729
38204
  yargs: '^17.6.2',
37730
38205
  },
37731
38206
  peerDependencies: {
37732
- 'framer-motion': '11.2.6',
38207
+ 'framer-motion': '11.2.10',
37733
38208
  react: '^18.2.0',
37734
38209
  'react-dom': '^18.2.0',
37735
38210
  },
@@ -37760,7 +38235,7 @@ MotionValue.prototype.addChild = function ({ transformer = (v) => v, }) {
37760
38235
  if (false) {
37761
38236
  MainLoop.start();
37762
38237
  }
37763
- export { _injectRuntime, AcceleratedAnimation, addActionControls, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, AnchorLinkTarget, Animatable, animate2 as animate, AnimatePresence, AnimateSharedLayout, animateValue, animateVisualElement, animationControls, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform, calcLength, calculateRect, callEach, cancelFrame, cancelSync, circIn, circInOut, circOut, clamp, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertPresentationTree, convertPropsToDeviceOptions, createBox, createData, createDomMotionComponent, createFramerPageLink, createMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, domMax, DragControls, Draggable, easeIn, easeInOut, easeOut, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, filterProps, finiteNumber, FlatTree, Floating, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, FrameWithMotion, GamepadContext, GeneratedComponentContext, getComponentSize, getDevicePreset, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getMeasurableCodeComponentChildren, getMergedConstraintsProps, getPropertyControls, getWhereExpressionFromPathVariables, gradientForShape, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, InternalID, interpolate, invariant, inView, isAnimatable2 as isAnimatable, isBrowser, isDesignDefinition, isDragActive, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isMotionComponent, isMotionValue2 as isMotionValue, isOfAnnotatedType, isOverride, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStraightCurve, isValidMotionProp, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, memoize2 as memoize, mirrorEasing, mix, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, NotFoundError, ObservableObject, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseFramerPageLink, pathDefaults, PathSegment, PathVariablesContext, pipe, Point, Polygon, PresenceContext, print, progress, PropertyOverrides, PropertyStore, propsForLink, px, QueryEngine, RadialGradient, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, RenderTarget, Reorder, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, RichText, roundedNumber, roundedNumberString, roundWithOffset, Scroll, scroll, scrollInfo, setGlobalRenderEnvironment, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, spring, SpringAnimator, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, steps, StyleSheetContext, SVG, SwitchLayoutGroupContext, sync, systemFontFamilyName, Text2 as Text, throttle, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformString, transformTemplate, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useCollectionListPaginationInfo, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useLoadMorePaginatedQuery, useLocale, useLocaleCode, useLocaleInfo, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePresence, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, version, VisualElement, visualElementStore, warning, WindowContext, withCSS, withFX, withGeneratedLayoutId, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, WithOverride, withParallaxTransform, withPath, withShape, withStyleAppearEffect, withVariantAppearEffect, withVariantFX, wrap, };
38238
+ export { _injectRuntime, AcceleratedAnimation, addActionControls, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, AnchorLinkTarget, Animatable, animate2 as animate, AnimatePresence, AnimateSharedLayout, animateValue, animateVisualElement, animationControls, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform, calcLength, calculateRect, callEach, cancelFrame, cancelSync, circIn, circInOut, circOut, clamp, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertPresentationTree, convertPropsToDeviceOptions, createBox, createData, createDomMotionComponent, createFramerPageLink, createMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, domMax, DragControls, Draggable, easeIn, easeInOut, easeOut, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, filterProps, finiteNumber, FlatTree, Floating, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, FrameWithMotion, GamepadContext, GeneratedComponentContext, getComponentSize, getDevicePreset, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getMeasurableCodeComponentChildren, getMergedConstraintsProps, getPropertyControls, getWhereExpressionFromPathVariables, gradientForShape, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, InternalID, interpolate, invariant, inView, isAnimatable2 as isAnimatable, isBrowser, isDesignDefinition, isDragActive, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isMotionComponent, isMotionValue2 as isMotionValue, isOfAnnotatedType, isOverride, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStraightCurve, isValidMotionProp, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, memoize2 as memoize, mirrorEasing, mix, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, NotFoundError, ObservableObject, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseFramerPageLink, pathDefaults, PathSegment, PathVariablesContext, pipe, Point, Polygon, PresenceContext, print, progress, PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryEngine, RadialGradient, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, RenderTarget, Reorder, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, RichText, roundedNumber, roundedNumberString, roundWithOffset, Scroll, scroll, scrollInfo, setGlobalRenderEnvironment, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, spring, SpringAnimator, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, steps, StyleSheetContext, SVG, SwitchLayoutGroupContext, sync, systemFontFamilyName, Text2 as Text, throttle, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformString, transformTemplate, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useLoadMorePaginatedQuery, useLocale, useLocaleCode, useLocaleInfo, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePresence, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, version, VisualElement, visualElementStore, warning, WindowContext, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, WithOverride, withParallaxTransform, withPath, withShape, withStyleAppearEffect, withVariantAppearEffect, withVariantFX, wrap, };
37764
38239
  /**
37765
38240
  * @license Emotion v11.0.0
37766
38241
  * MIT License
@@ -37798,7 +38273,7 @@ react-is/cjs/react-is.production.min.js:
37798
38273
  *)
37799
38274
  */
37800
38275
  if (typeof document !== 'undefined') {
37801
- for (const node of document.querySelectorAll('style[data-framer-css-ssr]')) {
38276
+ for (const node of document.querySelectorAll('body style[data-framer-css-ssr]')) {
37802
38277
  document.head.appendChild(node);
37803
38278
  }
37804
38279
  }