@wix/interact 2.8.6 → 2.8.7
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-DSREj0qw.mjs → index-BqQ8gxQF.mjs} +497 -492
- package/dist/{index-DSREj0qw.mjs.map → index-BqQ8gxQF.mjs.map} +1 -1
- package/dist/{index-D8zv4Q-3.js → index-OPFFsr0c.js} +13 -13
- package/dist/{index-D8zv4Q-3.js.map → index-OPFFsr0c.js.map} +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";function _n(e){return[...e.matchAll(/\[([^\]]+)]/g)].map(([t,n])=>n)}function R(e,t){const n=_n(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function Tn(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&B(e)===B(t)}function B(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}const Xe="$";class ce{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 Pt=e=>e,Mn=e=>1-Math.cos(e*Math.PI/2),On=e=>Math.sin(e*Math.PI/2),Pn=e=>-(Math.cos(Math.PI*e)-1)/2,Cn=e=>e**2,An=e=>1-(1-e)**2,kn=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,qn=e=>e**3,Rn=e=>1-(1-e)**3,Ln=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Fn=e=>e**4,xn=e=>1-(1-e)**4,Nn=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Dn=e=>e**5,jn=e=>1-(1-e)**5,zn=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Hn=e=>e===0?0:2**(10*e-10),Gn=e=>e===1?1:1-2**(-10*e),Wn=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Vn=e=>1-Math.sqrt(1-e**2),Bn=e=>Math.sqrt(1-(e-1)**2),Yn=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,Un=e=>2.70158*e**3-1.70158*e**2,Kn=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,Xn=(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,at={linear:Pt,sineIn:Mn,sineOut:On,sineInOut:Pn,quadIn:Cn,quadOut:An,quadInOut:kn,cubicIn:qn,cubicOut:Rn,cubicInOut:Ln,quartIn:Fn,quartOut:xn,quartInOut:Nn,quintIn:Dn,quintOut:jn,quintInOut:zn,expoIn:Hn,expoOut:Gn,expoInOut:Wn,circIn:Vn,circOut:Bn,circInOut:Yn,backIn:Un,backOut:Kn,backInOut:Xn},Q=(e,t,n,s,i)=>{const o=3*t,r=3*(s-2*t),a=1-3*s+3*t,c=3*n,u=3*(i-2*n),f=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),h=2*Math.pow(r,3)-9*o*r*a,p=54*Math.pow(a,3),m=(3*a*o-r*r)/(9*a*a),g=`((${h} - ${27*a*a} * ${e}) / ${p})`;if(m<0){const v=2*Math.sqrt(-m);let y=0;for(const E of[0,1,2])[0,.25,.5,.75,1].every($=>{const _=Math.min(Math.max(2*(h-27*a*a*$)/(p*m*v),-1),1),I=v*Math.cos((Math.acos(_)-E*2*Math.PI)/3)-d;return I>=-1e-6&&I<=1.000001})&&(y=E);const b=`(acos(clamp(-1, ${2/(m*v)} * ${g}, 1)) - ${360*y}deg) / 3`;l=`(${v} * cos(${b}) - ${d})`}else{const v=`sqrt(pow(${g}, 2) + ${Math.pow(m,3)})`;l=`(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`}}return`(${f} * pow(${l}, 3) + ${u} * pow(${l}, 2) + ${c} * ${l})`},ct={linear:e=>e,ease:e=>Q(e,.25,.1,.25,1),easeIn:e=>Q(e,.42,0,1,1),easeOut:e=>Q(e,0,0,.58,1),easeInOut:e=>Q(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)`},ft={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 Qn(e){return e==="percentage"?"%":e||"px"}const Zn=/^(webkit|moz|ms|o)(?=[A-Z])/,Jn=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function $e(e){return e.startsWith("--")?e:(Zn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function es(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Ct(e){return Jn[e]||es(e)}function ts(e){for(const t in e)if(Object.hasOwn(e,t)&&Ct(t)!==t)return!0;return!1}function At(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!ts(n))return;t??=e.slice();const i={};for(const o in n)Object.hasOwn(n,o)&&(i[Ct(o)]=n[o]);t[s]=i}),t||e}function ye(e){return e?ft[e]||e:ft.linear}function ns(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,u=1-a-c,f=p=>((r*p+o)*p+i)*p,l=p=>((u*p+c)*p+a)*p,d=p=>(3*r*p+2*o)*p+i;function h(p){let m=p;for(let y=0;y<8;y++){const b=f(m)-p;if(Math.abs(b)<1e-7)return m;const E=d(m);if(Math.abs(E)<1e-6)break;m-=b/E}let g=0,v=1;for(m=(g+v)/2;v-g>1e-7;){const y=f(m);if(Math.abs(y-p)<1e-7)return m;p>y?g=m:v=m,m=(g+v)/2}return m}return p=>p<=0?0:p>=1?1:l(h(p))}function kt(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 ss(e){const t=kt(e);if(!(!t||t.some(isNaN)))return ns(...t)}function is(e){const t=kt(e);if(!(!t||t.some(isNaN)))return n=>Q(n,...t)}function qt(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 u=1;u<r.length;u++)if(r[u].endsWith("%")){const f=parseFloat(r[u])/100;if(isNaN(f))return;c.push(f)}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,u=r-o;for(let f=o+1;f<r;f++)s[f].pos=a+(c-a)*(f-o)/u;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 os(e){const t=qt(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 rs(e){const t=qt(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 Qe(e){if(!e)return;const t=at[e];return t||(ss(e)??os(e)??at.linear)}function as(e){if(!e)return;const t=ct[e];return t||(is(e)??rs(e)??ct.linear)}class cs extends ce{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:Qe(n.offsetEasing)??Pt,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:u,duration:f,iterations:l}=this.timingOptions[o][a],d=u+t[o],h=n-(d+f*l);if(i.isCSS&&this.sequenceId){const{target:p}=c;p instanceof HTMLElement&&(p.style.setProperty(`--motion-${this.sequenceId}-index`,`${o}`),p.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),c.updateTiming({endDelay:h})}else c.updateTiming({delay:d+this.delay,endDelay:h})})})}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:u}=r;return Math.max(o,a+c*u)},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,u)=>c+u.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 fs{_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 us(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},ut=Ee.exports,lt;function ls(){return lt||(lt=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function i(){var f=this;f.reads=[],f.writes=[],f.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(f){for(var l;l=f.shift();)l()},measure:function(f,l){var d=l?f.bind(l):f;return this.reads.push(d),o(this),d},mutate:function(f,l){var d=l?f.bind(l):f;return this.writes.push(d),o(this),d},clear:function(f){return a(this.reads,f)||a(this.writes,f)},extend:function(f){if(typeof f!="object")throw new Error("expected object");var l=Object.create(this);return c(l,f),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function o(f){f.scheduled||(f.scheduled=!0,f.raf(r.bind(null,f)))}function r(f){var l=f.writes,d=f.reads,h;try{n("flushing reads",d.length),f.runTasks(d),n("flushing writes",l.length),f.runTasks(l)}catch(p){h=p}if(f.scheduled=!1,(d.length||l.length)&&o(f),h)if(n("task errored",h.message),f.catch)f.catch(h);else throw h}function a(f,l){var d=f.indexOf(l);return!!~d&&!!f.splice(d,1)}function c(f,l){for(var d in l)l.hasOwnProperty(d)&&(f[d]=l[d])}var u=t.fastdom=t.fastdom||new i;e.exports=u})(typeof window<"u"?window:typeof ut<"u"?ut:globalThis)})(Ee)),Ee.exports}var ds=ls();const A=us(ds),De={};function hs(e){Object.assign(De,e)}function Ze(e,t=!0){return e in De?De[e]:(t&&console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function Y(e,t){return e?(t||document).getElementById(e):null}function Rt(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Lt(e,t){const n=typeof e=="string"?Y(e):e;return t?.length?t.map(s=>Rt(n,s)).filter(Boolean):n?[n]:[]}function ms(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function Le(e){return`${e.value}${Qn(e.unit)}`}function dt(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${Le(e.offset)}${t?` + ${t}`:""})`:t?`calc(${Le(e.offset)} + ${t})`:Le(e.offset)}`}function Ft(e){return{start:dt(e.startOffset,e.startOffsetAdd),end:dt(e.endOffset,e.endOffsetAdd,!0)}}function xt(e){return t=>A.measure(()=>t(e))}function Nt(e){return t=>A.mutate(()=>t(e))}function se(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?Ze(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 Dt(e,t,n,s){return e.map((i,o)=>{const r={fill:i.fill,easing:ye(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:ms(i)};return Je(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),{effect:i,options:r,id:n&&`${n}-${o+1}`,part:i.part}})}function Je(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ht(e,t,n,s,i){if(e){if(Je(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:xt(n),mutate:Nt(n)}),e.web?e.web(t,o,i):e(t,o,i)}return[]}function jt(e,t,n,s,i){const o=typeof e=="string"?Y(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const h=se(d),p=ht(h,t,o,n,s);return typeof p!="function"?null:p(o)}const r=se(t),a=ht(r,t,o,n,s);if(!a||a.length===0)return null;const c=Dt(a,n,t.effectId);let u;const f=n?.trigger==="view-progress";f&&window.ViewTimeline&&(u=new ViewTimeline({subject:n.element||Y(n.componentId)}));const l=c.map(({effect:d,options:h,id:p,part:m})=>{const g=m?Rt(o,m):o,v=new KeyframeEffect(g||null,[],h);A.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(At(d.keyframes))});const y=f&&u?{timeline:u}:{},b=typeof d.customEffect=="function"?new fs(d.customEffect,g||null,h,y):new Animation(v,y.timeline);if(f)if(u)A.mutate(()=>{if(g){const{start:E,end:S}=Ft(d);b.rangeStart=E,b.rangeEnd=S}b.play()});else{const{startOffset:E,endOffset:S}=t;A.mutate(()=>{const $=d.startOffset||E,_=d.endOffset||S;Object.assign(b,{start:{name:$.name,offset:$.offset?.value,add:d.startOffsetAdd},end:{name:_.name,offset:_.offset?.value,add:d.endOffsetAdd}})})}return p&&(b.id=p),b});return l.length>1&&l.forEach(d=>d.persist?.()),new ce(l,{...t,trigger:{...n||{}},measured:new Promise(d=>A.mutate(d))})}function ps(e,t,n){const{duration:s,delay:i,iterations:o=1,fill:r,easing:a="linear",direction:c}=e.options,u=e.effect.name,f=s==="auto",{sequenceId:l,delay:d,offset:h,offsetEasing:p="linear"}=n||{};let m=`${i??0}ms`;if(l&&typeof p=="string"){const g=as(p);if(g){const v=(i??0)+(d??0);if(h){const y=g(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);m=`calc(${`(${v} + ${y} * ${h} * var(--motion-${l}-last, 1))`} * 1ms)`}else m=`${v}ms`}}return`${u} ${f?"auto":`${s}ms`}${f?" ":` ${m} `}${a}${r&&r!=="none"?` ${r}`:""} ${!o||o===1/0?"infinite":o}${c==="normal"?"":` ${c}`} ${t?"":"paused"}`}function gs(e,t,n){return e?.style?(Je(n)&&(t.duration=t.duration||1),e.style(t)):[]}function vs(e,t,n,s){const i=se(t),o=gs(i,t),r=Dt(o,n,t.effectId,!0),a=n?.trigger==="view-progress";return r.map((c,u)=>{const{start:f,end:l}=a?Ft(c.effect):{};return{part:c.part,animation:ps(c,a,s),composition:c.options.composite,custom:c.effect.custom,name:c.effect.name,keyframes:At(c.effect.keyframes),id:c.id&&`${c.id}-${u+1}`,animationTimeline:a?`--${n?.id}`:"",animationRange:f||l?`${f} ${l}`:""}})}function ys(e,t,n){const s=se(t),i=e instanceof HTMLElement?e:Y(e);if(s&&s.prepare&&i){const o={measure:xt(i),mutate:Nt(i)};s.prepare(t,o)}n&&A.mutate(n)}function zt(e,t){const n=se(t);if(!n)return null;if(!n.style)return t.effectId&&e?Es(e,t.effectId,n.parts):null;const s=n.getNames(t),o=Lt(e,n.parts)?.flatMap(c=>c.getAnimations()),r=o?.map(c=>c.animationName)||[],a=[];return s.forEach(c=>{r.includes(c)&&a.push(o?.find(u=>u.animationName===c))}),a?.length?new ce(a):null}function Es(e,t,n){const i=Lt(e,n)?.flatMap(o=>o.getAnimations()).filter(o=>{const r=o.id||o.animationName;return r?r.startsWith(t):!0});return i?.length?new ce(i):null}function Ht(e,t,n,s={}){const{disabled:i,allowActiveEvent:o,...r}=s,a=jt(e,t,n,r);if(!a)return null;let c={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const u=n.element||Y(n.componentId),{ready:f}=a;return a.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:u,ready:f,getProgress(){return a.getProgress()},effect(d,h){const{activeDuration:p}=l.effect.getComputedTiming(),{delay:m}=l.effect.getTiming();l.currentTime=((m||0)+(p||0))*h},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const u=t,{centeredToTarget:f,transitionDuration:l,transitionEasing:d}=u,h=n.axis;if(u.keyframeEffect){const p=a;return p.animations?.length===0?null:{target:(typeof e=="string"?Y(e):e)??void 0,centeredToTarget:f,ready:p.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(g,v){const y=h==="x"?v.x:v.y;this._currentProgress=y,p.progress(y)},disabled:i??!1,destroy(){p.cancel()}}}c={centeredToTarget:f,allowActiveEvent:o},t.customEffect&&l&&(c.transitionDuration=l,c.transitionEasing=Qe(d)),c.target=a.target}return{...c,getProgress(){return a.getProgress()},effect(u,f,l,d){a.progress(l?{...f,v:l,active:d}:f)},disabled:i,destroy(){a.cancel()}}}function fe(e,t,n,s=!1){const i=zt(e,t);return i?(i.ready=new Promise(o=>{ys(e,t,o)}),i):jt(e,t,n,{reducedMotion:s})}function ws(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function Gt(e,t){const n=[];for(const{target:s,options:i}of e){const o=ws(s);for(const r of o){const a=fe(r,i,void 0,t?.reducedMotion);a instanceof ce&&n.push(a)}}return n}function bs(e,t,n){const s=Gt(t,n);return new cs(s,e)}function $s(e,t=2){return parseFloat(e.toFixed(t))}function Ss(e){return/\[]/g.test(e)}function Is(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function we(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function ie(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function Wt(e){return!!(e.transition||e.transitionProperties)}function Vt(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:$e(i.name)}))}function Bt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:o,delay:r}=t;(i||r)&&(t.styleProperties.some(c=>c.name.startsWith("--"))?s=[`all ${i||0}ms ${ye(o||"ease")}${r?` ${r}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(c=>`${$e(c.name)} ${i||0}ms ${ye(o||"ease")}${r?` ${r}ms`:""}`))}else s=n?.filter(i=>i.duration||i.delay).map(i=>`${$e(i.name)} ${i.duration||0}ms ${ye(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function _s({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:o}){const r=Bt({transition:n,transitionProperties:s}),a=Vt({transition:n,transitionProperties:s}).map(p=>`${p.name}: ${p.value};`),c=e.replace(/"/g,"'"),u=`:is(:state(${t}), :--${t}) ${i}`,f=`[data-interact-effect~="${t}"] ${i}`,l=o?we(u,o):u,d=o?we(f,o):f,h=[`${l},
|
|
1
|
+
"use strict";function Tn(e){return[...e.matchAll(/\[([^\]]+)]/g)].map(([t,n])=>n)}function R(e,t){const n=Tn(t);let s=0;return n.length?e.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):e}function _n(e,t){return e.trigger==="viewEnter"&&t.triggerType==="once"&&B(e)===B(t)}function B(e){const{key:t,listContainer:n,listItemSelector:s,selector:i}=e;return`${t}\0${n||""}\0${s||""}\0${i||""}`}const Xe="$";class ce{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 Pt=e=>e,Mn=e=>1-Math.cos(e*Math.PI/2),On=e=>Math.sin(e*Math.PI/2),Pn=e=>-(Math.cos(Math.PI*e)-1)/2,Cn=e=>e**2,An=e=>1-(1-e)**2,kn=e=>e<.5?2*e**2:1-(-2*e+2)**2/2,qn=e=>e**3,Rn=e=>1-(1-e)**3,Ln=e=>e<.5?4*e**3:1-(-2*e+2)**3/2,Fn=e=>e**4,xn=e=>1-(1-e)**4,Nn=e=>e<.5?8*e**4:1-(-2*e+2)**4/2,Dn=e=>e**5,jn=e=>1-(1-e)**5,zn=e=>e<.5?16*e**5:1-(-2*e+2)**5/2,Hn=e=>e===0?0:2**(10*e-10),Gn=e=>e===1?1:1-2**(-10*e),Wn=e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,Vn=e=>1-Math.sqrt(1-e**2),Bn=e=>Math.sqrt(1-(e-1)**2),Yn=e=>e<.5?(1-Math.sqrt(1-4*e**2))/2:(Math.sqrt(-(2*e-3)*(2*e-1))+1)/2,Un=e=>2.70158*e**3-1.70158*e**2,Kn=e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2,Xn=(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,at={linear:Pt,sineIn:Mn,sineOut:On,sineInOut:Pn,quadIn:Cn,quadOut:An,quadInOut:kn,cubicIn:qn,cubicOut:Rn,cubicInOut:Ln,quartIn:Fn,quartOut:xn,quartInOut:Nn,quintIn:Dn,quintOut:jn,quintInOut:zn,expoIn:Hn,expoOut:Gn,expoInOut:Wn,circIn:Vn,circOut:Bn,circInOut:Yn,backIn:Un,backOut:Kn,backInOut:Xn},Q=(e,t,n,s,i)=>{const o=3*t,r=3*(s-2*t),a=1-3*s+3*t,f=3*n,u=3*(i-2*n),c=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),h=2*Math.pow(r,3)-9*o*r*a,p=54*Math.pow(a,3),m=(3*a*o-r*r)/(9*a*a),g=`((${h} - ${27*a*a} * ${e}) / ${p})`;if(m<0){const v=2*Math.sqrt(-m);let y=0;for(const E of[0,1,2])[0,.25,.5,.75,1].every(S=>{const _=Math.min(Math.max(2*(h-27*a*a*S)/(p*m*v),-1),1),I=v*Math.cos((Math.acos(_)-E*2*Math.PI)/3)-d;return I>=-1e-6&&I<=1.000001})&&(y=E);const b=`(acos(clamp(-1, ${2/(m*v)} * ${g}, 1)) - ${360*y}deg) / 3`;l=`(${v} * cos(${b}) - ${d})`}else{const v=`sqrt(pow(${g}, 2) + ${Math.pow(m,3)})`;l=`(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`}}return`(${c} * pow(${l}, 3) + ${u} * pow(${l}, 2) + ${f} * ${l})`},ct={linear:e=>e,ease:e=>Q(e,.25,.1,.25,1),easeIn:e=>Q(e,.42,0,1,1),easeOut:e=>Q(e,0,0,.58,1),easeInOut:e=>Q(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)`},ft={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 Qn(e){return e==="percentage"?"%":e||"px"}const Zn=/^(webkit|moz|ms|o)(?=[A-Z])/,Jn=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function Se(e){return e.startsWith("--")?e:(Zn.test(e)?`-${e}`:e).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function es(e){return e.startsWith("--")||!e.includes("-")?e:e.replace(/^-/,"").replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Ct(e){return Jn[e]||es(e)}function ts(e){for(const t in e)if(Object.hasOwn(e,t)&&Ct(t)!==t)return!0;return!1}function At(e){if(!Array.isArray(e))return e;let t;return e.forEach((n,s)=>{if(!n||typeof n!="object"||!ts(n))return;t??=e.slice();const i={};for(const o in n)Object.hasOwn(n,o)&&(i[Ct(o)]=n[o]);t[s]=i}),t||e}function ye(e){return e?ft[e]||e:ft.linear}function ns(e,t,n,s){const i=3*e,o=3*(n-e)-i,r=1-i-o,a=3*t,f=3*(s-t)-a,u=1-a-f,c=p=>((r*p+o)*p+i)*p,l=p=>((u*p+f)*p+a)*p,d=p=>(3*r*p+2*o)*p+i;function h(p){let m=p;for(let y=0;y<8;y++){const b=c(m)-p;if(Math.abs(b)<1e-7)return m;const E=d(m);if(Math.abs(E)<1e-6)break;m-=b/E}let g=0,v=1;for(m=(g+v)/2;v-g>1e-7;){const y=c(m);if(Math.abs(y-p)<1e-7)return m;p>y?g=m:v=m,m=(g+v)/2}return m}return p=>p<=0?0:p>=1?1:l(h(p))}function kt(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 ss(e){const t=kt(e);if(!(!t||t.some(isNaN)))return ns(...t)}function is(e){const t=kt(e);if(!(!t||t.some(isNaN)))return n=>Q(n,...t)}function qt(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 f=[];for(let u=1;u<r.length;u++)if(r[u].endsWith("%")){const c=parseFloat(r[u])/100;if(isNaN(c))return;f.push(c)}f.length===0?s.push({output:a,pos:null}):f.length===1?s.push({output:a,pos:f[0]}):(s.push({output:a,pos:f[0]}),s.push({output:a,pos:f[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,f=s[r].pos,u=r-o;for(let c=o+1;c<r;c++)s[c].pos=a+(f-a)*(c-o)/u;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 os(e){const t=qt(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 f=i+o>>>1;t[f].pos<=n?i=f:o=f}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 rs(e){const t=qt(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 Qe(e){if(!e)return;const t=at[e];return t||(ss(e)??os(e)??at.linear)}function as(e){if(!e)return;const t=ct[e];return t||(is(e)??rs(e)??ct.linear)}class cs extends ce{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:Qe(n.offsetEasing)??Pt,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 f=r.effect;if(!f)return;const{delay:u,duration:c,iterations:l}=this.timingOptions[o][a],d=u+t[o],h=n-(d+c*l);if(i.isCSS&&this.sequenceId){const{target:p}=f;p instanceof HTMLElement&&(p.style.setProperty(`--motion-${this.sequenceId}-index`,`${o}`),p.style.setProperty(`--motion-${this.sequenceId}-last`,`${s}`)),f.updateTiming({endDelay:h})}else f.updateTiming({delay:d+this.delay,endDelay:h})})})}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:f,iterations:u}=r;return Math.max(o,a+f*u)},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((f,u)=>f+u.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 fs{_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(f=>f===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const t=this.effect?.getComputedTiming().progress??null;t!==this.progress&&(this.customEffect?.(t),this.progress=t),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(t){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${t instanceof Error?t.message:t}`)}}get currentTime(){return this._animation.currentTime}set currentTime(t){this._animation.currentTime=t}get startTime(){return this._animation.startTime}set startTime(t){this._animation.startTime=t}get playbackRate(){return this._animation.playbackRate}set playbackRate(t){this._animation.playbackRate=t}get id(){return this._animation.id}set id(t){this._animation.id=t}get effect(){return this._animation.effect}set effect(t){this._animation.effect=t}get timeline(){return this._animation.timeline}set timeline(t){this._animation.timeline=t}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(t){this._animation.oncancel=t}get onfinish(){return this._animation.onfinish}set onfinish(t){this._animation.onfinish=t}get onremove(){return this._animation.onremove}set onremove(t){this._animation.onremove=t}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(t){this._animation.updatePlaybackRate(t)}addEventListener(t,n,s){this._animation.addEventListener(t,n,s)}removeEventListener(t,n,s){this._animation.removeEventListener(t,n,s)}dispatchEvent(t){return this._animation.dispatchEvent(t)}}function us(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},ut=Ee.exports,lt;function ls(){return lt||(lt=1,(function(e){(function(t){var n=function(){},s=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(c){return setTimeout(c,16)};function i(){var c=this;c.reads=[],c.writes=[],c.raf=s.bind(t)}i.prototype={constructor:i,runTasks:function(c){for(var l;l=c.shift();)l()},measure:function(c,l){var d=l?c.bind(l):c;return this.reads.push(d),o(this),d},mutate:function(c,l){var d=l?c.bind(l):c;return this.writes.push(d),o(this),d},clear:function(c){return a(this.reads,c)||a(this.writes,c)},extend:function(c){if(typeof c!="object")throw new Error("expected object");var l=Object.create(this);return f(l,c),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function o(c){c.scheduled||(c.scheduled=!0,c.raf(r.bind(null,c)))}function r(c){var l=c.writes,d=c.reads,h;try{n("flushing reads",d.length),c.runTasks(d),n("flushing writes",l.length),c.runTasks(l)}catch(p){h=p}if(c.scheduled=!1,(d.length||l.length)&&o(c),h)if(n("task errored",h.message),c.catch)c.catch(h);else throw h}function a(c,l){var d=c.indexOf(l);return!!~d&&!!c.splice(d,1)}function f(c,l){for(var d in l)l.hasOwnProperty(d)&&(c[d]=l[d])}var u=t.fastdom=t.fastdom||new i;e.exports=u})(typeof window<"u"?window:typeof ut<"u"?ut:globalThis)})(Ee)),Ee.exports}var ds=ls();const A=us(ds),De={};function hs(e){Object.assign(De,e)}function Ze(e,t=!0){return e in De?De[e]:(t&&console.warn(`${e} not found in registry. Please make sure to import and register the preset.`),null)}function Y(e,t){return e?(t||document).getElementById(e):null}function Rt(e,t){return e?.matches(`[data-motion-part~="${t}"]`)?e:e?.querySelector(`[data-motion-part~="${t}"]`)}function Lt(e,t){const n=typeof e=="string"?Y(e):e;return t?.length?t.map(s=>Rt(n,s)).filter(Boolean):n?[n]:[]}function ms(e){const t=e.alternate?"alternate":"";return e.reversed?`${t?`${t}-`:""}reverse`:t||"normal"}function Le(e){return`${e.value}${Qn(e.unit)}`}function dt(e,t,n){return`${e.name||"cover"} ${n&&e.offset.unit!=="percentage"?`calc(100% + ${Le(e.offset)}${t?` + ${t}`:""})`:t?`calc(${Le(e.offset)} + ${t})`:Le(e.offset)}`}function Ft(e){return{start:dt(e.startOffset,e.startOffsetAdd),end:dt(e.endOffset,e.endOffsetAdd,!0)}}function xt(e){return t=>A.measure(()=>t(e))}function Nt(e){return t=>A.mutate(()=>t(e))}function se(e){if(e.namedEffect){const t=e.namedEffect.type;return typeof t=="string"?Ze(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 Dt(e,t,n,s){return e.map((i,o)=>{const r={fill:i.fill,easing:ye(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:ms(i)};return Je(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),{effect:i,options:r,id:n&&`${n}-${o+1}`,part:i.part}})}function Je(e){return!e||e.trigger!=="pointer-move"&&e.trigger!=="view-progress"}function ht(e,t,n,s,i){if(e){if(Je(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:xt(n),mutate:Nt(n)}),e.web?e.web(t,o,i):e(t,o,i)}return[]}function jt(e,t,n,s,i){const o=typeof e=="string"?Y(e,i):e;if(n?.trigger==="pointer-move"&&!t.keyframeEffect){let d=t;t.customEffect&&(d={...t,namedEffect:{id:"",type:"CustomMouse"}});const h=se(d),p=ht(h,t,o,n,s);return typeof p!="function"?null:p(o)}const r=se(t),a=ht(r,t,o,n,s);if(!a||a.length===0)return null;const f=Dt(a,n,t.effectId);let u;const c=n?.trigger==="view-progress";c&&window.ViewTimeline&&(u=new ViewTimeline({subject:n.element||Y(n.componentId)}));const l=f.map(({effect:d,options:h,id:p,part:m})=>{const g=m?Rt(o,m):o,v=new KeyframeEffect(g||null,[],h);A.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(At(d.keyframes))});const y=c&&u?{timeline:u}:{},b=typeof d.customEffect=="function"?new fs(d.customEffect,g||null,h,y):new Animation(v,y.timeline);if(c)if(u)A.mutate(()=>{if(g){const{start:E,end:$}=Ft(d);b.rangeStart=E,b.rangeEnd=$}b.play()});else{const{startOffset:E,endOffset:$}=t;A.mutate(()=>{const S=d.startOffset||E,_=d.endOffset||$;Object.assign(b,{start:{name:S.name,offset:S.offset?.value,add:d.startOffsetAdd},end:{name:_.name,offset:_.offset?.value,add:d.endOffsetAdd}})})}return p&&(b.id=p),b});return l.length>1&&l.forEach(d=>d.persist?.()),new ce(l,{...t,trigger:{...n||{}},measured:new Promise(d=>A.mutate(d))})}function ps(e,t,n){const{duration:s,delay:i,iterations:o=1,fill:r,easing:a="linear",direction:f}=e.options,u=e.effect.name,c=s==="auto",{sequenceId:l,delay:d,offset:h,offsetEasing:p="linear"}=n||{};let m=`${i??0}ms`;if(l&&typeof p=="string"){const g=as(p);if(g){const v=(i??0)+(d??0);if(h){const y=g(`(var(--motion-${l}-index, 0) / var(--motion-${l}-last, 1))`);m=`calc(${`(${v} + ${y} * ${h} * var(--motion-${l}-last, 1))`} * 1ms)`}else m=`${v}ms`}}return`${u} ${c?"auto":`${s}ms`}${c?" ":` ${m} `}${a}${r&&r!=="none"?` ${r}`:""} ${!o||o===1/0?"infinite":o}${f==="normal"?"":` ${f}`} ${t?"":"paused"}`}function gs(e,t,n){return e?.style?(Je(n)&&(t.duration=t.duration||1),e.style(t)):[]}function vs(e,t,n,s){const i=se(t),o=gs(i,t),r=Dt(o,n,t.effectId,!0),a=n?.trigger==="view-progress";return r.map((f,u)=>{const{start:c,end:l}=a?Ft(f.effect):{};return{part:f.part,animation:ps(f,a,s),composition:f.options.composite,custom:f.effect.custom,name:f.effect.name,keyframes:At(f.effect.keyframes),id:f.id&&`${f.id}-${u+1}`,animationTimeline:a?`--${n?.id}`:"",animationRange:c||l?`${c} ${l}`:""}})}function ys(e,t,n){const s=se(t),i=e instanceof HTMLElement?e:Y(e);if(s&&s.prepare&&i){const o={measure:xt(i),mutate:Nt(i)};s.prepare(t,o)}n&&A.mutate(n)}function zt(e,t){const n=se(t);if(!n)return null;if(!n.style)return t.effectId&&e?Es(e,t.effectId,n.parts):null;const s=n.getNames(t),o=Lt(e,n.parts)?.flatMap(f=>f.getAnimations()),r=o?.map(f=>f.animationName)||[],a=[];return s.forEach(f=>{r.includes(f)&&a.push(o?.find(u=>u.animationName===f))}),a?.length?new ce(a):null}function Es(e,t,n){const i=Lt(e,n)?.flatMap(o=>o.getAnimations()).filter(o=>{const r=o.id||o.animationName;return r?r.startsWith(t):!0});return i?.length?new ce(i):null}function Ht(e,t,n,s={}){const{disabled:i,allowActiveEvent:o,...r}=s,a=jt(e,t,n,r);if(!a)return null;let f={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const u=n.element||Y(n.componentId),{ready:c}=a;return a.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:u,ready:c,getProgress(){return a.getProgress()},effect(d,h){const{activeDuration:p}=l.effect.getComputedTiming(),{delay:m}=l.effect.getTiming();l.currentTime=((m||0)+(p||0))*h},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const u=t,{centeredToTarget:c,transitionDuration:l,transitionEasing:d}=u,h=n.axis;if(u.keyframeEffect){const p=a;return p.animations?.length===0?null:{target:(typeof e=="string"?Y(e):e)??void 0,centeredToTarget:c,ready:p.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(g,v){const y=h==="x"?v.x:v.y;this._currentProgress=y,p.progress(y)},disabled:i??!1,destroy(){p.cancel()}}}f={centeredToTarget:c,allowActiveEvent:o},t.customEffect&&l&&(f.transitionDuration=l,f.transitionEasing=Qe(d)),f.target=a.target}return{...f,getProgress(){return a.getProgress()},effect(u,c,l,d){a.progress(l?{...c,v:l,active:d}:c)},disabled:i,destroy(){a.cancel()}}}function fe(e,t,n,s=!1){const i=zt(e,t);return i?(i.ready=new Promise(o=>{ys(e,t,o)}),i):jt(e,t,n,{reducedMotion:s})}function ws(e){return e===null?[null]:typeof e=="string"?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function Gt(e,t){const n=[];for(const{target:s,options:i}of e){const o=ws(s);for(const r of o){const a=fe(r,i,void 0,t?.reducedMotion);a instanceof ce&&n.push(a)}}return n}function bs(e,t,n){const s=Gt(t,n);return new cs(s,e)}function Ss(e,t=2){return parseFloat(e.toFixed(t))}function $s(e){return/\[]/g.test(e)}function Is(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function we(e,t){return t.includes("&")?t.replace(/&/g,e):`${e}${t}`}function ie(){return"wi-12343210".replace(/\d/g,e=>String.fromCharCode((+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4)+97))}function Wt(e){return!!(e.transition||e.transitionProperties)}function Vt(e){const{transition:t,transitionProperties:n}=e;return(t?.styleProperties||n||[]).map(i=>({...i,name:Se(i.name)}))}function Bt(e){let{transition:t,transitionProperties:n}=e,s=[];if(t?.styleProperties){const{duration:i,easing:o,delay:r}=t;(i||r)&&(t.styleProperties.some(f=>f.name.startsWith("--"))?s=[`all ${i||0}ms ${ye(o||"ease")}${r?` ${r}ms`:""}`,"visibility 0s"]:s=t.styleProperties.map(f=>`${Se(f.name)} ${i||0}ms ${ye(o||"ease")}${r?` ${r}ms`:""}`))}else s=n?.filter(i=>i.duration||i.delay).map(i=>`${Se(i.name)} ${i.duration||0}ms ${ye(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function Ts({key:e,effectId:t,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:o}){const r=Bt({transition:n,transitionProperties:s}),a=Vt({transition:n,transitionProperties:s}).map(p=>`${p.name}: ${p.value};`),f=e.replace(/"/g,"'"),u=`:is(:state(${t}), :--${t}) ${i}`,c=`[data-interact-effect~="${t}"] ${i}`,l=o?we(u,o):u,d=o?we(c,o):c,h=[`${l},
|
|
2
2
|
${d} {
|
|
3
3
|
${a.join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`];if(r.length){const p=`[data-interact-key="${
|
|
5
|
+
}`];if(r.length){const p=`[data-interact-key="${f}"] ${i}`,m=o?we(p,o):p;h.push(`${m} {
|
|
6
6
|
transition: ${r.join(", ")};
|
|
7
|
-
}`)}return h}function ue(e,t,n){const s=(e||[]).filter(i=>t[i]?.type===n&&t[i].predicate).map(i=>t[i].predicate).join(") and (");return s&&`(${s})`}function H(e,t){const n=ue(e,t,"media");return n&&window.matchMedia(n)}function U(e,t){return(e||[]).filter(n=>t[n]?.type==="selector"&&t[n].predicate).map(n=>`:is(${t[n].predicate})`).join("")}const Oe="__rm-reduce",Yt="__rm-no-preference",
|
|
7
|
+
}`)}return h}function ue(e,t,n){const s=(e||[]).filter(i=>t[i]?.type===n&&t[i].predicate).map(i=>t[i].predicate).join(") and (");return s&&`(${s})`}function H(e,t){const n=ue(e,t,"media");return n&&window.matchMedia(n)}function U(e,t){return(e||[]).filter(n=>t[n]?.type==="selector"&&t[n].predicate).map(n=>`:is(${t[n].predicate})`).join("")}const Oe="__rm-reduce",Yt="__rm-no-preference",_s={[Oe]:{type:"media",predicate:"prefers-reduced-motion: reduce"},[Yt]:{type:"media",predicate:"prefers-reduced-motion: no-preference"}},Ms=new Set(["namedEffect","keyframeEffect","customEffect","transition","transitionProperties","duration","delay","easing","iterations","alternate","fill","reversed","composite","rangeStart","rangeEnd","centeredToTarget","transitionDuration","transitionEasing"]);function Ut(e={}){return{...e,..._s}}function Pe(...e){return e.find(Boolean)??"collapse"}function je(e){return Wt(e)?"state":"duration"in e?"time":"scrub"}function mt(e){const t=je(e);if(t==="state"){const{transition:s,transitionProperties:i}=e;return{...e,...s&&{transition:{...s,duration:0}},...i&&{transitionProperties:i.map(o=>({...o,duration:0}))}}}const{iterations:n=1}=e;return t==="scrub"||!n||n===1/0?null:{...e,duration:0}}function Os(e,t,n){const s=([o])=>Ms.has(o),{keyframeEffect:i}=n;return{...Object.fromEntries(Object.entries(e).filter(o=>!s(o))),...Object.fromEntries(Object.entries(n).filter(s)),...i&&{keyframeEffect:{...i,name:i.name||t}}}}function Ps(e,t,n){switch(t){case"ignore":return e;case"cancel":return null;case"collapse":return mt(e);default:{const s=n[t];return s&&je(s)===je(e)?Os(e,t,s):mt(e)}}}function pt(e,t){return{...e,conditions:[...e.conditions||[],t]}}function Cs(e){return!!e.conditions?.includes(Oe)}function Kt(e,t,{effects:n,force:s,collapsesStagger:i}){const o=Ps(e,t,n);if(s)return o?[o]:[];if(o===e&&!i)return[e];const r=pt(e,Yt);return o?[r,pt(o,Oe)]:[r]}const Xt=new Map([["viewEnter","once"],["animationEnd","once"],["hover","alternate"],["click","alternate"],["activate","alternate"],["interest","alternate"]]);function As({namedEffect:e,keyframeEffect:t,customEffect:n},s){return e?!s&&!!e.type:!!t||!(n&&s)}function gt(e,t){const{namedEffect:n,customEffect:s,keyframeEffect:i,transition:o,transitionProperties:r,...a}=e;return n?t||!n.type?a:{namedEffect:n,...a}:i?{keyframeEffect:i,...a}:s?a:o?{transition:o,...a}:r?{transitionProperties:r,...a}:a}function Qt(e,t,n,s,i={}){const{effects:o={},conditions:r={}}=n,{key:a,trigger:f,conditions:u=[]}=t,c=f==="pointerMove";e.effectId||(e.effectId=s||ie());const{effectId:l}=e,d={...o[l]||{},...e};let{key:h,conditions:p,triggerType:m}=d;if(!h){if(!a)return null;h=a}if($s(h))return null;const g=u.filter(S=>r[S].type==="media");p=[...new Set([...p||[],...g].filter(S=>r[S]))],m||(m=Xt.get(f));const{namedEffect:v,keyframeEffect:y}=d;if(!v&&y&&!y.name){const S=l&&!(o[l]&&"keyframeEffect"in e);y.name=S?l:ie()}if(!As(d,c))return null;const b={...d,key:h,conditions:p,effectId:l,triggerType:m},E={...b,initial:_n(t,b)},$=Kt(E,Pe(d.reducedMotionPolicy,i.policy,t.reducedMotionPolicy,i.defaultPolicy),{effects:o,force:i.force,collapsesStagger:i.collapsesStagger}).map(S=>gt(S,c));return $.length?{...gt(E,c),variants:$}:null}function ks(e,t,n,s,i,o={}){const{sequences:r={},conditions:a={}}=n,{trigger:f,conditions:u=[]}=t;e.sequenceId||(e.sequenceId=s||ie());const{sequenceId:c}=e,l={...r[c]||{},...e},d=Pe(l.reducedMotionPolicy,t.reducedMotionPolicy,o.defaultPolicy);let{effects:h,conditions:p,triggerType:m,delay:g=0,offset:v=0,offsetEasing:y="linear"}=l;if(typeof y=="function"||!h)return null;m||(m=Xt.get(f));const b=u.filter(S=>a[S].type==="media");p=[...new Set([...p||[],...b].filter(S=>a[S]))];const $=h.map((S,_)=>{const I=Qt({...S,triggerType:m,conditions:[...S.conditions||[],...p]},t,n,`${c}-eff-${_}`,{...o,policy:d,collapsesStagger:d!=="ignore"});return I&&Object.assign(I,{slotKey:i?.(_)})}).filter(S=>S!==null);return $.length?{sequenceId:c,triggerType:m,conditions:p,delay:g,offset:v,offsetEasing:y,reducedMotionPolicy:d,effects:$}:null}function qs(e){return e==="cssFloat"?"float":e==="easing"?"animation-timing-function":e==="cssOffset"?"offset":e==="composite"?"animation-composition":Se(e)}function Rs(e){if(!e.length)return[];const t=e.map(i=>({...i}));t[0].offset===void 0&&(t[0].offset=0),t.length===1?e[0].offset===void 0&&(t[0].offset=1):t[t.length-1].offset===void 0&&(t[t.length-1].offset=1);let n=0,s=t[0].offset;for(let i=1;i<t.length;i++)if(t[i].offset!==void 0){const o=t[i].offset;if(o<s)return console.error("Offsets must be monotonically non-decreasing"),[];if(o>1)return console.error("Offsets must be in the range [0,1]"),[];const r=i-n;for(let a=n+1;a<i;a++){const f=(a-n)/r;t[a].offset=s+(o-s)*f}n=i,s=o}return t}function Ls(e,t){const n=Object.entries(e).filter(([s,i])=>s!=="offset"&&i!==void 0&&i!==null).map(([s,i])=>`${qs(s)}: ${i};`).join(`
|
|
8
8
|
`);return`${t}% {
|
|
9
9
|
${n}
|
|
10
|
-
}`}function Fs(e,t){const n=Rs(t);if(!n.length)return"";let s=n.map(i=>{const o=i.offset,r
|
|
10
|
+
}`}function Fs(e,t){const n=Rs(t);if(!n.length)return"";let s=n.map(i=>{const o=i.offset,r=Ss(o*100);return Ls(i,r)}).join(`
|
|
11
11
|
`);return`@keyframes ${e} {
|
|
12
12
|
${s}
|
|
13
|
-
}`}function xs(e){const{key:t,childSelector:n,declarations:s,media:i,states:o,selectorCondition:r,selectorSuffix:a}=e;if(!s.length)return"";let
|
|
14
|
-
`),
|
|
13
|
+
}`}function xs(e){const{key:t,childSelector:n,declarations:s,media:i,states:o,selectorCondition:r,selectorSuffix:a}=e;if(!s.length)return"";let f=`[data-interact-key="${t}"]`;if(o&&o.length){const l=o.map(d=>`:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");f=`${f}:is(${l})`}n&&(f=`${f} ${n}`),a&&(f=`${f}${a}`),r&&(f=we(f,r));const u=s.map(({name:l,value:d,important:h})=>`${l}: ${d}${h?" !important":""};`).join(`
|
|
14
|
+
`),c=`${f} {
|
|
15
15
|
${u}
|
|
16
16
|
}`;return i?`@media ${i} {
|
|
17
|
-
${
|
|
18
|
-
}`:
|
|
19
|
-
${a.map(({name:u,value:
|
|
17
|
+
${c}
|
|
18
|
+
}`:c}const ze=["animation","animation-composition","animation-timeline","animation-range"],Ce=[...ze,"transition","view-timeline"],Ae=["animation","transition","timeline"];function F(e){return e==="transition"?"transition":e==="view-timeline"?"timeline":"animation"}const Z={transition:"_",animation:"none","animation-composition":"replace","animation-timeline":"auto","animation-range":"normal","view-timeline":"none"};function Zt(e){return e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)","g"),"")}function z(e,t,n=!1,s){const i=s===void 0?"":`-c${s}`;return`--${Zt(e)}${i}${n?"-slot":""}-${t}`}function oe(e,t){return`--${Zt(e)}-c${t}`}function Ns(e,t){return Array.from({length:t+1},(n,s)=>`var(${oe(e,s)})`).join(", ")}function Ds(e,t,n,s,i=0,o){const r={animation:e,transition:t,timeline:i},a={animation:n,transition:s,timeline:0},f=(u,c)=>`@property ${c} { syntax: "*"; inherits: false; initial-value: ${Z[u]}; }`;return Ce.flatMap(u=>[...Array.from({length:r[F(u)]},(c,l)=>f(u,z(u,l,!1,o))),...Array.from({length:a[F(u)]},(c,l)=>f(u,z(u,l,!0,o))),...Array.from({length:o!==void 0&&r[F(u)]?o+1:0},(c,l)=>f(u,oe(u,l)))])}function js(e,t,n,s){const i=Ce.filter(a=>e[F(a)].slotsInSequence>0);if(i.length===0)return null;const o=i.map(a=>{const{listIndex:f,slotCursor:u,slotsInSequence:c}=e[F(a)];return{name:z(a,f,!1,s),value:Array.from({length:c},(l,d)=>`var(${z(a,u+d,!0,s)})`).join(", ")}}),r={key:e.key,childSelector:e.childSelector,declarations:o};return t&&(r.media=ue(t,n||{},"media"),r.selectorCondition=U(t,n||{})),r}function zs(e,t,n,s=0,i){if(e.length===0)return"";const o={animation:t,transition:n,timeline:s},r=Ce.filter(u=>o[F(u)]>0);if(r.length===0)return"";const a=r.flatMap(u=>{const c=Array.from({length:o[F(u)]},(l,d)=>`var(${z(u,d,!1,i)})`).join(", ");return i===void 0?[{name:u,value:c}]:[{name:oe(u,i),value:c},{name:u,value:Ns(u,i)}]});return`${e.map(({key:u,childSelector:c})=>`[data-interact-key="${u}"]${c?` ${c}`:""}`).join(", ")} {
|
|
19
|
+
${a.map(({name:u,value:c})=>` ${u}: ${c};`).join(`
|
|
20
20
|
`)}
|
|
21
21
|
}`}function Hs(e,t){if(e.length===0)return"";if(t===void 0)return`:root {
|
|
22
22
|
timeline-scope: ${e.join(", ")};
|
|
23
23
|
}`;const n=Array.from({length:t+1},(s,i)=>`var(${oe("timeline-scope",i)}, --_)`).join(", ");return`:root {
|
|
24
24
|
${oe("timeline-scope",t)}: ${e.join(", ")};
|
|
25
25
|
timeline-scope: ${n};
|
|
26
|
-
}`}const he={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Gs(e,t){const n=e?.name??he.rangeStart.name,s=t?.name??e?.name??he.rangeEnd.name,i={name:n,offset:e?.offset||he.rangeStart.offset},o={name:s,offset:t?.offset||he.rangeEnd.offset};return{startOffset:i,endOffset:o}}function x(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:i,endOffset:o}=Gs(t,n);return{id:"",startOffset:i,endOffset:o,...s}}function k(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function le(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 vt=[{name:"visibility",value:"hidden"},{name:"clip-path",value:"none",important:!0},{name:"transform",value:"none",important:!0},{name:"translate",value:"none",important:!0},{name:"scale",value:"none",important:!0},{name:"rotate",value:"none",important:!0}],He={animation:!1,transition:!1,timeline:!1};function Jt(e,t){const n=()=>({listIndex:0,slotCursor:0,slotsInInteraction:0,slotsInSequence:0,touched:!1});return{key:e,childSelector:t,partSelectors:new Set,assigned:new Set,animation:n(),transition:n(),timeline:n(),keyframeEntries:new Map}}function en(e,t,n){return Object.fromEntries(Ce.map(s=>{const i=F(s),{listIndex:o,slotCursor:r,slotsInSequence:a}=e[i];return[s,t[i]?z(s,r+a,!0,n):z(s,o,!1,n)]}))}function Ge(e,t,n){Ae.forEach(s=>{t[s]&&(e[s].touched=!0,n[s]&&(e[s].slotsInSequence+=1))})}function Ws(e){const{namedEffect:t,keyframeEffect:n,transition:s,transitionProperties:i}=e;return t||n?"animation":s||i?"transition":null}function tn(e){return(e.variants||[e]).map(Ws).find(Boolean)||null}function Vs(e){const t=new Map;return e.effects.forEach(n=>{const s=tn(n);if(!s)return;const i=B(n),o=t.get(i)||{animation:0,transition:0,timeline:0};o[s]+=1,t.set(i,o)}),new Map([...t].map(([n,{animation:s,transition:i}])=>[n,{animation:s>1,transition:i>1,timeline:!1}]))}function Bs(e){Ae.forEach(t=>{const n=e[t];n.slotsInInteraction=Math.max(n.slotsInInteraction,n.slotsInSequence),n.slotsInSequence=0})}function Ys(e){Ae.forEach(t=>{const n=e[t];n.listIndex+=n.touched?1:0,n.slotCursor+=n.slotsInInteraction,n.slotsInInteraction=0,n.touched=!1})}const Us={animation:"animation","animation-composition":"composition","animation-timeline":"animationTimeline","animation-range":"animationRange"};function Ks(e,t,n,s){const{key:i,conditions:o}=t,r=ue(o,e.configConditions,"media"),a=U(o,e.configConditions),
|
|
27
|
-
`)}const ii={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},oi={root:null,rootMargin:"0px",threshold:[0]},ri=.2;function ai(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 ne={},q=new WeakMap,We=new WeakSet,re=new WeakMap,W=new WeakMap;let et={},J=null;function Ie(e,t,n){(re.get(e)||t).unobserve(e),We.delete(e),n&&re.delete(e)}function ci(e){et=e}function an(e,t,n){q.get(e)?.forEach(({source:i,handler:o})=>{i===e&&o(t,n)})}function yt(){return J||(J=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||an(n,!1,!0)})},oi),J)}function tt(e,t=!1){return JSON.stringify({...e,isSafeMode:t})}function nt(e,t=!1){const n=tt(e,t);if(ne[n])return ne[n];const s=e.threshold??ri,i=t?ii:{root:null,rootMargin:e.inset?ai(e.inset):"0px",threshold:s},o=new IntersectionObserver(r=>{r.forEach(a=>{const c=a.target,u=!We.has(c);if(u&&(We.add(c),e.useSafeViewEnter&&!a.isIntersecting)){A.measure(()=>{const f=a.boundingClientRect.height,l=a.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&f*d>l&&A.mutate(()=>{o.unobserve(c);const p=nt(e,!0);re.set(c,p),p.observe(c)})});return}(a.isIntersecting||!u)&&an(c,a.isIntersecting)})},i);return ne[n]=o,o}function fi(e,t,n,s={},{selectorCondition:i,animation:o}={}){const r={...et,...s},a=n.triggerType||"once",c=o||fe(t,x(n));if(!c)return;const u=nt(r);a!=="once"&&c.persist?.();let f=!0,l=!1,d;const h=(m,g)=>{if(!(i&&!t.matches(i)))if(a==="once"){if(m&&!l){l=!0;const v=q.get(e);(!v||v.size===0||v.size===1&&v.has(d))&&Ie(e,u),c.onFinish(()=>{q.get(e)?.delete(d),q.get(t)?.delete(d)}),c.play(()=>{const y=()=>{t.dataset.interactEnter="start"},b=()=>{A.mutate(()=>{t.dataset.interactEnter="done"})};c.isCSS?(A.mutate(()=>{requestAnimationFrame(y)}),c.onFinish(b),c.onAbort(b)):(A.mutate(y),c.onFinish(b))})}}else a==="alternate"?f&&m?(f=!1,c.play()):f||c.reverse():a==="repeat"?m?(c.progress(0),c.play()):g&&(c.pause(),c.progress(0)):a==="state"&&(m?c.play():g&&c.pause())};d={source:e,target:t,handler:h,cleanup:()=>{Ie(e,u,!0),(a==="repeat"||a==="state")&&yt().unobserve(e),c.cancel()}},k(q,e,d),k(q,t,d),re.set(e,u),u.observe(e),(a==="repeat"||a==="state")&&yt().observe(e),a==="once"&&W.get(e)?.get(tt(r))&&h(!0)}function ui(e,t={}){const n={...et,...t},s=tt(n);let i=W.get(e);if(i||(i=new Map,W.set(e,i)),i.has(s))return;i.set(s,!1);const o=nt(n);let r;const a=u=>{if(!u)return;i.set(s,!0);const f=q.get(e);f?.delete(r),(!f||f.size===0)&&Ie(e,o)},c=()=>Ie(e,o,!0);return r={source:e,target:e,handler:a,cleanup:c},k(q,e,r),re.set(e,o),o.observe(e),()=>{i.delete(s),!i.size&&W.get(e)===i&&W.delete(e);const u=q.get(e);u?.delete(r)&&u.size===0&&c()}}function li(e){le(q,e),W.delete(e)}function di(){J=null,Object.keys(ne).forEach(e=>delete ne[e])}const hi={add:fi,remove:li,latch:ui,setOptions:ci,reset:di};function cn(e,t){return Object.assign(Object.create(t),e)}function mi(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 pi(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function Et(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function gi(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 _e(n[1],t)+_e(n[6],t)}function _e(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)?gi(e,t):parseInt(e)||0:0}function G(e,t,n){const{name:s,offset:i=0}=e,{start:o,end:r}=n,a=r-o,c=i/100;let u,f;return s==="entry"?(u=o-t,f=Math.min(t,a)):s==="entry-crossing"?(u=o-t,f=a):s==="contain"?(u=Math.min(r-t,o),f=Math.abs(t-a)):s==="exit"?(u=Math.max(o,r-t),f=Math.min(t,a)):s==="exit-crossing"?(u=o,f=a):s==="cover"&&(u=o-t,f=a+t),u+c*f|0}function Fe(e,t,n,s,i){let o=0;const r={start:t,end:n};return e.forEach((a,c)=>{o+=a.offset;const u=a.sticky;if(u){if("end"in u&&e[c-1]?.element){const d=((i?a.element.offsetWidth:a.element.offsetHeight)||0)+u.end-s,h=o+d-a.offset,p=h<r.start,m=!p&&h<=n;let g=0;(p||m)&&(g=a.offset,r.end+=g),p&&(r.start+=g)}if("start"in u){const f=o-u.start,l=f<r.start,d=!l&&f<=r.end;let h=0;const p=e[c-1]?.element;if(p){if(l||d){const m=(i?p.offsetWidth:p.offsetHeight)||0,g=a.offset,v=(i?a.element.offsetWidth:a.element.offsetHeight)||0;h=m-(g+v),o+=h,r.end+=h}l&&(r.start+=h)}}}}),r}function vi(e,t,n,s,i,o){const{start:r,end:a,duration:c}=e;let u=r,f=a,l=e.startRange,d=e.endRange,h;if(typeof c=="string"){l={name:c,offset:0},d={name:c,offset:100},u=G(l,n,t),f=G(d,n,t),h=f-u;const p=Fe(o,u,f,n,s);u=p.start,f=p.end}else{if(l||r?.name){l=l||r;const p=_e(l.add,i),m=G({...l,offset:0},n,t),g=G({...l,offset:100},n,t),v=Fe(o,m,g,n,s);u=v.start+l.offset/100*(v.end-v.start)+p}if(d||a?.name){d=d||a;const p=_e(d.add,i),m=G({...d,offset:0},n,t),g=G({...d,offset:100},n,t),v=Fe(o,m,g,n,s);f=v.start+d.offset/100*(v.end-v.start)+p}else typeof c=="number"&&(f=u+c)}return!h&&!c&&(h=f-u),{...e,start:u,end:f,startRange:l,endRange:d,duration:h||c}}function yi(e){return e.position==="sticky"}function Ei(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function wi(e,t){return parseInt(t?e.left:e.top)}function bi(e,t){return parseInt(t?e.right:e.bottom)}function $i(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function Si(e,t){let n;const s=wi(e,t),i=bi(e,t),o=!isNaN(s),r=!isNaN(i);return(o||r)&&(n={},o&&(n.start=s),r&&(n.end=i)),n}function me(e,t,n,s,i){const o=e[0].viewSource,r=[];let a=(s?o.offsetWidth:o.offsetHeight)||0,c=0,u=o;for(;u;){const l=window.getComputedStyle(u),d=yi(l),h=d?Si(l,s):void 0,p=$i(u,s,d);if((!h||!("end"in h))&&(c+=p),r.push({element:u,offset:p,sticky:h}),u=u.offsetParent,Ei(l,u,t))break;if(u===t){r.push({element:u,offset:0});break}}return r.reverse(),e.map(l=>({...vi(l,{start:c,end:c+a},n,s,i,r)}))}const wt=100,Ii={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function _i(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function bt(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function Ti(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function Mi(e){const t=cn(e,Ii),n=t.root,s=t.horizontal,i=new WeakMap;let o=bt(n,s),r,a,c,u,f;const l=[],d=Ti();if(t.scenes=Object.values(e.scenes.reduce((m,g,v)=>{const y=g.groupId?`group-${g.groupId}`:String(v);return m[y]?m[y].push(g):m[y]=[g],m},{})).flatMap(m=>(m.every(g=>g.viewSource&&(typeof g.duration=="string"||g.start?.name))?(m=me(m,n,o,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(m)):m.forEach(g=>{g.end==null&&(g.end=g.start+g.duration),g.duration==null&&(g.duration=g.end-g.start)}),m)),t.scenes.forEach((m,g)=>{m.index=g}),l.length){const m=new Map;window.ResizeObserver&&(c=new window.ResizeObserver(function(g){g.forEach(v=>{const y=m.get(v.target),b=me(y,n,o,s,d);b.forEach((E,S)=>{t.scenes[E.index]=b[S]}),l.splice(l.indexOf(y),1,b)})}),l.forEach(g=>{c.observe(g[0].viewSource,{box:"border-box"}),m.set(g[0].viewSource,g)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(Et(()=>{const v=l.map(y=>{const b=me(y,n,o,s,d);return b.forEach((E,S)=>{t.scenes[E.index]=b[S]}),b});l.length=0,l.push(...v),l.forEach(y=>{m.set(y[0].viewSource,y)})},wt)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(u=Et(function(){o=bt(n,s);const g=l.map(v=>{const y=me(v,n,o,s,d);return y.forEach((b,E)=>{t.scenes[b.index]=y[E]}),y});l.length=0,l.push(...g),l.forEach(v=>{m.set(v[0].viewSource,v)})},wt),n===window?window.addEventListener("resize",u):window.ResizeObserver&&(f=new window.ResizeObserver(u),f.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(a=new window.IntersectionObserver(function(m){m.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(m=>{if(m.viewSource){let g=i.get(m.viewSource);g||(g=[],i.set(m.viewSource,g),a.observe(m.viewSource)),g.push(m)}}));function h({p:m,vp:g}){m=+m.toFixed(1);const v=+g.toFixed(4);if(m!==r){for(let y of t.scenes)if(!y.disabled){const{start:b,end:E,duration:S}=y,$=_i(m,b,E,S);y.effect(y,$,v)}r=m}}function p(){t.scenes.forEach(m=>m.destroy?.()),a&&(a.disconnect(),a=null),c&&(c.disconnect(),c=null),u&&(f?(f.disconnect(),f=null):window.removeEventListener("resize",u))}return{tick:h,destroy:p}}const Oi={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class Pi{constructor(t={}){this.config=cn(t,Oi),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=pi(()=>{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=mi(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=Mi(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Ve=new WeakMap;let fn=()=>({});function Ci(e){fn=e}function Ai(e,t,n,s,{selectorCondition:i}){if(i&&!t.matches(i))return;const o={trigger:"view-progress",element:e},r=x(n);let a;if("ViewTimeline"in window){const u=fe(t,r,o);u&&!u.isCSS&&(u.play(),a=()=>{u.ready.then(()=>{u.cancel()})})}else{const u=Ht(t,r,o);if(u){const f=Array.isArray(u)?u:[u],l=new Pi({viewSource:e,scenes:f,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...fn()});a=()=>{l.destroy()},Promise.all(f.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!a)return;const c={source:e,target:t,cleanup:a};k(Ve,e,c),k(Ve,t,c)}function ki(e){le(Ve,e)}const qi={add:Ai,remove:ki,registerOptionsGetter:Ci};function $t(e,t,n){return Math.min(Math.max(e,n),t)}function St(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function Ri(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 Li(){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 Fi(){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 xi(e){Fi().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let pe=0;const be=new Set;function Ni(){const e=n=>{for(let s of n.changedTouches)be.add(s.identifier)},t=n=>{for(let s of n.changedTouches)be.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){be.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function Di(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;pe||(s=Ni()),pe+=1;function i(o){clearTimeout(n),n=setTimeout(()=>{be.size?setTimeout(i,100):(t(o),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),pe-=1,pe||s()}}function ji(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 zi(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function Hi(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function Gi(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 Wi(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(f=>{f.target&&f.centeredToTarget&&(f.transform=ji(Ri(f.target),e.rect,c),t=!0),e.root?i=Gi(e):(o=Hi.bind(null,e),window.addEventListener("resize",o))}),s=function(f){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(f.x)||f.x/e.rect.width,h=l.transform?.y(f.y)||f.y/e.rect.height,p=+$t(0,1,d).toPrecision(4),m=+$t(0,1,h).toPrecision(4),g={x:f.vx,y:f.vy};e.allowActiveEvent&&(f.active=d<=1&&h<=1&&d>=0&&h>=0),l.effect(l,{x:p,y:m},g,f.active)}Object.assign(n,f)},t&&(r=zi.bind(c,s,n),a=Di(document,r));function u(){e.scenes.forEach(f=>f.destroy?.()),a?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",o),o=null),s=null,n=null}return{tick:s,destroy:u}}const Vi=1e3/60*3;let ge;function Bi(){V.x=window.scrollX,V.y=window.scrollY}const V={x:0,y:0,scrollHandler:Bi,fixRequired:void 0};class Yi{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():St(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):St(()=>{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){ge=typeof ge=="boolean"?ge:Li();const i=ge?window.devicePixelRatio:1;typeof V.fixRequired>"u"&&xi(V),this._measure=o=>{if(o.target!==this.config.root){const r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:o.x*i+V.x,clientY:o.y*i+V.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((u,[f,l])=>(f==="active"?u[f]=l:u[f]=this.previousProgress[f]+(l-this.previousProgress[f])*c,u),this.currentProgress||{}),a<1&&(this._nextTransitionTick=requestAnimationFrame(o),i=r-this._startTime>Vi),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=Wi(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Be=new WeakMap;let un=()=>({});function Ui(e){un=e}function Ki(e){return!("keyframeEffect"in e||"customEffect"in e)||!e.transitionDuration?{}:{transitionDuration:e.transitionDuration,transitionEasing:Qe(e.transitionEasing)}}function Xi(e,t,n,s={},{selectorCondition:i}){if(i&&!t.matches(i))return;const o={trigger:"pointer-move",element:e,axis:s.axis??"y"},r=Ht(t,x(n),o);if(r){const a=Array.isArray(r)?r:[r],c=new Yi({root:s.hitArea==="self"?e:void 0,scenes:a,...un(),...Ki(n)}),f={source:e,target:t,cleanup:()=>{c.destroy()}};k(Be,e,f),k(Be,t,f),Promise.all(a.map(l=>l.ready||Promise.resolve())).then(()=>{c.start()})}}function Qi(e){le(Be,e)}const Zi={add:Xi,remove:Qi,registerOptionsGetter:Ui},Ye=new WeakMap,N=new WeakMap;function ln(e,t){return Array.from(e.querySelectorAll(t))}function Ji(e){return e.animationName||`#${e.detail?.effectId}`}function eo(e){const t=[];for(let n=e;n;n=n.parentElement)N.get(n)?.forEach(({sourceSelector:s,events:i})=>{(s?!ln(n,s).includes(e):n!==e)||i.forEach((o,r)=>{o.forEach(a=>{(r===e||a.bubbles&&e.contains(r))&&t.push(a)})})});return t}function to(e){N.get(e)?.forEach(({cleanup:t})=>t()),N.delete(e)}function no(e,t,n,s,{selectorCondition:i,animation:o,sourceAnimationOptions:r}){const a=o||fe(t,x(n));if(!a)return;const{effectId:c}=s,u=h=>{if(i&&!t.matches(i))return!1;const p=h.animationName,m=h.detail?.effectId,g=r?zt(e,r):null;if(g){if(g.playState==="running"||p&&!g.hasAnimationName(p))return!1;if(m&&m!==c&&!g.hasAnimationId(m))return!1}return!0},f=h=>{u(h)&&a.play()},d={source:e,target:t,cleanup:()=>{a.cancel(),e.removeEventListener("animationend",f)}};k(Ye,e,d),k(Ye,t,d),e.addEventListener("animationend",f),eo(e).some(u)&&a.play()}function so(e,t,n){let s=N.get(e);if(s?.some(a=>a.sourceSelector===n))return;s||(s=[],N.set(e,s));const i=new Map,o=a=>{const c=a.target;if(n&&!ln(e,n).some(l=>l===c||a.bubbles&&l.contains(c)))return;let u=i.get(c);u||(u=new Map,i.set(c,u)),u.set(Ji(a),a)},r={sourceSelector:n,events:i,cleanup:()=>e.removeEventListener("animationend",o,!0)};return e.addEventListener("animationend",o,!0),s.push(r),()=>{const a=N.get(e),c=a?a.indexOf(r):-1;c!==-1&&(r.cleanup(),a.splice(c,1),a.length||N.delete(e))}}function io(e){le(Ye,e),to(e)}const oo={add:no,remove:io,latch:so,latchesSubtree:!0};function ro(e,t,n,s,i){const o=i||fe(e,x(t));if(!o)return null;let r=!0;const a=t.triggerType||"alternate";return{handler:u=>{if(n&&!e.matches(n))return;const f=!s,l=s?.enter?.includes(u.type),d=s?.leave?.includes(u.type);if(l||f){if(a==="alternate"||a==="state")r?(r=!1,o.play()):a==="alternate"?o.reverse():a==="state"&&(o.playState==="running"?o.pause():o.playState!=="finished"&&o.play());else{if(o.progress(0),delete e.dataset.interactEnter,o.isCSS){const h=()=>{A.mutate(()=>{e.dataset.interactEnter="done"})};o.onFinish(h),o.onAbort(h)}o.play()}return}d&&(a==="alternate"?o.reverse():a==="repeat"?(o.cancel(),A.mutate(()=>{delete e.dataset.interactEnter})):a==="state"&&o.playState==="running"&&o.pause())},cleanup:()=>o.cancel()}}function ao(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:o},r,a){const c=!!s,u=o??"toggle",f=u==="toggle";return l=>{if(r&&!e.matches(r))return;const d=c?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,h=!a,p=a?.enter?.includes(l.type),m=a?.leave?.includes(l.type);h?t.toggleEffect(n,u,d):(p&&t.toggleEffect(n,f?"add":u,d),m&&f&&t.toggleEffect(n,"remove",d))}}const Ue=new WeakMap;function It(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function co(e){return t=>{const n=t;(n.pointerType||n.detail>0)&&e(n)}}function fo(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const uo={focusin:(e,t)=>It(e,t),focusout:(e,t)=>It(e,t),click:(e,t)=>co(t),keydown:(e,t)=>fo(t)};function lo(e,t,n){const s=uo[e];return s?s(t,n):i=>n(i)}function ho(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function mo(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(ho(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function po(e){return!!(e.enter?.length||e.leave?.length)}function go(e){return po(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function vo(e,t,n,s,{targetController:i,selectorCondition:o,animation:r}){const a=mo(s.eventConfig),c=n.transition||n.transitionProperties,u=go(a);let f,l,d=!1;if(c)f=ao(t,i,n,o,u);else{const y=ro(t,n,o,u,r);f=y?.handler??null,l=y?.cleanup,d=n.triggerType==="once"}if(!f)return;const h=f,p=new AbortController;function m(y,b,E){const S=lo(b,e,h);y.addEventListener(b,S,{...E,signal:p.signal})}const v={source:e,target:t,cleanup:()=>{p.abort(),l?.()}};if(k(Ue,e,v),k(Ue,t,v),u){const y=a.enter,b=a.leave;y.forEach($=>{$==="focusin"&&(e.tabIndex=0),m(e,$,{passive:!0,once:d})});const E=!n.stateAction||n.stateAction==="toggle";(c?E:n.triggerType!=="once")&&b.forEach($=>{if($==="focusout"){m(e,$,{once:d});return}m(e,$,{passive:!0})})}else(a.toggle??[]).forEach(b=>{m(e,b,{once:d,passive:b!=="keydown"})})}function yo(e){le(Ue,e)}const ee={add:vo,remove:yo},Ke={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},_t={click:Ke.activate,hover:Ke.interest};function ve(e){const t=Ke[e];return(n,s,i,o,r)=>{const a=r?.allowA11yTriggers&&e in _t?_t[e]:t;ee.add(n,s,i,{eventConfig:a},r??{})}}const D={viewEnter:hi,hover:{add:ve("hover"),remove:ee.remove},click:{add:ve("click"),remove:ee.remove},animationEnd:oo,viewProgress:qi,pointerMove:Zi,activate:{add:ve("activate"),remove:ee.remove},interest:{add:ve("interest"),remove:ee.remove}};function Eo(e){return e.replace(/\[[^\]]+]/g,"[]")}class w{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static reducedMotionPolicy="collapse";static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;static pluginDefers=new Map;static _released=new Set;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=$o(t,s,{configIndex:n?.configIndex,forceReducedMotion:n?.forceReducedMotion??w.forceReducedMotion,reducedMotionPolicy:n?.reducedMotionPolicy??w.reducedMotionPolicy});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=Eo(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=R(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,w._released.clear()}static setup(t){t.scrollOptionsGetter&&D.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&D.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&D.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers),t.forceReducedMotion!==void 0&&(w.forceReducedMotion=t.forceReducedMotion),t.reducedMotionPolicy!==void 0&&(w.reducedMotionPolicy=t.reducedMotionPolicy)}static getInstance(t){return w.instances.find(n=>n.has(t))}static getController(t){return t?w.controllerCache.get(t):void 0}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=hs;static getRegisteredEffect=Ze;static use(t,n,s){w.plugins.set(t,n);const i=s?.defer;i&&i.length?w.pluginDefers.set(t,Array.isArray(i)?i:[i]):w.pluginDefers.delete(t)}static ready(t,n){w._released.add(n?`${t}::${n}`:t),n?w.controllerCache.get(n)?.resume():w.controllerCache.forEach(s=>s.resume())}static _isPluginReleased(t,n){const s=w.pluginDefers.get(t);return s?s.every(i=>w._released.has(i)||w._released.has(`${i}::${n}`)):!0}static getPlugin(t){return w.plugins.get(t)}static getPluginsNames(){return new Set(w.plugins.keys())}static getSequence(t,n,s){const i=w.sequenceCache.get(t);if(i)return i;const o=bs(n,s);return w.sequenceCache.set(t,o),w._registerSequenceElements(s,o),o}static addToSequence(t,n,s){const i=w.sequenceCache.get(t);if(!i)return!1;const r=Gt(n).map((a,c)=>({index:s[c]??i.animationGroups.length,group:a}));return i.addGroups(r),w._registerSequenceElements(n,i),!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 wo=0;function j(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 Tt(e){return"sequenceId"in e&&!("effects"in e)}function xe(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function bo(e,t,n){const{effects:s=[]}=e;return s.some((i,o)=>n.has(t(o)))?{...e,effects:s.map((i,o)=>{const r=n.get(t(o));return r?{...i,suffix:r}:i})}:e}function $o(e,t,n){const{configIndex:s}=n,{effects:i={},sequences:o={},conditions:r={}}=e,a={},c=e.interactions?rn(e,n):new Map;return e.interactions?.forEach((u,f)=>{const l=u.key,d=++wo,{effects:h,sequences:p,...m}=u;if(!l){console.error(`Interaction ${d} is missing a key for source element.`);return}xe(a,l);const g=h?Array.from(h):[];g.reverse();const v=p?.map((E,S)=>{if(Tt(E)){const _=o[E.sequenceId];return _?{..._,...E}:(console.warn(`Interact: Sequence "${E.sequenceId}" not found in config`),E)}const $=E;return $.sequenceId||($.sequenceId=te("seq",[f,S],s)),$}),y={...m,effects:g.length>0?g:void 0,sequences:v?.map((E,S)=>bo(E,$=>Se(f,$,S),c))};a[l].triggers.push(y),a[l].selectors.add(j(y,{useFirstChild:t}));const b=y.listContainer;g.forEach((E,S)=>{const $=E.effectId?i[E.effectId]:void 0;let _=E.key||$?.key;const I=g.length-1-S;E.effectId||(E.effectId=te("eff",[f,I],s));const O=c.get(Se(f,I));if(O&&(E.suffix=O),_=_||l,E.key=_,b&&E.listContainer&&(_!==l||E.listContainer!==b))return;const C=B({...$,...E,key:_}),T=`${l}::${C}::${d}`;if(E.interactionId=T,a[l].interactionIds.add(T),_===l)return;const M=xe(a,_);M.effects[T]||(M.effects[T]=[],M.interactionIds.add(T)),M.effects[T].push({...m,effect:E,owner:y}),M.selectors.add(j(E,{useFirstChild:t}))}),v?.forEach(E=>{if(!E||Tt(E))return;const S=E,$=S.sequenceId;S.effects.forEach((I,O)=>{I.effectId||(I.effectId=`eff-${$}-${O}`);let C=I.key;if(!C&&I.effectId){const M=i[I.effectId];M&&(C=M.key)}C=C||l;const T=j(I,{useFirstChild:t});if(T&&a[l].selectors.add(T),C!==l){const M=xe(a,C),P=`${C}::seq::${$}::${d}`;M.sequences[P]||(M.sequences[P]=[],M.interactionIds.add(P)),M.sequences[P].push({...m,sequence:S,owner:y}),M.selectors.add(T)}})})}),{effects:i,sequences:o,conditions:Ut(r),reducedMotionPolicy:n.reducedMotionPolicy,forceReducedMotion:n.forceReducedMotion,interactions:a}}const Te=new WeakMap;function st(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function it(e,t){for(const n of w.getPluginsNames())if(`${Xe}${n}`in t&&!w._isPluginReleased(n,e))return!0;return!1}function K(e,t,n,s,i,o=!0){if(it(s,n))return!1;const r=[];for(const a of w.getPluginsNames()){const c=`${Xe}${a}`;if(!(c in n))continue;const u=n[c],f=u!==null&&typeof u=="object",l=f?e._appliedPlugins.get(u):void 0;if(l===!0)continue;if(l){r.push(l);continue}if(!o)continue;f&&e._appliedPlugins.set(u,!0);const h=w.getPlugin(a)(u,{root:t,key:s,scope:i,config:n});if(st(h)){const p=e._connectId,m=Promise.resolve(h).then(g=>{if(e._connectId!==p){try{typeof g=="function"&&g()}catch(v){console.error(v)}return}typeof g=="function"&&e._pluginCleanups.push(g),f&&e._appliedPlugins.set(u,!0)},g=>{console.error(g),f&&e._connectId===p&&e._appliedPlugins.set(u,!0)});f&&(e._appliedPlugins.set(u,m),r.push(m))}else typeof h=="function"&&e._pluginCleanups.push(h)}return ot(...r)}function X(e,t,n,s,i,o){if(st(e)){const f=s._connectId,l=t._connectId,d=Te.get(t);e.then(()=>{s.connected&&s._connectId===f&&t._connectId===l&&Te.get(t)===d&&t.resume()})}const r=D[n.trigger],a=r?.latch;if(!a)return;let c,u;i?c=En(n,s,o):r.latchesSubtree&&(n.selector||n.listContainer)?(c=s.element,u=j(n)):c=ae(n,s.element,s.useFirstChild,!1),c&&(Array.isArray(c)?c:[c]).forEach(f=>{const l=a(f,n.params,u);l&&s._latches.push({element:f,release:l})})}function So(e){e._latches=e._latches.filter(({element:t,release:n})=>e.element.contains(t)?!0:(n(),!1))}function ot(...e){const t=e.filter(st);return t.length?Promise.all(t).then(()=>{}):e.every(Boolean)}function ae(e,t,n,s=!0){if(e.listContainer){const i=t.querySelector(e.listContainer);return i?e.selector?Array.from(i.querySelectorAll(e.selector)):Array.from(i.children):(s&&console.warn(`Interact: No container found for list container "${e.listContainer}"`),[])}if(e.selector){const i=t.querySelectorAll(e.selector);return i.length>0?Array.from(i):(s&&console.warn(`Interact: No elements found for selector "${e.selector}"`),null)}return n?t.firstElementChild:t}function Me(e,t){return t.map(n=>e.selector?n.querySelector(e.selector):n).filter(Boolean)}function ke(e,t,n,s={}){const{effects:i,conditions:o,reducedMotionPolicy:r,forceReducedMotion:a}=t.dataCache,c=Kt(e,Pe(e.reducedMotionPolicy,s.policy,r),{effects:i,force:a,collapsesStagger:s.collapsesStagger});let u;return c.forEach((f,l)=>{const d=H(f.conditions||[],o);d&&t.setupMediaQueryListener(l?`${n.id}::rm${l}`:n.id,d,n.key,n.onUpdate),!u&&(!d||d.matches)&&(u=f)}),u}function dn(e,t,n,s,i,o,r,a){return[r?Me(e,r):ae(e,n,s),a?Me(t,a):ae(t,i,o)]}function hn(e,t,n,s,i,o,r,a){const c=Array.isArray(s),u=Array.isArray(i);c?s.forEach((f,l)=>{const d=u?i[l]:i;d&&Mt(e,f,t.trigger,d,n,t.params,o,r,a)}):(u?i:[i]).forEach(l=>{Mt(e,s,t.trigger,l,n,t.params,o,r,a)})}function Io(e,t,n,s,i){const o={},r=[];return(s.effects||[]).forEach((a,c)=>{const u=a.effectId,f={...n.dataCache.effects[u]||{},...a,effectId:u},l=f.key,d=R(a.interactionId,e);if(o[d]||n.addedInteractions[d]&&!i)return;const h=ke(f,n,{id:`${d}::${c}`,key:e,onUpdate:()=>{t.update()}},{policy:s.reducedMotionPolicy});if(h){o[d]=!0;const p=l&&R(l,e);let m;p?(m=w.getController(p),m&&h.listContainer&&m.watchChildList(h.listContainer)):m=t,r.push({interactionId:d,effectOptions:h,target:p,targetController:m})}}),r}function _o(e,t,n,s,i){const o=[];return s.sequences?.forEach(r=>{let a;if(Oo(r)){const d=n.dataCache.sequences[r.sequenceId];if(!d){console.warn(`Interact: Sequence "${r.sequenceId}" not found in cache`);return}a={...d,...r}}else a=r;const c=a.sequenceId||ie(),u=R(`${e}::seq::${c}`,e);if(n.addedInteractions[u]&&!i)return;const f=pn(a,s,u,e,n,{updateKey:e,onUpdate:()=>t.update()});if(!f)return;const l=i&&s.listContainer&&n.addedInteractions[u]?{controllerKey:e,listContainer:s.listContainer,elements:i}:void 0;o.push({sequenceConfig:a,cacheKey:u,listElements:l,effects:f})}),o}function To(e,t,n,s,i){const o=Io(e,t,n,s,i),r=_o(e,t,n,s,i);if(o.some(({effectOptions:l,target:d})=>it(d||s.key,l))||r.some(l=>gn(l.effects,e)))return{readiness:!1,effects:[],sequences:[]};const c=o.filter(l=>!!l.targetController),u=c.map(({effectOptions:l,target:d,targetController:h})=>K(h,h.element,l,d||s.key,"effect")),f=[];return r.forEach(l=>{const d=vn(l.effects,e,t);d&&(f.push({...l,effects:d}),u.push(...d.map(h=>h.readiness)))}),{readiness:ot(...u),effects:c,sequences:f}}function rt(e,t,n,s,i,o=t){const r=To(e,t,n,s,i);if(r.readiness!==!0){X(r.readiness,o,s,t,!0,i);return}const a=[];r.effects.forEach(({interactionId:c,effectOptions:u,target:f,targetController:l})=>{const[d,h]=dn(s,u,t.element,t.useFirstChild,l.element,l.useFirstChild,n.addedInteractions[c]?i:void 0);if(!d||!h)return;n.addedInteractions[c]=!0;const p=f||s.key,m=U(u.conditions||[],n.dataCache.conditions);a.push([p,s,u,d,h,m,l.useFirstChild,e])}),a.reverse().forEach(c=>{hn(...c)}),Co(t,n,s,r.sequences,i)}function mn(e,t,n){return Pe(e.reducedMotionPolicy,t.reducedMotionPolicy,n.dataCache.reducedMotionPolicy)}function Mo(e,t,n){const{forceReducedMotion:s,conditions:i}=n.dataCache,o=H([Oe],i);return(s||!!(o&&o.matches))&&mn(e,t,n)!=="ignore"?{...e,offset:0}:e}function Oo(e){return"sequenceId"in e&&!("effects"in e)}function pn(e,t,n,s,i,o){const r=H(e.conditions||[],i.dataCache.conditions);if(r&&i.setupMediaQueryListener(n,r,o.updateKey,o.onUpdate),r&&!r.matches)return null;const a=e.effects||[],c=l=>{const d=l.effectId;return{...d?i.dataCache.effects[d]||{}:{},...l}},u=mn(e,t,i),f=[];for(const l of a){const d=l.effectId,h=ke(c(l),i,{id:`${n}::${d||"eff"}`,key:o.updateKey,onUpdate:o.onUpdate},{policy:u,collapsesStagger:u!=="ignore"});if(!h)continue;const p=h.key&&R(h.key,s);f.push({effectOptions:h,target:p})}return f}function gn(e,t){return e.some(({effectOptions:n,target:s})=>it(s||t,n))}function vn(e,t,n){const s=[];for(const{effectOptions:i,target:o}of e){let r;if(o){if(r=w.getController(o),!r)return null}else r=n;const a=o||t,c=K(r,r.element,i,a,"effect");s.push({effectOptions:i,targetController:r,resolvedTargetKey:a,readiness:c})}return s}function yn(e,t){const n=[];let s=!1;for(const{effectOptions:i,targetController:o,resolvedTargetKey:r}of e){let a;if(t&&r===t.controllerKey&&i.listContainer===t.listContainer?(a=Me(i,t.elements),a.length>0&&(s=!0)):a=ae(i,o.element,o.useFirstChild),!a||Array.isArray(a)&&a.length===0)return null;const c=x(i);n.push({target:a,options:c})}return t&&!s?null:n.length>0?n:null}function En(e,t,n){const s=n?Me(e,n):ae(e,t.element,t.useFirstChild);return Array.isArray(s)&&s.length===0?null:s}function Po(e,t,n,s,i){(Array.isArray(n)?n:[n]).forEach(r=>{D[e.trigger]?.add(r,r,{triggerType:t.triggerType},e.params||{},{selectorCondition:i,animation:s,allowA11yTriggers:w.allowA11yTriggers})})}function wn(e,t,n){const o=(e.useFirstChild?e.element.firstElementChild:e.element)?.querySelector(t);if(!o)return n.map((a,c)=>c);const r=Array.from(o.children);return n.map(a=>{const c=r.indexOf(a);return c>=0?c:r.length})}function Co(e,t,n,s,i){s.forEach(({sequenceConfig:o,cacheKey:r,listElements:a,effects:c})=>{const u=yn(c,a);if(!u)return;const f=t.addedInteractions[r]?i:void 0;if(f){const p=wn(e,n.listContainer,f);w.addToSequence(r,u,p)}const l=w.getSequence(r,Mo(o,n,t),u),d=U(n.conditions||[],t.dataCache.conditions),h=En(n,e,f);h&&(t.addedInteractions[r]=!0,Po(n,o,h,l,d))})}function bn(e,t,n,s,i,o){const r=K(s,s.element,t,n,"interaction");return r!==!0?(X(r,i,t,s,!1),!1):o.addedInteractions[e]?!0:(rt(n,s,o,t,void 0,i),!1)}function Ao(e,t,n,s,i){const o=n.get(e)?.sequences||{};Object.keys(o).forEach(a=>{o[a].some(({sequence:u,owner:f,...l})=>{const d=H(l.conditions||[],n.dataCache.conditions);if(d&&!d.matches)return!1;const h=l.key&&R(l.key,e),p=w.getController(h);if(!p)return!0;const m=u.sequenceId||ie(),g=R(`${h}::seq::${m}`,h);if(n.addedInteractions[g]&&!i||!bn(g,f,h,p,t,n))return!0;const v=pn(u,l,g,h,n,{updateKey:e,onUpdate:()=>t.update()});if(!v)return!0;const y=gn(v,h)?null:vn(v,h,p),b=y?ot(...y.map(S=>S.readiness)):!1;if(b!==!0)return X(b,t,l,p,!0),!0;const E=yn(y,{controllerKey:e,listContainer:s,elements:i});if(E){const S=wn(t,s,i);w.addToSequence(g,E,S)}return!0})})}function $n(e,t,n,s,i){const o=n.get(e),r=o?.effects||{},a=Object.keys(r),c=[];a.forEach(f=>{const l=R(f,e);if(n.addedInteractions[l]&&!i)return;r[f].some(({effect:h,owner:p,...m},g)=>{const v=H(m.conditions||[],n.dataCache.conditions);if(v&&!v.matches)return!1;const y=h.effectId,b={...n.dataCache.effects[y]||{},...h,effectId:y};if(s&&b.listContainer!==s)return!1;const E=ke(b,n,{id:`${l}::${g}`,key:e,onUpdate:()=>{t.update()}},{policy:m.reducedMotionPolicy});if(E){const S=m.key&&R(m.key,e),$=w.getController(S);if(!$||!bn(l,p,S,$,t,n))return!0;const _=K(t,t.element,E,e,"effect");if(_!==!0)return X(_,t,m,$,!0),!0;E.listContainer&&t.watchChildList(E.listContainer);const[I,O]=dn(m,E,$.element,$.useFirstChild,t.element,t.useFirstChild,void 0,i);if(!I||!O)return!0;const C=U(E.conditions||[],n.dataCache.conditions);return c.push([e,m,E,I,O,C,t.useFirstChild,S||void 0]),!0}return!1})}),c.reverse().forEach(f=>{hn(...f)}),Ao(e,t,n,s,i);const u=Object.keys(o?.sequences||{}).length>0;return a.length>0||u}function Mt(e,t,n,s,i,o,r,a,c){let u;if(Wt(i)){const l={key:e,effectId:i.effectId,transition:i.transition,transitionProperties:i.transitionProperties,childSelector:j(i,{asCombinator:!0,addItemFilter:!0,useFirstChild:a}),selectorCondition:r};if(u=w.getController(e),!u)return;u.renderStyle(_s(l))}let f;if(n==="animationEnd"){const l=o.effectId,d=c?w.getInstance(c):void 0,h=d?.dataCache.effects[l],p=h&&ke(h,d,{id:`${c}::animationEnd::${l}`,key:c,onUpdate:()=>{w.getController(c)?.update()}});p&&(f=x(p))}D[n]?.add(t,s,i,o,{targetController:u,selectorCondition:r,allowA11yTriggers:w.allowA11yTriggers,sourceAnimationOptions:f})}function Ot(e){const t=e.key,n=w.getInstance(t);if(!n)return w.setController(t,e),!1;const{triggers:s=[]}=n?.get(t)||{},i=s.length>0;n.setController(t,e),Te.set(e,(Te.get(e)||0)+1),So(e),s.forEach((r,a)=>{const c=H(r.conditions,n.dataCache.conditions);if(c){const u=`${t}::trigger::${a}`;n.setupMediaQueryListener(u,c,t,()=>{e.update()})}if(!c||c.matches){const u=K(e,e.element,r,t,"interaction");if(u!==!0){X(u,e,r,e,!1);return}r.listContainer&&e.watchChildList(r.listContainer),rt(t,e,n,r)}});let o=!1;return n&&(o=$n(t,e,n)),i||o}function ko(e,t,n){const s=e.key,i=w.getInstance(s);if(i){const{triggers:o=[]}=i?.get(s)||{};o.forEach((r,a)=>{if(r.listContainer!==t)return;const c=H(r.conditions,i.dataCache.conditions);if(c){const u=`${s}::listTrigger::${t}::${a}`;i.setupMediaQueryListener(u,c,s,()=>{e.update()})}if(!c||c.matches){const u=K(e,e.element,r,s,"interaction",!1);if(u!==!0){X(u,e,r,e,!1);return}rt(s,e,i,r,n)}}),$n(s,e,i,t,n)}}function qo(e,t=!1){const n=e.key,s=w.getInstance(n);if(!s)return;const i=[...s.get(n)?.selectors.values()||[]].filter(Boolean).join(",");let o;i?(o=[...e.element.querySelectorAll(i)],e.useFirstChild||o.push(e.element)):o=[e.element],Sn(o),s.deleteController(n,t)}function Sn(e){const t=Object.values(D);for(const n of e)for(const s of t)s.remove(n);w.removeFromSequences(e)}const Ne="interactEffect";class In{element;key;connected;sheet;useFirstChild;_observers;_pluginCleanups;_appliedPlugins;_connectId;_latches;constructor(t,n,s){this.element=t,this.key=n,this.connected=!1,this.sheet=null,this._observers=new WeakMap,this._pluginCleanups=[],this._appliedPlugins=new WeakMap,this._connectId=0,this._latches=[],this.useFirstChild=s?.useFirstChild??!1}connect(t){if(this.connected)return;const n=this.element.dataset.interactKey;if(t=t||this.key||n,!t){console.warn("Interact: No key provided");return}n!==t&&(n&&console.warn(`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`),this.element.dataset.interactKey=t),this.key=t,this.connected=Ot(this)}disconnect({removeFromCache:t=!1}={}){this._connectId++,(this.key||this.element.dataset.interactKey)&&qo(this,t);for(const{release:s}of this._latches)s();if(this._latches.length=0,this._pluginCleanups.length){for(const s of this._pluginCleanups)try{s()}catch(i){console.error(i)}this._pluginCleanups.length=0}if(this._appliedPlugins=new WeakMap,this.sheet){const s=this.element?.getRootNode(),i=s.host?s:document;i.adoptedStyleSheets.indexOf(this.sheet)!==-1&&(i.adoptedStyleSheets=i.adoptedStyleSheets.filter(r=>r!==this.sheet))}this._observers=new WeakMap,this.sheet=null,this.connected=!1}update(){this.disconnect(),this.connect()}resume(){this.connected&&Ot(this)}renderStyle(t){const n=this.element?.getRootNode(),s=n.host?n:document;if(!this.sheet)this.sheet=new CSSStyleSheet,this.sheet.replaceSync(t.join(`
|
|
28
|
-
`)),s.adoptedStyleSheets=[...s.adoptedStyleSheets||[],this.sheet];else{let i=this.sheet.cssRules.length;for(const o of t)try{this.sheet.insertRule(o,i),i++}catch(r){console.error(r)}}}toggleEffect(t,n,s,i){if(s===null)return;if(!i&&this.element.toggleEffect){this.element.toggleEffect(t,n,s);return}const o=new Set(this.element.dataset[Ne]?.split(" ")||[]);n==="toggle"?o.has(t)?o.delete(t):o.add(t):n==="add"?o.add(t):n==="remove"?o.delete(t):n==="clear"&&o.clear(),(s||this.element).dataset[Ne]=Array.from(o).join(" ")}getActiveEffects(){const n=(this.element.dataset[Ne]||"").trim();return n?n.split(/\s+/):[]}watchChildList(t){const n=this.element.querySelector(t);if(n){let s=this._observers.get(n);s||(s=new MutationObserver(this._childListChangeHandler.bind(this,t)),this._observers.set(n,s),s.observe(n,{childList:!0}))}}_childListChangeHandler(t,n){const s=this.key||this.element.dataset.interactKey,i=[],o=[];n.forEach(r=>{r.removedNodes.forEach(a=>{a instanceof HTMLElement&&i.push(a)}),r.addedNodes.forEach(a=>{a instanceof HTMLElement&&o.push(a)})})
|
|
29
|
-
//# sourceMappingURL=index-
|
|
26
|
+
}`}const he={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Gs(e,t){const n=e?.name??he.rangeStart.name,s=t?.name??e?.name??he.rangeEnd.name,i={name:n,offset:e?.offset||he.rangeStart.offset},o={name:s,offset:t?.offset||he.rangeEnd.offset};return{startOffset:i,endOffset:o}}function x(e){if("keyframeEffect"in e&&!e.keyframeEffect.name&&"effectId"in e&&(e.keyframeEffect.name=e.effectId),"duration"in e)return{id:"",...e};const{rangeStart:t,rangeEnd:n,...s}=e,{startOffset:i,endOffset:o}=Gs(t,n);return{id:"",startOffset:i,endOffset:o,...s}}function k(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function le(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 vt=[{name:"visibility",value:"hidden"},{name:"clip-path",value:"none",important:!0},{name:"transform",value:"none",important:!0},{name:"translate",value:"none",important:!0},{name:"scale",value:"none",important:!0},{name:"rotate",value:"none",important:!0}],He={animation:!1,transition:!1,timeline:!1};function Jt(e,t){const n=()=>({listIndex:0,slotCursor:0,slotsInInteraction:0,slotsInSequence:0,touched:!1});return{key:e,childSelector:t,partSelectors:new Set,assigned:new Set,animation:n(),transition:n(),timeline:n(),keyframeEntries:new Map}}function en(e,t,n){return Object.fromEntries(Ce.map(s=>{const i=F(s),{listIndex:o,slotCursor:r,slotsInSequence:a}=e[i];return[s,t[i]?z(s,r+a,!0,n):z(s,o,!1,n)]}))}function Ge(e,t,n){Ae.forEach(s=>{t[s]&&(e[s].touched=!0,n[s]&&(e[s].slotsInSequence+=1))})}function Ws(e){const{namedEffect:t,keyframeEffect:n,transition:s,transitionProperties:i}=e;return t||n?"animation":s||i?"transition":null}function tn(e){return(e.variants||[e]).map(Ws).find(Boolean)||null}function Vs(e){const t=new Map;return e.effects.forEach(n=>{const s=tn(n);if(!s)return;const i=B(n),o=t.get(i)||{animation:0,transition:0,timeline:0};o[s]+=1,t.set(i,o)}),new Map([...t].map(([n,{animation:s,transition:i}])=>[n,{animation:s>1,transition:i>1,timeline:!1}]))}function Bs(e){Ae.forEach(t=>{const n=e[t];n.slotsInInteraction=Math.max(n.slotsInInteraction,n.slotsInSequence),n.slotsInSequence=0})}function Ys(e){Ae.forEach(t=>{const n=e[t];n.listIndex+=n.touched?1:0,n.slotCursor+=n.slotsInInteraction,n.slotsInInteraction=0,n.touched=!1})}const Us={animation:"animation","animation-composition":"composition","animation-timeline":"animationTimeline","animation-range":"animationRange"};function Ks(e,t,n,s){const{key:i,conditions:o}=t,r=ue(o,e.configConditions,"media"),a=U(o,e.configConditions),f=j(t,{asCombinator:!0,useFirstChild:e.useFirstChild,addItemFilter:!0}),u=B(t),c=e.targetsMap.get(u)||Jt(i,f),l=en(c,He,e.configIndex)["view-timeline"];return Ge(c,{animation:!1,transition:!1,timeline:!0},He),e.targetsMap.set(u,c),s.add(u),{key:i,media:r,selectorCondition:a,childSelector:f,declarations:[{name:l,value:`--${n}`}]}}function nn(e,t,n,s,i){const o=[];for(const r of Object.keys(i)){const a=`${Xe}${r}`;a in t&&o.push(...i[r](t[a],{key:n,scope:e,config:t}).map(f=>({...f,key:n,media:s})))}return o}function Xs(e,t,n,s,i,o){const{assigned:r,childSelector:a,partSelectors:f}=n,u={animation:!1,transition:!1,timeline:!1},{key:c,effectId:l,conditions:d,namedEffect:h,keyframeEffect:p,transition:m,transitionProperties:g,initial:v}=t,y=ue(d,e.configConditions,"media"),b=U(d,e.configConditions),E=[{key:c,media:y,selectorCondition:b,childSelector:a,declarations:[]}];let $=[];const{declarations:S}=E[0];e.plugins&&E.push(...nn("effect",t,c,y,e.plugins));const _=v&&t.duration===0;if((h||p)&&!_){const I=x(t),O=vs(null,I,s,o).filter(T=>T.name),P=O.length?{}:{"":[]};O.forEach(T=>{const M=T.part||"";(P[M]||=[]).push(T)}),$=O.map(T=>({name:T.name,keyframes:T.keyframes})),S.push(...O.flatMap(({custom:T})=>Object.entries(T||{}).filter(([M,C])=>C!==void 0).map(([M,C])=>({name:M,value:C})))),Object.entries(P).forEach(([T,M])=>{const C=ze.map(L=>({_listPropertyName:L,name:i[L],value:M.map(qe=>{const Re=Us[L];return qe[Re]||Z[L]}).join(", ")})).filter(({_listPropertyName:L,name:qe,value:Re})=>Re!==Z[L]||r.has(qe));C.forEach(({name:L})=>r.add(L)),u.animation=u.animation||C.length>0;const de=T?`[data-motion-part~="${T}"]`:a;T&&C.length&&f.add(de),v?(E.push({key:c,media:y,selectorCondition:b,childSelector:de,declarations:vt,selectorSuffix:":not([data-interact-enter])"}),E.push({key:c,media:y,selectorCondition:b,childSelector:de,declarations:C,selectorSuffix:':not([data-interact-enter="done"])'})):T?E.push({key:c,media:y,selectorCondition:b,childSelector:de,declarations:C}):S.push(...C)})}else if(m||g){const I=Vt(t),O=Bt(t);(O.length||r.has(i.transition))&&(S.push({name:i.transition,value:O.join(", ")||Z.transition}),r.add(i.transition),u.transition=!0),E.push({key:c,media:y,selectorCondition:b,childSelector:a,states:[l],declarations:I})}else _&&E.push({key:c,media:y,selectorCondition:b,childSelector:a,declarations:vt,selectorSuffix:":not([data-interact-enter])"}),S.push(...ze.filter(I=>r.has(i[I])).map(I=>({name:i[I],value:Z[I]})));return{rules:E.filter(I=>I.declarations.length),keyframes:$,wrote:u}}function Qs(e,t,n,s){const i=t.namedEffect&&Ze(t.namedEffect.type,!1);if(!i?.getNames)return;const o=a=>i.getNames({...t,suffix:a});if(o("-1").join()===o().join())return;const r=e.keyframeEntries.get(n)||[];e.keyframeEntries.set(n,[...r,{slotKey:s,getNames:o}])}function Zs(e,t,n){const s=e.forceReducedMotion||Cs(t);return n&&s&&n.reducedMotionPolicy!=="ignore"?{...n,offset:0}:n}function sn(e,t,n,s,i,o){const r=B(t),a=e.targetsMap.get(r)||Jt(t.key,j(t,{asCombinator:!0,useFirstChild:e.useFirstChild,addItemFilter:!0}));s.add(r);const f=o?.get(r)||He,u=en(a,f,e.configIndex),c=t.variants||[t],l=tn(t);if(e.collectSlots)return c.forEach(m=>Qs(a,m,u.animation,t.slotKey)),Ge(a,{animation:l==="animation",transition:l==="transition",timeline:!1},f),e.targetsMap.set(r,a),[];const d=a.assigned,h=c.map(m=>(m.namedEffect&&(m.suffix=e.keyframeSlots.get(t.slotKey)),a.assigned=new Set(d),{...Xs(e,m,a,n,u,Zs(e,m,i)),assigned:a.assigned}));a.assigned=new Set(h.flatMap(m=>[...m.assigned])),h.forEach(({keyframes:m})=>m.forEach(({name:g,keyframes:v})=>e.keyframesMap.set(g,v)));const p=Object.fromEntries(Ae.map(m=>[m,h.some(g=>g.wrote[m])]));return Ge(a,p,f),e.targetsMap.set(r,a),h.flatMap(({rules:m})=>m)}function Js(e,t,n,s){const i=[],o=new Set,r=Vs(t);i.push(...t.effects.flatMap(f=>sn(e,f,n,o,t,r)));const{conditions:a}=t;return o.forEach(f=>{s.add(f);const u=e.targetsMap.get(f),c=js(u,a,e.configConditions,e.configIndex);c&&(c.declarations.forEach(({name:l})=>u.assigned.add(l)),i.push(c)),Bs(u)}),i}function ei(e,t,n){const{key:s,conditions:i,effects:o=[],sequences:r=[]}=t,a=e.plugins?nn("interaction",t,s,ue(i,e.configConditions,"media"),e.plugins):[],{trigger:f}=t,u={trigger:Is(f),id:te("trigger",[n],e.configIndex)},c=new Set;f==="viewProgress"&&a.push(Ks(e,t,u.id,c));const l=o.map((h,p)=>{const m=Qt(h,t,e.config,te("eff",[n,p],e.configIndex),{force:e.forceReducedMotion,defaultPolicy:e.reducedMotionPolicy});return m&&Object.assign(m,{slotKey:$e(n,p)})}).filter(h=>h!==null);a.push(...l.flatMap(h=>sn(e,h,u,c)));const d=r.map((h,p)=>ks(h,t,e.config,te("seq",[n,p],e.configIndex),m=>$e(n,m,p),{force:e.forceReducedMotion,defaultPolicy:e.reducedMotionPolicy})).filter(h=>h!==null);return a.push(...d.flatMap(h=>Js(e,h,u,c))),f==="viewProgress"&&c.size>1&&e.scopedTimelines.push(`--${u.id}`),c.forEach(h=>Ys(e.targetsMap.get(h))),a}function ti(e={}){return typeof e=="boolean"?{useFirstChild:e}:e}function on(e,t){const{useFirstChild:n=!0,plugins:s,configIndex:i,collectSlots:o=!1,forceReducedMotion:r=w.forceReducedMotion,reducedMotionPolicy:a=w.reducedMotionPolicy}=t,f={config:e,configConditions:Ut(e.conditions),targetsMap:new Map,keyframesMap:new Map,keyframeSlots:o?new Map:rn(e,{configIndex:i,forceReducedMotion:r,reducedMotionPolicy:a}),scopedTimelines:[],collectSlots:o,useFirstChild:n,forceReducedMotion:r,reducedMotionPolicy:a,plugins:s,configIndex:i},u=e.interactions.flatMap((c,l)=>ei(f,c,l));return{ctx:f,cssRules:u}}function te(e,t,n){return[e,...n===void 0?[]:[`c${n}`],...t].join("-")}function $e(e,t,n){return[e,n,t].filter(s=>s!==void 0).join(":")}function rn(e,t={}){const{ctx:n}=on(e,{...t,collectSlots:!0}),s=new Map,i=o=>o?`-${o}`:void 0;return n.targetsMap.forEach(({keyframeEntries:o})=>{const r=new Set;o.forEach(a=>{const f=l=>a.flatMap(({getNames:d})=>d(i(l)));let u=0,c=f(u);for(;c.some(l=>r.has(l));)c=f(++u);c.forEach(l=>r.add(l)),u&&a.forEach(({slotKey:l})=>s.set(l,i(u)))})}),s}function ni(e,t){const{ctx:n,cssRules:s}=on(e,ti(t)),i=[...n.targetsMap.values()],o=Math.max(0,...i.map(({animation:h})=>h.listIndex)),r=Math.max(0,...i.map(({transition:h})=>h.listIndex)),a=Math.max(0,...i.map(({timeline:h})=>h.listIndex)),f=zs(i.flatMap(h=>[h,...[...h.partSelectors].map(p=>({key:h.key,childSelector:p}))]),o,r,a,n.configIndex),u=Math.max(0,...i.map(({animation:h})=>h.slotCursor)),c=Math.max(0,...i.map(({transition:h})=>h.slotCursor)),l=Ds(o,r,u,c,a,n.configIndex),d=Hs(n.scopedTimelines,n.configIndex);return{keyframes:n.keyframesMap,atProperty:l,cssRules:s,listsRule:f,timelineScopeRule:d}}function si(e,t){const{cssRules:n,keyframes:s,atProperty:i,listsRule:o,timelineScopeRule:r}=ni(e,t);return[...i,...[...s.entries()].map(([f,u])=>Fs(f,u)),...n.map(xs),o,r].filter(f=>f).join(`
|
|
27
|
+
`)}const ii={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},oi={root:null,rootMargin:"0px",threshold:[0]},ri=.2;function ai(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 ne={},q=new WeakMap,We=new WeakSet,re=new WeakMap,W=new WeakMap;let et={},J=null;function Ie(e,t,n){(re.get(e)||t).unobserve(e),We.delete(e),n&&re.delete(e)}function ci(e){et=e}function an(e,t,n){q.get(e)?.forEach(({source:i,handler:o})=>{i===e&&o(t,n)})}function yt(){return J||(J=new IntersectionObserver(e=>{e.forEach(t=>{const n=t.target;t.isIntersecting||an(n,!1,!0)})},oi),J)}function tt(e,t=!1){return JSON.stringify({...e,isSafeMode:t})}function nt(e,t=!1){const n=tt(e,t);if(ne[n])return ne[n];const s=e.threshold??ri,i=t?ii:{root:null,rootMargin:e.inset?ai(e.inset):"0px",threshold:s},o=new IntersectionObserver(r=>{r.forEach(a=>{const f=a.target,u=!We.has(f);if(u&&(We.add(f),e.useSafeViewEnter&&!a.isIntersecting)){A.measure(()=>{const c=a.boundingClientRect.height,l=a.rootBounds?.height;if(!l)return;const d=Array.isArray(e.threshold)?Math.min(...e.threshold):e.threshold;d&&c*d>l&&A.mutate(()=>{o.unobserve(f);const p=nt(e,!0);re.set(f,p),p.observe(f)})});return}(a.isIntersecting||!u)&&an(f,a.isIntersecting)})},i);return ne[n]=o,o}function fi(e,t,n,s={},{selectorCondition:i,animation:o}={}){const r={...et,...s},a=n.triggerType||"once",f=o||fe(t,x(n));if(!f)return;const u=nt(r);a!=="once"&&f.persist?.();let c=!0,l=!1,d;const h=(m,g)=>{if(!(i&&!t.matches(i)))if(a==="once"){if(m&&!l){l=!0;const v=q.get(e);(!v||v.size===0||v.size===1&&v.has(d))&&Ie(e,u),f.onFinish(()=>{q.get(e)?.delete(d),q.get(t)?.delete(d)}),f.play(()=>{const y=()=>{t.dataset.interactEnter="start"},b=()=>{A.mutate(()=>{t.dataset.interactEnter="done"})};f.isCSS?(A.mutate(()=>{requestAnimationFrame(y)}),f.onFinish(b),f.onAbort(b)):(A.mutate(y),f.onFinish(b))})}}else a==="alternate"?c&&m?(c=!1,f.play()):c||f.reverse():a==="repeat"?m?(f.progress(0),f.play()):g&&(f.pause(),f.progress(0)):a==="state"&&(m?f.play():g&&f.pause())};d={source:e,target:t,handler:h,cleanup:()=>{Ie(e,u,!0),(a==="repeat"||a==="state")&&yt().unobserve(e),f.cancel()}},k(q,e,d),k(q,t,d),re.set(e,u),u.observe(e),(a==="repeat"||a==="state")&&yt().observe(e),a==="once"&&W.get(e)?.get(tt(r))&&h(!0)}function ui(e,t={}){const n={...et,...t},s=tt(n);let i=W.get(e);if(i||(i=new Map,W.set(e,i)),i.has(s))return;i.set(s,!1);const o=nt(n);let r;const a=u=>{if(!u)return;i.set(s,!0);const c=q.get(e);c?.delete(r),(!c||c.size===0)&&Ie(e,o)},f=()=>Ie(e,o,!0);return r={source:e,target:e,handler:a,cleanup:f},k(q,e,r),re.set(e,o),o.observe(e),()=>{i.delete(s),!i.size&&W.get(e)===i&&W.delete(e);const u=q.get(e);u?.delete(r)&&u.size===0&&f()}}function li(e){le(q,e),W.delete(e)}function di(){J=null,Object.keys(ne).forEach(e=>delete ne[e])}const hi={add:fi,remove:li,latch:ui,setOptions:ci,reset:di};function cn(e,t){return Object.assign(Object.create(t),e)}function mi(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 pi(e){let t=!1;return function(){t||(t=!0,window.requestAnimationFrame(()=>{t=!1,e()}))}}function Et(e,t){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,e()},t)}}function gi(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 Te(n[1],t)+Te(n[6],t)}function Te(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)?gi(e,t):parseInt(e)||0:0}function G(e,t,n){const{name:s,offset:i=0}=e,{start:o,end:r}=n,a=r-o,f=i/100;let u,c;return s==="entry"?(u=o-t,c=Math.min(t,a)):s==="entry-crossing"?(u=o-t,c=a):s==="contain"?(u=Math.min(r-t,o),c=Math.abs(t-a)):s==="exit"?(u=Math.max(o,r-t),c=Math.min(t,a)):s==="exit-crossing"?(u=o,c=a):s==="cover"&&(u=o-t,c=a+t),u+f*c|0}function Fe(e,t,n,s,i){let o=0;const r={start:t,end:n};return e.forEach((a,f)=>{o+=a.offset;const u=a.sticky;if(u){if("end"in u&&e[f-1]?.element){const d=((i?a.element.offsetWidth:a.element.offsetHeight)||0)+u.end-s,h=o+d-a.offset,p=h<r.start,m=!p&&h<=n;let g=0;(p||m)&&(g=a.offset,r.end+=g),p&&(r.start+=g)}if("start"in u){const c=o-u.start,l=c<r.start,d=!l&&c<=r.end;let h=0;const p=e[f-1]?.element;if(p){if(l||d){const m=(i?p.offsetWidth:p.offsetHeight)||0,g=a.offset,v=(i?a.element.offsetWidth:a.element.offsetHeight)||0;h=m-(g+v),o+=h,r.end+=h}l&&(r.start+=h)}}}}),r}function vi(e,t,n,s,i,o){const{start:r,end:a,duration:f}=e;let u=r,c=a,l=e.startRange,d=e.endRange,h;if(typeof f=="string"){l={name:f,offset:0},d={name:f,offset:100},u=G(l,n,t),c=G(d,n,t),h=c-u;const p=Fe(o,u,c,n,s);u=p.start,c=p.end}else{if(l||r?.name){l=l||r;const p=Te(l.add,i),m=G({...l,offset:0},n,t),g=G({...l,offset:100},n,t),v=Fe(o,m,g,n,s);u=v.start+l.offset/100*(v.end-v.start)+p}if(d||a?.name){d=d||a;const p=Te(d.add,i),m=G({...d,offset:0},n,t),g=G({...d,offset:100},n,t),v=Fe(o,m,g,n,s);c=v.start+d.offset/100*(v.end-v.start)+p}else typeof f=="number"&&(c=u+f)}return!h&&!f&&(h=c-u),{...e,start:u,end:c,startRange:l,endRange:d,duration:h||f}}function yi(e){return e.position==="sticky"}function Ei(e,t,n){return e.position==="fixed"&&(!t||t===window.document.body||t===n)}function wi(e,t){return parseInt(t?e.left:e.top)}function bi(e,t){return parseInt(t?e.right:e.bottom)}function Si(e,t,n){n&&(e.style.position="static");const s=(t?e.offsetLeft:e.offsetTop)||0;return n&&(e.style.position=null),s}function $i(e,t){let n;const s=wi(e,t),i=bi(e,t),o=!isNaN(s),r=!isNaN(i);return(o||r)&&(n={},o&&(n.start=s),r&&(n.end=i)),n}function me(e,t,n,s,i){const o=e[0].viewSource,r=[];let a=(s?o.offsetWidth:o.offsetHeight)||0,f=0,u=o;for(;u;){const l=window.getComputedStyle(u),d=yi(l),h=d?$i(l,s):void 0,p=Si(u,s,d);if((!h||!("end"in h))&&(f+=p),r.push({element:u,offset:p,sticky:h}),u=u.offsetParent,Ei(l,u,t))break;if(u===t){r.push({element:u,offset:0});break}}return r.reverse(),e.map(l=>({...vi(l,{start:f,end:f+a},n,s,i,r)}))}const wt=100,Ii={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function Ti(e,t,n,s){let i=0;return e>=t&&e<=n?i=s?(e-t)/s:1:e>n&&(i=1),i}function bt(e,t){return e===window?t?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:t?e.clientWidth:e.clientHeight}function _i(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function Mi(e){const t=cn(e,Ii),n=t.root,s=t.horizontal,i=new WeakMap;let o=bt(n,s),r,a,f,u,c;const l=[],d=_i();if(t.scenes=Object.values(e.scenes.reduce((m,g,v)=>{const y=g.groupId?`group-${g.groupId}`:String(v);return m[y]?m[y].push(g):m[y]=[g],m},{})).flatMap(m=>(m.every(g=>g.viewSource&&(typeof g.duration=="string"||g.start?.name))?(m=me(m,n,o,s,d),(t.observeSourcesResize||t.observeContentResize)&&l.push(m)):m.forEach(g=>{g.end==null&&(g.end=g.start+g.duration),g.duration==null&&(g.duration=g.end-g.start)}),m)),t.scenes.forEach((m,g)=>{m.index=g}),l.length){const m=new Map;window.ResizeObserver&&(f=new window.ResizeObserver(function(g){g.forEach(v=>{const y=m.get(v.target),b=me(y,n,o,s,d);b.forEach((E,$)=>{t.scenes[E.index]=b[$]}),l.splice(l.indexOf(y),1,b)})}),l.forEach(g=>{f.observe(g[0].viewSource,{box:"border-box"}),m.set(g[0].viewSource,g)}),t.observeContentResize&&t.contentRoot&&new window.ResizeObserver(Et(()=>{const v=l.map(y=>{const b=me(y,n,o,s,d);return b.forEach((E,$)=>{t.scenes[E.index]=b[$]}),b});l.length=0,l.push(...v),l.forEach(y=>{m.set(y[0].viewSource,y)})},wt)).observe(t.contentRoot,{box:"border-box"})),t.observeViewportResize&&(u=Et(function(){o=bt(n,s);const g=l.map(v=>{const y=me(v,n,o,s,d);return y.forEach((b,E)=>{t.scenes[b.index]=y[E]}),y});l.length=0,l.push(...g),l.forEach(v=>{m.set(v[0].viewSource,v)})},wt),n===window?window.addEventListener("resize",u):window.ResizeObserver&&(c=new window.ResizeObserver(u),c.observe(n,{box:"border-box"})))}t.observeViewportEntry&&window.IntersectionObserver&&(a=new window.IntersectionObserver(function(m){m.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(m=>{if(m.viewSource){let g=i.get(m.viewSource);g||(g=[],i.set(m.viewSource,g),a.observe(m.viewSource)),g.push(m)}}));function h({p:m,vp:g}){m=+m.toFixed(1);const v=+g.toFixed(4);if(m!==r){for(let y of t.scenes)if(!y.disabled){const{start:b,end:E,duration:$}=y,S=Ti(m,b,E,$);y.effect(y,S,v)}r=m}}function p(){t.scenes.forEach(m=>m.destroy?.()),a&&(a.disconnect(),a=null),f&&(f.disconnect(),f=null),u&&(c?(c.disconnect(),c=null):window.removeEventListener("resize",u))}return{tick:h,destroy:p}}const Oi={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class Pi{constructor(t={}){this.config=cn(t,Oi),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=pi(()=>{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=mi(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=Mi(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Ve=new WeakMap;let fn=()=>({});function Ci(e){fn=e}function Ai(e,t,n,s,{selectorCondition:i}){if(i&&!t.matches(i))return;const o={trigger:"view-progress",element:e},r=x(n);let a;if("ViewTimeline"in window){const u=fe(t,r,o);u&&!u.isCSS&&(u.play(),a=()=>{u.ready.then(()=>{u.cancel()})})}else{const u=Ht(t,r,o);if(u){const c=Array.isArray(u)?u:[u],l=new Pi({viewSource:e,scenes:c,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...fn()});a=()=>{l.destroy()},Promise.all(c.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!a)return;const f={source:e,target:t,cleanup:a};k(Ve,e,f),k(Ve,t,f)}function ki(e){le(Ve,e)}const qi={add:Ai,remove:ki,registerOptionsGetter:Ci};function St(e,t,n){return Math.min(Math.max(e,n),t)}function $t(e){let t=!1;return function(){if(!t)return t=!0,window.requestAnimationFrame(()=>{t=!1,e()})}}function Ri(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 Li(){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 Fi(){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 xi(e){Fi().then(t=>{e.fixRequired=t,t&&(window.addEventListener("scroll",e.scrollHandler),e.scrollHandler())})}let pe=0;const be=new Set;function Ni(){const e=n=>{for(let s of n.changedTouches)be.add(s.identifier)},t=n=>{for(let s of n.changedTouches)be.delete(s.identifier)};return document.addEventListener("touchstart",e,{passive:!0}),document.addEventListener("touchend",t,{passive:!0}),function(){be.clear(),document.removeEventListener("touchstart",e),document.removeEventListener("touchend",t)}}function Di(e,t){if("onscrollend"in window)return e.addEventListener("scrollend",t),function(){e.removeEventListener("scrollend",t)};let n=0,s;pe||(s=Ni()),pe+=1;function i(o){clearTimeout(n),n=setTimeout(()=>{be.size?setTimeout(i,100):(t(o),n=0)},100)}return e.addEventListener("scroll",i),function(){e.removeEventListener("scroll",i),pe-=1,pe||s()}}function ji(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 zi(e,t){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>e&&e(t))}function Hi(e){e.rect.width=window.document.documentElement.clientWidth,e.rect.height=window.document.documentElement.clientHeight}function Gi(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 Wi(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 f={x:0,y:0};e.scenes.forEach(c=>{c.target&&c.centeredToTarget&&(c.transform=ji(Ri(c.target),e.rect,f),t=!0),e.root?i=Gi(e):(o=Hi.bind(null,e),window.addEventListener("resize",o))}),s=function(c){for(let l of e.scenes)if(!l.disabled){const d=l.transform?.x(c.x)||c.x/e.rect.width,h=l.transform?.y(c.y)||c.y/e.rect.height,p=+St(0,1,d).toPrecision(4),m=+St(0,1,h).toPrecision(4),g={x:c.vx,y:c.vy};e.allowActiveEvent&&(c.active=d<=1&&h<=1&&d>=0&&h>=0),l.effect(l,{x:p,y:m},g,c.active)}Object.assign(n,c)},t&&(r=zi.bind(f,s,n),a=Di(document,r));function u(){e.scenes.forEach(c=>c.destroy?.()),a?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",o),o=null),s=null,n=null}return{tick:s,destroy:u}}const Vi=1e3/60*3;let ge;function Bi(){V.x=window.scrollX,V.y=window.scrollY}const V={x:0,y:0,scrollHandler:Bi,fixRequired:void 0};class Yi{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():$t(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):$t(()=>{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){ge=typeof ge=="boolean"?ge:Li();const i=ge?window.devicePixelRatio:1;typeof V.fixRequired>"u"&&xi(V),this._measure=o=>{if(o.target!==this.config.root){const r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:o.x*i+V.x,clientY:o.y*i+V.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,f=n(Math.min(1,a));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((u,[c,l])=>(c==="active"?u[c]=l:u[c]=this.previousProgress[c]+(l-this.previousProgress[c])*f,u),this.currentProgress||{}),a<1&&(this._nextTransitionTick=requestAnimationFrame(o),i=r-this._startTime>Vi),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=Wi(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Be=new WeakMap;let un=()=>({});function Ui(e){un=e}function Ki(e){return!("keyframeEffect"in e||"customEffect"in e)||!e.transitionDuration?{}:{transitionDuration:e.transitionDuration,transitionEasing:Qe(e.transitionEasing)}}function Xi(e,t,n,s={},{selectorCondition:i}){if(i&&!t.matches(i))return;const o={trigger:"pointer-move",element:e,axis:s.axis??"y"},r=Ht(t,x(n),o);if(r){const a=Array.isArray(r)?r:[r],f=new Yi({root:s.hitArea==="self"?e:void 0,scenes:a,...un(),...Ki(n)}),c={source:e,target:t,cleanup:()=>{f.destroy()}};k(Be,e,c),k(Be,t,c),Promise.all(a.map(l=>l.ready||Promise.resolve())).then(()=>{f.start()})}}function Qi(e){le(Be,e)}const Zi={add:Xi,remove:Qi,registerOptionsGetter:Ui},Ye=new WeakMap,N=new WeakMap;function ln(e,t){return Array.from(e.querySelectorAll(t))}function Ji(e){return e.animationName||`#${e.detail?.effectId}`}function eo(e){const t=[];for(let n=e;n;n=n.parentElement)N.get(n)?.forEach(({sourceSelector:s,events:i})=>{(s?!ln(n,s).includes(e):n!==e)||i.forEach((o,r)=>{o.forEach(a=>{(r===e||a.bubbles&&e.contains(r))&&t.push(a)})})});return t}function to(e){N.get(e)?.forEach(({cleanup:t})=>t()),N.delete(e)}function no(e,t,n,s,{selectorCondition:i,animation:o,sourceAnimationOptions:r}){const a=o||fe(t,x(n));if(!a)return;const{effectId:f}=s,u=h=>{if(i&&!t.matches(i))return!1;const p=h.animationName,m=h.detail?.effectId,g=r?zt(e,r):null;if(g){if(g.playState==="running"||p&&!g.hasAnimationName(p))return!1;if(m&&m!==f&&!g.hasAnimationId(m))return!1}return!0},c=h=>{u(h)&&a.play()},d={source:e,target:t,cleanup:()=>{a.cancel(),e.removeEventListener("animationend",c)}};k(Ye,e,d),k(Ye,t,d),e.addEventListener("animationend",c),eo(e).some(u)&&a.play()}function so(e,t,n){let s=N.get(e);if(s?.some(a=>a.sourceSelector===n))return;s||(s=[],N.set(e,s));const i=new Map,o=a=>{const f=a.target;if(n&&!ln(e,n).some(l=>l===f||a.bubbles&&l.contains(f)))return;let u=i.get(f);u||(u=new Map,i.set(f,u)),u.set(Ji(a),a)},r={sourceSelector:n,events:i,cleanup:()=>e.removeEventListener("animationend",o,!0)};return e.addEventListener("animationend",o,!0),s.push(r),()=>{const a=N.get(e),f=a?a.indexOf(r):-1;f!==-1&&(r.cleanup(),a.splice(f,1),a.length||N.delete(e))}}function io(e){le(Ye,e),to(e)}const oo={add:no,remove:io,latch:so,latchesSubtree:!0};function ro(e,t,n,s,i){const o=i||fe(e,x(t));if(!o)return null;let r=!0;const a=t.triggerType||"alternate";return{handler:u=>{if(n&&!e.matches(n))return;const c=!s,l=s?.enter?.includes(u.type),d=s?.leave?.includes(u.type);if(l||c){if(a==="alternate"||a==="state")r?(r=!1,o.play()):a==="alternate"?o.reverse():a==="state"&&(o.playState==="running"?o.pause():o.playState!=="finished"&&o.play());else{if(o.progress(0),delete e.dataset.interactEnter,o.isCSS){const h=()=>{A.mutate(()=>{e.dataset.interactEnter="done"})};o.onFinish(h),o.onAbort(h)}o.play()}return}d&&(a==="alternate"?o.reverse():a==="repeat"?(o.cancel(),A.mutate(()=>{delete e.dataset.interactEnter})):a==="state"&&o.playState==="running"&&o.pause())},cleanup:()=>o.cancel()}}function ao(e,t,{effectId:n,listContainer:s,listItemSelector:i,stateAction:o},r,a){const f=!!s,u=o??"toggle",c=u==="toggle";return l=>{if(r&&!e.matches(r))return;const d=f?e.closest(`${s} > ${i||""}:has(:scope)`):void 0,h=!a,p=a?.enter?.includes(l.type),m=a?.leave?.includes(l.type);h?t.toggleEffect(n,u,d):(p&&t.toggleEffect(n,c?"add":u,d),m&&c&&t.toggleEffect(n,"remove",d))}}const Ue=new WeakMap;function It(e,t){return n=>{const s=n;e.contains(s.relatedTarget)||t(s)}}function co(e){return t=>{const n=t;(n.pointerType||n.detail>0)&&e(n)}}function fo(e){return t=>{const n=t;n.code==="Space"?(n.preventDefault(),e(n)):n.code==="Enter"&&e(n)}}const uo={focusin:(e,t)=>It(e,t),focusout:(e,t)=>It(e,t),click:(e,t)=>co(t),keydown:(e,t)=>fo(t)};function lo(e,t,n){const s=uo[e];return s?s(t,n):i=>n(i)}function ho(e){return typeof e=="object"&&!Array.isArray(e)&&("enter"in e||"leave"in e)}function mo(e){if(typeof e=="string")return{toggle:[e]};if(Array.isArray(e))return{toggle:[...e]};if(ho(e)){const t=e.enter?[...e.enter]:[],n=e.leave?[...e.leave]:[];return{enter:t,leave:n}}return{}}function po(e){return!!(e.enter?.length||e.leave?.length)}function go(e){return po(e)?{enter:e.enter??[],leave:e.leave??[]}:void 0}function vo(e,t,n,s,{targetController:i,selectorCondition:o,animation:r}){const a=mo(s.eventConfig),f=n.transition||n.transitionProperties,u=go(a);let c,l,d=!1;if(f)c=ao(t,i,n,o,u);else{const y=ro(t,n,o,u,r);c=y?.handler??null,l=y?.cleanup,d=n.triggerType==="once"}if(!c)return;const h=c,p=new AbortController;function m(y,b,E){const $=lo(b,e,h);y.addEventListener(b,$,{...E,signal:p.signal})}const v={source:e,target:t,cleanup:()=>{p.abort(),l?.()}};if(k(Ue,e,v),k(Ue,t,v),u){const y=a.enter,b=a.leave;y.forEach(S=>{S==="focusin"&&(e.tabIndex=0),m(e,S,{passive:!0,once:d})});const E=!n.stateAction||n.stateAction==="toggle";(f?E:n.triggerType!=="once")&&b.forEach(S=>{if(S==="focusout"){m(e,S,{once:d});return}m(e,S,{passive:!0})})}else(a.toggle??[]).forEach(b=>{m(e,b,{once:d,passive:b!=="keydown"})})}function yo(e){le(Ue,e)}const ee={add:vo,remove:yo},Ke={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},Tt={click:Ke.activate,hover:Ke.interest};function ve(e){const t=Ke[e];return(n,s,i,o,r)=>{const a=r?.allowA11yTriggers&&e in Tt?Tt[e]:t;ee.add(n,s,i,{eventConfig:a},r??{})}}const D={viewEnter:hi,hover:{add:ve("hover"),remove:ee.remove},click:{add:ve("click"),remove:ee.remove},animationEnd:oo,viewProgress:qi,pointerMove:Zi,activate:{add:ve("activate"),remove:ee.remove},interest:{add:ve("interest"),remove:ee.remove}};function Eo(e){return e.replace(/\[[^\]]+]/g,"[]")}class w{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static reducedMotionPolicy="collapse";static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;static pluginDefers=new Map;static _released=new Set;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=So(t,s,{configIndex:n?.configIndex,forceReducedMotion:n?.forceReducedMotion??w.forceReducedMotion,reducedMotionPolicy:n?.reducedMotionPolicy??w.reducedMotionPolicy});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=Eo(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=R(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,w._released.clear()}static setup(t){t.scrollOptionsGetter&&D.viewProgress.registerOptionsGetter?.(t.scrollOptionsGetter),t.pointerOptionsGetter&&D.pointerMove.registerOptionsGetter?.(t.pointerOptionsGetter),t.viewEnter&&D.viewEnter.setOptions(t.viewEnter),t.allowA11yTriggers!==void 0&&(w.allowA11yTriggers=t.allowA11yTriggers),t.forceReducedMotion!==void 0&&(w.forceReducedMotion=t.forceReducedMotion),t.reducedMotionPolicy!==void 0&&(w.reducedMotionPolicy=t.reducedMotionPolicy)}static getInstance(t){return w.instances.find(n=>n.has(t))}static getController(t){return t?w.controllerCache.get(t):void 0}static setController(t,n){w.controllerCache.set(t,n)}static deleteController(t){w.controllerCache.delete(t)}static registerEffects=hs;static getRegisteredEffect=Ze;static use(t,n,s){w.plugins.set(t,n);const i=s?.defer;i&&i.length?w.pluginDefers.set(t,Array.isArray(i)?i:[i]):w.pluginDefers.delete(t)}static ready(t,n){w._released.add(n?`${t}::${n}`:t),n?w.controllerCache.get(n)?.resume():w.controllerCache.forEach(s=>s.resume())}static _isPluginReleased(t,n){const s=w.pluginDefers.get(t);return s?s.every(i=>w._released.has(i)||w._released.has(`${i}::${n}`)):!0}static getPlugin(t){return w.plugins.get(t)}static getPluginsNames(){return new Set(w.plugins.keys())}static getSequence(t,n,s){const i=w.sequenceCache.get(t);if(i)return i;const o=bs(n,s);return w.sequenceCache.set(t,o),w._registerSequenceElements(s,o),o}static addToSequence(t,n,s){const i=w.sequenceCache.get(t);if(!i)return!1;const r=Gt(n).map((a,f)=>({index:s[f]??i.animationGroups.length,group:a}));return i.addGroups(r),w._registerSequenceElements(n,i),!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 wo=0;function j(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 _t(e){return"sequenceId"in e&&!("effects"in e)}function xe(e,t){return e[t]||(e[t]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),e[t]}function bo(e,t,n){const{effects:s=[]}=e;return s.some((i,o)=>n.has(t(o)))?{...e,effects:s.map((i,o)=>{const r=n.get(t(o));return r?{...i,suffix:r}:i})}:e}function So(e,t,n){const{configIndex:s}=n,{effects:i={},sequences:o={},conditions:r={}}=e,a={},f=e.interactions?rn(e,n):new Map;return e.interactions?.forEach((u,c)=>{const l=u.key,d=++wo,{effects:h,sequences:p,...m}=u;if(!l){console.error(`Interaction ${d} is missing a key for source element.`);return}xe(a,l);const g=h?Array.from(h):[];g.reverse();const v=p?.map((E,$)=>{if(_t(E)){const _=o[E.sequenceId];return _?{..._,...E}:(console.warn(`Interact: Sequence "${E.sequenceId}" not found in config`),E)}const S=E;return S.sequenceId||(S.sequenceId=te("seq",[c,$],s)),S}),y={...m,effects:g.length>0?g:void 0,sequences:v?.map((E,$)=>bo(E,S=>$e(c,S,$),f))};a[l].triggers.push(y),a[l].selectors.add(j(y,{useFirstChild:t}));const b=y.listContainer;g.forEach((E,$)=>{const S=E.effectId?i[E.effectId]:void 0;let _=E.key||S?.key;const I=g.length-1-$;E.effectId||(E.effectId=te("eff",[c,I],s));const O=f.get($e(c,I));if(O&&(E.suffix=O),_=_||l,E.key=_,b&&E.listContainer&&(_!==l||E.listContainer!==b))return;const P=B({...S,...E,key:_}),T=`${l}::${P}::${d}`;if(E.interactionId=T,a[l].interactionIds.add(T),_===l)return;const M=xe(a,_);M.effects[T]||(M.effects[T]=[],M.interactionIds.add(T)),M.effects[T].push({...m,effect:E,owner:y}),M.selectors.add(j(E,{useFirstChild:t}))}),v?.forEach(E=>{if(!E||_t(E))return;const $=E,S=$.sequenceId;$.effects.forEach((I,O)=>{I.effectId||(I.effectId=`eff-${S}-${O}`);let P=I.key;if(!P&&I.effectId){const M=i[I.effectId];M&&(P=M.key)}P=P||l;const T=j(I,{useFirstChild:t});if(T&&a[l].selectors.add(T),P!==l){const M=xe(a,P),C=`${P}::seq::${S}::${d}`;M.sequences[C]||(M.sequences[C]=[],M.interactionIds.add(C)),M.sequences[C].push({...m,sequence:$,owner:y}),M.selectors.add(T)}})})}),{effects:i,sequences:o,conditions:Ut(r),reducedMotionPolicy:n.reducedMotionPolicy,forceReducedMotion:n.forceReducedMotion,interactions:a}}const _e=new WeakMap;function st(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function it(e,t){for(const n of w.getPluginsNames())if(`${Xe}${n}`in t&&!w._isPluginReleased(n,e))return!0;return!1}function K(e,t,n,s,i,o=!0){if(it(s,n))return!1;const r=[];for(const a of w.getPluginsNames()){const f=`${Xe}${a}`;if(!(f in n))continue;const u=n[f],c=u!==null&&typeof u=="object",l=c?e._appliedPlugins.get(u):void 0;if(l===!0)continue;if(l){r.push(l);continue}if(!o)continue;c&&e._appliedPlugins.set(u,!0);const h=w.getPlugin(a)(u,{root:t,key:s,scope:i,config:n});if(st(h)){const p=e._connectId,m=Promise.resolve(h).then(g=>{if(e._connectId!==p){try{typeof g=="function"&&g()}catch(v){console.error(v)}return}typeof g=="function"&&e._pluginCleanups.push(g),c&&e._appliedPlugins.set(u,!0)},g=>{console.error(g),c&&e._connectId===p&&e._appliedPlugins.set(u,!0)});c&&(e._appliedPlugins.set(u,m),r.push(m))}else typeof h=="function"&&e._pluginCleanups.push(h)}return ot(...r)}function X(e,t,n,s,i,o){if(st(e)){const c=s._connectId,l=t._connectId,d=_e.get(t);e.then(()=>{s.connected&&s._connectId===c&&t._connectId===l&&_e.get(t)===d&&t.resume()})}const r=D[n.trigger],a=r?.latch;if(!a)return;let f,u;i?f=En(n,s,o):r.latchesSubtree&&(n.selector||n.listContainer)?(f=s.element,u=j(n)):f=ae(n,s.element,s.useFirstChild,!1),f&&(Array.isArray(f)?f:[f]).forEach(c=>{const l=a(c,n.params,u);l&&s._latches.push({element:c,release:l})})}function $o(e){e._latches=e._latches.filter(({element:t,release:n})=>e.element.contains(t)?!0:(n(),!1))}function ot(...e){const t=e.filter(st);return t.length?Promise.all(t).then(()=>{}):e.every(Boolean)}function ae(e,t,n,s=!0){if(e.listContainer){const i=t.querySelector(e.listContainer);return i?e.selector?Array.from(i.querySelectorAll(e.selector)):Array.from(i.children):(s&&console.warn(`Interact: No container found for list container "${e.listContainer}"`),[])}if(e.selector){const i=t.querySelectorAll(e.selector);return i.length>0?Array.from(i):(s&&console.warn(`Interact: No elements found for selector "${e.selector}"`),null)}return n?t.firstElementChild:t}function Me(e,t){return t.map(n=>e.selector?n.querySelector(e.selector):n).filter(Boolean)}function ke(e,t,n,s={}){const{effects:i,conditions:o,reducedMotionPolicy:r,forceReducedMotion:a}=t.dataCache,f=Kt(e,Pe(e.reducedMotionPolicy,s.policy,r),{effects:i,force:a,collapsesStagger:s.collapsesStagger});let u;return f.forEach((c,l)=>{const d=H(c.conditions||[],o);d&&t.setupMediaQueryListener(l?`${n.id}::rm${l}`:n.id,d,n.key,n.onUpdate),!u&&(!d||d.matches)&&(u=c)}),u}function dn(e,t,n,s,i,o,r,a){return[r?Me(e,r):ae(e,n,s),a?Me(t,a):ae(t,i,o)]}function hn(e,t,n,s,i,o,r,a){const f=Array.isArray(s),u=Array.isArray(i);f?s.forEach((c,l)=>{const d=u?i[l]:i;d&&Mt(e,c,t.trigger,d,n,t.params,o,r,a)}):(u?i:[i]).forEach(l=>{Mt(e,s,t.trigger,l,n,t.params,o,r,a)})}function Io(e,t,n,s,i){const o={},r=[];return(s.effects||[]).forEach((a,f)=>{const u=a.effectId,c={...n.dataCache.effects[u]||{},...a,effectId:u},l=c.key,d=R(a.interactionId,e);if(o[d]||n.addedInteractions[d]&&!i)return;const h=ke(c,n,{id:`${d}::${f}`,key:e,onUpdate:()=>{t.update()}},{policy:s.reducedMotionPolicy});if(h){o[d]=!0;const p=l&&R(l,e);let m;p?(m=w.getController(p),m&&h.listContainer&&m.watchChildList(h.listContainer)):m=t,r.push({interactionId:d,effectOptions:h,target:p,targetController:m})}}),r}function To(e,t,n,s,i){const o=[];return s.sequences?.forEach(r=>{let a;if(Oo(r)){const d=n.dataCache.sequences[r.sequenceId];if(!d){console.warn(`Interact: Sequence "${r.sequenceId}" not found in cache`);return}a={...d,...r}}else a=r;const f=a.sequenceId||ie(),u=R(`${e}::seq::${f}`,e);if(n.addedInteractions[u]&&!i)return;const c=pn(a,s,u,e,n,{updateKey:e,onUpdate:()=>t.update()});if(!c)return;const l=i&&s.listContainer&&n.addedInteractions[u]?{controllerKey:e,listContainer:s.listContainer,elements:i}:void 0;o.push({sequenceConfig:a,cacheKey:u,listElements:l,effects:c})}),o}function _o(e,t,n,s,i){const o=Io(e,t,n,s,i),r=To(e,t,n,s,i);if(o.some(({effectOptions:l,target:d})=>it(d||s.key,l))||r.some(l=>gn(l.effects,e)))return{readiness:!1,effects:[],sequences:[]};const f=o.filter(l=>!!l.targetController),u=f.map(({effectOptions:l,target:d,targetController:h})=>K(h,h.element,l,d||s.key,"effect")),c=[];return r.forEach(l=>{const d=vn(l.effects,e,t);d&&(c.push({...l,effects:d}),u.push(...d.map(h=>h.readiness)))}),{readiness:ot(...u),effects:f,sequences:c}}function rt(e,t,n,s,i,o=t){const r=_o(e,t,n,s,i);if(r.readiness!==!0){X(r.readiness,o,s,t,!0,i);return}const a=[];r.effects.forEach(({interactionId:f,effectOptions:u,target:c,targetController:l})=>{const[d,h]=dn(s,u,t.element,t.useFirstChild,l.element,l.useFirstChild,n.addedInteractions[f]?i:void 0);if(!d||!h)return;n.addedInteractions[f]=!0;const p=c||s.key,m=U(u.conditions||[],n.dataCache.conditions);a.push([p,s,u,d,h,m,l.useFirstChild,e])}),a.reverse().forEach(f=>{hn(...f)}),Co(t,n,s,r.sequences,i)}function mn(e,t,n){return Pe(e.reducedMotionPolicy,t.reducedMotionPolicy,n.dataCache.reducedMotionPolicy)}function Mo(e,t,n){const{forceReducedMotion:s,conditions:i}=n.dataCache,o=H([Oe],i);return(s||!!(o&&o.matches))&&mn(e,t,n)!=="ignore"?{...e,offset:0}:e}function Oo(e){return"sequenceId"in e&&!("effects"in e)}function pn(e,t,n,s,i,o){const r=H(e.conditions||[],i.dataCache.conditions);if(r&&i.setupMediaQueryListener(n,r,o.updateKey,o.onUpdate),r&&!r.matches)return null;const a=e.effects||[],f=l=>{const d=l.effectId;return{...d?i.dataCache.effects[d]||{}:{},...l}},u=mn(e,t,i),c=[];for(const l of a){const d=l.effectId,h=ke(f(l),i,{id:`${n}::${d||"eff"}`,key:o.updateKey,onUpdate:o.onUpdate},{policy:u,collapsesStagger:u!=="ignore"});if(!h)continue;const p=h.key&&R(h.key,s);c.push({effectOptions:h,target:p})}return c}function gn(e,t){return e.some(({effectOptions:n,target:s})=>it(s||t,n))}function vn(e,t,n){const s=[];for(const{effectOptions:i,target:o}of e){let r;if(o){if(r=w.getController(o),!r)return null}else r=n;const a=o||t,f=K(r,r.element,i,a,"effect");s.push({effectOptions:i,targetController:r,resolvedTargetKey:a,readiness:f})}return s}function yn(e,t){const n=[];let s=!1;for(const{effectOptions:i,targetController:o,resolvedTargetKey:r}of e){let a;if(t&&r===t.controllerKey&&i.listContainer===t.listContainer?(a=Me(i,t.elements),a.length>0&&(s=!0)):a=ae(i,o.element,o.useFirstChild),!a||Array.isArray(a)&&a.length===0)return null;const f=x(i);n.push({target:a,options:f})}return t&&!s?null:n.length>0?n:null}function En(e,t,n){const s=n?Me(e,n):ae(e,t.element,t.useFirstChild);return Array.isArray(s)&&s.length===0?null:s}function Po(e,t,n,s,i){(Array.isArray(n)?n:[n]).forEach(r=>{D[e.trigger]?.add(r,r,{triggerType:t.triggerType},e.params||{},{selectorCondition:i,animation:s,allowA11yTriggers:w.allowA11yTriggers})})}function wn(e,t,n){const o=(e.useFirstChild?e.element.firstElementChild:e.element)?.querySelector(t);if(!o)return n.map((a,f)=>f);const r=Array.from(o.children);return n.map(a=>{const f=r.indexOf(a);return f>=0?f:r.length})}function Co(e,t,n,s,i){s.forEach(({sequenceConfig:o,cacheKey:r,listElements:a,effects:f})=>{const u=yn(f,a);if(!u)return;const c=t.addedInteractions[r]?i:void 0;if(c){const p=wn(e,n.listContainer,c);w.addToSequence(r,u,p)}const l=w.getSequence(r,Mo(o,n,t),u),d=U(n.conditions||[],t.dataCache.conditions),h=En(n,e,c);h&&(t.addedInteractions[r]=!0,Po(n,o,h,l,d))})}function bn(e,t,n,s,i,o,r=!0){const a=K(s,s.element,t,n,"interaction");return a!==!0?(X(a,i,t,s,!1),!1):r&&!o.addedInteractions[e]?(rt(n,s,o,t,void 0,i),!1):!0}function Ao(e,t,n,s,i){const o=n.get(e)?.sequences||{};Object.keys(o).forEach(a=>{o[a].some(({sequence:u,owner:c,...l})=>{const d=H(l.conditions||[],n.dataCache.conditions);if(d&&!d.matches)return!1;const h=l.key&&R(l.key,e),p=w.getController(h);if(!p)return!0;const m=u.sequenceId||ie(),g=R(`${h}::seq::${m}`,h);if(n.addedInteractions[g]&&!i||!bn(g,c,h,p,t,n))return!0;const v=pn(u,l,g,h,n,{updateKey:e,onUpdate:()=>t.update()});if(!v)return!0;const y=gn(v,h)?null:vn(v,h,p),b=y?ot(...y.map($=>$.readiness)):!1;if(b!==!0)return X(b,t,l,p,!0),!0;const E=yn(y,{controllerKey:e,listContainer:s,elements:i});if(E){const $=wn(t,s,i);w.addToSequence(g,E,$)}return!0})})}function Sn(e,t,n,s,i){const o=n.get(e),r=o?.effects||{},a=Object.keys(r),f=[];a.forEach(c=>{const l=R(c,e);if(n.addedInteractions[l]&&!i)return;r[c].some(({effect:h,owner:p,...m},g)=>{const v=H(m.conditions||[],n.dataCache.conditions);if(v&&!v.matches)return!1;const y=h.effectId,b={...n.dataCache.effects[y]||{},...h,effectId:y};if(s&&b.listContainer!==s)return!1;const E=ke(b,n,{id:`${l}::${g}`,key:e,onUpdate:()=>{t.update()}},{policy:m.reducedMotionPolicy});if(E){const $=m.key&&R(m.key,e),S=w.getController($);if(!S)return!0;const _=R(c,$)===l;if(!bn(l,p,$,S,t,n,_))return!0;const I=K(t,t.element,E,e,"effect");if(I!==!0)return X(I,t,m,S,!0),!0;E.listContainer&&t.watchChildList(E.listContainer);const[O,P]=dn(m,E,S.element,S.useFirstChild,t.element,t.useFirstChild,void 0,i);if(!O||!P)return!0;_||(n.addedInteractions[l]=!0);const T=U(E.conditions||[],n.dataCache.conditions);return f.push([e,m,E,O,P,T,t.useFirstChild,$||void 0]),!0}return!1})}),f.reverse().forEach(c=>{hn(...c)}),Ao(e,t,n,s,i);const u=Object.keys(o?.sequences||{}).length>0;return a.length>0||u}function Mt(e,t,n,s,i,o,r,a,f){let u;if(Wt(i)){const l={key:e,effectId:i.effectId,transition:i.transition,transitionProperties:i.transitionProperties,childSelector:j(i,{asCombinator:!0,addItemFilter:!0,useFirstChild:a}),selectorCondition:r};if(u=w.getController(e),!u)return;u.renderStyle(Ts(l))}let c;if(n==="animationEnd"){const l=o.effectId,d=f?w.getInstance(f):void 0,h=d?.dataCache.effects[l],p=h&&ke(h,d,{id:`${f}::animationEnd::${l}`,key:f,onUpdate:()=>{w.getController(f)?.update()}});p&&(c=x(p))}D[n]?.add(t,s,i,o,{targetController:u,selectorCondition:r,allowA11yTriggers:w.allowA11yTriggers,sourceAnimationOptions:c})}function Ot(e){const t=e.key,n=w.getInstance(t);if(!n)return w.setController(t,e),!1;const{triggers:s=[]}=n?.get(t)||{},i=s.length>0;n.setController(t,e),_e.set(e,(_e.get(e)||0)+1),$o(e),s.forEach((r,a)=>{const f=H(r.conditions,n.dataCache.conditions);if(f){const u=`${t}::trigger::${a}`;n.setupMediaQueryListener(u,f,t,()=>{e.update()})}if(!f||f.matches){const u=K(e,e.element,r,t,"interaction");if(u!==!0){X(u,e,r,e,!1);return}r.listContainer&&e.watchChildList(r.listContainer),rt(t,e,n,r)}});let o=!1;return n&&(o=Sn(t,e,n)),i||o}function ko(e,t,n){const s=e.key,i=w.getInstance(s);if(i){const{triggers:o=[]}=i?.get(s)||{};o.forEach((r,a)=>{if(r.listContainer!==t)return;const f=H(r.conditions,i.dataCache.conditions);if(f){const u=`${s}::listTrigger::${t}::${a}`;i.setupMediaQueryListener(u,f,s,()=>{e.update()})}if(!f||f.matches){const u=K(e,e.element,r,s,"interaction",!1);if(u!==!0){X(u,e,r,e,!1);return}rt(s,e,i,r,n)}}),Sn(s,e,i,t,n)}}function qo(e,t=!1){const n=e.key,s=w.getInstance(n);if(!s)return;const i=[...s.get(n)?.selectors.values()||[]].filter(Boolean).join(",");let o;i?(o=[...e.element.querySelectorAll(i)],e.useFirstChild||o.push(e.element)):o=[e.element],$n(o),s.deleteController(n,t)}function $n(e){const t=Object.values(D);for(const n of e)for(const s of t)s.remove(n);w.removeFromSequences(e)}const Ne="interactEffect";class In{element;key;connected;sheet;useFirstChild;_observers;_pluginCleanups;_appliedPlugins;_connectId;_latches;constructor(t,n,s){this.element=t,this.key=n,this.connected=!1,this.sheet=null,this._observers=new WeakMap,this._pluginCleanups=[],this._appliedPlugins=new WeakMap,this._connectId=0,this._latches=[],this.useFirstChild=s?.useFirstChild??!1}connect(t){if(this.connected)return;const n=this.element.dataset.interactKey;if(t=t||this.key||n,!t){console.warn("Interact: No key provided");return}n!==t&&(n&&console.warn(`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`),this.element.dataset.interactKey=t),this.key=t,this.connected=Ot(this)}disconnect({removeFromCache:t=!1}={}){this._connectId++,(this.key||this.element.dataset.interactKey)&&qo(this,t);for(const{release:s}of this._latches)s();if(this._latches.length=0,this._pluginCleanups.length){for(const s of this._pluginCleanups)try{s()}catch(i){console.error(i)}this._pluginCleanups.length=0}if(this._appliedPlugins=new WeakMap,this.sheet){const s=this.element?.getRootNode(),i=s.host?s:document;i.adoptedStyleSheets.indexOf(this.sheet)!==-1&&(i.adoptedStyleSheets=i.adoptedStyleSheets.filter(r=>r!==this.sheet))}this._observers=new WeakMap,this.sheet=null,this.connected=!1}update(){this.disconnect(),this.connect()}resume(){this.connected&&Ot(this)}renderStyle(t){const n=this.element?.getRootNode(),s=n.host?n:document;if(!this.sheet)this.sheet=new CSSStyleSheet,this.sheet.replaceSync(t.join(`
|
|
28
|
+
`)),s.adoptedStyleSheets=[...s.adoptedStyleSheets||[],this.sheet];else{let i=this.sheet.cssRules.length;for(const o of t)try{this.sheet.insertRule(o,i),i++}catch(r){console.error(r)}}}toggleEffect(t,n,s,i){if(s===null)return;if(!i&&this.element.toggleEffect){this.element.toggleEffect(t,n,s);return}const o=new Set(this.element.dataset[Ne]?.split(" ")||[]);n==="toggle"?o.has(t)?o.delete(t):o.add(t):n==="add"?o.add(t):n==="remove"?o.delete(t):n==="clear"&&o.clear(),(s||this.element).dataset[Ne]=Array.from(o).join(" ")}getActiveEffects(){const n=(this.element.dataset[Ne]||"").trim();return n?n.split(/\s+/):[]}watchChildList(t){const n=this.element.querySelector(t);if(n){let s=this._observers.get(n);s||(s=new MutationObserver(this._childListChangeHandler.bind(this,t)),this._observers.set(n,s),s.observe(n,{childList:!0}))}}_childListChangeHandler(t,n){const s=this.key||this.element.dataset.interactKey,i=[],o=[];n.forEach(r=>{r.removedNodes.forEach(a=>{a instanceof HTMLElement&&i.push(a)}),r.addedNodes.forEach(a=>{a instanceof HTMLElement&&o.push(a)})}),$n(i),s&&ko(this,t,o)}}function Ro(e,t){new In(e,t).connect()}function Lo(e){const t=w.getController(e);t&&t.disconnect({removeFromCache:!0})}exports.I=In;exports.a=w;exports.b=Ro;exports.g=si;exports.r=Lo;
|
|
29
|
+
//# sourceMappingURL=index-OPFFsr0c.js.map
|