1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88653,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(231178),r=e.i(947414),n=e.i(674008),a=e.i(821476),o=e.i(772846),l=i,d=e.i(737806);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends l.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,o.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,i=(0,o.isHTMLElement)(e)&&e.offsetWidth||0,s=(0,o.isHTMLElement)(e)&&e.offsetHeight||0,r=getComputedStyle(t),n=this.props.sizeRef.current;n.height=parseFloat(r.height),n.width=parseFloat(r.width),n.top=t.offsetTop,n.left=t.offsetLeft,n.right=i-n.width-n.left,n.bottom=s-n.height-n.top,n.direction=r.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function u({children:e,isPresent:s,anchorX:r,anchorY:n,root:a,pop:o}){let m=(0,l.useId)(),p=(0,l.useRef)(null),f=(0,l.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:x}=(0,l.useContext)(d.MotionConfigContext),g=function(...e){return i.useCallback(function(...e){return t=>{let i=!1,s=e.map(e=>{let s=c(e,t);return i||"function"!=typeof s||(i=!0),s});if(i)return()=>{for(let t=0;t<s.length;t++){let i=s[t];"function"==typeof i?i():c(e[t],null)}}}}(...e),e)}(p,e.props?.ref??e?.ref);return(0,l.useInsertionEffect)(()=>{let{width:e,height:t,top:i,left:l,right:d,bottom:c,direction:h}=f.current;if(s||!1===o||!p.current||!e||!t)return;let u="rtl"===h,g="left"===r?u?`right: ${d}`:`left: ${l}`:u?`left: ${l}`:`right: ${d}`,y="bottom"===n?`bottom: ${c}`:`top: ${i}`;p.current.dataset.motionPopId=m;let v=document.createElement("style");x&&(v.nonce=x);let b=a??document.head;return b.appendChild(v),v.sheet&&v.sheet.insertRule(` 2 [data-motion-pop-id="${m}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${t}px !important; 6 ${g}px !important; 7 ${y}px !important; 8 } 9 `),()=>{p.current?.removeAttribute("data-motion-pop-id"),b.contains(v)&&b.removeChild(v)}},[s]),(0,t.jsx)(h,{isPresent:s,childRef:p,sizeRef:f,pop:o,children:!1===o?e:l.cloneElement(e,{ref:g})})}let m=({children:e,initial:s,isPresent:n,onExitComplete:o,custom:l,presenceAffectsLayout:d,mode:c,anchorX:h,anchorY:m,root:f})=>{let x=(0,r.useConstant)(p),g=(0,i.useId)(),y=!0,v=(0,i.useMemo)(()=>(y=!1,{id:g,initial:s,isPresent:n,custom:l,onExitComplete:e=>{for(let t of(x.set(e,!0),x.values()))if(!t)return;o&&o()},register:e=>(x.set(e,!1),()=>x.delete(e))}),[n,x,o]);return d&&y&&(v={...v}),(0,i.useMemo)(()=>{x.forEach((e,t)=>x.set(t,!1))},[n]),i.useEffect(()=>{n||x.size||!o||o()},[n]),e=(0,t.jsx)(u,{pop:"popLayout"===c,isPresent:n,anchorX:h,anchorY:m,root:f,children:e}),(0,t.jsx)(a.PresenceContext.Provider,{value:v,children:e})};function p(){return new Map}var f=e.i(464978);let x=e=>e.key||"";function g(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}e.s(["AnimatePresence",0,({children:e,custom:a,initial:o=!0,onExitComplete:l,presenceAffectsLayout:d=!0,mode:c="sync",propagate:h=!1,anchorX:u="left",anchorY:p="top",root:y})=>{let[v,b]=(0,f.usePresence)(h),w=(0,i.useMemo)(()=>g(e),[e]),j=h&&!v?[]:w.map(x),N=(0,i.useRef)(!0),k=(0,i.useRef)(w),T=(0,r.useConstant)(()=>new Map),S=(0,i.useRef)(new Set),[M,C]=(0,i.useState)(w),[E,P]=(0,i.useState)(w);(0,n.useIsomorphicLayoutEffect)(()=>{N.current=!1,k.current=w;for(let e=0;e<E.length;e++){let t=x(E[e]);j.includes(t)?(T.delete(t),S.current.delete(t)):!0!==T.get(t)&&T.set(t,!1)}},[E,j.length,j.join("-")]);let A=[];if(w!==M){let e=[...w];for(let t=0;t<E.length;t++){let i=E[t],s=x(i);j.includes(s)||(e.splice(t,0,i),A.push(i))}return"wait"===c&&A.length&&(e=A),P(g(e)),C(w),null}let{forceRender:L}=(0,i.useContext)(s.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:E.map(e=>{let i=x(e),s=(!h||!!v)&&(w===E||j.includes(i));return(0,t.jsx)(m,{isPresent:s,initial:(!N.current||!!o)&&void 0,custom:a,presenceAffectsLayout:d,mode:c,root:y,onExitComplete:s?void 0:()=>
9{if(S.current.has(i)||!T.has(i))return;S.current.add(i),T.set(i,!0);let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(L?.(),P(k.current),h&&b?.(),l&&l())},anchorX:u,anchorY:p,children:e},i)})})}],88653)},231178,947414,674008,821476,772846,737806,464978,476959,83411,965566,260830,287022,930551,560140,325791,486427,571164,138544,783920,344230,515923,83352,749652,661327,846932,e=>{"use strict";let t,i,s;var r,n=e.i(271645);let a=(0,n.createContext)({});function o(e){let t=(0,n.useRef)(null);return null===t.current&&(t.current=e()),t.current}e.s(["LayoutGroupContext",0,a],231178),e.s(["useConstant",0,o],947414);let l="u">typeof window?n.useLayoutEffect:n.useEffect;e.s(["useIsomorphicLayoutEffect",0,l],674008);let d=(0,n.createContext)(null);e.s(["PresenceContext",0,d],821476);let c=e=>"object"==typeof e&&null!==e;function h(e){return c(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}e.s(["isHTMLElement",0,h],772846);let u=(0,n.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function m(e=!0){let t=(0,n.useContext)(d);if(null===t)return[!0,null];let{isPresent:i,onExitComplete:s,register:r}=t,a=(0,n.useId)();(0,n.useEffect)(()=>{if(e)return r(a)},[e]);let o=(0,n.useCallback)(()=>e&&s&&s(a),[a,s,e]);return!i&&s?[!1,o]:[!0]}e.s(["MotionConfigContext",0,u],737806),e.s(["usePresence",0,m],464978);let p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],f=new Set([...p,"pathRotation"]),x=(e,t,i)=>i>t?t:i<e?e:i;e.s(["clamp",0,x],476959);let g={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},y={...g,transform:e=>x(0,1,e)},v={...g,default:1},b=e=>Math.round(1e5*e)/1e5,w=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,j=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,N=(e,t)=>i=>!!("string"==typeof i&&j.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),k=(e,t,i)=>s=>{if("string"!=typeof s)return s;let[r,n,a,o]=s.match(w);return{[e]:parseFloat(r),[t]:parseFloat(n),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},T={...g,transform:e=>Math.round(x(0,255,e))},S={test:N("rgb","red"),parse:k("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:s=1})=>"rgba("+T.transform(e)+", "+T.transform(t)+", "+T.transform(i)+", "+b(y.transform(s))+")"},M={test:N("#"),parse:function(e){let t="",i="",s="",r="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,i+=i,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:S.transform},C=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),E=C("deg"),P=C("%"),A=C("px"),L=C("vh"),D=C("vw"),R={...P,parse:e=>P.parse(e)/100,transform:e=>P.transform(100*e)},V={test:N("hsl","hue"),parse:k("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(e)+", "+P.transform(b(t))+", "+P.transform(b(i))+", "+b(y.transform(s))+")"},B={test:e=>S.test(e)||M.test(e)||V.test(e),parse:e=>S.test(e)?S.parse(e):V.test(e)?V.parse(e):M.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?S.transform(e):V.transform(e),getAnimatableNone:e=>{let t=B.parse(e);return t.alpha=0,B.transform(t)}},F=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,I="number",O="color",$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function W(e){let t=e.toString(),i=[],s={color:[],number:[],var:[]},r=[],n=0,a=t.replace($,e=>(B.test(e)?(s.color.push(n),r.push(O),i.push(B.parse(e))):e.startsWith("var(")?(s.var.push(n),r.push("var"),i.push(e)):(s.number.push(n),r.push(I),i.push(parseFloat(e))),++n,"${}")).split("${}");return{values:i,split:a,indexes:s,types:r}}function U({split:e,types:t}){let i=e.length;return s=>{let r="";for(let n=0;n<i;n++)if(r+=e[n],void 0!==s[n]){let e=t[n];e===I?r+=b(s[n]):e===O?r+=B.transform(s[n]):r+=s[n]}return r}}let z={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(w)?.length||0)+(e.match(F)?.length||0)>0},parse:function(e){return W(e).values},createTransformer:function(e){return U(W(e))},getAnimatableNone:function(e){let t=W(e);return U(t)(t.values.map((e,i)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:B.test(e)?B.getAnimatableNone(e):e)(e,t.split[i])))}},H=new Set(["brightness","contrast","saturate","opacity"]);function Y(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[s]=i.match(w)||[];if(!s)return e;let r=i.replace(s,""),n=+!!H.has(t);return s!==i&&(n*=100),t+"("+n+r+")"}let X=/\b([a-z-]*)\(.*?\)/gu,q={...z,getAnimatableNone:e=>{let t=e.match(X);return t?t.map(Y).join(" "):e}},G={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},K={...g,transform:Math.round},_={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,rotate:E,pathRotation:E,rotateX:E,rotateY:E,rotateZ:E,scale:v,scaleX:v,scaleY:v,scaleZ:v,skew:E,skewX:E,skewY:E,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:y,originX:R,originY:R,originZ:A,zIndex:K,fillOpacity:y,strokeOpacity:y,numOctaves:K},Z={..._,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:q,WebkitFilter:q,mask:G,WebkitMask:G},J=e=>Z[e],Q=()=>({translate:0,scale:1,origin:0,originPoint:0}),ee=()=>({x:Q(),y:Q()}),et=()=>({min:0,max:0}),ei=()=>({x:et(),y:et()}),es=e=>!!(e&&e.getVelocity);e.s(["isMotionValue",0,es],83411);let er=new Set(["width","height","top","left","right","bottom",...p]),en=e=>t=>t.test(e),ea=[g,A,P,E,D,L,{test:e=>"auto"===e,parse:e=>e}],eo=e=>ea.find(en(e));var el=e.i(247167);let ed=()=>{},ec=()=>{};el.default,e.s(["invariant",0,ec,"warning",0,ed],965566);let eh=e=>t=>"string"==typeof t&&t.startsWith(e),eu=eh("--"),em=eh("var(--"),ep=e=>!!em(e)&&ef.test(e.split("/*")[0].trim()),ef=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ex(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let eg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ey=e=>180*e/Math.PI,ev=e=>ew(ey(Math.atan2(e[1],e[0]))),eb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ev,rotateZ:ev,skewX:e=>ey(Math.atan(e[1])),skewY:e=>ey(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ew=e=>((e%=360)<0&&(e+=360),e),ej=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),eN=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ek={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ej,scaleY:eN,scale:e=>(ej(e)+eN(e))/2,rotateX:e=>ew(ey(Math.atan2(e[6],e[5]))),rotateY:e=>ew(ey(Math.atan2(-e[2],e[0]))),rotateZ:ev,rotate:ev,skewX:e=>ey(Math.atan(e[4])),skewY:e=>ey(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eT(e){return+!!e.includes("scale")}function eS(e,t){let i,s;if(!e||"none"===e)return eT(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=ek,s=r;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=eb,s=t}if(!s)return eT(t);let n=i[t],a=s[1].split(",").map(eM);return"function"==typeof n?n(a):a[n]}function eM(e){return parseFloat(e.trim())}let eC=e=>e===g||e===A,eE=new Set(["x","y","z"]),eP=p.filter(e=>!eE.has(e)),eA={width:({x:e},{paddingLeft:t="0",paddingRight:i="0",boxSizing:s})=>{let r=e.max-e.min;return"border-box"===s?r:r-parseFloat(t)-parseFloat(i)},height:({y:e},{paddingTop:t="0",paddingBottom:i="0",boxSizing:s})=>{let r=e.max-e.min;return"border-box"===s?r:r-parseFloat(t)-parseFloat(i)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>eS(t,"x"),y:(e,{transform:t})=>eS(t,"y")};eA.translateX=eA.x,eA.translateY=eA.y;let eL=e=>e;e.s(["noop",0,eL],260830);let eD={},eR=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eV(e,t){let i=!1,s=!0,r={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,a=eR.reduce((e,i)=>(e[i]=function(e,t){let i=new Set,s=new Set,r=!1,n=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function d(t){a.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,n=!1)=>{let o=n&&r?i:s;return t&&a.add(e),o.add(e),e},cancel:e=>{s.delete(e),a.delete(e)},process:e=>{if(o=e,r){n=!0;return}r=!0;let a=i;
9i=s,s=a,i.forEach(d),t,l=0,i.clear(),r=!1,n&&(n=!1,c.process(e))}};return c}(n,t?i:void 0),e),{}),{setup:o,read:l,resolveKeyframes:d,preUpdate:c,update:h,preRender:u,render:m,postRender:p}=a,f=()=>{let n=eD.useManualTiming,a=n?r.timestamp:performance.now();i=!1,n||(r.delta=s?1e3/60:Math.max(Math.min(a-r.timestamp,40),1)),r.timestamp=a,r.isProcessing=!0,o.process(r),l.process(r),d.process(r),c.process(r),h.process(r),u.process(r),m.process(r),p.process(r),r.isProcessing=!1,i&&t&&(s=!1,e(f))};return{schedule:eR.reduce((t,n)=>{let o=a[n];return t[n]=(t,n=!1,a=!1)=>(!i&&(i=!0,s=!0,r.isProcessing||e(f)),o.schedule(t,n,a)),t},{}),cancel:e=>{for(let t=0;t<eR.length;t++)a[eR[t]].cancel(e)},state:r,steps:a}}let{schedule:eB,cancel:eF,state:eI,steps:eO}=eV("u">typeof requestAnimationFrame?requestAnimationFrame:eL,!0);e.s(["cancelFrame",0,eF,"frame",0,eB,"frameData",0,eI,"frameSteps",0,eO],287022);let e$=new Set,eW=!1,eU=!1,ez=!1;function eH(){if(eU){let e=Array.from(e$).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>{let t,s=(t=[],eP.forEach(i=>{let s=e.getValue(i);void 0!==s&&(t.push([i,s.get()]),s.set(+!!i.startsWith("scale")))}),t);s.length&&(i.set(e,s),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(([t,i])=>{e.getValue(t)?.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eU=!1,eW=!1,e$.forEach(e=>e.complete(ez)),e$.clear()}function eY(){e$.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eU=!0)})}class eX{constructor(e,t,i,s,r,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=s,this.element=r,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(e$.add(this),eW||(eW=!0,eB.read(eY),eB.resolveKeyframes(eH))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:s}=this;if(null===e[0]){let r=s?.get(),n=e[e.length-1];if(void 0!==r)e[0]=r;else if(i&&t){let s=i.readValue(t,n);null!=s&&(e[0]=s)}void 0===e[0]&&(e[0]=n),s&&void 0===r&&s.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),e$.delete(this)}cancel(){"scheduled"===this.state&&(e$.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eq=new Set([q,G]);function eG(e,t){let i=J(e);return eq.has(i)||(i=z),i.getAnimatableNone?i.getAnimatableNone(t):void 0}let eK=new Set(["auto","none","0"]);class e_ extends eX{constructor(e,t,i,s,r){super(e,t,i,s,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let s=e[i];if("string"==typeof s&&ep(s=s.trim())){let r=function e(t,i,s=1){ec(`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[r,n]=function(e){let t=eg.exec(e);if(!t)return[,];let[,i,s,r]=t;return[`--${i??s}`,r]}(t);if(!r)return;let a=window.getComputedStyle(i).getPropertyValue(r);if(a){let e=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return ep(n)?e(n,i,s+1):n}(s,t.current);void 0!==r&&(e[i]=r),i===e.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!er.has(i)||2!==e.length)return;let[s,r]=e,n=eo(s),a=eo(r);if(ex(s)!==ex(r)&&eA[i]){this.needsMeasurement=!0;return}if(n!==a)if(eC(n)&&eC(a))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else eA[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&i.push(t);i.length&&function(e,t,i){let s,r=0;for(;r<e.length&&!s;){let t=e[r];"string"==typeof t&&!eK.has(t)&&W(t).values.length&&(s=e[r]),r++}if(s&&i)for(let r of t)e[r]=eG(i,s)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eA[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let s=t[t.length-1];void 0!==s&&e.getValue(i,s).jump(s,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:i}=this;if(!e||!e.current)return;let s=e.getValue(t);s&&s.jump(this.measuredOrigin,!1);let r=i.length-1,n=i[r];i[r]=eA[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEac
9h(([t,i])=>{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}let eZ=e=>1e3*e;function eJ(e,t){-1===e.indexOf(t)&&e.push(t)}function eQ(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}class e0{constructor(){this.subscriptions=[]}add(e){return eJ(this.subscriptions,e),()=>eQ(this.subscriptions,e)}notify(e,t,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](e,t,i);else for(let r=0;r<s;r++){let s=this.subscriptions[r];s&&s(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function e1(e,t,i){t.startsWith("--")?e.style.setProperty(t,i):e.style[t]=i}function e2(e){let t;return()=>(void 0===t&&(t=e()),t)}let e4={};function e5(e,t){let i=e2(e);return()=>e4[t]??i()}let e3=e5(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),e6=e5(()=>void 0!==window.ViewTimeline,"viewTimeline");e.s(["supportsScrollTimeline",0,e3,"supportsViewTimeline",0,e6],930551);let e8=e=>null!==e;function e7(e,{repeat:t,repeatType:i="loop"},s,r=1){let n=e.filter(e8),a=r<0||t&&"loop"!==i&&t%2==1?0:n.length-1;return a&&void 0!==s?s:n[a]}class e9{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let te={layout:0,mainThread:0,waapi:0},tt=e=>Array.isArray(e)&&"number"==typeof e[0],ti=e5(()=>{try{document.createElement("div").animate({opacity:0}
9,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),ts=(e,t,i=10)=>{let s="",r=Math.max(Math.round(t/i),2);for(let t=0;t<r;t++)s+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},tr=([e,t,i,s])=>`cubic-bezier(${e}, ${t}, ${i}, ${s})`,tn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tr([0,.65,.55,1]),circOut:tr([.55,0,1,.45]),backIn:tr([.31,.01,.66,-.59]),backOut:tr([.33,1.53,.69,.99])};function ta(e){return"function"==typeof e&&"applyToOptions"in e}class to extends e9{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:i,keyframes:s,pseudoElement:r,allowFlatten:n=!1,finalKeyframe:a,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=n,this.options=e,ec(e.type);const l=function({type:e,...t}){return ta(e)&&ti()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,i,{delay:s=0,duration:r=300,repeat:n=0,repeatType:a="loop",ease:o="easeOut",times:l}={},d){let c={[t]:i};l&&(c.offset=l);let h=function e(t,i){if(t)return"function"==typeof t?ti()?ts(t,i):"ease-out":tt(t)?tr(t):Array.isArray(t)?t.map(t=>e(t,i)||tn.easeOut):tn[t]}(o,r);Array.isArray(h)&&(c.easing=h);let u={delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:n+1,direction:"reverse"===a?"alternate":"normal"};d&&(u.pseudoElement=d);let m=e.animate(c,u);return m}(t,i,s,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=e7(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),e1(t,i,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eZ(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:i,observe:s}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&e3())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),i&&(this.animation.rangeEnd=i),eL):s(this)}}let tl=new Set(["opacity","clipPath","filter","transform"]),{schedule:td,cancel:tc}=eV(queueMicrotask,!1);function th(){t=void 0}e.s(["cancelMicrotask",0,tc,"microtask",0,td],560140);let tu={now:()=>(void 0===t&&tu.set(eI.isProcessing||eD.useManualTiming?eI.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(th)}},tm=(e,t)=>t?1e3/t*e:0;e.s(["velocityPerSecond",0,tm],325791);let tp={current:void 0};class tf{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tu.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=tu.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new e0);let i=this.events[e].add(t);return"change"===e?()=>{i(),eB.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return tp.current&&tp.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=tu.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return tm(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tx(e,t){return new tf(e,t)}e.s(["collectMotionValues",0,tp,"motionValue",0,tx],486427);let tg=[...ea,B,z],ty=new WeakMap;function tv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tb(e){return"string"==typeof e||Array.isArray(e)}let tw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tj=["initial",...tw];function tN(e){return tv(e.animate)||tj.some(t=>tb(e[t]))}function tk(e){return!!(tN(e)||e.variants)}let tT={current:null},tS={current:!1};e.s(["hasReducedMotionListener",0,tS,"prefersReducedMotion",0,tT],571164);let tM="u">typeof window;function tC(){if(tS.current=!0,tM)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tT.current=e.matches;e.addEventListener("change",t),t()}else tT.current=!1}function tE(e){let t=[{},{}];
9return e?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function tP(e,t,i,s){if("function"==typeof t){let[r,n]=tE(s);t=t(void 0!==i?i:e.custom,r,n)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,n]=tE(s);t=t(void 0!==i?i:e.custom,r,n)}return t}e.s(["initPrefersReducedMotion",0,tC],138544);let tA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tL={};class tD{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:n,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=eX,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=tu.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eB.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=d,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!n,this.isControllingVariants=tN(t),this.isVariantNode=tk(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in h){const t=h[e];void 0!==l[e]&&es(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ty.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tS.current||tC(),this.shouldReduceMotion=tT.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eF(this.notifyUpdate),eF(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let i;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&tl.has(e)&&this.current instanceof HTMLElement){let{factory:i,keyframes:s,times:r,ease:n,duration:a}=t.accelerate,o=new to({element:this.current,name:e,keyframes:s,times:r,ease:n,duration:eZ(a)}),l=i(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let s=f.has(e);s&&this.onBindTransform&&this.onBindTransform();let r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eB.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tL){let t=tL[e];if(!t)continue;let{isEnabled:i,Feature:s}=t;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){let t=this.features[e];
9t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ei()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tA.length;t++){let i=tA[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s=e["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=function(e,t,i){for(let s in t){let r=t[s],n=i[s];if(es(r))e.addValue(s,r);else if(es(n))e.addValue(s,tx(r,{owner:e}));else if(n!==r)if(e.hasValue(s)){let t=e.getValue(s);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(s);e.addValue(s,tx(void 0!==t?t:r,{owner:e}))}}for(let s in i)void 0===t[s]&&e.removeValue(s);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=tx(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let i=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=i){let s,r;if("string"==typeof i&&(s=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(s)||(r=i,/^0[^.\s]+$/u.test(r))))i=parseFloat(i);else{let s;s=i,!tg.find(en(s))&&z.test(t)&&(i=eG(e,t))}this.setBaseTarget(e,es(i)?i.get():i)}return es(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let s=tP(this.props,i,this.presenceContext?.custom);s&&(t=s[e])}if(i&&void 0!==t)return t;let s=this.getBaseTargetFromProps(this.props,e);return void 0===s||es(s)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:s}on(e,t){return this.events[e]||(this.events[e]=new e0),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){td.render(this.render)}}class tR extends tD{constructor(){super(...arguments),this.KeyframeResolver=e_}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;es(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tV(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tB=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tI=p.length;function tO(e,t,i){let{style:s,vars:r,transformOrigin:n}=e,a=!1,o=!1;for(let e in t){let i=t[e];if(f.has(e)){a=!0;continue}if(eu(e)){r[e]=i;continue}{let t=tB(i,_[e]);e.startsWith("origin")?(o=!0,n[e]=t):s[e]=t}}if(!t.transform&&(a||i?s.transform=function(e,t,i){let s="",r=!0;for(let n=0;n<tI;n++){let a=p[n],o=e[a];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!a.startsWith("scale");else{let e=parseFloat(o);l=a.startsWith("scale")?1===e:0===e}if(!l||i){let e=tB(o,_[a]);if(!l){r=!1;let t=tF[a]||a;s+=`${t}(${e}) `}i&&(t[a]=e)}}let n=e.pathRotation;return n&&(r=!1,s+=`rotate(${tB(n,_.pathRotation)}) `),s=s.trim(),i?s=i(t,r?"":s):r&&(s="none"),s}(t,e.transform,i):s.transform&&(s.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:i=0}=n;s.transformOrigin=`${e} ${t} ${i}`}}let t$={offset:"stroke-dashoffset",array:"stroke-dasharray"},tW={offset:"strokeDashoffset",array:"strokeDasharray"},tU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tz(e,{attrX:t,attrY:i,attrScale:s,pathLength:r,pathSpacing:n=1,pathOffset:a=0,...o}
9,l,d,c){if(tO(e,o,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:h,style:u}=e;for(let e of(h.transform&&(u.transform=h.transform,delete h.transform),(u.transform||h.transformOrigin)&&(u.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),u.transform&&(u.transformBox=c?.transformBox??"fill-box",delete h.transformBox),tU))void 0!==h[e]&&(u[e]=h[e],delete h[e]);void 0!==t&&(h.x=t),void 0!==i&&(h.y=i),void 0!==s&&(h.scale=s),void 0!==r&&function(e,t,i=1,s=0,r=!0){e.pathLength=1;let n=r?t$:tW;e[n.offset]=`${-s}`,e[n.array]=`${t} ${i}`}(h,r,n,a,!1)}let tH=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tY=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tX(e,{style:t,vars:i},s,r){let n,a=e.style;for(n in t)a[n]=t[n];for(n in r?.applyProjectionStyles(a,s),i)a.setProperty(n,i[n])}function tq(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tG={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!A.test(e))return e;else e=parseFloat(e);let i=tq(e,t.target.x),s=tq(e,t.target.y);return`${i}% ${s}%`}},tK=(e,t,i)=>e+(t-e)*i,t_={borderRadius:{...tG,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tG,borderTopRightRadius:tG,borderBottomLeftRadius:tG,borderBottomRightRadius:tG,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let s=z.parse(e);if(s.length>5)return e;let r=z.createTransformer(e),n=+("number"!=typeof s[0]),a=i.x.scale*t.x,o=i.y.scale*t.y;s[0+n]/=a,s[1+n]/=o;let l=tK(a,o,.5);return"number"==typeof s[2+n]&&(s[2+n]/=l),"number"==typeof s[3+n]&&(s[3+n]/=l),r(s)}}};function tZ(e,{layout:t,layoutId:i}){return f.has(e)||e.startsWith("origin")||(t||void 0!==i)&&(!!t_[e]||"opacity"===e)}function tJ(e,t,i){let s=e.style,r=t?.style,n={};if(!s)return n;for(let t in s)(es(s[t])||r&&es(r[t])||tZ(t,e)||i?.getValue(t)?.liveStyle!==void 0)&&(n[t]=s[t]);return n}function tQ(e,t,i){let s=tJ(e,t,i);for(let i in e)(es(e[i])||es(t[i]))&&(s[-1!==p.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return s}class t0 extends tR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ei}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(f.has(t)){let e=J(t);return e&&e.default||0}return t=tH.has(t)?t:tV(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return tQ(e,t,i)}build(e,t,i){tz(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,s){for(let i in tX(e,t,void 0,s),t.attrs)e.setAttribute(tH.has(i)?i:tV(i),t.attrs[i])}mount(e){this.isSVGTag=tY(e.tagName),super.mount(e)}}function t1({top:e,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:e,max:s}}}function t2(e){return void 0===e||1===e}function t4({scale:e,scaleX:t,scaleY:i}){return!t2(e)||!t2(t)||!t2(i)}function t5(e){return t4(e)||t3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function t3(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function t6(e,t,i,s,r){return void 0!==r&&(e=s+r*(e-s)),s+i*(e-s)+t}function t8(e,t=0,i=1,s,r){e.min=t6(e.min,t,i,s,r),e.max=t6(e.max,t,i,s,r)}function t7(e,{x:t,y:i}){t8(e.x,t.translate,t.scale,t.originPoint),t8(e.y,i.translate,i.scale,i.originPoint)}function t9(e,t){e.min+=t,e.max+=t}function ie(e,t,i,s,r=.5){let n=tK(e.min,e.max,r);t8(e,t,i,n,s)}function it(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function ii(e,t,i){let s=i??e;ie(e.x,it(t.x,s.x),t.scaleX,t.scale,t.originX),ie(e.y,it(t.y,s.y),t.scaleY,t.scale,t.originY)}function is(e,t){return t1(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}class ir extends tR{constructor(){super(...arguments),this.type="html",this.renderInstance=tX}readValueFromInstance(e,t){if(f.has(t))return this.projection?.isProjecting?eT(t):((e,t)=>{let{transform:i="none"}=getComputedStyle(e);return eS(i,t)})(e,t);{let i=window.getComputedStyle(e),s=(eu(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return is(e,t)}build(e,t,i){tO(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return tJ(e,t,i)}}let ia=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function io(e){if("string"!=typeof e||e.includes("-"));else if(ia.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var il=e.i(843476);let id=(0,n.createContext)({strict:!1}),ic=(0,n.createContext)({});function ih(e){return Array.isArray(e)?e.join(" "):e}let iu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function im(e,t,i){for(let s in t)es(t[s])||tZ(s,i)||(e[s]=t[s])}let ip=()=>({...iu(),attrs:{}}),ix=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ig(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ix.has(e)}let iy=e=>!ig(e);try{r=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default,"function"==typeof r&&(iy=e=>e.startsWith("on")?!ig(e):r(e))}catch{}function iv(e){return es(e)?e.get():e}let ib=e=>(t,i)=>{let s=(0,n.useContext)(ic),r=(0,n.useContext)(d),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},i,s,r){return{latestValues:function(e,t,i,s){let r={},n=s(e,{});for(let e in n)r[e]=iv(n[e]);let{initial:a,animate:o}=e,l=tN(e),d=tk(e);t&&d&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===o&&(o=t.animate));let c=!!i&&!1===i.initial,h=(c=c||!1===a)?o:a;if(h&&"boolean"!=typeof h&&!tv(h)){let t=Array.isArray(h)?h:[h];for(let i=0;i<t.length;i++){let s=tP(e,t[i]);if(s){let{transitionEnd:e,transition:t,...i}=s;for(let e in i){let t=i[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(i,s,r,e),renderState:t()}})(e,t,s,r);return i?a():o(a)},iw=ib({scrapeMotionValuesFromProps:tJ,createRenderState:iu}),ij=ib({scrapeMotionValuesFromProps:tQ,createRenderState:ip}),iN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ik=!1;function iT(){return!function(){if(ik)return;let e={};for(let t in iN)e[t]={isEnabled:e=>iN[t].some(t=>!!e[t])};tL=e,ik=!0}(),tL}let iS=Symbol.for("motionComponentSymbol"),iM="data-"+tV("framerAppearId"),iC=(0,n.createContext)({});function iE(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function iP(e,{forwardMotionProps:t=!1,type:i}={},s,r){s&&function(e){let t=iT();for(let i in e)t[i]={...t[i],...e[i]};tL=t}(s);let o=i?"svg"===i:io(e),c=o?ij:iw;function h(i,s){var h;let m,p,f,x={...(0,n.useContext)(u),...i,layoutId:function({layoutId:e}){let t=(0,n.useContext)(a).id;return t&&void 0!==e?t+"-"+e:e}(i)},{isStatic:g}=x,y=function(e){let{initial:t,animate:i}=function(e,t){if(tN(e)){let{initial:t,animate:i}=e;return{initial:!1===t||tb(t)?t:void 0,animate:tb(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,n.useContext)(ic));return(0,n.useMemo)(()=>({initial:t,animate:i}),[ih(t),ih(i)])}(i),v=c(i,g);
9if(!g&&"u">typeof window){(0,n.useContext)(id).strict;let t=function(e){let{drag:t,layout:i}=iT();if(!t&&!i)return{};let s={...t,...i};return{MeasureLayout:t?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(x);m=t.MeasureLayout,y.visualElement=function(e,t,i,s,r,a){let{visualElement:o}=(0,n.useContext)(ic),c=(0,n.useContext)(id),h=(0,n.useContext)(d),m=(0,n.useContext)(u),p=m.reducedMotion,f=m.skipAnimations,x=(0,n.useRef)(null),g=(0,n.useRef)(!1);s=s||c.renderer,!x.current&&s&&(x.current=s(e,{visualState:t,parent:o,props:i,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:p,skipAnimations:f,isSVG:a}),g.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));let y=x.current,v=(0,n.useContext)(iC);y&&!y.projection&&r&&("html"===y.type||"svg"===y.type)&&function(e,t,i,s){let{layoutId:r,layout:n,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:d,layoutAnchor:c,layoutCrossfade:h}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:r,layout:n,alwaysMeasureLayout:!!a||o&&iE(o),visualElement:e,animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:d,layoutAnchor:c})}(x.current,i,r,v);let b=(0,n.useRef)(!1);(0,n.useInsertionEffect)(()=>{y&&b.current&&y.update(i,h)});let w=i[iM],j=(0,n.useRef)(!!w&&"u">typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return l(()=>{g.current=!0,y&&(b.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),j.current&&y.animationState&&y.animationState.animateChanges())}),(0,n.useEffect)(()=>{y&&(!j.current&&y.animationState&&y.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),j.current=!1),y.enteringChildren=void 0)}),y}(e,v,x,r,t.ProjectionNode,o)}return(0,il.jsxs)(ic.Provider,{value:y,children:[m&&y.visualElement?(0,il.jsx)(m,{visualElement:y.visualElement,...x}):null,function(e,t,i,{latestValues:s},r,a=!1,o){let l=(o??io(e)?function(e,t,i,s){let r=(0,n.useMemo)(()=>{let i=ip();return tz(i,t,tY(s),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};im(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let i,s,r={},a=(i=e.style||{},im(s={},i,e),Object.assign(s,function({transformTemplate:e},t){return(0,n.useMemo)(()=>{let i=iu();return tO(i,t,e),Object.assign({},i.vars,i.style)},[t])}(e,t)),s);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=a,r})(t,s,r,e),d=function(e,t,i){let s={};for(let r in e)("values"!==r||"object"!=typeof e.values)&&!es(e[r])&&(iy(r)||!0===i&&ig(r)||!t&&!ig(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}(t,"string"==typeof e,a),c=e!==n.Fragment?{...d,...l,ref:i}:{},{children:h}=t,u=(0,n.useMemo)(()=>es(h)?h.get():h,[h]);return(0,n.createElement)(e,{...c,children:u})}(e,i,(h=y.visualElement,p=(0,n.useRef)(s),(0,n.useInsertionEffect)(()=>{p.current=s}),f=(0,n.useRef)(null),(0,n.useCallback)(e=>{e&&v.onMount?.(e),h&&(e?h.mount(e):h.unmount());let t=p.current;if("function"==typeof t)if(e){let i=t(e);"function"==typeof i&&(f.current=i)}else f.current?(f.current(),f.current=null):t(e);else t&&(t.current=e)},[h])),v,g,t,o)]})}h.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let m=(0,n.forwardRef)(h);return m[iS]=e,m}class iA{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iL(e,t,i){let s=e.getProps();return tP(s,t,void 0!==i?i:s.custom,e)}function iD(e,t){if(e?.inherit&&t){let{inherit:i,...s}=e;return{...t,...s}}return e}function iR(e,t){let i=e?.[t]??e?.default??e;return i!==e?iD(i,e):i}let iV=e=>Array.isArray(e);function iB(e,t){let i=e.getValue("willChange");if(es(i)&&i.add)return i.add(t);if(!i&&eD.WillChange){let i=new eD.WillChange("auto");
9e.addValue("willChange",i),i.add(t)}}let iF=(...e)=>e.reduce((e,t)=>i=>t(e(i)));function iI(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function iO(e,t){return i=>i>0?t:e}let i$=(e,t,i)=>{let s=e*e,r=i*(t*t-s)+s;return r<0?0:Math.sqrt(r)},iW=[M,S,V];function iU(e){let t=iW.find(t=>t.test(e));if(ed(`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let i=t.parse(e);return t===V&&(i=function({hue:e,saturation:t,lightness:i,alpha:s}){e/=360,i/=100;let r=0,n=0,a=0;if(t/=100){let s=i<.5?i*(1+t):i+t-i*t,o=2*i-s;r=iI(o,s,e+1/3),n=iI(o,s,e),a=iI(o,s,e-1/3)}else r=n=a=i;return{red:Math.round(255*r),green:Math.round(255*n),blue:Math.round(255*a),alpha:s}}(i)),i}let iz=(e,t)=>{let i=iU(e),s=iU(t);if(!i||!s)return iO(e,t);let r={...i};return e=>(r.red=i$(i.red,s.red,e),r.green=i$(i.green,s.green,e),r.blue=i$(i.blue,s.blue,e),r.alpha=tK(i.alpha,s.alpha,e),S.transform(r))},iH=new Set(["none","hidden"]);function iY(e,t){return i=>tK(e,t,i)}function iX(e){return"number"==typeof e?iY:"string"==typeof e?ep(e)?iO:B.test(e)?iz:iK:Array.isArray(e)?iq:"object"==typeof e?B.test(e)?iz:iG:iO}function iq(e,t){let i=[...e],s=i.length,r=e.map((e,i)=>iX(e)(e,t[i]));return e=>{for(let t=0;t<s;t++)i[t]=r[t](e);return i}}function iG(e,t){let i={...e,...t},s={};for(let r in i)void 0!==e[r]&&void 0!==t[r]&&(s[r]=iX(e[r])(e[r],t[r]));return e=>{for(let t in s)i[t]=s[t](e);return i}}let iK=(e,t)=>{let i=z.createTransformer(t),s=W(e),r=W(t);if(!(s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length))return ed(`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),iO(e,t);if(iH.has(e)&&!r.values.length||iH.has(t)&&!s.values.length)return iH.has(e)?i=>i<=0?e:t:i=>i>=1?t:e;return iF(iq(function(e,t){let i=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let n=t.types[r],a=e.indexes[n][s[n]],o=e.values[a]??0;i[r]=o,s[n]++}return i}(s,r),r.values),i)};function i_(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?tK(e,t,i):iX(e)(e,t)}let iZ=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eB.update(t,e),stop:()=>eF(t),now:()=>eI.isProcessing?eI.timestamp:tu.now()}};function iJ(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}let iQ=.01,i0=2,i1=.005,i2=.5;function i4(e,t){return e*Math.sqrt(1-t*t)}let i5=["duration","bounce"],i3=["stiffness","damping","mass"];function i6(e,t){return t.some(t=>void 0!==e[t])}function i8(e=.3,t=.3){let i,s,r,n,a,o,l="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:d,restDelta:c}=l,h=l.keyframes[0],u=l.keyframes[l.keyframes.length-1],m={done:!1,value:h},{stiffness:p,damping:f,mass:g,duration:y,velocity:v,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!i6(e,i3)&&i6(e,i5))if(t.velocity=0,e.visualDuration){let i=2*Math.PI/(1.2*e.visualDuration),s=i*i,r=2*x(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:1,stiffness:s,damping:r}}else{let i=function({duration:e=800,bounce:t=.3,velocity:i=0,mass:s=1}){let r,n;ed(eZ(10));let a=1-t;a=x(.05,1,a),e=x(.01,10,e/1e3),a<1?(r=t=>{let s=t*a,r=s*e;return .001-(s-i)/i4(t,a)*Math.exp(-r)},n=t=>{let s=t*a*e,n=Math.pow(a,2)*Math.pow(t,2)*e,o=Math.exp(-s),l=i4(Math.pow(t,2),a);return(s*i+i-n)*o*(-r(t)+.001>0?-1:1)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-i)*e+1),n=t=>e*e*(i-t)*Math.exp(-t*e));let o=function(e,t,i){let s=i;for(let i=1;i<12;i++)s-=e(s)/t(s);return s}(r,n,5/e);if(e=eZ(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*s;return{stiffness:t,damping:2*a*Math.sqrt(s*t),duration:e}}}({...e,velocity:0});(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=v||0,j=f/(2*Math.sqrt(p*g)),N=u-h,k=Math.sqrt(p/g)/1e3,T=5>Math.abs(N);if(d||(d=T?iQ:i0),c||(c=T?i1:i2),j<1)r=i4(k,j),n=(w+j*k*N)/r,i=e=>u-Math.exp(-j*k*e)*(n*Math.sin(r*e)+N*Math.cos(r*e)),a=j*k*n+N*r,o=j*k*N-n*r,s=e=>Math.exp(-j*k*e)*(a*Math.sin(r*e)+o*Math.cos(r*e));else if(1===j){i=e=>u-Math.exp(-k*e)*(N+(w+k*N)*e);let e=w+k*N;s=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(j*j-1);i=t=>{let i=Math.exp(-j*k*t),s=Math.min(e*t,300);return u-i*((w+j*k*N)*Math.sinh(s)+e*N*Math.cosh(s))/e};let t=(w+j*k*N)/e,r=j*k*t-N*e,n=j*k*N-t*e;s=t=>{let i=Math.exp(-j*k*t),s=Math.min(e*t,300);return i*(r*Math.sinh(s)+n*Math.cosh(s))}}let S={calculatedDuration:b&&y||null,velocity:e=>eZ(s(e)),next:e=>{if(!b&&j<1){let t=Math.exp(-j*k*e),i=Math.sin(r*e),s=Math.cos(r*e),l=u-t*(n*i+N*s);return m.done=Math.abs(eZ(t*(a*i+o*s)))<=d&&Math.abs(u-l)<=c,m.value=m.done?u:l,m}let t=i(e);return b?m.done=e>=y:m.done=Math.abs(eZ(s(e)))<=d&&Math.abs(u-t)<=c,m.value=m.done?u:t,m},toString:()=>{let e=Math.min(iJ(S),2e4),t=ts(t=>S.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return S}function i7(e,t,i){let s=Math.max(t-5,0);return tm(i-e(s),t-s)}function i9({keyframes:e,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:l,restDelta:d=.5,restSpeed:c}){let h,u,m=e[0],p={done:!1,value:m},f=i*t,x=m+f,g=void 0===a?x:a(x);g!==x&&(f=g-m);let y=e=>-f*Math.exp(-e/s),v=e=>g+y(e),b=e=>{let t=y(e),i=v(e);p.done=Math.abs(t)<=d,p.value=p.done?g:i},w=e=>{let t;if(t=p.value,void 0!==o&&t<o||void 0!==l&&t>l){var i;h=e,u=i8({keyframes:[p.value,(i=p.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:i7(v,e,p.value),damping:r,stiffness:n,restDelta:d,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(u||void 0!==h||(t=!0,b(e),w(e)),void 0!==h&&e>=h)?u.next(e-h):(t||b(e),p)}}}i8.applyToOptions=e=>{let t=function(e,t=100,i){let s=i({...e,keyframes:[0,t]}),r=Math.min(iJ(s),2e4);return{type:"keyframes",ease:e=>s.next(r*e).value/t,duration:r/1e3}}(e,100,i8);return e.ease=t.ease,e.duration=eZ(t.duration),e.type="keyframes",e};let se=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function st(e,t,i,s){return e===t&&i===s?eL:r=>0===r||1===r?r:se(function(e,t,i,s,r){let n,a,o=0;do(n=se(a=t+(i-t)/2,s,r)-e)>0?i=a:t=a;while(Math.abs(n)>1e-7&&++o<12)return a}(r,0,1,e,i),t,s)}let si=st(.42,0,1,1),ss=st(0,0,.58,1),sr=st(.42,0,.58,1),sn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sa=e=>t=>1-e(1-t),so=st(.33,1.53,.69,.99),sl=sa(so),sd=sn(sl),sc=e=>e>=1?1:(e*=2)<1?.5*sl(e):.5*(2-Math.pow(2,-10*(e-1))),sh=e=>1-Math.sin(Math.acos(e)),su=sa(sh),sm=sn(sh),sp={linear:eL,easeIn:si,easeInOut:sr,easeOut:ss,circIn:sh,circInOut:sm,circOut:su,backIn:sl,backInOut:sd,backOut:so,anticipate:sc},sf=e=>{if(tt(e)){ec(e.length);let[t,i,s,r]=e;return st(t,i,s,r)}return"string"==typeof e?(ec(sp[e],`Invalid easing type '${e}'`),sp[e]):e},sx=(e,t,i)=>{let s=t-e;return s?(i-e)/s:1};function sg(e,t,{clamp:i=!0,ease:s,mixer:r}={}){let n=e.length;if(ec(t.length),1===n)return()=>t[0];if(2===n&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,i){let s=[],r=i||eD.mix||i_,n=e.length-1;for(let i=0;i<n;i++){let n=r(e[i],e[i+1]);t&&(n=iF(Array.isArray(t)?t[i]||eL:t,n)),s.push(n)}return s}(t,s,r),l=o.length,d=i=>{if(a&&i<e[0])return t[0];let s=0;if(l>1)for(;s<e.length-2&&!(i<e[s+1]);s++);let r=sx(e[s],e[s+1],i);return o[s](r)};return i?t=>d(x(e[0],e[n-1],t)):d}function sy(e){let t=[0];return!function(e,t){let i=e[e.length-1];for(let s=1;s<=t;s++){let r=sx(0,t,s);e.push(tK(i,1,r))}}(t,e.length-1),t}function sv({duration:e=300,keyframes:t,times:i,ease:s="easeInOut"}){var r;let n=Array.isArray(s)&&"number"!=typeof s[0]?s.map(sf):sf(s),a={done:!1,value:t[0]}
9,o=sg((r=i&&i.length===t.length?i:sy(t),r.map(t=>t*e)),t,{ease:Array.isArray(n)?n:t.map(()=>n||sr).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}e.s(["progress",0,sx],783920),e.s(["interpolate",0,sg],344230),e.s(["defaultOffset",0,sy],515923);let sb={decay:i9,inertia:i9,tween:sv,keyframes:sv,spring:i8};function sw(e){"string"==typeof e.type&&(e.type=sb[e.type])}let sj=e=>e/100;class sN extends e9{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tu.now()&&this.tick(tu.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},te.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;sw(e);let{type:t=sv,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:n=0}=e,{keyframes:a}=e,o=t||sv;o!==sv&&"number"!=typeof a[0]&&(this.mixKeyframes=iF(sj,i_(a[0],a[1])),a=[0,100]);let l=o({...e,keyframes:a});"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...a].reverse(),velocity:-n})),null===l.calculatedDuration&&(l.calculatedDuration=iJ(l));let{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let i,{generator:s,totalDuration:r,mixKeyframes:n,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return s.next(0);let{delay:d=0,keyframes:c,repeat:h,repeatType:u,repeatDelay:m,type:p,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=s;if(h){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,h+1))%2&&("reverse"===u?(i=1-i,m&&(i-=m/o)):"mirror"===u&&(w=a)),b=x(0,1,i)*o}v?(this.delayState.value=c[0],i=this.delayState):i=w.next(b),n&&!v&&(i.value=n(i.value));let{done:j}=i;v||null===l||(j=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let N=null===this.holdTime&&("finished"===this.state||"running"===this.state&&j);return N&&p!==i9&&(i.value=e7(c,this.options,g,this.speed)),f&&f(i.value),N&&this.finish(),i}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=eZ(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i7(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tu.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=iZ,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tu.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,te.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}e.s(["JSAnimation",0,sN],83352);let sk={anticipate:sc,backInOut:sd,circInOut:sm};class sT extends to{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in sk&&(e.ease=sk[e.ease])}(e),sw(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:i,onComplete:s,element:r,...n}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let a=new sN({...n,autoplay:!1}
9),o=Math.max(10,tu.now()-this.startTime),l=x(0,10,o-10),d=a.sample(o).value,{name:c}=this.options;r&&c&&e1(r,c,d),t.setWithVelocity(a.sample(Math.max(0,o-l)).value,d,l),a.stop()}}let sS=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(z.test(e)||"0"===e)&&!e.startsWith("url("));function sM(e){e.duration=0,e.type="keyframes"}let sC=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,sE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sP=e2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class sA extends e9{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:n="loop",keyframes:a,name:o,motionValue:l,element:d,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tu.now();const h={autoplay:e,delay:t,type:i,repeat:s,repeatDelay:r,repeatType:n,name:o,motionValue:l,element:d,...c},u=d?.KeyframeResolver||eX;this.keyframeResolver=new u(a,(e,t,i)=>this.onKeyframesResolved(e,t,h,!i),o,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,i,s){let r;this.keyframeResolver=void 0;let{name:n,type:a,velocity:o,delay:l,isHandoff:d,onUpdate:c}=i;this.resolvedAt=tu.now();let h=!0;!function(e,t,i,s){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let n=e[e.length-1],a=sS(r,t),o=sS(n,t);return ed(`You are trying to animate ${t} from "${r}" to "${n}". "${a?n:r}" is not an animatable value.`),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||("spring"===i||ta(i))&&s)}(e,n,a,o)&&(h=!1,(eD.instantAnimations||!l)&&c?.(e7(e,i,t)),e[0]=e[e.length-1],sM(i),i.repeat=0);let u={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...i,keyframes:e},m=h&&!d&&function(e){let{motionValue:t,name:i,repeatDelay:s,repeatType:r,damping:n,type:a,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:d}=t.owner.getProps();return sP()&&i&&(tl.has(i)||sE.has(i)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&sC.test(e[t]))return!0;return!1}(o))&&("transform"!==i||!d)&&!l&&!s&&"mirror"!==r&&0!==n&&"inertia"!==a}(u),p=u.motionValue?.owner?.current;if(m)try{r=new sT({...u,element:p})}catch{r=new sN(u)}else r=new sN(u);r.finished.then(()=>{this.notifyFinished()}).catch(eL),this.pendingTimeline&&(this.stopTimeline=r.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=r}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ez=!0,eY(),eH(),ez=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let sL={type:"spring",stiffness:500,damping:25,restSpeed:10},sD={type:"keyframes",duration:.8},sR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sV=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),sB=(e,t,i,s={},r,n)=>a=>{let o=iR(s,e)||{},l=o.delay||s.delay||0,{elapsed:d=0}=s;d-=eZ(l);let c={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:n?void 0:r};!function(e){for(let t in e)if(!sV.has(t))return!0;return!1}(o)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?sD:f.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:sL:sR)(e,c)),c.duration&&(c.duration=eZ(c.duration)),c.repeatDelay&&(c.repeatDelay=eZ(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(sM(c),0===c.delay&&(h=!0)),(eD.instantAnimations||eD.skipAnimations||r?.shouldSkipAnimations||o.skipAnimations)&&(h=!0,sM(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,h&&!n&&void 0!==t.get()){let e=e7(c.keyframes,o);if(void 0!==e)return void eB.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new sN(c):new sA(c)};
9function sF(e,t,{delay:i=0,transitionOverride:s,type:r}={}){let{transition:n,transitionEnd:a,...o}=t,l=e.getDefaultTransition();n=n?iD(n,l):l;let d=n?.reduceMotion,c=n?.skipAnimations;s&&(n=s);let h=[],u=r&&e.animationState&&e.animationState.getState()[r],m=n?.path;for(let t in m&&m.animateVisualElement(e,o,n,i,h),o){let s=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||u&&function({protectedKeys:e,needsAnimating:t},i){let s=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,s}(u,t))continue;let a={delay:i,...iR(n||{},t)};c&&(a.skipAnimations=!0);let l=s.get();if(void 0!==l&&!s.isAnimating()&&!Array.isArray(r)&&r===l&&!a.velocity){eB.update(()=>s.set(r));continue}let m=!1;if(window.MotionHandoffAnimation){let i=e.props[iM];if(i){let e=window.MotionHandoffAnimation(i,t,eB);null!==e&&(a.startTime=e,m=!0)}}iB(e,t);let p=d??e.shouldReduceMotion;s.start(sB(t,s,r,p&&er.has(t)?{type:!1}:a,e,m));let f=s.animation;f&&h.push(f)}if(a){let t=()=>eB.update(()=>{a&&function(e,t){let{transitionEnd:i={},transition:s={},...r}=iL(e,t)||{};for(let t in r={...r,...i}){var n;let i=iV(n=r[t])?n[n.length-1]||0:n;e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,tx(i))}}(e,a)});h.length?Promise.all(h).then(t):t()}return h}function sI(e,t,i,s=0,r=1){let n=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,o=(a-1)*s;return"function"==typeof i?i(n,a):1===r?n*s:o-n*s}function sO(e,t,i={}){let s=iL(e,t,"exit"===i.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(r=i.transitionOverride);let n=s?()=>Promise.all(sF(e,s,i)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(s=0)=>{let{delayChildren:n=0,staggerChildren:a,staggerDirection:o}=r;return function(e,t,i=0,s=0,r=0,n=1,a){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(sO(l,t,{...a,delay:i+("function"==typeof s?0:s)+sI(e.variantChildren,l,s,r,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,s,n,a,o,i)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([n(),a(i.delay)]);{let[e,t]="beforeChildren"===o?[n,a]:[a,n];return e().then(()=>t())}}let s$=tj.length;function sW(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let s=0;s<i;s++)if(t[s]!==e[s])return!1;return!0}let sU=[...tw].reverse(),sz=tw.length;function sH(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sY(){return{animate:sH(!0),whileInView:sH(),whileHover:sH(),whileTap:sH(),whileDrag:sH(),whileFocus:sH(),exit:sH()}}let sX=0;function sq(e){return[e("x"),e("y")]}function sG(e,t,i,s={passive:!0}){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i)}let sK={x:!1,y:!1};function s_(e){return e.max-e.min}function sZ(e,t,i,s=.5){e.origin=s,e.originPoint=tK(t.min,t.max,e.origin),e.scale=s_(i)/s_(t),e.translate=tK(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function sJ(e,t,i,s){sZ(e.x,t.x,i.x,s?s.originX:void 0),sZ(e.y,t.y,i.y,s?s.originY:void 0)}function sQ(e,t,i,s=0){e.min=(s?tK(i.min,i.max,s):i.min)+t.min,e.max=e.min+s_(t)}function s0(e,t,i,s=0){let r=s?tK(i.min,i.max,s):i.min;e.min=t.min-r,e.max=e.min+s_(t)}function s1(e,t,i,s){s0(e.x,t.x,i.x,s?.x),s0(e.y,t.y,i.y,s?.y)}function s2(e){return c(e)&&"ownerSVGElement"in e}function s4(e,t,i){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let s=document;t&&(s=t.current);let r=i?.[e]??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}e.s(["resolveElements",0,s4],749652);let s5=new WeakMap,s3=(e,t,i)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:s2(s)&&"getBBox"in s?s.getBBox()[t]:s[i],s6=s3("inline","width","offsetWidth"),s8=s3("block","height","offsetHeight");function s7({target:e,borderBoxSize:t}){s5.get(e)?.forEach(i=>{i(e,{get width(){return s6(e,t)},get height(){return s8(e,t)}})})}function s9(e){e.forEach(s7)}let re=new Set;function rt(e,t){let r;return"function"==typeof e?(re.add(e),s||(s=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};re.forEach(t=>t(e))},window.addEventListener("resize",s)),()=>{re.delete(e),re.size||"function"!=typeof s||(window.removeEventListener("resize",s),s=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(s9)),(r=s4(e)).forEac
9h(e=>{let s=s5.get(e);s||(s=new Set,s5.set(e,s)),s.add(t),i?.observe(e)}),()=>{r.forEach(e=>{let s=s5.get(e);s?.delete(t),s?.size||i?.unobserve(e)})})}e.s(["resize",0,rt],661327);let ri=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rs=new Set(["INPUT","SELECT","TEXTAREA"]),rr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rn(e){return{point:{x:e.pageX,y:e.pageY}}}function ra(e,t,i,s){return sG(e,t,e=>rr(e)&&i(e,rn(e)),s)}let ro=({current:e})=>e?e.ownerDocument.defaultView:null,rl=(e,t)=>Math.abs(e-t),rd=new Set(["auto","scroll"]);class rc{constructor(e,t,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:n=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=rh(this.lastRawMoveEventInfo,this.transformPagePoint));let i=rm(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,r=(e=i.offset,t={x:0,y:0},Math.sqrt(rl(e.x,t.x)**2+rl(e.y,t.y)**2)>=this.distanceThreshold);if(!s&&!r)return;let{point:n}=i,{timestamp:a}=eI;this.history.push({...n,timestamp:a});let{onStart:o,onMove:l}=this.handlers;s||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=rh(t,this.transformPagePoint),eB.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:r}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=rm("pointercancel"===e.type?this.lastMoveEventInfo:rh(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,n),s&&s(e,n)},!rr(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=s||window;const o=rh(rn(e),this.transformPagePoint),{point:l}=o,{timestamp:d}=eI;this.history=[{...l,timestamp:d}];const{onSessionStart:c}=t;c&&c(e,rm(o,this.history)),this.removeListeners=iF(ra(this.contextWindow,"pointermove",this.handlePointerMove),ra(this.contextWindow,"pointerup",this.handlePointerUp),ra(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(rd.has(e.overflowX)||rd.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:s.x-t.x,y:s.y-t.y};(0!==r.x||0!==r.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,s),eB.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eF(this.updatePoint)}}function rh(e,t){return t?{point:t(e.point)}:e}function ru(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rm({point:e},t){return{point:e,delta:ru(e,rp(t)),offset:ru(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,i=null,s=rp(e);for(;t>=0&&(i=e[t],!(s.timestamp-i.timestamp>eZ(.1)));)t--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>2*eZ(.1)&&(i=e[1]);let r=(s.timestamp-i.timestamp)/1e3;if(0===r)return{x:0,y:0};let n={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return n.x===1/0&&(n.x=0),n.y===1/0&&(n.y=0),n}(t)}}function rp(e){return e[e.length-1]}function rf(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function rx(e,t){let i=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,s]=[s,i]),{min:i,max:s}}function rg(e,t,i){return{min:ry(e,t),max:ry(e,i)}}function ry(e,t){return"number"==typeof e?e:e[t]||0}
9let rv=new WeakMap;class rb{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ei(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:i}={}){let{presenceContext:s}=this.visualElement;if(s&&!1===s.isPresent)return;let r=e=>{t&&this.snapToCursor(rn(e).point),this.stopAnimation()},n=(e,t)=>{let{drag:i,dragPropagation:s,onDragStart:r}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(sK[e])return null;else return sK[e]=!0,()=>{sK[e]=!1};return sK.x||sK.y?null:(sK.x=sK.y=!0,()=>{sK.x=sK.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sq(e=>{let t=this.getAxisMotionValue(e).get()||0;if(P.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[e];s&&(t=s_(s)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&eB.update(()=>r(e,t),!1,!0),iB(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:r,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=t;if(s&&null===this.currentDirection){this.currentDirection=function(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(a),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),n&&eB.update(()=>n(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new rc(e,{onSessionStart:r,onStart:n,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:ro(this.visualElement),element:this.visualElement.current})}stop(e,t){let i=e||this.latestPointerEvent,s=t||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;let{velocity:n}=s;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&eB.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,i){let{drag:s}=this.getProps();if(!i||!rj(e,s,this.currentDirection))return;let r=this.getAxisMotionValue(e),n=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(n=function(e,{min:t,max:i},s){return void 0!==t&&e<t?e=s?tK(t,e,s.min):Math.max(e,t):void 0!==i&&e>i&&(e=s?tK(i,e,s.max):Math.min(e,i)),e}(n,this.constraints[e],this.elastic[e])),r.set(n)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&iE(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=function(e,{top:t,left:i,bottom:s,right:r}){return{x:rf(e.x,i,r),y:rf(e.y,t,s)}}(i.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:rg(e,"left","right"),y:rg(e,"top","bottom")}}(t),s!==this.constraints&&!iE(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&sq(e=>{var t,s;let r;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=i.layoutBox[e],s=this.constraints[e],r={},void 0!==s.min&&(r.min=s.min-t.min),void 0!==s.max&&(r.max=s.max-t.min),r))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!iE(t))return!1;let s=t.current;ec();let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let n=function(e,t,i){let s=is(e,i),{scroll:r}=t;return r&&(t9(s.x,r.offset.x),t9(s.y,r.offset.y)),s}(s,r.root,this.visualElement.getTransformPagePoint()),a=(e=r.layout.layoutBox,{x:rx(e.x,n.x),y:rx(e.y,n.y)});if(i){let e=i(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=t1(e))}return a}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(sq(a=>{if(!rj(a,t,this.currentDirection))return;let l=o&&o[a]||{};(!0===n||n===a)&&(l={min:0,max:0});let d={type:"inertia",velocity:i?e[a]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(a,d)})).then(a)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return iB(this.visualElement,e),i.start(sB(e,i,0,t,this.visualElement,!1))}stopAnimation(){sq(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){sq(t=>{let{drag:i}=this.getProps();if(!rj(t,i,this.currentDirection))return;let{projection:s}=this.visualElement,r=this.getAxisMotionValue(t);if(s&&s.layout){let{min:i,max:n}=s.layout.layoutBox[t],a=r.get()||0;r.set(e[t]-tK(i,n,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!iE(t)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};sq(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var i,r;let n,a,o,l=t.get();s[e]=(i={min:l,max:l},r=this.constraints[e],n=.5,a=s_(i),(o=s_(r))>a?n=sx(r.min,r.max-a,i.min):a>o&&(n=sx(i.min,i.max-o,r.min)),x(0,1,n))}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),sq(t=>{if(!rj(t,e,null))return;let i=this.getAxisMotionValue(t),{min:r,max:n}=this.constraints[t];i.set(tK(r,n,s[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;rv.set(this.visualElement,this);let t=this.visualElement.current,i=ra(t,"pointerdown",e=>{let{drag:i,dragListener:s=!0}
9=this.getProps(),r=e.target,n=r!==t&&(rs.has(r.tagName)||!0===r.isContentEditable);i&&s&&!n&&this.start(e)}),s=()=>{var i,s,r;let n,a,{dragConstraints:o}=this.getProps();iE(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),e||(i=t,s=o.current,n=rt(i,rw(r=()=>this.scalePositionWithinConstraints())),a=rt(s,rw(r)),e=()=>{n(),a()}))},{projection:r}=this.visualElement,n=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),eB.read(s);let a=sG(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(sq(t=>{let i=this.getAxisMotionValue(t);i&&(this.originPoint[t]+=e[t].translate,i.set(i.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),i(),n(),o&&o(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:n=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:n,dragMomentum:a}}}function rw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function rj(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}let rN=e=>(t,i)=>{e&&eB.update(()=>e(t,i),!1,!0)},rk={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var rT=n;let rS=!1;class rM extends rT.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=e;r&&(t.group&&t.group.add(r),i&&i.register&&s&&i.register(r),rS&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rk.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:s,isPresent:r}=this.props,{projection:n}=i;return n&&(n.isPresent=r,e.layoutDependency!==t&&n.setOptions({...n.options,layoutDependency:t}),rS=!0,s||e.layoutDependency!==t||void 0===t||e.isPresent!==r?n.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?n.promote():n.relegate()||eB.postRender(()=>{let e=n.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=t,i.root.didUpdate(),td.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:s}=e;rS=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rC(e){let[t,i]=m(),s=(0,rT.useContext)(a);return(0,il.jsx)(rM,{...e,layoutGroup:s,switchLayoutGroup:(0,rT.useContext)(iC),isPresent:t,safeToRemove:i})}let rE=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],rP=rE.length,rA=e=>"string"==typeof e?parseFloat(e):e,rL=e=>"number"==typeof e||A.test(e);function rD(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let rR=rB(0,.5,su),rV=rB(.5,.95,eL);function rB(e,t,i){return s=>s<e?0:s>t?1:i(sx(e,t,s))}function rF(e,t){e.min=t.min,e.max=t.max}function rI(e,t){rF(e.x,t.x),rF(e.y,t.y)}function rO(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function r$(e,t,i,s,r){return e-=t,e=s+1/i*(e-s),void 0!==r&&(e=s+1/r*(e-s)),e}function rW(e,t,[i,s,r],n,a){!function(e,t=0,i=1,s=.5,r,n=e,a=e){if(P.test(t)&&(t=parseFloat(t),t=tK(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let o=tK(n.min,n.max,s);e===n&&(o-=t),e.min=r$(e.min,t,i,o,r),e.max=r$(e.max,t,i,o,r)}(e,t[i],t[s],t[r],t.scale,n,a)}let rU=["x","scaleX","originX"],rz=["y","scaleY","originY"];function rH(e,t,i,s){rW(e.x,t,rU,i?i.x:void 0,s?s.x:void 0),rW(e.y,t,rz,i?i.y:void 0,s?s.y:void 0)}function rY(e){return 0===e.translate&&1===e.scale}function rX(e){return rY(e.x)&&rY(e.y)}function rq(e,t){return e.min===t.min&&e.max===t.max}function rG(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rK(e,t){return rG(e.x,t.x)&&rG(e.y,t.y)}function r_(e){return s_(e.x)/s_(e.y)}function rZ(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class rJ{constructor(){this.members=[]}add(e){eJ(this.members,e);for(let t=this.members.length-1;t>=0;t--){let i=this.members[t];if(i===e||i===this.lead||i===this.prevLead)continue;let s=i.instance;s&&!1!==s.isConnected||i.snapshot||(eQ(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(eQ(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();let{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(void 0===s||s!==r)&&(e.resumeFrom=i,t&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isU
9pdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let rQ=(e,t)=>e.depth-t.depth;class r0{constructor(){this.children=[],this.isDirty=!1}add(e){eJ(this.children,e),this.isDirty=!0}remove(e){eQ(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rQ),this.isDirty=!1,this.children.forEach(e)}}let r1=["","X","Y","Z"],r2=0;function r4(e,t,i,s){let{latestValues:r}=t;r[e]&&(i[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function r5({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(e={},i=t?.()){this.id=r2++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(r8),this.nodes.forEach(na),this.nodes.forEach(no),this.nodes.forEach(r7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new r0)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new e0),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let i=this.eventHandlers.get(e);i&&i.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=s2(t)&&!(s2(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:i,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),e){let i,s=0,r=()=>this.root.updateBlockedByResize=!1;eB.read(()=>{s=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==s){let t,n;s=e,this.root.updateBlockedByResize=!0,i&&i(),t=tu.now(),n=({timestamp:e})=>{let i=e-t;i>=250&&(eF(n),r())},eB.setup(n,!0),i=()=>eF(n),rk.hasAnimatedSinceResize&&(rk.hasAnimatedSinceResize=!1,this.nodes.forEach(nn))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||s)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||r.getDefaultTransition()||nm,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=r.getProps(),l=!this.targetLayout||!rK(this.targetLayout,s),d=!t&&i;if(this.options.layoutRoot||this.resumeFrom||d||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...iR(n,"layout"),onPlay:a,onComplete:o};(r.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,d,t.path)}else t||nn(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eF(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEac
9h(nl),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let s=i.props[iM];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",eB,!(e||i))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&e(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(nt),this.nodes.forEach(ne);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ni);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ns),this.nodes.forEach(nr),this.nodes.forEach(r3),this.nodes.forEach(r6)):this.nodes.forEach(ni),this.clearAllSnapshots();let e=tu.now();eI.delta=x(0,1e3/60,e-eI.timestamp),eI.timestamp=e,eI.isProcessing=!0,eO.update.process(eI),eO.preRender.process(eI),eO.render.process(eI),eI.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,td.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r9),this.sharedNodes.forEach(nd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eB.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eB.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||s_(this.snapshot.measuredBox.x)||s_(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ei()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=s(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!rX(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,n=s!==this.prevTransformTemplateValue;e&&this.instance&&(t||t5(this.latestValues)||n)&&(r(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let i=this.measurePageBox(),s=this.removeElementScroll(i);return e&&(s=this.removeTransform(s)),nx((t=s).x),nx(t.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ei();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ny))){let{scroll:e}=this.root;e&&(t9(t.x,e.offset.x),t9(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ei();if(rI(t,e),this.scroll?.wasRoot)return t;for(let i=0;i<this.path.length;i++){let s=this.path[i],{scroll:r,options:n}=s;s!==this.root&&r&&n.layoutScroll&&(r.wasRoot&&rI(t,e),t9(t.x,r.offset.x),t9(t.y,r.offset.y))}return t}applyTransform(e,t=!1,i){let s=i||ei();rI(s,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(t9(s.x,-i.scroll.offset.x),t9(s.y,-i.scroll.offset.y)),t5(i.latestValues)&&ii(s,i.latestValues,i.layout?.layoutBox)}return t5(this.latestValues)&&ii(s,this.latestValues,this.layout?.layoutBox),s}removeTransform(e){let t=ei();rI(t,e);for(let e=0;e<this.path.length;e++){let i,s=this.path[e];t5(s.latestValues)&&(s.instance&&(t4(s.latestValues)&&s.updateSnapshot(),rI(i=ei(),s.measurePageBox())),rH(t,s.latestValues,s.snapshot?.layoutBox,i))}return t5(this.latestValues)&&rH(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eI.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
9isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==t;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:s,layoutId:r}=this.options;if(!this.layout||!(s||r))return;this.resolvedRelativeTargetAt=eI.timestamp;let n=this.getClosestProjectingParent();if(n&&this.linkedParentVersion!==n.layoutVersion&&!n.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&n&&n.layout?this.createRelativeTarget(n,this.layout.layoutBox,n.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=ei(),this.targetWithTransforms=ei()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,l,d;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,l=this.relativeParent.target,d=this.options.layoutAnchor||void 0,sQ(a.x,o.x,l.x,d?.x),sQ(a.y,o.y,l.y,d?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):rI(this.target,this.layout.layoutBox),t7(this.target,this.targetDelta)):rI(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&n&&!!n.resumingFrom==!!this.resumingFrom&&!n.options.layoutScroll&&n.target&&1!==this.animationProgress?this.createRelativeTarget(n,this.target,n.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||t4(this.parent.latestValues)||t3(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,i){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ei(),this.relativeTargetOrigin=ei(),s1(this.relativeTargetOrigin,t,i,this.options.layoutAnchor||void 0),rI(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===eI.timestamp&&(i=!1),i)return;let{layout:s,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||r))return;rI(this.layoutCorrected,this.layout.layoutBox);let n=this.treeScale.x,a=this.treeScale.y;!function(e,t,i,s=!1){let r,n,a=i.length;if(a){t.x=t.y=1;for(let o=0;o<a;o++){n=(r=i[o]).projectionDelta;let{visualElement:a}=r.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(t9(e.x,-r.scroll.offset.x),t9(e.y,-r.scroll.offset.y)),n&&(t.x*=n.x.scale,t.y*=n.y.scale,t7(e,n)),s&&t5(r.latestValues)&&ii(e,r.latestValues,r.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=ei());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rO(this.prevProjectionDelta.x,this.projectionDelta.x),rO(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),sJ(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===n&&this.treeScale.y===a&&rZ(this.projectionDelta.x,this.prevProjectionDelta.x)&&rZ(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}
9createProjectionDeltas(){this.prevProjectionDelta=ee(),this.projectionDelta=ee(),this.projectionDeltaWithTransform=ee()}setAnimationOrigin(e,t=!1,i){let s,r=this.snapshot,n=r?r.latestValues:{},a={...this.latestValues},o=ee();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=ei(),d=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),h=!c||c.members.length<=1,u=!!(d&&!h&&!0===this.options.crossfade&&!this.path.some(nu));this.animationProgress=0;let m=i?.interpolateProjection(e);this.mixTargetDelta=t=>{let i=t/1e3,r=m?.(i);if(r?(o.x.translate=r.x,o.x.scale=tK(e.x.scale,1,i),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=tK(e.y.scale,1,i),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(nc(o.x,e.x,i),nc(o.y,e.y,i)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,p,f,x,g,y;s1(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,x=this.relativeTargetOrigin,g=l,y=i,nh(f.x,x.x,g.x,y),nh(f.y,x.y,g.y,y),s&&(c=this.relativeTarget,p=s,rq(c.x,p.x)&&rq(c.y,p.y))&&(this.isProjectionDirty=!1),s||(s=ei()),rI(s,this.relativeTarget)}d&&(this.animationValues=a,function(e,t,i,s,r,n){r?(e.opacity=tK(0,i.opacity??1,rR(s)),e.opacityExit=tK(t.opacity??1,0,rV(s))):n&&(e.opacity=tK(t.opacity??1,i.opacity??1,s));for(let r=0;r<rP;r++){let n=rE[r],a=rD(t,n),o=rD(i,n);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||rL(a)===rL(o)?(e[n]=Math.max(tK(rA(a),rA(o),s),0),(P.test(o)||P.test(a))&&(e[n]+="%")):e[n]=o)}(t.rotate||i.rotate)&&(e.rotate=tK(t.rotate||0,i.rotate||0,s))}(a,n,this.latestValues,i,u,h)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eF(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eB.update(()=>{var t,i,s;let r;rk.hasAnimatedSinceResize=!0,te.layout++,this.motionValue||(this.motionValue=tx(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,i=[0,1e3],s={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{te.layout--},onComplete:()=>{te.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(r=es(t)?t:tx(t)).start(sB("",r,i,s)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:s,latestValues:r}=e;if(t&&i&&s){if(this!==e&&this.layout&&s&&ng(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||ei();let t=s_(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let s=s_(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+s}rI(t,i),ii(t,r),sJ(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rJ),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;
9return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let s={};i.z&&r4("z",e,s,this.animationValues);for(let t=0;t<r1.length;t++)r4(`rotate${r1[t]}`,e,s,this.animationValues),r4(`skew${r1[t]}`,e,s,this.animationValues);for(let t in e.render(),s)e.setStaticValue(t,s[t]),this.animationValues&&(this.animationValues[t]=s[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=iv(t?.pointerEvents)||"",e.transform=i?i(this.latestValues,""):"none";return}let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=iv(t?.pointerEvents)||""),this.hasProjected&&!t5(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1);return}e.visibility="";let r=s.animationValues||s.latestValues;this.applyTransformsToTarget();let n=function(e,t,i){let s="",r=e.x.translate/t.x,n=e.y.translate/t.y,a=i?.z||0;if((r||n||a)&&(s=`translate3d(${r}px, ${n}px, ${a}px) `),(1!==t.x||1!==t.y)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){let{transformPerspective:e,rotate:t,pathRotation:r,rotateX:n,rotateY:a,skewX:o,skewY:l}=i;e&&(s=`perspective(${e}px) ${s}`),t&&(s+=`rotate(${t}deg) `),r&&(s+=`rotate(${r}deg) `),n&&(s+=`rotateX(${n}deg) `),a&&(s+=`rotateY(${a}deg) `),o&&(s+=`skewX(${o}deg) `),l&&(s+=`skewY(${l}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(s+=`scale(${o}, ${l})`),s||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);i&&(n=i(r,n)),e.transform=n;let{x:a,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,s.animationValues?e.opacity=s===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:e.opacity=s===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,t_){if(void 0===r[t])continue;let{correct:i,applyTo:a,isCSSVariable:o}=t_[t],l="none"===n?r[t]:i(r[t],s);if(a){let t=a.length;for(let i=0;i<t;i++)e[a[i]]=l}else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=s===this?iv(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ne),this.root.sharedNodes.clear()}}}function r3(e){e.updateLayout()}function r6(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=e.layout,{animationType:r}=e.options,n=t.source!==e.layout.source;if("size"===r)sq(e=>{let s=n?t.measuredBox[e]:t.layoutBox[e],r=s_(s);s.min=i[e].min,s.max=s.min+r});else if("x"===r||"y"===r){let e="x"===r?"y":"x";rF(n?t.measuredBox[e]:t.layoutBox[e],i[e])}else ng(r,t.layoutBox,i)&&sq(s=>{let r=n?t.measuredBox[s]:t.layoutBox[s],a=s_(i[s]);r.max=r.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[s].max=e.relativeTarget[s].min+a)});let a=ee();sJ(a,i,t.layoutBox);let o=ee();n?sJ(o,e.applyTransform(s,!0),t.measuredBox):sJ(o,i,t.layoutBox);let l=!rX(a),d=!1;if(!e.resumeFrom){let s=e.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:r,layout:n}=s;if(r&&n){let a=e.options.layoutAnchor||void 0,o=ei();s1(o,t.layoutBox,r.layoutBox,a);let l=ei();s1(l,i,n.layoutBox,a),rK(o,l)||(d=!0),s.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=o,e.relativeParent=s)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:d})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function r8(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function r7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r9(e){e.clearSnapshot()}function ne(e){e.clearMeasurements()}function nt(e){e.isLayoutDirty=!0,e.updateLayout()}function ni(e){e.isLayoutDirty=!1}function ns(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function nr(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nn(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function na(e){e.resolveTargetDelta()}function no(e){e.calcProjection()}
9function nl(e){e.resetSkewAndRotation()}function nd(e){e.removeLeadSnapshot()}function nc(e,t,i){e.translate=tK(t.translate,0,i),e.scale=tK(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function nh(e,t,i,s){e.min=tK(t.min,i.min,s),e.max=tK(t.max,i.max,s)}function nu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nm={duration:.45,ease:[.4,0,.1,1]},np=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nf=np("applewebkit/")&&!np("chrome/")?Math.round:eL;function nx(e){e.min=nf(e.min),e.max=nf(e.max)}function ng(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(r_(t)-r_(i)))}function ny(e){return e!==e.root&&e.scroll?.wasRoot}let nv=r5({attachResizeListener:(e,t)=>sG(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),nb={current:void 0},nw=r5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nb.current){let e=new nv({});e.mount(window),e.setOptions({layoutScroll:!0}),nb.current=e}return nb.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function nj(e,t){let i=s4(e),s=new AbortController;return[i,{passive:!0,...t,signal:s.signal},()=>s.abort()]}function nN(e,t,i){let{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover","Start"===i);let r=s["onHover"+i];r&&eB.postRender(()=>r(t,rn(t)))}let nk=(e,t)=>!!t&&(e===t||nk(e,t.parentElement)),nT=new WeakSet;function nS(e){return t=>{"Enter"===t.key&&e(t)}}function nM(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function nC(e){return rr(e)&&!(sK.x||sK.y)}let nE=new WeakSet;function nP(e,t,i){let{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap","Start"===i);let r=s["onTap"+("End"===i?"":i)];r&&eB.postRender(()=>r(t,rn(t)))}let nA=new WeakMap,nL=new WeakMap,nD=e=>{let t=nA.get(e.target);t&&t(e)},nR=e=>{e.forEach(nD)},nV={some:0,all:1},nB=function(e,t){if("u"<typeof Proxy)return iP;let i=new Map,s=(i,s)=>iP(i,s,e,t);return new Proxy((e,t)=>s(e,t),{get:(r,n)=>"create"===n?s:(i.has(n)||i.set(n,iP(n,void 0,e,t)),i.get(n))})}({animation:{Feature:class extends iA{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:i})=>(function(e,t,i={}){let s;if(e.notify("AnimationStart",t),Array.isArray(t))s=Promise.all(t.map(t=>sO(e,t,i)));else if("string"==typeof t)s=sO(e,t,i);else{let r="function"==typeof t?iL(e,t,i.custom):t;s=Promise.all(sF(e,r,i))}return s.then(()=>{e.notify("AnimationComplete",t)})})(e,t,i))),i=sY(),s=!0,r=!1,n=t=>(i,s)=>{let r=iL(e,s,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...s}=r;i={...i,...s,...t}}return i};function a(a){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let i=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(i.initial=t.props.initial),i}let i={};for(let e=0;e<s$;e++){let s=tj[e],r=t.props[s];(tb(r)||!1===r)&&(i[s]=r)}return i}(e.parent)||{},d=[],c=new Set,h={},u=1/0;for(let t=0;t<sz;t++){var m,p;let f=sU[t],x=i[f],g=void 0!==o[f]?o[f]:l[f],y=tb(g),v=f===a?x.isActive:null;!1===v&&(u=t);let b=g===l[f]&&g!==o[f]&&y;if(b&&(s||r)&&e.manuallyAnimateOnMount&&(b=!1),x.protectedKeys={...h},!x.isActive&&null===v||!g&&!x.prevProp||tv(g)||"boolean"==typeof g)continue;if("exit"===f&&x.isActive&&!0!==v){x.prevResolvedValues&&(h={...h,...x.prevResolvedValues});continue}let w=(m=x.prevProp,"string"==typeof(p=g)?p!==m:!!Array.isArray(p)&&!sW(p,m)),j=w||f===a&&x.isActive&&!b&&y||t>u&&y,N=!1,k=Array.isArray(g)?g:[g],T=k.reduce(n(f),{});!1===v&&(T={});let{prevResolvedValues:S={}}=x,M={...S,...T},C=t=>{j=!0,c.has(t)&&(N=!0,c.delete(t)),x.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in M){let t=T[e],i=S[e];if(!h.hasOwnProperty(e))(iV(t)&&iV(i)?!sW(t,i)||w:t!==i)?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):x.protectedKeys[e]=!0}x.prevProp=g,x.prevResolvedValues=T,x.isActive&&(h={...h,...T}),(s||r)&&e.blockInitialAnimation&&(j=!1);let E=b&&w,P=!E||N;j&&P&&d.push(...k.map(t=>{let i={type:f};if("string"==typeof t&&(s||r)&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:s}=e,r=iL(s,t);if(s.enteringChildren&&r){let{delayChildren:t}=r.transition||{};i.delay=sI(s.enteringChildren,e,t)}}return{animation:t,options:i}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let i=iL(e,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(t.transition=i.transition)}c.forEach(i=>
9{let s=e.getBaseTarget(i),r=e.getValue(i);r&&(r.liveStyle=!0),t[i]=s??null}),d.push({animation:t})}let f=!!d.length;return s&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),s=!1,r=!1,f?t(d):Promise.resolve()}return{animateChanges:a,setActive:function(t,s){if(i[t].isActive===s)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,s)),i[t].isActive=s;let r=a(t);for(let e in i)i[e].protectedKeys={};return r},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=sY(),r=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tv(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iA{constructor(){super(...arguments),this.id=sX++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&!1===i){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let i=iL(this.node,e,t);if(i){let{transition:e,transitionEnd:t,...s}=i;for(let e in s)this.node.getValue(e)?.jump(s[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends iA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:s,margin:r,amount:n="some",once:a}=i,o={root:s?s.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:nV[n]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),r=t?i:s;r&&r(e)};this.stopObserver=(e=this.node.current,t=function({root:e,...t}){let i=e||document;nL.has(i)||nL.set(i,{});let s=nL.get(i),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(nR,{root:e,...t})),s[r]}(o),nA.set(e,l),t.observe(e),()=>{nA.delete(e),t.unobserve(e)})}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends iA{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=function(e,t,i={}){let[s,r,n]=nj(e,i),a=e=>{let s=e.currentTarget;if(!nC(e)||nE.has(e))return;nT.add(s),i.stopPropagation&&nE.add(e);let n=t(s,e),a=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),nT.has(s)&&nT.delete(s),nC(e)&&"function"==typeof n&&n(e,{success:t})},o=e=>{a(e,s===window||s===document||i.useGlobalTarget||nk(s,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};return s.forEach(e=>{((i.useGlobalTarget?window:e).addEventListener("pointerdown",a,r),h(e))&&(e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let s=nS(()=>{if(nT.has(i))return;nM(i,"down");let e=nS(()=>{nM(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>nM(i,"cancel"),t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)}
9)(e,r)),ri.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),n}(e,(e,t)=>(nP(this.node,t,"Start"),(e,{success:t})=>nP(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=iF(sG(this.node.current,"focus",()=>this.onFocus()),sG(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iA{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[s,r,n]=nj(e,i);return s.forEach(e=>{let i,s=!1,n=!1,a=t=>{i&&(i(t),i=void 0),e.removeEventListener("pointerleave",l)},o=e=>{s=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),n&&(n=!1,a(e))},l=e=>{if("touch"!==e.pointerType){if(s){n=!0;return}a(e)}};e.addEventListener("pointerenter",s=>{if("touch"===s.pointerType||sK.x||sK.y)return;n=!1;let a=t(e,s);"function"==typeof a&&(i=a,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{s=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),n}(e,(e,t)=>(nN(this.node,t,"Start"),e=>nN(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends iA{constructor(){super(...arguments),this.removePointerDownListener=eL}onPointerDown(e){this.session=new rc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ro(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:rN(e),onStart:rN(t),onMove:rN(i),onEnd:(e,t)=>{delete this.session,s&&eB.postRender(()=>s(e,t))}}}mount(){this.removePointerDownListener=ra(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends iA{constructor(e){super(e),this.removeGroupControls=eL,this.removeListeners=eL,this.controls=new rb(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eL}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:nw,MeasureLayout:rC},layout:{ProjectionNode:nw,MeasureLayout:rC}},(e,t)=>t.isSVG??io(e)?new t0(t):new ir(t,{allowProjection:e!==n.Fragment}));e.s(["motion",0,nB],846932)},387652,772328,e=>{"use strict";var t=e.i(271645),i=e.i(749652);let s={some:0,all:1};e.s(["useInView",0,function(e,{root:r,margin:n,amount:a,once:o=!1,initial:l=!1}={}){let[d,c]=(0,t.useState)(l);return(0,t.useEffect)(()=>{if(!e.current||o&&d)return;let t={root:r&&r.current||void 0,margin:n,amount:a};return function(e,t,{root:r,margin:n,amount:a="some"}={}){let o=(0,i.resolveElements)(e),l=new WeakMap,d=new IntersectionObserver(e=>{e.forEach(e=>{let i=l.get(e.target);if(!!i!==e.isIntersecting)if(e.isIntersecting){let i=t(e.target,e);
9"function"==typeof i?l.set(e.target,i):d.unobserve(e.target)}else"function"==typeof i&&(i(e),l.delete(e.target))})},{root:r,rootMargin:n,threshold:"number"==typeof a?a:s[a]});return o.forEach(e=>d.observe(e)),()=>d.disconnect()}(e.current,()=>(c(!0),o?void 0:()=>c(!1)),t)},[r,e,n,o,a]),d}],387652);var r=e.i(571164),n=e.i(138544);e.s(["useReducedMotion",0,function(){r.hasReducedMotionListener.current||(0,n.initPrefersReducedMotion)();let[e]=(0,t.useState)(r.prefersReducedMotion.current);return e}],772328)},310542,887652,895420,e=>{"use strict";var t=e.i(560140),i=e.i(930551),s=e.i(486427),r=e.i(965566),n=e.i(271645),a=e.i(260830),o=e.i(287022);function l(e,t){let i,s=()=>{let{currentTime:s}=t,r=(null===s?0:s.value)/100;i!==r&&e(r),i=r};return o.frame.preUpdate(s,!0),()=>(0,o.cancelFrame)(s)}function d(e){return!("u"<typeof window)&&(e?(0,i.supportsViewTimeline)():(0,i.supportsScrollTimeline)())}var c=e.i(661327),h=e.i(783920),u=e.i(325791);let m=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),p={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function f(e,t,i,s){let r=i[t],{length:n,position:a}=p[t],o=r.current,l=i.time;r.current=Math.abs(e[`scroll${a}`]),r.scrollLength=e[`scroll${n}`]-e[`client${n}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=(0,h.progress)(0,r.scrollLength,r.current);let d=s-l;r.velocity=d>50?0:(0,u.velocityPerSecond)(r.current-o,d)}var x=e.i(344230),g=e.i(515923),y=e.i(476959),v=e.i(772846);let b={start:0,center:.5,end:1};function w(e,t,i=0){let s=0;if(e in b&&(e=b[e]),"string"==typeof e){let t=parseFloat(e);e.endsWith("px")?s=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?s=t/100*document.documentElement.clientWidth:e.endsWith("vh")?s=t/100*document.documentElement.clientHeight:e=t}return"number"==typeof e&&(s=t*e),i+s}let j=[0,0],N=[[0,0],[1,1]],k={x:0,y:0},T=new WeakMap,S=new WeakMap,M=new WeakMap,C=new WeakMap,E=new WeakMap,P=e=>e===document.scrollingElement?window:e;function A(e,{container:t=document.scrollingElement,trackContentSize:i=!1,...s}={}){if(!t)return a.noop;let r=M.get(t);r||(r=new Set,M.set(t,r));let n=function(e,t,i,s={}){return{measure:t=>{!function(e,t=e,i){if(i.x.targetOffset=0,i.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)i.x.targetOffset+=s.offsetLeft,i.y.targetOffset+=s.offsetTop,s=s.offsetParent}i.x.targetLength=t===e?t.scrollWidth:t.clientWidth,i.y.targetLength=t===e?t.scrollHeight:t.clientHeight,i.x.containerLength=e.clientWidth,i.y.containerLength=e.clientHeight}(e,s.target,i),f(e,"x",i,t),f(e,"y",i,t),i.time=t,(s.offset||s.target)&&function(e,t,i){let{offset:s=N}=i,{target:r=e,axis:n="y"}=i,a="y"===n?"height":"width",o=r!==e?function(e,t){let i={x:0,y:0},s=e;for(;s&&s!==t;)if((0,v.isHTMLElement)(s))i.x+=s.offsetLeft,i.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){let e=s.getBoundingClientRect(),t=(s=s.parentElement).getBoundingClientRect();i.x+=e.left-t.left,i.y+=e.top-t.top}else if(s instanceof SVGGraphicsElement){let{x:e,y:t}=s.getBBox();i.x+=e,i.y+=t;let r=null,n=s.parentNode;for(;!r;)"svg"===n.tagName&&(r=n),n=s.parentNode;s=r}else break;return i}(r,e):k,l=r===e?{width:e.scrollWidth,height:e.scrollHeight}:"getBBox"in r&&"svg"!==r.tagName?r.getBBox():{width:r.clientWidth,height:r.clientHeight},d={width:e.clientWidth,height:e.clientHeight};t[n].offset.length=0;let c=!t[n].interpolate,h=s.length;for(let e=0;e<h;e++){let i=function(e,t,i,s){let r=Array.isArray(e)?e:j,n=0;return"number"==typeof e?r=[e,e]:"string"==typeof e&&(r=(e=e.trim()).includes(" ")?e.split(" "):[e,b[e]?e:"0"]),(n=w(r[0],i,s))-w(r[1],t)}(s[e],d[a],l[a],o[n]);c||i===t[n].interpolatorOffsets[e]||(c=!0),t[n].offset[e]=i}c&&(t[n].interpolate=(0,x.interpolate)(t[n].offset,(0,g.defaultOffset)(s),{clamp:!1}),t[n].interpolatorOffsets=[...t[n].offset]),t[n].progress=(0,y.clamp)(0,1,t[n].interpolate(t[n].current))}(e,i,s)},notify:()=>t(i)}}(t,e,{time:0,x:m(),y:m()},s);if(r.add(n),!T.has(t)){let e=()=>{for(let e of r)e.measure(o.frameData.timestamp);o.frame.preUpdate(i)},i=()=>{for(let e of r)e.notify()},s=()=>o.frame.read(e);T.set(t,s);let n=P(t);window.addEventListener("resize",s),t!==document.documentElement&&S.set(t,(0,c.resize)(t,s)),n.addEventListener("scroll",s),s()}if(i&&!E.has(t)){let e=T.get(t),i={width:t.scrollWidth,height:t.scrollHeight};C.set(t,i);let s=o.frame.read(()=>{let s=t.scrollWidth,r=t.scrollHeight;(i.width!==s||i.height!==r)&&(e(),i.width=s,i.height=r)},!0);E.set(t,s)}let l=T.get(t);return o.frame.read(l,!1,!0),()=>{(0,o.cancelFrame)(l);let e=M.get(t);if(!e||(e.delete(n),e.size))return;let i=T.get(t);T.delete(t),i&&(P(t).removeEventListener("scroll",i),S.get(t)?.(),window.removeEventListener("resize",i));let s=E.get(t);s&&((0,o.cancelFrame)(s),E.delete(t)),C.delete(t)}}let L=[[[[0,1],[1,1]],"entry"],[[[0,0],[1,0]],"exit"],[[[1,0],[0,1]],"cover"],[N,"contain"]],D={start:0,end:1};function R(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(let[t,i]of L)if(function(e,t){let i=function(e){if(2!==e.length)return;let t=[];for(let i of e)if(Array.isArray(i))t.push(i);else{if("string"!=typeof i)return;let e=function(e){let t=e.trim().split(/\s+/);if(2!==t.length)return;let i=D[t[0]],s=D[t[1]];if(void 0!==i&&void 0!==s)return[i,s]}(i);if(!e)return;t.push(e)}return t}(e);if(!i)return!1;for(let e=0;e<2;e++){let s=i[e],r=t[e];if(s[0]!==r[0]||s[1]!==r[1])return!1}return!0}(e,t))return{rangeStart:`${i} 0%`,rangeEnd:`${i} 100%`}}let V=new Map;function B(e){let t={value:0},i=A(i=>{t.value=100*i[e.axis].progress},e);return{currentTime:t,cancel:i}}function F({source:e,container:t,...i}){let{axis:s}=i;e&&(t=e);let r=V.get(t);r||(r=new Map,V.set(t,r));let n=i.target??"self",a=r.get(n);a||(a={},r.set(n,a));let o=s+(i.offset??[]).join(",");return a[o]||(i.target&&d(i.target)?R(i.offset)?a[o]=new ViewTimeline({subject:i.target,axis:s}):a[o]=B({container:t,...i}):d()?a[o]=new ScrollTimeline({source:t,axis:s}):a[o]=B({container:t,...i})),a[o]}function I(e,{axis:t="y",container:i=document.scrollingElement,...s}={}){let r,n,o;if(!i)return a.noop;let c={axis:t,container:i,...s};return"function"==typeof e?function(e,t){return 2===e.length||t&&(t.target||t.offset)?A(i=>{e(i[t.axis].progress,i)},t):l(e,F(t))}(e,c):(r=F(c),n=c.target?R(c.offset):void 0,o=c.target?d(c.target)&&!!n:d(),e.attachTimeline({timeline:o?r:void 0,...n&&o&&{rangeStart:n.rangeStart,rangeEnd:n.rangeEnd},observe:e=>(e.pause(),l(t=>{e.time=e.iterationDuration*t},r))}))}var O=e.i(947414),$=e.i(674008);let W=()=>({scrollX:(0,s.motionValue)(0),scrollY:(0,s.motionValue)(0),scrollXProgress:(0,s.motionValue)(0),scrollYProgress:(0,s.motionValue)(0)}),U=e=>!!e&&!e.current;function z(e,i,s,r){return{factory:n=>{let a,o=()=>{U(s)||U(r)?t.microtask.read(o):a=I(n,{...i,axis:e,container:s?.current||void 0,target:r?.current||void 0})};return t.microtask.read(o),()=>{(0,t.cancelMicrotask)(o),a?.()}},times:[0,1],keyframes:[0,1],ease:e=>e,duration:1}}e.s(["useScroll",0,function({container:e,target:s,...a}={}){var o;let l=(0,O.useConstant)(W);o=a.offset,!("u"<typeof window)&&(s?(0,i.supportsViewTimeline)()&&!!R(o):(0,i.supportsScrollTimeline)())&&(l.scrollXProgress.accelerate=z("x",a,e,s),l.scrollYProgress.accelerate=z("y",a,e,s));let d=(0,n.useRef)(null),c=(0,n.useRef)(!1),h=(0,n.useCallback)(()=>(d.current=I((e,{x:t,y:i})=>{l.scrollX.set(t.current),l.scrollXProgress.set(t.progress),l.scrollY.set(i.current),l.scrollYProgress.set(i.progress)},{...a,container:e?.current||void 0,target:s?.current||void 0}),()=>{d.current?.()}),[e,s,JSON.stringify(a.offset)]);return(0,$.useIsomorphicLayoutEffect)(()=>
9{if(c.current=!1,!(U(e)||U(s)))return h();c.current=!0},[h]),(0,n.useEffect)(()=>{let i;if(!c.current)return;let n=()=>{let t=U(e),n=U(s);(0,r.invariant)(!t,"Container ref is defined but not hydrated","use-scroll-ref"),(0,r.invariant)(!n,"Target ref is defined but not hydrated","use-scroll-ref"),t||n||(i=h())};return t.microtask.read(n),()=>{(0,t.cancelMicrotask)(n),i?.()}},[h]),l}],310542);var H=e.i(737806);function Y(e){let t=(0,O.useConstant)(()=>(0,s.motionValue)(e)),{isStatic:i}=(0,n.useContext)(H.MotionConfigContext);if(i){let[,i]=(0,n.useState)(e);(0,n.useEffect)(()=>t.on("change",i),[])}return t}function X(e,t){let i=Y(t()),s=()=>i.set(t());return s(),(0,$.useIsomorphicLayoutEffect)(()=>{let t=()=>o.frame.preRender(s,!1,!0),i=e.map(e=>e.on("change",t));return()=>{i.forEach(e=>e()),(0,o.cancelFrame)(s)}}),i}e.s(["useMotionValue",0,Y],887652);function q(e,t){let i=(0,O.useConstant)(()=>[]);return X(e,()=>{i.length=0;let s=e.length;for(let t=0;t<s;t++)i[t]=e[t].get();return t(i)})}e.s(["useTransform",0,function e(t,i,r,n){if("function"==typeof t){let e;return s.collectMotionValues.current=[],t(),e=X(s.collectMotionValues.current,t),s.collectMotionValues.current=void 0,e}if(void 0!==r&&!Array.isArray(r)&&"function"!=typeof i){var a=t,o=i,l=r,d=n;let s=(0,O.useConstant)(()=>Object.keys(l)),c=(0,O.useConstant)(()=>({}));for(let t of s)c[t]=e(a,o,l[t],d);return c}let c="function"==typeof i?i:function(...e){let t=!Array.isArray(e[0]),i=t?0:-1,s=e[0+i],r=e[1+i],n=e[2+i],a=e[3+i],o=(0,x.interpolate)(r,n,a);return t?o(s):o}(i,r,n),h=Array.isArray(t)?q(t,c):q([t],([e])=>c(e)),u=Array.isArray(t)?void 0:t.accelerate;return u&&!u.isTransformed&&"function"!=typeof i&&Array.isArray(r)&&n?.clamp!==!1&&(h.accelerate={...u,times:i,keyframes:r,isTransformed:!0,...n?.ease?{ease:n.ease}:{}}),h}],895420)},845917,e=>{"use strict";var t=e.i(843476),i=e.i(437902),s=e.i(271645),r=e.i(3531);e.s(["default",0,function({heading:e="Historical Milestones",eyebrow:n="OUR LEGACY",background:a="bg-cream",embedded:o=!1}){let l=(0,s.useRef)(null),[d,c]=(0,s.useState)([]),[h,u]=(0,s.useState)(!0),[m,p]=(0,s.useState)(!1),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{!async function(){try{let e=await fetch("/api/history-milestones");e.ok&&c(await e.json())}catch{}finally{u(!1)}}()},[]),(0,s.useEffect)(()=>{if(!m&&!h&&0!==d.length)return f.current=setInterval(()=>{let e=l.current;if(!e)return;let t=e.scrollWidth-e.clientWidth;e.scrollLeft>=t-1?e.scrollTo({left:0,behavior:"smooth"}):e.scrollBy({left:1,behavior:"auto"})},20),()=>{f.current&&clearInterval(f.current)}},[m,h,d]);let x=e=>{l.current&&l.current.scrollBy({left:"left"===e?-400:400,behavior:"smooth"})},g=(0,t.jsxs)(t.Fragment,{children:[null===e&&null===n?null:(0,t.jsxs)("div",{className:"text-center mb-8 md:mb-12",children:[n&&(0,t.jsx)("p",{className:"text-primary text-xs md:text-sm font-bold uppercase tracking-wider mb-2",children:n}),e&&(0,t.jsx)("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-primary",children:e})]}),h?(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"overflow-x-auto scrollbar-hide px-4 md:px-16",children:(0,t.jsxs)("div",{className:"relative min-w-max",children:[(0,t.jsx)("div",{className:"absolute top-2.5 md:top-3 left-0 right-0 h-0.5 md:h-1 bg-secondary/30"}),(0,t.jsx)("div",{className:"flex gap-4 md:gap-8 pb-6 md:pb-8 relative",children:[0,1,2,3].map(e=>(0,t.jsxs)("div",{className:"relative flex flex-col items-center w-64 md:w-72 lg:w-80 shrink-0 skeleton-slide-up",style:{animationDelay:`${.1*e}s`},children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-full mb-4 md:mb-6 relative z-10",children:(0,t.jsx)("div",{className:"w-5 h-5 md:w-6 md:h-6 rounded-full bg-primary/30 border-2 md:border-4 border-cream shadow-lg skeleton-pulse"})}),(0,t.jsx)("div",{className:"mb-3 md:mb-4",children:(0,t.jsx)("div",{className:"h-10 w-24 bg-primary/20 rounded-full skeleton-shimmer"})}),(0,t.jsxs)("div",{className:"bg-white rounded-xl md:rounded-2xl p-4 md:p-6 shadow-lg border border-gray-100 w-full",children:[(0,t.jsx)("div",{className:"h-5 bg-gray-200 rounded w-4/5 mx-auto mb-3 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-full skeleton-shimmer"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-5/6 mx-auto
9skeleton-shimmer"})]})]})]},e))})]})})}):0===d.length?(0,t.jsx)("p",{className:"text-center text-gray-500 py-12",children:"No milestones yet."}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{onClick:()=>{p(!0),x("left"),setTimeout(()=>p(!1),2e3)},className:"hidden md:flex absolute left-0 top-1/2 -translate-y-1/2 z-10 w-10 h-10 lg:w-12 lg:h-12 bg-primary hover:bg-primary-dark rounded-full items-center justify-center text-white shadow-lg transition-all","aria-label":"Scroll left",children:(0,t.jsx)("svg",{className:"w-5 h-5 lg:w-6 lg:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,t.jsx)("button",{onClick:()=>{p(!0),x("right"),setTimeout(()=>p(!1),2e3)},className:"hidden md:flex absolute right-0 top-1/2 -translate-y-1/2 z-10 w-10 h-10 lg:w-12 lg:h-12 bg-primary hover:bg-primary-dark rounded-full items-center justify-center text-white shadow-lg transition-all","aria-label":"Scroll right",children:(0,t.jsx)("svg",{className:"w-5 h-5 lg:w-6 lg:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),(0,t.jsx)("div",{ref:l,className:"overflow-x-auto scrollbar-hide px-4 md:px-16",style:{scrollbarWidth:"none",msOverflowStyle:"none"},onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onTouchStart:()=>p(!0),onTouchEnd:()=>p(!1),children:(0,t.jsxs)("div",{className:"relative min-w-max",children:[(0,t.jsx)("div",{className:"absolute top-2.5 md:top-3 left-0 right-0 h-0.5 md:h-1 bg-secondary"}),(0,t.jsx)(r.default,{className:"flex gap-4 md:gap-8 pb-6 md:pb-8 relative",staggerDelay:.1,direction:"up",distance:32,amount:.05,children:d.map((e,i)=>(0,t.jsxs)("div",{className:"relative flex flex-col items-center w-64 md:w-72 lg:w-80 shrink-0",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-full mb-4 md:mb-6 relative z-10",children:(0,t.jsx)("div",{className:"w-5 h-5 md:w-6 md:h-6 rounded-full bg-primary border-2 md:border-4 border-cream shadow-lg"})}),(0,t.jsx)("div",{className:"mb-3 md:mb-4",children:(0,t.jsx)("span",{className:"inline-block px-4 py-1.5 md:px-6 md:py-2 bg-primary text-white font-bold text-lg md:text-xl rounded-full shadow-md",children:e.year})}),(0,t.jsxs)("div",{className:"bg-white rounded-xl md:rounded-2xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-shadow border border-gray-100 w-full",children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-2 md:mb-3 text-center leading-tight",children:e.title}),(0,t.jsx)("p",{className:"text-gray-700 text-xs md:text-sm leading-relaxed text-center",children:e.description})]})]},e.id??i))})]})}),(0,t.jsx)("div",{className:"text-center mt-6 md:mt-8",children:(0,t.jsxs)("p",{className:"text-primary text-xs md:text-sm opacity-75 flex items-center justify-center gap-2 sm:hidden",children:[(0,t.jsx)("svg",{className:"w-3 h-3 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16l-4-4m0 0l4-4m-4 4h18"})}),(0,t.jsx)("span",{children:"Swipe to explore"}),(0,t.jsx)("svg",{className:"w-3 h-3 md:w-4 md:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})})]}),(0,t.jsx)(i.default,{id:"7fb09a737db179c4",children:".scrollbar-hide.jsx-7fb09a737db179c4::-webkit-scrollbar{display:none}"})]});return o?(0,t.jsx)("div",{children:g}):(0,t.jsx)("section",{className:`py-12 md:py-16 overflow-hidden ${a}`,children:(0,t.jsx)("div",{className:"container mx-auto px-4 animate-content-reveal",children:g})})}])},484801,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(88653),r=e.i(846932),n=e.i(657688),a=e.i(685149);let o="app-download-popup-seen",l="app-download-popup-dismissed";e.s(["default",0,function(){let[e,d]=(0,i.useState)(!1),[c,h]=(0,i.useState)("other"),u=(0,i.useRef)(null),m=(0,i.useCallback)(()=>{d(!1);try{sessionStorage.setItem(l,"1")}catch{}},[]);return(0,i.useEffect)(()=>{let e=!1,t=async()=>{try{if("1"===sessionStorage.getItem(l))return}catch{}let t=navigator;if(window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: minimal-ui)").matches||!0===t.standalone)return;let i=!1;try{i="1"===localStorage.getItem(o)}catch{i=!0}if(!(i&&Math.random()>
9=.25)){if("function"==typeof t.getInstalledRelatedApps)try{if((await t.getInstalledRelatedApps()).some(e=>"org.dioceseofcochin"===e.id||"play"===e.platform))return}catch{}if(!e){let e;h((e=navigator.userAgent,/iPad|iPhone|iPod/.test(e)?"ios":/Android/i.test(e)?"android":"other"));try{localStorage.setItem(o,"1")}catch{}d(!0)}}},i=window.setTimeout(()=>{t()},2400);return()=>{e=!0,window.clearTimeout(i)}},[]),(0,i.useEffect)(()=>{if(!e)return;let t=e=>{if("Escape"===e.key)return void m();if("Tab"!==e.key)return;let t=u.current?.querySelectorAll('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!t||0===t.length)return;let i=t[0],s=t[t.length-1],r=document.activeElement;e.shiftKey&&(r===i||!u.current?.contains(r))?(e.preventDefault(),s.focus()):e.shiftKey||r!==s&&u.current?.contains(r)||(e.preventDefault(),i.focus())};document.addEventListener("keydown",t);let i=document.body.style.overflow;document.body.style.overflow="hidden";let s=u.current?.querySelector('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])');return s?.focus(),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=i}},[e,m]),(0,t.jsx)(s.AnimatePresence,{children:e&&(0,t.jsxs)("div",{ref:u,className:"fixed inset-0 z-110 flex items-end sm:items-center justify-center",role:"dialog","aria-modal":"true","aria-label":"Download the Diocese of Cochin mobile app",children:[(0,t.jsx)(r.motion.div,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-accent/60 backdrop-blur-[2px]",onClick:m,"aria-hidden":"true"}),(0,t.jsxs)(r.motion.div,{initial:{opacity:0,y:48},animate:{opacity:1,y:0},exit:{opacity:0,y:48},transition:{type:"spring",damping:26,stiffness:300},className:"relative w-full sm:max-w-md bg-cream rounded-t-2xl sm:rounded-2xl shadow-2xl overflow-hidden m-0 sm:m-4",children:[(0,t.jsx)("button",{type:"button",onClick:m,"aria-label":"Dismiss mobile app download popup",className:"absolute top-3 right-3 z-10 rounded-full bg-white/15 hover:bg-white/30 transition-colors p-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),(0,t.jsxs)("div",{className:"bg-linear-to-br from-primary via-primary-light to-primary-dark px-6 pt-6 pb-5 text-center",children:[(0,t.jsx)("div",{className:"relative w-16 h-16 mx-auto mb-3",children:(0,t.jsx)(n.default,{src:a.LOGO_URL,alt:"Diocese of Cochin",fill:!0,sizes:"64px",className:"object-contain drop-shadow-md"})}),(0,t.jsx)("h2",{className:"font-serif text-xl font-bold text-white",children:"Get the Diocese of Cochin Mobile App"}),(0,t.jsx)("p",{className:"text-white/80 text-sm mt-1",children:"Download our mobile app for news, events, daily readings & notifications â right on your phone."})]}),(0,t.jsxs)("div",{className:"px-6 py-5 flex flex-col items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-stretch justify-center gap-2 w-full sm:w-auto",children:["ios"!==c&&(0,t.jsxs)("a",{href:"https://play.google.com/store/apps/details?id=org.dioceseofcochin&referrer=utm_source%3Ddioceseofcochin.org%26utm_medium%3Dweb%26utm_campaign%3Dpopup",target:"_blank",rel:"noopener noreferrer",onClick:m,className:"flex items-center justify-center gap-2 h-12 px-4 bg-black rounded-lg border border-black hover:border-secondary transition-colors",children:[(0,t.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 512 512","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M48 59.49v393a4.33 4.33 0 0 0 7.37 3.07L260 256 55.37 56.42A4.33 4.33 0 0 0 48 59.49z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M345.8 174 89.22 32.64l-.16-.09c-4.42-2.4-8.62 3.58-5 7.06l201.13 192.32z"}),(0,t.jsx)("path",{fill:"#FBBC04",d:"M84.08 472.39c-3.64 3.48.56 9.46 5 7.06l.16-.09L345.8 338l-60.61-57.95z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"m449.38 231-71.65-39.46-67.89 64.46 67.89 64.46L449.38 281c19.49-10.77 19.49-39.23 0-50z"})]}),(0,t.jsxs)("span",{className:"text-left leading-none",children:[(0,t.jsx)("span",{className:"block text-white/60 text-[0.5625rem] uppercase tracking-wide",children:"Get it on"}),(0,t.jsx)("span",{className:"block text-white text-sm font-semibold",children:"Google Play"})]})]}),"android"!==c&&(0,t.jsxs)("a",{href:"https://apps.apple.com/app/diocese-of-cochin/id6783623399?ct=website-popup&mt=8",target:"_blank",rel:"noopener noreferrer",onClick:m,className:"flex items-center justify-center gap-2 h-12 px-4 bg-black rounded-lg border border-black hover:border-secondary transition-colors",children:[(0,t.jsx)("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),(0,t.jsxs)("span",{className:"text-left leading-none",children:[(0,t.jsx)("span",{className:"block text-white/60 text-[0.5625rem] uppercase tracking-wide",children:"Download on the"}),(0,t.jsx)("span",{className:"block text-white text-sm font-semibold",children:"App Store"})]})]})]}),(0,t.jsx)("button",{type:"button",onClick:m,className:"text-gray-500 hover:text-primary text-sm transition-colors py-1",children:"Maybe later"})]})]})]})})}])},657423,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(401851),n=e.i(677241),a=e.i(845110),o=e.i(585890);function l(e,t){var i;return function(e,t){let[i,s]=(0,a.normalizeDates)(void 0,e,t);return+(0,o.startOfDay)(i)==+(0,o.startOfDay)(s)}((0,n.constructFrom)(t?.in||e,e),(i=t?.in||e,(0,n.constructFrom)(i,Date.now())))}var d=e.i(925096),c=e.i(522016),h=e.i(657688);async function u(){try{let e=await (0,s.fetchWithRetry)("/api/bishop-messages?random=true&published=true");if(!e.ok)return null;let t=await e.json();if(!t||!t.id)return null;return{kind:"featured",heading:t.authorDesignation?`Message from the ${t.authorDesignation}`:`Message from ${t.authorName}`,authorName:t.authorName,dateLabel:t.messageDate?(0,r.format)(new Date(t.messageDate),"MMMM d, yyyy"):null,isToday:!!t.messageDate&&l(new Date(t.messageDate)),title:t.title,excerpt:(0,d.getTipTapExcerpt)(t.content,250),href:`/message/${t.id}`}}catch{return null}}async function m(){try{let e=await (0,s.fetchWithRetry)("/api/pope-message");if(!e.ok)return null;let t=await e.json();if(!t||!t.id)return null;return{kind:"pope",heading:t.title||"Pope's Message",authorName:t.popeName??"The Holy Father",dateLabel:t.messageDate?(0,r.format)(new Date(t.messageDate),"MMMM d, yyyy"):null,isToday:!!t.messageDate&&l(new Date(t.messageDate)),title:"",excerpt:t.excerpt,href:"/pope-message",photoUrl:t.popePhotoUrl}}catch{return null}}e.s(["default",0,function(){let[e,s]=(0,i.useState)(null),[r,n]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{let e=!1;return async function(){let t=await m()??await u();e||(s(t),n(!1))}(),()=>{e=!0}},[]),r)?(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary via-primary-light to-primary-dark rounded-2xl lg:rou
9nded-3xl shadow-lg p-4 sm:p-6 md:p-8 lg:p-10",children:[(0,t.jsxs)("div",{className:"mb-4 md:mb-6",children:[(0,t.jsx)("div",{className:"h-8 w-64 bg-white/20 rounded mb-2 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-4 w-32 bg-white/10 rounded skeleton-shimmer-light",style:{animationDelay:"0.1s"}})]}),(0,t.jsx)("div",{className:"space-y-4 md:space-y-6",children:(0,t.jsxs)("div",{className:"bg-white/5 backdrop-blur-sm rounded-2xl p-4 md:p-5 border border-white/10",children:[(0,t.jsx)("div",{className:"h-6 w-48 bg-white/20 rounded mb-3 skeleton-shimmer-light",style:{animationDelay:"0.2s"}}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light",style:{animationDelay:"0.3s"}}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light",style:{animationDelay:"0.4s"}}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-5/6 skeleton-shimmer-light",style:{animationDelay:"0.5s"}}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-3/4 skeleton-shimmer-light",style:{animationDelay:"0.6s"}})]})]})})]}):e?(0,t.jsxs)("div",{className:"bg-linear-to-br from-primary via-primary-light to-primary-dark rounded-2xl lg:rounded-3xl shadow-lg p-4 sm:p-6 md:p-8 lg:p-10 animate-content-reveal",children:[(0,t.jsxs)("div",{className:"mb-4 md:mb-6 flex items-start gap-4",children:["pope"===e.kind&&e.photoUrl&&(0,t.jsx)(h.default,{src:e.photoUrl,alt:e.authorName,width:72,height:72,className:"shrink-0 w-14 h-14 md:w-[72px] md:h-[72px] rounded-full object-cover ring-2 ring-secondary/60 shadow-md bg-white/10"}),(0,t.jsxs)("div",{className:"min-w-0",children:["pope"===e.kind&&(0,t.jsx)("span",{className:"inline-block text-secondary-light text-[0.625rem] md:text-[0.6875rem] font-bold tracking-[0.22em] uppercase mb-1",children:"Vatican News"}),(0,t.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-bold text-white mb-1",children:e.heading}),(0,t.jsx)("p",{className:"text-white/80 text-sm md:text-base font-medium",children:e.authorName}),e.dateLabel&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 mt-2 bg-secondary/20 text-secondary-light ring-1 ring-secondary/40 rounded-full px-2.5 py-1 text-[0.6875rem] md:text-xs font-semibold",children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.isToday&&(0,t.jsx)("span",{className:"font-bold",children:"Today ·"}),e.dateLabel]})]})]}),(0,t.jsx)("div",{className:"space-y-4 md:space-y-6",children:(0,t.jsxs)("div",{className:"bg-white/5 backdrop-blur-sm rounded-2xl p-4 md:p-5 border border-white/10",children:[e.title&&(0,t.jsx)("h3",{className:"text-white text-base md:text-lg font-semibold mb-3",children:e.title}),(0,t.jsx)("p",{className:"text-white/90 text-xs md:text-sm leading-relaxed line-clamp-4",children:e.excerpt}),(0,t.jsxs)(c.default,{href:e.href,className:"inline-flex items-center gap-1 mt-4 text-white/90 hover:text-white text-xs md:text-sm font-medium transition-colors group",children:["pope"===e.kind?"Read Pope's Message":"Read Full Message",(0,t.jsx)("svg",{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})})]}):null}],657423)},107547,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(657688),n=e.i(522016),a=e.i(685149),o=e.i(71790);let l={key:"bishop-fallback",category:"BISHOP OF COCHIN",name:"Rt. Rev. Dr. Antony Kattiparambil",photoUrl:`${a.CDN_URL}/homepage-leaders/bishop/1768551804549-5cw11j-Bishop.png`,paragraphs:["Born on 14 October 1970 in Mundamveli, Bishop Antony Kattiparambil was appointed by Pope Leo XIV as the Bishop of the Diocese of Cochin on 25 October 2025 and ordained on 7 December 2025 at Fort Cochin.","A scholar of biblical theology and canon law from the Pontifical Urbaniana University in Rome, he served as Judicial Vicar of the Diocese of Cochin from 2016 until his episcopal appointment."],cta:{label:"About Our Bishop",href:"/our-bishop",theme:"primary"}};function d(e){let t=(0,o.getLeaderType)(e.type),i=t?.category??e.title?.toUpperCase()??"CHURCH LEADER",s="pope"===e.type,r="bishop"===e.type,n=r||s?s?"Bishop of Rome":void 0:e.title,a=s&&e.content?e.content:void 0,l=s?[]:function(e){if(!e)return[];let t=[];try{let i=JSON.parse(e);i?.type==="doc"&&Array.isArray(i?.content)&&(t=i.content.filter(e=>"paragraph"===e.type).map(e=>(function e(t){return t.map(t=>"text"===t.type?t.text??"":Array.isArray(t.content)?e(t.content):"").join("")})(e.content??[]).trim()).filter(e=>e.length>0))}catch{t=e.split("\n\n").map(e=>e.replace(/<[^>]+>
9/g,"").trim()).filter(Boolean)}if(0===t.length)return[];let i=t[0].split(/\s+/);if(i.length>40)return[i.slice(0,40).join(" ")+"â¦"];let s=[t[0]];if(t.length>1){let e=t[1].split(/\s+/);s.push(e.length>35?e.slice(0,35).join(" ")+"â¦":t[1])}return s}(e.content),d=t?.defaultExternalLink,c=e.externalLink||d||(r?"/our-bishop":"#"),h=!!e.externalLink||!r&&!!d,u=e.buttonText||t?.defaultButtonText||(r?"About Our Bishop":"Learn More");return{key:`${e.type}-${e.id}`,category:i,name:e.name,subtitle:n,photoUrl:e.imageUrl??null,paragraphs:l,quote:a,cta:{label:u,href:c,external:h,theme:s?"secondary":"primary"}}}e.s(["default",0,function(){let[e,a]=(0,i.useState)(0),[o,c]=(0,i.useState)([]),[h,u]=(0,i.useState)(!0),[m,p]=(0,i.useState)(!1),[f,x]=(0,i.useState)(new Set);(0,i.useEffect)(()=>{!async function(){try{let e=await (0,s.fetchWithRetry)("/api/homepage-leaders?current=true");if(e.ok){let t=await e.json();c(t)}}catch{}finally{u(!1)}}()},[]);let g=(0,i.useMemo)(()=>{let e=o.map(d);o.some(e=>"bishop"===e.type)||e.push(l);let t=e.slice();for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t},[o.map(e=>e.id).join(",")]),y=g.length;return((0,i.useEffect)(()=>{if(y<=1)return;let e=setInterval(()=>{m||(p(!0),a(e=>(e+1)%y),setTimeout(()=>p(!1),500))},1e4);return()=>clearInterval(e)},[m,y]),h)?(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"bg-transparent rounded-none p-0",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row gap-0 items-stretch",children:[(0,t.jsx)("div",{className:"w-full md:w-5/12 lg:w-2/5 shrink-0 relative bg-gradient-to-br from-primary/20 via-primary-light/20 to-primary-dark/20 rounded-3xl overflow-hidden",children:(0,t.jsx)("div",{className:"relative h-100 md:h-125 skeleton-shimmer"})}),(0,t.jsxs)("div",{className:"flex-1 p-4 sm:p-6 md:p-8 lg:p-10 flex flex-col justify-center",children:[(0,t.jsx)("div",{className:"h-4 w-32 bg-gray-200 rounded mb-4 skeleton-shimmer"}),(0,t.jsx)("div",{className:"h-10 w-3/4 bg-gray-200 rounded mb-6 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-full skeleton-shimmer"}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-full skeleton-shimmer",style:{animationDelay:"0.1s"}}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-5/6 skeleton-shimmer",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-full skeleton-shimmer",style:{animationDelay:"0.3s"}}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-4/5 skeleton-shimmer",style:{animationDelay:"0.4s"}})]})]})]})})})}),(0,t.jsx)("div",{className:"absolute right-2 md:right-4 top-1/2 -translate-y-1/2 w-10 h-10 md:w-12 md:h-12 bg-gray-200/50 rounded-full skeleton-shimmer"})]}):(0,t.jsxs)("div",{className:"relative animate-content-reveal",children:[(0,t.jsx)("div",{className:"overflow-hidden relative",children:(0,t.jsx)("div",{className:"flex transition-transform duration-500 ease-in-out",style:{transform:`translateX(-${100*e}%)`},children:g.map(e=>{let i=f.has(e.key),s=e.photoUrl&&!i,a="secondary"===e.cta.theme?"bg-secondary hover:bg-secondary-dark":"bg-primary hover:bg-primary-dark";return(0,t.jsx)("div",{className:"w-full shrink-0",children:(0,t.jsx)("div",{className:"bg-transparent rounded-none p-0",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row gap-0 items-stretch",children:[(0,t.jsx)("div",{className:"w-full md:w-5/12 lg:w-2/5 shrink-0 relative bg-gradient-to-br from-primary via-primary-light to-primary-dark rounded-3xl overflow-hidden",children:(0,t.jsx)("div",{className:"relative h-100 md:h-125",children:s?(0,t.jsx)(r.default,{src:e.photoUrl,alt:e.name,fill:!0,className:"object-cover",priority:!0,onError:()=>{x(t=>{let i=new Set(t);return i.add(e.key),i})}}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,t.jsx)("svg",{className:"w-32 h-32 text-white/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})})})}),(0,t.jsxs)("div",{className:"flex-1 p-4 sm:p-6 md:p-8 lg:p-10 flex flex-col justify-center",children:[(0,t.jsx)("p",{className:"text-primary font-bold uppercase tracking-wider text-base mb-4",children:e.category}),(0,t.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-primary mb-2",children:e.name}),e.subtitle&&(0,t.jsx)("p",{className:"text-sm text-secondary font-semibold mb-6",children:e.subt
9itle}),!e.subtitle&&(0,t.jsx)("div",{className:"mb-4"}),e.quote&&(0,t.jsx)("blockquote",{className:"text-gray-700 text-base leading-relaxed mb-8 italic border-l-4 border-secondary pl-4",children:e.quote}),e.paragraphs.length>0&&(0,t.jsx)("div",{className:"text-gray-700 leading-relaxed text-base",children:e.paragraphs.map((e,i)=>(0,t.jsx)("p",{className:i>0?"mt-4":"",children:e},i))}),(0,t.jsx)("div",{className:"mt-8",children:e.cta.external?(0,t.jsxs)(n.default,{href:e.cta.href,target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center gap-2 px-8 py-3 ${a} text-white rounded-full transition-colors font-medium shadow-lg`,children:[e.cta.label,(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}):(0,t.jsxs)(n.default,{href:e.cta.href,className:`inline-flex items-center gap-2 px-8 py-3 ${a} text-white rounded-full transition-colors font-medium shadow-lg`,children:[e.cta.label,(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]})]})})},e.key)})})}),y>1&&(0,t.jsx)("button",{onClick:()=>{m||y<=1||(p(!0),a(e=>(e+1)%y),setTimeout(()=>p(!1),500))},disabled:m,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 w-12 h-12 md:w-14 md:h-14 bg-secondary hover:bg-secondary-dark rounded-full flex items-center justify-center text-white shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed -mr-6 md:-mr-7","aria-label":"Next slide",children:(0,t.jsx)("svg",{className:"w-6 h-6 md:w-7 md:h-7",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})}),y>1&&(0,t.jsx)("div",{className:"flex justify-center gap-2 mt-6",children:g.map((i,s)=>(0,t.jsx)("button",{onClick:()=>{!m&&s!==e&&(p(!0),a(s),setTimeout(()=>p(!1),500))},className:`transition-all ${s===e?"w-8 h-2.5 bg-primary":"w-2.5 h-2.5 bg-primary/30 hover:bg-primary/50"} rounded-full`,"aria-label":`Go to slide ${s+1}`},s))})]})}])},250795,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(657688),n=e.i(522016),a=e.i(401851);e.s(["default",0,function(){let[e,o]=(0,i.useState)([]),[l,d]=(0,i.useState)(!0),[c,h]=(0,i.useState)(0),[,u]=(0,i.useState)({});return((0,i.useEffect)(()=>{!async function(){try{let e=await (0,s.fetchWithRetry)("/api/events?upcoming=true");if(e.ok){let t=await e.json();o(t.slice(0,5))}}catch{}finally{d(!1)}}()},[]),(0,i.useEffect)(()=>{let t=setInterval(()=>{h(t=>(t+1)%e.length)},6e3);return()=>clearInterval(t)},[e.length]),(0,i.useEffect)(()=>{let e=()=>u({});return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),l)?(0,t.jsx)("section",{className:"py-12 bg-cream",children:(0,t.jsxs)("div",{className:"container mx-auto px-4",children:[(0,t.jsx)("div",{className:"text-center mb-10",children:(0,t.jsx)("p",{className:"text-primary text-sm font-bold uppercase tracking-wider mb-2 skeleton-fade-in",children:"UPCOMING EVENTS"})}),(0,t.jsxs)("div",{className:"relative flex flex-col items-center",children:[(0,t.jsx)("div",{className:"relative w-full h-95 md:h-105 mb-8",style:{perspective:"1200px",perspectiveOrigin:"center center"},children:(0,t.jsxs)("div",{className:"absolute top-1/2 left-1/2",style:{transformStyle:"preserve-3d",transform:"translate(-50%, -50%)"},children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-70 md:w-85",style:{transform:"translate(-50%, -50%) translateZ(-120px) translateX(240px) scale(0.7)",opacity:.3},children:(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary/30 via-primary-light/30 to-primary-dark/30 rounded-3xl overflow-hidden",children:[(0,t.jsx)("div",{className:"h-40 md:h-48 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"p-4 md:p-5 space-y-3",children:[(0,t.jsx)("div",{className:"h-5 bg-white/20 rounded w-3/4 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light"})]})]})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-70 md:w-85",style:{transform:"translate(-50%, -50%) translateZ(-60px) translateX(140px) scale(0.85)",opacity:.6},children:(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary/40 via-primary-light/40 to-primary-dark/40 rounded-3xl overflow-hidden",children:[(0,t.jsx)("div",{className:"h-40 md:h-48 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"p-4 md:p-5 space-y-3",children:[(0,t.jsx)("div",{className:"h-5 bg-white/20 rounded w-3/4 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light"})]})]})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-70 md:w-85",style:{transform:"translate(-50%, -50%) translateZ(0px) scale(1)",filter:"drop-shadow(0 12px 30px rgba(0, 0, 0, 0.3))"},children:(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary via-primary-light to-primary-dark rounded-3xl overflow-hidden",children:[(0,t.jsx)("div",{className:"h-40 md:h-48 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"p-4 md:p-5 space-y-3",children:[(0,t.jsx)("div",{className:"h-5 bg-white/20 rounded w-3/4 skeleton-shimmer-light",style:{animationDelay:"0.1s"}}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light",style:{animationDelay:"0.2s"}}),(0,t.jsxs)("div",{className:"flex justify-between pt-3 border-t border-white/20",children:[(0,t.jsx)("div",{className:"h-4 bg-white/10 rounded w-24 skeleton-shimmer-light",style:{animationDelay:"0.3s"}}),(0,t.jsx)("div",{className:"h-4 bg-white/10 rounded w-16 skeleton-shimmer-light",style:{animationDelay:"0.4s"}})]})]})]})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-70 md:w-85",style:{transform:"translate(-50%, -50%) translateZ(-60px) translateX(-140px) scale(0.85)",opacity:.6},children:(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary/40 via-primary-light/40 to-primary-dark/40 rounded-3xl overflow-hidden",children:[(0,t.jsx)("div",{className:"h-40 md:h-48 skeleton-shimmer"}),(0,t.jsxs)("div",{className:"p-4 md:p-5 space-y-3",children:[(0,t.jsx)("div",{className:"h-5 bg-white/20 rounded w-3/4 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-4 bg-white/15 rounded w-full skeleton-shimmer-light"})]})]})})]})}),(0,t.jsxs)("div",{className:"flex justify-center items-center gap-2",children:[(0,t.jsx)("div",{className:"bg-primary h-2.5 w-8 rounded-full"}),(0,t.jsx)("div",{className:"bg-primary/30 h-2.5 w-2.5 rounded-full"}),(0,t.jsx)("div",{className:"bg-primary/30 h-2.5 w-2.5 rounded-full"})]})]})]})}):(0,t.jsx)("section",{className:"py-12 bg-cream",children:(0,t.jsxs)("div",{className:"container mx-auto px-4 animate-content-reveal",children:[(0,t.jsx)("div",{className:"text-center mb-10",children:(0,t.jsx)("p",{className:"text-primary text-sm font-bold uppercase tracking-wider mb-2",children:"UPCOMING EVENTS"})}),0===e.length?(0,t.jsxs)("div",{className:"bg-white rounded-2xl p-12 text-center text-gray-500 border border-gray-100",children:[(0,t.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,t.jsx)("p",{className:"text-lg",children:"No upcoming events"})]}):(0,t.jsxs)("div",{className:"relative flex flex-col items-center",children:[(0,t.jsx)("div",{className:"relative w-full h-95 md:h-105 mb-8",style:{perspective:"1200px",perspectiveOrigin:"center center",pointerEvents:"none"},children:(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-full h-full",style:{transformStyle:"preserve-3d",transform:"translate(-50%, -50%)",pointerEvents:"none"},children:e.map((i,s)=>{let o=(t=>{let i=e.length,s=(t-c+i)%i,r=window.innerWidth<768,n=r?180:280;if(0===s)return{transform:"translateZ(0px) translateX(0px) scale(1)",opacity:1,zIndex:30,filter:"drop-shadow(0 12px 30px rgba(0, 0, 0, 1))"};if(s>=1&&s<=2)return{transform:`translateZ(${-60*s}px) translateX(${n*s}px) scale(${1-.15*s})`,opacity:r&&s>1?0:1,zIndex:30-10*s,filter:`drop-shadow(0 ${10-2*s}px ${25-5*s}px rgba(0, 0, 0, ${.25-.08*s}))`};let a=i-s;return{transform:`translateZ(${-60*a}px) translateX(${-n*a}px) scale(${1-.15*a})`,opacity:r&&a>1?0:1,zIndex:30-10*a,filter:`drop-shadow(0 ${10-2*a}px ${25-5*a}px rgba(0, 0, 0, ${.25-.08*a}))`}})(s);return(0,t.jsx)(n.default,{href:i.slug?`/event/${i.slug}`:"#",className:"absolute top-1/2 left-1/2 w-70 md:w-85 transition-all duration-1000 ease-in-out block",style:{transform:`translate(-50%, -50%) ${o.transform}`,opacity:o.opacity,zIndex:o.zIndex,transformStyle:"preserve-3d",filter:o.filter,pointerEvents:"auto"},children:(0,t.jsxs)("article",{className:"bg-linear-to-br from-primary via-primary-light to-primary-dark rounded-3xl overflow-hidden relative h-full",children:[(0,t.jsx)("div",{className:"relative h-40 md:h-48 bg-linear-to-br from-primary via-primary-light to-primary-dark",children:i.imageUrl?(0,t.jsx)(r.default,{src:i.imageUrl,alt:i.title,fill:!0,className:"object-cover opacity-80"}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("svg",{className:"w-16 h-16 text-white/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})})}),(0,t.jsxs)("div",{className:"p-4 md:p-5",children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-white mb-2",children:i.title}),(0,t.jsx)("p",{className:"text-white text-sm line-clamp-2 mb-4 opacity-90",children:i.summary}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 text-xs text-white pt-4 border-t border-white/20",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1 flex-1 min-w-0",children:[(0,t.jsxs)("svg",{className:"w-4 h-4 mt-0.5 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,t.jsx)("span",{className:"line-clamp-3 leading-snug",children:i.placeName})]}),(0,t.jsxs)("div",{className:"text-right shrink-0",children:[(0,t.jsx)("p",{className:"font-medium",children:(0,a.format)(new Date(i.eventStart),"dd/MM/yyyy")}),(0,t.jsx)("p",{className:"text-[0.625rem] opacity-80",children:(0,a.format)(new Date(i.eventStart),"hh:mm a")})]})]})]})]})},i.id)})})}),(0,t.jsx)("div",{className:"flex justify-center items-center gap-2",children:e.map((e,i)=>(0,t.jsx)("button",{onClick:()=>h(i),className:`rounded-full transition-all duration-300 ${i===c?"bg-primary h-2.5 w-8":"bg-primary/30 h-2.5 w-2.5 hover:bg-primary/50"}`,"aria-label":`Go to card ${i+1}`},i))})]})]})})}])},649819,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(557766);e.s(["default",0,function(){let[e,r]=(0,i.useState)(!0),[n,a]=(0,i.useState)(!1),o=(0,i.useRef)(null);return(0,i.useEffect)(()=>{a(Date.now()<=s.WALKTHROUGH_DEADLINE)},[]),(0,i.useEffect)(()=>{let e=()=>{r(!1),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r(!0),180)};return window.addEventListener("scroll",e,{passive:!0}),()=>{window.removeEventListener("scroll",e),o.current&&clearTimeout(o.current)}},[]),(0,t.jsxs)("div",{"aria-hidden":!e,className:`fixed right-3 sm:right-5 bottom-5 sm:bottom-8 z-40 flex flex-col gap-3 transition-all duration-300 ease-out ${e?"opacity-100 translate-x-0 pointer-events-auto":"opacity-0 translate-x-6 pointer-events-none"}`,children:[(0,t.jsxs)("a",{href:"#todays-reading",onClick:e=>{e.preventDefault();let t=document.getElementById("todays-reading");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},"aria-label":"Jump to today's reading",className:"group flex items-center gap-2 bg-primary hover:bg-primary/90 text-white pl-3 pr-4 py-3 rounded-full shadow-xl shadow-primary/30 ring-1 ring-white/20 backdrop-blur transition-transform hover:-translate-y-0.5",children:[(0,t.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-white/15",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M2 4.5A2.5 2.5 0 0 1 4.5 2H11v18H4.5A2.5 2.5 0 0 1 2 17.5v-13Z"}),(0,t.jsx)("path",{d:"M22 4.5A2.5 2.5 0 0 0 19.5 2H13v18h6.5a2.5 2.5 0 0 0 2.5-2.5v-13Z"})]})}),(0,t.jsx)("span",{className:"text-sm font-semibold whitespace-nowrap",children:"Daily Readings"})]}),n&&(0,t.jsxs)("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent(s.WALKTHROUGH_OPEN_EVENT)),"aria-label":"Open website walkthrough",className:"group flex items-center gap-2 bg-secondary hover:bg-secondary/90 text-accent pl-3 pr-4 py-3 rounded-full shadow-xl shadow-secondary/40 ring-1 ring-white/30 backdrop-blur transition-transform hover:-translate-y-0.5",children:[(0,t.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-accent/15",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"m9 9 6 3-6 3z"})]})}),(0,t.jsx)("span",{className:"text-sm font-semibold whitespace-nowrap",children:"Walkthrough"})]})]})}])},47662,e=>{"use strict";var t=e.i(843476),i=e.i(437902),s=e.i(271645),r=e.i(162225),n=e.i(6
957688),a=e.i(522016),o=e.i(401851),l=e.i(685149);let d=`${l.CDN_URL}/static/st-francis-assisi.jpg`;function c({post:e}){return(0,t.jsxs)(a.default,{href:`/post/${e.slug}`,className:"group relative w-[280px] md:w-[320px] shrink-0 rounded-2xl overflow-hidden bg-white shadow-md border border-gray-100 hover:shadow-xl transition-all duration-300 flex flex-col",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark z-10"}),(0,t.jsx)("div",{className:"relative aspect-[16/10] bg-gradient-to-br from-primary/10 via-primary-light/10 to-primary-dark/10 overflow-hidden",children:e.imageUrl?(0,t.jsx)(n.default,{src:e.imageUrl,alt:e.title,fill:!0,sizes:"320px",className:"object-cover group-hover:scale-105 transition-transform duration-500"}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)(n.default,{src:l.LOGO_URL,alt:"Diocese Logo",width:64,height:64,className:"object-contain opacity-50"})})}),(0,t.jsxs)("div",{className:"flex-1 p-4 flex flex-col",children:[(0,t.jsx)("h4",{className:"text-gray-800 text-sm md:text-base font-bold leading-snug line-clamp-2 mb-2 group-hover:text-primary transition-colors",children:e.title}),(0,t.jsx)("p",{className:"flex-1 text-xs md:text-[0.8125rem] text-gray-600 leading-relaxed line-clamp-3 mb-2",children:e.excerpt}),e.publishedAt&&(0,t.jsx)("p",{className:"text-[0.6875rem] text-gray-500 font-medium pt-2 border-t border-gray-100",children:(0,o.format)(new Date(e.publishedAt),"MMMM d, yyyy")})]})]})}function h({post:e}){return(0,t.jsxs)(a.default,{href:`/post/${e.slug}`,className:"group relative w-full h-full rounded-2xl overflow-hidden bg-white shadow-md border border-gray-100 hover:shadow-xl transition-all duration-300 flex flex-col",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark z-10"}),(0,t.jsx)("div",{className:"relative flex-1 min-h-[160px] bg-gradient-to-br from-primary/10 via-primary-light/10 to-primary-dark/10 overflow-hidden",children:e.imageUrl?(0,t.jsx)(n.default,{src:e.imageUrl,alt:e.title,fill:!0,sizes:"(max-width: 1024px) 90vw, 720px",className:"object-cover group-hover:scale-[1.03] transition-transform duration-500"}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)(n.default,{src:l.LOGO_URL,alt:"Diocese Logo",width:96,height:96,className:"object-contain opacity-50"})})}),(0,t.jsxs)("div",{className:"p-4 md:p-5 flex flex-col",children:[(0,t.jsx)("h4",{className:"text-gray-800 text-base md:text-lg font-bold leading-snug line-clamp-2 mb-2 group-hover:text-primary transition-colors",children:e.title}),(0,t.jsx)("p",{className:"text-xs md:text-sm text-gray-600 leading-relaxed line-clamp-2 mb-2",children:e.excerpt}),e.publishedAt&&(0,t.jsx)("p",{className:"text-[0.6875rem] text-gray-500 font-medium pt-2 border-t border-gray-100",children:(0,o.format)(new Date(e.publishedAt),"MMMM d, yyyy")})]})]})}let u=[{en:"Peace",ml:"സമാധാനà´"},{en:"Poverty",ml:"ദാരിദàµà´°àµà´¯à´"},{en:"Nature",ml:"à´ªàµà´°à´àµà´¤à´¿"},{en:"Fraternity",ml:"സാഹàµà´¦à´°àµà´¯à´"}],m=["Lord, make me an instrument of Your peace.","Where there is hatred, let me sow love;","Where there is injury, pardon;","Where there is doubt, faith."];
9e.s(["default",0,function(){let[e,o]=(0,s.useState)([]),[l,p]=(0,s.useState)(!0);(0,s.useEffect)(()=>{!async function(){try{let e=await (0,r.fetchWithRetry)("/api/posts?category=francis-assisi&published=true&limit=12");if(e.ok){let t=await e.json();o(t)}}catch{}finally{p(!1)}}()},[]);let f=(0,s.useMemo)(()=>[...e].sort((e,t)=>new Date(t.publishedAt).getTime()-new Date(e.publishedAt).getTime()),[e]),x=f.length>=2,g=(0,s.useMemo)(()=>{if(!x)return[];let e=f;for(;e.length<4;)e=[...e,...f];return[...e,...e]},[f,x]);return(0,t.jsxs)("section",{className:"jsx-69e6d32c7d28f8c6 relative py-12 md:py-16 overflow-hidden bg-linear-to-br from-primary via-primary-light to-primary-dark",children:[(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 absolute -top-32 -left-32 w-[480px] h-[480px] rounded-full bg-secondary/15 blur-3xl pointer-events-none"}),(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 absolute -bottom-32 -right-32 w-[520px] h-[520px] rounded-full bg-secondary/10 blur-3xl pointer-events-none"}),(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 text-center mb-8 md:mb-10",children:[(0,t.jsx)("span",{className:"jsx-69e6d32c7d28f8c6 inline-block text-secondary-light text-[0.6875rem] font-bold tracking-[0.25em] uppercase mb-2",children:"Franciscan Holy Year"}),(0,t.jsxs)("h2",{className:"jsx-69e6d32c7d28f8c6 text-3xl sm:text-4xl md:text-5xl font-extrabold text-white",children:["Year of ",(0,t.jsx)("span",{className:"jsx-69e6d32c7d28f8c6 text-secondary-light",children:"Francis Assisi"})]}),(0,t.jsx)("p",{className:"jsx-69e6d32c7d28f8c6 text-white/85 text-sm md:text-base mt-3",children:"March 2025 â 2026 · Diocese of Cochin"}),(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 w-20 h-1 bg-secondary mx-auto mt-4 rounded-full"})]}),(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-8 items-stretch",children:[(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 lg:col-span-5",children:(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 relative h-[480px] md:h-[560px] rounded-3xl overflow-hidden shadow-xl ring-1 ring-secondary/30",children:[(0,t.jsx)(n.default,{src:d,alt:"St. Francis of Assisi",fill:!0,priority:!0,className:"object-cover object-top"}),(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 absolute inset-0 bg-gradient-to-t from-black/55 via-black/10 to-transparent pointer-events-none"}),(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 absolute left-1/2 -translate-x-1/2 bottom-6 md:bottom-8",children:(0,t.jsxs)(a.default,{href:"/year-of-francis-assisi",className:"group inline-flex items-center gap-2 px-7 py-3.5 rounded-full bg-secondary hover:bg-secondary-dark text-primary-dark text-sm md:text-base font-bold shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-0.5",children:["Explore the Year",(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:"jsx-69e6d32c7d28f8c6 w-4 h-4 transition-transform duration-300 group-hover:translate-x-1",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7",className:"jsx-69e6d32c7d28f8c6"})})]})})]})}),(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 lg:col-span-7",children:(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 relative h-[480px] md:h-[560px] flex flex-col gap-5",children:[(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 grid grid-cols-4 gap-2 md:gap-3",children:u.map(e=>(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 bg-white/12 rounded-xl py-3 md:py-3.5 px-2 border border-white/20 text-center",children:[(0,t.jsx)("p",{className:"jsx-69e6d32c7d28f8c6 text-sm md:text-base font-bold text-white leading-tight",children:e.en}),(0,t.jsx)("p",{className:"jsx-69e6d32c7d28f8c6 text-[0.625rem] md:text-[0.6875rem] text-secondary-light mt-1 hidden sm:block",children:e.ml})]},e.en))}),l?(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 flex-1 rounded-3xl bg-white/10 animate-pulse"}):0===e.length?(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 flex-1 rounded-3xl bg-white/8 border border-white/15 p-6 md:p-8 lg:p-10 flex flex-col justify-center relative overflow-hidden",children:[(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark"}),(0,t.jsx)("span",{className:"jsx-69e6d32c7d28f8c6 block text-secondary-light text-[0.625rem] md:text-[0.6875rem] font-bold tracking-[0.2em] uppercase mb-3",children:"Prayer of St. Francis"}),(0,t.jsx)("blockquote",{className:"jsx-69e6d32c7d28f8c6 border-l-4 border-secondary pl-4 md:pl-5",children:m.map((e,i)=>(0,t.jsx)("p",{className:"jsx-69e6d32c7d28f8c6 text-white text-base md:text-lg leading-relaxed italic",children:e},i))}),(0,t.jsx)("p",{className:"jsx-69e6d32c7d28f8c6 text-white/75 text-xs md:text-sm mt-5",children:"â attributed to St. Francis of Assisi"})]}):(0,t.jsxs)("div",{className:"jsx-69e6d32c7d28f8c6 flex-1 flex flex-col min-h-0",children:[(0,t.jsx)("h3",{className:"jsx-69e6d32c7d28f8c6 text-white text-base md:text-lg font-bold mb-3 md:mb-4",children:"Latest from the Jubilee"}),x?(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 francis-marquee-mask flex-1 relative overflow-hidden min-h-0",children:(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 francis-marquee flex gap-4 md:gap-5 h-full items-stretch",children:g.map((e,i)=>(0,t.jsx)(c,{post:e},`${e.id}-${i}`))})}):(0,t.jsx)("div",{className:"jsx-69e6d32c7d28f8c6 flex-1 min-h-0 flex",children:(0,t.jsx)(h,{post:f[0]})})]})]})})]})]}),(0,t.jsx)(i.default,{id:"69e6d32c7d28f8c6",children:".francis-marquee-mask.jsx-69e6d32c7d28f8c6{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 4% 96%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 4% 96%,#0000 100%)}.francis-marquee.jsx-69e6d32c7d28f8c6{width:max-content;animation:60s linear infinite francis-marquee-scroll}.francis-marquee.jsx-69e6d32c7d28f8c6:hover{animation-play-state:paused}@keyframes francis-marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}@media (prefers-reduced-motion:reduce){.francis-marquee.jsx-69e6d32c7d28f8c6{animation:none}}"})]})}])},548044,e=>{"use strict";
9var t=e.i(843476),i=e.i(271645),s=e.i(657688),r=e.i(522016),n=e.i(846932),a=e.i(310542),o=e.i(895420);let l={id:"1",title:"Diocese of Cochin â A Legacy of Faith Since 1558",content:"One of the oldest Catholic dioceses in Asia, the Diocese of Cochin was erected in 1558 under the Portuguese padroado. From the historic Santa Cruz Cathedral Basilica to its vibrant parishes across Ernakulam district, the diocese continues to serve thousands of faithful, carrying forward centuries of Christian heritage in Kerala.",link:"/history"},d=[{id:"1",url:"/images/carousel/hero-1.jpg",alt:"Diocese of Cochin - Hero Image 1",title:""},{id:"2",url:"/images/carousel/hero-2.jpg",alt:"Diocese of Cochin - Hero Image 2",title:""},{id:"3",url:"/images/carousel/hero-3.jpg",alt:"Diocese of Cochin - Hero Image 3",title:""},{id:"4",url:"/images/carousel/hero-4.jpg",alt:"Diocese of Cochin - Hero Image 4",title:""}];function c({images:e,currentIndex:i,scrollTargetRef:r}){let{scrollYProgress:l}=(0,a.useScroll)({target:r,offset:["start start","end start"]}),d=(0,o.useTransform)(l,[0,1],["0%","15%"]),h=(0,o.useTransform)(l,[0,1],[1,1.08]),u=(0,o.useTransform)(l,[0,.85],[1,.45]);return(0,t.jsx)("div",{className:"relative w-full overflow-hidden",children:e.map((e,r)=>{let a=r===i;return(0,t.jsx)(n.motion.div,{initial:!1,animate:{opacity:+!!a,scale:a?1:1.03},transition:{duration:.9,ease:[.22,1,.36,1]},style:a?{y:d,scale:h,opacity:u,willChange:"transform, opacity"}:void 0,className:`w-full ${a?"relative z-1":"absolute inset-0 z-0 pointer-events-none"}`,children:(0,t.jsx)(s.default,{src:e.url,alt:e.alt,width:1920,height:1080,className:"w-full h-auto",priority:0===r})},e.id)})})}e.s(["default",0,function({images:e,announcement:s=l}){let[a,o]=(0,i.useState)(0),[h]=(0,i.useState)(e||d),[u,m]=(0,i.useState)(!0),p=(0,i.useRef)(null),f=h&&h.length>0;return((0,i.useEffect)(()=>{let e=new IntersectionObserver(([e])=>{m(e.isIntersecting)},{threshold:.1}),t=p.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),(0,i.useEffect)(()=>{if(!u)return;let e=setInterval(()=>{o(e=>(e+1)%h.length)},5e3);return()=>clearInterval(e)},[h.length,u]),f)?(0,t.jsxs)("section",{ref:p,className:"relative bg-linear-to-br from-primary via-primary-light to-primary-dark overflow-hidden",children:[(0,t.jsx)(c,{images:h,currentIndex:a,scrollTargetRef:p}),h.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.motion.button,{onClick:()=>{h&&o(e=>0===e?h.length-1:e-1)},whileHover:{scale:1.1,x:-2},whileTap:{scale:.9},transition:{type:"spring",stiffness:400,damping:18},className:"absolute left-4 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white p-2 rounded-full shadow-lg z-10","aria-label":"Previous slide",children:(0,t.jsx)("svg",{className:"w-6 h-6 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,t.jsx)(n.motion.button,{onClick:()=>{h&&o(e=>e===h.length-1?0:e+1)},whileHover:{scale:1.1,x:2},whileTap:{scale:.9},transition:{type:"spring",stiffness:400,damping:18},className:"absolute right-4 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white p-2 rounded-full shadow-lg z-10","aria-label":"Next slide",children:(0,t.jsx)("svg",{className:"w-6 h-6 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),(0,t.jsx)("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 flex gap-2 z-10",children:h.map((e,i)=>(0,t.jsx)(n.motion.button,{onClick:()=>{o(i)},whileHover:{scale:1.25},whileTap:{scale:.85},animate:{width:i===a?32:10,backgroundColor:i===a?"rgb(139,35,50)":"rgba(139,35,50,0.3)"},transition:{type:"spring",stiffness:320,damping:24},className:"rounded-full h-2.5 cursor-pointer","aria-label":`Go to slide ${i+1}`},i))})]})]}):(0,t.jsxs)("section",{ref:p,className:"relative bg-linear-to-br from-primary via-primary-dark to-primary overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute inset-0 opacity-10",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-96 h-96 bg-white rounded-full -translate-y-1/2 translate-x-1/2"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 w-64 h-64 bg-white rounded-full translate-y-1/2 -translate-x-1/2"})]}),(0,t.jsx)("div",{className:"container mx-auto px-4 py-16 md:py-24 relative",children:(0,t.jsxs)("div",{className:"max-w-2xl",children:[(0,t.jsx)("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-6 leading-tight",children:s.title}),(0,t.jsx)("p",{className:"text-white/90 text-lg md:text-xl mb-8 leading-relaxed max-w-xl",children:s.content}),s.link&&(0,t.jsx)(r.default,{href:s.link,className:"inline-flex items-center gap-2 px-8 py-3 bg-white text-primary rounded-full hover:bg-gray-100 transition-colors font-medium shadow-lg",children:"Explore our history"})]})})]})}])},207403,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(88653),r=e.i(846932),n=e.i(6
957688),a=e.i(685149);let o=(0,i.createContext)({isReady:!0});e.s(["default",0,function({children:e,displayTime:l=1400}){let[d,c]=(0,i.useState)(!0),[h,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=window.setTimeout(()=>c(!1),l),t=window.setTimeout(()=>u(!0),l+200);return()=>{window.clearTimeout(e),window.clearTimeout(t)}},[l]),(0,t.jsxs)(o.Provider,{value:{isReady:h},children:[e,(0,t.jsx)(s.AnimatePresence,{children:d&&(0,t.jsxs)(r.motion.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.55,ease:"easeInOut"},className:"fixed inset-0 z-9999 flex items-center justify-center bg-cream pointer-events-none","aria-hidden":"true",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(139,35,50,0.08),transparent_60%)]"}),(0,t.jsxs)("div",{className:"relative flex flex-col items-center gap-6",children:[(0,t.jsxs)("div",{className:"relative flex h-36 w-36 items-center justify-center",children:[(0,t.jsx)(r.motion.div,{className:"absolute inset-0 m-auto h-44 w-44 rounded-full bg-primary/15 blur-2xl",animate:{scale:[1,1.15,1],opacity:[.5,.8,.5]},transition:{duration:2.4,repeat:1/0,ease:"easeInOut"}}),(0,t.jsx)(r.motion.div,{className:"absolute inset-0 m-auto h-36 w-36 rounded-full border-2 border-primary/25 border-t-primary",animate:{rotate:360},transition:{duration:1.6,repeat:1/0,ease:"linear"}}),(0,t.jsx)(r.motion.div,{initial:{scale:.85,opacity:0},animate:{scale:[.85,1,.97,1],opacity:1},transition:{duration:1.2,ease:"easeOut"},className:"relative h-28 w-28 sm:h-32 sm:w-32",children:(0,t.jsx)(n.default,{src:a.LOGO_URL,alt:"Diocese of Cochin",fill:!0,priority:!0,sizes:"128px",className:"object-contain drop-shadow-md"})})]}),(0,t.jsxs)(r.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.35,duration:.6},className:"text-center",children:[(0,t.jsx)("p",{className:"text-primary font-semibold tracking-wide text-sm sm:text-base",children:"Diocese of Cochin"}),(0,t.jsx)("p",{className:"text-primary/60 text-[0.6875rem] sm:text-xs tracking-[0.25em] uppercase mt-1",children:"Since 1558"})]}),(0,t.jsx)("div",{className:"flex gap-1.5 mt-2",children:[0,1,2].map(e=>(0,t.jsx)(r.motion.span,{className:"h-1.5 w-1.5 rounded-full bg-primary",animate:{opacity:[.25,1,.25],y:[0,-3,0]},transition:{duration:1,repeat:1/0,ease:"easeInOut",delay:.15*e}},e))})]}),(0,t.jsxs)("div",{className:"absolute bottom-8 left-0 right-0 flex flex-col items-center gap-0.5 px-4 text-center sm:flex-row sm:justify-center sm:gap-1.5",children:[(0,t.jsx)("span",{className:"text-primary/50 text-xs sm:text-sm",children:"Crafted with care by"}),(0,t.jsx)("span",{className:"text-primary/80 font-semibold tracking-wide text-xs sm:text-sm",children:"Appfide Private Limited"})]})]},"doc-splash")})]})},"useLoader",0,function(){return(0,i.useContext)(o)}])},337489,e=>{"use strict";var t=e.i(843476),i=e.i(437902),s=e.i(271645),r=e.i(88653),n=e.i(846932),a=e.i(657688),o=e.i(522016),l=e.i(685149);function d({site:e,cardIndex:i}){let r=(0,s.useMemo)(()=>e.images.length>0?e.images:e.imageUrl?[{id:"primary",imageUrl:e.imageUrl,displayOrder:0}]:[],[e.images,e.imageUrl]),[n,c]=(0,s.useState)(0);(0,s.useEffect)(()=>{r.length<=1||c(Math.floor(Math.random()*r.length))},[r.length]);let h=r[n]??r[0];return(0,t.jsx)(o.default,{href:`/pilgrimage/${e.slug}`,className:"group block h-full",children:(0,t.jsxs)("article",{className:"h-full bg-white rounded-2xl lg:rounded-3xl overflow-hidden shadow-md border border-gray-100 hover:shadow-xl transition-all duration-300 hover:-translate-y-0.5 flex flex-col",children:[(0,t.jsxs)("div",{className:"relative aspect-[16/9] bg-gradient-to-br from-primary/10 via-primary-light/10 to-primary-dark/10 overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark z-10"}),h?(0,t.jsx)(a.default,{src:h.imageUrl,alt:e.title,fill:!0,sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw",className:"object-cover transition-transform duration-700 ease-out group-hover:scale-105",priority:i<3},h.id):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)(a.default,{src:l.LOGO_URL,alt:"Diocese Logo",width:80,height:80,className:"object-contain opacity-40"})})]}),(0,t.jsxs)("div",{className:"flex-1 p-5 sm:p-6 flex flex-col",children:[(0,t.jsxs)("p",{className:"text-[0.6875rem] font-bold tracking-[0.15em] uppercase text-secondary-dark mb-1.5",children:["ð ",e.location]}),(0,t.jsx)("h3",{className:"text-lg sm:text-xl font-extrabold text-gray-800 leading-snug group-hover:text-primary transition-colors mb-2",children:e.title}),e.description&&(0,t.jsx)("p",{className:"flex-1 text-sm text-gray-600 leading-relaxed line-clamp-3",children:function(e,t=180){if(!e)return"";let i=e;try{let t=JSON.parse(e),s=e=>{if(!e||"object"!=typeof e)return"";let t=e.text??"";if(Array.isArray(e.content))for(let i of e.content)t+=" "+s(i);return t};i=s(t)}catch{i=e.replace(/<[^>]+>/g," ")}return(i=i.replace(/\s+/g," ").trim()).length>t?i.slice(0,t).trim()+"â¦":i}(e.description)}),(0,t.jsx)("div",{className:"flex items-center justify-end mt-4 pt-3 border-t border-gray-100",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm font-semibold text-primary group-hover:gap-2 transition-all",children:["Read more",(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})})]})]})})}e.s(["default",0,function({sites:e}
9){let[a,o]=(0,s.useState)(e);(0,s.useEffect)(()=>{o(function(e){let t=[...e];for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t}(e))},[e]);let[l,c]=(0,s.useState)(!1),h=(0,s.useMemo)(()=>[...a,...a],[a]),u=(0,s.useRef)(null),m=(0,s.useRef)(!1),p=(0,s.useRef)(!1),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current=l},[l]),(0,s.useEffect)(()=>{let e=0,t=performance.now(),i=s=>{let r=s-t;t=s;let n=u.current;if(n&&!p.current){let e=n.scrollWidth/2;e>0&&(m.current||(n.scrollLeft+=r/16.67*.45),n.scrollLeft>=e?n.scrollLeft-=e:n.scrollLeft<0&&(n.scrollLeft+=e))}e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[]);let x=()=>{m.current=!0,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{m.current=!1},1600)},g=e=>{let t=u.current;if(!t)return;x();let i=t.querySelector("[data-card]"),s=i?i.offsetWidth+20:320;t.scrollBy({left:e*s*1.5,behavior:"smooth"})},y=(0,s.useRef)(null),v=(0,s.useRef)(!1),b=()=>{let e=y.current?.active??!1;y.current=null,e&&x()};return(0,t.jsxs)("div",{className:"jsx-10a9cf9580c1d1fc",children:[(0,t.jsxs)("div",{className:"jsx-10a9cf9580c1d1fc flex items-center justify-center gap-3 mb-5",children:[(0,t.jsx)("button",{type:"button",onClick:()=>g(-1),"aria-label":"Previous churches",className:`jsx-10a9cf9580c1d1fc h-10 w-10 grid place-items-center rounded-full border border-secondary/40 text-primary bg-white shadow-sm transition-all hover:bg-secondary hover:text-white hover:border-secondary active:scale-95 ${l?"opacity-0 pointer-events-none":""}`,children:(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:"jsx-10a9cf9580c1d1fc w-4 h-4",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7",className:"jsx-10a9cf9580c1d1fc"})})}),(0,t.jsxs)("button",{type:"button",onClick:()=>{m.current=!1,c(e=>!e)},"aria-expanded":l,className:"jsx-10a9cf9580c1d1fc inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-primary text-white text-sm font-bold shadow-md transition-all hover:bg-primary-dark hover:-translate-y-0.5 active:scale-95",children:[l?"Collapse":"Expand all",(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:`jsx-10a9cf9580c1d1fc w-4 h-4 transition-transform duration-300 ${l?"rotate-180":""}`,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7",className:"jsx-10a9cf9580c1d1fc"})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>g(1),"aria-label":"Next churches",className:`jsx-10a9cf9580c1d1fc h-10 w-10 grid place-items-center rounded-full border border-secondary/40 text-primary bg-white shadow-sm transition-all hover:bg-secondary hover:text-white hover:border-secondary active:scale-95 ${l?"opacity-0 pointer-events-none":""}`,children:(0,t.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:"jsx-10a9cf9580c1d1fc w-4 h-4",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7",className:"jsx-10a9cf9580c1d1fc"})})})]}),(0,t.jsx)(r.AnimatePresence,{mode:"wait",initial:!1,children:l?(0,t.jsx)(n.motion.div,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5",children:a.map((e,i)=>(0,t.jsx)(n.motion.div,{initial:{opacity:0,y:28,scale:.94},animate:{opacity:1,y:0,scale:1},transition:{duration:.5,delay:.05*i,ease:[.16,1,.3,1]},children:(0,t.jsx)(d,{site:e,cardIndex:i})},e.id))},"grid"):(0,t.jsx)(n.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"relative",children:(0,t.jsx)("div",{ref:u,onPointerDown:e=>{let t=u.current;t&&(y.current={x:e.clientX,left:t.scrollLeft,active:!1,id:e.pointerId},v.current=!1)},onPointerMove:e=>{let t=u.current;if(!t||!y.current)return;let i=e.clientX-y.current.x;if(!y.current.active){if(6>Math.abs(i))return;y.current.active=!0,v.current=!0,m.current=!0,t.setPointerCapture(y.current.id)}t.scrollLeft=y.current.left-i},onPointerUp:b,onPointerCancel:b,onClickCapture:e=>{v.current&&(e.preventDefault(),e.stopPropagation(),v.current=!1)},onMouseEnter:()=>{m.current=!0},onMouseLeave:()=>{y.current||(m.current=!1)},className:"jsx-10a9cf9580c1d1fc pilgrim-flow-mask flex gap-5 overflow-x-auto overflow-y-hidden scrollbar-hide py-2 cursor-grab active:cursor-grabbing select-none",children:h.map((e,i)=>(0,t.jsx)("div",{"data-card":!0,"aria-hidden":i>=a.length,className:"jsx-10a9cf9580c1d1fc shrink-0 w-[280px] sm:w-[320px]",children:(0,t.jsx)(d,{site:e,cardIndex:i%a.length})},`${e.id}-${i}`))})},"row")}),(0,t.jsx)(i.default,{id:"10a9cf9580c1d1fc",children:".pilgrim-flow-mask.jsx-10a9cf9580c1d1fc{-webkit-mask-image:linear-gradient(90deg,#0000 0,#00000059 4%,#000 14% 86%,#00000059 96%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#00000059 4%,#000 14% 86%,#00000059 96%,#0000 100%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.scrollbar-hide.jsx-10a9cf9580c1d1fc{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide.jsx-10a9cf9580c1d1fc::-webkit-scrollbar{display:none}"})]})}],337489)},208912,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(657688),n=e.i(522016),a=e.i(401851),o=e.i(685149),l=e.i(435596),d=e.i(3531);e.s(["default",0,function(){let[e,c]=(0,i.useState)([]),[h,u]=(0,i.useState)([]),[m,p]=(0,i.useState)(!0);(0,i.useEffect)(()=>{!async function(){try{let[e,t]=await Promise.all([(0,s.fetchWithRetry)("/api/posts?published=true&featured=true&limit=1"),(0,s.fetchWithRetry)("/api/posts?category=updates,news&published=true&hideFromHome=false&limit=4")]);e.ok&&c(await e.json()),t.ok&&u(await t.json())}catch{}finally{p(!1)}}()},[]);let f=e[0]??null,x=(f?h.filter(e=>e.id!==f.id):h).slice(0,3),g=f?[f,...x]:x;return m?(0,t.jsx)("section",{className:"py-8 md:py-12 bg-cream",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-8 md:mb-10",children:[(0,t.jsx)("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-extrabold text-primary skeleton-fade-in",children:"News & Updates"}),(0,t.jsx)("div",{className:"w-16 h-1 bg-secondary/40 mx-auto mt-3 rounded-full"})]}),(0,t.jsx)("div",{className:"mb-8 skeleton-slide-up",children:(0,t.jsxs)("div",{className:"relative rounded-2xl lg:rounded-3xl overflow-hidden bg-white shadow-md border border-gray-100",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark"}),(0,t.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"w-full md:w-[400px] lg:w-[460px] shrink-0",children:(0,t.jsx)("div",{className:"relative aspect-video bg-gradient-to-br from-primary/10 via-primary-light/10 to-primary-dark/10",children:(0,t.jsx)("div",{className:"absolute inset-0 skeleton-shimmer"})})}),(0,t.jsxs)("div",{className:"flex-1 p-6 sm:p-8",children:[(0,t.jsx)("div",{className:"h-5 w-20 bg-secondary/20 rounded-full mb-4 skeleton-shimmer"}),(0,t.jsx)("div",{className:"h-7 bg-gray-200 rounded w-4/5 mb-3 skeleton-shimmer",style:{animationDelay:"0.1s"}}),(0,t.jsxs)("div",{className:"space-y-2 mb-5",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-full skeleton-shimmer",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-3/4 skeleton-shimmer",style:{animationDelay:"0.3s"}})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-28 skeleton-shimmer",style:{animationDelay:"0.4s"}}),(0,t.jsx)("div",{className:"h-9 w-9 bg-secondary/20 rounded-full skeleton-shimmer",style:{animationDelay:"0.5s"}})]})]})]})]})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5",children:[0,1,2].map(e=>
9(0,t.jsxs)("div",{className:"relative rounded-2xl lg:rounded-3xl overflow-hidden bg-white shadow-md border border-gray-100 skeleton-slide-up",style:{animationDelay:`${.15*e}s`},children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary via-primary-light to-primary-dark"}),(0,t.jsx)("div",{className:"relative aspect-video bg-gradient-to-br from-primary/10 via-primary-light/10 to-primary-dark/10",children:(0,t.jsx)("div",{className:"absolute inset-0 skeleton-shimmer"})}),(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"h-5 bg-gray-200 rounded w-4/5 mb-3 skeleton-shimmer",style:{animationDelay:`${.15*e+.1}s`}}),(0,t.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-full skeleton-shimmer",style:{animationDelay:`${.15*e+.2}s`}}),(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-3/4 skeleton-shimmer",style:{animationDelay:`${.15*e+.3}s`}})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-100 rounded w-24 skeleton-shimmer",style:{animationDelay:`${.15*e+.4}s`}}),(0,t.jsx)("div",{className:"h-8 w-8 bg-primary/10 rounded-full skeleton-shimmer",style:{animationDelay:`${.15*e+.5}s`}})]})]})]},e))})]})}):(0,t.jsx)("section",{className:"py-8 md:py-12 bg-cream",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 animate-content-reveal",children:[(0,t.jsxs)("div",{className:"text-center mb-8 md:mb-10",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-extrabold text-primary",children:"News & Updates"}),(0,t.jsx)(l.default,{})]}),(0,t.jsx)("div",{className:"w-16 h-1 bg-secondary mx-auto mt-3 rounded-full"})]}),0===g.length?(0,t.jsxs)("div",{className:"relative bg-white rounded-2xl lg:rounded-3xl p-12 text-center text-gray-500 border border-gray-100 shadow-md",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary via-primary-light to-secondary"}),(0,t.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-primary/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})}),(0,t.jsx)("p",{className:"text-lg text-gray-600",children:"No news available"})]}):(0,t.jsxs)(t.Fragment,{children:[f&&(0,t.jsxs)(n.default,{href:`/post/${f.slug}`,className:"group relative block mb-6 md:mb-8 rounded-2xl lg:rounded-3xl overflow-hidden bg-white shadow-md border border-gray-100 transition-all duration-300 hover:shadow-xl hover:-translate-y-0.5",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-secondary-light to-secondary-dark z-10"}),(0,t.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"w-full md:w-[400px] lg:w-[460px] shrink-0",children:(0,t.jsx)("div",{className:"relative aspect-video bg-gradient-to-br from-primary via-primary-light to-primary-dark overflow-hidden",children:f.imageUrl?(0,t.jsx)(r.default,{src:f.imageUrl,alt:f.title,fill:!0,className:"object-cover transition-transform duration-500 group-hover:scale-105"}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-10",children:(0,t.jsx)("div",{className:"relative w-full h-full max-w-[160px] max-h-[160px]",children:(0,t.jsx)(r.default,{src:o.LOGO_URL,alt:"Diocese Logo",fill:!0,className:"object-contain"})})})})}),(0,t.jsxs)("div",{className:"flex-1 p-5 sm:p-7 md:p-8 flex flex-col justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"inline-block bg-secondary/15 text-secondary-dark text-[0.625rem] font-bold tracking-wider uppercase px-3 py-1 rounded-full mb-4",children:"Featured"}),(0,t.jsx)("h3",{className:"text-xl sm:text-2xl font-extrabold text-gray-800 mb
9-3 group-hover:text-primary transition-colors duration-300",children:f.title}),f.excerpt&&(0,t.jsx)("p",{className:"text-sm text-gray-600 leading-relaxed line-clamp-3",children:f.excerpt})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-5 pt-4 border-t border-gray-100",children:[(0,t.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:(0,a.format)(new Date(f.publishedAt),"MMMM d, yyyy")}),(0,t.jsx)("span",{className:"shrink-0 w-9 h-9 rounded-full bg-secondary/10 flex items-center justify-center text-secondary-dark group-hover:bg-secondary group-hover:text-white transition-all duration-300",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]})]})]})]}),x.length>0&&(0,t.jsx)(d.default,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5",staggerDelay:.12,direction:"up",distance:32,children:x.map(e=>(0,t.jsxs)(n.default,{href:`/post/${e.slug}`,className:"group relative rounded-2xl lg:rounded-3xl overflow-hidden bg-white shadow-md border border-gray-100 transition-all duration-300 hover:shadow-xl hover:-translate-y-1 flex flex-col",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary via-primary-light to-primary-dark z-10"}),(0,t.jsxs)("div",{className:"relative aspect-video bg-gradient-to-br from-primary via-primary-light to-primary-dark overflow-hidden",children:[e.imageUrl?(0,t.jsx)(r.default,{src:e.imageUrl,alt:e.title,fill:!0,className:"object-cover transition-transform duration-500 group-hover:scale-105"}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-8",children:(0,t.jsx)("div",{className:"relative w-24 h-24",children:(0,t.jsx)(r.default,{src:o.LOGO_URL,alt:"Diocese Logo",fill:!0,className:"object-contain"})})}),e.isFeatured&&(0,t.jsx)("span",{className:"absolute top-3 left-3 inline-block bg-secondary/90 backdrop-blur-sm text-white text-[0.625rem] font-bold tracking-wider uppercase px-2.5 py-1 rounded-full",children:"Featured"})]}),(0,t.jsxs)("div",{className:"flex-1 p-5 flex flex-col",children:[(0,t.jsx)("h3",{className:"text-base font-bold text-gray-800 mb-2 line-clamp-2 group-hover:text-primary transition-colors duration-300",children:e.title}),(0,t.jsx)("p",{className:"flex-1 text-sm text-gray-600 leading-relaxed line-clamp-2 mb-2",children:e.excerpt??""}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-gray-100",children:[(0,t.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:(0,a.format)(new Date(e.publishedAt),"MMMM d, yyyy")}),(0,t.jsx)("span",{className:"shrink-0 w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary group-hover:bg-primary group-hover:text-white transition-all duration-300",children:(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]})]})]},e.id))})]}),(0,t.jsx)("div",{className:"text-center mt-8 md:mt-10",children:(0,t.jsxs)(n.default,{href:"/news",className:"group inline-flex items-center gap-2 px-8 py-3 bg-primary text-white rounded-full hover:bg-primary-dark transition-all duration-300 font-medium shadow-md hover:shadow-lg hover:-translate-y-0.5",children:["View all news",(0,t.jsx)("svg",{className:"w-4 h-4 transition-transform duration-300 group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})})]})})}])},897173,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(657688);e.s(["default",0,function({priests:e}){let[n,a]=(0,i.useState)(0),[o,l]=(0,i.useState)(e||[]),[d,c]=(0,i.useState)(!e),[h,u]=(0,i.useState)(0);(0,i.useEffect)(()=>{e||(async()=>{try{let e=await (0,s.fetchWithRetry)("/api/priests/celebrations");if(!e.ok)throw Error("Failed to fetch");let t=await e.json();l(t)}catch{}finally{c(!1)}})()},[e]);let m=[...o].sort((e,t)=>
9e.daysUntil-t.daysUntil);return((0,i.useEffect)(()=>{if(0===m.length)return;let e=setInterval(()=>{(Date.now()-h>=5e3||0===h)&&a(e=>(e+1)%m.length)},6e3);return()=>clearInterval(e)},[m.length,h]),d)?(0,t.jsxs)("div",{className:"relative flex flex-col items-center px-4 sm:px-6 md:px-8 py-6",children:[(0,t.jsx)("div",{className:"text-center w-full mb-6 -mt-8",children:(0,t.jsx)("p",{className:"text-primary text-base sm:text-lg font-bold uppercase tracking-wider skeleton-fade-in",children:"CIRCLE OF JOY"})}),(0,t.jsxs)("div",{className:"relative flex items-center gap-4 sm:gap-6 justify-center",children:[(0,t.jsx)("div",{className:"relative w-72 sm:w-80 h-64 sm:h-75 flex-shrink-0",style:{perspective:"1400px",perspectiveOrigin:"center center"},children:(0,t.jsxs)("div",{className:"absolute top-1/2 left-1/2 w-full h-full",style:{transformStyle:"preserve-3d",transform:"translate(-50%, -50%)"},children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-64 sm:w-75",style:{transform:"translate(-50%, -50%) translateZ(-45px) translateY(-45px) scale(0.88)",opacity:.7},children:(0,t.jsx)("div",{className:"bg-gradient-to-br from-primary/40 via-primary-light/40 to-primary-dark/40 rounded-2xl sm:rounded-3xl p-3 sm:p-4",children:(0,t.jsxs)("div",{className:"flex gap-3 sm:gap-4 items-center",children:[(0,t.jsxs)("div",{className:"shrink-0 flex flex-col items-center gap-1.5 sm:gap-2 py-1",children:[(0,t.jsx)("div",{className:"w-16 h-16 sm:w-21 sm:h-21 bg-white/30 rounded-lg sm:rounded-xl skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-5 w-14 bg-white/20 rounded skeleton-shimmer-light"})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"h-4 bg-white/20 rounded w-3/4 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-1/2 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-2/3 skeleton-shimmer-light"})]})]})})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-64 sm:w-75",style:{transform:"translate(-50%, -50%) translateZ(0px) scale(1)",filter:"drop-shadow(0 12px 30px rgba(0, 0, 0, 0.3))"},children:(0,t.jsx)("div",{className:"bg-gradient-to-br from-primary via-primary-light to-primary-dark rounded-2xl sm:rounded-3xl p-3 sm:p-4",children:(0,t.jsxs)("div",{className:"flex gap-3 sm:gap-4 items-center",children:[(0,t.jsxs)("div",{className:"shrink-0 flex flex-col items-center gap-1.5 sm:gap-2 py-1",children:[(0,t.jsx)("div",{className:"w-16 h-16 sm:w-21 sm:h-21 bg-white/30 rounded-lg sm:rounded-xl skeleton-shimmer-light",style:{animationDelay:"0.1s"}}),(0,t.jsx)("div",{className:"h-5 w-14 bg-white/20 rounded skeleton-shimmer-light",style:{animationDelay:"0.2s"}})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"h-5 bg-white/25 rounded w-4/5 skeleton-shimmer-light",style:{animationDelay:"0.3s"}}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-1/2 skeleton-shimmer-light",style:{animationDelay:"0.4s"}}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-3/4 skeleton-shimmer-light",style:{animationDelay:"0.5s"}}),(0,t.jsx)("div",{className:"h-6 w-24 bg-secondary/50 rounded-md skeleton-shimmer",style:{animationDelay:"0.6s"}})]})]})})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-64 sm:w-75",style:{transform:"translate(-50%, -50%) translateZ(-45px) translateY(45px) scale(0.88)",opacity:.7},children:(0,t.jsx)("div",{className:"bg-gradient-to-br from-primary/40 via-primary-light/40 to-primary-dark/40 rounded-2xl sm:rounded-3xl p-3 sm:p-4",children:(0,t.jsxs)("div",{className:"flex gap-3 sm:gap-4 items-center",children:[(0,t.jsxs)("div",{className:"shrink-0 flex flex-col items-center gap-1.5 sm:gap-2 py-1",children:[(0,t.jsx)("div",{className:"w-16 h-16 sm:w-21 sm:h-21 bg-white/30 rounded-lg sm:rounded-xl skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-5 w-14 bg-white/20 rounded skeleton-shimmer-light"})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"h-4 bg-white/20 rounded w-3/4 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-1/2 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-2/3 skeleton-shimmer-light"})]})]})})})]})}),(0,t.jsxs)("div",{className:"hidden sm:flex relative flex-col justify-center items-center h-64 sm:h-75 w-6 sm:w-7.5 gap-2",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 bg-primary/30 rounded-full"}),(0,t.jsx)("div",{className:"w-2.5 h-8 bg-primary rounded-full"}),(0,t.jsx)("div",{className:"w-2.5 h-2.5 bg-primary/30 rounded-full"})]})]})]}):0===m.length?(0,t.jsxs)("div",{className:"relative flex flex-col items-center",children:[(0,t.jsx)("div",{className:"text-center mb-6 w-full",children:(0,t.jsx)("p",{className:"text-primary text-sm font-bold uppercase tracking-wider",children:"CIRCLE OF JOY"})}),(0,t.jsx)("div",{className:"flex items-center justify-center h-75 text-gray-400",children:"No upcoming celebrations"})]}):(0,t.jsxs)("div",{className:"relative flex flex-col items-center px-4 sm:px-6 md:px-8 py-6 animate-content-reveal",children:[(0,t.jsx)("div",{className:"text-center w-full mb-8",children:(0,t.jsx)("p",{className:"text-primary text-base sm:text-lg font-bold uppercase tracking-wider",children:"CIRCLE OF JOY"})}),(0,t.jsx)("div",{className:"relative flex items-center justify-center w-full max-w-md mx-auto",children:(0,t.jsx)("div",{className:"relative w-full h-80 sm:h-96",style:{perspective:"1400px",perspectiveOrigin:"center center",pointerEvents:"none"},children:(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-full h-full",style:{transformStyle:"preserve-3d",transform:"translate(-50%, -50%)",pointerEvents:"none"},children:m.map((e,i)=>{var s;let o=(e=>{let t=m.length,i=(e-n+t)%t;if(i>t/2&&(i-=t),!(Math.abs(i)<=Math.min(3,Math.floor((t-1)/2))))return{transform:`translateZ(-200
9px) translateY(${i>0?"200px":"-200px"}) scale(0.5)`,opacity:0,zIndex:0,filter:"none"};if(0===i)return{transform:"translateZ(0px) translateY(0px) scale(1)",opacity:1,zIndex:30,filter:"drop-shadow(0 12px 30px rgba(0, 0, 0, 1))"};if(i>0){let e=i;return{transform:`translateZ(${-45*e}px) translateY(${45*e}px) scale(${1-.12*e})`,opacity:1,zIndex:20-e,filter:`drop-shadow(0 ${8-2*e}px ${20-4*e}px rgba(0, 0, 0, ${.35-.05*e}))`}}{let e=Math.abs(i);return{transform:`translateZ(${-45*e}px) translateY(${-45*e}px) scale(${1-.12*e})`,opacity:1,zIndex:10-e,filter:`drop-shadow(0 ${8-2*e}px ${20-4*e}px rgba(0, 0, 0, ${.35-.05*e}))`}}})(i);return(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 w-64 sm:w-75 transition-all duration-1000 ease-in-out cursor-pointer",style:{transform:`translate(-50%, -50%) ${o.transform}`,opacity:o.opacity,zIndex:o.zIndex,transformStyle:"preserve-3d",filter:o.filter,pointerEvents:"auto"},onClick:()=>{a(i),u(Date.now())},children:(0,t.jsx)("div",{className:"bg-linear-to-br from-primary via-primary-light to-primary-dark rounded-2xl sm:rounded-3xl p-3 sm:p-4 relative overflow-hidden",style:{pointerEvents:"auto"},children:(0,t.jsxs)("div",{className:"flex gap-3 sm:gap-4 items-center",children:[(0,t.jsxs)("div",{className:"shrink-0 flex flex-col items-center gap-1.5 sm:gap-2 py-1",children:[(0,t.jsx)("div",{className:"relative w-16 h-16 sm:w-21 sm:h-21 bg-white rounded-lg sm:rounded-xl overflow-hidden",children:e.photoUrl?(0,t.jsx)(r.default,{src:e.photoUrl,alt:e.name,fill:!0,className:"object-cover"}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,t.jsx)("svg",{className:"w-8 h-8 sm:w-12 sm:h-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})})}),(0,t.jsx)("div",{className:"px-2.5 py-1 rounded bg-white/20 text-white text-[0.5625rem] font-medium uppercase text-center",children:0===(s=e.daysUntil)?"Today":1===s?"Tomorrow":`In ${s} days`})]}),(0,t.jsxs)("div",{className:"flex-1 text-white min-w-0 py-1",children:[(0,t.jsx)("h3",{className:"font-bold text-sm sm:text-base leading-tight text-white mb-1 sm:mb-1.5",children:e.name}),(0,t.jsx)("p",{className:"text-white text-[0.625rem] sm:text-[0.6875rem] mb-1 sm:mb-1.5",children:e.designation}),(0,t.jsx)("p",{className:"text-white text-[0.625rem] sm:text-[0.6875rem] mb-2 sm:mb-3 leading-snug line-clamp-2",children:e.placeName}),(0,t.jsxs)("div",{className:`inline-block px-2 sm:px-3 py-0.5 sm:py-1 rounded-md text-white font-bold uppercase text-[0.5625rem] sm:text-[0.625rem] tracking-wider ${"memorial"===e.celebrationType?"bg-rose-600":"bg-secondary"}`,children:["birthday"===e.celebrationType&&"BIRTHDAY","ordination"===e.celebrationType&&"ORDINATION DAY","memorial"===e.celebrationType&&"ð¹ WENT TO HEAVEN"]})]})]})})},e.id)})})})})]})}])},963268,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(522016),r=e.i(3531);let n=[{name:"History",href:"/history",active:!1,submenu:[{name:"Diocesan History",href:"/history"},{name:"Bishops",href:"/bishops"},{name:"Historical Archives",href:"/historical-archives"}]},{name:"Religious",href:"/religious",active:!1,submenu:[{name:"Seminaries",href:"/seminary"},{name:"Men Religious",href:"/men-religious"},{name:"Women Religious",href:"/women-religious"}]},{name:"Pastoral",href:"/pastoral",active:!1,submenu:[{name:"Pastoral",href:"/pastoral"},{name:"Bible Apostolate",href:"/bible-apostolate"},{name:"Faith Formation",href:"/faith-formation"},{name:"Catechism",href:"/catechism"},{name:"Faith Ministry",href:"/faith-ministry"},{name:"Liturgy",href:"/liturgy"},{name:"Vocation Promotion",href:"/vocation-promotion"},{name:"Heritage",href:"/heritage"}]},{name:"Family",href:"/couples-ministry",active:!1,submenu:[{name:"Couples Ministry",href:"/couples-ministry"},{name:"Family Apostolate",href:"/family-apostolate"},{name:"Family Counselling",href:"/family-counselling"},{name:"Pre-Marital Course",href:"/pre-marital-course"}]},{name:"Associations",href:"/kcym",active:!1,submenu:[{name:"KCSL",href:"/kcsl"},{name:"KCYM",href:"/kcym"},{name:"Youth Ministry",href:"/youth-ministry"},{name:"Mission League",href:"/mission-league"},{name:"KLCA",href:"/klca"},{name:"Laity",href:"/laity"},{name:"Political Affairs",href:"/political-affairs"},{name:"KLCWA",href:"/klcwa"},{name:"KLM",href:"/klm"},{name:"Jesus Youth",href:"/jesus-youth"},{name:"Legion of Mary",href:"/legion-of-mary"},{name:"WIDES",href:"/wides"},{name:"Holy Childhood",href:"/holy-childhood"},{name:"Marian Sodality",href:"/marian-sodality"},{name:"Vincent de Paul Society",href:"/vincent-de-paul-society"},{name:"Christeen",href:"/christeen"},{name:"Charismatic and Proclamation",href:"/charismatic-and-proclamation"},{name:"Neo Catechumenal Way",href:"/neo-catechumenal-way"},{name:"Little Way",href:"/little-way"},{name:"Jesus Fraternity",href:"/jesus-fraternity"},{name:"Madhya Virudha Samithy",href:"/madhya-virudha-samithy"},{name:"Ecology",href:"/ecology"},{name:"Social Service Society",href:"/social-service-society"},{name:"Social Ministry",href:"/social-ministry"},{name:"Other Associations",href:"/other-associations"}]},{name:"Institutions",href:"/fathima-hospital",active:!1,submenu:[{name:"Fathima Hospital",href:"/fathima-hospital"},{name:"Corporate Education of Cochin",href:"/corporate-education-of-cochin"},{name:"Colleges",href:"/colleges",submenu:[{name:"Aquinas College",href:"/aquinas-college"},{name:"Sienna College",href:"/sienna-college"},{name:"Avila College",href:"/avila-college"},{name:"Jubilee ITI College",href:"/jubilee-iti-college"},{name:"St. Joseph's College",href:"/st-josephs-college"},{name:"ILA",href:"/ila-international-language-institute"}]},{name:"Catholic Centre",href:"/catholic-centre"},{name:"CIPT Press",href:"/cipt-press"},{name:"Alpha Pastoral Centre",href:"/alpha-pastoral-centre"}]},{name:"Media",href:"/santa-cecilia-studio",active:!1,submenu:[{name:"Santa Cecilia Studio",href:"/santa-cecilia-studio"},{name:"Radio Maria",href:"/radio-maria"},{name:"Media Commission",href:"/media"}]},{name:"Contact Us",href:"/contact",active:!1}];e.s(["default",0,function(){let[e,a]=(0,i.useState)(null),[o,l]=(0,i.useState)(null),[d,c]=(0,i.useState)("down"),h=(0,i.useRef)(null),u=(0,i.useRef)(null),m=(0,i.useRef)(new Map),p=()=>{h.current=setTimeout(()=>{a(null),l(null)},200)},f=e=>{u.current&&clearTimeout(u.current),l(e)},x=()=>{u.current=setTimeout(()=>l(null),200)};return(0,i.useEffect)(()=>()=>{h.current&&clearTimeout(h.current),u.current&&clearTimeout(u.current)},[]),(0,t.jsx)("section",{id:"quick-links-bar",className:"hidden lg:block py-12 bg-white border-b border-gray-100",children:(0,t.jsx)("div",{className:"container mx-auto px-4",children:(0,t.jsx)(r.default,{className:"flex flex-wrap justify-center gap-12 md:gap-20",staggerDelay:.06,direction:"up",distance:20,duration:.45,children:n.map(i=>{let r,n,l;return(0,t.jsxs)("div",{className:"relative",ref:e=>{e&&m.current.set(i.name,e)},onMouseEnter:()=>i.submenu&&((e,t)=>{h.current&&clearTimeout(h.current);let i=m.current.get(e);if(i){let e=i.getBoundingClientRect(),s=window.innerHeight-e.bottom,r=e.top;s<36*t+16+8&&r>s?c("up"):c("down")}a(e)})(i.name,i.submenu.length),onMouseLeave:p,children:[i.submenu?(0,t.jsx)("span",{className:`text-sm font-medium transition-colors cursor-pointer ${i.active?"text-primary":"text-gray-500 hover:text-primary"}`,children:i.name}):(0,t.jsx)(s.default,{href:i.href,className:`text-sm font-medium transition-colors ${i.active?"text-primary":"text-gray-500 hover:text-primary"}`,children:i.name}),i.submenu&&e===i.name&&(l=(n=(r=i.submenu).some(e=>"submenu"in e&&e.submenu))||!(r.length>16)?!n&&r.length>9?2:1:3,(0,t.jsx)("div",{className:`absolute left-1/2 -translate-x-1/2 ${3===l?"w-[39rem]":2===l?"w-[27rem]":"w-56"} max-w-[92vw] bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-50 ${"up"===d?"bottom-full mb-2":"top-full mt-2"}`,children:(0,t.jsx)("div",{className:3===l?"columns-3 gap-x-1":2===l?"columns-2 gap-x-1":"",children:r.map(e=>"submenu"in e&&e.submenu?(0,t.jsxs)("div",{className:"relative",onMouseEnter:()=>f(e.name),onMouseLeave:x,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors cursor-pointer",children:[(0,t.jsx)("span",{children:e.name}),(0,t.jsx)("svg",{className:"w-3.5 h-3.5 ml-2 opacity-50 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}),o===e.name&&(0,t.jsxs)("div",{className:"absolute right-full top-0 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-[60]",onMouseEnter:()=>f(e.name),onMouseLeave:x,children:[(0,t.jsxs)(s.default,{href:e.href,className:"flex items-center justify-between px-4 py-1.5 text-xs font-semibold text-primary hover:bg-gray-50 transition-colors border-b border-gray-100 mb-1",children:["All Colleges",(0,t.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}),e.submenu.map(e=>(0,t.jsx)(s.default,{href:e.href,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors",children:e.name},e.name))]})]},e.name):(0,t.jsx)(s.default,{href:e.href,className:"block break-inside-avoid px-6 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors",children:e.name},e.name))})}))]},i.name)})})})})}])},404990,e=>{"use strict";var t=e.i(843476),i=e.i(846932),s=e.i(387652),r=e.i(772328),n=e.i(271645);e.s(["default",0,function({children:e,direction:a="up",delay:o=0,duration:l=.7,as:d="div",className:c,distance:h=40,once:u=!0,amount:m=.15,style:p,stagger:f=!1,staggerDelay:x=.08}){let g=(0,r.useReducedMotion)(),y=(0,n.useRef)(null),v=(0,s.useInView)(y,{once:u,amount:m,margin:"0px 0px -10% 0p
9x"}),b={up:{x:0,y:h},down:{x:0,y:-h},left:{x:h,y:0},right:{x:-h,y:0},fade:{x:0,y:0},zoom:{x:0,y:0,scale:.9},tilt:{x:0,y:h/2,scale:.96,rotate:-3},blur:{x:0,y:h/2,filter:"blur(12px)"}}[a],w=g?{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}}}:{hidden:{opacity:0,x:b.x,y:b.y,scale:b.scale??1,rotate:b.rotate??0,filter:b.filter??"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:l,delay:o,ease:[.22,1,.36,1],...f?{staggerChildren:x,delayChildren:o}:{}}}},j="section"===d?i.motion.section:"article"===d?i.motion.article:i.motion.div;return(0,t.jsx)(j,{ref:y,className:c,style:p,variants:w,initial:"hidden",animate:v?"visible":"hidden",children:e})},"revealItemVariants",0,{hidden:{opacity:0,y:24,scale:.97},visible:{opacity:1,y:0,scale:1,transition:{duration:.55,ease:[.22,1,.36,1]}}}])},412604,e=>{"use strict";var t=e.i(843476),i=e.i(437902),s=e.i(271645),r=e.i(162225);e.s(["default",0,function(){let[e,n]=(0,s.useState)([]),[a,o]=(0,s.useState)(!0),[l,d]=(0,s.useState)(null);(0,s.useEffect)(()=>{c()},[]);let c=async()=>{try{let e=new Date,t=e.getMonth()+1,i=e.getDate(),s=await (0,r.fetchWithRetry)(`/api/saints?month=${t}&day=${i}`);if(s.ok){let e=await s.json();if(e.length>0){n(e),d({month:t,day:i}),o(!1);return}}let a=new Date(e);a.setDate(a.getDate()+1);let l=a.getMonth()+1,c=a.getDate();if((s=await (0,r.fetchWithRetry)(`/api/saints?month=${l}&day=${c}`)).ok){let e=await s.json();n(e),d({month:l,day:c})}}catch{}finally{o(!1)}};if(a)return(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary via-primary-light to-primary-dark rounded-3xl lg:rounded-4xl p-4 md:p-6 lg:p-8 h-full",children:[(0,t.jsxs)("div",{className:"mb-4 md:mb-6",children:[(0,t.jsx)("div",{className:"h-8 w-48 bg-white/20 rounded mb-1 skeleton-shimmer-light"}),(0,t.jsx)("div",{className:"h-4 w-32 bg-white/10 rounded skeleton-shimmer-light",style:{animationDelay:"0.1s"}})]}),(0,t.jsx)("div",{className:"space-y-3 md:space-y-4",children:[0,1,2].map(e=>(0,t.jsxs)("div",{className:"flex gap-3 md:gap-4 skeleton-slide-up",style:{animationDelay:`${.15*e+.2}s`},children:[(0,t.jsx)("div",{className:"w-6 h-6 md:w-8 md:h-8 shrink-0 pt-0.5",children:(0,t.jsx)("div",{className:"w-full h-full bg-white/20 rounded-lg skeleton-shimmer-light"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"h-4 bg-white/25 rounded w-3/4 mb-1.5 skeleton-shimmer-light",style:{animationDelay:`${.15*e+.3}s`}}),(0,t.jsx)("div",{className:"h-3 bg-secondary/40 rounded w-24 mb-2 skeleton-shimmer-light",style:{animationDelay:`${.15*e+.4}s`}}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-full skeleton-shimmer-light",style:{animationDelay:`${.15*e+.5}s`}}),(0,t.jsx)("div",{className:"h-3 bg-white/15 rounded w-5/6 skeleton-shimmer-light",style:{animationDelay:`${.15*e+.6}s`}})]})]})]},e))})]});if(0===e.length)return(0,t.jsx)("div",{className:"bg-linear-to-br from-primary via-primary-light to-primary-dark rounded-3xl lg:rounded-4xl p-4 md:p-6 lg:p-8 h-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"text-white text-center",children:(0,t.jsx)("p",{className:"text-sm",children:"No saints feast day in the next two days"})})});let h=new Date,u=l&&l.month===h.getMonth()+1&&l.day===h.getDate();return(0,t.jsxs)("div",{className:"jsx-e4c0ee4aadd7f829 bg-linear-to-br from-primary via-primary-light to-primary-dark rounded-3xl lg:rounded-4xl p-4 md:p-6 lg:p-8 h-full animate-content-reveal",children:[(0,t.jsxs)("div",{className:"jsx-e4c0ee4aadd7f829 mb-4 md:mb-6",children:[(0,t.jsx)("h2",{className:"jsx-e4c0ee4aadd7f829 text-xl md:text-2xl lg:text-3xl font-bold text-white mb-1",children:"Saints of the Day"}),(0,t.jsx)("p",{className:"jsx-e4c0ee4aadd7f829 text-white/70 text-xs md:text-sm",children:u?"Feast Celebrations":"Tomorrow's Feast"})]}),(0,t.jsx)("div",{className:"jsx-e4c0ee4aadd7f829 space-y-3 md:space-y-4",children:e.map(e=>(0,t.jsxs)("div",{className:"jsx-e4c0ee4aadd7f829 flex gap-3 md:gap-4",children:[(0,t.jsx)("div",{className:"jsx-e4c0ee4aadd7f829 w-6 h-6 md:w-8 md:h-8 shrink-0 pt-0.5",children:(0,t.jsx)("div",{className:"jsx-e4c0ee4aadd7f829 w-full h-full bg-white/20 rounded-lg flex items-center justify-center",children:e.imageUrl?(0,t.jsx)("img",{src:e.imageUrl,alt:e.name,className:"jsx-e4c0ee4aadd7f829 w-full h-full object-cover rounded-lg"}):(0,t.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",className:"jsx-e4c0ee4aadd7f829 w-4 h-4 md:w-5 md:h-5 text-white/60",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",className:"jsx-e4c0ee4aadd7f829"})})})}),(0,t.jsxs)("div",{className:"jsx-e4c0ee4aadd7f829 flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"jsx-e4c0ee4aadd7f829 text-white font-bold text-sm md:text-base leading-tight",children:e.name}),(0,t.jsxs)("p",{className:"jsx-e4c0ee4aadd7f829 text-secondary text-xs font-medium mt
9-0.5 mb-1",children:[["January","February","March","April","May","June","July","August","September","October","November","December"][e.feastMonth-1]," ",e.feastDay]}),e.description&&(0,t.jsx)("p",{className:"jsx-e4c0ee4aadd7f829 text-white/80 text-xs md:text-sm leading-snug line-clamp-3",children:e.description})]})]},e.id))}),(0,t.jsx)(i.default,{id:"e4c0ee4aadd7f829",children:".scrollbar-hide.jsx-e4c0ee4aadd7f829::-webkit-scrollbar{display:none}"})]})}])},708616,e=>{"use strict";var t=e.i(843476),i=e.i(846932),s=e.i(310542);e.i(486427);var r=e.i(83352),n=e.i(83411),a=e.i(287022);function o(e){return"number"==typeof e?e:parseFloat(e)}var l=e.i(271645),d=e.i(737806),c=e.i(887652),h=e.i(895420);e.s(["default",0,function(){let{scrollYProgress:e}=(0,s.useScroll)(),u=function(e,t={}){return function(e,t={}){let{isStatic:i}=(0,l.useContext)(d.MotionConfigContext),s=()=>(0,n.isMotionValue)(e)?e.get():e;if(i)return(0,h.useTransform)(s);let u=(0,c.useMotionValue)(s());return(0,l.useInsertionEffect)(()=>(function(e,t,i={}){let s,l=e.get(),d=null,c=l,h="string"==typeof l?l.replace(/[\d.-]/g,""):void 0,u=()=>{d&&(d.stop(),d=null),e.animation=void 0},m=()=>{(()=>{let t=o(e.get()),n=o(c);if(t===n)return u();let a=d?d.getGeneratorVelocity():e.getVelocity();u(),d=new r.JSAnimation({keyframes:[t,n],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...i,onUpdate:s})})(),e.animation=d??void 0,e.events.animationStart?.notify(),d?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{c=e,s=e=>{var i,s;return t((i=e,(s=h)?i+s:i))},a.frame.postRender(m)},u),(0,n.isMotionValue)(t)){let s=!0===i.skipInitialAnimation,r=t.on("change",t=>{var i,r,n,a;s?(s=!1,e.jump((i=t,(r=h)?i+r:i),!1)):e.set((n=t,(a=h)?n+a:n))}),n=e.on("destroy",r);return()=>{r(),n()}}return u})(u,e,t),[u,JSON.stringify(t)]),u}(e,{type:"spring",...t})}(e,{stiffness:120,damping:30,mass:.3});return(0,t.jsx)(i.motion.div,{"aria-hidden":"true",className:"fixed top-0 left-0 right-0 h-[3px] origin-left z-[60] bg-gradient-to-r from-primary via-primary/80 to-amber-500 pointer-events-none",style:{scaleX:u,willChange:"transform"}})}],708616)},3531,e=>{"use strict";var t=e.i(843476),i=e.i(846932),s=e.i(387652),r=e.i(772328),n=e.i(271645);e.s(["default",0,function({children:e,direction:a="up",distance:o=28,staggerDelay:l=.09,initialDelay:d=0,duration:c=.55,amount:h=.1,as:u="div",className:m,style:p,once:f=!0}){let x=(0,r.useReducedMotion)(),g=(0,n.useRef)(null),y=(0,s.useInView)(g,{once:f,amount:h,margin:"0px 0px -8% 0px"}),v=(()=>{switch(a){case"up":return{x:0,y:o};case"down":return{x:0,y:-o};case"left":return{x:o,y:0};case"right":return{x:-o,y:0};case"zoom":return{x:0,y:0,scale:.92};default:return{x:0,y:0}}})(),b=x?{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}}}:{hidden:{opacity:0,x:v.x,y:v.y,scale:v.scale??1},visible:{opacity:1,x:0,y:0,scale:1,transition:{duration:c,ease:[.22,1,.36,1]}}},w="section"===u?i.motion.section:"article"===u?i.motion.article:"ul"===u?i.motion.ul:"ol"===u?i.motion.ol:i.motion.div,j=n.Children.map(e,(e,s)=>{if(!(0,n.isValidElement)(e))return(0,t.jsx)(i.motion.div,{variants:b,children:e},`stagger-text-${s}`);let r=e.type;return"object"==typeof r&&null!==r&&"displayName"in r?(0,n.cloneElement)(e,{variants:b}):(0,t.jsx)(i.motion.div,{variants:b,children:e},e.key??s)});return(0,t.jsx)(w,{ref:g,className:m,style:p,variants:{hidden:{},visible:{transition:{staggerChildren:l,delayChildren:d}}},initial:"hidden",animate:y?"visible":"hidden",children:j})}])},598643,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(162225),r=e.i(401851);e.s(["default",0,function(){let[e,n]=(0,i.useState)("first"),[a,o]=(0,i.useState)(null),[l,d]=(0,i.useState)(!0),[c,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{u()},[]),(0,i.useEffect)(()=>{if(!a)return;let e={first:a.firstReadingContent,psalm:a.psalmContent,second:a.secondReadingContent,gospel:a.gospelContent,prayer:a.prayerOfFaith,homily:a.homily},t=["first","psalm","second","gospel","prayer","homily"].find(t=>e[t]);t&&n(t)},[a]);let u=async()=>{try{let e=(0,r.format)(new Date,"yyyy-MM-dd"),t=await (0,s.fetchWithRetry)(`/api/readings?date=${e}`);if(t.ok){let e=await t.json();o(e)}}catch{}finally{d(!1)}};if(l)return(0,t.jsx)("div",{className:"bg-white rounded-3xl lg:rou
9nded-4xl p-4 md:p-6 lg:p-8 h-full shadow-lg border border-gray-100",children:(0,t.jsx)("div",{className:"text-center",children:"Loading today's reading..."})});if(!a||!a.isPublished)return(0,t.jsxs)("div",{className:"bg-white rounded-3xl lg:rounded-4xl p-4 md:p-6 lg:p-8 h-full shadow-lg border border-gray-100",children:[(0,t.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-bold text-primary mb-4",children:"Today's Reading"}),(0,t.jsx)("p",{className:"text-center text-gray-600",children:"No reading available for today."})]});let m=[{key:"first",label:"First Reading",hasContent:a.firstReadingContent},{key:"psalm",label:"Psalm",hasContent:a.psalmContent},{key:"second",label:"Second Reading",hasContent:a.secondReadingContent},{key:"gospel",label:"Gospel",hasContent:a.gospelContent},{key:"prayer",label:"Prayer",hasContent:a.prayerOfFaith},{key:"homily",label:"Homily",hasContent:a.homily}];return(0,t.jsxs)("div",{className:"bg-white rounded-3xl lg:rounded-4xl p-4 md:p-6 lg:p-8 h-full shadow-lg border border-gray-100",children:[(0,t.jsxs)("div",{className:"mb-4 md:mb-6",children:[(0,t.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-bold text-primary mb-1",children:"Today's Reading"}),(0,t.jsx)("p",{className:"text-gray-500 text-xs md:text-sm",children:(0,r.format)(new Date(a.date),"MMMM dd, yyyy")})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mb-4 md:mb-6",children:m.filter(e=>e.hasContent).map(i=>(0,t.jsx)("button",{onClick:()=>{n(i.key),h(!1)},className:`px-3 md:px-4 py-1.5 md:py-2 rounded-full text-xs md:text-sm font-semibold transition-all ${e===i.key?"bg-primary text-white shadow-lg":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:i.label},i.key))}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:`space-y-4 overflow-hidden transition-all duration-300 ${c?"":"max-h-48"}`,children:(()=>{switch(e){case"first":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:a.firstReadingTitle||"First Reading"}),a.firstReadingReference&&(0,t.jsx)("p",{className:"text-secondary font-semibold text-xs md:text-sm mb-4",children:a.firstReadingReference}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.firstReadingContent})})]});case"psalm":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:a.psalmTitle||"Responsorial Psalm"}),a.psalmReference&&(0,t.jsx)("p",{className:"text-secondary font-semibold text-xs md:text-sm mb-4",children:a.psalmReference}),a.psalmResponse&&(0,t.jsx)("div",{className:"bg-primary/5 rounded-xl md:rounded-2xl p-3 md:p-4 mb-4",children:(0,t.jsxs)("p",{className:"text-primary font-medium text-xs md:text-sm",children:["R. ",a.psalmResponse]})}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.psalmContent})})]});case"second":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:a.secondReadingTitle||"Second Reading"}),a.secondReadingReference&&(0,t.jsx)("p",{className:"text-secondary font-semibold text-xs md:text-sm mb-4",children:a.secondReadingReference}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.secondReadingContent})})]});case"gospel":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:a.gospelTitle||"Gospel"}),a.gospelReference&&(0,t.jsx)("p",{className:"text-secondary font-semibold text-xs md:text-sm mb-4",children:a.gospelReference}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.gospelContent})})]});case"prayer":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:"Prayer of Faith"}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.prayerOfFaith})})]});case"homily":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{className:"text-base md:text-lg font-bold text-primary mb-1",children:"Homily"}),(0,t.jsx)("div",{className:"bg-cream rounded-xl md:rounded-2xl p-4 md:p-5 border-l-4 border-primary",children:(0,t.jsx)("p",{className:"text-gray-700 leading-relaxed text-sm md:text-base whitespace-pre-wrap",children:a.homily})})]});default:return null}})()}),!c&&(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-white to-transparent pointer-events-none"})]}),(0,t.jsx)("div",{className:"mt-3 text-center",children:(0,t.jsx)("button",{onClick:()=>h(e=>!e),className:"inline-flex items-center gap-1.5 px-4 py-1.5 rounded-full text-xs md:text-sm font-semibold bg-gray-100 text-gray-700 hover:bg-gray-200 transition-all",children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M14.707 12.707
9a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"})}),"Collapse"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})}),"Read More"]})})})]})}])},557766,e=>{"use strict";var t=e.i(843476),i=e.i(522016),s=e.i(271645);let r=new Date("2026-07-19T23:59:59+05:30").getTime(),n="walkthrough:open";function a(e){if(!e)return"";let t=e.match(/^(\d{4})/);if(t)return t[1];let i=new Date(e).getUTCFullYear();return Number.isNaN(i)?"":String(i)}function o(e){let t=a(e.bishopFrom),i=a(e.bishopTo);return t||i?t&&t===i?t:`${t||"â¦"} â ${i||"Present"}`:""}function l({src:e,name:i,className:s}){return e?(0,t.jsx)("img",{src:e,alt:i,loading:"lazy",className:`${s} rounded-lg object-cover object-top ring-1 ring-secondary/50 shrink-0`}):(0,t.jsx)("div",{className:`${s} rounded-lg bg-primary/10 text-primary flex items-center justify-center font-serif text-3xl font-semibold ring-1 ring-secondary/40 shrink-0`,"aria-hidden":"true",children:i.replace(/^(Rev\.|Fr\.|Dr\.|Msgr\.|Bp\.|Dom)\s*/gi,"").charAt(0).toUpperCase()})}function d({title:e,count:i,duration:s,children:r}){return 0===i?null:(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 sm:px-6",children:[(0,t.jsx)("h3",{className:"font-serif text-base sm:text-lg font-bold text-primary",children:e}),(0,t.jsx)("span",{className:"text-[0.6875rem] font-medium bg-secondary/20 text-primary rounded-full px-2 py-0.5",children:i}),(0,t.jsx)("div",{className:"flex-1 h-px bg-secondary/40"})]}),(0,t.jsx)("div",{className:"popup-marquee-track overflow-hidden group","aria-label":`${e} â auto-scrolling list`,children:(0,t.jsxs)("div",{className:"popup-marquee flex w-max gap-3 px-4 sm:px-6",style:{animationDuration:`${s}s`},children:[(0,t.jsx)("div",{className:"flex gap-3 shrink-0",children:r}),(0,t.jsx)("div",{className:"flex gap-3 shrink-0","aria-hidden":"true",inert:!0,children:r})]})})]})}e.s(["WALKTHROUGH_DEADLINE",0,r,"WALKTHROUGH_OPEN_EVENT",0,n,"default",0,function(){let[e,c]=(0,s.useState)(!1),[h,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[f,x]=(0,s.use
9State)([]),g=(0,s.useRef)(!1),y=(0,s.useRef)(!1),v=(0,s.useRef)(!1),b=(0,s.useCallback)(()=>c(!1),[]),w=(0,s.useCallback)(async()=>{if(g.current)return void c(!0);if(!y.current){y.current=!0;try{let[e,t,i]=await Promise.all([fetch("/api/bishops"),fetch("/api/priests?active=true"),fetch("/api/parishes")]);if(v.current)return;let s=e.ok?(await e.json()).filter(e=>!e.isCurrent):[],r=t.ok?await t.json():[],n=i.ok?await i.json():[];if(v.current)return;u(s),p(r),x(n),g.current=!0,c(!0)}catch{}finally{y.current=!1}}},[]);return((0,s.useEffect)(()=>{if(Date.now()>r)return;v.current=!1;let e=setTimeout(()=>{w()},2e4),t=()=>{w()};return window.addEventListener(n,t),()=>{v.current=!0,clearTimeout(e),window.removeEventListener(n,t)}},[w]),(0,s.useEffect)(()=>{if(!e)return;let t=e=>"Escape"===e.key&&b();document.addEventListener("keydown",t);let i=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=i}},[e,b]),e)?(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":"Walk Through the Website",children:[(0,t.jsx)("style",{children:` 10 @keyframes popup-marquee-scroll { 11 from { transform: translateX(0); } 12 to { transform: translateX(-50%); } 13 } 14 .popup-marquee { 15 animation-name: popup-marquee-scroll; 16 animation-timing-function: linear; 17 animation-iteration-count: infinite; 18 } 19 .popup-marquee-track:hover .popup-marquee { 20 animation-play-state: paused; 21 } 22 @media (prefers-reduced-motion: reduce) { 23 .popup-marquee { animation: none; } 24 .popup-marquee-track { overflow-x: auto; } 25 } 26 `}),(0,t.jsx)("div",{className:"absolute inset-0 bg-accent/70 backdrop-blur-sm",onClick:b,"aria-hidden":"true"}),(0,t.jsxs)("div",{className:"relative w-full max-w-5xl max-h-[92dvh] flex flex-col bg-cream rounded-2xl shadow-2xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"bg-primary text-white px-4 sm:px-6 py-4 flex items-start justify-between gap-4 shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-serif text-xl sm:text-2xl font-bold",children:"Walk Through the Website"}),(0,t.jsx)("p",{className:"text-white/80 text-xs sm:text-sm mt-0.5",children:"Former Bishops · Priests · Parishes · Seminary Day"})]}),(0,t.jsx)("button",{type:"button",onClick:b,"aria-label":"Close walkthrough popup",className:"shrink-0 rounded-full bg-white/15 hover:bg-white/30 transition-colors p-2 -mr-1",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain py-5 space-y-6",children:[(0,t.jsx)("div",{className:"px-4 sm:px-6",children:(0,t.jsx)(i.default,{href:"/seminary-day",onClick:b,className:"block rounded-xl bg-gradient-to-br from-primary to-accent text-white p-4 sm:p-5 shadow-md ring-1 ring-secondary/50 hover:ring-secondary transition-shadow hover:shadow-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-secondary text-[0.6875rem] sm:text-xs font-semibold tracking-widest uppercase",children:"Featured"}),(0,t.jsx)("p",{className:"font-serif text-lg sm:text-xl font-bold mt-0.5",children:"Seminary Day"}),(0,t.jsx)("p",{className:"text-white/85 text-xs sm:text-sm mt-1",children:"Praying for, supporting, and celebrating those discerning a call to the priesthood in our diocese. Tap to visit the Seminary Day page."})]}),(0,t.jsx)("svg",{className:"w-6 h-6 shrink-0 text-secondary",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 7l5 5-5 5M6 12h12"})})]})})}),(0,t.jsx)(d,{title:"Former Bishops",count:h.length,duration:Math.max(30,5*h.length),children:h.map((e,s)=>(0,t.jsxs)(i.default,{href:"/bishops",onClick:b,className:"w-64 h-28 shrink-0 bg-white rounded-xl border border-secondary/30 p-2 shadow-sm flex gap-3 hover:border-secondary hover:shadow-md transition-shadow",children:[(0,t.jsx)(l,{src:e.photoUrl,name:e.name,className:"w-20 h-full"}),(0,t.jsxs)("div",{className:"min-w-0 flex flex-col justify-center",children:[(0,t.jsx)("p",{className:"font-semibold text-gray-900 text-sm leading-snug line-clamp-2",children:e.name}),o(e)&&(0,t.jsxs)("p",{className:"text-xs text-primary mt-1",children:["Episcopate: ",o(e)]}),a(e.dateOfBirth)&&a(e.dateOfDeath)&&(0,t.jsxs)("p",{className:"text-[0.6875rem] text-gray-500 mt-0.5",children:[a(e.dateOfBirth)," â ",a(e.dateOfDeath)]})]})]},`${e.id}-${s}`))}),(0,t.jsx)(d,{title:"Priests",count:m.length,duration:Math.max(60,4*m.length),children:m.map((e,s)=>{let r=e.currentAssignments?.[0];return(0,t.jsxs)(i.default,{href:`/priests?search=${encodeURIComponent(e.name)}
26`,onClick:b,className:"w-64 h-28 shrink-0 bg-white rounded-xl border border-secondary/30 p-2 shadow-sm flex gap-3 hover:border-secondary hover:shadow-md transition-shadow",children:[(0,t.jsx)(l,{src:e.photoUrl,name:e.name,className:"w-20 h-full"}),(0,t.jsxs)("div",{className:"min-w-0 flex flex-col justify-center",children:[(0,t.jsx)("p",{className:"font-semibold text-gray-900 text-sm leading-snug line-clamp-2",children:e.name}),r?.designation?.name?(0,t.jsxs)("p",{className:"text-xs text-primary mt-1 line-clamp-2",children:[r.designation.name,r.parish?.name?`, ${r.parish.name}`:""]}):e.credentials?(0,t.jsx)("p",{className:"text-[0.6875rem] text-gray-500 mt-1 truncate",children:e.credentials}):null,e.isAbroad&&e.abroadCountry?(0,t.jsxs)("p",{className:"text-[0.6875rem] text-gray-500 mt-0.5",children:["Serving in ",e.abroadCountry]}):e.placeName?(0,t.jsx)("p",{className:"text-[0.6875rem] text-gray-500 mt-0.5 truncate",children:e.placeName}):null]})]},`${e.id}-${s}`)})}),(0,t.jsx)(d,{title:"Parishes",count:f.length,duration:Math.max(60,4*f.length),children:f.map((e,s)=>{let r=e.currentAssignments?.[0];return(0,t.jsxs)(i.default,{href:`/parishes/${e.slug}`,onClick:b,className:"w-80 h-32 shrink-0 bg-white rounded-xl border border-secondary/30 p-2 shadow-sm flex gap-3 hover:border-secondary hover:shadow-md transition-shadow",children:[(0,t.jsx)(l,{src:e.photoUrl,name:e.name,className:"w-24 h-full"}),(0,t.jsxs)("div",{className:"min-w-0 flex flex-col justify-center",children:[(0,t.jsx)("p",{className:"text-[0.625rem] font-semibold uppercase tracking-wide text-secondary",children:e.forane}),(0,t.jsx)("p",{className:"font-semibold text-gray-900 text-sm leading-snug line-clamp-2",children:e.name}),r?.priest?.name&&(0,t.jsxs)("p",{className:"text-xs text-primary mt-1 line-clamp-2",children:[r.designation?.name||"Vicar",": ",r.priest.name]}),(0,t.jsx)("p",{className:"text-[0.6875rem] text-gray-500 mt-0.5 truncate",children:[e.placeName,e.establishedYear?`Est. ${e.establishedYear}`:""].filter(Boolean).join(" · ")})]})]},`${e.id}-${s}`)})})]})]})]}):null}])},162225,e=>{"use strict";async function t(e,s,r=3){let n;for(let t=1;t<=r;t++)try{let n=await fetch(e,s);if(n.status>=500&&t<r){await i(t);continue}return n}catch(e){if(n=e,t<r){await i(t);continue}break}throw n}function i(e){return new Promise(t=>setTimeout(t,300*e))}e.s(["fetchWithRetry",0,t])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.