@ssgoi/core 7.0.3 → 7.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/animation.d.ts +4 -66
- package/dist/animation/animation.d.ts.map +1 -1
- package/dist/animation/integrator/provider.d.ts +1 -1
- package/dist/animation/integrator/provider.d.ts.map +1 -1
- package/dist/animation/web-animation.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.js +1191 -1347
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +543 -707
- package/dist/multi-animation-B5hEmEgN.cjs +1 -0
- package/dist/{multi-animation-ZFZBDBGr.js → multi-animation-DyZGEfKy.js} +72 -128
- package/dist/page-motion-gH3WomQO.cjs +1 -0
- package/dist/page-motion-wmW7PW6B.js +204 -0
- package/dist/resolve-transition-rule-BL12rDDu.cjs +1 -0
- package/dist/resolve-transition-rule-DbkMu0rm.js +160 -0
- package/dist/runtime/animation.d.ts +68 -0
- package/dist/runtime/animation.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +12 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/motion-state.d.ts +25 -0
- package/dist/runtime/motion-state.d.ts.map +1 -0
- package/dist/runtime/page-motion.d.ts +27 -0
- package/dist/runtime/page-motion.d.ts.map +1 -0
- package/dist/runtime/physics.d.ts +30 -0
- package/dist/runtime/physics.d.ts.map +1 -0
- package/dist/runtime/presence.d.ts +20 -0
- package/dist/runtime/presence.d.ts.map +1 -0
- package/dist/runtime/resolve-transition-rule.d.ts +21 -0
- package/dist/runtime/resolve-transition-rule.d.ts.map +1 -0
- package/dist/runtime/timeline.d.ts +12 -0
- package/dist/runtime/timeline.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +53 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +51 -0
- package/dist/ssgoi-transition/navigation-direction.d.ts +3 -4
- package/dist/ssgoi-transition/navigation-direction.d.ts.map +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts.map +1 -1
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts +2 -20
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts.map +1 -1
- package/dist/timeline-L_vXntmP.js +68 -0
- package/dist/timeline-Zoo1I4XU.cjs +1 -0
- package/dist/transitions/fade/transition.d.ts.map +1 -1
- package/dist/transitions/slide/transition.d.ts.map +1 -1
- package/dist/types/index.d.ts +17 -147
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/multi-animation-6124HEke.cjs +0 -1
|
@@ -1,68 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Motion-matching contract:
|
|
6
|
-
* - `getPose()` — snapshot of current values per element
|
|
7
|
-
* - `getTimeline()` — full simulation data per element
|
|
8
|
-
* - `matchInto(poses)` — receive external poses and adjust simulation so a
|
|
9
|
-
* handoff from a different (now-discarded) animation feels continuous
|
|
10
|
-
*
|
|
11
|
-
* Concrete implementations: `WebAnimation` (single element, WAAPI-driven),
|
|
12
|
-
* `MultiAnimation` (composite of other Animations).
|
|
13
|
-
*/
|
|
14
|
-
export declare abstract class Animation {
|
|
15
|
-
/** Run forward: lowerBound → upperBound */
|
|
16
|
-
abstract play(): void;
|
|
17
|
-
/** Run backward: current → lowerBound */
|
|
18
|
-
abstract reverse(): void;
|
|
19
|
-
/** Halt the animation in place — last frame stays applied, no settle/cleanup. */
|
|
20
|
-
abstract pause(): void;
|
|
21
|
-
/** Jump immediately to the final state and fire `onComplete`. */
|
|
22
|
-
abstract complete(): void;
|
|
23
|
-
/** Current playback rate (1 = realtime, 0 = paused, negative = backwards) */
|
|
24
|
-
private _playbackRate;
|
|
25
|
-
get playbackRate(): number;
|
|
26
|
-
set playbackRate(rate: number);
|
|
27
|
-
/** Sample current pose for every element this animation drives */
|
|
28
|
-
abstract getPose(): Pose[];
|
|
29
|
-
/** Full simulation timeline for every element this animation drives */
|
|
30
|
-
abstract getTimeline(): Timeline[];
|
|
31
|
-
/**
|
|
32
|
-
* Adopt poses from a prior animation. Implementations should look up each
|
|
33
|
-
* pose by `id`/`element` and seed their next simulation from that value and
|
|
34
|
-
* velocity. Unknown poses are ignored.
|
|
35
|
-
*/
|
|
36
|
-
abstract matchInto(poses: Pose[]): void;
|
|
37
|
-
/** Fired every frame with the most recent value. Optional. */
|
|
38
|
-
onUpdate?: (poses: Pose[]) => void;
|
|
39
|
-
/** Fired once when the animation settles. */
|
|
40
|
-
onComplete?: () => void;
|
|
41
|
-
/** Simulation tick is actively running (false while paused or settled). */
|
|
42
|
-
abstract get isAnimating(): boolean;
|
|
43
|
-
/** Halted via `pause()` and not yet resumed. */
|
|
44
|
-
abstract get isPaused(): boolean;
|
|
45
|
-
/** Settled — `onComplete` has fired and no further frames will play. */
|
|
46
|
-
abstract get isComplete(): boolean;
|
|
47
|
-
/** Direction of the active or most-recent run (true = backwards). */
|
|
48
|
-
abstract get isReversing(): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Current progress, normalized to 0..1 between lowerBound and upperBound.
|
|
51
|
-
* Reads the live simulation value, so it advances frame-by-frame while
|
|
52
|
-
* playing. Useful for external inspection / debugging.
|
|
53
|
-
*
|
|
54
|
-
* `MultiAnimation` uses this live value for sequence/stagger triggering so
|
|
55
|
-
* delayed WAAPI startup is never mistaken for elapsed animation time.
|
|
56
|
-
*/
|
|
57
|
-
abstract get progress(): number;
|
|
58
|
-
/**
|
|
59
|
-
* Find the time (ms, relative to this animation's last play() / reverse())
|
|
60
|
-
* at which progress first crosses `threshold` (0..1). Returns `null` if
|
|
61
|
-
* the animation has no simulation yet (i.e. play hasn't been called).
|
|
62
|
-
*
|
|
63
|
-
* Implementations should read from the pre-computed simulation timeline so
|
|
64
|
-
* this is an O(n) one-shot lookup — never a polling loop.
|
|
65
|
-
*/
|
|
66
|
-
abstract findTimeForProgress(threshold: number): number | null;
|
|
1
|
+
import { Animation as RuntimeAnimation } from '../runtime/animation';
|
|
2
|
+
import { StyleObject } from '../runtime/motion-state';
|
|
3
|
+
/** Web-compatible default; platform-neutral consumers use @ssgoi/core/runtime. */
|
|
4
|
+
export declare abstract class Animation<TTarget = HTMLElement, TStyle = StyleObject> extends RuntimeAnimation<TTarget, TStyle> {
|
|
67
5
|
}
|
|
68
6
|
//# sourceMappingURL=animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/animation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,kFAAkF;AAClF,8BAAsB,SAAS,CAC7B,OAAO,GAAG,WAAW,EACrB,MAAM,GAAG,WAAW,CACpB,SAAQ,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/lib/animation/integrator/provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/lib/animation/integrator/provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,qBAAa,kBAAkB;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU;IAoE9C;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU;CAGpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/web-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"web-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/web-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;IAC7C,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,gBAAgB,CAA6B;IACrD,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,mBAAmB;IAYrC,IAAI,IAAI,IAAI;IAiBZ,OAAO,IAAI,IAAI;IAQf,KAAK,IAAI,IAAI;IAYb,QAAQ,IAAI,IAAI;IAWhB;;;;;;OAMG;IACH,WAAW,IAAI,IAAI;IAInB,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAED,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAcrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAG5B;IAED,OAAO,IAAI,IAAI,EAAE;IAcjB,WAAW,IAAI,QAAQ,EAAE;IAczB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAS9B,OAAO,CAAC,SAAS;IAiEjB,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,gBAAgB;YASV,cAAc;IAwB5B,OAAO,CAAC,uBAAuB;IA8B/B,OAAO,CAAC,wBAAwB;IAqChC,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,YAAY;CAQrB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var te=Object.defineProperty;var ee=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>ee(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-6124HEke.cjs");class U{constructor(t){E(this,"omega");E(this,"zeta");E(this,"restDelta");E(this,"restSpeed");const{stiffness:n,damping:i}=t,s=1;this.omega=Math.sqrt(n/s),this.zeta=i/(2*Math.sqrt(n*s)),this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD}step(t,n,i){const s=Math.min(i,.033),{omega:o,zeta:r}=this,{position:l,velocity:c}=t,a=-2*s*r*o*c,p=s*o*o*(n-l),u=c+a+p;return{position:l+s*u,velocity:u}}isSettled(t,n){const i=Math.abs(n-t.position),s=Math.abs(t.velocity);return i<this.restDelta&&s<this.restSpeed}}class ne{constructor(t){E(this,"leader");E(this,"follower");E(this,"restDelta");E(this,"restSpeed");this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD,this.leader=new U({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,i,s,o;typeof t.follower=="number"?(n=t.stiffness*t.follower,i=t.damping):t.follower?(n=t.follower.stiffness,i=t.follower.damping,s=t.follower.restDelta,o=t.follower.restSpeed):(n=t.stiffness,i=t.damping),this.follower=new U({stiffness:n,damping:i,restDelta:s??this.restDelta,restSpeed:o??this.restSpeed})}step(t,n,i){const o=t._leader??{position:t.position,velocity:t.velocity},r=this.leader.step(o,n,i),l=this.follower.step(t,r.position,i);return{position:l.position,velocity:l.velocity,_leader:r}}isSettled(t,n){const i=t,s=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return i._leader?Math.abs(n-i._leader.position)<this.restDelta&&Math.abs(i._leader.velocity)<this.restSpeed&&s:s}}const ie=.01,se=500,oe=10;class re{constructor(t){E(this,"acceleration");E(this,"resistance");E(this,"resistanceType");E(this,"min");E(this,"max");E(this,"bounceStiffness");E(this,"bounceDamping");E(this,"restDelta");this.acceleration=t.acceleration,this.resistance=t.resistance,this.resistanceType=t.resistanceType??"quadratic",this.min=t.min,this.max=t.max,this.bounceStiffness=t.bounceStiffness??se,this.bounceDamping=t.bounceDamping??oe,this.restDelta=t.restDelta??ie}step(t,n,i){const s=Math.min(i,.033),{acceleration:o,resistance:r,resistanceType:l,min:c,max:a}=this,{position:p,velocity:u}=t,d=c!==void 0&&p<c,h=a!==void 0&&p>a;let f;if(d||h){const b=p-(d?c:a),$=-this.bounceStiffness*b,x=-this.bounceDamping*u;f=$+x}else{const S=n>p?1:-1;let b;l==="linear"?b=r*u:b=r*u*Math.abs(u),f=S*o-b}const y=u+f*s;let g=p+y*s;if(!d&&!h){const S=n>p?1:-1;(S>0&&g>n||S<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:y}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class w{static from(t){if(t.spring&&t.inertia)throw new Error("Cannot use both 'spring' and 'inertia' together. Choose one physics type.");if(t.inertia)return new re({acceleration:t.inertia.acceleration,resistance:t.inertia.resistance,resistanceType:t.inertia.resistanceType,min:t.inertia.min,max:t.inertia.max,bounceStiffness:t.inertia.bounceStiffness,bounceDamping:t.inertia.bounceDamping,restDelta:t.inertia.restDelta});const n=t.spring??{stiffness:300,damping:30};if(n.doubleSpring){const i=n.doubleSpring;let s;return typeof i=="number"?s=i:typeof i=="object"&&(s={stiffness:i.stiffness,damping:i.damping}),new ne({stiffness:n.stiffness,damping:n.damping,follower:s,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new U({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return w.from({spring:t})}}class ae{constructor(t){E(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,i){const s=n-t.position;if(s===0)return t;const o=Math.sign(s),r=Math.abs(s)/this.durationSec,l=o*r*i,c=t.position+l;return(o>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:o*r}}isSettled(t,n){return Math.abs(t.position-n)<m.POSITION_THRESHOLD}}function Y(e,t){function n(o){let r=0,l=0;const c=o.offsetWidth,a=o.offsetHeight;let p=o;for(;p;)r+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return r-=window.scrollY,l-=window.scrollX,{top:r,left:l,width:c,height:a}}const i=n(e),s=n(t);return new DOMRect(s.left-i.left,s.top-i.top,s.width,s.height)}function N(e,t){const n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=e.offsetWidth>0?n.width/e.offsetWidth:1,o=e.offsetHeight>0?n.height/e.offsetHeight:1;return new DOMRect((i.left-n.left)/s,(i.top-n.top)/o,i.width/s,i.height/o)}function T(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-s}}function Lt(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y-s,height:n.clientHeight}}const ct=8,pt={spring:{stiffness:600,damping:40,doubleSpring:1.2}};function le({direction:e}){const t=e==="forward"?ct:-ct;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${t}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${t*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function ce(){return{outPhysics:pt,inPhysics:pt,composition:{mode:"parallel",startAt:[0,0]},build:le}}const ut=30,pe={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ue={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function de({direction:e}){const t=e==="forward"?1:-1,n=-ut*t,i=ut*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${n*s}px, 0, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${i}px, 0, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(${i*(1-s)}px, 0, 0)`,opacity:`${s}`})}}}function fe(){return{outPhysics:pe,inPhysics:ue,composition:{mode:"sequence"},build:de}}const he={snappy:ce(),fluid:fe()},dt=8,ye={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},me={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ge({direction:e}){const t=e==="forward"?1:-1,n=-dt*t,i=dt*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(0, ${n*s}px, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${i}px, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(0, ${i*(1-s)}px, 0)`,opacity:`${s}`})}}}function be(){return{outPhysics:ye,inPhysics:me,composition:{mode:"sequence"},build:ge}}const we=40,Se={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},xe={spring:{stiffness:400,damping:30,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function Ce(e){const t=we;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${t}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${t*(1-n)}px, 0)`,opacity:`${n}`})}}}function $e(){return{outPhysics:Se,inPhysics:xe,composition:{mode:"parallel",startAt:[0,0]},build:Ce}}const ft=be(),Ee={snappy:ft,directional:ft,"non-directional":$e()},ht={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},X=.1,B=1/3,yt=e=>Math.max(0,Math.min(1,e));function Ae({direction:e}){const t=e==="forward"?1:-1,n=1-t*X;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`scale(${1+t*i*X})`,opacity:`${yt(1-i/B)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:i=>({transform:`scale(${n+t*i*X})`,opacity:`${yt((i-B)/(1-B))}`})}}}function Pe(){return{outPhysics:ht,inPhysics:ht,composition:{mode:"parallel"},build:Ae}}const mt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},Z=.1,G=1/3,gt=e=>Math.max(0,Math.min(1,e));function _e(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${gt(1-e/G)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-Z})`,opacity:"0"},animate:e=>({transform:`scale(${1-Z+e*Z})`,opacity:`${gt((e-G)/(1-G))}`})}}}function Ie(){return{outPhysics:mt,inPhysics:mt,composition:{mode:"parallel"},build:_e}}const bt=Pe(),Re={snappy:bt,directional:bt,"non-directional":Ie()},Oe={x:he,y:Ee,z:Re};function ve(e,t){const n=Oe[e];return n[t]??n.snappy}const Te="x",De="snappy";function wt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,i]of Object.entries(t.startStyle))e.style[n]=i}function Yt(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function Fe(e){Yt(e),e.style.pointerEvents=""}const Me=(e={})=>{const t=e.type??Te,n=e.feel??De,i=ve(t,n);return{prepare:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});return s.then(c=>{wt(c,l.out),c.style.pointerEvents="none"}),o.then(c=>{wt(c,l.in)}),{}},animation:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});if(t==="z"){const p=T(r,"from"),u=T(r,"to");s.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,o.style.clipPath=`inset(${u.top}px 0 calc(100% - ${u.top+u.height}px) 0)`}const c=new m.WebAnimation({element:s,integrator:w.from(i.outPhysics),style:p=>l.out.animate(p),onComplete:()=>Fe(s)}),a=new m.WebAnimation({element:o,integrator:w.from(i.inPhysics),style:p=>l.in.animate(p),onComplete:()=>Yt(o)});return new m.MultiAnimation([c,a],i.composition)}}};function Le(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function Ye(e={}){const t=e.type??"x",n=e.variant,i=e.feel,s=Le(t,n,i);return Me({type:t,feel:s})}const ke={spring:{stiffness:200,damping:22}},He=10,Ne="horizontal",We="#000000";function St(e,t,n,i,s,o){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const l=document.createElement("div");l.style.cssText=`
|
|
1
|
+
"use strict";var te=Object.defineProperty;var ee=(t,e,n)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>ee(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-B5hEmEgN.cjs"),g=require("./page-motion-gH3WomQO.cjs"),Yt=require("./timeline-Zoo1I4XU.cjs");class ne{constructor(e){F(this,"durationSec");this.durationSec=Math.max(1/60,e.durationSec)}step(e,n,o){const i=n-e.position;if(i===0)return e;const s=Math.sign(i),r=Math.abs(i)/this.durationSec,l=s*r*o,c=e.position+l;return(s>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:s*r}}isSettled(e,n){return Math.abs(e.position-n)<Yt.POSITION_THRESHOLD}}function k(t,e){function n(s){let r=0,l=0;const c=s.offsetWidth,a=s.offsetHeight;let p=s;for(;p;)r+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return r-=window.scrollY,l-=window.scrollX,{top:r,left:l,width:c,height:a}}const o=n(t),i=n(e);return new DOMRect(i.left-o.left,i.top-o.top,i.width,i.height)}function W(t,e){const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=t.offsetWidth>0?n.width/t.offsetWidth:1,s=t.offsetHeight>0?n.height/t.offsetHeight:1;return new DOMRect((o.left-n.left)/i,(o.top-n.top)/s,o.width/i,o.height/s)}function O(t,e){const{scrollingElement:n,positionedParent:o}=t,i=n!==o&&n.contains(o)?k(n,o).top:0;return{top:t[e].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-i}}function Dt(t,e){const{scrollingElement:n,positionedParent:o}=t,i=n!==o&&n.contains(o)?k(n,o).top:0;return{top:t[e].scroll.y-i,height:n.clientHeight}}const lt=8,ct={spring:{stiffness:600,damping:40,doubleSpring:1.2}};function oe({direction:t}){const e=t==="forward"?lt:-lt;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${e}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${e*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function ie(){return{outPhysics:ct,inPhysics:ct,composition:{mode:"parallel",startAt:[0,0]},build:oe}}const pt=30,re={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},se={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ae({direction:t}){const e=t==="forward"?1:-1,n=-pt*e,o=pt*e;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`translate3d(${n*i}px, 0, 0)`,opacity:`${1-i}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${o}px, 0, 0)`,opacity:"0"},animate:i=>({transform:`translate3d(${o*(1-i)}px, 0, 0)`,opacity:`${i}`})}}}function le(){return{outPhysics:re,inPhysics:se,composition:{mode:"sequence"},build:ae}}const ce={snappy:ie(),fluid:le()},ut=8,pe={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ue={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function de({direction:t}){const e=t==="forward"?1:-1,n=-ut*e,o=ut*e;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`translate3d(0, ${n*i}px, 0)`,opacity:`${1-i}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${o}px, 0)`,opacity:"0"},animate:i=>({transform:`translate3d(0, ${o*(1-i)}px, 0)`,opacity:`${i}`})}}}function fe(){return{outPhysics:pe,inPhysics:ue,composition:{mode:"sequence"},build:de}}const ye=40,he={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},me={spring:{stiffness:400,damping:30,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function ge(t){const e=ye;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${e}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${e*(1-n)}px, 0)`,opacity:`${n}`})}}}function be(){return{outPhysics:he,inPhysics:me,composition:{mode:"parallel",startAt:[0,0]},build:ge}}const dt=fe(),we={snappy:dt,directional:dt,"non-directional":be()},ft={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},U=.1,X=1/3,yt=t=>Math.max(0,Math.min(1,t));function Se({direction:t}){const e=t==="forward"?1:-1,n=1-e*U;return{out:{willChange:"transform, opacity",startStyle:{},animate:o=>({transform:`scale(${1+e*o*U})`,opacity:`${yt(1-o/X)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:o=>({transform:`scale(${n+e*o*U})`,opacity:`${yt((o-X)/(1-X))}`})}}}function xe(){return{outPhysics:ft,inPhysics:ft,composition:{mode:"parallel"},build:Se}}const ht={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},B=.1,Z=1/3,mt=t=>Math.max(0,Math.min(1,t));function Ce(){return{out:{willChange:"opacity",startStyle:{},animate:t=>({opacity:`${mt(1-t/Z)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-B})`,opacity:"0"},animate:t=>({transform:`scale(${1-B+t*B})`,opacity:`${mt((t-Z)/(1-Z))}`})}}}function $e(){return{outPhysics:ht,inPhysics:ht,composition:{mode:"parallel"},build:Ce}}const gt=xe(),Ee={snappy:gt,directional:gt,"non-directional":$e()},Pe={x:ce,y:we,z:Ee};function Ae(t,e){const n=Pe[t];return n[e]??n.snappy}const Ie="x",ve="snappy";function bt(t,e){t.style.willChange=e.willChange,t.style.backfaceVisibility="hidden",t.style.contain="layout paint";for(const[n,o]of Object.entries(e.startStyle))t.style[n]=o}function kt(t){t.style.willChange="auto",t.style.backfaceVisibility="",t.style.contain="",t.style.transform="",t.style.opacity="",t.style.clipPath=""}function _e(t){kt(t),t.style.pointerEvents=""}const Re=(t={})=>{const e=t.type??Ie,n=t.feel??ve,o=Ae(e,n);return{prepare:({from:i,to:s,context:r})=>{const l=o.build({direction:r.direction});return i.then(c=>{bt(c,l.out),c.style.pointerEvents="none"}),s.then(c=>{bt(c,l.in)}),{}},animation:({from:i,to:s,context:r})=>{const l=o.build({direction:r.direction});if(e==="z"){const p=O(r,"from"),u=O(r,"to");i.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,s.style.clipPath=`inset(${u.top}px 0 calc(100% - ${u.top+u.height}px) 0)`}const c=new m.WebAnimation({element:i,integrator:g.IntegratorProvider.from(o.outPhysics),style:p=>l.out.animate(p),onComplete:()=>_e(i)}),a=new m.WebAnimation({element:s,integrator:g.IntegratorProvider.from(o.inPhysics),style:p=>l.in.animate(p),onComplete:()=>kt(s)});return new m.MultiAnimation([c,a],o.composition)}}};function Oe(t,e,n){return t==="y"?e==="non-directional"?"non-directional":"directional":t!=="x"||e==="snappy"||n==="snappy"?"snappy":"fluid"}function Fe(t={}){const e=t.type??"x",n=t.variant,o=t.feel,i=Oe(e,n,o);return Re({type:e,feel:i})}const Te={spring:{stiffness:200,damping:22}},Me=10,Ye="horizontal",De="#000000";function wt(t,e,n,o,i,s){window.getComputedStyle(t).position==="static"&&(t.style.position="relative");const l=document.createElement("div");l.style.cssText=`
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -7,29 +7,29 @@
|
|
|
7
7
|
pointer-events: none;
|
|
8
8
|
z-index: 9999;
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
`;const c=[];for(let a=0;a<
|
|
10
|
+
`;const c=[];for(let a=0;a<e;a++){const p=document.createElement("div");if(n==="horizontal"){const u=100/e;p.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: ${u*a}%;
|
|
13
13
|
left: 0;
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: calc(${u}% + 1px);
|
|
16
|
-
background: ${
|
|
17
|
-
transform: scaleX(${
|
|
18
|
-
transform-origin: ${
|
|
16
|
+
background: ${o};
|
|
17
|
+
transform: scaleX(${i==="hidden"?0:1});
|
|
18
|
+
transform-origin: ${s} center;
|
|
19
19
|
will-change: transform;
|
|
20
|
-
`}else{const u=100/
|
|
20
|
+
`}else{const u=100/e;p.style.cssText=`
|
|
21
21
|
position: absolute;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: ${u*a}%;
|
|
24
24
|
width: calc(${u}% + 1px);
|
|
25
25
|
height: 100%;
|
|
26
|
-
background: ${
|
|
27
|
-
transform: scaleY(${
|
|
28
|
-
transform-origin: ${
|
|
26
|
+
background: ${o};
|
|
27
|
+
transform: scaleY(${i==="hidden"?0:1});
|
|
28
|
+
transform-origin: ${s==="left"?"top":"bottom"} center;
|
|
29
29
|
will-change: transform;
|
|
30
|
-
`}c.push(p),l.appendChild(p)}return
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
)`}function K(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ae({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(pn(t,r)),onComplete:s})}const fn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??an,n=rn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const c=T(l,"from"),a=T(l,"to"),p=Y(document.body,l.positionedParent),u=dn(t,{...c,top:p.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(u[d]);return o.then(d=>{Et(d,c),At(d,c),d.style.transform=`translateY(${-c.top}px)`}),r.then(d=>{Et(d,a),At(d,a),d.style.transform=`translateY(${-a.top+a.height}px) scale(${n})`}),{borders:u,fromRect:c,toRect:a}},animation:({from:o,to:r,context:l,borders:c,fromRect:a,toRect:p})=>{const u=$t({rect:a,scale:n,direction:"out",override:i}),d=$t({rect:p,scale:n,direction:"in",override:i}),h=K(o,u.snapshots,u.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=K(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),y=un.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return K(c[C],u.snapshots,u.totalDuration,_=>{const P=(a.width-a.width*_.scale)/2*.7*b,A=(a.height-a.height*_.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([h,f,...y],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=c[$];x.parentElement===b&&b.removeChild(x)}},g}}};function hn(e={}){const{options:t}=e,n=(t==null?void 0:t.borderColor)!==void 0?{border:{color:t.borderColor}}:void 0;return fn(n)}function yn(e){if(!e)return null;if(e.includes("/")){const n=e.split("/");if(n.length!==2)return null;const i=Number.parseFloat(n[0]??""),s=Number.parseFloat(n[1]??"");return Number.isFinite(i)&&Number.isFinite(s)&&i>0&&s>0?i/s:null}const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function mn(e){return e==="contain"||e==="cover"?e:null}function st(e){return e.tagName==="IMG"}function gn(e){if(st(e))return e;if(e.tagName==="PICTURE"||e.tagName==="VIDEO")return null;const t=[];for(const n of Array.from(e.children)){const i=n;st(i)&&t.push(i)}return t.length===1?t[0]??null:null}function bn(e){var c,a;if(!st(e))return null;const t=e,n=t.naturalWidth,i=t.naturalHeight;if(typeof n=="number"&&typeof i=="number"&&Number.isFinite(n)&&Number.isFinite(i)&&n>0&&i>0)return n/i;const s=((c=e.getAttribute("width"))==null?void 0:c.trim())??"",o=((a=e.getAttribute("height"))==null?void 0:a.trim())??"",r=s===""?Number.NaN:Number(s),l=o===""?Number.NaN:Number(o);return Number.isFinite(r)&&Number.isFinite(l)&&r>0&&l>0?r/l:null}function wn(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function V(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function Sn(e){const t=V(e),n=wn(t.objectPosition??"");return{fit:n?mn(t.objectFit??null):null,centered:n}}function Ht(e){if(!e)return 0;const t=/^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(e.trim());if(!t)return null;const n=Number.parseFloat(t[1]??"");return Number.isFinite(n)&&n>=0?n:null}function Pt(e){const t=V(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ht),i=n[0];if(i==null)return{radius:0,supported:!1};const s=n.every(o=>o!==null&&Math.abs(o-i)<.001);return{radius:s?i:0,supported:s}}function xn(e,t){var s;if(!t)return null;const n=(s=e.getAttribute(t))==null?void 0:s.trim();if(n==null||n==="")return null;const i=Number.parseFloat(n);return Number.isFinite(i)&&i>=0?i:null}function Cn(e){const t=V(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ht(i)===0:!0)}function $n(e){const t=V(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function O(e){return e.left+e.width/2}function v(e){return e.top+e.height/2}function lt(e,t){return{top:Math.max(0,t.top-e.top),right:Math.max(0,e.left+e.width-(t.left+t.width)),bottom:Math.max(0,e.top+e.height-(t.top+t.height)),left:Math.max(0,t.left-e.left)}}function En(e,t){const n=Math.max(e.left,t.left),i=Math.max(e.top,t.top),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height);return s>n&&o>i?{left:n,top:i,width:s-n,height:o-i}:null}function _t(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function An(e,t,n){const i=e.width/e.height;let s,o;return n==="contain"?i>t?(o=e.height,s=o*t):(s=e.width,o=s/t):i>t?(s=e.width,o=s/t):(o=e.height,s=o*t),{left:e.left+(e.width-s)/2,top:e.top+(e.height-o)/2,width:s,height:o}}function Nt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?An(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:lt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function ot(e,t,n){return{...Nt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Wt(e,t){const n=e.aspectRatio,i=t.aspectRatio;return e.contentAware&&t.contentAware&&n!==null&&i!==null&&Math.abs(n-i)/Math.max(n,i)<.01}function It(e){return ot(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function zt(e,t){return Wt(e,t)?[e,t]:[It(e),It(t)]}function rt(e,t,n,i){const s=gn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?yn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?bn(s):null),c=s?Sn(s):{fit:null,centered:!0},a=c.centered&&(s===null||Cn(s))?c.fit??(r!==null?i.fallbackFit??null:null):null,p=Nt(o,l,a),u=$n(e),h=s!==null&&s!==e&&u?En(p.window,t):p.window,f=xn(e,i.legacyRadiusAttribute),y=s===e||u,g=y?Pt(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];h&&y&&_t(h,t)&&$.push(g),h&&s&&_t(h,o)&&$.push(Pt(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),_=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!h||P==="unsupported"?ot(t,S,b):{...p,bbox:t,window:h,clipInset:lt(p.content,h),radius:_,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:p.contentAware?s:null}}function Ut(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:O(e)+(O(n)-O(t))/i-o/2,top:v(e)+(v(n)-v(t))/s-r/2,width:o,height:r}}const Pn={enter:"contain",exit:"cover",legacy:"contain"};function F(e){return Pn[e]}const Rt="data-hero-enter-key",Ot="data-hero-exit-key",J="data-hero-key";class _n{constructor(){E(this,"previousFromOpacity","")}prepare(t){t.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(t){return t.onComplete(()=>{t.from.style.opacity=this.previousFromOpacity}),[]}}const In=()=>new _n;class Rn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,c=n.style.willChange,a=i.style.willChange;return i.style.opacity="0",n.style.willChange="opacity",i.style.willChange="opacity",o(()=>{n.style.opacity=r,i.style.opacity=l,n.style.willChange=c,i.style.willChange=a}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(p,u)=>({opacity:u})}),new m.WebAnimation({element:i,integrator:w.from(s),style:p=>({opacity:p})})]}}const On=()=>new Rn,vn={static:In,fade:On},Tn={spring:{stiffness:320,damping:30}},Dn=()=>Tn,Fn={spring:{stiffness:300,damping:30,doubleSpring:1}},Mn=()=>Fn,Ln={default:Dn,smooth:Mn},Yn=700,kn="data-hero-aspect-ratio",Hn="data-hero-radius";function vt(e,t,n){const i=Y(e,t);return rt(t,i,s=>Y(e,s),{fallbackFit:n,legacyAspectRatioAttribute:kn,legacyRadiusAttribute:Hn})}function W(e,t){const n=new Map,i=e.querySelectorAll(`[${t}]`);for(const s of Array.from(i)){const o=s.getAttribute(t);o&&(n.has(o)||n.set(o,s))}return n}function Nn(e,t){const n=[],i=W(t,Rt),s=W(e,Ot);for(const[l,c]of i){const a=s.get(l);a&&n.push({key:l,fromEl:a,toEl:c,fromFit:F("exit"),toFit:F("enter")})}const o=W(e,Rt),r=W(t,Ot);for(const[l,c]of o){const a=r.get(l);a&&n.push({key:l,fromEl:c,toEl:a,fromFit:F("enter"),toFit:F("exit")})}return n}function Wn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${J}]`));for(const s of i){const o=s.getAttribute(J);if(!o)continue;const r=e.querySelector(`[${J}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:F("legacy"),toFit:F("legacy")})}return n}function zn(e,t){const n=Nn(e,t);return n.length>0?n:Wn(e,t)}function Un(e,t){return zt(e,t)}function Vn(e,t){return e.radiusSource==="unsupported"||t.radiusSource==="unsupported"?!1:e.mediaElement!==null||t.mediaElement!==null||e.radiusSource==="computed"||e.radiusSource==="legacy"||t.radiusSource==="computed"||t.radiusSource==="legacy"}function Xn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Un(vt(e,i,t.fromFit),vt(e,s,t.toFit)),l=o.content,c=o.window,a=r.content,p=r.window,u=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",h=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||c.width===0||c.height===0||a.width===0||a.height===0||p.width===0||p.height===0)return null;const y=Math.max(l.width/a.width,l.height/a.height),g=O(l),S=v(l),b=O(a),$=v(a),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const _=lt(a,Ut(a,l,c,y,y));return{toContent:a,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Vn(o,r),styleFor:(P,A)=>{const k=A*x,M=A*C,H=P+A*y,jt=Math.max(0,h*A+f*P)/Math.max(Math.abs(H),1e-6),qt=_.top*A+u.top*P,Kt=_.right*A+u.right*P,Jt=_.bottom*A+u.bottom*P,Qt=_.left*A+u.left*P;return{transform:`translate(${k}px, ${M}px) scale(${H})`,clipPath:`inset(${qt}px ${Kt}px ${Jt}px ${Qt}px round ${jt}px)`}}}}function Bn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Zn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const c of n.pairs){const a=Xn(s,c,o);if(!a)continue;const{fromVisualEl:p,toVisualEl:u}=a,d=u.cloneNode(!0);d.style.position="absolute",d.style.left=`${a.toContent.left}px`,d.style.top=`${a.toContent.top}px`,d.style.width=`${a.toContent.width}px`,d.style.height=`${a.toContent.height}px`,d.style.margin="0",d.style.transformOrigin="center center",d.style.zIndex="1000",d.style.willChange="transform, clip-path",d.style.pointerEvents="none",d.style.maxWidth="none",d.style.maxHeight="none",a.resetCloneRadius&&(d.style.borderRadius="0"),Bn(d,a.styleFor(0,1)),s.appendChild(d);const h=p.style.opacity,f=u.style.opacity;p.style.opacity="0",u.style.opacity="0",r(()=>{p.style.opacity=h,u.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:a.styleFor}))}return l}}function Gn(e){return[new Zn,vn[e.type]()]}const jn=e=>{const t=Gn(e),n=Ln[e.variant](),i=Yn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([c,a])=>({pairs:zn(c,a)})),r={from:s.from,to:s.to,resolved:o};for(const c of t)(l=c.prepare)==null||l.call(c,r);return o.then(c=>({resolved:c}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const c=[],a=f=>{c.push(f)},p={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:a},u=[];for(const f of t)f.contribute&&u.push(...f.contribute(p));if(u.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(u,{mode:"parallel"}),h=d.onComplete;return d.onComplete=()=>{h==null||h();for(const f of c)try{f()}catch(y){console.error("[hero] cleanup error",y)}},d}}};function qn(e={}){const t=e.type??"static",n=e.variant??"default";return jn({type:t,variant:n})}const Kn={spring:{stiffness:50,damping:30}},Jn={spring:{stiffness:80,damping:25}},Qn=(e={})=>{const t=e.physics??Kn,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(c=>{c.style.opacity="1"}),r.then(c=>{const a=T(l,"to"),p=Math.min(a.width,a.height)*.4;c.style.setProperty("--max-border-radius",`${p}px`),c.style.setProperty("--border-radius-scale","1"),c.style.willChange="transform",c.style.backfaceVisibility="hidden";const u=a.left+a.width/2,d=a.top+a.height/2;c.style.transformOrigin=`${u}px ${d}px`,c.style.position="fixed",c.style.top=`${a.top}px`,c.style.left=`${a.left}px`,c.style.width=`${a.width}px`,c.style.height=`${a.height}px`,c.style.zIndex="1000",c.style.overflow="hidden",c.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,c.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",c.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(Jn),style:(a,p)=>({opacity:p}),onComplete:()=>{o.style.opacity=""}}),c=new m.WebAnimation({element:r,integrator:w.from(t),style:a=>{let p;if(a<=.05)p=i;else if(a<=s){const f=(a-.05)/(s-.05),y=Math.pow(f,9);p=i+(.8-i)*y}else{const f=(a-s)/(1-s);p=.8+.2*(1-Math.pow(1-f,3))}const u=.7;let d;if(a<=u)d=n;else{const f=(a-u)/(1-u),y=1-Math.pow(1-f,2);d=n*(1-y)}let h;if(a<=u)h=1;else{const f=(a-u)/(1-u);h=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":h.toFixed(4)}},onComplete:()=>{r.style.willChange="",r.style.backfaceVisibility="",r.style.removeProperty("--max-border-radius"),r.style.removeProperty("--border-radius-scale"),r.style.transform="",r.style.transformOrigin="",r.style.position="",r.style.zIndex="",r.style.top="",r.style.left="",r.style.width="",r.style.height="",r.style.overflow="",r.style.borderRadius=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function ti(e={}){return Qn()}const ei={spring:{stiffness:100,damping:30}},ni=(e={})=>{const t=e.physics??ei;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),i.then(s=>{s.style.opacity="0",s.style.transform="rotate(-180deg)",s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>({transform:`rotate(${r*180}deg)`,opacity:r<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>({transform:`rotate(${-l*180}deg)`,opacity:r>.5?1:0}),onComplete:()=>{i.style.willChange="auto",i.style.transform="",i.style.transformOrigin="",i.style.opacity=""}});return new m.MultiAnimation([s,o],{mode:"parallel"})}}};function ii(e={}){return ni()}const si={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},oi=(e={})=>{const t=e.physics??si,n=e.directional??!0;return{prepare:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?I:R,c=r?R:I;return i.then(a=>{a.style.zIndex=l,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),s.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=c}),{}},animation:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?R:I,c=i.offsetHeight,a=s.offsetHeight,p=window.innerHeight,u=Math.max(Math.min(c,a),p),d=new m.WebAnimation({element:i,integrator:w.from(t),style:f=>({transform:`translate3d(0, ${r?-u*f:u*f}px, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.pointerEvents="",i.style.zIndex=""}}),h=new m.WebAnimation({element:s,integrator:w.from(t),style:(f,y)=>({transform:`translate3d(0, ${r?y*u:y*-u}px, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.position==="relative"&&(s.style.position=""),s.style.zIndex===l&&(s.style.zIndex="")}});for(const f of[d,h]){const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation([d,h],{mode:"parallel"})}}};function ri(e={}){const{type:t="directional"}=e;return oi({directional:t==="directional"})}const ai={spring:{stiffness:200,damping:24}},li={inertia:{acceleration:25,resistance:1.2}},Q=.2;function ci(){return{enterPhysics:ai,exitPhysics:li,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-Q*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-Q+Q*e})`,opacity:e})}}}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.08,di=16,et=.6,fi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function hi(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-tt*e})`,opacity:1-(1-et)*e}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:et+(1-et)*e})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=fi(di*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const yi={spring:{stiffness:230,damping:25}},mi={spring:{stiffness:230,damping:25}};function gi(){return{enterPhysics:yi,exitPhysics:mi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const bi={static:gi(),"background-scale":ci(),blur:hi()},wi="static",Si="transform",xi=(e={})=>{const t=bi[e.type??wi],n=t.background,i=t.overlay,s=n.willChange!=="";return{prepare:({from:o,to:r,context:l,createElement:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?r:o,u=a==="enter"?o:r;p.then(h=>{h.style.willChange=Si,h.style.backfaceVisibility="hidden",h.style.contain="layout paint",h.style.zIndex=R,a==="enter"?h.style.position="relative":h.style.pointerEvents="none"}),u.then(h=>{s&&(h.style.willChange=n.willChange,h.style.backfaceVisibility="hidden",h.style.contain="layout paint"),h.style.zIndex=I,a==="enter"?h.style.pointerEvents="none":h.style.position="relative"});let d;return i&&(d=c("sheet-overlay"),Object.assign(d.style,i.initialStyle),d.style.willChange=i.willChange,l.positionedParent.appendChild(d)),{overlay:d}},animation:({from:o,to:r,context:l,overlay:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?t.enterPhysics:t.exitPhysics,u=a==="enter"?r:o,d=a==="enter"?o:r,h=T(l,a==="enter"?"to":"from"),f=()=>{o.style.pointerEvents="",o.style.zIndex=""},y=()=>{const x=a==="enter"?R:I;r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===x&&(r.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};u.style.clipPath=`inset(${h.top}px 0 calc(100% - ${h.top+h.height}px) 0)`;const S=a==="enter"?(x,C)=>({transform:`translate3d(0, ${C*h.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*h.height}px, 0)`}),b=new m.WebAnimation({element:u,integrator:w.from(p),style:S,onComplete:()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.contain="",u.style.clipPath="",u.style.transform="",f(),y()}});g(b);const $=[b];if(s){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=T(l,a==="enter"?"from":"to"),_=C.left+C.width/2,P=C.top+C.height/2;d.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,d.style.transformOrigin=`${_}px ${P}px`;const A=a==="enter"?(M,H)=>n.enterStyle(M,H):M=>n.exitStyle(M),k=new m.WebAnimation({element:d,integrator:w.from(p),style:A,onComplete:()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.contain="",d.style.clipPath="",d.style.transformOrigin="",d.style.transform="",d.style.opacity="",d.style.height=""}});g(k),$.push(k)}if(c&&i){c.style.zIndex=kt;const x=Lt(l,"to");c.style.top=`${x.top}px`,c.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:c,integrator:w.from(p),style:C=>i.style(a,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ci(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function $i(e={}){const t=e.type,n=Ci(t);return xi({type:n})}const Ei={spring:{stiffness:170,damping:22,doubleSpring:.8}},Ai=(e={})=>{const t=e.physics??Ei;return{prepare:({from:n,to:i,context:s})=>{const o=s.direction==="forward";return n.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),i.then(r=>{const l=o?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}},animation:({from:n,to:i,context:s})=>{const o=s.direction==="forward",r=new m.WebAnimation({element:n,integrator:w.from(t),style:c=>({transform:`translate3d(${o?-100*c:100*c}%, 0, 0)`}),onComplete:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transform="",n.style.pointerEvents=""}}),l=new m.WebAnimation({element:i,integrator:w.from(t),style:(c,a)=>({transform:`translate3d(${o?a*100:a*-100}%, 0, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Pi(e={}){return Ai()}const _i={spring:{stiffness:17,damping:6}},nt=20,z=800,Ii=(e={})=>{const t=e.physics??_i;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${z}px) rotateY(0deg) translate3d(0%, 0, 0)`}),i.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${z}px) rotateY(${nt}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>{const l=-r*nt,c=r*100;return{transform:`perspective(${z}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>{const c=l*nt,a=-l*100;return{transform:`perspective(${z}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{i.style.transform="",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}});return new m.MultiAnimation([s,o],{mode:"sequence"})}}};function Ri(e={}){return Ii()}function Oi(e,t){return t.left>=e.left-.01&&t.top>=e.top-.01&&t.left+t.width<=e.left+e.width+.01&&t.top+t.height<=e.top+e.height+.01}function Vt(e){const t=()=>({enterContent:e.enterRect,exitContent:e.exitRect,startWindow:e.enterRect,scaleX:e.exitRect.width/e.enterRect.width,scaleY:e.exitRect.height/e.enterRect.height}),{enterMedia:n,exitMedia:i}=e;if(!n||!i||!Wt(n,i))return t();const s=n.content,o=i.content;if(s.width<=0||s.height<=0||o.width<=0||o.height<=0)return t();const r=o.width/s.width,l=o.height/s.height,c=Ut(s,o,i.window,r,l);return Oi(n.window,c)?{enterContent:s,exitContent:o,startWindow:c,scaleX:r,scaleY:l}:t()}function Xt(e,t){return{top:e.top/t.height*100,right:(t.width-(e.left+e.width))/t.width*100,bottom:(t.height-(e.top+e.height))/t.height*100,left:e.left/t.width*100}}function Bt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function vi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,s*y+i*(1-y)),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y}px, ${d*y}px) scale(${g}, ${S})`}}}}function Ti(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,i*(1-y)+s*y),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y-n.x}px, ${d*y}px) scale(${g}, ${S})`}}}}const Di={spring:{stiffness:380,damping:30,restDelta:.1,restSpeed:.1,doubleSpring:{stiffness:260,damping:30}}},Zt=.12,Fi=18;function Mi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}function Li(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}const it={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=`blur(${Fi*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Yi{constructor(){E(this,"physics",Di)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,c=r?Mi():Li();return c&&(l.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(a,p)=>c.animate(p):a=>c.animate(a)})]}}class ki{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,it.initialStyle),n.style.willChange=it.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=kt;const i=Lt(t.context,"to");return n.style.top=`${i.top}px`,n.style.height=`${i.height}px`,[new m.WebAnimation({element:n,integrator:w.from(t.physics),style:s=>it.style(t.resolved.mode,s)})]}}const Hi={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}};function Ni({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2+n.x,s=e.top-t.top+(e.height-t.height)/2+n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a-n.x}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}function Wi({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2-n.x,s=e.top-t.top+(e.height-t.height)/2-n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}class zi{constructor(){E(this,"physics",Hi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",c=l?n:i,a=l?Ni(o):Wi(o);return a&&(c.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:c,integrator:w.from(r),style:l?(p,u)=>a.animate(u):p=>a.animate(p)})]}}const Ui={spring:{stiffness:530,damping:34,doubleSpring:1}};class Vi{constructor(){E(this,"physics",Ui)}contribute(t){return[]}}const Xi={expand:()=>new zi,static:()=>new Vi,blur:()=>new Yi};function Bi(e){return Xi[e]()}const at="data-zoom-enter-key",Tt="data-zoom-exit-key",Dt="data-zoom-radius";function Zi(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function Gi(e,t){const n=[];let i=t;for(;i&&i!==e;){const s=i.parentElement;if(!s)break;for(const o of Array.from(s.children))o!==i&&o instanceof HTMLElement&&n.push(o);i=s}return n}function Ft(e){const t=e.querySelectorAll(`[${at}]`);return t.length!==1?null:t[0]}function Mt(e,t){const n=e.querySelectorAll(`[${Tt}]`);for(const i of n)if(i.getAttribute(Tt)===t)return i;return null}function ji(e,t,n){if(n==="forward"){const r=Ft(t);if(!r)return null;const l=r.getAttribute(at);if(!l)return null;const c=Mt(e,l);return c?{mode:"enter",enterEl:r,exitEl:c}:null}const i=Ft(e);if(!i)return null;const s=i.getAttribute(at);if(!s)return null;const o=Mt(t,s);return o?{mode:"exit",enterEl:i,exitEl:o}:null}function qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=N(s,e.enterEl),l=N(o,e.exitEl),c=rt(e.enterEl,r,g=>N(s,g),{legacyRadiusAttribute:Dt}),a=rt(e.exitEl,l,g=>N(o,g),{legacyRadiusAttribute:Dt}),[p,u]=zt(c,a),d=p.contentAware&&u.contentAware,h=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:h.width,height:h.height},y=p.radiusSource==="legacy"||Zi(p.window,f)?p.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:p,exitMedia:u}:{},pageRect:h,scrollOffset:i,enterRadius:y,exitRadius:u.radius}}class Ki{prepare(t){t.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r,onComplete:l}=t,c=s.mode==="enter",a=c?vi(o):Ti(o),p=c?i:n,u=c?"t":"u";a&&(p.style.transformOrigin=a.transformOrigin);const d=c?I:R,h=c?R:I,f=n.style.zIndex;n.style.zIndex=d;const y=i.style.zIndex,g=i.style.position;return i.style.zIndex=h,i.style.position="relative",l(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",n.style.zIndex=f,i.style.zIndex===h&&(i.style.zIndex=y),i.style.position==="relative"&&(i.style.position=g),i.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new m.WebAnimation({element:p,integrator:w.from(r),style:u==="t"?S=>a.animate(S):(S,b)=>a.animate(b)})]}}class Ji{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,c=Gi(l,n.enterEl);if(c.length===0)return[];const a=c.map(p=>p.style.opacity);if(n.mode==="enter")for(const p of c)p.style.opacity="0";return r(()=>{for(let p=0;p<c.length;p++){const u=c[p];u&&(u.style.opacity=a[p]??"")}}),c.map(p=>new m.WebAnimation({element:p,integrator:w.from(i),style:(u,d)=>({opacity:n.mode==="enter"?u:d})}))}}class Gt{contribute(){return[]}}const Qi={default:()=>new Gt,fade:()=>new Ji};function ts(e){return Qi[e]()}class es extends Gt{}function ns(e){const t=Bi(e.type);return{strategies:[new Ki,t,ts(e.variant),new es,...e.type==="blur"?[new ki]:[]],physics:t.physics}}const is=e=>{const{strategies:t,physics:n}=ns(e);return{prepare:i=>{const s={from:i.from,to:i.to,context:{positionedParent:i.context.positionedParent},createElement:i.createElement},o={};for(const r of t){if(!r.prepare)continue;const l=r.prepare(s);l&&Object.assign(o,l)}return o},animation:({from:i,to:s,context:o,...r})=>{const l=ji(i,s,o.direction);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const c=qi(l,i,s,o.scrollOffset),a=[],u={from:i,to:s,resolved:l,input:c,physics:n,context:o,extras:r,onComplete:f=>{a.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(u));const h=d[0];if(h){const f=h.onComplete;h.onComplete=()=>{f==null||f();for(const y of a)try{y()}catch(g){console.error("[zoom] cleanup error",g)}}}for(const f of d){if(!(f instanceof m.WebAnimation))continue;const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation(d,{mode:"parallel"})}}};function ss(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function os(e={}){const t=ss(e);return is(t)}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=Ye;exports.blind=Ue;exports.drill=tn;exports.fade=on;exports.film=hn;exports.hero=qn;exports.jaemin=ti;exports.rotate=ii;exports.scroll=ri;exports.sheet=$i;exports.slide=Pi;exports.strip=Ri;exports.zoom=os;
|
|
30
|
+
`}c.push(p),l.appendChild(p)}return t.appendChild(l),{container:l,blinds:c}}const ke=(t={})=>{const e=t.blindCount??Me,n=t.direction??Ye,o=t.blindColor??De,i=t.physics??Te;return{prepare:async({from:s,to:r})=>{const l=await s,c=await r;l.style.zIndex="1000";const a=wt(l,e,n,o,"hidden","left");c.style.position="relative",c.style.zIndex="0";const p=wt(c,e,n,o,"closed","right");return{fromEl:l,fromBlinds:a.blinds,fromContainer:a.container,toBlinds:p.blinds,toContainer:p.container}},animation:({fromEl:s,fromBlinds:r,fromContainer:l,toBlinds:c,toContainer:a})=>{const p=r.map(f=>new m.WebAnimation({element:f,integrator:g.IntegratorProvider.from(i),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),u=c.map((f,h)=>new m.WebAnimation({element:f,integrator:g.IntegratorProvider.from(i),style:(b,S)=>({transform:n==="horizontal"?`scaleX(${S})`:`scaleY(${S})`}),onComplete:h===c.length-1?()=>{a.remove(),l.remove(),s.style.zIndex="",s.style.position=""}:void 0})),d=new m.MultiAnimation(p,{mode:"parallel"}),y=new m.MultiAnimation(u,{mode:"parallel"});return new m.MultiAnimation([d,y],{mode:"sequence"})}}};function Le(t={}){const{type:e="horizontal"}=t;return ke({direction:e})}const He={spring:{stiffness:250,damping:23,doubleSpring:.7}},D=.5;function We(t){const e=t==="enter"?-100:100,n=t==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:o=>({transform:`translate3d(${e*o}%, 0, 0)`,opacity:`${D+(1-D)*(1-o)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${D}`},animate:o=>({transform:`translate3d(${n*(1-o)}%, 0, 0)`,opacity:`${D+(1-D)*o}`})}}}function Ne(){return{physics:He,build:We}}const ze={spring:{stiffness:230,damping:25,doubleSpring:{stiffness:600,damping:50}}};function Ve(t){const e=t==="enter"?-20:100,n=t==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:o=>({transform:`translate3d(${e*o}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:o=>({transform:`translate3d(${n*(1-o)}%, 0, 0)`})}}}function Ue(){return{physics:ze,build:Ve}}const Xe={parallax:Ue(),crossfade:Ne()},I="0",Lt="1",v="2",Be="parallax";function St(t,e){t.style.willChange=e.willChange,t.style.backfaceVisibility="hidden",t.style.contain="layout paint";for(const[n,o]of Object.entries(e.startStyle))t.style[n]=o}const Ze=(t={})=>{const e=Xe[t.type??Be],n=e.physics;return{prepare:({from:o,to:i,context:s})=>{const r=s.direction==="forward"?"enter":"exit",l=e.build(r),c=r==="enter"?I:v,a=r==="enter"?v:I;return o.then(p=>{St(p,l.out),p.style.pointerEvents="none",p.style.zIndex=c}),i.then(p=>{St(p,l.in),p.style.position="relative",p.style.zIndex=a}),{}},animation:({from:o,to:i,context:s})=>{const r=s.direction==="forward"?"enter":"exit",l=e.build(r),c=r==="enter"?v:I,a=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(n),style:u=>l.out.animate(u),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform="",o.style.opacity="",o.style.pointerEvents="",o.style.zIndex=""}}),p=new m.WebAnimation({element:i,integrator:g.IntegratorProvider.from(n),style:u=>l.in.animate(u),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.opacity="",i.style.position==="relative"&&(i.style.position=""),i.style.zIndex===c&&(i.style.zIndex="")}});for(const u of[a,p]){const d=u.onComplete;u.onComplete=()=>{d==null||d(),u.releaseFill()}}return new m.MultiAnimation([a,p],{mode:"parallel"})}}};function Ge(t){return t==="slide"||t==="crossfade"?"crossfade":"parallax"}function je(t={}){const e=t.type,n=Ge(e);return Ze({type:n})}const qe=(t={})=>{const e=t.physics??g.FADE_IN_PHYSICS,n=t.physics??g.FADE_OUT_PHYSICS;return{prepare:({to:o})=>(o.then(i=>{i.style.opacity="0",i.style.willChange="opacity"}),{}),animation:({from:o,to:i})=>{const s=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(n),style:l=>({opacity:g.pageMotionStyle("fade","out","forward",l).opacity}),onComplete:()=>{o.style.willChange="auto",o.style.opacity=""}}),r=new m.WebAnimation({element:i,integrator:g.IntegratorProvider.from(e),style:l=>({opacity:g.pageMotionStyle("fade","in","forward",l).opacity}),onComplete:()=>{i.style.willChange="auto",i.style.opacity=""}});return new m.MultiAnimation([s,r],{mode:"sequence"})}}};function Ke(t={}){return qe()}const G={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},T={scaleDown:0,translate:.2,scaleUp:.8},Je=.8,Qe="white",xt=1e3/60,tn=600;function en(t){const{items:e,from:n,to:o,recordFrame:i}=t,s=xt/1e3,r=Math.abs(o-n),l=e.map(a=>({item:a,integrator:new g.SpringIntegrator({stiffness:a.spring.stiffness,damping:a.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let a=0;a<l.length;a++)(a===0||l[a].item.offset===0)&&(l[a].started=!0);i(0);let c=0;for(let a=1;a<=tn;a++){const p=a*xt;c=p;for(const u of l)!u.started||u.settled||(u.state=u.integrator.step(u.state,o,s),u.integrator.isSettled(u.state,o)?(u.settleTime+=s,u.settleTime>=Yt.SETTLE_THRESHOLD&&(u.state={position:o,velocity:0},u.settled=!0)):u.settleTime=0,u.item.tick(u.state.position));for(let u=1;u<l.length;u++){const d=l[u];if(d.started)continue;const y=l[u-1];if(!y.started)continue;(r===0?1:Math.abs(y.state.position-n)/r)>=d.item.offset&&(d.started=!0)}if(i(p),l.every(u=>u.settled))return p}return c}function j(t,e){return t!=null&&t.spring?{stiffness:t.spring.stiffness,damping:t.spring.damping}:e}function Ct(t){const{rect:e,scale:n,direction:o,override:i}=t,s=o==="out"?{scale:1,translateY:-e.top}:{scale:n,translateY:-e.top+e.height},r=j(i,G.scaleDown),l=j(i,G.translate),c=j(i,G.scaleUp),a=o==="out"?1:0,p=o==="out"?0:1,u=o==="out"?[{spring:r,offset:T.scaleDown,tick:f=>{const h=1-f;s.scale=1-(1-n)*h}},{spring:l,offset:T.translate,tick:f=>{const h=1-f;s.translateY=-e.top-e.height*h}},{spring:c,offset:T.scaleUp,tick:f=>{const h=1-f;s.scale=n+(1-n)*h}}]:[{spring:r,offset:T.scaleDown,tick:f=>{s.scale=1-(1-n)*f}},{spring:l,offset:T.translate,tick:f=>{s.translateY=-e.top+e.height*(1-f)}},{spring:c,offset:T.scaleUp,tick:f=>{s.scale=n+(1-n)*f}}],d=[],y=en({items:u,from:a,to:p,recordFrame:f=>d.push({time:f,scale:s.scale,translateY:s.translateY})});return{snapshots:d,totalDuration:y}}function nn(t,e){if(t.length===0)return{time:0,scale:1,translateY:0};if(t.length===1||e<=0)return t[0];if(e>=1)return t[t.length-1];const n=e*(t.length-1),o=Math.floor(n),i=Math.ceil(n);if(o===i)return t[o];const s=t[o],r=t[i],l=n-o;return{time:s.time+(r.time-s.time)*l,scale:s.scale+(r.scale-s.scale)*l,translateY:s.translateY+(r.translateY-s.translateY)*l}}const on=[[1,1],[-1,1],[1,-1],[-1,-1]];function rn(t,e){const i=(s,r,l)=>{const c=document.createElement("div");Object.assign(c.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...s});const a=document.createElement("div");Object.assign(a.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:t,[l]:"0",[r]:"0"});const p=document.createElement("div");return Object.assign(p.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:t,[l]:"0",[r]:"0"}),c.appendChild(a),c.appendChild(p),c};return{topLeft:i({top:`${e.top-1}px`,left:`${e.left-1}px`},"left","top"),topRight:i({top:`${e.top-1}px`,left:`${e.left+e.width-15+1}px`},"right","top"),bottomLeft:i({top:`${e.top+e.height-15+1}px`,left:`${e.left-1}px`},"left","bottom"),bottomRight:i({top:`${e.top+e.height-15+1}px`,left:`${e.left+e.width-15+1}px`},"right","bottom")}}function $t(t,e){const n=e.left+e.width/2,o=e.top+e.height/2;t.style.transformOrigin=`${n}px ${o}px`}function Et(t,e){t.style.clipPath=`polygon(
|
|
31
|
+
${e.left}px ${e.top}px,
|
|
32
|
+
${e.left+e.width}px ${e.top}px,
|
|
33
|
+
${e.left+e.width}px ${e.top+e.height}px,
|
|
34
|
+
${e.left}px ${e.top+e.height}px
|
|
35
|
+
)`}function q(t,e,n,o,i){const s=n/1e3;return new m.WebAnimation({element:t,integrator:new ne({durationSec:s}),lowerBound:0,upperBound:1,style:r=>o(nn(e,r)),onComplete:i})}const sn=(t={})=>{var i;const e=((i=t.border)==null?void 0:i.color)??Qe,n=Je,o=t.physics;return{prepare:({from:s,to:r,context:l})=>{const c=O(l,"from"),a=O(l,"to"),p=k(document.body,l.positionedParent),u=rn(e,{...c,top:p.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(u[d]);return s.then(d=>{$t(d,c),Et(d,c),d.style.transform=`translateY(${-c.top}px)`}),r.then(d=>{$t(d,a),Et(d,a),d.style.transform=`translateY(${-a.top+a.height}px) scale(${n})`}),{borders:u,fromRect:c,toRect:a}},animation:({from:s,to:r,context:l,borders:c,fromRect:a,toRect:p})=>{const u=Ct({rect:a,scale:n,direction:"out",override:o}),d=Ct({rect:p,scale:n,direction:"in",override:o}),y=q(s,u.snapshots,u.totalDuration,w=>({transform:`translateY(${w.translateY}px) scale(${w.scale})`}),()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""}),f=q(r,d.snapshots,d.totalDuration,w=>({transform:`translateY(${w.translateY}px) scale(${w.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),h=on.map(([w,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return q(c[C],u.snapshots,u.totalDuration,A=>{const P=(a.width-a.width*A.scale)/2*.7*w,E=(a.height-a.height*A.scale)/2*.7*$;return{transform:`translate(${P}px, ${E}px)`}})}),b=new m.MultiAnimation([y,f,...h],{mode:"parallel"}),S=b.onComplete;return b.onComplete=()=>{S==null||S();const w=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=c[$];x.parentElement===w&&w.removeChild(x)}},b}}};function an(t={}){const{options:e}=t,n=(e==null?void 0:e.borderColor)!==void 0?{border:{color:e.borderColor}}:void 0;return sn(n)}function ln(t){if(!t)return null;if(t.includes("/")){const n=t.split("/");if(n.length!==2)return null;const o=Number.parseFloat(n[0]??""),i=Number.parseFloat(n[1]??"");return Number.isFinite(o)&&Number.isFinite(i)&&o>0&&i>0?o/i:null}const e=Number.parseFloat(t);return Number.isFinite(e)&&e>0?e:null}function cn(t){return t==="contain"||t==="cover"?t:null}function ot(t){return t.tagName==="IMG"}function pn(t){if(ot(t))return t;if(t.tagName==="PICTURE"||t.tagName==="VIDEO")return null;const e=[];for(const n of Array.from(t.children)){const o=n;ot(o)&&e.push(o)}return e.length===1?e[0]??null:null}function un(t){var c,a;if(!ot(t))return null;const e=t,n=e.naturalWidth,o=e.naturalHeight;if(typeof n=="number"&&typeof o=="number"&&Number.isFinite(n)&&Number.isFinite(o)&&n>0&&o>0)return n/o;const i=((c=t.getAttribute("width"))==null?void 0:c.trim())??"",s=((a=t.getAttribute("height"))==null?void 0:a.trim())??"",r=i===""?Number.NaN:Number(i),l=s===""?Number.NaN:Number(s);return Number.isFinite(r)&&Number.isFinite(l)&&r>0&&l>0?r/l:null}function dn(t){const e=t.trim().toLowerCase().replace(/\s+/g," ");return e===""||e==="center"||e==="center center"||e==="50% 50%"}function V(t){if(typeof getComputedStyle=="function")try{return getComputedStyle(t)}catch{}return t.style}function fn(t){const e=V(t),n=dn(e.objectPosition??"");return{fit:n?cn(e.objectFit??null):null,centered:n}}function Ht(t){if(!t)return 0;const e=/^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(t.trim());if(!e)return null;const n=Number.parseFloat(e[1]??"");return Number.isFinite(n)&&n>=0?n:null}function Pt(t){const e=V(t),n=[e.borderTopLeftRadius,e.borderTopRightRadius,e.borderBottomRightRadius,e.borderBottomLeftRadius].map(Ht),o=n[0];if(o==null)return{radius:0,supported:!1};const i=n.every(s=>s!==null&&Math.abs(s-o)<.001);return{radius:i?o:0,supported:i}}function yn(t,e){var i;if(!e)return null;const n=(i=t.getAttribute(e))==null?void 0:i.trim();if(n==null||n==="")return null;const o=Number.parseFloat(n);return Number.isFinite(o)&&o>=0?o:null}function hn(t){const e=V(t);return[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft,e.borderTopWidth,e.borderRightWidth,e.borderBottomWidth,e.borderLeftWidth].every(o=>o?Ht(o)===0:!0)}function mn(t){const e=V(t),n=o=>o==="hidden"||o==="clip";return n(e.overflowX)&&n(e.overflowY)}function _(t){return t.left+t.width/2}function R(t){return t.top+t.height/2}function at(t,e){return{top:Math.max(0,e.top-t.top),right:Math.max(0,t.left+t.width-(e.left+e.width)),bottom:Math.max(0,t.top+t.height-(e.top+e.height)),left:Math.max(0,e.left-t.left)}}function gn(t,e){const n=Math.max(t.left,e.left),o=Math.max(t.top,e.top),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height);return i>n&&s>o?{left:n,top:o,width:i-n,height:s-o}:null}function At(t,e){return Math.abs(t.left-e.left)<.01&&Math.abs(t.top-e.top)<.01&&Math.abs(t.width-e.width)<.01&&Math.abs(t.height-e.height)<.01}function bn(t,e,n){const o=t.width/t.height;let i,s;return n==="contain"?o>e?(s=t.height,i=s*e):(i=t.width,s=i/e):o>e?(i=t.width,s=i/e):(s=t.height,i=s*e),{left:t.left+(t.width-i)/2,top:t.top+(t.height-s)/2,width:i,height:s}}function Wt(t,e,n){const o=e!==null&&n!==null&&t.width>0&&t.height>0?bn(t,e,n):t,i=n==="contain"?o:t;return{bbox:t,content:o,window:i,clipInset:at(o,i),aspectRatio:e,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:e!==null&&n!==null,mediaElement:null}}function it(t,e,n){return{...Wt(t,null,null),radius:e,radiusSource:n,bboxRadius:e,bboxRadiusSource:n}}function Nt(t,e){const n=t.aspectRatio,o=e.aspectRatio;return t.contentAware&&e.contentAware&&n!==null&&o!==null&&Math.abs(n-o)/Math.max(n,o)<.01}function It(t){return it(t.bbox,t.bboxRadius,t.bboxRadiusSource)}function zt(t,e){return Nt(t,e)?[t,e]:[It(t),It(e)]}function rt(t,e,n,o){const i=pn(t),s=i?n(i):e,r=o.legacyAspectRatioAttribute?ln(t.getAttribute(o.legacyAspectRatioAttribute)??(i==null?void 0:i.getAttribute(o.legacyAspectRatioAttribute))??null):null,l=r??(i?un(i):null),c=i?fn(i):{fit:null,centered:!0},a=c.centered&&(i===null||hn(i))?c.fit??(r!==null?o.fallbackFit??null:null):null,p=Wt(s,l,a),u=mn(t),y=i!==null&&i!==t&&u?gn(p.window,e):p.window,f=yn(t,o.legacyRadiusAttribute),h=i===t||u,b=h?Pt(t):{radius:0,supported:!0},S=f??b.radius,w=f!==null?"legacy":b.supported?b.radius>0?"computed":"none":"unsupported",$=[];y&&h&&At(y,e)&&$.push(b),y&&i&&At(y,s)&&$.push(Pt(i));const x=$.every(E=>E.supported),C=Math.max(0,...$.map(E=>E.radius)),A=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!y||P==="unsupported"?it(e,S,w):{...p,bbox:e,window:y,clipInset:at(p.content,y),radius:A,radiusSource:P,bboxRadius:S,bboxRadiusSource:w,mediaElement:p.contentAware?i:null}}function Vt(t,e,n,o,i){const s=n.width/o,r=n.height/i;return{left:_(t)+(_(n)-_(e))/o-s/2,top:R(t)+(R(n)-R(e))/i-r/2,width:s,height:r}}const wn={enter:"contain",exit:"cover",legacy:"contain"};function M(t){return wn[t]}const vt="data-hero-enter-key",_t="data-hero-exit-key",K="data-hero-key";class Sn{constructor(){F(this,"previousFromOpacity","")}prepare(e){e.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(e){return e.onComplete(()=>{e.from.style.opacity=this.previousFromOpacity}),[]}}const xn=()=>new Sn;class Cn{contribute(e){const{from:n,to:o,physics:i,onComplete:s}=e,r=n.style.opacity,l=o.style.opacity,c=n.style.willChange,a=o.style.willChange;return o.style.opacity="0",n.style.willChange="opacity",o.style.willChange="opacity",s(()=>{n.style.opacity=r,o.style.opacity=l,n.style.willChange=c,o.style.willChange=a}),[new m.WebAnimation({element:n,integrator:g.IntegratorProvider.from(i),style:(p,u)=>({opacity:u})}),new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(i),style:p=>({opacity:p})})]}}const $n=()=>new Cn,En={static:xn,fade:$n},Pn={spring:{stiffness:320,damping:30}},An=()=>Pn,In={spring:{stiffness:300,damping:30,doubleSpring:1}},vn=()=>In,_n={default:An,smooth:vn},Rn=700,On="data-hero-aspect-ratio",Fn="data-hero-radius";function Rt(t,e,n){const o=k(t,e);return rt(e,o,i=>k(t,i),{fallbackFit:n,legacyAspectRatioAttribute:On,legacyRadiusAttribute:Fn})}function N(t,e){const n=new Map,o=t.querySelectorAll(`[${e}]`);for(const i of Array.from(o)){const s=i.getAttribute(e);s&&(n.has(s)||n.set(s,i))}return n}function Tn(t,e){const n=[],o=N(e,vt),i=N(t,_t);for(const[l,c]of o){const a=i.get(l);a&&n.push({key:l,fromEl:a,toEl:c,fromFit:M("exit"),toFit:M("enter")})}const s=N(t,vt),r=N(e,_t);for(const[l,c]of s){const a=r.get(l);a&&n.push({key:l,fromEl:c,toEl:a,fromFit:M("enter"),toFit:M("exit")})}return n}function Mn(t,e){const n=[],o=Array.from(e.querySelectorAll(`[${K}]`));for(const i of o){const s=i.getAttribute(K);if(!s)continue;const r=t.querySelector(`[${K}="${s}"]`);r&&n.push({key:s,fromEl:r,toEl:i,fromFit:M("legacy"),toFit:M("legacy")})}return n}function Yn(t,e){const n=Tn(t,e);return n.length>0?n:Mn(t,e)}function Dn(t,e){return zt(t,e)}function kn(t,e){return t.radiusSource==="unsupported"||e.radiusSource==="unsupported"?!1:t.mediaElement!==null||e.mediaElement!==null||t.radiusSource==="computed"||t.radiusSource==="legacy"||e.radiusSource==="computed"||e.radiusSource==="legacy"}function Ln(t,e,n){const{fromEl:o,toEl:i}=e,[s,r]=Dn(Rt(t,o,e.fromFit),Rt(t,i,e.toFit)),l=s.content,c=s.window,a=r.content,p=r.window,u=r.clipInset,d=s.radiusSource==="unsupported"||r.radiusSource==="unsupported",y=d?0:s.radius,f=d?0:r.radius;if(l.width===0||l.height===0||c.width===0||c.height===0||a.width===0||a.height===0||p.width===0||p.height===0)return null;const h=Math.max(l.width/a.width,l.height/a.height),b=_(l),S=R(l),w=_(a),$=R(a),x=b-w,C=S-$;if(Math.abs(C)>n)return null;const A=at(a,Vt(a,l,c,h,h));return{toContent:a,fromVisualEl:s.mediaElement??o,toVisualEl:r.mediaElement??i,resetCloneRadius:kn(s,r),styleFor:(P,E)=>{const L=E*x,Y=E*C,H=P+E*h,jt=Math.max(0,y*E+f*P)/Math.max(Math.abs(H),1e-6),qt=A.top*E+u.top*P,Kt=A.right*E+u.right*P,Jt=A.bottom*E+u.bottom*P,Qt=A.left*E+u.left*P;return{transform:`translate(${L}px, ${Y}px) scale(${H})`,clipPath:`inset(${qt}px ${Kt}px ${Jt}px ${Qt}px round ${jt}px)`}}}}function Hn(t,e){t.style.transform=e.transform,t.style.clipPath=e.clipPath}class Wn{contribute(e){const{resolved:n,physics:o,positionedParent:i,maxDistance:s,onComplete:r}=e,l=[];for(const c of n.pairs){const a=Ln(i,c,s);if(!a)continue;const{fromVisualEl:p,toVisualEl:u}=a,d=u.cloneNode(!0);d.style.position="absolute",d.style.left=`${a.toContent.left}px`,d.style.top=`${a.toContent.top}px`,d.style.width=`${a.toContent.width}px`,d.style.height=`${a.toContent.height}px`,d.style.margin="0",d.style.transformOrigin="center center",d.style.zIndex="1000",d.style.willChange="transform, clip-path",d.style.pointerEvents="none",d.style.maxWidth="none",d.style.maxHeight="none",a.resetCloneRadius&&(d.style.borderRadius="0"),Hn(d,a.styleFor(0,1)),i.appendChild(d);const y=p.style.opacity,f=u.style.opacity;p.style.opacity="0",u.style.opacity="0",r(()=>{p.style.opacity=y,u.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:g.IntegratorProvider.from(o),style:a.styleFor}))}return l}}function Nn(t){return[new Wn,En[t.type]()]}const zn=t=>{const e=Nn(t),n=_n[t.variant](),o=Rn;return{prepare:i=>{var l;const s=Promise.all([i.from,i.to]).then(([c,a])=>({pairs:Yn(c,a)})),r={from:i.from,to:i.to,resolved:s};for(const c of e)(l=c.prepare)==null||l.call(c,r);return s.then(c=>({resolved:c}))},animation:({from:i,to:s,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const c=[],a=f=>{c.push(f)},p={from:i,to:s,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:o,onComplete:a},u=[];for(const f of e)f.contribute&&u.push(...f.contribute(p));if(u.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(u,{mode:"parallel"}),y=d.onComplete;return d.onComplete=()=>{y==null||y();for(const f of c)try{f()}catch(h){console.error("[hero] cleanup error",h)}},d}}};function Vn(t={}){const e=t.type??"static",n=t.variant??"default";return zn({type:e,variant:n})}const Un={spring:{stiffness:50,damping:30}},Xn={spring:{stiffness:80,damping:25}},Bn=(t={})=>{const e=t.physics??Un,n=t.initialRotation??45,o=t.initialScale??.01,i=t.rotationTriggerPoint??.8;return{prepare:({from:s,to:r,context:l})=>(s.then(c=>{c.style.opacity="1"}),r.then(c=>{const a=O(l,"to"),p=Math.min(a.width,a.height)*.4;c.style.setProperty("--max-border-radius",`${p}px`),c.style.setProperty("--border-radius-scale","1"),c.style.willChange="transform",c.style.backfaceVisibility="hidden";const u=a.left+a.width/2,d=a.top+a.height/2;c.style.transformOrigin=`${u}px ${d}px`,c.style.position="fixed",c.style.top=`${a.top}px`,c.style.left=`${a.left}px`,c.style.width=`${a.width}px`,c.style.height=`${a.height}px`,c.style.zIndex="1000",c.style.overflow="hidden",c.style.transform=`rotate(${n}deg) scale(${o}) translateZ(0)`,c.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",c.style.opacity="1"}),{}),animation:({from:s,to:r})=>{const l=new m.WebAnimation({element:s,integrator:g.IntegratorProvider.from(Xn),style:(a,p)=>({opacity:p}),onComplete:()=>{s.style.opacity=""}}),c=new m.WebAnimation({element:r,integrator:g.IntegratorProvider.from(e),style:a=>{let p;if(a<=.05)p=o;else if(a<=i){const f=(a-.05)/(i-.05),h=Math.pow(f,9);p=o+(.8-o)*h}else{const f=(a-i)/(1-i);p=.8+.2*(1-Math.pow(1-f,3))}const u=.7;let d;if(a<=u)d=n;else{const f=(a-u)/(1-u),h=1-Math.pow(1-f,2);d=n*(1-h)}let y;if(a<=u)y=1;else{const f=(a-u)/(1-u);y=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":y.toFixed(4)}},onComplete:()=>{r.style.willChange="",r.style.backfaceVisibility="",r.style.removeProperty("--max-border-radius"),r.style.removeProperty("--border-radius-scale"),r.style.transform="",r.style.transformOrigin="",r.style.position="",r.style.zIndex="",r.style.top="",r.style.left="",r.style.width="",r.style.height="",r.style.overflow="",r.style.borderRadius=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function Zn(t={}){return Bn()}const Gn={spring:{stiffness:100,damping:30}},jn=(t={})=>{const e=t.physics??Gn;return{prepare:({from:n,to:o})=>(n.then(i=>{i.style.transformOrigin="center center",i.style.willChange="transform, opacity"}),o.then(i=>{i.style.opacity="0",i.style.transform="rotate(-180deg)",i.style.transformOrigin="center center",i.style.willChange="transform, opacity"}),{}),animation:({from:n,to:o})=>{const i=new m.WebAnimation({element:n,integrator:g.IntegratorProvider.from(e),style:r=>({transform:`rotate(${r*180}deg)`,opacity:r<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),s=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(e),style:(r,l)=>({transform:`rotate(${-l*180}deg)`,opacity:r>.5?1:0}),onComplete:()=>{o.style.willChange="auto",o.style.transform="",o.style.transformOrigin="",o.style.opacity=""}});return new m.MultiAnimation([i,s],{mode:"parallel"})}}};function qn(t={}){return jn()}const Kn={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Jn=(t={})=>{const e=t.physics??Kn,n=t.directional??!0;return{prepare:({from:o,to:i,context:s})=>{const r=!n||s.direction==="forward",l=r?I:v,c=r?v:I;return o.then(a=>{a.style.zIndex=l,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),i.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=c}),{}},animation:({from:o,to:i,context:s})=>{const r=!n||s.direction==="forward",l=r?v:I,c=o.offsetHeight,a=i.offsetHeight,p=window.innerHeight,u=Math.max(Math.min(c,a),p),d=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(e),style:f=>({transform:`translate3d(0, ${r?-u*f:u*f}px, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform="",o.style.pointerEvents="",o.style.zIndex=""}}),y=new m.WebAnimation({element:i,integrator:g.IntegratorProvider.from(e),style:(f,h)=>({transform:`translate3d(0, ${r?h*u:h*-u}px, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.position==="relative"&&(i.style.position=""),i.style.zIndex===l&&(i.style.zIndex="")}});for(const f of[d,y]){const h=f.onComplete;f.onComplete=()=>{h==null||h(),f.releaseFill()}}return new m.MultiAnimation([d,y],{mode:"parallel"})}}};function Qn(t={}){const{type:e="directional"}=t;return Jn({directional:e==="directional"})}const to={spring:{stiffness:200,damping:24}},eo={inertia:{acceleration:25,resistance:1.2}},J=.2;function no(){return{enterPhysics:to,exitPhysics:eo,background:{willChange:"transform, opacity",enterStyle:(t,e)=>({transform:`scale(${1-J*t})`,opacity:e}),exitStyle:t=>({transform:`scale(${1-J+J*t})`,opacity:t})}}}const oo={spring:{stiffness:200,damping:24}},io={inertia:{acceleration:25,resistance:1.2}},Q=.08,ro=16,tt=.6,so=t=>`blur(${Math.max(0,t).toFixed(2)}px)`;function ao(){return{enterPhysics:oo,exitPhysics:io,background:{willChange:"transform, opacity",enterStyle:t=>({transform:`scale(${1-Q*t})`,opacity:1-(1-tt)*t}),exitStyle:t=>({transform:`scale(${1-Q+Q*t})`,opacity:tt+(1-tt)*t})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(t,e)=>{const n=t==="enter"?e:1-e,o=so(ro*n);return{backdropFilter:o,WebkitBackdropFilter:o}}}}}const lo={spring:{stiffness:190,damping:25}},co={spring:{stiffness:190,damping:25}};function po(){return{enterPhysics:lo,exitPhysics:co,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const uo={static:po(),"background-scale":no(),blur:ao()},fo="static",yo="transform",ho=(t={})=>{const e=uo[t.type??fo],n=e.background,o=e.overlay,i=n.willChange!=="";return{prepare:({from:s,to:r,context:l,createElement:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?r:s,u=a==="enter"?s:r;p.then(y=>{y.style.willChange=yo,y.style.backfaceVisibility="hidden",y.style.contain="layout paint",y.style.zIndex=v,a==="enter"?y.style.position="relative":y.style.pointerEvents="none"}),u.then(y=>{i&&(y.style.willChange=n.willChange,y.style.backfaceVisibility="hidden",y.style.contain="layout paint"),y.style.zIndex=I,a==="enter"?y.style.pointerEvents="none":y.style.position="relative"});let d;return o&&(d=c("sheet-overlay"),Object.assign(d.style,o.initialStyle),d.style.willChange=o.willChange,l.positionedParent.appendChild(d)),{overlay:d}},animation:({from:s,to:r,context:l,overlay:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?e.enterPhysics:e.exitPhysics,u=a==="enter"?r:s,d=a==="enter"?s:r,y=O(l,a==="enter"?"to":"from"),f=()=>{s.style.pointerEvents="",s.style.zIndex=""},h=()=>{const x=a==="enter"?v:I;r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===x&&(r.style.zIndex="")},b=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};u.style.clipPath=`inset(${y.top}px 0 calc(100% - ${y.top+y.height}px) 0)`;const S=a==="enter"?(x,C)=>({transform:`translate3d(0, ${C*y.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*y.height}px, 0)`}),w=new m.WebAnimation({element:u,integrator:g.IntegratorProvider.from(p),style:S,onComplete:()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.contain="",u.style.clipPath="",u.style.transform="",f(),h()}});b(w);const $=[w];if(i){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=O(l,a==="enter"?"from":"to"),A=C.left+C.width/2,P=C.top+C.height/2;d.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,d.style.transformOrigin=`${A}px ${P}px`;const E=a==="enter"?(Y,H)=>n.enterStyle(Y,H):Y=>n.exitStyle(Y),L=new m.WebAnimation({element:d,integrator:g.IntegratorProvider.from(p),style:E,onComplete:()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.contain="",d.style.clipPath="",d.style.transformOrigin="",d.style.transform="",d.style.opacity="",d.style.height=""}});b(L),$.push(L)}if(c&&o){c.style.zIndex=Lt;const x=Dt(l,"to");c.style.top=`${x.top}px`,c.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:c,integrator:g.IntegratorProvider.from(p),style:C=>o.style(a,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function mo(t){return t==="scale"||t==="background-scale"?"background-scale":t==="blur"?"blur":"static"}function go(t={}){const e=t.type,n=mo(e);return ho({type:n})}const bo=(t={})=>{const e=t.physics??g.SLIDE_PHYSICS;return{prepare:({from:n,to:o,context:i})=>{const s=i.direction==="forward";return n.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),o.then(r=>{const l=s?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}},animation:({from:n,to:o,context:i})=>{const s=new m.WebAnimation({element:n,integrator:g.IntegratorProvider.from(e),style:l=>({transform:`translate3d(${100*g.pageMotionStyle("slide","out",i.direction,l).x}%, 0, 0)`}),onComplete:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transform="",n.style.pointerEvents=""}}),r=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(e),style:l=>({transform:`translate3d(${100*g.pageMotionStyle("slide","in",i.direction,l).x}%, 0, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform=""}});return new m.MultiAnimation([s,r],{mode:"parallel"})}}};function wo(t={}){return bo()}const So={spring:{stiffness:17,damping:6}},et=20,z=800,xo=(t={})=>{const e=t.physics??So;return{prepare:({from:n,to:o})=>(n.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none",i.style.transform=`perspective(${z}px) rotateY(0deg) translate3d(0%, 0, 0)`}),o.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transform=`perspective(${z}px) rotateY(${et}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:o})=>{const i=new m.WebAnimation({element:n,integrator:g.IntegratorProvider.from(e),style:r=>{const l=-r*et,c=r*100;return{transform:`perspective(${z}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),s=new m.WebAnimation({element:o,integrator:g.IntegratorProvider.from(e),style:(r,l)=>{const c=l*et,a=-l*100;return{transform:`perspective(${z}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{o.style.transform="",o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain=""}});return new m.MultiAnimation([i,s],{mode:"sequence"})}}};function Co(t={}){return xo()}function $o(t,e){return e.left>=t.left-.01&&e.top>=t.top-.01&&e.left+e.width<=t.left+t.width+.01&&e.top+e.height<=t.top+t.height+.01}function Ut(t){const e=()=>({enterContent:t.enterRect,exitContent:t.exitRect,startWindow:t.enterRect,scaleX:t.exitRect.width/t.enterRect.width,scaleY:t.exitRect.height/t.enterRect.height}),{enterMedia:n,exitMedia:o}=t;if(!n||!o||!Nt(n,o))return e();const i=n.content,s=o.content;if(i.width<=0||i.height<=0||s.width<=0||s.height<=0)return e();const r=s.width/i.width,l=s.height/i.height,c=Vt(i,s,o.window,r,l);return $o(n.window,c)?{enterContent:i,exitContent:s,startWindow:c,scaleX:r,scaleY:l}:e()}function Xt(t,e){return{top:t.top/e.height*100,right:(e.width-(t.left+t.width))/e.width*100,bottom:(e.height-(t.top+t.height))/e.height*100,left:t.left/e.width*100}}function Bt(t,e,n){return{x:t/Math.max(Math.abs(e),1e-6),y:t/Math.max(Math.abs(n),1e-6)}}function Eo(t){const{pageRect:e,scrollOffset:n,enterRadius:o,exitRadius:i}=t,s=Ut(t),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=s,u=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,y=Xt(c,e);return{transformOrigin:`${_(r)}px ${R(r)}px`,animate:f=>{const h=1-f,b=1+(a-1)*h,S=1+(p-1)*h,w=Math.max(0,i*h+o*(1-h)),$=Bt(w,b,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*h}px, ${d*h}px) scale(${b}, ${S})`}}}}function Po(t){const{pageRect:e,scrollOffset:n,enterRadius:o,exitRadius:i}=t,s=Ut(t),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=s,u=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,y=Xt(c,e);return{transformOrigin:`${_(r)}px ${R(r)}px`,animate:f=>{const h=1-f,b=1+(a-1)*h,S=1+(p-1)*h,w=Math.max(0,o*(1-h)+i*h),$=Bt(w,b,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*h-n.x}px, ${d*h}px) scale(${b}, ${S})`}}}}const Ao={spring:{stiffness:380,damping:30,restDelta:.1,restSpeed:.1,doubleSpring:{stiffness:260,damping:30}}},Zt=.12,Io=18;function vo(){return{transformOrigin:"50% 50%",animate:t=>{const e=1-t;return{transform:`scale(${1-Zt*e})`}}}}function _o(){return{transformOrigin:"50% 50%",animate:t=>{const e=1-t;return{transform:`scale(${1-Zt*e})`}}}}const nt={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(t,e)=>{const n=t==="enter"?e:1-e,o=`blur(${Io*n}px)`;return{backdropFilter:o,WebkitBackdropFilter:o}}};class Ro{constructor(){F(this,"physics",Ao)}contribute(e){const{from:n,to:o,resolved:i,physics:s}=e,r=i.mode==="enter",l=r?n:o,c=r?vo():_o();return c&&(l.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:l,integrator:g.IntegratorProvider.from(s),style:r?(a,p)=>c.animate(p):a=>c.animate(a)})]}}class Oo{prepare(e){const n=e.createElement("zoom-overlay");return Object.assign(n.style,nt.initialStyle),n.style.willChange=nt.willChange,e.context.positionedParent.appendChild(n),{overlay:n}}contribute(e){const n=e.extras.overlay;if(!n)return[];n.style.zIndex=Lt;const o=Dt(e.context,"to");return n.style.top=`${o.top}px`,n.style.height=`${o.height}px`,[new m.WebAnimation({element:n,integrator:g.IntegratorProvider.from(e.physics),style:i=>nt.style(e.resolved.mode,i)})]}}const Fo={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}};function To({enterRect:t,exitRect:e,scrollOffset:n}){const o=t.left-e.left+(t.width-e.width)/2+n.x,i=t.top-e.top+(t.height-e.height)/2+n.y,s=t.width/e.width,r=t.height/e.height,l=Math.max(s,r);return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${o*a-n.x}px, ${i*a}px) scale(${1+(l-1)*a})`}}}}function Mo({enterRect:t,exitRect:e,scrollOffset:n}){const o=t.left-e.left+(t.width-e.width)/2-n.x,i=t.top-e.top+(t.height-e.height)/2-n.y,s=t.width/e.width,r=t.height/e.height,l=Math.max(s,r);return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${o*a}px, ${i*a}px) scale(${1+(l-1)*a})`}}}}class Yo{constructor(){F(this,"physics",Fo)}contribute(e){const{from:n,to:o,resolved:i,input:s,physics:r}=e,l=i.mode==="enter",c=l?n:o,a=l?To(s):Mo(s);return a&&(c.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:c,integrator:g.IntegratorProvider.from(r),style:l?(p,u)=>a.animate(u):p=>a.animate(p)})]}}const Do={spring:{stiffness:530,damping:34,doubleSpring:1}};class ko{constructor(){F(this,"physics",Do)}contribute(e){return[]}}const Lo={expand:()=>new Yo,static:()=>new ko,blur:()=>new Ro};function Ho(t){return Lo[t]()}const st="data-zoom-enter-key",Ot="data-zoom-exit-key",Ft="data-zoom-radius";function Wo(t,e){return Math.abs(t.left-e.left)<.01&&Math.abs(t.top-e.top)<.01&&Math.abs(t.width-e.width)<.01&&Math.abs(t.height-e.height)<.01}function No(t,e){const n=[];let o=e;for(;o&&o!==t;){const i=o.parentElement;if(!i)break;for(const s of Array.from(i.children))s!==o&&s instanceof HTMLElement&&n.push(s);o=i}return n}function Tt(t){const e=t.querySelectorAll(`[${st}]`);return e.length!==1?null:e[0]}function Mt(t,e){const n=t.querySelectorAll(`[${Ot}]`);for(const o of n)if(o.getAttribute(Ot)===e)return o;return null}function zo(t,e,n){if(n==="forward"){const r=Tt(e);if(!r)return null;const l=r.getAttribute(st);if(!l)return null;const c=Mt(t,l);return c?{mode:"enter",enterEl:r,exitEl:c}:null}const o=Tt(t);if(!o)return null;const i=o.getAttribute(st);if(!i)return null;const s=Mt(e,i);return s?{mode:"exit",enterEl:o,exitEl:s}:null}function Vo(t,e,n,o){const i=t.mode==="enter"?n:e,s=t.mode==="enter"?e:n,r=W(i,t.enterEl),l=W(s,t.exitEl),c=rt(t.enterEl,r,b=>W(i,b),{legacyRadiusAttribute:Ft}),a=rt(t.exitEl,l,b=>W(s,b),{legacyRadiusAttribute:Ft}),[p,u]=zt(c,a),d=p.contentAware&&u.contentAware,y=t.mode==="enter"?n.getBoundingClientRect():e.getBoundingClientRect(),f={left:0,top:0,width:y.width,height:y.height},h=p.radiusSource==="legacy"||Wo(p.window,f)?p.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:p,exitMedia:u}:{},pageRect:y,scrollOffset:o,enterRadius:h,exitRadius:u.radius}}class Uo{prepare(e){e.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(e){const{from:n,to:o,resolved:i,input:s,physics:r,onComplete:l}=e,c=i.mode==="enter",a=c?Eo(s):Po(s),p=c?o:n,u=c?"t":"u";a&&(p.style.transformOrigin=a.transformOrigin);const d=c?I:v,y=c?v:I,f=n.style.zIndex;n.style.zIndex=d;const h=o.style.zIndex,b=o.style.position;return o.style.zIndex=y,o.style.position="relative",l(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",n.style.zIndex=f,o.style.zIndex===y&&(o.style.zIndex=h),o.style.position==="relative"&&(o.style.position=b),o.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new m.WebAnimation({element:p,integrator:g.IntegratorProvider.from(r),style:u==="t"?S=>a.animate(S):(S,w)=>a.animate(w)})]}}class Xo{contribute(e){const{resolved:n,physics:o,from:i,to:s,onComplete:r}=e,l=n.mode==="enter"?s:i,c=No(l,n.enterEl);if(c.length===0)return[];const a=c.map(p=>p.style.opacity);if(n.mode==="enter")for(const p of c)p.style.opacity="0";return r(()=>{for(let p=0;p<c.length;p++){const u=c[p];u&&(u.style.opacity=a[p]??"")}}),c.map(p=>new m.WebAnimation({element:p,integrator:g.IntegratorProvider.from(o),style:(u,d)=>({opacity:n.mode==="enter"?u:d})}))}}class Gt{contribute(){return[]}}const Bo={default:()=>new Gt,fade:()=>new Xo};function Zo(t){return Bo[t]()}class Go extends Gt{}function jo(t){const e=Ho(t.type);return{strategies:[new Uo,e,Zo(t.variant),new Go,...t.type==="blur"?[new Oo]:[]],physics:e.physics}}const qo=t=>{const{strategies:e,physics:n}=jo(t);return{prepare:o=>{const i={from:o.from,to:o.to,context:{positionedParent:o.context.positionedParent},createElement:o.createElement},s={};for(const r of e){if(!r.prepare)continue;const l=r.prepare(i);l&&Object.assign(s,l)}return s},animation:({from:o,to:i,context:s,...r})=>{const l=zo(o,i,s.direction);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const c=Vo(l,o,i,s.scrollOffset),a=[],u={from:o,to:i,resolved:l,input:c,physics:n,context:s,extras:r,onComplete:f=>{a.push(f)}},d=[];for(const f of e)f.contribute&&d.push(...f.contribute(u));const y=d[0];if(y){const f=y.onComplete;y.onComplete=()=>{f==null||f();for(const h of a)try{h()}catch(b){console.error("[zoom] cleanup error",b)}}}for(const f of d){if(!(f instanceof m.WebAnimation))continue;const h=f.onComplete;f.onComplete=()=>{h==null||h(),f.releaseFill()}}return new m.MultiAnimation(d,{mode:"parallel"})}}};function Ko(t){const e=t.type??"static",n=t.variant??(t.fade?"fade":"default");return{type:e,variant:n}}function Jo(t={}){const e=Ko(t);return qo(e)}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=Fe;exports.blind=Le;exports.drill=je;exports.fade=Ke;exports.film=an;exports.hero=Vn;exports.jaemin=Zn;exports.rotate=qn;exports.scroll=Qn;exports.sheet=go;exports.slide=wo;exports.strip=Co;exports.zoom=Jo;
|