var yi=Object.create;var Ee=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var wi=Object.getOwnPropertyNames;var Ei=Object.getPrototypeOf,xi=Object.prototype.hasOwnProperty;var Si=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oi=(e,t)=>{for(var r in t)Ee(e,r,{get:t[r],enumerable:!0})},Ti=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of wi(t))!xi.call(e,n)&&n!==r&&Ee(e,n,{get:()=>t[n],enumerable:!(i=bi(t,n))||i.enumerable});return e};var Ai=(e,t,r)=>(r=e!=null?yi(Ei(e)):{},Ti(t||!e||!e.__esModule?Ee(r,"default",{value:e,enumerable:!0}):r,e));var wr=Si(()=>{(function(){"use strict";var e=function(m,s){var u=function(x){for(var S=0,N=x.length;Sm.length)&&(s=m.length);for(var u=0,E=new Array(s);u=m.length?{done:!0}:{done:!1,value:m[E++]}},e:function(H){throw H},f:b}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,S=!1,N;return{s:function(){u=u.call(m)},n:function(){var H=u.next();return x=H.done,H},e:function(H){S=!0,N=H},f:function(){try{!x&&u.return!=null&&u.return()}finally{if(S)throw N}}}}var n=!0,a=!1,o="querySelectorAll",c=function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],x=function H(ot,st,K,O,z,W){var Z=i(ot),wt;try{for(Z.s();!(wt=Z.n()).done;){var G=wt.value;(W||o in G)&&(z?K.has(G)||(K.add(G),O.delete(G),s(G,z)):O.has(G)||(O.add(G),K.delete(G),s(G,z)),W||H(G[o](st),st,K,O,z,n))}}catch(we){Z.e(we)}finally{Z.f()}},S=new E(function(H){if(b.length){var ot=b.join(","),st=new Set,K=new Set,O=i(H),z;try{for(O.s();!(z=O.n()).done;){var W=z.value,Z=W.addedNodes,wt=W.removedNodes;x(wt,ot,st,K,a,a),x(Z,ot,st,K,n,a)}}catch(G){O.e(G)}finally{O.f()}}}),N=S.observe;return(S.observe=function(H){return N.call(S,H,{subtree:n,childList:n})})(u),S},p="querySelectorAll",f=self,y=f.document,v=f.Element,g=f.MutationObserver,D=f.Set,j=f.WeakMap,M=function(s){return p in s},P=[].filter,V=function(m){var s=new j,u=function(O){for(var z=0,W=O.length;z1&&arguments[1]!==void 0?arguments[1]:!0,W=0,Z=O.length;W$i});var sr=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],qt=sr.join(","),lr=typeof Element>"u",pt=lr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xe=!lr&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},cr=function(t,r,i){var n=Array.prototype.slice.apply(t.querySelectorAll(qt));return r&&pt.call(t,qt)&&n.unshift(t),n=n.filter(i),n},fr=function e(t,r,i){for(var n=[],a=Array.from(t);a.length;){var o=a.shift();if(o.tagName==="SLOT"){var c=o.assignedElements(),p=c.length?c:o.children,f=e(p,!0,i);i.flatten?n.push.apply(n,f):n.push({scope:o,candidates:f})}else{var y=pt.call(o,qt);y&&i.filter(o)&&(r||!t.includes(o))&&n.push(o);var v=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),g=!i.shadowRootFilter||i.shadowRootFilter(o);if(v&&g){var D=e(v===!0?o.children:v.children,!0,i);i.flatten?n.push.apply(n,D):n.push({scope:o,candidates:D})}else a.unshift.apply(a,o.children)}}return n},ur=function(t,r){return t.tabIndex<0&&(r||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},Ii=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},hr=function(t){return t.tagName==="INPUT"},Di=function(t){return hr(t)&&t.type==="hidden"},Fi=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},Li=function(t,r){for(var i=0;isummary:first-of-type"),o=a?t.parentElement:t;if(pt.call(o,"details:not([open]) *"))return!0;var c=xe(t).host,p=c?.ownerDocument.contains(c)||t.ownerDocument.contains(t);if(!i||i==="full"){if(typeof n=="function"){for(var f=t;t;){var y=t.parentElement,v=xe(t);if(y&&!y.shadowRoot&&n(y)===!0)return or(t);t.assignedSlot?t=t.assignedSlot:!y&&v!==t.ownerDocument?t=v.host:t=y}t=f}if(p)return!t.getClientRects().length}else if(i==="non-zero-area")return or(t);return!1},Mi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i=0)},zi=function e(t){var r=[],i=[];return t.forEach(function(n,a){var o=!!n.scope,c=o?n.scope:n,p=ur(c,o),f=o?e(n.candidates):c;p===0?o?r.push.apply(r,f):r.push(c):i.push({documentOrder:a,tabIndex:p,item:n,isScope:o,content:f})}),i.sort(Ii).reduce(function(n,a){return a.isScope?n.push.apply(n,a.content):n.push(a.content),n},[]).concat(r)},dr=function(t,r){r=r||{};var i;return r.getShadowRoot?i=fr([t],r.includeContainer,{filter:Se.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Ri}):i=cr(t,r.includeContainer,Se.bind(null,r)),zi(i)},pr=function(t,r){r=r||{};var i;return r.getShadowRoot?i=fr([t],r.includeContainer,{filter:Kt.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=cr(t,r.includeContainer,Kt.bind(null,r)),i},Tt=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return pt.call(t,qt)===!1?!1:Se(r,t)},ki=sr.concat("iframe").join(","),Zt=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return pt.call(t,ki)===!1?!1:Kt(r,t)};function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function vr(e){for(var t=1;t0){var i=e[e.length-1];i!==r&&i.pause()}var n=e.indexOf(r);n===-1||e.splice(n,1),e.push(r)},deactivateTrap:function(r){var i=e.indexOf(r);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}}}(),Hi=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Wi=function(t){return t.key==="Escape"||t.key==="Esc"||t.keyCode===27},Vi=function(t){return t.key==="Tab"||t.keyCode===9},yr=function(t){return setTimeout(t,0)},br=function(t,r){var i=-1;return t.every(function(n,a){return r(n)?(i=a,!1):!0}),i},At=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?d-1:0),w=1;w=0)l=i.activeElement;else{var h=a.tabbableGroups[0],d=h&&h.firstTabbableNode;l=d||f("fallbackFocus")}if(!l)throw new Error("Your focus-trap needs to have at least one focusable element");return l},v=function(){if(a.containerGroups=a.containers.map(function(l){var h=dr(l,n.tabbableOptions),d=pr(l,n.tabbableOptions);return{container:l,tabbableNodes:h,focusableNodes:d,firstTabbableNode:h.length>0?h[0]:null,lastTabbableNode:h.length>0?h[h.length-1]:null,nextTabbableNode:function(w){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,C=d.findIndex(function(B){return B===w});if(!(C<0))return I?d.slice(C+1).find(function(B){return Tt(B,n.tabbableOptions)}):d.slice(0,C).reverse().find(function(B){return Tt(B,n.tabbableOptions)})}}}),a.tabbableGroups=a.containerGroups.filter(function(l){return l.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},g=function T(l){if(l!==!1&&l!==i.activeElement){if(!l||!l.focus){T(y());return}l.focus({preventScroll:!!n.preventScroll}),a.mostRecentlyFocusedNode=l,Hi(l)&&l.select()}},D=function(l){var h=f("setReturnFocus",l);return h||(h===!1?!1:l)},j=function(l){var h=Xt(l);if(!(p(h)>=0)){if(At(n.clickOutsideDeactivates,l)){o.deactivate({returnFocus:n.returnFocusOnDeactivate&&!Zt(h,n.tabbableOptions)});return}At(n.allowOutsideClick,l)||l.preventDefault()}},M=function(l){var h=Xt(l),d=p(h)>=0;d||h instanceof Document?d&&(a.mostRecentlyFocusedNode=h):(l.stopImmediatePropagation(),g(a.mostRecentlyFocusedNode||y()))},P=function(l){var h=Xt(l);v();var d=null;if(a.tabbableGroups.length>0){var L=p(h),w=L>=0?a.containerGroups[L]:void 0;if(L<0)l.shiftKey?d=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:d=a.tabbableGroups[0].firstTabbableNode;else if(l.shiftKey){var I=br(a.tabbableGroups,function(et){var rt=et.firstTabbableNode;return h===rt});if(I<0&&(w.container===h||Zt(h,n.tabbableOptions)&&!Tt(h,n.tabbableOptions)&&!w.nextTabbableNode(h,!1))&&(I=L),I>=0){var C=I===0?a.tabbableGroups.length-1:I-1,B=a.tabbableGroups[C];d=B.lastTabbableNode}}else{var Q=br(a.tabbableGroups,function(et){var rt=et.lastTabbableNode;return h===rt});if(Q<0&&(w.container===h||Zt(h,n.tabbableOptions)&&!Tt(h,n.tabbableOptions)&&!w.nextTabbableNode(h))&&(Q=L),Q>=0){var R=Q===a.tabbableGroups.length-1?0:Q+1,bt=a.tabbableGroups[R];d=bt.firstTabbableNode}}}else d=f("fallbackFocus");d&&(l.preventDefault(),g(d))},V=function(l){if(Wi(l)&&At(n.escapeDeactivates,l)!==!1){l.preventDefault(),o.deactivate();return}if(Vi(l)){P(l);return}},F=function(l){var h=Xt(l);p(h)>=0||At(n.clickOutsideDeactivates,l)||At(n.allowOutsideClick,l)||(l.preventDefault(),l.stopImmediatePropagation())},A=function(){if(a.active)return gr.activateTrap(o),a.delayInitialFocusTimer=n.delayInitialFocus?yr(function(){g(y())}):g(y()),i.addEventListener("focusin",M,!0),i.addEventListener("mousedown",j,{capture:!0,passive:!1}),i.addEventListener("touchstart",j,{capture:!0,passive:!1}),i.addEventListener("click",F,{capture:!0,passive:!1}),i.addEventListener("keydown",V,{capture:!0,passive:!1}),o},_=function(){if(a.active)return i.removeEventListener("focusin",M,!0),i.removeEventListener("mousedown",j,!0),i.removeEventListener("touchstart",j,!0),i.removeEventListener("click",F,!0),i.removeEventListener("keydown",V,!0),o};return o={get active(){return a.active},get paused(){return a.paused},activate:function(l){if(a.active)return this;var h=c(l,"onActivate"),d=c(l,"onPostActivate"),L=c(l,"checkCanFocusTrap");L||v(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=i.activeElement,h&&h();var w=function(){L&&v(),A(),d&&d()};return L?(L(a.containers.concat()).then(w,w),this):(w(),this)},deactivate:function(l){if(!a.active)return this;var h=vr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},l);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,_(),a.active=!1,a.paused=!1,gr.deactivateTrap(o);var d=c(h,"onDeactivate"),L=c(h,"onPostDeactivate"),w=c(h,"checkCanReturnFocus"),I=c(h,"returnFocus","returnFocusOnDeactivate");d&&d();var C=function(){yr(function(){I&&g(D(a.nodeFocusedBeforeActivation)),L&&L()})};return I&&w?(w(D(a.nodeFocusedBeforeActivation)).then(C,C),this):(C(),this)},pause:function(){return a.paused||!a.active?this:(a.paused=!0,_(),this)},unpause:function(){return!a.paused||!a.active?this:(a.paused=!1,v(),A(),this)},updateContainerElements:function(l){var h=[].concat(l).filter(Boolean);return a.containers=h.map(function(d){return typeof d=="string"?i.querySelector(d):d}),a.active&&v(),this}},o.updateContainerElements(t),o};var kn=Ai(wr());function Te(e,t){e.indexOf(t)===-1&&e.push(t)}function Ae(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var It=(e,t,r)=>Math.min(Math.max(r,e),t);var k={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var q=e=>typeof e=="number";var tt=e=>Array.isArray(e)&&!q(e[0]);var Er=(e,t,r)=>{let i=t-e;return((r-e)%i+i)%i+e};function Dt(e,t){return tt(e)?e[Er(0,e.length,t)]:e}var mt=(e,t,r)=>-r*e+r*t+e;var Ft=()=>{},U=e=>e;var Y=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function Et(e,t){let r=e[e.length-1];for(let i=1;i<=t;i++){let n=Y(0,t,i);e.push(mt(r,1,n))}}function vt(e){let t=[0];return Et(t,e-1),t}function Lt(e,t=vt(e.length),r=U){let i=e.length,n=i-t.length;return n>0&&Et(t,n),a=>{let o=0;for(;oArray.isArray(e)&&q(e[0]);var lt=e=>typeof e=="object"&&Boolean(e.createAnimation);var $=e=>typeof e=="function";var it=e=>typeof e=="string";var ct={ms:e=>e*1e3,s:e=>e/1e3};function Ie(e,t){return t?e*(1e3/t):0}var xr=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Ui=1e-7,Bi=12;function Gi(e,t,r,i,n){let a,o,c=0;do o=t+(r-t)/2,a=xr(o,i,n)-e,a>0?r=o:t=o;while(Math.abs(a)>Ui&&++cGi(a,0,1,e,r);return a=>a===0||a===1?a:xr(n(a),t,i)}var De=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);let i=r*e,n=t==="end"?Math.floor(i):Math.ceil(i);return It(0,1,n/e)};var Sr={ease:gt(.25,.1,.25,1),"ease-in":gt(.42,0,1,1),"ease-in-out":gt(.42,0,.58,1),"ease-out":gt(0,0,.58,1)},qi=/\((.*?)\)/;function xt(e){if($(e))return e;if(_t(e))return gt(...e);if(Sr[e])return Sr[e];if(e.startsWith("steps")){let t=qi.exec(e);if(t){let r=t[1].split(",");return De(parseFloat(r[0]),r[1].trim())}}return U}var nt=class{constructor(t,r=[0,1],{easing:i,duration:n=k.duration,delay:a=k.delay,endDelay:o=k.endDelay,repeat:c=k.repeat,offset:p,direction:f="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=U,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,g)=>{this.resolve=v,this.reject=g}),i=i||k.easing,lt(i)){let v=i.createAnimation(r);i=v.easing,r=v.keyframes||r,n=v.duration||n}this.repeat=c,this.easing=tt(i)?U:xt(i),this.updateDuration(n);let y=Lt(r,p,tt(i)?i.map(xt):U);this.tick=v=>{var g;a=a;let D=0;this.pauseTime!==void 0?D=this.pauseTime:D=(v-this.startTime)*this.rate,this.t=D,D/=1e3,D=Math.max(D-a,0),this.playState==="finished"&&this.pauseTime===void 0&&(D=this.totalDuration);let j=D/this.duration,M=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&M--;let V=M%2;(f==="reverse"||f==="alternate"&&V||f==="alternate-reverse"&&!V)&&(P=1-P);let F=D>=this.totalDuration?1:Math.min(P,1),A=y(this.easing(F));t(A),this.pauseTime===void 0&&(this.playState==="finished"||D>=this.totalDuration+o)?(this.playState="finished",(g=this.resolve)===null||g===void 0||g.call(this,A)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){let t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}};var Pt=class{setAnimation(t){this.animation=t,t?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var Fe=new WeakMap;function Yt(e){return Fe.has(e)||Fe.set(e,{transforms:[],values:new Map}),Fe.get(e)}function Or(e,t){return e.has(t)||e.set(t,new Pt),e.get(t)}var Ki=["","X","Y","Z"],Zi=["translate","scale","rotate","skew"],Ct={x:"translateX",y:"translateY",z:"translateZ"},Tr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Xi={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Tr,scale:{syntax:"",initialValue:1,toDefaultUnit:U},skew:Tr},ft=new Map,Jt=e=>`--motion-${e}`,Qt=["x","y","z"];Zi.forEach(e=>{Ki.forEach(t=>{Qt.push(e+t),ft.set(Jt(e+t),Xi[e])})});var Yi=(e,t)=>Qt.indexOf(e)-Qt.indexOf(t),Qi=new Set(Qt),te=e=>Qi.has(e),Ar=(e,t)=>{Ct[t]&&(t=Ct[t]);let{transforms:r}=Yt(e);Te(r,t),e.style.transform=Ji(r)},Ji=e=>e.sort(Yi).reduce(tn,"").trim(),tn=(e,t)=>`${e} ${t}(var(${Jt(t)}))`;var Nt=e=>e.startsWith("--"),Ir=new Set;function Dr(e){if(!Ir.has(e)){Ir.add(e);try{let{syntax:t,initialValue:r}=ft.has(e)?ft.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}var Le=(e,t)=>document.createElement("div").animate(e,t),Fr={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Le({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Le({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Le({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},_e={},ut={};for(let e in Fr)ut[e]=()=>(_e[e]===void 0&&(_e[e]=Fr[e]()),_e[e]);var en=.015,rn=(e,t)=>{let r="",i=Math.round(t/en);for(let n=0;n$(e)?ut.linearEasing()?`linear(${rn(e,t)})`:k.easing:_t(e)?nn(e):e,nn=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`;function Lr(e,t){for(let r=0;rArray.isArray(e)?e:[e];function Mt(e){return Ct[e]&&(e=Ct[e]),te(e)?Jt(e):e}var Rt={get:(e,t)=>{t=Mt(t);let r=Nt(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){let i=ft.get(t);i&&(r=i.initialValue)}return r},set:(e,t,r)=>{t=Mt(t),Nt(t)?e.style.setProperty(t,r):e.style[t]=r}};function re(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function _r(e,t){var r;let i=t?.toDefaultUnit||U,n=e[e.length-1];if(it(n)){let a=((r=n.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";a&&(i=o=>o+a)}return i}function an(){return window.__MOTION_DEV_TOOLS_RECORD}function ie(e,t,r,i={},n){let a=an(),o=i.record!==!1&&a,c,{duration:p=k.duration,delay:f=k.delay,endDelay:y=k.endDelay,repeat:v=k.repeat,easing:g=k.easing,persist:D=!1,direction:j,offset:M,allowWebkitAcceleration:P=!1}=i,V=Yt(e),F=te(t),A=ut.waapi();F&&Ar(e,t);let _=Mt(t),T=Or(V.values,_),l=ft.get(_);return re(T.animation,!(lt(g)&&T.generator)&&i.record!==!1),()=>{let h=()=>{var w,I;return(I=(w=Rt.get(e,_))!==null&&w!==void 0?w:l?.initialValue)!==null&&I!==void 0?I:0},d=Lr(ee(r),h),L=_r(d,l);if(lt(g)){let w=g.createAnimation(d,t!=="opacity",h,_,T);g=w.easing,d=w.keyframes||d,p=w.duration||p}if(Nt(_)&&(ut.cssRegisterProperty()?Dr(_):A=!1),F&&!ut.linearEasing()&&($(g)||tt(g)&&g.some($))&&(A=!1),A){l&&(d=d.map(C=>q(C)?l.toDefaultUnit(C):C)),d.length===1&&(!ut.partialKeyframes()||o)&&d.unshift(h());let w={delay:ct.ms(f),duration:ct.ms(p),endDelay:ct.ms(y),easing:tt(g)?void 0:Pe(g,p),direction:j,iterations:v+1,fill:"both"};c=e.animate({[_]:d,offset:M,easing:tt(g)?g.map(C=>Pe(C,p)):void 0},w),c.finished||(c.finished=new Promise((C,B)=>{c.onfinish=C,c.oncancel=B}));let I=d[d.length-1];c.finished.then(()=>{D||(Rt.set(e,_,I),c.cancel())}).catch(Ft),P||(c.playbackRate=1.000001)}else if(n&&F)d=d.map(w=>typeof w=="string"?parseFloat(w):w),d.length===1&&d.unshift(parseFloat(h())),c=new n(w=>{Rt.set(e,_,L?L(w):w)},d,Object.assign(Object.assign({},i),{duration:p,easing:g}));else{let w=d[d.length-1];Rt.set(e,_,l&&q(w)?l.toDefaultUnit(w):w)}return o&&a(e,t,d,{duration:p,delay:f,easing:g,repeat:v,offset:M},"motion-one"),T.setAnimation(c),c}}var ne=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function ht(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}var on=e=>e(),yt=(e,t,r=k.duration)=>new Proxy({animations:e.map(on).filter(Boolean),duration:r,options:t},ln),sn=e=>e.animations[0],ln={get:(e,t)=>{let r=sn(e);switch(t){case"duration":return e.duration;case"currentTime":return ct.s(r?.[t]||0);case"playbackRate":case"playState":return r?.[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(cn)).catch(Ft)),e.finished;case"stop":return()=>{e.animations.forEach(i=>re(i))};case"forEachNative":return i=>{e.animations.forEach(n=>i(n,e))};default:return typeof r?.[t]>"u"?void 0:()=>e.animations.forEach(i=>i[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=ct.ms(r);case"currentTime":case"playbackRate":for(let i=0;ie.finished;function Pr(e=.1,{start:t=0,from:r=0,easing:i}={}){return(n,a)=>{let o=q(r)?r:fn(r,a),c=Math.abs(o-n),p=e*c;if(i){let f=a*e;p=xt(i)(p/f)*f}return t+p}}function fn(e,t){if(e==="first")return 0;{let r=t-1;return e==="last"?r:r/2}}function ae(e,t,r){return $(e)?e(t,r):e}function Cr(e){return function(r,i,n={}){r=ht(r);let a=r.length,o=[];for(let c=0;ct&&n.atie(...a,nt)).filter(Boolean);return yt(n,t,(r=i[0])===null||r===void 0?void 0:r[3].duration)}function hn(e,t={}){var{defaultOptions:r={}}=t,i=oe(t,["defaultOptions"]);let n=[],a=new Map,o={},c=new Map,p=0,f=0,y=0;for(let v=0;v1,"spring must be provided 2 keyframes within timeline()");let et=I.createAnimation(d,l!=="opacity",()=>0,l);I=et.easing,d=et.keyframes||d,w=et.duration||w}let C=ae(M.delay,A,F)||0,B=f+C,Q=B+w,{offset:R=vt(d.length)}=L;R.length===1&&R[0]===0&&(R[1]=1);let bt=R.length-d.length;bt>0&&Et(R,bt),d.length===1&&d.unshift(null),Mr(h,d,I,R,B,Q),P=Math.max(C+w,P),y=Math.max(Q,y)}}p=f,f+=P}return a.forEach((v,g)=>{for(let D in v){let j=v[D];j.sort(Rr);let M=[],P=[],V=[];for(let F=0;F"u")return()=>{};let a=ht(e),o=new WeakMap,c=f=>{f.forEach(y=>{let v=o.get(y.target);if(y.isIntersecting!==Boolean(v))if(y.isIntersecting){let g=t(y);$(g)?o.set(y.target,g):p.unobserve(y.target)}else v&&(v(y),o.delete(y.target))})},p=new IntersectionObserver(c,{root:r,rootMargin:i,threshold:typeof n=="number"?n:mn[n]});return a.forEach(f=>p.observe(f)),()=>p.disconnect()}var se=new WeakMap,dt;function vn(e,t){if(t){let{inlineSize:r,blockSize:i}=t[0];return{width:r,height:i}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function gn({target:e,contentRect:t,borderBoxSize:r}){var i;(i=se.get(e))===null||i===void 0||i.forEach(n=>{n({target:e,contentSize:t,get size(){return vn(e,r)}})})}function yn(e){e.forEach(gn)}function bn(){typeof ResizeObserver>"u"||(dt=new ResizeObserver(yn))}function jr(e,t){dt||bn();let r=ht(e);return r.forEach(i=>{let n=se.get(i);n||(n=new Set,se.set(i,n)),n.add(t),dt?.observe(i)}),()=>{r.forEach(i=>{let n=se.get(i);n?.delete(t),n?.size||dt?.unobserve(i)})}}var le=new Set,zt;function wn(){zt=()=>{let e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};le.forEach(r=>r(t))},window.addEventListener("resize",zt)}function Hr(e){return le.add(e),zt||wn(),()=>{le.delete(e),!le.size&&zt&&(zt=void 0)}}function Wr(e,t){return $(e)?Hr(e):jr(e,t)}var En=50,Vr=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Ur=()=>({time:0,x:Vr(),y:Vr()}),xn={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $r(e,t,r,i){let n=r[t],{length:a,position:o}=xn[t],c=n.current,p=r.time;n.current=e["scroll"+o],n.scrollLength=e["scroll"+a]-e["client"+a],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=Y(0,n.scrollLength,n.current);let f=i-p;n.velocity=f>En?0:Ie(n.current-c,f)}function Br(e,t,r){$r(e,"x",t,r),$r(e,"y",t,r),t.time=r}function Gr(e,t){let r={x:0,y:0},i=e;for(;i&&i!==t;)if(i instanceof HTMLElement)r.x+=i.offsetLeft,r.y+=i.offsetTop,i=i.offsetParent;else if(i instanceof SVGGraphicsElement&&"getBBox"in i){let{top:n,left:a}=i.getBBox();for(r.x+=a,r.y+=n;i&&i.tagName!=="svg";)i=i.parentNode}return r}var ce={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};var fe={start:0,center:.5,end:1};function Me(e,t,r=0){let i=0;if(fe[e]!==void 0&&(e=fe[e]),it(e)){let n=parseFloat(e);e.endsWith("px")?i=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?i=n/100*document.documentElement.clientWidth:e.endsWith("vh")?i=n/100*document.documentElement.clientHeight:e=n}return q(e)&&(i=t*e),r+i}var Sn=[0,0];function qr(e,t,r,i){let n=Array.isArray(e)?e:Sn,a=0,o=0;return q(e)?n=[e,e]:it(e)&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,fe[e]?e:"0"]),a=Me(n[0],r,i),o=Me(n[1],t),a-o}var On={x:0,y:0};function Kr(e,t,r){let{offset:i=ce.All}=r,{target:n=e,axis:a="y"}=r,o=a==="y"?"height":"width",c=n!==e?Gr(n,e):On,p=n===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:n.clientWidth,height:n.clientHeight},f={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let y=!t[a].interpolate,v=i.length;for(let g=0;gTn(e,i.target,r),update:a=>{Br(e,r,a),(i.offset||i.target)&&Kr(e,r,i)},notify:$(t)?()=>t(r):An(t,r[n])}}function An(e,t){return e.pause(),e.forEachNative((r,{easing:i})=>{var n,a;if(r.updateDuration)i||(r.easing=U),r.updateDuration(1);else{let o={duration:1e3};i||(o.easing="linear"),(a=(n=r.effect)===null||n===void 0?void 0:n.updateTiming)===null||a===void 0||a.call(n,o)}}),()=>{e.currentTime=t.progress}}var kt=new WeakMap,Xr=new WeakMap,Re=new WeakMap,Yr=e=>e===document.documentElement?window:e;function Qr(e,t={}){var{container:r=document.documentElement}=t,i=oe(t,["container"]);let n=Re.get(r);n||(n=new Set,Re.set(r,n));let a=Ur(),o=Zr(r,e,a,i);if(n.add(o),!kt.has(r)){let f=()=>{let v=performance.now();for(let g of n)g.measure();for(let g of n)g.update(v);for(let g of n)g.notify()};kt.set(r,f);let y=Yr(r);window.addEventListener("resize",f,{passive:!0}),r!==document.documentElement&&Xr.set(r,Wr(r,f)),y.addEventListener("scroll",f,{passive:!0})}let c=kt.get(r),p=requestAnimationFrame(c);return()=>{var f;typeof e!="function"&&e.stop(),cancelAnimationFrame(p);let y=Re.get(r);if(!y||(y.delete(o),y.size))return;let v=kt.get(r);kt.delete(r),v&&(Yr(r).removeEventListener("scroll",v),(f=Xr.get(r))===null||f===void 0||f(),window.removeEventListener("resize",v))}}function In(e,t={}){return yt([()=>{let r=new nt(e,[0,1],t);return r.finished.catch(()=>{}),r}],t,t.duration)}function Jr(e,t,r){return($(e)?In:Ce)(e,t,r)}function at(e){this.listenerMap=[{},{}],e&&this.root(e),this.handle=at.prototype.handle.bind(this),this._removedListeners=[]}at.prototype.root=function(e){let t=this.listenerMap,r;if(this.rootElement){for(r in t[1])t[1].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!0);for(r in t[0])t[0].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!1)}if(!e||!e.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=e;for(r in t[1])t[1].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!0);for(r in t[0])t[0].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!1);return this};at.prototype.captureForType=function(e){return["blur","error","focus","load","resize","scroll"].indexOf(e)!==-1};at.prototype.on=function(e,t,r,i){let n,a,o,c;if(!e)throw new TypeError("Invalid event type: "+e);if(typeof t=="function"&&(i=r,r=t,t=null),i===void 0&&(i=this.captureForType(e)),typeof r!="function")throw new TypeError("Handler must be a type of Function");return n=this.rootElement,a=this.listenerMap[i?1:0],a[e]||(n&&n.addEventListener(e,this.handle,i),a[e]=[]),t?/^[a-z]+$/i.test(t)?(c=t,o=Dn):/^#[a-z0-9\-_]+$/i.test(t)?(c=t.slice(1),o=Ln):(c=t,o=Element.prototype.matches):(c=null,o=Fn.bind(this)),a[e].push({selector:t,handler:r,matcher:o,matcherParam:c}),this};at.prototype.off=function(e,t,r,i){let n,a,o,c,p;if(typeof t=="function"&&(i=r,r=t,t=null),i===void 0)return this.off(e,t,r,!0),this.off(e,t,r,!1),this;if(o=this.listenerMap[i?1:0],!e){for(p in o)o.hasOwnProperty(p)&&this.off(p,t,r);return this}if(c=o[e],!c||!c.length)return this;for(n=c.length-1;n>=0;n--)a=c[n],(!t||t===a.selector)&&(!r||r===a.handler)&&(this._removedListeners.push(a),c.splice(n,1));return c.length||(delete o[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,i)),this};at.prototype.handle=function(e){let t,r,i=e.type,n,a,o,c,p=[],f,y="ftLabsDelegateIgnore";if(e[y]===!0)return;switch(f=e.target,f.nodeType===3&&(f=f.parentNode),f.correspondingUseElement&&(f=f.correspondingUseElement),n=this.rootElement,a=e.eventPhase||(e.target!==e.currentTarget?3:2),a){case 1:p=this.listenerMap[1][i];break;case 2:this.listenerMap[0]&&this.listenerMap[0][i]&&(p=p.concat(this.listenerMap[0][i])),this.listenerMap[1]&&this.listenerMap[1][i]&&(p=p.concat(this.listenerMap[1][i]));break;case 3:p=this.listenerMap[0][i];break}let v=[];for(r=p.length;f&&r;){for(t=0;t-1&&f.hasAttribute("disabled")?v=[]:o.matcher.call(f,o.matcherParam,f)&&v.push([e,f,o]);if(f===n||(r=p.length,f=f.parentElement||f.parentNode,f instanceof HTMLDocument))break}let g;for(t=0;t-1)&&(c=this.fire.apply(this,v[t]),c===!1)){v[t][0][y]=!0,v[t][0].preventDefault(),g=!1;break}return g};at.prototype.fire=function(e,t,r){return r.handler.call(t,e,t)};function Dn(e,t){return e.toLowerCase()===t.tagName.toLowerCase()}function Fn(e,t){return this.rootElement===window?t===document||t===document.documentElement||t===window:this.rootElement===t}function Ln(e,t){return e===t.id}at.prototype.destroy=function(){this.off(),this.root()};var _n=at;function jt(e,t,r){let i=document.createElement(t||"div");return e&&(i.className=e),r&&r.appendChild(i),i}function Pn(e,t,r){let i="translate3d("+e+"px,"+(t||0)+"px,0)";return r!==void 0&&(i+=" scale3d("+r+","+r+",1)"),i}function ze(e,t,r){e.style.width=typeof t=="number"?t+"px":t,e.style.height=typeof r=="number"?r+"px":r}var X={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Cn(e){if(e.which===2||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)return!0}function he(e,t,r=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{let n=typeof e=="string"?e:t;n&&(i=Array.from(r.querySelectorAll(n)))}return i}function Nn(e){return typeof e=="function"&&e.prototype&&e.prototype.goTo}function ti(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var ke=class{constructor(t,r){this.type=t,r&&Object.assign(this,r)}preventDefault(){this.defaultPrevented=!0}},je=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,r,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t].push({fn:r,priority:i}),this._filters[t].sort((n,a)=>n.priority-a.priority),this.pswp&&this.pswp.addFilter(t,r,i)}removeFilter(t,r){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==r)),this.pswp&&this.pswp.removeFilter(t,r)}applyFilters(t,...r){return this._filters[t]&&this._filters[t].forEach(i=>{r[0]=i.fn.apply(this,r)}),r[0]}on(t,r){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this.pswp&&this.pswp.on(t,r)}off(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(i=>r!==i)),this.pswp&&this.pswp.off(t,r)}dispatch(t,r){if(this.pswp)return this.pswp.dispatch(t,r);let i=new ke(t,r);return this._listeners&&this._listeners[t]&&this._listeners[t].forEach(n=>{n.call(this,i)}),i}},He=class{constructor(t,r){this.element=jt("pswp__img pswp__img--placeholder",t?"img":"",r),t&&(this.element.decoding="async",this.element.alt="",this.element.src=t,this.element.setAttribute("role","presentation")),this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,r){this.element&&(this.element.tagName==="IMG"?(ze(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Pn(0,0,t/250)):ze(this.element,t,r))}destroy(){this.element.parentNode&&this.element.remove(),this.element=null}},We=class{constructor(t,r,i){this.instance=r,this.data=t,this.index=i,this.element=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.state=X.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=null)},1e3)}load(t,r){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new He(i,this.slide.container)}this.element&&!r||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=jt("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=jt("pswp__content"),this.element.innerHTML=this.data.html||""),r&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){let r=this.element;this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented||(this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=this.data.src,r.alt=this.data.alt||"",this.state=X.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()}))}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=X.LOADED,this.slide&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===X.LOADED||this.state===X.ERROR)&&this.removePlaceholder())}onError(){this.state=X.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===X.LOADING,this)}isError(){return this.state===X.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,r){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,r),!this.instance.dispatch("contentResize",{content:this,width:t,height:r}).defaultPrevented&&(ze(this.element,t,r),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=r,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:r,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==X.ERROR,this)}updateSrcsetSizes(){if(this.data.srcset){let t=this.element,r=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||r>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=r+"px",t.dataset.largestUsedSize=String(r))}}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=null,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=null),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=null))}displayError(){if(this.slide){let t=jt("pswp__error-msg");t.innerText=this.instance.options.errorMsg,t=this.instance.applyFilters("contentErrorElement",t,this),this.element=jt("pswp__content pswp__error-msg-container"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached)return;if(this.isAttached=!0,this.state===X.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||ti())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||this.slide&&(this.isImageContent()&&this.isDecoding&&!ti()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===X.LOADED||this.state===X.ERROR)&&this.removePlaceholder()))}};function Mn(e,t){if(e.getViewportSizeFn){let r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function ue(e,t,r,i,n){let a;if(t.paddingFn)a=t.paddingFn(r,i,n)[e];else if(t.padding)a=t.padding[e];else{let o="padding"+e[0].toUpperCase()+e.slice(1);t[o]&&(a=t[o])}return a||0}function Rn(e,t,r,i){return{x:t.x-ue("left",e,t,r,i)-ue("right",e,t,r,i),y:t.y-ue("top",e,t,r,i)-ue("bottom",e,t,r,i)}}var ei=4e3,Ve=class{constructor(t,r,i,n){this.pswp=n,this.options=t,this.itemData=r,this.index=i}update(t,r,i){this.elementSize={x:t,y:r},this.panAreaSize=i;let n=this.panAreaSize.x/this.elementSize.x,a=this.panAreaSize.y/this.elementSize.y;this.fit=Math.min(1,na?n:a),this.vFill=Math.min(1,a),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){let r=t+"ZoomLevel",i=this.options[r];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),t*this.elementSize.x>ei&&(t=ei/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){let t=this._parseZoomLevelOption("max");return t||Math.max(1,this.fit*4)}};function ri(e,t,r){let i=t.createContentFromData(e,r);if(!i||!i.lazyLoad)return;let{options:n}=t,a=t.viewportSize||Mn(n,t),o=Rn(n,a,e,r),c=new Ve(n,e,-1);return c.update(i.width,i.height,o),i.lazyLoad(),i.setDisplayedSize(Math.ceil(i.width*c.initial),Math.ceil(i.height*c.initial)),i}function zn(e,t){let r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return ri(r,t,e)}var $e=class extends je{getNumItems(){let t,{dataSource:r}=this.options;r?"length"in r?t=r.length:"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length)):t=0;let i=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",i.numItems,r)}createContentFromData(t,r){return new We(t,this,r)}getItemData(t){let{dataSource:r}=this.options,i;Array.isArray(r)?i=r[t]:r&&r.gallery&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),i=r.items[t]);let n=i;n instanceof Element&&(n=this._domElementToItemData(n));let a=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",a.itemData,t)}_getGalleryDOMElements(t){return this.options.children||this.options.childSelector?he(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){let r={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){r.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(r.srcset=i.dataset.pswpSrcset),r.width=parseInt(i.dataset.pswpWidth,10),r.height=parseInt(i.dataset.pswpHeight,10),r.w=r.width,r.h=r.height,i.dataset.pswpType&&(r.type=i.dataset.pswpType);let n=t.querySelector("img");n&&(r.msrc=n.currentSrc||n.src,r.alt=n.getAttribute("alt")),(i.dataset.pswpCropped||i.dataset.cropped)&&(r.thumbCropped=!0)}return this.applyFilters("domItemData",r,t,i)}lazyLoadData(t,r){return ri(t,this,r)}},Ue=class extends $e{constructor(t){super(),this.options=t||{},this._uid=0}init(){this.onThumbnailsClick=this.onThumbnailsClick.bind(this),he(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Cn(t)||window.pswp||window.navigator.onLine===!1)return;let r={x:t.clientX,y:t.clientY};!r.x&&!r.y&&(r=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);let n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,r))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);let r=t.target,n=he(this.options.children,this.options.childSelector,t.currentTarget).findIndex(a=>a===r||a.contains(r));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,r,i){return window.pswp?!1:(this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,r),!0)}preload(t,r){let{options:i}=this;r&&(i.dataSource=r);let n=[],a=typeof i.pswpModule;if(Nn(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(a==="string")throw new Error("pswpModule as string is no longer supported");if(a==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=zn(t,this));let o=++this._uid;Promise.all(n).then(c=>{if(this.shouldOpen){let p=c[0];this._openPhotoswipe(p,o)}})}_openPhotoswipe(t,r){if(r!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{this._listeners[n].forEach(a=>{i.on(n,a)})}),Object.keys(this._filters).forEach(n=>{this._filters[n].forEach(a=>{i.addFilter(n,a.fn,a.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=null),i.on("destroy",()=>{this.pswp=null,window.pswp=null}),i.init()}destroy(){this.pswp&&this.pswp.destroy(),this.shouldOpen=!1,this._listeners=null,he(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}};(function(){Node.prototype.replaceChildren===void 0&&(Node.prototype.replaceChildren=e=>{for(;this.lastChild;)this.removeChild(this.lastChild);e!==void 0&&this.append(e)})})();(function(){let e=!1;if(document.createElement("i").addEventListener("click",()=>{},{get signal(){e=!0}}),e||!window.AbortController)return;let t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,i,n){if(n&&n.signal){if(n.signal.aborted)return;n.signal.addEventListener("abort",()=>this.removeEventListener(r,i,{...n}))}return t.call(this,r,i,n)}})();export{kn as CustomElementsPolyfill,_n as Delegate,Oe as FocusTrap,Ue as PhotoSwipeLightbox,ce as ScrollOffset,Jr as animate,kr as inView,Qr as scroll,Pr as stagger,zr as timeline}; /*! Bundled license information: @ungap/custom-elements/index.js: (*! (c) Andrea Giammarchi @webreflection ISC *) (*! (c) Andrea Giammarchi - ISC *) tabbable/dist/index.esm.js: (*! * tabbable 5.3.3 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE *) focus-trap/dist/focus-trap.esm.js: (*! * focus-trap 6.9.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE *) photoswipe/dist/photoswipe-lightbox.esm.js: (*! * PhotoSwipe Lightbox 5.3.4 - https://photoswipe.com * (c) 2022 Dmytro Semenov *) */