@ssgoi/core 6.6.10 → 6.6.11

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/index.cjs CHANGED
@@ -27,9 +27,9 @@
27
27
  transform: scaleY(${s==="hidden"?0:1});
28
28
  transform-origin: ${o==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}a.push(u),l.appendChild(u)}return e.appendChild(l),{container:l,blinds:a}}const Be=(e={})=>{const t=e.blindCount??Ue,n=e.direction??Ve,i=e.blindColor??Xe,s=e.physics??ze;return{prepare:async({from:o,to:r})=>{const l=await o,a=await r;l.style.zIndex="1000";const c=Ct(l,t,n,i,"hidden","left");a.style.position="relative",a.style.zIndex="0";const u=Ct(a,t,n,i,"closed","right");return{fromEl:l,fromBlinds:c.blinds,fromContainer:c.container,toBlinds:u.blinds,toContainer:u.container}},animation:({fromEl:o,fromBlinds:r,fromContainer:l,toBlinds:a,toContainer:c})=>{const u=r.map(f=>new m.WebAnimation({element:f,integrator:w.from(s),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),p=a.map((f,h)=>new m.WebAnimation({element:f,integrator:w.from(s),style:(g,S)=>({transform:n==="horizontal"?`scaleX(${S})`:`scaleY(${S})`}),onComplete:h===a.length-1?()=>{c.remove(),l.remove(),o.style.zIndex="",o.style.position=""}:void 0})),d=new m.MultiAnimation(u,{mode:"parallel"}),y=new m.MultiAnimation(p,{mode:"parallel"});return new m.MultiAnimation([d,y],{mode:"sequence"})}}};function Ze(e){const{paths:t,type:n="horizontal"}=e;return _(t,()=>Be({direction:n}))}const Ge={spring:{stiffness:200,damping:20,doubleSpring:.7}},L=.5;function je(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`,opacity:`${L+(1-L)*(1-i)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${L}`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`,opacity:`${L+(1-L)*i}`})}}}function qe(){return{physics:Ge,build:je}}const Ke={spring:{stiffness:230,damping:25,doubleSpring:{stiffness:230,damping:24}}};function Je(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`})}}}function Qe(){return{physics:Ke,build:Je}}const tn={parallax:Qe(),crossfade:qe()},R="0",zt="1",O="2",en="parallax";function $t(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}const nn=(e={})=>{const t=e.direction??"enter",n=tn[e.type??en],i=n.physics,s=n.build(t),o=t==="enter"?R:O,r=t==="enter"?O:R;return{prepare:({from:l,to:a})=>(l.then(c=>{$t(c,s.out),c.style.pointerEvents="none",c.style.zIndex=o}),a.then(c=>{$t(c,s.in),c.style.position="relative",c.style.zIndex=r}),{}),animation:({from:l,to:a})=>{const c=new m.WebAnimation({element:l,integrator:w.from(i),style:p=>s.out.animate(p),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.opacity="",l.style.pointerEvents="",l.style.zIndex=""}}),u=new m.WebAnimation({element:a,integrator:w.from(i),style:p=>s.in.animate(p),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.opacity="",a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===r&&(a.style.zIndex="")}});for(const p of[c,u]){const d=p.onComplete;p.onComplete=()=>{d==null||d(),p.releaseFill()}}return new m.MultiAnimation([c,u],{mode:"parallel"})}}};function sn(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function on(e){const{enter:t,exit:n}=e,i=e.type,s=sn(i);return Ht({enter:t,exit:n},o=>nn({direction:o,type:s}))}const rn={spring:{stiffness:180,damping:20,doubleSpring:!0}},an={spring:{stiffness:170,damping:20,doubleSpring:!0}},ln=(e={})=>{const t=e.physics??an,n=e.physics??rn;return{prepare:({to:i})=>(i.then(s=>{s.style.opacity="0",s.style.willChange="opacity"}),{}),animation:({from:i,to:s})=>{const o=new m.WebAnimation({element:i,integrator:w.from(n),style:(l,a)=>({opacity:a}),onComplete:()=>{i.style.willChange="auto",i.style.opacity=""}}),r=new m.WebAnimation({element:s,integrator:w.from(t),style:l=>({opacity:l}),onComplete:()=>{s.style.willChange="auto",s.style.opacity=""}});return new m.MultiAnimation([o,r],{mode:"sequence"})}}};function cn(e){const{paths:t}=e;return _(t,()=>ln())}const q={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},F={scaleDown:0,translate:.2,scaleUp:.8},pn=.8,un="white",Et=1e3/60,dn=600;function fn(e){const{items:t,from:n,to:i,recordFrame:s}=e,o=Et/1e3,r=Math.abs(i-n),l=t.map(c=>({item:c,integrator:new V({stiffness:c.spring.stiffness,damping:c.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let c=0;c<l.length;c++)(c===0||l[c].item.offset===0)&&(l[c].started=!0);s(0);let a=0;for(let c=1;c<=dn;c++){const u=c*Et;a=u;for(const p of l)!p.started||p.settled||(p.state=p.integrator.step(p.state,i,o),p.integrator.isSettled(p.state,i)?(p.settleTime+=o,p.settleTime>=m.SETTLE_THRESHOLD&&(p.state={position:i,velocity:0},p.settled=!0)):p.settleTime=0,p.item.tick(p.state.position));for(let p=1;p<l.length;p++){const d=l[p];if(d.started)continue;const y=l[p-1];if(!y.started)continue;(r===0?1:Math.abs(y.state.position-n)/r)>=d.item.offset&&(d.started=!0)}if(s(u),l.every(p=>p.settled))return u}return a}function K(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function At(e){const{rect:t,scale:n,direction:i,override:s}=e,o=i==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},r=K(s,q.scaleDown),l=K(s,q.translate),a=K(s,q.scaleUp),c=i==="out"?1:0,u=i==="out"?0:1,p=i==="out"?[{spring:r,offset:F.scaleDown,tick:f=>{const h=1-f;o.scale=1-(1-n)*h}},{spring:l,offset:F.translate,tick:f=>{const h=1-f;o.translateY=-t.top-t.height*h}},{spring:a,offset:F.scaleUp,tick:f=>{const h=1-f;o.scale=n+(1-n)*h}}]:[{spring:r,offset:F.scaleDown,tick:f=>{o.scale=1-(1-n)*f}},{spring:l,offset:F.translate,tick:f=>{o.translateY=-t.top+t.height*(1-f)}},{spring:a,offset:F.scaleUp,tick:f=>{o.scale=n+(1-n)*f}}],d=[],y=fn({items:p,from:c,to:u,recordFrame:f=>d.push({time:f,scale:o.scale,translateY:o.translateY})});return{snapshots:d,totalDuration:y}}function hn(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),i=Math.floor(n),s=Math.ceil(n);if(i===s)return e[i];const o=e[i],r=e[s],l=n-i;return{time:o.time+(r.time-o.time)*l,scale:o.scale+(r.scale-o.scale)*l,translateY:o.translateY+(r.translateY-o.translateY)*l}}const yn=[[1,1],[-1,1],[1,-1],[-1,-1]];function mn(e,t){const s=(o,r,l)=>{const a=document.createElement("div");Object.assign(a.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...o});const c=document.createElement("div");Object.assign(c.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[l]:"0",[r]:"0"});const u=document.createElement("div");return Object.assign(u.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[l]:"0",[r]:"0"}),a.appendChild(c),a.appendChild(u),a};return{topLeft:s({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:s({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:s({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:s({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function Pt(e,t){const n=t.left+t.width/2,i=t.top+t.height/2;e.style.transformOrigin=`${n}px ${i}px`}function It(e,t){e.style.clipPath=`polygon(
30
+ `}a.push(u),l.appendChild(u)}return e.appendChild(l),{container:l,blinds:a}}const Be=(e={})=>{const t=e.blindCount??Ue,n=e.direction??Ve,i=e.blindColor??Xe,s=e.physics??ze;return{prepare:async({from:o,to:r})=>{const l=await o,a=await r;l.style.zIndex="1000";const c=Ct(l,t,n,i,"hidden","left");a.style.position="relative",a.style.zIndex="0";const u=Ct(a,t,n,i,"closed","right");return{fromEl:l,fromBlinds:c.blinds,fromContainer:c.container,toBlinds:u.blinds,toContainer:u.container}},animation:({fromEl:o,fromBlinds:r,fromContainer:l,toBlinds:a,toContainer:c})=>{const u=r.map(f=>new m.WebAnimation({element:f,integrator:w.from(s),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),p=a.map((f,h)=>new m.WebAnimation({element:f,integrator:w.from(s),style:(g,S)=>({transform:n==="horizontal"?`scaleX(${S})`:`scaleY(${S})`}),onComplete:h===a.length-1?()=>{c.remove(),l.remove(),o.style.zIndex="",o.style.position=""}:void 0})),d=new m.MultiAnimation(u,{mode:"parallel"}),y=new m.MultiAnimation(p,{mode:"parallel"});return new m.MultiAnimation([d,y],{mode:"sequence"})}}};function Ze(e){const{paths:t,type:n="horizontal"}=e;return _(t,()=>Be({direction:n}))}const Ge={spring:{stiffness:250,damping:23,doubleSpring:.7}},L=.5;function je(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`,opacity:`${L+(1-L)*(1-i)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${L}`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`,opacity:`${L+(1-L)*i}`})}}}function qe(){return{physics:Ge,build:je}}const Ke={spring:{stiffness:230,damping:25}};function Je(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`})}}}function Qe(){return{physics:Ke,build:Je}}const tn={parallax:Qe(),crossfade:qe()},R="0",zt="1",O="2",en="parallax";function $t(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}const nn=(e={})=>{const t=e.direction??"enter",n=tn[e.type??en],i=n.physics,s=n.build(t),o=t==="enter"?R:O,r=t==="enter"?O:R;return{prepare:({from:l,to:a})=>(l.then(c=>{$t(c,s.out),c.style.pointerEvents="none",c.style.zIndex=o}),a.then(c=>{$t(c,s.in),c.style.position="relative",c.style.zIndex=r}),{}),animation:({from:l,to:a})=>{const c=new m.WebAnimation({element:l,integrator:w.from(i),style:p=>s.out.animate(p),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.opacity="",l.style.pointerEvents="",l.style.zIndex=""}}),u=new m.WebAnimation({element:a,integrator:w.from(i),style:p=>s.in.animate(p),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.opacity="",a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===r&&(a.style.zIndex="")}});for(const p of[c,u]){const d=p.onComplete;p.onComplete=()=>{d==null||d(),p.releaseFill()}}return new m.MultiAnimation([c,u],{mode:"parallel"})}}};function sn(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function on(e){const{enter:t,exit:n}=e,i=e.type,s=sn(i);return Ht({enter:t,exit:n},o=>nn({direction:o,type:s}))}const rn={spring:{stiffness:180,damping:20,doubleSpring:!0}},an={spring:{stiffness:170,damping:20,doubleSpring:!0}},ln=(e={})=>{const t=e.physics??an,n=e.physics??rn;return{prepare:({to:i})=>(i.then(s=>{s.style.opacity="0",s.style.willChange="opacity"}),{}),animation:({from:i,to:s})=>{const o=new m.WebAnimation({element:i,integrator:w.from(n),style:(l,a)=>({opacity:a}),onComplete:()=>{i.style.willChange="auto",i.style.opacity=""}}),r=new m.WebAnimation({element:s,integrator:w.from(t),style:l=>({opacity:l}),onComplete:()=>{s.style.willChange="auto",s.style.opacity=""}});return new m.MultiAnimation([o,r],{mode:"sequence"})}}};function cn(e){const{paths:t}=e;return _(t,()=>ln())}const q={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},F={scaleDown:0,translate:.2,scaleUp:.8},pn=.8,un="white",Et=1e3/60,dn=600;function fn(e){const{items:t,from:n,to:i,recordFrame:s}=e,o=Et/1e3,r=Math.abs(i-n),l=t.map(c=>({item:c,integrator:new V({stiffness:c.spring.stiffness,damping:c.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let c=0;c<l.length;c++)(c===0||l[c].item.offset===0)&&(l[c].started=!0);s(0);let a=0;for(let c=1;c<=dn;c++){const u=c*Et;a=u;for(const p of l)!p.started||p.settled||(p.state=p.integrator.step(p.state,i,o),p.integrator.isSettled(p.state,i)?(p.settleTime+=o,p.settleTime>=m.SETTLE_THRESHOLD&&(p.state={position:i,velocity:0},p.settled=!0)):p.settleTime=0,p.item.tick(p.state.position));for(let p=1;p<l.length;p++){const d=l[p];if(d.started)continue;const y=l[p-1];if(!y.started)continue;(r===0?1:Math.abs(y.state.position-n)/r)>=d.item.offset&&(d.started=!0)}if(s(u),l.every(p=>p.settled))return u}return a}function K(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function At(e){const{rect:t,scale:n,direction:i,override:s}=e,o=i==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},r=K(s,q.scaleDown),l=K(s,q.translate),a=K(s,q.scaleUp),c=i==="out"?1:0,u=i==="out"?0:1,p=i==="out"?[{spring:r,offset:F.scaleDown,tick:f=>{const h=1-f;o.scale=1-(1-n)*h}},{spring:l,offset:F.translate,tick:f=>{const h=1-f;o.translateY=-t.top-t.height*h}},{spring:a,offset:F.scaleUp,tick:f=>{const h=1-f;o.scale=n+(1-n)*h}}]:[{spring:r,offset:F.scaleDown,tick:f=>{o.scale=1-(1-n)*f}},{spring:l,offset:F.translate,tick:f=>{o.translateY=-t.top+t.height*(1-f)}},{spring:a,offset:F.scaleUp,tick:f=>{o.scale=n+(1-n)*f}}],d=[],y=fn({items:p,from:c,to:u,recordFrame:f=>d.push({time:f,scale:o.scale,translateY:o.translateY})});return{snapshots:d,totalDuration:y}}function hn(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),i=Math.floor(n),s=Math.ceil(n);if(i===s)return e[i];const o=e[i],r=e[s],l=n-i;return{time:o.time+(r.time-o.time)*l,scale:o.scale+(r.scale-o.scale)*l,translateY:o.translateY+(r.translateY-o.translateY)*l}}const yn=[[1,1],[-1,1],[1,-1],[-1,-1]];function mn(e,t){const s=(o,r,l)=>{const a=document.createElement("div");Object.assign(a.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...o});const c=document.createElement("div");Object.assign(c.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[l]:"0",[r]:"0"});const u=document.createElement("div");return Object.assign(u.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[l]:"0",[r]:"0"}),a.appendChild(c),a.appendChild(u),a};return{topLeft:s({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:s({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:s({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:s({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function Pt(e,t){const n=t.left+t.width/2,i=t.top+t.height/2;e.style.transformOrigin=`${n}px ${i}px`}function It(e,t){e.style.clipPath=`polygon(
31
31
  ${t.left}px ${t.top}px,
32
32
  ${t.left+t.width}px ${t.top}px,
33
33
  ${t.left+t.width}px ${t.top+t.height}px,
34
34
  ${t.left}px ${t.top+t.height}px
35
- )`}function J(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ue({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(hn(t,r)),onComplete:s})}const gn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??un,n=pn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const a=D(l,"from"),c=D(l,"to"),u=k(document.body,l.positionedParent),p=mn(t,{...a,top:u.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(p[d]);return o.then(d=>{Pt(d,a),It(d,a),d.style.transform=`translateY(${-a.top}px)`}),r.then(d=>{Pt(d,c),It(d,c),d.style.transform=`translateY(${-c.top+c.height}px) scale(${n})`}),{borders:p,fromRect:a,toRect:c}},animation:({from:o,to:r,context:l,borders:a,fromRect:c,toRect:u})=>{const p=At({rect:c,scale:n,direction:"out",override:i}),d=At({rect:u,scale:n,direction:"in",override:i}),y=J(o,p.snapshots,p.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=J(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),h=yn.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return J(a[C],p.snapshots,p.totalDuration,I=>{const P=(c.width-c.width*I.scale)/2*.7*b,A=(c.height-c.height*I.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([y,f,...h],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=a[$];x.parentElement===b&&b.removeChild(x)}},g}}};function bn(e){const{paths:t,options:n}=e,i=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return _(t,()=>gn(i))}function wn(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 Sn(e){return e==="contain"||e==="cover"?e:null}function ot(e){return e.tagName==="IMG"}function xn(e){if(ot(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;ot(i)&&t.push(i)}return t.length===1?t[0]??null:null}function Cn(e){var a,c;if(!ot(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=((a=e.getAttribute("width"))==null?void 0:a.trim())??"",o=((c=e.getAttribute("height"))==null?void 0:c.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 $n(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function X(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function En(e){const t=X(e),n=$n(t.objectPosition??"");return{fit:n?Sn(t.objectFit??null):null,centered:n}}function Ut(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 _t(e){const t=X(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ut),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 An(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 Pn(e){const t=X(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ut(i)===0:!0)}function In(e){const t=X(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function v(e){return e.left+e.width/2}function T(e){return e.top+e.height/2}function pt(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 _n(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 Rt(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 Rn(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 Vt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?Rn(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:pt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function rt(e,t,n){return{...Vt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Xt(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 Ot(e){return rt(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function Bt(e,t){return Xt(e,t)?[e,t]:[Ot(e),Ot(t)]}function at(e,t,n,i){const s=xn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?wn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?Cn(s):null),a=s?En(s):{fit:null,centered:!0},c=a.centered&&(s===null||Pn(s))?a.fit??(r!==null?i.fallbackFit??null:null):null,u=Vt(o,l,c),p=In(e),y=s!==null&&s!==e&&p?_n(u.window,t):u.window,f=An(e,i.legacyRadiusAttribute),h=s===e||p,g=h?_t(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];y&&h&&Rt(y,t)&&$.push(g),y&&s&&Rt(y,o)&&$.push(_t(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),I=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!y||P==="unsupported"?rt(t,S,b):{...u,bbox:t,window:y,clipInset:pt(u.content,y),radius:I,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:u.contentAware?s:null}}function Zt(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:v(e)+(v(n)-v(t))/i-o/2,top:T(e)+(T(n)-T(t))/s-r/2,width:o,height:r}}const On={enter:"contain",exit:"cover",legacy:"contain"};function M(e){return On[e]}const vt="data-hero-enter-key",Tt="data-hero-exit-key",Q="data-hero-key";class vn{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 Tn=()=>new vn;class Dn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,a=n.style.willChange,c=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=a,i.style.willChange=c}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(u,p)=>({opacity:p})}),new m.WebAnimation({element:i,integrator:w.from(s),style:u=>({opacity:u})})]}}const Fn=()=>new Dn,Mn={static:Tn,fade:Fn},Yn={spring:{stiffness:320,damping:30}},Ln=()=>Yn,kn={spring:{stiffness:300,damping:30,doubleSpring:1}},Hn=()=>kn,Nn={default:Ln,smooth:Hn},Wn=700,zn="data-hero-aspect-ratio",Un="data-hero-radius";function Dt(e,t,n){const i=k(e,t);return at(t,i,s=>k(e,s),{fallbackFit:n,legacyAspectRatioAttribute:zn,legacyRadiusAttribute:Un})}function z(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 Vn(e,t){const n=[],i=z(t,vt),s=z(e,Tt);for(const[l,a]of i){const c=s.get(l);c&&n.push({key:l,fromEl:c,toEl:a,fromFit:M("exit"),toFit:M("enter")})}const o=z(e,vt),r=z(t,Tt);for(const[l,a]of o){const c=r.get(l);c&&n.push({key:l,fromEl:a,toEl:c,fromFit:M("enter"),toFit:M("exit")})}return n}function Xn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${Q}]`));for(const s of i){const o=s.getAttribute(Q);if(!o)continue;const r=e.querySelector(`[${Q}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:M("legacy"),toFit:M("legacy")})}return n}function Bn(e,t){const n=Vn(e,t);return n.length>0?n:Xn(e,t)}function Zn(e,t){return Bt(e,t)}function Gn(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 jn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Zn(Dt(e,i,t.fromFit),Dt(e,s,t.toFit)),l=o.content,a=o.window,c=r.content,u=r.window,p=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",y=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||a.width===0||a.height===0||c.width===0||c.height===0||u.width===0||u.height===0)return null;const h=Math.max(l.width/c.width,l.height/c.height),g=v(l),S=T(l),b=v(c),$=T(c),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const I=pt(c,Zt(c,l,a,h,h));return{toContent:c,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Gn(o,r),styleFor:(P,A)=>{const H=A*x,Y=A*C,N=P+A*h,Qt=Math.max(0,y*A+f*P)/Math.max(Math.abs(N),1e-6),te=I.top*A+p.top*P,ee=I.right*A+p.right*P,ne=I.bottom*A+p.bottom*P,ie=I.left*A+p.left*P;return{transform:`translate(${H}px, ${Y}px) scale(${N})`,clipPath:`inset(${te}px ${ee}px ${ne}px ${ie}px round ${Qt}px)`}}}}function qn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Kn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const a of n.pairs){const c=jn(s,a,o);if(!c)continue;const{fromVisualEl:u,toVisualEl:p}=c,d=p.cloneNode(!0);d.style.position="absolute",d.style.left=`${c.toContent.left}px`,d.style.top=`${c.toContent.top}px`,d.style.width=`${c.toContent.width}px`,d.style.height=`${c.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",c.resetCloneRadius&&(d.style.borderRadius="0"),qn(d,c.styleFor(0,1)),s.appendChild(d);const y=u.style.opacity,f=p.style.opacity;u.style.opacity="0",p.style.opacity="0",r(()=>{u.style.opacity=y,p.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:c.styleFor}))}return l}}function Jn(e){return[new Kn,Mn[e.type]()]}const Qn=e=>{const t=Jn(e),n=Nn[e.variant](),i=Wn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([a,c])=>({pairs:Bn(a,c)})),r={from:s.from,to:s.to,resolved:o};for(const a of t)(l=a.prepare)==null||l.call(a,r);return o.then(a=>({resolved:a}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const a=[],c=f=>{a.push(f)},u={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:c},p=[];for(const f of t)f.contribute&&p.push(...f.contribute(u));if(p.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(p,{mode:"parallel"}),y=d.onComplete;return d.onComplete=()=>{y==null||y();for(const f of a)try{f()}catch(h){console.error("[hero] cleanup error",h)}},d}}};function ti(e){const{paths:t}=e,n=e.type??"static",i=e.variant??"default";return _(t,()=>Qn({type:n,variant:i}))}const ei={spring:{stiffness:50,damping:30}},ni={spring:{stiffness:80,damping:25}},ii=(e={})=>{const t=e.physics??ei,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(a=>{a.style.opacity="1"}),r.then(a=>{const c=D(l,"to"),u=Math.min(c.width,c.height)*.4;a.style.setProperty("--max-border-radius",`${u}px`),a.style.setProperty("--border-radius-scale","1"),a.style.willChange="transform",a.style.backfaceVisibility="hidden";const p=c.left+c.width/2,d=c.top+c.height/2;a.style.transformOrigin=`${p}px ${d}px`,a.style.position="fixed",a.style.top=`${c.top}px`,a.style.left=`${c.left}px`,a.style.width=`${c.width}px`,a.style.height=`${c.height}px`,a.style.zIndex="1000",a.style.overflow="hidden",a.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,a.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",a.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(ni),style:(c,u)=>({opacity:u}),onComplete:()=>{o.style.opacity=""}}),a=new m.WebAnimation({element:r,integrator:w.from(t),style:c=>{let u;if(c<=.05)u=i;else if(c<=s){const f=(c-.05)/(s-.05),h=Math.pow(f,9);u=i+(.8-i)*h}else{const f=(c-s)/(1-s);u=.8+.2*(1-Math.pow(1-f,3))}const p=.7;let d;if(c<=p)d=n;else{const f=(c-p)/(1-p),h=1-Math.pow(1-f,2);d=n*(1-h)}let y;if(c<=p)y=1;else{const f=(c-p)/(1-p);y=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${u.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,a],{mode:"parallel"})}}};function si(e){const{paths:t}=e;return _(t,()=>ii())}const oi={spring:{stiffness:100,damping:30}},ri=(e={})=>{const t=e.physics??oi;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 ai(e){const{paths:t}=e;return _(t,()=>ri())}const li={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Ft=(e={})=>{const t=e.direction??"up",n=e.physics??li,i=t==="up",s=i?R:O,o=i?O:R;return{prepare:({from:r,to:l})=>(r.then(a=>{a.style.zIndex=s,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),l.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=o}),{}),animation:({from:r,to:l})=>{const a=r.offsetHeight,c=l.offsetHeight,u=window.innerHeight,p=Math.max(Math.min(a,c),u),d=new m.WebAnimation({element:r,integrator:w.from(n),style:f=>({transform:`translate3d(0, ${i?-p*f:p*f}px, 0)`}),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform="",r.style.pointerEvents="",r.style.zIndex=""}}),y=new m.WebAnimation({element:l,integrator:w.from(n),style:(f,h)=>({transform:`translate3d(0, ${i?h*p:h*-p}px, 0)`}),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.position==="relative"&&(l.style.position=""),l.style.zIndex===o&&(l.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 ci(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?_(t,()=>Ft({direction:"up"})):ct(t,{forward:"up",backward:"down"},i=>Ft({direction:i}))}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.2;function di(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-tt*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:e})}}}const fi={spring:{stiffness:200,damping:24}},hi={inertia:{acceleration:25,resistance:1.2}},et=.08,yi=16,nt=.6,mi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function gi(){return{enterPhysics:fi,exitPhysics:hi,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-et*e})`,opacity:1-(1-nt)*e}),exitStyle:e=>({transform:`scale(${1-et+et*e})`,opacity:nt+(1-nt)*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=mi(yi*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const bi={spring:{stiffness:200,damping:24}},wi={inertia:{acceleration:25,resistance:1.2}};function Si(){return{enterPhysics:bi,exitPhysics:wi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const xi={static:Si(),"background-scale":di(),blur:gi()},Ci="static",$i="transform",Ei=(e={})=>{const t=e.direction??"enter",n=xi[e.type??Ci],i=t==="enter"?n.enterPhysics:n.exitPhysics,s=n.background,o=n.overlay,r=s.willChange!=="";return{prepare:({from:l,to:a,context:c,createElement:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a;p.then(f=>{f.style.willChange=$i,f.style.backfaceVisibility="hidden",f.style.contain="layout paint",f.style.zIndex=O,t==="enter"?f.style.position="relative":f.style.pointerEvents="none"}),d.then(f=>{r&&(f.style.willChange=s.willChange,f.style.backfaceVisibility="hidden",f.style.contain="layout paint"),f.style.zIndex=R,t==="enter"?f.style.pointerEvents="none":f.style.position="relative"});let y;return o&&(y=u("sheet-overlay"),Object.assign(y.style,o.initialStyle),y.style.willChange=o.willChange,c.positionedParent.appendChild(y)),{overlay:y}},animation:({from:l,to:a,context:c,overlay:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a,y=D(c,t==="enter"?"to":"from"),f=()=>{l.style.pointerEvents="",l.style.zIndex=""},h=()=>{const x=t==="enter"?O:R;a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===x&&(a.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};p.style.clipPath=`inset(${y.top}px 0 calc(100% - ${y.top+y.height}px) 0)`;const S=t==="enter"?(x,C)=>({transform:`translate3d(0, ${C*y.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*y.height}px, 0)`}),b=new m.WebAnimation({element:p,integrator:w.from(i),style:S,onComplete:()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transform="",f(),h()}});g(b);const $=[b];if(r){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=D(c,t==="enter"?"from":"to"),I=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=`${I}px ${P}px`;const A=t==="enter"?(Y,N)=>s.enterStyle(Y,N):Y=>s.exitStyle(Y),H=new m.WebAnimation({element:d,integrator:w.from(i),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(H),$.push(H)}if(u&&o){u.style.zIndex=zt;const x=Nt(c,"to");u.style.top=`${x.top}px`,u.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:u,integrator:w.from(i),style:C=>o.style(t,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ai(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function Pi(e){const{enter:t,exit:n}=e,i=e.type,s=Ai(i);return Ht({enter:t,exit:n},o=>Ei({direction:o,type:s}))}const Ii={spring:{stiffness:170,damping:22,doubleSpring:.8}},_i=(e={})=>{const t=e.direction??"left",n=e.physics??Ii,i=t==="left";return{prepare:({from:s,to:o})=>(s.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),o.then(r=>{const l=i?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}),animation:({from:s,to:o})=>{const r=new m.WebAnimation({element:s,integrator:w.from(n),style:a=>({transform:`translate3d(${i?-100*a:100*a}%, 0, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.pointerEvents=""}}),l=new m.WebAnimation({element:o,integrator:w.from(n),style:(a,c)=>({transform:`translate3d(${i?c*100:c*-100}%, 0, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Ri(e){const{paths:t}=e;return ct(t,{forward:"left",backward:"right"},n=>_i({direction:n}))}const Oi={spring:{stiffness:17,damping:6}},it=20,U=800,vi=(e={})=>{const t=e.physics??Oi;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(${U}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(${U}px) rotateY(${it}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*it,a=r*100;return{transform:`perspective(${U}px) rotateY(${l}deg) translate3d(${a}%, 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 a=l*it,c=-l*100;return{transform:`perspective(${U}px) rotateY(${a}deg) translate3d(${c}%, 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 Ti(e){const{paths:t}=e;return _(t,()=>vi())}function Di(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 Gt(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||!Xt(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,a=Zt(s,o,i.window,r,l);return Di(n.window,a)?{enterContent:s,exitContent:o,startWindow:a,scaleX:r,scaleY:l}:t()}function jt(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 qt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function Fi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,s*h+i*(1-h)),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h}px, ${d*h}px) scale(${g}, ${S})`}}}}function Mi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,i*(1-h)+s*h),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h-n.x}px, ${d*h}px) scale(${g}, ${S})`}}}}const Yi={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Kt=.12,Li=18;function ki(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}function Hi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}const st={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(${Li*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Ni{constructor(){E(this,"physics",Yi)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,a=r?ki():Hi();return a&&(l.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(c,u)=>a.animate(u):c=>a.animate(c)})]}}class Wi{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,st.initialStyle),n.style.willChange=st.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=zt;const i=Nt(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=>st.style(t.resolved.mode,s)})]}}const zi={spring:{stiffness:430,damping:33,doubleSpring:1}};function Ui({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:a=>{const c=1-a;return{transform:`translate(${i*c-n.x}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}function Vi({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:a=>{const c=1-a;return{transform:`translate(${i*c}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}class Xi{constructor(){E(this,"physics",zi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",a=l?n:i,c=l?Ui(o):Vi(o);return c&&(a.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:a,integrator:w.from(r),style:l?(u,p)=>c.animate(p):u=>c.animate(u)})]}}const Bi={spring:{stiffness:530,damping:34,doubleSpring:1}};class Zi{constructor(){E(this,"physics",Bi)}contribute(t){return[]}}const Gi={expand:()=>new Xi,static:()=>new Zi,blur:()=>new Ni};function ji(e){return Gi[e]()}const lt="data-zoom-enter-key",Mt="data-zoom-exit-key",Yt="data-zoom-radius";function qi(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 Ki(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 Lt(e){const t=e.querySelectorAll(`[${lt}]`);return t.length!==1?null:t[0]}function kt(e,t){const n=e.querySelectorAll(`[${Mt}]`);for(const i of n)if(i.getAttribute(Mt)===t)return i;return null}function Ji(e,t){const n=Lt(e),i=Lt(t);if(!n&&i){const s=i.getAttribute(lt);if(!s)return null;const o=kt(e,s);return o?{mode:"enter",enterEl:i,exitEl:o}:null}if(n&&!i){const s=n.getAttribute(lt);if(!s)return null;const o=kt(t,s);return o?{mode:"exit",enterEl:n,exitEl:o}:null}return null}function Qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=W(s,e.enterEl),l=W(o,e.exitEl),a=at(e.enterEl,r,g=>W(s,g),{legacyRadiusAttribute:Yt}),c=at(e.exitEl,l,g=>W(o,g),{legacyRadiusAttribute:Yt}),[u,p]=Bt(a,c),d=u.contentAware&&p.contentAware,y=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:y.width,height:y.height},h=u.radiusSource==="legacy"||qi(u.window,f)?u.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:u,exitMedia:p}:{},pageRect:y,scrollOffset:i,enterRadius:h,exitRadius:p.radius}}class ts{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,a=s.mode==="enter",c=a?Fi(o):Mi(o),u=a?i:n,p=a?"t":"u";c&&(u.style.transformOrigin=c.transformOrigin);const d=a?R:O,y=a?O:R,f=n.style.zIndex;n.style.zIndex=d;const h=i.style.zIndex,g=i.style.position;return i.style.zIndex=y,i.style.position="relative",l(()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.transformOrigin="",u.style.contain="",n.style.zIndex=f,i.style.zIndex===y&&(i.style.zIndex=h),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:u,integrator:w.from(r),style:p==="t"?S=>c.animate(S):(S,b)=>c.animate(b)})]}}class es{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,a=Ki(l,n.enterEl);if(a.length===0)return[];const c=a.map(u=>u.style.opacity);if(n.mode==="enter")for(const u of a)u.style.opacity="0";return r(()=>{for(let u=0;u<a.length;u++){const p=a[u];p&&(p.style.opacity=c[u]??"")}}),a.map(u=>new m.WebAnimation({element:u,integrator:w.from(i),style:(p,d)=>({opacity:n.mode==="enter"?p:d})}))}}class Jt{contribute(){return[]}}const ns={default:()=>new Jt,fade:()=>new es};function is(e){return ns[e]()}class ss extends Jt{}function os(e){const t=ji(e.type);return{strategies:[new ts,t,is(e.variant),new ss,...e.type==="blur"?[new Wi]:[]],physics:t.physics}}const rs=e=>{const{strategies:t,physics:n}=os(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);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const a=Qi(l,i,s,o.scrollOffset),c=[],p={from:i,to:s,resolved:l,input:a,physics:n,context:o,extras:r,onComplete:f=>{c.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(p));const y=d[0];if(y){const f=y.onComplete;y.onComplete=()=>{f==null||f();for(const h of c)try{h()}catch(g){console.error("[zoom] cleanup error",g)}}}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 as(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function ls(e){const t=as(e);return _(e.paths,()=>rs(t))}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=We;exports.blind=Ze;exports.drill=on;exports.fade=cn;exports.film=bn;exports.hero=ti;exports.jaemin=si;exports.rotate=ai;exports.scroll=ci;exports.sheet=Pi;exports.slide=Ri;exports.strip=Ti;exports.zoom=ls;
35
+ )`}function J(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ue({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(hn(t,r)),onComplete:s})}const gn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??un,n=pn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const a=D(l,"from"),c=D(l,"to"),u=k(document.body,l.positionedParent),p=mn(t,{...a,top:u.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(p[d]);return o.then(d=>{Pt(d,a),It(d,a),d.style.transform=`translateY(${-a.top}px)`}),r.then(d=>{Pt(d,c),It(d,c),d.style.transform=`translateY(${-c.top+c.height}px) scale(${n})`}),{borders:p,fromRect:a,toRect:c}},animation:({from:o,to:r,context:l,borders:a,fromRect:c,toRect:u})=>{const p=At({rect:c,scale:n,direction:"out",override:i}),d=At({rect:u,scale:n,direction:"in",override:i}),y=J(o,p.snapshots,p.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=J(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),h=yn.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return J(a[C],p.snapshots,p.totalDuration,I=>{const P=(c.width-c.width*I.scale)/2*.7*b,A=(c.height-c.height*I.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([y,f,...h],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=a[$];x.parentElement===b&&b.removeChild(x)}},g}}};function bn(e){const{paths:t,options:n}=e,i=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return _(t,()=>gn(i))}function wn(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 Sn(e){return e==="contain"||e==="cover"?e:null}function ot(e){return e.tagName==="IMG"}function xn(e){if(ot(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;ot(i)&&t.push(i)}return t.length===1?t[0]??null:null}function Cn(e){var a,c;if(!ot(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=((a=e.getAttribute("width"))==null?void 0:a.trim())??"",o=((c=e.getAttribute("height"))==null?void 0:c.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 $n(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function X(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function En(e){const t=X(e),n=$n(t.objectPosition??"");return{fit:n?Sn(t.objectFit??null):null,centered:n}}function Ut(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 _t(e){const t=X(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ut),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 An(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 Pn(e){const t=X(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ut(i)===0:!0)}function In(e){const t=X(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function v(e){return e.left+e.width/2}function T(e){return e.top+e.height/2}function pt(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 _n(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 Rt(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 Rn(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 Vt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?Rn(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:pt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function rt(e,t,n){return{...Vt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Xt(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 Ot(e){return rt(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function Bt(e,t){return Xt(e,t)?[e,t]:[Ot(e),Ot(t)]}function at(e,t,n,i){const s=xn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?wn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?Cn(s):null),a=s?En(s):{fit:null,centered:!0},c=a.centered&&(s===null||Pn(s))?a.fit??(r!==null?i.fallbackFit??null:null):null,u=Vt(o,l,c),p=In(e),y=s!==null&&s!==e&&p?_n(u.window,t):u.window,f=An(e,i.legacyRadiusAttribute),h=s===e||p,g=h?_t(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];y&&h&&Rt(y,t)&&$.push(g),y&&s&&Rt(y,o)&&$.push(_t(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),I=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!y||P==="unsupported"?rt(t,S,b):{...u,bbox:t,window:y,clipInset:pt(u.content,y),radius:I,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:u.contentAware?s:null}}function Zt(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:v(e)+(v(n)-v(t))/i-o/2,top:T(e)+(T(n)-T(t))/s-r/2,width:o,height:r}}const On={enter:"contain",exit:"cover",legacy:"contain"};function M(e){return On[e]}const vt="data-hero-enter-key",Tt="data-hero-exit-key",Q="data-hero-key";class vn{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 Tn=()=>new vn;class Dn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,a=n.style.willChange,c=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=a,i.style.willChange=c}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(u,p)=>({opacity:p})}),new m.WebAnimation({element:i,integrator:w.from(s),style:u=>({opacity:u})})]}}const Fn=()=>new Dn,Mn={static:Tn,fade:Fn},Yn={spring:{stiffness:320,damping:30}},Ln=()=>Yn,kn={spring:{stiffness:300,damping:30,doubleSpring:1}},Hn=()=>kn,Nn={default:Ln,smooth:Hn},Wn=700,zn="data-hero-aspect-ratio",Un="data-hero-radius";function Dt(e,t,n){const i=k(e,t);return at(t,i,s=>k(e,s),{fallbackFit:n,legacyAspectRatioAttribute:zn,legacyRadiusAttribute:Un})}function z(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 Vn(e,t){const n=[],i=z(t,vt),s=z(e,Tt);for(const[l,a]of i){const c=s.get(l);c&&n.push({key:l,fromEl:c,toEl:a,fromFit:M("exit"),toFit:M("enter")})}const o=z(e,vt),r=z(t,Tt);for(const[l,a]of o){const c=r.get(l);c&&n.push({key:l,fromEl:a,toEl:c,fromFit:M("enter"),toFit:M("exit")})}return n}function Xn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${Q}]`));for(const s of i){const o=s.getAttribute(Q);if(!o)continue;const r=e.querySelector(`[${Q}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:M("legacy"),toFit:M("legacy")})}return n}function Bn(e,t){const n=Vn(e,t);return n.length>0?n:Xn(e,t)}function Zn(e,t){return Bt(e,t)}function Gn(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 jn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Zn(Dt(e,i,t.fromFit),Dt(e,s,t.toFit)),l=o.content,a=o.window,c=r.content,u=r.window,p=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",y=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||a.width===0||a.height===0||c.width===0||c.height===0||u.width===0||u.height===0)return null;const h=Math.max(l.width/c.width,l.height/c.height),g=v(l),S=T(l),b=v(c),$=T(c),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const I=pt(c,Zt(c,l,a,h,h));return{toContent:c,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Gn(o,r),styleFor:(P,A)=>{const H=A*x,Y=A*C,N=P+A*h,Qt=Math.max(0,y*A+f*P)/Math.max(Math.abs(N),1e-6),te=I.top*A+p.top*P,ee=I.right*A+p.right*P,ne=I.bottom*A+p.bottom*P,ie=I.left*A+p.left*P;return{transform:`translate(${H}px, ${Y}px) scale(${N})`,clipPath:`inset(${te}px ${ee}px ${ne}px ${ie}px round ${Qt}px)`}}}}function qn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Kn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const a of n.pairs){const c=jn(s,a,o);if(!c)continue;const{fromVisualEl:u,toVisualEl:p}=c,d=p.cloneNode(!0);d.style.position="absolute",d.style.left=`${c.toContent.left}px`,d.style.top=`${c.toContent.top}px`,d.style.width=`${c.toContent.width}px`,d.style.height=`${c.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",c.resetCloneRadius&&(d.style.borderRadius="0"),qn(d,c.styleFor(0,1)),s.appendChild(d);const y=u.style.opacity,f=p.style.opacity;u.style.opacity="0",p.style.opacity="0",r(()=>{u.style.opacity=y,p.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:c.styleFor}))}return l}}function Jn(e){return[new Kn,Mn[e.type]()]}const Qn=e=>{const t=Jn(e),n=Nn[e.variant](),i=Wn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([a,c])=>({pairs:Bn(a,c)})),r={from:s.from,to:s.to,resolved:o};for(const a of t)(l=a.prepare)==null||l.call(a,r);return o.then(a=>({resolved:a}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const a=[],c=f=>{a.push(f)},u={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:c},p=[];for(const f of t)f.contribute&&p.push(...f.contribute(u));if(p.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(p,{mode:"parallel"}),y=d.onComplete;return d.onComplete=()=>{y==null||y();for(const f of a)try{f()}catch(h){console.error("[hero] cleanup error",h)}},d}}};function ti(e){const{paths:t}=e,n=e.type??"static",i=e.variant??"default";return _(t,()=>Qn({type:n,variant:i}))}const ei={spring:{stiffness:50,damping:30}},ni={spring:{stiffness:80,damping:25}},ii=(e={})=>{const t=e.physics??ei,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(a=>{a.style.opacity="1"}),r.then(a=>{const c=D(l,"to"),u=Math.min(c.width,c.height)*.4;a.style.setProperty("--max-border-radius",`${u}px`),a.style.setProperty("--border-radius-scale","1"),a.style.willChange="transform",a.style.backfaceVisibility="hidden";const p=c.left+c.width/2,d=c.top+c.height/2;a.style.transformOrigin=`${p}px ${d}px`,a.style.position="fixed",a.style.top=`${c.top}px`,a.style.left=`${c.left}px`,a.style.width=`${c.width}px`,a.style.height=`${c.height}px`,a.style.zIndex="1000",a.style.overflow="hidden",a.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,a.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",a.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(ni),style:(c,u)=>({opacity:u}),onComplete:()=>{o.style.opacity=""}}),a=new m.WebAnimation({element:r,integrator:w.from(t),style:c=>{let u;if(c<=.05)u=i;else if(c<=s){const f=(c-.05)/(s-.05),h=Math.pow(f,9);u=i+(.8-i)*h}else{const f=(c-s)/(1-s);u=.8+.2*(1-Math.pow(1-f,3))}const p=.7;let d;if(c<=p)d=n;else{const f=(c-p)/(1-p),h=1-Math.pow(1-f,2);d=n*(1-h)}let y;if(c<=p)y=1;else{const f=(c-p)/(1-p);y=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${u.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,a],{mode:"parallel"})}}};function si(e){const{paths:t}=e;return _(t,()=>ii())}const oi={spring:{stiffness:100,damping:30}},ri=(e={})=>{const t=e.physics??oi;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 ai(e){const{paths:t}=e;return _(t,()=>ri())}const li={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Ft=(e={})=>{const t=e.direction??"up",n=e.physics??li,i=t==="up",s=i?R:O,o=i?O:R;return{prepare:({from:r,to:l})=>(r.then(a=>{a.style.zIndex=s,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),l.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=o}),{}),animation:({from:r,to:l})=>{const a=r.offsetHeight,c=l.offsetHeight,u=window.innerHeight,p=Math.max(Math.min(a,c),u),d=new m.WebAnimation({element:r,integrator:w.from(n),style:f=>({transform:`translate3d(0, ${i?-p*f:p*f}px, 0)`}),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform="",r.style.pointerEvents="",r.style.zIndex=""}}),y=new m.WebAnimation({element:l,integrator:w.from(n),style:(f,h)=>({transform:`translate3d(0, ${i?h*p:h*-p}px, 0)`}),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.position==="relative"&&(l.style.position=""),l.style.zIndex===o&&(l.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 ci(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?_(t,()=>Ft({direction:"up"})):ct(t,{forward:"up",backward:"down"},i=>Ft({direction:i}))}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.2;function di(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-tt*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:e})}}}const fi={spring:{stiffness:200,damping:24}},hi={inertia:{acceleration:25,resistance:1.2}},et=.08,yi=16,nt=.6,mi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function gi(){return{enterPhysics:fi,exitPhysics:hi,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-et*e})`,opacity:1-(1-nt)*e}),exitStyle:e=>({transform:`scale(${1-et+et*e})`,opacity:nt+(1-nt)*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=mi(yi*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const bi={spring:{stiffness:230,damping:25}},wi={spring:{stiffness:230,damping:25}};function Si(){return{enterPhysics:bi,exitPhysics:wi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const xi={static:Si(),"background-scale":di(),blur:gi()},Ci="static",$i="transform",Ei=(e={})=>{const t=e.direction??"enter",n=xi[e.type??Ci],i=t==="enter"?n.enterPhysics:n.exitPhysics,s=n.background,o=n.overlay,r=s.willChange!=="";return{prepare:({from:l,to:a,context:c,createElement:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a;p.then(f=>{f.style.willChange=$i,f.style.backfaceVisibility="hidden",f.style.contain="layout paint",f.style.zIndex=O,t==="enter"?f.style.position="relative":f.style.pointerEvents="none"}),d.then(f=>{r&&(f.style.willChange=s.willChange,f.style.backfaceVisibility="hidden",f.style.contain="layout paint"),f.style.zIndex=R,t==="enter"?f.style.pointerEvents="none":f.style.position="relative"});let y;return o&&(y=u("sheet-overlay"),Object.assign(y.style,o.initialStyle),y.style.willChange=o.willChange,c.positionedParent.appendChild(y)),{overlay:y}},animation:({from:l,to:a,context:c,overlay:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a,y=D(c,t==="enter"?"to":"from"),f=()=>{l.style.pointerEvents="",l.style.zIndex=""},h=()=>{const x=t==="enter"?O:R;a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===x&&(a.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};p.style.clipPath=`inset(${y.top}px 0 calc(100% - ${y.top+y.height}px) 0)`;const S=t==="enter"?(x,C)=>({transform:`translate3d(0, ${C*y.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*y.height}px, 0)`}),b=new m.WebAnimation({element:p,integrator:w.from(i),style:S,onComplete:()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transform="",f(),h()}});g(b);const $=[b];if(r){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=D(c,t==="enter"?"from":"to"),I=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=`${I}px ${P}px`;const A=t==="enter"?(Y,N)=>s.enterStyle(Y,N):Y=>s.exitStyle(Y),H=new m.WebAnimation({element:d,integrator:w.from(i),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(H),$.push(H)}if(u&&o){u.style.zIndex=zt;const x=Nt(c,"to");u.style.top=`${x.top}px`,u.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:u,integrator:w.from(i),style:C=>o.style(t,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ai(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function Pi(e){const{enter:t,exit:n}=e,i=e.type,s=Ai(i);return Ht({enter:t,exit:n},o=>Ei({direction:o,type:s}))}const Ii={spring:{stiffness:170,damping:22,doubleSpring:.8}},_i=(e={})=>{const t=e.direction??"left",n=e.physics??Ii,i=t==="left";return{prepare:({from:s,to:o})=>(s.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),o.then(r=>{const l=i?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}),animation:({from:s,to:o})=>{const r=new m.WebAnimation({element:s,integrator:w.from(n),style:a=>({transform:`translate3d(${i?-100*a:100*a}%, 0, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.pointerEvents=""}}),l=new m.WebAnimation({element:o,integrator:w.from(n),style:(a,c)=>({transform:`translate3d(${i?c*100:c*-100}%, 0, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Ri(e){const{paths:t}=e;return ct(t,{forward:"left",backward:"right"},n=>_i({direction:n}))}const Oi={spring:{stiffness:17,damping:6}},it=20,U=800,vi=(e={})=>{const t=e.physics??Oi;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(${U}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(${U}px) rotateY(${it}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*it,a=r*100;return{transform:`perspective(${U}px) rotateY(${l}deg) translate3d(${a}%, 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 a=l*it,c=-l*100;return{transform:`perspective(${U}px) rotateY(${a}deg) translate3d(${c}%, 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 Ti(e){const{paths:t}=e;return _(t,()=>vi())}function Di(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 Gt(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||!Xt(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,a=Zt(s,o,i.window,r,l);return Di(n.window,a)?{enterContent:s,exitContent:o,startWindow:a,scaleX:r,scaleY:l}:t()}function jt(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 qt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function Fi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,s*h+i*(1-h)),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h}px, ${d*h}px) scale(${g}, ${S})`}}}}function Mi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,i*(1-h)+s*h),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h-n.x}px, ${d*h}px) scale(${g}, ${S})`}}}}const Yi={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Kt=.12,Li=18;function ki(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}function Hi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}const st={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(${Li*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Ni{constructor(){E(this,"physics",Yi)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,a=r?ki():Hi();return a&&(l.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(c,u)=>a.animate(u):c=>a.animate(c)})]}}class Wi{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,st.initialStyle),n.style.willChange=st.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=zt;const i=Nt(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=>st.style(t.resolved.mode,s)})]}}const zi={spring:{stiffness:430,damping:33,doubleSpring:1}};function Ui({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:a=>{const c=1-a;return{transform:`translate(${i*c-n.x}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}function Vi({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:a=>{const c=1-a;return{transform:`translate(${i*c}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}class Xi{constructor(){E(this,"physics",zi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",a=l?n:i,c=l?Ui(o):Vi(o);return c&&(a.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:a,integrator:w.from(r),style:l?(u,p)=>c.animate(p):u=>c.animate(u)})]}}const Bi={spring:{stiffness:530,damping:34,doubleSpring:1}};class Zi{constructor(){E(this,"physics",Bi)}contribute(t){return[]}}const Gi={expand:()=>new Xi,static:()=>new Zi,blur:()=>new Ni};function ji(e){return Gi[e]()}const lt="data-zoom-enter-key",Mt="data-zoom-exit-key",Yt="data-zoom-radius";function qi(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 Ki(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 Lt(e){const t=e.querySelectorAll(`[${lt}]`);return t.length!==1?null:t[0]}function kt(e,t){const n=e.querySelectorAll(`[${Mt}]`);for(const i of n)if(i.getAttribute(Mt)===t)return i;return null}function Ji(e,t){const n=Lt(e),i=Lt(t);if(!n&&i){const s=i.getAttribute(lt);if(!s)return null;const o=kt(e,s);return o?{mode:"enter",enterEl:i,exitEl:o}:null}if(n&&!i){const s=n.getAttribute(lt);if(!s)return null;const o=kt(t,s);return o?{mode:"exit",enterEl:n,exitEl:o}:null}return null}function Qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=W(s,e.enterEl),l=W(o,e.exitEl),a=at(e.enterEl,r,g=>W(s,g),{legacyRadiusAttribute:Yt}),c=at(e.exitEl,l,g=>W(o,g),{legacyRadiusAttribute:Yt}),[u,p]=Bt(a,c),d=u.contentAware&&p.contentAware,y=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:y.width,height:y.height},h=u.radiusSource==="legacy"||qi(u.window,f)?u.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:u,exitMedia:p}:{},pageRect:y,scrollOffset:i,enterRadius:h,exitRadius:p.radius}}class ts{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,a=s.mode==="enter",c=a?Fi(o):Mi(o),u=a?i:n,p=a?"t":"u";c&&(u.style.transformOrigin=c.transformOrigin);const d=a?R:O,y=a?O:R,f=n.style.zIndex;n.style.zIndex=d;const h=i.style.zIndex,g=i.style.position;return i.style.zIndex=y,i.style.position="relative",l(()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.transformOrigin="",u.style.contain="",n.style.zIndex=f,i.style.zIndex===y&&(i.style.zIndex=h),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:u,integrator:w.from(r),style:p==="t"?S=>c.animate(S):(S,b)=>c.animate(b)})]}}class es{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,a=Ki(l,n.enterEl);if(a.length===0)return[];const c=a.map(u=>u.style.opacity);if(n.mode==="enter")for(const u of a)u.style.opacity="0";return r(()=>{for(let u=0;u<a.length;u++){const p=a[u];p&&(p.style.opacity=c[u]??"")}}),a.map(u=>new m.WebAnimation({element:u,integrator:w.from(i),style:(p,d)=>({opacity:n.mode==="enter"?p:d})}))}}class Jt{contribute(){return[]}}const ns={default:()=>new Jt,fade:()=>new es};function is(e){return ns[e]()}class ss extends Jt{}function os(e){const t=ji(e.type);return{strategies:[new ts,t,is(e.variant),new ss,...e.type==="blur"?[new Wi]:[]],physics:t.physics}}const rs=e=>{const{strategies:t,physics:n}=os(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);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const a=Qi(l,i,s,o.scrollOffset),c=[],p={from:i,to:s,resolved:l,input:a,physics:n,context:o,extras:r,onComplete:f=>{c.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(p));const y=d[0];if(y){const f=y.onComplete;y.onComplete=()=>{f==null||f();for(const h of c)try{h()}catch(g){console.error("[zoom] cleanup error",g)}}}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 as(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function ls(e){const t=as(e);return _(e.paths,()=>rs(t))}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=We;exports.blind=Ze;exports.drill=on;exports.fade=cn;exports.film=bn;exports.hero=ti;exports.jaemin=si;exports.rotate=ai;exports.scroll=ci;exports.sheet=Pi;exports.slide=Ri;exports.strip=Ti;exports.zoom=ls;
package/dist/index.js CHANGED
@@ -692,7 +692,11 @@ function oo(e) {
692
692
  );
693
693
  }
694
694
  const qe = {
695
- spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
695
+ spring: {
696
+ stiffness: 250,
697
+ damping: 23,
698
+ doubleSpring: 0.7
699
+ }
696
700
  }, k = 0.5;
697
701
  function Ke(e) {
698
702
  const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
@@ -727,11 +731,7 @@ function Je() {
727
731
  const Qe = {
728
732
  spring: {
729
733
  stiffness: 230,
730
- damping: 25,
731
- doubleSpring: {
732
- stiffness: 230,
733
- damping: 24
734
- }
734
+ damping: 25
735
735
  }
736
736
  };
737
737
  function tn(e) {
@@ -1844,9 +1844,15 @@ function ds() {
1844
1844
  };
1845
1845
  }
1846
1846
  const fs = {
1847
- spring: { stiffness: 200, damping: 24 }
1847
+ spring: {
1848
+ stiffness: 230,
1849
+ damping: 25
1850
+ }
1848
1851
  }, hs = {
1849
- inertia: { acceleration: 25, resistance: 1.2 }
1852
+ spring: {
1853
+ stiffness: 230,
1854
+ damping: 25
1855
+ }
1850
1856
  };
1851
1857
  function ys() {
1852
1858
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"crossfade.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/crossfade.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AAsClB,wBAAgB,uBAAuB,IAAI,aAAa,CAKvD"}
1
+ {"version":3,"file":"crossfade.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/crossfade.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AA0ClB,wBAAgB,uBAAuB,IAAI,aAAa,CAKvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"parallax.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/parallax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AAyClB,wBAAgB,sBAAsB,IAAI,aAAa,CAKtD"}
1
+ {"version":3,"file":"parallax.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/parallax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AAqClB,wBAAgB,sBAAsB,IAAI,aAAa,CAKtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/static.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C,wBAAgB,oBAAoB,IAAI,aAAa,CAUpD"}
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/static.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAkB9C,wBAAgB,oBAAoB,IAAI,aAAa,CAUpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssgoi/core",
3
- "version": "6.6.10",
3
+ "version": "6.6.11",
4
4
  "description": "Core animation engine for SSGOI - Native app-like page transitions with spring physics",
5
5
  "private": false,
6
6
  "type": "module",