motion 13.4.4 → 13.4.5

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.
@@ -1118,7 +1118,6 @@
1118
1118
  stiffness: 100,
1119
1119
  damping: 10,
1120
1120
  mass: 1.0,
1121
- velocity: 0.0,
1122
1121
  // Default duration/bounce-based options
1123
1122
  duration: 800, // in ms
1124
1123
  bounce: 0.3,
@@ -1153,7 +1152,12 @@
1153
1152
  * This is ported from the Framer implementation of duration-based spring resolution.
1154
1153
  */
1155
1154
  const safeMin = 0.001;
1156
- function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {
1155
+ /**
1156
+ * Assumes zero initial velocity and the default mass: time-defined springs
1157
+ * ignore inherited velocity and only resolve without valid physics. Returns
1158
+ * NaN physics when the root search doesn't converge.
1159
+ */
1160
+ function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, }) {
1157
1161
  let envelope;
1158
1162
  let derivative;
1159
1163
  exports.warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
@@ -1170,15 +1174,13 @@
1170
1174
  envelope = (undampedFreq) => {
1171
1175
  const exponentialDecay = undampedFreq * dampingRatio;
1172
1176
  const delta = exponentialDecay * duration;
1173
- const a = exponentialDecay - velocity;
1174
1177
  const b = calcAngularFreq(undampedFreq, dampingRatio);
1175
1178
  const c = Math.exp(-delta);
1176
- return safeMin - (a / b) * c;
1179
+ return safeMin - (exponentialDecay / b) * c;
1177
1180
  };
1178
1181
  derivative = (undampedFreq) => {
1179
1182
  const exponentialDecay = undampedFreq * dampingRatio;
1180
1183
  const delta = exponentialDecay * duration;
1181
- const d = delta * velocity + velocity;
1182
1184
  const e = dampingRatio *
1183
1185
  dampingRatio *
1184
1186
  undampedFreq *
@@ -1187,7 +1189,7 @@
1187
1189
  const f = Math.exp(-delta);
1188
1190
  const g = calcAngularFreq(undampedFreq * undampedFreq, dampingRatio);
1189
1191
  const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
1190
- return (factor * ((d - e) * f)) / g;
1192
+ return (factor * -e * f) / g;
1191
1193
  };
1192
1194
  }
1193
1195
  else {
@@ -1196,37 +1198,23 @@
1196
1198
  */
1197
1199
  envelope = (undampedFreq) => {
1198
1200
  const a = Math.exp(-undampedFreq * duration);
1199
- const b = (undampedFreq - velocity) * duration + 1;
1201
+ const b = undampedFreq * duration + 1;
1200
1202
  return -safeMin + a * b;
1201
1203
  };
1202
1204
  derivative = (undampedFreq) => {
1203
1205
  const a = Math.exp(-undampedFreq * duration);
1204
- const b = (velocity - undampedFreq) * (duration * duration);
1206
+ const b = -undampedFreq * (duration * duration);
1205
1207
  return a * b;
1206
1208
  };
1207
1209
  }
1208
1210
  const initialGuess = 5 / duration;
1209
1211
  const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
1210
- duration = secondsToMilliseconds(duration);
1211
- if (isNaN(undampedFreq)) {
1212
- return {
1213
- stiffness: springDefaults.stiffness,
1214
- damping: springDefaults.damping,
1215
- duration,
1216
- };
1217
- }
1218
- else {
1219
- const stiffness = undampedFreq * undampedFreq * mass;
1220
- return {
1221
- stiffness,
1222
- damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
1223
- duration,
1224
- };
1225
- }
1226
- }
1227
- const durationKeys = ["duration", "bounce"];
1228
- function isSpringType(options, keys) {
1229
- return keys.some((key) => options[key] !== undefined);
1212
+ const stiffness = undampedFreq * undampedFreq;
1213
+ return {
1214
+ stiffness,
1215
+ damping: dampingRatio * 2 * Math.sqrt(stiffness),
1216
+ duration: secondsToMilliseconds(duration),
1217
+ };
1230
1218
  }
1231
1219
  /**
1232
1220
  * Spring physics must be finite. stiffness and mass are also divisors so must
@@ -1258,7 +1246,7 @@
1258
1246
  const validStiffness = resolvePhysics(options.stiffness);
1259
1247
  const validDamping = resolvePhysics(options.damping, true);
1260
1248
  const validMass = resolvePhysics(options.mass);
1261
- let springOptions = {
1249
+ const springOptions = {
1262
1250
  ...options,
1263
1251
  stiffness: validStiffness ?? springDefaults.stiffness,
1264
1252
  damping: validDamping ?? springDefaults.damping,
@@ -1266,42 +1254,27 @@
1266
1254
  isResolvedFromDuration: false,
1267
1255
  // stiffness/damping/mass overrides duration/bounce
1268
1256
  isTimeDefined: (validStiffness ?? validDamping ?? validMass) === undefined &&
1269
- isSpringType(options, durationKeys),
1257
+ (options.duration !== undefined || options.bounce !== undefined),
1270
1258
  };
1271
1259
  if (springOptions.isTimeDefined) {
1272
- // Time-defined springs should ignore inherited velocity.
1273
- // Velocity from interrupted animations can cause findSpring()
1274
- // to compute wildly different spring parameters, leading to
1275
- // massive oscillation on small-range animations.
1276
- springOptions.velocity = 0;
1277
1260
  if (options.visualDuration) {
1278
- const visualDuration = options.visualDuration;
1279
- const root = (2 * Math.PI) / (visualDuration * 1.2);
1280
- const stiffness = root * root;
1281
- const damping = 2 *
1282
- clamp(0.05, 1, 1 - (options.bounce || 0)) *
1283
- Math.sqrt(stiffness);
1284
- springOptions = {
1285
- ...springOptions,
1286
- mass: springDefaults.mass,
1287
- stiffness,
1288
- damping,
1289
- };
1261
+ const root = (2 * Math.PI) / (options.visualDuration * 1.2);
1262
+ springOptions.stiffness = root * root;
1263
+ springOptions.damping =
1264
+ 2 *
1265
+ clamp(0.05, 1, 1 - (options.bounce || 0)) *
1266
+ Math.sqrt(springOptions.stiffness);
1290
1267
  }
1291
1268
  else {
1292
- const derived = findSpring(springOptions);
1293
- springOptions = {
1294
- ...springOptions,
1295
- ...derived,
1296
- mass: springDefaults.mass,
1297
- };
1269
+ Object.assign(springOptions, findSpring(springOptions));
1298
1270
  springOptions.isResolvedFromDuration = true;
1299
1271
  }
1300
1272
  /**
1301
- * Non-finite time options degenerate: a NaN bounce gives a NaN
1302
- * damping, an infinite visualDuration a 0 stiffness. Replace the two
1303
- * together, so the relationship duration resolution establishes
1304
- * between them is never left half-overwritten.
1273
+ * Time options can degenerate: a NaN bounce gives a NaN damping, an
1274
+ * infinite visualDuration a 0 stiffness, and findSpring NaN for both
1275
+ * when it doesn't converge. Replace the two together, so the
1276
+ * relationship duration resolution establishes between them is never
1277
+ * left half-overwritten.
1305
1278
  */
1306
1279
  if (!isValidPhysics(springOptions.stiffness) ||
1307
1280
  !isValidPhysics(springOptions.damping, true)) {
@@ -1326,10 +1299,13 @@
1326
1299
  * to reduce GC during animation.
1327
1300
  */
1328
1301
  const state = { done: false, value: origin };
1329
- const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, isTimeDefined, } = getSpringOptions({
1330
- ...options,
1331
- velocity: -millisecondsToSeconds(options.velocity || 0),
1332
- });
1302
+ const { stiffness, damping, mass, duration, isResolvedFromDuration, isTimeDefined, } = getSpringOptions({ ...options });
1303
+ /**
1304
+ * Time-defined springs ignore inherited velocity. Velocity from
1305
+ * interrupted animations causes massive oscillation on small-range
1306
+ * animations.
1307
+ */
1308
+ const inheritVelocity = (velocity) => isTimeDefined ? 0 : -millisecondsToSeconds(velocity);
1333
1309
  const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
1334
1310
  const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
1335
1311
  const decay = dampingRatio * undampedAngularFreq;
@@ -1343,7 +1319,7 @@
1343
1319
  const s = {
1344
1320
  target,
1345
1321
  delta: target - origin,
1346
- velocity: velocity || 0.0,
1322
+ velocity: inheritVelocity(options.velocity || 0) || 0,
1347
1323
  restSpeed: 0,
1348
1324
  restDelta: 0,
1349
1325
  };
@@ -1459,8 +1435,7 @@
1459
1435
  retarget: (keyframes, newVelocity) => {
1460
1436
  s.target = keyframes[keyframes.length - 1];
1461
1437
  s.delta = s.target - keyframes[0];
1462
- // Time-defined springs ignore inherited velocity, see getSpringOptions
1463
- s.velocity = isTimeDefined ? 0 : -millisecondsToSeconds(newVelocity);
1438
+ s.velocity = inheritVelocity(newVelocity);
1464
1439
  // Default thresholds depend on the scale of the new delta
1465
1440
  if (!(options.restSpeed && options.restDelta))
1466
1441
  setRestThresholds();
@@ -9963,7 +9938,6 @@
9963
9938
  */
9964
9939
  this.eventHandlers = new Map();
9965
9940
  this.hasTreeAnimated = false;
9966
- this.layoutVersion = 0;
9967
9941
  // Note: Currently only running on root node
9968
9942
  this.updateScheduled = false;
9969
9943
  this.scheduleUpdate = () => this.update();
@@ -10003,7 +9977,6 @@
10003
9977
  * Frame calculations
10004
9978
  */
10005
9979
  this.resolvedRelativeTargetAt = 0.0;
10006
- this.linkedParentVersion = 0;
10007
9980
  this.hasProjected = false;
10008
9981
  this.isVisible = true;
10009
9982
  this.animationProgress = 0;
@@ -10284,6 +10257,7 @@
10284
10257
  * get measured even when memoized (willUpdate skipped).
10285
10258
  */
10286
10259
  this.nodes.forEach(ensureDraggedNodesSnapshotted);
10260
+ this.nodes.forEach(syncRelativeLayout);
10287
10261
  /**
10288
10262
  * Write
10289
10263
  */
@@ -10381,7 +10355,6 @@
10381
10355
  }
10382
10356
  const prevLayout = this.layout;
10383
10357
  this.layout = this.measure(false);
10384
- this.layoutVersion++;
10385
10358
  if (!this.layoutCorrected)
10386
10359
  this.layoutCorrected = createBox();
10387
10360
  this.isLayoutDirty = false;
@@ -10601,11 +10574,6 @@
10601
10574
  return;
10602
10575
  this.resolvedRelativeTargetAt = frameData.timestamp;
10603
10576
  const relativeParent = this.getClosestProjectingParent();
10604
- if (relativeParent &&
10605
- this.linkedParentVersion !== relativeParent.layoutVersion &&
10606
- !relativeParent.options.layoutRoot) {
10607
- this.removeRelativeTarget();
10608
- }
10609
10577
  /**
10610
10578
  * If we don't have a targetDelta but do have a layout, we can attempt to resolve
10611
10579
  * a relativeParent. This will allow a component to perform scale correction
@@ -10708,7 +10676,6 @@
10708
10676
  }
10709
10677
  createRelativeTarget(relativeParent, layout, parentLayout) {
10710
10678
  this.relativeParent = relativeParent;
10711
- this.linkedParentVersion = relativeParent.layoutVersion;
10712
10679
  this.forceRelativeParentToResolveTarget();
10713
10680
  this.relativeTarget = createBox();
10714
10681
  this.relativeTargetOrigin = createBox();
@@ -11418,6 +11385,26 @@
11418
11385
  node.isLayoutDirty = true;
11419
11386
  }
11420
11387
  }
11388
+ /**
11389
+ * If a node's relative parent is about to be re-measured but the node isn't
11390
+ * (e.g. it's in another LayoutGroup), its relative target is out of date.
11391
+ * If it's layout animating, re-measure it too, so its relative target keeps
11392
+ * resolving against current layouts. Otherwise its layout is still valid
11393
+ * relative to its parent, so drop the relative target, and any targetDelta
11394
+ * left over from a finished animation while an ancestor still animates, to be
11395
+ * rebuilt from its layout.
11396
+ */
11397
+ function syncRelativeLayout(node) {
11398
+ if (node.relativeTarget && node.relativeParent?.isLayoutDirty) {
11399
+ if (node.currentAnimation) {
11400
+ node.isLayoutDirty = true;
11401
+ }
11402
+ else {
11403
+ node.targetDelta = undefined;
11404
+ node.removeRelativeTarget();
11405
+ }
11406
+ }
11407
+ }
11421
11408
  function resetTransformStyle(node) {
11422
11409
  const { visualElement } = node.options;
11423
11410
  if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {
package/dist/motion.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;function s(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,m=t=>t/1e3,g=(t,e)=>e?t*(1e3/e):0,y=new Set;function v(t,e,n){t||y.has(e)||(console.warn(s(e,n)),y.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=w(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:w(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),k=t=>1-Math.sin(Math.acos(t)),M=S(k),D=b(k),C=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:B,easeOut:R,circIn:k,circInOut:D,circOut:M,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=N.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new Set;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(n.add(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),f.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(g))};return{schedule:N.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(g)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<N.length;e++)a[N[e]].cancel(t)},state:s,steps:a}}const{schedule:U,cancel:W,state:z,steps:K}=$("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let Y;function G(){Y=void 0}const X={now:()=>(void 0===Y&&X.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(G)}},H=t=>Math.round(1e5*t)/1e5,q=t=>e=>"string"==typeof e&&e.startsWith(t),_=q("--"),Z=q("var(--"),J=t=>!!Z(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>i(0,1,t)},it={...et,default:1},st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rt=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),at=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},lt={...et,transform:t=>Math.round((t=>i(0,255,t))(t))},ct={test:rt("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+lt.transform(t)+", "+lt.transform(e)+", "+lt.transform(n)+", "+H(nt.transform(i))+")"};const ut={test:rt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ct.transform},ht=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),ft=ht("px"),mt=ht("vh"),gt=ht("vw"),yt=(()=>({...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}))(),vt={test:rt("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+pt.transform(H(e))+", "+pt.transform(H(n))+", "+H(nt.transform(i))+")"},xt={test:t=>ct.test(t)||ut.test(t)||vt.test(t),parse:t=>ct.test(t)?ct.parse(t):vt.test(t)?vt.parse(t):ut.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):vt.transform(t),getAnimatableNone:t=>{const e=xt.parse(t);return e.alpha=0,xt.transform(e)}},wt=new RegExp(st.source),Tt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const bt="number",St="color",At=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vt(t){const e=t.toString();return wt.test(e)||Tt.test(e)}function Pt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(At,t=>(xt.test(t)?(i.color.push(o),s.push(St),n.push(xt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(bt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Et({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===bt?H(i[o]):t===St?xt.transform(i[o]):i[o]}return s}}const kt=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:xt.test(n)?xt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(wt.test(t)||Tt.test(t))},parse:function(t){return Pt(t).values},createTransformer:function(t){return Et(Pt(t))},getAnimatableNone:function(t){const e=Pt(t);return Et(e)(e.values.map((t,n)=>kt(t,e.split[n])))}};function Dt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ct({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Dt(a,i,t+1/3),o=Dt(a,i,t),r=Dt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Rt(t,e){return n=>n>0?e:t}const Bt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},jt=[ut,ct,vt];function Ot(e){const n=(i=e,jt.find(t=>t.test(i)));var i;if(!n)return t.warning(!1,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let s=n.parse(e);return n===vt&&(s=Ct(s)),s}const Ft=(t,e)=>{const n=Ot(t),i=Ot(e);if(!n||!i)return Rt(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=Bt(n.alpha,i.alpha,t),ct.transform(s))},It=new Set(["none","hidden"]);function Nt(t,e){return It.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function $t(t,e){return n=>Bt(t,e,n)}function Ut(t){return"number"==typeof t?$t:"string"==typeof t?J(t)?Rt:xt.test(t)?Ft:Kt:Array.isArray(t)?Wt:"object"==typeof t?xt.test(t)?Ft:zt:Rt}function Wt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ut(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function zt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ut(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Kt=(e,n)=>{const i=Mt.createTransformer(n),s=Pt(e),o=Pt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?It.has(e)&&!o.values.length||It.has(n)&&!s.values.length?Nt(e,n):h(Wt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Rt(e,n))},Yt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Gt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Bt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Yt.exec(t);if(!n)return;const i=Yt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>H(Bt(o,r,t))+s}(t,e);if(n)return n}return Ut(t)(t,e)}const Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>U.update(e,t),stop:()=>W(e),now:()=>z.isProcessing?z.timestamp:X.now()}},Ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function _t(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(_t(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:m(s)}}const Jt=100,Qt=10,te=1,ee=0,ne=800,ie=.3,se=.3,oe={granular:.01,default:2},re={granular:.005,default:.5},ae=.01,le=10,ce=.05,ue=1;function he(t,e){return t*Math.sqrt(1-e*e)}const de=.001;const pe=["duration","bounce"];function fe(t,e){return e.some(e=>void 0!==t[e])}const me=(t,e)=>(e?t>=0:t>0)&&t<1/0;function ge(t,e){if(me(t,e))return t}function ye(e){const n=ge(e.stiffness),s=ge(e.damping,!0),o=ge(e.mass);let r={...e,stiffness:n??Jt,damping:s??Qt,mass:o??te,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??s??o)&&fe(e,pe)};if(r.isTimeDefined){if(r.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(1.2*t),s=n*n,o=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(s);r={...r,mass:te,stiffness:s,damping:o}}else{const e=function({duration:e=ne,bounce:n=ie,velocity:s=ee,mass:o=te}){let r,a;t.warning(e<=f(le),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ce,ue,l),e=i(ae,le,m(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=he(t,l),a=Math.exp(-i);return de-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=l*l*t*t*e,a=Math.exp(-n),c=he(t*t,l);return(-r(t)+de>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=f(e),isNaN(c))return{stiffness:Jt,damping:Qt,duration:e};{const t=c*c*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}(r);r={...r,...e,mass:te},r.isResolvedFromDuration=!0}me(r.stiffness)&&me(r.damping,!0)||(r.stiffness=Jt,r.damping=Qt)}return r}function ve(t=se,e=ie){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,velocity:u,isResolvedFromDuration:h,isTimeDefined:d}=ye({...n,velocity:-m(n.velocity||0)}),p=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=p*g,v={target:s,delta:s-i,velocity:u||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?oe.granular:oe.default),v.restDelta=n.restDelta||(t?re.granular:re.default)};let w,T,b;if(x(),p<1){const t=he(g,p),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===p){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(p*p-1);w=e=>{const n=Math.exp(-y*e),i=Math.min(t*e,300);return v.target-n*((v.velocity+y*v.delta)*Math.sinh(i)+t*v.delta*Math.cosh(i))/t};const e={P:0,sinh:0,cosh:0};b=()=>{e.P=(v.velocity+y*v.delta)/t,e.sinh=y*e.P-v.delta*t,e.cosh=y*v.delta-e.P*t},T=n=>{const i=Math.exp(-y*n),s=Math.min(t*n,300);return i*(e.sinh*Math.sinh(s)+e.cosh*Math.cosh(s))}}b();const S=h&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d?0:-m(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>f(T(t)),next:t=>{const e=w(t);if(h)o.done=t>=c;else{const n=f(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}function xe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===r?m:r(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:g+e};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=ve({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function we(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||Gt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=h(t,o)}i.push(o)}return i}(n,r,a),f=p.length,m=t=>{if(c&&t<e[0])return n[0];let i=0;if(f>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=d(e[i],e[i+1],t);return p[i](s)};return s?t=>m(i(e[0],e[l-1],t)):m}function Te(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Bt(n,1,s))}}function be(t){const e=[0];return Te(e,t.length-1),e}function Se(t,e){return t.map(t=>t*e)}function Ae(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=L(s)?s.map(I):I(s)||B,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,s]=e,l=n===s?void 0:(o.mix||Gt)(n,s);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):s,a.done=e>=t,a)}}const l=we(Se(n&&n.length===e.length?n:be(e),t),e,{ease:Array.isArray(r)?r:Ae(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}ve.applyToOptions=t=>{const e=Zt(t,100,ve);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};function Pe(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const Ee=t=>null!==t;function ke(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ee),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Me={decay:xe,inertia:xe,tween:Ve,keyframes:Ve,spring:ve};function De(t){"string"==typeof t.type&&(t.type=Me[t.type])}function Ce(t,e){return{kind:t,animation:e,timestamp:X.now(),frameTimestamp:z.timestamp,frameIsProcessing:z.isProcessing}}function Re(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Ce("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Be{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Le=t=>t/100;class je extends Be{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Re(this,this.options)}initAnimation(){const{options:t}=this;De(t);const{type:e=Ve,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ve;a!==Ve&&"number"!=typeof r[0]&&(this.mixKeyframes=h(Le,Gt(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,w=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),w=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=T.next(w),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&f!==xe&&(x.value=ke(u,this.options,g,this.speed)),m&&m(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(X.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Oe=new Set(["brightness","contrast","saturate","opacity"]);function Fe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=Oe.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ie=/\b([a-z-]*)\(.*?\)/gu,Ne={...Mt,getAnimatableNone:t=>{const e=t.match(Ie);return e?e.map(Fe).join(" "):t}},$e={...Mt,getAnimatableNone:t=>{const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ue={...et,transform:Math.round},We={rotate:dt,pathRotation:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:dt,skewX:dt,skewY:dt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:nt,originX:yt,originY:yt,originZ:ft},ze={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,inset:ft,insetBlock:ft,insetBlockStart:ft,insetBlockEnd:ft,insetInline:ft,insetInlineStart:ft,insetInlineEnd:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,paddingBlock:ft,paddingBlockStart:ft,paddingBlockEnd:ft,paddingInline:ft,paddingInlineStart:ft,paddingInlineEnd:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,marginBlock:ft,marginBlockStart:ft,marginBlockEnd:ft,marginInline:ft,marginInlineStart:ft,marginInlineEnd:ft,fontSize:ft,backgroundPositionX:ft,backgroundPositionY:ft,...We,zIndex:Ue,fillOpacity:nt,strokeOpacity:nt,numOctaves:Ue},Ke={...ze,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Ne,WebkitFilter:Ne,mask:$e,WebkitMask:$e},Ye=t=>Ke[t],Ge=new Set([Ne,$e]);function Xe(t,e){let n=Ye(t);return Ge.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function He(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const qe=t=>180*t/Math.PI,_e=t=>{const e=qe(Math.atan2(t[1],t[0]));return Je(e)},Ze={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:_e,rotateZ:_e,skewX:t=>qe(Math.atan(t[1])),skewY:t=>qe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Je=t=>((t%=360)<0&&(t+=360),t),Qe=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),tn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),en={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qe,scaleY:tn,scale:t=>(Qe(t)+tn(t))/2,rotateX:t=>Je(qe(Math.atan2(t[6],t[5]))),rotateY:t=>Je(qe(Math.atan2(-t[2],t[0]))),rotateZ:_e,rotate:_e,skewX:t=>qe(Math.atan(t[4])),skewY:t=>qe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function nn(t){return t.includes("scale")?1:0}function sn(t,e){if(!t||"none"===t)return nn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=en,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Ze,s=e}if(!s)return nn(e);const o=i[e],r=s[1].split(",").map(rn);return"function"==typeof o?o(r):r[o]}const on=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return sn(n,e)};function rn(t){return parseFloat(t.trim())}const an=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ln=(()=>new Set([...an,"pathRotation"]))(),cn=t=>t===et||t===ft,un=new Set(["x","y","z"]),hn=an.filter(t=>!un.has(t));const dn=new Set(["bottom","right"]);function pn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const fn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>pn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>pn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:({transform:t})=>sn(t,"x"),y:({transform:t})=>sn(t,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const mn=new Set;let gn=!1,yn=!1,vn=!1;function xn(){if(yn){const t=[],e=new Set,n=new Set;mn.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),dn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return hn.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}yn=!1,gn=!1,mn.forEach(t=>t.complete(vn)),mn.clear()}function wn(){mn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yn=!0)})}function Tn(){vn=!0,wn(),xn(),vn=!1}class bn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(mn.add(this),gn||(gn=!0,U.read(wn),U.resolveKeyframes(xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(r(t)||l(t))return parseFloat(t);if(!Mt.test(t)&&Mt.test(n))return Xe(e,n)}return t??void 0}(n.readValue(e,o),e,o);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}He(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),mn.delete(this)}cancel(){"scheduled"===this.state&&(mn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Sn=t=>t.startsWith("--");function An(t,e,n){Sn(e)?t.style.setProperty(e,n):t.style[e]=n}const Vn={};function Pn(t,e){const n=c(t);return()=>Vn[e]??n()}const En=Pn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),kn=Pn(()=>void 0!==window.ViewTimeline,"viewTimeline"),Mn=Pn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Dn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Cn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Rn(t,e){return t?"function"==typeof t?Mn()?Ht(t,e):"ease-out":O(t)?Dn(t):Array.isArray(t)?t.map(t=>Rn(t,e)||Cn.easeOut):Cn[t]:void 0}function Bn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Rn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function Ln(t){return"function"==typeof t&&"applyToOptions"in t}function jn({type:t,...e}){return Ln(t)&&Mn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class On extends Be{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=jn(e);this.animation=Bn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=ke(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),An(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()},Re(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&En()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const Fn={anticipate:E,backInOut:P,circInOut:D};function In(t){"string"==typeof t.ease&&t.ease in Fn&&(t.ease=Fn[t.ease])}class Nn extends On{constructor(t){In(t),De(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new je({...r,autoplay:!1}),l=Math.max(10,X.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&An(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function Un(t){t.duration=0,t.type="keyframes"}const Wn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),zn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Kn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Yn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Wn.has(n)&&!Kn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Yn()&&(Wn.has(n)||Kn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&zn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Xn extends Be{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=X.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||bn;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=X.now();let d=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=$n(o,n),l=$n(r,n);return a&&l?function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||Ln(i))&&s:(a!==l&&t.warning(!1,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!1)})(e,r,a,l)||(d=!1,!o.instantAnimations&&c||h?.(ke(e,i,n)),e[0]=e[e.length-1],Un(i),i.repeat=0);const p=s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=i;i.startTime??(i.startTime=p),i.finalKeyframe=n,i.keyframes=e,i.onComplete=()=>{f?.(),this.notifyFinished()};let m;if(d&&!u&&Gn(i)){i.element=i.motionValue?.owner?.current;try{m=new Nn(i)}catch{m=new je(i)}}else m=new je(i);this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Tn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Hn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return qn(this.animations,"duration")}get iterationDuration(){return qn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function qn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class _n extends Hn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Zn extends On{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Re(this,{})}}const Jn=new WeakMap,Qn=(t,e="")=>`${t}:${e}`;function ti(t){let e=Jn.get(t);return e||(e=new Map,Jn.set(t,e)),e}function ei(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const ni={current:void 0};class ii{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=X.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=X.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new p)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new p,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){U.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ni.current&&ni.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=X.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function si(t,e){return new ii(t,e)}function oi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function ri(t,e){const n=t?.[e]??t?.default??t;return n!==t?oi(n,t):n}const ai={type:"spring",stiffness:500,damping:25,restSpeed:10},li={type:"keyframes",duration:.8},ci={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ui=(t,{keyframes:e})=>e.length>2?li:ln.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ai:ci,hi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function di(t){for(const e in t)if(!hi.has(e))return!0;return!1}const pi=(t,e,n,i={},s,r)=>a=>{const l=ri(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};di(l)||Object.assign(h,ui(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Un(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Un(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=ke(h.keyframes,l);if(void 0!==t)return void U.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new je(h):new Xn(h)};function fi(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function mi(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function gi(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const yi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vi(t){const e=yi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function xi(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=vi(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return J(o)?xi(o,n,i+1):o}function wi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ti(t,e,n,i){if("function"==typeof e){const[s,o]=wi(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=wi(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function bi(t,e,n){const i=t.getProps();return Ti(i,e,void 0!==n?n:i.custom,t)}const Si=new Set(["width","height","top","left","right","bottom",...an]),Ai=t=>Array.isArray(t);function Vi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,si(n))}function Pi(t){return Ai(t)?t[t.length-1]||0:t}function Ei(t,e){const n=bi(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Vi(t,e,Pi(o[e]))}}const ki=t=>Boolean(t&&t.getVelocity);function Mi(t){return Boolean(ki(t)&&t.add)}function Di(t,e){const n=t.getValue("willChange");if(Mi(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Ci(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ri="framerAppearId",Bi="data-"+Ci(Ri);function Li(t){return t.props[Bi]}const ji="undefined"!=typeof window;function Oi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Fi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?oi(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&Oi(d,e))continue;const r={delay:n,...ri(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){U.update(()=>i.set(s));continue}let p=!1;if(ji&&window.MotionHandoffAnimation){const n=Li(t);if(n){const t=window.MotionHandoffAnimation(n,e,U);null!==t&&(r.startTime=t,p=!0)}}Di(t,e);const f=c??t.shouldReduceMotion;i.start(pi(e,i,s,f&&Si.has(e)?{type:!1}:r,t,p));const m=i.animation;m&&h.push(m)}if(r){const e=()=>U.update(()=>{r&&Ei(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Ii(t,e,n={}){const i=bi(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Fi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Ii(l,e,{...r,delay:n+("function"==typeof i?0:i)+ei(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Ni(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Ii(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Ii(t,e,n);else{const s="function"==typeof e?bi(t,e,n.custom):e;i=Promise.all(Fi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const $i=t=>e=>e.test(t),Ui=[et,ft,pt,dt,gt,mt,{test:t=>"auto"===t,parse:t=>t}],Wi=t=>Ui.find($i(t));function zi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Ki=new Set(["auto","none","0"]);class Yi extends bn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),J(i))){const s=xi(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Si.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=Wi(i),r=Wi(s);if(tt(i)!==tt(s)&&fn[n])this.needsMeasurement=!0;else if(o!==r)if(cn(o)&&cn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else fn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||zi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ki.has(e)&&Vt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=Xe(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return fn[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Gi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Xi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...Gi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Hi(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Xi.has(e)&&(t[n]=t[n]+"px")}const qi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),_i=[];function Zi(e){t.invariant("function"==typeof e.test&&"function"==typeof e.read,"Effects passed to animate.addEffect() need test() and read().","effect-missing-test"),Ji(e),_i.unshift(e)}function Ji(t){n(_i,t)}function Qi(t){return _i.find(e=>e.test(t))}function ts(t,e,n={},i){const s=[],{velocity:o}=n,r=n.reduceMotion??i?.shouldReduceMotion;for(const a in e){if("transition"===a||"transitionEnd"===a)continue;const l=e[a];if(void 0===l)continue;const c=t(a),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(pi(a,c,l,r&&Si.has(a)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):U.update(()=>c.set(l))}const{transitionEnd:a}=e;if(a){const e=()=>U.update(()=>{for(const e in a)t(e).set(a[e])});s.length?Promise.all(s).then(e):e()}return s}function es(e,n,i,s,o){return ts(s=>{let r=e.get(n,s);if(!r){let a;if(!o){const o=i[s];a=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(o)??e.read(n,s,o),t.invariant(void 0!==a,`"${s}" can't be read from the animated subject. Provide [from, to] keyframes.`,"effect-unreadable-value")}r=si(a,{owner:o}),e(n,{[s]:r})}return r},i,s,o)}function ns(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function is(t){return a(t)&&"ownerSVGElement"in t}const ss=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function os(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function rs(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=os(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class as{constructor(t=U.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function ls(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new as(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const cs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},us={};const hs=new Set(["originX","originY","originZ"]),ds=(t,e)=>ss(t.get(e)?.get(),ze[e]),ps=(t,e,n,i)=>{let s,o;if(ln.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>an.indexOf(t)-an.indexOf(e)))}e.get("transform")||(ns(t)||e.get("transformBox")||ps(t,e,"transformBox",new ii("fill-box")),e.set("transform",new ii("none"),()=>{t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].get();void 0!==o&&(("number"==typeof o?o:parseFloat(o))!==(s.startsWith("scale")?1:0)&&(e+=(e&&" ")+(us[s]||(us[s]=(cs[s]||s)+"("))+ss(o,We[s])+")"))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+"rotate("+ss(s,We.pathRotation)+")"),e||"none"}(e)})),o=e.get("transform")}else hs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ii(""),()=>{const n=ds(e,"originX")??"50%",i=ds(e,"originY")??"50%",s=ds(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Sn(n)?()=>{t.style.setProperty(n,i.get())}:()=>{t.style[n]=ss(i.get(),ze[n])};return e.set(n,i,s,o)},fs=(t,e)=>{if(ln.has(e))return on(t,e);const n=getComputedStyle(t),i=Sn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},ms=ls(ps,{test:t=>ns(t)||is(t),read:fs}),gs=rs(ms),ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vs=an.length;function xs(t,e,n){let i="",s=!0;for(let o=0;o<vs;o++){const r=an[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=ss(a,ze[r]);if(!l){s=!1;i+=`${ys[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${ss(o,ze.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function ws(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ln.has(t))r=!0;else if(_(t))s[t]=n;else{const e=ss(n,ze[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=xs(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Ts={offset:"stroke-dashoffset",array:"stroke-dasharray"},bs={offset:"strokeDashoffset",array:"strokeDasharray"};function Ss(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ts:bs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const As=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Vs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(ws(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of As)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Ss(h,s,o,r,!1)}const Ps=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Ci(s));const r=ze[n]||ze[s],a=o?()=>{t[s]=ss(i.get(),ze[n])}:()=>{const e=ss(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Es=rs(ls(Ps));const ks=(t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return U.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ii("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ps(t,e,n,i,Rs(n));return(Sn(n)||n in t.style?ps:Ps)(t,e,n,i)},Ms=(t,e)=>ln.has(e)?ze[e]?.default||0:Sn(e)||As.includes(e)?fs(t,e):(e=Rs(e),t.getAttribute(Ci(e))??t.getAttribute(e)??void 0),Ds=ls(ks,{test:is,read:Ms}),Cs=rs(Ds);function Rs(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Bs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ls(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function js(t){return void 0===t||1===t}function Os({scale:t,scaleX:e,scaleY:n}){return!js(t)||!js(e)||!js(n)}function Fs(t){return Os(t)||Is(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Is(t){return Ns(t.x)||Ns(t.y)}function Ns(t){return t&&"0%"!==t}function $s(t,e,n){return n+e*(t-n)}function Us(t,e,n,i,s){return void 0!==s&&(t=$s(t,s,i)),$s(t,n,i)+e}function Ws(t,e=0,n=1,i,s){t.min=Us(t.min,e,n,i,s),t.max=Us(t.max,e,n,i,s)}function zs(t,{x:e,y:n}){Ws(t.x,e.translate,e.scale,e.originPoint),Ws(t.y,n.translate,n.scale,n.originPoint)}const Ks=.999999999999,Ys=1.0000000000001;function Gs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Xs(t.x,-o.scroll.offset.x),Xs(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,zs(t,r)),i&&Fs(o.latestValues)&&_s(t,o.latestValues,o.layout?.layoutBox))}e.x<Ys&&e.x>Ks&&(e.x=1),e.y<Ys&&e.y>Ks&&(e.y=1)}function Xs(t,e){t.min+=e,t.max+=e}function Hs(t,e,n,i,s=.5){Ws(t,e,n,Bt(t.min,t.max,s),i)}function qs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function _s(t,e,n){const i=n??t;Hs(t.x,qs(e.x,i.x),e.scaleX,e.scale,e.originX),Hs(t.y,qs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Zs(t,e){return Bs(Ls(t.getBoundingClientRect(),e))}const Js={},Qs=t=>is(t)?Ds:ms;class to{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=Yi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return Zs(this.current)}getProps(){return Js}}function eo(t,e,n,i){if(i)return ts(t=>i.getValue(t,null),e,n,i);const s=Qs(t);return es(s,t,e,n,new to(s,t))}function no(t,e){const n=Qs(t).state(t);if(!n)return;const{transformKeys:i}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&i?.length||e.addValue(n,t)})}const io=ls((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>a(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:so,cancel:oo}=$(queueMicrotask,!1),ro={x:!1,y:!1};function ao(){return ro.x||ro.y}function lo(t,e){const n=os(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const co=(t,e)=>!!e&&(t===e||co(t,e.parentElement)),uo=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ho=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function po(t){return ho.has(t.tagName)||!0===t.isContentEditable}const fo=new Set(["INPUT","SELECT","TEXTAREA"]);const mo=new WeakSet;function go(t){return e=>{"Enter"===e.key&&t(e)}}function yo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function vo(t){return uo(t)&&!ao()}const xo=new WeakSet;function wo(t,e){const n=window.getComputedStyle(t);return Sn(e)?n.getPropertyValue(e):n[e]}const To=new WeakMap;let bo;const So=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:is(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ao=So("inline","width","offsetWidth"),Vo=So("block","height","offsetHeight");function Po({target:t,borderBoxSize:e}){To.get(t)?.forEach(n=>{n(t,{get width(){return Ao(t,e)},get height(){return Vo(t,e)}})})}function Eo(t){t.forEach(Po)}function ko(t,e){bo||"undefined"!=typeof ResizeObserver&&(bo=new ResizeObserver(Eo));const n=os(t);return n.forEach(t=>{let n=To.get(t);n||(n=new Set,To.set(t,n)),n.add(e),bo?.observe(t)}),()=>{n.forEach(t=>{const n=To.get(t);n?.delete(e),n?.size||bo?.unobserve(t)})}}const Mo=new Set;let Do;function Co(t){return Mo.add(t),Do||(Do=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Mo.forEach(e=>e(t))},window.addEventListener("resize",Do)),()=>{Mo.delete(t),Mo.size||"function"!=typeof Do||(window.removeEventListener("resize",Do),Do=void 0)}}function Ro(t,e){return"function"==typeof t?Co(t):ko(t,e)}function Bo(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return U.preUpdate(i,!0),()=>W(i)}const Lo={value:null,addProjectionMetrics:null};function jo(t){return is(t)&&"svg"===t.tagName}function Oo(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Fo(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=we(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Io=new Set,No=({timestamp:t})=>{Io.forEach(e=>e.tick(t))};class $o extends Be{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,De(t),this.factory=t.type||Ve,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Io.size||U.update(No,!0),Io.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e,r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():X.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Io.delete(this),Io.size||W(No))}}function Uo(t,e){const n=si(ki(t)?t.get():t);return Wo(n,t,e),n}function Wo(t,e,n={}){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Ko(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Ko(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new $o({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),ki(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump(zo(e,r),!1)):t.set(zo(e,r))}),o=t.on("destroy",s);return()=>{s(),o()}}return c}function zo(t,e){return e?t+e:t}function Ko(t){return"number"==typeof t?t:parseFloat(t)}function Yo(t){const e=[];ni.current=e;const n=t();ni.current=void 0;const i=si(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>U.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),W(i)})}(e,i,t),i}const Go=[...Ui,xt,Mt];let Xo=0;const Ho=()=>"motion-view-"+Xo++;function qo(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function _o(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Zo(t,e,n,i,s,o=[],r,a=[],l){const c=os(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Ho();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),qo(t,s,o),_o(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Ho(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),qo(t,s,o),_o(t,d,r,a,l),d})}function Jo(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let Qo={},tr=null;const er=(t,e)=>{Qo[t]=e},nr=()=>{tr||(tr=document.createElement("style"),tr.id="motion-view");let t="";for(const e in Qo){const n=Qo[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}tr.textContent=t,document.head.appendChild(tr),Qo={}},ir=()=>{tr&&tr.parentElement&&tr.parentElement.removeChild(tr)};function sr(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function or(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const rr=["layout","enter","exit","new","old"],ar=t=>t.split(" ").every(t=>0===parseFloat(t)),lr={group:["layout"],new:["new","enter"],old:["old","exit"]},cr={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function ur(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new Hn([])))();const c=new Map,u=[],h=[],d=[],p=new Set,m=new Map,g=new Set,y=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),f="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,os(n)),g=Zo(n,c,u,void 0,l,h,f,d,p),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=Zo(o.get(n),c,u,w.get(n),l,h,f,d,p)}else g=Zo(n,c,u,void 0,l,h,f,d,p);else g=[n];const v=s.get(n);g.forEach((n,i)=>{const s=m.get(n);m.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&y.set(n,v);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=hr(ri(l,n),ri(function(t,e){for(const n of lr[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{const[e,n]=S(t,"group"),i=A(m.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=f(i.duration));const{delay:s=0,duration:o,ease:r}=jn(i);return{delay:f(s),duration:o,ease:r}},P=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of Gi)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),k=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},M=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||er(":root",{"view-transition-name":"none"}),er("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{er(`::view-transition-group(${t})`,{overflow:"clip"}),er(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{er(`::view-transition-group-children(${t})`,{overflow:"clip"})}),nr()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),ir()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(y.get(t)??k(t))&&g.add(t)})(),M()};let R;try{b("old"),E("old"),M(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=or(),n=[],i=new Set,s=new Set;m.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of rr){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Jo(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[m,g]of Object.entries(d)){if(null==g)continue;if("x"===m||"y"===m){v(!1,`animateView() animates view-transition layers with CSS properties; the "${m}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[m])continue;if("old"===o&&a&&null!=t.exit?.keyframes[m])continue;const d=hr(ri(l,m),ri(p,m));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[m]:void 0,n="opacity"===m||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?cr[c]?.[m]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=f(d.duration)),d.delay&&(d.delay=f(d.delay)),n.push(new On({...d,element:document.documentElement,name:m,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===m&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=sr(o);if(!r)continue;const a=m.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new Zn(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:Rn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=f(i.duration)),i=jn(i),h={delay:f(i.delay??0),duration:u&&void 0!==s?f(s):i.duration,easing:u?"linear":Rn(i.ease,i.duration)}}e.updateTiming(h),n.push(new Zn(t))}P.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of Gi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";ar(a)&&ar(l)||n.push(new On({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new Hn(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new Hn([])),e))})}function hr(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let dr=[],pr=null;function fr(){pr=null;const[t]=dr;var e;t&&(n(dr,e=t),pr=e,ur(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(fr))}function mr(){for(let t=dr.length-1;t>=0;t--){const e=dr[t],{interrupt:n}=e.options;if("immediate"===n){const n=dr.slice(0,t+1).map(t=>t.update),i=dr.slice(t+1);e.update=()=>{n.forEach(t=>t())},dr=[e,...i];break}}pr&&"immediate"!==dr[0]?.options.interrupt||fr()}class gr{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,dr.push(n),so.render(mr)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const yr=()=>({translate:0,scale:1,origin:0,originPoint:0}),vr=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),xr=()=>({min:0,max:0}),wr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Tr=new WeakMap;function br(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Sr(t){return"string"==typeof t||Array.isArray(t)}const Ar=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vr=["initial",...Ar];function Pr(t){if(br(t.animate))return!0;for(let e=0;e<Vr.length;e++)if(Sr(t[Vr[e]]))return!0;return!1}function Er(t){return Boolean(Pr(t)||t.variants)}function kr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ki(s))t.addValue(i,s);else if(ki(o))t.addValue(i,si(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,si(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Mr={current:null},Dr={current:!1},Cr="undefined"!=typeof window;function Rr(){if(Dr.current=!0,Cr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mr.current=t.matches;t.addEventListener("change",e),e()}else Mr.current=!1}const Br=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Lr={};class jr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=X.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,U.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=Pr(e),this.isVariantNode=Er(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&ki(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Tr.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Dr.current||Rr(),this.shouldReduceMotion=Mr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),W(this.notifyUpdate),W(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Wn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new On({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=ln.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Lr){const e=Lr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Br.length;e++){const n=Br[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=kr(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=si(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):"number"!=typeof n&&!Mt.test(n)&&Mt.test(e)&&(n=Xe(t,e)),this.setBaseTarget(t,ki(n)?n.get():n)),ki(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Ti(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||ki(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){so.render(this.render)}}class Or extends jr{constructor(){super(...arguments),this.KeyframeResolver=Yi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ki(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Fr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function Ir(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Nr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${Ir(t,e.target.x)}% ${Ir(t,e.target.y)}%`}},$r={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Mt.parse(t);if(s.length>5)return i;const o=Mt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Bt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Ur={borderRadius:{...Nr,applyTo:[...Gi]},borderTopLeftRadius:Nr,borderTopRightRadius:Nr,borderBottomLeftRadius:Nr,borderBottomRightRadius:Nr,boxShadow:$r};function Wr(t,{layout:e,layoutId:n}){return ln.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ur[t]||"opacity"===t)}function zr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ki(i[e])||s&&ki(s[e])||Wr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Kr extends Or{constructor(){super(...arguments),this.type="html",this.renderInstance=Fr}mount(e){t.invariant(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(t,e){if(ln.has(e))return this.projection?.isProjecting?nn(e):on(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(_(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Zs(t,e)}build(t,e,n){ws(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return zr(t,e,n)}}const Yr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Gr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Xr(t,e,n,i){Fr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Yr.has(n)?n:Ci(n),e.attrs[n])}function Hr(t,e,n){const i=zr(t,e,n);for(const n in t)if(ki(t[n])||ki(e[n])){i[-1!==an.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const qr=Vr.length;function _r(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&_r(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<qr;n++){const i=Vr[n],s=t.props[i];(Sr(s)||!1===s)&&(e[i]=s)}return e}function Zr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Jr=[...Ar].reverse(),Qr=Ar.length;function ta(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Zr(e,t)}function ea(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function na(){return{animate:ea(!0),whileInView:ea(),whileHover:ea(),whileTap:ea(),whileDrag:ea(),whileFocus:ea(),exit:ea()}}function ia(t,e){t.min=e.min,t.max=e.max}function sa(t,e){ia(t.x,e.x),ia(t.y,e.y)}function oa(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ra(t){return t.max-t.min}function aa(t,e,n){return Math.abs(t-e)<=n}function la(t,e,n,i=.5){t.origin=i,t.originPoint=Bt(e.min,e.max,t.origin),t.scale=ra(n)/ra(e),t.translate=Bt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function ca(t,e,n,i){la(t.x,e.x,n.x,i?i.originX:void 0),la(t.y,e.y,n.y,i?i.originY:void 0)}function ua(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+ra(e)}function ha(t,e,n,i){ua(t.x,e.x,n.x,i?.x),ua(t.y,e.y,n.y,i?.y)}function da(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+ra(e)}function pa(t,e,n,i){da(t.x,e.x,n.x,i?.x),da(t.y,e.y,n.y,i?.y)}function fa(t,e,n,i,s){return t=$s(t-=e,1/n,i),void 0!==s&&(t=$s(t,1/s,i)),t}function ma(t,e=0,n=1,i=.5,s,o=t,r=t){if(pt.test(e)){e=parseFloat(e);e=Bt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Bt(o.min,o.max,i);t===o&&(a-=e),t.min=fa(t.min,e,n,a,s),t.max=fa(t.max,e,n,a,s)}function ga(t,e,[n,i,s],o,r){ma(t,e[n],e[i],e[s],e.scale,o,r)}const ya=["x","scaleX","originX"],va=["y","scaleY","originY"];function xa(t,e,n,i){ga(t.x,e,ya,n?n.x:void 0,i?i.x:void 0),ga(t.y,e,va,n?n.y:void 0,i?i.y:void 0)}function wa(t){return 0===t.translate&&1===t.scale}function Ta(t){return wa(t.x)&&wa(t.y)}function ba(t,e){return t.min===e.min&&t.max===e.max}function Sa(t,e){return ba(t.x,e.x)&&ba(t.y,e.y)}function Aa(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Va(t,e){return Aa(t.x,e.x)&&Aa(t.y,e.y)}function Pa(t){return ra(t.x)/ra(t.y)}function Ea(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ka(t){return[t("x"),t("y")]}function Ma(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Da=Gi.length,Ca=t=>"string"==typeof t?parseFloat(t):t,Ra=t=>"number"==typeof t||ft.test(t);function Ba(t,e,n,i,s,o){s?(t.opacity=Bt(0,n.opacity??1,ja(i)),t.opacityExit=Bt(e.opacity??1,0,Oa(i))):o&&(t.opacity=Bt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Da;s++){const o=Gi[s];let r=La(e,o),a=La(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ra(r)===Ra(a)?(t[o]=Math.max(Bt(Ca(r),Ca(a),i),0),(pt.test(a)||pt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Bt(e.rotate||0,n.rotate||0,i))}function La(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ja=Fa(0,.5,M),Oa=Fa(.5,.95,u);function Fa(t,e,n){return i=>i<t?0:i>e?1:n(d(t,e,i))}function Ia(t,e,n){const i=ki(t)?t:si(t);return i.start(pi("",i,e,n)),i.animation}function Na(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const $a=(t,e)=>t.depth-e.depth;class Ua{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($a),this.isDirty=!1,this.children.forEach(t)}}function Wa(t,e){const n=X.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(W(i),t(o-e))};return U.setup(i,!0),()=>W(i)}function za(t,e){return Wa(t,f(e))}function Ka(t){return ki(t)?t.get():t}class Ya{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ga={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ha=["","X","Y","Z"];let qa=0;function _a(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Za(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Li(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Za(i)}function Ja({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=qa++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Lo.value&&(Xa.nodes=Xa.calculatedTargetDeltas=Xa.calculatedProjections=0),this.nodes.forEach(el),this.nodes.forEach(ul),this.nodes.forEach(hl),this.nodes.forEach(nl),Lo.addProjectionMetrics&&Lo.addProjectionMetrics(Xa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ua)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=is(e)&&!jo(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;U.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Wa(s,250),Ga.hasAnimatedSinceResize&&(Ga.hasAnimatedSinceResize=!1,this.nodes.forEach(cl)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||yl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Va(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ri(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||cl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),W(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dl),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Za(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(ol),void this.nodes.forEach(sl)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(rl);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(al),this.nodes.forEach(ll),this.nodes.forEach(Qa),this.nodes.forEach(tl)):this.nodes.forEach(rl),this.clearAllSnapshots();const t=X.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,so.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(il),this.sharedNodes.forEach(pl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ra(this.snapshot.measuredBox.x)||ra(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Ta(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Fs(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),wl((i=n).x),wl(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bl))){const{scroll:t}=this.root;t&&(Xs(e.x,t.offset.x),Xs(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(sa(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&sa(e,t),Xs(e.x,s.offset.x),Xs(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};sa(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Xs(i.x,-n.scroll.offset.x),Xs(i.y,-n.scroll.offset.y)),Fs(n.latestValues)&&_s(i,n.latestValues,n.layout?.layoutBox)}return Fs(this.latestValues)&&_s(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};sa(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Fs(n.latestValues))continue;let i;n.instance&&(Os(n.latestValues)&&n.updateSnapshot(),i=wr(),sa(i,n.measurePageBox())),xa(e,n.latestValues,n.snapshot?.layoutBox,i)}return Fs(this.latestValues)&&xa(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=z.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ha(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):sa(this.target,this.layout.layoutBox),zs(this.target,this.targetDelta)):sa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Lo.value&&Xa.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Os(this.parent.latestValues)&&!Is(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},pa(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),sa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===z.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;sa(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;Gs(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(oa(this.prevProjectionDelta.x,this.projectionDelta.x),oa(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ca(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Ea(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ea(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),Lo.value&&Xa.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(gl));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,f,m,g;i?(r.x.translate=i.x,r.x.scale=Bt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Bt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(fl(r.x,t.x,n),fl(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pa(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,f=this.relativeTargetOrigin,m=a,g=n,ml(c.x,f.x,m.x,g),ml(c.y,f.y,m.y,g),d&&Sa(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),sa(d,this.relativeTarget)),l&&(this.animationValues=o,Ba(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(W(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{Ga.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=si(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ia(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Ce("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&Tl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){s=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ra(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+e;const n=ra(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}sa(e,s),_s(e,i),ca(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ya);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&_a("z",t,i,this.animationValues);for(let e=0;e<Ha.length;e++)_a(`rotate${Ha[e]}`,t,i,this.animationValues),_a(`skew${Ha[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ka(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ka(e?.pointerEvents)||""),void(this.hasProjected&&!Fs(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Ma(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ur){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Ur[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?Ka(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(sl),this.root.sharedNodes.clear()}}}function Qa(t){t.updateLayout()}function tl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)ka(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=ra(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";ia(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Tl(s,e.layoutBox,n)&&ka(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=ra(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ca(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?ca(a,t.applyTransform(i,!0),e.measuredBox):ca(a,n,e.layoutBox);const l=!Ta(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};pa(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};pa(l,n,o.layoutBox,r),Va(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function el(t){Lo.value&&Xa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function il(t){t.clearSnapshot()}function sl(t){t.clearMeasurements()}function ol(t){t.isLayoutDirty=!0,t.updateLayout()}function rl(t){t.isLayoutDirty=!1}function al(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ll(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function cl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ul(t){t.resolveTargetDelta()}function hl(t){t.calcProjection()}function dl(t){t.resetSkewAndRotation()}function pl(t){t.removeLeadSnapshot()}function fl(t,e,n){t.translate=Bt(e.translate,0,n),t.scale=Bt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ml(t,e,n,i){t.min=Bt(e.min,n.min,i),t.max=Bt(e.max,n.max,i)}function gl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const yl={duration:.45,ease:[.4,0,.1,1]},vl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),xl=vl("applewebkit/")&&!vl("chrome/")?Math.round:u;function wl(t){t.min=xl(t.min),t.max=xl(t.max)}function Tl(t,e,n){return"position"===t||"preserve-aspect"===t&&!aa(Pa(e),Pa(n),.2)}function bl(t){return t!==t.root&&t.scroll?.wasRoot}const Sl=Ja({attachResizeListener:(t,e)=>Na(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Al=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Vl={current:void 0},Pl=Ja({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Vl.current){const t=new Sl({});t.mount(window),t.setOptions({layoutScroll:!0}),Vl.current=t}return Vl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),El="[data-layout],[data-layout-id]",kl=new WeakMap;let Ml;function Dl(t){const e=[];return t instanceof HTMLElement&&t.matches(El)&&e.push(t),t.querySelectorAll(El).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Cl(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Rl(t,e){let n=kl.get(t);if(n)n.setOptions(Cl(t,e));else{let i=Tr.get(t);i||(i=new Kr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),no(t,i)),t.style.transform&&!Fs(i.latestValues)&&(t.style.transform=""),n=new Pl(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=kl.get(e);if(t&&t.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Cl(t,e),visualElement:i}),n.mount(t),kl.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Bl(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),kl.delete(t)}function Ll(){const t=Ml;Ml=void 0,function(){if(z.isProcessing)return;const t=X.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Rl(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),so.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}const jl=U,Ol=N.reduce((t,e)=>(t[e]=t=>W(t),t),{});function Fl(t){return"object"==typeof t&&!Array.isArray(t)}function Il(t,e,n,i){return null==t?[]:"string"==typeof t&&Fl(e)?os(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Nl(t,e,n){return t*(e+1)+n*e}function $l(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Ul(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Bt(o,r,s[n]),easing:j(i,n)})}function Wl(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function zl(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Kl(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Yl(t,e){return e[t]||(e[t]=[]),e[t]}function Gl(t){return Array.isArray(t)?t:[t]}function Xl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Hl=t=>"number"==typeof t,ql=t=>t.every(Hl);function _l(e,n,i,s){const o=[];if(function(t,e){return ki(t)||"number"==typeof t||"string"==typeof t&&!Fl(e)}(e,n))o.push(Ia(e,Fl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=Il(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s={...i};"delay"in s&&"function"==typeof s.delay&&(s.delay=s.delay(t,a)),e instanceof Element?o.push(...eo(e,n,s,Tr.get(e))):o.push(...es(Qi(e)??io,e,n,s))}}return o}function Zl(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,p=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,p);continue}if(!Array.isArray(a)){u.set(a.name,$l(p,a.at,h,u));continue}let[d,g,y={}]=a;void 0!==y.at&&(p=$l(p,y.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=Gl(e),{delay:u=0,times:h=be(c),type:d=n.type||"keyframes",repeat:g,repeatType:y,repeatDelay:x=0,...w}=i;let{ease:T=n.ease||"easeOut",duration:b}=i;const A="function"==typeof u?u(a,l):u,V=c.length,P=Ln(d)?d:o?.[d||"keyframes"];if(V<=2&&P){let t=100;if(2===V&&ql(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...w};void 0!==b&&(e.duration=f(b));const i=Zt(e,t,P);T=i.ease,b=i.duration}b??(b=r);const E=p+A;1===h.length&&0===h[0]&&(h[1]=1);const k=h.length-c.length;if(k>0&&Te(h,k),1===c.length&&c.unshift(null),g&&t.warning(g<20,`Sequence segments can't repeat ${g} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),g&&g<20){const t=b>0?x/b:0;b=Nl(b,g,x);const e=[...c],n=[...h];T=Array.isArray(T)?[...T]:[T];const i=[...T],s="reverse"===y||"mirror"===y;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===y&&(r=[...i].reverse().map(t=>"function"==typeof t?S(t):t)));for(let a=0;a<g;a++){const l=s&&a%2==0,u=l?o:e,d=l?r:i,p=(a+1)*(1+t);t>0&&(c.push(c[c.length-1]),h.push(p),T.push("linear")),c.push(...u);for(let t=0;t<u.length;t++)h.push(n[t]+p),T.push(0===t?"linear":j(d,t-1))}Wl(h,g,t)}const M=E+b;Ul(s,c,T,h,E,M),v=Math.max(A+b,v),m=Math.max(M,m)};if(ki(d))x(g,y,Yl("default",Kl(d,l)));else{const t=Il(d,g,s,c),e=t.length;for(let n=0;n<e;n++){const i=Kl(t[n],l);for(const t in g)x(g[t],Xl(y,t),Yl(t,i),n,e)}}h=p,p+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(zl);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(d(0,m,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...p}=n;u.transition[s]={...p,duration:m,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=si(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:ve});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(..._l(n,t,e))}),s}function Jl(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=Zl(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=_l(t,o,{...c,...i},e)}var u;const h=new _n(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const Ql=Object.assign(Jl(),{addEffect:Zi,removeEffect:Ji});const tc=e=>function(n,i,s){return new _n(function(e,n,i,s){if(null==e)return[];const o=os(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const o={...ri(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=ti(e),l=Qn(t,o.pseudoElement||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=wo(i,s)),He(e),Hi(e,s),!o&&e.length<2&&e.unshift(wo(i,s)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],s=new On(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},ec=tc();function nc(t){return"undefined"!=typeof window&&(t?kn():En())}const ic={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function sc(t,e,n,i){const s=n[e],{length:o,position:r}=ic[e],a=s.current,l=n.time;s.current=Math.abs(t[`scroll${r}`]),s.containerLength=t[`client${o}`],s.targetLength=t[`scroll${o}`],s.scrollLength=s.targetLength-s.containerLength,s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=d(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const oc={start:0,center:.5,end:1};function rc(t,e,n=0){let i=0;if(t in oc&&(t=oc[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const ac=[0,0];function lc(t,e,n,i){let s=Array.isArray(t)?t:ac,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,oc[t]?t:"0"]),o=rc(s[0],n,i),r=rc(s[1],e),o-r}const cc={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};function uc(t,e){const{offset:n=cc.All,axis:s="y"}=e,o=t[s];o.offset.length=0;const r=n.length;for(let t=0;t<r;t++)o.offset[t]=lc(n[t],o.containerLength,o.targetLength,o.targetOffset);o.progress=i(0,1,function(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+d(s(o),s(o+1),e))/n;return i?1-r:r}(o.offset,o.current))}function hc(t,e,n,i={}){const{target:s}=i,o=s||i.offset;return{measure:e=>{if(o){n.time=e.time;for(const t in ic){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(s&&s!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(ns(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}uc(n,i)}},notify:t=>e(o?n:t)}}const dc=new WeakMap,pc=new WeakMap,fc=new WeakMap,mc=new WeakMap,gc=t=>t===document.scrollingElement?window:t;function yc(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=fc.get(e);s||(s=new Set,fc.set(e,s));const o=hc(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!dc.has(e)){const t={time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n=()=>{!function(t,e,n){for(const i in ic)sc(t,i,e,n);e.time=n}(e,t,z.timestamp);for(const e of s)e.measure(t);U.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>U.read(n);dc.set(e,o);const r=gc(e);window.addEventListener("resize",o),e!==document.documentElement&&pc.set(e,Ro(e,o)),r.addEventListener("scroll",o),o()}if(n&&!mc.has(e)){const t=dc.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=U.read(i,!0);mc.set(e,s)}const r=dc.get(e);return U.read(r,!1,!0),()=>{W(r);const t=fc.get(e);if(!t)return;if(t.delete(o),t.size)return;fc.delete(e);const n=dc.get(e);dc.delete(e),n&&(gc(e).removeEventListener("scroll",n),pc.get(e)?.(),window.removeEventListener("resize",n));const i=mc.get(e);i&&(W(i),mc.delete(e))}}const vc=[[cc.Enter,"entry"],[cc.Exit,"exit"],[cc.Any,"cover"],[cc.All,"contain"]],xc={start:0,end:1};function wc(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=xc[e[0]],i=xc[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function Tc(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=wc(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],s=e[t];if(i[0]!==s[0]||i[1]!==s[1])return!1}return!0}function bc(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of vc)if(Tc(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Sc=new Map;function Ac(t){const e={value:0},n=yc(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Vc(t,e){const n=function({container:t,...e}){const{axis:n}=e;let i=Sc.get(t);i||(i=new Map,Sc.set(t,i));const s=e.target??"self";let o=i.get(s);o||(o={},i.set(s,o));const r=n+(e.offset??[]).join(",");if(!o[r])if(e.target&&nc(e.target)){const i=bc(e.offset);o[r]=i?new ViewTimeline({subject:e.target,axis:n}):Ac({container:t,...e})}else nc()?o[r]=new ScrollTimeline({source:t,axis:n}):o[r]=Ac({container:t,...e});return o[r]}(e),i=e.target?bc(e.offset):void 0,s=e.target?nc(e.target)&&!!i:nc();return t.attachTimeline({timeline:s?n:void 0,...i&&s&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Bo(e=>{t.time=t.iterationDuration*e},n))})}const Pc={some:0,all:1};const Ec=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Xn,t.DOMKeyframesResolver=Yi,t.DOMVisualElement=Or,t.DocumentProjectionNode=Sl,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Ua,t.GroupAnimation=Hn,t.GroupAnimationWithThen=_n,t.HTMLProjectionNode=Pl,t.HTMLVisualElement=Kr,t.JSAnimation=je,t.KeyframeResolver=bn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Ml||(Ml=[],queueMicrotask(Ll)),Ml.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Dl(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Dl(this.scope)){if(this.tracked.has(e))continue;const n=Rl(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next&&i.next.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Bl(n,e)}}),e.relegate())return;n.remove()}Bl(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Hn([...t]))}},t.MotionGlobalConfig=o,t.MotionValue=ii,t.MotionValueState=as,t.NativeAnimation=On,t.NativeAnimationExtended=Nn,t.NativeAnimationWrapper=Zn,t.NodeStack=Ya,t.ObjectVisualElement=class extends jr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends Or{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ln.has(e)){const t=Ye(e);return t&&t.default||0}if(As.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Yr.has(e)?e:Ci(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Hr(t,e,n)}build(t,e,n){Vs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Xr(t,e,0,i)}mount(t){this.isSVGTag=Gr(t.tagName),super.mount(t)}},t.SubscriptionManager=p,t.ViewTransitionBuilder=gr,t.VisualElement=jr,t.acceleratedValues=Wn,t.addAttrValue=Ps,t.addDomEvent=Na,t.addEffect=Zi,t.addSVGValue=ks,t.addScaleCorrector=function(t){for(const e in t)Ur[e]=t[e],_(e)&&(Ur[e].isCSSVariable=!0)},t.addStyleValue=ps,t.addUniqueItem=e,t.addValueToWillChange=Di,t.alpha=nt,t.analyseComplexValue=Pt,t.animate=Ql,t.animateEffectSubject=es,t.animateElement=eo,t.animateMini=ec,t.animateMotionValue=pi,t.animateSingleValue=Ia,t.animateTarget=Fi,t.animateValue=function(t){return new je(t)},t.animateValues=ts,t.animateVariant=Ii,t.animateView=function(t,e={}){return new gr(t,e)},t.animateVisualElement=Ni,t.animationMapKey=Qn,t.anticipate=E,t.applyAxisDelta=Ws,t.applyBoxDelta=zs,t.applyGeneratorOptions=jn,t.applyPointDelta=Us,t.applyPxDefaults=Hi,t.applyTreeDeltas=Gs,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=gi(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=gi(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?mi(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?mi(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?x(-180,180,d-h):0;return t=>{const e={x:fi(t,i.x,u.x,r.x),y:fi(t,i.y,u.y,r.y)};if(s){const n=mi(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=x(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,f=e({x:u,y:h},{x:d,y:p}),m=void 0!==f(0).rotate?t.getValue("pathRotation",0):void 0,g={delay:s,...ri(i||{},"x")};delete g.path;const y=si(0);y.start(pi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=f(t/1e3);r?.set(e.x),a?.set(e.y),m&&void 0!==e.rotate&&m.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),m?.set(0)},onStop:()=>m?.set(0),onCancel:()=>m?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Pa,t.attachFollow=Wo,t.attachSpring=function(t,e,n){return Wo(t,e,{type:"spring",...n})},t.attrEffect=Es,t.axisDeltaEquals=Ea,t.axisEquals=ba,t.axisEqualsRounded=Aa,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Sa,t.boxEqualsRounded=Va,t.buildHTMLStyles=ws,t.buildProjectionTransform=Ma,t.buildSVGAttrs=Vs,t.buildSVGPath=Ss,t.buildTransform=xs,t.calcAxisDelta=la,t.calcBoxDelta=ca,t.calcChildStagger=ei,t.calcGeneratorDuration=_t,t.calcLength=ra,t.calcRelativeAxis=ua,t.calcRelativeAxisPosition=da,t.calcRelativeBox=ha,t.calcRelativePosition=pa,t.camelCaseAttributes=Yr,t.camelToDash=Ci,t.cancelFrame=W,t.cancelMicrotask=oo,t.cancelSync=Ol,t.checkVariantsDidChange=ta,t.circIn=k,t.circInOut=D,t.circOut=M,t.clamp=i,t.cleanDirtyNodes=nl,t.collectMotionValues=ni,t.color=xt,t.compareByDepth=$a,t.complex=Mt,t.containsCSSVariable=tt,t.convertBoundingBoxToBox=Bs,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Se,t.copyAxisDeltaInto=oa,t.copyAxisInto=ia,t.copyBoxInto=sa,t.correctBorderRadius=Nr,t.correctBoxShadow=$r,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ni(t,e,n)))}(t),n=na(),i=!0,s=!1;const o=e=>(n,i)=>{const s=bi(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=_r(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<Qr;e++){const p=Jr[e],f=n[p],m=void 0!==a[p]?a[p]:l[p],g=Sr(m),y=p===r?f.isActive:null;!1===y&&(d=e);let v=m===l[p]&&m!==a[p]&&g;if(v&&(i||s)&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...h},!f.isActive&&null===y||!m&&!f.prevProp||br(m)||"boolean"==typeof m)continue;if("exit"===p&&f.isActive&&!0!==y){f.prevResolvedValues&&(h={...h,...f.prevResolvedValues});continue}const x=ta(f.prevProp,m);let w=x||p===r&&f.isActive&&!v&&g||e>d&&g,T=!1;const b=Array.isArray(m)?m:[m];let S=b.reduce(o(p),{});!1===y&&(S={});const{prevResolvedValues:A={}}=f,V={...A,...S},P=e=>{w=!0,u.has(e)&&(T=!0,u.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in V){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Ai(e)&&Ai(n)?!Zr(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=S,f.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(w=!1);const E=v&&x;w&&(!E||T)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=bi(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ei(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=bi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=na(),s=!0}}},t.createAxis=xr,t.createAxisDelta=yr,t.createBox=wr,t.createDelta=vr,t.createEffect=ls,t.createGeneratorEasing=Zt,t.createProjectionNode=Ja,t.createRenderBatcher=$,t.createScopedAnimate=Jl,t.cubicBezier=T,t.cubicBezierAsString=Dn,t.defaultEasing=Ae,t.defaultOffset=be,t.defaultTransformValue=nn,t.defaultValueTypes=Ke,t.degrees=dt,t.delay=za,t.delayInSeconds=za,t.dimensionValueTypes=Ui,t.distance=Ec,t.distance2D=function(t,e){const n=Ec(t.x,e.x),i=Ec(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=ka,t.easeIn=C,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=I,t.fillOffset=Te,t.fillWildcards=He,t.findDimensionValueType=Wi,t.findEffect=Qi,t.findValueType=t=>Go.find($i(t)),t.flushKeyframeResolvers=Tn,t.followValue=Uo,t.frame=U,t.frameData=z,t.frameSteps=K,t.generateLinearEasing=Ht,t.getAnimatableNone=Xe,t.getAnimationMap=ti,t.getComputedStyle=wo,t.getDefaultTransition=ui,t.getDefaultValueType=Ye,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Lr},t.getFinalKeyframe=ke,t.getMixer=Ut,t.getOptimisedAppearId=Li,t.getOriginIndex=Oo,t.getValueAsType=ss,t.getValueTransition=ri,t.getVariableValue=xi,t.getVariantContext=_r,t.getViewAnimationLayerInfo=sr,t.getViewAnimations=or,t.globalProjectionState=Ga,t.handOffElementState=no,t.has2DTranslate=Is,t.hasComplexValues=Vt,t.hasReducedMotionListener=Dr,t.hasScale=Os,t.hasTransform=Fs,t.hasWarned=function(t){return y.has(t)},t.hex=ut,t.hover=function(t,e,n={}){const[i,s,o]=lo(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ao())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=vt,t.hslaToRgba=Ct,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=os(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Pc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=xe,t.initPrefersReducedMotion=Rr,t.interpolate=we,t.invisibleValues=It,t.isAnimationControls=br,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=J,t.isControllingVariants=Pr,t.isDeltaZero=Ta,t.isDragActive=ao,t.isDragging=ro,t.isEasingArray=L,t.isElementKeyboardAccessible=po,t.isElementTextInput=function(t){return fo.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=Wr,t.isGenerator=Ln,t.isHTMLElement=ns,t.isKeyframesTarget=Ai,t.isMotionValue=ki,t.isNear=aa,t.isNodeOrChild=co,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=uo,t.isSVGElement=is,t.isSVGSVGElement=jo,t.isSVGTag=Gr,t.isTransitionDefined=di,t.isVariantLabel=Sr,t.isVariantNode=Er,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Mn()||!e||"string"==typeof e&&(e in Cn||Mn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Mi,t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=Un,t.mapEasingToNativeEasing=Rn,t.mapValue=function(t,e,n,i){const s=Fo(e,n,i);return Yo(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Zs(t,n),{scroll:s}=e;return s&&(Xs(i.x,s.offset.x),Xs(i.y,s.offset.y)),i},t.measureViewportBox=Zs,t.memo=c,t.microtask=so,t.millisecondsToSeconds=m,t.mirrorEasing=b,t.mix=Gt,t.mixArray=Wt,t.mixColor=Ft,t.mixComplex=Kt,t.mixImmediate=Rt,t.mixLinearColor=Lt,t.mixNumber=Bt,t.mixObject=zt,t.mixValues=Ba,t.mixVisibility=Nt,t.motionValue=si,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Al);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=et,t.numberValueTypes=ze,t.observeTimeline=Bo,t.optimizedAppearDataAttribute=Bi,t.optimizedAppearDataId=Ri,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:t instanceof Document?t:os(t)[0]??document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=vi,t.parseValueFromTransform=sn,t.percent=pt,t.pipe=h,t.pixelsToPercent=Ir,t.positionalKeys=Si,t.prefersReducedMotion=Mr,t.press=function(t,e,n={}){const[i,s,o]=lo(t,n),r=t=>{const i=t.currentTarget;if(!vo(t))return;if(xo.has(t))return;mo.add(i),n.stopPropagation&&xo.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),mo.has(i)&&mo.delete(i),vo(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||co(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ns(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=go(()=>{if(mo.has(n))return;yo(n,"down");const t=go(()=>{yo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>yo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),po(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=yt,t.propEffect=io,t.propagateDirtyNodes=el,t.px=ft,t.readSVGValue=Ms,t.readStyleValue=fs,t.readTransformValue=on,t.recordStats=function(){if(Lo.value)throw Lo.value=null,Lo.addProjectionMetrics=null,new Error("Stats are already being measured");const t=Lo;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.removeAxisDelta=ma,t.removeAxisTransforms=ga,t.removeBoxTransforms=xa,t.removeEffect=Ji,t.removeItem=n,t.removePointDelta=fa,t.renderHTML=Fr,t.renderSVG=Xr,t.resize=Ro,t.resolveElements=os,t.resolveMotionValue=Ka,t.resolveTransition=oi,t.resolveVariant=bi,t.resolveVariantFromProps=Ti,t.reverseEasing=S,t.rgbUnit=lt,t.rgba=ct,t.rootProjectionNode=Vl,t.scale=it,t.scaleCorrectors=Ur,t.scalePoint=$s,t.scrapeHTMLMotionValuesFromProps=zr,t.scrapeSVGMotionValuesFromProps=Hr,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return u;const o={axis:e,container:n||i,...s};return"function"==typeof t?yc(n=>t(n[e].progress,n),o):Vc(t,o)},t.scrollInfo=yc,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?ro[t]?null:(ro[t]=!0,()=>{ro[t]=!1}):ro.x||ro.y?null:(ro.x=ro.y=!0,()=>{ro.x=ro.y=!1})},t.setFeatureDefinitions=function(t){Lr=t},t.setStyle=An,t.setTarget=Ei,t.spring=ve,t.springValue=function(t,e){return Uo(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Oo(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=Bn,t.statsBuffer=Lo,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=gs,t.styleSubjectEffect=ms,t.supportedWaapiEasing=Cn,t.supportsBrowserAnimation=Gn,t.supportsFlags=Vn,t.supportsLinearEasing=Mn,t.supportsPartialKeyframes=qi,t.supportsScrollTimeline=En,t.supportsViewTimeline=kn,t.svgEffect=Cs,t.svgSubjectEffect=Ds,t.sync=jl,t.testValueType=$i,t.time=X,t.transform=Fo,t.transformAxis=Hs,t.transformBox=_s,t.transformBoxPoints=Ls,t.transformPropOrder=an,t.transformProps=ln,t.transformValue=Yo,t.transformValueTypes=We,t.translateAxis=Xs,t.updateMotionValuesFromProps=kr,t.variantPriorityOrder=Ar,t.variantProps=Vr,t.velocityPerSecond=g,t.vh=mt,t.visualElementStore=Tr,t.vw=gt,t.warnOnce=v,t.wrap=x});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;function s(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,m=t=>t/1e3,g=(t,e)=>e?t*(1e3/e):0,y=new Set;function v(t,e,n){t||y.has(e)||(console.warn(s(e,n)),y.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=w(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:w(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),C=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:B,easeOut:R,circIn:M,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},N=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=N.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new Set;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(n.add(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),f.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(g))};return{schedule:N.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(g)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<N.length;e++)a[N[e]].cancel(t)},state:s,steps:a}}const{schedule:U,cancel:W,state:z,steps:K}=$("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let Y;function G(){Y=void 0}const X={now:()=>(void 0===Y&&X.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(G)}},H=t=>Math.round(1e5*t)/1e5,q=t=>e=>"string"==typeof e&&e.startsWith(t),_=q("--"),Z=q("var(--"),J=t=>!!Z(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>i(0,1,t)},it={...et,default:1},st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rt=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),at=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},lt={...et,transform:t=>Math.round((t=>i(0,255,t))(t))},ct={test:rt("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+lt.transform(t)+", "+lt.transform(e)+", "+lt.transform(n)+", "+H(nt.transform(i))+")"};const ut={test:rt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ct.transform},ht=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),ft=ht("px"),mt=ht("vh"),gt=ht("vw"),yt=(()=>({...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}))(),vt={test:rt("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+pt.transform(H(e))+", "+pt.transform(H(n))+", "+H(nt.transform(i))+")"},xt={test:t=>ct.test(t)||ut.test(t)||vt.test(t),parse:t=>ct.test(t)?ct.parse(t):vt.test(t)?vt.parse(t):ut.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):vt.transform(t),getAnimatableNone:t=>{const e=xt.parse(t);return e.alpha=0,xt.transform(e)}},wt=new RegExp(st.source),Tt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const bt="number",St="color",At=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vt(t){const e=t.toString();return wt.test(e)||Tt.test(e)}function Pt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(At,t=>(xt.test(t)?(i.color.push(o),s.push(St),n.push(xt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(bt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Et({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===bt?H(i[o]):t===St?xt.transform(i[o]):i[o]}return s}}const Mt=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:xt.test(n)?xt.getAnimatableNone(n):n;var n};const kt={test:function(t){return isNaN(t)&&"string"==typeof t&&(wt.test(t)||Tt.test(t))},parse:function(t){return Pt(t).values},createTransformer:function(t){return Et(Pt(t))},getAnimatableNone:function(t){const e=Pt(t);return Et(e)(e.values.map((t,n)=>Mt(t,e.split[n])))}};function Dt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ct({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Dt(a,i,t+1/3),o=Dt(a,i,t),r=Dt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Rt(t,e){return n=>n>0?e:t}const Bt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},jt=[ut,ct,vt];function Ot(e){const n=(i=e,jt.find(t=>t.test(i)));var i;if(!n)return t.warning(!1,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let s=n.parse(e);return n===vt&&(s=Ct(s)),s}const Ft=(t,e)=>{const n=Ot(t),i=Ot(e);if(!n||!i)return Rt(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=Bt(n.alpha,i.alpha,t),ct.transform(s))},It=new Set(["none","hidden"]);function Nt(t,e){return It.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function $t(t,e){return n=>Bt(t,e,n)}function Ut(t){return"number"==typeof t?$t:"string"==typeof t?J(t)?Rt:xt.test(t)?Ft:Kt:Array.isArray(t)?Wt:"object"==typeof t?xt.test(t)?Ft:zt:Rt}function Wt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ut(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function zt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ut(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Kt=(e,n)=>{const i=kt.createTransformer(n),s=Pt(e),o=Pt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?It.has(e)&&!o.values.length||It.has(n)&&!s.values.length?Nt(e,n):h(Wt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Rt(e,n))},Yt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Gt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Bt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Yt.exec(t);if(!n)return;const i=Yt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>H(Bt(o,r,t))+s}(t,e);if(n)return n}return Ut(t)(t,e)}const Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>U.update(e,t),stop:()=>W(e),now:()=>z.isProcessing?z.timestamp:X.now()}},Ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function _t(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(_t(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:m(s)}}const Jt=100,Qt=10,te=1,ee=800,ne=.3,ie=.3,se={granular:.01,default:2},oe={granular:.005,default:.5},re=.01,ae=10,le=.05,ce=1;function ue(t,e){return t*Math.sqrt(1-e*e)}const he=.001;const de=(t,e)=>(e?t>=0:t>0)&&t<1/0;function pe(t,e){if(de(t,e))return t}function fe(e){const n=pe(e.stiffness),s=pe(e.damping,!0),o=pe(e.mass),r={...e,stiffness:n??Jt,damping:s??Qt,mass:o??te,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??s??o)&&(void 0!==e.duration||void 0!==e.bounce)};if(r.isTimeDefined){if(e.visualDuration){const t=2*Math.PI/(1.2*e.visualDuration);r.stiffness=t*t,r.damping=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(r.stiffness)}else Object.assign(r,function({duration:e=ee,bounce:n=ne}){let s,o;t.warning(e<=f(ae),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-n;r=i(le,ce,r),e=i(re,ae,m(e)),r<1?(s=t=>{const n=t*r,i=n*e,s=ue(t,r),o=Math.exp(-i);return he-n/s*o},o=t=>{const n=t*r*e,i=r*r*t*t*e,o=Math.exp(-n),a=ue(t*t,r);return(-s(t)+he>0?-1:1)*-i*o/a}):(s=t=>Math.exp(-t*e)*(t*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*-t));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/e),l=a*a;return{stiffness:l,damping:2*r*Math.sqrt(l),duration:f(e)}}(r)),r.isResolvedFromDuration=!0;de(r.stiffness)&&de(r.damping,!0)||(r.stiffness=Jt,r.damping=Qt)}return r}function me(t=ie,e=ne){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,isResolvedFromDuration:u,isTimeDefined:h}=fe({...n}),d=t=>h?0:-m(t),p=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=p*g,v={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?se.granular:se.default),v.restDelta=n.restDelta||(t?oe.granular:oe.default)};let w,T,b;if(x(),p<1){const t=ue(g,p),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===p){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(p*p-1);w=e=>{const n=Math.exp(-y*e),i=Math.min(t*e,300);return v.target-n*((v.velocity+y*v.delta)*Math.sinh(i)+t*v.delta*Math.cosh(i))/t};const e={P:0,sinh:0,cosh:0};b=()=>{e.P=(v.velocity+y*v.delta)/t,e.sinh=y*e.P-v.delta*t,e.cosh=y*v.delta-e.P*t},T=n=>{const i=Math.exp(-y*n),s=Math.min(t*n,300);return i*(e.sinh*Math.sinh(s)+e.cosh*Math.cosh(s))}}b();const S=u&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>f(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=f(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}function ge({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===r?m:r(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:g+e};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=me({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function ye(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||Gt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=h(t,o)}i.push(o)}return i}(n,r,a),f=p.length,m=t=>{if(c&&t<e[0])return n[0];let i=0;if(f>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=d(e[i],e[i+1],t);return p[i](s)};return s?t=>m(i(e[0],e[l-1],t)):m}function ve(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Bt(n,1,s))}}function xe(t){const e=[0];return ve(e,t.length-1),e}function we(t,e){return t.map(t=>t*e)}function Te(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function be({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=L(s)?s.map(I):I(s)||B,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,s]=e,l=n===s?void 0:(o.mix||Gt)(n,s);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):s,a.done=e>=t,a)}}const l=ye(we(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(r)?r:Te(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}me.applyToOptions=t=>{const e=Zt(t,100,me);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};function Se(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const Ae=t=>null!==t;function Ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ae),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Pe={decay:ge,inertia:ge,tween:be,keyframes:be,spring:me};function Ee(t){"string"==typeof t.type&&(t.type=Pe[t.type])}function Me(t,e){return{kind:t,animation:e,timestamp:X.now(),frameTimestamp:z.timestamp,frameIsProcessing:z.isProcessing}}function ke(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Me("animation-start",t),options:n?{...e,...n}:e})}catch{}}class De{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Ce=t=>t/100;class Re extends De{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),ke(this,this.options)}initAnimation(){const{options:t}=this;Ee(t);const{type:e=be,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||be;a!==be&&"number"!=typeof r[0]&&(this.mixKeyframes=h(Ce,Gt(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,w=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),w=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=T.next(w),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&f!==ge&&(x.value=Ve(u,this.options,g,this.speed)),m&&m(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Se(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(X.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Be=new Set(["brightness","contrast","saturate","opacity"]);function Le(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=Be.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const je=/\b([a-z-]*)\(.*?\)/gu,Oe={...kt,getAnimatableNone:t=>{const e=t.match(je);return e?e.map(Le).join(" "):t}},Fe={...kt,getAnimatableNone:t=>{const e=kt.parse(t);return kt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ie={...et,transform:Math.round},Ne={rotate:dt,pathRotation:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:dt,skewX:dt,skewY:dt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:nt,originX:yt,originY:yt,originZ:ft},$e={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,inset:ft,insetBlock:ft,insetBlockStart:ft,insetBlockEnd:ft,insetInline:ft,insetInlineStart:ft,insetInlineEnd:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,paddingBlock:ft,paddingBlockStart:ft,paddingBlockEnd:ft,paddingInline:ft,paddingInlineStart:ft,paddingInlineEnd:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,marginBlock:ft,marginBlockStart:ft,marginBlockEnd:ft,marginInline:ft,marginInlineStart:ft,marginInlineEnd:ft,fontSize:ft,backgroundPositionX:ft,backgroundPositionY:ft,...Ne,zIndex:Ie,fillOpacity:nt,strokeOpacity:nt,numOctaves:Ie},Ue={...$e,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Oe,WebkitFilter:Oe,mask:Fe,WebkitMask:Fe},We=t=>Ue[t],ze=new Set([Oe,Fe]);function Ke(t,e){let n=We(t);return ze.has(n)||(n=kt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function Ye(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ge=t=>180*t/Math.PI,Xe=t=>{const e=Ge(Math.atan2(t[1],t[0]));return qe(e)},He={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Xe,rotateZ:Xe,skewX:t=>Ge(Math.atan(t[1])),skewY:t=>Ge(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},qe=t=>((t%=360)<0&&(t+=360),t),_e=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ze=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Je={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_e,scaleY:Ze,scale:t=>(_e(t)+Ze(t))/2,rotateX:t=>qe(Ge(Math.atan2(t[6],t[5]))),rotateY:t=>qe(Ge(Math.atan2(-t[2],t[0]))),rotateZ:Xe,rotate:Xe,skewX:t=>Ge(Math.atan(t[4])),skewY:t=>Ge(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Qe(t){return t.includes("scale")?1:0}function tn(t,e){if(!t||"none"===t)return Qe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Je,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=He,s=e}if(!s)return Qe(e);const o=i[e],r=s[1].split(",").map(nn);return"function"==typeof o?o(r):r[o]}const en=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return tn(n,e)};function nn(t){return parseFloat(t.trim())}const sn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],on=(()=>new Set([...sn,"pathRotation"]))(),rn=t=>t===et||t===ft,an=new Set(["x","y","z"]),ln=sn.filter(t=>!an.has(t));const cn=new Set(["bottom","right"]);function un(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const hn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>un(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>un(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:({transform:t})=>tn(t,"x"),y:({transform:t})=>tn(t,"y")};hn.translateX=hn.x,hn.translateY=hn.y;const dn=new Set;let pn=!1,fn=!1,mn=!1;function gn(){if(fn){const t=[],e=new Set,n=new Set;dn.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),cn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return ln.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}fn=!1,pn=!1,dn.forEach(t=>t.complete(mn)),dn.clear()}function yn(){dn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(fn=!0)})}function vn(){mn=!0,yn(),gn(),mn=!1}class xn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dn.add(this),pn||(pn=!0,U.read(yn),U.resolveKeyframes(gn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(r(t)||l(t))return parseFloat(t);if(!kt.test(t)&&kt.test(n))return Ke(e,n)}return t??void 0}(n.readValue(e,o),e,o);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}Ye(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),dn.delete(this)}cancel(){"scheduled"===this.state&&(dn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const wn=t=>t.startsWith("--");function Tn(t,e,n){wn(e)?t.style.setProperty(e,n):t.style[e]=n}const bn={};function Sn(t,e){const n=c(t);return()=>bn[e]??n()}const An=Sn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Vn=Sn(()=>void 0!==window.ViewTimeline,"viewTimeline"),Pn=Sn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),En=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:En([0,.65,.55,1]),circOut:En([.55,0,1,.45]),backIn:En([.31,.01,.66,-.59]),backOut:En([.33,1.53,.69,.99])};function kn(t,e){return t?"function"==typeof t?Pn()?Ht(t,e):"ease-out":O(t)?En(t):Array.isArray(t)?t.map(t=>kn(t,e)||Mn.easeOut):Mn[t]:void 0}function Dn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=kn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function Cn(t){return"function"==typeof t&&"applyToOptions"in t}function Rn({type:t,...e}){return Cn(t)&&Pn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Bn extends De{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=Rn(e);this.animation=Dn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ve(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Tn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()},ke(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&An()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const Ln={anticipate:E,backInOut:P,circInOut:D};function jn(t){"string"==typeof t.ease&&t.ease in Ln&&(t.ease=Ln[t.ease])}class On extends Bn{constructor(t){jn(t),Ee(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Re({...r,autoplay:!1}),l=Math.max(10,X.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&Tn(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Fn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!kt.test(t)&&"0"!==t||t.startsWith("url(")));function In(t){t.duration=0,t.type="keyframes"}const Nn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),$n=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Un=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Nn.has(n)&&!Un.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Wn()&&(Nn.has(n)||Un.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&$n.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Kn extends De{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=X.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||xn;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=X.now();let d=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Fn(o,n),l=Fn(r,n);return a&&l?function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||Cn(i))&&s:(a!==l&&t.warning(!1,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!1)})(e,r,a,l)||(d=!1,!o.instantAnimations&&c||h?.(Ve(e,i,n)),e[0]=e[e.length-1],In(i),i.repeat=0);const p=s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=i;i.startTime??(i.startTime=p),i.finalKeyframe=n,i.keyframes=e,i.onComplete=()=>{f?.(),this.notifyFinished()};let m;if(d&&!u&&zn(i)){i.element=i.motionValue?.owner?.current;try{m=new On(i)}catch{m=new Re(i)}}else m=new Re(i);this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Yn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Gn(this.animations,"duration")}get iterationDuration(){return Gn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Gn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Xn extends Yn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Hn extends Bn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},ke(this,{})}}const qn=new WeakMap,_n=(t,e="")=>`${t}:${e}`;function Zn(t){let e=qn.get(t);return e||(e=new Map,qn.set(t,e)),e}function Jn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Qn={current:void 0};class ti{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=X.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=X.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new p)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new p,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){U.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Qn.current&&Qn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=X.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ei(t,e){return new ti(t,e)}function ni(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function ii(t,e){const n=t?.[e]??t?.default??t;return n!==t?ni(n,t):n}const si={type:"spring",stiffness:500,damping:25,restSpeed:10},oi={type:"keyframes",duration:.8},ri={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ai=(t,{keyframes:e})=>e.length>2?oi:on.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:si:ri,li=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ci(t){for(const e in t)if(!li.has(e))return!0;return!1}const ui=(t,e,n,i={},s,r)=>a=>{const l=ii(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};ci(l)||Object.assign(h,ai(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(In(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,In(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ve(h.keyframes,l);if(void 0!==t)return void U.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Re(h):new Kn(h)};function hi(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function di(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function pi(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const fi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mi(t){const e=fi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function gi(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=mi(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return J(o)?gi(o,n,i+1):o}function yi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function vi(t,e,n,i){if("function"==typeof e){const[s,o]=yi(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=yi(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function xi(t,e,n){const i=t.getProps();return vi(i,e,void 0!==n?n:i.custom,t)}const wi=new Set(["width","height","top","left","right","bottom",...sn]),Ti=t=>Array.isArray(t);function bi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ei(n))}function Si(t){return Ti(t)?t[t.length-1]||0:t}function Ai(t,e){const n=xi(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){bi(t,e,Si(o[e]))}}const Vi=t=>Boolean(t&&t.getVelocity);function Pi(t){return Boolean(Vi(t)&&t.add)}function Ei(t,e){const n=t.getValue("willChange");if(Pi(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Mi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ki="framerAppearId",Di="data-"+Mi(ki);function Ci(t){return t.props[Di]}const Ri="undefined"!=typeof window;function Bi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Li(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?ni(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&Bi(d,e))continue;const r={delay:n,...ii(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){U.update(()=>i.set(s));continue}let p=!1;if(Ri&&window.MotionHandoffAnimation){const n=Ci(t);if(n){const t=window.MotionHandoffAnimation(n,e,U);null!==t&&(r.startTime=t,p=!0)}}Ei(t,e);const f=c??t.shouldReduceMotion;i.start(ui(e,i,s,f&&wi.has(e)?{type:!1}:r,t,p));const m=i.animation;m&&h.push(m)}if(r){const e=()=>U.update(()=>{r&&Ai(t,r)});h.length?Promise.all(h).then(e):e()}return h}function ji(t,e,n={}){const i=xi(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Li(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(ji(l,e,{...r,delay:n+("function"==typeof i?0:i)+Jn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Oi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>ji(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=ji(t,e,n);else{const s="function"==typeof e?xi(t,e,n.custom):e;i=Promise.all(Li(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Fi=t=>e=>e.test(t),Ii=[et,ft,pt,dt,gt,mt,{test:t=>"auto"===t,parse:t=>t}],Ni=t=>Ii.find(Fi(t));function $i(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Ui=new Set(["auto","none","0"]);class Wi extends xn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),J(i))){const s=gi(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!wi.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=Ni(i),r=Ni(s);if(tt(i)!==tt(s)&&hn[n])this.needsMeasurement=!0;else if(o!==r)if(rn(o)&&rn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else hn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||$i(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ui.has(e)&&Vt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=Ke(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return hn[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const zi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Ki=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...zi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Yi(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Ki.has(e)&&(t[n]=t[n]+"px")}const Gi=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Xi=[];function Hi(e){t.invariant("function"==typeof e.test&&"function"==typeof e.read,"Effects passed to animate.addEffect() need test() and read().","effect-missing-test"),qi(e),Xi.unshift(e)}function qi(t){n(Xi,t)}function _i(t){return Xi.find(e=>e.test(t))}function Zi(t,e,n={},i){const s=[],{velocity:o}=n,r=n.reduceMotion??i?.shouldReduceMotion;for(const a in e){if("transition"===a||"transitionEnd"===a)continue;const l=e[a];if(void 0===l)continue;const c=t(a),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(ui(a,c,l,r&&wi.has(a)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):U.update(()=>c.set(l))}const{transitionEnd:a}=e;if(a){const e=()=>U.update(()=>{for(const e in a)t(e).set(a[e])});s.length?Promise.all(s).then(e):e()}return s}function Ji(e,n,i,s,o){return Zi(s=>{let r=e.get(n,s);if(!r){let a;if(!o){const o=i[s];a=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(o)??e.read(n,s,o),t.invariant(void 0!==a,`"${s}" can't be read from the animated subject. Provide [from, to] keyframes.`,"effect-unreadable-value")}r=ei(a,{owner:o}),e(n,{[s]:r})}return r},i,s,o)}function Qi(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function ts(t){return a(t)&&"ownerSVGElement"in t}const es=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function ns(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function is(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=ns(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class ss{constructor(t=U.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function os(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new ss(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const rs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},as={};const ls=new Set(["originX","originY","originZ"]),cs=(t,e)=>es(t.get(e)?.get(),$e[e]),us=(t,e,n,i)=>{let s,o;if(on.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>sn.indexOf(t)-sn.indexOf(e)))}e.get("transform")||(Qi(t)||e.get("transformBox")||us(t,e,"transformBox",new ti("fill-box")),e.set("transform",new ti("none"),()=>{t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].get();void 0!==o&&(("number"==typeof o?o:parseFloat(o))!==(s.startsWith("scale")?1:0)&&(e+=(e&&" ")+(as[s]||(as[s]=(rs[s]||s)+"("))+es(o,Ne[s])+")"))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+"rotate("+es(s,Ne.pathRotation)+")"),e||"none"}(e)})),o=e.get("transform")}else ls.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ti(""),()=>{const n=cs(e,"originX")??"50%",i=cs(e,"originY")??"50%",s=cs(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=wn(n)?()=>{t.style.setProperty(n,i.get())}:()=>{t.style[n]=es(i.get(),$e[n])};return e.set(n,i,s,o)},hs=(t,e)=>{if(on.has(e))return en(t,e);const n=getComputedStyle(t),i=wn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},ds=os(us,{test:t=>Qi(t)||ts(t),read:hs}),ps=is(ds),fs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ms=sn.length;function gs(t,e,n){let i="",s=!0;for(let o=0;o<ms;o++){const r=sn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=es(a,$e[r]);if(!l){s=!1;i+=`${fs[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${es(o,$e.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function ys(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(on.has(t))r=!0;else if(_(t))s[t]=n;else{const e=es(n,$e[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=gs(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const vs={offset:"stroke-dashoffset",array:"stroke-dasharray"},xs={offset:"strokeDashoffset",array:"strokeDasharray"};function ws(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?vs:xs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ts=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(ys(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Ts)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&ws(h,s,o,r,!1)}const Ss=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Mi(s));const r=$e[n]||$e[s],a=o?()=>{t[s]=es(i.get(),$e[n])}:()=>{const e=es(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},As=is(os(Ss));const Vs=(t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return U.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ti("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ss(t,e,n,i,ks(n));return(wn(n)||n in t.style?us:Ss)(t,e,n,i)},Ps=(t,e)=>on.has(e)?$e[e]?.default||0:wn(e)||Ts.includes(e)?hs(t,e):(e=ks(e),t.getAttribute(Mi(e))??t.getAttribute(e)??void 0),Es=os(Vs,{test:ts,read:Ps}),Ms=is(Es);function ks(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function Ds({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Cs(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Rs(t){return void 0===t||1===t}function Bs({scale:t,scaleX:e,scaleY:n}){return!Rs(t)||!Rs(e)||!Rs(n)}function Ls(t){return Bs(t)||js(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function js(t){return Os(t.x)||Os(t.y)}function Os(t){return t&&"0%"!==t}function Fs(t,e,n){return n+e*(t-n)}function Is(t,e,n,i,s){return void 0!==s&&(t=Fs(t,s,i)),Fs(t,n,i)+e}function Ns(t,e=0,n=1,i,s){t.min=Is(t.min,e,n,i,s),t.max=Is(t.max,e,n,i,s)}function $s(t,{x:e,y:n}){Ns(t.x,e.translate,e.scale,e.originPoint),Ns(t.y,n.translate,n.scale,n.originPoint)}const Us=.999999999999,Ws=1.0000000000001;function zs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Ks(t.x,-o.scroll.offset.x),Ks(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,$s(t,r)),i&&Ls(o.latestValues)&&Xs(t,o.latestValues,o.layout?.layoutBox))}e.x<Ws&&e.x>Us&&(e.x=1),e.y<Ws&&e.y>Us&&(e.y=1)}function Ks(t,e){t.min+=e,t.max+=e}function Ys(t,e,n,i,s=.5){Ns(t,e,n,Bt(t.min,t.max,s),i)}function Gs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Xs(t,e,n){const i=n??t;Ys(t.x,Gs(e.x,i.x),e.scaleX,e.scale,e.originX),Ys(t.y,Gs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Hs(t,e){return Ds(Cs(t.getBoundingClientRect(),e))}const qs={},_s=t=>ts(t)?Es:ds;class Zs{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=Wi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return Hs(this.current)}getProps(){return qs}}function Js(t,e,n,i){if(i)return Zi(t=>i.getValue(t,null),e,n,i);const s=_s(t);return Ji(s,t,e,n,new Zs(s,t))}function Qs(t,e){const n=_s(t).state(t);if(!n)return;const{transformKeys:i}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&i?.length||e.addValue(n,t)})}const to=os((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>a(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:eo,cancel:no}=$(queueMicrotask,!1),io={x:!1,y:!1};function so(){return io.x||io.y}function oo(t,e){const n=ns(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const ro=(t,e)=>!!e&&(t===e||ro(t,e.parentElement)),ao=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,lo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function co(t){return lo.has(t.tagName)||!0===t.isContentEditable}const uo=new Set(["INPUT","SELECT","TEXTAREA"]);const ho=new WeakSet;function po(t){return e=>{"Enter"===e.key&&t(e)}}function fo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function mo(t){return ao(t)&&!so()}const go=new WeakSet;function yo(t,e){const n=window.getComputedStyle(t);return wn(e)?n.getPropertyValue(e):n[e]}const vo=new WeakMap;let xo;const wo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ts(i)&&"getBBox"in i?i.getBBox()[e]:i[n],To=wo("inline","width","offsetWidth"),bo=wo("block","height","offsetHeight");function So({target:t,borderBoxSize:e}){vo.get(t)?.forEach(n=>{n(t,{get width(){return To(t,e)},get height(){return bo(t,e)}})})}function Ao(t){t.forEach(So)}function Vo(t,e){xo||"undefined"!=typeof ResizeObserver&&(xo=new ResizeObserver(Ao));const n=ns(t);return n.forEach(t=>{let n=vo.get(t);n||(n=new Set,vo.set(t,n)),n.add(e),xo?.observe(t)}),()=>{n.forEach(t=>{const n=vo.get(t);n?.delete(e),n?.size||xo?.unobserve(t)})}}const Po=new Set;let Eo;function Mo(t){return Po.add(t),Eo||(Eo=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Po.forEach(e=>e(t))},window.addEventListener("resize",Eo)),()=>{Po.delete(t),Po.size||"function"!=typeof Eo||(window.removeEventListener("resize",Eo),Eo=void 0)}}function ko(t,e){return"function"==typeof t?Mo(t):Vo(t,e)}function Do(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return U.preUpdate(i,!0),()=>W(i)}const Co={value:null,addProjectionMetrics:null};function Ro(t){return ts(t)&&"svg"===t.tagName}function Bo(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Lo(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ye(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const jo=new Set,Oo=({timestamp:t})=>{jo.forEach(e=>e.tick(t))};class Fo extends De{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,Ee(t),this.factory=t.type||be,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(jo.size||U.update(Oo,!0),jo.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e,r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Se(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():X.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(jo.delete(this),jo.size||W(Oo))}}function Io(t,e){const n=ei(Vi(t)?t.get():t);return No(n,t,e),n}function No(t,e,n={}){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Uo(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Uo(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Fo({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Vi(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump($o(e,r),!1)):t.set($o(e,r))}),o=t.on("destroy",s);return()=>{s(),o()}}return c}function $o(t,e){return e?t+e:t}function Uo(t){return"number"==typeof t?t:parseFloat(t)}function Wo(t){const e=[];Qn.current=e;const n=t();Qn.current=void 0;const i=ei(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>U.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),W(i)})}(e,i,t),i}const zo=[...Ii,xt,kt];let Ko=0;const Yo=()=>"motion-view-"+Ko++;function Go(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Xo(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Ho(t,e,n,i,s,o=[],r,a=[],l){const c=ns(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Yo();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Go(t,s,o),Xo(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Yo(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Go(t,s,o),Xo(t,d,r,a,l),d})}function qo(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let _o={},Zo=null;const Jo=(t,e)=>{_o[t]=e},Qo=()=>{Zo||(Zo=document.createElement("style"),Zo.id="motion-view");let t="";for(const e in _o){const n=_o[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Zo.textContent=t,document.head.appendChild(Zo),_o={}},tr=()=>{Zo&&Zo.parentElement&&Zo.parentElement.removeChild(Zo)};function er(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function nr(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const ir=["layout","enter","exit","new","old"],sr=t=>t.split(" ").every(t=>0===parseFloat(t)),or={group:["layout"],new:["new","enter"],old:["old","exit"]},rr={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function ar(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new Yn([])))();const c=new Map,u=[],h=[],d=[],p=new Set,m=new Map,g=new Set,y=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),f="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,ns(n)),g=Ho(n,c,u,void 0,l,h,f,d,p),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=Ho(o.get(n),c,u,w.get(n),l,h,f,d,p)}else g=Ho(n,c,u,void 0,l,h,f,d,p);else g=[n];const v=s.get(n);g.forEach((n,i)=>{const s=m.get(n);m.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&y.set(n,v);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=lr(ii(l,n),ii(function(t,e){for(const n of or[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{const[e,n]=S(t,"group"),i=A(m.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=f(i.duration));const{delay:s=0,duration:o,ease:r}=Rn(i);return{delay:f(s),duration:o,ease:r}},P=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of zi)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),M=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Jo(":root",{"view-transition-name":"none"}),Jo("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{Jo(`::view-transition-group(${t})`,{overflow:"clip"}),Jo(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{Jo(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Qo()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),tr()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(y.get(t)??M(t))&&g.add(t)})(),k()};let R;try{b("old"),E("old"),k(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=nr(),n=[],i=new Set,s=new Set;m.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of ir){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=qo(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[m,g]of Object.entries(d)){if(null==g)continue;if("x"===m||"y"===m){v(!1,`animateView() animates view-transition layers with CSS properties; the "${m}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[m])continue;if("old"===o&&a&&null!=t.exit?.keyframes[m])continue;const d=lr(ii(l,m),ii(p,m));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[m]:void 0,n="opacity"===m||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?rr[c]?.[m]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=f(d.duration)),d.delay&&(d.delay=f(d.delay)),n.push(new Bn({...d,element:document.documentElement,name:m,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===m&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=er(o);if(!r)continue;const a=m.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new Hn(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:kn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=f(i.duration)),i=Rn(i),h={delay:f(i.delay??0),duration:u&&void 0!==s?f(s):i.duration,easing:u?"linear":kn(i.ease,i.duration)}}e.updateTiming(h),n.push(new Hn(t))}P.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of zi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";sr(a)&&sr(l)||n.push(new Bn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new Yn(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new Yn([])),e))})}function lr(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let cr=[],ur=null;function hr(){ur=null;const[t]=cr;var e;t&&(n(cr,e=t),ur=e,ar(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(hr))}function dr(){for(let t=cr.length-1;t>=0;t--){const e=cr[t],{interrupt:n}=e.options;if("immediate"===n){const n=cr.slice(0,t+1).map(t=>t.update),i=cr.slice(t+1);e.update=()=>{n.forEach(t=>t())},cr=[e,...i];break}}ur&&"immediate"!==cr[0]?.options.interrupt||hr()}class pr{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,cr.push(n),eo.render(dr)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const fr=()=>({translate:0,scale:1,origin:0,originPoint:0}),mr=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),gr=()=>({min:0,max:0}),yr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),vr=new WeakMap;function xr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function wr(t){return"string"==typeof t||Array.isArray(t)}const Tr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],br=["initial",...Tr];function Sr(t){if(xr(t.animate))return!0;for(let e=0;e<br.length;e++)if(wr(t[br[e]]))return!0;return!1}function Ar(t){return Boolean(Sr(t)||t.variants)}function Vr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Vi(s))t.addValue(i,s);else if(Vi(o))t.addValue(i,ei(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ei(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Pr={current:null},Er={current:!1},Mr="undefined"!=typeof window;function kr(){if(Er.current=!0,Mr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pr.current=t.matches;t.addEventListener("change",e),e()}else Pr.current=!1}const Dr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Cr={};class Rr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=X.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,U.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=Sr(e),this.isVariantNode=Ar(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Vi(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,vr.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Er.current||kr(),this.shouldReduceMotion=Pr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),W(this.notifyUpdate),W(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Nn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Bn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=on.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Cr){const e=Cr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Dr.length;e++){const n=Dr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Vr(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=ei(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):"number"!=typeof n&&!kt.test(n)&&kt.test(e)&&(n=Ke(t,e)),this.setBaseTarget(t,Vi(n)?n.get():n)),Vi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=vi(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Vi(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){eo.render(this.render)}}class Br extends Rr{constructor(){super(...arguments),this.KeyframeResolver=Wi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Lr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function jr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Or={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${jr(t,e.target.x)}% ${jr(t,e.target.y)}%`}},Fr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=kt.parse(t);if(s.length>5)return i;const o=kt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Bt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Ir={borderRadius:{...Or,applyTo:[...zi]},borderTopLeftRadius:Or,borderTopRightRadius:Or,borderBottomLeftRadius:Or,borderBottomRightRadius:Or,boxShadow:Fr};function Nr(t,{layout:e,layoutId:n}){return on.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ir[t]||"opacity"===t)}function $r(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Vi(i[e])||s&&Vi(s[e])||Nr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Ur extends Br{constructor(){super(...arguments),this.type="html",this.renderInstance=Lr}mount(e){t.invariant(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(t,e){if(on.has(e))return this.projection?.isProjecting?Qe(e):en(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(_(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Hs(t,e)}build(t,e,n){ys(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return $r(t,e,n)}}const Wr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),zr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Kr(t,e,n,i){Lr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Wr.has(n)?n:Mi(n),e.attrs[n])}function Yr(t,e,n){const i=$r(t,e,n);for(const n in t)if(Vi(t[n])||Vi(e[n])){i[-1!==sn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Gr=br.length;function Xr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Xr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Gr;n++){const i=br[n],s=t.props[i];(wr(s)||!1===s)&&(e[i]=s)}return e}function Hr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const qr=[...Tr].reverse(),_r=Tr.length;function Zr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Hr(e,t)}function Jr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qr(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function ta(t,e){t.min=e.min,t.max=e.max}function ea(t,e){ta(t.x,e.x),ta(t.y,e.y)}function na(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ia(t){return t.max-t.min}function sa(t,e,n){return Math.abs(t-e)<=n}function oa(t,e,n,i=.5){t.origin=i,t.originPoint=Bt(e.min,e.max,t.origin),t.scale=ia(n)/ia(e),t.translate=Bt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function ra(t,e,n,i){oa(t.x,e.x,n.x,i?i.originX:void 0),oa(t.y,e.y,n.y,i?i.originY:void 0)}function aa(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+ia(e)}function la(t,e,n,i){aa(t.x,e.x,n.x,i?.x),aa(t.y,e.y,n.y,i?.y)}function ca(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+ia(e)}function ua(t,e,n,i){ca(t.x,e.x,n.x,i?.x),ca(t.y,e.y,n.y,i?.y)}function ha(t,e,n,i,s){return t=Fs(t-=e,1/n,i),void 0!==s&&(t=Fs(t,1/s,i)),t}function da(t,e=0,n=1,i=.5,s,o=t,r=t){if(pt.test(e)){e=parseFloat(e);e=Bt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Bt(o.min,o.max,i);t===o&&(a-=e),t.min=ha(t.min,e,n,a,s),t.max=ha(t.max,e,n,a,s)}function pa(t,e,[n,i,s],o,r){da(t,e[n],e[i],e[s],e.scale,o,r)}const fa=["x","scaleX","originX"],ma=["y","scaleY","originY"];function ga(t,e,n,i){pa(t.x,e,fa,n?n.x:void 0,i?i.x:void 0),pa(t.y,e,ma,n?n.y:void 0,i?i.y:void 0)}function ya(t){return 0===t.translate&&1===t.scale}function va(t){return ya(t.x)&&ya(t.y)}function xa(t,e){return t.min===e.min&&t.max===e.max}function wa(t,e){return xa(t.x,e.x)&&xa(t.y,e.y)}function Ta(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ba(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function Sa(t){return ia(t.x)/ia(t.y)}function Aa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Va(t){return[t("x"),t("y")]}function Pa(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Ea=zi.length,Ma=t=>"string"==typeof t?parseFloat(t):t,ka=t=>"number"==typeof t||ft.test(t);function Da(t,e,n,i,s,o){s?(t.opacity=Bt(0,n.opacity??1,Ra(i)),t.opacityExit=Bt(e.opacity??1,0,Ba(i))):o&&(t.opacity=Bt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Ea;s++){const o=zi[s];let r=Ca(e,o),a=Ca(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ka(r)===ka(a)?(t[o]=Math.max(Bt(Ma(r),Ma(a),i),0),(pt.test(a)||pt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Bt(e.rotate||0,n.rotate||0,i))}function Ca(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ra=La(0,.5,k),Ba=La(.5,.95,u);function La(t,e,n){return i=>i<t?0:i>e?1:n(d(t,e,i))}function ja(t,e,n){const i=Vi(t)?t:ei(t);return i.start(ui("",i,e,n)),i.animation}function Oa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const Fa=(t,e)=>t.depth-e.depth;class Ia{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fa),this.isDirty=!1,this.children.forEach(t)}}function Na(t,e){const n=X.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(W(i),t(o-e))};return U.setup(i,!0),()=>W(i)}function $a(t,e){return Na(t,f(e))}function Ua(t){return Vi(t)?t.get():t}class Wa{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const za={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ka={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ya=["","X","Y","Z"];let Ga=0;function Xa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ha(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ci(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ha(i)}function qa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Ga++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Co.value&&(Ka.nodes=Ka.calculatedTargetDeltas=Ka.calculatedProjections=0),this.nodes.forEach(Ja),this.nodes.forEach(ll),this.nodes.forEach(cl),this.nodes.forEach(Qa),Co.addProjectionMetrics&&Co.addProjectionMetrics(Ka)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ia)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ts(e)&&!Ro(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;U.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Na(s,250),za.hasAnimatedSinceResize&&(za.hasAnimatedSinceResize=!1,this.nodes.forEach(al)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||ml,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!ba(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ii(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||al(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),W(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ul),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ha(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(nl),void this.nodes.forEach(el)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(il);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sl),this.nodes.forEach(ol),this.nodes.forEach(rl),this.nodes.forEach(_a),this.nodes.forEach(Za)):this.nodes.forEach(il),this.clearAllSnapshots();const t=X.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tl),this.sharedNodes.forEach(hl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ia(this.snapshot.measuredBox.x)||ia(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!va(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Ls(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),vl((i=n).x),vl(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(wl))){const{scroll:t}=this.root;t&&(Ks(e.x,t.offset.x),Ks(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ea(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&ea(e,t),Ks(e.x,s.offset.x),Ks(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};ea(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Ks(i.x,-n.scroll.offset.x),Ks(i.y,-n.scroll.offset.y)),Ls(n.latestValues)&&Xs(i,n.latestValues,n.layout?.layoutBox)}return Ls(this.latestValues)&&Xs(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ea(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Ls(n.latestValues))continue;let i;n.instance&&(Bs(n.latestValues)&&n.updateSnapshot(),i=yr(),ea(i,n.measurePageBox())),ga(e,n.latestValues,n.snapshot?.layoutBox,i)}return Ls(this.latestValues)&&ga(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=z.timestamp;const o=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),la(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):ea(this.target,this.layout.layoutBox),$s(this.target,this.targetDelta)):ea(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Co.value&&Ka.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Bs(this.parent.latestValues)&&!js(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ua(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),ea(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===z.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;ea(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;zs(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(na(this.prevProjectionDelta.x,this.projectionDelta.x),na(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ra(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Aa(this.projectionDelta.x,this.prevProjectionDelta.x)&&Aa(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),Co.value&&Ka.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(fl));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,f,m,g;i?(r.x.translate=i.x,r.x.scale=Bt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Bt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(dl(r.x,t.x,n),dl(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ua(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,f=this.relativeTargetOrigin,m=a,g=n,pl(c.x,f.x,m.x,g),pl(c.y,f.y,m.y,g),d&&wa(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ea(d,this.relativeTarget)),l&&(this.animationValues=o,Da(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(W(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{za.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ei(0)),this.motionValue.jump(0,!1),this.currentAnimation=ja(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Me("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&xl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){s=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ia(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+e;const n=ia(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}ea(e,s),Xs(e,i),ra(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Wa);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Xa("z",t,i,this.animationValues);for(let e=0;e<Ya.length;e++)Xa(`rotate${Ya[e]}`,t,i,this.animationValues),Xa(`skew${Ya[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Ua(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ua(e?.pointerEvents)||""),void(this.hasProjected&&!Ls(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Pa(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ir){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Ir[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?Ua(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function _a(t){t.updateLayout()}function Za(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Va(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=ia(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";ta(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else xl(s,e.layoutBox,n)&&Va(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=ia(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ra(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?ra(a,t.applyTransform(i,!0),e.measuredBox):ra(a,n,e.layoutBox);const l=!va(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};ua(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};ua(l,n,o.layoutBox,r),ba(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ja(t){Co.value&&Ka.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Qa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tl(t){t.clearSnapshot()}function el(t){t.clearMeasurements()}function nl(t){t.isLayoutDirty=!0,t.updateLayout()}function il(t){t.isLayoutDirty=!1}function sl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ol(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function rl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function al(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ll(t){t.resolveTargetDelta()}function cl(t){t.calcProjection()}function ul(t){t.resetSkewAndRotation()}function hl(t){t.removeLeadSnapshot()}function dl(t,e,n){t.translate=Bt(e.translate,0,n),t.scale=Bt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function pl(t,e,n,i){t.min=Bt(e.min,n.min,i),t.max=Bt(e.max,n.max,i)}function fl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ml={duration:.45,ease:[.4,0,.1,1]},gl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),yl=gl("applewebkit/")&&!gl("chrome/")?Math.round:u;function vl(t){t.min=yl(t.min),t.max=yl(t.max)}function xl(t,e,n){return"position"===t||"preserve-aspect"===t&&!sa(Sa(e),Sa(n),.2)}function wl(t){return t!==t.root&&t.scroll?.wasRoot}const Tl=qa({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),bl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Sl={current:void 0},Al=qa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Sl.current){const t=new Tl({});t.mount(window),t.setOptions({layoutScroll:!0}),Sl.current=t}return Sl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Vl="[data-layout],[data-layout-id]",Pl=new WeakMap;let El;function Ml(t){const e=[];return t instanceof HTMLElement&&t.matches(Vl)&&e.push(t),t.querySelectorAll(Vl).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function kl(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Dl(t,e){let n=Pl.get(t);if(n)n.setOptions(kl(t,e));else{let i=vr.get(t);i||(i=new Ur({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Qs(t,i)),t.style.transform&&!Ls(i.latestValues)&&(t.style.transform=""),n=new Al(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Pl.get(e);if(t&&t.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...kl(t,e),visualElement:i}),n.mount(t),Pl.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Cl(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Pl.delete(t)}function Rl(){const t=El;El=void 0,function(){if(z.isProcessing)return;const t=X.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Dl(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),eo.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}const Bl=U,Ll=N.reduce((t,e)=>(t[e]=t=>W(t),t),{});function jl(t){return"object"==typeof t&&!Array.isArray(t)}function Ol(t,e,n,i){return null==t?[]:"string"==typeof t&&jl(e)?ns(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Fl(t,e,n){return t*(e+1)+n*e}function Il(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Nl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Bt(o,r,s[n]),easing:j(i,n)})}function $l(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function Ul(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Wl(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function zl(t,e){return e[t]||(e[t]=[]),e[t]}function Kl(t){return Array.isArray(t)?t:[t]}function Yl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Gl=t=>"number"==typeof t,Xl=t=>t.every(Gl);function Hl(e,n,i,s){const o=[];if(function(t,e){return Vi(t)||"number"==typeof t||"string"==typeof t&&!jl(e)}(e,n))o.push(ja(e,jl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=Ol(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s={...i};"delay"in s&&"function"==typeof s.delay&&(s.delay=s.delay(t,a)),e instanceof Element?o.push(...Js(e,n,s,vr.get(e))):o.push(...Ji(_i(e)??to,e,n,s))}}return o}function ql(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,p=0,m=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,p);continue}if(!Array.isArray(a)){u.set(a.name,Il(p,a.at,h,u));continue}let[d,g,y={}]=a;void 0!==y.at&&(p=Il(p,y.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=Kl(e),{delay:u=0,times:h=xe(c),type:d=n.type||"keyframes",repeat:g,repeatType:y,repeatDelay:x=0,...w}=i;let{ease:T=n.ease||"easeOut",duration:b}=i;const A="function"==typeof u?u(a,l):u,V=c.length,P=Cn(d)?d:o?.[d||"keyframes"];if(V<=2&&P){let t=100;if(2===V&&Xl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...w};void 0!==b&&(e.duration=f(b));const i=Zt(e,t,P);T=i.ease,b=i.duration}b??(b=r);const E=p+A;1===h.length&&0===h[0]&&(h[1]=1);const M=h.length-c.length;if(M>0&&ve(h,M),1===c.length&&c.unshift(null),g&&t.warning(g<20,`Sequence segments can't repeat ${g} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),g&&g<20){const t=b>0?x/b:0;b=Fl(b,g,x);const e=[...c],n=[...h];T=Array.isArray(T)?[...T]:[T];const i=[...T],s="reverse"===y||"mirror"===y;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===y&&(r=[...i].reverse().map(t=>"function"==typeof t?S(t):t)));for(let a=0;a<g;a++){const l=s&&a%2==0,u=l?o:e,d=l?r:i,p=(a+1)*(1+t);t>0&&(c.push(c[c.length-1]),h.push(p),T.push("linear")),c.push(...u);for(let t=0;t<u.length;t++)h.push(n[t]+p),T.push(0===t?"linear":j(d,t-1))}$l(h,g,t)}const k=E+b;Nl(s,c,T,h,E,k),v=Math.max(A+b,v),m=Math.max(k,m)};if(Vi(d))x(g,y,zl("default",Wl(d,l)));else{const t=Ol(d,g,s,c),e=t.length;for(let n=0;n<e;n++){const i=Wl(t[n],l);for(const t in g)x(g[t],Yl(y,t),zl(t,i),n,e)}}h=p,p+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(Ul);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(d(0,m,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...p}=n;u.transition[s]={...p,duration:m,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=ei(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:me});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...Hl(n,t,e))}),s}function _l(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=ql(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=Hl(t,o,{...c,...i},e)}var u;const h=new Xn(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const Zl=Object.assign(_l(),{addEffect:Hi,removeEffect:qi});const Jl=e=>function(n,i,s){return new Xn(function(e,n,i,s){if(null==e)return[];const o=ns(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const o={...ii(s,t)};o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const r=Zn(e),l=_n(t,o.pseudoElement||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=yo(i,s)),Ye(e),Yi(e,s),!o&&e.length<2&&e.unshift(yo(i,s)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],s=new Bn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},Ql=Jl();function tc(t){return"undefined"!=typeof window&&(t?Vn():An())}const ec={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function nc(t,e,n,i){const s=n[e],{length:o,position:r}=ec[e],a=s.current,l=n.time;s.current=Math.abs(t[`scroll${r}`]),s.containerLength=t[`client${o}`],s.targetLength=t[`scroll${o}`],s.scrollLength=s.targetLength-s.containerLength,s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=d(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const ic={start:0,center:.5,end:1};function sc(t,e,n=0){let i=0;if(t in ic&&(t=ic[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const oc=[0,0];function rc(t,e,n,i){let s=Array.isArray(t)?t:oc,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,ic[t]?t:"0"]),o=sc(s[0],n,i),r=sc(s[1],e),o-r}const ac={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};function lc(t,e){const{offset:n=ac.All,axis:s="y"}=e,o=t[s];o.offset.length=0;const r=n.length;for(let t=0;t<r;t++)o.offset[t]=rc(n[t],o.containerLength,o.targetLength,o.targetOffset);o.progress=i(0,1,function(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+d(s(o),s(o+1),e))/n;return i?1-r:r}(o.offset,o.current))}function cc(t,e,n,i={}){const{target:s}=i,o=s||i.offset;return{measure:e=>{if(o){n.time=e.time;for(const t in ec){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(s&&s!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Qi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}lc(n,i)}},notify:t=>e(o?n:t)}}const uc=new WeakMap,hc=new WeakMap,dc=new WeakMap,pc=new WeakMap,fc=t=>t===document.scrollingElement?window:t;function mc(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=dc.get(e);s||(s=new Set,dc.set(e,s));const o=cc(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!uc.has(e)){const t={time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n=()=>{!function(t,e,n){for(const i in ec)nc(t,i,e,n);e.time=n}(e,t,z.timestamp);for(const e of s)e.measure(t);U.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>U.read(n);uc.set(e,o);const r=fc(e);window.addEventListener("resize",o),e!==document.documentElement&&hc.set(e,ko(e,o)),r.addEventListener("scroll",o),o()}if(n&&!pc.has(e)){const t=uc.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=U.read(i,!0);pc.set(e,s)}const r=uc.get(e);return U.read(r,!1,!0),()=>{W(r);const t=dc.get(e);if(!t)return;if(t.delete(o),t.size)return;dc.delete(e);const n=uc.get(e);uc.delete(e),n&&(fc(e).removeEventListener("scroll",n),hc.get(e)?.(),window.removeEventListener("resize",n));const i=pc.get(e);i&&(W(i),pc.delete(e))}}const gc=[[ac.Enter,"entry"],[ac.Exit,"exit"],[ac.Any,"cover"],[ac.All,"contain"]],yc={start:0,end:1};function vc(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=yc[e[0]],i=yc[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function xc(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=vc(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],s=e[t];if(i[0]!==s[0]||i[1]!==s[1])return!1}return!0}function wc(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of gc)if(xc(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Tc=new Map;function bc(t){const e={value:0},n=mc(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Sc(t,e){const n=function({container:t,...e}){const{axis:n}=e;let i=Tc.get(t);i||(i=new Map,Tc.set(t,i));const s=e.target??"self";let o=i.get(s);o||(o={},i.set(s,o));const r=n+(e.offset??[]).join(",");if(!o[r])if(e.target&&tc(e.target)){const i=wc(e.offset);o[r]=i?new ViewTimeline({subject:e.target,axis:n}):bc({container:t,...e})}else tc()?o[r]=new ScrollTimeline({source:t,axis:n}):o[r]=bc({container:t,...e});return o[r]}(e),i=e.target?wc(e.offset):void 0,s=e.target?tc(e.target)&&!!i:tc();return t.attachTimeline({timeline:s?n:void 0,...i&&s&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Do(e=>{t.time=t.iterationDuration*e},n))})}const Ac={some:0,all:1};const Vc=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Kn,t.DOMKeyframesResolver=Wi,t.DOMVisualElement=Br,t.DocumentProjectionNode=Tl,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Ia,t.GroupAnimation=Yn,t.GroupAnimationWithThen=Xn,t.HTMLProjectionNode=Al,t.HTMLVisualElement=Ur,t.JSAnimation=Re,t.KeyframeResolver=xn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),El||(El=[],queueMicrotask(Rl)),El.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Ml(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Ml(this.scope)){if(this.tracked.has(e))continue;const n=Dl(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next&&i.next.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Cl(n,e)}}),e.relegate())return;n.remove()}Cl(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Yn([...t]))}},t.MotionGlobalConfig=o,t.MotionValue=ti,t.MotionValueState=ss,t.NativeAnimation=Bn,t.NativeAnimationExtended=On,t.NativeAnimationWrapper=Hn,t.NodeStack=Wa,t.ObjectVisualElement=class extends Rr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends Br{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(on.has(e)){const t=We(e);return t&&t.default||0}if(Ts.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Wr.has(e)?e:Mi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Yr(t,e,n)}build(t,e,n){bs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Kr(t,e,0,i)}mount(t){this.isSVGTag=zr(t.tagName),super.mount(t)}},t.SubscriptionManager=p,t.ViewTransitionBuilder=pr,t.VisualElement=Rr,t.acceleratedValues=Nn,t.addAttrValue=Ss,t.addDomEvent=Oa,t.addEffect=Hi,t.addSVGValue=Vs,t.addScaleCorrector=function(t){for(const e in t)Ir[e]=t[e],_(e)&&(Ir[e].isCSSVariable=!0)},t.addStyleValue=us,t.addUniqueItem=e,t.addValueToWillChange=Ei,t.alpha=nt,t.analyseComplexValue=Pt,t.animate=Zl,t.animateEffectSubject=Ji,t.animateElement=Js,t.animateMini=Ql,t.animateMotionValue=ui,t.animateSingleValue=ja,t.animateTarget=Li,t.animateValue=function(t){return new Re(t)},t.animateValues=Zi,t.animateVariant=ji,t.animateView=function(t,e={}){return new pr(t,e)},t.animateVisualElement=Oi,t.animationMapKey=_n,t.anticipate=E,t.applyAxisDelta=Ns,t.applyBoxDelta=$s,t.applyGeneratorOptions=Rn,t.applyPointDelta=Is,t.applyPxDefaults=Yi,t.applyTreeDeltas=zs,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=pi(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=pi(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?di(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?di(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?x(-180,180,d-h):0;return t=>{const e={x:hi(t,i.x,u.x,r.x),y:hi(t,i.y,u.y,r.y)};if(s){const n=di(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=x(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,f=e({x:u,y:h},{x:d,y:p}),m=void 0!==f(0).rotate?t.getValue("pathRotation",0):void 0,g={delay:s,...ii(i||{},"x")};delete g.path;const y=ei(0);y.start(ui("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=f(t/1e3);r?.set(e.x),a?.set(e.y),m&&void 0!==e.rotate&&m.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),m?.set(0)},onStop:()=>m?.set(0),onCancel:()=>m?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Sa,t.attachFollow=No,t.attachSpring=function(t,e,n){return No(t,e,{type:"spring",...n})},t.attrEffect=As,t.axisDeltaEquals=Aa,t.axisEquals=xa,t.axisEqualsRounded=Ta,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=wa,t.boxEqualsRounded=ba,t.buildHTMLStyles=ys,t.buildProjectionTransform=Pa,t.buildSVGAttrs=bs,t.buildSVGPath=ws,t.buildTransform=gs,t.calcAxisDelta=oa,t.calcBoxDelta=ra,t.calcChildStagger=Jn,t.calcGeneratorDuration=_t,t.calcLength=ia,t.calcRelativeAxis=aa,t.calcRelativeAxisPosition=ca,t.calcRelativeBox=la,t.calcRelativePosition=ua,t.camelCaseAttributes=Wr,t.camelToDash=Mi,t.cancelFrame=W,t.cancelMicrotask=no,t.cancelSync=Ll,t.checkVariantsDidChange=Zr,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Qa,t.collectMotionValues=Qn,t.color=xt,t.compareByDepth=Fa,t.complex=kt,t.containsCSSVariable=tt,t.convertBoundingBoxToBox=Ds,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=we,t.copyAxisDeltaInto=na,t.copyAxisInto=ta,t.copyBoxInto=ea,t.correctBorderRadius=Or,t.correctBoxShadow=Fr,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Oi(t,e,n)))}(t),n=Qr(),i=!0,s=!1;const o=e=>(n,i)=>{const s=xi(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Xr(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<_r;e++){const p=qr[e],f=n[p],m=void 0!==a[p]?a[p]:l[p],g=wr(m),y=p===r?f.isActive:null;!1===y&&(d=e);let v=m===l[p]&&m!==a[p]&&g;if(v&&(i||s)&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...h},!f.isActive&&null===y||!m&&!f.prevProp||xr(m)||"boolean"==typeof m)continue;if("exit"===p&&f.isActive&&!0!==y){f.prevResolvedValues&&(h={...h,...f.prevResolvedValues});continue}const x=Zr(f.prevProp,m);let w=x||p===r&&f.isActive&&!v&&g||e>d&&g,T=!1;const b=Array.isArray(m)?m:[m];let S=b.reduce(o(p),{});!1===y&&(S={});const{prevResolvedValues:A={}}=f,V={...A,...S},P=e=>{w=!0,u.has(e)&&(T=!0,u.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in V){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Ti(e)&&Ti(n)?!Hr(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=S,f.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(w=!1);const E=v&&x;w&&(!E||T)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=xi(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Jn(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=xi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Qr(),s=!0}}},t.createAxis=gr,t.createAxisDelta=fr,t.createBox=yr,t.createDelta=mr,t.createEffect=os,t.createGeneratorEasing=Zt,t.createProjectionNode=qa,t.createRenderBatcher=$,t.createScopedAnimate=_l,t.cubicBezier=T,t.cubicBezierAsString=En,t.defaultEasing=Te,t.defaultOffset=xe,t.defaultTransformValue=Qe,t.defaultValueTypes=Ue,t.degrees=dt,t.delay=$a,t.delayInSeconds=$a,t.dimensionValueTypes=Ii,t.distance=Vc,t.distance2D=function(t,e){const n=Vc(t.x,e.x),i=Vc(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Va,t.easeIn=C,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=I,t.fillOffset=ve,t.fillWildcards=Ye,t.findDimensionValueType=Ni,t.findEffect=_i,t.findValueType=t=>zo.find(Fi(t)),t.flushKeyframeResolvers=vn,t.followValue=Io,t.frame=U,t.frameData=z,t.frameSteps=K,t.generateLinearEasing=Ht,t.getAnimatableNone=Ke,t.getAnimationMap=Zn,t.getComputedStyle=yo,t.getDefaultTransition=ai,t.getDefaultValueType=We,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Cr},t.getFinalKeyframe=Ve,t.getMixer=Ut,t.getOptimisedAppearId=Ci,t.getOriginIndex=Bo,t.getValueAsType=es,t.getValueTransition=ii,t.getVariableValue=gi,t.getVariantContext=Xr,t.getViewAnimationLayerInfo=er,t.getViewAnimations=nr,t.globalProjectionState=za,t.handOffElementState=Qs,t.has2DTranslate=js,t.hasComplexValues=Vt,t.hasReducedMotionListener=Er,t.hasScale=Bs,t.hasTransform=Ls,t.hasWarned=function(t){return y.has(t)},t.hex=ut,t.hover=function(t,e,n={}){const[i,s,o]=oo(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||so())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=vt,t.hslaToRgba=Ct,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=ns(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Ac[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=ge,t.initPrefersReducedMotion=kr,t.interpolate=ye,t.invisibleValues=It,t.isAnimationControls=xr,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=J,t.isControllingVariants=Sr,t.isDeltaZero=va,t.isDragActive=so,t.isDragging=io,t.isEasingArray=L,t.isElementKeyboardAccessible=co,t.isElementTextInput=function(t){return uo.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=Nr,t.isGenerator=Cn,t.isHTMLElement=Qi,t.isKeyframesTarget=Ti,t.isMotionValue=Vi,t.isNear=sa,t.isNodeOrChild=ro,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=ao,t.isSVGElement=ts,t.isSVGSVGElement=Ro,t.isSVGTag=zr,t.isTransitionDefined=ci,t.isVariantLabel=wr,t.isVariantNode=Ar,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Pn()||!e||"string"==typeof e&&(e in Mn||Pn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Pi,t.isZeroValueString=l,t.keyframes=be,t.makeAnimationInstant=In,t.mapEasingToNativeEasing=kn,t.mapValue=function(t,e,n,i){const s=Lo(e,n,i);return Wo(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Hs(t,n),{scroll:s}=e;return s&&(Ks(i.x,s.offset.x),Ks(i.y,s.offset.y)),i},t.measureViewportBox=Hs,t.memo=c,t.microtask=eo,t.millisecondsToSeconds=m,t.mirrorEasing=b,t.mix=Gt,t.mixArray=Wt,t.mixColor=Ft,t.mixComplex=Kt,t.mixImmediate=Rt,t.mixLinearColor=Lt,t.mixNumber=Bt,t.mixObject=zt,t.mixValues=Da,t.mixVisibility=Nt,t.motionValue=ei,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(bl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=et,t.numberValueTypes=$e,t.observeTimeline=Do,t.optimizedAppearDataAttribute=Di,t.optimizedAppearDataId=ki,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:t instanceof Document?t:ns(t)[0]??document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=mi,t.parseValueFromTransform=tn,t.percent=pt,t.pipe=h,t.pixelsToPercent=jr,t.positionalKeys=wi,t.prefersReducedMotion=Pr,t.press=function(t,e,n={}){const[i,s,o]=oo(t,n),r=t=>{const i=t.currentTarget;if(!mo(t))return;if(go.has(t))return;ho.add(i),n.stopPropagation&&go.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),ho.has(i)&&ho.delete(i),mo(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||ro(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Qi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=po(()=>{if(ho.has(n))return;fo(n,"down");const t=po(()=>{fo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>fo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),co(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=yt,t.propEffect=to,t.propagateDirtyNodes=Ja,t.px=ft,t.readSVGValue=Ps,t.readStyleValue=hs,t.readTransformValue=en,t.recordStats=function(){if(Co.value)throw Co.value=null,Co.addProjectionMetrics=null,new Error("Stats are already being measured");const t=Co;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.removeAxisDelta=da,t.removeAxisTransforms=pa,t.removeBoxTransforms=ga,t.removeEffect=qi,t.removeItem=n,t.removePointDelta=ha,t.renderHTML=Lr,t.renderSVG=Kr,t.resize=ko,t.resolveElements=ns,t.resolveMotionValue=Ua,t.resolveTransition=ni,t.resolveVariant=xi,t.resolveVariantFromProps=vi,t.reverseEasing=S,t.rgbUnit=lt,t.rgba=ct,t.rootProjectionNode=Sl,t.scale=it,t.scaleCorrectors=Ir,t.scalePoint=Fs,t.scrapeHTMLMotionValuesFromProps=$r,t.scrapeSVGMotionValuesFromProps=Yr,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return u;const o={axis:e,container:n||i,...s};return"function"==typeof t?mc(n=>t(n[e].progress,n),o):Sc(t,o)},t.scrollInfo=mc,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?io[t]?null:(io[t]=!0,()=>{io[t]=!1}):io.x||io.y?null:(io.x=io.y=!0,()=>{io.x=io.y=!1})},t.setFeatureDefinitions=function(t){Cr=t},t.setStyle=Tn,t.setTarget=Ai,t.spring=me,t.springValue=function(t,e){return Io(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Bo(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=Dn,t.statsBuffer=Co,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=ps,t.styleSubjectEffect=ds,t.supportedWaapiEasing=Mn,t.supportsBrowserAnimation=zn,t.supportsFlags=bn,t.supportsLinearEasing=Pn,t.supportsPartialKeyframes=Gi,t.supportsScrollTimeline=An,t.supportsViewTimeline=Vn,t.svgEffect=Ms,t.svgSubjectEffect=Es,t.sync=Bl,t.testValueType=Fi,t.time=X,t.transform=Lo,t.transformAxis=Ys,t.transformBox=Xs,t.transformBoxPoints=Cs,t.transformPropOrder=sn,t.transformProps=on,t.transformValue=Wo,t.transformValueTypes=Ne,t.translateAxis=Ks,t.updateMotionValuesFromProps=Vr,t.variantPriorityOrder=Tr,t.variantProps=br,t.velocityPerSecond=g,t.vh=mt,t.visualElementStore=vr,t.vw=gt,t.warnOnce=v,t.wrap=x});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion",
3
- "version": "13.4.4",
3
+ "version": "13.4.5",
4
4
  "description": "An animation library for JavaScript and React.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -95,7 +95,7 @@
95
95
  "postpublish": "git push --tags"
96
96
  },
97
97
  "dependencies": {
98
- "framer-motion": "^13.4.4",
98
+ "framer-motion": "^13.4.5",
99
99
  "tslib": "^2.4.0"
100
100
  },
101
101
  "peerDependencies": {
@@ -110,5 +110,5 @@
110
110
  "optional": true
111
111
  }
112
112
  },
113
- "gitHead": "636e725fc71315ca91ff196eb09685017e2fe0c8"
113
+ "gitHead": "bc8570a6459b127462a56fea86c5534402489e1d"
114
114
  }