unframer 3.2.0 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +4 -4
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +106 -7
  4. package/dist/cli.js.map +1 -1
  5. package/dist/css.d.ts +5 -0
  6. package/dist/css.d.ts.map +1 -1
  7. package/dist/css.js +25 -0
  8. package/dist/css.js.map +1 -1
  9. package/dist/exporter.d.ts.map +1 -1
  10. package/dist/exporter.js +38 -4
  11. package/dist/exporter.js.map +1 -1
  12. package/dist/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
  13. package/dist/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
  14. package/dist/framer-chunks/chunk-VUHWYTYT.js +111 -0
  15. package/dist/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
  16. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
  17. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
  18. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +8 -0
  19. package/dist/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
  20. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
  21. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
  22. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +8 -0
  23. package/dist/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
  24. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
  25. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
  26. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +8 -0
  27. package/dist/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
  28. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
  29. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
  30. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +8 -0
  31. package/dist/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
  32. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
  33. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
  34. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js +8 -0
  35. package/dist/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
  36. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
  37. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
  38. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +8 -0
  39. package/dist/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
  40. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
  41. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
  42. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +8 -0
  43. package/dist/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
  44. package/dist/framer.js +1480 -907
  45. package/dist/generated/api-client.d.ts +1 -1
  46. package/dist/generated/api-client.d.ts.map +1 -1
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +6 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/package-manager.d.ts +1 -1
  52. package/dist/package-manager.d.ts.map +1 -1
  53. package/dist/package-manager.js.map +1 -1
  54. package/dist/stackblitz.d.ts +9 -0
  55. package/dist/stackblitz.d.ts.map +1 -0
  56. package/dist/stackblitz.js +182 -0
  57. package/dist/stackblitz.js.map +1 -0
  58. package/dist/version.d.ts +1 -1
  59. package/dist/version.js +1 -1
  60. package/esm/cli.d.ts.map +1 -1
  61. package/esm/cli.js +108 -9
  62. package/esm/cli.js.map +1 -1
  63. package/esm/css.d.ts +5 -0
  64. package/esm/css.d.ts.map +1 -1
  65. package/esm/css.js +24 -0
  66. package/esm/css.js.map +1 -1
  67. package/esm/exporter.d.ts.map +1 -1
  68. package/esm/exporter.js +38 -4
  69. package/esm/exporter.js.map +1 -1
  70. package/esm/framer-chunks/chunk-VUHWYTYT.d.ts +15 -0
  71. package/esm/framer-chunks/chunk-VUHWYTYT.d.ts.map +1 -0
  72. package/esm/framer-chunks/chunk-VUHWYTYT.js +96 -0
  73. package/esm/framer-chunks/chunk-VUHWYTYT.js.map +1 -0
  74. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts +634 -0
  75. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.d.ts.map +1 -0
  76. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +5 -0
  77. package/esm/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js.map +1 -0
  78. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts +115 -0
  79. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.d.ts.map +1 -0
  80. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +5 -0
  81. package/esm/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js.map +1 -0
  82. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts +781 -0
  83. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.d.ts.map +1 -0
  84. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +5 -0
  85. package/esm/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js.map +1 -0
  86. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts +18 -0
  87. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.d.ts.map +1 -0
  88. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +5 -0
  89. package/esm/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js.map +1 -0
  90. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts +1566 -0
  91. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.d.ts.map +1 -0
  92. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js +5 -0
  93. package/esm/framer-chunks/google-63PUBKA6-AMAUIPXM.js.map +1 -0
  94. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts +3588 -0
  95. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.d.ts.map +1 -0
  96. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +5 -0
  97. package/esm/framer-chunks/google-7QNFQWAU-FKX5MRKV.js.map +1 -0
  98. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts +10293 -0
  99. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.d.ts.map +1 -0
  100. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +5 -0
  101. package/esm/framer-chunks/google-KTMKGB4J-RA7CAZTC.js.map +1 -0
  102. package/esm/framer.js +1217 -647
  103. package/esm/index.d.ts +3 -0
  104. package/esm/index.d.ts.map +1 -1
  105. package/esm/index.js +4 -0
  106. package/esm/index.js.map +1 -1
  107. package/esm/package-manager.d.ts +1 -1
  108. package/esm/package-manager.d.ts.map +1 -1
  109. package/esm/package-manager.js.map +1 -1
  110. package/esm/stackblitz.d.ts +9 -0
  111. package/esm/stackblitz.d.ts.map +1 -0
  112. package/esm/stackblitz.js +179 -0
  113. package/esm/stackblitz.js.map +1 -0
  114. package/esm/version.d.ts +1 -1
  115. package/esm/version.js +1 -1
  116. package/package.json +3 -3
  117. package/src/cli.ts +122 -11
  118. package/src/{css.ts → css.tsx} +38 -0
  119. package/src/exporter.ts +45 -4
  120. package/src/framer-chunks/chunk-VUHWYTYT.js +105 -0
  121. package/src/framer-chunks/fontshare-SWUWNY3H-GSSY33IO.js +7 -0
  122. package/src/framer-chunks/fontshare-V2SGEFJT-AVIABYEX.js +7 -0
  123. package/src/framer-chunks/fontshare-YCG7BCG4-T3OENDSJ.js +7 -0
  124. package/src/framer-chunks/framer-font-T5XNAHJ3-SBU5UWOY.js +7 -0
  125. package/src/framer-chunks/google-63PUBKA6-AMAUIPXM.js +7 -0
  126. package/src/framer-chunks/google-7QNFQWAU-FKX5MRKV.js +7 -0
  127. package/src/framer-chunks/google-KTMKGB4J-RA7CAZTC.js +7 -0
  128. package/src/framer.js +1210 -632
  129. package/src/index.ts +6 -0
  130. package/src/package-manager.ts +2 -4
  131. package/src/stackblitz.ts +193 -0
  132. package/src/styles/framer.css +24 -0
  133. package/src/version.ts +1 -1
package/esm/framer.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, __decorateElement, __decoratorMetadata, __decoratorStart, __export, __privateAdd, __privateGet, __privateMethod, __privateSet, __publicField, __runInitializers, __toESM, } from './framer-chunks/chunk-A2PMVMFI.js';
2
- // /:https://app.framerstatic.com/chunk-BLFSVU7M.mjs
2
+ // /:https://app.framerstatic.com/chunk-VDW2YK33.mjs
3
3
  import { createContext, } from 'react';
4
4
  import { useEffect, useLayoutEffect, } from 'react';
5
5
  import { useCallback, useContext, useId, } from 'react';
@@ -340,11 +340,11 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
340
340
  isProcessing: false,
341
341
  };
342
342
  const flagRunNextFrame = () => runNextFrame = true;
343
- const steps2 = stepsOrder.reduce((acc, key7) => {
343
+ const steps22 = stepsOrder.reduce((acc, key7) => {
344
344
  acc[key7] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key7 : void 0);
345
345
  return acc;
346
346
  }, {});
347
- const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps2;
347
+ const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps22;
348
348
  const processBatch = () => {
349
349
  const timestamp = MotionGlobalConfig.useManualTiming ? state.timestamp : performance.now();
350
350
  runNextFrame = false;
@@ -375,7 +375,7 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
375
375
  }
376
376
  };
377
377
  const schedule = stepsOrder.reduce((acc, key7) => {
378
- const step2 = steps2[key7];
378
+ const step2 = steps22[key7];
379
379
  acc[key7] = (process2, keepAlive = false, immediate = false) => {
380
380
  if (!runNextFrame)
381
381
  wake();
@@ -385,14 +385,14 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
385
385
  }, {});
386
386
  const cancel = (process2) => {
387
387
  for (let i = 0; i < stepsOrder.length; i++) {
388
- steps2[stepsOrder[i]].cancel(process2);
388
+ steps22[stepsOrder[i]].cancel(process2);
389
389
  }
390
390
  };
391
391
  return {
392
392
  schedule,
393
393
  cancel,
394
394
  state,
395
- steps: steps2,
395
+ steps: steps22,
396
396
  };
397
397
  }
398
398
  var { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : noop, true);
@@ -544,6 +544,11 @@ var color = {
544
544
  transform: (v) => {
545
545
  return typeof v === 'string' ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);
546
546
  },
547
+ getAnimatableNone: (v) => {
548
+ const parsed = color.parse(v);
549
+ parsed.alpha = 0;
550
+ return color.transform(parsed);
551
+ },
547
552
  };
548
553
  var colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
549
554
  function test(v) {
@@ -621,7 +626,7 @@ function createTransformer(source) {
621
626
  return output;
622
627
  };
623
628
  }
624
- var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;
629
+ var convertNumbersToZero = (v) => typeof v === 'number' ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
625
630
  function getAnimatableNone(v) {
626
631
  const parsed = parseComplexValue(v);
627
632
  const transformer = createTransformer(v);
@@ -812,7 +817,7 @@ var generateLinearEasing = (easing, duration, resolution = 10) => {
812
817
  let points = '';
813
818
  const numPoints = Math.max(Math.round(duration / resolution), 2);
814
819
  for (let i = 0; i < numPoints; i++) {
815
- points += easing(i / (numPoints - 1)) + ', ';
820
+ points += Math.round(easing(i / (numPoints - 1)) * 1e4) / 1e4 + ', ';
816
821
  }
817
822
  return `linear(${points.substring(0, points.length - 2)})`;
818
823
  };
@@ -3896,7 +3901,7 @@ function addToQueue(builder) {
3896
3901
  }
3897
3902
  var ViewTransitionBuilder = class {
3898
3903
  constructor(update, options = {}) {
3899
- this.currentTarget = 'root';
3904
+ this.currentSubject = 'root';
3900
3905
  this.targets = /* @__PURE__ */ new Map();
3901
3906
  this.notifyReady = noop;
3902
3907
  this.readyPromise = new Promise((resolve) => {
@@ -3909,8 +3914,8 @@ var ViewTransitionBuilder = class {
3909
3914
  };
3910
3915
  addToQueue(this);
3911
3916
  }
3912
- get(selector) {
3913
- this.currentTarget = selector;
3917
+ get(subject) {
3918
+ this.currentSubject = subject;
3914
3919
  return this;
3915
3920
  }
3916
3921
  layout(keyframes2, options) {
@@ -3943,11 +3948,11 @@ var ViewTransitionBuilder = class {
3943
3948
  return this;
3944
3949
  }
3945
3950
  updateTarget(target, keyframes2, options = {}) {
3946
- const { currentTarget, targets, } = this;
3947
- if (!targets.has(currentTarget)) {
3948
- targets.set(currentTarget, {});
3951
+ const { currentSubject, targets, } = this;
3952
+ if (!targets.has(currentSubject)) {
3953
+ targets.set(currentSubject, {});
3949
3954
  }
3950
- const targetData = targets.get(currentTarget);
3955
+ const targetData = targets.get(currentSubject);
3951
3956
  targetData[target] = {
3952
3957
  keyframes: keyframes2,
3953
3958
  options,
@@ -4020,7 +4025,7 @@ var PopChildMeasure = class extends React2.Component {
4020
4025
  return this.props.children;
4021
4026
  }
4022
4027
  };
4023
- function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4028
+ function PopChild({ children, isPresent: isPresent2, anchorX, root, }) {
4024
4029
  const id4 = useId();
4025
4030
  const ref = useRef3(null);
4026
4031
  const size = useRef3({
@@ -4040,7 +4045,8 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4040
4045
  const style2 = document.createElement('style');
4041
4046
  if (nonce)
4042
4047
  style2.nonce = nonce;
4043
- document.head.appendChild(style2);
4048
+ const parent = root ?? document.head;
4049
+ parent.appendChild(style2);
4044
4050
  if (style2.sheet) {
4045
4051
  style2.sheet.insertRule(`
4046
4052
  [data-motion-pop-id="${id4}"] {
@@ -4053,8 +4059,9 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4053
4059
  `);
4054
4060
  }
4055
4061
  return () => {
4056
- if (document.head.contains(style2)) {
4057
- document.head.removeChild(style2);
4062
+ parent.removeChild(style2);
4063
+ if (parent.contains(style2)) {
4064
+ parent.removeChild(style2);
4058
4065
  }
4059
4066
  };
4060
4067
  }, [isPresent2,]);
@@ -4067,7 +4074,7 @@ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
4067
4074
  }),
4068
4075
  });
4069
4076
  }
4070
- var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
4077
+ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, root, }) => {
4071
4078
  const presenceChildren = useConstant(newChildrenMap);
4072
4079
  const id4 = useId();
4073
4080
  let isReusedContext = true;
@@ -4107,6 +4114,7 @@ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete,
4107
4114
  children = jsx3(PopChild, {
4108
4115
  isPresent: isPresent2,
4109
4116
  anchorX,
4117
+ root,
4110
4118
  children,
4111
4119
  });
4112
4120
  }
@@ -4127,7 +4135,7 @@ function onlyElements(children) {
4127
4135
  });
4128
4136
  return filtered;
4129
4137
  }
4130
- var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
4138
+ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', root, }) => {
4131
4139
  const [isParentPresent, safeToRemove,] = usePresence(propagate);
4132
4140
  const presentChildren = useMemo2(() => onlyElements(children), [children,]);
4133
4141
  const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
@@ -4202,6 +4210,7 @@ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, prese
4202
4210
  custom,
4203
4211
  presenceAffectsLayout,
4204
4212
  mode,
4213
+ root,
4205
4214
  onExitComplete: isPresent2 ? void 0 : onExit,
4206
4215
  anchorX,
4207
4216
  children: child,
@@ -4371,7 +4380,7 @@ function isValidMotionProp(key7) {
4371
4380
  }
4372
4381
  var shouldForward = (key7) => !isValidMotionProp(key7);
4373
4382
  function loadExternalIsValidProp(isValidProp) {
4374
- if (!isValidProp)
4383
+ if (typeof isValidProp !== 'function')
4375
4384
  return;
4376
4385
  shouldForward = (key7) => key7.startsWith('on') ? !isValidMotionProp(key7) : isValidProp(key7);
4377
4386
  }
@@ -7443,6 +7452,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7443
7452
  constructor(latestValues = {}, parent = defaultParent == null ? void 0 : defaultParent()) {
7444
7453
  this.id = id2++;
7445
7454
  this.animationId = 0;
7455
+ this.animationCommitId = 0;
7446
7456
  this.children = /* @__PURE__ */ new Set();
7447
7457
  this.options = {};
7448
7458
  this.isTreeAnimating = false;
@@ -7662,9 +7672,14 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7662
7672
  this.nodes.forEach(clearMeasurements);
7663
7673
  return;
7664
7674
  }
7675
+ if (this.animationId <= this.animationCommitId) {
7676
+ this.nodes.forEach(clearIsLayoutDirty);
7677
+ return;
7678
+ }
7665
7679
  if (!this.isUpdating) {
7666
7680
  this.nodes.forEach(clearIsLayoutDirty);
7667
7681
  }
7682
+ this.animationCommitId = this.animationId;
7668
7683
  this.isUpdating = false;
7669
7684
  this.nodes.forEach(resetTransformStyle);
7670
7685
  this.nodes.forEach(updateLayout);
@@ -9541,6 +9556,9 @@ function calcNextTime(current2, next2, prev, labels) {
9541
9556
  else if (next2 === '<') {
9542
9557
  return prev;
9543
9558
  }
9559
+ else if (next2.startsWith('<')) {
9560
+ return Math.max(0, prev + parseFloat(next2.slice(1)));
9561
+ }
9544
9562
  else {
9545
9563
  return labels.get(next2) ?? current2;
9546
9564
  }
@@ -9613,7 +9631,7 @@ function createAnimationsFromSequence(sequence2, { defaultTransition = {}, ...se
9613
9631
  let { ease: ease2 = defaultTransition.ease || 'easeOut', duration, } = valueTransition;
9614
9632
  const calculatedDelay = typeof delay2 === 'function' ? delay2(elementIndex, numSubjects) : delay2;
9615
9633
  const numKeyframes = valueKeyframesAsList.length;
9616
- const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type];
9634
+ const createGenerator = isGenerator(type) ? type : generators == null ? void 0 : generators[type || 'keyframes'];
9617
9635
  if (numKeyframes <= 2 && createGenerator) {
9618
9636
  let absoluteDelta = 100;
9619
9637
  if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {
@@ -9872,6 +9890,9 @@ function createScopedAnimate(scope) {
9872
9890
  const animation = new GroupAnimationWithThen(animations2);
9873
9891
  if (scope) {
9874
9892
  scope.animations.push(animation);
9893
+ animation.finished.then(() => {
9894
+ removeItem(scope.animations, animation);
9895
+ });
9875
9896
  }
9876
9897
  return animation;
9877
9898
  }
@@ -9887,6 +9908,7 @@ function useAnimate() {
9887
9908
  const animate22 = useConstant(() => createScopedAnimate(scope));
9888
9909
  useUnmountEffect(() => {
9889
9910
  scope.animations.forEach((animation) => animation.stop());
9911
+ scope.animations.length = 0;
9890
9912
  });
9891
9913
  return [scope, animate22,];
9892
9914
  }
@@ -10144,6 +10166,20 @@ function useInstantTransition() {
10144
10166
  function disableInstantTransitions() {
10145
10167
  MotionGlobalConfig.instantAnimations = false;
10146
10168
  }
10169
+ function usePageInView() {
10170
+ const [isInView, setIsInView,] = useState(true);
10171
+ useEffect(() => {
10172
+ const handleVisibilityChange = () => setIsInView(!document.hidden);
10173
+ if (document.hidden) {
10174
+ handleVisibilityChange();
10175
+ }
10176
+ document.addEventListener('visibilitychange', handleVisibilityChange);
10177
+ return () => {
10178
+ document.removeEventListener('visibilitychange', handleVisibilityChange);
10179
+ };
10180
+ }, []);
10181
+ return isInView;
10182
+ }
10147
10183
  var appearAnimationStore = /* @__PURE__ */ new Map();
10148
10184
  var appearComplete = /* @__PURE__ */ new Map();
10149
10185
  var appearStoreId = (elementId, valueName) => {
@@ -10499,15 +10535,16 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
10499
10535
  return startDelay + delay2;
10500
10536
  };
10501
10537
  }
10502
- // /:https://app.framerstatic.com/framer.UWLYDHV3.mjs
10503
- import { lazy as ReactLazy, } from 'react';
10538
+ // /:https://app.framerstatic.com/framer.L7DRXRFF.mjs
10504
10539
  import React4 from 'react';
10505
10540
  import { startTransition as startTransition2, } from 'react';
10506
10541
  import { Suspense as Suspense2, } from 'react';
10507
10542
  import { memo as memo2, } from 'react';
10508
10543
  import ReactDOM from 'react-dom';
10544
+ import { useSyncExternalStore, } from 'react';
10509
10545
  import { createRef, } from 'react';
10510
10546
  import { useTransition, } from 'react';
10547
+ import { createPortal, } from 'react-dom';
10511
10548
  import { cloneElement as cloneElement32, } from 'react';
10512
10549
  var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
10513
10550
  var require_hsluv = __commonJS({
@@ -11443,37 +11480,47 @@ var preloadKey = 'preload';
11443
11480
  function isLazyComponentType(componentType) {
11444
11481
  return typeof componentType === 'object' && componentType !== null && !isValidElement(componentType) && preloadKey in componentType;
11445
11482
  }
11446
- function lazy(factory) {
11447
- const LazyComponent = ReactLazy(factory);
11483
+ function lazy(factory, moduleName = 'default') {
11448
11484
  let factoryPromise;
11449
11485
  let LoadedComponent;
11450
11486
  let hasRendered = false;
11451
- const Component17 = forwardRef(function LazyWithPreload(props, ref) {
11452
- useEffect(() => {
11453
- hasRendered = true;
11454
- }, []);
11455
- const Comp = LoadedComponent ?? LazyComponent;
11456
- return /* @__PURE__ */ jsx3(Comp, {
11457
- ref,
11458
- ...props,
11459
- });
11460
- });
11461
- Component17.preload = () => {
11487
+ let error;
11488
+ const load = () => {
11462
11489
  if (!factoryPromise) {
11463
11490
  factoryPromise = factory().then((module) => {
11464
- LoadedComponent = module.default;
11491
+ if (!(moduleName in module))
11492
+ throw new Error(`Module does not contain export '${moduleName}'`);
11493
+ LoadedComponent = module[moduleName];
11465
11494
  return LoadedComponent;
11495
+ }).catch((err) => {
11496
+ error = err;
11466
11497
  });
11467
11498
  }
11468
11499
  return factoryPromise;
11469
11500
  };
11470
- Component17.getStatus = () => {
11501
+ const Component18 = forwardRef(function LazyWithPreload(props, ref) {
11502
+ useEffect(() => {
11503
+ hasRendered = true;
11504
+ }, []);
11505
+ if (error) {
11506
+ throw error;
11507
+ }
11508
+ if (!LoadedComponent) {
11509
+ throw load();
11510
+ }
11511
+ return /* @__PURE__ */ jsx3(LoadedComponent, {
11512
+ ref,
11513
+ ...props,
11514
+ });
11515
+ });
11516
+ Component18.preload = load;
11517
+ Component18.getStatus = () => {
11471
11518
  return {
11472
11519
  hasLoaded: LoadedComponent !== void 0,
11473
11520
  hasRendered,
11474
11521
  };
11475
11522
  };
11476
- return Component17;
11523
+ return Component18;
11477
11524
  }
11478
11525
  var objectKeys = Object.keys;
11479
11526
  function hasProp(o, prop) {
@@ -12167,23 +12214,28 @@ function forwardCurrentQueryParams(href) {
12167
12214
  }
12168
12215
  return forwardQueryParams(queryParamsString, href);
12169
12216
  }
12217
+ var FRAMER_VARIANT_KEY = 'framer_variant';
12170
12218
  function forwardQueryParams(queryParamsString, href) {
12171
12219
  const startOfHash = href.indexOf('#');
12172
12220
  const hrefWithoutHash = startOfHash === -1 ? href : href.substring(0, startOfHash);
12173
12221
  const hash2 = startOfHash === -1 ? '' : href.substring(startOfHash);
12174
12222
  const startOfSearch = hrefWithoutHash.indexOf('?');
12175
- if (startOfSearch === -1) {
12176
- return hrefWithoutHash + queryParamsString + hash2;
12177
- }
12223
+ const baseUrl = startOfSearch === -1 ? hrefWithoutHash : hrefWithoutHash.substring(0, startOfSearch);
12224
+ const searchString = startOfSearch === -1 ? '' : hrefWithoutHash.substring(startOfSearch);
12225
+ const newSearchParams = new URLSearchParams(searchString);
12178
12226
  const currentSearchParams = new URLSearchParams(queryParamsString);
12179
- const newSearchString = hrefWithoutHash.substring(startOfSearch + 1);
12180
- const newSearchParams = new URLSearchParams(newSearchString);
12181
12227
  for (const [key7, value,] of currentSearchParams) {
12182
- if (!newSearchParams.has(key7)) {
12183
- newSearchParams.append(key7, value);
12184
- }
12228
+ if (newSearchParams.has(key7))
12229
+ continue;
12230
+ if (key7 === FRAMER_VARIANT_KEY)
12231
+ continue;
12232
+ newSearchParams.append(key7, value);
12233
+ }
12234
+ const newSearchString = newSearchParams.toString();
12235
+ if (newSearchString === '') {
12236
+ return hrefWithoutHash + hash2;
12185
12237
  }
12186
- return hrefWithoutHash.substring(0, startOfSearch + 1) + newSearchParams.toString() + hash2;
12238
+ return baseUrl + '?' + newSearchString + hash2;
12187
12239
  }
12188
12240
  async function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {
12189
12241
  var _a;
@@ -19392,8 +19444,38 @@ var inputIconCSSDeclaration = {
19392
19444
  function createRGBVariableFallbacks(variables, fallback) {
19393
19445
  return css2.variable(...variables.flatMap((variable) => [`${variable}-rgb`, variable,]), fallback);
19394
19446
  }
19447
+ var defaultRichTextContainerStyle = {
19448
+ display: 'flex',
19449
+ flexDirection: 'column',
19450
+ justifyContent: 'flex-start',
19451
+ };
19452
+ var defaultTextFillStyle = {
19453
+ display: 'inline-block',
19454
+ };
19455
+ var defaultImageStyle = {
19456
+ display: 'block',
19457
+ };
19395
19458
  var richTextCSSRules = /* @__PURE__ */ (() => [
19459
+ /**
19460
+ * RichTextContainer styles can get overridden by other static or inline styles collected in
19461
+ * style collectors, as well as styles defined directly in the @link{RichText.tsx} component.
19462
+ *
19463
+ * NOTE: `display: flex` can get overridden with `display: -webkit-box` in
19464
+ * @link{collectTextTruncation.ts} if the text is truncated. In this case, the flex-specific
19465
+ * properties are not supported, e.g. `justify-content`. This is ok because truncated text has
19466
+ * auto height and doesn't support vertical alignment. In any case, keep this in mind when
19467
+ * using other flex-specific properties.
19468
+ */
19396
19469
  /* css */
19470
+ `
19471
+ [data-framer-component-type="RichTextContainer"] {
19472
+ display: ${defaultRichTextContainerStyle.display};
19473
+ flex-direction: ${defaultRichTextContainerStyle.flexDirection};
19474
+ justify-content: ${defaultRichTextContainerStyle.justifyContent};
19475
+ outline: none;
19476
+ flex-shrink: 0;
19477
+ }
19478
+ `, /* css */
19397
19479
  `
19398
19480
  p.framer-text,
19399
19481
  div.framer-text,
@@ -19558,7 +19640,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
19558
19640
  /* css */
19559
19641
  `
19560
19642
  .framer-text[data-text-fill] {
19561
- display: inline-block;
19643
+ display: ${defaultTextFillStyle.display};
19562
19644
  background-clip: text;
19563
19645
  -webkit-background-clip: text;
19564
19646
  /* make this a transparent color if you want to visualise the clipping */
@@ -19900,7 +19982,7 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
19900
19982
  `, /* css */
19901
19983
  `
19902
19984
  .framer-image.framer-text {
19903
- display: block;
19985
+ display: ${defaultImageStyle.display};
19904
19986
  max-width: 100%;
19905
19987
  height: auto;
19906
19988
  }
@@ -20058,6 +20140,40 @@ var richTextCSSRules = /* @__PURE__ */ (() => [
20058
20140
  }
20059
20141
  `,
20060
20142
  ])();
20143
+ var textTruncationDisplayInlineVariableForSafari16 = '--text-truncation-display-inline-for-safari-16';
20144
+ var textTruncationDisplayNoneVariableForSafari16 = '--text-truncation-display-none-for-safari-16';
20145
+ var textTruncationLineBreakVariableForSafari16 = '--text-truncation-line-break-for-safari-16';
20146
+ var blockLikeElementSelectors = [
20147
+ 'div.framer-text',
20148
+ 'p.framer-text',
20149
+ 'h1.framer-text',
20150
+ 'h2.framer-text',
20151
+ 'h3.framer-text',
20152
+ 'h4.framer-text',
20153
+ 'h5.framer-text',
20154
+ 'h6.framer-text',
20155
+ 'ol.framer-text',
20156
+ 'ul.framer-text',
20157
+ 'li.framer-text',
20158
+ 'blockquote.framer-text',
20159
+ '.framer-text.framer-image',
20160
+ ];
20161
+ var anySafariVersion = '(background: -webkit-named-image(i))';
20162
+ var safari17OrGreater = '(contain-intrinsic-size: inherit)';
20163
+ var safari16TextTruncationFix = /* @__PURE__ */ (() => [`@supports ${anySafariVersion} and (not ${safari17OrGreater}) {
20164
+ /* Render block-like elements inline when text is truncated, otherwise default to user agent (revert) */
20165
+ ${blockLikeElementSelectors.join(', ')} { display: var(${textTruncationDisplayInlineVariableForSafari16}, revert) }
20166
+
20167
+ /* Add a line break after each block-like element that we render inline, to resemble the block-like behavior */
20168
+ ${blockLikeElementSelectors.map((selector) => `${selector}::after`).join(', ')} { content: var(${textTruncationLineBreakVariableForSafari16}); white-space: pre; }
20169
+
20170
+ /* Don't render modules (e.g. videos, code-blocks), or tables when text is truncated, because often these can't be truncated and their children might be block elements */
20171
+ .framer-text.framer-text-module,
20172
+ .framer-text.framer-table-wrapper { display: var(${textTruncationDisplayNoneVariableForSafari16}, revert) }
20173
+
20174
+ /* Render text-fill elements inline when text is truncated, otherwise default to their default value (e.g. inline-block) */
20175
+ p.framer-text[data-text-fill] { display: var(${textTruncationDisplayInlineVariableForSafari16}, ${defaultTextFillStyle.display}) }
20176
+ }`,])();
20061
20177
  var defaultCache = /* @__PURE__ */ new Set();
20062
20178
  var defaultSheet;
20063
20179
  function injectCSSRule(cssRule, sheet, cache2 = defaultCache) {
@@ -20335,6 +20451,7 @@ var pageContentWrapperWrapperCSSRules = [
20335
20451
  `[data-framer-component-type="PageContentWrapper"] > *, [data-framer-component-type="PageContentWrapper"] > [data-framer-component-type] { position: relative; }`,
20336
20452
  ];
20337
20453
  var presenceCSS = [`[data-is-present="false"], [data-is-present="false"] * { pointer-events: none !important; }`,];
20454
+ var lightboxCSS = [`.framer-lightbox-container { opacity: 1 !important; pointer-events: auto !important; }`,];
20338
20455
  var cursorCSS = [
20339
20456
  `[data-framer-cursor="pointer"] { cursor: pointer; }`,
20340
20457
  `[data-framer-cursor="grab"] { cursor: grab; }`,
@@ -20367,12 +20484,12 @@ var hideScrollbars = [
20367
20484
  ];
20368
20485
  var willChangeOverrideCSSVariable = '--framer-will-change-override';
20369
20486
  var willChangeEffectOverrideCSSVariable = '--framer-will-change-effect-override';
20370
- var anySafariVersion = '(background: -webkit-named-image(i))';
20487
+ var anySafariVersion2 = '(background: -webkit-named-image(i))';
20371
20488
  var safari16OrGreater = '(grid-template-rows: subgrid)';
20372
20489
  var willChangeTransformRules = (isPreview) => isPreview
20373
20490
  ? [
20374
20491
  `body { ${willChangeOverrideCSSVariable}: none; }`,
20375
- `@supports ${anySafariVersion} and (not ${safari16OrGreater}) { body { ${willChangeOverrideCSSVariable}: transform; } }`,
20492
+ `@supports ${anySafariVersion2} and (not ${safari16OrGreater}) { body { ${willChangeOverrideCSSVariable}: transform; } }`,
20376
20493
  ]
20377
20494
  : [`body { ${willChangeOverrideCSSVariable}: none; ${willChangeEffectOverrideCSSVariable}: none; }`,];
20378
20495
  var frameCSSRules = (isPreview) => {
@@ -20402,6 +20519,8 @@ var combineCSSRules = (isPreview) => [
20402
20519
  ...resetCSS,
20403
20520
  ...hideScrollbars,
20404
20521
  ...overflowClipFallbackCSSRules,
20522
+ ...lightboxCSS,
20523
+ ...safari16TextTruncationFix,
20405
20524
  ];
20406
20525
  export var combinedCSSRules = /* @__PURE__ */ combineCSSRules(false);
20407
20526
  var combinedCSSRulesForPreview = /* @__PURE__ */ combineCSSRules(true);
@@ -22216,16 +22335,35 @@ function getImageStyle(image) {
22216
22335
  objectFit: cssObjectFit(image.fit),
22217
22336
  };
22218
22337
  }
22219
- function StaticImage({ image, containerSize, nodeId, alt, draggable, syncDecoding, }) {
22338
+ function useDecodingAttribute(avoidAsyncDecoding) {
22339
+ const currentDecoding = React4.useRef(avoidAsyncDecoding ? 'auto' : 'async');
22340
+ const switchDecodingToAuto = useCallback((node) => {
22341
+ currentDecoding.current = 'auto';
22342
+ node.decoding = 'auto';
22343
+ }, []);
22344
+ const onImageLoad = useCallback((event) => {
22345
+ switchDecodingToAuto(event.currentTarget);
22346
+ }, [switchDecodingToAuto,]);
22347
+ const onImageMount = useCallback((node) => {
22348
+ if (node == null ? void 0 : node.complete)
22349
+ switchDecodingToAuto(node);
22350
+ }, [switchDecodingToAuto,]);
22351
+ return {
22352
+ decoding: currentDecoding.current,
22353
+ onImageLoad,
22354
+ onImageMount,
22355
+ };
22356
+ }
22357
+ function StaticImage({ image, containerSize, nodeId, alt, draggable, avoidAsyncDecoding, }) {
22220
22358
  const source = runtime.useImageSource(image, containerSize, nodeId);
22221
22359
  const imageStyle = getImageStyle(image);
22222
- const imageRef = React4.useRef(null);
22360
+ const { decoding, onImageLoad, onImageMount, } = useDecodingAttribute(avoidAsyncDecoding);
22223
22361
  return (
22224
22362
  // eslint-disable-next-line framer-studio/require-async-decoding -- we conditionally apply it
22225
22363
  /* @__PURE__ */
22226
22364
  jsx3('img', {
22227
- ref: imageRef,
22228
- decoding: syncDecoding ? 'sync' : 'async',
22365
+ ref: onImageMount,
22366
+ decoding,
22229
22367
  fetchPriority: image.fetchPriority,
22230
22368
  loading: image.loading,
22231
22369
  width: image.pixelWidth,
@@ -22233,6 +22371,7 @@ function StaticImage({ image, containerSize, nodeId, alt, draggable, syncDecodin
22233
22371
  sizes: image.sizes,
22234
22372
  srcSet: image.srcSet,
22235
22373
  src: source,
22374
+ onLoad: onImageLoad,
22236
22375
  alt: alt ?? image.alt ?? '',
22237
22376
  style: imageStyle,
22238
22377
  draggable,
@@ -22310,7 +22449,7 @@ function BackgroundImageComponent({ layoutId, image, ...props }) {
22310
22449
  else if (RenderTarget.current() !== RenderTarget.canvas) {
22311
22450
  imageNode = /* @__PURE__ */ jsx3(StaticImage, {
22312
22451
  image,
22313
- syncDecoding: RenderTarget.current() === RenderTarget.export,
22452
+ avoidAsyncDecoding: RenderTarget.current() === RenderTarget.export,
22314
22453
  ...props,
22315
22454
  });
22316
22455
  }
@@ -22458,18 +22597,10 @@ function getIntrinsicSizeForBackgroundImage(background) {
22458
22597
  height: background.pixelHeight,
22459
22598
  };
22460
22599
  }
22461
- return parseImageSizeFromSrc(background.src);
22462
- }
22463
- function parseImageSizeFromSrc(src) {
22464
- if (!src)
22465
- return void 0;
22466
- const url = new URL(src);
22467
- const width = url.searchParams.get('width');
22468
- const height = url.searchParams.get('height');
22469
- if (width && height) {
22600
+ if (background.src === void 0) {
22470
22601
  return {
22471
- width: parseInt(width),
22472
- height: parseInt(height),
22602
+ width: 1,
22603
+ height: 1,
22473
22604
  };
22474
22605
  }
22475
22606
  return void 0;
@@ -22784,7 +22915,7 @@ function useMeasuredSize(ref) {
22784
22915
  return size.current;
22785
22916
  }
22786
22917
  var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
22787
- var withMeasuredSize = (Component17) => (props) => {
22918
+ var withMeasuredSize = (Component18) => (props) => {
22788
22919
  const ref = React4.useRef(null);
22789
22920
  const size = useMeasuredSize(ref);
22790
22921
  const dataProps = {
@@ -22801,7 +22932,7 @@ var withMeasuredSize = (Component17) => (props) => {
22801
22932
  },
22802
22933
  ref,
22803
22934
  ...dataProps,
22804
- children: shouldRender && /* @__PURE__ */ jsx3(Component17, {
22935
+ children: shouldRender && /* @__PURE__ */ jsx3(Component18, {
22805
22936
  ...props,
22806
22937
  width: (size == null ? void 0 : size.width) ?? fallbackWidth,
22807
22938
  height: (size == null ? void 0 : size.height) ?? fallbackHeight,
@@ -25721,7 +25852,7 @@ var clamp2 = (value, a, b) => {
25721
25852
  var DraggingContext = /* @__PURE__ */ React4.createContext({
25722
25853
  dragging: false,
25723
25854
  });
25724
- function WithDragging(Component17) {
25855
+ function WithDragging(Component18) {
25725
25856
  const _WithDraggingHOC = class _WithDraggingHOC2 extends React4.Component {
25726
25857
  constructor(props, defaultProps) {
25727
25858
  super(props, defaultProps);
@@ -26291,7 +26422,7 @@ function WithDragging(Component17) {
26291
26422
  value: {
26292
26423
  dragging: this.state.isDragging,
26293
26424
  },
26294
- children: /* @__PURE__ */ jsx3(Component17, {
26425
+ children: /* @__PURE__ */ jsx3(Component18, {
26295
26426
  ...originalProps,
26296
26427
  }),
26297
26428
  });
@@ -26328,10 +26459,10 @@ function WithDragging(Component17) {
26328
26459
  constraints: {},
26329
26460
  mouseWheel: false,
26330
26461
  });
26331
- __publicField(_WithDraggingHOC, 'defaultProps', Object.assign({}, Component17.defaultProps, _WithDraggingHOC.draggingDefaultProps));
26462
+ __publicField(_WithDraggingHOC, 'defaultProps', Object.assign({}, Component18.defaultProps, _WithDraggingHOC.draggingDefaultProps));
26332
26463
  let WithDraggingHOC = _WithDraggingHOC;
26333
26464
  const withDragging = WithDraggingHOC;
26334
- (0, import_hoist_non_react_statics2.default)(withDragging, Component17);
26465
+ (0, import_hoist_non_react_statics2.default)(withDragging, Component18);
26335
26466
  return withDragging;
26336
26467
  }
26337
26468
  var hoverProps = {
@@ -27597,7 +27728,7 @@ function useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = '0px', pag
27597
27728
  enabled: paginationInfo.currentPage < paginationInfo.totalPages,
27598
27729
  });
27599
27730
  }
27600
- function withInfiniteScroll(Component17) {
27731
+ function withInfiniteScroll(Component18) {
27601
27732
  return React4.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {
27602
27733
  const infiniteScrollRef = useObserverRef(ref);
27603
27734
  useInfiniteScroll({
@@ -27606,7 +27737,7 @@ function withInfiniteScroll(Component17) {
27606
27737
  ref: infiniteScrollRef,
27607
27738
  paginationInfo: __paginationInfo,
27608
27739
  });
27609
- return /* @__PURE__ */ jsx3(Component17, {
27740
+ return /* @__PURE__ */ jsx3(Component18, {
27610
27741
  ...props,
27611
27742
  ref: infiniteScrollRef,
27612
27743
  });
@@ -30345,20 +30476,20 @@ function convertColorProps(props) {
30345
30476
  }
30346
30477
  return props;
30347
30478
  }
30348
- function WithOverride(Component17, override) {
30479
+ function WithOverride(Component18, override) {
30349
30480
  const useOverride = typeof override === 'function' ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);
30350
30481
  const ComponentWithOverride = function (props) {
30351
30482
  useContext(DataObserverContext);
30352
30483
  const overrideProps = useOverride(props);
30353
30484
  const { style: style2, ...rest } = props;
30354
- return /* @__PURE__ */ jsx3(Component17, {
30485
+ return /* @__PURE__ */ jsx3(Component18, {
30355
30486
  ...rest,
30356
30487
  ...overrideProps,
30357
30488
  _initialStyle: style2,
30358
30489
  });
30359
30490
  };
30360
- (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component17);
30361
- ComponentWithOverride['displayName'] = `WithOverride(${Component17.displayName || Component17.name})`;
30491
+ (0, import_hoist_non_react_statics4.default)(ComponentWithOverride, Component18);
30492
+ ComponentWithOverride['displayName'] = `WithOverride(${Component18.displayName || Component18.name})`;
30362
30493
  return ComponentWithOverride;
30363
30494
  }
30364
30495
  var prefix = '__framer__';
@@ -30496,30 +30627,14 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
30496
30627
  return new Set(componentsWithSSRStylesAttr.split(' '));
30497
30628
  })();
30498
30629
  var framerCSSMarker = 'data-framer-css-ssr';
30499
- var withCSS = (Component17, escapedCSS, componentSerializationId) => React4.forwardRef((props, ref) => {
30630
+ var withCSS = (Component18, escapedCSS, componentSerializationId) => React4.forwardRef((props, ref) => {
30500
30631
  const { sheet, cache: cache2, } = React4.useContext(StyleSheetContext) ?? {};
30501
30632
  const id3 = componentSerializationId;
30502
30633
  if (!isBrowser2()) {
30503
30634
  if (isFunction(escapedCSS))
30504
30635
  escapedCSS = escapedCSS(RenderTarget.current());
30505
30636
  const concatenatedCSS = Array.isArray(escapedCSS) ? escapedCSS.join('\n') : escapedCSS;
30506
- return /* @__PURE__ */ jsxs(Fragment, {
30507
- children: [
30508
- /* @__PURE__ */ jsx3('style', {
30509
- ...{
30510
- [framerCSSMarker]: true,
30511
- },
30512
- 'data-framer-component': id3,
30513
- dangerouslySetInnerHTML: {
30514
- __html: concatenatedCSS,
30515
- },
30516
- }),
30517
- /* @__PURE__ */ jsx3(Component17, {
30518
- ...props,
30519
- ref,
30520
- }),
30521
- ],
30522
- });
30637
+ cssCollector.add(concatenatedCSS, id3);
30523
30638
  }
30524
30639
  useInsertionEffect(() => {
30525
30640
  if (id3 && componentsWithServerRenderedStyles.has(id3))
@@ -30531,11 +30646,33 @@ var withCSS = (Component17, escapedCSS, componentSerializationId) => React4.forw
30531
30646
  : escapedCSS.split('\n');
30532
30647
  css22.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2));
30533
30648
  }, []);
30534
- return /* @__PURE__ */ jsx3(Component17, {
30649
+ return /* @__PURE__ */ jsx3(Component18, {
30535
30650
  ...props,
30536
30651
  ref,
30537
30652
  });
30538
30653
  });
30654
+ var CSSCollector = class {
30655
+ constructor() {
30656
+ __publicField(this, 'styles', /* @__PURE__ */ new Set());
30657
+ __publicField(this, 'componentIds', /* @__PURE__ */ new Set());
30658
+ }
30659
+ add(css22, componentId) {
30660
+ this.styles.add(css22);
30661
+ if (componentId)
30662
+ this.componentIds.add(componentId);
30663
+ }
30664
+ getStyles() {
30665
+ return this.styles;
30666
+ }
30667
+ getComponentIds() {
30668
+ return this.componentIds;
30669
+ }
30670
+ clear() {
30671
+ this.styles.clear();
30672
+ this.componentIds.clear();
30673
+ }
30674
+ };
30675
+ var cssCollector = /* @__PURE__ */ new CSSCollector();
30539
30676
  var SSRParentVariantsContext = /* @__PURE__ */ React4.createContext(void 0);
30540
30677
  var SSRVariantClassName = 'ssr-variant';
30541
30678
  function renderBranchedChildrenFromPropertyOverrides(overrides, children, props, variantClassNames, primaryVariantId, parentVariants, cloneChildren, activeVariantId) {
@@ -30783,7 +30920,7 @@ var AnimationCollector = class {
30783
30920
  };
30784
30921
  _variantHashes = /* @__PURE__ */ new WeakMap();
30785
30922
  var framerAppearEffects = /* @__PURE__ */ new AnimationCollector();
30786
- function withOptimizedAppearEffect(Component17) {
30923
+ function withOptimizedAppearEffect(Component18) {
30787
30924
  return React4.forwardRef(({ optimized, ...props }, ref) => {
30788
30925
  var _a;
30789
30926
  const generatedComponentContext = React4.useContext(GeneratedComponentContext);
@@ -30799,7 +30936,7 @@ function withOptimizedAppearEffect(Component17) {
30799
30936
  optimized ? props : null, generatedComponentContext);
30800
30937
  }
30801
30938
  const disabledProps = getDisabledFXPropsInStaticRenderer(props);
30802
- return /* @__PURE__ */ jsx3(Component17, {
30939
+ return /* @__PURE__ */ jsx3(Component18, {
30803
30940
  ref,
30804
30941
  ...props,
30805
30942
  ...disabledProps,
@@ -31099,8 +31236,11 @@ function useParallax(options, ref, visibilityStyle) {
31099
31236
  : effectDisabledStyle,
31100
31237
  };
31101
31238
  }
31239
+ function isTargetAndTransition(value) {
31240
+ return typeof value === 'object' && value !== null;
31241
+ }
31102
31242
  function getTransition(value) {
31103
- if (isString(value) || !isObject2(value))
31243
+ if (!isTargetAndTransition(value))
31104
31244
  return void 0;
31105
31245
  return value == null ? void 0 : value.transition;
31106
31246
  }
@@ -31112,7 +31252,9 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
31112
31252
  return resolve();
31113
31253
  const motionValue2 = effect.values[key7];
31114
31254
  motionValue2.stop();
31115
- let value = !isObject2(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31255
+ let value = !isTargetAndTransition(target)
31256
+ ? defaultFXValues[key7]
31257
+ : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
31116
31258
  if (isMotionValue(value))
31117
31259
  value = value.get();
31118
31260
  if (!isNumber2(value))
@@ -31730,10 +31872,10 @@ function addMotionValueStyle(style2, values) {
31730
31872
  function isVariantOrVariantList2(value) {
31731
31873
  return isString(value) || Array.isArray(value);
31732
31874
  }
31733
- var withFX = (Component17) => React4.forwardRef((props, forwardedRef) => {
31875
+ var withFX = (Component18) => React4.forwardRef((props, forwardedRef) => {
31734
31876
  var _a;
31735
31877
  if (props.__withFX) {
31736
- return /* @__PURE__ */ jsx3(Component17, {
31878
+ return /* @__PURE__ */ jsx3(Component18, {
31737
31879
  ...props,
31738
31880
  animate: void 0,
31739
31881
  initial: void 0,
@@ -31743,7 +31885,7 @@ var withFX = (Component17) => React4.forwardRef((props, forwardedRef) => {
31743
31885
  }
31744
31886
  const disabledProps = getDisabledFXPropsInStaticRenderer(props);
31745
31887
  if (disabledProps) {
31746
- return /* @__PURE__ */ jsx3(Component17, {
31888
+ return /* @__PURE__ */ jsx3(Component18, {
31747
31889
  ...props,
31748
31890
  ...disabledProps,
31749
31891
  ref: forwardedRef,
@@ -31811,7 +31953,7 @@ var withFX = (Component17) => React4.forwardRef((props, forwardedRef) => {
31811
31953
  exit,
31812
31954
  }
31813
31955
  : {};
31814
- return /* @__PURE__ */ jsx3(Component17, {
31956
+ return /* @__PURE__ */ jsx3(Component18, {
31815
31957
  ...forwardedProps,
31816
31958
  ...motionGestures,
31817
31959
  __withFX: true,
@@ -31864,9 +32006,9 @@ var ComponentViewportProvider = /* @__PURE__ */ React4.forwardRef(function Compo
31864
32006
  children: cloneWithPropsAndRef(children, rest),
31865
32007
  });
31866
32008
  });
31867
- var withGeneratedLayoutId = (Component17) => React4.forwardRef((props, ref) => {
32009
+ var withGeneratedLayoutId = (Component18) => React4.forwardRef((props, ref) => {
31868
32010
  const layoutId = useLayoutId2(props);
31869
- return /* @__PURE__ */ jsx3(Component17, {
32011
+ return /* @__PURE__ */ jsx3(Component18, {
31870
32012
  layoutId,
31871
32013
  ...props,
31872
32014
  layoutIdKey: void 0,
@@ -31896,7 +32038,7 @@ var SynchronousSuspenseErrorBoundary = class extends Component2 {
31896
32038
  if (!isSuspense426Error(error))
31897
32039
  return;
31898
32040
  const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
31899
- console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
32041
+ console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with `startTransition`. Some of the UI might flash as a result. If you are the author of this website, update external components and check recently added custom code or code overrides. In case the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
31900
32042
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
31901
32043
  sendTrackingEvent('published_site_load_recoverable_error', {
31902
32044
  message: String(error),
@@ -32195,10 +32337,10 @@ var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, re
32195
32337
  const childrenWithCodeBoundary = useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);
32196
32338
  const tagName = props.as ?? 'div';
32197
32339
  if (props.rendersWithMotion) {
32198
- const Component17 = htmlElementAsMotionComponent(tagName);
32340
+ const Component18 = htmlElementAsMotionComponent(tagName);
32199
32341
  return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
32200
32342
  value: nodeId ?? null,
32201
- children: /* @__PURE__ */ jsx3(Component17, {
32343
+ children: /* @__PURE__ */ jsx3(Component18, {
32202
32344
  ...otherProps,
32203
32345
  ref,
32204
32346
  style: props.style,
@@ -32207,11 +32349,11 @@ var SmartComponentScopedContainer = /* @__PURE__ */ React4.forwardRef((props, re
32207
32349
  });
32208
32350
  }
32209
32351
  else {
32210
- const Component17 = tagName;
32352
+ const Component18 = tagName;
32211
32353
  const { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;
32212
32354
  return /* @__PURE__ */ jsx3(NodeIdContext.Provider, {
32213
32355
  value: nodeId ?? null,
32214
- children: /* @__PURE__ */ jsx3(Component17, {
32356
+ children: /* @__PURE__ */ jsx3(Component18, {
32215
32357
  ...plainHTMLRenderableProps,
32216
32358
  ref,
32217
32359
  style: props.style,
@@ -32510,6 +32652,340 @@ function useCustomCursors(webPageCursors) {
32510
32652
  return registerCursors(cursors, id3);
32511
32653
  }, [registerCursors, id3,]);
32512
32654
  }
32655
+ var linkKey = 'webPageId';
32656
+ function isLinkToWebPage(link) {
32657
+ return Boolean(link && typeof link === 'object' && linkKey in link);
32658
+ }
32659
+ function linkInfoKey(link) {
32660
+ var _a, _b;
32661
+ return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
32662
+ }
32663
+ var NestedLinksCollector = class {
32664
+ constructor() {
32665
+ __publicField(this, 'collectedLinks', /* @__PURE__ */ new Map());
32666
+ __publicField(this, 'nestingInfo', /* @__PURE__ */ new Map());
32667
+ }
32668
+ clear() {
32669
+ this.collectedLinks.clear();
32670
+ this.nestingInfo.clear();
32671
+ }
32672
+ /**
32673
+ * Returns a Map of outer links to their inner links.
32674
+ *
32675
+ * NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
32676
+ */
32677
+ getLinks() {
32678
+ const result = /* @__PURE__ */ new Map();
32679
+ for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
32680
+ const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
32681
+ assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
32682
+ const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
32683
+ const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
32684
+ assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
32685
+ return innerLinkInfo;
32686
+ });
32687
+ result.set(outerLinkInfo, links);
32688
+ }
32689
+ return result;
32690
+ }
32691
+ collectNestedLink(outerLink, innerLink) {
32692
+ if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
32693
+ return;
32694
+ }
32695
+ this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
32696
+ this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
32697
+ const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
32698
+ outerLinkNestingInfo.add(linkInfoKey(innerLink));
32699
+ this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
32700
+ }
32701
+ };
32702
+ var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
32703
+ function useIsOnFramerCanvas() {
32704
+ return RenderTarget.current() === RenderTarget.canvas;
32705
+ }
32706
+ function isInternalURL(href) {
32707
+ if (href === void 0)
32708
+ return false;
32709
+ if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
32710
+ return true;
32711
+ return false;
32712
+ }
32713
+ function isValidURL(href, isInternal) {
32714
+ try {
32715
+ const url = new URL(href);
32716
+ return Boolean(url.protocol);
32717
+ }
32718
+ catch { }
32719
+ return isInternal;
32720
+ }
32721
+ function getRouteFromPageLink(pageLink, router, currentRoute) {
32722
+ var _a;
32723
+ if (isString(pageLink)) {
32724
+ const isInternal = isInternalURL(pageLink);
32725
+ if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
32726
+ return;
32727
+ }
32728
+ const [pathnameWithQueryParams,] = pageLink.split('#', 2);
32729
+ if (pathnameWithQueryParams === void 0)
32730
+ return;
32731
+ const [pathname,] = pathnameWithQueryParams.split('?', 2);
32732
+ if (pathname === void 0)
32733
+ return;
32734
+ const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
32735
+ return router.getRoute(routeId);
32736
+ }
32737
+ const { webPageId, } = pageLink;
32738
+ return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
32739
+ }
32740
+ var elementKey = 'element';
32741
+ var collectionKey = 'collection';
32742
+ var collectionItemIdKey = 'collectionItemId';
32743
+ var pathVariablesKey = 'pathVariables';
32744
+ var mediaType = 'framer/page-link,';
32745
+ function isFramerPageLink(value) {
32746
+ return isString(value) && value.startsWith(`data:${mediaType}`);
32747
+ }
32748
+ function createFramerPageLink(targetId = null, options = {}) {
32749
+ const target = targetId ? targetId : 'none';
32750
+ const link = new URL(`data:${mediaType}${target}`);
32751
+ if (options.element) {
32752
+ link.searchParams.append(elementKey, options.element);
32753
+ }
32754
+ if (options.collectionItem) {
32755
+ link.searchParams.append(collectionKey, options.collectionItem.collection);
32756
+ link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
32757
+ link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
32758
+ }
32759
+ return link.href;
32760
+ }
32761
+ function parseFramerPageLink(link) {
32762
+ if (!isFramerPageLink(link))
32763
+ return;
32764
+ try {
32765
+ const url = new URL(link);
32766
+ const target = url.pathname.substring(mediaType.length);
32767
+ const searchParams = url.searchParams;
32768
+ const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
32769
+ let collectionItem;
32770
+ const collection = searchParams.get(collectionKey);
32771
+ const collectionItemId = searchParams.get(collectionItemIdKey);
32772
+ const pathVariablesValue = searchParams.get(pathVariablesKey);
32773
+ if (collection && collectionItemId && pathVariablesValue) {
32774
+ const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
32775
+ collectionItem = {
32776
+ collection,
32777
+ collectionItemId,
32778
+ pathVariables,
32779
+ };
32780
+ }
32781
+ return {
32782
+ target: target === 'none' ? null : target,
32783
+ /**
32784
+ * For historical reason we used to set "element=none" into the
32785
+ * datalink, we no longer do that today, but we still keep this code
32786
+ * so we could parse legacy links correctly.
32787
+ */
32788
+ element: element === 'none' ? void 0 : element,
32789
+ collectionItem,
32790
+ };
32791
+ }
32792
+ catch {
32793
+ return;
32794
+ }
32795
+ }
32796
+ function shouldOpenLinkInNewTab(link) {
32797
+ return !isFramerPageLink(link);
32798
+ }
32799
+ function navigateFromAttributes(navigate, element, implicitPathVariables) {
32800
+ var _a;
32801
+ let routeId = element.getAttribute('data-framer-page-link-target');
32802
+ let elementId;
32803
+ let pathVariables;
32804
+ if (routeId) {
32805
+ elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
32806
+ const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
32807
+ if (pathVariablesRaw) {
32808
+ pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
32809
+ }
32810
+ }
32811
+ else {
32812
+ const href = element.getAttribute('href');
32813
+ if (!href)
32814
+ return false;
32815
+ const link = parseFramerPageLink(href);
32816
+ if (!link || !link.target)
32817
+ return false;
32818
+ routeId = link.target;
32819
+ elementId = link.element ?? void 0;
32820
+ pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
32821
+ }
32822
+ const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
32823
+ navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
32824
+ return true;
32825
+ }
32826
+ function linkFromFramerPageLink(link) {
32827
+ if (!isFramerPageLink(link))
32828
+ return link;
32829
+ const parsed = parseFramerPageLink(link);
32830
+ if (!parsed)
32831
+ return void 0;
32832
+ const { target, element, collectionItem, } = parsed;
32833
+ if (!target)
32834
+ return void 0;
32835
+ return {
32836
+ webPageId: target,
32837
+ hash: element ?? void 0,
32838
+ pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
32839
+ };
32840
+ }
32841
+ function createVariablesFromPageLinkCollectionItem(collectionItem) {
32842
+ if (!collectionItem)
32843
+ return void 0;
32844
+ const variables = {};
32845
+ for (const pathVariablesKey2 in collectionItem.pathVariables) {
32846
+ const value = collectionItem.pathVariables[pathVariablesKey2];
32847
+ if (value)
32848
+ variables[pathVariablesKey2] = value;
32849
+ }
32850
+ return variables;
32851
+ }
32852
+ var OuterLinkContext = /* @__PURE__ */ createContext(void 0);
32853
+ function ResetOuterLinkContext({ children, }) {
32854
+ return /* @__PURE__ */ jsx3(OuterLinkContext.Provider, {
32855
+ value: void 0,
32856
+ children,
32857
+ });
32858
+ }
32859
+ function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
32860
+ const outerLink = useContext(OuterLinkContext);
32861
+ const furthestExternalComponent = useFurthestExternalComponent();
32862
+ const innerLink = useMemo2(() => ({
32863
+ scopeId,
32864
+ nodeId,
32865
+ furthestExternalComponent,
32866
+ }), [scopeId, nodeId, furthestExternalComponent,]);
32867
+ const router = useRouter();
32868
+ const currentRoute = useCurrentRoute();
32869
+ const route = useMemo2(() => {
32870
+ const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
32871
+ if (!pageLink)
32872
+ return;
32873
+ return getRouteFromPageLink(pageLink, router, currentRoute);
32874
+ }, [currentRoute, href, router,]);
32875
+ const isOnFramerCanvas = useIsOnFramerCanvas();
32876
+ const shouldReplaceLink = Boolean(!isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
32877
+ const onClick = useCallback((event) => {
32878
+ var _a;
32879
+ if (!propsAddedByLink.href)
32880
+ return;
32881
+ event.preventDefault();
32882
+ event.stopPropagation();
32883
+ const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
32884
+ if (isAppleDevice ? event.metaKey : event.ctrlKey) {
32885
+ openExternalLink(propsAddedByLink.href, '', '_blank');
32886
+ return;
32887
+ }
32888
+ if (route) {
32889
+ (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
32890
+ }
32891
+ else {
32892
+ openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
32893
+ }
32894
+ }, [propsAddedByLink, route,]);
32895
+ const onAuxClick = useCallback((event) => {
32896
+ if (!propsAddedByLink.href)
32897
+ return;
32898
+ event.preventDefault();
32899
+ event.stopPropagation();
32900
+ openExternalLink(propsAddedByLink.href, '', '_blank');
32901
+ }, [propsAddedByLink,]);
32902
+ const onKeyDown = useCallback((event) => {
32903
+ var _a;
32904
+ if (!propsAddedByLink.href)
32905
+ return;
32906
+ if (event.key !== 'Enter')
32907
+ return;
32908
+ event.preventDefault();
32909
+ event.stopPropagation();
32910
+ if (route) {
32911
+ (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
32912
+ }
32913
+ else {
32914
+ openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
32915
+ }
32916
+ }, [propsAddedByLink, route,]);
32917
+ useRefEffect(observerRef, (node) => {
32918
+ if (node === null)
32919
+ return;
32920
+ if (!shouldReplaceLink)
32921
+ return;
32922
+ node.dataset.hydrated = 'true';
32923
+ }, [shouldReplaceLink,]);
32924
+ let replacedChildren = children;
32925
+ if (shouldReplaceLink) {
32926
+ Children.forEach(children, (child) => {
32927
+ if (!isChildReplaceable(child))
32928
+ return;
32929
+ assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
32930
+ assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
32931
+ nestedLinksCollector.collectNestedLink(outerLink, innerLink);
32932
+ });
32933
+ replacedChildren = Children.map(children, (child) => {
32934
+ if (!isChildReplaceable(child))
32935
+ return child;
32936
+ const tag = maybeReplaceAnchorWithSpan(child.type);
32937
+ const { children: childChildren, ...childProps } = child.props;
32938
+ const props = {
32939
+ ...childProps,
32940
+ // This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
32941
+ 'data-nested-link': true,
32942
+ role: 'link',
32943
+ tabIndex: 0,
32944
+ onClick,
32945
+ onAuxClick,
32946
+ onKeyDown,
32947
+ as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
32948
+ };
32949
+ const ref = 'ref' in child ? child.ref : void 0;
32950
+ return createElement(tag, // We need to pass the ref here again, otherwise it will be lost
32951
+ {
32952
+ ...props,
32953
+ ref,
32954
+ }, childChildren);
32955
+ });
32956
+ }
32957
+ return /* @__PURE__ */ jsx3(OuterLinkContext.Provider, {
32958
+ value: innerLink,
32959
+ children: replacedChildren,
32960
+ });
32961
+ }
32962
+ function linkInfoIsCollectable(linkInfo) {
32963
+ return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
32964
+ }
32965
+ function isChildReplaceable(child) {
32966
+ return isValidElement(child) &&
32967
+ (maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
32968
+ }
32969
+ function openExternalLink(href, rel, target) {
32970
+ const link = document.createElement('a');
32971
+ link.href = href;
32972
+ if (rel) {
32973
+ link.rel = rel;
32974
+ }
32975
+ if (target) {
32976
+ link.target = target;
32977
+ }
32978
+ document.body.appendChild(link);
32979
+ link.click();
32980
+ link.remove();
32981
+ }
32982
+ function maybeReplaceAnchorWithSpan(component) {
32983
+ if (component === 'a')
32984
+ return 'span';
32985
+ if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
32986
+ return motion.span;
32987
+ return component;
32988
+ }
32513
32989
  var Polygon = {
32514
32990
  /**
32515
32991
  * Determine if the vertices are ordered clockwise or counter-clockwise. This works for simple
@@ -33019,19 +33495,31 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33019
33495
  x: offsetX ?? 0,
33020
33496
  y: offsetY ?? 0,
33021
33497
  };
33022
- let getSafePlacementRect;
33023
- let position;
33024
33498
  let cleanup;
33025
33499
  let cleanupHasRun = false;
33026
33500
  let initialUpdateHasRun = false;
33027
33501
  let anchorRect;
33028
- let elementRect;
33029
33502
  let safePlacement;
33030
33503
  let calculatedRect;
33031
33504
  let latestEvent;
33032
33505
  let updateSafeArea;
33033
33506
  let scrollX = 0;
33034
33507
  let scrollY = 0;
33508
+ const ancestorInfo = domReadGetAncestorInfo(anchorRef);
33509
+ const position = ancestorInfo.position;
33510
+ const elementRect = contentRef.current.getBoundingClientRect();
33511
+ const getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
33512
+ placement,
33513
+ alignment,
33514
+ offset,
33515
+ collisionDetectionSize: collisionDetection
33516
+ ? {
33517
+ width: safeWindow.innerWidth,
33518
+ height: safeWindow.innerHeight,
33519
+ }
33520
+ : void 0,
33521
+ collisionDetectionPadding,
33522
+ });
33035
33523
  const onRender = () => {
33036
33524
  if (cleanupHasRun)
33037
33525
  return;
@@ -33071,31 +33559,12 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33071
33559
  safePlacement = safePlacementAndRect[0];
33072
33560
  calculatedRect = safePlacementAndRect[1];
33073
33561
  };
33074
- frame.read(() => {
33075
- if (cleanupHasRun || !contentRef.current)
33076
- return;
33077
- const ancestorInfo = domReadGetAncestorInfo(anchorRef);
33078
- position = ancestorInfo.position;
33079
- elementRect = contentRef.current.getBoundingClientRect();
33080
- getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({
33081
- placement,
33082
- alignment,
33083
- offset,
33084
- collisionDetectionSize: collisionDetection
33085
- ? {
33086
- width: safeWindow.innerWidth,
33087
- height: safeWindow.innerHeight,
33088
- }
33089
- : void 0,
33090
- collisionDetectionPadding,
33091
- });
33092
- domReadUpdateSafePlacementAndRect();
33093
- frame.update(onUpdate);
33094
- frame.render(initialRender);
33095
- if (!ancestorInfo.scrolls)
33096
- return;
33562
+ domReadUpdateSafePlacementAndRect();
33563
+ onUpdate();
33564
+ initialRender();
33565
+ if (ancestorInfo.scrolls) {
33097
33566
  cleanup = domReadStartAnimationFrameLoop(domReadUpdateSafePlacementAndRect);
33098
- });
33567
+ }
33099
33568
  if (!safeArea) {
33100
33569
  return () => {
33101
33570
  cleanup == null ? void 0 : cleanup();
@@ -33161,17 +33630,19 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
33161
33630
  }),
33162
33631
  /* @__PURE__ */ jsx3(FloatingStackingContext.Provider, {
33163
33632
  value: descendantContext,
33164
- children: /* @__PURE__ */ jsx3('div', {
33165
- ref: contentRef,
33166
- children: childrenWithOrigin(children, origin),
33633
+ children: /* @__PURE__ */ jsx3(ResetOuterLinkContext, {
33634
+ children: /* @__PURE__ */ jsx3('div', {
33635
+ ref: contentRef,
33636
+ children: childrenWithOrigin(children, origin),
33637
+ }),
33167
33638
  }),
33168
33639
  }),
33169
33640
  ],
33170
33641
  }), getPortalContainer(portalSelector, inComponent));
33171
33642
  }
33172
- var Instance = /* @__PURE__ */ React4.forwardRef(function Instance2({ Component: Component17, ...props }, ref) {
33173
- return Component17
33174
- ? /* @__PURE__ */ jsx3(Component17, {
33643
+ var Instance = /* @__PURE__ */ React4.forwardRef(function Instance2({ Component: Component18, ...props }, ref) {
33644
+ return Component18
33645
+ ? /* @__PURE__ */ jsx3(Component18, {
33175
33646
  ...props,
33176
33647
  ref,
33177
33648
  })
@@ -33322,20 +33793,16 @@ function ChildrenCanSuspend({ children, }) {
33322
33793
  children,
33323
33794
  });
33324
33795
  }
33325
- function withChildrenCanSuspend(Component17) {
33796
+ function withChildrenCanSuspend(Component18) {
33326
33797
  return forwardRef(function withChildrenCanSuspendInner(props, ref) {
33327
33798
  return /* @__PURE__ */ jsx3(ChildrenCanSuspend, {
33328
- children: /* @__PURE__ */ jsx3(Component17, {
33799
+ children: /* @__PURE__ */ jsx3(Component18, {
33329
33800
  ...props,
33330
33801
  ref,
33331
33802
  }),
33332
33803
  });
33333
33804
  });
33334
33805
  }
33335
- var linkKey = 'webPageId';
33336
- function isLinkToWebPage(link) {
33337
- return Boolean(link && typeof link === 'object' && linkKey in link);
33338
- }
33339
33806
  var PRELOAD_AFTER_MS = 500;
33340
33807
  var OBSERVER_THRESHOLD = 0.9;
33341
33808
  var LOW_MEMORY_THRESHOLD = 1.7;
@@ -33521,21 +33988,6 @@ function resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, coll
33521
33988
  }
33522
33989
  return result;
33523
33990
  }
33524
- function isInternalURL(href) {
33525
- if (href === void 0)
33526
- return false;
33527
- if (href.startsWith('#') || href.startsWith('/') || href.startsWith('.'))
33528
- return true;
33529
- return false;
33530
- }
33531
- function isValidURL(href, isInternal) {
33532
- try {
33533
- const url = new URL(href);
33534
- return Boolean(url.protocol);
33535
- }
33536
- catch { }
33537
- return isInternal;
33538
- }
33539
33991
  async function findMatchingRouteAttributesForWebPageLink(router, currentRoute, pageLink, activeLocale, implicitPathVariables) {
33540
33992
  const { webPageId, hash: hash2, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs, } = pageLink;
33541
33993
  const resolvedSlugs = await resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
@@ -33607,137 +34059,6 @@ function getRouteAttributes(router, currentRoute, routeId, hash2, implicitPathVa
33607
34059
  pathVariables: combinedPathVariables,
33608
34060
  };
33609
34061
  }
33610
- function getRouteFromPageLink(pageLink, router, currentRoute) {
33611
- var _a;
33612
- if (isString(pageLink)) {
33613
- const isInternal = isInternalURL(pageLink);
33614
- if (!router.routes || !router.getRoute || !currentRoute || !isInternal) {
33615
- return;
33616
- }
33617
- const [pathnameWithQueryParams,] = pageLink.split('#', 2);
33618
- if (pathnameWithQueryParams === void 0)
33619
- return;
33620
- const [pathname,] = pathnameWithQueryParams.split('?', 2);
33621
- if (pathname === void 0)
33622
- return;
33623
- const { routeId, } = inferInitialRouteFromPath(router.routes, pathname);
33624
- return router.getRoute(routeId);
33625
- }
33626
- const { webPageId, } = pageLink;
33627
- return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
33628
- }
33629
- var elementKey = 'element';
33630
- var collectionKey = 'collection';
33631
- var collectionItemIdKey = 'collectionItemId';
33632
- var pathVariablesKey = 'pathVariables';
33633
- var mediaType = 'framer/page-link,';
33634
- function isFramerPageLink(value) {
33635
- return isString(value) && value.startsWith(`data:${mediaType}`);
33636
- }
33637
- function createFramerPageLink(targetId = null, options = {}) {
33638
- const target = targetId ? targetId : 'none';
33639
- const link = new URL(`data:${mediaType}${target}`);
33640
- if (options.element) {
33641
- link.searchParams.append(elementKey, options.element);
33642
- }
33643
- if (options.collectionItem) {
33644
- link.searchParams.append(collectionKey, options.collectionItem.collection);
33645
- link.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);
33646
- link.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());
33647
- }
33648
- return link.href;
33649
- }
33650
- function parseFramerPageLink(link) {
33651
- if (!isFramerPageLink(link))
33652
- return;
33653
- try {
33654
- const url = new URL(link);
33655
- const target = url.pathname.substring(mediaType.length);
33656
- const searchParams = url.searchParams;
33657
- const element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;
33658
- let collectionItem;
33659
- const collection = searchParams.get(collectionKey);
33660
- const collectionItemId = searchParams.get(collectionItemIdKey);
33661
- const pathVariablesValue = searchParams.get(pathVariablesKey);
33662
- if (collection && collectionItemId && pathVariablesValue) {
33663
- const pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesValue).entries());
33664
- collectionItem = {
33665
- collection,
33666
- collectionItemId,
33667
- pathVariables,
33668
- };
33669
- }
33670
- return {
33671
- target: target === 'none' ? null : target,
33672
- /**
33673
- * For historical reason we used to set "element=none" into the
33674
- * datalink, we no longer do that today, but we still keep this code
33675
- * so we could parse legacy links correctly.
33676
- */
33677
- element: element === 'none' ? void 0 : element,
33678
- collectionItem,
33679
- };
33680
- }
33681
- catch {
33682
- return;
33683
- }
33684
- }
33685
- function shouldOpenLinkInNewTab(link) {
33686
- return !isFramerPageLink(link);
33687
- }
33688
- function navigateFromAttributes(navigate, element, implicitPathVariables) {
33689
- var _a;
33690
- let routeId = element.getAttribute('data-framer-page-link-target');
33691
- let elementId;
33692
- let pathVariables;
33693
- if (routeId) {
33694
- elementId = element.getAttribute('data-framer-page-link-element') ?? void 0;
33695
- const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
33696
- if (pathVariablesRaw) {
33697
- pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
33698
- }
33699
- }
33700
- else {
33701
- const href = element.getAttribute('href');
33702
- if (!href)
33703
- return false;
33704
- const link = parseFramerPageLink(href);
33705
- if (!link || !link.target)
33706
- return false;
33707
- routeId = link.target;
33708
- elementId = link.element ?? void 0;
33709
- pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
33710
- }
33711
- const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
33712
- navigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);
33713
- return true;
33714
- }
33715
- function linkFromFramerPageLink(link) {
33716
- if (!isFramerPageLink(link))
33717
- return link;
33718
- const parsed = parseFramerPageLink(link);
33719
- if (!parsed)
33720
- return void 0;
33721
- const { target, element, collectionItem, } = parsed;
33722
- if (!target)
33723
- return void 0;
33724
- return {
33725
- webPageId: target,
33726
- hash: element ?? void 0,
33727
- pathVariables: createVariablesFromPageLinkCollectionItem(collectionItem),
33728
- };
33729
- }
33730
- function createVariablesFromPageLinkCollectionItem(collectionItem) {
33731
- if (!collectionItem)
33732
- return void 0;
33733
- const variables = {};
33734
- for (const pathVariablesKey2 in collectionItem.pathVariables) {
33735
- const value = collectionItem.pathVariables[pathVariablesKey2];
33736
- if (value)
33737
- variables[pathVariablesKey2] = value;
33738
- }
33739
- return variables;
33740
- }
33741
34062
  var pathVariablesRegExp2 = /:([a-z]\w*)/gi;
33742
34063
  var PathVariablesContext = /* @__PURE__ */ createContext(void 0);
33743
34064
  function useImplicitPathVariables() {
@@ -33810,185 +34131,6 @@ function combineRels(rel, otherRel) {
33810
34131
  return `${rel} ${otherRel}`;
33811
34132
  return void 0;
33812
34133
  }
33813
- function linkInfoKey(link) {
33814
- var _a, _b;
33815
- return `${link.scopeId}:${link.nodeId}:${(_a = link.furthestExternalComponent) == null ? void 0 : _a.scopeId}:${(_b = link.furthestExternalComponent) == null ? void 0 : _b.nodeId}`;
33816
- }
33817
- var NestedLinksCollector = class {
33818
- constructor() {
33819
- __publicField(this, 'collectedLinks', /* @__PURE__ */ new Map());
33820
- __publicField(this, 'nestingInfo', /* @__PURE__ */ new Map());
33821
- }
33822
- clear() {
33823
- this.collectedLinks.clear();
33824
- this.nestingInfo.clear();
33825
- }
33826
- /**
33827
- * Returns a Map of outer links to their inner links.
33828
- *
33829
- * NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)
33830
- */
33831
- getLinks() {
33832
- const result = /* @__PURE__ */ new Map();
33833
- for (const [outerLinkKey, innerLinkKeys,] of this.nestingInfo) {
33834
- const outerLinkInfo = this.collectedLinks.get(outerLinkKey);
33835
- assert(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);
33836
- const links = Array.from(innerLinkKeys).map((innerLinkKey) => {
33837
- const innerLinkInfo = this.collectedLinks.get(innerLinkKey);
33838
- assert(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);
33839
- return innerLinkInfo;
33840
- });
33841
- result.set(outerLinkInfo, links);
33842
- }
33843
- return result;
33844
- }
33845
- collectNestedLink(outerLink, innerLink) {
33846
- if (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) {
33847
- return;
33848
- }
33849
- this.collectedLinks.set(linkInfoKey(outerLink), outerLink);
33850
- this.collectedLinks.set(linkInfoKey(innerLink), innerLink);
33851
- const outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();
33852
- outerLinkNestingInfo.add(linkInfoKey(innerLink));
33853
- this.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);
33854
- }
33855
- };
33856
- var nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();
33857
- function useIsOnFramerCanvas() {
33858
- return RenderTarget.current() === RenderTarget.canvas;
33859
- }
33860
- var OuterLinkContext = /* @__PURE__ */ createContext(void 0);
33861
- function useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {
33862
- const outerLink = useContext(OuterLinkContext);
33863
- const furthestExternalComponent = useFurthestExternalComponent();
33864
- const innerLink = useMemo2(() => ({
33865
- scopeId,
33866
- nodeId,
33867
- furthestExternalComponent,
33868
- }), [scopeId, nodeId, furthestExternalComponent,]);
33869
- const router = useRouter();
33870
- const currentRoute = useCurrentRoute();
33871
- const route = useMemo2(() => {
33872
- const pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);
33873
- if (!pageLink)
33874
- return;
33875
- return getRouteFromPageLink(pageLink, router, currentRoute);
33876
- }, [currentRoute, href, router,]);
33877
- const { replaceNestedLinks, } = useLibraryFeatures();
33878
- const isOnFramerCanvas = useIsOnFramerCanvas();
33879
- const shouldReplaceLink = Boolean(replaceNestedLinks && !isOnFramerCanvas && (outerLink == null ? void 0 : outerLink.nodeId) && innerLink.nodeId);
33880
- const onClick = useCallback((event) => {
33881
- var _a;
33882
- if (!propsAddedByLink.href)
33883
- return;
33884
- event.preventDefault();
33885
- event.stopPropagation();
33886
- const isAppleDevice = /Mac|iPod|iPhone|iPad/u.test(__unframerNavigator2.userAgent);
33887
- if (isAppleDevice ? event.metaKey : event.ctrlKey) {
33888
- openExternalLink(propsAddedByLink.href, '', '_blank');
33889
- return;
33890
- }
33891
- if (route) {
33892
- (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
33893
- }
33894
- else {
33895
- openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
33896
- }
33897
- }, [propsAddedByLink, route,]);
33898
- const onAuxClick = useCallback((event) => {
33899
- if (!propsAddedByLink.href)
33900
- return;
33901
- event.preventDefault();
33902
- event.stopPropagation();
33903
- openExternalLink(propsAddedByLink.href, '', '_blank');
33904
- }, [propsAddedByLink,]);
33905
- const onKeyDown = useCallback((event) => {
33906
- var _a;
33907
- if (!propsAddedByLink.href)
33908
- return;
33909
- if (event.key !== 'Enter')
33910
- return;
33911
- event.preventDefault();
33912
- event.stopPropagation();
33913
- if (route) {
33914
- (_a = propsAddedByLink.navigate) == null ? void 0 : _a.call(propsAddedByLink);
33915
- }
33916
- else {
33917
- openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);
33918
- }
33919
- }, [propsAddedByLink, route,]);
33920
- useRefEffect(observerRef, (node) => {
33921
- if (node === null)
33922
- return;
33923
- if (!shouldReplaceLink)
33924
- return;
33925
- node.dataset.hydrated = 'true';
33926
- }, [shouldReplaceLink,]);
33927
- let replacedChildren = children;
33928
- if (shouldReplaceLink) {
33929
- Children.forEach(children, (child) => {
33930
- if (!isChildReplaceable(child))
33931
- return;
33932
- assert(linkInfoIsCollectable(outerLink), 'outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
33933
- assert(linkInfoIsCollectable(innerLink), 'innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above');
33934
- nestedLinksCollector.collectNestedLink(outerLink, innerLink);
33935
- });
33936
- replacedChildren = Children.map(children, (child) => {
33937
- if (!isChildReplaceable(child))
33938
- return child;
33939
- const tag = maybeReplaceAnchorWithSpan(child.type);
33940
- const { children: childChildren, ...childProps } = child.props;
33941
- const props = {
33942
- ...childProps,
33943
- // This attribute is used in `ssg/src/ssg-sandbox-renderer/worker/nestedLinks.ts` to handle the nested links clicks
33944
- 'data-nested-link': true,
33945
- role: 'link',
33946
- tabIndex: 0,
33947
- onClick,
33948
- onAuxClick,
33949
- onKeyDown,
33950
- as: childProps.as && maybeReplaceAnchorWithSpan(childProps.as),
33951
- };
33952
- const ref = 'ref' in child ? child.ref : void 0;
33953
- return createElement(tag, // We need to pass the ref here again, otherwise it will be lost
33954
- {
33955
- ...props,
33956
- ref,
33957
- }, childChildren);
33958
- });
33959
- }
33960
- return /* @__PURE__ */ jsx3(OuterLinkContext.Provider, {
33961
- value: innerLink,
33962
- children: replacedChildren,
33963
- });
33964
- }
33965
- function linkInfoIsCollectable(linkInfo) {
33966
- return !isUndefined(linkInfo == null ? void 0 : linkInfo.nodeId);
33967
- }
33968
- function isChildReplaceable(child) {
33969
- return isValidElement(child) &&
33970
- (maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);
33971
- }
33972
- function openExternalLink(href, rel, target) {
33973
- const link = document.createElement('a');
33974
- link.href = href;
33975
- if (rel) {
33976
- link.rel = rel;
33977
- }
33978
- if (target) {
33979
- link.target = target;
33980
- }
33981
- document.body.appendChild(link);
33982
- link.click();
33983
- link.remove();
33984
- }
33985
- function maybeReplaceAnchorWithSpan(component) {
33986
- if (component === 'a')
33987
- return 'span';
33988
- if (isMotionComponent(component) && unwrapMotionComponent(component) === 'a')
33989
- return motion.span;
33990
- return component;
33991
- }
33992
34134
  function useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale, }) {
33993
34135
  return useCallback(async (hrefAttribute) => {
33994
34136
  var _a, _b, _c, _d, _e;
@@ -34273,24 +34415,6 @@ function resolvePageScope(pageLink, router) {
34273
34415
  siteCanonicalURL: void 0,
34274
34416
  });
34275
34417
  }
34276
- var IgnoreErrors = class extends Component2 {
34277
- constructor() {
34278
- super(...arguments);
34279
- __publicField(this, 'state', {
34280
- error: void 0,
34281
- });
34282
- }
34283
- static getDerivedStateFromError(error) {
34284
- return {
34285
- error,
34286
- };
34287
- }
34288
- render() {
34289
- if (this.state.error)
34290
- return null;
34291
- return this.props.children;
34292
- }
34293
- };
34294
34418
  var salt = 'framer';
34295
34419
  var difficulty = 3;
34296
34420
  var tokenLength = 30;
@@ -34483,6 +34607,7 @@ var FormContainer = /* @__PURE__ */ React4.forwardRef(function FormContainer2({
34483
34607
  onError,
34484
34608
  onLoading,
34485
34609
  };
34610
+ const submissionInProgressRef = React4.useRef(false);
34486
34611
  async function redirectTo(link) {
34487
34612
  var _a, _b;
34488
34613
  if (isString(link)) {
@@ -34503,16 +34628,17 @@ var FormContainer = /* @__PURE__ */ React4.forwardRef(function FormContainer2({
34503
34628
  const handleSubmit = async (event) => {
34504
34629
  var _a, _b, _c, _d, _e, _f;
34505
34630
  event.preventDefault();
34506
- if (!action || !projectHash)
34631
+ if (!action || !projectHash || submissionInProgressRef.current)
34507
34632
  return;
34508
- dispatch({
34509
- type: 'submit',
34510
- });
34633
+ submissionInProgressRef.current = true;
34511
34634
  const data2 = new FormData(event.currentTarget);
34512
34635
  await yieldToMain({
34513
- priority: 'user-blocking',
34636
+ priority: 'user-visible',
34514
34637
  continueAfter: 'paint',
34515
34638
  });
34639
+ startTransition2(() => dispatch({
34640
+ type: 'submit',
34641
+ }));
34516
34642
  addUTMTagsToFormData(data2, safeWindow.document);
34517
34643
  for (const [key7, value,] of data2) {
34518
34644
  if (value instanceof File)
@@ -34542,6 +34668,7 @@ var FormContainer = /* @__PURE__ */ React4.forwardRef(function FormContainer2({
34542
34668
  (_f = (_e = callbacks.current).onError) == null ? void 0 : _f.call(_e);
34543
34669
  console.error(error);
34544
34670
  }
34671
+ submissionInProgressRef.current = false;
34545
34672
  };
34546
34673
  const handleKeyDown = (event) => {
34547
34674
  const { target: input, currentTarget: form, key: key7, } = event;
@@ -34618,6 +34745,61 @@ function responseHasError(response) {
34618
34745
  return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
34619
34746
  'message' in response.error && typeof response.error.message === 'string';
34620
34747
  }
34748
+ var FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY = '__framer_force_showing_editorbar_since';
34749
+ var IgnoreErrors = class extends Component2 {
34750
+ constructor() {
34751
+ super(...arguments);
34752
+ __publicField(this, 'state', {
34753
+ error: void 0,
34754
+ });
34755
+ }
34756
+ static getDerivedStateFromError(error) {
34757
+ return {
34758
+ error,
34759
+ };
34760
+ }
34761
+ render() {
34762
+ if (this.state.error)
34763
+ return null;
34764
+ return this.props.children;
34765
+ }
34766
+ };
34767
+ var isPrioritized = () => {
34768
+ try {
34769
+ return !!localStorage[FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY];
34770
+ }
34771
+ catch (e) {
34772
+ return false;
34773
+ }
34774
+ };
34775
+ var isntPrioritized = () => !isPrioritized();
34776
+ var getServerSnapshot = () => false;
34777
+ var noOpSubscribe = () => () => { };
34778
+ function EditorBarLauncher({ EditorBar, fast = false, }) {
34779
+ const libraryFeatures = useLibraryFeatures();
34780
+ const framerSiteId = useContext(FormContext);
34781
+ const enabled = useSyncExternalStore(noOpSubscribe, fast ? isPrioritized : isntPrioritized, getServerSnapshot);
34782
+ const editorBarFeatures = useMemo2(() => {
34783
+ const features = {};
34784
+ let key7;
34785
+ for (key7 in libraryFeatures) {
34786
+ if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
34787
+ features[key7] = libraryFeatures[key7];
34788
+ }
34789
+ }
34790
+ return features;
34791
+ }, [libraryFeatures,]);
34792
+ if (!EditorBar || !framerSiteId || !enabled)
34793
+ return null;
34794
+ return /* @__PURE__ */ jsx3(IgnoreErrors, {
34795
+ children: /* @__PURE__ */ jsx3(Suspense2, {
34796
+ children: /* @__PURE__ */ jsx3(EditorBar, {
34797
+ framerSiteId,
34798
+ features: editorBarFeatures,
34799
+ }),
34800
+ }),
34801
+ });
34802
+ }
34621
34803
  function isSamePage(a, b) {
34622
34804
  if (a.routeId !== b.routeId)
34623
34805
  return false;
@@ -34791,7 +34973,7 @@ function useNavigationTransition() {
34791
34973
  announceNavigation();
34792
34974
  }, [startNativeSpinner,]);
34793
34975
  }
34794
- function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate, editorBar, siteCanonicalURL, }) {
34976
+ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, LayoutTemplate, EditorBar, siteCanonicalURL, }) {
34795
34977
  useMarkRouterEffects();
34796
34978
  useReplaceInitialState({
34797
34979
  disabled: disableHistory,
@@ -35049,38 +35231,46 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
35049
35231
  }));
35050
35232
  return /* @__PURE__ */ jsx3(RouterAPIProvider, {
35051
35233
  api,
35052
- children: /* @__PURE__ */ jsx3(LocaleInfoContext.Provider, {
35234
+ children: /* @__PURE__ */ jsxs(LocaleInfoContext.Provider, {
35053
35235
  value: localeInfo,
35054
- children: /* @__PURE__ */ jsx3(SynchronousSuspenseErrorBoundary, {
35055
- children: /* @__PURE__ */ jsxs(SuspenseThatPreservesDom, {
35056
- children: [
35057
- /* @__PURE__ */ jsxs(NotFoundErrorBoundary, {
35058
- notFoundPage,
35059
- defaultPageStyle,
35060
- forceUpdateKey: dep,
35061
- children: [
35062
- /* @__PURE__ */ jsx3(MarkSuspenseEffects.Start, {}),
35063
- /* @__PURE__ */ jsx3(WithLayoutTemplate, {
35064
- LayoutTemplate,
35065
- routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
35066
- style: defaultPageStyle,
35067
- children: (inLayoutTemplate) => {
35068
- return /* @__PURE__ */ jsx3(Fragment, {
35069
- children: pageExistsInCurrentLocale
35070
- ? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
35071
- : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
35072
- notFoundPage && renderPage(notFoundPage, defaultPageStyle),
35073
- }, remountKey);
35074
- },
35075
- }),
35076
- ],
35077
- }),
35078
- editorBar,
35079
- /* @__PURE__ */ jsx3(TurnOnReactEventHandling, {}),
35080
- /* @__PURE__ */ jsx3(MarkSuspenseEffects.End, {}),
35081
- ],
35236
+ children: [
35237
+ EditorBar && /* @__PURE__ */ jsx3(EditorBarLauncher, {
35238
+ EditorBar,
35239
+ fast: true,
35082
35240
  }),
35083
- }),
35241
+ /* @__PURE__ */ jsx3(SynchronousSuspenseErrorBoundary, {
35242
+ children: /* @__PURE__ */ jsxs(SuspenseThatPreservesDom, {
35243
+ children: [
35244
+ /* @__PURE__ */ jsxs(NotFoundErrorBoundary, {
35245
+ notFoundPage,
35246
+ defaultPageStyle,
35247
+ forceUpdateKey: dep,
35248
+ children: [
35249
+ /* @__PURE__ */ jsx3(MarkSuspenseEffects.Start, {}),
35250
+ /* @__PURE__ */ jsx3(WithLayoutTemplate, {
35251
+ LayoutTemplate,
35252
+ routeId: (currentRoute == null ? void 0 : currentRoute.abTestingVariantId) ?? currentRouteId,
35253
+ style: defaultPageStyle,
35254
+ children: (inLayoutTemplate) => {
35255
+ return /* @__PURE__ */ jsx3(Fragment, {
35256
+ children: pageExistsInCurrentLocale
35257
+ ? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle)
35258
+ : // LAYOUT_TEMPLATE @TODO: display: content for not found page?
35259
+ notFoundPage && renderPage(notFoundPage, defaultPageStyle),
35260
+ }, remountKey);
35261
+ },
35262
+ }),
35263
+ ],
35264
+ }),
35265
+ EditorBar && /* @__PURE__ */ jsx3(EditorBarLauncher, {
35266
+ EditorBar,
35267
+ }),
35268
+ /* @__PURE__ */ jsx3(TurnOnReactEventHandling, {}),
35269
+ /* @__PURE__ */ jsx3(MarkSuspenseEffects.End, {}),
35270
+ ],
35271
+ }),
35272
+ }),
35273
+ ],
35084
35274
  }),
35085
35275
  });
35086
35276
  }
@@ -35179,20 +35369,12 @@ function resolveFetchDataValue(result, request) {
35179
35369
  }
35180
35370
  return resolvedValue;
35181
35371
  }
35372
+ var minimumCacheDurationMs = 5e3;
35182
35373
  function isCacheExpired(insertionTimestamp, cacheDuration) {
35183
35374
  if (RenderTarget.current() === RenderTarget.canvas) {
35184
35375
  return false;
35185
35376
  }
35186
- const cacheDurationMs = cacheDuration === 0
35187
- ? // When the cache is set to 0 seconds we set use a 500ms cache delay
35188
- // to avoid triggering refetching when a variant switches from
35189
- // preloading to rendering the component (and
35190
- // resubscribing to the fetch client). When another component
35191
- // relying on the same endpoint (eg another page) is mounted again
35192
- // and the cache time is set to 0, the the data will be fetched
35193
- // again.
35194
- 500
35195
- : cacheDuration * 1e3;
35377
+ const cacheDurationMs = Math.max(cacheDuration * 1e3, minimumCacheDurationMs);
35196
35378
  const currentTimestamp = Date.now();
35197
35379
  const expirationTimestamp = insertionTimestamp + cacheDurationMs;
35198
35380
  return currentTimestamp >= expirationTimestamp;
@@ -35632,9 +35814,7 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
35632
35814
  width: 'auto',
35633
35815
  },
35634
35816
  preserveQueryParams,
35635
- editorBar: /* @__PURE__ */ jsx3(EditorBarLauncher, {
35636
- EditorBar,
35637
- }),
35817
+ EditorBar,
35638
35818
  disableHistory,
35639
35819
  LayoutTemplate,
35640
35820
  siteCanonicalURL,
@@ -35661,36 +35841,6 @@ function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariabl
35661
35841
  });
35662
35842
  }
35663
35843
  }
35664
- function EditorBarLauncher({ EditorBar, }) {
35665
- const libraryFeatures = useLibraryFeatures();
35666
- const [mounted, setMounted,] = useState(false);
35667
- const framerSiteId = useContext(FormContext);
35668
- const editorBarFeatures = useMemo2(() => {
35669
- const features = {};
35670
- let key7;
35671
- for (key7 in libraryFeatures) {
35672
- if (libraryFeatures.hasOwnProperty(key7) && key7.startsWith('editorBar')) {
35673
- features[key7] = libraryFeatures[key7];
35674
- }
35675
- }
35676
- return features;
35677
- }, [libraryFeatures,]);
35678
- useEffect(() => {
35679
- startTransition2(() => {
35680
- setMounted(true);
35681
- });
35682
- }, []);
35683
- if (!EditorBar || !framerSiteId || !mounted)
35684
- return null;
35685
- return /* @__PURE__ */ jsx3(IgnoreErrors, {
35686
- children: /* @__PURE__ */ jsx3(Suspense2, {
35687
- children: /* @__PURE__ */ jsx3(EditorBar, {
35688
- framerSiteId,
35689
- features: editorBarFeatures,
35690
- }),
35691
- }),
35692
- });
35693
- }
35694
35844
  var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(function ResolveLinksInner({ links, children, ...rest }, ref) {
35695
35845
  const router = useRouter();
35696
35846
  const { activeLocale, } = useLocaleInfo();
@@ -40866,51 +41016,51 @@ function usePrototypeNavigate({ preload, } = {}) {
40866
41016
  navigation.goBack();
40867
41017
  return false;
40868
41018
  }
40869
- const Component17 = typeof target === 'string'
41019
+ const Component18 = typeof target === 'string'
40870
41020
  ? await componentForRoute(getRoute == null ? void 0 : getRoute(target)).catch(() => { })
40871
41021
  : React4.isValidElement(target)
40872
41022
  ? target
40873
41023
  : null;
40874
- if (!Component17)
41024
+ if (!Component18)
40875
41025
  return;
40876
41026
  const { appearsFrom, backdropColor, animation, } = options;
40877
41027
  const transitionType = options.transition || 'instant';
40878
41028
  switch (transitionType) {
40879
41029
  case 'instant':
40880
- navigation.instant(Component17);
41030
+ navigation.instant(Component18);
40881
41031
  break;
40882
41032
  case 'fade':
40883
- navigation.fade(Component17, {
41033
+ navigation.fade(Component18, {
40884
41034
  animation,
40885
41035
  });
40886
41036
  break;
40887
41037
  case 'push':
40888
- navigation.push(Component17, {
41038
+ navigation.push(Component18, {
40889
41039
  appearsFrom,
40890
41040
  animation,
40891
41041
  });
40892
41042
  break;
40893
41043
  case 'flip':
40894
- navigation.flip(Component17, {
41044
+ navigation.flip(Component18, {
40895
41045
  appearsFrom,
40896
41046
  animation,
40897
41047
  });
40898
41048
  break;
40899
41049
  case 'magicMotion':
40900
- navigation.magicMotion(Component17, {
41050
+ navigation.magicMotion(Component18, {
40901
41051
  animation,
40902
41052
  });
40903
41053
  break;
40904
41054
  // Overlay stack navigation doesn't support updating the browser's
40905
41055
  // path.
40906
41056
  case 'modal':
40907
- navigation.modal(Component17, {
41057
+ navigation.modal(Component18, {
40908
41058
  backdropColor,
40909
41059
  animation,
40910
41060
  });
40911
41061
  break;
40912
41062
  case 'overlay':
40913
- navigation.overlay(Component17, {
41063
+ navigation.overlay(Component18, {
40914
41064
  appearsFrom,
40915
41065
  backdropColor,
40916
41066
  animation,
@@ -41403,11 +41553,11 @@ function safeCSSValue(value) {
41403
41553
  return 'none';
41404
41554
  return value;
41405
41555
  }
41406
- function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override, inComponentSlot, }) {
41556
+ function withCodeBoundaryForOverrides(Component18, { scopeId, nodeId, override, inComponentSlot, }) {
41407
41557
  if (!shouldEnableCodeBoundaries()) {
41408
- return override(Component17);
41558
+ return override(Component18);
41409
41559
  }
41410
- const appliedOverride = tryToApplyOverride(Component17, override);
41560
+ const appliedOverride = tryToApplyOverride(Component18, override);
41411
41561
  let hasErrorBeenLogged = false;
41412
41562
  function CodeBoundaryForOverrides(props, ref) {
41413
41563
  const nearestExternalComponent = useNearestExternalComponent();
@@ -41418,7 +41568,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41418
41568
  value: nodeId,
41419
41569
  children: /* @__PURE__ */ jsx3(CodeComponentBoundary, {
41420
41570
  getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
41421
- fallback: /* @__PURE__ */ jsx3(Component17, {
41571
+ fallback: /* @__PURE__ */ jsx3(Component18, {
41422
41572
  ...props,
41423
41573
  ref,
41424
41574
  }),
@@ -41436,7 +41586,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41436
41586
  collectErrorToAnalytics(appliedOverride.error);
41437
41587
  hasErrorBeenLogged = true;
41438
41588
  }
41439
- return /* @__PURE__ */ jsx3(Component17, {
41589
+ return /* @__PURE__ */ jsx3(Component18, {
41440
41590
  ...props,
41441
41591
  ref,
41442
41592
  });
@@ -41459,9 +41609,9 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
41459
41609
  }
41460
41610
  return React4.forwardRef(CodeBoundaryForOverrides);
41461
41611
  }
41462
- function tryToApplyOverride(Component17, override) {
41612
+ function tryToApplyOverride(Component18, override) {
41463
41613
  try {
41464
- const ComponentWithOverrides = override(Component17);
41614
+ const ComponentWithOverrides = override(Component18);
41465
41615
  return {
41466
41616
  status: 'success',
41467
41617
  Component: ComponentWithOverrides,
@@ -41482,7 +41632,7 @@ function singleFrame() {
41482
41632
  frame.postRender(() => resolve());
41483
41633
  });
41484
41634
  }
41485
- var withV1StrokeFX = (Component17) => forwardRef((props, forwardedRef) => {
41635
+ var withV1StrokeFX = (Component18) => forwardRef((props, forwardedRef) => {
41486
41636
  const { strokeEffectLength, strokeEffectGap, strokeEffectOffset, strokeEffectLoop, strokeEffectTotalLength, strokeEffectLoopType, pathLengthTransition, ...restProps } = props;
41487
41637
  const isCanvas = isStaticRenderer();
41488
41638
  const offset = useMotionValue(0);
@@ -41526,7 +41676,7 @@ var withV1StrokeFX = (Component17) => forwardRef((props, forwardedRef) => {
41526
41676
  strokeDashoffset: value,
41527
41677
  }
41528
41678
  : void 0;
41529
- return /* @__PURE__ */ jsx3(Component17, {
41679
+ return /* @__PURE__ */ jsx3(Component18, {
41530
41680
  ...restProps,
41531
41681
  ...effect,
41532
41682
  ref: forwardedRef,
@@ -41544,14 +41694,14 @@ function extractMappingFromInfo(info) {
41544
41694
  return void 0;
41545
41695
  }
41546
41696
  }
41547
- function withMappedReactProps(Component17, info) {
41697
+ function withMappedReactProps(Component18, info) {
41548
41698
  return (rawProps) => {
41549
41699
  const props = {};
41550
41700
  const mapping = extractMappingFromInfo(info);
41551
41701
  for (const key7 in rawProps) {
41552
41702
  asRecord(props)[(mapping == null ? void 0 : mapping[key7]) ?? key7] = rawProps[key7];
41553
41703
  }
41554
- return /* @__PURE__ */ jsx3(Component17, {
41704
+ return /* @__PURE__ */ jsx3(Component18, {
41555
41705
  ...props,
41556
41706
  });
41557
41707
  };
@@ -41594,9 +41744,9 @@ function createInputOutputRanges2(transformTargets, threshold, exitTarget) {
41594
41744
  outputRange: [-1, -1, ...outputRange,],
41595
41745
  };
41596
41746
  }
41597
- var withVariantAppearEffect = (Component17) => React4.forwardRef((props, forwardedRef) => {
41747
+ var withVariantAppearEffect = (Component18) => React4.forwardRef((props, forwardedRef) => {
41598
41748
  if (RenderTarget.current() === RenderTarget.canvas) {
41599
- return /* @__PURE__ */ jsx3(Component17, {
41749
+ return /* @__PURE__ */ jsx3(Component18, {
41600
41750
  ...props,
41601
41751
  ref: forwardedRef,
41602
41752
  });
@@ -41665,26 +41815,26 @@ var withVariantAppearEffect = (Component17) => React4.forwardRef((props, forward
41665
41815
  startTransition2(() => setVariant(target));
41666
41816
  });
41667
41817
  if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
41668
- return /* @__PURE__ */ jsx3(Component17, {
41818
+ return /* @__PURE__ */ jsx3(Component18, {
41669
41819
  ...rest,
41670
41820
  variant: activeVariant ?? props.variant,
41671
41821
  ref: observerRef,
41672
41822
  });
41673
41823
  }
41674
41824
  else {
41675
- return /* @__PURE__ */ jsx3(Component17, {
41825
+ return /* @__PURE__ */ jsx3(Component18, {
41676
41826
  ...rest,
41677
41827
  });
41678
41828
  }
41679
41829
  });
41680
- var withVariantFX = (Component17) => React4.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
41830
+ var withVariantFX = (Component18) => React4.forwardRef(({ initial, animate: animate3, exit, ...props }, forwardedRef) => {
41681
41831
  const observerRef = useObserverRef(forwardedRef);
41682
41832
  const effect = usePresenceAnimation({
41683
41833
  initial,
41684
41834
  animate: animate3,
41685
41835
  exit,
41686
41836
  }, observerRef, true);
41687
- return /* @__PURE__ */ jsx3(Component17, {
41837
+ return /* @__PURE__ */ jsx3(Component18, {
41688
41838
  ...props,
41689
41839
  style: {
41690
41840
  ...(props == null ? void 0 : props.style),
@@ -42434,6 +42584,27 @@ function createVariantName(weight, style2) {
42434
42584
  }
42435
42585
  return `${fontWeightNames[weight]}`;
42436
42586
  }
42587
+ var MapWithHash = class extends Map {
42588
+ constructor() {
42589
+ super(...arguments);
42590
+ __publicField(this, '_hash', 0);
42591
+ }
42592
+ get hash() {
42593
+ return this._hash;
42594
+ }
42595
+ set(key7, value) {
42596
+ this._hash++;
42597
+ return super.set(key7, value);
42598
+ }
42599
+ delete(key7) {
42600
+ this._hash++;
42601
+ return super.delete(key7);
42602
+ }
42603
+ clear() {
42604
+ this._hash++;
42605
+ return super.clear();
42606
+ }
42607
+ };
42437
42608
  function isVariableFont(font) {
42438
42609
  return Boolean(font.variationAxes);
42439
42610
  }
@@ -42993,8 +43164,10 @@ var Mixed = Symbol('Mixed');
42993
43164
  var DEPENDENCIES_MODULE_NAME = 'dependencies';
42994
43165
  var DEPENDENCIES_MODULE_TYPE = 'config';
42995
43166
  var DEPENDENCIES_MODULE_TYPE_SLASH_NAME = `${DEPENDENCIES_MODULE_TYPE}/${DEPENDENCIES_MODULE_NAME}`;
42996
- var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/importMap.json`;
42997
- var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/dependencies.json`;
43167
+ var IMPORT_MAP_FILE_NAME = 'importMap.json';
43168
+ var DEPENDENCIES_FILE_NAME = 'dependencies.json';
43169
+ var IMPORT_MAP_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${IMPORT_MAP_FILE_NAME}`;
43170
+ var DEPENDENCIES_FILE_ID = `${DEPENDENCIES_MODULE_TYPE_SLASH_NAME}/${DEPENDENCIES_FILE_NAME}`;
42998
43171
  var USE_FREEZE = false;
42999
43172
  var List;
43000
43173
  ((List2) => {
@@ -44445,7 +44618,7 @@ function isValidVariationAxes(data2) {
44445
44618
  var FontStore = class {
44446
44619
  constructor() {
44447
44620
  __publicField(this, 'enabled', false);
44448
- __publicField(this, 'bySelector', /* @__PURE__ */ new Map());
44621
+ __publicField(this, 'bySelector', new MapWithHash());
44449
44622
  __publicField(this, 'loadedSelectors', /* @__PURE__ */ new Set());
44450
44623
  __publicField(this, 'getGoogleFontsListPromise');
44451
44624
  __publicField(this, 'getFontshareFontsListPromise');
@@ -44459,20 +44632,29 @@ var FontStore = class {
44459
44632
  __publicField(this, 'builtIn');
44460
44633
  __publicField(this, 'framer');
44461
44634
  __publicField(this, 'custom');
44635
+ __publicField(this, 'bySelectorValuesCache');
44462
44636
  this.local = new LocalFontSource();
44463
44637
  this.google = new GoogleFontSource();
44464
44638
  this.fontshare = new FontshareSource();
44465
44639
  this.framer = new FramerFontSource();
44466
44640
  this.custom = new CustomFontSource();
44467
44641
  this.builtIn = new BuiltInFontSource();
44468
- this.bySelector = /* @__PURE__ */ new Map();
44469
44642
  this.importLocalFonts();
44470
44643
  }
44644
+ get hash() {
44645
+ return this.bySelector.hash;
44646
+ }
44471
44647
  addFont(font) {
44472
44648
  this.bySelector.set(font.selector, font);
44473
44649
  }
44474
44650
  getAvailableFonts() {
44475
- return Array.from(this.bySelector.values());
44651
+ if (!this.bySelectorValuesCache || this.bySelectorValuesCache.hash !== this.bySelector.hash) {
44652
+ this.bySelectorValuesCache = {
44653
+ result: Array.from(this.bySelector.values()),
44654
+ hash: this.bySelector.hash,
44655
+ };
44656
+ }
44657
+ return this.bySelectorValuesCache.result;
44476
44658
  }
44477
44659
  importLocalFonts() {
44478
44660
  for (const font of this.local.importFonts()) {
@@ -45348,7 +45530,369 @@ var styles3 = /* @__PURE__ */ (() => [
45348
45530
  }),
45349
45531
  ])();
45350
45532
  var FormSelect = /* @__PURE__ */ withCSS(Select, styles3, 'framer-lib-form-select');
45351
- var Image2 = /* @__PURE__ */ React4.forwardRef(function Image3(props, ref) {
45533
+ function useEscToClose(isOpen, close) {
45534
+ useEffect(() => {
45535
+ function handleKeyDown(e) {
45536
+ if (e.key === 'Escape' && isOpen) {
45537
+ e.preventDefault();
45538
+ e.stopPropagation();
45539
+ close();
45540
+ }
45541
+ }
45542
+ window.addEventListener('keyup', handleKeyDown);
45543
+ return () => window.removeEventListener('keyup', handleKeyDown);
45544
+ }, [isOpen, close,]);
45545
+ }
45546
+ var steps2 = [512, 1024, 2048, 4096,];
45547
+ function calculateImageWidth(aspectRatio2, maxWidth, totalHorizontalPadding, totalVerticalPadding) {
45548
+ const availableHeight = window.innerHeight - totalVerticalPadding;
45549
+ const availableWidth = Math.min(window.innerWidth - totalHorizontalPadding, maxWidth);
45550
+ const maxWidthBasedOnHeight = availableHeight / aspectRatio2;
45551
+ return Math.min(availableWidth, maxWidthBasedOnHeight);
45552
+ }
45553
+ function optimisticallyDecodeImage(image, { width, height, }) {
45554
+ if (!image.src || !image.srcSet)
45555
+ return;
45556
+ const i = new window.Image();
45557
+ i.src = image.src;
45558
+ i.srcset = image.srcSet;
45559
+ i.width = width;
45560
+ i.height = height;
45561
+ return i.decode();
45562
+ }
45563
+ function getPortalContainer2() {
45564
+ return document.getElementById(templateOverlayContainerId) ?? document.getElementById(overlayContainerId) ?? document.body;
45565
+ }
45566
+ function getSidePadding(value, padding) {
45567
+ if (isNumber2(value))
45568
+ return value;
45569
+ return padding ?? 0;
45570
+ }
45571
+ function getTotalVerticalPadding(lightbox) {
45572
+ return getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding) +
45573
+ getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
45574
+ }
45575
+ function getTotalHorizontalPadding(lightbox) {
45576
+ return getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding) +
45577
+ getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
45578
+ }
45579
+ function useStableCallback(callback) {
45580
+ const latest = useRef3(callback);
45581
+ latest.current = callback;
45582
+ return useCallback((...args) => latest.current(...args), []);
45583
+ }
45584
+ function createImageWithSrcSet(lightbox, background) {
45585
+ if (!lightbox || !background || !background.src)
45586
+ return background;
45587
+ const base = new URL(background.src);
45588
+ base.searchParams.delete('scale-down-to');
45589
+ base.searchParams.delete('lossless');
45590
+ return {
45591
+ ...background,
45592
+ sizes: `min(100vw, ${lightbox.maxWidth - getTotalHorizontalPadding(lightbox)}px)`,
45593
+ // Use all steps since the lightbox can scale up and down with the viewport.
45594
+ srcSet: steps2.map((size) => {
45595
+ const src = new URL(base);
45596
+ src.searchParams.set('scale-down-to', size.toString());
45597
+ return `${src.toString()} ${size}w`;
45598
+ }).join(', '),
45599
+ };
45600
+ }
45601
+ var distortionTransforms = /* @__PURE__ */ (() => ({
45602
+ x: void 0,
45603
+ y: void 0,
45604
+ z: 0,
45605
+ translateX: void 0,
45606
+ translateY: void 0,
45607
+ translateZ: 0,
45608
+ rotate: void 0,
45609
+ rotateX: 0,
45610
+ rotateY: 0,
45611
+ rotateZ: void 0,
45612
+ scale: 1,
45613
+ scaleX: 1,
45614
+ scaleY: 1,
45615
+ scaleZ: 1,
45616
+ skew: 0,
45617
+ skewX: 0,
45618
+ skewY: 0,
45619
+ originX: void 0,
45620
+ originY: void 0,
45621
+ originZ: void 0,
45622
+ perspective: 0,
45623
+ transformPerspective: 0,
45624
+ }))();
45625
+ function isDistortionTransform(values) {
45626
+ if (!values)
45627
+ return false;
45628
+ for (const k in values) {
45629
+ if (!(k in distortionTransforms))
45630
+ continue;
45631
+ const identityValue = distortionTransforms[k];
45632
+ const value = values[k];
45633
+ if (!isNumber2(identityValue) || !isNumber2(value))
45634
+ continue;
45635
+ if (identityValue === value)
45636
+ continue;
45637
+ return true;
45638
+ }
45639
+ return false;
45640
+ }
45641
+ function isDistorted(ref) {
45642
+ var _a, _b;
45643
+ const element = visualElementStore.get(ref.current);
45644
+ if (!element)
45645
+ return false;
45646
+ if (isDistortionTransform((_a = element.projection) == null ? void 0 : _a.latestValues))
45647
+ return true;
45648
+ const path = (_b = element.projection) == null ? void 0 : _b.path;
45649
+ if (!path || path.length === 0)
45650
+ return false;
45651
+ for (const p of path) {
45652
+ if (isDistortionTransform(p.latestValues))
45653
+ return true;
45654
+ }
45655
+ return false;
45656
+ }
45657
+ var enterExitBackdropAnimation = {
45658
+ opacity: 0,
45659
+ };
45660
+ var targetBackdropAnimation = {
45661
+ opacity: 1,
45662
+ };
45663
+ function withLightboxEffect(Component18) {
45664
+ return forwardRef(function LightboxEffect({ lightbox, lightboxClassName, onClick, ...props }, forwardedRef) {
45665
+ const config = useContext(MotionConfigContext);
45666
+ const fallbackRef = useRef3(null);
45667
+ const ref = forwardedRef ?? fallbackRef;
45668
+ const decodePromiseRef = useRef3();
45669
+ const image = useMemo2(() => createImageWithSrcSet(lightbox, props.background), [lightbox, props.background,]);
45670
+ const [open, setOpen,] = useState(false);
45671
+ const [openOverrides, setOpenOverrides,] = useState();
45672
+ const onOpen = useCallback(() => {
45673
+ if (!lightbox)
45674
+ return;
45675
+ if (open) {
45676
+ startTransition2(() => {
45677
+ setOpen(true);
45678
+ });
45679
+ return;
45680
+ }
45681
+ frame.read(() => {
45682
+ if (!ref.current)
45683
+ return;
45684
+ const style22 = getComputedStyle(ref.current);
45685
+ const hasBorder = ref.current.getAttribute('data-border') === 'true';
45686
+ const borderStyle2 = hasBorder ? getComputedStyle(ref.current, '::after') : void 0;
45687
+ const width = ref.current.offsetWidth ?? 1;
45688
+ const height = ref.current.offsetHeight ?? 1;
45689
+ const transition2 = isDistorted(ref)
45690
+ ? {
45691
+ duration: 0,
45692
+ }
45693
+ : lightbox.transition;
45694
+ startTransition2(() => {
45695
+ setOpenOverrides({
45696
+ borderRadius: style22.borderRadius,
45697
+ aspectRatio: width / (height || 1),
45698
+ borderTop: borderStyle2 == null ? void 0 : borderStyle2.borderTopWidth,
45699
+ borderRight: borderStyle2 == null ? void 0 : borderStyle2.borderRightWidth,
45700
+ borderBottom: borderStyle2 == null ? void 0 : borderStyle2.borderBottomWidth,
45701
+ borderLeft: borderStyle2 == null ? void 0 : borderStyle2.borderLeftWidth,
45702
+ borderStyle: borderStyle2 == null ? void 0 : borderStyle2.borderStyle,
45703
+ borderColor: borderStyle2 == null ? void 0 : borderStyle2.borderColor,
45704
+ transition: transition2,
45705
+ imageRendering: style22.imageRendering,
45706
+ filter: style22.filter,
45707
+ });
45708
+ setOpen(true);
45709
+ });
45710
+ });
45711
+ }, [lightbox, open, ref,]);
45712
+ const aspectRatio2 = (openOverrides == null ? void 0 : openOverrides.aspectRatio) ?? 1;
45713
+ const decode = useStableCallback(() => {
45714
+ var _a;
45715
+ if (!lightbox || !image || !image.src)
45716
+ return;
45717
+ const srcDecodePromise = (_a = decodePromiseRef.current) == null ? void 0 : _a[image.src];
45718
+ if (srcDecodePromise)
45719
+ return srcDecodePromise;
45720
+ const width = calculateImageWidth(aspectRatio2, lightbox.maxWidth, getTotalHorizontalPadding(lightbox), getTotalVerticalPadding(lightbox));
45721
+ const promise = optimisticallyDecodeImage(image, {
45722
+ width,
45723
+ height: width * aspectRatio2,
45724
+ });
45725
+ decodePromiseRef.current = {
45726
+ [image.src]: promise,
45727
+ };
45728
+ return promise;
45729
+ });
45730
+ const handleClick = useCallback(async (e) => {
45731
+ onClick == null ? void 0 : onClick(e);
45732
+ if (open || !lightbox || !image)
45733
+ return;
45734
+ await decode();
45735
+ onOpen();
45736
+ }, [onClick, onOpen, open, image, lightbox, decode,]);
45737
+ const onClose = useCallback((e) => {
45738
+ e == null ? void 0 : e.stopPropagation();
45739
+ startTransition2(() => {
45740
+ setOpen(false);
45741
+ });
45742
+ }, []);
45743
+ useEscToClose(open, onClose);
45744
+ useEffect(() => {
45745
+ if (!lightbox)
45746
+ return;
45747
+ let timer;
45748
+ function enter() {
45749
+ timer = setTimeout(() => {
45750
+ void decode();
45751
+ }, 50);
45752
+ }
45753
+ function clear() {
45754
+ clearTimeout(timer);
45755
+ }
45756
+ const currentRef = ref.current;
45757
+ currentRef == null ? void 0 : currentRef.addEventListener('mouseenter', enter);
45758
+ currentRef == null ? void 0 : currentRef.addEventListener('mouseleave', clear);
45759
+ currentRef == null ? void 0 : currentRef.addEventListener('pointerdown', decode);
45760
+ return () => {
45761
+ clear();
45762
+ currentRef == null ? void 0 : currentRef.removeEventListener('mouseenter', enter);
45763
+ currentRef == null ? void 0 : currentRef.removeEventListener('mouseleave', clear);
45764
+ currentRef == null ? void 0 : currentRef.removeEventListener('pointerdown', decode);
45765
+ };
45766
+ }, [decode, ref, lightbox,]);
45767
+ const fallbackLayoutId = useId();
45768
+ const transition = (openOverrides == null ? void 0 : openOverrides.transition) ?? props.transition ?? config.transition;
45769
+ const borderRadius2 = openOverrides == null ? void 0 : openOverrides.borderRadius;
45770
+ const imageRendering = openOverrides == null ? void 0 : openOverrides.imageRendering;
45771
+ const filter2 = openOverrides == null ? void 0 : openOverrides.filter;
45772
+ const borderTop = openOverrides == null ? void 0 : openOverrides.borderTop;
45773
+ const borderRight = openOverrides == null ? void 0 : openOverrides.borderRight;
45774
+ const borderBottom = openOverrides == null ? void 0 : openOverrides.borderBottom;
45775
+ const borderLeft = openOverrides == null ? void 0 : openOverrides.borderLeft;
45776
+ const borderStyle = openOverrides == null ? void 0 : openOverrides.borderStyle;
45777
+ const borderColor = openOverrides == null ? void 0 : openOverrides.borderColor;
45778
+ const hasAnyBorder = Boolean(borderTop || borderRight || borderBottom || borderLeft || borderStyle || borderColor);
45779
+ const border = hasAnyBorder
45780
+ ? {
45781
+ '--border-top-width': borderTop,
45782
+ '--border-right-width': borderRight,
45783
+ '--border-bottom-width': borderBottom,
45784
+ '--border-left-width': borderLeft,
45785
+ '--border-style': borderStyle,
45786
+ '--border-color': borderColor,
45787
+ }
45788
+ : void 0;
45789
+ const portalProps = {
45790
+ [portalIdAttribute]: props.id,
45791
+ };
45792
+ const paddingTop = getSidePadding(lightbox == null ? void 0 : lightbox.paddingTop, lightbox == null ? void 0 : lightbox.padding);
45793
+ const paddingBottom = getSidePadding(lightbox == null ? void 0 : lightbox.paddingBottom, lightbox == null ? void 0 : lightbox.padding);
45794
+ const paddingLeft = getSidePadding(lightbox == null ? void 0 : lightbox.paddingLeft, lightbox == null ? void 0 : lightbox.padding);
45795
+ const paddingRight = getSidePadding(lightbox == null ? void 0 : lightbox.paddingRight, lightbox == null ? void 0 : lightbox.padding);
45796
+ const style2 = (openOverrides == null ? void 0 : openOverrides.borderRadius)
45797
+ ? {
45798
+ ...props.style,
45799
+ borderRadius: openOverrides.borderRadius,
45800
+ }
45801
+ : props.style;
45802
+ const layoutDependency = open ? props.layoutDependency ? `${props.layoutDependency}-open` : 'open' : props.layoutDependency;
45803
+ return /* @__PURE__ */ jsxs(Fragment, {
45804
+ children: [
45805
+ /* @__PURE__ */ jsx3(Component18, {
45806
+ ...props,
45807
+ style: style2,
45808
+ onClick: handleClick,
45809
+ layoutId: props.layoutId ?? (lightbox ? fallbackLayoutId : void 0),
45810
+ ref,
45811
+ layoutDependency,
45812
+ transition,
45813
+ }),
45814
+ /* @__PURE__ */ jsx3(AnimatePresence, {
45815
+ children: open && lightbox && image && /* @__PURE__ */ jsx3(Fragment, {
45816
+ children: createPortal(
45817
+ /* @__PURE__ */ jsxs(Fragment, {
45818
+ children: [
45819
+ /* @__PURE__ */ jsx3(motion.div, {
45820
+ ...portalProps,
45821
+ className: lightboxClassName,
45822
+ onClick: onClose,
45823
+ style: {
45824
+ position: 'fixed',
45825
+ inset: 0,
45826
+ zIndex: lightbox.zIndex,
45827
+ backgroundColor: lightbox.backdrop ?? 'transparent',
45828
+ },
45829
+ transition,
45830
+ initial: enterExitBackdropAnimation,
45831
+ animate: targetBackdropAnimation,
45832
+ exit: enterExitBackdropAnimation,
45833
+ onTransitionEnd: () => {
45834
+ startTransition2(() => {
45835
+ setOpenOverrides(void 0);
45836
+ });
45837
+ },
45838
+ }),
45839
+ /* @__PURE__ */ jsx3('div', {
45840
+ ...portalProps,
45841
+ className: lightboxClassName,
45842
+ style: {
45843
+ alignItems: 'center',
45844
+ display: 'flex',
45845
+ inset: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
45846
+ justifyContent: 'center',
45847
+ pointerEvents: 'none',
45848
+ position: 'fixed',
45849
+ zIndex: lightbox.zIndex,
45850
+ },
45851
+ children: /* @__PURE__ */ jsx3('div', {
45852
+ style: {
45853
+ alignItems: 'center',
45854
+ aspectRatio: aspectRatio2,
45855
+ display: 'flex',
45856
+ justifyContent: 'center',
45857
+ maxHeight: '100%',
45858
+ position: 'relative',
45859
+ width: '100%',
45860
+ maxWidth: lightbox.maxWidth,
45861
+ },
45862
+ children: /* @__PURE__ */ jsx3(motion.div, {
45863
+ layoutId: props.layoutId ?? fallbackLayoutId,
45864
+ transition,
45865
+ onClick: onOpen,
45866
+ className: 'framer-lightbox-container',
45867
+ 'data-border': hasAnyBorder,
45868
+ style: {
45869
+ aspectRatio: aspectRatio2,
45870
+ borderRadius: borderRadius2,
45871
+ bottom: 0,
45872
+ position: 'absolute',
45873
+ top: 0,
45874
+ userSelect: 'none',
45875
+ imageRendering,
45876
+ filter: filter2,
45877
+ ...border,
45878
+ },
45879
+ children: /* @__PURE__ */ jsx3(BackgroundImageComponent, {
45880
+ image,
45881
+ alt: image.alt,
45882
+ draggable: props.draggable,
45883
+ }),
45884
+ }),
45885
+ }),
45886
+ }),
45887
+ ],
45888
+ }), getPortalContainer2()),
45889
+ }, 'backdrop'),
45890
+ }),
45891
+ ],
45892
+ });
45893
+ });
45894
+ }
45895
+ var Component16 = /* @__PURE__ */ React4.forwardRef(function Image2(props, ref) {
45352
45896
  const { background, children, alt, draggable, fitImageDimension, style: styleFromProps, ...rest } = props;
45353
45897
  const style2 = {
45354
45898
  ...styleFromProps,
@@ -45396,6 +45940,7 @@ var Image2 = /* @__PURE__ */ React4.forwardRef(function Image3(props, ref) {
45396
45940
  ],
45397
45941
  });
45398
45942
  });
45943
+ var Image3 = /* @__PURE__ */ withLightboxEffect(Component16);
45399
45944
  var frameFromElement = (element) => {
45400
45945
  const frame2 = Rect.fromRect(element.getBoundingClientRect());
45401
45946
  frame2.x = frame2.x + safeWindow.scrollX;
@@ -45738,7 +46283,7 @@ var defaultValues2 = {
45738
46283
  function isEffectKey(key7) {
45739
46284
  return key7 in defaultValues2;
45740
46285
  }
45741
- function createKeyframes(effect) {
46286
+ function createKeyframes(effect, shouldReduceMotion) {
45742
46287
  const out = {};
45743
46288
  for (const key7 in effect) {
45744
46289
  if (!isEffectKey(key7))
@@ -45747,6 +46292,8 @@ function createKeyframes(effect) {
45747
46292
  const defaultValue = defaultValues2[key7];
45748
46293
  if (isUndefined(effectValue) || isUndefined(defaultValue))
45749
46294
  continue;
46295
+ if (shouldReduceMotion && key7 !== 'opacity')
46296
+ continue;
45750
46297
  out[key7] = [effectValue, defaultValue,];
45751
46298
  }
45752
46299
  return out;
@@ -45754,7 +46301,16 @@ function createKeyframes(effect) {
45754
46301
  var emojiSplitRe = /* @__PURE__ */ (() => {
45755
46302
  return new RegExp('\\p{Regional_Indicator}{2}|\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?(?:\\u{200d}\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?)*|.', 'gu');
45756
46303
  })();
45757
- function tokenizeText(text, tokenization = 'character', elements, style2) {
46304
+ function tokenizeText(text, tokenization = 'character', elements, shouldReduceMotion, style2) {
46305
+ if (shouldReduceMotion) {
46306
+ const ref = newOverrideableRef();
46307
+ elements.add(ref);
46308
+ return /* @__PURE__ */ jsx3('span', {
46309
+ ref,
46310
+ style: style2,
46311
+ children: text,
46312
+ });
46313
+ }
45758
46314
  switch (tokenization) {
45759
46315
  case 'character':
45760
46316
  // When we want to animate "lines" that aren't split by newlines, but
@@ -45847,7 +46403,7 @@ function transformString(effect) {
45847
46403
  transforms.push(`skewY(${effect.skewY}deg)`);
45848
46404
  return transforms.join(' ');
45849
46405
  }
45850
- function getInitialEffectStyle(canPlay, canAnimate2, effect) {
46406
+ function getInitialEffectStyle(canPlay, canAnimate2, effect, shouldReduceMotion) {
45851
46407
  if (!effect || !effect.effect)
45852
46408
  return void 0;
45853
46409
  const type = effect.type;
@@ -45859,8 +46415,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
45859
46415
  return void 0;
45860
46416
  return {
45861
46417
  opacity: effect.effect.opacity,
45862
- filter: effect.effect.filter,
45863
- transform: transformString(effect.effect),
46418
+ filter: shouldReduceMotion ? void 0 : effect.effect.filter,
46419
+ transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
45864
46420
  };
45865
46421
  case 'line':
45866
46422
  case 'word':
@@ -45874,8 +46430,8 @@ function getInitialEffectStyle(canPlay, canAnimate2, effect) {
45874
46430
  return {
45875
46431
  display: 'inline-block',
45876
46432
  opacity: effect.effect.opacity,
45877
- filter: effect.effect.filter,
45878
- transform: transformString(effect.effect),
46433
+ filter: shouldReduceMotion ? void 0 : effect.effect.filter,
46434
+ transform: shouldReduceMotion ? void 0 : transformString(effect.effect),
45879
46435
  };
45880
46436
  }
45881
46437
  default:
@@ -45886,6 +46442,7 @@ function useTextEffect(config, ref, preview) {
45886
46442
  const elements = useConstant2(() => /* @__PURE__ */ new Set());
45887
46443
  const isRenderingStaticContent = isStaticRenderer();
45888
46444
  const canPlay = preview || !isRenderingStaticContent;
46445
+ const shouldReduceMotion = useReducedMotionConfig();
45889
46446
  const state = React2.useRef({
45890
46447
  hasMounted: false,
45891
46448
  hasAnimatedOnce: false,
@@ -45919,7 +46476,7 @@ function useTextEffect(config, ref, preview) {
45919
46476
  const cleanupRef = {
45920
46477
  current: void 0,
45921
46478
  };
45922
- void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, () => {
46479
+ void runAppearEffect(tokenization2, effect.effect, elements, transition, startDelay, repeat, shouldReduceMotion, () => {
45923
46480
  Object.assign(state.current, {
45924
46481
  isAnimating: false,
45925
46482
  });
@@ -45970,9 +46527,9 @@ function useTextEffect(config, ref, preview) {
45970
46527
  if (!effectEnabled)
45971
46528
  return void 0;
45972
46529
  const { hasMounted, hasAnimatedOnce, effect, } = state.current;
45973
- const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect);
46530
+ const effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect, shouldReduceMotion);
45974
46531
  return {
45975
- text: (text) => tokenizeText(text, tokenization, elements, effectStyle),
46532
+ text: (text) => tokenizeText(text, tokenization, elements, shouldReduceMotion, effectStyle),
45976
46533
  props: (style2) => {
45977
46534
  if ((effect == null ? void 0 : effect.tokenization) !== 'element')
45978
46535
  return void 0;
@@ -45996,7 +46553,7 @@ function useTextEffect(config, ref, preview) {
45996
46553
  switch (type) {
45997
46554
  case 'appear': {
45998
46555
  const { transition, startDelay, } = effect;
45999
- void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay);
46556
+ void runAppearEffect(tokenization, effect.effect, elements, transition, startDelay, false, shouldReduceMotion);
46000
46557
  break;
46001
46558
  }
46002
46559
  default:
@@ -46016,8 +46573,8 @@ function mayAnimate(hasMounted, hasAnimatedOnce, effect) {
46016
46573
  hasAnimatedOnce && !(effect == null ? void 0 : effect.repeat) &&
46017
46574
  ((effect == null ? void 0 : effect.trigger) === 'onInView' || (effect == null ? void 0 : effect.trigger) === 'onScrollTarget'));
46018
46575
  }
46019
- async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, callback, cleanupRef) {
46020
- const enter = createKeyframes(effect);
46576
+ async function runAppearEffect(tokenization = 'character', effect, elements, transition, startDelay = 0, repeat = false, shouldReduceMotion, callback, cleanupRef) {
46577
+ const enter = createKeyframes(effect, shouldReduceMotion);
46021
46578
  const controller = new AbortController();
46022
46579
  if (cleanupRef)
46023
46580
  cleanupRef.current = () => controller.abort();
@@ -46037,13 +46594,20 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
46037
46594
  }).then(() => callback == null ? void 0 : callback());
46038
46595
  if (!repeat || !cleanupRef)
46039
46596
  return;
46040
- cleanupRef.current = () => void animate(list, effect, {
46041
- ...transition,
46042
- restDelta: 1e-3,
46043
- delay: stagger((transition == null ? void 0 : transition.delay) ?? 0, {
46044
- startDelay,
46045
- }),
46046
- });
46597
+ cleanupRef.current = () => {
46598
+ const actualEffect = shouldReduceMotion
46599
+ ? {
46600
+ opacity: effect.opacity,
46601
+ }
46602
+ : effect;
46603
+ void animate(list, actualEffect, {
46604
+ ...transition,
46605
+ restDelta: 1e-3,
46606
+ delay: stagger((transition == null ? void 0 : transition.delay) ?? 0, {
46607
+ startDelay,
46608
+ }),
46609
+ });
46610
+ };
46047
46611
  return;
46048
46612
  }
46049
46613
  case 'line': {
@@ -46080,8 +46644,13 @@ async function runAppearEffect(tokenization = 'character', effect, elements, tra
46080
46644
  cleanupRef.current = () => {
46081
46645
  if (list.length === 0)
46082
46646
  return;
46647
+ const actualEffect = shouldReduceMotion
46648
+ ? {
46649
+ opacity: effect.opacity,
46650
+ }
46651
+ : effect;
46083
46652
  list.forEach((group, i) => {
46084
- void animate(group, effect, {
46653
+ void animate(group, actualEffect, {
46085
46654
  ...transition,
46086
46655
  restDelta: 1e-3,
46087
46656
  delay: startDelay + i * ((transition == null ? void 0 : transition.delay) ?? 0),
@@ -46186,13 +46755,12 @@ var RichTextContainer = /* @__PURE__ */ forwardRef(function RichTextContainer2(p
46186
46755
  return null;
46187
46756
  const isHidden = isEditable && environment2() === RenderTarget.canvas;
46188
46757
  const containerStyle = {
46189
- outline: 'none',
46190
- display: 'flex',
46191
- flexDirection: 'column',
46192
- justifyContent: convertVerticalAlignment(verticalAlignment),
46193
46758
  opacity: isHidden ? 0 : opacity,
46194
- flexShrink: 0,
46195
46759
  };
46760
+ const justifyContent = convertVerticalAlignment(verticalAlignment);
46761
+ if (justifyContent !== defaultRichTextContainerStyle.justifyContent) {
46762
+ containerStyle.justifyContent = justifyContent;
46763
+ }
46196
46764
  const positionStyle = {};
46197
46765
  const restrictedRenderTarget = RenderTarget.hasRestrictions();
46198
46766
  const frame2 = calculateRect(props, parentSize || 0, false);
@@ -46238,11 +46806,11 @@ var RichTextContainer = /* @__PURE__ */ forwardRef(function RichTextContainer2(p
46238
46806
  if (layoutId) {
46239
46807
  rest.layout = 'preserve-aspect';
46240
46808
  }
46241
- const Component17 = htmlElementAsMotionComponent(props.as);
46809
+ const Component18 = htmlElementAsMotionComponent(props.as);
46242
46810
  const dataFramerName = rest['data-framer-name'] ?? name;
46243
46811
  if (isString(props.viewBox)) {
46244
46812
  if (props.as !== void 0) {
46245
- return /* @__PURE__ */ jsx3(Component17, {
46813
+ return /* @__PURE__ */ jsx3(Component18, {
46246
46814
  ...rest,
46247
46815
  ref: containerRef,
46248
46816
  style: containerStyle,
@@ -46276,7 +46844,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef(function RichTextContainer2(p
46276
46844
  });
46277
46845
  }
46278
46846
  }
46279
- return /* @__PURE__ */ jsx3(Component17, {
46847
+ return /* @__PURE__ */ jsx3(Component18, {
46280
46848
  ...rest,
46281
46849
  ref: containerRef,
46282
46850
  style: containerStyle,
@@ -48605,10 +49173,13 @@ function initialRouteComponent(component) {
48605
49173
  function useInitialRouteComponent(routes, homeNodeId) {
48606
49174
  var _a;
48607
49175
  const InitialRouteComponent = (_a = routes[homeNodeId]) == null ? void 0 : _a.page;
48608
- const [RouteComponent, setRouteComponent,] = useState(initialRouteComponent(InitialRouteComponent));
49176
+ const [RouteComponent, setRouteComponent,] = useState(() => initialRouteComponent(InitialRouteComponent));
48609
49177
  useEffect(() => {
48610
49178
  if (withPreload(InitialRouteComponent)) {
48611
- void InitialRouteComponent.preload().then(setRouteComponent);
49179
+ void (async () => {
49180
+ await InitialRouteComponent.preload();
49181
+ setRouteComponent(InitialRouteComponent);
49182
+ })();
48612
49183
  }
48613
49184
  }, []);
48614
49185
  return RouteComponent;
@@ -48645,12 +49216,12 @@ var package_default = {
48645
49216
  '@types/dom-navigation': '^1.0.5',
48646
49217
  '@types/fontfaceobserver': '2.1',
48647
49218
  '@types/google.fonts': '1.0',
48648
- '@types/node': '22.16',
49219
+ '@types/node': '22.18',
48649
49220
  '@types/react': '18.2',
48650
49221
  '@types/react-dom': '18.2',
48651
49222
  '@types/yargs': '^17.0.33',
48652
- '@typescript-eslint/eslint-plugin': '^8.36.0',
48653
- '@typescript-eslint/parser': '^8.36.0',
49223
+ '@typescript-eslint/eslint-plugin': '^8.40.0',
49224
+ '@typescript-eslint/parser': '^8.40.0',
48654
49225
  chalk: '^4.1.2',
48655
49226
  eslint: '^8.57.1',
48656
49227
  'eslint-plugin-framer-studio': 'workspace:*',
@@ -48659,15 +49230,14 @@ var package_default = {
48659
49230
  'jest-diff': '^29.3.1',
48660
49231
  'jest-environment-jsdom': '^29.3.1',
48661
49232
  'jest-environment-jsdom-global': '^4.0.0',
48662
- 'jest-junit': '^15.0.0',
48663
49233
  react: '^18.2.0',
48664
49234
  'react-dom': '^18.2.0',
48665
49235
  semver: '^7.7.1',
48666
- typescript: '^5.8.3',
49236
+ typescript: '^5.9.2',
48667
49237
  yargs: '^17.7.2',
48668
49238
  },
48669
49239
  peerDependencies: {
48670
- 'framer-motion': '>=12.14.0',
49240
+ 'framer-motion': '12.20.2',
48671
49241
  react: '^18.2.0',
48672
49242
  'react-dom': '^18.2.0',
48673
49243
  },
@@ -48685,7 +49255,7 @@ MotionValue.prototype.addChild = function ({ transformer = (v) => v, }) {
48685
49255
  if (false) {
48686
49256
  MainLoop2.start();
48687
49257
  }
48688
- export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addAttrValue, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addStyleValue, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, attachSpring, attrEffect, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, Instance, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isSVGElement, isSVGSVGElement, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, propEffect, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, resize, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, springValue, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, svgEffect, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMetadata, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTracking, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
49258
+ export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addAttrValue, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addStyleValue, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, attachSpring, attrEffect, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cssCollector, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image3 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, Instance, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isSVGElement, isSVGSVGElement, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, propEffect, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, ResetOuterLinkContext, resize, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, springValue, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, svgEffect, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMetadata, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePageInView, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTracking, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
48689
49259
  //! Credit to Astro | MIT License
48690
49260
  /**
48691
49261
  * @license Emotion v11.0.0