@wix/interact 2.0.0-rc.8 → 2.0.1
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/README.md +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react.js +1 -1
- package/dist/cjs/web.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/react.js +2 -2
- package/dist/es/web.js +2 -2
- package/dist/{index-DsvFkLS4.mjs → index-BnI6W-7u.mjs} +134 -128
- package/dist/{index-DsvFkLS4.mjs.map → index-BnI6W-7u.mjs.map} +1 -1
- package/dist/{index-Bs9cjD_x.js → index-emAFXYqb.js} +5 -5
- package/dist/{index-Bs9cjD_x.js.map → index-emAFXYqb.js.map} +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/docs/README.md +39 -73
- package/docs/api/README.md +1 -1
- package/docs/api/functions.md +22 -37
- package/docs/api/interact-class.md +31 -20
- package/docs/api/interaction-controller.md +18 -54
- package/docs/api/types.md +31 -144
- package/docs/guides/effects-and-animations.md +9 -9
- package/docs/guides/understanding-triggers.md +11 -9
- package/docs/integration/react.md +15 -12
- package/package.json +3 -4
- package/rules/click.md +8 -10
- package/rules/full-lean.md +18 -20
- package/rules/hover.md +4 -6
- package/rules/integration.md +39 -13
- package/rules/pointermove.md +49 -81
- package/rules/scroll-list.md +66 -66
- package/rules/viewenter.md +24 -33
- package/rules/viewprogress.md +96 -96
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";function Qe(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function R(e,t){const n=Qe(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const r=n[s++];return r!==void 0?`[${r}]`:"[]"}):e}class le{animations;options;ready;isCSS;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation}getProgress(){return this.animations[0]?.effect?.getComputedTiming().progress||0}async play(t){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}pause(){for(const t of this.animations)t.pause()}async reverse(t){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}progress(t){for(const n of this.animations){const{delay:s,duration:r,iterations:i}=n.effect.getTiming(),o=(Number.isFinite(r)?r:0)*(Number.isFinite(i)?i:1);n.currentTime=((s||0)+o)*t}}cancel(){for(const t of this.animations)t.cancel()}setPlaybackRate(t){for(const n of this.animations)n.playbackRate=t}async onFinish(t){try{await Promise.all(this.animations.map(s=>s.finished));const n=this.animations[0];if(n&&!this.isCSS){const s=n.effect?.target;if(s){const r=new Event("animationend");s.dispatchEvent(r)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations[0]?.playState}}const Be=e=>e,Xe=e=>1-Math.cos(e*Math.PI/2),Ue=e=>Math.sin(e*Math.PI/2),Je=e=>-(Math.cos(Math.PI*e)-1)/2,Ze=e=>e**2,et=e=>1-(1-e)**2,tt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,nt=e=>e**3,st=e=>1-(1-e)**3,it=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,rt=e=>e**4,ot=e=>1-(1-e)**4,ct=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,at=e=>e**5,ft=e=>1-(1-e)**5,lt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,ut=e=>e===0?0:2**(10*e-10),dt=e=>e===1?1:1-2**(-10*e),ht=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,mt=e=>1-Math.sqrt(1-e**2),pt=e=>Math.sqrt(1-(e-1)**2),gt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,vt=e=>2.70158*e**3-1.70158*e**2,yt=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,wt=(e,t=1.70158*1.525)=>e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2,Et={linear:Be,sineIn:Xe,sineOut:Ue,sineInOut:Je,quadIn:Ze,quadOut:et,quadInOut:tt,cubicIn:nt,cubicOut:st,cubicInOut:it,quartIn:rt,quartOut:ot,quartInOut:ct,quintIn:at,quintOut:ft,quintInOut:lt,expoIn:ut,expoOut:dt,expoInOut:ht,circIn:mt,circOut:pt,circInOut:gt,backIn:vt,backOut:yt,backInOut:wt},me={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function bt(e){return e==="percentage"?"%":e||"px"}function z(e){return e?me[e]||e:me.linear}function St(e){return e?Et[e]:void 0}class It{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,r){const i=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:o}=r;this._animation=new Animation(i,o),this._tickCbId=null,this.progress=null,this.customEffect=c=>t(i.target,c),this._finishHandler=c=>{this.effect.target?.getAnimations().find(f=>f===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const t=this.effect?.getComputedTiming().progress??null;t!==this.progress&&(this.customEffect?.(t),this.progress=t),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(t){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${t instanceof Error?t.message:t}`)}}get currentTime(){return this._animation.currentTime}set currentTime(t){this._animation.currentTime=t}get startTime(){return this._animation.startTime}set startTime(t){this._animation.startTime=t}get playbackRate(){return this._animation.playbackRate}set playbackRate(t){this._animation.playbackRate=t}get id(){return this._animation.id}set id(t){this._animation.id=t}get effect(){return this._animation.effect}set effect(t){this._animation.effect=t}get timeline(){return this._animation.timeline}set timeline(t){this._animation.timeline=t}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(t){this._animation.oncancel=t}get onfinish(){return this._animation.onfinish}set onfinish(t){this._animation.onfinish=t}get onremove(){return this._animation.onremove}set onremove(t){this._animation.onremove=t}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(t){this._animation.updatePlaybackRate(t)}addEventListener(t,n,s){this._animation.addEventListener(t,n,s)}removeEventListener(t,n,s){this._animation.removeEventListener(t,n,s)}dispatchEvent(t){return this._animation.dispatchEvent(t)}}function Ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D={exports:{}},pe=D.exports,ge;function _t(){return ge||(ge=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(a){return setTimeout(a,16)};function r(){var a=this;a.reads=[],a.writes=[],a.raf=s.bind(t)}r.prototype={constructor:r,runTasks:function(a){for(var u;u=a.shift();)u()},measure:function(a,u){var d=u?a.bind(u):a;return this.reads.push(d),i(this),d},mutate:function(a,u){var d=u?a.bind(u):a;return this.writes.push(d),i(this),d},clear:function(a){return c(this.reads,a)||c(this.writes,a)},extend:function(a){if(typeof a!="object")throw new Error("expected object");var u=Object.create(this);return f(u,a),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function i(a){a.scheduled||(a.scheduled=!0,a.raf(o.bind(null,a)))}function o(a){var u=a.writes,d=a.reads,g;try{n("flushing reads",d.length),a.runTasks(d),n("flushing writes",u.length),a.runTasks(u)}catch(h){g=h}if(a.scheduled=!1,(d.length||u.length)&&i(a),g)if(n("task errored",g.message),a.catch)a.catch(g);else throw g}function c(a,u){var d=a.indexOf(u);return!!~d&&!!a.splice(d,1)}function f(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])}var l=t.fastdom=t.fastdom||new r;e.exports=l})(typeof window<"u"?window:typeof pe<"u"?pe:globalThis)})(D)),D.exports}var kt=_t();const S=Ot(kt),ie={};function Tt(e){Object.assign(ie,e)}function xt(e){return e in ie?ie[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function T(e,t){return e?document.getElementById(e):null}function Ct(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Lt(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function te(e){return`${e.value}${bt(e.type)}`}function ve(e,t,n){return`${e.name||"cover"} ${n&&e.offset.type!=="percentage"?`calc(100% + ${te(e.offset)}${t?` + ${t}`:""})`:t?`calc(${te(e.offset)} + ${t})`:te(e.offset)}`}function At(e){return{start:ve(e.startOffset,e.startOffsetAdd),end:ve(e.endOffset,e.endOffsetAdd,!0)}}function Pe(e){return t=>S.measure(()=>t(e))}function $e(e){return t=>S.mutate(()=>t(e))}function Y(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?xt(t):null}else if(e.keyframeEffect){const t=s=>{const{name:r,keyframes:i}=s.keyframeEffect;return[{...s,name:r,keyframes:i}]};return{web:t,style:t,getNames:s=>{const{effectId:r}=s,{name:i}=s.keyframeEffect,o=i||r;return o?[o]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function Pt(e,t,n){return e.map((s,r)=>{const i={fill:s.fill,easing:z(s.easing),iterations:s.iterations===0?1/0:s.iterations||1,composite:s.composite,direction:Lt(s)};return Re(t)?(i.duration=s.duration,i.delay=s.delay||0):window.ViewTimeline&&t?.trigger==="view-progress"?i.duration="auto":(i.duration=99.99,i.delay=.01),{effect:s,options:i,id:n&&`${n}-${r+1}`,part:s.part}})}function Re(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ye(e,t,n,s,r){if(e){if(Re(s)&&(t.duration=t.duration||1,r?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let i;return n instanceof HTMLElement&&(i={measure:Pe(n),mutate:$e(n)}),e.web?e.web(t,i,r):e(t,i,r)}return[]}function ue(e,t,n,s,r){const i=e instanceof HTMLElement?e:T(e);if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const g=Y(d),h=ye(g,t,i,n,s);return typeof h!="function"?null:h(i)}const o=Y(t),c=ye(o,t,i,n,s);if(!c||c.length===0)return null;const f=Pt(c,n,t.effectId);let l;const a=n?.trigger==="view-progress";a&&window.ViewTimeline&&(l=new ViewTimeline({subject:n.element||T(n.componentId)}));const u=f.map(({effect:d,options:g,id:h,part:m})=>{const p=m?Ct(i,m):i,v=new KeyframeEffect(p||null,[],g);S.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(d.keyframes)});const y=a&&l?{timeline:l}:{},E=typeof d.customEffect=="function"?new It(d.customEffect,p||null,g,y):new Animation(v,y.timeline);if(a)if(l)S.mutate(()=>{const{start:b,end:O}=At(d);E.rangeStart=b,E.rangeEnd=O,E.play()});else{const{startOffset:b,endOffset:O}=t;S.mutate(()=>{const L=d.startOffset||b,J=d.endOffset||O;Object.assign(E,{start:{name:L.name,offset:L.offset?.value,add:d.startOffsetAdd},end:{name:J.name,offset:J.offset?.value,add:d.endOffsetAdd}})})}return h&&(E.id=h),E});return new le(u,{...t,trigger:{...n||{}},measured:new Promise(d=>S.mutate(d))})}function $t(e,t,n){const s=Y(t),r=e instanceof HTMLElement?e:T(e);if(s&&s.prepare&&r){const i={measure:Pe(r),mutate:$e(r)};s.prepare(t,i)}n&&S.mutate(n)}function Rt(e,t){const n=Y(t);if(!n)return null;if(!n.style)return t.effectId&&e?Mt(e,t.effectId):null;const s=n.getNames(t),i=(typeof e=="string"?T(e):e)?.getAnimations(),o=i?.map(f=>f.animationName)||[],c=[];return s.forEach(f=>{o.includes(f)&&c.push(i?.find(l=>l.animationName===f))}),c?.length?new le(c):null}function Mt(e,t){const s=(typeof e=="string"?T(e):e)?.getAnimations().filter(r=>{const i=r.id||r.animationName;return i?i.startsWith(t):!0});return s?.length?new le(s):null}function Me(e,t,n,s={}){const{disabled:r,allowActiveEvent:i,...o}=s,c=ue(e,t,n,o);if(!c)return null;let f={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const l=n.element||T(n.componentId),{ready:a}=c;return c.animations.map(u=>({get start(){return u.start},get end(){return u.end},viewSource:l,ready:a,getProgress(){return c.getProgress()},effect(d,g){const{activeDuration:h}=u.effect.getComputedTiming(),{delay:m}=u.effect.getTiming();u.currentTime=((m||0)+(h||0))*g},disabled:r,destroy(){u.cancel()}}))}else if(n.trigger==="pointer-move"){const l=t,{centeredToTarget:a,transitionDuration:u,transitionEasing:d}=l,g=n.axis;if(l.keyframeEffect){const h=c;return h.animations?.length===0?null:{target:void 0,centeredToTarget:a,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(p,v){const y=g==="x"?v.x:v.y;this._currentProgress=y,h.progress(y)},disabled:r??!1,destroy(){h.cancel()}}}f={centeredToTarget:a,allowActiveEvent:i},t.customEffect&&u&&(f.transitionDuration=u,f.transitionEasing=St(d)),f.target=c.target}return{...f,getProgress(){return c.getProgress()},effect(l,a,u,d){c.progress(u?{...a,v:u,active:d}:a)},disabled:r,destroy(){c.cancel()}}}function X(e,t,n,s=!1){const r=Rt(e,t);return r?(r.ready=new Promise(i=>{$t(e,t,i)}),r):ue(e,t,n,{reducedMotion:s})}function N(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function Ft(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function Ht({key:e,effectId:t,transition:n,properties:s,childSelector:r="> :first-child",selectorCondition:i}){let o=[];if(n?.styleProperties){const{duration:h,easing:m,delay:p}=n;h&&(n.styleProperties.some(y=>y.name.startsWith("--"))?o=[`all ${h}ms ${z(m||"ease")}${p?` ${p}ms`:""}`,"visibility 0s"]:o=n.styleProperties.map(y=>`${y.name} ${h}ms ${z(m||"ease")}${p?` ${p}ms`:""}`)),s=n.styleProperties}else o=s?.filter(h=>h.duration).map(h=>`${h.name} ${h.duration}ms ${z(h.easing)||"ease"}${h.delay?` ${h.delay}ms`:""}`)||[];const c=s?.map(h=>`${h.name}: ${h.value};`)||[],f=e.replace(/"/g,"'"),l=`:is(:state(${t}), :--${t}) ${r}`,a=`[data-interact-effect~="${t}"] ${r}`,u=i?N(l,i):l,d=i?N(a,i):a,g=[`${u},
|
|
1
|
+
"use strict";function Qe(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function R(e,t){const n=Qe(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const r=n[s++];return r!==void 0?`[${r}]`:"[]"}):e}class le{animations;options;ready;isCSS;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation}getProgress(){return this.animations[0]?.effect?.getComputedTiming().progress||0}async play(t){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}pause(){for(const t of this.animations)t.pause()}async reverse(t){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),t&&t()}progress(t){for(const n of this.animations){const{delay:s,duration:r,iterations:i}=n.effect.getTiming(),o=(Number.isFinite(r)?r:0)*(Number.isFinite(i)?i:1);n.currentTime=((s||0)+o)*t}}cancel(){for(const t of this.animations)t.cancel()}setPlaybackRate(t){for(const n of this.animations)n.playbackRate=t}async onFinish(t){try{await Promise.all(this.animations.map(s=>s.finished));const n=this.animations[0];if(n&&!this.isCSS){const s=n.effect?.target;if(s){const r=new Event("animationend");s.dispatchEvent(r)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations[0]?.playState}}const Be=e=>e,Xe=e=>1-Math.cos(e*Math.PI/2),Ue=e=>Math.sin(e*Math.PI/2),Je=e=>-(Math.cos(Math.PI*e)-1)/2,Ze=e=>e**2,et=e=>1-(1-e)**2,tt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,nt=e=>e**3,st=e=>1-(1-e)**3,it=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,rt=e=>e**4,ot=e=>1-(1-e)**4,ct=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,at=e=>e**5,ft=e=>1-(1-e)**5,lt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,ut=e=>e===0?0:2**(10*e-10),dt=e=>e===1?1:1-2**(-10*e),ht=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,mt=e=>1-Math.sqrt(1-e**2),pt=e=>Math.sqrt(1-(e-1)**2),gt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,vt=e=>2.70158*e**3-1.70158*e**2,yt=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,wt=(e,t=1.70158*1.525)=>e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2,Et={linear:Be,sineIn:Xe,sineOut:Ue,sineInOut:Je,quadIn:Ze,quadOut:et,quadInOut:tt,cubicIn:nt,cubicOut:st,cubicInOut:it,quartIn:rt,quartOut:ot,quartInOut:ct,quintIn:at,quintOut:ft,quintInOut:lt,expoIn:ut,expoOut:dt,expoInOut:ht,circIn:mt,circOut:pt,circInOut:gt,backIn:vt,backOut:yt,backInOut:wt},me={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function bt(e){return e==="percentage"?"%":e||"px"}function D(e){return e?me[e]||e:me.linear}function St(e){return e?Et[e]:void 0}class It{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,r){const i=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:o}=r;this._animation=new Animation(i,o),this._tickCbId=null,this.progress=null,this.customEffect=c=>t(i.target,c),this._finishHandler=c=>{this.effect.target?.getAnimations().find(f=>f===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const t=this.effect?.getComputedTiming().progress??null;t!==this.progress&&(this.customEffect?.(t),this.progress=t),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(t){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${t instanceof Error?t.message:t}`)}}get currentTime(){return this._animation.currentTime}set currentTime(t){this._animation.currentTime=t}get startTime(){return this._animation.startTime}set startTime(t){this._animation.startTime=t}get playbackRate(){return this._animation.playbackRate}set playbackRate(t){this._animation.playbackRate=t}get id(){return this._animation.id}set id(t){this._animation.id=t}get effect(){return this._animation.effect}set effect(t){this._animation.effect=t}get timeline(){return this._animation.timeline}set timeline(t){this._animation.timeline=t}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(t){this._animation.oncancel=t}get onfinish(){return this._animation.onfinish}set onfinish(t){this._animation.onfinish=t}get onremove(){return this._animation.onremove}set onremove(t){this._animation.onremove=t}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(t){this._animation.updatePlaybackRate(t)}addEventListener(t,n,s){this._animation.addEventListener(t,n,s)}removeEventListener(t,n,s){this._animation.removeEventListener(t,n,s)}dispatchEvent(t){return this._animation.dispatchEvent(t)}}function Ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N={exports:{}},pe=N.exports,ge;function _t(){return ge||(ge=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(a){return setTimeout(a,16)};function r(){var a=this;a.reads=[],a.writes=[],a.raf=s.bind(t)}r.prototype={constructor:r,runTasks:function(a){for(var u;u=a.shift();)u()},measure:function(a,u){var d=u?a.bind(u):a;return this.reads.push(d),i(this),d},mutate:function(a,u){var d=u?a.bind(u):a;return this.writes.push(d),i(this),d},clear:function(a){return c(this.reads,a)||c(this.writes,a)},extend:function(a){if(typeof a!="object")throw new Error("expected object");var u=Object.create(this);return f(u,a),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function i(a){a.scheduled||(a.scheduled=!0,a.raf(o.bind(null,a)))}function o(a){var u=a.writes,d=a.reads,g;try{n("flushing reads",d.length),a.runTasks(d),n("flushing writes",u.length),a.runTasks(u)}catch(h){g=h}if(a.scheduled=!1,(d.length||u.length)&&i(a),g)if(n("task errored",g.message),a.catch)a.catch(g);else throw g}function c(a,u){var d=a.indexOf(u);return!!~d&&!!a.splice(d,1)}function f(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])}var l=t.fastdom=t.fastdom||new r;e.exports=l})(typeof window<"u"?window:typeof pe<"u"?pe:globalThis)})(N)),N.exports}var kt=_t();const S=Ot(kt),ie={};function Tt(e){Object.assign(ie,e)}function xt(e){return e in ie?ie[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function T(e,t){return e?document.getElementById(e):null}function Ct(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Lt(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function te(e){return`${e.value}${bt(e.unit)}`}function ve(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${te(e.offset)}${t?` + ${t}`:""})`:t?`calc(${te(e.offset)} + ${t})`:te(e.offset)}`}function At(e){return{start:ve(e.startOffset,e.startOffsetAdd),end:ve(e.endOffset,e.endOffsetAdd,!0)}}function Pe(e){return t=>S.measure(()=>t(e))}function $e(e){return t=>S.mutate(()=>t(e))}function K(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?xt(t):null}else if(e.keyframeEffect){const t=s=>{const{name:r,keyframes:i}=s.keyframeEffect;return[{...s,name:r,keyframes:i}]};return{web:t,style:t,getNames:s=>{const{effectId:r}=s,{name:i}=s.keyframeEffect,o=i||r;return o?[o]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function Pt(e,t,n){return e.map((s,r)=>{const i={fill:s.fill,easing:D(s.easing),iterations:s.iterations===0?1/0:s.iterations||1,composite:s.composite,direction:Lt(s)};return Re(t)?(i.duration=s.duration,i.delay=s.delay||0):window.ViewTimeline&&t?.trigger==="view-progress"?i.duration="auto":(i.duration=99.99,i.delay=.01),{effect:s,options:i,id:n&&`${n}-${r+1}`,part:s.part}})}function Re(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ye(e,t,n,s,r){if(e){if(Re(s)&&(t.duration=t.duration||1,r?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let i;return n instanceof HTMLElement&&(i={measure:Pe(n),mutate:$e(n)}),e.web?e.web(t,i,r):e(t,i,r)}return[]}function ue(e,t,n,s,r){const i=e instanceof HTMLElement?e:T(e);if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const g=K(d),h=ye(g,t,i,n,s);return typeof h!="function"?null:h(i)}const o=K(t),c=ye(o,t,i,n,s);if(!c||c.length===0)return null;const f=Pt(c,n,t.effectId);let l;const a=n?.trigger==="view-progress";a&&window.ViewTimeline&&(l=new ViewTimeline({subject:n.element||T(n.componentId)}));const u=f.map(({effect:d,options:g,id:h,part:m})=>{const p=m?Ct(i,m):i,v=new KeyframeEffect(p||null,[],g);S.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(d.keyframes)});const y=a&&l?{timeline:l}:{},E=typeof d.customEffect=="function"?new It(d.customEffect,p||null,g,y):new Animation(v,y.timeline);if(a)if(l)S.mutate(()=>{const{start:b,end:I}=At(d);E.rangeStart=b,E.rangeEnd=I,E.play()});else{const{startOffset:b,endOffset:I}=t;S.mutate(()=>{const L=d.startOffset||b,J=d.endOffset||I;Object.assign(E,{start:{name:L.name,offset:L.offset?.value,add:d.startOffsetAdd},end:{name:J.name,offset:J.offset?.value,add:d.endOffsetAdd}})})}return h&&(E.id=h),E});return new le(u,{...t,trigger:{...n||{}},measured:new Promise(d=>S.mutate(d))})}function $t(e,t,n){const s=K(t),r=e instanceof HTMLElement?e:T(e);if(s&&s.prepare&&r){const i={measure:Pe(r),mutate:$e(r)};s.prepare(t,i)}n&&S.mutate(n)}function Rt(e,t){const n=K(t);if(!n)return null;if(!n.style)return t.effectId&&e?Mt(e,t.effectId):null;const s=n.getNames(t),i=(typeof e=="string"?T(e):e)?.getAnimations(),o=i?.map(f=>f.animationName)||[],c=[];return s.forEach(f=>{o.includes(f)&&c.push(i?.find(l=>l.animationName===f))}),c?.length?new le(c):null}function Mt(e,t){const s=(typeof e=="string"?T(e):e)?.getAnimations().filter(r=>{const i=r.id||r.animationName;return i?i.startsWith(t):!0});return s?.length?new le(s):null}function Me(e,t,n,s={}){const{disabled:r,allowActiveEvent:i,...o}=s,c=ue(e,t,n,o);if(!c)return null;let f={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const l=n.element||T(n.componentId),{ready:a}=c;return c.animations.map(u=>({get start(){return u.start},get end(){return u.end},viewSource:l,ready:a,getProgress(){return c.getProgress()},effect(d,g){const{activeDuration:h}=u.effect.getComputedTiming(),{delay:m}=u.effect.getTiming();u.currentTime=((m||0)+(h||0))*g},disabled:r,destroy(){u.cancel()}}))}else if(n.trigger==="pointer-move"){const l=t,{centeredToTarget:a,transitionDuration:u,transitionEasing:d}=l,g=n.axis;if(l.keyframeEffect){const h=c;return h.animations?.length===0?null:{target:void 0,centeredToTarget:a,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(p,v){const y=g==="x"?v.x:v.y;this._currentProgress=y,h.progress(y)},disabled:r??!1,destroy(){h.cancel()}}}f={centeredToTarget:a,allowActiveEvent:i},t.customEffect&&u&&(f.transitionDuration=u,f.transitionEasing=St(d)),f.target=c.target}return{...f,getProgress(){return c.getProgress()},effect(l,a,u,d){c.progress(u?{...a,v:u,active:d}:a)},disabled:r,destroy(){c.cancel()}}}function U(e,t,n,s=!1){const r=Rt(e,t);return r?(r.ready=new Promise(i=>{$t(e,t,i)}),r):ue(e,t,n,{reducedMotion:s})}function V(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function Ft(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function Ht({key:e,effectId:t,transition:n,properties:s,childSelector:r="> :first-child",selectorCondition:i}){let o=[];if(n?.styleProperties){const{duration:h,easing:m,delay:p}=n;h&&(n.styleProperties.some(y=>y.name.startsWith("--"))?o=[`all ${h}ms ${D(m||"ease")}${p?` ${p}ms`:""}`,"visibility 0s"]:o=n.styleProperties.map(y=>`${y.name} ${h}ms ${D(m||"ease")}${p?` ${p}ms`:""}`)),s=n.styleProperties}else o=s?.filter(h=>h.duration).map(h=>`${h.name} ${h.duration}ms ${D(h.easing)||"ease"}${h.delay?` ${h.delay}ms`:""}`)||[];const c=s?.map(h=>`${h.name}: ${h.value};`)||[],f=e.replace(/"/g,"'"),l=`:is(:state(${t}), :--${t}) ${r}`,a=`[data-interact-effect~="${t}"] ${r}`,u=i?V(l,i):l,d=i?V(a,i):a,g=[`${u},
|
|
2
2
|
${d} {
|
|
3
3
|
${c.join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`];if(o.length){const h=`[data-interact-key="${f}"] ${r}`,m=i?
|
|
5
|
+
}`];if(o.length){const h=`[data-interact-key="${f}"] ${r}`,m=i?V(h,i):h;g.push(`@media (prefers-reduced-motion: no-preference) { ${m} {
|
|
6
6
|
transition: ${o.join(", ")};
|
|
7
|
-
} }`)}return g}function U(e,t){const n=(e||[]).filter(i=>t[i]?.type==="media"&&t[i].predicate).map(i=>t[i].predicate).join(") and ("),s=n&&`(${n})`;return s&&window.matchMedia(s)}function K(e,t){for(const n of e||[]){const s=t[n];if(s?.type==="selector"&&s.predicate)return s.predicate}}const M={rangeStart:{name:"cover",offset:{value:0,type:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,type:"percentage"}}};function qt(e,t){const n=e?.name??M.rangeStart.name,s=t?.name??e?.name??M.rangeEnd.name,r={name:n,offset:e?.offset||M.rangeStart.offset},i={name:s,offset:t?.offset||M.rangeEnd.offset};return{startOffset:r,endOffset:i}}function x(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:r,endOffset:i}=qt(t,n);return{id:"",startOffset:r,endOffset:i,...s}}function I(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function C(e,t){e.get(t)?.forEach(s=>{const{source:r,target:i,cleanup:o}=s;o();const c=r===t?i:r;e.get(c)?.delete(s)}),e.delete(t)}const zt={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},Dt={root:null,rootMargin:"0px",threshold:[0]},P={},G=new WeakMap,V=new WeakSet,W=new WeakMap;let Fe={},A=null;function Nt(e){Fe=e}function He(e,t){G.get(e)?.forEach(({source:s,handler:r})=>{s===e&&r(t)})}function we(){return A||(A=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||He(n,!1)})},Dt),A)}function qe(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(P[n])return P[n];const s=t?zt:{root:null,rootMargin:e.inset?`${e.inset} 0px ${e.inset}`:"0px",threshold:e.threshold},r=new IntersectionObserver(i=>{i.forEach(o=>{const c=o.target,f=!V.has(c);if(f&&(V.add(c),e.useSafeViewEnter&&!o.isIntersecting)){S.measure(()=>{const a=o.boundingClientRect.height,u=o.rootBounds?.height;if(!u)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&a*d>u&&S.mutate(()=>{r.unobserve(c);const h=qe(e,!0);W.set(c,h),h.observe(c)})});return}const l=e.type||"once";(o.isIntersecting||l==="alternate"&&!f)&&(He(c,o.isIntersecting),l==="once"&&(r.unobserve(o.target),V.delete(c)))})},s);return P[n]=r,r}function Vt(e,t,n,s={},{reducedMotion:r,selectorCondition:i}={}){const o={...Fe,...s},c=o.type||"once",f=X(t,x(n),void 0,r);if(!f)return;const l=qe(o);c!=="once"&&f.persist?.();let a=!0;const g={source:e,target:t,handler:h=>{i&&!t.matches(i)||(c==="once"?h&&f.play(()=>{const m=()=>{t.dataset.interactEnter="start"};f.isCSS?(S.mutate(()=>{requestAnimationFrame(m)}),f.onFinish(()=>{S.mutate(()=>{t.dataset.interactEnter="done"})})):S.mutate(m)}):c==="alternate"?a&&h?(a=!1,f.play()):a||f.reverse():c==="repeat"?h?(f.progress(0),f.play()):(f.pause(),f.progress(0)):c==="state"&&(h?f.play():f.pause()))},cleanup:()=>{(W.get(e)||l).unobserve(e),(c==="repeat"||c==="state")&&we().unobserve(e),f.cancel(),V.delete(e),W.delete(e)}};I(G,e,g),I(G,t,g),W.set(e,l),l.observe(e),(c==="repeat"||c==="state")&&we().observe(e)}function Wt(e){C(G,e)}function jt(){A=null,Object.keys(P).forEach(e=>delete P[e])}const Ee={add:Vt,remove:Wt,setOptions:Nt,reset:jt};function ze(e,t){return Object.assign(Object.create(t),e)}function Yt(e,t,n,s){let r=e*(1-n)+t*n;if(s){const i=r-e;Math.abs(i)<s&&(r=e+s*Math.sign(i));const o=t-r;if(Math.abs(o)<s)return t}return r}function Kt(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function be(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Gt(e,t){const n=e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);return Q(n[1],t)+Q(n[6],t)}function Q(e,t){return e?/^-?\d+px$/.test(e)?parseInt(e):/^-?\d+[lsd]?vh$/.test(e)?parseInt(e)*t.viewportHeight/100:/^-?\d+[lsd]?vw$/.test(e)?parseInt(e)*t.viewportWidth/100:/^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e)?Gt(e,t):parseInt(e)||0:0}function _(e,t,n){const{name:s,offset:r=0}=e,{start:i,end:o}=n,c=o-i,f=r/100;let l,a;return s==="entry"?(l=i-t,a=Math.min(t,c)):s==="entry-crossing"?(l=i-t,a=c):s==="contain"?(l=Math.min(o-t,i),a=Math.abs(t-c)):s==="exit"?(l=Math.max(i,o-t),a=Math.min(t,c)):s==="exit-crossing"?(l=i,a=c):s==="cover"&&(l=i-t,a=c+t),l+f*a|0}function ne(e,t,n,s,r){let i=0;const o={start:t,end:n};return e.forEach((c,f)=>{i+=c.offset;const l=c.sticky;if(l){if("end"in l&&e[f-1]?.element){const d=((r?c.element.offsetWidth:c.element.offsetHeight)||0)+l.end-s,g=i+d-c.offset,h=g<o.start,m=!h&&g<=n;let p=0;(h||m)&&(p=c.offset,o.end+=p),h&&(o.start+=p)}if("start"in l){const a=i-l.start,u=a<o.start,d=!u&&a<=o.end;let g=0;const h=e[f-1]?.element;if(h){if(u||d){const m=(r?h.offsetWidth:h.offsetHeight)||0,p=c.offset,v=(r?c.element.offsetWidth:c.element.offsetHeight)||0;g=m-(p+v),i+=g,o.end+=g}u&&(o.start+=g)}}}}),o}function Qt(e,t,n,s,r,i){const{start:o,end:c,duration:f}=e;let l=o,a=c,u=e.startRange,d=e.endRange,g;if(typeof f=="string"){u={name:f,offset:0},d={name:f,offset:100},l=_(u,n,t),a=_(d,n,t),g=a-l;const h=ne(i,l,a,n,s);l=h.start,a=h.end}else{if(u||o?.name){u=u||o;const h=Q(u.add,r),m=_({...u,offset:0},n,t),p=_({...u,offset:100},n,t),v=ne(i,m,p,n,s);l=v.start+u.offset/100*(v.end-v.start)+h}if(d||c?.name){d=d||c;const h=Q(d.add,r),m=_({...d,offset:0},n,t),p=_({...d,offset:100},n,t),v=ne(i,m,p,n,s);a=v.start+d.offset/100*(v.end-v.start)+h}else typeof f=="number"&&(a=l+f)}return!g&&!f&&(g=a-l),{...e,start:l,end:a,startRange:u,endRange:d,duration:g||f}}function Bt(e){return e.position==="sticky"}function Xt(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Ut(e,t){return parseInt(t?e.left:e.top)}function Jt(e,t){return parseInt(t?e.right:e.bottom)}function Zt(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function en(e,t){let n;const s=Ut(e,t),r=Jt(e,t),i=!isNaN(s),o=!isNaN(r);return(i||o)&&(n={},i&&(n.start=s),o&&(n.end=r)),n}function F(e,t,n,s,r){const i=e[0].viewSource,o=[];let c=(s?i.offsetWidth:i.offsetHeight)||0,f=0,l=i;for(;l;){const u=window.getComputedStyle(l),d=Bt(u),g=d?en(u,s):void 0,h=Zt(l,s,d);if((!g||!("end"in g))&&(f+=h),o.push({element:l,offset:h,sticky:g}),l=l.offsetParent,Xt(u,l,t))break;if(l===t){o.push({element:l,offset:0});break}}return o.reverse(),e.map(u=>({...Qt(u,{start:f,end:f+c},n,s,r,o)}))}const Se=100,tn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function nn(e,t,n,s){let r=0;return e>=t&&e<=n?r=s?(e-t)/s:1:e>n&&(r=1),r}function Ie(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function sn(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function rn(e){const t=ze(e,tn),n=t.root,s=t.horizontal,r=new WeakMap;let i=Ie(n,s),o,c,f,l,a;const u=[],d=sn();if(t.scenes=Object.values(e.scenes.reduce((m,p,v)=>{const y=p.groupId?`group-${p.groupId}`:String(v);return m[y]?m[y].push(p):m[y]=[p],m},{})).flatMap(m=>(m.every(p=>p.viewSource&&(typeof p.duration=="string"||p.start?.name))?(m=F(m,n,i,s,d),(t.observeSourcesResize||t.observeContentResize)&&u.push(m)):m.forEach(p=>{p.end==null&&(p.end=p.start+p.duration),p.duration==null&&(p.duration=p.end-p.start)}),m)),t.scenes.forEach((m,p)=>{m.index=p}),u.length){const m=new Map;window.ResizeObserver&&(f=new window.ResizeObserver(function(p){p.forEach(v=>{const y=m.get(v.target),E=F(y,n,i,s,d);E.forEach((b,O)=>{t.scenes[b.index]=E[O]}),u.splice(u.indexOf(y),1,E)})}),u.forEach(p=>{f.observe(p[0].viewSource,{box:"border-box"}),m.set(p[0].viewSource,p)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(be(()=>{const v=u.map(y=>{const E=F(y,n,i,s,d);return E.forEach((b,O)=>{t.scenes[b.index]=E[O]}),E});u.length=0,u.push(...v),u.forEach(y=>{m.set(y[0].viewSource,y)})},Se)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(l=be(function(){i=Ie(n,s);const p=u.map(v=>{const y=F(v,n,i,s,d);return y.forEach((E,b)=>{t.scenes[E.index]=y[b]}),y});u.length=0,u.push(...p),u.forEach(v=>{m.set(v[0].viewSource,v)})},Se),n===window?window.addEventListener("resize",l):window.ResizeObserver&&(a=new window.ResizeObserver(l),a.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(c=new window.IntersectionObserver(function(m){m.forEach(p=>{(r.get(p.target)||[]).forEach(v=>{v.disabled=!p.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(m=>{if(m.viewSource){let p=r.get(m.viewSource);p||(p=[],r.set(m.viewSource,p),c.observe(m.viewSource)),p.push(m)}}));function g({p:m,vp:p}){m=+m.toFixed(1);const v=+p.toFixed(4);if(m!==o){for(let y of t.scenes)if(!y.disabled){const{start:E,end:b,duration:O}=y,L=nn(m,E,b,O);y.effect(y,L,v)}o=m}}function h(){t.scenes.forEach(m=>m.destroy?.()),c&&(c.disconnect(),c=null),f&&(f.disconnect(),f=null),l&&(a?(a.disconnect(),a=null):window.removeEventListener("resize",l))}return{tick:g,destroy:h}}const on={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class cn{constructor(t={}){this.config=ze(t,on),this.progress={p:0,prevP:0,vp:0},this.currentProgress={p:0,prevP:0,vp:0},this._lerpFrameId=0,this.effect=null;const n=!this.config.root||this.config.root===window.document.body;this.config.root=n?window:this.config.root,this.config.contentRoot=this.config.contentRoot||(n?window.document.body:this.config.root.firstElementChild),this.config.resetProgress=this.config.resetProgress||this.resetProgress.bind(this),this._measure=this.config.measure||(()=>{const s=this.config.root;this.progress.p=this.config.horizontal?s.scrollX||s.scrollLeft||0:s.scrollY||s.scrollTop||0}),this._trigger=Kt(()=>{this._measure?.(),this.tick(!0)})}start(){this.setupEffect(),this.setupEvent(),this.resetProgress(),this.tick()}pause(){this.removeEvent()}resetProgress(t={}){const n=this.config.root,s=t.x||t.x===0?t.x:n.scrollX||n.scrollLeft||0,r=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,i=this.config.horizontal?s:r;this.progress.p=i,this.progress.prevP=i,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=i,this.currentProgress.prevP=i,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,r)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const r=s.p-s.prevP,i=r<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(r))/this.config.velocityMax*i}this.effect.tick(s),n&&s.p!==this.progress.p&&(t&&this._lerpFrameId&&window.cancelAnimationFrame(this._lerpFrameId),this._lerpFrameId=window.requestAnimationFrame(()=>this.tick())),s.prevP=s.p}lerp(){this.currentProgress.p=Yt(this.currentProgress.p,this.progress.p,+(1-this.config.transitionFriction).toFixed(3),this.config.transitionEpsilon)}destroy(){this.pause(),this.removeEffect()}setupEvent(){this.removeEvent(),this.config.root.addEventListener("scroll",this._trigger)}removeEvent(){this.config.root.removeEventListener("scroll",this._trigger)}setupEffect(){this.removeEffect(),this.effect=rn(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const re=new WeakMap;let De=()=>({});function an(e){De=e}function fn(e,t,n,s,{reducedMotion:r}){if(r)return;const i={trigger:"view-progress",element:e},o=x(n);let c;if("ViewTimeline"in window){const l=ue(t,o,i);l&&(l.play(),c=()=>{l.ready.then(()=>{l.cancel()})})}else{const l=Me(t,o,i);if(l){const a=Array.isArray(l)?l:[l],u=new cn({viewSource:e,scenes:a,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...De()});c=()=>{u.destroy()},Promise.all(a.map(d=>d.ready||Promise.resolve())).then(()=>{u.start()})}}if(!c)return;const f={source:e,target:t,cleanup:c};I(re,e,f),I(re,t,f)}function ln(e){C(re,e)}const un={add:fn,remove:ln,registerOptionsGetter:an},oe=new WeakMap;function dn(e,t,n,s=!1,r){const i=X(e,x(t),void 0,s);if(!i)return null;const o=n.type||"alternate";let c=!0;return f=>{r&&!e.matches(r)||(f.type==="mouseenter"||f.type==="focusin"?o==="alternate"?c?(c=!1,i.play()):i.reverse():o==="state"?i.playState!=="finished"&&i.play():(i.progress(0),i.isCSS&&i.onFinish(()=>{S.mutate(()=>{e.dataset.motionEnter="done"})}),i.play()):(f.type==="mouseleave"||f.type==="focusout")&&(o==="alternate"?i.reverse():o==="repeat"?(i.cancel(),S.mutate(()=>{delete e.dataset.interactEnter})):o==="state"&&i.playState==="running"&&i.pause()))}}function hn(e,t,{effectId:n,listContainer:s,listItemSelector:r},i,o){const c=i.method||"toggle",f=c==="toggle",l=!!s;return a=>{if(o&&!e.matches(o))return;let u;if(l&&(u=e.closest(`${s} > ${r||""}:has(:scope)`)),a.type==="mouseenter"||a.type==="focusin"){const d=f?"add":c;t.toggleEffect(n,d,u)}else(a.type==="mouseleave"||a.type==="focusout")&&f&&t.toggleEffect(n,"remove",u)}}function mn(e,t,n,s={},{reducedMotion:r,targetController:i,selectorCondition:o,allowA11yTriggers:c}){let f,l=!1,a=!1;if(n.transition||n.transitionProperties?(f=hn(t,i,n,s,o),l=!0):(f=dn(t,n,s,r,o),a=s.type==="once"),!f)return;const u=p=>{e.contains(p.relatedTarget)||f(p)},d=p=>{e.contains(p.relatedTarget)||f(p)},h={source:e,target:t,cleanup:()=>{e.removeEventListener("mouseenter",f),e.removeEventListener("mouseleave",f),c&&(e.removeEventListener("focusin",u),e.removeEventListener("focusout",d))}};I(oe,e,h),I(oe,t,h),c&&(e.tabIndex=0,e.addEventListener("focusin",u,{once:a})),e.addEventListener("mouseenter",f,{passive:!0,once:a}),(l?(s.method||"toggle")==="toggle":s.type!=="once")&&(e.addEventListener("mouseleave",f,{passive:!0}),c&&e.addEventListener("focusout",d,{once:a}))}function pn(e){C(oe,e)}const Oe={add:mn,remove:pn},ce=new WeakMap;function gn(e,t,n,s=!1,r){const i=X(e,x(t),void 0,s);if(!i)return null;let o=!0;const c=n.type||"alternate";return f=>{r&&!e.matches(r)||(c==="alternate"?o?(o=!1,i.play()):i.reverse():c==="state"?o?(o=!1,i.play()):i.playState==="running"?i.pause():i.playState!=="finished"&&i.play():(i.progress(0),i.isCSS&&i.onFinish(()=>{S.mutate(()=>{e.dataset.interactEnter="done"})}),i.play()))}}function vn(e,t,{effectId:n,listContainer:s,listItemSelector:r},i,o){const c=!!s;return f=>{if(o&&!e.matches(o))return;let l;c&&(l=e.closest(`${s} > ${r||""}:has(:scope)`)),t.toggleEffect(n,i.method||"toggle",l)}}function yn(e,t,n,s={},{reducedMotion:r,targetController:i,selectorCondition:o,allowA11yTriggers:c}){let f,l=!1;if(n.transition||n.transitionProperties?f=vn(t,i,n,s,o):(f=gn(t,n,s,r,o),l=s.type==="once"),!f)return;const a=h=>{h.pointerType&&f(h)},u=h=>{h.code==="Space"?(h.preventDefault(),f(h)):h.code==="Enter"&&f(h)},g={source:e,target:t,cleanup:()=>{e.removeEventListener("click",a),c&&e.removeEventListener("keydown",u)}};I(ce,e,g),I(ce,t,g),e.addEventListener("click",a,{passive:!0,once:l}),c&&(e.tabIndex=0,e.addEventListener("keydown",u,{once:l}))}function wn(e){C(ce,e)}const _e={add:yn,remove:wn};function ke(e,t,n){return Math.min(Math.max(e,n),t)}function Te(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function En(e){let t=e,n=0,s=0;if(t.offsetParent)do n+=t.offsetLeft,s+=t.offsetTop,t=t.offsetParent;while(t);return{left:n,top:s,width:e.offsetWidth,height:e.offsetHeight}}function bn(){const e=window.devicePixelRatio;let t=!1;if(e===1)return!1;document.body.addEventListener("pointerdown",s=>{t=s.offsetX!==10},{once:!0});const n=new PointerEvent("pointerdown",{clientX:10});return document.body.dispatchEvent(n),t}function Sn(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function r(){document.body.addEventListener("pointerdown",c=>{s===void 0?s=c.offsetY:n=c.offsetY===s},{once:!0});const o=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(o)}function i(){window.scrollY!==t&&(window.removeEventListener("scroll",i),r(),e(n))}r(),window.addEventListener("scroll",i),window.scrollY>0&&window.scrollBy(0,-1)})}function In(e){Sn().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let H=0;const j=new Set;function On(){const e=n=>{for(let s of n.changedTouches)j.add(s.identifier)},t=n=>{for(let s of n.changedTouches)j.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){j.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function _n(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;H||(s=On()),H+=1;function r(i){clearTimeout(n),n=setTimeout(()=>{j.size?setTimeout(r,100):(t(i),n=0)},100)}return e.addEventListener("scroll",r),function(){e.removeEventListener("scroll",r),H-=1,H||s()}}function kn(e,t,n){return{x(s){const r=e.left-n.x+e.width/2,i=r>=t.width/2,o=(i?r:t.width-r)*2,c=i?0:r-o/2;return(s-c)/o},y(s){const r=e.top-n.y+e.height/2,i=r>=t.height/2,o=(i?r:t.height-r)*2,c=i?0:r-o/2;return(s-c)/o}}}function Tn(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function xn(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function Cn(e){const t=new ResizeObserver(n=>{n.forEach(s=>{e.rect.width=s.borderBoxSize[0].inlineSize,e.rect.height=s.borderBoxSize[0].blockSize})});return t.observe(e.root,{box:"border-box"}),t}function Ln(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,r,i,o,c;const f={x:0,y:0};e.scenes.forEach(a=>{a.target&&a.centeredToTarget&&(a.transform=kn(En(a.target),e.rect,f),t=!0),e.root?r=Cn(e):(i=xn.bind(null,e),window.addEventListener("resize",i))}),s=function(a){for(let u of e.scenes)if(!u.disabled){const d=u.transform?.x(a.x)||a.x/e.rect.width,g=u.transform?.y(a.y)||a.y/e.rect.height,h=+ke(0,1,d).toPrecision(4),m=+ke(0,1,g).toPrecision(4),p={x:a.vx,y:a.vy};e.allowActiveEvent&&(a.active=d<=1&&g<=1&&d>=0&&g>=0),u.effect(u,{x:h,y:m},p,a.active)}Object.assign(n,a)},t&&(o=Tn.bind(f,s,n),c=_n(document,o));function l(){e.scenes.forEach(a=>a.destroy?.()),c?.(),r?(r.disconnect(),r=null):(window.removeEventListener("resize",i),i=null),s=null,n=null}return{tick:s,destroy:l}}const An=1e3/60*3;let q;function Pn(){k.x=window.scrollX,k.y=window.scrollY}const k={x:0,y:0,scrollHandler:Pn,fixRequired:void 0};class $n{constructor(t={}){this.config={...t},this.effect=null,this._nextTick=null,this._nextTransitionTick=null,this._startTime=0;let n;this.config.transitionDuration?n=this.config.noThrottle?()=>this.transition():Te(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):Te(()=>{this.tick()}),this.config.rect=this.config.root?{width:this.config.root.offsetWidth,height:this.config.root.offsetHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight},this.progress={x:this.config.rect.width/2,y:this.config.rect.height/2,vx:0,vy:0},this.previousProgress={...this.progress},this.currentProgress=null;const s=r=>{const i=this.config.root?r.offsetX:r.x,o=this.config.root?r.offsetY:r.y;this.progress.vx=i-this.progress.x,this.progress.vy=o-this.progress.y,this.progress.x=i,this.progress.y=o,this._nextTick=n()};if(this._pointerLeave=()=>{this.progress.active=!1,this.progress.vx=0,this.progress.vy=0,this._nextTick=n()},this._pointerEnter=()=>{this.progress.active=!0,this._nextTick=n()},this.config.root){q=typeof q=="boolean"?q:bn();const r=q?window.devicePixelRatio:1;typeof k.fixRequired>"u"&&In(k),this._measure=i=>{if(i.target!==this.config.root){const o=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:i.x*r+k.x,clientY:i.y*r+k.y});i.stopPropagation(),this.config.root.dispatchEvent(o)}else s(i)}}else this._measure=s}start(){this.setupEffect(),this.setupEvent()}pause(){this.removeEvent()}tick(){this.effect.tick(this.progress)}transition(){const t=this.config.transitionDuration,n=this.config.transitionEasing||(o=>o),s=performance.now();let r=!1;const i=o=>{const c=(o-this._startTime)/t,f=n(Math.min(1,c));r&&(this.progress.vx=0,this.progress.vy=0,r=!1),this.currentProgress=Object.entries(this.progress).reduce((l,[a,u])=>(a==="active"?l[a]=u:l[a]=this.previousProgress[a]+(u-this.previousProgress[a])*f,l),this.currentProgress||{}),c<1&&(this._nextTransitionTick=requestAnimationFrame(i),r=o-this._startTime>An),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,i(s)):this._startTime=s,this._nextTransitionTick}destroy(){this.pause(),this.removeEffect(),this._nextTick&&cancelAnimationFrame(this._nextTick),this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick)}setupEvent(){this.removeEvent();const t=this.config.root||window;t.addEventListener("pointermove",this._measure,{passive:!0}),this.config.eventSource&&this.config.eventSource.addEventListener("pointermove",this._measure,{passive:!0}),this.config.allowActiveEvent&&(t.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),t.addEventListener("pointerenter",this._pointerEnter,{passive:!0}),this.config.eventSource&&(this.config.eventSource.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),this.config.eventSource.addEventListener("pointerenter",this._pointerEnter,{passive:!0})))}removeEvent(){const t=this.config.root||window;t.removeEventListener("pointermove",this._measure),this.config.eventSource&&this.config.eventSource.removeEventListener("pointermove",this._measure),this.config.allowActiveEvent&&(t.removeEventListener("pointerleave",this._pointerLeave),t.removeEventListener("pointerenter",this._pointerEnter),this.config.eventSource&&(this.config.eventSource.removeEventListener("pointerleave",this._pointerLeave),this.config.eventSource.removeEventListener("pointerenter",this._pointerEnter)))}setupEffect(){this.removeEffect(),this.effect=Ln(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const ae=new WeakMap;let Ne=()=>({});function Rn(e){Ne=e}function Mn(e,t,n,s={},{reducedMotion:r}){if(r)return;const i={trigger:"pointer-move",element:e,axis:s.axis??"y"},o=Me(t,x(n),i);if(o){const c=Array.isArray(o)?o:[o],f=new $n({root:s.hitArea==="self"?e:void 0,scenes:c,...Ne()}),a={source:e,target:t,cleanup:()=>{f.destroy()}};I(ae,e,a),I(ae,t,a),Promise.all(c.map(u=>u.ready||Promise.resolve())).then(()=>{f.start()})}}function Fn(e){C(ae,e)}const Hn={add:Mn,remove:Fn,registerOptionsGetter:Rn},fe=new WeakMap;function qn(e,t,n,s,{reducedMotion:r,selectorCondition:i}){const o=X(t,x(n),void 0,r);if(!o)return;const c=()=>{i&&!t.matches(i)||o.play()},l={source:e,target:t,cleanup:()=>{o.cancel(),e.removeEventListener("animationend",c)}};I(fe,e,l),I(fe,t,l),e.addEventListener("animationend",c)}function zn(e){C(fe,e)}const Dn={add:qn,remove:zn};function xe(e){return{add:(t,n,s,r,i)=>e.add(t,n,s,r,{...i,allowA11yTriggers:!0}),remove:e.remove}}const $={viewEnter:Ee,hover:Oe,click:_e,pageVisible:Ee,animationEnd:Dn,viewProgress:un,pointerMove:Hn,activate:xe(_e),interest:xe(Oe)};function Nn(e){return e.replace(/\[([-\w]+)]/g,"[]")}class w{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;constructor(){this.dataCache={effects:{},conditions:{},interactions:{}},this.addedInteractions={},this.mediaQueryListeners=new Map,this.listInteractionsCache={},this.controllers=new Set}init(t,n){if(typeof window>"u"||!window.customElements)return;const s=n?.useCutsomElement??!!w.defineInteractElement;this.dataCache=Wn(t,s);const r=w.defineInteractElement?.();s&&r===!1?document.querySelectorAll("interact-element").forEach(i=>{i.connect()}):w.controllerCache.forEach((i,o)=>i.connect(o))}destroy(){for(const t of this.controllers)t.disconnect();for(const[,t]of this.mediaQueryListeners.entries())t.mql.removeEventListener("change",t.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},conditions:{},interactions:{}},w.instances.splice(w.instances.indexOf(this),1)}setController(t,n){this.controllers.add(n),w.setController(t,n)}deleteController(t,n=!1){const s=w.controllerCache.get(t);this.clearInteractionStateForKey(t),this.clearMediaQueryListenersForKey(t),s&&n&&(this.controllers.delete(s),w.deleteController(t))}has(t){return!!this.get(t)}get(t){const n=Nn(t);return this.dataCache.interactions[n]}clearMediaQueryListenersForKey(t){for(const[n,s]of this.mediaQueryListeners.entries())s.key===t&&(s.mql.removeEventListener("change",s.handler),this.mediaQueryListeners.delete(n))}clearInteractionStateForKey(t){(this.get(t)?.interactionIds||[]).forEach(s=>{const r=R(s,t);delete this.addedInteractions[r]})}setupMediaQueryListener(t,n,s,r){this.mediaQueryListeners.has(t)||(n.addEventListener("change",r),this.mediaQueryListeners.set(t,{mql:n,handler:r,key:s}))}static create(t,n){const s=new w;return w.instances.push(s),s.init(t,n),s}static destroy(){w.controllerCache.forEach(t=>{t.disconnect()}),w.instances.length=0,w.controllerCache.clear()}static setup(t){t.scrollOptionsGetter&&$.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&$.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&$.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){return w.instances.find(n=>n.has(t))}static getController(t){return t?w.controllerCache.get(t):void 0}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=Tt}let Vn=0;function B(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const r=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${r} ${e.selector}`:`${e.listContainer}${r||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function Wn(e,t=!1){const n=e.conditions||{},s={};return e.interactions?.forEach(r=>{const i=r.key,o=++Vn,{effects:c,...f}=r;if(!i){console.error(`Interaction ${o} is missing a key for source element.`);return}s[i]||(s[i]={triggers:[],effects:{},interactionIds:new Set,selectors:new Set});const l=Array.from(c);l.reverse();const a={...f,effects:l};s[i].triggers.push(a),s[i].selectors.add(B(a,{useFirstChild:t}));const u=a.listContainer;l.forEach(d=>{let g=d.key;if(!g&&d.effectId){const p=e.effects[d.effectId];p&&(g=p.key)}d.effectId||(d.effectId=Ft()),g=g||i,d.key=g;const h=d.effectId;if(u&&d.listContainer&&(g!==i||d.listContainer!==u))return;const m=`${g}::${h}::${o}`;d.interactionId=m,s[i].interactionIds.add(m),g!==i&&(s[g]?s[g].effects[m]||(s[g].effects[m]=[],s[g].interactionIds.add(m)):s[g]={triggers:[],effects:{[m]:[]},interactionIds:new Set,selectors:new Set},s[g].effects[m].push({...f,effect:d}),s[g].selectors.add(B(d,{useFirstChild:t})))})}),{effects:e.effects||{},conditions:n,interactions:s}}function Ce(e,t,n){if(e.listContainer){const s=t.querySelector(e.listContainer);return s?e.selector?Array.from(s.querySelectorAll(e.selector)):Array.from(s.children):(console.warn(`Interact: No container found for list container "${e.listContainer}"`),[])}if(e.selector){const s=t.querySelectorAll(e.selector);if(s.length>0)return Array.from(s);console.warn(`Interact: No elements found for selector "${e.selector}"`)}return n?t.firstElementChild:t}function Le(e,t){return t.map(n=>e.selector?n.querySelector(e.selector):n).filter(Boolean)}function Ve(e,t,n,s,r,i,o,c){return[o?Le(e,o):Ce(e,n,s),c?Le(t,c):Ce(t,r,i)]}function We(e,t,n,s,r,i,o){const c=Array.isArray(s),f=Array.isArray(r);c?s.forEach((l,a)=>{const u=f?r[a]:r;u&&Ae(e,l,t.trigger,u,n,t.params,i,o)}):(f?r:[r]).forEach(a=>{Ae(e,s,t.trigger,a,n,t.params,i,o)})}function je(e,t,n,s,r){const i={},o=[];s.effects.forEach(c=>{const f=c.effectId,l={...n.dataCache.effects[f]||{},...c,effectId:f},a=l.key,u=R(c.interactionId,e);if(i[u]||n.addedInteractions[u]&&!r)return;const d=U(l.conditions||[],n.dataCache.conditions);if(d&&n.setupMediaQueryListener(u,d,e,()=>{t.update()}),!d||d.matches){i[u]=!0;const g=a&&R(a,e);let h;if(g){if(h=w.getController(g),!h)return;l.listContainer&&h.watchChildList(l.listContainer)}else h=t;const[m,p]=Ve(s,l,t.element,t.useFirstChild,h.element,h.useFirstChild,r);if(!m||!p)return;n.addedInteractions[u]=!0;const v=g||s.key,y=K(l.conditions||[],n.dataCache.conditions);o.push([v,s,l,m,p,y,h.useFirstChild])}}),o.reverse().forEach(c=>{We(...c)})}function Ye(e,t,n,s,r){const i=n.get(e)?.effects||{},o=Object.keys(i),c=[];return o.forEach(f=>{const l=R(f,e);if(n.addedInteractions[l]&&!r)return;i[f].some(({effect:u,...d})=>{const g=u.effectId,h={...n.dataCache.effects[g]||{},...u,effectId:g};if(s&&h.listContainer!==s)return!1;const m=U(h.conditions||[],n.dataCache.conditions);if(m&&n.setupMediaQueryListener(l,m,e,()=>{t.update()}),!m||m.matches){const p=d.key&&R(d.key,e),v=w.getController(p);if(!v)return!0;h.listContainer&&t.watchChildList(h.listContainer);const[y,E]=Ve(d,h,v.element,v.useFirstChild,t.element,t.useFirstChild,void 0,r);if(!y||!E)return!0;n.addedInteractions[l]=!0;const b=K(h.conditions||[],n.dataCache.conditions);return c.push([e,d,h,y,E,b,t.useFirstChild]),!0}return!1})}),c.reverse().forEach(f=>{We(...f)}),o.length>0}function Ae(e,t,n,s,r,i,o,c){let f;if(r.transition||r.transitionProperties){const l={key:e,effectId:r.effectId,transition:r.transition,properties:r.transitionProperties,childSelector:B(r,{asCombinator:!0,addItemFilter:!0,useFirstChild:c}),selectorCondition:o};if(f=w.getController(e),!f)return;f.renderStyle(Ht(l))}$[n]?.add(t,s,r,i,{reducedMotion:w.forceReducedMotion,targetController:f,selectorCondition:o,allowA11yTriggers:w.allowA11yTriggers})}function jn(e){const t=e.key,n=w.getInstance(t);if(!n)return console.warn(`No instance found for key: ${t}`),w.setController(t,e),!1;const{triggers:s=[]}=n?.get(t)||{},r=s.length>0;n.setController(t,e),s.forEach((o,c)=>{const f=U(o.conditions,n.dataCache.conditions);if(f){const l=`${t}::trigger::${c}`;n.setupMediaQueryListener(l,f,t,()=>{e.update()})}(!f||f.matches)&&(o.listContainer&&e.watchChildList(o.listContainer),je(t,e,n,o))});let i=!1;return n&&(i=Ye(t,e,n)),r||i}function Yn(e,t,n){const s=e.key,r=w.getInstance(s);if(r){const{triggers:i=[]}=r?.get(s)||{};i.forEach((o,c)=>{if(o.listContainer!==t)return;const f=U(o.conditions,r.dataCache.conditions);if(f){const l=`${s}::listTrigger::${t}::${c}`;r.setupMediaQueryListener(l,f,s,()=>{e.update()})}(!f||f.matches)&&je(s,e,r,o,n)}),Ye(s,e,r,t,n)}}function Kn(e,t=!1){const n=e.key,s=w.getInstance(n);if(!s)return;const r=[...s.get(n)?.selectors.values()||[]].filter(Boolean).join(",");let i;r?(i=[...e.element.querySelectorAll(r)],e.useFirstChild||i.push(e.element)):i=[e.element],Ke(i),s.deleteController(n,t)}function Ke(e){const t=Object.values($);for(const n of e)for(const s of t)s.remove(n)}const se="interactEffect";class Ge{element;key;connected;sheet;useFirstChild;_observers;constructor(t,n,s){this.element=t,this.key=n,this.connected=!1,this.sheet=null,this._observers=new WeakMap,this.useFirstChild=s?.useFirstChild??!1}connect(t){if(this.connected)return;const n=this.element.dataset.interactKey;if(t=t||this.key||n,!t){console.warn("Interact: No key provided");return}n!==t&&(n&&console.warn(`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`),this.element.dataset.interactKey=t),this.key=t,this.connected=jn(this)}disconnect({removeFromCache:t=!1}={}){if((this.key||this.element.dataset.interactKey)&&Kn(this,t),this.sheet){const s=document.adoptedStyleSheets.indexOf(this.sheet);document.adoptedStyleSheets.splice(s,1)}this._observers=new WeakMap,this.sheet=null,this.connected=!1}update(){this.disconnect(),this.connect()}renderStyle(t){if(!this.sheet)this.sheet=new CSSStyleSheet,this.sheet.replaceSync(t.join(`
|
|
8
|
-
`)),document.adoptedStyleSheets.push(this.sheet);else{let n=this.sheet.cssRules.length;for(const s of t)try{this.sheet.insertRule(s,n),n++}catch(r){console.error(r)}}}toggleEffect(t,n,s,r){if(s===null)return;if(!r&&this.element.toggleEffect){this.element.toggleEffect(t,n,s);return}const i=new Set(this.element.dataset[se]?.split(" ")||[]);n==="toggle"?i.has(t)?i.delete(t):i.add(t):n==="add"?i.add(t):n==="remove"?i.delete(t):n==="clear"&&i.clear(),(s||this.element).dataset[se]=Array.from(i).join(" ")}getActiveEffects(){const n=(this.element.dataset[se]||"").trim();return n?n.split(/\s+/):[]}watchChildList(t){const n=this.element.querySelector(t);if(n){let s=this._observers.get(n);s||(s=new MutationObserver(this._childListChangeHandler.bind(this,t)),this._observers.set(n,s),s.observe(n,{childList:!0}))}}_childListChangeHandler(t,n){const s=this.key||this.element.dataset.interactKey,r=[],i=[];n.forEach(o=>{o.removedNodes.forEach(c=>{c instanceof HTMLElement&&r.push(c)}),o.addedNodes.forEach(c=>{c instanceof HTMLElement&&i.push(c)})}),Ke(r),s&&Yn(this,t,i)}}function Gn(e,t){new Ge(e,t).connect()}function Qn(e){const t=w.getController(e);t&&t.disconnect({removeFromCache:!0})}const Bn=(e,t,n,s)=>{let i=`[data-interact-key="${e.replace(/"/g,"'")}"]`;const o=
|
|
7
|
+
} }`)}return g}function M(e,t){const n=(e||[]).filter(i=>t[i]?.type==="media"&&t[i].predicate).map(i=>t[i].predicate).join(") and ("),s=n&&`(${n})`;return s&&window.matchMedia(s)}function G(e,t){for(const n of e||[]){const s=t[n];if(s?.type==="selector"&&s.predicate)return s.predicate}}const F={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function qt(e,t){const n=e?.name??F.rangeStart.name,s=t?.name??e?.name??F.rangeEnd.name,r={name:n,offset:e?.offset||F.rangeStart.offset},i={name:s,offset:t?.offset||F.rangeEnd.offset};return{startOffset:r,endOffset:i}}function x(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:r,endOffset:i}=qt(t,n);return{id:"",startOffset:r,endOffset:i,...s}}function O(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function C(e,t){e.get(t)?.forEach(s=>{const{source:r,target:i,cleanup:o}=s;o();const c=r===t?i:r;e.get(c)?.delete(s)}),e.delete(t)}const zt={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},Dt={root:null,rootMargin:"0px",threshold:[0]},P={},Q=new WeakMap,W=new WeakSet,j=new WeakMap;let Fe={},A=null;function Nt(e){Fe=e}function He(e,t){Q.get(e)?.forEach(({source:s,handler:r})=>{s===e&&r(t)})}function we(){return A||(A=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||He(n,!1)})},Dt),A)}function qe(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(P[n])return P[n];const s=t?zt:{root:null,rootMargin:e.inset?`${e.inset} 0px ${e.inset}`:"0px",threshold:e.threshold},r=new IntersectionObserver(i=>{i.forEach(o=>{const c=o.target,f=!W.has(c);if(f&&(W.add(c),e.useSafeViewEnter&&!o.isIntersecting)){S.measure(()=>{const a=o.boundingClientRect.height,u=o.rootBounds?.height;if(!u)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&a*d>u&&S.mutate(()=>{r.unobserve(c);const h=qe(e,!0);j.set(c,h),h.observe(c)})});return}const l=e.type||"once";(o.isIntersecting||l==="alternate"&&!f)&&(He(c,o.isIntersecting),l==="once"&&(r.unobserve(o.target),W.delete(c)))})},s);return P[n]=r,r}function Vt(e,t,n,s={},{reducedMotion:r,selectorCondition:i}={}){const o={...Fe,...s},c=o.type||"once",f=U(t,x(n),void 0,r);if(!f)return;const l=qe(o);c!=="once"&&f.persist?.();let a=!0;const g={source:e,target:t,handler:h=>{i&&!t.matches(i)||(c==="once"?h&&f.play(()=>{const m=()=>{t.dataset.interactEnter="start"};f.isCSS?(S.mutate(()=>{requestAnimationFrame(m)}),f.onFinish(()=>{S.mutate(()=>{t.dataset.interactEnter="done"})})):S.mutate(m)}):c==="alternate"?a&&h?(a=!1,f.play()):a||f.reverse():c==="repeat"?h?(f.progress(0),f.play()):(f.pause(),f.progress(0)):c==="state"&&(h?f.play():f.pause()))},cleanup:()=>{(j.get(e)||l).unobserve(e),(c==="repeat"||c==="state")&&we().unobserve(e),f.cancel(),W.delete(e),j.delete(e)}};O(Q,e,g),O(Q,t,g),j.set(e,l),l.observe(e),(c==="repeat"||c==="state")&&we().observe(e)}function Wt(e){C(Q,e)}function jt(){A=null,Object.keys(P).forEach(e=>delete P[e])}const Ee={add:Vt,remove:Wt,setOptions:Nt,reset:jt};function ze(e,t){return Object.assign(Object.create(t),e)}function Yt(e,t,n,s){let r=e*(1-n)+t*n;if(s){const i=r-e;Math.abs(i)<s&&(r=e+s*Math.sign(i));const o=t-r;if(Math.abs(o)<s)return t}return r}function Kt(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function be(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Gt(e,t){const n=e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);return B(n[1],t)+B(n[6],t)}function B(e,t){return e?/^-?\d+px$/.test(e)?parseInt(e):/^-?\d+[lsd]?vh$/.test(e)?parseInt(e)*t.viewportHeight/100:/^-?\d+[lsd]?vw$/.test(e)?parseInt(e)*t.viewportWidth/100:/^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e)?Gt(e,t):parseInt(e)||0:0}function _(e,t,n){const{name:s,offset:r=0}=e,{start:i,end:o}=n,c=o-i,f=r/100;let l,a;return s==="entry"?(l=i-t,a=Math.min(t,c)):s==="entry-crossing"?(l=i-t,a=c):s==="contain"?(l=Math.min(o-t,i),a=Math.abs(t-c)):s==="exit"?(l=Math.max(i,o-t),a=Math.min(t,c)):s==="exit-crossing"?(l=i,a=c):s==="cover"&&(l=i-t,a=c+t),l+f*a|0}function ne(e,t,n,s,r){let i=0;const o={start:t,end:n};return e.forEach((c,f)=>{i+=c.offset;const l=c.sticky;if(l){if("end"in l&&e[f-1]?.element){const d=((r?c.element.offsetWidth:c.element.offsetHeight)||0)+l.end-s,g=i+d-c.offset,h=g<o.start,m=!h&&g<=n;let p=0;(h||m)&&(p=c.offset,o.end+=p),h&&(o.start+=p)}if("start"in l){const a=i-l.start,u=a<o.start,d=!u&&a<=o.end;let g=0;const h=e[f-1]?.element;if(h){if(u||d){const m=(r?h.offsetWidth:h.offsetHeight)||0,p=c.offset,v=(r?c.element.offsetWidth:c.element.offsetHeight)||0;g=m-(p+v),i+=g,o.end+=g}u&&(o.start+=g)}}}}),o}function Qt(e,t,n,s,r,i){const{start:o,end:c,duration:f}=e;let l=o,a=c,u=e.startRange,d=e.endRange,g;if(typeof f=="string"){u={name:f,offset:0},d={name:f,offset:100},l=_(u,n,t),a=_(d,n,t),g=a-l;const h=ne(i,l,a,n,s);l=h.start,a=h.end}else{if(u||o?.name){u=u||o;const h=B(u.add,r),m=_({...u,offset:0},n,t),p=_({...u,offset:100},n,t),v=ne(i,m,p,n,s);l=v.start+u.offset/100*(v.end-v.start)+h}if(d||c?.name){d=d||c;const h=B(d.add,r),m=_({...d,offset:0},n,t),p=_({...d,offset:100},n,t),v=ne(i,m,p,n,s);a=v.start+d.offset/100*(v.end-v.start)+h}else typeof f=="number"&&(a=l+f)}return!g&&!f&&(g=a-l),{...e,start:l,end:a,startRange:u,endRange:d,duration:g||f}}function Bt(e){return e.position==="sticky"}function Xt(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Ut(e,t){return parseInt(t?e.left:e.top)}function Jt(e,t){return parseInt(t?e.right:e.bottom)}function Zt(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function en(e,t){let n;const s=Ut(e,t),r=Jt(e,t),i=!isNaN(s),o=!isNaN(r);return(i||o)&&(n={},i&&(n.start=s),o&&(n.end=r)),n}function H(e,t,n,s,r){const i=e[0].viewSource,o=[];let c=(s?i.offsetWidth:i.offsetHeight)||0,f=0,l=i;for(;l;){const u=window.getComputedStyle(l),d=Bt(u),g=d?en(u,s):void 0,h=Zt(l,s,d);if((!g||!("end"in g))&&(f+=h),o.push({element:l,offset:h,sticky:g}),l=l.offsetParent,Xt(u,l,t))break;if(l===t){o.push({element:l,offset:0});break}}return o.reverse(),e.map(u=>({...Qt(u,{start:f,end:f+c},n,s,r,o)}))}const Se=100,tn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function nn(e,t,n,s){let r=0;return e>=t&&e<=n?r=s?(e-t)/s:1:e>n&&(r=1),r}function Ie(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function sn(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function rn(e){const t=ze(e,tn),n=t.root,s=t.horizontal,r=new WeakMap;let i=Ie(n,s),o,c,f,l,a;const u=[],d=sn();if(t.scenes=Object.values(e.scenes.reduce((m,p,v)=>{const y=p.groupId?`group-${p.groupId}`:String(v);return m[y]?m[y].push(p):m[y]=[p],m},{})).flatMap(m=>(m.every(p=>p.viewSource&&(typeof p.duration=="string"||p.start?.name))?(m=H(m,n,i,s,d),(t.observeSourcesResize||t.observeContentResize)&&u.push(m)):m.forEach(p=>{p.end==null&&(p.end=p.start+p.duration),p.duration==null&&(p.duration=p.end-p.start)}),m)),t.scenes.forEach((m,p)=>{m.index=p}),u.length){const m=new Map;window.ResizeObserver&&(f=new window.ResizeObserver(function(p){p.forEach(v=>{const y=m.get(v.target),E=H(y,n,i,s,d);E.forEach((b,I)=>{t.scenes[b.index]=E[I]}),u.splice(u.indexOf(y),1,E)})}),u.forEach(p=>{f.observe(p[0].viewSource,{box:"border-box"}),m.set(p[0].viewSource,p)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(be(()=>{const v=u.map(y=>{const E=H(y,n,i,s,d);return E.forEach((b,I)=>{t.scenes[b.index]=E[I]}),E});u.length=0,u.push(...v),u.forEach(y=>{m.set(y[0].viewSource,y)})},Se)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(l=be(function(){i=Ie(n,s);const p=u.map(v=>{const y=H(v,n,i,s,d);return y.forEach((E,b)=>{t.scenes[E.index]=y[b]}),y});u.length=0,u.push(...p),u.forEach(v=>{m.set(v[0].viewSource,v)})},Se),n===window?window.addEventListener("resize",l):window.ResizeObserver&&(a=new window.ResizeObserver(l),a.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(c=new window.IntersectionObserver(function(m){m.forEach(p=>{(r.get(p.target)||[]).forEach(v=>{v.disabled=!p.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(m=>{if(m.viewSource){let p=r.get(m.viewSource);p||(p=[],r.set(m.viewSource,p),c.observe(m.viewSource)),p.push(m)}}));function g({p:m,vp:p}){m=+m.toFixed(1);const v=+p.toFixed(4);if(m!==o){for(let y of t.scenes)if(!y.disabled){const{start:E,end:b,duration:I}=y,L=nn(m,E,b,I);y.effect(y,L,v)}o=m}}function h(){t.scenes.forEach(m=>m.destroy?.()),c&&(c.disconnect(),c=null),f&&(f.disconnect(),f=null),l&&(a?(a.disconnect(),a=null):window.removeEventListener("resize",l))}return{tick:g,destroy:h}}const on={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class cn{constructor(t={}){this.config=ze(t,on),this.progress={p:0,prevP:0,vp:0},this.currentProgress={p:0,prevP:0,vp:0},this._lerpFrameId=0,this.effect=null;const n=!this.config.root||this.config.root===window.document.body;this.config.root=n?window:this.config.root,this.config.contentRoot=this.config.contentRoot||(n?window.document.body:this.config.root.firstElementChild),this.config.resetProgress=this.config.resetProgress||this.resetProgress.bind(this),this._measure=this.config.measure||(()=>{const s=this.config.root;this.progress.p=this.config.horizontal?s.scrollX||s.scrollLeft||0:s.scrollY||s.scrollTop||0}),this._trigger=Kt(()=>{this._measure?.(),this.tick(!0)})}start(){this.setupEffect(),this.setupEvent(),this.resetProgress(),this.tick()}pause(){this.removeEvent()}resetProgress(t={}){const n=this.config.root,s=t.x||t.x===0?t.x:n.scrollX||n.scrollLeft||0,r=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,i=this.config.horizontal?s:r;this.progress.p=i,this.progress.prevP=i,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=i,this.currentProgress.prevP=i,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,r)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const r=s.p-s.prevP,i=r<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(r))/this.config.velocityMax*i}this.effect.tick(s),n&&s.p!==this.progress.p&&(t&&this._lerpFrameId&&window.cancelAnimationFrame(this._lerpFrameId),this._lerpFrameId=window.requestAnimationFrame(()=>this.tick())),s.prevP=s.p}lerp(){this.currentProgress.p=Yt(this.currentProgress.p,this.progress.p,+(1-this.config.transitionFriction).toFixed(3),this.config.transitionEpsilon)}destroy(){this.pause(),this.removeEffect()}setupEvent(){this.removeEvent(),this.config.root.addEventListener("scroll",this._trigger)}removeEvent(){this.config.root.removeEventListener("scroll",this._trigger)}setupEffect(){this.removeEffect(),this.effect=rn(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const re=new WeakMap;let De=()=>({});function an(e){De=e}function fn(e,t,n,s,{reducedMotion:r}){if(r)return;const i={trigger:"view-progress",element:e},o=x(n);let c;if("ViewTimeline"in window){const l=ue(t,o,i);l&&(l.play(),c=()=>{l.ready.then(()=>{l.cancel()})})}else{const l=Me(t,o,i);if(l){const a=Array.isArray(l)?l:[l],u=new cn({viewSource:e,scenes:a,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...De()});c=()=>{u.destroy()},Promise.all(a.map(d=>d.ready||Promise.resolve())).then(()=>{u.start()})}}if(!c)return;const f={source:e,target:t,cleanup:c};O(re,e,f),O(re,t,f)}function ln(e){C(re,e)}const un={add:fn,remove:ln,registerOptionsGetter:an},oe=new WeakMap;function dn(e,t,n,s=!1,r){const i=U(e,x(t),void 0,s);if(!i)return null;const o=n.type||"alternate";let c=!0;return f=>{r&&!e.matches(r)||(f.type==="mouseenter"||f.type==="focusin"?o==="alternate"?c?(c=!1,i.play()):i.reverse():o==="state"?i.playState!=="finished"&&i.play():(i.progress(0),i.isCSS&&i.onFinish(()=>{S.mutate(()=>{e.dataset.motionEnter="done"})}),i.play()):(f.type==="mouseleave"||f.type==="focusout")&&(o==="alternate"?i.reverse():o==="repeat"?(i.cancel(),S.mutate(()=>{delete e.dataset.interactEnter})):o==="state"&&i.playState==="running"&&i.pause()))}}function hn(e,t,{effectId:n,listContainer:s,listItemSelector:r},i,o){const c=i.method||"toggle",f=c==="toggle",l=!!s;return a=>{if(o&&!e.matches(o))return;let u;if(l&&(u=e.closest(`${s} > ${r||""}:has(:scope)`)),a.type==="mouseenter"||a.type==="focusin"){const d=f?"add":c;t.toggleEffect(n,d,u)}else(a.type==="mouseleave"||a.type==="focusout")&&f&&t.toggleEffect(n,"remove",u)}}function mn(e,t,n,s={},{reducedMotion:r,targetController:i,selectorCondition:o,allowA11yTriggers:c}){let f,l=!1,a=!1;if(n.transition||n.transitionProperties?(f=hn(t,i,n,s,o),l=!0):(f=dn(t,n,s,r,o),a=s.type==="once"),!f)return;const u=p=>{e.contains(p.relatedTarget)||f(p)},d=p=>{e.contains(p.relatedTarget)||f(p)},h={source:e,target:t,cleanup:()=>{e.removeEventListener("mouseenter",f),e.removeEventListener("mouseleave",f),c&&(e.removeEventListener("focusin",u),e.removeEventListener("focusout",d))}};O(oe,e,h),O(oe,t,h),c&&(e.tabIndex=0,e.addEventListener("focusin",u,{once:a})),e.addEventListener("mouseenter",f,{passive:!0,once:a}),(l?(s.method||"toggle")==="toggle":s.type!=="once")&&(e.addEventListener("mouseleave",f,{passive:!0}),c&&e.addEventListener("focusout",d,{once:a}))}function pn(e){C(oe,e)}const Oe={add:mn,remove:pn},ce=new WeakMap;function gn(e,t,n,s=!1,r){const i=U(e,x(t),void 0,s);if(!i)return null;let o=!0;const c=n.type||"alternate";return f=>{r&&!e.matches(r)||(c==="alternate"?o?(o=!1,i.play()):i.reverse():c==="state"?o?(o=!1,i.play()):i.playState==="running"?i.pause():i.playState!=="finished"&&i.play():(i.progress(0),i.isCSS&&i.onFinish(()=>{S.mutate(()=>{e.dataset.interactEnter="done"})}),i.play()))}}function vn(e,t,{effectId:n,listContainer:s,listItemSelector:r},i,o){const c=!!s;return f=>{if(o&&!e.matches(o))return;let l;c&&(l=e.closest(`${s} > ${r||""}:has(:scope)`)),t.toggleEffect(n,i.method||"toggle",l)}}function yn(e,t,n,s={},{reducedMotion:r,targetController:i,selectorCondition:o,allowA11yTriggers:c}){let f,l=!1;if(n.transition||n.transitionProperties?f=vn(t,i,n,s,o):(f=gn(t,n,s,r,o),l=s.type==="once"),!f)return;const a=h=>{h.pointerType&&f(h)},u=h=>{h.code==="Space"?(h.preventDefault(),f(h)):h.code==="Enter"&&f(h)},g={source:e,target:t,cleanup:()=>{e.removeEventListener("click",a),c&&e.removeEventListener("keydown",u)}};O(ce,e,g),O(ce,t,g),e.addEventListener("click",a,{passive:!0,once:l}),c&&(e.tabIndex=0,e.addEventListener("keydown",u,{once:l}))}function wn(e){C(ce,e)}const _e={add:yn,remove:wn};function ke(e,t,n){return Math.min(Math.max(e,n),t)}function Te(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function En(e){let t=e,n=0,s=0;if(t.offsetParent)do n+=t.offsetLeft,s+=t.offsetTop,t=t.offsetParent;while(t);return{left:n,top:s,width:e.offsetWidth,height:e.offsetHeight}}function bn(){const e=window.devicePixelRatio;let t=!1;if(e===1)return!1;document.body.addEventListener("pointerdown",s=>{t=s.offsetX!==10},{once:!0});const n=new PointerEvent("pointerdown",{clientX:10});return document.body.dispatchEvent(n),t}function Sn(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function r(){document.body.addEventListener("pointerdown",c=>{s===void 0?s=c.offsetY:n=c.offsetY===s},{once:!0});const o=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(o)}function i(){window.scrollY!==t&&(window.removeEventListener("scroll",i),r(),e(n))}r(),window.addEventListener("scroll",i),window.scrollY>0&&window.scrollBy(0,-1)})}function In(e){Sn().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let q=0;const Y=new Set;function On(){const e=n=>{for(let s of n.changedTouches)Y.add(s.identifier)},t=n=>{for(let s of n.changedTouches)Y.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){Y.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function _n(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;q||(s=On()),q+=1;function r(i){clearTimeout(n),n=setTimeout(()=>{Y.size?setTimeout(r,100):(t(i),n=0)},100)}return e.addEventListener("scroll",r),function(){e.removeEventListener("scroll",r),q-=1,q||s()}}function kn(e,t,n){return{x(s){const r=e.left-n.x+e.width/2,i=r>=t.width/2,o=(i?r:t.width-r)*2,c=i?0:r-o/2;return(s-c)/o},y(s){const r=e.top-n.y+e.height/2,i=r>=t.height/2,o=(i?r:t.height-r)*2,c=i?0:r-o/2;return(s-c)/o}}}function Tn(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function xn(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function Cn(e){const t=new ResizeObserver(n=>{n.forEach(s=>{e.rect.width=s.borderBoxSize[0].inlineSize,e.rect.height=s.borderBoxSize[0].blockSize})});return t.observe(e.root,{box:"border-box"}),t}function Ln(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,r,i,o,c;const f={x:0,y:0};e.scenes.forEach(a=>{a.target&&a.centeredToTarget&&(a.transform=kn(En(a.target),e.rect,f),t=!0),e.root?r=Cn(e):(i=xn.bind(null,e),window.addEventListener("resize",i))}),s=function(a){for(let u of e.scenes)if(!u.disabled){const d=u.transform?.x(a.x)||a.x/e.rect.width,g=u.transform?.y(a.y)||a.y/e.rect.height,h=+ke(0,1,d).toPrecision(4),m=+ke(0,1,g).toPrecision(4),p={x:a.vx,y:a.vy};e.allowActiveEvent&&(a.active=d<=1&&g<=1&&d>=0&&g>=0),u.effect(u,{x:h,y:m},p,a.active)}Object.assign(n,a)},t&&(o=Tn.bind(f,s,n),c=_n(document,o));function l(){e.scenes.forEach(a=>a.destroy?.()),c?.(),r?(r.disconnect(),r=null):(window.removeEventListener("resize",i),i=null),s=null,n=null}return{tick:s,destroy:l}}const An=1e3/60*3;let z;function Pn(){k.x=window.scrollX,k.y=window.scrollY}const k={x:0,y:0,scrollHandler:Pn,fixRequired:void 0};class $n{constructor(t={}){this.config={...t},this.effect=null,this._nextTick=null,this._nextTransitionTick=null,this._startTime=0;let n;this.config.transitionDuration?n=this.config.noThrottle?()=>this.transition():Te(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):Te(()=>{this.tick()}),this.config.rect=this.config.root?{width:this.config.root.offsetWidth,height:this.config.root.offsetHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight},this.progress={x:this.config.rect.width/2,y:this.config.rect.height/2,vx:0,vy:0},this.previousProgress={...this.progress},this.currentProgress=null;const s=r=>{const i=this.config.root?r.offsetX:r.x,o=this.config.root?r.offsetY:r.y;this.progress.vx=i-this.progress.x,this.progress.vy=o-this.progress.y,this.progress.x=i,this.progress.y=o,this._nextTick=n()};if(this._pointerLeave=()=>{this.progress.active=!1,this.progress.vx=0,this.progress.vy=0,this._nextTick=n()},this._pointerEnter=()=>{this.progress.active=!0,this._nextTick=n()},this.config.root){z=typeof z=="boolean"?z:bn();const r=z?window.devicePixelRatio:1;typeof k.fixRequired>"u"&&In(k),this._measure=i=>{if(i.target!==this.config.root){const o=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:i.x*r+k.x,clientY:i.y*r+k.y});i.stopPropagation(),this.config.root.dispatchEvent(o)}else s(i)}}else this._measure=s}start(){this.setupEffect(),this.setupEvent()}pause(){this.removeEvent()}tick(){this.effect.tick(this.progress)}transition(){const t=this.config.transitionDuration,n=this.config.transitionEasing||(o=>o),s=performance.now();let r=!1;const i=o=>{const c=(o-this._startTime)/t,f=n(Math.min(1,c));r&&(this.progress.vx=0,this.progress.vy=0,r=!1),this.currentProgress=Object.entries(this.progress).reduce((l,[a,u])=>(a==="active"?l[a]=u:l[a]=this.previousProgress[a]+(u-this.previousProgress[a])*f,l),this.currentProgress||{}),c<1&&(this._nextTransitionTick=requestAnimationFrame(i),r=o-this._startTime>An),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,i(s)):this._startTime=s,this._nextTransitionTick}destroy(){this.pause(),this.removeEffect(),this._nextTick&&cancelAnimationFrame(this._nextTick),this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick)}setupEvent(){this.removeEvent();const t=this.config.root||window;t.addEventListener("pointermove",this._measure,{passive:!0}),this.config.eventSource&&this.config.eventSource.addEventListener("pointermove",this._measure,{passive:!0}),this.config.allowActiveEvent&&(t.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),t.addEventListener("pointerenter",this._pointerEnter,{passive:!0}),this.config.eventSource&&(this.config.eventSource.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),this.config.eventSource.addEventListener("pointerenter",this._pointerEnter,{passive:!0})))}removeEvent(){const t=this.config.root||window;t.removeEventListener("pointermove",this._measure),this.config.eventSource&&this.config.eventSource.removeEventListener("pointermove",this._measure),this.config.allowActiveEvent&&(t.removeEventListener("pointerleave",this._pointerLeave),t.removeEventListener("pointerenter",this._pointerEnter),this.config.eventSource&&(this.config.eventSource.removeEventListener("pointerleave",this._pointerLeave),this.config.eventSource.removeEventListener("pointerenter",this._pointerEnter)))}setupEffect(){this.removeEffect(),this.effect=Ln(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const ae=new WeakMap;let Ne=()=>({});function Rn(e){Ne=e}function Mn(e,t,n,s={},{reducedMotion:r}){if(r)return;const i={trigger:"pointer-move",element:e,axis:s.axis??"y"},o=Me(t,x(n),i);if(o){const c=Array.isArray(o)?o:[o],f=new $n({root:s.hitArea==="self"?e:void 0,scenes:c,...Ne()}),a={source:e,target:t,cleanup:()=>{f.destroy()}};O(ae,e,a),O(ae,t,a),Promise.all(c.map(u=>u.ready||Promise.resolve())).then(()=>{f.start()})}}function Fn(e){C(ae,e)}const Hn={add:Mn,remove:Fn,registerOptionsGetter:Rn},fe=new WeakMap;function qn(e,t,n,s,{reducedMotion:r,selectorCondition:i}){const o=U(t,x(n),void 0,r);if(!o)return;const c=()=>{i&&!t.matches(i)||o.play()},l={source:e,target:t,cleanup:()=>{o.cancel(),e.removeEventListener("animationend",c)}};O(fe,e,l),O(fe,t,l),e.addEventListener("animationend",c)}function zn(e){C(fe,e)}const Dn={add:qn,remove:zn};function xe(e){return{add:(t,n,s,r,i)=>e.add(t,n,s,r,{...i,allowA11yTriggers:!0}),remove:e.remove}}const $={viewEnter:Ee,hover:Oe,click:_e,pageVisible:Ee,animationEnd:Dn,viewProgress:un,pointerMove:Hn,activate:xe(_e),interest:xe(Oe)};function Nn(e){return e.replace(/\[([-\w]+)]/g,"[]")}class w{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;constructor(){this.dataCache={effects:{},conditions:{},interactions:{}},this.addedInteractions={},this.mediaQueryListeners=new Map,this.listInteractionsCache={},this.controllers=new Set}init(t,n){if(typeof window>"u"||!window.customElements)return;const s=n?.useCutsomElement??!!w.defineInteractElement;this.dataCache=Wn(t,s);const r=w.defineInteractElement?.();s&&r===!1?document.querySelectorAll("interact-element").forEach(i=>{i.connect()}):w.controllerCache.forEach((i,o)=>i.connect(o))}destroy(){for(const t of this.controllers)t.disconnect();for(const[,t]of this.mediaQueryListeners.entries())t.mql.removeEventListener("change",t.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},conditions:{},interactions:{}},w.instances.splice(w.instances.indexOf(this),1)}setController(t,n){this.controllers.add(n),w.setController(t,n)}deleteController(t,n=!1){const s=w.controllerCache.get(t);this.clearInteractionStateForKey(t),this.clearMediaQueryListenersForKey(t),s&&n&&(this.controllers.delete(s),w.deleteController(t))}has(t){return!!this.get(t)}get(t){const n=Nn(t);return this.dataCache.interactions[n]}clearMediaQueryListenersForKey(t){for(const[n,s]of this.mediaQueryListeners.entries())s.key===t&&(s.mql.removeEventListener("change",s.handler),this.mediaQueryListeners.delete(n))}clearInteractionStateForKey(t){(this.get(t)?.interactionIds||[]).forEach(s=>{const r=R(s,t);delete this.addedInteractions[r]})}setupMediaQueryListener(t,n,s,r){this.mediaQueryListeners.has(t)||(n.addEventListener("change",r),this.mediaQueryListeners.set(t,{mql:n,handler:r,key:s}))}static create(t,n){const s=new w;return w.instances.push(s),s.init(t,n),s}static destroy(){w.controllerCache.forEach(t=>{t.disconnect()}),w.instances.length=0,w.controllerCache.clear()}static setup(t){t.scrollOptionsGetter&&$.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&$.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&$.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){return w.instances.find(n=>n.has(t))}static getController(t){return t?w.controllerCache.get(t):void 0}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=Tt}let Vn=0;function X(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const r=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${r} ${e.selector}`:`${e.listContainer}${r||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function Wn(e,t=!1){const n=e.conditions||{},s={};return e.interactions?.forEach(r=>{const i=r.key,o=++Vn,{effects:c,...f}=r;if(!i){console.error(`Interaction ${o} is missing a key for source element.`);return}s[i]||(s[i]={triggers:[],effects:{},interactionIds:new Set,selectors:new Set});const l=Array.from(c);l.reverse();const a={...f,effects:l};s[i].triggers.push(a),s[i].selectors.add(X(a,{useFirstChild:t}));const u=a.listContainer;l.forEach(d=>{let g=d.key;if(!g&&d.effectId){const p=e.effects[d.effectId];p&&(g=p.key)}d.effectId||(d.effectId=Ft()),g=g||i,d.key=g;const h=d.effectId;if(u&&d.listContainer&&(g!==i||d.listContainer!==u))return;const m=`${g}::${h}::${o}`;d.interactionId=m,s[i].interactionIds.add(m),g!==i&&(s[g]?s[g].effects[m]||(s[g].effects[m]=[],s[g].interactionIds.add(m)):s[g]={triggers:[],effects:{[m]:[]},interactionIds:new Set,selectors:new Set},s[g].effects[m].push({...f,effect:d}),s[g].selectors.add(X(d,{useFirstChild:t})))})}),{effects:e.effects||{},conditions:n,interactions:s}}function Ce(e,t,n){if(e.listContainer){const s=t.querySelector(e.listContainer);return s?e.selector?Array.from(s.querySelectorAll(e.selector)):Array.from(s.children):(console.warn(`Interact: No container found for list container "${e.listContainer}"`),[])}if(e.selector){const s=t.querySelectorAll(e.selector);if(s.length>0)return Array.from(s);console.warn(`Interact: No elements found for selector "${e.selector}"`)}return n?t.firstElementChild:t}function Le(e,t){return t.map(n=>e.selector?n.querySelector(e.selector):n).filter(Boolean)}function Ve(e,t,n,s,r,i,o,c){return[o?Le(e,o):Ce(e,n,s),c?Le(t,c):Ce(t,r,i)]}function We(e,t,n,s,r,i,o){const c=Array.isArray(s),f=Array.isArray(r);c?s.forEach((l,a)=>{const u=f?r[a]:r;u&&Ae(e,l,t.trigger,u,n,t.params,i,o)}):(f?r:[r]).forEach(a=>{Ae(e,s,t.trigger,a,n,t.params,i,o)})}function je(e,t,n,s,r){const i={},o=[];s.effects.forEach(c=>{const f=c.effectId,l={...n.dataCache.effects[f]||{},...c,effectId:f},a=l.key,u=R(c.interactionId,e);if(i[u]||n.addedInteractions[u]&&!r)return;const d=M(l.conditions||[],n.dataCache.conditions);if(d&&n.setupMediaQueryListener(u,d,e,()=>{t.update()}),!d||d.matches){i[u]=!0;const g=a&&R(a,e);let h;if(g){if(h=w.getController(g),!h)return;l.listContainer&&h.watchChildList(l.listContainer)}else h=t;const[m,p]=Ve(s,l,t.element,t.useFirstChild,h.element,h.useFirstChild,r);if(!m||!p)return;n.addedInteractions[u]=!0;const v=g||s.key,y=G(l.conditions||[],n.dataCache.conditions);o.push([v,s,l,m,p,y,h.useFirstChild])}}),o.reverse().forEach(c=>{We(...c)})}function Ye(e,t,n,s,r){const i=n.get(e)?.effects||{},o=Object.keys(i),c=[];return o.forEach(f=>{const l=R(f,e);if(n.addedInteractions[l]&&!r)return;i[f].some(({effect:u,...d})=>{const g=M(d.conditions||[],n.dataCache.conditions);if(g&&!g.matches)return!1;const h=u.effectId,m={...n.dataCache.effects[h]||{},...u,effectId:h};if(s&&m.listContainer!==s)return!1;const p=M(m.conditions||[],n.dataCache.conditions);if(p&&n.setupMediaQueryListener(l,p,e,()=>{t.update()}),!p||p.matches){const v=d.key&&R(d.key,e),y=w.getController(v);if(!y)return!0;m.listContainer&&t.watchChildList(m.listContainer);const[E,b]=Ve(d,m,y.element,y.useFirstChild,t.element,t.useFirstChild,void 0,r);if(!E||!b)return!0;n.addedInteractions[l]=!0;const I=G(m.conditions||[],n.dataCache.conditions);return c.push([e,d,m,E,b,I,t.useFirstChild]),!0}return!1})}),c.reverse().forEach(f=>{We(...f)}),o.length>0}function Ae(e,t,n,s,r,i,o,c){let f;if(r.transition||r.transitionProperties){const l={key:e,effectId:r.effectId,transition:r.transition,properties:r.transitionProperties,childSelector:X(r,{asCombinator:!0,addItemFilter:!0,useFirstChild:c}),selectorCondition:o};if(f=w.getController(e),!f)return;f.renderStyle(Ht(l))}$[n]?.add(t,s,r,i,{reducedMotion:w.forceReducedMotion,targetController:f,selectorCondition:o,allowA11yTriggers:w.allowA11yTriggers})}function jn(e){const t=e.key,n=w.getInstance(t);if(!n)return console.warn(`No instance found for key: ${t}`),w.setController(t,e),!1;const{triggers:s=[]}=n?.get(t)||{},r=s.length>0;n.setController(t,e),s.forEach((o,c)=>{const f=M(o.conditions,n.dataCache.conditions);if(f){const l=`${t}::trigger::${c}`;n.setupMediaQueryListener(l,f,t,()=>{e.update()})}(!f||f.matches)&&(o.listContainer&&e.watchChildList(o.listContainer),je(t,e,n,o))});let i=!1;return n&&(i=Ye(t,e,n)),r||i}function Yn(e,t,n){const s=e.key,r=w.getInstance(s);if(r){const{triggers:i=[]}=r?.get(s)||{};i.forEach((o,c)=>{if(o.listContainer!==t)return;const f=M(o.conditions,r.dataCache.conditions);if(f){const l=`${s}::listTrigger::${t}::${c}`;r.setupMediaQueryListener(l,f,s,()=>{e.update()})}(!f||f.matches)&&je(s,e,r,o,n)}),Ye(s,e,r,t,n)}}function Kn(e,t=!1){const n=e.key,s=w.getInstance(n);if(!s)return;const r=[...s.get(n)?.selectors.values()||[]].filter(Boolean).join(",");let i;r?(i=[...e.element.querySelectorAll(r)],e.useFirstChild||i.push(e.element)):i=[e.element],Ke(i),s.deleteController(n,t)}function Ke(e){const t=Object.values($);for(const n of e)for(const s of t)s.remove(n)}const se="interactEffect";class Ge{element;key;connected;sheet;useFirstChild;_observers;constructor(t,n,s){this.element=t,this.key=n,this.connected=!1,this.sheet=null,this._observers=new WeakMap,this.useFirstChild=s?.useFirstChild??!1}connect(t){if(this.connected)return;const n=this.element.dataset.interactKey;if(t=t||this.key||n,!t){console.warn("Interact: No key provided");return}n!==t&&(n&&console.warn(`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`),this.element.dataset.interactKey=t),this.key=t,this.connected=jn(this)}disconnect({removeFromCache:t=!1}={}){if((this.key||this.element.dataset.interactKey)&&Kn(this,t),this.sheet){const s=document.adoptedStyleSheets.indexOf(this.sheet);document.adoptedStyleSheets.splice(s,1)}this._observers=new WeakMap,this.sheet=null,this.connected=!1}update(){this.disconnect(),this.connect()}renderStyle(t){if(!this.sheet)this.sheet=new CSSStyleSheet,this.sheet.replaceSync(t.join(`
|
|
8
|
+
`)),document.adoptedStyleSheets.push(this.sheet);else{let n=this.sheet.cssRules.length;for(const s of t)try{this.sheet.insertRule(s,n),n++}catch(r){console.error(r)}}}toggleEffect(t,n,s,r){if(s===null)return;if(!r&&this.element.toggleEffect){this.element.toggleEffect(t,n,s);return}const i=new Set(this.element.dataset[se]?.split(" ")||[]);n==="toggle"?i.has(t)?i.delete(t):i.add(t):n==="add"?i.add(t):n==="remove"?i.delete(t):n==="clear"&&i.clear(),(s||this.element).dataset[se]=Array.from(i).join(" ")}getActiveEffects(){const n=(this.element.dataset[se]||"").trim();return n?n.split(/\s+/):[]}watchChildList(t){const n=this.element.querySelector(t);if(n){let s=this._observers.get(n);s||(s=new MutationObserver(this._childListChangeHandler.bind(this,t)),this._observers.set(n,s),s.observe(n,{childList:!0}))}}_childListChangeHandler(t,n){const s=this.key||this.element.dataset.interactKey,r=[],i=[];n.forEach(o=>{o.removedNodes.forEach(c=>{c instanceof HTMLElement&&r.push(c)}),o.addedNodes.forEach(c=>{c instanceof HTMLElement&&i.push(c)})}),Ke(r),s&&Yn(this,t,i)}}function Gn(e,t){new Ge(e,t).connect()}function Qn(e){const t=w.getController(e);t&&t.disconnect({removeFromCache:!0})}const Bn=(e,t,n,s)=>{let i=`[data-interact-key="${e.replace(/"/g,"'")}"]`;const o=X(t,{asCombinator:!0,useFirstChild:s});return o&&(i=`${i} ${o}`),n&&(i=V(i,n)),i};function Xn(e,t=!1){const n=[],s=new Set;return e.interactions.forEach(({key:r,selector:i,listContainer:o,listItemSelector:c,trigger:f,params:l,effects:a,conditions:u})=>{if(f==="viewEnter"){const g=l;(!g?.type||g.type==="once")&&a.forEach(m=>{const p=m?.effectId&&e.effects[m.effectId]||m,{key:v,selector:y,listContainer:E,listItemSelector:b,conditions:I}=p;if(!(!v||v===r)||!(!y&&!i||y===i)||!(!E&&!o||E===o)||!(!b&&!c||b===c))return;const de=e.conditions||{},he=G(I,de),Z=G(u,de);if(!(!he&&!Z||he===Z))return;const ee=Bn(r,p,Z,t);s.has(ee)||(s.add(ee),n.push(`@media (prefers-reduced-motion: no-preference) {
|
|
9
9
|
${ee}:not([data-interact-enter]) {
|
|
10
10
|
visibility: hidden;
|
|
11
11
|
transform: none;
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
}
|
|
16
16
|
}`))})}}),n.join(`
|
|
17
17
|
`)}exports.Interact=w;exports.InteractionController=Ge;exports.add=Gn;exports.generate=Xn;exports.remove=Qn;
|
|
18
|
-
//# sourceMappingURL=index-
|
|
18
|
+
//# sourceMappingURL=index-emAFXYqb.js.map
|