@maycolem/stories 17.0.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var hr;function Na(){return hr||(hr=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(a=o(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var s in a)e.call(a,s)&&a[s]&&(i=o(i,s));return i}function o(a,i){return i?a?a+" "+i:a+i:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(tn)),tn.exports}var Da=Na();const Bt=ko(Da);function Ba(){const[t,e]=h.useState({width:0,height:0}),n=h.useRef();return[h.useCallback(o=>{n.current&&n.current.disconnect(),o&&(n.current=new ResizeObserver(a=>{const i=a[0];if(!i)return;const{width:s,height:u}=i.contentRect;s&&u&&e({width:s,height:u})}),n.current.observe(o))},[]),t]}var en,mr;function ka(){return mr||(mr=1,en={hexToRGB:r=>{let o=r;return o.length===4&&(o=o[0]+o[1]+o[1]+o[2]+o[2]+o[3]+o[3]),{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}},formatRGB:({r,g:o,b:a})=>`rgb(${r},${o},${a})`,formatRGBA:({r,g:o,b:a},i)=>`rgba(${r},${o},${a},${i})`}),en}var nn,gr;function Fa(){if(gr)return nn;gr=1;const{hexToRGB:t,formatRGB:e,formatRGBA:n}=ka();return nn=(o,a)=>{const i=t(o);return typeof a=="number"&&a>=0&&a<=1?n(i,a):e(i)},nn}var Ha=Fa();const Wa=ko(Ha),qe=({image:t,title:e,color:n,className:r,onProfileClick:o,width:a,hasSeenAllStories:i})=>{const[s,{width:u,height:l}]=Ba();return y.jsx("div",{ref:s,children:y.jsxs("div",{className:Bt(Ft.ProfileStory,r,{[Ft.hasSeenAllStories]:i}),onClick:o,style:{"--story-color":n,"--story-color-alpha":n&&Wa(n,.7),"--story-width":a??`${u}px`},children:[y.jsx("div",{className:Ft.ProfileStoryWrap,children:y.jsx("div",{className:Ft.ProfileStory__wrapImage,children:y.jsx("div",{className:Ft.ProfileStory__image,children:y.jsx("img",{src:t,alt:"",draggable:!1})})})}),e&&y.jsx("div",{className:Ft.ProfileStory__title,children:e})]})})},Ot="react-horizontal-scrolling-menu",qa=`${Ot}--item`,Ga=`${Ot}--scroll-container`,za=`${Ot}--wrapper`,Ua=`${Ot}--inner-wrapper`,Ya=`${Ot}--header`,Xa=`${Ot}--arrow-left`,Za=`${Ot}--arrow-right`,Ka=`${Ot}--footer`,Ja="itemId",Fo="data-key",Ho="data-index",mt={first:"first",last:"last",onInit:"onInit",onUpdate:"onUpdate"},ct="",Qa={current:null};let _a=class{constructor(){this.subscribe=(e,n)=>{this.observers.set(e,(this.observers.get(e)||[]).concat(n))},this.unsubscribe=(e,n)=>{const r=(this.observers.get(e)||[]).filter(o=>o!==n);r.length?this.observers.set(e,r):this.observers.delete(e)},this.emitUpdates=(e,n)=>{const r=this.observers.get(e)||[];r==null||r.forEach(o=>o(n))},this.updateBatch=(e,n=!0)=>{e.length&&(e.forEach(([r,o])=>this.emitUpdates(r,o)),n&&this.emitUpdates(mt.onUpdate))},this.update=(e,n)=>{this.emitUpdates(e,n),this.emitUpdates(mt.onUpdate)},this.observers=new Map}},$a=class extends Map{constructor(){super(),this.subscribe=(e,n)=>this.observer.subscribe(e,n),this.unsubscribe=(e,n)=>this.observer.unsubscribe(e,n),this.isEdgeItem=({key:e,value:n,first:r=this.first(),last:o=this.last()})=>{const a=[];return e===(r==null?void 0:r.key)?a.push([mt.first,n]):e===(o==null?void 0:o.key)&&a.push([mt.last,n]),a},this.edgeItemsCheck=e=>{const n=this.first(),r=this.last(),o=e.find(([s])=>s===(n==null?void 0:n.key)),a=[];o&&a.push([mt.first,o[1]]);const i=e.find(([s])=>s===(r==null?void 0:r.key));return i&&a.push([mt.last,i[1]]),a},this.toArr=()=>this.sort([...this]),this.toItems=()=>this.toArr().map(([e])=>e),this.sort=e=>e.sort(([,n],[,r])=>+n.index-+r.index),this.set=(e,n)=>{const r=String(e),o=[[r,n]];return super.set(r,n),o.push(...this.isEdgeItem({key:r,value:n,first:this.first(),last:this.last()})),this.observer.updateBatch(o),this},this.setBatch=e=>{this.firstRun&&this.observer.update(mt.onInit);const n=[...e];return this.sort(n).forEach(([r,o])=>{super.set(String(r),o)}),n.push(...this.edgeItemsCheck(n)),this.observer.updateBatch(n,!this.firstRun),this.firstRun=!1,this},this.first=()=>{var e;return(e=this.toArr()[0])===null||e===void 0?void 0:e[1]},this.last=()=>{var e,n;return(n=(e=this.toArr().slice(-1))===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n[1]},this.filter=e=>this.toArr().filter(e),this.find=e=>this.toArr().find(e),this.findIndex=e=>this.toArr().findIndex(e),this.getCurrentPos=e=>{const n=this.toArr(),r=n.findIndex(([o,a])=>o===e||a===e);return[n,r]},this.prev=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o-1])===null||n===void 0?void 0:n[1]:void 0},this.next=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o+1])===null||n===void 0?void 0:n[1]:void 0},this.getVisible=()=>this.filter(e=>e[1].visible),this.observer=new _a,this.firstRun=!0}};const yr=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Sr=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",rn=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Sr(n.overflowY,e)||Sr(n.overflowX,e)||(r=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(t)}return!1},Se=(t,e,n,r,o,a,i,s)=>a<t&&i>e||a>t&&i<e?0:a<=t&&s<=n||i>=e&&s>=n?a-t-r:i>e&&s<n||a<t&&s>n?i-e+o:0,ts=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},br=(t,e)=>{var n,r,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f=typeof l=="function"?l:J=>J!==l;if(!yr(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=t;for(;yr(v)&&f(v);){if(v=ts(v),v===d){p.push(v);break}v!=null&&v===document.body&&rn(v)&&!rn(document.documentElement)||v!=null&&rn(v,c)&&p.push(v)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:g,scrollY:x}=window,{height:S,width:T,top:E,right:V,bottom:I,left:N}=t.getBoundingClientRect(),{top:j,right:k,bottom:K,left:H}=(J=>{const M=window.getComputedStyle(J);return{top:parseFloat(M.scrollMarginTop)||0,right:parseFloat(M.scrollMarginRight)||0,bottom:parseFloat(M.scrollMarginBottom)||0,left:parseFloat(M.scrollMarginLeft)||0}})(t);let F=s==="start"||s==="nearest"?E-j:s==="end"?I+K:E+S/2-j+K,R=u==="center"?N+T/2-H+k:u==="end"?V+k:N-H;const U=[];for(let J=0;J<p.length;J++){const M=p[J],{height:nt,width:rt,top:ot,right:W,bottom:Z,left:D}=M.getBoundingClientRect();if(i==="if-needed"&&E>=0&&N>=0&&I<=b&&V<=m&&E>=ot&&I<=Z&&N>=D&&V<=W)return U;const w=getComputedStyle(M),C=parseInt(w.borderLeftWidth,10),L=parseInt(w.borderTopWidth,10),O=parseInt(w.borderRightWidth,10),B=parseInt(w.borderBottomWidth,10);let q=0,tt=0;const et="offsetWidth"in M?M.offsetWidth-M.clientWidth-C-O:0,_="offsetHeight"in M?M.offsetHeight-M.clientHeight-L-B:0,xt="offsetWidth"in M?M.offsetWidth===0?0:rt/M.offsetWidth:0,Zt="offsetHeight"in M?M.offsetHeight===0?0:nt/M.offsetHeight:0;if(d===M)q=s==="start"?F:s==="end"?F-b:s==="nearest"?Se(x,x+b,b,L,B,x+F,x+F+S,S):F-b/2,tt=u==="start"?R:u==="center"?R-m/2:u==="end"?R-m:Se(g,g+m,m,C,O,g+R,g+R+T,T),q=Math.max(0,q+x),tt=Math.max(0,tt+g);else{q=s==="start"?F-ot-L:s==="end"?F-Z+B+_:s==="nearest"?Se(ot,Z,nt,L,B+_,F,F+S,S):F-(ot+nt/2)+_/2,tt=u==="start"?R-D-C:u==="center"?R-(D+rt/2)+et/2:u==="end"?R-W+O+et:Se(D,W,rt,C,O+et,R,R+T,T);const{scrollLeft:Kt,scrollTop:Jt}=M;q=Zt===0?0:Math.max(0,Math.min(Jt+q/Zt,M.scrollHeight-nt/Zt+_)),tt=xt===0?0:Math.max(0,Math.min(Kt+tt/xt,M.scrollWidth-rt/xt+et)),F+=Jt-q,R+=Kt-tt}U.push({el:M,top:q,left:tt})}return U};function xr(t,e){if(!t.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((o=>typeof o=="object"&&typeof o.behavior=="function")(e))return e.behavior(br(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:o,top:a,left:i}of br(t,(s=>s===!1?{block:"end",inline:"nearest"}:(u=>u===Object(u)&&Object.keys(u).length!==0)(s)?s:{block:"start",inline:"nearest"})(e))){const s=a-n.top+n.bottom,u=i-n.left+n.right;o.scroll({top:s,left:u,behavior:r})}}let on;const Wo=()=>(on||(on="performance"in window?performance.now.bind(performance):Date.now),on());function qo(t){const e=Wo(),n=Math.min((e-t.startTime)/t.duration,1),r=t.ease(n),o=t.startX+(t.x-t.startX)*r,a=t.startY+(t.y-t.startY)*r;t.method(o,a,n,r),o!==t.x||a!==t.y?requestAnimationFrame(()=>qo(t)):t.cb()}function es(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c=>1+--c*c*c*c*c,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0;const s=t,u=t.scrollLeft,l=t.scrollTop;qo({scrollable:s,method:(c,f,d,p)=>{const v=Math.ceil(c),m=Math.ceil(f);t.scrollLeft=v,t.scrollTop=m,i==null||i({target:t,elapsed:d,value:p,left:v,top:m})},startTime:Wo(),startX:u,startY:l,x:e,y:n,duration:r,ease:o,cb:a})}const ns=function(t,e){const n=e||{};return(r=>r&&!r.behavior||r.behavior==="smooth")(n)?xr(t,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,skipOverflowHiddenElements:n.skipOverflowHiddenElements,behavior:r=>Promise.all(r.reduce((o,a)=>{let{el:i,left:s,top:u}=a;const l=i.scrollLeft,c=i.scrollTop;return l===s&&c===u?o:[...o,new Promise(f=>es(i,s,u,n.duration,n.ease,()=>f({el:i,left:[l,s],top:[c,u]}),n.onScrollChange))]},[]))}):Promise.resolve(xr(t,e))},rs=t=>Object.values(t).map(e=>e.current).filter(Boolean);function an(t,e,n,r,o,a){var i;const s=((i=t==null?void 0:t.entry)===null||i===void 0?void 0:i.target)||t;if(!s)return;const u={behavior:e||"smooth",inline:n||"end",block:r||"nearest"};return a?s.scrollIntoView(u):ns(s,Object.assign(Object.assign({},o),u))}const os=t=>document.querySelector(`[${Fo}='${t}']`),is=t=>document.querySelector(`[${Ho}='${t}']`);function be(t){return h.isValidElement(t)&&t||typeof t=="function"&&h.createElement(t,null)||!!t&&typeof t=="object"&&h.createElement(t,null)||null}const Go=t=>{var e;return String(((e=t==null?void 0:t.props)===null||e===void 0?void 0:e[Ja])||String((t==null?void 0:t.key)||ct).replace(/^\.\$/,ct))};function xn(t){return!!t&&Object.prototype.hasOwnProperty.call(t,"current")}var as=h.memo(function({children:t,className:e,id:n,index:r,refs:o}){const a=h.useRef(null);return o[String(r)]=a,h.createElement("div",{className:e,[Fo]:n,[Ho]:r,ref:a},t)});function ss({children:t,itemClassName:e=ct,refs:n}){const r=h.Children.toArray(t).filter(Boolean),o=h.useMemo(()=>`${qa} ${e}`,[e]);return r.map((a,i)=>{const s=Go(a);return h.createElement(as,{className:o,id:s,key:s,refs:n,index:i},a)})}function us({className:t=ct,children:e,onScroll:n=()=>{},scrollRef:r,containerRef:o}){const a=h.useMemo(()=>`${Ga} ${t}`,[t]),i=h.useCallback(s=>{xn(r)?r.current=s:r(s),xn(o)?o.current=s:o(s)},[r,o]);return h.createElement("div",{className:a,onScroll:n,ref:i},e)}const ls=h.createContext({}),cs=typeof window<"u"?h.useLayoutEffect:h.useEffect;function fs({items:t,itemsChanged:e,refs:n,options:r}){const o=h.useRef(),a=h.useCallback(i=>{t.setBatch(function(s,u){return[...s].map(l=>{var c,f,d,p;const v=l.target,m=String((f=(c=v==null?void 0:v.dataset)===null||c===void 0?void 0:c.key)!==null&&f!==void 0?f:ct);return[m,{index:String((p=(d=v==null?void 0:v.dataset)===null||d===void 0?void 0:d.index)!==null&&p!==void 0?p:ct),key:m,entry:l,visible:l.intersectionRatio>=u.ratio}]})}(i,r))},[t,r]);cs(()=>{const i=rs(n),s=o.current||new IntersectionObserver(a,r);return o.current=s,i.forEach(u=>s.observe(u)),()=>{s.disconnect(),o.current=void 0}},[a,e,r,n])}const ds=t=>h.Children.toArray(t).map(Go).filter(Boolean),Pr={ratio:.9,rootMargin:"5px",threshold:[.05,.5,.75,.95]},vs={current:{}},xe=()=>{};function ps({LeftArrow:t,RightArrow:e,children:n,Header:r,Footer:o,transitionDuration:a=500,transitionBehavior:i,onInit:s=xe,onUpdate:u=xe,onMouseDown:l,onMouseLeave:c,onMouseUp:f,onMouseMove:d,onScroll:p=xe,onTouchMove:v,onTouchStart:m,onTouchEnd:b,onWheel:g=xe,options:x=Pr,scrollContainerClassName:S=ct,containerRef:T=Qa,itemClassName:E=ct,wrapperClassName:V=ct,apiRef:I=vs,RTL:N,noPolyfill:j}){const k=be(t),K=be(e),H=be(r),F=be(o),R=h.useRef(null),[U]=h.useState({}),J=h.useMemo(()=>Object.assign(Object.assign(Object.assign({},Pr),x),{root:R.current}),[x]),M=h.useRef(new $a).current,nt=function(O,B){const[q,tt]=h.useState(ct),et=h.useMemo(()=>ds(O),[O]);return h.useEffect(()=>{const _=et.filter(Boolean).join(ct);B.toItems().filter(xt=>!et.includes(xt)).forEach(xt=>{B.delete(xt)}),tt(_)},[et,B]),q}(n,M);fs(h.useMemo(()=>({items:M,itemsChanged:nt,options:J,refs:U}),[M,nt,U,J]));const rt=h.useMemo(()=>function(O,B,q){var tt,et,_;const xt=!!(!((tt=O.first())===null||tt===void 0)&&tt.visible),Zt=!!(!((et=O.last())===null||et===void 0)&&et.visible),Kt=G=>{var Y;return(Y=O.find(st=>st[1].key===String(G)))===null||Y===void 0?void 0:Y[1]},Jt=()=>{var G,Y;const st=(Y=(G=O.getVisible())===null||G===void 0?void 0:G[0])===null||Y===void 0?void 0:Y[1];return st?O.prev(st):void 0},pr=()=>{var G;const Y=(G=O.getVisible().findLast(()=>!0))===null||G===void 0?void 0:G[1];return Y?O.next(Y):void 0},_e=(_=B==null?void 0:B.boundary)===null||_===void 0?void 0:_.current;return{getItemById:Kt,getItemElementById:os,getItemByIndex:G=>{var Y;return(Y=O.find(st=>String(st[1].index)===String(G)))===null||Y===void 0?void 0:Y[1]},getItemElementByIndex:is,getNextElement:pr,getPrevElement:Jt,isFirstItemVisible:xt,isItemVisible:G=>O.getVisible().map(Y=>Y[0]).includes(String(G)),isLastItem:G=>O.last()===Kt(G),isLastItemVisible:Zt,scrollNext:(G,Y,st,{duration:Pt,boundary:vt=_e}={})=>{const gt=G??(B==null?void 0:B.behavior);return an(pr(),gt,Y||"start",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},q)},scrollPrev:(G,Y,st,{duration:Pt,boundary:vt=_e}={})=>{const gt=G??(B==null?void 0:B.behavior);return an(Jt(),gt,Y||"end",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},q)},useIsVisible:(G,Y=!1)=>{const[st,Pt]=h.useState(Y),vt=h.useCallback(gt=>{Pt(!!(gt!=null&>.visible))},[]);return h.useEffect(()=>(O.subscribe(G,vt),()=>{O.unsubscribe(G,vt)}),[G,vt]),st},scrollToItem:(G,Y,st,Pt,vt)=>{var gt;return an(G,Y??(B==null?void 0:B.behavior),st,Pt,Object.assign(Object.assign({boundary:_e},vt),{duration:(gt=vt==null?void 0:vt.duration)!==null&>!==void 0?gt:B==null?void 0:B.duration}),q)}}}(M,{duration:a,behavior:i,boundary:R},j),[M,a,i,j]),ot=h.useCallback(()=>Object.assign(Object.assign({},rt),{items:M,scrollContainer:R}),[rt,M,R]),[W,Z]=h.useState(()=>ot());(({context:O,onInit:B,onUpdate:q})=>{const tt=h.useCallback(()=>B(O),[B,O]),et=h.useCallback(()=>q(O),[q,O]),{items:_}=O;h.useEffect(()=>(_.subscribe(mt.onInit,tt),_.subscribe(mt.onUpdate,et),()=>{_.unsubscribe(mt.onInit,tt),_.unsubscribe(mt.onUpdate,et)}),[_,tt,et])})({context:W,onInit:s,onUpdate:u}),h.useEffect(()=>Z(ot()),[ot]),h.useEffect(()=>{xn(I)?I.current=W:I(W)},[W,I]);const D=h.useCallback(O=>p(W,O),[p,W]),w=h.useCallback(O=>g(W,O),[g,W]),C=h.useMemo(()=>`${za} ${V}`,[V]),L=h.useMemo(()=>`${S}${N?" rtl":ct}`,[N,S]);return h.createElement("div",{className:C,onWheel:w,onMouseDown:l==null?void 0:l(W),onMouseLeave:c==null?void 0:c(W),onMouseUp:f==null?void 0:f(W),onMouseMove:d==null?void 0:d(W),onTouchStart:m==null?void 0:m(W),onTouchMove:v==null?void 0:v(W),onTouchEnd:b==null?void 0:b(W)},h.createElement(ls.Provider,{value:W},h.createElement("div",{className:Ya},H),h.createElement("div",{className:Ua},h.createElement("div",{className:Xa},k),h.createElement(us,{className:L,onScroll:D,scrollRef:R,containerRef:T},h.createElement(ss,{refs:U,itemClassName:E},n)),h.createElement("div",{className:Za},K)),h.createElement("div",{className:Ka},F)))}const hs="_StoryPlayer_3s15o_1",ms="_Overlay_3s15o_15",gs="_StoryPlayer__Wrap_3s15o_25",ys="_progressContainer_3s15o_37",Ss="_CloseIcon_3s15o_41",bs="_inline_3s15o_57",xs="_progressBarContainer_3s15o_75",Ps="_progressBar_3s15o_75",Ct={StoryPlayer:hs,Overlay:ms,StoryPlayer__Wrap:gs,progressContainer:ys,CloseIcon:Ss,inline:bs,progressBarContainer:xs,progressBar:Ps};var X=function(){return X=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},X.apply(this,arguments)},zo=h.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),sn=Object.freeze({LEFT:"left",RIGHT:"right"}),Ts="Actions-styles_left__eky50",ws="Actions-styles_right__zguoH";function Es(t){var e=t.onNextClick,n=t.onPrevClick,r=t.onPause,o=t.onResume,a=h.useState(!1),i=a[0],s=a[1],u=h.useRef(null);function l(d){d.stopPropagation(),d.preventDefault(),clearTimeout(u.current),u.current=setTimeout(function(){r(),s(!0)},200)}function c(d,p){if(p.stopPropagation(),p.preventDefault(),clearTimeout(u.current),i)return o(),void s(!1);o(),d!=sn.LEFT?e():n()}function f(d){return{onMouseUp:function(p){return c(d,p)},onTouchEnd:function(p){return c(d,p)},onTouchStart:function(p){return l(p)},onMouseDown:function(p){return l(p)}}}return y.jsxs(h.Fragment,{children:[y.jsx("div",X({className:Ts},f(sn.LEFT))),y.jsx("div",X({className:ws},f(sn.RIGHT)))]})}function Ge(){return h.useContext(zo)}var Vs="ProgressBar-styles_wrapper__oqUCo",Cs="ProgressBar-styles_bar__x0O50",Tr=0,wr=.1;function js(t){var e,n,r,o,a,i=Ge(),s=i.defaultDuration,u=i.classNames,l=h.useRef(null),c=h.useRef(null),f=h.useState(!1),d=f[0],p=f[1];return h.useEffect(function(){!t.isPaused&&t.isActive&&t.isActive?p(!0):p(!1)},[t.isActive,t.isPaused]),h.useEffect(function(){var v;l.current&&(t.hasStoryPassed?l.current.style.width="".concat((v=c==null?void 0:c.current)===null||v===void 0?void 0:v.offsetWidth,"px"):l.current.style.width="0px")},[t.hasStoryPassed,t.isActive]),e=function(v){var m;l.current&&c.current&&((Tr=Number((l.current.style.width||"1px").slice(0,l.current.style.width.length-2))||0)>c.current.offsetWidth?p(!1):(wr=((m=c==null?void 0:c.current)===null||m===void 0?void 0:m.offsetWidth)/((t.story.duration||s)/v),l.current.style.width="".concat(Tr+wr,"px")))},n=d,r=h.useRef(),o=h.useRef(),a=h.useRef(e),h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function v(m){if(o.current!=null){var b=m-o.current;a.current(b)}o.current=m,r.current=requestAnimationFrame(v)}),function(){cancelAnimationFrame(r.current),r.current=null,o.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),o.current=null}},[n]),y.jsx("div",X({className:"".concat(Vs," ").concat((u==null?void 0:u.progressBarContainer)||""),ref:c},{children:y.jsx("div",{className:"".concat(Cs," ").concat((u==null?void 0:u.progressBar)||""),ref:l})}))}var Rs="progress-styles_wrapper__qQPyW";function As(t){var e=Ge(),n=e.stories,r=e.classNames;return y.jsx("div",X({className:"".concat(Rs," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(o){return y.jsx(js,{hasStoryPassed:o.index<t.activeStoryIndex,isActive:o.index===t.activeStoryIndex,story:o,isPaused:o.index===t.activeStoryIndex&&t.isPaused},o.index)})}))}var un=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),Ms="Story-styles_wrapper__oJP7j",Is="Story-styles_header__-rnWL",Os="Image-styles_image__gnfW1";function Ls(t){return h.useEffect(function(){t.onPause()},[]),y.jsx("img",{className:Os,src:t.story.url,alt:"story",onLoad:function(){setTimeout(function(){t.onResume()},4)}})}var ln,Ns="Video-styles_video__BykuO",Ds="Video-styles_loaderWrapper__TqVWk",Bs="Video-styles_loader__FxxSV",ks="Video-styles_soundIcon__ZvYXE";function Fs(t){return t.type==="off"?y.jsx("svg",X({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):y.jsx("svg",X({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var Pn="RSIsMute",Ht=typeof window>"u"?{}:window;function Hs(t){var e,n=Ge().isPaused,r=h.useState(((e=Ht==null?void 0:Ht.localStorage)===null||e===void 0?void 0:e.getItem(Pn))==="true"),o=r[0],a=r[1],i=h.useState(!1),s=i[0],u=i[1],l=h.useRef(null);function c(f){var d;(d=Ht==null?void 0:Ht.localStorage)===null||d===void 0||d.setItem(Pn,String(f)),a(f)}return h.useEffect(function(){t.onPause(),u(!0)},[]),h.useEffect(function(){l.current&&(!n||l.current.paused?l.current.play().catch(function(){var f;c(!0),(f=l.current)===null||f===void 0||f.play()}):l.current.pause())},[n]),y.jsxs(h.Fragment,{children:[y.jsxs("video",X({className:Ns,ref:l,playsInline:!0,"webkit-playsinline":"",controls:!1,src:t.story.url,onLoadedData:function(){setTimeout(function(){t.onResume(),u(!1)},4)},muted:o},{children:[y.jsx("source",{src:t.story.url,type:"video/mp4"}),y.jsx("source",{src:t.story.url,type:"video/webm"}),y.jsx("source",{src:t.story.url,type:"video/ogg"}),y.jsx("p",{children:"Video not supported"})]})),y.jsx("div",X({className:ks,onClick:function(){return c(!o)}},{children:y.jsx(Fs,{type:o?"off":"on"})})),s&&y.jsx("div",X({className:Ds},{children:y.jsx("div",{className:Bs})}))]})}(ln=Ht==null?void 0:Ht.localStorage)===null||ln===void 0||ln.setItem(Pn,"true");var Ws="CustomComponents-styles_component__w87Wx";function qs(t){return y.jsx("div",X({className:Ws},{children:y.jsx(t.story.component,{pause:t.onPause,resume:t.onResume,story:t.story,isPaused:t.isPaused})}))}var Gs="SeeMore-styles_seeMoreWrapper__kwjif",zs="SeeMore-styles_defaultSeeMore__-B1QW";function Us(t){return t.story.seeMore?y.jsx("button",X({type:"button",onClick:function(){t.onSeeMoreClick()},className:Gs},{children:function(){var e=t.story.seeMore,n=typeof e;if(["string","boolean"].includes(n)){var r=n==="string"?e:"See More";return y.jsxs("div",X({className:zs},{children:[y.jsx("span",{children:"^"}),y.jsx("p",{children:r})]}))}return n==="function"?y.jsx(t.story.seeMore,{}):t.story.seeMore}()})):null}var Ys="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",Xs="SeeMoreComponent-styles_closeIcon__LMm3b";function Zs(t){return t.story.seeMore&&t.story.seeMoreComponent?y.jsxs("div",X({className:Ys},{children:[y.jsx("button",X({className:Xs,onClick:t.onClose},{children:"✕"})),typeof t.story.seeMoreComponent=="function"?y.jsx(t.story.seeMoreComponent,{}):t.story.seeMoreComponent]})):null}function Ks(t){var e=h.useState(!1),n=e[0],r=e[1],o=Ge().classNames;return h.useEffect(function(){r(!1)},[t.story]),y.jsxs("div",X({className:"".concat(Ms," ").concat((o==null?void 0:o.storyContainer)||"")},{children:[t.story.type===un.IMAGE?y.jsx(Ls,X({},t)):t.story.type===un.VIDEO?y.jsx(Hs,X({},t)):t.story.type===un.COMPONENT?y.jsx(qs,X({},t)):null,t.story.header&&y.jsx("div",X({className:Is},{children:typeof t.story.header=="function"?y.jsx(t.story.header,{}):t.story.header})),y.jsx(Us,{onSeeMoreClick:function(){var a,i;t.onPause(),r(!0),(i=(a=t.story).onSeeMoreClick)===null||i===void 0||i.call(a,t.story.index)},story:t.story}),n&&y.jsx(Zs,{story:t.story,onClose:function(){t.onResume(),r(!1)}})]}))}var Js="styles_main__-0FEu";function Er(t){return t===void 0&&(t=4),Number(Math.random().toFixed(t))}function Qs(t){var e,n,r,o,a,i,s,u=t.stories,l=u===void 0?[]:u,c=t.width,f=c===void 0?"100%":c,d=t.height,p=d===void 0?"100%":d,v=t.onStoryChange,m=v===void 0?function(){}:v,b=t.currentIndex,g=b===void 0?0:b,x=t.defaultDuration,S=x===void 0?1e4:x,T=t.onAllStoriesEnd,E=T===void 0?function(){}:T,V=t.onStoriesStart,I=V===void 0?function(){}:V,N=t.classNames,j=N===void 0?{}:N,k=t.pauseStoryWhenInActiveWindow,K=k===void 0||k,H=h.useMemo(function(){return function(L,O){var B=0;return L.map(function(q,tt){var et=q.duration||O,_=et+Er();return _===B&&(_=et+Er(6)),B=_,X(X({},q),{index:tt,calculatedDuration:_})})}(l,S)},[l,S]),F=h.useState(),R=F[0],U=F[1],J=l.length-1,M=h.useState(!1),nt=M[0],rt=M[1],ot=h.useRef(!1),W=h.useRef(!1);function Z(){ot.current||(R==null?void 0:R.index)!==J||(E(),ot.current=!0),(R==null?void 0:R.index)!==J&&U(function(L){if(!L)return H[0];var O=(L==null?void 0:L.index)+1;return H[O]})}function D(){rt(!0)}function w(){rt(!1)}h.useEffect(function(){W.current||(W.current=!0,I())},[I]),h.useEffect(function(){var L=H[g];L&&U(L)},[g,l]),h.useEffect(function(){R&&m(R.index)},[R]),n=function(){Z()},r=(e=R==null?void 0:R.calculatedDuration)!==null&&e!==void 0?e:null,o=nt,a=h.useRef(),i=h.useRef(r),s=h.useRef(Date.now()),h.useEffect(function(){a.current=n},[n]),h.useEffect(function(){i.current=r},[r]),h.useEffect(function(){if(r!==null&&o===!1){s.current=Date.now();var L=setTimeout(function(){a.current()},i.current);return function(){clearTimeout(L)}}return function(){}},[r,o]),h.useEffect(function(){o&&(i.current=i.current-(Date.now()-s.current))},[o]),function(L){var O=h.useRef(L);h.useEffect(function(){O.current=L},[L]),h.useEffect(function(){function B(){O.current(!0)}function q(){O.current(!1)}return window.addEventListener("focus",B),window.addEventListener("blur",q),function(){window.removeEventListener("focus",B),window.removeEventListener("blur",q)}},[])}(function(L){K&&rt(!L)});var C={stories:H,width:f,height:p,defaultDuration:S,isPaused:nt,classNames:j};return R?y.jsx(zo.Provider,X({value:C},{children:y.jsxs("div",X({className:"".concat(Js," ").concat(j.main||""),style:{width:f,height:p}},{children:[y.jsx(As,{activeStoryIndex:R.index,isPaused:nt}),y.jsx(Ks,{onPause:D,onResume:w,story:R,isPaused:nt},R.index),y.jsx(Es,{onNextClick:Z,onPrevClick:function(){(R==null?void 0:R.index)!==0&&U(function(L){if(!L)return H[0];var O=(L==null?void 0:L.index)-1;return H[O]})},onPause:D,onResume:w})]}))})):null}var Tn=function(t,e){return Tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Tn(t,e)};function Uo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Tn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},P.apply(this,arguments)};function dt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function $(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,a=[],i;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,a;r<o;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var Vr="production",Yo=typeof process>"u"||process.env===void 0?Vr:process.env.NODE_ENV||Vr,Tt=function(t){return{isEnabled:function(e){return t.some(function(n){return!!e[n]})}}},se={measureLayout:Tt(["layout","layoutId","drag"]),animation:Tt(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Tt(["exit"]),drag:Tt(["drag","dragControls"]),focus:Tt(["whileFocus"]),hover:Tt(["whileHover","onHoverStart","onHoverEnd"]),tap:Tt(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Tt(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Tt(["whileInView","onViewportEnter","onViewportLeave"])};function _s(t){for(var e in t)t[e]!==null&&(e==="projectionNodeConstructor"?se.projectionNodeConstructor=t[e]:se[e].Component=t[e])}var ve=function(){},lt=function(){};process.env.NODE_ENV!=="production"&&(ve=function(t,e){!t&&typeof console<"u"&&console.warn(e)},lt=function(t,e){if(!t)throw new Error(e)});var Xo=h.createContext({strict:!1}),Zo=Object.keys(se),$s=Zo.length;function tu(t,e,n){var r=[],o=h.useContext(Xo);if(!e)return null;Yo!=="production"&&n&&o.strict&<(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<$s;a++){var i=Zo[a],s=se[i],u=s.isEnabled,l=s.Component;u(t)&&l&&r.push(bn.createElement(l,P({key:i},t,{visualElement:e})))}return r}var qn=h.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),ze=h.createContext({});function eu(){return h.useContext(ze).visualElement}var Ue=h.createContext(null),Xt=typeof document<"u",Cr=Xt?h.useLayoutEffect:h.useEffect,wn={current:null},Ko=!1;function nu(){if(Ko=!0,!!Xt)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return wn.current=t.matches};t.addListener(e),e()}else wn.current=!1}function ru(){!Ko&&nu();var t=$(h.useState(wn.current),1),e=t[0];return e}function ou(){var t=ru(),e=h.useContext(qn).reducedMotion;return e==="never"?!1:e==="always"?!0:t}function iu(t,e,n,r){var o=h.useContext(Xo),a=eu(),i=h.useContext(Ue),s=ou(),u=h.useRef(void 0);r||(r=o.renderer),!u.current&&r&&(u.current=r(t,{visualState:e,parent:a,props:n,presenceId:i==null?void 0:i.id,blockInitialAnimation:(i==null?void 0:i.initial)===!1,shouldReduceMotion:s}));var l=u.current;return Cr(function(){l==null||l.syncRender()}),h.useEffect(function(){var c;(c=l==null?void 0:l.animationState)===null||c===void 0||c.animateChanges()}),Cr(function(){return function(){return l==null?void 0:l.notifyUnmount()}},[]),l}function Wt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function au(t,e,n){return h.useCallback(function(r){var o;r&&((o=t.mount)===null||o===void 0||o.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Wt(n)&&(n.current=r))},[e])}function Jo(t){return Array.isArray(t)}function ht(t){return typeof t=="string"||Jo(t)}function su(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.get()}),e}function uu(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.getVelocity()}),e}function Qo(t,e,n,r,o){var a;return r===void 0&&(r={}),o===void 0&&(o={}),typeof e=="function"&&(e=e(n??t.custom,r,o)),typeof e=="string"&&(e=(a=t.variants)===null||a===void 0?void 0:a[e]),typeof e=="function"&&(e=e(n??t.custom,r,o)),e}function Ye(t,e,n){var r=t.getProps();return Qo(r,e,n??r.custom,su(t),uu(t))}function Xe(t){var e;return typeof((e=t.animate)===null||e===void 0?void 0:e.start)=="function"||ht(t.initial)||ht(t.animate)||ht(t.whileHover)||ht(t.whileDrag)||ht(t.whileTap)||ht(t.whileFocus)||ht(t.exit)}function _o(t){return!!(Xe(t)||t.variants)}function lu(t,e){if(Xe(t)){var n=t.initial,r=t.animate;return{initial:n===!1||ht(n)?n:void 0,animate:ht(r)?r:void 0}}return t.inherit!==!1?e:{}}function cu(t){var e=lu(t,h.useContext(ze)),n=e.initial,r=e.animate;return h.useMemo(function(){return{initial:n,animate:r}},[jr(n),jr(r)])}function jr(t){return Array.isArray(t)?t.join(" "):t}function pe(t){var e=h.useRef(null);return e.current===null&&(e.current=t()),e.current}var $t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fu=1;function du(){return pe(function(){if($t.hasEverUpdated)return fu++})}var $o=h.createContext({}),ti=h.createContext({});function vu(t,e,n,r){var o,a=e.layoutId,i=e.layout,s=e.drag,u=e.dragConstraints,l=e.layoutScroll,c=h.useContext(ti);!r||!n||n!=null&&n.projection||(n.projection=new r(t,n.getLatestValues(),(o=n.parent)===null||o===void 0?void 0:o.projection),n.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||u&&Wt(u),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof i=="string"?i:"both",initialPromotionConfig:c,layoutScroll:l}))}var pu=function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var n=this.props,r=n.visualElement,o=n.props;r&&r.setProps(o)},e.prototype.render=function(){return this.props.children},e}(h.Component);function hu(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.projectionNodeConstructor,o=t.useRender,a=t.useVisualState,i=t.Component;e&&_s(e);function s(u,l){var c=mu(u);u=P(P({},u),{layoutId:c});var f=h.useContext(qn),d=null,p=cu(u),v=f.isStatic?void 0:du(),m=a(u,f.isStatic);return!f.isStatic&&Xt&&(p.visualElement=iu(i,m,P(P({},f),u),n),vu(v,u,p.visualElement,r||se.projectionNodeConstructor),d=tu(u,p.visualElement,e)),bn.createElement(pu,{visualElement:p.visualElement,props:P(P({},f),u)},d,bn.createElement(ze.Provider,{value:p},o(i,u,v,au(m,p.visualElement,l),m,f.isStatic,p.visualElement)))}return h.forwardRef(s)}function mu(t){var e,n=t.layoutId,r=(e=h.useContext($o))===null||e===void 0?void 0:e.id;return r&&n!==void 0?r+"-"+n:n}function gu(t){function e(r,o){return o===void 0&&(o={}),hu(t(r,o))}if(typeof Proxy>"u")return e;var n=new Map;return new Proxy(e,{get:function(r,o){return n.has(o)||n.set(o,e(o)),n.get(o)}})}var yu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Gn(t){return typeof t!="string"||t.includes("-")?!1:!!(yu.indexOf(t)>-1||/[A-Z]/.test(t))}var Oe={};function Su(t){Object.assign(Oe,t)}var En=["","X","Y","Z"],bu=["translate","scale","rotate","skew"],ue=["transformPerspective","x","y","z"];bu.forEach(function(t){return En.forEach(function(e){return ue.push(t+e)})});function xu(t,e){return ue.indexOf(t)-ue.indexOf(e)}var Pu=new Set(ue);function he(t){return Pu.has(t)}var Tu=new Set(["originX","originY","originZ"]);function ei(t){return Tu.has(t)}function ni(t,e){var n=e.layout,r=e.layoutId;return he(t)||ei(t)||(n||r!==void 0)&&(!!Oe[t]||t==="opacity")}var wt=function(t){return!!(t!==null&&typeof t=="object"&&t.getVelocity)},wu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Eu(t,e,n,r){var o=t.transform,a=t.transformKeys,i=e.enableHardwareAcceleration,s=i===void 0?!0:i,u=e.allowTransformNone,l=u===void 0?!0:u,c="";a.sort(xu);for(var f=!1,d=a.length,p=0;p<d;p++){var v=a[p];c+="".concat(wu[v]||v,"(").concat(o[v],") "),v==="z"&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}function Vu(t){var e=t.originX,n=e===void 0?"50%":e,r=t.originY,o=r===void 0?"50%":r,a=t.originZ,i=a===void 0?0:a;return"".concat(n," ").concat(o," ").concat(i)}function ri(t){return t.startsWith("--")}var Cu=function(t,e){return e&&typeof t=="number"?e.transform(t):t};const oi=(t,e)=>n=>Math.max(Math.min(n,e),t),te=t=>t%1?Number(t.toFixed(5)):t,le=/(-)?([\d]*\.?[\d])+/g,Vn=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,ju=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function me(t){return typeof t=="string"}const kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ee=Object.assign(Object.assign({},kt),{transform:oi(0,1)}),Pe=Object.assign(Object.assign({},kt),{default:1}),ge=t=>({test:e=>me(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),jt=ge("deg"),St=ge("%"),A=ge("px"),Ru=ge("vh"),Au=ge("vw"),Rr=Object.assign(Object.assign({},St),{parse:t=>St.parse(t)/100,transform:t=>St.transform(t*100)}),zn=(t,e)=>n=>!!(me(n)&&ju.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ii=(t,e,n)=>r=>{if(!me(r))return r;const[o,a,i,s]=r.match(le);return{[t]:parseFloat(o),[e]:parseFloat(a),[n]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},Dt={test:zn("hsl","hue"),parse:ii("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+St.transform(te(e))+", "+St.transform(te(n))+", "+te(ee.transform(r))+")"},Mu=oi(0,255),cn=Object.assign(Object.assign({},kt),{transform:t=>Math.round(Mu(t))}),Mt={test:zn("rgb","red"),parse:ii("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+cn.transform(t)+", "+cn.transform(e)+", "+cn.transform(n)+", "+te(ee.transform(r))+")"};function Iu(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Cn={test:zn("#"),parse:Iu,transform:Mt.transform},at={test:t=>Mt.test(t)||Cn.test(t)||Dt.test(t),parse:t=>Mt.test(t)?Mt.parse(t):Dt.test(t)?Dt.parse(t):Cn.parse(t),transform:t=>me(t)?t:t.hasOwnProperty("red")?Mt.transform(t):Dt.transform(t)},ai="${c}",si="${n}";function Ou(t){var e,n,r,o;return isNaN(t)&&me(t)&&((n=(e=t.match(le))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(r=t.match(Vn))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function ui(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const r=t.match(Vn);r&&(n=r.length,t=t.replace(Vn,ai),e.push(...r.map(at.parse)));const o=t.match(le);return o&&(t=t.replace(le,si),e.push(...o.map(kt.parse))),{values:e,numColors:n,tokenised:t}}function li(t){return ui(t).values}function ci(t){const{values:e,numColors:n,tokenised:r}=ui(t),o=e.length;return a=>{let i=r;for(let s=0;s<o;s++)i=i.replace(s<n?ai:si,s<n?at.transform(a[s]):te(a[s]));return i}}const Lu=t=>typeof t=="number"?0:t;function Nu(t){const e=li(t);return ci(t)(e.map(Lu))}const Et={test:Ou,parse:li,createTransformer:ci,getAnimatableNone:Nu},Du=new Set(["brightness","contrast","saturate","opacity"]);function Bu(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(le)||[];if(!r)return t;const o=n.replace(r,"");let a=Du.has(e)?1:0;return r!==n&&(a*=100),e+"("+a+o+")"}const ku=/([a-z-]*)\(.*?\)/g,jn=Object.assign(Object.assign({},Et),{getAnimatableNone:t=>{const e=t.match(ku);return e?e.map(Bu).join(" "):t}});var Ar=P(P({},kt),{transform:Math.round}),fi={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:jt,rotateX:jt,rotateY:jt,rotateZ:jt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:jt,skewX:jt,skewY:jt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:ee,originX:Rr,originY:Rr,originZ:A,zIndex:Ar,fillOpacity:ee,strokeOpacity:ee,numOctaves:Ar};function Un(t,e,n,r){var o,a=t.style,i=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(ri(p)){i[p]=v;continue}var m=fi[p],b=Cu(v,m);if(he(p)){if(c=!0,s[p]=b,u.push(p),!d)continue;v!==((o=m.default)!==null&&o!==void 0?o:0)&&(d=!1)}else ei(p)?(l[p]=b,f=!0):a[p]=b}c?a.transform=Eu(t,n,d,r):r?a.transform=r({},""):!e.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=Vu(l))}var Yn=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function di(t,e,n){for(var r in e)!wt(e[r])&&!ni(r,n)&&(t[r]=e[r])}function Fu(t,e,n){var r=t.transformTemplate;return h.useMemo(function(){var o=Yn();Un(o,e,{enableHardwareAcceleration:!n},r);var a=o.vars,i=o.style;return P(P({},a),i)},[e])}function Hu(t,e,n){var r=t.style||{},o={};return di(o,r,t),Object.assign(o,Fu(t,e,n)),t.transformValues&&(o=t.transformValues(o)),o}function Wu(t,e,n){var r={},o=Hu(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":"pan-".concat(t.drag==="x"?"y":"x")),r.style=o,r}var qu=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Le(t){return qu.has(t)}var vi=function(t){return!Le(t)};function Gu(t){t&&(vi=function(e){return e.startsWith("on")?!Le(e):t(e)})}try{Gu(require("@emotion/is-prop-valid").default)}catch{}function zu(t,e,n){var r={};for(var o in t)(vi(o)||n===!0&&Le(o)||!e&&!Le(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Mr(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Uu(t,e,n){var r=Mr(e,t.x,t.width),o=Mr(n,t.y,t.height);return"".concat(r," ").concat(o)}var Yu={offset:"strokeDashoffset",array:"strokeDasharray"};function Xu(t,e,n,r,o){n===void 0&&(n=1),r===void 0&&(r=0),t.pathLength=1;var a=Yu;t[a.offset]=A.transform(-r);var i=A.transform(e),s=A.transform(n);t[a.array]="".concat(i," ").concat(s)}function Xn(t,e,n,r){var o=e.attrX,a=e.attrY,i=e.originX,s=e.originY,u=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,f=e.pathOffset,d=f===void 0?0:f,p=dt(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Un(t,p,n,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,b=t.dimensions;v.transform&&(b&&(m.transform=v.transform),delete v.transform),b&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=Uu(b,i!==void 0?i:.5,s!==void 0?s:.5)),o!==void 0&&(v.x=o),a!==void 0&&(v.y=a),u!==void 0&&Xu(v,u,c,d)}var pi=function(){return P(P({},Yn()),{attrs:{}})};function Zu(t,e){var n=h.useMemo(function(){var o=pi();return Xn(o,e,{enableHardwareAcceleration:!1},t.transformTemplate),P(P({},o.attrs),{style:P({},o.style)})},[e]);if(t.style){var r={};di(r,t.style,t),n.style=P(P({},r),n.style)}return n}function Ku(t){t===void 0&&(t=!1);var e=function(n,r,o,a,i,s){var u=i.latestValues,l=Gn(n)?Zu:Wu,c=l(r,u,s),f=zu(r,typeof n=="string",t),d=P(P(P({},f),c),{ref:a});return o&&(d["data-projection-id"]=o),h.createElement(n,d)};return e}var Ju=/([a-z])([A-Z])/g,Qu="$1-$2",hi=function(t){return t.replace(Ju,Qu).toLowerCase()};function mi(t,e,n,r){var o=e.style,a=e.vars;Object.assign(t.style,o,r&&r.getProjectionStyles(n));for(var i in a)t.style.setProperty(i,a[i])}var gi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function yi(t,e,n,r){mi(t,e,void 0,r);for(var o in e.attrs)t.setAttribute(gi.has(o)?o:hi(o),e.attrs[o])}function Zn(t){var e=t.style,n={};for(var r in e)(wt(e[r])||ni(r,t))&&(n[r]=e[r]);return n}function Si(t){var e=Zn(t);for(var n in t)if(wt(t[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[r]=t[n]}return e}function Kn(t){return typeof t=="object"&&typeof t.start=="function"}var ce=function(t){return Array.isArray(t)},_u=function(t){return!!(t&&typeof t=="object"&&t.mix&&t.toValue)},bi=function(t){return ce(t)?t[t.length-1]||0:t};function Ae(t){var e=wt(t)?t.get():t;return _u(e)?e.toValue():e}function Ir(t,e,n,r){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,s={latestValues:$u(e,n,r,o),renderState:a()};return i&&(s.mount=function(u){return i(e,u,s)}),s}var xi=function(t){return function(e,n){var r=h.useContext(ze),o=h.useContext(Ue);return n?Ir(t,e,r,o):pe(function(){return Ir(t,e,r,o)})}};function $u(t,e,n,r){var o={},a=(n==null?void 0:n.initial)===!1,i=r(t);for(var s in i)o[s]=Ae(i[s]);var u=t.initial,l=t.animate,c=Xe(t),f=_o(t);e&&f&&!c&&t.inherit!==!1&&(u??(u=e.initial),l??(l=e.animate));var d=a||u===!1,p=d?l:u;if(p&&typeof p!="boolean"&&!Kn(p)){var v=Array.isArray(p)?p:[p];v.forEach(function(m){var b=Qo(t,m);if(b){var g=b.transitionEnd;b.transition;var x=dt(b,["transitionEnd","transition"]);for(var S in x){var T=x[S];if(Array.isArray(T)){var E=d?T.length-1:0;T=T[E]}T!==null&&(o[S]=T)}for(var S in g)o[S]=g[S]}})}return o}var tl={useVisualState:xi({scrapeMotionValuesFromProps:Si,createRenderState:pi,onMount:function(t,e,n){var r=n.renderState,o=n.latestValues;try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Xn(r,o,{enableHardwareAcceleration:!1},t.transformTemplate),yi(e,r)}})},el={useVisualState:xi({scrapeMotionValuesFromProps:Zn,createRenderState:Yn})};function nl(t,e,n,r,o){var a=e.forwardMotionProps,i=a===void 0?!1:a,s=Gn(t)?tl:el;return P(P({},s),{preloadedFeatures:n,useRender:Ku(i),createVisualElement:r,projectionNodeConstructor:o,Component:t})}var z;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(z||(z={}));function Ze(t,e,n,r){return r===void 0&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function Rn(t,e,n,r){h.useEffect(function(){var o=t.current;if(n&&o)return Ze(o,e,n,r)},[t,e,n,r])}function rl(t){var e=t.whileFocus,n=t.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(z.Focus,!0)},o=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(z.Focus,!1)};Rn(n,"focus",e?r:void 0),Rn(n,"blur",e?o:void 0)}function Pi(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function Ti(t){var e=!!t.touches;return e}function ol(t){return function(e){var n=e instanceof MouseEvent,r=!n||n&&e.button===0;r&&t(e)}}var il={pageX:0,pageY:0};function al(t,e){e===void 0&&(e="page");var n=t.touches[0]||t.changedTouches[0],r=n||il;return{x:r[e+"X"],y:r[e+"Y"]}}function sl(t,e){return e===void 0&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Jn(t,e){return e===void 0&&(e="page"),{point:Ti(t)?al(t,e):sl(t,e)}}var wi=function(t,e){e===void 0&&(e=!1);var n=function(r){return t(r,Jn(r))};return e?ol(n):n},ul=function(){return Xt&&window.onpointerdown===null},ll=function(){return Xt&&window.ontouchstart===null},cl=function(){return Xt&&window.onmousedown===null},fl={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},dl={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ei(t){return ul()?t:ll()?dl[t]:cl()?fl[t]:t}function Gt(t,e,n,r){return Ze(t,Ei(e),wi(n,e==="pointerdown"),r)}function Ne(t,e,n,r){return Rn(t,Ei(e),n&&wi(n,e==="pointerdown"),r)}function Vi(t){var e=null;return function(){var n=function(){e=null};return e===null?(e=t,n):!1}}var Or=Vi("dragHorizontal"),Lr=Vi("dragVertical");function Ci(t){var e=!1;if(t==="y")e=Lr();else if(t==="x")e=Or();else{var n=Or(),r=Lr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function ji(){var t=Ci(!0);return t?(t(),!1):!0}function Nr(t,e,n){return function(r,o){var a;!Pi(r)||ji()||((a=t.animationState)===null||a===void 0||a.setActive(z.Hover,e),n==null||n(r,o))}}function vl(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Ne(o,"pointerenter",e||r?Nr(o,!0,e):void 0,{passive:!e}),Ne(o,"pointerleave",n||r?Nr(o,!1,n):void 0,{passive:!n})}var Ri=function(t,e){return e?t===e?!0:Ri(t,e.parentElement):!1};function Ai(t){return h.useEffect(function(){return function(){return t()}},[])}const De=(t,e,n)=>Math.min(Math.max(n,t),e),Dr=.001,pl=.01,Br=10,hl=.05,ml=1;function gl({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,a;ve(t<=Br*1e3,"Spring duration must be 10 seconds or less");let i=1-e;i=De(hl,ml,i),t=De(pl,Br,t/1e3),i<1?(o=l=>{const c=l*i,f=c*t,d=c-n,p=An(l,i),v=Math.exp(-f);return Dr-d/p*v},a=l=>{const f=l*i*t,d=f*n+n,p=Math.pow(i,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=An(Math.pow(l,2),i);return(-o(l)+Dr>0?-1:1)*((d-p)*v)/m}):(o=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-.001+c*f},a=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const s=5/t,u=Sl(o,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:t}}}const yl=12;function Sl(t,e,n){let r=n;for(let o=1;o<yl;o++)r=r-t(r)/e(r);return r}function An(t,e){return t*Math.sqrt(1-e*e)}const bl=["duration","bounce"],xl=["stiffness","damping","mass"];function kr(t,e){return e.some(n=>t[n]!==void 0)}function Pl(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!kr(t,xl)&&kr(t,bl)){const n=gl(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Qn(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=dt(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:d}=Pl(a),p=Fr,v=Fr;function m(){const b=c?-(c/1e3):0,g=n-e,x=u/(2*Math.sqrt(s*l)),S=Math.sqrt(s/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),x<1){const T=An(S,x);p=E=>{const V=Math.exp(-x*S*E);return n-V*((b+x*S*g)/T*Math.sin(T*E)+g*Math.cos(T*E))},v=E=>{const V=Math.exp(-x*S*E);return x*S*V*(Math.sin(T*E)*(b+x*S*g)/T+g*Math.cos(T*E))-V*(Math.cos(T*E)*(b+x*S*g)-T*g*Math.sin(T*E))}}else if(x===1)p=T=>n-Math.exp(-S*T)*(g+(b+S*g)*T);else{const T=S*Math.sqrt(x*x-1);p=E=>{const V=Math.exp(-x*S*E),I=Math.min(T*E,300);return n-V*((b+x*S*g)*Math.sinh(I)+T*g*Math.cosh(I))/T}}}return m(),{next:b=>{const g=p(b);if(d)i.done=b>=f;else{const x=v(b)*1e3,S=Math.abs(x)<=r,T=Math.abs(n-g)<=o;i.done=S&&T}return i.value=i.done?n:g,i},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}Qn.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Fr=t=>0,fe=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Q=(t,e,n)=>-n*t+n*e+t;function fn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Hr({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,a=0,i=0;if(!e)o=a=i=n;else{const s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;o=fn(u,s,t+1/3),a=fn(u,s,t),i=fn(u,s,t-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}const Tl=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},wl=[Cn,Mt,Dt],Wr=t=>wl.find(e=>e.test(t)),qr=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Mi=(t,e)=>{let n=Wr(t),r=Wr(e);lt(!!n,qr(t)),lt(!!r,qr(e));let o=n.parse(t),a=r.parse(e);n===Dt&&(o=Hr(o),n=Mt),r===Dt&&(a=Hr(a),r=Mt);const i=Object.assign({},o);return s=>{for(const u in i)u!=="alpha"&&(i[u]=Tl(o[u],a[u],s));return i.alpha=Q(o.alpha,a.alpha,s),n.transform(i)}},Mn=t=>typeof t=="number",El=(t,e)=>n=>e(t(n)),Ke=(...t)=>t.reduce(El);function Ii(t,e){return Mn(t)?n=>Q(t,e,n):at.test(t)?Mi(t,e):Li(t,e)}const Oi=(t,e)=>{const n=[...t],r=n.length,o=t.map((a,i)=>Ii(a,e[i]));return a=>{for(let i=0;i<r;i++)n[i]=o[i](a);return n}},Vl=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ii(t[o],e[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}};function Gr(t){const e=Et.parse(t),n=e.length;let r=0,o=0,a=0;for(let i=0;i<n;i++)r||typeof e[i]=="number"?r++:e[i].hue!==void 0?a++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:a}}const Li=(t,e)=>{const n=Et.createTransformer(e),r=Gr(t),o=Gr(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?Ke(Oi(r.parsed,o.parsed),n):(ve(!0,`Complex values '${t}' and '${e}' 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.`),i=>`${i>0?e:t}`)},Cl=(t,e)=>n=>Q(t,e,n);function jl(t){if(typeof t=="number")return Cl;if(typeof t=="string")return at.test(t)?Mi:Li;if(Array.isArray(t))return Oi;if(typeof t=="object")return Vl}function Rl(t,e,n){const r=[],o=n||jl(t[0]),a=t.length-1;for(let i=0;i<a;i++){let s=o(t[i],t[i+1]);if(e){const u=Array.isArray(e)?e[i]:e;s=Ke(u,s)}r.push(s)}return r}function Al([t,e],[n]){return r=>n(fe(t,e,r))}function Ml(t,e){const n=t.length,r=n-1;return o=>{let a=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(a=r-1,i=!0),!i){let u=1;for(;u<n&&!(t[u]>o||u===r);u++);a=u-1}const s=fe(t[a],t[a+1],o);return e[a](s)}}function Ni(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const a=t.length;lt(a===e.length,"Both input and output ranges must be the same length"),lt(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=Rl(e,r,o),s=a===2?Al(t,i):Ml(t,i);return n?u=>s(De(t[0],t[a-1],u)):s}const Je=t=>e=>1-t(1-e),_n=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Il=t=>e=>Math.pow(e,t),Di=t=>e=>e*e*((t+1)*e-t),Ol=t=>{const e=Di(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},Bi=1.525,Ll=4/11,Nl=8/11,Dl=9/10,$n=t=>t,tr=Il(2),Bl=Je(tr),ki=_n(tr),Fi=t=>1-Math.sin(Math.acos(t)),er=Je(Fi),kl=_n(er),nr=Di(Bi),Fl=Je(nr),Hl=_n(nr),Wl=Ol(Bi),ql=4356/361,Gl=35442/1805,zl=16061/1805,Be=t=>{if(t===1||t===0)return t;const e=t*t;return t<Ll?7.5625*e:t<Nl?9.075*e-9.9*t+3.4:t<Dl?ql*e-Gl*t+zl:10.8*t*t-20.52*t+10.72},Ul=Je(Be),Yl=t=>t<.5?.5*(1-Be(1-t*2)):.5*Be(t*2-1)+.5;function Xl(t,e){return t.map(()=>e||ki).splice(0,t.length-1)}function Zl(t){const e=t.length;return t.map((n,r)=>r!==0?r/(e-1):0)}function Kl(t,e){return t.map(n=>n*e)}function Me({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const a={done:!1,value:t},i=Array.isArray(e)?e:[t,e],s=Kl(r&&r.length===i.length?r:Zl(i),o);function u(){return Ni(s,i,{ease:Array.isArray(n)?n:Xl(i,n)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=o,a),flipTarget:()=>{i.reverse(),l=u()}}}function Jl({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:e};let s=n*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/r);return i.done=!(f>o||f<-o),i.value=i.done?l:l+f,i},flipTarget:()=>{}}}const zr={keyframes:Me,spring:Qn,decay:Jl};function Ql(t){if(Array.isArray(t.to))return Me;if(zr[t.type])return zr[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Me:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Qn:Me}const Hi=1/60*1e3,_l=typeof performance<"u"?()=>performance.now():()=>Date.now(),Wi=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(_l()),Hi);function $l(t){let e=[],n=[],r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&o,d=f?e:n;return l&&i.add(u),d.indexOf(u)===-1&&(d.push(u),f&&o&&(r=e.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),i.delete(u)},process:u=>{if(o){a=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let l=0;l<r;l++){const c=e[l];c(u),i.has(c)&&(s.schedule(c),t())}o=!1,a&&(a=!1,s.process(u))}};return s}const tc=40;let In=!0,de=!1,On=!1;const zt={delta:0,timestamp:0},ye=["read","update","preRender","render","postRender"],Qe=ye.reduce((t,e)=>(t[e]=$l(()=>de=!0),t),{}),bt=ye.reduce((t,e)=>{const n=Qe[e];return t[e]=(r,o=!1,a=!1)=>(de||nc(),n.schedule(r,o,a)),t},{}),Ut=ye.reduce((t,e)=>(t[e]=Qe[e].cancel,t),{}),dn=ye.reduce((t,e)=>(t[e]=()=>Qe[e].process(zt),t),{}),ec=t=>Qe[t].process(zt),qi=t=>{de=!1,zt.delta=In?Hi:Math.max(Math.min(t-zt.timestamp,tc),1),zt.timestamp=t,On=!0,ye.forEach(ec),On=!1,de&&(In=!1,Wi(qi))},nc=()=>{de=!0,In=!0,On||Wi(qi)},ke=()=>zt;function Gi(t,e,n=0){return t-e-n}function rc(t,e,n=0,r=!0){return r?Gi(e+-t,e,n):e-(t-e)+n}function oc(t,e,n,r){return r?t>=e+n:t<=-n}const ic=t=>{const e=({delta:n})=>t(n);return{start:()=>bt.update(e,!0),stop:()=>Ut.update(e)}};function zi(t){var e,n,{from:r,autoplay:o=!0,driver:a=ic,elapsed:i=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:d,onRepeat:p,onUpdate:v}=t,m=dt(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=m,g,x=0,S=m.duration,T,E=!1,V=!0,I;const N=Ql(m);!((n=(e=N).needsInterpolation)===null||n===void 0)&&n.call(e,r,b)&&(I=Ni([0,100],[r,b],{clamp:!1}),r=0,b=100);const j=N(Object.assign(Object.assign({},m),{from:r,to:b}));function k(){x++,u==="reverse"?(V=x%2===0,i=rc(i,S,l,V)):(i=Gi(i,S,l),u==="mirror"&&j.flipTarget()),E=!1,p&&p()}function K(){g.stop(),d&&d()}function H(R){if(V||(R=-R),i+=R,!E){const U=j.next(Math.max(0,i));T=U.value,I&&(T=I(T)),E=V?U.done:i<=0}v==null||v(T),E&&(x===0&&(S??(S=i)),x<s?oc(i,S,l,V)&&k():K())}function F(){c==null||c(),g=a(H),g.start()}return o&&F(),{stop:()=>{f==null||f(),g.stop()}}}function Ui(t,e){return e?t*(1e3/e):0}function ac({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:f,onComplete:d,onStop:p}){let v;function m(S){return n!==void 0&&S<n||r!==void 0&&S>r}function b(S){return n===void 0?r:r===void 0||Math.abs(n-S)<Math.abs(r-S)?n:r}function g(S){v==null||v.stop(),v=zi(Object.assign(Object.assign({},S),{driver:c,onUpdate:T=>{var E;f==null||f(T),(E=S.onUpdate)===null||E===void 0||E.call(S,T)},onComplete:d,onStop:p}))}function x(S){g(Object.assign({type:"spring",stiffness:i,damping:s,restDelta:u},S))}if(m(t))x({from:t,velocity:e,to:b(t)});else{let S=o*e+t;typeof l<"u"&&(S=l(S));const T=b(S),E=T===n?-1:1;let V,I;const N=j=>{V=I,I=j,e=Ui(j-V,ke().delta),(E===1&&j>T||E===-1&&j<T)&&x({from:j,to:T,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:a,power:o,restDelta:u,modifyTarget:l,onUpdate:m(S)?N:void 0})}return{stop:()=>v==null?void 0:v.stop()}}const Ln=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Ur=t=>Ln(t)&&t.hasOwnProperty("z"),Te=(t,e)=>Math.abs(t-e);function Yi(t,e){if(Mn(t)&&Mn(e))return Te(t,e);if(Ln(t)&&Ln(e)){const n=Te(t.x,e.x),r=Te(t.y,e.y),o=Ur(t)&&Ur(e)?Te(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const Xi=(t,e)=>1-3*e+3*t,Zi=(t,e)=>3*e-6*t,Ki=t=>3*t,Fe=(t,e,n)=>((Xi(e,n)*t+Zi(e,n))*t+Ki(e))*t,Ji=(t,e,n)=>3*Xi(e,n)*t*t+2*Zi(e,n)*t+Ki(e),sc=1e-7,uc=10;function lc(t,e,n,r,o){let a,i,s=0;do i=e+(n-e)/2,a=Fe(i,r,o)-t,a>0?n=i:e=i;while(Math.abs(a)>sc&&++s<uc);return i}const cc=8,fc=.001;function dc(t,e,n,r){for(let o=0;o<cc;++o){const a=Ji(e,n,r);if(a===0)return e;const i=Fe(e,n,r)-t;e-=i/a}return e}const Ie=11,we=1/(Ie-1);function vc(t,e,n,r){if(t===e&&n===r)return $n;const o=new Float32Array(Ie);for(let i=0;i<Ie;++i)o[i]=Fe(i*we,t,n);function a(i){let s=0,u=1;const l=Ie-1;for(;u!==l&&o[u]<=i;++u)s+=we;--u;const c=(i-o[u])/(o[u+1]-o[u]),f=s+c*we,d=Ji(f,t,n);return d>=fc?dc(i,f,t,n):d===0?f:lc(i,s,s+we,t,n)}return i=>i===0||i===1?i:Fe(a(i),e,r)}function pc(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,o=t.whileTap,a=t.visualElement,i=e||n||r||o,s=h.useRef(!1),u=h.useRef(null),l={passive:!(n||e||r||v)};function c(){var m;(m=u.current)===null||m===void 0||m.call(u),u.current=null}function f(){var m;return c(),s.current=!1,(m=a.animationState)===null||m===void 0||m.setActive(z.Tap,!1),!ji()}function d(m,b){f()&&(Ri(a.getInstance(),m.target)?e==null||e(m,b):r==null||r(m,b))}function p(m,b){f()&&(r==null||r(m,b))}function v(m,b){var g;c(),!s.current&&(s.current=!0,u.current=Ke(Gt(window,"pointerup",d,l),Gt(window,"pointercancel",p,l)),(g=a.animationState)===null||g===void 0||g.setActive(z.Tap,!0),n==null||n(m,b))}Ne(a,"pointerdown",i?v:void 0,l),Ai(c)}var Yr=new Set;function Qi(t,e,n){t||Yr.has(e)||(console.warn(e),Yr.add(e))}var Nn=new WeakMap,vn=new WeakMap,hc=function(t){var e;(e=Nn.get(t.target))===null||e===void 0||e(t)},mc=function(t){t.forEach(hc)};function gc(t){var e=t.root,n=dt(t,["root"]),r=e||document;vn.has(r)||vn.set(r,{});var o=vn.get(r),a=JSON.stringify(n);return o[a]||(o[a]=new IntersectionObserver(mc,P({root:e},n))),o[a]}function yc(t,e,n){var r=gc(e);return Nn.set(t,n),r.observe(t),function(){Nn.delete(t),r.unobserve(t)}}function Sc(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,i=a===void 0?{}:a,s=h.useRef({hasEnteredView:!1,isInView:!1}),u=!!(n||r||o);i.once&&s.current.hasEnteredView&&(u=!1);var l=typeof IntersectionObserver>"u"?Pc:xc;l(u,s.current,e,i)}var bc={some:0,all:1};function xc(t,e,n,r){var o=r.root,a=r.margin,i=r.amount,s=i===void 0?"some":i,u=r.once;h.useEffect(function(){if(t){var l={root:o==null?void 0:o.current,rootMargin:a,threshold:typeof s=="number"?s:bc[s]},c=function(f){var d,p=f.isIntersecting;if(e.isInView!==p&&(e.isInView=p,!(u&&!p&&e.hasEnteredView))){p&&(e.hasEnteredView=!0),(d=n.animationState)===null||d===void 0||d.setActive(z.InView,p);var v=n.getProps(),m=p?v.onViewportEnter:v.onViewportLeave;m==null||m(f)}};return yc(n.getInstance(),l,c)}},[t,o,a,s])}function Pc(t,e,n,r){var o=r.fallback,a=o===void 0?!0:o;h.useEffect(function(){!t||!a||(Yo!=="production"&&Qi(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var i;e.hasEnteredView=!0;var s=n.getProps().onViewportEnter;s==null||s(null),(i=n.animationState)===null||i===void 0||i.setActive(z.InView,!0)}))},[t])}var It=function(t){return function(e){return t(e),null}},Tc={inView:It(Sc),tap:It(pc),focus:It(rl),hover:It(vl)},wc=0,Ec=function(){return wc++},Vc=function(){return pe(Ec)};function _i(){var t=h.useContext(Ue);if(t===null)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,o=Vc();h.useEffect(function(){return r(o)},[]);var a=function(){return n==null?void 0:n(o)};return!e&&n?[!1,a]:[!0]}function $i(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var He=function(t){return t*1e3},Xr={linear:$n,easeIn:tr,easeInOut:ki,easeOut:Bl,circIn:Fi,circInOut:kl,circOut:er,backIn:nr,backInOut:Hl,backOut:Fl,anticipate:Wl,bounceIn:Ul,bounceInOut:Yl,bounceOut:Be},Zr=function(t){if(Array.isArray(t)){lt(t.length===4,"Cubic bezier arrays must contain four numerical values.");var e=$(t,4),n=e[0],r=e[1],o=e[2],a=e[3];return vc(n,r,o,a)}else if(typeof t=="string")return lt(Xr[t]!==void 0,"Invalid easing type '".concat(t,"'")),Xr[t];return t},Cc=function(t){return Array.isArray(t)&&typeof t[0]!="number"},Kr=function(t,e){return t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Et.test(e)&&!e.startsWith("url("))},Lt=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Ee=function(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}},pn=function(){return{type:"keyframes",ease:"linear",duration:.3}},jc=function(t){return{type:"keyframes",duration:.8,values:t}},Jr={x:Lt,y:Lt,z:Lt,rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scaleX:Ee,scaleY:Ee,scale:Ee,opacity:pn,backgroundColor:pn,color:pn,default:Ee},Rc=function(t,e){var n;return ce(e)?n=jc:n=Jr[t]||Jr.default,P({to:e},n(e))},Ac=P(P({},fi),{color:at,backgroundColor:at,outlineColor:at,fill:at,stroke:at,borderColor:at,borderTopColor:at,borderRightColor:at,borderBottomColor:at,borderLeftColor:at,filter:jn,WebkitFilter:jn}),rr=function(t){return Ac[t]};function or(t,e){var n,r=rr(t);return r!==jn&&(r=Et),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,e)}function Mc(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=dt(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}var Qr=!1;function Ic(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,a=t.loop,i=dt(t,["ease","times","yoyo","flip","loop"]),s=P({},i);return n&&(s.offset=n),i.duration&&(s.duration=He(i.duration)),i.repeatDelay&&(s.repeatDelay=He(i.repeatDelay)),e&&(s.ease=Cc(e)?e.map(Zr):Zr(e)),i.type==="tween"&&(s.type="keyframes"),(r||a||o)&&(ve(!Qr,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Qr=!0,r?s.repeatType="reverse":a?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=a||r||o||i.repeat),i.type!=="spring"&&(s.type="keyframes"),s}function Oc(t,e){var n,r,o=ir(t,e)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:t.delay)!==null&&r!==void 0?r:0}function Lc(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=ft([],$(t.to),!1),t.to[0]=t.from),t}function Nc(t,e,n){var r;return Array.isArray(e.to)&&((r=t.duration)!==null&&r!==void 0||(t.duration=.8)),Lc(e),Mc(t)||(t=P(P({},t),Rc(n,e.to))),P(P({},e),Ic(t))}function Dc(t,e,n,r,o){var a,i=ir(r,t),s=(a=i.from)!==null&&a!==void 0?a:e.get(),u=Kr(t,n);s==="none"&&u&&typeof n=="string"?s=or(t,n):_r(s)&&typeof n=="string"?s=$r(n):!Array.isArray(n)&&_r(n)&&typeof s=="string"&&(n=$r(s));var l=Kr(t,s);ve(l===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."));function c(){var d={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(p){return e.set(p)}};return i.type==="inertia"||i.type==="decay"?ac(P(P({},d),i)):zi(P(P({},Nc(i,d,t)),{onUpdate:function(p){var v;d.onUpdate(p),(v=i.onUpdate)===null||v===void 0||v.call(i,p)},onComplete:function(){var p;d.onComplete(),(p=i.onComplete)===null||p===void 0||p.call(i)}}))}function f(){var d,p,v=bi(n);return e.set(v),o(),(d=i==null?void 0:i.onUpdate)===null||d===void 0||d.call(i,v),(p=i==null?void 0:i.onComplete)===null||p===void 0||p.call(i),{stop:function(){}}}return!l||!u||i.type===!1?f:c}function _r(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function $r(t){return typeof t=="number"?0:or("",t)}function ir(t,e){return t[e]||t.default||t}function ar(t,e,n,r){return r===void 0&&(r={}),e.start(function(o){var a,i,s=Dc(t,e,n,r,o),u=Oc(r,t),l=function(){return i=s()};return u?a=window.setTimeout(l,He(u)):l(),function(){clearTimeout(a),i==null||i.stop()}})}var Bc=function(t){return/^\-?\d*\.?\d+$/.test(t)},kc=function(t){return/^0[^.\s]+$/.test(t)};function sr(t,e){t.indexOf(e)===-1&&t.push(e)}function ur(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var ne=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(e){var n=this;return sr(this.subscriptions,e),function(){return ur(n.subscriptions,e)}},t.prototype.notify=function(e,n,r){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(var a=0;a<o;a++){var i=this.subscriptions[a];i&&i(e,n,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Fc=function(t){return!isNaN(parseFloat(t))},Hc=function(){function t(e){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ne,this.velocityUpdateSubscribers=new ne,this.renderSubscribers=new ne,this.canTrackVelocity=!1,this.updateAndNotify=function(r,o){o===void 0&&(o=!0),n.prev=n.current,n.current=r;var a=ke(),i=a.delta,s=a.timestamp;n.lastUpdated!==s&&(n.timeDelta=i,n.lastUpdated=s,bt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),o&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return bt.postRender(n.velocityCheck)},this.velocityCheck=function(r){var o=r.timestamp;o!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Fc(this.current)}return t.prototype.onChange=function(e){return this.updateSubscribers.add(e)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},t.prototype.attach=function(e){this.passiveEffect=e},t.prototype.set=function(e,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Ui(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(e){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=e(r)}).then(function(){return n.clearAnimation()})},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Yt(t){return new Hc(t)}var ta=function(t){return function(e){return e.test(t)}},Wc={test:function(t){return t==="auto"},parse:function(t){return t}},ea=[kt,A,St,jt,Au,Ru,Wc],Qt=function(t){return ea.find(ta(t))},qc=ft(ft([],$(ea),!1),[at,Et],!1),Gc=function(t){return qc.find(ta(t))};function zc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Yt(n))}function lr(t,e){var n=Ye(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,a=o===void 0?{}:o;r.transition;var i=dt(r,["transitionEnd","transition"]);i=P(P({},i),a);for(var s in i){var u=bi(i[s]);zc(t,s,u)}}function Dn(t,e){var n=ft([],$(e),!1).reverse();n.forEach(function(r){var o,a=t.getVariant(r);a&&lr(t,a),(o=t.variantChildren)===null||o===void 0||o.forEach(function(i){Dn(i,e)})})}function Uc(t,e){if(Array.isArray(e))return Dn(t,e);if(typeof e=="string")return Dn(t,[e]);lr(t,e)}function Yc(t,e,n){var r,o,a,i,s=Object.keys(e).filter(function(p){return!t.hasValue(p)}),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],f=e[c],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&o!==void 0?o:e[c]),d!=null&&(typeof d=="string"&&(Bc(d)||kc(d))?d=parseFloat(d):!Gc(d)&&Et.test(f)&&(d=or(c,f)),t.addValue(c,Yt(d)),(a=(i=n)[c])!==null&&a!==void 0||(i[c]=d),t.setBaseTarget(c,d))}}function Xc(t,e){if(e){var n=e[t]||e.default||e;return n.from}}function Zc(t,e,n){var r,o,a={};for(var i in t)a[i]=(r=Xc(i,e))!==null&&r!==void 0?r:(o=n.getValue(i))===null||o===void 0?void 0:o.get();return a}function na(t,e,n){n===void 0&&(n={}),t.notifyAnimationStart(e);var r;if(Array.isArray(e)){var o=e.map(function(i){return Bn(t,i,n)});r=Promise.all(o)}else if(typeof e=="string")r=Bn(t,e,n);else{var a=typeof e=="function"?Ye(t,e,n.custom):e;r=ra(t,a,n)}return r.then(function(){return t.notifyAnimationComplete(e)})}function Bn(t,e,n){var r;n===void 0&&(n={});var o=Ye(t,e,n.custom),a=(o||{}).transition,i=a===void 0?t.getDefaultTransition()||{}:a;n.transitionOverride&&(i=n.transitionOverride);var s=o?function(){return ra(t,o,n)}:function(){return Promise.resolve()},u=!((r=t.variantChildren)===null||r===void 0)&&r.size?function(p){p===void 0&&(p=0);var v=i.delayChildren,m=v===void 0?0:v,b=i.staggerChildren,g=i.staggerDirection;return Kc(t,e,m+p,b,g,n)}:function(){return Promise.resolve()},l=i.when;if(l){var c=$(l==="beforeChildren"?[s,u]:[u,s],2),f=c[0],d=c[1];return f().then(d)}else return Promise.all([s(),u(n.delay)])}function ra(t,e,n){var r,o=n===void 0?{}:n,a=o.delay,i=a===void 0?0:a,s=o.transitionOverride,u=o.type,l=t.makeTargetAnimatable(e),c=l.transition,f=c===void 0?t.getDefaultTransition():c,d=l.transitionEnd,p=dt(l,["transition","transitionEnd"]);s&&(f=s);var v=[],m=u&&((r=t.animationState)===null||r===void 0?void 0:r.getState()[u]);for(var b in p){var g=t.getValue(b),x=p[b];if(!(!g||x===void 0||m&&_c(m,b))){var S=P({delay:i},f);t.shouldReduceMotion&&he(b)&&(S=P(P({},S),{type:!1,delay:0}));var T=ar(b,g,x,S);v.push(T)}}return Promise.all(v).then(function(){d&&lr(t,d)})}function Kc(t,e,n,r,o,a){n===void 0&&(n=0),r===void 0&&(r=0),o===void 0&&(o=1);var i=[],s=(t.variantChildren.size-1)*r,u=o===1?function(l){return l===void 0&&(l=0),l*r}:function(l){return l===void 0&&(l=0),s-l*r};return Array.from(t.variantChildren).sort(Qc).forEach(function(l,c){i.push(Bn(l,e,P(P({},a),{delay:n+u(c)})).then(function(){return l.notifyAnimationComplete(e)}))}),Promise.all(i)}function Jc(t){t.forEachValue(function(e){return e.stop()})}function Qc(t,e){return t.sortNodePosition(e)}function _c(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&r[e]!==!0;return r[e]=!1,o}var cr=[z.Animate,z.InView,z.Focus,z.Hover,z.Tap,z.Drag,z.Exit],$c=ft([],$(cr),!1).reverse(),tf=cr.length;function ef(t){return function(e){return Promise.all(e.map(function(n){var r=n.animation,o=n.options;return na(t,r,o)}))}}function nf(t){var e=ef(t),n=of(),r={},o=!0,a=function(c,f){var d=Ye(t,f);if(d){d.transition;var p=d.transitionEnd,v=dt(d,["transition","transitionEnd"]);c=P(P(P({},c),v),p)}return c};function i(c){return r[c]!==void 0}function s(c){e=c(t)}function u(c,f){for(var d,p=t.getProps(),v=t.getVariantContext(!0)||{},m=[],b=new Set,g={},x=1/0,S=function(I){var N=$c[I],j=n[N],k=(d=p[N])!==null&&d!==void 0?d:v[N],K=ht(k),H=N===f?j.isActive:null;H===!1&&(x=I);var F=k===v[N]&&k!==p[N]&&K;if(F&&o&&t.manuallyAnimateOnMount&&(F=!1),j.protectedKeys=P({},g),!j.isActive&&H===null||!k&&!j.prevProp||Kn(k)||typeof k=="boolean")return"continue";var R=rf(j.prevProp,k),U=R||N===f&&j.isActive&&!F&&K||I>x&&K,J=Array.isArray(k)?k:[k],M=J.reduce(a,{});H===!1&&(M={});var nt=j.prevResolvedValues,rt=nt===void 0?{}:nt,ot=P(P({},rt),M),W=function(C){U=!0,b.delete(C),j.needsAnimating[C]=!0};for(var Z in ot){var D=M[Z],w=rt[Z];g.hasOwnProperty(Z)||(D!==w?ce(D)&&ce(w)?!$i(D,w)||R?W(Z):j.protectedKeys[Z]=!0:D!==void 0?W(Z):b.add(Z):D!==void 0&&b.has(Z)?W(Z):j.protectedKeys[Z]=!0)}j.prevProp=k,j.prevResolvedValues=M,j.isActive&&(g=P(P({},g),M)),o&&t.blockInitialAnimation&&(U=!1),U&&!F&&m.push.apply(m,ft([],$(J.map(function(C){return{animation:C,options:P({type:N},c)}})),!1))},T=0;T<tf;T++)S(T);if(r=P({},g),b.size){var E={};b.forEach(function(I){var N=t.getBaseTarget(I);N!==void 0&&(E[I]=N)}),m.push({animation:E})}var V=!!m.length;return o&&p.initial===!1&&!t.manuallyAnimateOnMount&&(V=!1),o=!1,V?e(m):Promise.resolve()}function l(c,f,d){var p;if(n[c].isActive===f)return Promise.resolve();(p=t.variantChildren)===null||p===void 0||p.forEach(function(b){var g;return(g=b.animationState)===null||g===void 0?void 0:g.setActive(c,f)}),n[c].isActive=f;var v=u(d,c);for(var m in n)n[m].protectedKeys={};return v}return{isAnimated:i,animateChanges:u,setActive:l,setAnimateFunction:s,getState:function(){return n}}}function rf(t,e){return typeof e=="string"?e!==t:Jo(e)?!$i(e,t):!1}function Nt(t){return t===void 0&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function of(){var t;return t={},t[z.Animate]=Nt(!0),t[z.InView]=Nt(),t[z.Hover]=Nt(),t[z.Tap]=Nt(),t[z.Drag]=Nt(),t[z.Focus]=Nt(),t[z.Exit]=Nt(),t}var af={animation:It(function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=nf(e)),Kn(n)&&h.useEffect(function(){return n.subscribe(e)},[n])}),exit:It(function(t){var e=t.custom,n=t.visualElement,r=$(_i(),2),o=r[0],a=r[1],i=h.useContext(Ue);h.useEffect(function(){var s,u;n.isPresent=o;var l=(s=n.animationState)===null||s===void 0?void 0:s.setActive(z.Exit,!o,{custom:(u=i==null?void 0:i.custom)!==null&&u!==void 0?u:e});!o&&(l==null||l.then(a))},[o])})},oa=function(){function t(e,n,r){var o=this,a=r===void 0?{}:r,i=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var d=mn(o.lastMoveEventInfo,o.history),p=o.startEvent!==null,v=Yi(d.offset,{x:0,y:0})>=3;if(!(!p&&!v)){var m=d.point,b=ke().timestamp;o.history.push(P(P({},m),{timestamp:b}));var g=o.handlers,x=g.onStart,S=g.onMove;p||(x&&x(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),S&&S(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=hn(p,o.transformPagePoint),Pi(d)&&d.buttons===0){o.handlePointerUp(d,p);return}bt.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var v=o.handlers,m=v.onEnd,b=v.onSessionEnd,g=mn(hn(p,o.transformPagePoint),o.history);o.startEvent&&m&&m(d,g),b&&b(d,g)},!(Ti(e)&&e.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var s=Jn(e),u=hn(s,this.transformPagePoint),l=u.point,c=ke().timestamp;this.history=[P(P({},l),{timestamp:c})];var f=n.onSessionStart;f&&f(e,mn(u,this.history)),this.removeListeners=Ke(Gt(window,"pointermove",this.handlePointerMove),Gt(window,"pointerup",this.handlePointerUp),Gt(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(e){this.handlers=e},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Ut.update(this.updatePoint)},t}();function hn(t,e){return e?{point:e(t.point)}:t}function to(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mn(t,e){var n=t.point;return{point:n,delta:to(n,ia(e)),offset:to(n,sf(e)),velocity:uf(e,.1)}}function sf(t){return t[0]}function ia(t){return t[t.length-1]}function uf(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=ia(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>He(e)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Vt(t){return t.max-t.min}function eo(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=.01),Yi(t,e)<n}function no(t,e,n,r){r===void 0&&(r=.5),t.origin=r,t.originPoint=Q(e.min,e.max,t.origin),t.scale=Vt(n)/Vt(e),(eo(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Q(n.min,n.max,t.origin)-t.originPoint,(eo(t.translate)||isNaN(t.translate))&&(t.translate=0)}function re(t,e,n,r){no(t.x,e.x,n.x,r==null?void 0:r.originX),no(t.y,e.y,n.y,r==null?void 0:r.originY)}function ro(t,e,n){t.min=n.min+e.min,t.max=t.min+Vt(e)}function lf(t,e,n){ro(t.x,e.x,n.x),ro(t.y,e.y,n.y)}function oo(t,e,n){t.min=e.min-n.min,t.max=t.min+Vt(e)}function oe(t,e,n){oo(t.x,e.x,n.x),oo(t.y,e.y,n.y)}function cf(t,e,n){var r=e.min,o=e.max;return r!==void 0&&t<r?t=n?Q(r,t,n.min):Math.max(t,r):o!==void 0&&t>o&&(t=n?Q(o,t,n.max):Math.min(t,o)),t}function io(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ff(t,e){var n=e.top,r=e.left,o=e.bottom,a=e.right;return{x:io(t.x,r,a),y:io(t.y,n,o)}}function ao(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=$([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function df(t,e){return{x:ao(t.x,e.x),y:ao(t.y,e.y)}}function vf(t,e){var n=.5,r=Vt(t),o=Vt(e);return o>r?n=fe(e.min,e.max-r,t.min):r>o&&(n=fe(t.min,t.max-o,e.min)),De(0,1,n)}function pf(t,e){var n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}var kn=.35;function hf(t){return t===void 0&&(t=kn),t===!1?t=0:t===!0&&(t=kn),{x:so(t,"left","right"),y:so(t,"top","bottom")}}function so(t,e,n){return{min:uo(t,e),max:uo(t,n)}}function uo(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}var lo=function(){return{translate:0,scale:1,origin:0,originPoint:0}},ie=function(){return{x:lo(),y:lo()}},co=function(){return{min:0,max:0}},it=function(){return{x:co(),y:co()}};function yt(t){return[t("x"),t("y")]}function aa(t){var e=t.top,n=t.left,r=t.right,o=t.bottom;return{x:{min:n,max:r},y:{min:e,max:o}}}function mf(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function gf(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gn(t){return t===void 0||t===1}function sa(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!gn(e)||!gn(n)||!gn(r)}function Rt(t){return sa(t)||fo(t.x)||fo(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function fo(t){return t&&t!=="0%"}function We(t,e,n){var r=t-n,o=e*r;return n+o}function vo(t,e,n,r,o){return o!==void 0&&(t=We(t,o,r)),We(t,n,r)+e}function Fn(t,e,n,r,o){e===void 0&&(e=0),n===void 0&&(n=1),t.min=vo(t.min,e,n,r,o),t.max=vo(t.max,e,n,r,o)}function ua(t,e){var n=e.x,r=e.y;Fn(t.x,n.translate,n.scale,n.originPoint),Fn(t.y,r.translate,r.scale,r.originPoint)}function yf(t,e,n,r){var o,a;r===void 0&&(r=!1);var i=n.length;if(i){e.x=e.y=1;for(var s,u,l=0;l<i;l++)s=n[l],u=s.projectionDelta,((a=(o=s.instance)===null||o===void 0?void 0:o.style)===null||a===void 0?void 0:a.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&qt(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ua(t,u)),r&&Rt(s.latestValues)&&qt(t,s.latestValues))}}function At(t,e){t.min=t.min+e,t.max=t.max+e}function po(t,e,n){var r=$(n,3),o=r[0],a=r[1],i=r[2],s=e[i]!==void 0?e[i]:.5,u=Q(t.min,t.max,s);Fn(t,e[o],e[a],u,e.scale)}var Sf=["x","scaleX","originX"],bf=["y","scaleY","originY"];function qt(t,e){po(t.x,e,Sf),po(t.y,e,bf)}function la(t,e){return aa(gf(t.getBoundingClientRect(),e))}function xf(t,e,n){var r=la(t,n),o=e.scroll;return o&&(At(r.x,o.x),At(r.y,o.y)),r}var Pf=new WeakMap,Tf=function(){function t(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=e}return t.prototype.start=function(e,n){var r=this,o=n===void 0?{}:n,a=o.snapToCursor,i=a===void 0?!1:a;if(this.visualElement.isPresent!==!1){var s=function(f){r.stopAnimation(),i&&r.snapToCursor(Jn(f,"page").point)},u=function(f,d){var p,v=r.getProps(),m=v.drag,b=v.dragPropagation,g=v.onDragStart;m&&!b&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=Ci(m),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),yt(function(x){var S,T,E=r.getAxisMotionValue(x).get()||0;if(St.test(E)){var V=(T=(S=r.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||T===void 0?void 0:T.actual[x];if(V){var I=Vt(V);E=I*(parseFloat(E)/100)}}r.originPoint[x]=E}),g==null||g(f,d),(p=r.visualElement.animationState)===null||p===void 0||p.setActive(z.Drag,!0))},l=function(f,d){var p=r.getProps(),v=p.dragPropagation,m=p.dragDirectionLock,b=p.onDirectionLock,g=p.onDrag;if(!(!v&&!r.openGlobalLock)){var x=d.offset;if(m&&r.currentDirection===null){r.currentDirection=wf(x),r.currentDirection!==null&&(b==null||b(r.currentDirection));return}r.updateAxis("x",d.point,x),r.updateAxis("y",d.point,x),r.visualElement.syncRender(),g==null||g(f,d)}},c=function(f,d){return r.stop(f,d)};this.panSession=new oa(e,{onSessionStart:s,onStart:u,onMove:l,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(e,n){var r=this.isDragging;if(this.cancel(),!!r){var o=n.velocity;this.startAnimation(o);var a=this.getProps().onDragEnd;a==null||a(e,n)}},t.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(z.Drag,!1)},t.prototype.updateAxis=function(e,n,r){var o=this.getProps().drag;if(!(!r||!Ve(e,o,this.currentDirection))){var a=this.getAxisMotionValue(e),i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=cf(i,this.constraints[e],this.elastic[e])),a.set(i)}},t.prototype.resolveConstraints=function(){var e=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,a=(this.visualElement.projection||{}).layout,i=this.constraints;r&&Wt(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=ff(a.actual,r):this.constraints=!1,this.elastic=hf(o),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&yt(function(s){e.getAxisMotionValue(s)&&(e.constraints[s]=pf(a.actual[s],e.constraints[s]))})},t.prototype.resolveRefConstraints=function(){var e=this.getProps(),n=e.dragConstraints,r=e.onMeasureDragConstraints;if(!n||!Wt(n))return!1;var o=n.current;lt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var a=this.visualElement.projection;if(!a||!a.layout)return!1;var i=xf(o,a.root,this.visualElement.getTransformPagePoint()),s=df(a.layout.actual,i);if(r){var u=r(mf(s));this.hasMutatedConstraints=!!u,u&&(s=aa(u))}return s},t.prototype.startAnimation=function(e){var n=this,r=this.getProps(),o=r.drag,a=r.dragMomentum,i=r.dragElastic,s=r.dragTransition,u=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{},f=yt(function(d){var p;if(Ve(d,o,n.currentDirection)){var v=(p=c==null?void 0:c[d])!==null&&p!==void 0?p:{};u&&(v={min:0,max:0});var m=i?200:1e6,b=i?40:1e7,g=P(P({type:"inertia",velocity:a?e[d]:0,bounceStiffness:m,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},s),v);return n.startAxisValueAnimation(d,g)}});return Promise.all(f).then(l)},t.prototype.startAxisValueAnimation=function(e,n){var r=this.getAxisMotionValue(e);return ar(e,r,0,n)},t.prototype.stopAnimation=function(){var e=this;yt(function(n){return e.getAxisMotionValue(n).stop()})},t.prototype.getAxisMotionValue=function(e){var n,r,o="_drag"+e.toUpperCase(),a=this.visualElement.getProps()[o];return a||this.visualElement.getValue(e,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:0)},t.prototype.snapToCursor=function(e){var n=this;yt(function(r){var o=n.getProps().drag;if(Ve(r,o,n.currentDirection)){var a=n.visualElement.projection,i=n.getAxisMotionValue(r);if(a&&a.layout){var s=a.layout.actual[r],u=s.min,l=s.max;i.set(e[r]-Q(u,l,.5))}}})},t.prototype.scalePositionWithinConstraints=function(){var e=this,n,r=this.getProps(),o=r.drag,a=r.dragConstraints,i=this.visualElement.projection;if(!(!Wt(a)||!i||!this.constraints)){this.stopAnimation();var s={x:0,y:0};yt(function(l){var c=e.getAxisMotionValue(l);if(c){var f=c.get();s[l]=vf({min:f,max:f},e.constraints[l])}});var u=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=u?u({},""):"none",(n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout(),this.resolveConstraints(),yt(function(l){if(Ve(l,o,null)){var c=e.getAxisMotionValue(l),f=e.constraints[l],d=f.min,p=f.max;c.set(Q(d,p,s[l]))}})}},t.prototype.addListeners=function(){var e=this,n;Pf.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Gt(r,"pointerdown",function(l){var c=e.getProps(),f=c.drag,d=c.dragListener,p=d===void 0?!0:d;f&&p&&e.start(l)}),a=function(){var l=e.getProps().dragConstraints;Wt(l)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,s=i.addEventListener("measure",a);i&&!i.layout&&((n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout()),a();var u=Ze(window,"resize",function(){return e.scalePositionWithinConstraints()});return i.addEventListener("didUpdate",function(l){var c=l.delta,f=l.hasLayoutChanged;e.isDragging&&f&&(yt(function(d){var p=e.getAxisMotionValue(d);p&&(e.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),e.visualElement.syncRender())}),function(){u(),o(),s()}},t.prototype.getProps=function(){var e=this.visualElement.getProps(),n=e.drag,r=n===void 0?!1:n,o=e.dragDirectionLock,a=o===void 0?!1:o,i=e.dragPropagation,s=i===void 0?!1:i,u=e.dragConstraints,l=u===void 0?!1:u,c=e.dragElastic,f=c===void 0?kn:c,d=e.dragMomentum,p=d===void 0?!0:d;return P(P({},e),{drag:r,dragDirectionLock:a,dragPropagation:s,dragConstraints:l,dragElastic:f,dragMomentum:p})},t}();function Ve(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function wf(t,e){e===void 0&&(e=10);var n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function Ef(t){var e=t.dragControls,n=t.visualElement,r=pe(function(){return new Tf(n)});h.useEffect(function(){return e&&e.subscribe(r)},[r,e]),h.useEffect(function(){return r.addListeners()},[r])}function Vf(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,i=e||n||r||o,s=h.useRef(null),u=h.useContext(qn).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:e,onEnd:function(f,d){s.current=null,r&&r(f,d)}};h.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function c(f){s.current=new oa(f,l,{transformPagePoint:u})}Ne(a,"pointerdown",i&&c),Ai(function(){return s.current&&s.current.end()})}var Cf={pan:It(Vf),drag:It(Ef)},Ce=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function jf(){var t=Ce.map(function(){return new ne}),e={},n={clearAllListeners:function(){return t.forEach(function(r){return r.clear()})},updatePropListeners:function(r){Ce.forEach(function(o){var a,i="on"+o,s=r[i];(a=e[o])===null||a===void 0||a.call(e),s&&(e[o]=n[i](s))})}};return t.forEach(function(r,o){n["on"+Ce[o]]=function(a){return r.add(a)},n["notify"+Ce[o]]=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return r.notify.apply(r,ft([],$(a),!1))}}),n}function Rf(t,e,n){var r;for(var o in e){var a=e[o],i=n[o];if(wt(a))t.addValue(o,a),process.env.NODE_ENV==="development"&&Qi(a.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(a.version," with 6.5.1 may not work as expected."));else if(wt(i))t.addValue(o,Yt(a));else if(i!==a)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(a)}else t.addValue(o,Yt((r=t.getStaticValue(o))!==null&&r!==void 0?r:a))}for(var o in n)e[o]===void 0&&t.removeValue(o);return e}var ca=function(t){var e=t.treeType,n=e===void 0?"":e,r=t.build,o=t.getBaseTarget,a=t.makeTargetAnimatable,i=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,l=t.removeValueFromRenderState,c=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(d,p){var v=d.parent,m=d.props,b=d.presenceId,g=d.blockInitialAnimation,x=d.visualState,S=d.shouldReduceMotion;p===void 0&&(p={});var T=!1,E=x.latestValues,V=x.renderState,I,N=jf(),j=new Map,k=new Map,K={},H=P({},E),F;function R(){!I||!T||(U(),s(I,V,m.style,D.projection))}function U(){r(D,V,E,p,m)}function J(){N.notifyUpdate(E)}function M(w,C){var L=C.onChange(function(B){E[w]=B,m.onUpdate&&bt.update(J,!1,!0)}),O=C.onRenderRequest(D.scheduleRender);k.set(w,function(){L(),O()})}var nt=f(m);for(var rt in nt){var ot=nt[rt];E[rt]!==void 0&&wt(ot)&&ot.set(E[rt],!1)}var W=Xe(m),Z=_o(m),D=P(P({treeType:n,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:b,shouldReduceMotion:S,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(v!=null&&v.isMounted()),blockInitialAnimation:g,isMounted:function(){return!!I},mount:function(w){T=!0,I=D.current=w,D.projection&&D.projection.mount(w),Z&&v&&!W&&(F=v==null?void 0:v.addVariantChild(D)),j.forEach(function(C,L){return M(L,C)}),v==null||v.children.add(D),D.setProps(m)},unmount:function(){var w;(w=D.projection)===null||w===void 0||w.unmount(),Ut.update(J),Ut.render(R),k.forEach(function(C){return C()}),F==null||F(),v==null||v.children.delete(D),N.clearAllListeners(),I=void 0,T=!1},addVariantChild:function(w){var C,L=D.getClosestVariantNode();if(L)return(C=L.variantChildren)===null||C===void 0||C.add(w),function(){return L.variantChildren.delete(w)}},sortNodePosition:function(w){return!c||n!==w.treeType?0:c(D.getInstance(),w.getInstance())},getClosestVariantNode:function(){return Z?D:v==null?void 0:v.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return I},getStaticValue:function(w){return E[w]},setStaticValue:function(w,C){return E[w]=C},getLatestValues:function(){return E},setVisibility:function(w){D.isVisible!==w&&(D.isVisible=w,D.scheduleRender())},makeTargetAnimatable:function(w,C){return C===void 0&&(C=!0),a(D,w,m,C)},measureViewportBox:function(){return i(I,m)},addValue:function(w,C){D.hasValue(w)&&D.removeValue(w),j.set(w,C),E[w]=C.get(),M(w,C)},removeValue:function(w){var C;j.delete(w),(C=k.get(w))===null||C===void 0||C(),k.delete(w),delete E[w],l(w,V)},hasValue:function(w){return j.has(w)},getValue:function(w,C){var L=j.get(w);return L===void 0&&C!==void 0&&(L=Yt(C),D.addValue(w,L)),L},forEachValue:function(w){return j.forEach(w)},readValue:function(w){var C;return(C=E[w])!==null&&C!==void 0?C:u(I,w,p)},setBaseTarget:function(w,C){H[w]=C},getBaseTarget:function(w){if(o){var C=o(m,w);if(C!==void 0&&!wt(C))return C}return H[w]}},N),{build:function(){return U(),V},scheduleRender:function(){bt.render(R,!1,!0)},syncRender:R,setProps:function(w){(w.transformTemplate||m.transformTemplate)&&D.scheduleRender(),m=w,N.updatePropListeners(w),K=Rf(D,f(m),K)},getProps:function(){return m},getVariant:function(w){var C;return(C=m.variants)===null||C===void 0?void 0:C[w]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(w){if(w===void 0&&(w=!1),w)return v==null?void 0:v.getVariantContext();if(!W){var C=(v==null?void 0:v.getVariantContext())||{};return m.initial!==void 0&&(C.initial=m.initial),C}for(var L={},O=0;O<Af;O++){var B=fa[O],q=m[B];(ht(q)||q===!1)&&(L[B]=q)}return L}});return D}},fa=ft(["initial"],$(cr),!1),Af=fa.length;function Hn(t){return typeof t=="string"&&t.startsWith("var(--")}var da=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mf(t){var e=da.exec(t);if(!e)return[,];var n=$(e,3),r=n[1],o=n[2];return[r,o]}var If=4;function Wn(t,e,n){n===void 0&&(n=1),lt(n<=If,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));var r=$(Mf(t),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():Hn(a)?Wn(a,e,n+1):a}}function Of(t,e,n){var r,o=dt(e,[]),a=t.getInstance();if(!(a instanceof Element))return{target:o,transitionEnd:n};n&&(n=P({},n)),t.forEachValue(function(l){var c=l.get();if(Hn(c)){var f=Wn(c,a);f&&l.set(f)}});for(var i in o){var s=o[i];if(Hn(s)){var u=Wn(s,a);u&&(o[i]=u,n&&((r=n[i])!==null&&r!==void 0||(n[i]=s)))}}return{target:o,transitionEnd:n}}var Lf=new Set(["width","height","top","left","right","bottom","x","y"]),va=function(t){return Lf.has(t)},Nf=function(t){return Object.keys(t).some(va)},pa=function(t,e){t.set(e,!1),t.set(e)},je=function(t){return t===kt||t===A},ho;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(ho||(ho={}));var mo=function(t,e){return parseFloat(t.split(", ")[e])},go=function(t,e){return function(n,r){var o=r.transform;if(o==="none"||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return mo(a[1],e);var i=o.match(/^matrix\((.+)\)$/);return i?mo(i[1],t):0}},Df=new Set(["x","y","z"]),Bf=ue.filter(function(t){return!Df.has(t)});function kf(t){var e=[];return Bf.forEach(function(n){var r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}var yo={width:function(t,e){var n=t.x,r=e.paddingLeft,o=r===void 0?"0":r,a=e.paddingRight,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:function(t,e){var n=t.y,r=e.paddingTop,o=r===void 0?"0":r,a=e.paddingBottom,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:go(4,13),y:go(5,14)},Ff=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),i=a.display,s={};i==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(function(l){s[l]=yo[l](r,a)}),e.syncRender();var u=e.measureViewportBox();return n.forEach(function(l){var c=e.getValue(l);pa(c,s[l]),t[l]=yo[l](u,a)}),t},Hf=function(t,e,n,r){n===void 0&&(n={}),r===void 0&&(r={}),e=P({},e),r=P({},r);var o=Object.keys(e).filter(va),a=[],i=!1,s=[];if(o.forEach(function(c){var f=t.getValue(c);if(t.hasValue(c)){var d=n[c],p=Qt(d),v=e[c],m;if(ce(v)){var b=v.length,g=v[0]===null?1:0;d=v[g],p=Qt(d);for(var x=g;x<b;x++)m?lt(Qt(v[x])===m,"All keyframes must be of the same type"):(m=Qt(v[x]),lt(m===p||je(p)&&je(m),"Keyframes must be of the same dimension as the current value"))}else m=Qt(v);if(p!==m)if(je(p)&&je(m)){var S=f.get();typeof S=="string"&&f.set(parseFloat(S)),typeof v=="string"?e[c]=parseFloat(v):Array.isArray(v)&&m===A&&(e[c]=v.map(parseFloat))}else p!=null&&p.transform&&(m!=null&&m.transform)&&(d===0||v===0)?d===0?f.set(m.transform(d)):e[c]=p.transform(v):(i||(a=kf(t),i=!0),s.push(c),r[c]=r[c]!==void 0?r[c]:e[c],pa(f,v))}}),s.length){var u=s.indexOf("height")>=0?window.pageYOffset:null,l=Ff(e,t,s);return a.length&&a.forEach(function(c){var f=$(c,2),d=f[0],p=f[1];t.getValue(d).set(p)}),t.syncRender(),u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}else return{target:e,transitionEnd:r}};function Wf(t,e,n,r){return Nf(e)?Hf(t,e,n,r):{target:e,transitionEnd:r}}var qf=function(t,e,n,r){var o=Of(t,e,r);return e=o.target,r=o.transitionEnd,Wf(t,e,n,r)};function Gf(t){return window.getComputedStyle(t)}var ha={treeType:"dom",readValueFromInstance:function(t,e){if(he(e)){var n=rr(e);return n&&n.default||0}else{var r=Gf(t);return(ri(e)?r.getPropertyValue(e):r[e])||0}},sortNodePosition:function(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox:function(t,e){var n=e.transformPagePoint;return la(t,n)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=n.transformValues;r===void 0&&(r=!0);var a=e.transition,i=e.transitionEnd,s=dt(e,["transition","transitionEnd"]),u=Zc(s,a||{},t);if(o&&(i&&(i=o(i)),s&&(s=o(s)),u&&(u=o(u))),r){Yc(t,s,u);var l=qf(t,s,u,i);i=l.transitionEnd,s=l.target}return P({transition:a,transitionEnd:i},s)},scrapeMotionValuesFromProps:Zn,build:function(t,e,n,r,o){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),Un(e,n,r,o.transformTemplate)},render:mi},zf=ca(ha),Uf=ca(P(P({},ha),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return he(e)?((n=rr(e))===null||n===void 0?void 0:n.default)||0:(e=gi.has(e)?e:hi(e),t.getAttribute(e))},scrapeMotionValuesFromProps:Si,build:function(t,e,n,r,o){Xn(e,n,r,o.transformTemplate)},render:yi})),Yf=function(t,e){return Gn(t)?Uf(e,{enableHardwareAcceleration:!1}):zf(e,{enableHardwareAcceleration:!0})};function So(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var _t={correct:function(t,e){if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;var n=So(t,e.target.x),r=So(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}},bo="_$css",Xf={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,o=t,a=t.includes("var("),i=[];a&&(t=t.replace(da,function(m){return i.push(m),bo}));var s=Et.parse(t);if(s.length>5)return o;var u=Et.createTransformer(t),l=typeof s[0]!="number"?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=f;var d=Q(c,f,.5);typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d);var p=u(s);if(a){var v=0;p=p.replace(bo,function(){var m=i[v];return v++,m})}return p}},Zf=function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.visualElement,a=r.layoutGroup,i=r.switchLayoutGroup,s=r.layoutId,u=o.projection;Su(Jf),u&&(a!=null&&a.group&&a.group.add(u),i!=null&&i.register&&s&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",function(){n.safeToRemove()}),u.setOptions(P(P({},u.options),{onExitComplete:function(){return n.safeToRemove()}}))),$t.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(n){var r=this,o=this.props,a=o.layoutDependency,i=o.visualElement,s=o.drag,u=o.isPresent,l=i.projection;return l&&(l.isPresent=u,s||n.layoutDependency!==a||a===void 0?l.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?l.promote():l.relegate()||bt.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,o=n.layoutGroup,a=n.switchLayoutGroup,i=r.projection;i&&(i.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(i),a!=null&&a.deregister&&a.deregister(i))},e.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},e.prototype.render=function(){return null},e}(h.Component);function Kf(t){var e=$(_i(),2),n=e[0],r=e[1],o=h.useContext($o);return h.createElement(Zf,P({},t,{layoutGroup:o,switchLayoutGroup:h.useContext(ti),isPresent:n,safeToRemove:r}))}var Jf={borderRadius:P(P({},_t),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:_t,borderTopRightRadius:_t,borderBottomLeftRadius:_t,borderBottomRightRadius:_t,boxShadow:Xf},Qf={measureLayout:Kf};function _f(t,e,n){n===void 0&&(n={});var r=wt(t)?t:Yt(t);return ar("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var ma=["TopLeft","TopRight","BottomLeft","BottomRight"],$f=ma.length,xo=function(t){return typeof t=="string"?parseFloat(t):t},Po=function(t){return typeof t=="number"||A.test(t)};function td(t,e,n,r,o,a){var i,s,u,l;o?(t.opacity=Q(0,(i=n.opacity)!==null&&i!==void 0?i:1,ed(r)),t.opacityExit=Q((s=e.opacity)!==null&&s!==void 0?s:1,0,nd(r))):a&&(t.opacity=Q((u=e.opacity)!==null&&u!==void 0?u:1,(l=n.opacity)!==null&&l!==void 0?l:1,r));for(var c=0;c<$f;c++){var f="border".concat(ma[c],"Radius"),d=To(e,f),p=To(n,f);if(!(d===void 0&&p===void 0)){d||(d=0),p||(p=0);var v=d===0||p===0||Po(d)===Po(p);v?(t[f]=Math.max(Q(xo(d),xo(p),r),0),(St.test(p)||St.test(d))&&(t[f]+="%")):t[f]=p}}(e.rotate||n.rotate)&&(t.rotate=Q(e.rotate||0,n.rotate||0,r))}function To(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}var ed=ga(0,.5,er),nd=ga(.5,.95,$n);function ga(t,e,n){return function(r){return r<t?0:r>e?1:n(fe(t,e,r))}}function wo(t,e){t.min=e.min,t.max=e.max}function pt(t,e){wo(t.x,e.x),wo(t.y,e.y)}function Eo(t,e,n,r,o){return t-=e,t=We(t,1/n,r),o!==void 0&&(t=We(t,1/o,r)),t}function rd(t,e,n,r,o,a,i){if(e===void 0&&(e=0),n===void 0&&(n=1),r===void 0&&(r=.5),a===void 0&&(a=t),i===void 0&&(i=t),St.test(e)){e=parseFloat(e);var s=Q(i.min,i.max,e/100);e=s-i.min}if(typeof e=="number"){var u=Q(a.min,a.max,r);t===a&&(u-=e),t.min=Eo(t.min,e,n,u,o),t.max=Eo(t.max,e,n,u,o)}}function Vo(t,e,n,r,o){var a=$(n,3),i=a[0],s=a[1],u=a[2];rd(t,e[i],e[s],e[u],e.scale,r,o)}var od=["x","scaleX","originX"],id=["y","scaleY","originY"];function Co(t,e,n,r){Vo(t.x,e,od,n==null?void 0:n.x,r==null?void 0:r.x),Vo(t.y,e,id,n==null?void 0:n.y,r==null?void 0:r.y)}function jo(t){return t.translate===0&&t.scale===1}function ya(t){return jo(t.x)&&jo(t.y)}function Sa(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var ad=function(){function t(){this.members=[]}return t.prototype.add=function(e){sr(this.members,e),e.scheduleRender()},t.prototype.remove=function(e){if(ur(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},t.prototype.relegate=function(e){var n=this.members.findIndex(function(i){return e===i});if(n===0)return!1;for(var r,o=n;o>=0;o--){var a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1},t.prototype.promote=function(e,n){var r,o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues,e.snapshot.isShared=!0),!((r=e.root)===null||r===void 0)&&r.isUpdating&&(e.isLayoutDirty=!0);var a=e.options.crossfade;a===!1&&o.hide()}},t.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var n,r,o,a,i;(r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n),(i=(o=e.resumingFrom)===null||o===void 0?void 0:(a=o.options).onExitComplete)===null||i===void 0||i.call(a)})},t.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),sd="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Ro(t,e,n){var r=t.x.translate/e.x,o=t.y.translate/e.y,a="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(a+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var i=n.rotate,s=n.rotateX,u=n.rotateY;i&&(a+="rotate(".concat(i,"deg) ")),s&&(a+="rotateX(".concat(s,"deg) ")),u&&(a+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return a+="scale(".concat(l,", ").concat(c,")"),a===sd?"none":a}var ud=function(t,e){return t.depth-e.depth},ld=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(e){sr(this.children,e),this.isDirty=!0},t.prototype.remove=function(e){ur(this.children,e),this.isDirty=!0},t.prototype.forEach=function(e){this.isDirty&&this.children.sort(ud),this.isDirty=!1,this.children.forEach(e)},t}(),Ao=1e3;function ba(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,o=t.checkIsScrollRoot,a=t.resetTransform;return function(){function i(s,u,l){var c=this;u===void 0&&(u={}),l===void 0&&(l=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(hd),c.nodes.forEach(md)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=u,this.root=l?l.root||l:this,this.path=l?ft(ft([],$(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new ld)}return i.prototype.addEventListener=function(s,u){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new ne),this.eventHandlers.get(s).add(u)},i.prototype.notifyListeners=function(s){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,ft([],$(u),!1))},i.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},i.prototype.registerPotentialNode=function(s,u){this.potentialNodes.set(s,u)},i.prototype.mount=function(s,u){var l=this,c;if(u===void 0&&(u=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var f=this.options,d=f.layoutId,p=f.layout,v=f.visualElement;if(v&&!v.getInstance()&&v.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),u&&(p||d)&&(this.isLayoutDirty=!0),e){var m,b=function(){return l.root.updateBlockedByResize=!1};e(s,function(){l.root.updateBlockedByResize=!0,clearTimeout(m),m=window.setTimeout(b,250),$t.hasAnimatedSinceResize&&($t.hasAnimatedSinceResize=!1,l.nodes.forEach(pd))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&v&&(d||p)&&this.addEventListener("didUpdate",function(g){var x,S,T,E,V,I=g.delta,N=g.hasLayoutChanged,j=g.hasRelativeTargetChanged,k=g.layout;if(l.isTreeAnimationBlocked()){l.target=void 0,l.relativeTarget=void 0;return}var K=(S=(x=l.options.transition)!==null&&x!==void 0?x:v.getDefaultTransition())!==null&&S!==void 0?S:xd,H=v.getProps(),F=H.onLayoutAnimationStart,R=H.onLayoutAnimationComplete,U=!l.targetLayout||!Sa(l.targetLayout,k)||j,J=!N&&j;if(!((T=l.resumeFrom)===null||T===void 0)&&T.instance||J||N&&(U||!l.currentAnimation)){l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom.resumingFrom=void 0),l.setAnimationOrigin(I,J);var M=P(P({},ir(K,"layout")),{onPlay:F,onComplete:R});v.shouldReduceMotion&&(M.delay=0,M.type=!1),l.startAnimation(M)}else!N&&l.animationProgress===0&&l.finishAnimation(),l.isLead()&&((V=(E=l.options).onExitComplete)===null||V===void 0||V.call(E));l.targetLayout=k})}},i.prototype.unmount=function(){var s,u;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(u=this.parent)===null||u===void 0||u.children.delete(this),this.instance=void 0,Ut.preRender(this.updateProjection)},i.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},i.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},i.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},i.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},i.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(gd))},i.prototype.willUpdate=function(s){var u,l,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(l=(u=this.options).onExitComplete)===null||l===void 0||l.call(u);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var f=0;f<this.path.length;f++){var d=this.path[f];d.shouldResetTransform=!0,d.updateScroll()}var p=this.options,v=p.layoutId,m=p.layout;if(!(v===void 0&&!m)){var b=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=b==null?void 0:b(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},i.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Mo);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Pd),this.potentialNodes.clear()),this.nodes.forEach(vd),this.nodes.forEach(cd),this.nodes.forEach(fd),this.clearAllSnapshots(),dn.update(),dn.preRender(),dn.render())},i.prototype.clearAllSnapshots=function(){this.nodes.forEach(dd),this.sharedNodes.forEach(yd)},i.prototype.scheduleUpdateProjection=function(){bt.preRender(this.updateProjection,!1,!0)},i.prototype.scheduleCheckAfterUnmount=function(){var s=this;bt.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},i.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),u=this.removeTransform(this.removeElementScroll(s));No(u),this.snapshot={measured:s,layout:u,latestValues:{}}}},i.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var u=0;u<this.path.length;u++){var l=this.path[u];l.updateScroll()}var c=this.measure();No(c);var f=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,f==null?void 0:f.actual)}},i.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},i.prototype.resetTransform=function(){var s;if(a){var u=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!ya(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,f=c==null?void 0:c(this.latestValues,""),d=f!==this.prevTransformTemplateValue;u&&(l||Rt(this.latestValues)||d)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}},i.prototype.measure=function(){var s=this.options.visualElement;if(!s)return it();var u=s.measureViewportBox(),l=this.root.scroll;return l&&(At(u.x,l.x),At(u.y,l.y)),u},i.prototype.removeElementScroll=function(s){var u=it();pt(u,s);for(var l=0;l<this.path.length;l++){var c=this.path[l],f=c.scroll,d=c.options,p=c.isScrollRoot;if(c!==this.root&&f&&d.layoutScroll){if(p){pt(u,s);var v=this.root.scroll;v&&(At(u.x,-v.x),At(u.y,-v.y))}At(u.x,f.x),At(u.y,f.y)}}return u},i.prototype.applyTransform=function(s,u){u===void 0&&(u=!1);var l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];!u&&f.options.layoutScroll&&f.scroll&&f!==f.root&&qt(l,{x:-f.scroll.x,y:-f.scroll.y}),Rt(f.latestValues)&&qt(l,f.latestValues)}return Rt(this.latestValues)&&qt(l,this.latestValues),l},i.prototype.removeTransform=function(s){var u,l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];if(f.instance&&Rt(f.latestValues)){sa(f.latestValues)&&f.updateSnapshot();var d=it(),p=f.measure();pt(d,p),Co(l,f.latestValues,(u=f.snapshot)===null||u===void 0?void 0:u.layout,d)}}return Rt(this.latestValues)&&Co(l,this.latestValues),l},i.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},i.prototype.setOptions=function(s){var u;this.options=P(P(P({},this.options),s),{crossfade:(u=s.crossfade)!==null&&u!==void 0?u:!0})},i.prototype.clearMeasurements=function(){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},i.prototype.resolveTargetDelta=function(){var s,u=this.options,l=u.layout,c=u.layoutId;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),pt(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?lf(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):pt(this.target,this.layout.actual),ua(this.target,this.targetDelta)):pt(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.target,this.relativeParent.target),pt(this.relativeTarget,this.relativeTargetOrigin)))))},i.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Rt(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},i.prototype.calcProjection=function(){var s,u=this.options,l=u.layout,c=u.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(l||c))){var f=this.getLead();pt(this.layoutCorrected,this.layout.actual),yf(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==f);var d=f.target;if(d){this.projectionDelta||(this.projectionDelta=ie(),this.projectionDeltaWithTransform=ie());var p=this.treeScale.x,v=this.treeScale.y,m=this.projectionTransform;re(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Ro(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==p||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}}},i.prototype.hide=function(){this.isVisible=!1},i.prototype.show=function(){this.isVisible=!0},i.prototype.scheduleRender=function(s){var u,l,c;s===void 0&&(s=!0),(l=(u=this.options).scheduleRender)===null||l===void 0||l.call(u),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},i.prototype.setAnimationOrigin=function(s,u){var l=this,c;u===void 0&&(u=!1);var f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},p=P({},this.latestValues),v=ie();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!u;var m=it(),b=f==null?void 0:f.isShared,g=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,x=!!(b&&!g&&this.options.crossfade===!0&&!this.path.some(bd));this.animationProgress=0,this.mixTargetDelta=function(S){var T,E=S/1e3;Io(v.x,s.x,E),Io(v.y,s.y,E),l.setTargetDelta(v),l.relativeTarget&&l.relativeTargetOrigin&&l.layout&&(!((T=l.relativeParent)===null||T===void 0)&&T.layout)&&(oe(m,l.layout.actual,l.relativeParent.layout.actual),Sd(l.relativeTarget,l.relativeTargetOrigin,m,E)),b&&(l.animationValues=p,td(p,d,l.latestValues,E,x,g)),l.root.scheduleUpdateProjection(),l.scheduleRender(),l.animationProgress=E},this.mixTargetDelta(0)},i.prototype.startAnimation=function(s){var u=this,l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(Ut.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(function(){$t.hasAnimatedSinceResize=!0,u.currentAnimation=_f(0,Ao,P(P({},s),{onUpdate:function(f){var d;u.mixTargetDelta(f),(d=s.onUpdate)===null||d===void 0||d.call(s,f)},onComplete:function(){var f;(f=s.onComplete)===null||f===void 0||f.call(s),u.completeAnimation()}})),u.resumingFrom&&(u.resumingFrom.currentAnimation=u.currentAnimation),u.pendingAnimation=void 0})},i.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},i.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,Ao),this.currentAnimation.stop()),this.completeAnimation()},i.prototype.applyTransformsToTarget=function(){var s=this.getLead(),u=s.targetWithTransforms,l=s.target,c=s.layout,f=s.latestValues;!u||!l||!c||(pt(u,l),qt(u,f),re(this.projectionDeltaWithTransform,this.layoutCorrected,u,f))},i.prototype.registerSharedNode=function(s,u){var l,c,f;this.sharedNodes.has(s)||this.sharedNodes.set(s,new ad);var d=this.sharedNodes.get(s);d.add(u),u.promote({transition:(l=u.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=u.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,u)})},i.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},i.prototype.getLead=function(){var s,u=this.options.layoutId;return u?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},i.prototype.getPrevLead=function(){var s,u=this.options.layoutId;return u?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},i.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},i.prototype.promote=function(s){var u=s===void 0?{}:s,l=u.needsReset,c=u.transition,f=u.preserveFollowOpacity,d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},i.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},i.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var u=!1,l={},c=0;c<En.length;c++){var f=En[c],d="rotate"+f;s.getStaticValue(d)&&(u=!0,l[d]=s.getStaticValue(d),s.setStaticValue(d,0))}if(u){s==null||s.syncRender();for(var d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}}},i.prototype.getProjectionStyles=function(s){var u,l,c,f,d,p;s===void 0&&(s={});var v={};if(!this.instance||this.isSVG)return v;if(this.isVisible)v.visibility="";else return{visibility:"hidden"};var m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Ae(s.pointerEvents)||"",v.transform=m?m(this.latestValues,""):"none",v;var b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){var g={};return this.options.layoutId&&(g.opacity=(l=this.latestValues.opacity)!==null&&l!==void 0?l:1,g.pointerEvents=Ae(s.pointerEvents)||""),this.hasProjected&&!Rt(this.latestValues)&&(g.transform=m?m({},""):"none",this.hasProjected=!1),g}var x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=Ro(this.projectionDeltaWithTransform,this.treeScale,x),m&&(v.transform=m(x,v.transform));var S=this.projectionDelta,T=S.x,E=S.y;v.transformOrigin="".concat(T.origin*100,"% ").concat(E.origin*100,"% 0"),b.animationValues?v.opacity=b===this?(f=(c=x.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=b===this?(d=x.opacity)!==null&&d!==void 0?d:"":(p=x.opacityExit)!==null&&p!==void 0?p:0;for(var V in Oe)if(x[V]!==void 0){var I=Oe[V],N=I.correct,j=I.applyTo,k=N(x[V],b);if(j)for(var K=j.length,H=0;H<K;H++)v[j[H]]=k;else v[V]=k}return this.options.layoutId&&(v.pointerEvents=b===this?Ae(s.pointerEvents)||"":"none"),v},i.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},i.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var u;return(u=s.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Mo),this.root.sharedNodes.clear()},i}()}function cd(t){t.updateLayout()}function fd(t){var e,n,r,o,a=(n=(e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)!==null&&n!==void 0?n:t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){var i=t.layout,s=i.actual,u=i.measured;t.options.animationType==="size"?yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],T=Vt(S);S.min=s[x].min,S.max=S.min+T}):t.options.animationType==="position"&&yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],T=Vt(s[x]);S.max=S.min+T});var l=ie();re(l,s,a.layout);var c=ie();a.isShared?re(c,t.applyTransform(u,!0),a.measured):re(c,s,a.layout);var f=!ya(l),d=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var p=t.relativeParent,v=p.snapshot,m=p.layout;if(v&&m){var b=it();oe(b,a.layout,v.layout);var g=it();oe(g,s,m.actual),Sa(b,g)||(d=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((o=(r=t.options).onExitComplete)===null||o===void 0||o.call(r));t.options.transition=void 0}function dd(t){t.clearSnapshot()}function Mo(t){t.clearMeasurements()}function vd(t){var e=t.options.visualElement;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function pd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function hd(t){t.resolveTargetDelta()}function md(t){t.calcProjection()}function gd(t){t.resetRotation()}function yd(t){t.removeLeadSnapshot()}function Io(t,e,n){t.translate=Q(e.translate,0,n),t.scale=Q(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Oo(t,e,n,r){t.min=Q(e.min,n.min,r),t.max=Q(e.max,n.max,r)}function Sd(t,e,n,r){Oo(t.x,e.x,n.x,r),Oo(t.y,e.y,n.y,r)}function bd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var xd={duration:.45,ease:[.4,0,.1,1]};function Pd(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(t.path[r].instance){n=t.path[r];break}var o=n&&n!==t.root?n.instance:document,a=o.querySelector('[data-projection-id="'.concat(e,'"]'));a&&t.mount(a,!0)}function Lo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function No(t){Lo(t.x),Lo(t.y)}var Td=ba({attachResizeListener:function(t,e){return Ze(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),yn={current:void 0},wd=ba({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!yn.current){var t=new Td(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),yn.current=t}return yn.current},resetTransform:function(t,e){t.style.transform=e??"none"},checkIsScrollRoot:function(t){return window.getComputedStyle(t).position==="fixed"}}),Ed=P(P(P(P({},af),Tc),Cf),Qf),Vd=gu(function(t,e){return nl(t,e,Ed,Yf,wd)});function Cd(){var t=!1,e=[],n=new Set,r={subscribe:function(o){return n.add(o),function(){return void n.delete(o)}},start:function(o,a){if(t){var i=[];return n.forEach(function(s){i.push(na(s,o,{transitionOverride:a}))}),Promise.all(i)}else return new Promise(function(s){e.push({animation:[o,a],resolve:s})})},set:function(o){return lt(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(a){Uc(a,o)})},stop:function(){n.forEach(function(o){Jc(o)})},mount:function(){return t=!0,e.forEach(function(o){var a=o.animation,i=o.resolve;r.start.apply(r,ft([],$(a),!1)).then(i)}),function(){t=!1,r.stop()}}};return r}function jd(){var t=pe(Cd);return h.useEffect(t.mount,[]),t}var Rd=jd;const Ad=({onClose:t,threshold:e=.08,children:n})=>{const r=h.useRef(null),o=Rd(),a=(i,s)=>{const u=r.current;if(!u)return;const l=u.getBoundingClientRect().height;s.offset.y>l*e?t():o.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return y.jsx(Vd.div,{ref:r,style:{height:"100%",width:"100%"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:o,initial:{y:0},onDragEnd:a,children:n})},Md=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:"none",viewBox:"0 0 24 24",...r,children:y.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})}),fr=({stories:t,currentIndex:e,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:o,inline:a,loop:i,onClose:s,className:u=""})=>{const[l,c]=h.useState(0),f=()=>{c(v=>v+1)},d=()=>{n&&n(),i&&f()};if((t==null?void 0:t.length)==0)return y.jsx(y.Fragment,{});const p=a?({children:v})=>v:Ad;return y.jsxs("div",{className:Bt(Ct.StoryPlayer,u,{[Ct.inline]:a}),children:[y.jsx("div",{className:Ct.Overlay,onClick:r}),y.jsx("div",{className:Ct.StoryPlayer__Wrap,children:y.jsxs(p,{onClose:s,children:[y.jsx("div",{className:Ct.CloseIcon,onClick:s,children:y.jsx(Md,{})}),y.jsx(Qs,{onStoryChange:o,currentIndex:e,stories:t,width:"100%",height:"100%",onAllStoriesEnd:d,classNames:{progressContainer:Ct.progressContainer,progressBar:Ct.progressBar,progressBarContainer:Ct.progressBarContainer}},l)]})})]})},Id="_story_hjut8_1",Od="_BetSlip_Wrapper_hjut8_13",Ld="_BetSlip_ButtonWrap_hjut8_24",ae={story:Id,BetSlip_Wrapper:Od,BetSlip_ButtonWrap:Ld},Nd="es-PE";function Dd(t,e=Nd){const n=new Date(t),r=n.toLocaleDateString(e,{day:"2-digit",month:"2-digit"}),o=n.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${o}`}class Bd{static fromRaw(e){var i,s,u;const n=((s=(i=e==null?void 0:e.stakes)==null?void 0:i.find(l=>l.isEnabled))==null?void 0:s.preciseValue)??0,r=(u=e==null?void 0:e.selections)==null?void 0:u.map(l=>{var b,g,x,S,T,E;const c=parseFloat((g=(b=l==null?void 0:l.odd)==null?void 0:b.price)==null?void 0:g.toFixed(2)),f=Dd((x=l==null?void 0:l.event)==null?void 0:x.startDate),d=(T=(S=l==null?void 0:l.odd)==null?void 0:S.offers)==null?void 0:T.find(V=>V.type===0),v=l.market.name,m=(E=l==null?void 0:l.bbSelections)==null?void 0:E.map(V=>{var k,K,H,F,R;const I=(k=V==null?void 0:V.odd)==null?void 0:k.price,N=parseFloat(I.toFixed(2)),j=(H=(K=V==null?void 0:V.odd)==null?void 0:K.offers)==null?void 0:H.find(U=>U.type===0);return{marketName:(F=V==null?void 0:V.market)==null?void 0:F.name,name:(R=V==null?void 0:V.odd)==null?void 0:R.name,cuota:N,hasPA:!!j,paParam:j==null?void 0:j.parameter}});return{name:l.odd.name,cuota:c,event:l.event.name,fechaHora:f,hasPA:!!d,paParam:d==null?void 0:d.parameter,marketName:v,subSelections:m}}),o=parseFloat(r==null?void 0:r.reduce((l,c)=>l*(c==null?void 0:c.cuota),1).toFixed(2)),a=parseFloat((n*o).toFixed(2));return{selections:r,stake:n,cuotaTotal:o,gananciaTotal:a}}}const kd="_BetSlip_hse67_1",Fd="_BetSlip_Title_hse67_12",Hd="_SelectionItemWrap_hse67_19",Wd="_BetSlip_ButtonWrap_hse67_38",Re={BetSlip:kd,BetSlip_Title:Fd,SelectionItemWrap:Hd,BetSlip_ButtonWrap:Wd},qd="_SelectionItem_1ut02_1",Gd="_SelectionItemGrid_1ut02_11",zd="_SelectionItem_name_1ut02_17",Ud="_SelectionItem_marketName_1ut02_21",Yd="_SelectionItem_hasPA_1ut02_28",Xd="_SelectionItem_fechahora_1ut02_37",Zd="_SelectionItem__Wrap_1ut02_42",Kd="_SelectionItem__BB_1ut02_47",Jd="_SelectionItem__BB__mn_1ut02_80",ut={SelectionItem:qd,SelectionItemGrid:Gd,SelectionItem_name:zd,SelectionItem_marketName:Ud,SelectionItem_hasPA:Yd,SelectionItem_fechahora:Xd,SelectionItem__Wrap:Zd,SelectionItem__BB:Kd,SelectionItem__BB__mn:Jd},Qd=({selection:t})=>{var e,n;return y.jsxs("div",{className:ut.SelectionItem,children:[y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_name,children:t!=null&&t.subSelections?"Crear Apuesta":t.name}),y.jsx("div",{className:ut.SelectionItem_sc,children:t.cuota.toFixed(2)})]}),t!=null&&t.subSelections?null:y.jsx("div",{className:ut.SelectionItemGrid,children:y.jsxs("div",{className:ut.SelectionItem_marketName,children:[y.jsx("div",{children:t.marketName}),t.hasPA&&y.jsx("div",{className:ut.SelectionItem_hasPA,children:"PA"})]})}),y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_event,children:t.event}),y.jsx("div",{className:ut.SelectionItem_fechahora,children:t.fechaHora})]}),((e=t==null?void 0:t.subSelections)==null?void 0:e.length)>0?y.jsx("div",{className:ut.SelectionItem__Wrap,children:(n=t.subSelections)==null?void 0:n.map((r,o)=>y.jsxs("div",{className:ut.SelectionItem__BB,children:[y.jsx("div",{className:ut.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),y.jsx("div",{children:r==null?void 0:r.name})]},o))}):y.jsx(y.Fragment,{})]})},_d="_PulseButton_1udbm_1",$d="_PulseButton_BG_1udbm_8",Do={PulseButton:_d,PulseButton_BG:$d},tv="_Button_1lfmc_1",ev={Button:tv},xa=({children:t,href:e})=>y.jsxs("div",{className:Do.PulseButton,children:[y.jsx("div",{className:Do.PulseButton_BG}),y.jsx("a",{className:ev.Button,href:e,children:t})]}),nv=({slip:t,title:e})=>{var n;return y.jsxs("div",{className:Re.BetSlip,children:[y.jsxs("div",{className:Re.SelectionItemWrap,children:[e?y.jsx("div",{className:Re.BetSlip_Title,children:e}):null,(n=t==null?void 0:t.selections)==null?void 0:n.map((r,o)=>y.jsx(Qd,{selection:r},`${Date.now()}-${o}`))]}),t!=null&&t.cuotaTota?y.jsx("div",{className:Bt(Re.BetSlip_ButtonWrap),children:y.jsx(xa,{href:"https://www.apuestatotal.com/apuestas-deportivas/?reservationCode=HHHH",children:t==null?void 0:t.cuotaTotal})}):null]})},dr=({story:t})=>{let e=Bo;return(t==null?void 0:t.type)=="promo"&&(e=Bo),(t==null?void 0:t.type)=="betting"&&(e=rv),y.jsx(e,{story:t})},Bo=({story:t})=>y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),t!=null&&t.btn_text&&(t!=null&&t.btn_url)?y.jsx("div",{className:Bt(ae.BetSlip_Wrapper),children:y.jsx("div",{className:ae.BetSlip_ButtonWrap,children:y.jsxs(xa,{href:t==null?void 0:t.btn_url,children:[" ",t==null?void 0:t.btn_text]})})}):null]}),rv=({story:t})=>{const e=JSON.parse((t==null?void 0:t.coupon_result)??"{}");return console.log(e),y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),y.jsx("div",{className:ae.BetSlip_Wrapper,children:y.jsx(nv,{slip:Bd.fromRaw(e),title:t==null?void 0:t.coupon_title})})]})},ov="_StoryHeaderPlayer_1oqtd_1",iv="_StoryHeaderPlayer__ProfileStory_1oqtd_18",av="_StoryHeaderPlayer__title_1oqtd_24",Sn={StoryHeaderPlayer:ov,StoryHeaderPlayer__ProfileStory:iv,StoryHeaderPlayer__title:av},vr=({story:t,onProfileClick:e=()=>null,color:n,image:r})=>y.jsxs("div",{className:Sn.StoryHeaderPlayer,children:[y.jsx(qe,{className:Sn.StoryHeaderPlayer__ProfileStory,onProfileClick:e,color:n,image:r}),y.jsx("div",{className:Sn.StoryHeaderPlayer__title,children:t==null?void 0:t.title})]}),sv=({container:t="HOME"}={})=>{const e="apuestotal-stories-"+t;function n(){const u=localStorage.getItem(e);if(!u)return{};try{const l=JSON.parse(u),c={};for(const f in l)c[f]={seenStoryIds:new Set(l[f].seenStoryIds)};return c}catch(l){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",l),{}}}function r(u){const l={};for(const c in u)l[c]={seenStoryIds:Array.from(u[c].seenStoryIds)};localStorage.setItem(e,JSON.stringify(l))}function o(u,l){const c=n();c[u]||(c[u]={seenStoryIds:new Set}),c[u].seenStoryIds.add(l),r(c)}function a(u){const c=n()[u==null?void 0:u.id];return c?u.stories.every(f=>c.seenStoryIds.has(f==null?void 0:f.id)):!1}function i(u){const c=n()[u.id];if(!c)return 0;for(let f=0;f<u.stories.length;f++)if(!c.seenStoryIds.has(u.stories[f].id))return f;return 0}function s(u){const l=[],c=[];for(const f of u)a(f)?c.push(f):l.push(f);return[...l,...c]}return{markStorySeen:o,hasSeenAllStories:a,getNextUnseenStoryIndex:i,sortProfilesBySeenStatus:s}};function uv(t,e){const n=h.useCallback(()=>{e()},[e]);h.useEffect(()=>{if(!t)return;window.history.pushState({storiesOpen:!0},"");const r=a=>{(a.key==="Escape"||a.key==="Esc")&&n()},o=()=>{n()};return window.addEventListener("keydown",r),window.addEventListener("popstate",o),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",o)}},[t,n])}function lv({scroll:t,targets:e}){const n=h.useRef([]),r=h.useCallback(a=>{n.current.forEach(({el:i,originalOverflow:s})=>{i.style.overflow=s}),n.current=[],a.forEach(i=>{if(typeof i=="string"){const s=document.getElementById(i);s?(n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${i}"`)}else i===window||i===document?[document.body,document.documentElement].forEach(s=>{n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",i)})},[]),o=h.useCallback(()=>{n.current.forEach(({el:a,originalOverflow:i})=>{a.style.overflow=i}),n.current=[]},[]);return h.useEffect(()=>{switch(t){case"ON":o();break;case"OFF":r(e);break}},[t]),{disableScroll:r,enableScroll:o}}const Pa=({className:t="",data:e,isPortal:n=!0})=>{var b;const[r,o]=h.useState(null),a=g=>o(g),{markStorySeen:i,hasSeenAllStories:s,getNextUnseenStoryIndex:u,sortProfilesBySeenStatus:l}=sv(),c=l(e==null?void 0:e.filter(g=>g.stories.length)),f=h.useRef(c);h.useEffect(()=>{f.current=c},[c]);const d=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r),p=((b=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r))==null?void 0:b.stories)??[];uv(r,()=>o(null)),lv({targets:[document],scroll:r?"OFF":"ON"});const v=()=>{o(null),f.current=c},m=()=>{if(!r)return null;const g=p.map(S=>({type:"component",component:({pause:T,resume:E,story:V,isPaused:I})=>(i(d==null?void 0:d.id,S.id),y.jsx(dr,{story:S})),duration:S!=null&&S.duration?(S==null?void 0:S.duration)*1e3:7e3,header:()=>y.jsx(vr,{color:d==null?void 0:d.color,image:d==null?void 0:d.avatar,story:S},S==null?void 0:S.id)})),x=y.jsx(fr,{onClose:v,onOverlayClick:v,onStoryChange:S=>{},onAllStoriesEnd:async()=>{var E;const S=f.current.findIndex(V=>V.id==r),T=f.current.filter(V=>V.id!==r);f.current=T,(E=f.current[S])!=null&&E.id?o(f.current[S].id):(o(null),f.current=c)},currentIndex:d?u(d):0,stories:g},r);return n?Ta.createPortal(x,document.body):x};return y.jsxs(y.Fragment,{children:[y.jsx(ps,{wrapperClassName:Bt($e.ScrollMenu,t),scrollContainerClassName:$e.scrollContainerClassName,itemClassName:$e.itemClassName,children:c.map((g,x)=>y.jsx(qe,{hasSeenAllStories:s(g),onProfileClick:()=>a(g==null?void 0:g.id),color:g==null?void 0:g.color,image:g==null?void 0:g.avatar,title:g==null?void 0:g.name},g==null?void 0:g.id))}),r!=null&&m()]})};async function cv(){try{const t=await fetch("https://dev-api-stories.kurax.dev/at-stories/v1/cards/public/HOME",{method:"GET",headers:{"sec-ch-ua-platform":'"Android"',Referer:"https://atstories-backoffice.dev.fromsolvers.com/","User-Agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Mobile Safari/537.36",Accept:"application/json, text/plain, */*","sec-ch-ua":'"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',"Content-Type":"application/json","sec-ch-ua-mobile":"?1"}});if(!t.ok){const n=await t.json();console.error("Error en la respuesta:",t.status),console.error(n);return}return await t.json()}catch(t){console.error("Error al hacer la petición:",t==null?void 0:t.message)}}function fv(){var o,a;const[t,e]=h.useState([]);h.useEffect(()=>{cv().then(i=>{(i==null?void 0:i.length)>0&&e(i)})},[]);const n=(t==null?void 0:t[0])??{},r=(a=(o=t==null?void 0:t[0])==null?void 0:o.stories)==null?void 0:a[0];return y.jsxs("div",{className:"App",children:[y.jsx("h2",{children:"Perfil + Stories"}),y.jsx("hr",{}),y.jsx(Pa,{data:t}),y.jsx("br",{}),y.jsx("h2",{children:"Perfil"}),y.jsx("hr",{}),y.jsx("br",{}),y.jsx(qe,{color:"#119b62",image:Ea,onProfileClick:()=>null,className:"custom__class",title:"Momazos",width:"120px"}),y.jsx("br",{}),y.jsx("h2",{children:"Story"}),y.jsx("hr",{}),y.jsx("br",{}),y.jsx(fr,{inline:!0,loop:!0,stories:[{type:"component",component:({pause:i,resume:s,story:u,isPaused:l})=>y.jsx(dr,{story:{...r,type:"betting"}}),duration:r!=null&&r.duration?(r==null?void 0:r.duration)*1e3:7e3,header:()=>y.jsx(vr,{color:n==null?void 0:n.color,image:n==null?void 0:n.avatar,story:r})}]})]})}exports.ManagmentStoryComponent=dr;exports.MyStory=fv;exports.ProfileStories=Pa;exports.ProfileStory=qe;exports.StoryHeaderPlayer=vr;exports.StoryPlayer=fr;
|
|
5
|
+
*/var hr;function Na(){return hr||(hr=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(a=o(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var s in a)e.call(a,s)&&a[s]&&(i=o(i,s));return i}function o(a,i){return i?a?a+" "+i:a+i:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(tn)),tn.exports}var Da=Na();const Bt=ko(Da);function Ba(){const[t,e]=h.useState({width:0,height:0}),n=h.useRef();return[h.useCallback(o=>{n.current&&n.current.disconnect(),o&&(n.current=new ResizeObserver(a=>{const i=a[0];if(!i)return;const{width:s,height:u}=i.contentRect;s&&u&&e({width:s,height:u})}),n.current.observe(o))},[]),t]}var en,mr;function ka(){return mr||(mr=1,en={hexToRGB:r=>{let o=r;return o.length===4&&(o=o[0]+o[1]+o[1]+o[2]+o[2]+o[3]+o[3]),{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}},formatRGB:({r,g:o,b:a})=>`rgb(${r},${o},${a})`,formatRGBA:({r,g:o,b:a},i)=>`rgba(${r},${o},${a},${i})`}),en}var nn,gr;function Fa(){if(gr)return nn;gr=1;const{hexToRGB:t,formatRGB:e,formatRGBA:n}=ka();return nn=(o,a)=>{const i=t(o);return typeof a=="number"&&a>=0&&a<=1?n(i,a):e(i)},nn}var Ha=Fa();const Wa=ko(Ha),qe=({image:t,title:e,color:n,className:r,onProfileClick:o,width:a,hasSeenAllStories:i})=>{const[s,{width:u,height:l}]=Ba();return y.jsx("div",{ref:s,children:y.jsxs("div",{className:Bt(Ft.ProfileStory,r,{[Ft.hasSeenAllStories]:i}),onClick:o,style:{"--story-color":n,"--story-color-alpha":n&&Wa(n,.7),"--story-width":a??`${u}px`},children:[y.jsx("div",{className:Ft.ProfileStoryWrap,children:y.jsx("div",{className:Ft.ProfileStory__wrapImage,children:y.jsx("div",{className:Ft.ProfileStory__image,children:y.jsx("img",{src:t,alt:"",draggable:!1})})})}),e&&y.jsx("div",{className:Ft.ProfileStory__title,children:e})]})})},Ot="react-horizontal-scrolling-menu",qa=`${Ot}--item`,Ga=`${Ot}--scroll-container`,za=`${Ot}--wrapper`,Ua=`${Ot}--inner-wrapper`,Ya=`${Ot}--header`,Xa=`${Ot}--arrow-left`,Za=`${Ot}--arrow-right`,Ka=`${Ot}--footer`,Ja="itemId",Fo="data-key",Ho="data-index",mt={first:"first",last:"last",onInit:"onInit",onUpdate:"onUpdate"},ct="",Qa={current:null};let _a=class{constructor(){this.subscribe=(e,n)=>{this.observers.set(e,(this.observers.get(e)||[]).concat(n))},this.unsubscribe=(e,n)=>{const r=(this.observers.get(e)||[]).filter(o=>o!==n);r.length?this.observers.set(e,r):this.observers.delete(e)},this.emitUpdates=(e,n)=>{const r=this.observers.get(e)||[];r==null||r.forEach(o=>o(n))},this.updateBatch=(e,n=!0)=>{e.length&&(e.forEach(([r,o])=>this.emitUpdates(r,o)),n&&this.emitUpdates(mt.onUpdate))},this.update=(e,n)=>{this.emitUpdates(e,n),this.emitUpdates(mt.onUpdate)},this.observers=new Map}},$a=class extends Map{constructor(){super(),this.subscribe=(e,n)=>this.observer.subscribe(e,n),this.unsubscribe=(e,n)=>this.observer.unsubscribe(e,n),this.isEdgeItem=({key:e,value:n,first:r=this.first(),last:o=this.last()})=>{const a=[];return e===(r==null?void 0:r.key)?a.push([mt.first,n]):e===(o==null?void 0:o.key)&&a.push([mt.last,n]),a},this.edgeItemsCheck=e=>{const n=this.first(),r=this.last(),o=e.find(([s])=>s===(n==null?void 0:n.key)),a=[];o&&a.push([mt.first,o[1]]);const i=e.find(([s])=>s===(r==null?void 0:r.key));return i&&a.push([mt.last,i[1]]),a},this.toArr=()=>this.sort([...this]),this.toItems=()=>this.toArr().map(([e])=>e),this.sort=e=>e.sort(([,n],[,r])=>+n.index-+r.index),this.set=(e,n)=>{const r=String(e),o=[[r,n]];return super.set(r,n),o.push(...this.isEdgeItem({key:r,value:n,first:this.first(),last:this.last()})),this.observer.updateBatch(o),this},this.setBatch=e=>{this.firstRun&&this.observer.update(mt.onInit);const n=[...e];return this.sort(n).forEach(([r,o])=>{super.set(String(r),o)}),n.push(...this.edgeItemsCheck(n)),this.observer.updateBatch(n,!this.firstRun),this.firstRun=!1,this},this.first=()=>{var e;return(e=this.toArr()[0])===null||e===void 0?void 0:e[1]},this.last=()=>{var e,n;return(n=(e=this.toArr().slice(-1))===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n[1]},this.filter=e=>this.toArr().filter(e),this.find=e=>this.toArr().find(e),this.findIndex=e=>this.toArr().findIndex(e),this.getCurrentPos=e=>{const n=this.toArr(),r=n.findIndex(([o,a])=>o===e||a===e);return[n,r]},this.prev=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o-1])===null||n===void 0?void 0:n[1]:void 0},this.next=e=>{var n;const[r,o]=this.getCurrentPos(e);return o!==-1?(n=r[o+1])===null||n===void 0?void 0:n[1]:void 0},this.getVisible=()=>this.filter(e=>e[1].visible),this.observer=new _a,this.firstRun=!0}};const yr=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Sr=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",rn=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Sr(n.overflowY,e)||Sr(n.overflowX,e)||(r=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(t)}return!1},Se=(t,e,n,r,o,a,i,s)=>a<t&&i>e||a>t&&i<e?0:a<=t&&s<=n||i>=e&&s>=n?a-t-r:i>e&&s<n||a<t&&s>n?i-e+o:0,ts=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},br=(t,e)=>{var n,r,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f=typeof l=="function"?l:J=>J!==l;if(!yr(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=t;for(;yr(v)&&f(v);){if(v=ts(v),v===d){p.push(v);break}v!=null&&v===document.body&&rn(v)&&!rn(document.documentElement)||v!=null&&rn(v,c)&&p.push(v)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:g,scrollY:x}=window,{height:S,width:T,top:E,right:V,bottom:I,left:N}=t.getBoundingClientRect(),{top:j,right:k,bottom:K,left:H}=(J=>{const M=window.getComputedStyle(J);return{top:parseFloat(M.scrollMarginTop)||0,right:parseFloat(M.scrollMarginRight)||0,bottom:parseFloat(M.scrollMarginBottom)||0,left:parseFloat(M.scrollMarginLeft)||0}})(t);let F=s==="start"||s==="nearest"?E-j:s==="end"?I+K:E+S/2-j+K,R=u==="center"?N+T/2-H+k:u==="end"?V+k:N-H;const U=[];for(let J=0;J<p.length;J++){const M=p[J],{height:nt,width:rt,top:ot,right:W,bottom:Z,left:D}=M.getBoundingClientRect();if(i==="if-needed"&&E>=0&&N>=0&&I<=b&&V<=m&&E>=ot&&I<=Z&&N>=D&&V<=W)return U;const w=getComputedStyle(M),C=parseInt(w.borderLeftWidth,10),L=parseInt(w.borderTopWidth,10),O=parseInt(w.borderRightWidth,10),B=parseInt(w.borderBottomWidth,10);let q=0,tt=0;const et="offsetWidth"in M?M.offsetWidth-M.clientWidth-C-O:0,_="offsetHeight"in M?M.offsetHeight-M.clientHeight-L-B:0,xt="offsetWidth"in M?M.offsetWidth===0?0:rt/M.offsetWidth:0,Zt="offsetHeight"in M?M.offsetHeight===0?0:nt/M.offsetHeight:0;if(d===M)q=s==="start"?F:s==="end"?F-b:s==="nearest"?Se(x,x+b,b,L,B,x+F,x+F+S,S):F-b/2,tt=u==="start"?R:u==="center"?R-m/2:u==="end"?R-m:Se(g,g+m,m,C,O,g+R,g+R+T,T),q=Math.max(0,q+x),tt=Math.max(0,tt+g);else{q=s==="start"?F-ot-L:s==="end"?F-Z+B+_:s==="nearest"?Se(ot,Z,nt,L,B+_,F,F+S,S):F-(ot+nt/2)+_/2,tt=u==="start"?R-D-C:u==="center"?R-(D+rt/2)+et/2:u==="end"?R-W+O+et:Se(D,W,rt,C,O+et,R,R+T,T);const{scrollLeft:Kt,scrollTop:Jt}=M;q=Zt===0?0:Math.max(0,Math.min(Jt+q/Zt,M.scrollHeight-nt/Zt+_)),tt=xt===0?0:Math.max(0,Math.min(Kt+tt/xt,M.scrollWidth-rt/xt+et)),F+=Jt-q,R+=Kt-tt}U.push({el:M,top:q,left:tt})}return U};function xr(t,e){if(!t.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((o=>typeof o=="object"&&typeof o.behavior=="function")(e))return e.behavior(br(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:o,top:a,left:i}of br(t,(s=>s===!1?{block:"end",inline:"nearest"}:(u=>u===Object(u)&&Object.keys(u).length!==0)(s)?s:{block:"start",inline:"nearest"})(e))){const s=a-n.top+n.bottom,u=i-n.left+n.right;o.scroll({top:s,left:u,behavior:r})}}let on;const Wo=()=>(on||(on="performance"in window?performance.now.bind(performance):Date.now),on());function qo(t){const e=Wo(),n=Math.min((e-t.startTime)/t.duration,1),r=t.ease(n),o=t.startX+(t.x-t.startX)*r,a=t.startY+(t.y-t.startY)*r;t.method(o,a,n,r),o!==t.x||a!==t.y?requestAnimationFrame(()=>qo(t)):t.cb()}function es(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c=>1+--c*c*c*c*c,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0;const s=t,u=t.scrollLeft,l=t.scrollTop;qo({scrollable:s,method:(c,f,d,p)=>{const v=Math.ceil(c),m=Math.ceil(f);t.scrollLeft=v,t.scrollTop=m,i==null||i({target:t,elapsed:d,value:p,left:v,top:m})},startTime:Wo(),startX:u,startY:l,x:e,y:n,duration:r,ease:o,cb:a})}const ns=function(t,e){const n=e||{};return(r=>r&&!r.behavior||r.behavior==="smooth")(n)?xr(t,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,skipOverflowHiddenElements:n.skipOverflowHiddenElements,behavior:r=>Promise.all(r.reduce((o,a)=>{let{el:i,left:s,top:u}=a;const l=i.scrollLeft,c=i.scrollTop;return l===s&&c===u?o:[...o,new Promise(f=>es(i,s,u,n.duration,n.ease,()=>f({el:i,left:[l,s],top:[c,u]}),n.onScrollChange))]},[]))}):Promise.resolve(xr(t,e))},rs=t=>Object.values(t).map(e=>e.current).filter(Boolean);function an(t,e,n,r,o,a){var i;const s=((i=t==null?void 0:t.entry)===null||i===void 0?void 0:i.target)||t;if(!s)return;const u={behavior:e||"smooth",inline:n||"end",block:r||"nearest"};return a?s.scrollIntoView(u):ns(s,Object.assign(Object.assign({},o),u))}const os=t=>document.querySelector(`[${Fo}='${t}']`),is=t=>document.querySelector(`[${Ho}='${t}']`);function be(t){return h.isValidElement(t)&&t||typeof t=="function"&&h.createElement(t,null)||!!t&&typeof t=="object"&&h.createElement(t,null)||null}const Go=t=>{var e;return String(((e=t==null?void 0:t.props)===null||e===void 0?void 0:e[Ja])||String((t==null?void 0:t.key)||ct).replace(/^\.\$/,ct))};function xn(t){return!!t&&Object.prototype.hasOwnProperty.call(t,"current")}var as=h.memo(function({children:t,className:e,id:n,index:r,refs:o}){const a=h.useRef(null);return o[String(r)]=a,h.createElement("div",{className:e,[Fo]:n,[Ho]:r,ref:a},t)});function ss({children:t,itemClassName:e=ct,refs:n}){const r=h.Children.toArray(t).filter(Boolean),o=h.useMemo(()=>`${qa} ${e}`,[e]);return r.map((a,i)=>{const s=Go(a);return h.createElement(as,{className:o,id:s,key:s,refs:n,index:i},a)})}function us({className:t=ct,children:e,onScroll:n=()=>{},scrollRef:r,containerRef:o}){const a=h.useMemo(()=>`${Ga} ${t}`,[t]),i=h.useCallback(s=>{xn(r)?r.current=s:r(s),xn(o)?o.current=s:o(s)},[r,o]);return h.createElement("div",{className:a,onScroll:n,ref:i},e)}const ls=h.createContext({}),cs=typeof window<"u"?h.useLayoutEffect:h.useEffect;function fs({items:t,itemsChanged:e,refs:n,options:r}){const o=h.useRef(),a=h.useCallback(i=>{t.setBatch(function(s,u){return[...s].map(l=>{var c,f,d,p;const v=l.target,m=String((f=(c=v==null?void 0:v.dataset)===null||c===void 0?void 0:c.key)!==null&&f!==void 0?f:ct);return[m,{index:String((p=(d=v==null?void 0:v.dataset)===null||d===void 0?void 0:d.index)!==null&&p!==void 0?p:ct),key:m,entry:l,visible:l.intersectionRatio>=u.ratio}]})}(i,r))},[t,r]);cs(()=>{const i=rs(n),s=o.current||new IntersectionObserver(a,r);return o.current=s,i.forEach(u=>s.observe(u)),()=>{s.disconnect(),o.current=void 0}},[a,e,r,n])}const ds=t=>h.Children.toArray(t).map(Go).filter(Boolean),Pr={ratio:.9,rootMargin:"5px",threshold:[.05,.5,.75,.95]},vs={current:{}},xe=()=>{};function ps({LeftArrow:t,RightArrow:e,children:n,Header:r,Footer:o,transitionDuration:a=500,transitionBehavior:i,onInit:s=xe,onUpdate:u=xe,onMouseDown:l,onMouseLeave:c,onMouseUp:f,onMouseMove:d,onScroll:p=xe,onTouchMove:v,onTouchStart:m,onTouchEnd:b,onWheel:g=xe,options:x=Pr,scrollContainerClassName:S=ct,containerRef:T=Qa,itemClassName:E=ct,wrapperClassName:V=ct,apiRef:I=vs,RTL:N,noPolyfill:j}){const k=be(t),K=be(e),H=be(r),F=be(o),R=h.useRef(null),[U]=h.useState({}),J=h.useMemo(()=>Object.assign(Object.assign(Object.assign({},Pr),x),{root:R.current}),[x]),M=h.useRef(new $a).current,nt=function(O,B){const[q,tt]=h.useState(ct),et=h.useMemo(()=>ds(O),[O]);return h.useEffect(()=>{const _=et.filter(Boolean).join(ct);B.toItems().filter(xt=>!et.includes(xt)).forEach(xt=>{B.delete(xt)}),tt(_)},[et,B]),q}(n,M);fs(h.useMemo(()=>({items:M,itemsChanged:nt,options:J,refs:U}),[M,nt,U,J]));const rt=h.useMemo(()=>function(O,B,q){var tt,et,_;const xt=!!(!((tt=O.first())===null||tt===void 0)&&tt.visible),Zt=!!(!((et=O.last())===null||et===void 0)&&et.visible),Kt=G=>{var Y;return(Y=O.find(st=>st[1].key===String(G)))===null||Y===void 0?void 0:Y[1]},Jt=()=>{var G,Y;const st=(Y=(G=O.getVisible())===null||G===void 0?void 0:G[0])===null||Y===void 0?void 0:Y[1];return st?O.prev(st):void 0},pr=()=>{var G;const Y=(G=O.getVisible().findLast(()=>!0))===null||G===void 0?void 0:G[1];return Y?O.next(Y):void 0},_e=(_=B==null?void 0:B.boundary)===null||_===void 0?void 0:_.current;return{getItemById:Kt,getItemElementById:os,getItemByIndex:G=>{var Y;return(Y=O.find(st=>String(st[1].index)===String(G)))===null||Y===void 0?void 0:Y[1]},getItemElementByIndex:is,getNextElement:pr,getPrevElement:Jt,isFirstItemVisible:xt,isItemVisible:G=>O.getVisible().map(Y=>Y[0]).includes(String(G)),isLastItem:G=>O.last()===Kt(G),isLastItemVisible:Zt,scrollNext:(G,Y,st,{duration:Pt,boundary:vt=_e}={})=>{const gt=G??(B==null?void 0:B.behavior);return an(pr(),gt,Y||"start",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},q)},scrollPrev:(G,Y,st,{duration:Pt,boundary:vt=_e}={})=>{const gt=G??(B==null?void 0:B.behavior);return an(Jt(),gt,Y||"end",st||"nearest",{boundary:vt,duration:Pt??(B==null?void 0:B.duration)},q)},useIsVisible:(G,Y=!1)=>{const[st,Pt]=h.useState(Y),vt=h.useCallback(gt=>{Pt(!!(gt!=null&>.visible))},[]);return h.useEffect(()=>(O.subscribe(G,vt),()=>{O.unsubscribe(G,vt)}),[G,vt]),st},scrollToItem:(G,Y,st,Pt,vt)=>{var gt;return an(G,Y??(B==null?void 0:B.behavior),st,Pt,Object.assign(Object.assign({boundary:_e},vt),{duration:(gt=vt==null?void 0:vt.duration)!==null&>!==void 0?gt:B==null?void 0:B.duration}),q)}}}(M,{duration:a,behavior:i,boundary:R},j),[M,a,i,j]),ot=h.useCallback(()=>Object.assign(Object.assign({},rt),{items:M,scrollContainer:R}),[rt,M,R]),[W,Z]=h.useState(()=>ot());(({context:O,onInit:B,onUpdate:q})=>{const tt=h.useCallback(()=>B(O),[B,O]),et=h.useCallback(()=>q(O),[q,O]),{items:_}=O;h.useEffect(()=>(_.subscribe(mt.onInit,tt),_.subscribe(mt.onUpdate,et),()=>{_.unsubscribe(mt.onInit,tt),_.unsubscribe(mt.onUpdate,et)}),[_,tt,et])})({context:W,onInit:s,onUpdate:u}),h.useEffect(()=>Z(ot()),[ot]),h.useEffect(()=>{xn(I)?I.current=W:I(W)},[W,I]);const D=h.useCallback(O=>p(W,O),[p,W]),w=h.useCallback(O=>g(W,O),[g,W]),C=h.useMemo(()=>`${za} ${V}`,[V]),L=h.useMemo(()=>`${S}${N?" rtl":ct}`,[N,S]);return h.createElement("div",{className:C,onWheel:w,onMouseDown:l==null?void 0:l(W),onMouseLeave:c==null?void 0:c(W),onMouseUp:f==null?void 0:f(W),onMouseMove:d==null?void 0:d(W),onTouchStart:m==null?void 0:m(W),onTouchMove:v==null?void 0:v(W),onTouchEnd:b==null?void 0:b(W)},h.createElement(ls.Provider,{value:W},h.createElement("div",{className:Ya},H),h.createElement("div",{className:Ua},h.createElement("div",{className:Xa},k),h.createElement(us,{className:L,onScroll:D,scrollRef:R,containerRef:T},h.createElement(ss,{refs:U,itemClassName:E},n)),h.createElement("div",{className:Za},K)),h.createElement("div",{className:Ka},F)))}const hs="_StoryPlayer_3s15o_1",ms="_Overlay_3s15o_15",gs="_StoryPlayer__Wrap_3s15o_25",ys="_progressContainer_3s15o_37",Ss="_CloseIcon_3s15o_41",bs="_inline_3s15o_57",xs="_progressBarContainer_3s15o_75",Ps="_progressBar_3s15o_75",Ct={StoryPlayer:hs,Overlay:ms,StoryPlayer__Wrap:gs,progressContainer:ys,CloseIcon:Ss,inline:bs,progressBarContainer:xs,progressBar:Ps};var X=function(){return X=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},X.apply(this,arguments)},zo=h.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),sn=Object.freeze({LEFT:"left",RIGHT:"right"}),Ts="Actions-styles_left__eky50",ws="Actions-styles_right__zguoH";function Es(t){var e=t.onNextClick,n=t.onPrevClick,r=t.onPause,o=t.onResume,a=h.useState(!1),i=a[0],s=a[1],u=h.useRef(null);function l(d){d.stopPropagation(),d.preventDefault(),clearTimeout(u.current),u.current=setTimeout(function(){r(),s(!0)},200)}function c(d,p){if(p.stopPropagation(),p.preventDefault(),clearTimeout(u.current),i)return o(),void s(!1);o(),d!=sn.LEFT?e():n()}function f(d){return{onMouseUp:function(p){return c(d,p)},onTouchEnd:function(p){return c(d,p)},onTouchStart:function(p){return l(p)},onMouseDown:function(p){return l(p)}}}return y.jsxs(h.Fragment,{children:[y.jsx("div",X({className:Ts},f(sn.LEFT))),y.jsx("div",X({className:ws},f(sn.RIGHT)))]})}function Ge(){return h.useContext(zo)}var Vs="ProgressBar-styles_wrapper__oqUCo",Cs="ProgressBar-styles_bar__x0O50",Tr=0,wr=.1;function js(t){var e,n,r,o,a,i=Ge(),s=i.defaultDuration,u=i.classNames,l=h.useRef(null),c=h.useRef(null),f=h.useState(!1),d=f[0],p=f[1];return h.useEffect(function(){!t.isPaused&&t.isActive&&t.isActive?p(!0):p(!1)},[t.isActive,t.isPaused]),h.useEffect(function(){var v;l.current&&(t.hasStoryPassed?l.current.style.width="".concat((v=c==null?void 0:c.current)===null||v===void 0?void 0:v.offsetWidth,"px"):l.current.style.width="0px")},[t.hasStoryPassed,t.isActive]),e=function(v){var m;l.current&&c.current&&((Tr=Number((l.current.style.width||"1px").slice(0,l.current.style.width.length-2))||0)>c.current.offsetWidth?p(!1):(wr=((m=c==null?void 0:c.current)===null||m===void 0?void 0:m.offsetWidth)/((t.story.duration||s)/v),l.current.style.width="".concat(Tr+wr,"px")))},n=d,r=h.useRef(),o=h.useRef(),a=h.useRef(e),h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function v(m){if(o.current!=null){var b=m-o.current;a.current(b)}o.current=m,r.current=requestAnimationFrame(v)}),function(){cancelAnimationFrame(r.current),r.current=null,o.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),o.current=null}},[n]),y.jsx("div",X({className:"".concat(Vs," ").concat((u==null?void 0:u.progressBarContainer)||""),ref:c},{children:y.jsx("div",{className:"".concat(Cs," ").concat((u==null?void 0:u.progressBar)||""),ref:l})}))}var Rs="progress-styles_wrapper__qQPyW";function As(t){var e=Ge(),n=e.stories,r=e.classNames;return y.jsx("div",X({className:"".concat(Rs," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(o){return y.jsx(js,{hasStoryPassed:o.index<t.activeStoryIndex,isActive:o.index===t.activeStoryIndex,story:o,isPaused:o.index===t.activeStoryIndex&&t.isPaused},o.index)})}))}var un=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),Ms="Story-styles_wrapper__oJP7j",Is="Story-styles_header__-rnWL",Os="Image-styles_image__gnfW1";function Ls(t){return h.useEffect(function(){t.onPause()},[]),y.jsx("img",{className:Os,src:t.story.url,alt:"story",onLoad:function(){setTimeout(function(){t.onResume()},4)}})}var ln,Ns="Video-styles_video__BykuO",Ds="Video-styles_loaderWrapper__TqVWk",Bs="Video-styles_loader__FxxSV",ks="Video-styles_soundIcon__ZvYXE";function Fs(t){return t.type==="off"?y.jsx("svg",X({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):y.jsx("svg",X({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:y.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var Pn="RSIsMute",Ht=typeof window>"u"?{}:window;function Hs(t){var e,n=Ge().isPaused,r=h.useState(((e=Ht==null?void 0:Ht.localStorage)===null||e===void 0?void 0:e.getItem(Pn))==="true"),o=r[0],a=r[1],i=h.useState(!1),s=i[0],u=i[1],l=h.useRef(null);function c(f){var d;(d=Ht==null?void 0:Ht.localStorage)===null||d===void 0||d.setItem(Pn,String(f)),a(f)}return h.useEffect(function(){t.onPause(),u(!0)},[]),h.useEffect(function(){l.current&&(!n||l.current.paused?l.current.play().catch(function(){var f;c(!0),(f=l.current)===null||f===void 0||f.play()}):l.current.pause())},[n]),y.jsxs(h.Fragment,{children:[y.jsxs("video",X({className:Ns,ref:l,playsInline:!0,"webkit-playsinline":"",controls:!1,src:t.story.url,onLoadedData:function(){setTimeout(function(){t.onResume(),u(!1)},4)},muted:o},{children:[y.jsx("source",{src:t.story.url,type:"video/mp4"}),y.jsx("source",{src:t.story.url,type:"video/webm"}),y.jsx("source",{src:t.story.url,type:"video/ogg"}),y.jsx("p",{children:"Video not supported"})]})),y.jsx("div",X({className:ks,onClick:function(){return c(!o)}},{children:y.jsx(Fs,{type:o?"off":"on"})})),s&&y.jsx("div",X({className:Ds},{children:y.jsx("div",{className:Bs})}))]})}(ln=Ht==null?void 0:Ht.localStorage)===null||ln===void 0||ln.setItem(Pn,"true");var Ws="CustomComponents-styles_component__w87Wx";function qs(t){return y.jsx("div",X({className:Ws},{children:y.jsx(t.story.component,{pause:t.onPause,resume:t.onResume,story:t.story,isPaused:t.isPaused})}))}var Gs="SeeMore-styles_seeMoreWrapper__kwjif",zs="SeeMore-styles_defaultSeeMore__-B1QW";function Us(t){return t.story.seeMore?y.jsx("button",X({type:"button",onClick:function(){t.onSeeMoreClick()},className:Gs},{children:function(){var e=t.story.seeMore,n=typeof e;if(["string","boolean"].includes(n)){var r=n==="string"?e:"See More";return y.jsxs("div",X({className:zs},{children:[y.jsx("span",{children:"^"}),y.jsx("p",{children:r})]}))}return n==="function"?y.jsx(t.story.seeMore,{}):t.story.seeMore}()})):null}var Ys="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",Xs="SeeMoreComponent-styles_closeIcon__LMm3b";function Zs(t){return t.story.seeMore&&t.story.seeMoreComponent?y.jsxs("div",X({className:Ys},{children:[y.jsx("button",X({className:Xs,onClick:t.onClose},{children:"✕"})),typeof t.story.seeMoreComponent=="function"?y.jsx(t.story.seeMoreComponent,{}):t.story.seeMoreComponent]})):null}function Ks(t){var e=h.useState(!1),n=e[0],r=e[1],o=Ge().classNames;return h.useEffect(function(){r(!1)},[t.story]),y.jsxs("div",X({className:"".concat(Ms," ").concat((o==null?void 0:o.storyContainer)||"")},{children:[t.story.type===un.IMAGE?y.jsx(Ls,X({},t)):t.story.type===un.VIDEO?y.jsx(Hs,X({},t)):t.story.type===un.COMPONENT?y.jsx(qs,X({},t)):null,t.story.header&&y.jsx("div",X({className:Is},{children:typeof t.story.header=="function"?y.jsx(t.story.header,{}):t.story.header})),y.jsx(Us,{onSeeMoreClick:function(){var a,i;t.onPause(),r(!0),(i=(a=t.story).onSeeMoreClick)===null||i===void 0||i.call(a,t.story.index)},story:t.story}),n&&y.jsx(Zs,{story:t.story,onClose:function(){t.onResume(),r(!1)}})]}))}var Js="styles_main__-0FEu";function Er(t){return t===void 0&&(t=4),Number(Math.random().toFixed(t))}function Qs(t){var e,n,r,o,a,i,s,u=t.stories,l=u===void 0?[]:u,c=t.width,f=c===void 0?"100%":c,d=t.height,p=d===void 0?"100%":d,v=t.onStoryChange,m=v===void 0?function(){}:v,b=t.currentIndex,g=b===void 0?0:b,x=t.defaultDuration,S=x===void 0?1e4:x,T=t.onAllStoriesEnd,E=T===void 0?function(){}:T,V=t.onStoriesStart,I=V===void 0?function(){}:V,N=t.classNames,j=N===void 0?{}:N,k=t.pauseStoryWhenInActiveWindow,K=k===void 0||k,H=h.useMemo(function(){return function(L,O){var B=0;return L.map(function(q,tt){var et=q.duration||O,_=et+Er();return _===B&&(_=et+Er(6)),B=_,X(X({},q),{index:tt,calculatedDuration:_})})}(l,S)},[l,S]),F=h.useState(),R=F[0],U=F[1],J=l.length-1,M=h.useState(!1),nt=M[0],rt=M[1],ot=h.useRef(!1),W=h.useRef(!1);function Z(){ot.current||(R==null?void 0:R.index)!==J||(E(),ot.current=!0),(R==null?void 0:R.index)!==J&&U(function(L){if(!L)return H[0];var O=(L==null?void 0:L.index)+1;return H[O]})}function D(){rt(!0)}function w(){rt(!1)}h.useEffect(function(){W.current||(W.current=!0,I())},[I]),h.useEffect(function(){var L=H[g];L&&U(L)},[g,l]),h.useEffect(function(){R&&m(R.index)},[R]),n=function(){Z()},r=(e=R==null?void 0:R.calculatedDuration)!==null&&e!==void 0?e:null,o=nt,a=h.useRef(),i=h.useRef(r),s=h.useRef(Date.now()),h.useEffect(function(){a.current=n},[n]),h.useEffect(function(){i.current=r},[r]),h.useEffect(function(){if(r!==null&&o===!1){s.current=Date.now();var L=setTimeout(function(){a.current()},i.current);return function(){clearTimeout(L)}}return function(){}},[r,o]),h.useEffect(function(){o&&(i.current=i.current-(Date.now()-s.current))},[o]),function(L){var O=h.useRef(L);h.useEffect(function(){O.current=L},[L]),h.useEffect(function(){function B(){O.current(!0)}function q(){O.current(!1)}return window.addEventListener("focus",B),window.addEventListener("blur",q),function(){window.removeEventListener("focus",B),window.removeEventListener("blur",q)}},[])}(function(L){K&&rt(!L)});var C={stories:H,width:f,height:p,defaultDuration:S,isPaused:nt,classNames:j};return R?y.jsx(zo.Provider,X({value:C},{children:y.jsxs("div",X({className:"".concat(Js," ").concat(j.main||""),style:{width:f,height:p}},{children:[y.jsx(As,{activeStoryIndex:R.index,isPaused:nt}),y.jsx(Ks,{onPause:D,onResume:w,story:R,isPaused:nt},R.index),y.jsx(Es,{onNextClick:Z,onPrevClick:function(){(R==null?void 0:R.index)!==0&&U(function(L){if(!L)return H[0];var O=(L==null?void 0:L.index)-1;return H[O]})},onPause:D,onResume:w})]}))})):null}var Tn=function(t,e){return Tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Tn(t,e)};function Uo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Tn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},P.apply(this,arguments)};function dt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function $(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,a=[],i;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,a;r<o;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var Vr="production",Yo=typeof process>"u"||process.env===void 0?Vr:process.env.NODE_ENV||Vr,Tt=function(t){return{isEnabled:function(e){return t.some(function(n){return!!e[n]})}}},se={measureLayout:Tt(["layout","layoutId","drag"]),animation:Tt(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Tt(["exit"]),drag:Tt(["drag","dragControls"]),focus:Tt(["whileFocus"]),hover:Tt(["whileHover","onHoverStart","onHoverEnd"]),tap:Tt(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Tt(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Tt(["whileInView","onViewportEnter","onViewportLeave"])};function _s(t){for(var e in t)t[e]!==null&&(e==="projectionNodeConstructor"?se.projectionNodeConstructor=t[e]:se[e].Component=t[e])}var ve=function(){},lt=function(){};process.env.NODE_ENV!=="production"&&(ve=function(t,e){!t&&typeof console<"u"&&console.warn(e)},lt=function(t,e){if(!t)throw new Error(e)});var Xo=h.createContext({strict:!1}),Zo=Object.keys(se),$s=Zo.length;function tu(t,e,n){var r=[],o=h.useContext(Xo);if(!e)return null;Yo!=="production"&&n&&o.strict&<(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<$s;a++){var i=Zo[a],s=se[i],u=s.isEnabled,l=s.Component;u(t)&&l&&r.push(bn.createElement(l,P({key:i},t,{visualElement:e})))}return r}var qn=h.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),ze=h.createContext({});function eu(){return h.useContext(ze).visualElement}var Ue=h.createContext(null),Xt=typeof document<"u",Cr=Xt?h.useLayoutEffect:h.useEffect,wn={current:null},Ko=!1;function nu(){if(Ko=!0,!!Xt)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return wn.current=t.matches};t.addListener(e),e()}else wn.current=!1}function ru(){!Ko&&nu();var t=$(h.useState(wn.current),1),e=t[0];return e}function ou(){var t=ru(),e=h.useContext(qn).reducedMotion;return e==="never"?!1:e==="always"?!0:t}function iu(t,e,n,r){var o=h.useContext(Xo),a=eu(),i=h.useContext(Ue),s=ou(),u=h.useRef(void 0);r||(r=o.renderer),!u.current&&r&&(u.current=r(t,{visualState:e,parent:a,props:n,presenceId:i==null?void 0:i.id,blockInitialAnimation:(i==null?void 0:i.initial)===!1,shouldReduceMotion:s}));var l=u.current;return Cr(function(){l==null||l.syncRender()}),h.useEffect(function(){var c;(c=l==null?void 0:l.animationState)===null||c===void 0||c.animateChanges()}),Cr(function(){return function(){return l==null?void 0:l.notifyUnmount()}},[]),l}function Wt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function au(t,e,n){return h.useCallback(function(r){var o;r&&((o=t.mount)===null||o===void 0||o.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Wt(n)&&(n.current=r))},[e])}function Jo(t){return Array.isArray(t)}function ht(t){return typeof t=="string"||Jo(t)}function su(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.get()}),e}function uu(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.getVelocity()}),e}function Qo(t,e,n,r,o){var a;return r===void 0&&(r={}),o===void 0&&(o={}),typeof e=="function"&&(e=e(n??t.custom,r,o)),typeof e=="string"&&(e=(a=t.variants)===null||a===void 0?void 0:a[e]),typeof e=="function"&&(e=e(n??t.custom,r,o)),e}function Ye(t,e,n){var r=t.getProps();return Qo(r,e,n??r.custom,su(t),uu(t))}function Xe(t){var e;return typeof((e=t.animate)===null||e===void 0?void 0:e.start)=="function"||ht(t.initial)||ht(t.animate)||ht(t.whileHover)||ht(t.whileDrag)||ht(t.whileTap)||ht(t.whileFocus)||ht(t.exit)}function _o(t){return!!(Xe(t)||t.variants)}function lu(t,e){if(Xe(t)){var n=t.initial,r=t.animate;return{initial:n===!1||ht(n)?n:void 0,animate:ht(r)?r:void 0}}return t.inherit!==!1?e:{}}function cu(t){var e=lu(t,h.useContext(ze)),n=e.initial,r=e.animate;return h.useMemo(function(){return{initial:n,animate:r}},[jr(n),jr(r)])}function jr(t){return Array.isArray(t)?t.join(" "):t}function pe(t){var e=h.useRef(null);return e.current===null&&(e.current=t()),e.current}var $t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fu=1;function du(){return pe(function(){if($t.hasEverUpdated)return fu++})}var $o=h.createContext({}),ti=h.createContext({});function vu(t,e,n,r){var o,a=e.layoutId,i=e.layout,s=e.drag,u=e.dragConstraints,l=e.layoutScroll,c=h.useContext(ti);!r||!n||n!=null&&n.projection||(n.projection=new r(t,n.getLatestValues(),(o=n.parent)===null||o===void 0?void 0:o.projection),n.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||u&&Wt(u),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof i=="string"?i:"both",initialPromotionConfig:c,layoutScroll:l}))}var pu=function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var n=this.props,r=n.visualElement,o=n.props;r&&r.setProps(o)},e.prototype.render=function(){return this.props.children},e}(h.Component);function hu(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.projectionNodeConstructor,o=t.useRender,a=t.useVisualState,i=t.Component;e&&_s(e);function s(u,l){var c=mu(u);u=P(P({},u),{layoutId:c});var f=h.useContext(qn),d=null,p=cu(u),v=f.isStatic?void 0:du(),m=a(u,f.isStatic);return!f.isStatic&&Xt&&(p.visualElement=iu(i,m,P(P({},f),u),n),vu(v,u,p.visualElement,r||se.projectionNodeConstructor),d=tu(u,p.visualElement,e)),bn.createElement(pu,{visualElement:p.visualElement,props:P(P({},f),u)},d,bn.createElement(ze.Provider,{value:p},o(i,u,v,au(m,p.visualElement,l),m,f.isStatic,p.visualElement)))}return h.forwardRef(s)}function mu(t){var e,n=t.layoutId,r=(e=h.useContext($o))===null||e===void 0?void 0:e.id;return r&&n!==void 0?r+"-"+n:n}function gu(t){function e(r,o){return o===void 0&&(o={}),hu(t(r,o))}if(typeof Proxy>"u")return e;var n=new Map;return new Proxy(e,{get:function(r,o){return n.has(o)||n.set(o,e(o)),n.get(o)}})}var yu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Gn(t){return typeof t!="string"||t.includes("-")?!1:!!(yu.indexOf(t)>-1||/[A-Z]/.test(t))}var Oe={};function Su(t){Object.assign(Oe,t)}var En=["","X","Y","Z"],bu=["translate","scale","rotate","skew"],ue=["transformPerspective","x","y","z"];bu.forEach(function(t){return En.forEach(function(e){return ue.push(t+e)})});function xu(t,e){return ue.indexOf(t)-ue.indexOf(e)}var Pu=new Set(ue);function he(t){return Pu.has(t)}var Tu=new Set(["originX","originY","originZ"]);function ei(t){return Tu.has(t)}function ni(t,e){var n=e.layout,r=e.layoutId;return he(t)||ei(t)||(n||r!==void 0)&&(!!Oe[t]||t==="opacity")}var wt=function(t){return!!(t!==null&&typeof t=="object"&&t.getVelocity)},wu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Eu(t,e,n,r){var o=t.transform,a=t.transformKeys,i=e.enableHardwareAcceleration,s=i===void 0?!0:i,u=e.allowTransformNone,l=u===void 0?!0:u,c="";a.sort(xu);for(var f=!1,d=a.length,p=0;p<d;p++){var v=a[p];c+="".concat(wu[v]||v,"(").concat(o[v],") "),v==="z"&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}function Vu(t){var e=t.originX,n=e===void 0?"50%":e,r=t.originY,o=r===void 0?"50%":r,a=t.originZ,i=a===void 0?0:a;return"".concat(n," ").concat(o," ").concat(i)}function ri(t){return t.startsWith("--")}var Cu=function(t,e){return e&&typeof t=="number"?e.transform(t):t};const oi=(t,e)=>n=>Math.max(Math.min(n,e),t),te=t=>t%1?Number(t.toFixed(5)):t,le=/(-)?([\d]*\.?[\d])+/g,Vn=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,ju=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function me(t){return typeof t=="string"}const kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ee=Object.assign(Object.assign({},kt),{transform:oi(0,1)}),Pe=Object.assign(Object.assign({},kt),{default:1}),ge=t=>({test:e=>me(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),jt=ge("deg"),St=ge("%"),A=ge("px"),Ru=ge("vh"),Au=ge("vw"),Rr=Object.assign(Object.assign({},St),{parse:t=>St.parse(t)/100,transform:t=>St.transform(t*100)}),zn=(t,e)=>n=>!!(me(n)&&ju.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ii=(t,e,n)=>r=>{if(!me(r))return r;const[o,a,i,s]=r.match(le);return{[t]:parseFloat(o),[e]:parseFloat(a),[n]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},Dt={test:zn("hsl","hue"),parse:ii("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+St.transform(te(e))+", "+St.transform(te(n))+", "+te(ee.transform(r))+")"},Mu=oi(0,255),cn=Object.assign(Object.assign({},kt),{transform:t=>Math.round(Mu(t))}),Mt={test:zn("rgb","red"),parse:ii("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+cn.transform(t)+", "+cn.transform(e)+", "+cn.transform(n)+", "+te(ee.transform(r))+")"};function Iu(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Cn={test:zn("#"),parse:Iu,transform:Mt.transform},at={test:t=>Mt.test(t)||Cn.test(t)||Dt.test(t),parse:t=>Mt.test(t)?Mt.parse(t):Dt.test(t)?Dt.parse(t):Cn.parse(t),transform:t=>me(t)?t:t.hasOwnProperty("red")?Mt.transform(t):Dt.transform(t)},ai="${c}",si="${n}";function Ou(t){var e,n,r,o;return isNaN(t)&&me(t)&&((n=(e=t.match(le))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((o=(r=t.match(Vn))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function ui(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const r=t.match(Vn);r&&(n=r.length,t=t.replace(Vn,ai),e.push(...r.map(at.parse)));const o=t.match(le);return o&&(t=t.replace(le,si),e.push(...o.map(kt.parse))),{values:e,numColors:n,tokenised:t}}function li(t){return ui(t).values}function ci(t){const{values:e,numColors:n,tokenised:r}=ui(t),o=e.length;return a=>{let i=r;for(let s=0;s<o;s++)i=i.replace(s<n?ai:si,s<n?at.transform(a[s]):te(a[s]));return i}}const Lu=t=>typeof t=="number"?0:t;function Nu(t){const e=li(t);return ci(t)(e.map(Lu))}const Et={test:Ou,parse:li,createTransformer:ci,getAnimatableNone:Nu},Du=new Set(["brightness","contrast","saturate","opacity"]);function Bu(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(le)||[];if(!r)return t;const o=n.replace(r,"");let a=Du.has(e)?1:0;return r!==n&&(a*=100),e+"("+a+o+")"}const ku=/([a-z-]*)\(.*?\)/g,jn=Object.assign(Object.assign({},Et),{getAnimatableNone:t=>{const e=t.match(ku);return e?e.map(Bu).join(" "):t}});var Ar=P(P({},kt),{transform:Math.round}),fi={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:jt,rotateX:jt,rotateY:jt,rotateZ:jt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:jt,skewX:jt,skewY:jt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:ee,originX:Rr,originY:Rr,originZ:A,zIndex:Ar,fillOpacity:ee,strokeOpacity:ee,numOctaves:Ar};function Un(t,e,n,r){var o,a=t.style,i=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in e){var v=e[p];if(ri(p)){i[p]=v;continue}var m=fi[p],b=Cu(v,m);if(he(p)){if(c=!0,s[p]=b,u.push(p),!d)continue;v!==((o=m.default)!==null&&o!==void 0?o:0)&&(d=!1)}else ei(p)?(l[p]=b,f=!0):a[p]=b}c?a.transform=Eu(t,n,d,r):r?a.transform=r({},""):!e.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=Vu(l))}var Yn=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function di(t,e,n){for(var r in e)!wt(e[r])&&!ni(r,n)&&(t[r]=e[r])}function Fu(t,e,n){var r=t.transformTemplate;return h.useMemo(function(){var o=Yn();Un(o,e,{enableHardwareAcceleration:!n},r);var a=o.vars,i=o.style;return P(P({},a),i)},[e])}function Hu(t,e,n){var r=t.style||{},o={};return di(o,r,t),Object.assign(o,Fu(t,e,n)),t.transformValues&&(o=t.transformValues(o)),o}function Wu(t,e,n){var r={},o=Hu(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":"pan-".concat(t.drag==="x"?"y":"x")),r.style=o,r}var qu=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Le(t){return qu.has(t)}var vi=function(t){return!Le(t)};function Gu(t){t&&(vi=function(e){return e.startsWith("on")?!Le(e):t(e)})}try{Gu(require("@emotion/is-prop-valid").default)}catch{}function zu(t,e,n){var r={};for(var o in t)(vi(o)||n===!0&&Le(o)||!e&&!Le(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Mr(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Uu(t,e,n){var r=Mr(e,t.x,t.width),o=Mr(n,t.y,t.height);return"".concat(r," ").concat(o)}var Yu={offset:"strokeDashoffset",array:"strokeDasharray"};function Xu(t,e,n,r,o){n===void 0&&(n=1),r===void 0&&(r=0),t.pathLength=1;var a=Yu;t[a.offset]=A.transform(-r);var i=A.transform(e),s=A.transform(n);t[a.array]="".concat(i," ").concat(s)}function Xn(t,e,n,r){var o=e.attrX,a=e.attrY,i=e.originX,s=e.originY,u=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,f=e.pathOffset,d=f===void 0?0:f,p=dt(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Un(t,p,n,r),t.attrs=t.style,t.style={};var v=t.attrs,m=t.style,b=t.dimensions;v.transform&&(b&&(m.transform=v.transform),delete v.transform),b&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=Uu(b,i!==void 0?i:.5,s!==void 0?s:.5)),o!==void 0&&(v.x=o),a!==void 0&&(v.y=a),u!==void 0&&Xu(v,u,c,d)}var pi=function(){return P(P({},Yn()),{attrs:{}})};function Zu(t,e){var n=h.useMemo(function(){var o=pi();return Xn(o,e,{enableHardwareAcceleration:!1},t.transformTemplate),P(P({},o.attrs),{style:P({},o.style)})},[e]);if(t.style){var r={};di(r,t.style,t),n.style=P(P({},r),n.style)}return n}function Ku(t){t===void 0&&(t=!1);var e=function(n,r,o,a,i,s){var u=i.latestValues,l=Gn(n)?Zu:Wu,c=l(r,u,s),f=zu(r,typeof n=="string",t),d=P(P(P({},f),c),{ref:a});return o&&(d["data-projection-id"]=o),h.createElement(n,d)};return e}var Ju=/([a-z])([A-Z])/g,Qu="$1-$2",hi=function(t){return t.replace(Ju,Qu).toLowerCase()};function mi(t,e,n,r){var o=e.style,a=e.vars;Object.assign(t.style,o,r&&r.getProjectionStyles(n));for(var i in a)t.style.setProperty(i,a[i])}var gi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function yi(t,e,n,r){mi(t,e,void 0,r);for(var o in e.attrs)t.setAttribute(gi.has(o)?o:hi(o),e.attrs[o])}function Zn(t){var e=t.style,n={};for(var r in e)(wt(e[r])||ni(r,t))&&(n[r]=e[r]);return n}function Si(t){var e=Zn(t);for(var n in t)if(wt(t[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[r]=t[n]}return e}function Kn(t){return typeof t=="object"&&typeof t.start=="function"}var ce=function(t){return Array.isArray(t)},_u=function(t){return!!(t&&typeof t=="object"&&t.mix&&t.toValue)},bi=function(t){return ce(t)?t[t.length-1]||0:t};function Ae(t){var e=wt(t)?t.get():t;return _u(e)?e.toValue():e}function Ir(t,e,n,r){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,s={latestValues:$u(e,n,r,o),renderState:a()};return i&&(s.mount=function(u){return i(e,u,s)}),s}var xi=function(t){return function(e,n){var r=h.useContext(ze),o=h.useContext(Ue);return n?Ir(t,e,r,o):pe(function(){return Ir(t,e,r,o)})}};function $u(t,e,n,r){var o={},a=(n==null?void 0:n.initial)===!1,i=r(t);for(var s in i)o[s]=Ae(i[s]);var u=t.initial,l=t.animate,c=Xe(t),f=_o(t);e&&f&&!c&&t.inherit!==!1&&(u??(u=e.initial),l??(l=e.animate));var d=a||u===!1,p=d?l:u;if(p&&typeof p!="boolean"&&!Kn(p)){var v=Array.isArray(p)?p:[p];v.forEach(function(m){var b=Qo(t,m);if(b){var g=b.transitionEnd;b.transition;var x=dt(b,["transitionEnd","transition"]);for(var S in x){var T=x[S];if(Array.isArray(T)){var E=d?T.length-1:0;T=T[E]}T!==null&&(o[S]=T)}for(var S in g)o[S]=g[S]}})}return o}var tl={useVisualState:xi({scrapeMotionValuesFromProps:Si,createRenderState:pi,onMount:function(t,e,n){var r=n.renderState,o=n.latestValues;try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Xn(r,o,{enableHardwareAcceleration:!1},t.transformTemplate),yi(e,r)}})},el={useVisualState:xi({scrapeMotionValuesFromProps:Zn,createRenderState:Yn})};function nl(t,e,n,r,o){var a=e.forwardMotionProps,i=a===void 0?!1:a,s=Gn(t)?tl:el;return P(P({},s),{preloadedFeatures:n,useRender:Ku(i),createVisualElement:r,projectionNodeConstructor:o,Component:t})}var z;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(z||(z={}));function Ze(t,e,n,r){return r===void 0&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function Rn(t,e,n,r){h.useEffect(function(){var o=t.current;if(n&&o)return Ze(o,e,n,r)},[t,e,n,r])}function rl(t){var e=t.whileFocus,n=t.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(z.Focus,!0)},o=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(z.Focus,!1)};Rn(n,"focus",e?r:void 0),Rn(n,"blur",e?o:void 0)}function Pi(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function Ti(t){var e=!!t.touches;return e}function ol(t){return function(e){var n=e instanceof MouseEvent,r=!n||n&&e.button===0;r&&t(e)}}var il={pageX:0,pageY:0};function al(t,e){e===void 0&&(e="page");var n=t.touches[0]||t.changedTouches[0],r=n||il;return{x:r[e+"X"],y:r[e+"Y"]}}function sl(t,e){return e===void 0&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Jn(t,e){return e===void 0&&(e="page"),{point:Ti(t)?al(t,e):sl(t,e)}}var wi=function(t,e){e===void 0&&(e=!1);var n=function(r){return t(r,Jn(r))};return e?ol(n):n},ul=function(){return Xt&&window.onpointerdown===null},ll=function(){return Xt&&window.ontouchstart===null},cl=function(){return Xt&&window.onmousedown===null},fl={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},dl={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ei(t){return ul()?t:ll()?dl[t]:cl()?fl[t]:t}function Gt(t,e,n,r){return Ze(t,Ei(e),wi(n,e==="pointerdown"),r)}function Ne(t,e,n,r){return Rn(t,Ei(e),n&&wi(n,e==="pointerdown"),r)}function Vi(t){var e=null;return function(){var n=function(){e=null};return e===null?(e=t,n):!1}}var Or=Vi("dragHorizontal"),Lr=Vi("dragVertical");function Ci(t){var e=!1;if(t==="y")e=Lr();else if(t==="x")e=Or();else{var n=Or(),r=Lr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function ji(){var t=Ci(!0);return t?(t(),!1):!0}function Nr(t,e,n){return function(r,o){var a;!Pi(r)||ji()||((a=t.animationState)===null||a===void 0||a.setActive(z.Hover,e),n==null||n(r,o))}}function vl(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Ne(o,"pointerenter",e||r?Nr(o,!0,e):void 0,{passive:!e}),Ne(o,"pointerleave",n||r?Nr(o,!1,n):void 0,{passive:!n})}var Ri=function(t,e){return e?t===e?!0:Ri(t,e.parentElement):!1};function Ai(t){return h.useEffect(function(){return function(){return t()}},[])}const De=(t,e,n)=>Math.min(Math.max(n,t),e),Dr=.001,pl=.01,Br=10,hl=.05,ml=1;function gl({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,a;ve(t<=Br*1e3,"Spring duration must be 10 seconds or less");let i=1-e;i=De(hl,ml,i),t=De(pl,Br,t/1e3),i<1?(o=l=>{const c=l*i,f=c*t,d=c-n,p=An(l,i),v=Math.exp(-f);return Dr-d/p*v},a=l=>{const f=l*i*t,d=f*n+n,p=Math.pow(i,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=An(Math.pow(l,2),i);return(-o(l)+Dr>0?-1:1)*((d-p)*v)/m}):(o=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-.001+c*f},a=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const s=5/t,u=Sl(o,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:t}}}const yl=12;function Sl(t,e,n){let r=n;for(let o=1;o<yl;o++)r=r-t(r)/e(r);return r}function An(t,e){return t*Math.sqrt(1-e*e)}const bl=["duration","bounce"],xl=["stiffness","damping","mass"];function kr(t,e){return e.some(n=>t[n]!==void 0)}function Pl(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!kr(t,xl)&&kr(t,bl)){const n=gl(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Qn(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,a=dt(t,["from","to","restSpeed","restDelta"]);const i={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:d}=Pl(a),p=Fr,v=Fr;function m(){const b=c?-(c/1e3):0,g=n-e,x=u/(2*Math.sqrt(s*l)),S=Math.sqrt(s/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-e)/100,.4)),x<1){const T=An(S,x);p=E=>{const V=Math.exp(-x*S*E);return n-V*((b+x*S*g)/T*Math.sin(T*E)+g*Math.cos(T*E))},v=E=>{const V=Math.exp(-x*S*E);return x*S*V*(Math.sin(T*E)*(b+x*S*g)/T+g*Math.cos(T*E))-V*(Math.cos(T*E)*(b+x*S*g)-T*g*Math.sin(T*E))}}else if(x===1)p=T=>n-Math.exp(-S*T)*(g+(b+S*g)*T);else{const T=S*Math.sqrt(x*x-1);p=E=>{const V=Math.exp(-x*S*E),I=Math.min(T*E,300);return n-V*((b+x*S*g)*Math.sinh(I)+T*g*Math.cosh(I))/T}}}return m(),{next:b=>{const g=p(b);if(d)i.done=b>=f;else{const x=v(b)*1e3,S=Math.abs(x)<=r,T=Math.abs(n-g)<=o;i.done=S&&T}return i.value=i.done?n:g,i},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}Qn.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Fr=t=>0,fe=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Q=(t,e,n)=>-n*t+n*e+t;function fn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Hr({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,a=0,i=0;if(!e)o=a=i=n;else{const s=n<.5?n*(1+e):n+e-n*e,u=2*n-s;o=fn(u,s,t+1/3),a=fn(u,s,t),i=fn(u,s,t-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}const Tl=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},wl=[Cn,Mt,Dt],Wr=t=>wl.find(e=>e.test(t)),qr=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Mi=(t,e)=>{let n=Wr(t),r=Wr(e);lt(!!n,qr(t)),lt(!!r,qr(e));let o=n.parse(t),a=r.parse(e);n===Dt&&(o=Hr(o),n=Mt),r===Dt&&(a=Hr(a),r=Mt);const i=Object.assign({},o);return s=>{for(const u in i)u!=="alpha"&&(i[u]=Tl(o[u],a[u],s));return i.alpha=Q(o.alpha,a.alpha,s),n.transform(i)}},Mn=t=>typeof t=="number",El=(t,e)=>n=>e(t(n)),Ke=(...t)=>t.reduce(El);function Ii(t,e){return Mn(t)?n=>Q(t,e,n):at.test(t)?Mi(t,e):Li(t,e)}const Oi=(t,e)=>{const n=[...t],r=n.length,o=t.map((a,i)=>Ii(a,e[i]));return a=>{for(let i=0;i<r;i++)n[i]=o[i](a);return n}},Vl=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ii(t[o],e[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}};function Gr(t){const e=Et.parse(t),n=e.length;let r=0,o=0,a=0;for(let i=0;i<n;i++)r||typeof e[i]=="number"?r++:e[i].hue!==void 0?a++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:a}}const Li=(t,e)=>{const n=Et.createTransformer(e),r=Gr(t),o=Gr(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?Ke(Oi(r.parsed,o.parsed),n):(ve(!0,`Complex values '${t}' and '${e}' 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.`),i=>`${i>0?e:t}`)},Cl=(t,e)=>n=>Q(t,e,n);function jl(t){if(typeof t=="number")return Cl;if(typeof t=="string")return at.test(t)?Mi:Li;if(Array.isArray(t))return Oi;if(typeof t=="object")return Vl}function Rl(t,e,n){const r=[],o=n||jl(t[0]),a=t.length-1;for(let i=0;i<a;i++){let s=o(t[i],t[i+1]);if(e){const u=Array.isArray(e)?e[i]:e;s=Ke(u,s)}r.push(s)}return r}function Al([t,e],[n]){return r=>n(fe(t,e,r))}function Ml(t,e){const n=t.length,r=n-1;return o=>{let a=0,i=!1;if(o<=t[0]?i=!0:o>=t[r]&&(a=r-1,i=!0),!i){let u=1;for(;u<n&&!(t[u]>o||u===r);u++);a=u-1}const s=fe(t[a],t[a+1],o);return e[a](s)}}function Ni(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const a=t.length;lt(a===e.length,"Both input and output ranges must be the same length"),lt(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const i=Rl(e,r,o),s=a===2?Al(t,i):Ml(t,i);return n?u=>s(De(t[0],t[a-1],u)):s}const Je=t=>e=>1-t(1-e),_n=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Il=t=>e=>Math.pow(e,t),Di=t=>e=>e*e*((t+1)*e-t),Ol=t=>{const e=Di(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},Bi=1.525,Ll=4/11,Nl=8/11,Dl=9/10,$n=t=>t,tr=Il(2),Bl=Je(tr),ki=_n(tr),Fi=t=>1-Math.sin(Math.acos(t)),er=Je(Fi),kl=_n(er),nr=Di(Bi),Fl=Je(nr),Hl=_n(nr),Wl=Ol(Bi),ql=4356/361,Gl=35442/1805,zl=16061/1805,Be=t=>{if(t===1||t===0)return t;const e=t*t;return t<Ll?7.5625*e:t<Nl?9.075*e-9.9*t+3.4:t<Dl?ql*e-Gl*t+zl:10.8*t*t-20.52*t+10.72},Ul=Je(Be),Yl=t=>t<.5?.5*(1-Be(1-t*2)):.5*Be(t*2-1)+.5;function Xl(t,e){return t.map(()=>e||ki).splice(0,t.length-1)}function Zl(t){const e=t.length;return t.map((n,r)=>r!==0?r/(e-1):0)}function Kl(t,e){return t.map(n=>n*e)}function Me({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const a={done:!1,value:t},i=Array.isArray(e)?e:[t,e],s=Kl(r&&r.length===i.length?r:Zl(i),o);function u(){return Ni(s,i,{ease:Array.isArray(n)?n:Xl(i,n)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=o,a),flipTarget:()=>{i.reverse(),l=u()}}}function Jl({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:e};let s=n*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/r);return i.done=!(f>o||f<-o),i.value=i.done?l:l+f,i},flipTarget:()=>{}}}const zr={keyframes:Me,spring:Qn,decay:Jl};function Ql(t){if(Array.isArray(t.to))return Me;if(zr[t.type])return zr[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Me:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Qn:Me}const Hi=1/60*1e3,_l=typeof performance<"u"?()=>performance.now():()=>Date.now(),Wi=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(_l()),Hi);function $l(t){let e=[],n=[],r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&o,d=f?e:n;return l&&i.add(u),d.indexOf(u)===-1&&(d.push(u),f&&o&&(r=e.length)),u},cancel:u=>{const l=n.indexOf(u);l!==-1&&n.splice(l,1),i.delete(u)},process:u=>{if(o){a=!0;return}if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let l=0;l<r;l++){const c=e[l];c(u),i.has(c)&&(s.schedule(c),t())}o=!1,a&&(a=!1,s.process(u))}};return s}const tc=40;let In=!0,de=!1,On=!1;const zt={delta:0,timestamp:0},ye=["read","update","preRender","render","postRender"],Qe=ye.reduce((t,e)=>(t[e]=$l(()=>de=!0),t),{}),bt=ye.reduce((t,e)=>{const n=Qe[e];return t[e]=(r,o=!1,a=!1)=>(de||nc(),n.schedule(r,o,a)),t},{}),Ut=ye.reduce((t,e)=>(t[e]=Qe[e].cancel,t),{}),dn=ye.reduce((t,e)=>(t[e]=()=>Qe[e].process(zt),t),{}),ec=t=>Qe[t].process(zt),qi=t=>{de=!1,zt.delta=In?Hi:Math.max(Math.min(t-zt.timestamp,tc),1),zt.timestamp=t,On=!0,ye.forEach(ec),On=!1,de&&(In=!1,Wi(qi))},nc=()=>{de=!0,In=!0,On||Wi(qi)},ke=()=>zt;function Gi(t,e,n=0){return t-e-n}function rc(t,e,n=0,r=!0){return r?Gi(e+-t,e,n):e-(t-e)+n}function oc(t,e,n,r){return r?t>=e+n:t<=-n}const ic=t=>{const e=({delta:n})=>t(n);return{start:()=>bt.update(e,!0),stop:()=>Ut.update(e)}};function zi(t){var e,n,{from:r,autoplay:o=!0,driver:a=ic,elapsed:i=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:d,onRepeat:p,onUpdate:v}=t,m=dt(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=m,g,x=0,S=m.duration,T,E=!1,V=!0,I;const N=Ql(m);!((n=(e=N).needsInterpolation)===null||n===void 0)&&n.call(e,r,b)&&(I=Ni([0,100],[r,b],{clamp:!1}),r=0,b=100);const j=N(Object.assign(Object.assign({},m),{from:r,to:b}));function k(){x++,u==="reverse"?(V=x%2===0,i=rc(i,S,l,V)):(i=Gi(i,S,l),u==="mirror"&&j.flipTarget()),E=!1,p&&p()}function K(){g.stop(),d&&d()}function H(R){if(V||(R=-R),i+=R,!E){const U=j.next(Math.max(0,i));T=U.value,I&&(T=I(T)),E=V?U.done:i<=0}v==null||v(T),E&&(x===0&&(S??(S=i)),x<s?oc(i,S,l,V)&&k():K())}function F(){c==null||c(),g=a(H),g.start()}return o&&F(),{stop:()=>{f==null||f(),g.stop()}}}function Ui(t,e){return e?t*(1e3/e):0}function ac({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:f,onComplete:d,onStop:p}){let v;function m(S){return n!==void 0&&S<n||r!==void 0&&S>r}function b(S){return n===void 0?r:r===void 0||Math.abs(n-S)<Math.abs(r-S)?n:r}function g(S){v==null||v.stop(),v=zi(Object.assign(Object.assign({},S),{driver:c,onUpdate:T=>{var E;f==null||f(T),(E=S.onUpdate)===null||E===void 0||E.call(S,T)},onComplete:d,onStop:p}))}function x(S){g(Object.assign({type:"spring",stiffness:i,damping:s,restDelta:u},S))}if(m(t))x({from:t,velocity:e,to:b(t)});else{let S=o*e+t;typeof l<"u"&&(S=l(S));const T=b(S),E=T===n?-1:1;let V,I;const N=j=>{V=I,I=j,e=Ui(j-V,ke().delta),(E===1&&j>T||E===-1&&j<T)&&x({from:j,to:T,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:a,power:o,restDelta:u,modifyTarget:l,onUpdate:m(S)?N:void 0})}return{stop:()=>v==null?void 0:v.stop()}}const Ln=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Ur=t=>Ln(t)&&t.hasOwnProperty("z"),Te=(t,e)=>Math.abs(t-e);function Yi(t,e){if(Mn(t)&&Mn(e))return Te(t,e);if(Ln(t)&&Ln(e)){const n=Te(t.x,e.x),r=Te(t.y,e.y),o=Ur(t)&&Ur(e)?Te(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const Xi=(t,e)=>1-3*e+3*t,Zi=(t,e)=>3*e-6*t,Ki=t=>3*t,Fe=(t,e,n)=>((Xi(e,n)*t+Zi(e,n))*t+Ki(e))*t,Ji=(t,e,n)=>3*Xi(e,n)*t*t+2*Zi(e,n)*t+Ki(e),sc=1e-7,uc=10;function lc(t,e,n,r,o){let a,i,s=0;do i=e+(n-e)/2,a=Fe(i,r,o)-t,a>0?n=i:e=i;while(Math.abs(a)>sc&&++s<uc);return i}const cc=8,fc=.001;function dc(t,e,n,r){for(let o=0;o<cc;++o){const a=Ji(e,n,r);if(a===0)return e;const i=Fe(e,n,r)-t;e-=i/a}return e}const Ie=11,we=1/(Ie-1);function vc(t,e,n,r){if(t===e&&n===r)return $n;const o=new Float32Array(Ie);for(let i=0;i<Ie;++i)o[i]=Fe(i*we,t,n);function a(i){let s=0,u=1;const l=Ie-1;for(;u!==l&&o[u]<=i;++u)s+=we;--u;const c=(i-o[u])/(o[u+1]-o[u]),f=s+c*we,d=Ji(f,t,n);return d>=fc?dc(i,f,t,n):d===0?f:lc(i,s,s+we,t,n)}return i=>i===0||i===1?i:Fe(a(i),e,r)}function pc(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,o=t.whileTap,a=t.visualElement,i=e||n||r||o,s=h.useRef(!1),u=h.useRef(null),l={passive:!(n||e||r||v)};function c(){var m;(m=u.current)===null||m===void 0||m.call(u),u.current=null}function f(){var m;return c(),s.current=!1,(m=a.animationState)===null||m===void 0||m.setActive(z.Tap,!1),!ji()}function d(m,b){f()&&(Ri(a.getInstance(),m.target)?e==null||e(m,b):r==null||r(m,b))}function p(m,b){f()&&(r==null||r(m,b))}function v(m,b){var g;c(),!s.current&&(s.current=!0,u.current=Ke(Gt(window,"pointerup",d,l),Gt(window,"pointercancel",p,l)),(g=a.animationState)===null||g===void 0||g.setActive(z.Tap,!0),n==null||n(m,b))}Ne(a,"pointerdown",i?v:void 0,l),Ai(c)}var Yr=new Set;function Qi(t,e,n){t||Yr.has(e)||(console.warn(e),Yr.add(e))}var Nn=new WeakMap,vn=new WeakMap,hc=function(t){var e;(e=Nn.get(t.target))===null||e===void 0||e(t)},mc=function(t){t.forEach(hc)};function gc(t){var e=t.root,n=dt(t,["root"]),r=e||document;vn.has(r)||vn.set(r,{});var o=vn.get(r),a=JSON.stringify(n);return o[a]||(o[a]=new IntersectionObserver(mc,P({root:e},n))),o[a]}function yc(t,e,n){var r=gc(e);return Nn.set(t,n),r.observe(t),function(){Nn.delete(t),r.unobserve(t)}}function Sc(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,i=a===void 0?{}:a,s=h.useRef({hasEnteredView:!1,isInView:!1}),u=!!(n||r||o);i.once&&s.current.hasEnteredView&&(u=!1);var l=typeof IntersectionObserver>"u"?Pc:xc;l(u,s.current,e,i)}var bc={some:0,all:1};function xc(t,e,n,r){var o=r.root,a=r.margin,i=r.amount,s=i===void 0?"some":i,u=r.once;h.useEffect(function(){if(t){var l={root:o==null?void 0:o.current,rootMargin:a,threshold:typeof s=="number"?s:bc[s]},c=function(f){var d,p=f.isIntersecting;if(e.isInView!==p&&(e.isInView=p,!(u&&!p&&e.hasEnteredView))){p&&(e.hasEnteredView=!0),(d=n.animationState)===null||d===void 0||d.setActive(z.InView,p);var v=n.getProps(),m=p?v.onViewportEnter:v.onViewportLeave;m==null||m(f)}};return yc(n.getInstance(),l,c)}},[t,o,a,s])}function Pc(t,e,n,r){var o=r.fallback,a=o===void 0?!0:o;h.useEffect(function(){!t||!a||(Yo!=="production"&&Qi(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var i;e.hasEnteredView=!0;var s=n.getProps().onViewportEnter;s==null||s(null),(i=n.animationState)===null||i===void 0||i.setActive(z.InView,!0)}))},[t])}var It=function(t){return function(e){return t(e),null}},Tc={inView:It(Sc),tap:It(pc),focus:It(rl),hover:It(vl)},wc=0,Ec=function(){return wc++},Vc=function(){return pe(Ec)};function _i(){var t=h.useContext(Ue);if(t===null)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,o=Vc();h.useEffect(function(){return r(o)},[]);var a=function(){return n==null?void 0:n(o)};return!e&&n?[!1,a]:[!0]}function $i(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var He=function(t){return t*1e3},Xr={linear:$n,easeIn:tr,easeInOut:ki,easeOut:Bl,circIn:Fi,circInOut:kl,circOut:er,backIn:nr,backInOut:Hl,backOut:Fl,anticipate:Wl,bounceIn:Ul,bounceInOut:Yl,bounceOut:Be},Zr=function(t){if(Array.isArray(t)){lt(t.length===4,"Cubic bezier arrays must contain four numerical values.");var e=$(t,4),n=e[0],r=e[1],o=e[2],a=e[3];return vc(n,r,o,a)}else if(typeof t=="string")return lt(Xr[t]!==void 0,"Invalid easing type '".concat(t,"'")),Xr[t];return t},Cc=function(t){return Array.isArray(t)&&typeof t[0]!="number"},Kr=function(t,e){return t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Et.test(e)&&!e.startsWith("url("))},Lt=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Ee=function(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}},pn=function(){return{type:"keyframes",ease:"linear",duration:.3}},jc=function(t){return{type:"keyframes",duration:.8,values:t}},Jr={x:Lt,y:Lt,z:Lt,rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scaleX:Ee,scaleY:Ee,scale:Ee,opacity:pn,backgroundColor:pn,color:pn,default:Ee},Rc=function(t,e){var n;return ce(e)?n=jc:n=Jr[t]||Jr.default,P({to:e},n(e))},Ac=P(P({},fi),{color:at,backgroundColor:at,outlineColor:at,fill:at,stroke:at,borderColor:at,borderTopColor:at,borderRightColor:at,borderBottomColor:at,borderLeftColor:at,filter:jn,WebkitFilter:jn}),rr=function(t){return Ac[t]};function or(t,e){var n,r=rr(t);return r!==jn&&(r=Et),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,e)}function Mc(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=dt(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}var Qr=!1;function Ic(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,a=t.loop,i=dt(t,["ease","times","yoyo","flip","loop"]),s=P({},i);return n&&(s.offset=n),i.duration&&(s.duration=He(i.duration)),i.repeatDelay&&(s.repeatDelay=He(i.repeatDelay)),e&&(s.ease=Cc(e)?e.map(Zr):Zr(e)),i.type==="tween"&&(s.type="keyframes"),(r||a||o)&&(ve(!Qr,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Qr=!0,r?s.repeatType="reverse":a?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=a||r||o||i.repeat),i.type!=="spring"&&(s.type="keyframes"),s}function Oc(t,e){var n,r,o=ir(t,e)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:t.delay)!==null&&r!==void 0?r:0}function Lc(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=ft([],$(t.to),!1),t.to[0]=t.from),t}function Nc(t,e,n){var r;return Array.isArray(e.to)&&((r=t.duration)!==null&&r!==void 0||(t.duration=.8)),Lc(e),Mc(t)||(t=P(P({},t),Rc(n,e.to))),P(P({},e),Ic(t))}function Dc(t,e,n,r,o){var a,i=ir(r,t),s=(a=i.from)!==null&&a!==void 0?a:e.get(),u=Kr(t,n);s==="none"&&u&&typeof n=="string"?s=or(t,n):_r(s)&&typeof n=="string"?s=$r(n):!Array.isArray(n)&&_r(n)&&typeof s=="string"&&(n=$r(s));var l=Kr(t,s);ve(l===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."));function c(){var d={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(p){return e.set(p)}};return i.type==="inertia"||i.type==="decay"?ac(P(P({},d),i)):zi(P(P({},Nc(i,d,t)),{onUpdate:function(p){var v;d.onUpdate(p),(v=i.onUpdate)===null||v===void 0||v.call(i,p)},onComplete:function(){var p;d.onComplete(),(p=i.onComplete)===null||p===void 0||p.call(i)}}))}function f(){var d,p,v=bi(n);return e.set(v),o(),(d=i==null?void 0:i.onUpdate)===null||d===void 0||d.call(i,v),(p=i==null?void 0:i.onComplete)===null||p===void 0||p.call(i),{stop:function(){}}}return!l||!u||i.type===!1?f:c}function _r(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function $r(t){return typeof t=="number"?0:or("",t)}function ir(t,e){return t[e]||t.default||t}function ar(t,e,n,r){return r===void 0&&(r={}),e.start(function(o){var a,i,s=Dc(t,e,n,r,o),u=Oc(r,t),l=function(){return i=s()};return u?a=window.setTimeout(l,He(u)):l(),function(){clearTimeout(a),i==null||i.stop()}})}var Bc=function(t){return/^\-?\d*\.?\d+$/.test(t)},kc=function(t){return/^0[^.\s]+$/.test(t)};function sr(t,e){t.indexOf(e)===-1&&t.push(e)}function ur(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var ne=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(e){var n=this;return sr(this.subscriptions,e),function(){return ur(n.subscriptions,e)}},t.prototype.notify=function(e,n,r){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(var a=0;a<o;a++){var i=this.subscriptions[a];i&&i(e,n,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Fc=function(t){return!isNaN(parseFloat(t))},Hc=function(){function t(e){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ne,this.velocityUpdateSubscribers=new ne,this.renderSubscribers=new ne,this.canTrackVelocity=!1,this.updateAndNotify=function(r,o){o===void 0&&(o=!0),n.prev=n.current,n.current=r;var a=ke(),i=a.delta,s=a.timestamp;n.lastUpdated!==s&&(n.timeDelta=i,n.lastUpdated=s,bt.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),o&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return bt.postRender(n.velocityCheck)},this.velocityCheck=function(r){var o=r.timestamp;o!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Fc(this.current)}return t.prototype.onChange=function(e){return this.updateSubscribers.add(e)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},t.prototype.attach=function(e){this.passiveEffect=e},t.prototype.set=function(e,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Ui(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(e){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=e(r)}).then(function(){return n.clearAnimation()})},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Yt(t){return new Hc(t)}var ta=function(t){return function(e){return e.test(t)}},Wc={test:function(t){return t==="auto"},parse:function(t){return t}},ea=[kt,A,St,jt,Au,Ru,Wc],Qt=function(t){return ea.find(ta(t))},qc=ft(ft([],$(ea),!1),[at,Et],!1),Gc=function(t){return qc.find(ta(t))};function zc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Yt(n))}function lr(t,e){var n=Ye(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,a=o===void 0?{}:o;r.transition;var i=dt(r,["transitionEnd","transition"]);i=P(P({},i),a);for(var s in i){var u=bi(i[s]);zc(t,s,u)}}function Dn(t,e){var n=ft([],$(e),!1).reverse();n.forEach(function(r){var o,a=t.getVariant(r);a&&lr(t,a),(o=t.variantChildren)===null||o===void 0||o.forEach(function(i){Dn(i,e)})})}function Uc(t,e){if(Array.isArray(e))return Dn(t,e);if(typeof e=="string")return Dn(t,[e]);lr(t,e)}function Yc(t,e,n){var r,o,a,i,s=Object.keys(e).filter(function(p){return!t.hasValue(p)}),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],f=e[c],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(o=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&o!==void 0?o:e[c]),d!=null&&(typeof d=="string"&&(Bc(d)||kc(d))?d=parseFloat(d):!Gc(d)&&Et.test(f)&&(d=or(c,f)),t.addValue(c,Yt(d)),(a=(i=n)[c])!==null&&a!==void 0||(i[c]=d),t.setBaseTarget(c,d))}}function Xc(t,e){if(e){var n=e[t]||e.default||e;return n.from}}function Zc(t,e,n){var r,o,a={};for(var i in t)a[i]=(r=Xc(i,e))!==null&&r!==void 0?r:(o=n.getValue(i))===null||o===void 0?void 0:o.get();return a}function na(t,e,n){n===void 0&&(n={}),t.notifyAnimationStart(e);var r;if(Array.isArray(e)){var o=e.map(function(i){return Bn(t,i,n)});r=Promise.all(o)}else if(typeof e=="string")r=Bn(t,e,n);else{var a=typeof e=="function"?Ye(t,e,n.custom):e;r=ra(t,a,n)}return r.then(function(){return t.notifyAnimationComplete(e)})}function Bn(t,e,n){var r;n===void 0&&(n={});var o=Ye(t,e,n.custom),a=(o||{}).transition,i=a===void 0?t.getDefaultTransition()||{}:a;n.transitionOverride&&(i=n.transitionOverride);var s=o?function(){return ra(t,o,n)}:function(){return Promise.resolve()},u=!((r=t.variantChildren)===null||r===void 0)&&r.size?function(p){p===void 0&&(p=0);var v=i.delayChildren,m=v===void 0?0:v,b=i.staggerChildren,g=i.staggerDirection;return Kc(t,e,m+p,b,g,n)}:function(){return Promise.resolve()},l=i.when;if(l){var c=$(l==="beforeChildren"?[s,u]:[u,s],2),f=c[0],d=c[1];return f().then(d)}else return Promise.all([s(),u(n.delay)])}function ra(t,e,n){var r,o=n===void 0?{}:n,a=o.delay,i=a===void 0?0:a,s=o.transitionOverride,u=o.type,l=t.makeTargetAnimatable(e),c=l.transition,f=c===void 0?t.getDefaultTransition():c,d=l.transitionEnd,p=dt(l,["transition","transitionEnd"]);s&&(f=s);var v=[],m=u&&((r=t.animationState)===null||r===void 0?void 0:r.getState()[u]);for(var b in p){var g=t.getValue(b),x=p[b];if(!(!g||x===void 0||m&&_c(m,b))){var S=P({delay:i},f);t.shouldReduceMotion&&he(b)&&(S=P(P({},S),{type:!1,delay:0}));var T=ar(b,g,x,S);v.push(T)}}return Promise.all(v).then(function(){d&&lr(t,d)})}function Kc(t,e,n,r,o,a){n===void 0&&(n=0),r===void 0&&(r=0),o===void 0&&(o=1);var i=[],s=(t.variantChildren.size-1)*r,u=o===1?function(l){return l===void 0&&(l=0),l*r}:function(l){return l===void 0&&(l=0),s-l*r};return Array.from(t.variantChildren).sort(Qc).forEach(function(l,c){i.push(Bn(l,e,P(P({},a),{delay:n+u(c)})).then(function(){return l.notifyAnimationComplete(e)}))}),Promise.all(i)}function Jc(t){t.forEachValue(function(e){return e.stop()})}function Qc(t,e){return t.sortNodePosition(e)}function _c(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&r[e]!==!0;return r[e]=!1,o}var cr=[z.Animate,z.InView,z.Focus,z.Hover,z.Tap,z.Drag,z.Exit],$c=ft([],$(cr),!1).reverse(),tf=cr.length;function ef(t){return function(e){return Promise.all(e.map(function(n){var r=n.animation,o=n.options;return na(t,r,o)}))}}function nf(t){var e=ef(t),n=of(),r={},o=!0,a=function(c,f){var d=Ye(t,f);if(d){d.transition;var p=d.transitionEnd,v=dt(d,["transition","transitionEnd"]);c=P(P(P({},c),v),p)}return c};function i(c){return r[c]!==void 0}function s(c){e=c(t)}function u(c,f){for(var d,p=t.getProps(),v=t.getVariantContext(!0)||{},m=[],b=new Set,g={},x=1/0,S=function(I){var N=$c[I],j=n[N],k=(d=p[N])!==null&&d!==void 0?d:v[N],K=ht(k),H=N===f?j.isActive:null;H===!1&&(x=I);var F=k===v[N]&&k!==p[N]&&K;if(F&&o&&t.manuallyAnimateOnMount&&(F=!1),j.protectedKeys=P({},g),!j.isActive&&H===null||!k&&!j.prevProp||Kn(k)||typeof k=="boolean")return"continue";var R=rf(j.prevProp,k),U=R||N===f&&j.isActive&&!F&&K||I>x&&K,J=Array.isArray(k)?k:[k],M=J.reduce(a,{});H===!1&&(M={});var nt=j.prevResolvedValues,rt=nt===void 0?{}:nt,ot=P(P({},rt),M),W=function(C){U=!0,b.delete(C),j.needsAnimating[C]=!0};for(var Z in ot){var D=M[Z],w=rt[Z];g.hasOwnProperty(Z)||(D!==w?ce(D)&&ce(w)?!$i(D,w)||R?W(Z):j.protectedKeys[Z]=!0:D!==void 0?W(Z):b.add(Z):D!==void 0&&b.has(Z)?W(Z):j.protectedKeys[Z]=!0)}j.prevProp=k,j.prevResolvedValues=M,j.isActive&&(g=P(P({},g),M)),o&&t.blockInitialAnimation&&(U=!1),U&&!F&&m.push.apply(m,ft([],$(J.map(function(C){return{animation:C,options:P({type:N},c)}})),!1))},T=0;T<tf;T++)S(T);if(r=P({},g),b.size){var E={};b.forEach(function(I){var N=t.getBaseTarget(I);N!==void 0&&(E[I]=N)}),m.push({animation:E})}var V=!!m.length;return o&&p.initial===!1&&!t.manuallyAnimateOnMount&&(V=!1),o=!1,V?e(m):Promise.resolve()}function l(c,f,d){var p;if(n[c].isActive===f)return Promise.resolve();(p=t.variantChildren)===null||p===void 0||p.forEach(function(b){var g;return(g=b.animationState)===null||g===void 0?void 0:g.setActive(c,f)}),n[c].isActive=f;var v=u(d,c);for(var m in n)n[m].protectedKeys={};return v}return{isAnimated:i,animateChanges:u,setActive:l,setAnimateFunction:s,getState:function(){return n}}}function rf(t,e){return typeof e=="string"?e!==t:Jo(e)?!$i(e,t):!1}function Nt(t){return t===void 0&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function of(){var t;return t={},t[z.Animate]=Nt(!0),t[z.InView]=Nt(),t[z.Hover]=Nt(),t[z.Tap]=Nt(),t[z.Drag]=Nt(),t[z.Focus]=Nt(),t[z.Exit]=Nt(),t}var af={animation:It(function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=nf(e)),Kn(n)&&h.useEffect(function(){return n.subscribe(e)},[n])}),exit:It(function(t){var e=t.custom,n=t.visualElement,r=$(_i(),2),o=r[0],a=r[1],i=h.useContext(Ue);h.useEffect(function(){var s,u;n.isPresent=o;var l=(s=n.animationState)===null||s===void 0?void 0:s.setActive(z.Exit,!o,{custom:(u=i==null?void 0:i.custom)!==null&&u!==void 0?u:e});!o&&(l==null||l.then(a))},[o])})},oa=function(){function t(e,n,r){var o=this,a=r===void 0?{}:r,i=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var d=mn(o.lastMoveEventInfo,o.history),p=o.startEvent!==null,v=Yi(d.offset,{x:0,y:0})>=3;if(!(!p&&!v)){var m=d.point,b=ke().timestamp;o.history.push(P(P({},m),{timestamp:b}));var g=o.handlers,x=g.onStart,S=g.onMove;p||(x&&x(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),S&&S(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=hn(p,o.transformPagePoint),Pi(d)&&d.buttons===0){o.handlePointerUp(d,p);return}bt.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var v=o.handlers,m=v.onEnd,b=v.onSessionEnd,g=mn(hn(p,o.transformPagePoint),o.history);o.startEvent&&m&&m(d,g),b&&b(d,g)},!(Ti(e)&&e.touches.length>1)){this.handlers=n,this.transformPagePoint=i;var s=Jn(e),u=hn(s,this.transformPagePoint),l=u.point,c=ke().timestamp;this.history=[P(P({},l),{timestamp:c})];var f=n.onSessionStart;f&&f(e,mn(u,this.history)),this.removeListeners=Ke(Gt(window,"pointermove",this.handlePointerMove),Gt(window,"pointerup",this.handlePointerUp),Gt(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(e){this.handlers=e},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Ut.update(this.updatePoint)},t}();function hn(t,e){return e?{point:e(t.point)}:t}function to(t,e){return{x:t.x-e.x,y:t.y-e.y}}function mn(t,e){var n=t.point;return{point:n,delta:to(n,ia(e)),offset:to(n,sf(e)),velocity:uf(e,.1)}}function sf(t){return t[0]}function ia(t){return t[t.length-1]}function uf(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=ia(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>He(e)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Vt(t){return t.max-t.min}function eo(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=.01),Yi(t,e)<n}function no(t,e,n,r){r===void 0&&(r=.5),t.origin=r,t.originPoint=Q(e.min,e.max,t.origin),t.scale=Vt(n)/Vt(e),(eo(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Q(n.min,n.max,t.origin)-t.originPoint,(eo(t.translate)||isNaN(t.translate))&&(t.translate=0)}function re(t,e,n,r){no(t.x,e.x,n.x,r==null?void 0:r.originX),no(t.y,e.y,n.y,r==null?void 0:r.originY)}function ro(t,e,n){t.min=n.min+e.min,t.max=t.min+Vt(e)}function lf(t,e,n){ro(t.x,e.x,n.x),ro(t.y,e.y,n.y)}function oo(t,e,n){t.min=e.min-n.min,t.max=t.min+Vt(e)}function oe(t,e,n){oo(t.x,e.x,n.x),oo(t.y,e.y,n.y)}function cf(t,e,n){var r=e.min,o=e.max;return r!==void 0&&t<r?t=n?Q(r,t,n.min):Math.max(t,r):o!==void 0&&t>o&&(t=n?Q(o,t,n.max):Math.min(t,o)),t}function io(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ff(t,e){var n=e.top,r=e.left,o=e.bottom,a=e.right;return{x:io(t.x,r,a),y:io(t.y,n,o)}}function ao(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=$([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function df(t,e){return{x:ao(t.x,e.x),y:ao(t.y,e.y)}}function vf(t,e){var n=.5,r=Vt(t),o=Vt(e);return o>r?n=fe(e.min,e.max-r,t.min):r>o&&(n=fe(t.min,t.max-o,e.min)),De(0,1,n)}function pf(t,e){var n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}var kn=.35;function hf(t){return t===void 0&&(t=kn),t===!1?t=0:t===!0&&(t=kn),{x:so(t,"left","right"),y:so(t,"top","bottom")}}function so(t,e,n){return{min:uo(t,e),max:uo(t,n)}}function uo(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}var lo=function(){return{translate:0,scale:1,origin:0,originPoint:0}},ie=function(){return{x:lo(),y:lo()}},co=function(){return{min:0,max:0}},it=function(){return{x:co(),y:co()}};function yt(t){return[t("x"),t("y")]}function aa(t){var e=t.top,n=t.left,r=t.right,o=t.bottom;return{x:{min:n,max:r},y:{min:e,max:o}}}function mf(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function gf(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gn(t){return t===void 0||t===1}function sa(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!gn(e)||!gn(n)||!gn(r)}function Rt(t){return sa(t)||fo(t.x)||fo(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function fo(t){return t&&t!=="0%"}function We(t,e,n){var r=t-n,o=e*r;return n+o}function vo(t,e,n,r,o){return o!==void 0&&(t=We(t,o,r)),We(t,n,r)+e}function Fn(t,e,n,r,o){e===void 0&&(e=0),n===void 0&&(n=1),t.min=vo(t.min,e,n,r,o),t.max=vo(t.max,e,n,r,o)}function ua(t,e){var n=e.x,r=e.y;Fn(t.x,n.translate,n.scale,n.originPoint),Fn(t.y,r.translate,r.scale,r.originPoint)}function yf(t,e,n,r){var o,a;r===void 0&&(r=!1);var i=n.length;if(i){e.x=e.y=1;for(var s,u,l=0;l<i;l++)s=n[l],u=s.projectionDelta,((a=(o=s.instance)===null||o===void 0?void 0:o.style)===null||a===void 0?void 0:a.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&qt(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ua(t,u)),r&&Rt(s.latestValues)&&qt(t,s.latestValues))}}function At(t,e){t.min=t.min+e,t.max=t.max+e}function po(t,e,n){var r=$(n,3),o=r[0],a=r[1],i=r[2],s=e[i]!==void 0?e[i]:.5,u=Q(t.min,t.max,s);Fn(t,e[o],e[a],u,e.scale)}var Sf=["x","scaleX","originX"],bf=["y","scaleY","originY"];function qt(t,e){po(t.x,e,Sf),po(t.y,e,bf)}function la(t,e){return aa(gf(t.getBoundingClientRect(),e))}function xf(t,e,n){var r=la(t,n),o=e.scroll;return o&&(At(r.x,o.x),At(r.y,o.y)),r}var Pf=new WeakMap,Tf=function(){function t(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=e}return t.prototype.start=function(e,n){var r=this,o=n===void 0?{}:n,a=o.snapToCursor,i=a===void 0?!1:a;if(this.visualElement.isPresent!==!1){var s=function(f){r.stopAnimation(),i&&r.snapToCursor(Jn(f,"page").point)},u=function(f,d){var p,v=r.getProps(),m=v.drag,b=v.dragPropagation,g=v.onDragStart;m&&!b&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=Ci(m),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),yt(function(x){var S,T,E=r.getAxisMotionValue(x).get()||0;if(St.test(E)){var V=(T=(S=r.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||T===void 0?void 0:T.actual[x];if(V){var I=Vt(V);E=I*(parseFloat(E)/100)}}r.originPoint[x]=E}),g==null||g(f,d),(p=r.visualElement.animationState)===null||p===void 0||p.setActive(z.Drag,!0))},l=function(f,d){var p=r.getProps(),v=p.dragPropagation,m=p.dragDirectionLock,b=p.onDirectionLock,g=p.onDrag;if(!(!v&&!r.openGlobalLock)){var x=d.offset;if(m&&r.currentDirection===null){r.currentDirection=wf(x),r.currentDirection!==null&&(b==null||b(r.currentDirection));return}r.updateAxis("x",d.point,x),r.updateAxis("y",d.point,x),r.visualElement.syncRender(),g==null||g(f,d)}},c=function(f,d){return r.stop(f,d)};this.panSession=new oa(e,{onSessionStart:s,onStart:u,onMove:l,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(e,n){var r=this.isDragging;if(this.cancel(),!!r){var o=n.velocity;this.startAnimation(o);var a=this.getProps().onDragEnd;a==null||a(e,n)}},t.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(z.Drag,!1)},t.prototype.updateAxis=function(e,n,r){var o=this.getProps().drag;if(!(!r||!Ve(e,o,this.currentDirection))){var a=this.getAxisMotionValue(e),i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=cf(i,this.constraints[e],this.elastic[e])),a.set(i)}},t.prototype.resolveConstraints=function(){var e=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,a=(this.visualElement.projection||{}).layout,i=this.constraints;r&&Wt(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=ff(a.actual,r):this.constraints=!1,this.elastic=hf(o),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&yt(function(s){e.getAxisMotionValue(s)&&(e.constraints[s]=pf(a.actual[s],e.constraints[s]))})},t.prototype.resolveRefConstraints=function(){var e=this.getProps(),n=e.dragConstraints,r=e.onMeasureDragConstraints;if(!n||!Wt(n))return!1;var o=n.current;lt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var a=this.visualElement.projection;if(!a||!a.layout)return!1;var i=xf(o,a.root,this.visualElement.getTransformPagePoint()),s=df(a.layout.actual,i);if(r){var u=r(mf(s));this.hasMutatedConstraints=!!u,u&&(s=aa(u))}return s},t.prototype.startAnimation=function(e){var n=this,r=this.getProps(),o=r.drag,a=r.dragMomentum,i=r.dragElastic,s=r.dragTransition,u=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{},f=yt(function(d){var p;if(Ve(d,o,n.currentDirection)){var v=(p=c==null?void 0:c[d])!==null&&p!==void 0?p:{};u&&(v={min:0,max:0});var m=i?200:1e6,b=i?40:1e7,g=P(P({type:"inertia",velocity:a?e[d]:0,bounceStiffness:m,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},s),v);return n.startAxisValueAnimation(d,g)}});return Promise.all(f).then(l)},t.prototype.startAxisValueAnimation=function(e,n){var r=this.getAxisMotionValue(e);return ar(e,r,0,n)},t.prototype.stopAnimation=function(){var e=this;yt(function(n){return e.getAxisMotionValue(n).stop()})},t.prototype.getAxisMotionValue=function(e){var n,r,o="_drag"+e.toUpperCase(),a=this.visualElement.getProps()[o];return a||this.visualElement.getValue(e,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:0)},t.prototype.snapToCursor=function(e){var n=this;yt(function(r){var o=n.getProps().drag;if(Ve(r,o,n.currentDirection)){var a=n.visualElement.projection,i=n.getAxisMotionValue(r);if(a&&a.layout){var s=a.layout.actual[r],u=s.min,l=s.max;i.set(e[r]-Q(u,l,.5))}}})},t.prototype.scalePositionWithinConstraints=function(){var e=this,n,r=this.getProps(),o=r.drag,a=r.dragConstraints,i=this.visualElement.projection;if(!(!Wt(a)||!i||!this.constraints)){this.stopAnimation();var s={x:0,y:0};yt(function(l){var c=e.getAxisMotionValue(l);if(c){var f=c.get();s[l]=vf({min:f,max:f},e.constraints[l])}});var u=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=u?u({},""):"none",(n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout(),this.resolveConstraints(),yt(function(l){if(Ve(l,o,null)){var c=e.getAxisMotionValue(l),f=e.constraints[l],d=f.min,p=f.max;c.set(Q(d,p,s[l]))}})}},t.prototype.addListeners=function(){var e=this,n;Pf.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Gt(r,"pointerdown",function(l){var c=e.getProps(),f=c.drag,d=c.dragListener,p=d===void 0?!0:d;f&&p&&e.start(l)}),a=function(){var l=e.getProps().dragConstraints;Wt(l)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,s=i.addEventListener("measure",a);i&&!i.layout&&((n=i.root)===null||n===void 0||n.updateScroll(),i.updateLayout()),a();var u=Ze(window,"resize",function(){return e.scalePositionWithinConstraints()});return i.addEventListener("didUpdate",function(l){var c=l.delta,f=l.hasLayoutChanged;e.isDragging&&f&&(yt(function(d){var p=e.getAxisMotionValue(d);p&&(e.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),e.visualElement.syncRender())}),function(){u(),o(),s()}},t.prototype.getProps=function(){var e=this.visualElement.getProps(),n=e.drag,r=n===void 0?!1:n,o=e.dragDirectionLock,a=o===void 0?!1:o,i=e.dragPropagation,s=i===void 0?!1:i,u=e.dragConstraints,l=u===void 0?!1:u,c=e.dragElastic,f=c===void 0?kn:c,d=e.dragMomentum,p=d===void 0?!0:d;return P(P({},e),{drag:r,dragDirectionLock:a,dragPropagation:s,dragConstraints:l,dragElastic:f,dragMomentum:p})},t}();function Ve(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function wf(t,e){e===void 0&&(e=10);var n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function Ef(t){var e=t.dragControls,n=t.visualElement,r=pe(function(){return new Tf(n)});h.useEffect(function(){return e&&e.subscribe(r)},[r,e]),h.useEffect(function(){return r.addListeners()},[r])}function Vf(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,i=e||n||r||o,s=h.useRef(null),u=h.useContext(qn).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:e,onEnd:function(f,d){s.current=null,r&&r(f,d)}};h.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function c(f){s.current=new oa(f,l,{transformPagePoint:u})}Ne(a,"pointerdown",i&&c),Ai(function(){return s.current&&s.current.end()})}var Cf={pan:It(Vf),drag:It(Ef)},Ce=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function jf(){var t=Ce.map(function(){return new ne}),e={},n={clearAllListeners:function(){return t.forEach(function(r){return r.clear()})},updatePropListeners:function(r){Ce.forEach(function(o){var a,i="on"+o,s=r[i];(a=e[o])===null||a===void 0||a.call(e),s&&(e[o]=n[i](s))})}};return t.forEach(function(r,o){n["on"+Ce[o]]=function(a){return r.add(a)},n["notify"+Ce[o]]=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return r.notify.apply(r,ft([],$(a),!1))}}),n}function Rf(t,e,n){var r;for(var o in e){var a=e[o],i=n[o];if(wt(a))t.addValue(o,a),process.env.NODE_ENV==="development"&&Qi(a.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(a.version," with 6.5.1 may not work as expected."));else if(wt(i))t.addValue(o,Yt(a));else if(i!==a)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(a)}else t.addValue(o,Yt((r=t.getStaticValue(o))!==null&&r!==void 0?r:a))}for(var o in n)e[o]===void 0&&t.removeValue(o);return e}var ca=function(t){var e=t.treeType,n=e===void 0?"":e,r=t.build,o=t.getBaseTarget,a=t.makeTargetAnimatable,i=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,l=t.removeValueFromRenderState,c=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(d,p){var v=d.parent,m=d.props,b=d.presenceId,g=d.blockInitialAnimation,x=d.visualState,S=d.shouldReduceMotion;p===void 0&&(p={});var T=!1,E=x.latestValues,V=x.renderState,I,N=jf(),j=new Map,k=new Map,K={},H=P({},E),F;function R(){!I||!T||(U(),s(I,V,m.style,D.projection))}function U(){r(D,V,E,p,m)}function J(){N.notifyUpdate(E)}function M(w,C){var L=C.onChange(function(B){E[w]=B,m.onUpdate&&bt.update(J,!1,!0)}),O=C.onRenderRequest(D.scheduleRender);k.set(w,function(){L(),O()})}var nt=f(m);for(var rt in nt){var ot=nt[rt];E[rt]!==void 0&&wt(ot)&&ot.set(E[rt],!1)}var W=Xe(m),Z=_o(m),D=P(P({treeType:n,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:b,shouldReduceMotion:S,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(v!=null&&v.isMounted()),blockInitialAnimation:g,isMounted:function(){return!!I},mount:function(w){T=!0,I=D.current=w,D.projection&&D.projection.mount(w),Z&&v&&!W&&(F=v==null?void 0:v.addVariantChild(D)),j.forEach(function(C,L){return M(L,C)}),v==null||v.children.add(D),D.setProps(m)},unmount:function(){var w;(w=D.projection)===null||w===void 0||w.unmount(),Ut.update(J),Ut.render(R),k.forEach(function(C){return C()}),F==null||F(),v==null||v.children.delete(D),N.clearAllListeners(),I=void 0,T=!1},addVariantChild:function(w){var C,L=D.getClosestVariantNode();if(L)return(C=L.variantChildren)===null||C===void 0||C.add(w),function(){return L.variantChildren.delete(w)}},sortNodePosition:function(w){return!c||n!==w.treeType?0:c(D.getInstance(),w.getInstance())},getClosestVariantNode:function(){return Z?D:v==null?void 0:v.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return I},getStaticValue:function(w){return E[w]},setStaticValue:function(w,C){return E[w]=C},getLatestValues:function(){return E},setVisibility:function(w){D.isVisible!==w&&(D.isVisible=w,D.scheduleRender())},makeTargetAnimatable:function(w,C){return C===void 0&&(C=!0),a(D,w,m,C)},measureViewportBox:function(){return i(I,m)},addValue:function(w,C){D.hasValue(w)&&D.removeValue(w),j.set(w,C),E[w]=C.get(),M(w,C)},removeValue:function(w){var C;j.delete(w),(C=k.get(w))===null||C===void 0||C(),k.delete(w),delete E[w],l(w,V)},hasValue:function(w){return j.has(w)},getValue:function(w,C){var L=j.get(w);return L===void 0&&C!==void 0&&(L=Yt(C),D.addValue(w,L)),L},forEachValue:function(w){return j.forEach(w)},readValue:function(w){var C;return(C=E[w])!==null&&C!==void 0?C:u(I,w,p)},setBaseTarget:function(w,C){H[w]=C},getBaseTarget:function(w){if(o){var C=o(m,w);if(C!==void 0&&!wt(C))return C}return H[w]}},N),{build:function(){return U(),V},scheduleRender:function(){bt.render(R,!1,!0)},syncRender:R,setProps:function(w){(w.transformTemplate||m.transformTemplate)&&D.scheduleRender(),m=w,N.updatePropListeners(w),K=Rf(D,f(m),K)},getProps:function(){return m},getVariant:function(w){var C;return(C=m.variants)===null||C===void 0?void 0:C[w]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(w){if(w===void 0&&(w=!1),w)return v==null?void 0:v.getVariantContext();if(!W){var C=(v==null?void 0:v.getVariantContext())||{};return m.initial!==void 0&&(C.initial=m.initial),C}for(var L={},O=0;O<Af;O++){var B=fa[O],q=m[B];(ht(q)||q===!1)&&(L[B]=q)}return L}});return D}},fa=ft(["initial"],$(cr),!1),Af=fa.length;function Hn(t){return typeof t=="string"&&t.startsWith("var(--")}var da=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mf(t){var e=da.exec(t);if(!e)return[,];var n=$(e,3),r=n[1],o=n[2];return[r,o]}var If=4;function Wn(t,e,n){n===void 0&&(n=1),lt(n<=If,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));var r=$(Mf(t),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(e).getPropertyValue(o);return i?i.trim():Hn(a)?Wn(a,e,n+1):a}}function Of(t,e,n){var r,o=dt(e,[]),a=t.getInstance();if(!(a instanceof Element))return{target:o,transitionEnd:n};n&&(n=P({},n)),t.forEachValue(function(l){var c=l.get();if(Hn(c)){var f=Wn(c,a);f&&l.set(f)}});for(var i in o){var s=o[i];if(Hn(s)){var u=Wn(s,a);u&&(o[i]=u,n&&((r=n[i])!==null&&r!==void 0||(n[i]=s)))}}return{target:o,transitionEnd:n}}var Lf=new Set(["width","height","top","left","right","bottom","x","y"]),va=function(t){return Lf.has(t)},Nf=function(t){return Object.keys(t).some(va)},pa=function(t,e){t.set(e,!1),t.set(e)},je=function(t){return t===kt||t===A},ho;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(ho||(ho={}));var mo=function(t,e){return parseFloat(t.split(", ")[e])},go=function(t,e){return function(n,r){var o=r.transform;if(o==="none"||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return mo(a[1],e);var i=o.match(/^matrix\((.+)\)$/);return i?mo(i[1],t):0}},Df=new Set(["x","y","z"]),Bf=ue.filter(function(t){return!Df.has(t)});function kf(t){var e=[];return Bf.forEach(function(n){var r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}var yo={width:function(t,e){var n=t.x,r=e.paddingLeft,o=r===void 0?"0":r,a=e.paddingRight,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:function(t,e){var n=t.y,r=e.paddingTop,o=r===void 0?"0":r,a=e.paddingBottom,i=a===void 0?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:go(4,13),y:go(5,14)},Ff=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),a=getComputedStyle(o),i=a.display,s={};i==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(function(l){s[l]=yo[l](r,a)}),e.syncRender();var u=e.measureViewportBox();return n.forEach(function(l){var c=e.getValue(l);pa(c,s[l]),t[l]=yo[l](u,a)}),t},Hf=function(t,e,n,r){n===void 0&&(n={}),r===void 0&&(r={}),e=P({},e),r=P({},r);var o=Object.keys(e).filter(va),a=[],i=!1,s=[];if(o.forEach(function(c){var f=t.getValue(c);if(t.hasValue(c)){var d=n[c],p=Qt(d),v=e[c],m;if(ce(v)){var b=v.length,g=v[0]===null?1:0;d=v[g],p=Qt(d);for(var x=g;x<b;x++)m?lt(Qt(v[x])===m,"All keyframes must be of the same type"):(m=Qt(v[x]),lt(m===p||je(p)&&je(m),"Keyframes must be of the same dimension as the current value"))}else m=Qt(v);if(p!==m)if(je(p)&&je(m)){var S=f.get();typeof S=="string"&&f.set(parseFloat(S)),typeof v=="string"?e[c]=parseFloat(v):Array.isArray(v)&&m===A&&(e[c]=v.map(parseFloat))}else p!=null&&p.transform&&(m!=null&&m.transform)&&(d===0||v===0)?d===0?f.set(m.transform(d)):e[c]=p.transform(v):(i||(a=kf(t),i=!0),s.push(c),r[c]=r[c]!==void 0?r[c]:e[c],pa(f,v))}}),s.length){var u=s.indexOf("height")>=0?window.pageYOffset:null,l=Ff(e,t,s);return a.length&&a.forEach(function(c){var f=$(c,2),d=f[0],p=f[1];t.getValue(d).set(p)}),t.syncRender(),u!==null&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}else return{target:e,transitionEnd:r}};function Wf(t,e,n,r){return Nf(e)?Hf(t,e,n,r):{target:e,transitionEnd:r}}var qf=function(t,e,n,r){var o=Of(t,e,r);return e=o.target,r=o.transitionEnd,Wf(t,e,n,r)};function Gf(t){return window.getComputedStyle(t)}var ha={treeType:"dom",readValueFromInstance:function(t,e){if(he(e)){var n=rr(e);return n&&n.default||0}else{var r=Gf(t);return(ri(e)?r.getPropertyValue(e):r[e])||0}},sortNodePosition:function(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox:function(t,e){var n=e.transformPagePoint;return la(t,n)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=n.transformValues;r===void 0&&(r=!0);var a=e.transition,i=e.transitionEnd,s=dt(e,["transition","transitionEnd"]),u=Zc(s,a||{},t);if(o&&(i&&(i=o(i)),s&&(s=o(s)),u&&(u=o(u))),r){Yc(t,s,u);var l=qf(t,s,u,i);i=l.transitionEnd,s=l.target}return P({transition:a,transitionEnd:i},s)},scrapeMotionValuesFromProps:Zn,build:function(t,e,n,r,o){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),Un(e,n,r,o.transformTemplate)},render:mi},zf=ca(ha),Uf=ca(P(P({},ha),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return he(e)?((n=rr(e))===null||n===void 0?void 0:n.default)||0:(e=gi.has(e)?e:hi(e),t.getAttribute(e))},scrapeMotionValuesFromProps:Si,build:function(t,e,n,r,o){Xn(e,n,r,o.transformTemplate)},render:yi})),Yf=function(t,e){return Gn(t)?Uf(e,{enableHardwareAcceleration:!1}):zf(e,{enableHardwareAcceleration:!0})};function So(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var _t={correct:function(t,e){if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;var n=So(t,e.target.x),r=So(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}},bo="_$css",Xf={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,o=t,a=t.includes("var("),i=[];a&&(t=t.replace(da,function(m){return i.push(m),bo}));var s=Et.parse(t);if(s.length>5)return o;var u=Et.createTransformer(t),l=typeof s[0]!="number"?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=f;var d=Q(c,f,.5);typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d);var p=u(s);if(a){var v=0;p=p.replace(bo,function(){var m=i[v];return v++,m})}return p}},Zf=function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.visualElement,a=r.layoutGroup,i=r.switchLayoutGroup,s=r.layoutId,u=o.projection;Su(Jf),u&&(a!=null&&a.group&&a.group.add(u),i!=null&&i.register&&s&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",function(){n.safeToRemove()}),u.setOptions(P(P({},u.options),{onExitComplete:function(){return n.safeToRemove()}}))),$t.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(n){var r=this,o=this.props,a=o.layoutDependency,i=o.visualElement,s=o.drag,u=o.isPresent,l=i.projection;return l&&(l.isPresent=u,s||n.layoutDependency!==a||a===void 0?l.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?l.promote():l.relegate()||bt.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,o=n.layoutGroup,a=n.switchLayoutGroup,i=r.projection;i&&(i.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(i),a!=null&&a.deregister&&a.deregister(i))},e.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},e.prototype.render=function(){return null},e}(h.Component);function Kf(t){var e=$(_i(),2),n=e[0],r=e[1],o=h.useContext($o);return h.createElement(Zf,P({},t,{layoutGroup:o,switchLayoutGroup:h.useContext(ti),isPresent:n,safeToRemove:r}))}var Jf={borderRadius:P(P({},_t),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:_t,borderTopRightRadius:_t,borderBottomLeftRadius:_t,borderBottomRightRadius:_t,boxShadow:Xf},Qf={measureLayout:Kf};function _f(t,e,n){n===void 0&&(n={});var r=wt(t)?t:Yt(t);return ar("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var ma=["TopLeft","TopRight","BottomLeft","BottomRight"],$f=ma.length,xo=function(t){return typeof t=="string"?parseFloat(t):t},Po=function(t){return typeof t=="number"||A.test(t)};function td(t,e,n,r,o,a){var i,s,u,l;o?(t.opacity=Q(0,(i=n.opacity)!==null&&i!==void 0?i:1,ed(r)),t.opacityExit=Q((s=e.opacity)!==null&&s!==void 0?s:1,0,nd(r))):a&&(t.opacity=Q((u=e.opacity)!==null&&u!==void 0?u:1,(l=n.opacity)!==null&&l!==void 0?l:1,r));for(var c=0;c<$f;c++){var f="border".concat(ma[c],"Radius"),d=To(e,f),p=To(n,f);if(!(d===void 0&&p===void 0)){d||(d=0),p||(p=0);var v=d===0||p===0||Po(d)===Po(p);v?(t[f]=Math.max(Q(xo(d),xo(p),r),0),(St.test(p)||St.test(d))&&(t[f]+="%")):t[f]=p}}(e.rotate||n.rotate)&&(t.rotate=Q(e.rotate||0,n.rotate||0,r))}function To(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}var ed=ga(0,.5,er),nd=ga(.5,.95,$n);function ga(t,e,n){return function(r){return r<t?0:r>e?1:n(fe(t,e,r))}}function wo(t,e){t.min=e.min,t.max=e.max}function pt(t,e){wo(t.x,e.x),wo(t.y,e.y)}function Eo(t,e,n,r,o){return t-=e,t=We(t,1/n,r),o!==void 0&&(t=We(t,1/o,r)),t}function rd(t,e,n,r,o,a,i){if(e===void 0&&(e=0),n===void 0&&(n=1),r===void 0&&(r=.5),a===void 0&&(a=t),i===void 0&&(i=t),St.test(e)){e=parseFloat(e);var s=Q(i.min,i.max,e/100);e=s-i.min}if(typeof e=="number"){var u=Q(a.min,a.max,r);t===a&&(u-=e),t.min=Eo(t.min,e,n,u,o),t.max=Eo(t.max,e,n,u,o)}}function Vo(t,e,n,r,o){var a=$(n,3),i=a[0],s=a[1],u=a[2];rd(t,e[i],e[s],e[u],e.scale,r,o)}var od=["x","scaleX","originX"],id=["y","scaleY","originY"];function Co(t,e,n,r){Vo(t.x,e,od,n==null?void 0:n.x,r==null?void 0:r.x),Vo(t.y,e,id,n==null?void 0:n.y,r==null?void 0:r.y)}function jo(t){return t.translate===0&&t.scale===1}function ya(t){return jo(t.x)&&jo(t.y)}function Sa(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var ad=function(){function t(){this.members=[]}return t.prototype.add=function(e){sr(this.members,e),e.scheduleRender()},t.prototype.remove=function(e){if(ur(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},t.prototype.relegate=function(e){var n=this.members.findIndex(function(i){return e===i});if(n===0)return!1;for(var r,o=n;o>=0;o--){var a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1},t.prototype.promote=function(e,n){var r,o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues,e.snapshot.isShared=!0),!((r=e.root)===null||r===void 0)&&r.isUpdating&&(e.isLayoutDirty=!0);var a=e.options.crossfade;a===!1&&o.hide()}},t.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var n,r,o,a,i;(r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n),(i=(o=e.resumingFrom)===null||o===void 0?void 0:(a=o.options).onExitComplete)===null||i===void 0||i.call(a)})},t.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),sd="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Ro(t,e,n){var r=t.x.translate/e.x,o=t.y.translate/e.y,a="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(a+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var i=n.rotate,s=n.rotateX,u=n.rotateY;i&&(a+="rotate(".concat(i,"deg) ")),s&&(a+="rotateX(".concat(s,"deg) ")),u&&(a+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return a+="scale(".concat(l,", ").concat(c,")"),a===sd?"none":a}var ud=function(t,e){return t.depth-e.depth},ld=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(e){sr(this.children,e),this.isDirty=!0},t.prototype.remove=function(e){ur(this.children,e),this.isDirty=!0},t.prototype.forEach=function(e){this.isDirty&&this.children.sort(ud),this.isDirty=!1,this.children.forEach(e)},t}(),Ao=1e3;function ba(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,o=t.checkIsScrollRoot,a=t.resetTransform;return function(){function i(s,u,l){var c=this;u===void 0&&(u={}),l===void 0&&(l=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(hd),c.nodes.forEach(md)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=u,this.root=l?l.root||l:this,this.path=l?ft(ft([],$(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new ld)}return i.prototype.addEventListener=function(s,u){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new ne),this.eventHandlers.get(s).add(u)},i.prototype.notifyListeners=function(s){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,ft([],$(u),!1))},i.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},i.prototype.registerPotentialNode=function(s,u){this.potentialNodes.set(s,u)},i.prototype.mount=function(s,u){var l=this,c;if(u===void 0&&(u=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var f=this.options,d=f.layoutId,p=f.layout,v=f.visualElement;if(v&&!v.getInstance()&&v.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),u&&(p||d)&&(this.isLayoutDirty=!0),e){var m,b=function(){return l.root.updateBlockedByResize=!1};e(s,function(){l.root.updateBlockedByResize=!0,clearTimeout(m),m=window.setTimeout(b,250),$t.hasAnimatedSinceResize&&($t.hasAnimatedSinceResize=!1,l.nodes.forEach(pd))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&v&&(d||p)&&this.addEventListener("didUpdate",function(g){var x,S,T,E,V,I=g.delta,N=g.hasLayoutChanged,j=g.hasRelativeTargetChanged,k=g.layout;if(l.isTreeAnimationBlocked()){l.target=void 0,l.relativeTarget=void 0;return}var K=(S=(x=l.options.transition)!==null&&x!==void 0?x:v.getDefaultTransition())!==null&&S!==void 0?S:xd,H=v.getProps(),F=H.onLayoutAnimationStart,R=H.onLayoutAnimationComplete,U=!l.targetLayout||!Sa(l.targetLayout,k)||j,J=!N&&j;if(!((T=l.resumeFrom)===null||T===void 0)&&T.instance||J||N&&(U||!l.currentAnimation)){l.resumeFrom&&(l.resumingFrom=l.resumeFrom,l.resumingFrom.resumingFrom=void 0),l.setAnimationOrigin(I,J);var M=P(P({},ir(K,"layout")),{onPlay:F,onComplete:R});v.shouldReduceMotion&&(M.delay=0,M.type=!1),l.startAnimation(M)}else!N&&l.animationProgress===0&&l.finishAnimation(),l.isLead()&&((V=(E=l.options).onExitComplete)===null||V===void 0||V.call(E));l.targetLayout=k})}},i.prototype.unmount=function(){var s,u;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(u=this.parent)===null||u===void 0||u.children.delete(this),this.instance=void 0,Ut.preRender(this.updateProjection)},i.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},i.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},i.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},i.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},i.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(gd))},i.prototype.willUpdate=function(s){var u,l,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(l=(u=this.options).onExitComplete)===null||l===void 0||l.call(u);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var f=0;f<this.path.length;f++){var d=this.path[f];d.shouldResetTransform=!0,d.updateScroll()}var p=this.options,v=p.layoutId,m=p.layout;if(!(v===void 0&&!m)){var b=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=b==null?void 0:b(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},i.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Mo);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Pd),this.potentialNodes.clear()),this.nodes.forEach(vd),this.nodes.forEach(cd),this.nodes.forEach(fd),this.clearAllSnapshots(),dn.update(),dn.preRender(),dn.render())},i.prototype.clearAllSnapshots=function(){this.nodes.forEach(dd),this.sharedNodes.forEach(yd)},i.prototype.scheduleUpdateProjection=function(){bt.preRender(this.updateProjection,!1,!0)},i.prototype.scheduleCheckAfterUnmount=function(){var s=this;bt.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},i.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),u=this.removeTransform(this.removeElementScroll(s));No(u),this.snapshot={measured:s,layout:u,latestValues:{}}}},i.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var u=0;u<this.path.length;u++){var l=this.path[u];l.updateScroll()}var c=this.measure();No(c);var f=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,f==null?void 0:f.actual)}},i.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},i.prototype.resetTransform=function(){var s;if(a){var u=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!ya(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,f=c==null?void 0:c(this.latestValues,""),d=f!==this.prevTransformTemplateValue;u&&(l||Rt(this.latestValues)||d)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}},i.prototype.measure=function(){var s=this.options.visualElement;if(!s)return it();var u=s.measureViewportBox(),l=this.root.scroll;return l&&(At(u.x,l.x),At(u.y,l.y)),u},i.prototype.removeElementScroll=function(s){var u=it();pt(u,s);for(var l=0;l<this.path.length;l++){var c=this.path[l],f=c.scroll,d=c.options,p=c.isScrollRoot;if(c!==this.root&&f&&d.layoutScroll){if(p){pt(u,s);var v=this.root.scroll;v&&(At(u.x,-v.x),At(u.y,-v.y))}At(u.x,f.x),At(u.y,f.y)}}return u},i.prototype.applyTransform=function(s,u){u===void 0&&(u=!1);var l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];!u&&f.options.layoutScroll&&f.scroll&&f!==f.root&&qt(l,{x:-f.scroll.x,y:-f.scroll.y}),Rt(f.latestValues)&&qt(l,f.latestValues)}return Rt(this.latestValues)&&qt(l,this.latestValues),l},i.prototype.removeTransform=function(s){var u,l=it();pt(l,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];if(f.instance&&Rt(f.latestValues)){sa(f.latestValues)&&f.updateSnapshot();var d=it(),p=f.measure();pt(d,p),Co(l,f.latestValues,(u=f.snapshot)===null||u===void 0?void 0:u.layout,d)}}return Rt(this.latestValues)&&Co(l,this.latestValues),l},i.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},i.prototype.setOptions=function(s){var u;this.options=P(P(P({},this.options),s),{crossfade:(u=s.crossfade)!==null&&u!==void 0?u:!0})},i.prototype.clearMeasurements=function(){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},i.prototype.resolveTargetDelta=function(){var s,u=this.options,l=u.layout,c=u.layoutId;!this.layout||!(l||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),pt(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?lf(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):pt(this.target,this.layout.actual),ua(this.target,this.targetDelta)):pt(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=it(),this.relativeTargetOrigin=it(),oe(this.relativeTargetOrigin,this.target,this.relativeParent.target),pt(this.relativeTarget,this.relativeTargetOrigin)))))},i.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Rt(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},i.prototype.calcProjection=function(){var s,u=this.options,l=u.layout,c=u.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(l||c))){var f=this.getLead();pt(this.layoutCorrected,this.layout.actual),yf(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==f);var d=f.target;if(d){this.projectionDelta||(this.projectionDelta=ie(),this.projectionDeltaWithTransform=ie());var p=this.treeScale.x,v=this.treeScale.y,m=this.projectionTransform;re(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Ro(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==p||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}}},i.prototype.hide=function(){this.isVisible=!1},i.prototype.show=function(){this.isVisible=!0},i.prototype.scheduleRender=function(s){var u,l,c;s===void 0&&(s=!0),(l=(u=this.options).scheduleRender)===null||l===void 0||l.call(u),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},i.prototype.setAnimationOrigin=function(s,u){var l=this,c;u===void 0&&(u=!1);var f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},p=P({},this.latestValues),v=ie();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!u;var m=it(),b=f==null?void 0:f.isShared,g=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,x=!!(b&&!g&&this.options.crossfade===!0&&!this.path.some(bd));this.animationProgress=0,this.mixTargetDelta=function(S){var T,E=S/1e3;Io(v.x,s.x,E),Io(v.y,s.y,E),l.setTargetDelta(v),l.relativeTarget&&l.relativeTargetOrigin&&l.layout&&(!((T=l.relativeParent)===null||T===void 0)&&T.layout)&&(oe(m,l.layout.actual,l.relativeParent.layout.actual),Sd(l.relativeTarget,l.relativeTargetOrigin,m,E)),b&&(l.animationValues=p,td(p,d,l.latestValues,E,x,g)),l.root.scheduleUpdateProjection(),l.scheduleRender(),l.animationProgress=E},this.mixTargetDelta(0)},i.prototype.startAnimation=function(s){var u=this,l,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)===null||l===void 0||l.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(Ut.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(function(){$t.hasAnimatedSinceResize=!0,u.currentAnimation=_f(0,Ao,P(P({},s),{onUpdate:function(f){var d;u.mixTargetDelta(f),(d=s.onUpdate)===null||d===void 0||d.call(s,f)},onComplete:function(){var f;(f=s.onComplete)===null||f===void 0||f.call(s),u.completeAnimation()}})),u.resumingFrom&&(u.resumingFrom.currentAnimation=u.currentAnimation),u.pendingAnimation=void 0})},i.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},i.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,Ao),this.currentAnimation.stop()),this.completeAnimation()},i.prototype.applyTransformsToTarget=function(){var s=this.getLead(),u=s.targetWithTransforms,l=s.target,c=s.layout,f=s.latestValues;!u||!l||!c||(pt(u,l),qt(u,f),re(this.projectionDeltaWithTransform,this.layoutCorrected,u,f))},i.prototype.registerSharedNode=function(s,u){var l,c,f;this.sharedNodes.has(s)||this.sharedNodes.set(s,new ad);var d=this.sharedNodes.get(s);d.add(u),u.promote({transition:(l=u.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=u.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,u)})},i.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},i.prototype.getLead=function(){var s,u=this.options.layoutId;return u?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},i.prototype.getPrevLead=function(){var s,u=this.options.layoutId;return u?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},i.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},i.prototype.promote=function(s){var u=s===void 0?{}:s,l=u.needsReset,c=u.transition,f=u.preserveFollowOpacity,d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},i.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},i.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var u=!1,l={},c=0;c<En.length;c++){var f=En[c],d="rotate"+f;s.getStaticValue(d)&&(u=!0,l[d]=s.getStaticValue(d),s.setStaticValue(d,0))}if(u){s==null||s.syncRender();for(var d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}}},i.prototype.getProjectionStyles=function(s){var u,l,c,f,d,p;s===void 0&&(s={});var v={};if(!this.instance||this.isSVG)return v;if(this.isVisible)v.visibility="";else return{visibility:"hidden"};var m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Ae(s.pointerEvents)||"",v.transform=m?m(this.latestValues,""):"none",v;var b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){var g={};return this.options.layoutId&&(g.opacity=(l=this.latestValues.opacity)!==null&&l!==void 0?l:1,g.pointerEvents=Ae(s.pointerEvents)||""),this.hasProjected&&!Rt(this.latestValues)&&(g.transform=m?m({},""):"none",this.hasProjected=!1),g}var x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=Ro(this.projectionDeltaWithTransform,this.treeScale,x),m&&(v.transform=m(x,v.transform));var S=this.projectionDelta,T=S.x,E=S.y;v.transformOrigin="".concat(T.origin*100,"% ").concat(E.origin*100,"% 0"),b.animationValues?v.opacity=b===this?(f=(c=x.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=b===this?(d=x.opacity)!==null&&d!==void 0?d:"":(p=x.opacityExit)!==null&&p!==void 0?p:0;for(var V in Oe)if(x[V]!==void 0){var I=Oe[V],N=I.correct,j=I.applyTo,k=N(x[V],b);if(j)for(var K=j.length,H=0;H<K;H++)v[j[H]]=k;else v[V]=k}return this.options.layoutId&&(v.pointerEvents=b===this?Ae(s.pointerEvents)||"":"none"),v},i.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},i.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var u;return(u=s.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Mo),this.root.sharedNodes.clear()},i}()}function cd(t){t.updateLayout()}function fd(t){var e,n,r,o,a=(n=(e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)!==null&&n!==void 0?n:t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){var i=t.layout,s=i.actual,u=i.measured;t.options.animationType==="size"?yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],T=Vt(S);S.min=s[x].min,S.max=S.min+T}):t.options.animationType==="position"&&yt(function(x){var S=a.isShared?a.measured[x]:a.layout[x],T=Vt(s[x]);S.max=S.min+T});var l=ie();re(l,s,a.layout);var c=ie();a.isShared?re(c,t.applyTransform(u,!0),a.measured):re(c,s,a.layout);var f=!ya(l),d=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var p=t.relativeParent,v=p.snapshot,m=p.layout;if(v&&m){var b=it();oe(b,a.layout,v.layout);var g=it();oe(g,s,m.actual),Sa(b,g)||(d=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((o=(r=t.options).onExitComplete)===null||o===void 0||o.call(r));t.options.transition=void 0}function dd(t){t.clearSnapshot()}function Mo(t){t.clearMeasurements()}function vd(t){var e=t.options.visualElement;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function pd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function hd(t){t.resolveTargetDelta()}function md(t){t.calcProjection()}function gd(t){t.resetRotation()}function yd(t){t.removeLeadSnapshot()}function Io(t,e,n){t.translate=Q(e.translate,0,n),t.scale=Q(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Oo(t,e,n,r){t.min=Q(e.min,n.min,r),t.max=Q(e.max,n.max,r)}function Sd(t,e,n,r){Oo(t.x,e.x,n.x,r),Oo(t.y,e.y,n.y,r)}function bd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var xd={duration:.45,ease:[.4,0,.1,1]};function Pd(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(t.path[r].instance){n=t.path[r];break}var o=n&&n!==t.root?n.instance:document,a=o.querySelector('[data-projection-id="'.concat(e,'"]'));a&&t.mount(a,!0)}function Lo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function No(t){Lo(t.x),Lo(t.y)}var Td=ba({attachResizeListener:function(t,e){return Ze(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),yn={current:void 0},wd=ba({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!yn.current){var t=new Td(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),yn.current=t}return yn.current},resetTransform:function(t,e){t.style.transform=e??"none"},checkIsScrollRoot:function(t){return window.getComputedStyle(t).position==="fixed"}}),Ed=P(P(P(P({},af),Tc),Cf),Qf),Vd=gu(function(t,e){return nl(t,e,Ed,Yf,wd)});function Cd(){var t=!1,e=[],n=new Set,r={subscribe:function(o){return n.add(o),function(){return void n.delete(o)}},start:function(o,a){if(t){var i=[];return n.forEach(function(s){i.push(na(s,o,{transitionOverride:a}))}),Promise.all(i)}else return new Promise(function(s){e.push({animation:[o,a],resolve:s})})},set:function(o){return lt(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(a){Uc(a,o)})},stop:function(){n.forEach(function(o){Jc(o)})},mount:function(){return t=!0,e.forEach(function(o){var a=o.animation,i=o.resolve;r.start.apply(r,ft([],$(a),!1)).then(i)}),function(){t=!1,r.stop()}}};return r}function jd(){var t=pe(Cd);return h.useEffect(t.mount,[]),t}var Rd=jd;const Ad=({onClose:t,threshold:e=.08,children:n})=>{const r=h.useRef(null),o=Rd(),a=(i,s)=>{const u=r.current;if(!u)return;const l=u.getBoundingClientRect().height;s.offset.y>l*e?t():o.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return y.jsx(Vd.div,{ref:r,style:{height:"100%",width:"100%"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:o,initial:{y:0},onDragEnd:a,children:n})},Md=({width:t="100%",height:e="100%",fill:n="white",...r})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:e,fill:"none",viewBox:"0 0 24 24",...r,children:y.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})}),fr=({stories:t,currentIndex:e,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:o,inline:a,loop:i,onClose:s,className:u=""})=>{const[l,c]=h.useState(0),f=()=>{c(v=>v+1)},d=()=>{n&&n(),i&&f()};if((t==null?void 0:t.length)==0)return y.jsx(y.Fragment,{});const p=a?({children:v})=>v:Ad;return y.jsxs("div",{className:Bt(Ct.StoryPlayer,u,{[Ct.inline]:a}),children:[y.jsx("div",{className:Ct.Overlay,onClick:r}),y.jsx("div",{className:Ct.StoryPlayer__Wrap,children:y.jsxs(p,{onClose:s,children:[y.jsx("div",{className:Ct.CloseIcon,onClick:s,children:y.jsx(Md,{})}),y.jsx(Qs,{onStoryChange:o,currentIndex:e,stories:t,width:"100%",height:"100%",onAllStoriesEnd:d,classNames:{progressContainer:Ct.progressContainer,progressBar:Ct.progressBar,progressBarContainer:Ct.progressBarContainer}},l)]})})]})},Id="_story_hjut8_1",Od="_BetSlip_Wrapper_hjut8_13",Ld="_BetSlip_ButtonWrap_hjut8_24",ae={story:Id,BetSlip_Wrapper:Od,BetSlip_ButtonWrap:Ld},Nd="es-PE";function Dd(t,e=Nd){const n=new Date(t),r=n.toLocaleDateString(e,{day:"2-digit",month:"2-digit"}),o=n.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${o}`}class Bd{static fromRaw(e){var i,s,u;const n=((s=(i=e==null?void 0:e.stakes)==null?void 0:i.find(l=>l.isEnabled))==null?void 0:s.preciseValue)??0,r=(u=e==null?void 0:e.selections)==null?void 0:u.map(l=>{var b,g,x,S,T,E;const c=parseFloat((g=(b=l==null?void 0:l.odd)==null?void 0:b.price)==null?void 0:g.toFixed(2)),f=Dd((x=l==null?void 0:l.event)==null?void 0:x.startDate),d=(T=(S=l==null?void 0:l.odd)==null?void 0:S.offers)==null?void 0:T.find(V=>V.type===0),v=l.market.name,m=(E=l==null?void 0:l.bbSelections)==null?void 0:E.map(V=>{var k,K,H,F,R;const I=(k=V==null?void 0:V.odd)==null?void 0:k.price,N=parseFloat(I.toFixed(2)),j=(H=(K=V==null?void 0:V.odd)==null?void 0:K.offers)==null?void 0:H.find(U=>U.type===0);return{marketName:(F=V==null?void 0:V.market)==null?void 0:F.name,name:(R=V==null?void 0:V.odd)==null?void 0:R.name,cuota:N,hasPA:!!j,paParam:j==null?void 0:j.parameter}});return{name:l.odd.name,cuota:c,event:l.event.name,fechaHora:f,hasPA:!!d,paParam:d==null?void 0:d.parameter,marketName:v,subSelections:m}}),o=parseFloat(r==null?void 0:r.reduce((l,c)=>l*(c==null?void 0:c.cuota),1).toFixed(2)),a=parseFloat((n*o).toFixed(2));return{selections:r,stake:n,cuotaTotal:o,gananciaTotal:a}}}const kd="_BetSlip_hse67_1",Fd="_BetSlip_Title_hse67_12",Hd="_SelectionItemWrap_hse67_19",Wd="_BetSlip_ButtonWrap_hse67_38",Re={BetSlip:kd,BetSlip_Title:Fd,SelectionItemWrap:Hd,BetSlip_ButtonWrap:Wd},qd="_SelectionItem_1ut02_1",Gd="_SelectionItemGrid_1ut02_11",zd="_SelectionItem_name_1ut02_17",Ud="_SelectionItem_marketName_1ut02_21",Yd="_SelectionItem_hasPA_1ut02_28",Xd="_SelectionItem_fechahora_1ut02_37",Zd="_SelectionItem__Wrap_1ut02_42",Kd="_SelectionItem__BB_1ut02_47",Jd="_SelectionItem__BB__mn_1ut02_80",ut={SelectionItem:qd,SelectionItemGrid:Gd,SelectionItem_name:zd,SelectionItem_marketName:Ud,SelectionItem_hasPA:Yd,SelectionItem_fechahora:Xd,SelectionItem__Wrap:Zd,SelectionItem__BB:Kd,SelectionItem__BB__mn:Jd},Qd=({selection:t})=>{var e,n;return y.jsxs("div",{className:ut.SelectionItem,children:[y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_name,children:t!=null&&t.subSelections?"Crear Apuesta":t.name}),y.jsx("div",{className:ut.SelectionItem_sc,children:t.cuota.toFixed(2)})]}),t!=null&&t.subSelections?null:y.jsx("div",{className:ut.SelectionItemGrid,children:y.jsxs("div",{className:ut.SelectionItem_marketName,children:[y.jsx("div",{children:t.marketName}),t.hasPA&&y.jsx("div",{className:ut.SelectionItem_hasPA,children:"PA"})]})}),y.jsxs("div",{className:ut.SelectionItemGrid,children:[y.jsx("div",{className:ut.SelectionItem_event,children:t.event}),y.jsx("div",{className:ut.SelectionItem_fechahora,children:t.fechaHora})]}),((e=t==null?void 0:t.subSelections)==null?void 0:e.length)>0?y.jsx("div",{className:ut.SelectionItem__Wrap,children:(n=t.subSelections)==null?void 0:n.map((r,o)=>y.jsxs("div",{className:ut.SelectionItem__BB,children:[y.jsx("div",{className:ut.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),y.jsx("div",{children:r==null?void 0:r.name})]},o))}):y.jsx(y.Fragment,{})]})},_d="_PulseButton_1udbm_1",$d="_PulseButton_BG_1udbm_8",Do={PulseButton:_d,PulseButton_BG:$d},tv="_Button_1lfmc_1",ev={Button:tv},xa=({children:t,href:e})=>y.jsxs("div",{className:Do.PulseButton,children:[y.jsx("div",{className:Do.PulseButton_BG}),y.jsx("a",{className:ev.Button,href:e,children:t})]}),nv=({slip:t,title:e})=>{var n;return y.jsxs("div",{className:Re.BetSlip,children:[y.jsxs("div",{className:Re.SelectionItemWrap,children:[e?y.jsx("div",{className:Re.BetSlip_Title,children:e}):null,(n=t==null?void 0:t.selections)==null?void 0:n.map((r,o)=>y.jsx(Qd,{selection:r},`${Date.now()}-${o}`))]}),t!=null&&t.cuotaTota?y.jsx("div",{className:Bt(Re.BetSlip_ButtonWrap),children:y.jsx(xa,{href:"https://www.apuestatotal.com/apuestas-deportivas/?reservationCode=HHHH",children:t==null?void 0:t.cuotaTotal})}):null]})},dr=({story:t})=>{let e=Bo;return(t==null?void 0:t.type)=="promo"&&(e=Bo),(t==null?void 0:t.type)=="betting"&&(e=rv),y.jsx(e,{story:t})},Bo=({story:t})=>y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),t!=null&&t.btn_text&&(t!=null&&t.btn_url)?y.jsx("div",{className:Bt(ae.BetSlip_Wrapper),children:y.jsx("div",{className:ae.BetSlip_ButtonWrap,children:y.jsxs(xa,{href:t==null?void 0:t.btn_url,children:[" ",t==null?void 0:t.btn_text]})})}):null]}),rv=({story:t})=>{const e=JSON.parse((t==null?void 0:t.coupon_result)??"{}");return y.jsxs("div",{className:Bt(ae.story),children:[y.jsx("img",{src:t==null?void 0:t.image,alt:""}),y.jsx("div",{className:ae.BetSlip_Wrapper,children:y.jsx(nv,{slip:Bd.fromRaw(e),title:t==null?void 0:t.coupon_title})})]})},ov="_StoryHeaderPlayer_1oqtd_1",iv="_StoryHeaderPlayer__ProfileStory_1oqtd_18",av="_StoryHeaderPlayer__title_1oqtd_24",Sn={StoryHeaderPlayer:ov,StoryHeaderPlayer__ProfileStory:iv,StoryHeaderPlayer__title:av},vr=({story:t,onProfileClick:e=()=>null,color:n,image:r})=>y.jsxs("div",{className:Sn.StoryHeaderPlayer,children:[y.jsx(qe,{className:Sn.StoryHeaderPlayer__ProfileStory,onProfileClick:e,color:n,image:r}),y.jsx("div",{className:Sn.StoryHeaderPlayer__title,children:t==null?void 0:t.title})]}),sv=({container:t="HOME"}={})=>{const e="apuestotal-stories-"+t;function n(){const u=localStorage.getItem(e);if(!u)return{};try{const l=JSON.parse(u),c={};for(const f in l)c[f]={seenStoryIds:new Set(l[f].seenStoryIds)};return c}catch(l){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",l),{}}}function r(u){const l={};for(const c in u)l[c]={seenStoryIds:Array.from(u[c].seenStoryIds)};localStorage.setItem(e,JSON.stringify(l))}function o(u,l){const c=n();c[u]||(c[u]={seenStoryIds:new Set}),c[u].seenStoryIds.add(l),r(c)}function a(u){const c=n()[u==null?void 0:u.id];return c?u.stories.every(f=>c.seenStoryIds.has(f==null?void 0:f.id)):!1}function i(u){const c=n()[u.id];if(!c)return 0;for(let f=0;f<u.stories.length;f++)if(!c.seenStoryIds.has(u.stories[f].id))return f;return 0}function s(u){const l=[],c=[];for(const f of u)a(f)?c.push(f):l.push(f);return[...l,...c]}return{markStorySeen:o,hasSeenAllStories:a,getNextUnseenStoryIndex:i,sortProfilesBySeenStatus:s}};function uv(t,e){const n=h.useCallback(()=>{e()},[e]);h.useEffect(()=>{if(!t)return;window.history.pushState({storiesOpen:!0},"");const r=a=>{(a.key==="Escape"||a.key==="Esc")&&n()},o=()=>{n()};return window.addEventListener("keydown",r),window.addEventListener("popstate",o),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",o)}},[t,n])}function lv({scroll:t,targets:e}){const n=h.useRef([]),r=h.useCallback(a=>{n.current.forEach(({el:i,originalOverflow:s})=>{i.style.overflow=s}),n.current=[],a.forEach(i=>{if(typeof i=="string"){const s=document.getElementById(i);s?(n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${i}"`)}else i===window||i===document?[document.body,document.documentElement].forEach(s=>{n.current.push({target:i,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",i)})},[]),o=h.useCallback(()=>{n.current.forEach(({el:a,originalOverflow:i})=>{a.style.overflow=i}),n.current=[]},[]);return h.useEffect(()=>{switch(t){case"ON":o();break;case"OFF":r(e);break}},[t]),{disableScroll:r,enableScroll:o}}const Pa=({className:t="",data:e,isPortal:n=!0})=>{var b;const[r,o]=h.useState(null),a=g=>o(g),{markStorySeen:i,hasSeenAllStories:s,getNextUnseenStoryIndex:u,sortProfilesBySeenStatus:l}=sv(),c=l(e==null?void 0:e.filter(g=>g.stories.length)),f=h.useRef(c);h.useEffect(()=>{f.current=c},[c]);const d=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r),p=((b=e==null?void 0:e.find(g=>(g==null?void 0:g.id)==r))==null?void 0:b.stories)??[];uv(r,()=>o(null)),lv({targets:[document],scroll:r?"OFF":"ON"});const v=()=>{o(null),f.current=c},m=()=>{if(!r)return null;const g=p.map(S=>({type:"component",component:({pause:T,resume:E,story:V,isPaused:I})=>(i(d==null?void 0:d.id,S.id),y.jsx(dr,{story:S})),duration:S!=null&&S.duration?(S==null?void 0:S.duration)*1e3:7e3,header:()=>y.jsx(vr,{color:d==null?void 0:d.color,image:d==null?void 0:d.avatar,story:S},S==null?void 0:S.id)})),x=y.jsx(fr,{onClose:v,onOverlayClick:v,onStoryChange:S=>{},onAllStoriesEnd:async()=>{var E;const S=f.current.findIndex(V=>V.id==r),T=f.current.filter(V=>V.id!==r);f.current=T,(E=f.current[S])!=null&&E.id?o(f.current[S].id):(o(null),f.current=c)},currentIndex:d?u(d):0,stories:g},r);return n?Ta.createPortal(x,document.body):x};return y.jsxs(y.Fragment,{children:[y.jsx(ps,{wrapperClassName:Bt($e.ScrollMenu,t),scrollContainerClassName:$e.scrollContainerClassName,itemClassName:$e.itemClassName,children:c.map((g,x)=>y.jsx(qe,{hasSeenAllStories:s(g),onProfileClick:()=>a(g==null?void 0:g.id),color:g==null?void 0:g.color,image:g==null?void 0:g.avatar,title:g==null?void 0:g.name},g==null?void 0:g.id))}),r!=null&&m()]})};async function cv(){try{const t=await fetch("https://dev-api-stories.kurax.dev/at-stories/v1/cards/public/HOME",{method:"GET",headers:{"sec-ch-ua-platform":'"Android"',Referer:"https://atstories-backoffice.dev.fromsolvers.com/","User-Agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Mobile Safari/537.36",Accept:"application/json, text/plain, */*","sec-ch-ua":'"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',"Content-Type":"application/json","sec-ch-ua-mobile":"?1"}});if(!t.ok){const n=await t.json();console.error("Error en la respuesta:",t.status),console.error(n);return}return await t.json()}catch(t){console.error("Error al hacer la petición:",t==null?void 0:t.message)}}function fv(){var o,a;const[t,e]=h.useState([]);h.useEffect(()=>{cv().then(i=>{(i==null?void 0:i.length)>0&&e(i)})},[]);const n=(t==null?void 0:t[0])??{},r=(a=(o=t==null?void 0:t[0])==null?void 0:o.stories)==null?void 0:a[0];return y.jsxs("div",{className:"App",children:[y.jsx("h2",{children:"Perfil + Stories"}),y.jsx("hr",{}),y.jsx(Pa,{data:t}),y.jsx("br",{}),y.jsx("h2",{children:"Perfil"}),y.jsx("hr",{}),y.jsx("br",{}),y.jsx(qe,{color:"#119b62",image:Ea,onProfileClick:()=>null,className:"custom__class",title:"Momazos",width:"120px"}),y.jsx("br",{}),y.jsx("h2",{children:"Story"}),y.jsx("hr",{}),y.jsx("br",{}),y.jsx(fr,{inline:!0,loop:!0,stories:[{type:"component",component:({pause:i,resume:s,story:u,isPaused:l})=>y.jsx(dr,{story:{...r,type:"betting"}}),duration:r!=null&&r.duration?(r==null?void 0:r.duration)*1e3:7e3,header:()=>y.jsx(vr,{color:n==null?void 0:n.color,image:n==null?void 0:n.avatar,story:r})}]})]})}exports.ManagmentStoryComponent=dr;exports.MyStory=fv;exports.ProfileStories=Pa;exports.ProfileStory=qe;exports.StoryHeaderPlayer=vr;exports.StoryPlayer=fr;
|
|
6
6
|
//# sourceMappingURL=index.cjs.js.map
|