@ssgoi/core 4.0.0 → 4.2.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/animator/integrator/double-spring-integrator.d.ts +6 -0
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +1 -1
- package/dist/animator/integrator/inertia-integrator.d.ts +15 -0
- package/dist/animator/integrator/inertia-integrator.d.ts.map +1 -1
- package/dist/animator/integrator/provider.d.ts.map +1 -1
- package/dist/animator/integrator/spring-integrator.d.ts +6 -0
- package/dist/animator/integrator/spring-integrator.d.ts.map +1 -1
- package/dist/animator/multi-animator.d.ts +16 -11
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/runner/css-runner.d.ts.map +1 -1
- package/dist/animator/single-animator.d.ts +6 -4
- package/dist/animator/single-animator.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +603 -518
- package/dist/provider-Cs5iBqRD.cjs +1 -0
- package/dist/provider-Cu4NSF1Q.js +167 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +4 -1
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +42 -0
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -0
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/transition/transition-strategy.d.ts +6 -6
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +84 -35
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +39 -46
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/wait-paint.d.ts +15 -0
- package/dist/utils/wait-paint.d.ts.map +1 -0
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +15 -15
- package/dist/view-transitions/index.js +673 -688
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/provider-B6Xnh0BA.cjs +0 -1
- package/dist/provider-CMBovM_W.js +0 -134
- package/dist/ssgoi-transition/types.d.ts +0 -8
- package/dist/ssgoi-transition/types.d.ts.map +0 -1
package/dist/types.js
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
function
|
|
2
|
-
return ("tick" in
|
|
1
|
+
function p(t) {
|
|
2
|
+
return ("tick" in t || "css" in t) && !("items" in t);
|
|
3
3
|
}
|
|
4
|
-
function u(
|
|
5
|
-
return "
|
|
4
|
+
function u(t) {
|
|
5
|
+
return "items" in t;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return "css" in
|
|
7
|
+
function f(t) {
|
|
8
|
+
return "css" in t && typeof t.css == "function";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return "tick" in
|
|
10
|
+
function h(t) {
|
|
11
|
+
return "tick" in t && typeof t.tick == "function";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other."
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function h(n) {
|
|
20
|
-
if (n.tick && n.css)
|
|
21
|
-
throw new Error(
|
|
22
|
-
"SpringItem cannot have both 'tick' and 'css' defined. Use one or the other."
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
async function k(n) {
|
|
26
|
-
const e = await n;
|
|
27
|
-
return u(e) ? (e.springs.forEach(h), e) : (f(e), {
|
|
13
|
+
async function k(t) {
|
|
14
|
+
const e = await t;
|
|
15
|
+
return u(e) ? {
|
|
28
16
|
prepare: e.prepare,
|
|
29
17
|
wait: e.wait,
|
|
30
18
|
onStart: e.onStart,
|
|
31
19
|
onEnd: e.onEnd,
|
|
32
|
-
|
|
20
|
+
items: e.items,
|
|
21
|
+
schedule: e.schedule
|
|
22
|
+
} : {
|
|
23
|
+
prepare: e.prepare,
|
|
24
|
+
wait: e.wait,
|
|
25
|
+
onStart: e.onStart,
|
|
26
|
+
onEnd: e.onEnd,
|
|
27
|
+
items: [
|
|
33
28
|
{
|
|
34
29
|
physics: e.physics,
|
|
35
30
|
tick: e.tick,
|
|
@@ -37,41 +32,39 @@ async function k(n) {
|
|
|
37
32
|
}
|
|
38
33
|
],
|
|
39
34
|
schedule: "parallel"
|
|
40
|
-
}
|
|
35
|
+
};
|
|
41
36
|
}
|
|
42
|
-
function y(
|
|
43
|
-
const
|
|
37
|
+
function y(t, e) {
|
|
38
|
+
const a = t.schedule ?? "parallel", r = t.items.map(
|
|
44
39
|
(i) => {
|
|
45
|
-
let
|
|
46
|
-
switch (
|
|
40
|
+
let n;
|
|
41
|
+
switch (a) {
|
|
47
42
|
case "parallel":
|
|
48
|
-
|
|
43
|
+
n = 0;
|
|
49
44
|
break;
|
|
50
45
|
case "sequential":
|
|
51
|
-
|
|
46
|
+
n = 1;
|
|
52
47
|
break;
|
|
53
48
|
case "stagger":
|
|
54
|
-
|
|
49
|
+
n = Math.max(0, Math.min(1, i.offset ?? 0));
|
|
55
50
|
break;
|
|
56
51
|
default:
|
|
57
|
-
|
|
52
|
+
n = 0;
|
|
58
53
|
}
|
|
59
|
-
const { css: s, offset:
|
|
60
|
-
return { ...c, css: l, normalizedOffset:
|
|
54
|
+
const { css: s, offset: d, ...c } = i, l = s ? typeof s == "function" ? e ? { element: e, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
|
|
55
|
+
return { ...c, css: l, normalizedOffset: n };
|
|
61
56
|
}
|
|
62
|
-
), { schedule:
|
|
57
|
+
), { schedule: m, ...o } = t;
|
|
63
58
|
return {
|
|
64
|
-
...
|
|
65
|
-
|
|
59
|
+
...o,
|
|
60
|
+
items: r
|
|
66
61
|
};
|
|
67
62
|
}
|
|
68
63
|
export {
|
|
69
|
-
|
|
70
|
-
u as
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
y as
|
|
74
|
-
k as
|
|
75
|
-
f as validateAnimationMode,
|
|
76
|
-
h as validateSpringItem
|
|
64
|
+
f as isCssAnimation,
|
|
65
|
+
u as isMultiAnimation,
|
|
66
|
+
p as isSingleAnimation,
|
|
67
|
+
h as isTickAnimation,
|
|
68
|
+
y as normalizeSchedule,
|
|
69
|
+
k as normalizeToMultiAnimation
|
|
77
70
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Waits for the browser to complete a paint cycle.
|
|
3
|
+
*
|
|
4
|
+
* This ensures that any style changes have been applied and the element
|
|
5
|
+
* has been painted to the screen before starting animations.
|
|
6
|
+
*
|
|
7
|
+
* Currently uses double requestAnimationFrame as a reliable cross-browser
|
|
8
|
+
* approach. In the future, this could be replaced with a native API when
|
|
9
|
+
* available (e.g., a proposed `element.waitForPaint()` or similar).
|
|
10
|
+
*
|
|
11
|
+
* @param _element - The element to wait for (reserved for future API usage)
|
|
12
|
+
* @returns A promise that resolves after the paint cycle completes
|
|
13
|
+
*/
|
|
14
|
+
export declare function waitPaint(_element?: Element): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=wait-paint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-paint.d.ts","sourceRoot":"","sources":["../../src/lib/utils/wait-paint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAW3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/depth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/depth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AA0BlB,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAoBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA8JlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAiB7E,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,
|
|
1
|
+
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAiB7E,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAoHlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAShE,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eAwIhD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=(t,i)=>{var l;t.style.position="absolute",t.style.width="100%",t.style.top=`${-1*(((l=i==null?void 0:i.scrollOffset)==null?void 0:l.y)??0)}px`,t.style.left="0"},F=t=>new Promise(i=>setTimeout(i,t));function x(t,i){function l(s){let r=0,e=0;const c=s.offsetWidth,y=s.offsetHeight;let o=s;for(;o;)r+=o.offsetTop,e+=o.offsetLeft,o=o.offsetParent;return r-=window.scrollY,e-=window.scrollX,{top:r,left:e,width:c,height:y}}const a=l(t),n=l(i);return new DOMRect(n.left-a.left,n.top-a.top,n.width,n.height)}function E(){let t,i;return{promise:new Promise((a,n)=>{t=a,i=n}),resolve:t,reject:i}}const M={spring:{stiffness:200,damping:22}},W={spring:{stiffness:200,damping:22}},B=300,q=10,j="horizontal",N="#000000",G=(t={})=>{const{transitionDelay:i=B,blindCount:l=q,direction:a=j,blindColor:n=N}=t,s=t.physics??W,r=t.physics??M;let e,c=null;const y=(o,p,d="left")=>{window.getComputedStyle(o).position==="static"&&(o.style.position="relative");const f=document.createElement("div");f.className="blind-container",f.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
|
|
10
|
+
`;const h=[];for(let $=0;$<l;$++){const w=document.createElement("div");if(a==="horizontal"){const b=100/l,C=`calc(${b}% + 1px)`;w.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
|
-
top: ${b
|
|
12
|
+
top: ${b*$}%;
|
|
13
13
|
left: 0;
|
|
14
14
|
width: 100%;
|
|
15
|
-
height: ${
|
|
16
|
-
background: ${
|
|
17
|
-
transform: scaleX(${
|
|
18
|
-
transform-origin: ${
|
|
15
|
+
height: ${C};
|
|
16
|
+
background: ${n};
|
|
17
|
+
transform: scaleX(${p==="hidden"?0:1});
|
|
18
|
+
transform-origin: ${d} center;
|
|
19
19
|
will-change: transform;
|
|
20
|
-
`}else{const b=100/
|
|
20
|
+
`}else{const b=100/l,C=`calc(${b}% + 1px)`;w.style.cssText=`
|
|
21
21
|
position: absolute;
|
|
22
22
|
top: 0;
|
|
23
|
-
left: ${b
|
|
24
|
-
width: ${
|
|
23
|
+
left: ${b*$}%;
|
|
24
|
+
width: ${C};
|
|
25
25
|
height: 100%;
|
|
26
|
-
background: ${
|
|
27
|
-
transform: scaleY(${
|
|
28
|
-
transform-origin: ${
|
|
26
|
+
background: ${n};
|
|
27
|
+
transform: scaleY(${p==="hidden"?0:1});
|
|
28
|
+
transform-origin: ${d==="left"?"top":"bottom"} center;
|
|
29
29
|
will-change: transform;
|
|
30
|
-
`}p.push(f),g.appendChild(f)}return r.appendChild(g),{container:g,blinds:p}};return{out:()=>{let r=null;e=new Promise(u=>{c=u});const d=u=>{const g=1-u;return{transform:l==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}};return{springs:Array.from({length:o},(u,g)=>({physics:n,offset:.2,css:{get element(){return r==null?void 0:r.blinds[g]},style:d}})),schedule:"stagger",prepare:u=>{$(u),u.style.zIndex="1000",r=y(u,"hidden","left")},onStart:()=>{},onEnd:()=>{c&&c()}}},in:()=>{let r=null;const d=u=>{const g=1-u;return{transform:l==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}};return{springs:Array.from({length:o},(u,g)=>({physics:s,offset:.2,css:{get element(){return r==null?void 0:r.blinds[g]},style:d}})),schedule:"stagger",prepare:u=>{u.style.position="relative",u.style.zIndex="0",r=y(u,"closed","right")},onStart:()=>{},wait:async()=>{e&&await e,await V(i)},onEnd:()=>{r&&r.container&&r.container.remove()}}}}},R={spring:{stiffness:1,damping:1}},tt={spring:{stiffness:20,damping:25}},st="#000000",nt="circle",v="CURTAIN_REVEAL_OVERLAY_ID",it={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},et={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},rt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},at={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},ot=.4,A=.5,lt=.2;function ct(t,i){switch(t){case"circle":return`circle(${i*100}% at 50% 50%)`;case"square":return`inset(${(1-i)*50}% round ${10*i}%)`;case"triangle":{const o=i*100;return`polygon(50% ${50-o}%, ${50-o}% ${50+o}%, ${50+o}% ${50+o}%)`}}}const yt=t=>t.reduce((i,o)=>i+o,0),ht=(t={})=>{const{background:i=st,texts:o=[],shape:l=nt,textStyle:a={}}=t,s=t.physics??tt,n=t.physics??R;return{out:(e,c)=>{const y=e.style.opacity;return{physics:n,from:1,to:0,prepare:r=>{$(r,c),r.style.opacity="1"},tick:r=>{const d=Math.max(0,r-ot);e.style.opacity=String(d)},onEnd:()=>{e.style.opacity=y}}},in:e=>{let c=null,y=null,r=null;const d=document.body.style.overflow,h=document.getElementById(v);let u=[];const g=()=>{c=document.createElement("div"),c.id=v,Object.assign(c.style,it,{background:i}),document.body.appendChild(c),y=document.createElement("div"),Object.assign(y.style,et),c.appendChild(y),r=document.createElement("div"),Object.assign(r.style,rt),y.appendChild(r),o.forEach(p=>{const w=document.createElement("div");w.textContent=p,Object.assign(w.style,at,a),r.appendChild(w)}),u=Array.from(r.children).map(p=>p.getBoundingClientRect().width)};return{physics:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",h==null||h.remove(),g(),c&&y&&(c.style.clipPath="none",y.style.transform="scale(1)")},tick:p=>{if(!(!c||!y||!r)){if(p<=A&&o.length>0){const w=p/A,f=Math.min(Math.floor(w*o.length),o.length-1),b=u[f]??0,m=yt(u.slice(0,f));y.style.width=`${b}px`,r.style.transform=`translateX(-${m}px)`}if(p>A){const f=1-Math.max(0,Math.min(1,(p-A)/lt));c.style.clipPath=ct(l,f),y.style.transform=`scale(${f})`}}},onEnd:()=>{c==null||c.remove(),c=y=r=null,document.body.style.overflow=d}}}}},pt={inertia:{acceleration:50,resistance:1.5}},dt={inertia:{acceleration:50,resistance:1}},C=.05;function S(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const ut=(t={})=>{const{direction:i="enter"}=t,o=t.physics??(i==="enter"?pt:dt);let{promise:l,resolve:a}=E();return i==="enter"?{in:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:o,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,a=r.resolve}},css:r=>({transform:`scale(${1-C+r*C})`,opacity:r}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2+n.scrollOffset.y;return{physics:o,prepare:r=>{$(r,n),r.style.zIndex="-1",r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none",r.style.transformOrigin=`${c}px ${y}px`},css:r=>({transform:`scale(${1+(1-r)*C})`,opacity:r}),onEnd:()=>{a&&a()}}}}:{in:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:o,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,a=r.resolve}},css:r=>({transform:`scale(${1+C-r*C})`,opacity:r}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2+n.scrollOffset.y;return{physics:o,prepare:r=>{$(r,n),r.style.zIndex="100",r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none",r.style.transformOrigin=`${c}px ${y}px`},css:r=>({transform:`scale(${1-(1-r)*C})`,opacity:r}),onEnd:()=>{a&&a()}}}}},gt={inertia:{acceleration:20,resistance:1.5}},ft={inertia:{acceleration:20,resistance:1}},wt=(t={})=>{const{opacity:i=!1,direction:o="enter"}=t,l=t.physics??(o==="enter"?gt:ft);return o==="enter"?{in:a=>({physics:l,prepare:()=>{a.style.willChange=i?"transform, opacity":"transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>{const n={transform:`translate3d(${(1-s)*100}%, 0, 0)`};return i&&(n.opacity=s),n},onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:l,prepare:n=>{$(n,s),n.style.zIndex="-1",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>{const e={transform:`translate3d(${-(1-n)*20}%, 0, 0)`};return i&&(e.opacity=n),e}})}:{in:a=>({physics:l,prepare:()=>{a.style.willChange=i?"transform, opacity":"transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>{const n={transform:`translate3d(${-(1-s)*20}%, 0, 0)`};return i&&(n.opacity=s),n},onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:l,prepare:n=>{$(n,s),n.style.zIndex="100",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>{const e={transform:`translate3d(${(1-n)*100}%, 0, 0)`};return i&&(e.opacity=n),e}})}},$t={spring:{stiffness:180,damping:20,doubleSpring:!0}},bt={spring:{stiffness:170,damping:20,doubleSpring:!0}},xt=0,Et=(t={})=>{const{transitionDelay:i=xt}=t,o=t.physics??bt,l=t.physics??$t;let{promise:a,resolve:s}=E();return{in:n=>({physics:o,prepare:()=>{n.style.opacity="0",n.style.willChange="opacity"},wait:async()=>{if(a){await a;const e=E();a=e.promise,s=e.resolve,await V(i)}},css:e=>({opacity:e}),onEnd:()=>{n.style.willChange="auto",n.style.opacity="1"}}),out:(n,e)=>({physics:l,css:c=>({opacity:c}),prepare:()=>{$(n,e),n.style.willChange="opacity"},onEnd:()=>{s&&s(),n.style.willChange="auto"}})}},mt={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},O={scaleDown:0,translate:.2,scaleUp:.8},Ct=.8,Ot="white",At=t=>{var a;const i=mt,o=Ct,l=((a=t==null?void 0:t.border)==null?void 0:a.color)??Ot;return{out:async(s,n)=>{const e=_(n),c=x(document.body,n.positionedParent),y=Tt(l,{...e,top:c.top}),r={scale:1,translateY:-e.top},d=()=>{s.style.transform=`translateY(${r.translateY}px) scale(${r.scale})`;const h=(e.width-e.width*r.scale)/2,u=(e.height-e.height*r.scale)/2;St(y,h,u)};return{springs:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:O.scaleDown,tick:h=>{const u=1-h;r.scale=1-(1-o)*u,d()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:O.translate,tick:h=>{const u=1-h;r.translateY=-e.top-e.height*u,d()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:O.scaleUp,tick:h=>{const u=1-h;r.scale=o+(1-o)*u,d()}}],schedule:"stagger",prepare:()=>{$(s),I(s,e),Y(s,e),Pt(s,e);for(const h of y)n.positionedParent.appendChild(h)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const h of y)n.positionedParent.removeChild(h)},1e3)}}},in:async(s,n)=>{const e=_(n),c={scale:o,translateY:-e.top+e.height},y=()=>{s.style.transform=`translateY(${c.translateY}px) scale(${c.scale})`};return{springs:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:O.scaleDown,tick:r=>{c.scale=1-(1-o)*r,y()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:O.translate,tick:r=>{c.translateY=-e.top+e.height*(1-r),y()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:O.scaleUp,tick:r=>{c.scale=o+(1-o)*r,y()}}],schedule:"stagger",prepare:()=>{I(s,e),Y(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${o})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""}}}}};function St(t,i,o){const l=i*.7,a=o*.7;t.topLeft.style.transform=`translate(${l}px, ${a}px)`,t.topRight.style.transform=`translate(${-l}px, ${a}px)`,t.bottomLeft.style.transform=`translate(${l}px, ${-a}px)`,t.bottomRight.style.transform=`translate(${-l}px, ${-a}px)`}function Tt(t="white",i){const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${i.top-1}px`,a.style.left=`${i.left-1}px`,a.style.width="15px",a.style.height="15px";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const n=document.createElement("div");n.style.position="absolute",n.style.width="1px",n.style.height="15px",n.style.backgroundColor=t,n.style.top="0",n.style.left="0",a.appendChild(s),a.appendChild(n);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${i.top-1}px`,e.style.left=`${i.left+i.width-15+1}px`,e.style.width="15px",e.style.height="15px";const c=document.createElement("div");c.style.position="absolute",c.style.width="15px",c.style.height="1px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0";const y=document.createElement("div");y.style.position="absolute",y.style.width="1px",y.style.height="15px",y.style.backgroundColor=t,y.style.top="0",y.style.right="0",e.appendChild(c),e.appendChild(y);const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${i.top+i.height-15+1}px`,r.style.left=`${i.left-1}px`,r.style.width="15px",r.style.height="15px";const d=document.createElement("div");d.style.position="absolute",d.style.width="15px",d.style.height="1px",d.style.backgroundColor=t,d.style.bottom="0",d.style.left="0";const h=document.createElement("div");h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.bottom="0",h.style.left="0",r.appendChild(d),r.appendChild(h);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${i.top+i.height-15+1}px`,u.style.left=`${i.left+i.width-15+1}px`,u.style.width="15px",u.style.height="15px";const g=document.createElement("div");g.style.position="absolute",g.style.width="15px",g.style.height="1px",g.style.backgroundColor=t,g.style.bottom="0",g.style.right="0";const p=document.createElement("div");return p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.bottom="0",p.style.right="0",u.appendChild(g),u.appendChild(p),{topLeft:a,topRight:e,bottomLeft:r,bottomRight:u,*[Symbol.iterator](){yield a,yield e,yield r,yield u}}}function _(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}function I(t,i){const o=i.left+i.width/2,l=i.top+i.height/2;t.style.transformOrigin=`${o}px ${l}px`}function Y(t,i){t.style.clipPath=`polygon(
|
|
30
|
+
`}h.push(w),f.appendChild(w)}return o.appendChild(f),{container:f,blinds:h}};return{out:o=>{let p=null;e=new Promise(f=>{c=f});const d=f=>{const h=1-f;return{transform:a==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:l},(f,h)=>({physics:r,offset:.2,css:{get element(){return p==null?void 0:p.blinds[h]},style:d}})),schedule:"stagger",prepare:()=>{g(o),o.style.zIndex="1000",p=y(o,"hidden","left")},onStart:()=>{},onEnd:()=>{c&&c()}}},in:o=>{let p=null;const d=f=>{const h=1-f;return{transform:a==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:l},(f,h)=>({physics:s,offset:.2,css:{get element(){return p==null?void 0:p.blinds[h]},style:d}})),schedule:"stagger",prepare:()=>{o.style.position="relative",o.style.zIndex="0",p=y(o,"closed","right")},onStart:()=>{},wait:async()=>{e&&await e,await F(i)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},Z={spring:{stiffness:1,damping:1}},J={spring:{stiffness:20,damping:25}},K="#000000",Q="circle",m="CURTAIN_REVEAL_OVERLAY_ID",R={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},tt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},st={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},it={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},nt=.4,A=.5,et=.2;function rt(t,i){switch(t){case"circle":return`circle(${i*100}% at 50% 50%)`;case"square":return`inset(${(1-i)*50}% round ${10*i}%)`;case"triangle":{const l=i*100;return`polygon(50% ${50-l}%, ${50-l}% ${50+l}%, ${50+l}% ${50+l}%)`}}}const at=t=>t.reduce((i,l)=>i+l,0),ot=(t={})=>{const{background:i=K,texts:l=[],shape:a=Q,textStyle:n={}}=t,s=t.physics??J,r=t.physics??Z;return{out:(e,c)=>{const y=e.style.opacity;return{physics:r,from:1,to:0,prepare:()=>{g(e,c),e.style.opacity="1"},tick:o=>{const p=Math.max(0,o-nt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=y}}},in:e=>{let c=null,y=null,o=null;const p=document.body.style.overflow,d=document.getElementById(m);let u=[];const f=()=>{c=document.createElement("div"),c.id=m,Object.assign(c.style,R,{background:i}),document.body.appendChild(c),y=document.createElement("div"),Object.assign(y.style,tt),c.appendChild(y),o=document.createElement("div"),Object.assign(o.style,st),y.appendChild(o),l.forEach(h=>{const $=document.createElement("div");$.textContent=h,Object.assign($.style,it,n),o.appendChild($)}),u=Array.from(o.children).map(h=>h.getBoundingClientRect().width)};return{physics:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",d==null||d.remove(),f(),c&&y&&(c.style.clipPath="none",y.style.transform="scale(1)")},tick:h=>{if(!(!c||!y||!o)){if(h<=A&&l.length>0){const $=h/A,w=Math.min(Math.floor($*l.length),l.length-1),b=u[w]??0,C=at(u.slice(0,w));y.style.width=`${b}px`,o.style.transform=`translateX(-${C}px)`}if(h>A){const w=1-Math.max(0,Math.min(1,(h-A)/et));c.style.clipPath=rt(a,w),y.style.transform=`scale(${w})`}}},onEnd:()=>{c==null||c.remove(),c=y=o=null,document.body.style.overflow=p}}}}},lt={spring:{stiffness:600,damping:40,restDelta:.1,restSpeed:1e14}},ct={spring:{stiffness:600,damping:40,restDelta:.1,restSpeed:1e14}},O=.05;function T(t){const i=x(document.body,t.positionedParent),l=t.scroll.y,a=window.innerHeight-i.top;return{top:l,left:0,width:i.width,height:a}}const yt=(t={})=>{const{direction:i="enter"}=t,l=t.physics??(i==="enter"?lt:ct);let{promise:a,resolve:n}=E();return i==="enter"?{in:(s,r)=>{const e=T(r),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:l,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(a){await a;const o=E();a=o.promise,n=o.resolve}},css:o=>({transform:`scale(${1-O+o*O})`,opacity:o}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,r)=>{const e=T(r),c=e.left+e.width/2,y=e.top+e.height/2+r.scrollOffset.y;return{physics:l,prepare:()=>{g(s,r),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${c}px ${y}px`},css:o=>({transform:`scale(${1+(1-o)*O})`,opacity:o}),onEnd:()=>{n&&n()}}}}:{in:(s,r)=>{const e=T(r),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:l,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(a){await a;const o=E();a=o.promise,n=o.resolve}},css:o=>({transform:`scale(${1+O-o*O})`,opacity:o}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,r)=>{const e=T(r),c=e.left+e.width/2,y=e.top+e.height/2+r.scrollOffset.y;return{physics:l,prepare:()=>{g(s,r),s.style.zIndex="100",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${c}px ${y}px`},css:o=>({transform:`scale(${1-(1-o)*O})`,opacity:o}),onEnd:()=>{n&&n()}}}}},ht={spring:{stiffness:170,damping:22}},pt={spring:{stiffness:170,damping:22}},dt=(t={})=>{const{opacity:i=!1,direction:l="enter"}=t,a=t.physics??(l==="enter"?ht:pt);return l==="enter"?{in:n=>({physics:a,prepare:()=>{n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"},css:s=>{const r={transform:`translate3d(${(1-s)*100}%, 0, 0)`};return i&&(r.opacity=s),r},onEnd:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,s)=>({physics:a,prepare:()=>{g(n,s),n.style.zIndex="-1",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:r=>{const e={transform:`translate3d(${-(1-r)*20}%, 0, 0)`};return i&&(e.opacity=r),e}})}:{in:n=>({physics:a,prepare:()=>{n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"},css:s=>{const r={transform:`translate3d(${-(1-s)*20}%, 0, 0)`};return i&&(r.opacity=s),r},onEnd:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,s)=>({physics:a,prepare:()=>{g(n,s),n.style.zIndex="100",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:r=>{const e={transform:`translate3d(${(1-r)*100}%, 0, 0)`};return i&&(e.opacity=r),e}})}},ut={spring:{stiffness:180,damping:20,doubleSpring:!0}},ft={spring:{stiffness:170,damping:20,doubleSpring:!0}},gt=0,wt=(t={})=>{const{transitionDelay:i=gt}=t,l=t.physics??ft,a=t.physics??ut;let{promise:n,resolve:s}=E();return{in:r=>({physics:l,prepare:()=>{r.style.opacity="0",r.style.willChange="opacity"},wait:async()=>{if(n){await n;const e=E();n=e.promise,s=e.resolve,await F(i)}},css:e=>({opacity:e}),onEnd:()=>{r.style.willChange="auto",r.style.opacity="1"}}),out:(r,e)=>({physics:a,css:c=>({opacity:c}),prepare:()=>{g(r,e),r.style.willChange="opacity"},onEnd:()=>{s&&s(),r.style.willChange="auto"}})}},$t={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},S={scaleDown:0,translate:.2,scaleUp:.8},bt=.8,xt="white",Et=t=>{var n;const i=$t,l=bt,a=((n=t==null?void 0:t.border)==null?void 0:n.color)??xt;return{out:async(s,r)=>{const e=I(r),c=x(document.body,r.positionedParent),y=Ot(a,{...e,top:c.top}),o={scale:1,translateY:-e.top},p=()=>{s.style.transform=`translateY(${o.translateY}px) scale(${o.scale})`;const d=(e.width-e.width*o.scale)/2,u=(e.height-e.height*o.scale)/2;Ct(y,d,u)};return{items:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:S.scaleDown,tick:d=>{const u=1-d;o.scale=1-(1-l)*u,p()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:S.translate,tick:d=>{const u=1-d;o.translateY=-e.top-e.height*u,p()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:S.scaleUp,tick:d=>{const u=1-d;o.scale=l+(1-l)*u,p()}}],schedule:"stagger",prepare:()=>{g(s),Y(s,e),_(s,e),St(s,e);for(const d of y)r.positionedParent.appendChild(d)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const d of y)r.positionedParent.removeChild(d)},1e3)}}},in:async(s,r)=>{const e=I(r),c={scale:l,translateY:-e.top+e.height},y=()=>{s.style.transform=`translateY(${c.translateY}px) scale(${c.scale})`};return{items:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:S.scaleDown,tick:o=>{c.scale=1-(1-l)*o,y()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:S.translate,tick:o=>{c.translateY=-e.top+e.height*(1-o),y()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:S.scaleUp,tick:o=>{c.scale=l+(1-l)*o,y()}}],schedule:"stagger",prepare:()=>{Y(s,e),_(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${l})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""}}}}};function Ct(t,i,l){const a=i*.7,n=l*.7;t.topLeft.style.transform=`translate(${a}px, ${n}px)`,t.topRight.style.transform=`translate(${-a}px, ${n}px)`,t.bottomLeft.style.transform=`translate(${a}px, ${-n}px)`,t.bottomRight.style.transform=`translate(${-a}px, ${-n}px)`}function Ot(t="white",i){const n=document.createElement("div");n.style.position="fixed",n.style.pointerEvents="none",n.style.zIndex="9999",n.style.top=`${i.top-1}px`,n.style.left=`${i.left-1}px`,n.style.width="15px",n.style.height="15px";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const r=document.createElement("div");r.style.position="absolute",r.style.width="1px",r.style.height="15px",r.style.backgroundColor=t,r.style.top="0",r.style.left="0",n.appendChild(s),n.appendChild(r);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${i.top-1}px`,e.style.left=`${i.left+i.width-15+1}px`,e.style.width="15px",e.style.height="15px";const c=document.createElement("div");c.style.position="absolute",c.style.width="15px",c.style.height="1px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0";const y=document.createElement("div");y.style.position="absolute",y.style.width="1px",y.style.height="15px",y.style.backgroundColor=t,y.style.top="0",y.style.right="0",e.appendChild(c),e.appendChild(y);const o=document.createElement("div");o.style.position="fixed",o.style.pointerEvents="none",o.style.zIndex="9999",o.style.top=`${i.top+i.height-15+1}px`,o.style.left=`${i.left-1}px`,o.style.width="15px",o.style.height="15px";const p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0";const d=document.createElement("div");d.style.position="absolute",d.style.width="1px",d.style.height="15px",d.style.backgroundColor=t,d.style.bottom="0",d.style.left="0",o.appendChild(p),o.appendChild(d);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${i.top+i.height-15+1}px`,u.style.left=`${i.left+i.width-15+1}px`,u.style.width="15px",u.style.height="15px";const f=document.createElement("div");f.style.position="absolute",f.style.width="15px",f.style.height="1px",f.style.backgroundColor=t,f.style.bottom="0",f.style.right="0";const h=document.createElement("div");return h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.bottom="0",h.style.right="0",u.appendChild(f),u.appendChild(h),{topLeft:n,topRight:e,bottomLeft:o,bottomRight:u,*[Symbol.iterator](){yield n,yield e,yield o,yield u}}}function I(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}function Y(t,i){const l=i.left+i.width/2,a=i.top+i.height/2;t.style.transformOrigin=`${l}px ${a}px`}function _(t,i){t.style.clipPath=`polygon(
|
|
31
31
|
${i.left}px ${i.top}px,
|
|
32
32
|
${i.left+i.width}px ${i.top}px,
|
|
33
33
|
${i.left+i.width}px ${i.top+i.height}px,
|
|
34
34
|
${i.left}px ${i.top+i.height}px
|
|
35
|
-
)`}function Pt(t,i){t.style.transform=`translateY(${-i.top}px)`}const kt={spring:{stiffness:300,damping:30}};function Lt(t,i){return t.querySelector(`[data-hero-key="${i}"]`)}const vt=(t={})=>{const i=t.physics??kt,o=t.timeout??300,l=t.maxDistance??700;let a=null,s=null;return{in:async(n,e)=>{const c=n,y=Array.from(c.querySelectorAll("[data-hero-key]"));if(y.length===0)return{physics:i,tick:()=>{}};if(!await new Promise(h=>{a?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},o))})||!a)return a=null,{physics:i,tick:()=>{}};const d=y.map(h=>{const u=h.getAttribute("data-hero-key");if(!u)return null;const g=Lt(a,u);if(!g)return null;const p=h,w=x(a,g),f=x(c,p),b=w.left-f.left-e.scrollOffset.x,m=w.top-f.top-e.scrollOffset.y,H=w.width/f.width,X=w.height/f.height,z=p.style.transform,M=p.style.position,W=p.style.transformOrigin,B=p.style.zIndex,q=p.style.willChange;return{toEl:p,dx:b,dy:m,dw:H,dh:X,originalTransform:z,originalPosition:M,originalTransformOrigin:W,originalZIndex:B,originalWillChange:q}}).filter(h=>h!==null&&Math.abs(h.dy)<=l);return a=null,d.length===0?{physics:i,tick:()=>{}}:{springs:d.map(({toEl:h,dx:u,dy:g,dw:p,dh:w})=>({physics:i,tick:f=>{h.style.transform=`translate(${(1-f)*u}px, ${(1-f)*g}px) scale(${f+(1-f)*p}, ${f+(1-f)*w})`}})),schedule:"parallel",prepare:()=>{d.forEach(({toEl:h})=>{h.style.position="relative",h.style.transformOrigin="top left",h.style.zIndex="1000",h.style.willChange="transform"})},onEnd:()=>{d.forEach(({toEl:h,originalTransform:u,originalPosition:g,originalTransformOrigin:p,originalZIndex:w,originalWillChange:f})=>{h.style.transform=u,h.style.position=g,h.style.transformOrigin=p,h.style.zIndex=w,h.style.willChange=f})}}},out:async n=>({physics:i,onStart:()=>{a=n,s&&(s(!0),s=null)},tick:()=>{},prepare:e=>{$(e),e.style.opacity="0"}})}},_t={spring:{stiffness:140,damping:19,doubleSpring:.8}};function It({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2-l.x,s=i.top-t.top+(i.height-t.height)/2-l.y,n=i.width/t.width,e=i.height/t.height,c=Math.max(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p}px, ${s*p}px) scale(${1+(c-1)*p})`}}}}function Yt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2+l.x,s=i.top-t.top+(i.height-t.height)/2+l.y,n=i.width/t.width,e=i.height/t.height,c=Math.min(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p-l.x}px, ${s*p-l.y}px) scale(${1+(c-1)*p})`}}}}function Ft(t,i,o){const l=t.querySelector("[data-instagram-detail-key]"),a=i.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||i.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,n=null,e=!1;if(!l&&a){n=a;const r=n.getAttribute("data-instagram-detail-key");if(!r)return null;s=t.querySelector(`[data-instagram-gallery-key="${r}"]`),s&&(e=!0)}else if(l&&!a){n=l;const r=n.getAttribute("data-instagram-detail-key");if(!r)return null;s=i.querySelector(`[data-instagram-gallery-key="${r}"]`),s&&(e=!1)}if(!s||!n)return null;const c=x(e?t:i,s),y=x(e?i:t,n);if(e){const r=It({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,{isEnterMode:!0,inAnimation:r.animate}}else{const r=Yt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return t.style.transformOrigin=r.transformOrigin,{isEnterMode:!1,outAnimation:r.animate}}}const Dt=(t={})=>{const i=t.physics??_t,o=t.timeout??300;let l=null,a=null,s=null,n=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(d=>{l?d(!0):(a=d,setTimeout(()=>{a=null,d(!1)},o))})||!l?(n==null||n(),n=null,l=null,{physics:i,css:()=>({})}):(s=Ft(l,y,c),n==null||n(),n=null,s?(l=null,{physics:i,css:d=>s!=null&&s.inAnimation?s.inAnimation(d):{}}):(l=null,{physics:i,css:()=>({})}))},out:async(e,c)=>{const y=new Promise(r=>{n=r});return{physics:i,prepare:r=>{s!=null&&s.isEnterMode?$(r):($(r,c),r.style.zIndex="-1")},wait:async()=>{l=e,a&&(a(!0),a=null),await y},css:r=>s!=null&&s.outAnimation?s.outAnimation(r):{}}}}},Ut={spring:{stiffness:50,damping:30}};function Vt(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}const Ht=(t={})=>{const i=t.physics??Ut,o=t.initialRotation??45,l=t.initialScale??.01,a=t.rotationTriggerPoint??.8;return{out:async(s,n)=>{const e=s.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{$(s,n),s.style.opacity="1"},tick:c=>{s.style.opacity=String(c)},onEnd:()=>{s.style.opacity=e}}},in:async(s,n)=>{const e=Vt(n),c=s.style.transform,y=s.style.transformOrigin,r=s.style.position,d=s.style.zIndex;return{physics:i,from:0,to:1,prepare:()=>{const h=Math.min(e.width,e.height)*.4;s.style.setProperty("--max-border-radius",`${h}px`),s.style.setProperty("--border-radius-scale","1"),s.style.willChange="transform",s.style.backfaceVisibility="hidden";const u=e.left+e.width/2,g=e.top+e.height/2;s.style.transformOrigin=`${u}px ${g}px`,s.style.position="fixed",s.style.top=`${e.top}px`,s.style.left=`${e.left}px`,s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.zIndex="1000",s.style.overflow="hidden",s.style.transform=`rotate(${o}deg) scale(${l}) translateZ(0)`,s.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",s.style.opacity="1"},tick:h=>{let u;if(h<=.05)u=l;else if(h<=a){const f=(h-.05)/(a-.05),b=Math.pow(f,9);u=l+(.8-l)*b}else{const f=(h-a)/(1-a);u=.8+.2*(1-Math.pow(1-f,3))}let g;const p=.7;if(h<=p)g=o;else{const f=(h-p)/(1-p),b=1-Math.pow(1-f,2);g=o*(1-b)}let w;if(h<=p)w=1;else{const f=(h-p)/(1-p);w=1-Math.pow(f,.5)}s.style.transform=`rotate(${g.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,s.style.setProperty("--border-radius-scale",w.toFixed(4))},onEnd:()=>{s.style.willChange="",s.style.backfaceVisibility="",s.style.removeProperty("--max-border-radius"),s.style.removeProperty("--border-radius-scale"),s.style.transform=c,s.style.transformOrigin=y,s.style.position=r,s.style.zIndex=d,s.style.top="",s.style.left="",s.style.width="",s.style.height="",s.style.overflow="",s.style.borderRadius=""}}}}},Xt={spring:{stiffness:140,damping:19,doubleSpring:.7}};function zt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2-l.x,s=i.top-t.top+(i.height-t.height)/2-l.y,n=i.width/t.width,e=i.height/t.height,c=Math.max(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p}px, ${s*p}px) scale(${1+(c-1)*p})`}}}}function Mt({galleryRect:t,detailRect:i,scrollOffset:o}){const l=i.left-t.left+(i.width-t.width)/2+o.x,a=i.top-t.top+(i.height-t.height)/2+o.y,s=i.width/t.width,n=i.height/t.height,e=Math.max(s,n);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const r=1-y;return{transform:`translate(${l*r-o.x}px, ${a*r-o.y}px) scale(${1+(e-1)*r})`,opacity:`${1-r}`}}}}function Wt({galleryRect:t,detailRect:i,scrollOffset:o}){const l=i.left-t.left+(i.width-t.width)/2-o.x,a=i.top-t.top+(i.height-t.height)/2-o.y,s=i.width/t.width,n=i.height/t.height,e=Math.max(s,n);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const r=1-y,d=y;return{transform:`translate(${l*r}px, ${a*r}px) scale(${1+(e-1)*r})`,opacity:`${d}`}}}}function Bt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2+l.x,s=i.top-t.top+(i.height-t.height)/2+l.y,n=i.width/t.width,e=i.height/t.height,c=Math.min(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p-l.x}px, ${s*p-l.y}px) scale(${1+(c-1)*p})`}}}}function qt(t,i,o){const l=t.querySelector("[data-pinterest-detail-key]"),a=i.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||i.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,n=null,e=!1;if(!l&&a){n=a;const r=n.getAttribute("data-pinterest-detail-key");if(!r)return null;s=t.querySelector(`[data-pinterest-gallery-key="${r}"]`),s&&(e=!0)}else if(l&&!a){n=l;const r=n.getAttribute("data-pinterest-detail-key");if(!r)return null;s=i.querySelector(`[data-pinterest-gallery-key="${r}"]`),s&&(e=!1)}if(!s||!n)return null;const c=x(e?t:i,s),y=x(e?i:t,n);if(e){const r=zt({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:o}),d=Mt({galleryRect:c,detailRect:y,scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=d.transformOrigin,{inAnimation:r.animate,outAnimation:d.animate}}else{const r=Wt({galleryRect:c,detailRect:y,scrollOffset:o}),d=Bt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=d.transformOrigin,{inAnimation:r.animate,outAnimation:d.animate}}}const jt=(t={})=>{const i=t.physics??Xt,o=t.timeout??300;let l=null,a=null,s=null,n=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(d=>{l?d(!0):(a=d,setTimeout(()=>{a=null,d(!1)},o))})||!l?(n==null||n(),n=null,l=null,{physics:i,css:()=>({})}):(s=qt(l,y,c),n==null||n(),n=null,s?(l=null,{physics:i,css:d=>s?s.inAnimation(d):{}}):(l=null,{physics:i,css:()=>({})}))},out:async e=>{const c=new Promise(y=>{n=y});return{physics:i,prepare:y=>{$(y),y.style.zIndex="-1"},wait:async()=>{l=e,a&&(a(!0),a=null),await c},css:y=>s?s.outAnimation(y):{}}}}},Nt={spring:{stiffness:100,damping:30}},Gt=(t={})=>{const i=t.physics??Nt;return{in:o=>({physics:i,prepare:()=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:l=>({transform:`rotate(${(l-1)*180}deg)`,opacity:l>.5?1:0}),onEnd:()=>{o.style.willChange="auto",o.style.transform="",o.style.transformOrigin="",o.style.opacity=""}}),out:(o,l)=>({physics:i,prepare:()=>{$(o,l),o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:a=>({transform:`rotate(${(1-a)*180}deg)`,opacity:a>.5?1:0}),onEnd:()=>{o.style.willChange="auto"}})}},Zt={spring:{stiffness:5,damping:4}},Jt=(t={})=>{const i=t.direction??"up",o=t.physics??Zt,l=i==="up";let a=null,s=null,n=null;const e=()=>{if(a===null||s===null)return null;const c=Math.min(a,s),y=window.innerHeight;return Math.max(c,y)};return{in:c=>(s=c.offsetHeight,a!==null&&(n=e()),{physics:o,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},tick:y=>{n===null&&(n=e());const r=n??window.innerHeight,d=l?(1-y)*r:(1-y)*-r;c.style.transform=`translate3d(0, ${d}px, 0)`},onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,y)=>({physics:o,onStart:()=>{a=c.offsetHeight,s!==null&&(n=e())},tick:r=>{n===null&&(n=e());const d=n??window.innerHeight,h=l?(1-r)*-d:(1-r)*d;c.style.transform=`translate3d(0, ${h}px, 0)`},prepare:r=>{$(r,y),r.style.zIndex=l?"-1":"1",r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}})}},Kt={inertia:{acceleration:20,resistance:1.5}},Qt={inertia:{acceleration:20,resistance:1}};function T(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const Rt=(t={})=>{const{direction:i="enter"}=t,o=t.physics??(i==="enter"?Kt:Qt);return i==="enter"?{in:(l,a)=>{const n=T(a).height;return{physics:o,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},css:e=>({transform:`translate3d(0, ${(1-e)*n}px, 0)`}),onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}},out:(l,a)=>{const s=T(a),n=s.left+s.width/2,e=s.top+s.height/2+a.scrollOffset.y;return{physics:o,prepare:c=>{$(c,a),c.style.zIndex="-1",c.style.willChange="transform, opacity",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none",c.style.transformOrigin=`${n}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c})}}}:{in:(l,a)=>{const s=T(a),n=s.left+s.width/2,e=s.top+s.height/2;return{physics:o,prepare:()=>{l.style.willChange="transform, opacity",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.transformOrigin=`${n}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c}),onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transformOrigin=""}}},out:(l,a)=>{const n=T(a).height;return{physics:o,prepare:e=>{$(e,a),e.style.zIndex="100",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none"},css:e=>({transform:`translate3d(0, ${(1-e)*n}px, 0)`})}}}},ts={spring:{stiffness:140,damping:19,doubleSpring:.8}},ss=(t={})=>{const i=t.direction??"left",o=t.physics??ts,l=i==="left";return{in:a=>({physics:o,prepare:()=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>({transform:`translate3d(${l?(1-s)*100:(1-s)*-100}%, 0, 0)`}),onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:o,css:n=>({transform:`translate3d(${l?(1-n)*-100:(1-n)*100}%, 0, 0)`}),prepare:n=>{$(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"}})}},P=6,F=0,D=1,ns={inertia:{acceleration:50,resistance:1.5}},is=(t={})=>{const i=t.direction??"left",o=t.physics??ns,l=i==="left";let{promise:a,resolve:s}=E();return{in:n=>({physics:o,prepare:()=>{n.style.opacity="0",n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"},wait:async()=>{if(a){await a;const e=E();a=e.promise,s=e.resolve}},css:e=>{const c=l?(1-e)*P:(1-e)*-P,y=D+e*(1-D);return{transform:`translate3d(${c}px, 0, 0)`,opacity:y}},onEnd:()=>{n.style.opacity="1",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,e)=>({physics:o,prepare:()=>{$(n,e),n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:c=>{const y=l?(1-c)*-P:(1-c)*P,r=F+c*(1-F);return{transform:`translate3d(${y}px, 0, 0)`,opacity:r}},onEnd:()=>{s&&s(),n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}})}},es={spring:{stiffness:17,damping:6}},L=20,k=800,rs=(t={})=>{const i=t.physics??es;let o,l=null;return{in:a=>({physics:i,prepare:()=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transform=`perspective(${k}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{o&&await o},css:s=>{const n=(1-s)*L,e=-(1-s)*100;return{transform:`perspective(${k}px) rotateY(${n}deg) translate3d(${e}%, 0, 0)`}},onEnd:()=>{a.style.transform="",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>(o=new Promise(n=>{l=n}),{physics:i,prepare:n=>{$(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none",n.style.transform=`perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:n=>{const e=1-n,c=e*L,y=e*100;return{transform:`perspective(${k}px) rotateY(${-c}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{l&&l(),a.style.transform=""}})}},as={inertia:{acceleration:50,resistance:1.5}},U=.05;function os(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const ls=(t={})=>{const i=t.physics??as;let{promise:o,resolve:l}=E();return{in:(a,s)=>{const n=os(s),e=n.left+n.width/2,c=n.top+n.height/2;return{physics:i,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${e}px ${c}px`},wait:async()=>{if(o){await o;const y=E();o=y.promise,l=y.resolve}},css:y=>({transform:`scale(${1-U+y*U})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,s)=>({physics:i,prepare:n=>{$(n,s),n.style.willChange="opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>({opacity:n}),onEnd:()=>{l&&l()}})}};exports.blind=Q;exports.curtainReveal=ht;exports.depth=ut;exports.drill=wt;exports.fade=Et;exports.film=At;exports.hero=vt;exports.instagram=Dt;exports.jaemin=Ht;exports.pinterest=jt;exports.rotate=Gt;exports.scroll=Jt;exports.sheet=Rt;exports.slide=ss;exports.snap=is;exports.strip=rs;exports.swap=ls;
|
|
35
|
+
)`}function St(t,i){t.style.transform=`translateY(${-i.top}px)`}const At={spring:{stiffness:300,damping:30}};function Tt(t,i){return t.querySelector(`[data-hero-key="${i}"]`)}const Pt=(t={})=>{const i=t.physics??At,l=t.maxDistance??700;let a=null,n=E();return{in:async(s,r)=>{const e=s,c=Array.from(e.querySelectorAll("[data-hero-key]"));await n.promise;const y=c.map(o=>{const p=o.getAttribute("data-hero-key");if(!p)return null;const d=Tt(a,p);if(!d)return null;const u=o,f=x(a,d),h=x(e,u),$=f.left-h.left-r.scrollOffset.x,w=f.top-h.top-r.scrollOffset.y,b=f.width/h.width,C=f.height/h.height,V=u.style.transform,U=u.style.position,H=u.style.transformOrigin,X=u.style.zIndex,z=u.style.willChange;return{toEl:u,dx:$,dy:w,dw:b,dh:C,originalTransform:V,originalPosition:U,originalTransformOrigin:H,originalZIndex:X,originalWillChange:z}}).filter(o=>o!==null&&Math.abs(o.dy)<=l);return a=null,n=E(),y.length===0?{physics:i,tick:()=>{}}:{items:y.map(({toEl:o,dx:p,dy:d,dw:u,dh:f})=>({physics:i,tick:h=>{o.style.transform=`translate(${(1-h)*p}px, ${(1-h)*d}px) scale(${h+(1-h)*u}, ${h+(1-h)*f})`}})),schedule:"parallel",prepare:()=>{y.forEach(({toEl:o})=>{o.style.position="relative",o.style.transformOrigin="top left",o.style.zIndex="1000",o.style.willChange="transform"})},onEnd:()=>{y.forEach(({toEl:o,originalTransform:p,originalPosition:d,originalTransformOrigin:u,originalZIndex:f,originalWillChange:h})=>{o.style.transform=p,o.style.position=d,o.style.transformOrigin=u,o.style.zIndex=f,o.style.willChange=h})}}},out:async s=>({physics:i,tick:()=>{},prepare:()=>{a=s,n.resolve(),g(s),s.style.opacity="0"}})}},kt={spring:{stiffness:180,damping:22,doubleSpring:1}};function Lt({detailRect:t,galleryRect:i,pageRect:l,scrollOffset:a}){const n=i.left-t.left+(i.width-t.width)/2-a.x,s=i.top-t.top+(i.height-t.height)/2-a.y,r=i.width/t.width,e=i.height/t.height,c=Math.max(r,e),y=t.top/l.height*100,o=(l.width-(t.left+t.width))/l.width*100,p=(l.height-(t.top+t.height))/l.height*100,d=t.left/l.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const h=1-f;return{clipPath:`inset(${y*h}% ${o*h}% ${p*h}% ${d*h}%)`,transform:`translate(${n*h}px, ${s*h}px) scale(${1+(c-1)*h})`}}}}function vt({detailRect:t,galleryRect:i,pageRect:l,scrollOffset:a}){const n=i.left-t.left+(i.width-t.width)/2+a.x,s=i.top-t.top+(i.height-t.height)/2+a.y,r=i.width/t.width,e=i.height/t.height,c=Math.min(r,e),y=t.top/l.height*100,o=(l.width-(t.left+t.width))/l.width*100,p=(l.height-(t.top+t.height))/l.height*100,d=t.left/l.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const h=1-f;return{clipPath:`inset(${y*h}% ${o*h}% ${p*h}% ${d*h}%)`,transform:`translate(${n*h-a.x}px, ${s*h-a.y}px) scale(${1+(c-1)*h})`}}}}function mt(t,i,l){const a=t.querySelector("[data-instagram-detail-key]"),n=i.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||i.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,r=null,e=!1;if(!a&&n){r=n;const o=r.getAttribute("data-instagram-detail-key");if(!o)return null;s=t.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!0)}else if(a&&!n){r=a;const o=r.getAttribute("data-instagram-detail-key");if(!o)return null;s=i.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!r)return null;const c=x(e?t:i,s),y=x(e?i:t,r);if(e){const o=Lt({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:l});return i.style.transformOrigin=o.transformOrigin,{isEnterMode:!0,inAnimation:o.animate}}else{const o=vt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:l});return t.style.transformOrigin=o.transformOrigin,{isEnterMode:!1,outAnimation:o.animate}}}const It=(t={})=>{const i=t.physics??kt,l=t.timeout??300;let a=null,n=null,s=null,r=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(p=>{a?p(!0):(n=p,setTimeout(()=>{n=null,p(!1)},l))})||!a?(r==null||r(),r=null,a=null,{physics:i,css:()=>({})}):(s=mt(a,y,c),r==null||r(),r=null,s?(a=null,{physics:i,css:p=>s!=null&&s.inAnimation?s.inAnimation(p):{}}):(a=null,{physics:i,css:()=>({})}))},out:async(e,c)=>{const y=new Promise(o=>{r=o});return{physics:i,prepare:()=>{s!=null&&s.isEnterMode?g(e):(g(e,c),e.style.zIndex="-1")},wait:async()=>{a=e,n&&(n(!0),n=null),await y},css:o=>s!=null&&s.outAnimation?s.outAnimation(o):{}}}}},Yt={spring:{stiffness:50,damping:30}};function _t(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}const Dt=(t={})=>{const i=t.physics??Yt,l=t.initialRotation??45,a=t.initialScale??.01,n=t.rotationTriggerPoint??.8;return{out:async(s,r)=>{const e=s.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{g(s,r),s.style.opacity="1"},tick:c=>{s.style.opacity=String(c)},onEnd:()=>{s.style.opacity=e}}},in:async(s,r)=>{const e=_t(r),c=s.style.transform,y=s.style.transformOrigin,o=s.style.position,p=s.style.zIndex;return{physics:i,from:0,to:1,prepare:()=>{const d=Math.min(e.width,e.height)*.4;s.style.setProperty("--max-border-radius",`${d}px`),s.style.setProperty("--border-radius-scale","1"),s.style.willChange="transform",s.style.backfaceVisibility="hidden";const u=e.left+e.width/2,f=e.top+e.height/2;s.style.transformOrigin=`${u}px ${f}px`,s.style.position="fixed",s.style.top=`${e.top}px`,s.style.left=`${e.left}px`,s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.zIndex="1000",s.style.overflow="hidden",s.style.transform=`rotate(${l}deg) scale(${a}) translateZ(0)`,s.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",s.style.opacity="1"},tick:d=>{let u;if(d<=.05)u=a;else if(d<=n){const w=(d-.05)/(n-.05),b=Math.pow(w,9);u=a+(.8-a)*b}else{const w=(d-n)/(1-n);u=.8+.2*(1-Math.pow(1-w,3))}let f;const h=.7;if(d<=h)f=l;else{const w=(d-h)/(1-h),b=1-Math.pow(1-w,2);f=l*(1-b)}let $;if(d<=h)$=1;else{const w=(d-h)/(1-h);$=1-Math.pow(w,.5)}s.style.transform=`rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,s.style.setProperty("--border-radius-scale",$.toFixed(4))},onEnd:()=>{s.style.willChange="",s.style.backfaceVisibility="",s.style.removeProperty("--max-border-radius"),s.style.removeProperty("--border-radius-scale"),s.style.transform=c,s.style.transformOrigin=y,s.style.position=o,s.style.zIndex=p,s.style.top="",s.style.left="",s.style.width="",s.style.height="",s.style.overflow="",s.style.borderRadius=""}}}}},Ft={spring:{stiffness:200,damping:23,doubleSpring:1}};function Vt({detailRect:t,galleryRect:i,pageRect:l,scrollOffset:a}){const n=i.left-t.left+(i.width-t.width)/2-a.x,s=i.top-t.top+(i.height-t.height)/2-a.y,r=i.width/t.width,e=i.height/t.height,c=Math.max(r,e),y=t.top/l.height*100,o=(l.width-(t.left+t.width))/l.width*100,p=(l.height-(t.top+t.height))/l.height*100,d=t.left/l.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const h=1-f;return{clipPath:`inset(${y*h}% ${o*h}% ${p*h}% ${d*h}%)`,transform:`translate(${n*h}px, ${s*h}px) scale(${1+(c-1)*h})`}}}}function Ut({galleryRect:t,detailRect:i,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2+l.x,n=i.top-t.top+(i.height-t.height)/2+l.y,s=i.width/t.width,r=i.height/t.height,e=Math.max(s,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y;return{transform:`translate(${a*o-l.x}px, ${n*o-l.y}px) scale(${1+(e-1)*o})`,opacity:`${1-o}`}}}}function Ht({galleryRect:t,detailRect:i,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2-l.x,n=i.top-t.top+(i.height-t.height)/2-l.y,s=i.width/t.width,r=i.height/t.height,e=Math.max(s,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y,p=y;return{transform:`translate(${a*o}px, ${n*o}px) scale(${1+(e-1)*o})`,opacity:`${p}`}}}}function Xt({detailRect:t,galleryRect:i,pageRect:l,scrollOffset:a}){const n=i.left-t.left+(i.width-t.width)/2+a.x,s=i.top-t.top+(i.height-t.height)/2+a.y,r=i.width/t.width,e=i.height/t.height,c=Math.min(r,e),y=t.top/l.height*100,o=(l.width-(t.left+t.width))/l.width*100,p=(l.height-(t.top+t.height))/l.height*100,d=t.left/l.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const h=1-f;return{clipPath:`inset(${y*h}% ${o*h}% ${p*h}% ${d*h}%)`,transform:`translate(${n*h-a.x}px, ${s*h-a.y}px) scale(${1+(c-1)*h})`}}}}function zt(t,i,l){const a=t.querySelector("[data-pinterest-detail-key]"),n=i.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||i.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,r=null,e=!1;if(!a&&n){r=n;const o=r.getAttribute("data-pinterest-detail-key");if(!o)return null;s=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!0)}else if(a&&!n){r=a;const o=r.getAttribute("data-pinterest-detail-key");if(!o)return null;s=i.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!r)return null;const c=x(e?t:i,s),y=x(e?i:t,r);if(e){const o=Vt({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:l}),p=Ut({galleryRect:c,detailRect:y,scrollOffset:l});return i.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=p.transformOrigin,{inAnimation:o.animate,outAnimation:p.animate}}else{const o=Ht({galleryRect:c,detailRect:y,scrollOffset:l}),p=Xt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:l});return i.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=p.transformOrigin,{inAnimation:o.animate,outAnimation:p.animate}}}const Mt=(t={})=>{const i=t.physics??Ft,l=t.timeout??300;let a=null,n=null,s=null,r=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(p=>{a?p(!0):(n=p,setTimeout(()=>{n=null,p(!1)},l))})||!a?(r==null||r(),r=null,a=null,{physics:i,css:()=>({})}):(s=zt(a,y,c),r==null||r(),r=null,s?(a=null,{physics:i,css:p=>s?s.inAnimation(p):{}}):(a=null,{physics:i,css:()=>({})}))},out:async e=>{const c=new Promise(y=>{r=y});return{physics:i,prepare:()=>{g(e),e.style.zIndex="-1",a=e,n&&(n(!0),n=null)},wait:async()=>{await c},css:y=>s?s.outAnimation(y):{}}}}},Wt={spring:{stiffness:100,damping:30}},Bt=(t={})=>{const i=t.physics??Wt;return{in:l=>({physics:i,prepare:()=>{l.style.opacity="0",l.style.transform="rotate(-180deg)",l.style.transformOrigin="center center",l.style.willChange="transform, opacity"},css:a=>({transform:`rotate(${(a-1)*180}deg)`,opacity:a>.5?1:0}),onEnd:()=>{l.style.willChange="auto",l.style.transform="",l.style.transformOrigin="",l.style.opacity=""}}),out:(l,a)=>({physics:i,prepare:()=>{g(l,a),l.style.transformOrigin="center center",l.style.willChange="transform, opacity"},css:n=>({transform:`rotate(${(1-n)*180}deg)`,opacity:n>.5?1:0}),onEnd:()=>{l.style.willChange="auto"}})}},qt={spring:{stiffness:5,damping:4}},jt=(t={})=>{const i=t.direction??"up",l=t.physics??qt,a=i==="up";let n=null,s=null,r=null;const e=()=>{if(n===null||s===null)return null;const c=Math.min(n,s),y=window.innerHeight;return Math.max(c,y)};return{in:c=>(s=c.offsetHeight,n!==null&&(r=e()),{physics:l,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},tick:y=>{r===null&&(r=e());const o=r??window.innerHeight,p=a?(1-y)*o:(1-y)*-o;c.style.transform=`translate3d(0, ${p}px, 0)`},onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,y)=>({physics:l,tick:o=>{r===null&&(r=e());const p=r??window.innerHeight,d=a?(1-o)*-p:(1-o)*p;c.style.transform=`translate3d(0, ${d}px, 0)`},prepare:()=>{n=c.offsetHeight,s!==null&&(r=e()),g(c,y),c.style.zIndex=a?"-1":"1",c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none"}})}},Nt={inertia:{acceleration:20,resistance:1.5}},Gt={inertia:{acceleration:20,resistance:1}};function P(t){const i=x(document.body,t.positionedParent),l=t.scroll.y,a=window.innerHeight-i.top;return{top:l,left:0,width:i.width,height:a}}const Zt=(t={})=>{const{direction:i="enter"}=t,l=t.physics??(i==="enter"?Nt:Gt);return i==="enter"?{in:(a,n)=>{const r=P(n).height;return{physics:l,prepare:()=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:e=>({transform:`translate3d(0, ${(1-e)*r}px, 0)`}),onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}},out:(a,n)=>{const s=P(n),r=s.left+s.width/2,e=s.top+s.height/2+n.scrollOffset.y;return{physics:l,prepare:()=>{g(a,n),a.style.zIndex="-1",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transformOrigin=`${r}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c})}}}:{in:(a,n)=>{const s=P(n),r=s.left+s.width/2,e=s.top+s.height/2;return{physics:l,prepare:()=>{a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${r}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c}),onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,n)=>{const r=P(n).height;return{physics:l,prepare:()=>{g(a,n),a.style.zIndex="100",a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"},css:e=>({transform:`translate3d(0, ${(1-e)*r}px, 0)`})}}}},Jt={spring:{stiffness:140,damping:19,doubleSpring:.8}},Kt=(t={})=>{const i=t.direction??"left",l=t.physics??Jt,a=i==="left";return{in:n=>({physics:l,prepare:()=>{n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"},css:s=>({transform:`translate3d(${a?(1-s)*100:(1-s)*-100}%, 0, 0)`}),onEnd:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,s)=>({physics:l,css:r=>({transform:`translate3d(${a?(1-r)*-100:(1-r)*100}%, 0, 0)`}),prepare:()=>{g(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"}})}},k=8,Qt={spring:{stiffness:600,damping:40,restDelta:.1,restSpeed:1e14}},Rt=(t={})=>{const i=t.direction??"left",l=t.physics??Qt,a=i==="left";let{promise:n,resolve:s}=E();return{in:r=>({physics:l,prepare:()=>{r.style.opacity="0",r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"},wait:async()=>{if(n){await n;const e=E();n=e.promise,s=e.resolve}},css:e=>{const c=a?(1-e)*k:(1-e)*-k,y=`${e}`;return{transform:`translate3d(${c}px, 0, 0)`,opacity:y}},onEnd:()=>{r.style.opacity="1",r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain=""}}),out:(r,e)=>({physics:l,prepare:()=>{g(r,e),r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"},css:c=>{const y=a?(1-c)*-k:(1-c)*k,o=`${c}`;return{transform:`translate3d(${y}px, 0, 0)`,opacity:o}},onEnd:()=>{s&&s(),r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain=""}})}},ts={spring:{stiffness:17,damping:6}},v=20,L=800,ss=(t={})=>{const i=t.physics??ts;let l,a=null;return{in:n=>({physics:i,prepare:()=>{n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.transform=`perspective(${L}px) rotateY(${v}deg) translate3d(-100%, 0, 0)`},wait:async()=>{l&&await l},css:s=>{const r=(1-s)*v,e=-(1-s)*100;return{transform:`perspective(${L}px) rotateY(${r}deg) translate3d(${e}%, 0, 0)`}},onEnd:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,s)=>(l=new Promise(r=>{a=r}),{physics:i,prepare:()=>{g(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none",n.style.transform=`perspective(${L}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:r=>{const e=1-r,c=e*v,y=e*100;return{transform:`perspective(${L}px) rotateY(${-c}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{a&&a(),n.style.transform=""}})}},is={spring:{stiffness:600,damping:40,restDelta:.1,restSpeed:1e14}},D=.05;function ns(t){const i=x(document.body,t.positionedParent),l=t.scroll.y,a=window.innerHeight-i.top;return{top:l,left:0,width:i.width,height:a}}const es=(t={})=>{const i=t.physics??is;let{promise:l,resolve:a}=E();return{in:(n,s)=>{const r=ns(s),e=r.left+r.width/2,c=r.top+r.height/2;return{physics:i,prepare:()=>{n.style.opacity="0",n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.transformOrigin=`${e}px ${c}px`},wait:async()=>{if(l){await l;const y=E();l=y.promise,a=y.resolve}},css:y=>({transform:`scale(${1-D+y*D})`,opacity:y}),onEnd:()=>{n.style.opacity="1",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transformOrigin=""}}},out:(n,s)=>({physics:i,prepare:()=>{g(n,s),n.style.willChange="opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:r=>({opacity:r}),onEnd:()=>{a&&a()}})}};exports.blind=G;exports.curtainReveal=ot;exports.depth=yt;exports.drill=dt;exports.fade=wt;exports.film=Et;exports.hero=Pt;exports.instagram=It;exports.jaemin=Dt;exports.pinterest=Mt;exports.rotate=Bt;exports.scroll=jt;exports.sheet=Zt;exports.slide=Kt;exports.snap=Rt;exports.strip=ss;exports.swap=es;
|