@wix/interact 2.5.14 → 2.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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-CuQphuiv.mjs → index-Cv5FJznH.mjs} +5 -3
- package/dist/index-Cv5FJznH.mjs.map +1 -0
- package/dist/{index-lQ2AuGbt.js → index-DsygTJ-K.js} +2 -2
- package/dist/index-DsygTJ-K.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/handlers/viewEnter.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-CuQphuiv.mjs.map +0 -1
- package/dist/index-lQ2AuGbt.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";function qt(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function q(e,t){const n=qt(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function kt(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&ue(e)===ue(t)}function ue(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}class Q{animations;options;ready;isCSS;longestAnimation;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation,this.longestAnimation=this._getAnimationWithLongestEndTime()}_getAnimationWithLongestEndTime(){return this.animations.reduce((t,n)=>{const s=t.effect?.getComputedTiming().endTime??0,i=n.effect?.getComputedTiming().endTime??0;return s>i?t:n},this.animations[0])}getProgress(){return this.longestAnimation?.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:i,iterations:o}=n.effect.getTiming(),r=(Number.isFinite(i)?i:0)*(Number.isFinite(o)?o:1);n.currentTime=((s||0)+r)*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 i=this.options?.effectId||n.id,o=new CustomEvent("animationend",{detail:{effectId:i}});s.dispatchEvent(o)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}async onAbort(t){try{await Promise.all(this.animations.map(n=>n.finished))}catch(n){if(n.name==="AbortError"){const s=this.animations[0];if(s&&!this.isCSS){const i=s.effect?.target;if(i){const o=new Event("animationcancel");i.dispatchEvent(o)}}t()}}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations.some(t=>t.playState==="running")?"running":this.animations[0]?.playState}hasAnimationName(t){return this.animations.some(n=>n.animationName===t)}hasAnimationId(t){return this.animations.some(n=>n.id===t)}getTimingOptions(){return this.animations.map(t=>{const n=t.effect?.getTiming(),s=n?.delay??0,i=Number(n?.duration)||0,o=n?.iterations??1;return{delay:s,duration:i,iterations:o}})}}const Qe=e=>e,Mt=e=>1-Math.cos(e*Math.PI/2),Pt=e=>Math.sin(e*Math.PI/2),xt=e=>-(Math.cos(Math.PI*e)-1)/2,Lt=e=>e**2,Ft=e=>1-(1-e)**2,Rt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,Nt=e=>e**3,zt=e=>1-(1-e)**3,jt=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Dt=e=>e**4,Ht=e=>1-(1-e)**4,Gt=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Wt=e=>e**5,Vt=e=>1-(1-e)**5,Yt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Kt=e=>e===0?0:2**(10*e-10),Bt=e=>e===1?1:1-2**(-10*e),Ut=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Qt=e=>1-Math.sqrt(1-e**2),Xt=e=>Math.sqrt(1-(e-1)**2),Zt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,Jt=e=>2.70158*e**3-1.70158*e**2,en=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,tn=(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,Pe={linear:Qe,sineIn:Mt,sineOut:Pt,sineInOut:xt,quadIn:Lt,quadOut:Ft,quadInOut:Rt,cubicIn:Nt,cubicOut:zt,cubicInOut:jt,quartIn:Dt,quartOut:Ht,quartInOut:Gt,quintIn:Wt,quintOut:Vt,quintInOut:Yt,expoIn:Kt,expoOut:Bt,expoInOut:Ut,circIn:Qt,circOut:Xt,circInOut:Zt,backIn:Jt,backOut:en,backInOut:tn},G=(e,t,n,s,i)=>{const o=3*t,r=3*(s-2*t),a=1-3*s+3*t,c=3*n,f=3*(i-2*n),u=1-3*i+3*n;let l;if(a===0)l=r===0?`(${e} / ${o})`:`((sqrt(max(0, ${o*o} + ${4*r} * ${e})) - ${o}) / ${2*r})`;else{const d=r/(3*a),m=2*Math.pow(r,3)-9*o*r*a,h=54*Math.pow(a,3),p=(3*a*o-r*r)/(9*a*a),g=`((${m} - ${27*a*a} * ${e}) / ${h})`;if(p<0){const v=2*Math.sqrt(-p);let y=0;for(const $ of[0,1,2])[0,.25,.5,.75,1].every(S=>{const I=Math.min(Math.max(2*(m-27*a*a*S)/(h*p*v),-1),1),O=v*Math.cos((Math.acos(I)-$*2*Math.PI)/3)-d;return O>=-1e-6&&O<=1.000001})&&(y=$);const E=`(acos(clamp(-1, ${2/(p*v)} * ${g}, 1)) - ${360*y}deg) / 3`;l=`(${v} * cos(${E}) - ${d})`}else{const v=`sqrt(pow(${g}, 2) + ${Math.pow(p,3)})`;l=`(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`}}return`(${u} * pow(${l}, 3) + ${f} * pow(${l}, 2) + ${c} * ${l})`},xe={linear:e=>e,ease:e=>G(e,.25,.1,.25,1),easeIn:e=>G(e,.42,0,1,1),easeOut:e=>G(e,0,0,.58,1),easeInOut:e=>G(e,.42,0,.58,1),sineIn:e=>`(1 - cos(${e} * 90deg))`,sineOut:e=>`(sin(${e} * 90deg))`,sineInOut:e=>`((1 - cos(${e} * 180deg)) / 2)`,quadIn:e=>`(${e} * ${e})`,quadOut:e=>`(1 - (1 - ${e}) * (1 - ${e}))`,quadInOut:e=>`(round(${e}) * (1 - (-2 * ${e} + 2) * (-2 * ${e} + 2) / 2) + (1 - round(${e})) * 2 * ${e} * ${e})`,cubicIn:e=>`pow(${e}, 3)`,cubicOut:e=>`(1 - pow(1 - ${e}, 3))`,cubicInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 3) / 2) + (1 - round(${e})) * 4 * pow(${e}, 3))`,quartIn:e=>`pow(${e}, 4)`,quartOut:e=>`(1 - pow(1 - ${e}, 4))`,quartInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 4) / 2) + (1 - round(${e})) * 8 * pow(${e}, 4))`,quintIn:e=>`pow(${e}, 5)`,quintOut:e=>`(1 - pow(1 - ${e}, 5))`,quintInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 5) / 2) + (1 - round(${e})) * 16 * pow(${e}, 5))`,expoIn:e=>`(pow(2, 10 * ${e} - 10) - pow(2, -10) * (1 - ${e}))`,expoOut:e=>`(1 - pow(2, -10 * ${e}) + pow(2, -10) * ${e})`,expoInOut:e=>`((round(${e}) * (2 - pow(2, -20 * ${e} + 10)) + (1 - round(${e})) * pow(2, 20 * ${e} - 10)) / 2)`,circIn:e=>`(1 - sqrt(1 - ${e} * ${e}))`,circOut:e=>`sqrt(1 - (${e} - 1) * (${e} - 1))`,circInOut:e=>`((round(${e}) * (sqrt(max(0, (3 - 2 * ${e}) * (2 * ${e} - 1))) + 1) + (1 - round(${e})) * (1 - sqrt(max(0, 1 - 4 * ${e} * ${e})))) / 2)`,backIn:e=>`(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,backOut:e=>`(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,backInOut:e=>`((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`},Le={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 nn(e){return e==="percentage"?"%":e||"px"}const sn=/^(webkit|moz|ms|o)(?=[A-Z])/,on=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function fe(e){return e.startsWith("--")?e:(sn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function rn(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xe(e){return on[e]||rn(e)}function an(e){for(const t in e)if(Object.hasOwn(e,t)&&Xe(t)!==t)return!0;return!1}function cn(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!an(n))return;t??=e.slice();const i={};for(const o in n)Object.hasOwn(n,o)&&(i[Xe(o)]=n[o]);t[s]=i}),t||e}function oe(e){return e?Le[e]||e:Le.linear}function un(e,t,n,s){const i=3*e,o=3*(n-e)-i,r=1-i-o,a=3*t,c=3*(s-t)-a,f=1-a-c,u=h=>((r*h+o)*h+i)*h,l=h=>((f*h+c)*h+a)*h,d=h=>(3*r*h+2*o)*h+i;function m(h){let p=h;for(let y=0;y<8;y++){const E=u(p)-h;if(Math.abs(E)<1e-7)return p;const $=d(p);if(Math.abs($)<1e-6)break;p-=E/$}let g=0,v=1;for(p=(g+v)/2;v-g>1e-7;){const y=u(p);if(Math.abs(y-h)<1e-7)return p;h>y?g=p:v=p,p=(g+v)/2}return p}return h=>h<=0?0:h>=1?1:l(m(h))}function Ze(e){const t=e.match(/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);if(!t)return;const n=parseFloat(t[1]),s=parseFloat(t[2]),i=parseFloat(t[3]),o=parseFloat(t[4]);if(![n,s,i,o].some(isNaN))return[n,s,i,o]}function fn(e){const t=Ze(e);if(!(!t||t.some(isNaN)))return un(...t)}function ln(e){const t=Ze(e);if(!(!t||t.some(isNaN)))return n=>G(n,...t)}function Je(e){const t=e.match(/^linear\((.+)\)$/);if(!t)return;const n=t[1].split(",").map(o=>o.trim()).filter(Boolean);if(n.length===0)return;const s=[];for(const o of n){const r=o.split(/\s+/),a=parseFloat(r[0]);if(isNaN(a))return;const c=[];for(let f=1;f<r.length;f++)if(r[f].endsWith("%")){const u=parseFloat(r[f])/100;if(isNaN(u))return;c.push(u)}c.length===0?s.push({output:a,pos:null}):c.length===1?s.push({output:a,pos:c[0]}):(s.push({output:a,pos:c[0]}),s.push({output:a,pos:c[1]}))}if(s.length===0)return;s[0].pos===null&&(s[0].pos=0),s[s.length-1].pos===null&&(s[s.length-1].pos=1);let i=0;for(;i<s.length;)if(s[i].pos===null){const o=i-1;let r=i;for(;r<s.length&&s[r].pos===null;)r++;const a=s[o].pos,c=s[r].pos,f=r-o;for(let u=o+1;u<r;u++)s[u].pos=a+(c-a)*(u-o)/f;i=r+1}else i++;for(let o=1;o<s.length;o++)s[o].pos<s[o-1].pos&&(s[o].pos=s[o-1].pos);return s}function dn(e){const t=Je(e);if(t)return n=>{if(n<=t[0].pos)return t[0].output;const s=t[t.length-1];if(n>=s.pos)return s.output;let i=0,o=t.length-1;for(;i<o-1;){const c=i+o>>>1;t[c].pos<=n?i=c:o=c}const r=t[i],a=t[o];return a.pos===r.pos?a.output:r.output+(a.output-r.output)*(n-r.pos)/(a.pos-r.pos)}}function hn(e){const t=Je(e);if(t)return n=>{const s=[`${t[0].output}`];for(let i=1;i<t.length;i++){const o=t[i].pos-t[i-1].pos,r=t[i].output-t[i-1].output;if(o===0&&t[i-1].pos===0)s.push(`${r}`);else{const a=o===0?`round(${n} / ${2*t[i-1].pos})`:`(${n} - ${t[i-1].pos}) / ${o}`;s.push(`clamp(0, ${a}, 1) * ${r}`)}}return`(${s.join(" + ")})`}}function et(e){if(!e)return;const t=Pe[e];return t||(fn(e)??dn(e)??Pe.linear)}function mn(e){if(!e)return;const t=xe[e];return t||(ln(e)??hn(e)??xe.linear)}class pn extends Q{animationGroups;delay;offset;offsetEasing;sequenceId;timingOptions;constructor(t,n={}){const s=t.flatMap(i=>[...i.animations]);super(s),this.animationGroups=t,this.delay=n.delay??0,this.offset=n.offset??0,this.sequenceId=n.sequenceId,this.offsetEasing=typeof n.offsetEasing=="function"?n.offsetEasing:et(n.offsetEasing)??Qe,this.timingOptions=this.animationGroups.map(i=>i.getTimingOptions().map(({delay:o,duration:r,iterations:a})=>({delay:o,duration:Number.isFinite(r)?r:0,iterations:Number.isFinite(a)?a:1}))),this.applyOffsets(),this.ready=Promise.all(t.map(i=>i.ready)).then(()=>{})}calculateOffsets(){const t=this.animationGroups.length;if(t<=1)return[0];const n=t-1;return Array.from({length:t},(s,i)=>this.offsetEasing(i/n)*n*this.offset|0)}applyOffsets(){if(this.animationGroups.length===0||this.animations.length===0)return;const t=this.calculateOffsets(),n=this.getSequenceActiveDuration(t),s=this.animationGroups.length-1;this.animationGroups.forEach((i,o)=>{i.animations.forEach((r,a)=>{const c=r.effect;if(!c)return;const{delay:f,duration:u,iterations:l}=this.timingOptions[o][a],d=f+t[o],m=n-(d+u*l);if(i.isCSS&&this.sequenceId){const{target:h}=c;h instanceof HTMLElement&&(h.style.setProperty(`--motion-${this.sequenceId}-index`,`${o}`),h.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),c.updateTiming({endDelay:m})}else c.updateTiming({delay:d+this.delay,endDelay:m})})})}getSequenceActiveDuration(t){const n=[];for(let s=0;s<this.timingOptions.length;s++){const i=this.timingOptions[s].reduce((o,r)=>{if(!r)return o;const{delay:a,duration:c,iterations:f}=r;return Math.max(o,a+c*f)},0);n.push(t[s]+i)}return Math.max(...n)}addGroups(t){if(t.length===0)return;const n=[...t].sort((s,i)=>i.index-s.index);for(const{index:s,group:i}of n){const o=Math.min(s,this.animationGroups.length);this.animationGroups.splice(o,0,i),this.timingOptions.splice(o,0,i.getTimingOptions());const r=[...i.animations],a=this.animationGroups.slice(0,o).reduce((c,f)=>c+f.animations.length,0);this.animations.splice(a,0,...r)}this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(s=>s.ready)).then(()=>{})}removeGroups(t){const n=[],s=[],i=[];for(let o=0;o<this.animationGroups.length;o++)t(this.animationGroups[o])?n.push(this.animationGroups[o]):(s.push(this.animationGroups[o]),i.push(this.timingOptions[o]));if(n.length===0)return n;for(const o of n)o.cancel();return this.animationGroups=s,this.timingOptions=i,this.animations=s.flatMap(o=>[...o.animations]),this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(o=>o.ready)).then(()=>{}),n}async onFinish(t){try{await Promise.all(this.animationGroups.map(n=>n.finished)),t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}}class gn{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,i){const o=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:r}=i;this._animation=new Animation(o,r),this._tickCbId=null,this.progress=null,this.customEffect=a=>t(o.target,a),this._finishHandler=a=>{this.effect.target?.getAnimations().find(c=>c===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 vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re={exports:{}},Fe=re.exports,Re;function yn(){return Re||(Re=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function i(){var u=this;u.reads=[],u.writes=[],u.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(u){for(var l;l=u.shift();)l()},measure:function(u,l){var d=l?u.bind(l):u;return this.reads.push(d),o(this),d},mutate:function(u,l){var d=l?u.bind(l):u;return this.writes.push(d),o(this),d},clear:function(u){return a(this.reads,u)||a(this.writes,u)},extend:function(u){if(typeof u!="object")throw new Error("expected object");var l=Object.create(this);return c(l,u),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function o(u){u.scheduled||(u.scheduled=!0,u.raf(r.bind(null,u)))}function r(u){var l=u.writes,d=u.reads,m;try{n("flushing reads",d.length),u.runTasks(d),n("flushing writes",l.length),u.runTasks(l)}catch(h){m=h}if(u.scheduled=!1,(d.length||l.length)&&o(u),m)if(n("task errored",m.message),u.catch)u.catch(m);else throw m}function a(u,l){var d=u.indexOf(l);return!!~d&&!!u.splice(d,1)}function c(u,l){for(var d in l)l.hasOwnProperty(d)&&(u[d]=l[d])}var f=t.fastdom=t.fastdom||new i;e.exports=f})(typeof window<"u"?window:typeof Fe<"u"?Fe:globalThis)})(re)),re.exports}var En=yn();const C=vn(En),$e={};function wn(e){Object.assign($e,e)}function $n(e){return e in $e?$e[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function H(e,t){return e?(t||document).getElementById(e):null}function bn(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Sn(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function ve(e){return`${e.value}${nn(e.unit)}`}function Ne(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${ve(e.offset)}${t?` + ${t}`:""})`:t?`calc(${ve(e.offset)} + ${t})`:ve(e.offset)}`}function tt(e){return{start:Ne(e.startOffset,e.startOffsetAdd),end:Ne(e.endOffset,e.endOffsetAdd,!0)}}function nt(e){return t=>C.measure(()=>t(e))}function st(e){return t=>C.mutate(()=>t(e))}function B(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?$n(t):null}else if(e.keyframeEffect){const t=s=>{const{name:i,keyframes:o}=s.keyframeEffect;return[{...s,name:i,keyframes:o}]};return{web:t,style:t,getNames:s=>{const{effectId:i}=s,{name:o}=s.keyframeEffect,r=o||i;return r?[r]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function it(e,t,n,s){return e.map((i,o)=>{const r={fill:i.fill,easing:oe(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:Sn(i)};qe(t)?(r.duration=i.duration,r.delay=i.delay||0):t?.trigger==="view-progress"&&(s||window.ViewTimeline)?r.duration="auto":(r.duration=99.99,r.delay=.01);const a=cn(i.keyframes);return{effect:a===i.keyframes?i:{...i,keyframes:a},options:r,id:n&&`${n}-${o+1}`,part:i.part}})}function qe(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ze(e,t,n,s,i){if(e){if(qe(s)&&(t.duration=t.duration||1,i?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let o;return n instanceof HTMLElement&&(o={measure:nt(n),mutate:st(n)}),e.web?e.web(t,o,i):e(t,o,i)}return[]}function ot(e,t,n,s,i){const o=typeof e=="string"?H(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const m=B(d),h=ze(m,t,o,n,s);return typeof h!="function"?null:h(o)}const r=B(t),a=ze(r,t,o,n,s);if(!a||a.length===0)return null;const c=it(a,n,t.effectId);let f;const u=n?.trigger==="view-progress";u&&window.ViewTimeline&&(f=new ViewTimeline({subject:n.element||H(n.componentId)}));const l=c.map(({effect:d,options:m,id:h,part:p})=>{const g=p?bn(o,p):o,v=new KeyframeEffect(g||null,[],m);C.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(d.keyframes)});const y=u&&f?{timeline:f}:{},E=typeof d.customEffect=="function"?new gn(d.customEffect,g||null,m,y):new Animation(v,y.timeline);if(u)if(f)C.mutate(()=>{const{start:$,end:b}=tt(d);E.rangeStart=$,E.rangeEnd=b,E.play()});else{const{startOffset:$,endOffset:b}=t;C.mutate(()=>{const S=d.startOffset||$,I=d.endOffset||b;Object.assign(E,{start:{name:S.name,offset:S.offset?.value,add:d.startOffsetAdd},end:{name:I.name,offset:I.offset?.value,add:d.endOffsetAdd}})})}return h&&(E.id=h),E});return new Q(l,{...t,trigger:{...n||{}},measured:new Promise(d=>C.mutate(d))})}function In(e,t){return e?`#${e}${t?`[data-motion-part~="${t}"]`:""}`:""}function Tn(e,t,n){const{duration:s,delay:i,iterations:o=1,fill:r,easing:a="linear",direction:c}=e.options,f=e.effect.name,u=s==="auto",{sequenceId:l,delay:d,offset:m,offsetEasing:h="linear"}=n||{};let p=`${i??0}ms`;if(l&&typeof h=="string"){const g=mn(h);if(g){const v=(i??0)+(d??0);if(m){const y=g(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);p=`calc(${`(${v} + ${y} * ${m} * var(--motion-${l}-last, 1))`} * 1ms)`}else p=`${v}ms`}}return`${f} ${u?"auto":`${s}ms`}${u?" ":` ${p} `}${a}${r&&r!=="none"?` ${r}`:""} ${!o||o===1/0?"infinite":o}${c==="normal"?"":` ${c}`} ${t?"":"paused"}`}function Cn(e,t,n){return e?.style?(qe(n)&&(t.duration=t.duration||1),e.style(t)):[]}function On(e,t,n,s){const i=B(t),o=Cn(i,t),r=it(o,n,t.effectId,!0),a=n?.trigger==="view-progress";return r.map((c,f)=>{const{start:u,end:l}=a?tt(c.effect):{};return{target:In(e,c.part),animation:Tn(c,a,s),composition:c.options.composite,custom:c.effect.custom,name:c.effect.name,keyframes:c.effect.keyframes,id:c.id&&`${c.id}-${f+1}`,animationTimeline:a?`--${n?.id}`:"",animationRange:u||l?`${u} ${l}`:""}})}function _n(e,t,n){const s=B(t),i=e instanceof HTMLElement?e:H(e);if(s&&s.prepare&&i){const o={measure:nt(i),mutate:st(i)};s.prepare(t,o)}n&&C.mutate(n)}function rt(e,t){const n=B(t);if(!n)return null;if(!n.style)return t.effectId&&e?An(e,t.effectId):null;const s=n.getNames(t),o=(typeof e=="string"?H(e):e)?.getAnimations(),r=o?.map(c=>c.animationName)||[],a=[];return s.forEach(c=>{r.includes(c)&&a.push(o?.find(f=>f.animationName===c))}),a?.length?new Q(a):null}function An(e,t){const s=(typeof e=="string"?H(e):e)?.getAnimations().filter(i=>{const o=i.id||i.animationName;return o?o.startsWith(t):!0});return s?.length?new Q(s):null}function at(e,t,n,s={}){const{disabled:i,allowActiveEvent:o,...r}=s,a=ot(e,t,n,r);if(!a)return null;let c={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const f=n.element||H(n.componentId),{ready:u}=a;return a.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:f,ready:u,getProgress(){return a.getProgress()},effect(d,m){const{activeDuration:h}=l.effect.getComputedTiming(),{delay:p}=l.effect.getTiming();l.currentTime=((p||0)+(h||0))*m},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const f=t,{centeredToTarget:u,transitionDuration:l,transitionEasing:d}=f,m=n.axis;if(f.keyframeEffect){const h=a;return h.animations?.length===0?null:{target:void 0,centeredToTarget:u,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(g,v){const y=m==="x"?v.x:v.y;this._currentProgress=y,h.progress(y)},disabled:i??!1,destroy(){h.cancel()}}}c={centeredToTarget:u,allowActiveEvent:o},t.customEffect&&l&&(c.transitionDuration=l,c.transitionEasing=et(d)),c.target=a.target}return{...c,getProgress(){return a.getProgress()},effect(f,u,l,d){a.progress(l?{...u,v:l,active:d}:u)},disabled:i,destroy(){a.cancel()}}}function X(e,t,n,s=!1){const i=rt(e,t);return i?(i.ready=new Promise(o=>{_n(e,t,o)}),i):ot(e,t,n,{reducedMotion:s})}function qn(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function ct(e,t){const n=[];for(const{target:s,options:i}of e){const o=qn(s);for(const r of o){const a=X(r,i,void 0,t?.reducedMotion);a instanceof Q&&n.push(a)}}return n}function kn(e,t,n){const s=ct(t,n);return new pn(s,e)}const ee={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Mn(e,t){const n=e?.name??ee.rangeStart.name,s=t?.name??e?.name??ee.rangeEnd.name,i={name:n,offset:e?.offset||ee.rangeStart.offset},o={name:s,offset:t?.offset||ee.rangeEnd.offset};return{startOffset:i,endOffset:o}}function P(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:i,endOffset:o}=Mn(t,n);return{id:"",startOffset:i,endOffset:o,...s}}function A(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function Z(e,t){e.get(t)?.forEach(s=>{const{source:i,target:o,cleanup:r}=s;r();const a=i===t?o:i;e.get(a)?.delete(s)}),e.delete(t)}const Pn={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},xn={root:null,rootMargin:"0px",threshold:[0]},Ln=.2;function Fn(e){const t=e.trim().split(/\s+/),n=t[0],s=t.length>1?t[1]:t[0],i=o=>o.startsWith("-")?o.slice(1):parseFloat(o)?`-${o}`:o;return`${i(n)} 0px ${i(s)}`}const K={},L=new WeakMap,le=new WeakSet,W=new WeakMap;let ut={},V=null;function Rn(e){ut=e}function ft(e,t,n){L.get(e)?.forEach(({source:i,handler:o})=>{i===e&&o(t,n)})}function je(){return V||(V=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||ft(n,!1,!0)})},xn),V)}function lt(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(K[n])return K[n];const s=e.threshold??Ln,i=t?Pn:{root:null,rootMargin:e.inset?Fn(e.inset):"0px",threshold:s},o=new IntersectionObserver(r=>{r.forEach(a=>{const c=a.target,f=!le.has(c);if(f&&(le.add(c),e.useSafeViewEnter&&!a.isIntersecting)){C.measure(()=>{const u=a.boundingClientRect.height,l=a.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&u*d>l&&C.mutate(()=>{o.unobserve(c);const h=lt(e,!0);W.set(c,h),h.observe(c)})});return}(a.isIntersecting||!f)&&ft(c,a.isIntersecting)})},i);return K[n]=o,o}function Nn(e,t,n,s={},{reducedMotion:i,selectorCondition:o,animation:r}={}){const a={...ut,...s},c=n.triggerType||"once",f=r||X(t,P(n),void 0,i);if(!f)return;const u=lt(a);c!=="once"&&f.persist?.();let l=!0,d=!1,m;m={source:e,target:t,handler:(g,v)=>{if(!(o&&!t.matches(o)))if(c==="once"){if(g&&!d){d=!0,L.get(e)?.delete(m),L.get(t)?.delete(m);const y=L.get(e);(!y||y.size===0)&&((W.get(e)||u).unobserve(e),le.delete(e)),f.play(()=>{const E=()=>{t.dataset.interactEnter="start"};if(f.isCSS){C.mutate(()=>{requestAnimationFrame(E)});const $=()=>{C.mutate(()=>{t.dataset.interactEnter="done"})};f.onFinish($),f.onAbort($)}else C.mutate(E)})}}else c==="alternate"?l&&g?(l=!1,f.play()):l||f.reverse():c==="repeat"?g?(f.progress(0),f.play()):v&&(f.pause(),f.progress(0)):c==="state"&&(g?f.play():v&&f.pause())},cleanup:()=>{(W.get(e)||u).unobserve(e),(c==="repeat"||c==="state")&&je().unobserve(e),f.cancel(),le.delete(e),W.delete(e)}},A(L,e,m),A(L,t,m),W.set(e,u),u.observe(e),(c==="repeat"||c==="state")&&je().observe(e)}function zn(e){Z(L,e)}function jn(){V=null,Object.keys(K).forEach(e=>delete K[e])}const Dn={add:Nn,remove:zn,setOptions:Rn,reset:jn};function dt(e,t){return Object.assign(Object.create(t),e)}function Hn(e,t,n,s){let i=e*(1-n)+t*n;if(s){const o=i-e;Math.abs(o)<s&&(i=e+s*Math.sign(o));const r=t-i;if(Math.abs(r)<s)return t}return i}function Gn(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function De(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Wn(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 de(n[1],t)+de(n[6],t)}function de(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)?Wn(e,t):parseInt(e)||0:0}function R(e,t,n){const{name:s,offset:i=0}=e,{start:o,end:r}=n,a=r-o,c=i/100;let f,u;return s==="entry"?(f=o-t,u=Math.min(t,a)):s==="entry-crossing"?(f=o-t,u=a):s==="contain"?(f=Math.min(r-t,o),u=Math.abs(t-a)):s==="exit"?(f=Math.max(o,r-t),u=Math.min(t,a)):s==="exit-crossing"?(f=o,u=a):s==="cover"&&(f=o-t,u=a+t),f+c*u|0}function ye(e,t,n,s,i){let o=0;const r={start:t,end:n};return e.forEach((a,c)=>{o+=a.offset;const f=a.sticky;if(f){if("end"in f&&e[c-1]?.element){const d=((i?a.element.offsetWidth:a.element.offsetHeight)||0)+f.end-s,m=o+d-a.offset,h=m<r.start,p=!h&&m<=n;let g=0;(h||p)&&(g=a.offset,r.end+=g),h&&(r.start+=g)}if("start"in f){const u=o-f.start,l=u<r.start,d=!l&&u<=r.end;let m=0;const h=e[c-1]?.element;if(h){if(l||d){const p=(i?h.offsetWidth:h.offsetHeight)||0,g=a.offset,v=(i?a.element.offsetWidth:a.element.offsetHeight)||0;m=p-(g+v),o+=m,r.end+=m}l&&(r.start+=m)}}}}),r}function Vn(e,t,n,s,i,o){const{start:r,end:a,duration:c}=e;let f=r,u=a,l=e.startRange,d=e.endRange,m;if(typeof c=="string"){l={name:c,offset:0},d={name:c,offset:100},f=R(l,n,t),u=R(d,n,t),m=u-f;const h=ye(o,f,u,n,s);f=h.start,u=h.end}else{if(l||r?.name){l=l||r;const h=de(l.add,i),p=R({...l,offset:0},n,t),g=R({...l,offset:100},n,t),v=ye(o,p,g,n,s);f=v.start+l.offset/100*(v.end-v.start)+h}if(d||a?.name){d=d||a;const h=de(d.add,i),p=R({...d,offset:0},n,t),g=R({...d,offset:100},n,t),v=ye(o,p,g,n,s);u=v.start+d.offset/100*(v.end-v.start)+h}else typeof c=="number"&&(u=f+c)}return!m&&!c&&(m=u-f),{...e,start:f,end:u,startRange:l,endRange:d,duration:m||c}}function Yn(e){return e.position==="sticky"}function Kn(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Bn(e,t){return parseInt(t?e.left:e.top)}function Un(e,t){return parseInt(t?e.right:e.bottom)}function Qn(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function Xn(e,t){let n;const s=Bn(e,t),i=Un(e,t),o=!isNaN(s),r=!isNaN(i);return(o||r)&&(n={},o&&(n.start=s),r&&(n.end=i)),n}function te(e,t,n,s,i){const o=e[0].viewSource,r=[];let a=(s?o.offsetWidth:o.offsetHeight)||0,c=0,f=o;for(;f;){const l=window.getComputedStyle(f),d=Yn(l),m=d?Xn(l,s):void 0,h=Qn(f,s,d);if((!m||!("end"in m))&&(c+=h),r.push({element:f,offset:h,sticky:m}),f=f.offsetParent,Kn(l,f,t))break;if(f===t){r.push({element:f,offset:0});break}}return r.reverse(),e.map(l=>({...Vn(l,{start:c,end:c+a},n,s,i,r)}))}const He=100,Zn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function Jn(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function Ge(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function es(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function ts(e){const t=dt(e,Zn),n=t.root,s=t.horizontal,i=new WeakMap;let o=Ge(n,s),r,a,c,f,u;const l=[],d=es();if(t.scenes=Object.values(e.scenes.reduce((p,g,v)=>{const y=g.groupId?`group-${g.groupId}`:String(v);return p[y]?p[y].push(g):p[y]=[g],p},{})).flatMap(p=>(p.every(g=>g.viewSource&&(typeof g.duration=="string"||g.start?.name))?(p=te(p,n,o,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(p)):p.forEach(g=>{g.end==null&&(g.end=g.start+g.duration),g.duration==null&&(g.duration=g.end-g.start)}),p)),t.scenes.forEach((p,g)=>{p.index=g}),l.length){const p=new Map;window.ResizeObserver&&(c=new window.ResizeObserver(function(g){g.forEach(v=>{const y=p.get(v.target),E=te(y,n,o,s,d);E.forEach(($,b)=>{t.scenes[$.index]=E[b]}),l.splice(l.indexOf(y),1,E)})}),l.forEach(g=>{c.observe(g[0].viewSource,{box:"border-box"}),p.set(g[0].viewSource,g)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(De(()=>{const v=l.map(y=>{const E=te(y,n,o,s,d);return E.forEach(($,b)=>{t.scenes[$.index]=E[b]}),E});l.length=0,l.push(...v),l.forEach(y=>{p.set(y[0].viewSource,y)})},He)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(f=De(function(){o=Ge(n,s);const g=l.map(v=>{const y=te(v,n,o,s,d);return y.forEach((E,$)=>{t.scenes[E.index]=y[$]}),y});l.length=0,l.push(...g),l.forEach(v=>{p.set(v[0].viewSource,v)})},He),n===window?window.addEventListener("resize",f):window.ResizeObserver&&(u=new window.ResizeObserver(f),u.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(a=new window.IntersectionObserver(function(p){p.forEach(g=>{(i.get(g.target)||[]).forEach(v=>{v.disabled=!g.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(p=>{if(p.viewSource){let g=i.get(p.viewSource);g||(g=[],i.set(p.viewSource,g),a.observe(p.viewSource)),g.push(p)}}));function m({p,vp:g}){p=+p.toFixed(1);const v=+g.toFixed(4);if(p!==r){for(let y of t.scenes)if(!y.disabled){const{start:E,end:$,duration:b}=y,S=Jn(p,E,$,b);y.effect(y,S,v)}r=p}}function h(){t.scenes.forEach(p=>p.destroy?.()),a&&(a.disconnect(),a=null),c&&(c.disconnect(),c=null),f&&(u?(u.disconnect(),u=null):window.removeEventListener("resize",f))}return{tick:m,destroy:h}}const ns={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class ss{constructor(t={}){this.config=dt(t,ns),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=Gn(()=>{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,i=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,o=this.config.horizontal?s:i;this.progress.p=o,this.progress.prevP=o,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=o,this.currentProgress.prevP=o,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,i)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const i=s.p-s.prevP,o=i<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(i))/this.config.velocityMax*o}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=Hn(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=ts(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const be=new WeakMap;let ht=()=>({});function is(e){ht=e}function os(e,t,n,s,{reducedMotion:i}){if(i)return;const o={trigger:"view-progress",element:e},r=P(n);let a;if("ViewTimeline"in window){const f=X(t,r,o);f&&!f.isCSS&&(f.play(),a=()=>{f.ready.then(()=>{f.cancel()})})}else{const f=at(t,r,o);if(f){const u=Array.isArray(f)?f:[f],l=new ss({viewSource:e,scenes:u,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...ht()});a=()=>{l.destroy()},Promise.all(u.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!a)return;const c={source:e,target:t,cleanup:a};A(be,e,c),A(be,t,c)}function rs(e){Z(be,e)}const as={add:os,remove:rs,registerOptionsGetter:is};function We(e,t,n){return Math.min(Math.max(e,n),t)}function Ve(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function cs(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 us(){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 fs(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function i(){document.body.addEventListener("pointerdown",a=>{s===void 0?s=a.offsetY:n=a.offsetY===s},{once:!0});const r=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(r)}function o(){window.scrollY!==t&&(window.removeEventListener("scroll",o),i(),e(n))}i(),window.addEventListener("scroll",o),window.scrollY>0&&window.scrollBy(0,-1)})}function ls(e){fs().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let ne=0;const ae=new Set;function ds(){const e=n=>{for(let s of n.changedTouches)ae.add(s.identifier)},t=n=>{for(let s of n.changedTouches)ae.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){ae.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function hs(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;ne||(s=ds()),ne+=1;function i(o){clearTimeout(n),n=setTimeout(()=>{ae.size?setTimeout(i,100):(t(o),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),ne-=1,ne||s()}}function ms(e,t,n){return{x(s){const i=e.left-n.x+e.width/2,o=i>=t.width/2,r=(o?i:t.width-i)*2,a=o?0:i-r/2;return(s-a)/r},y(s){const i=e.top-n.y+e.height/2,o=i>=t.height/2,r=(o?i:t.height-i)*2,a=o?0:i-r/2;return(s-a)/r}}}function ps(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function gs(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function vs(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 ys(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,i,o,r,a;const c={x:0,y:0};e.scenes.forEach(u=>{u.target&&u.centeredToTarget&&(u.transform=ms(cs(u.target),e.rect,c),t=!0),e.root?i=vs(e):(o=gs.bind(null,e),window.addEventListener("resize",o))}),s=function(u){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(u.x)||u.x/e.rect.width,m=l.transform?.y(u.y)||u.y/e.rect.height,h=+We(0,1,d).toPrecision(4),p=+We(0,1,m).toPrecision(4),g={x:u.vx,y:u.vy};e.allowActiveEvent&&(u.active=d<=1&&m<=1&&d>=0&&m>=0),l.effect(l,{x:h,y:p},g,u.active)}Object.assign(n,u)},t&&(r=ps.bind(c,s,n),a=hs(document,r));function f(){e.scenes.forEach(u=>u.destroy?.()),a?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",o),o=null),s=null,n=null}return{tick:s,destroy:f}}const Es=1e3/60*3;let se;function ws(){N.x=window.scrollX,N.y=window.scrollY}const N={x:0,y:0,scrollHandler:ws,fixRequired:void 0};class $s{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():Ve(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):Ve(()=>{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=i=>{const o=this.config.root?i.offsetX:i.x,r=this.config.root?i.offsetY:i.y;this.progress.vx=o-this.progress.x,this.progress.vy=r-this.progress.y,this.progress.x=o,this.progress.y=r,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){se=typeof se=="boolean"?se:us();const i=se?window.devicePixelRatio:1;typeof N.fixRequired>"u"&&ls(N),this._measure=o=>{if(o.target!==this.config.root){const r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:o.x*i+N.x,clientY:o.y*i+N.y});o.stopPropagation(),this.config.root.dispatchEvent(r)}else s(o)}}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||(r=>r),s=performance.now();let i=!1;const o=r=>{const a=(r-this._startTime)/t,c=n(Math.min(1,a));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((f,[u,l])=>(u==="active"?f[u]=l:f[u]=this.previousProgress[u]+(l-this.previousProgress[u])*c,f),this.currentProgress||{}),a<1&&(this._nextTransitionTick=requestAnimationFrame(o),i=r-this._startTime>Es),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,o(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=ys(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Se=new WeakMap;let mt=()=>({});function bs(e){mt=e}function Ss(e,t,n,s={},{reducedMotion:i}){if(i)return;const o={trigger:"pointer-move",element:e,axis:s.axis??"y"},r=at(t,P(n),o);if(r){const a=Array.isArray(r)?r:[r],c=new $s({root:s.hitArea==="self"?e:void 0,scenes:a,...mt()}),u={source:e,target:t,cleanup:()=>{c.destroy()}};A(Se,e,u),A(Se,t,u),Promise.all(a.map(l=>l.ready||Promise.resolve())).then(()=>{c.start()})}}function Is(e){Z(Se,e)}const Ts={add:Ss,remove:Is,registerOptionsGetter:bs},Ie=new WeakMap;function Cs(e,t,n,s,{reducedMotion:i,selectorCondition:o,animation:r,sourceAnimationOptions:a}){const c=r||X(t,P(n),void 0,i);if(!c)return;const{effectId:f}=s,u=m=>{if(o&&!t.matches(o))return;const h=m.animationName,p=m.detail?.effectId,g=a?rt(e,a):null;if(g){if(g.playState==="running"||h&&!g.hasAnimationName(h))return;if(p&&p!==f&&!g.hasAnimationId(p))return}c.play()},d={source:e,target:t,cleanup:()=>{c.cancel(),e.removeEventListener("animationend",u)}};A(Ie,e,d),A(Ie,t,d),e.addEventListener("animationend",u)}function Os(e){Z(Ie,e)}const _s={add:Cs,remove:Os};function As(e,t,n=!1,s,i,o){const r=o||X(e,P(t),void 0,n);if(!r)return null;let a=!0;const c=t.triggerType||"alternate";return f=>{if(s&&!e.matches(s))return;const u=!i,l=i?.enter?.includes(f.type),d=i?.leave?.includes(f.type);if(l||u){if(c==="alternate"||c==="state")a?(a=!1,r.play()):c==="alternate"?r.reverse():c==="state"&&(r.playState==="running"?r.pause():r.playState!=="finished"&&r.play());else{if(r.progress(0),delete e.dataset.interactEnter,r.isCSS){const m=()=>{C.mutate(()=>{e.dataset.interactEnter="done"})};r.onFinish(m),r.onAbort(m)}r.play()}return}d&&(c==="alternate"?r.reverse():c==="repeat"?(r.cancel(),C.mutate(()=>{delete e.dataset.interactEnter})):c==="state"&&r.playState==="running"&&r.pause())}}function qs(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:o},r,a){const c=!!s,f=o??"toggle",u=f==="toggle";return l=>{if(r&&!e.matches(r))return;const d=c?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,m=!a,h=a?.enter?.includes(l.type),p=a?.leave?.includes(l.type);m?t.toggleEffect(n,f,d):(h&&t.toggleEffect(n,u?"add":f,d),p&&u&&t.toggleEffect(n,"remove",d))}}const Te=new WeakMap;function Ye(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function ks(e){return t=>{const n=t;n.pointerType&&e(n)}}function Ms(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const Ps={focusin:(e,t)=>Ye(e,t),focusout:(e,t)=>Ye(e,t),click:(e,t)=>ks(t),keydown:(e,t)=>Ms(t)};function xs(e,t,n){const s=Ps[e];return s?s(t,n):i=>n(i)}function Ls(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function Fs(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(Ls(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function Rs(e){return!!(e.enter?.length||e.leave?.length)}function Ns(e){return Rs(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function zs(e,t,n,s,{reducedMotion:i,targetController:o,selectorCondition:r,animation:a}){const c=Fs(s.eventConfig),f=n.transition||n.transitionProperties,u=Ns(c);let l,d=!1;if(f?l=qs(t,o,n,r,u):(l=As(t,n,i,r,u,a),d=n.triggerType==="once"),!l)return;const m=l,h=new AbortController;function p(y,E,$){const b=xs(E,e,m);y.addEventListener(E,b,{...$,signal:h.signal})}const v={source:e,target:t,cleanup:()=>{h.abort()}};if(A(Te,e,v),A(Te,t,v),u){const y=c.enter,E=c.leave;y.forEach(S=>{S==="focusin"&&(e.tabIndex=0),p(e,S,{passive:!0,once:d})});const $=!n.stateAction||n.stateAction==="toggle";(f?$:n.triggerType!=="once")&&E.forEach(S=>{if(S==="focusout"){p(e,S,{once:d});return}p(e,S,{passive:!0})})}else(c.toggle??[]).forEach(E=>{p(e,E,{once:d,passive:E!=="keydown"})})}function js(e){Z(Te,e)}const Y={add:zs,remove:js},Ce={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},Ke={click:Ce.activate,hover:Ce.interest};function ie(e){const t=Ce[e];return(n,s,i,o,r)=>{const a=r?.allowA11yTriggers&&e in Ke?Ke[e]:t;Y.add(n,s,i,{eventConfig:a},r??{})}}const j={viewEnter:Dn,hover:{add:ie("hover"),remove:Y.remove},click:{add:ie("click"),remove:Y.remove},animationEnd:_s,viewProgress:as,pointerMove:Ts,activate:{add:ie("activate"),remove:Y.remove},interest:{add:ie("interest"),remove:Y.remove}};function Ds(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;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;constructor(){this.dataCache={effects:{},sequences:{},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?.useCustomElement??!!w.defineInteractElement;this.dataCache=Gs(t,s);const i=w.defineInteractElement?.();s&&i===!1?document.querySelectorAll("interact-element").forEach(o=>{o.connect()}):w.controllerCache.forEach((o,r)=>o.connect(r))}destroy({clearCache:t=!1}={}){for(const n of this.controllers)n.disconnect({removeFromCache:t});for(const[,n]of this.mediaQueryListeners.entries())n.mql.removeEventListener("change",n.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},sequences:{},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=Ds(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(i=>{const o=q(i,t);delete this.addedInteractions[o]});const s=`${t}::seq::`;for(const i of w.sequenceCache.keys())i.startsWith(s)&&(w.sequenceCache.delete(i),delete this.addedInteractions[i])}setupMediaQueryListener(t,n,s,i){this.mediaQueryListeners.has(t)||(n.addEventListener("change",i),this.mediaQueryListeners.set(t,{mql:n,handler:i,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(),w.sequenceCache.clear(),w.elementSequenceMap=new WeakMap}static setup(t){t.scrollOptionsGetter&&j.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&j.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&j.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){const n=w.instances.find(s=>s.has(t));return n||console.warn(`Interact: Instance for key "${t}" not found`),n}static getController(t){const n=t?w.controllerCache.get(t):void 0;return n||console.warn(`Interact: Controller for key "${t}" not found`),n}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=wn;static use(t,n){w.plugins.set(t,n)}static getPlugin(t){return w.plugins.get(t)}static getPluginsNames(){return new Set(w.plugins.keys())}static getSequence(t,n,s,i){const o=w.sequenceCache.get(t);if(o)return o;const r=kn(n,s,i);return w.sequenceCache.set(t,r),w._registerSequenceElements(s,r),r}static addToSequence(t,n,s,i){const o=w.sequenceCache.get(t);if(!o)return!1;const a=ct(n,i).map((c,f)=>({index:s[f]??o.animationGroups.length,group:c}));return o.addGroups(a),w._registerSequenceElements(n,o),!0}static _registerSequenceElements(t,n){for(const{target:s}of t){const i=Array.isArray(s)?s:s instanceof HTMLElement?[s]:[];for(const o of i){let r=w.elementSequenceMap.get(o);r||(r=new Set,w.elementSequenceMap.set(o,r)),r.add(n)}}}static removeFromSequences(t){for(const n of t){const s=w.elementSequenceMap.get(n);if(s){for(const i of s)i.removeGroups(o=>o.animations.some(r=>r.effect?.target===n));w.elementSequenceMap.delete(n)}}}}let Hs=0;function D(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const i=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${i} ${e.selector}`:`${e.listContainer}${i||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function Be(e){return"sequenceId"in e&&!("effects"in e)}function Ee(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function Gs(e,t=!1){const{effects:n={},sequences:s={},conditions:i={}}=e,o={};return e.interactions?.forEach((r,a)=>{const c=r.key,f=++Hs,{effects:u,sequences:l,...d}=r;if(!c){console.error(`Interaction ${f} is missing a key for source element.`);return}Ee(o,c);const m=u?Array.from(u):[];m.reverse();const h=l?.map((v,y)=>{if(Be(v)){const $=s[v.sequenceId];return $?{...$,...v}:(console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`),v)}const E=v;return E.sequenceId||(E.sequenceId=`seq-${a}-${y}`),E}),p={...d,effects:m.length>0?m:void 0,sequences:h};o[c].triggers.push(p),o[c].selectors.add(D(p,{useFirstChild:t}));const g=p.listContainer;m.forEach((v,y)=>{let E=v.key;if(!E&&v.effectId){const I=n[v.effectId];I&&(E=I.key)}v.effectId||(v.effectId=`eff-${a}-${m.length-1-y}`),E=E||c,v.key=E;const $=v.effectId;if(g&&v.listContainer&&(E!==c||v.listContainer!==g))return;const b=`${c}::${E}::${$}::${f}`;if(v.interactionId=b,o[c].interactionIds.add(b),E===c)return;const S=Ee(o,E);S.effects[b]||(S.effects[b]=[],S.interactionIds.add(b)),S.effects[b].push({...d,effect:v}),S.selectors.add(D(v,{useFirstChild:t}))}),h?.forEach(v=>{if(!v||Be(v))return;const y=v,E=y.sequenceId;y.effects.forEach((b,S)=>{b.effectId||(b.effectId=`eff-${E}-${S}`);let I=b.key;if(!I&&b.effectId){const T=n[b.effectId];T&&(I=T.key)}I=I||c;const O=D(b,{useFirstChild:t});if(O&&o[c].selectors.add(O),I!==c){const T=Ee(o,I),_=`${I}::seq::${E}::${f}`;T.sequences[_]||(T.sequences[_]=[],T.interactionIds.add(_)),T.sequences[_].push({...d,sequence:y}),T.selectors.add(O)}})})}),{effects:n,sequences:s,conditions:i,interactions:o}}const pt="$";function Ws(e,t=2){return parseFloat(e.toFixed(t))}function Vs(e){return/\[]/g.test(e)}function Ys(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ce(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function U(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function gt(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:fe(i.name)}))}function vt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:o,delay:r}=t;i&&(t.styleProperties.some(c=>c.name.startsWith("--"))?s=[`all ${i}ms ${oe(o||"ease")}${r?` ${r}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(c=>`${fe(c.name)} ${i}ms ${oe(o||"ease")}${r?` ${r}ms`:""}`))}else s=n?.filter(i=>i.duration).map(i=>`${fe(i.name)} ${i.duration}ms ${oe(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function Ks({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:o}){const r=vt({transition:n,transitionProperties:s}),a=gt({transition:n,transitionProperties:s}).map(h=>`${h.name}: ${h.value};`),c=e.replace(/"/g,"'"),f=`:is(:state(${t}), :--${t}) ${i}`,u=`[data-interact-effect~="${t}"] ${i}`,l=o?ce(f,o):f,d=o?ce(u,o):u,m=[`${l},
|
|
1
|
+
"use strict";function qt(e){return[...e.matchAll(/\[([-\w]+)]/g)].map(([t,n])=>n)}function q(e,t){const n=qt(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function kt(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&ue(e)===ue(t)}function ue(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}class Q{animations;options;ready;isCSS;longestAnimation;constructor(t,n){this.animations=t,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=t[0]instanceof CSSAnimation,this.longestAnimation=this._getAnimationWithLongestEndTime()}_getAnimationWithLongestEndTime(){return this.animations.reduce((t,n)=>{const s=t.effect?.getComputedTiming().endTime??0,i=n.effect?.getComputedTiming().endTime??0;return s>i?t:n},this.animations[0])}getProgress(){return this.longestAnimation?.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:i,iterations:o}=n.effect.getTiming(),r=(Number.isFinite(i)?i:0)*(Number.isFinite(o)?o:1);n.currentTime=((s||0)+r)*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 i=this.options?.effectId||n.id,o=new CustomEvent("animationend",{detail:{effectId:i}});s.dispatchEvent(o)}}t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}async onAbort(t){try{await Promise.all(this.animations.map(n=>n.finished))}catch(n){if(n.name==="AbortError"){const s=this.animations[0];if(s&&!this.isCSS){const i=s.effect?.target;if(i){const o=new Event("animationcancel");i.dispatchEvent(o)}}t()}}}get finished(){return Promise.all(this.animations.map(t=>t.finished))}get playState(){return this.animations.some(t=>t.playState==="running")?"running":this.animations[0]?.playState}hasAnimationName(t){return this.animations.some(n=>n.animationName===t)}hasAnimationId(t){return this.animations.some(n=>n.id===t)}getTimingOptions(){return this.animations.map(t=>{const n=t.effect?.getTiming(),s=n?.delay??0,i=Number(n?.duration)||0,o=n?.iterations??1;return{delay:s,duration:i,iterations:o}})}}const Qe=e=>e,Mt=e=>1-Math.cos(e*Math.PI/2),Pt=e=>Math.sin(e*Math.PI/2),xt=e=>-(Math.cos(Math.PI*e)-1)/2,Lt=e=>e**2,Ft=e=>1-(1-e)**2,Rt=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,Nt=e=>e**3,zt=e=>1-(1-e)**3,jt=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Dt=e=>e**4,Ht=e=>1-(1-e)**4,Gt=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Wt=e=>e**5,Vt=e=>1-(1-e)**5,Yt=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Kt=e=>e===0?0:2**(10*e-10),Bt=e=>e===1?1:1-2**(-10*e),Ut=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Qt=e=>1-Math.sqrt(1-e**2),Xt=e=>Math.sqrt(1-(e-1)**2),Zt=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,Jt=e=>2.70158*e**3-1.70158*e**2,en=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,tn=(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,Pe={linear:Qe,sineIn:Mt,sineOut:Pt,sineInOut:xt,quadIn:Lt,quadOut:Ft,quadInOut:Rt,cubicIn:Nt,cubicOut:zt,cubicInOut:jt,quartIn:Dt,quartOut:Ht,quartInOut:Gt,quintIn:Wt,quintOut:Vt,quintInOut:Yt,expoIn:Kt,expoOut:Bt,expoInOut:Ut,circIn:Qt,circOut:Xt,circInOut:Zt,backIn:Jt,backOut:en,backInOut:tn},G=(e,t,n,s,i)=>{const o=3*t,r=3*(s-2*t),a=1-3*s+3*t,c=3*n,f=3*(i-2*n),u=1-3*i+3*n;let l;if(a===0)l=r===0?`(${e} / ${o})`:`((sqrt(max(0, ${o*o} + ${4*r} * ${e})) - ${o}) / ${2*r})`;else{const d=r/(3*a),m=2*Math.pow(r,3)-9*o*r*a,h=54*Math.pow(a,3),p=(3*a*o-r*r)/(9*a*a),g=`((${m} - ${27*a*a} * ${e}) / ${h})`;if(p<0){const v=2*Math.sqrt(-p);let y=0;for(const $ of[0,1,2])[0,.25,.5,.75,1].every(S=>{const I=Math.min(Math.max(2*(m-27*a*a*S)/(h*p*v),-1),1),O=v*Math.cos((Math.acos(I)-$*2*Math.PI)/3)-d;return O>=-1e-6&&O<=1.000001})&&(y=$);const E=`(acos(clamp(-1, ${2/(p*v)} * ${g}, 1)) - ${360*y}deg) / 3`;l=`(${v} * cos(${E}) - ${d})`}else{const v=`sqrt(pow(${g}, 2) + ${Math.pow(p,3)})`;l=`(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`}}return`(${u} * pow(${l}, 3) + ${f} * pow(${l}, 2) + ${c} * ${l})`},xe={linear:e=>e,ease:e=>G(e,.25,.1,.25,1),easeIn:e=>G(e,.42,0,1,1),easeOut:e=>G(e,0,0,.58,1),easeInOut:e=>G(e,.42,0,.58,1),sineIn:e=>`(1 - cos(${e} * 90deg))`,sineOut:e=>`(sin(${e} * 90deg))`,sineInOut:e=>`((1 - cos(${e} * 180deg)) / 2)`,quadIn:e=>`(${e} * ${e})`,quadOut:e=>`(1 - (1 - ${e}) * (1 - ${e}))`,quadInOut:e=>`(round(${e}) * (1 - (-2 * ${e} + 2) * (-2 * ${e} + 2) / 2) + (1 - round(${e})) * 2 * ${e} * ${e})`,cubicIn:e=>`pow(${e}, 3)`,cubicOut:e=>`(1 - pow(1 - ${e}, 3))`,cubicInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 3) / 2) + (1 - round(${e})) * 4 * pow(${e}, 3))`,quartIn:e=>`pow(${e}, 4)`,quartOut:e=>`(1 - pow(1 - ${e}, 4))`,quartInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 4) / 2) + (1 - round(${e})) * 8 * pow(${e}, 4))`,quintIn:e=>`pow(${e}, 5)`,quintOut:e=>`(1 - pow(1 - ${e}, 5))`,quintInOut:e=>`(round(${e}) * (1 - pow(-2 * ${e} + 2, 5) / 2) + (1 - round(${e})) * 16 * pow(${e}, 5))`,expoIn:e=>`(pow(2, 10 * ${e} - 10) - pow(2, -10) * (1 - ${e}))`,expoOut:e=>`(1 - pow(2, -10 * ${e}) + pow(2, -10) * ${e})`,expoInOut:e=>`((round(${e}) * (2 - pow(2, -20 * ${e} + 10)) + (1 - round(${e})) * pow(2, 20 * ${e} - 10)) / 2)`,circIn:e=>`(1 - sqrt(1 - ${e} * ${e}))`,circOut:e=>`sqrt(1 - (${e} - 1) * (${e} - 1))`,circInOut:e=>`((round(${e}) * (sqrt(max(0, (3 - 2 * ${e}) * (2 * ${e} - 1))) + 1) + (1 - round(${e})) * (1 - sqrt(max(0, 1 - 4 * ${e} * ${e})))) / 2)`,backIn:e=>`(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,backOut:e=>`(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,backInOut:e=>`((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`},Le={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 nn(e){return e==="percentage"?"%":e||"px"}const sn=/^(webkit|moz|ms|o)(?=[A-Z])/,on=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function fe(e){return e.startsWith("--")?e:(sn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function rn(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xe(e){return on[e]||rn(e)}function an(e){for(const t in e)if(Object.hasOwn(e,t)&&Xe(t)!==t)return!0;return!1}function cn(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!an(n))return;t??=e.slice();const i={};for(const o in n)Object.hasOwn(n,o)&&(i[Xe(o)]=n[o]);t[s]=i}),t||e}function oe(e){return e?Le[e]||e:Le.linear}function un(e,t,n,s){const i=3*e,o=3*(n-e)-i,r=1-i-o,a=3*t,c=3*(s-t)-a,f=1-a-c,u=h=>((r*h+o)*h+i)*h,l=h=>((f*h+c)*h+a)*h,d=h=>(3*r*h+2*o)*h+i;function m(h){let p=h;for(let y=0;y<8;y++){const E=u(p)-h;if(Math.abs(E)<1e-7)return p;const $=d(p);if(Math.abs($)<1e-6)break;p-=E/$}let g=0,v=1;for(p=(g+v)/2;v-g>1e-7;){const y=u(p);if(Math.abs(y-h)<1e-7)return p;h>y?g=p:v=p,p=(g+v)/2}return p}return h=>h<=0?0:h>=1?1:l(m(h))}function Ze(e){const t=e.match(/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);if(!t)return;const n=parseFloat(t[1]),s=parseFloat(t[2]),i=parseFloat(t[3]),o=parseFloat(t[4]);if(![n,s,i,o].some(isNaN))return[n,s,i,o]}function fn(e){const t=Ze(e);if(!(!t||t.some(isNaN)))return un(...t)}function ln(e){const t=Ze(e);if(!(!t||t.some(isNaN)))return n=>G(n,...t)}function Je(e){const t=e.match(/^linear\((.+)\)$/);if(!t)return;const n=t[1].split(",").map(o=>o.trim()).filter(Boolean);if(n.length===0)return;const s=[];for(const o of n){const r=o.split(/\s+/),a=parseFloat(r[0]);if(isNaN(a))return;const c=[];for(let f=1;f<r.length;f++)if(r[f].endsWith("%")){const u=parseFloat(r[f])/100;if(isNaN(u))return;c.push(u)}c.length===0?s.push({output:a,pos:null}):c.length===1?s.push({output:a,pos:c[0]}):(s.push({output:a,pos:c[0]}),s.push({output:a,pos:c[1]}))}if(s.length===0)return;s[0].pos===null&&(s[0].pos=0),s[s.length-1].pos===null&&(s[s.length-1].pos=1);let i=0;for(;i<s.length;)if(s[i].pos===null){const o=i-1;let r=i;for(;r<s.length&&s[r].pos===null;)r++;const a=s[o].pos,c=s[r].pos,f=r-o;for(let u=o+1;u<r;u++)s[u].pos=a+(c-a)*(u-o)/f;i=r+1}else i++;for(let o=1;o<s.length;o++)s[o].pos<s[o-1].pos&&(s[o].pos=s[o-1].pos);return s}function dn(e){const t=Je(e);if(t)return n=>{if(n<=t[0].pos)return t[0].output;const s=t[t.length-1];if(n>=s.pos)return s.output;let i=0,o=t.length-1;for(;i<o-1;){const c=i+o>>>1;t[c].pos<=n?i=c:o=c}const r=t[i],a=t[o];return a.pos===r.pos?a.output:r.output+(a.output-r.output)*(n-r.pos)/(a.pos-r.pos)}}function hn(e){const t=Je(e);if(t)return n=>{const s=[`${t[0].output}`];for(let i=1;i<t.length;i++){const o=t[i].pos-t[i-1].pos,r=t[i].output-t[i-1].output;if(o===0&&t[i-1].pos===0)s.push(`${r}`);else{const a=o===0?`round(${n} / ${2*t[i-1].pos})`:`(${n} - ${t[i-1].pos}) / ${o}`;s.push(`clamp(0, ${a}, 1) * ${r}`)}}return`(${s.join(" + ")})`}}function et(e){if(!e)return;const t=Pe[e];return t||(fn(e)??dn(e)??Pe.linear)}function mn(e){if(!e)return;const t=xe[e];return t||(ln(e)??hn(e)??xe.linear)}class pn extends Q{animationGroups;delay;offset;offsetEasing;sequenceId;timingOptions;constructor(t,n={}){const s=t.flatMap(i=>[...i.animations]);super(s),this.animationGroups=t,this.delay=n.delay??0,this.offset=n.offset??0,this.sequenceId=n.sequenceId,this.offsetEasing=typeof n.offsetEasing=="function"?n.offsetEasing:et(n.offsetEasing)??Qe,this.timingOptions=this.animationGroups.map(i=>i.getTimingOptions().map(({delay:o,duration:r,iterations:a})=>({delay:o,duration:Number.isFinite(r)?r:0,iterations:Number.isFinite(a)?a:1}))),this.applyOffsets(),this.ready=Promise.all(t.map(i=>i.ready)).then(()=>{})}calculateOffsets(){const t=this.animationGroups.length;if(t<=1)return[0];const n=t-1;return Array.from({length:t},(s,i)=>this.offsetEasing(i/n)*n*this.offset|0)}applyOffsets(){if(this.animationGroups.length===0||this.animations.length===0)return;const t=this.calculateOffsets(),n=this.getSequenceActiveDuration(t),s=this.animationGroups.length-1;this.animationGroups.forEach((i,o)=>{i.animations.forEach((r,a)=>{const c=r.effect;if(!c)return;const{delay:f,duration:u,iterations:l}=this.timingOptions[o][a],d=f+t[o],m=n-(d+u*l);if(i.isCSS&&this.sequenceId){const{target:h}=c;h instanceof HTMLElement&&(h.style.setProperty(`--motion-${this.sequenceId}-index`,`${o}`),h.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),c.updateTiming({endDelay:m})}else c.updateTiming({delay:d+this.delay,endDelay:m})})})}getSequenceActiveDuration(t){const n=[];for(let s=0;s<this.timingOptions.length;s++){const i=this.timingOptions[s].reduce((o,r)=>{if(!r)return o;const{delay:a,duration:c,iterations:f}=r;return Math.max(o,a+c*f)},0);n.push(t[s]+i)}return Math.max(...n)}addGroups(t){if(t.length===0)return;const n=[...t].sort((s,i)=>i.index-s.index);for(const{index:s,group:i}of n){const o=Math.min(s,this.animationGroups.length);this.animationGroups.splice(o,0,i),this.timingOptions.splice(o,0,i.getTimingOptions());const r=[...i.animations],a=this.animationGroups.slice(0,o).reduce((c,f)=>c+f.animations.length,0);this.animations.splice(a,0,...r)}this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(s=>s.ready)).then(()=>{})}removeGroups(t){const n=[],s=[],i=[];for(let o=0;o<this.animationGroups.length;o++)t(this.animationGroups[o])?n.push(this.animationGroups[o]):(s.push(this.animationGroups[o]),i.push(this.timingOptions[o]));if(n.length===0)return n;for(const o of n)o.cancel();return this.animationGroups=s,this.timingOptions=i,this.animations=s.flatMap(o=>[...o.animations]),this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(o=>o.ready)).then(()=>{}),n}async onFinish(t){try{await Promise.all(this.animationGroups.map(n=>n.finished)),t()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}}class gn{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(t,n,s,i){const o=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:r}=i;this._animation=new Animation(o,r),this._tickCbId=null,this.progress=null,this.customEffect=a=>t(o.target,a),this._finishHandler=a=>{this.effect.target?.getAnimations().find(c=>c===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 vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re={exports:{}},Fe=re.exports,Re;function yn(){return Re||(Re=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function i(){var u=this;u.reads=[],u.writes=[],u.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(u){for(var l;l=u.shift();)l()},measure:function(u,l){var d=l?u.bind(l):u;return this.reads.push(d),o(this),d},mutate:function(u,l){var d=l?u.bind(l):u;return this.writes.push(d),o(this),d},clear:function(u){return a(this.reads,u)||a(this.writes,u)},extend:function(u){if(typeof u!="object")throw new Error("expected object");var l=Object.create(this);return c(l,u),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function o(u){u.scheduled||(u.scheduled=!0,u.raf(r.bind(null,u)))}function r(u){var l=u.writes,d=u.reads,m;try{n("flushing reads",d.length),u.runTasks(d),n("flushing writes",l.length),u.runTasks(l)}catch(h){m=h}if(u.scheduled=!1,(d.length||l.length)&&o(u),m)if(n("task errored",m.message),u.catch)u.catch(m);else throw m}function a(u,l){var d=u.indexOf(l);return!!~d&&!!u.splice(d,1)}function c(u,l){for(var d in l)l.hasOwnProperty(d)&&(u[d]=l[d])}var f=t.fastdom=t.fastdom||new i;e.exports=f})(typeof window<"u"?window:typeof Fe<"u"?Fe:globalThis)})(re)),re.exports}var En=yn();const C=vn(En),$e={};function wn(e){Object.assign($e,e)}function $n(e){return e in $e?$e[e]:(console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function H(e,t){return e?(t||document).getElementById(e):null}function bn(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Sn(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function ve(e){return`${e.value}${nn(e.unit)}`}function Ne(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${ve(e.offset)}${t?` + ${t}`:""})`:t?`calc(${ve(e.offset)} + ${t})`:ve(e.offset)}`}function tt(e){return{start:Ne(e.startOffset,e.startOffsetAdd),end:Ne(e.endOffset,e.endOffsetAdd,!0)}}function nt(e){return t=>C.measure(()=>t(e))}function st(e){return t=>C.mutate(()=>t(e))}function B(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?$n(t):null}else if(e.keyframeEffect){const t=s=>{const{name:i,keyframes:o}=s.keyframeEffect;return[{...s,name:i,keyframes:o}]};return{web:t,style:t,getNames:s=>{const{effectId:i}=s,{name:o}=s.keyframeEffect,r=o||i;return r?[r]:[]}}}else if(e.customEffect)return t=>[{...t,keyframes:[]}];return null}function it(e,t,n,s){return e.map((i,o)=>{const r={fill:i.fill,easing:oe(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:Sn(i)};qe(t)?(r.duration=i.duration,r.delay=i.delay||0):t?.trigger==="view-progress"&&(s||window.ViewTimeline)?r.duration="auto":(r.duration=99.99,r.delay=.01);const a=cn(i.keyframes);return{effect:a===i.keyframes?i:{...i,keyframes:a},options:r,id:n&&`${n}-${o+1}`,part:i.part}})}function qe(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ze(e,t,n,s,i){if(e){if(qe(s)&&(t.duration=t.duration||1,i?.reducedMotion))if(t.iterations===1||t.iterations==null)t={...t,duration:1};else return[];let o;return n instanceof HTMLElement&&(o={measure:nt(n),mutate:st(n)}),e.web?e.web(t,o,i):e(t,o,i)}return[]}function ot(e,t,n,s,i){const o=typeof e=="string"?H(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const m=B(d),h=ze(m,t,o,n,s);return typeof h!="function"?null:h(o)}const r=B(t),a=ze(r,t,o,n,s);if(!a||a.length===0)return null;const c=it(a,n,t.effectId);let f;const u=n?.trigger==="view-progress";u&&window.ViewTimeline&&(f=new ViewTimeline({subject:n.element||H(n.componentId)}));const l=c.map(({effect:d,options:m,id:h,part:p})=>{const g=p?bn(o,p):o,v=new KeyframeEffect(g||null,[],m);C.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(d.keyframes)});const y=u&&f?{timeline:f}:{},E=typeof d.customEffect=="function"?new gn(d.customEffect,g||null,m,y):new Animation(v,y.timeline);if(u)if(f)C.mutate(()=>{const{start:$,end:b}=tt(d);E.rangeStart=$,E.rangeEnd=b,E.play()});else{const{startOffset:$,endOffset:b}=t;C.mutate(()=>{const S=d.startOffset||$,I=d.endOffset||b;Object.assign(E,{start:{name:S.name,offset:S.offset?.value,add:d.startOffsetAdd},end:{name:I.name,offset:I.offset?.value,add:d.endOffsetAdd}})})}return h&&(E.id=h),E});return new Q(l,{...t,trigger:{...n||{}},measured:new Promise(d=>C.mutate(d))})}function In(e,t){return e?`#${e}${t?`[data-motion-part~="${t}"]`:""}`:""}function Tn(e,t,n){const{duration:s,delay:i,iterations:o=1,fill:r,easing:a="linear",direction:c}=e.options,f=e.effect.name,u=s==="auto",{sequenceId:l,delay:d,offset:m,offsetEasing:h="linear"}=n||{};let p=`${i??0}ms`;if(l&&typeof h=="string"){const g=mn(h);if(g){const v=(i??0)+(d??0);if(m){const y=g(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);p=`calc(${`(${v} + ${y} * ${m} * var(--motion-${l}-last, 1))`} * 1ms)`}else p=`${v}ms`}}return`${f} ${u?"auto":`${s}ms`}${u?" ":` ${p} `}${a}${r&&r!=="none"?` ${r}`:""} ${!o||o===1/0?"infinite":o}${c==="normal"?"":` ${c}`} ${t?"":"paused"}`}function Cn(e,t,n){return e?.style?(qe(n)&&(t.duration=t.duration||1),e.style(t)):[]}function On(e,t,n,s){const i=B(t),o=Cn(i,t),r=it(o,n,t.effectId,!0),a=n?.trigger==="view-progress";return r.map((c,f)=>{const{start:u,end:l}=a?tt(c.effect):{};return{target:In(e,c.part),animation:Tn(c,a,s),composition:c.options.composite,custom:c.effect.custom,name:c.effect.name,keyframes:c.effect.keyframes,id:c.id&&`${c.id}-${f+1}`,animationTimeline:a?`--${n?.id}`:"",animationRange:u||l?`${u} ${l}`:""}})}function _n(e,t,n){const s=B(t),i=e instanceof HTMLElement?e:H(e);if(s&&s.prepare&&i){const o={measure:nt(i),mutate:st(i)};s.prepare(t,o)}n&&C.mutate(n)}function rt(e,t){const n=B(t);if(!n)return null;if(!n.style)return t.effectId&&e?An(e,t.effectId):null;const s=n.getNames(t),o=(typeof e=="string"?H(e):e)?.getAnimations(),r=o?.map(c=>c.animationName)||[],a=[];return s.forEach(c=>{r.includes(c)&&a.push(o?.find(f=>f.animationName===c))}),a?.length?new Q(a):null}function An(e,t){const s=(typeof e=="string"?H(e):e)?.getAnimations().filter(i=>{const o=i.id||i.animationName;return o?o.startsWith(t):!0});return s?.length?new Q(s):null}function at(e,t,n,s={}){const{disabled:i,allowActiveEvent:o,...r}=s,a=ot(e,t,n,r);if(!a)return null;let c={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const f=n.element||H(n.componentId),{ready:u}=a;return a.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:f,ready:u,getProgress(){return a.getProgress()},effect(d,m){const{activeDuration:h}=l.effect.getComputedTiming(),{delay:p}=l.effect.getTiming();l.currentTime=((p||0)+(h||0))*m},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const f=t,{centeredToTarget:u,transitionDuration:l,transitionEasing:d}=f,m=n.axis;if(f.keyframeEffect){const h=a;return h.animations?.length===0?null:{target:void 0,centeredToTarget:u,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(g,v){const y=m==="x"?v.x:v.y;this._currentProgress=y,h.progress(y)},disabled:i??!1,destroy(){h.cancel()}}}c={centeredToTarget:u,allowActiveEvent:o},t.customEffect&&l&&(c.transitionDuration=l,c.transitionEasing=et(d)),c.target=a.target}return{...c,getProgress(){return a.getProgress()},effect(f,u,l,d){a.progress(l?{...u,v:l,active:d}:u)},disabled:i,destroy(){a.cancel()}}}function X(e,t,n,s=!1){const i=rt(e,t);return i?(i.ready=new Promise(o=>{_n(e,t,o)}),i):ot(e,t,n,{reducedMotion:s})}function qn(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function ct(e,t){const n=[];for(const{target:s,options:i}of e){const o=qn(s);for(const r of o){const a=X(r,i,void 0,t?.reducedMotion);a instanceof Q&&n.push(a)}}return n}function kn(e,t,n){const s=ct(t,n);return new pn(s,e)}const ee={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Mn(e,t){const n=e?.name??ee.rangeStart.name,s=t?.name??e?.name??ee.rangeEnd.name,i={name:n,offset:e?.offset||ee.rangeStart.offset},o={name:s,offset:t?.offset||ee.rangeEnd.offset};return{startOffset:i,endOffset:o}}function P(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:i,endOffset:o}=Mn(t,n);return{id:"",startOffset:i,endOffset:o,...s}}function A(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function Z(e,t){e.get(t)?.forEach(s=>{const{source:i,target:o,cleanup:r}=s;r();const a=i===t?o:i;e.get(a)?.delete(s)}),e.delete(t)}const Pn={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},xn={root:null,rootMargin:"0px",threshold:[0]},Ln=.2;function Fn(e){const t=e.trim().split(/\s+/),n=t[0],s=t.length>1?t[1]:t[0],i=o=>o.startsWith("-")?o.slice(1):parseFloat(o)?`-${o}`:o;return`${i(n)} 0px ${i(s)}`}const K={},L=new WeakMap,le=new WeakSet,W=new WeakMap;let ut={},V=null;function Rn(e){ut=e}function ft(e,t,n){L.get(e)?.forEach(({source:i,handler:o})=>{i===e&&o(t,n)})}function je(){return V||(V=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||ft(n,!1,!0)})},xn),V)}function lt(e,t=!1){const n=JSON.stringify({...e,isSafeMode:t});if(K[n])return K[n];const s=e.threshold??Ln,i=t?Pn:{root:null,rootMargin:e.inset?Fn(e.inset):"0px",threshold:s},o=new IntersectionObserver(r=>{r.forEach(a=>{const c=a.target,f=!le.has(c);if(f&&(le.add(c),e.useSafeViewEnter&&!a.isIntersecting)){C.measure(()=>{const u=a.boundingClientRect.height,l=a.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&u*d>l&&C.mutate(()=>{o.unobserve(c);const h=lt(e,!0);W.set(c,h),h.observe(c)})});return}(a.isIntersecting||!f)&&ft(c,a.isIntersecting)})},i);return K[n]=o,o}function Nn(e,t,n,s={},{reducedMotion:i,selectorCondition:o,animation:r}={}){const a={...ut,...s},c=n.triggerType||"once",f=r||X(t,P(n),void 0,i);if(!f)return;const u=lt(a);c!=="once"&&f.persist?.();let l=!0,d=!1,m;m={source:e,target:t,handler:(g,v)=>{if(!(o&&!t.matches(o)))if(c==="once"){if(g&&!d){d=!0;const y=L.get(e);(!y||y.size===0||y.size===1&&y.has(m))&&((W.get(e)||u).unobserve(e),le.delete(e)),f.onFinish(()=>{L.get(e)?.delete(m),L.get(t)?.delete(m)}),f.play(()=>{const E=()=>{t.dataset.interactEnter="start"};if(f.isCSS){C.mutate(()=>{requestAnimationFrame(E)});const $=()=>{C.mutate(()=>{t.dataset.interactEnter="done"})};f.onFinish($),f.onAbort($)}else C.mutate(E)})}}else c==="alternate"?l&&g?(l=!1,f.play()):l||f.reverse():c==="repeat"?g?(f.progress(0),f.play()):v&&(f.pause(),f.progress(0)):c==="state"&&(g?f.play():v&&f.pause())},cleanup:()=>{(W.get(e)||u).unobserve(e),(c==="repeat"||c==="state")&&je().unobserve(e),f.cancel(),le.delete(e),W.delete(e)}},A(L,e,m),A(L,t,m),W.set(e,u),u.observe(e),(c==="repeat"||c==="state")&&je().observe(e)}function zn(e){Z(L,e)}function jn(){V=null,Object.keys(K).forEach(e=>delete K[e])}const Dn={add:Nn,remove:zn,setOptions:Rn,reset:jn};function dt(e,t){return Object.assign(Object.create(t),e)}function Hn(e,t,n,s){let i=e*(1-n)+t*n;if(s){const o=i-e;Math.abs(o)<s&&(i=e+s*Math.sign(o));const r=t-i;if(Math.abs(r)<s)return t}return i}function Gn(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function De(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function Wn(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 de(n[1],t)+de(n[6],t)}function de(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)?Wn(e,t):parseInt(e)||0:0}function R(e,t,n){const{name:s,offset:i=0}=e,{start:o,end:r}=n,a=r-o,c=i/100;let f,u;return s==="entry"?(f=o-t,u=Math.min(t,a)):s==="entry-crossing"?(f=o-t,u=a):s==="contain"?(f=Math.min(r-t,o),u=Math.abs(t-a)):s==="exit"?(f=Math.max(o,r-t),u=Math.min(t,a)):s==="exit-crossing"?(f=o,u=a):s==="cover"&&(f=o-t,u=a+t),f+c*u|0}function ye(e,t,n,s,i){let o=0;const r={start:t,end:n};return e.forEach((a,c)=>{o+=a.offset;const f=a.sticky;if(f){if("end"in f&&e[c-1]?.element){const d=((i?a.element.offsetWidth:a.element.offsetHeight)||0)+f.end-s,m=o+d-a.offset,h=m<r.start,p=!h&&m<=n;let g=0;(h||p)&&(g=a.offset,r.end+=g),h&&(r.start+=g)}if("start"in f){const u=o-f.start,l=u<r.start,d=!l&&u<=r.end;let m=0;const h=e[c-1]?.element;if(h){if(l||d){const p=(i?h.offsetWidth:h.offsetHeight)||0,g=a.offset,v=(i?a.element.offsetWidth:a.element.offsetHeight)||0;m=p-(g+v),o+=m,r.end+=m}l&&(r.start+=m)}}}}),r}function Vn(e,t,n,s,i,o){const{start:r,end:a,duration:c}=e;let f=r,u=a,l=e.startRange,d=e.endRange,m;if(typeof c=="string"){l={name:c,offset:0},d={name:c,offset:100},f=R(l,n,t),u=R(d,n,t),m=u-f;const h=ye(o,f,u,n,s);f=h.start,u=h.end}else{if(l||r?.name){l=l||r;const h=de(l.add,i),p=R({...l,offset:0},n,t),g=R({...l,offset:100},n,t),v=ye(o,p,g,n,s);f=v.start+l.offset/100*(v.end-v.start)+h}if(d||a?.name){d=d||a;const h=de(d.add,i),p=R({...d,offset:0},n,t),g=R({...d,offset:100},n,t),v=ye(o,p,g,n,s);u=v.start+d.offset/100*(v.end-v.start)+h}else typeof c=="number"&&(u=f+c)}return!m&&!c&&(m=u-f),{...e,start:f,end:u,startRange:l,endRange:d,duration:m||c}}function Yn(e){return e.position==="sticky"}function Kn(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function Bn(e,t){return parseInt(t?e.left:e.top)}function Un(e,t){return parseInt(t?e.right:e.bottom)}function Qn(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function Xn(e,t){let n;const s=Bn(e,t),i=Un(e,t),o=!isNaN(s),r=!isNaN(i);return(o||r)&&(n={},o&&(n.start=s),r&&(n.end=i)),n}function te(e,t,n,s,i){const o=e[0].viewSource,r=[];let a=(s?o.offsetWidth:o.offsetHeight)||0,c=0,f=o;for(;f;){const l=window.getComputedStyle(f),d=Yn(l),m=d?Xn(l,s):void 0,h=Qn(f,s,d);if((!m||!("end"in m))&&(c+=h),r.push({element:f,offset:h,sticky:m}),f=f.offsetParent,Kn(l,f,t))break;if(f===t){r.push({element:f,offset:0});break}}return r.reverse(),e.map(l=>({...Vn(l,{start:c,end:c+a},n,s,i,r)}))}const He=100,Zn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function Jn(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function Ge(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function es(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function ts(e){const t=dt(e,Zn),n=t.root,s=t.horizontal,i=new WeakMap;let o=Ge(n,s),r,a,c,f,u;const l=[],d=es();if(t.scenes=Object.values(e.scenes.reduce((p,g,v)=>{const y=g.groupId?`group-${g.groupId}`:String(v);return p[y]?p[y].push(g):p[y]=[g],p},{})).flatMap(p=>(p.every(g=>g.viewSource&&(typeof g.duration=="string"||g.start?.name))?(p=te(p,n,o,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(p)):p.forEach(g=>{g.end==null&&(g.end=g.start+g.duration),g.duration==null&&(g.duration=g.end-g.start)}),p)),t.scenes.forEach((p,g)=>{p.index=g}),l.length){const p=new Map;window.ResizeObserver&&(c=new window.ResizeObserver(function(g){g.forEach(v=>{const y=p.get(v.target),E=te(y,n,o,s,d);E.forEach(($,b)=>{t.scenes[$.index]=E[b]}),l.splice(l.indexOf(y),1,E)})}),l.forEach(g=>{c.observe(g[0].viewSource,{box:"border-box"}),p.set(g[0].viewSource,g)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(De(()=>{const v=l.map(y=>{const E=te(y,n,o,s,d);return E.forEach(($,b)=>{t.scenes[$.index]=E[b]}),E});l.length=0,l.push(...v),l.forEach(y=>{p.set(y[0].viewSource,y)})},He)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(f=De(function(){o=Ge(n,s);const g=l.map(v=>{const y=te(v,n,o,s,d);return y.forEach((E,$)=>{t.scenes[E.index]=y[$]}),y});l.length=0,l.push(...g),l.forEach(v=>{p.set(v[0].viewSource,v)})},He),n===window?window.addEventListener("resize",f):window.ResizeObserver&&(u=new window.ResizeObserver(f),u.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(a=new window.IntersectionObserver(function(p){p.forEach(g=>{(i.get(g.target)||[]).forEach(v=>{v.disabled=!g.isIntersecting})})},{root:n===window?window.document:n,rootMargin:t.viewportRootMargin,threshold:0}),t.scenes.forEach(p=>{if(p.viewSource){let g=i.get(p.viewSource);g||(g=[],i.set(p.viewSource,g),a.observe(p.viewSource)),g.push(p)}}));function m({p,vp:g}){p=+p.toFixed(1);const v=+g.toFixed(4);if(p!==r){for(let y of t.scenes)if(!y.disabled){const{start:E,end:$,duration:b}=y,S=Jn(p,E,$,b);y.effect(y,S,v)}r=p}}function h(){t.scenes.forEach(p=>p.destroy?.()),a&&(a.disconnect(),a=null),c&&(c.disconnect(),c=null),f&&(u?(u.disconnect(),u=null):window.removeEventListener("resize",f))}return{tick:m,destroy:h}}const ns={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class ss{constructor(t={}){this.config=dt(t,ns),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=Gn(()=>{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,i=t.y||t.y===0?t.y:n.scrollY||n.scrollTop||0,o=this.config.horizontal?s:i;this.progress.p=o,this.progress.prevP=o,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=o,this.currentProgress.prevP=o,this.currentProgress.vp=0),t&&this.config.root.scrollTo(s,i)}tick(t){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const i=s.p-s.prevP,o=i<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(i))/this.config.velocityMax*o}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=Hn(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=ts(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const be=new WeakMap;let ht=()=>({});function is(e){ht=e}function os(e,t,n,s,{reducedMotion:i}){if(i)return;const o={trigger:"view-progress",element:e},r=P(n);let a;if("ViewTimeline"in window){const f=X(t,r,o);f&&!f.isCSS&&(f.play(),a=()=>{f.ready.then(()=>{f.cancel()})})}else{const f=at(t,r,o);if(f){const u=Array.isArray(f)?f:[f],l=new ss({viewSource:e,scenes:u,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...ht()});a=()=>{l.destroy()},Promise.all(u.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!a)return;const c={source:e,target:t,cleanup:a};A(be,e,c),A(be,t,c)}function rs(e){Z(be,e)}const as={add:os,remove:rs,registerOptionsGetter:is};function We(e,t,n){return Math.min(Math.max(e,n),t)}function Ve(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function cs(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 us(){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 fs(){return new Promise(e=>{const t=window.scrollY;let n=!1,s;function i(){document.body.addEventListener("pointerdown",a=>{s===void 0?s=a.offsetY:n=a.offsetY===s},{once:!0});const r=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(r)}function o(){window.scrollY!==t&&(window.removeEventListener("scroll",o),i(),e(n))}i(),window.addEventListener("scroll",o),window.scrollY>0&&window.scrollBy(0,-1)})}function ls(e){fs().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let ne=0;const ae=new Set;function ds(){const e=n=>{for(let s of n.changedTouches)ae.add(s.identifier)},t=n=>{for(let s of n.changedTouches)ae.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){ae.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function hs(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;ne||(s=ds()),ne+=1;function i(o){clearTimeout(n),n=setTimeout(()=>{ae.size?setTimeout(i,100):(t(o),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),ne-=1,ne||s()}}function ms(e,t,n){return{x(s){const i=e.left-n.x+e.width/2,o=i>=t.width/2,r=(o?i:t.width-i)*2,a=o?0:i-r/2;return(s-a)/r},y(s){const i=e.top-n.y+e.height/2,o=i>=t.height/2,r=(o?i:t.height-i)*2,a=o?0:i-r/2;return(s-a)/r}}}function ps(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function gs(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function vs(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 ys(e){let t=!1,n={x:e.rect.width/2,y:e.rect.height/2,vx:0,vy:0},s,i,o,r,a;const c={x:0,y:0};e.scenes.forEach(u=>{u.target&&u.centeredToTarget&&(u.transform=ms(cs(u.target),e.rect,c),t=!0),e.root?i=vs(e):(o=gs.bind(null,e),window.addEventListener("resize",o))}),s=function(u){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(u.x)||u.x/e.rect.width,m=l.transform?.y(u.y)||u.y/e.rect.height,h=+We(0,1,d).toPrecision(4),p=+We(0,1,m).toPrecision(4),g={x:u.vx,y:u.vy};e.allowActiveEvent&&(u.active=d<=1&&m<=1&&d>=0&&m>=0),l.effect(l,{x:h,y:p},g,u.active)}Object.assign(n,u)},t&&(r=ps.bind(c,s,n),a=hs(document,r));function f(){e.scenes.forEach(u=>u.destroy?.()),a?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",o),o=null),s=null,n=null}return{tick:s,destroy:f}}const Es=1e3/60*3;let se;function ws(){N.x=window.scrollX,N.y=window.scrollY}const N={x:0,y:0,scrollHandler:ws,fixRequired:void 0};class $s{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():Ve(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):Ve(()=>{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=i=>{const o=this.config.root?i.offsetX:i.x,r=this.config.root?i.offsetY:i.y;this.progress.vx=o-this.progress.x,this.progress.vy=r-this.progress.y,this.progress.x=o,this.progress.y=r,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){se=typeof se=="boolean"?se:us();const i=se?window.devicePixelRatio:1;typeof N.fixRequired>"u"&&ls(N),this._measure=o=>{if(o.target!==this.config.root){const r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:o.x*i+N.x,clientY:o.y*i+N.y});o.stopPropagation(),this.config.root.dispatchEvent(r)}else s(o)}}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||(r=>r),s=performance.now();let i=!1;const o=r=>{const a=(r-this._startTime)/t,c=n(Math.min(1,a));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((f,[u,l])=>(u==="active"?f[u]=l:f[u]=this.previousProgress[u]+(l-this.previousProgress[u])*c,f),this.currentProgress||{}),a<1&&(this._nextTransitionTick=requestAnimationFrame(o),i=r-this._startTime>Es),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,o(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=ys(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Se=new WeakMap;let mt=()=>({});function bs(e){mt=e}function Ss(e,t,n,s={},{reducedMotion:i}){if(i)return;const o={trigger:"pointer-move",element:e,axis:s.axis??"y"},r=at(t,P(n),o);if(r){const a=Array.isArray(r)?r:[r],c=new $s({root:s.hitArea==="self"?e:void 0,scenes:a,...mt()}),u={source:e,target:t,cleanup:()=>{c.destroy()}};A(Se,e,u),A(Se,t,u),Promise.all(a.map(l=>l.ready||Promise.resolve())).then(()=>{c.start()})}}function Is(e){Z(Se,e)}const Ts={add:Ss,remove:Is,registerOptionsGetter:bs},Ie=new WeakMap;function Cs(e,t,n,s,{reducedMotion:i,selectorCondition:o,animation:r,sourceAnimationOptions:a}){const c=r||X(t,P(n),void 0,i);if(!c)return;const{effectId:f}=s,u=m=>{if(o&&!t.matches(o))return;const h=m.animationName,p=m.detail?.effectId,g=a?rt(e,a):null;if(g){if(g.playState==="running"||h&&!g.hasAnimationName(h))return;if(p&&p!==f&&!g.hasAnimationId(p))return}c.play()},d={source:e,target:t,cleanup:()=>{c.cancel(),e.removeEventListener("animationend",u)}};A(Ie,e,d),A(Ie,t,d),e.addEventListener("animationend",u)}function Os(e){Z(Ie,e)}const _s={add:Cs,remove:Os};function As(e,t,n=!1,s,i,o){const r=o||X(e,P(t),void 0,n);if(!r)return null;let a=!0;const c=t.triggerType||"alternate";return f=>{if(s&&!e.matches(s))return;const u=!i,l=i?.enter?.includes(f.type),d=i?.leave?.includes(f.type);if(l||u){if(c==="alternate"||c==="state")a?(a=!1,r.play()):c==="alternate"?r.reverse():c==="state"&&(r.playState==="running"?r.pause():r.playState!=="finished"&&r.play());else{if(r.progress(0),delete e.dataset.interactEnter,r.isCSS){const m=()=>{C.mutate(()=>{e.dataset.interactEnter="done"})};r.onFinish(m),r.onAbort(m)}r.play()}return}d&&(c==="alternate"?r.reverse():c==="repeat"?(r.cancel(),C.mutate(()=>{delete e.dataset.interactEnter})):c==="state"&&r.playState==="running"&&r.pause())}}function qs(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:o},r,a){const c=!!s,f=o??"toggle",u=f==="toggle";return l=>{if(r&&!e.matches(r))return;const d=c?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,m=!a,h=a?.enter?.includes(l.type),p=a?.leave?.includes(l.type);m?t.toggleEffect(n,f,d):(h&&t.toggleEffect(n,u?"add":f,d),p&&u&&t.toggleEffect(n,"remove",d))}}const Te=new WeakMap;function Ye(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function ks(e){return t=>{const n=t;n.pointerType&&e(n)}}function Ms(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const Ps={focusin:(e,t)=>Ye(e,t),focusout:(e,t)=>Ye(e,t),click:(e,t)=>ks(t),keydown:(e,t)=>Ms(t)};function xs(e,t,n){const s=Ps[e];return s?s(t,n):i=>n(i)}function Ls(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function Fs(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(Ls(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function Rs(e){return!!(e.enter?.length||e.leave?.length)}function Ns(e){return Rs(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function zs(e,t,n,s,{reducedMotion:i,targetController:o,selectorCondition:r,animation:a}){const c=Fs(s.eventConfig),f=n.transition||n.transitionProperties,u=Ns(c);let l,d=!1;if(f?l=qs(t,o,n,r,u):(l=As(t,n,i,r,u,a),d=n.triggerType==="once"),!l)return;const m=l,h=new AbortController;function p(y,E,$){const b=xs(E,e,m);y.addEventListener(E,b,{...$,signal:h.signal})}const v={source:e,target:t,cleanup:()=>{h.abort()}};if(A(Te,e,v),A(Te,t,v),u){const y=c.enter,E=c.leave;y.forEach(S=>{S==="focusin"&&(e.tabIndex=0),p(e,S,{passive:!0,once:d})});const $=!n.stateAction||n.stateAction==="toggle";(f?$:n.triggerType!=="once")&&E.forEach(S=>{if(S==="focusout"){p(e,S,{once:d});return}p(e,S,{passive:!0})})}else(c.toggle??[]).forEach(E=>{p(e,E,{once:d,passive:E!=="keydown"})})}function js(e){Z(Te,e)}const Y={add:zs,remove:js},Ce={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},Ke={click:Ce.activate,hover:Ce.interest};function ie(e){const t=Ce[e];return(n,s,i,o,r)=>{const a=r?.allowA11yTriggers&&e in Ke?Ke[e]:t;Y.add(n,s,i,{eventConfig:a},r??{})}}const j={viewEnter:Dn,hover:{add:ie("hover"),remove:Y.remove},click:{add:ie("click"),remove:Y.remove},animationEnd:_s,viewProgress:as,pointerMove:Ts,activate:{add:ie("activate"),remove:Y.remove},interest:{add:ie("interest"),remove:Y.remove}};function Ds(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;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;constructor(){this.dataCache={effects:{},sequences:{},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?.useCustomElement??!!w.defineInteractElement;this.dataCache=Gs(t,s);const i=w.defineInteractElement?.();s&&i===!1?document.querySelectorAll("interact-element").forEach(o=>{o.connect()}):w.controllerCache.forEach((o,r)=>o.connect(r))}destroy({clearCache:t=!1}={}){for(const n of this.controllers)n.disconnect({removeFromCache:t});for(const[,n]of this.mediaQueryListeners.entries())n.mql.removeEventListener("change",n.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},sequences:{},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=Ds(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(i=>{const o=q(i,t);delete this.addedInteractions[o]});const s=`${t}::seq::`;for(const i of w.sequenceCache.keys())i.startsWith(s)&&(w.sequenceCache.delete(i),delete this.addedInteractions[i])}setupMediaQueryListener(t,n,s,i){this.mediaQueryListeners.has(t)||(n.addEventListener("change",i),this.mediaQueryListeners.set(t,{mql:n,handler:i,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(),w.sequenceCache.clear(),w.elementSequenceMap=new WeakMap}static setup(t){t.scrollOptionsGetter&&j.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&j.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&j.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers)}static getInstance(t){const n=w.instances.find(s=>s.has(t));return n||console.warn(`Interact: Instance for key "${t}" not found`),n}static getController(t){const n=t?w.controllerCache.get(t):void 0;return n||console.warn(`Interact: Controller for key "${t}" not found`),n}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=wn;static use(t,n){w.plugins.set(t,n)}static getPlugin(t){return w.plugins.get(t)}static getPluginsNames(){return new Set(w.plugins.keys())}static getSequence(t,n,s,i){const o=w.sequenceCache.get(t);if(o)return o;const r=kn(n,s,i);return w.sequenceCache.set(t,r),w._registerSequenceElements(s,r),r}static addToSequence(t,n,s,i){const o=w.sequenceCache.get(t);if(!o)return!1;const a=ct(n,i).map((c,f)=>({index:s[f]??o.animationGroups.length,group:c}));return o.addGroups(a),w._registerSequenceElements(n,o),!0}static _registerSequenceElements(t,n){for(const{target:s}of t){const i=Array.isArray(s)?s:s instanceof HTMLElement?[s]:[];for(const o of i){let r=w.elementSequenceMap.get(o);r||(r=new Set,w.elementSequenceMap.set(o,r)),r.add(n)}}}static removeFromSequences(t){for(const n of t){const s=w.elementSequenceMap.get(n);if(s){for(const i of s)i.removeGroups(o=>o.animations.some(r=>r.effect?.target===n));w.elementSequenceMap.delete(n)}}}}let Hs=0;function D(e,{asCombinator:t=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(e.listContainer){const i=`${n&&e.listItemSelector?` > ${e.listItemSelector}`:""}`;return e.selector?`${e.listContainer}${i} ${e.selector}`:`${e.listContainer}${i||" > *"}`}else if(e.selector)return e.selector;return s?t?"> :first-child":":scope > :first-child":""}function Be(e){return"sequenceId"in e&&!("effects"in e)}function Ee(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function Gs(e,t=!1){const{effects:n={},sequences:s={},conditions:i={}}=e,o={};return e.interactions?.forEach((r,a)=>{const c=r.key,f=++Hs,{effects:u,sequences:l,...d}=r;if(!c){console.error(`Interaction ${f} is missing a key for source element.`);return}Ee(o,c);const m=u?Array.from(u):[];m.reverse();const h=l?.map((v,y)=>{if(Be(v)){const $=s[v.sequenceId];return $?{...$,...v}:(console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`),v)}const E=v;return E.sequenceId||(E.sequenceId=`seq-${a}-${y}`),E}),p={...d,effects:m.length>0?m:void 0,sequences:h};o[c].triggers.push(p),o[c].selectors.add(D(p,{useFirstChild:t}));const g=p.listContainer;m.forEach((v,y)=>{let E=v.key;if(!E&&v.effectId){const I=n[v.effectId];I&&(E=I.key)}v.effectId||(v.effectId=`eff-${a}-${m.length-1-y}`),E=E||c,v.key=E;const $=v.effectId;if(g&&v.listContainer&&(E!==c||v.listContainer!==g))return;const b=`${c}::${E}::${$}::${f}`;if(v.interactionId=b,o[c].interactionIds.add(b),E===c)return;const S=Ee(o,E);S.effects[b]||(S.effects[b]=[],S.interactionIds.add(b)),S.effects[b].push({...d,effect:v}),S.selectors.add(D(v,{useFirstChild:t}))}),h?.forEach(v=>{if(!v||Be(v))return;const y=v,E=y.sequenceId;y.effects.forEach((b,S)=>{b.effectId||(b.effectId=`eff-${E}-${S}`);let I=b.key;if(!I&&b.effectId){const T=n[b.effectId];T&&(I=T.key)}I=I||c;const O=D(b,{useFirstChild:t});if(O&&o[c].selectors.add(O),I!==c){const T=Ee(o,I),_=`${I}::seq::${E}::${f}`;T.sequences[_]||(T.sequences[_]=[],T.interactionIds.add(_)),T.sequences[_].push({...d,sequence:y}),T.selectors.add(O)}})})}),{effects:n,sequences:s,conditions:i,interactions:o}}const pt="$";function Ws(e,t=2){return parseFloat(e.toFixed(t))}function Vs(e){return/\[]/g.test(e)}function Ys(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ce(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function U(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function gt(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:fe(i.name)}))}function vt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:o,delay:r}=t;i&&(t.styleProperties.some(c=>c.name.startsWith("--"))?s=[`all ${i}ms ${oe(o||"ease")}${r?` ${r}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(c=>`${fe(c.name)} ${i}ms ${oe(o||"ease")}${r?` ${r}ms`:""}`))}else s=n?.filter(i=>i.duration).map(i=>`${fe(i.name)} ${i.duration}ms ${oe(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function Ks({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:o}){const r=vt({transition:n,transitionProperties:s}),a=gt({transition:n,transitionProperties:s}).map(h=>`${h.name}: ${h.value};`),c=e.replace(/"/g,"'"),f=`:is(:state(${t}), :--${t}) ${i}`,u=`[data-interact-effect~="${t}"] ${i}`,l=o?ce(f,o):f,d=o?ce(u,o):u,m=[`${l},
|
|
2
2
|
${d} {
|
|
3
3
|
${a.join(`
|
|
4
4
|
`)}
|
|
@@ -21,4 +21,4 @@ ${i.map(({name:r,value:a})=>` ${r}: ${a};`).join(`
|
|
|
21
21
|
`)}
|
|
22
22
|
}`}const li=[{name:"visibility",value:"hidden"},{name:"transform",value:"none",important:!0},{name:"translate",value:"none",important:!0},{name:"scale",value:"none",important:!0},{name:"rotate",value:"none",important:!0}],di={animation:!1,transition:!1};function hi(e,t){const n=()=>({listIndex:0,slotCursor:0,slotsInInteraction:0,slotsInSequence:0,touched:!1});return{key:e,childSelector:t,assigned:new Set,animation:n(),transition:n()}}function mi(e,t){return Object.fromEntries(ke.map(n=>{const s=Ae(n),{listIndex:i,slotCursor:o,slotsInSequence:r}=e[s];return[n,t[s]?F(n,o+r,!0):F(n,i)]}))}function pi(e,t,n){Me.forEach(s=>{t[s]&&(e[s].touched=!0,n[s]&&(e[s].slotsInSequence+=1))})}function gi(e){const{namedEffect:t,keyframeEffect:n,transition:s,transitionProperties:i}=e;return t||n?"animation":s||i?"transition":null}function vi(e){const t=new Map;return e.effects.forEach(n=>{const s=gi(n);if(!s)return;const i=ue(n),o=t.get(i)||{animation:0,transition:0};o[s]+=1,t.set(i,o)}),new Map([...t].map(([n,{animation:s,transition:i}])=>[n,{animation:s>1,transition:i>1}]))}function yi(e){Me.forEach(t=>{const n=e[t];n.slotsInInteraction=Math.max(n.slotsInInteraction,n.slotsInSequence),n.slotsInSequence=0})}function Ei(e){Me.forEach(t=>{const n=e[t];n.listIndex+=n.touched?1:0,n.slotCursor+=n.slotsInInteraction,n.slotsInInteraction=0,n.touched=!1})}const wi={animation:"animation","animation-composition":"composition","animation-timeline":"animationTimeline","animation-range":"animationRange"};function $i(e,t,n){const{key:s,conditions:i}=t,o=J(i,e.configConditions,"media"),r=M(i,e.configConditions),a=D(t,{asCombinator:!0,useFirstChild:e.useFirstChild,addItemFilter:!0});return{key:s,media:o,selectorCondition:r,childSelector:a,declarations:[{name:"view-timeline",value:`--${n}`}]}}function _t(e,t,n,s,i){const o=[];for(const r of Object.keys(i)){const a=`${pt}${r}`;a in t&&o.push(...i[r](t[a],{key:n,scope:e,config:t}).map(c=>({...c,key:n,media:s})))}return o}function bi(e,t,n,s,i,o){const{assigned:r,childSelector:a}=n,c={animation:!1,transition:!1},{key:f,effectId:u,conditions:l,namedEffect:d,keyframeEffect:m,transition:h,transitionProperties:p,initial:g}=t,v=J(l,e.configConditions,"media"),y=M(l,e.configConditions),E=[{key:f,media:v,selectorCondition:y,childSelector:a,declarations:[]}];let $=[];const{declarations:b}=E[0];if(e.plugins&&E.push(..._t("effect",t,f,v,e.plugins)),d||m){const S=P(t),I=On(null,S,s,o).filter(T=>T.name);$=I.map(T=>({name:T.name,keyframes:T.keyframes})),b.push(...I.flatMap(({custom:T})=>Object.entries(T||{}).filter(([_,x])=>x!==void 0).map(([_,x])=>({name:_,value:x}))));const O=pe.map(T=>({_listPropertyName:T,name:i[T],value:I.map(_=>{const x=wi[T];return _[x]||z[T]}).join(", ")})).filter(({_listPropertyName:T,name:_,value:x})=>x!==z[T]||r.has(_));O.forEach(({name:T})=>r.add(T)),c.animation=O.length>0,g?(E.push({key:f,media:v,selectorCondition:y,childSelector:a,declarations:li,selectorSuffix:":not([data-interact-enter])"}),E.push({key:f,media:v,selectorCondition:y,childSelector:a,declarations:O,selectorSuffix:':not([data-interact-enter="done"])'})):b.push(...O)}else if(h||p){const S=gt(t),I=vt(t);(I.length||r.has(i.transition))&&(b.push({name:i.transition,value:I.join(", ")||z.transition}),r.add(i.transition),c.transition=!0),E.push({key:f,media:v,selectorCondition:y,childSelector:a,states:[u],declarations:S})}else b.push(...pe.filter(S=>r.has(i[S])).map(S=>({name:i[S],value:z[S]})));return{rules:E.filter(S=>S.declarations.length),keyframes:$,wrote:c}}function At(e,t,n,s,i,o){const r=ue(t),a=e.targetsMap.get(r)||hi(t.key,D(t,{asCombinator:!0,useFirstChild:e.useFirstChild,addItemFilter:!0}));s.add(r);const c=o?.get(r)||di,f=mi(a,c),{rules:u,keyframes:l,wrote:d}=bi(e,t,a,n,f,i);return l.forEach(({name:m,keyframes:h})=>e.keyframesMap.set(m,h)),pi(a,d,c),e.targetsMap.set(r,a),u}function Si(e,t,n,s){const i=[],o=new Set,r=vi(t);i.push(...t.effects.flatMap(c=>At(e,c,n,o,t,r)));const{conditions:a}=t;return o.forEach(c=>{s.add(c);const f=e.targetsMap.get(c),u=ui(f,a,e.configConditions);u&&(u.declarations.forEach(({name:l})=>f.assigned.add(l)),i.push(u)),yi(f)}),i}function Ii(e,t,n){const{key:s,conditions:i,effects:o=[],sequences:r=[]}=t,a=e.plugins?_t("interaction",t,s,J(i,e.configConditions,"media"),e.plugins):[],{trigger:c}=t,f={trigger:Ys(c),id:["trigger",n].join("-")};c==="viewProgress"&&a.push($i(e,t,f.id));const u=new Set,l=o.map((m,h)=>Ot(m,t,e.config,`eff-${n}-${h}`)).filter(m=>m!==null);a.push(...l.flatMap(m=>At(e,m,f,u)));const d=r.map((m,h)=>ni(m,t,e.config,`seq-${n}-${h}`)).filter(m=>m!==null);return a.push(...d.flatMap(m=>Si(e,m,f,u))),u.forEach(m=>Ei(e.targetsMap.get(m))),a}function Ti(e={}){const{useFirstChild:t=!0,plugins:n}=typeof e=="boolean"?{useFirstChild:e,plugins:void 0}:e;return{useFirstChild:t,plugins:n}}function Ci(e,t){const{useFirstChild:n,plugins:s}=Ti(t),i={config:e,configConditions:e.conditions||{},targetsMap:new Map,keyframesMap:new Map,useFirstChild:n,plugins:s},o=e.interactions.flatMap((m,h)=>Ii(i,m,h)),r=[...i.targetsMap.values()],a=Math.max(0,...r.map(({animation:m})=>m.listIndex)),c=Math.max(0,...r.map(({transition:m})=>m.listIndex)),f=fi(r,a,c),u=Math.max(0,...r.map(({animation:m})=>m.slotCursor)),l=Math.max(0,...r.map(({transition:m})=>m.slotCursor)),d=ci(a,c,u,l);return{keyframes:i.keyframesMap,atProperty:d,cssRules:o,listsRule:f}}function Oi(e,t){const{cssRules:n,keyframes:s,atProperty:i,listsRule:o}=Ci(e,t);return[...i,...[...s.entries()].map(([a,c])=>ri(a,c)),...n.map(ai),o].filter(a=>a).join(`
|
|
23
23
|
`)}exports.I=Tt;exports.a=w;exports.b=ei;exports.g=Oi;exports.r=ti;
|
|
24
|
-
//# sourceMappingURL=index-
|
|
24
|
+
//# sourceMappingURL=index-DsygTJ-K.js.map
|