opencami 1.2.0 → 1.3.1

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.
Files changed (34) hide show
  1. package/README.md +3 -1
  2. package/dist/client/assets/_sessionKey-CaDTbjXx.js +97 -0
  3. package/dist/client/assets/{agents-BiadNAEz.js → agents-CGtqdyBi.js} +2 -2
  4. package/dist/client/assets/{agents-screen-C5TPJbry.js → agents-screen-DzIMcmHe.js} +1 -1
  5. package/dist/client/assets/button-BcnCTjUT.js +1 -0
  6. package/dist/client/assets/{connect-DlVsi-ya.js → connect-B8sfEQyb.js} +1 -1
  7. package/dist/client/assets/{file-explorer-screen-B0hwrjdF.js → file-explorer-screen-hjggspl-.js} +1 -1
  8. package/dist/client/assets/{files-dkr2U72N.js → files-BHXmS1J5.js} +2 -2
  9. package/dist/client/assets/{index-D1Et4XlM.js → index-BfhiL2JN.js} +1 -1
  10. package/dist/client/assets/{index-CwoJpeG1.js → index-CxJ4zG_W.js} +1 -1
  11. package/dist/client/assets/{keyboard-shortcuts-dialog-zdnAmDiH.js → keyboard-shortcuts-dialog-DEknElTu.js} +1 -1
  12. package/dist/client/assets/{main-DOBfHXDF.js → main-BlX7CS2-.js} +3 -3
  13. package/dist/client/assets/{opencami-logo-Bxp_4d3X.js → opencami-logo-5KynvViW.js} +1 -1
  14. package/dist/client/assets/{react-DD8SkMJn.js → react-ONC2UaeC.js} +1 -1
  15. package/dist/client/assets/{search-dialog-Ck1AQreu.js → search-dialog-40gW31ca.js} +1 -1
  16. package/dist/client/assets/{session-export-dialog-Bh3zH4nZ.js → session-export-dialog-DSRWU2YO.js} +1 -1
  17. package/dist/client/assets/settings-dialog-AsvYzSBc.js +1 -0
  18. package/dist/client/assets/styles-BGTCU8mq.css +1 -0
  19. package/dist/client/assets/{switch-BoGcWcnr.js → switch-dAvZcYA-.js} +1 -1
  20. package/dist/client/assets/{use-file-explorer-state-B5JLNsSa.js → use-file-explorer-state-C6lX-h0n.js} +1 -1
  21. package/dist/client/assets/{useButton-csSB2uQJ.js → useButton-DhneLsMA.js} +1 -1
  22. package/dist/server/assets/{_sessionKey-DQwkBUS7.js → _sessionKey-ZF1_Jqbt.js} +206 -29
  23. package/dist/server/assets/{_tanstack-start-manifest_v-cW8K1Mnv.js → _tanstack-start-manifest_v-C2FijMus.js} +1 -1
  24. package/dist/server/assets/{index-BwD7ufHE.js → index-CTTNe_Sf.js} +1 -1
  25. package/dist/server/assets/{router-5qObg5aX.js → router-D5D0udHV.js} +33 -25
  26. package/dist/server/assets/{search-dialog-BE2ZBkj0.js → search-dialog-C8Oy-FBs.js} +2 -2
  27. package/dist/server/assets/settings-dialog-CQFuAt9B.js +820 -0
  28. package/dist/server/server.js +2 -2
  29. package/package.json +1 -1
  30. package/dist/client/assets/_sessionKey-xUqdePGW.js +0 -97
  31. package/dist/client/assets/button-seqh98ae.js +0 -1
  32. package/dist/client/assets/settings-dialog-CvUsgnnZ.js +0 -1
  33. package/dist/client/assets/styles-DogPvrGY.css +0 -1
  34. package/dist/server/assets/settings-dialog-BBQcU55J.js +0 -731
@@ -1,4 +1,4 @@
1
- import{S as su,p as wr,k as Lt,s as Ns,l as Ke,f as js,m as Us,o as Sr,t as iu,q as bn,v as ru,w as ou,x as Er,n as ha,r as p,i as pa,u as au,j as X,y as ma,a as pe,z as cu,A as lu}from"./main-DOBfHXDF.js";import{f as De,u as se,a3 as we,a as es,a5 as uu,a6 as fu,c as ga,a7 as du,ab as Rr}from"./button-seqh98ae.js";var hu=class extends su{constructor(t,e){super(),this.options=e,this.#n=t,this.#i=null,this.#s=wr(),this.bindMethods(),this.setOptions(e)}#n;#t=void 0;#p=void 0;#e=void 0;#o;#u;#s;#i;#m;#f;#d;#a;#c;#r;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Cr(this.#t,this.options)?this.#l():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ws(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ws(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#T(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#n.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!Ns(this.options,e)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&Pr(this.#t,n,this.options,e)&&this.#l(),this.updateResult(),s&&(this.#t!==n||Lt(this.options.enabled,this.#t)!==Lt(e.enabled,this.#t)||Ke(this.options.staleTime,this.#t)!==Ke(e.staleTime,this.#t))&&this.#g();const i=this.#y();s&&(this.#t!==n||Lt(this.options.enabled,this.#t)!==Lt(e.enabled,this.#t)||i!==this.#r)&&this.#v(i)}getOptimisticResult(t){const e=this.#n.getQueryCache().build(this.#n,t),n=this.createResult(e,t);return mu(this,n)&&(this.#e=n,this.#u=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),e?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#n.defaultQueryOptions(t),n=this.#n.getQueryCache().build(this.#n,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(js)),e}#g(){this.#x();const t=Ke(this.options.staleTime,this.#t);if(Us||this.#e.isStale||!Sr(t))return;const n=iu(this.#e.dataUpdatedAt,t)+1;this.#a=bn.setTimeout(()=>{this.#e.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#T(),this.#r=t,!(Us||Lt(this.options.enabled,this.#t)===!1||!Sr(this.#r)||this.#r===0)&&(this.#c=bn.setInterval(()=>{(this.options.refetchIntervalInBackground||ru.isFocused())&&this.#l()},this.#r))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#a&&(bn.clearTimeout(this.#a),this.#a=void 0)}#T(){this.#c&&(bn.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const n=this.#t,s=this.options,i=this.#e,o=this.#o,r=this.#u,c=t!==n?t.state:this.#p,{state:l}=t;let u={...l},f=!1,d;if(e._optimisticResults){const S=this.hasListeners(),D=!S&&Cr(t,e),O=S&&Pr(t,n,e,s);(D||O)&&(u={...u,...ou(l.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:g}=u;d=u.data;let v=!1;if(e.placeholderData!==void 0&&d===void 0&&g==="pending"){let S;i?.isPlaceholderData&&e.placeholderData===r?.placeholderData?(S=i.data,v=!0):S=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,S!==void 0&&(g="success",d=Er(i?.data,S,e),f=!0)}if(e.select&&d!==void 0&&!v)if(i&&d===o?.data&&e.select===this.#m)d=this.#f;else try{this.#m=e.select,d=e.select(d),d=Er(i?.data,d,e),this.#f=d,this.#i=null}catch(S){this.#i=S}this.#i&&(h=this.#i,d=this.#f,m=Date.now(),g="error");const y=u.fetchStatus==="fetching",b=g==="pending",x=g==="error",T=b&&y,w=d!==void 0,R={status:g,fetchStatus:u.fetchStatus,isPending:b,isSuccess:g==="success",isError:x,isInitialLoading:T,isLoading:T,data:d,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:x&&!w,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&w,isStale:wi(t,e),refetch:this.refetch,promise:this.#s,isEnabled:Lt(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const S=R.data!==void 0,D=R.status==="error"&&!S,O=C=>{D?C.reject(R.error):S&&C.resolve(R.data)},k=()=>{const C=this.#s=R.promise=wr();O(C)},M=this.#s;switch(M.status){case"pending":t.queryHash===n.queryHash&&O(M);break;case"fulfilled":(D||R.data!==M.value)&&k();break;case"rejected":(!D||R.error!==M.reason)&&k();break}}return R}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#u=this.options,this.#o.data!==void 0&&(this.#d=this.#t),Ns(e,t))return;this.#e=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#h.size)return!0;const o=new Set(i??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#e).some(r=>{const a=r;return this.#e[a]!==t[a]&&o.has(a)})};this.#S({listeners:n()})}#w(){const t=this.#n.getQueryCache().build(this.#n,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(t){ha.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#n.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function pu(t,e){return Lt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Cr(t,e){return pu(t,e)||t.state.data!==void 0&&Ws(t,e,e.refetchOnMount)}function Ws(t,e,n){if(Lt(e.enabled,t)!==!1&&Ke(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&wi(t,e)}return!1}function Pr(t,e,n,s){return(t!==e||Lt(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&wi(t,n)}function wi(t,e){return Lt(e.enabled,t)!==!1&&t.isStaleByTime(Ke(e.staleTime,t))}function mu(t,e){return!Ns(t.getCurrentResult(),e)}var ya=p.createContext(!1),gu=()=>p.useContext(ya);ya.Provider;function yu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var vu=p.createContext(yu()),bu=()=>p.useContext(vu),xu=(t,e,n)=>{const s=n?.state.error&&typeof t.throwOnError=="function"?pa(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},Tu=t=>{p.useEffect(()=>{t.clearReset()},[t])},wu=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(i&&t.data===void 0||pa(n,[t.error,s])),Su=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Eu=(t,e)=>t.isLoading&&t.isFetching&&!e,Ru=(t,e)=>t?.suspense&&e.isPending,Ar=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Cu(t,e,n){const s=gu(),i=bu(),o=au(),r=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(r);const a=o.getQueryCache().get(r.queryHash);r._optimisticResults=s?"isRestoring":"optimistic",Su(r),xu(r,i,a),Tu(i);const c=!o.getQueryCache().get(r.queryHash),[l]=p.useState(()=>new e(o,r)),u=l.getOptimisticResult(r),f=!s&&t.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(d=>{const h=f?l.subscribe(ha.batchCalls(d)):js;return l.updateResult(),h},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(r)},[r,l]),Ru(r,u))throw Ar(r,l,i);if(wu({result:u,errorResetBoundary:i,throwOnError:r.throwOnError,query:a,suspense:r.suspense}))throw u.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(r,u),r.experimental_prefetchInRender&&!Us&&Eu(u,s)&&(c?Ar(r,l,i):a?.promise)?.catch(js).finally(()=>{l.updateResult()}),r.notifyOnChangeProps?u:l.trackResult(u)}function Kv(t,e){return Cu(t,hu)}const zv=500,Yv=500,Pu={style:{transition:"none"}},Xv="data-base-ui-click-trigger",Gv={fallbackAxisSide:"none"},Au={fallbackAxisSide:"end"},Mu={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Bn={isSidebarCollapsed:!1},va=["chat","ui"];function qv(t){const e=t.getQueryData(va);return e&&typeof e=="object"?{...Bn,...e}:Bn}function Qv(t,e){t.setQueryData(va,function(s){const i=s&&typeof s=="object"?{...Bn,...s}:Bn;return e(i)})}const Si=p.createContext({});function Ei(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const ba=typeof window<"u",xa=ba?p.useLayoutEffect:p.useEffect,ns=p.createContext(null);function Ri(t,e){t.indexOf(e)===-1&&t.push(e)}function Ci(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;let Pi=()=>{};const Yt={},Ta=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function wa(t){return typeof t=="object"&&t!==null}const Sa=t=>/^0[^.\s]+$/u.test(t);function Ai(t){let e;return()=>(e===void 0&&(e=t()),e)}const Mt=t=>t,Du=(t,e)=>n=>e(t(n)),on=(...t)=>t.reduce(Du),Ze=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Mi{constructor(){this.subscriptions=[]}add(e){return Ri(this.subscriptions,e),()=>Ci(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kt=t=>t*1e3,Pt=t=>t/1e3;function Ea(t,e){return e?t*(1e3/e):0}const Ra=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ou=1e-7,Iu=12;function Vu(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ra(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ou&&++a<Iu);return r}function an(t,e,n,s){if(t===e&&n===s)return Mt;const i=o=>Vu(o,0,1,t,n);return o=>o===0||o===1?o:Ra(i(o),e,s)}const Ca=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pa=t=>e=>1-t(1-e),Aa=an(.33,1.53,.69,.99),Di=Pa(Aa),Ma=Ca(Di),Da=t=>(t*=2)<1?.5*Di(t):.5*(2-Math.pow(2,-10*(t-1))),Oi=t=>1-Math.sin(Math.acos(t)),Oa=Pa(Oi),Ia=Ca(Oi),Lu=an(.42,0,1,1),ku=an(0,0,.58,1),Va=an(.42,0,.58,1),Fu=t=>Array.isArray(t)&&typeof t[0]!="number",La=t=>Array.isArray(t)&&typeof t[0]=="number",Bu={linear:Mt,easeIn:Lu,easeInOut:Va,easeOut:ku,circIn:Oi,circInOut:Ia,circOut:Oa,backIn:Di,backInOut:Ma,backOut:Aa,anticipate:Da},Nu=t=>typeof t=="string",Mr=t=>{if(La(t)){Pi(t.length===4);const[e,n,s,i]=t;return an(e,n,s,i)}else if(Nu(t))return Bu[t];return t},xn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ju(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){r.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const m=d&&i?n:s;return f&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(u))}};return l}const Uu=40;function ka(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=xn.reduce((x,T)=>(x[T]=ju(o),x),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const x=Yt.useManualTiming?i.timestamp:performance.now();n=!1,Yt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Uu),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:xn.reduce((x,T)=>{const w=r[T];return x[T]=(E,R=!1,S=!1)=>(n||v(),w.schedule(E,R,S)),x},{}),cancel:x=>{for(let T=0;T<xn.length;T++)r[xn[T]].cancel(x)},state:i,steps:r}}const{schedule:Q,cancel:ee,state:ft,steps:ms}=ka(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mt,!0);let Mn;function Wu(){Mn=void 0}const bt={now:()=>(Mn===void 0&&bt.set(ft.isProcessing||Yt.useManualTiming?ft.timestamp:performance.now()),Mn),set:t=>{Mn=t,queueMicrotask(Wu)}},Fa=t=>e=>typeof e=="string"&&e.startsWith(t),Ba=Fa("--"),$u=Fa("var(--"),Ii=t=>$u(t)?Hu.test(t.split("/*")[0].trim()):!1,Hu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Oe={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Je={...Oe,transform:t=>Wt(0,1,t)},Tn={...Oe,default:1},ze=t=>Math.round(t*1e5)/1e5,Vi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _u(t){return t==null}const Ku=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Li=(t,e)=>n=>!!(typeof n=="string"&&Ku.test(n)&&n.startsWith(t)||e&&!_u(n)&&Object.prototype.hasOwnProperty.call(n,e)),Na=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Vi);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},zu=t=>Wt(0,255,t),gs={...Oe,transform:t=>Math.round(zu(t))},ue={test:Li("rgb","red"),parse:Na("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+gs.transform(t)+", "+gs.transform(e)+", "+gs.transform(n)+", "+ze(Je.transform(s))+")"};function Yu(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const $s={test:Li("#"),parse:Yu,transform:ue.transform},cn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Zt=cn("deg"),jt=cn("%"),V=cn("px"),Xu=cn("vh"),Gu=cn("vw"),Or={...jt,parse:t=>jt.parse(t)/100,transform:t=>jt.transform(t*100)},ve={test:Li("hsl","hue"),parse:Na("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+jt.transform(ze(e))+", "+jt.transform(ze(n))+", "+ze(Je.transform(s))+")"},rt={test:t=>ue.test(t)||$s.test(t)||ve.test(t),parse:t=>ue.test(t)?ue.parse(t):ve.test(t)?ve.parse(t):$s.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ue.transform(t):ve.transform(t),getAnimatableNone:t=>{const e=rt.parse(t);return e.alpha=0,rt.transform(e)}},qu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qu(t){return isNaN(t)&&typeof t=="string"&&(t.match(Vi)?.length||0)+(t.match(qu)?.length||0)>0}const ja="number",Ua="color",Zu="var",Ju="var(",Ir="${}",tf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tn(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(tf,c=>(rt.test(c)?(s.color.push(o),i.push(Ua),n.push(rt.parse(c))):c.startsWith(Ju)?(s.var.push(o),i.push(Zu),n.push(c)):(s.number.push(o),i.push(ja),n.push(parseFloat(c))),++o,Ir)).split(Ir);return{values:n,split:a,indexes:s,types:i}}function Wa(t){return tn(t).values}function $a(t){const{split:e,types:n}=tn(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===ja?o+=ze(i[r]):a===Ua?o+=rt.transform(i[r]):o+=i[r]}return o}}const ef=t=>typeof t=="number"?0:rt.test(t)?rt.getAnimatableNone(t):t;function nf(t){const e=Wa(t);return $a(t)(e.map(ef))}const ne={test:Qu,parse:Wa,createTransformer:$a,getAnimatableNone:nf};function ys(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 sf({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=ys(c,a,t+1/3),o=ys(c,a,t),r=ys(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Nn(t,e){return n=>n>0?e:t}const J=(t,e,n)=>t+(e-t)*n,vs=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rf=[$s,ue,ve],of=t=>rf.find(e=>e.test(t));function Vr(t){const e=of(t);if(!e)return!1;let n=e.parse(t);return e===ve&&(n=sf(n)),n}const Lr=(t,e)=>{const n=Vr(t),s=Vr(e);if(!n||!s)return Nn(t,e);const i={...n};return o=>(i.red=vs(n.red,s.red,o),i.green=vs(n.green,s.green,o),i.blue=vs(n.blue,s.blue,o),i.alpha=J(n.alpha,s.alpha,o),ue.transform(i))},Hs=new Set(["none","hidden"]);function af(t,e){return Hs.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function cf(t,e){return n=>J(t,e,n)}function ki(t){return typeof t=="number"?cf:typeof t=="string"?Ii(t)?Nn:rt.test(t)?Lr:ff:Array.isArray(t)?Ha:typeof t=="object"?rt.test(t)?Lr:lf:Nn}function Ha(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>ki(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function lf(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ki(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function uf(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ff=(t,e)=>{const n=ne.createTransformer(e),s=tn(t),i=tn(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Hs.has(t)&&!i.values.length||Hs.has(e)&&!s.values.length?af(t,e):on(Ha(uf(s,i),i.values),n):Nn(t,e)};function _a(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?J(t,e,n):ki(t)(t,e)}const df=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Q.update(e,n),stop:()=>ee(e),now:()=>ft.isProcessing?ft.timestamp:bt.now()}},Ka=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},jn=2e4;function Fi(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<jn;)e+=n,s=t.next(e);return e>=jn?1/0:e}function hf(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Fi(s),jn);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:Pt(i)}}const pf=5;function za(t,e,n){const s=Math.max(e-pf,0);return Ea(n-t(s),e-s)}const et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bs=.001;function mf({duration:t=et.duration,bounce:e=et.bounce,velocity:n=et.velocity,mass:s=et.mass}){let i,o,r=1-e;r=Wt(et.minDamping,et.maxDamping,r),t=Wt(et.minDuration,et.maxDuration,Pt(t)),r<1?(i=l=>{const u=l*r,f=u*t,d=u-n,h=_s(l,r),m=Math.exp(-f);return bs-d/h*m},o=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,m=Math.exp(-f),g=_s(Math.pow(l,2),r);return(-i(l)+bs>0?-1:1)*((d-h)*m)/g}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-bs+u*f},o=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=yf(i,o,a);if(t=Kt(t),isNaN(c))return{stiffness:et.stiffness,damping:et.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const gf=12;function yf(t,e,n){let s=n;for(let i=1;i<gf;i++)s=s-t(s)/e(s);return s}function _s(t,e){return t*Math.sqrt(1-e*e)}const vf=["duration","bounce"],bf=["stiffness","damping","mass"];function kr(t,e){return e.some(n=>t[n]!==void 0)}function xf(t){let e={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...t};if(!kr(t,bf)&&kr(t,vf))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*Wt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:et.mass,stiffness:i,damping:o}}else{const n=mf(t);e={...e,...n,mass:et.mass},e.isResolvedFromDuration=!0}return e}function Un(t=et.visualDuration,e=et.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=xf({...n,velocity:-Pt(n.velocity||0)}),m=d||0,g=l/(2*Math.sqrt(c*u)),v=r-o,y=Pt(Math.sqrt(c/u)),b=Math.abs(v)<5;s||(s=b?et.restSpeed.granular:et.restSpeed.default),i||(i=b?et.restDelta.granular:et.restDelta.default);let x;if(g<1){const w=_s(y,g);x=E=>{const R=Math.exp(-g*y*E);return r-R*((m+g*y*v)/w*Math.sin(w*E)+v*Math.cos(w*E))}}else if(g===1)x=w=>r-Math.exp(-y*w)*(v+(m+y*v)*w);else{const w=y*Math.sqrt(g*g-1);x=E=>{const R=Math.exp(-g*y*E),S=Math.min(w*E,300);return r-R*((m+g*y*v)*Math.sinh(S)+w*v*Math.cosh(S))/w}}const T={calculatedDuration:h&&f||null,next:w=>{const E=x(w);if(h)a.done=w>=f;else{let R=w===0?m:0;g<1&&(R=w===0?Kt(m):za(x,w,E));const S=Math.abs(R)<=s,D=Math.abs(r-E)<=i;a.done=S&&D}return a.value=a.done?r:E,a},toString:()=>{const w=Math.min(Fi(T),jn),E=Ka(R=>T.next(w*R).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Un.applyToOptions=t=>{const e=hf(t,100,Un);return t.ease=e.ease,t.duration=Kt(e.duration),t.type="keyframes",t};function Ks({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=S=>a!==void 0&&S<a||c!==void 0&&S>c,m=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const b=S=>-g*Math.exp(-S/s),x=S=>y+b(S),T=S=>{const D=b(S),O=x(S);d.done=Math.abs(D)<=l,d.value=d.done?y:O};let w,E;const R=S=>{h(d.value)&&(w=S,E=Un({keyframes:[d.value,m(d.value)],velocity:za(x,S,d.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return R(0),{calculatedDuration:null,next:S=>{let D=!1;return!E&&w===void 0&&(D=!0,T(S),R(S)),w!==void 0&&S>=w?E.next(S-w):(!D&&T(S),d)}}}function Tf(t,e,n){const s=[],i=n||Yt.mix||_a,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||Mt:e;a=on(c,a)}s.push(a)}return s}function wf(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Pi(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Tf(e,s,i),c=a.length,l=u=>{if(r&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=Ze(t[f],t[f+1],u);return a[f](d)};return n?u=>l(Wt(t[0],t[o-1],u)):l}function Sf(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ze(0,e,s);t.push(J(n,1,i))}}function Ef(t){const e=[0];return Sf(e,t.length-1),e}function Rf(t,e){return t.map(n=>n*e)}function Cf(t,e){return t.map(()=>e||Va).splice(0,t.length-1)}function Ye({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fu(s)?s.map(Mr):Mr(s),o={done:!1,value:e[0]},r=Rf(n&&n.length===e.length?n:Ef(e),t),a=wf(r,e,{ease:Array.isArray(i)?i:Cf(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Pf=t=>t!==null;function Bi(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Pf),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Af={decay:Ks,inertia:Ks,tween:Ye,keyframes:Ye,spring:Un};function Ya(t){typeof t.type=="string"&&(t.type=Af[t.type])}class Ni{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Mf=t=>t/100;class ji extends Ni{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==bt.now()&&this.tick(bt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ya(e);const{type:n=Ye,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Ye;c!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=on(Mf,_a(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Fi(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,T=s;if(f){const S=Math.min(this.currentTime,i)/a;let D=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&D--,D=Math.min(D,f+1),D%2&&(d==="reverse"?(O=1-O,h&&(O-=h/a)):d==="mirror"&&(T=r)),x=Wt(0,1,O)*a}const w=b?{done:!1,value:u[0]}:T.next(x);o&&(w.value=o(w.value));let{done:E}=w;!b&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&m!==Ks&&(w.value=Bi(u,this.options,v,this.speed)),g&&g(w.value),R&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pt(e)}get time(){return Pt(this.currentTime)}set time(e){e=Kt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(bt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=df,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(bt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Df(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const fe=t=>t*180/Math.PI,zs=t=>{const e=fe(Math.atan2(t[1],t[0]));return Ys(e)},Of={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:zs,rotateZ:zs,skewX:t=>fe(Math.atan(t[1])),skewY:t=>fe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ys=t=>(t=t%360,t<0&&(t+=360),t),Fr=zs,Br=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Nr=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),If={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Br,scaleY:Nr,scale:t=>(Br(t)+Nr(t))/2,rotateX:t=>Ys(fe(Math.atan2(t[6],t[5]))),rotateY:t=>Ys(fe(Math.atan2(-t[2],t[0]))),rotateZ:Fr,rotate:Fr,skewX:t=>fe(Math.atan(t[4])),skewY:t=>fe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Xs(t){return t.includes("scale")?1:0}function Gs(t,e){if(!t||t==="none")return Xs(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=If,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Of,i=a}if(!i)return Xs(e);const o=s[e],r=i[1].split(",").map(Lf);return typeof o=="function"?o(r):r[o]}const Vf=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Gs(n,e)};function Lf(t){return parseFloat(t.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Ie),jr=t=>t===Oe||t===V,kf=new Set(["x","y","z"]),Ff=Ie.filter(t=>!kf.has(t));function Bf(t){const e=[];return Ff.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Jt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Gs(e,"x"),y:(t,{transform:e})=>Gs(e,"y")};Jt.translateX=Jt.x;Jt.translateY=Jt.y;const de=new Set;let qs=!1,Qs=!1,Zs=!1;function Xa(){if(Qs){const t=Array.from(de).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Bf(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Qs=!1,qs=!1,de.forEach(t=>t.complete(Zs)),de.clear()}function Ga(){de.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qs=!0)})}function Nf(){Zs=!0,Ga(),Xa(),Zs=!1}class Ui{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(de.add(this),qs||(qs=!0,Q.read(Ga),Q.resolveKeyframes(Xa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Df(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),de.delete(this)}cancel(){this.state==="scheduled"&&(de.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const jf=t=>t.startsWith("--");function Uf(t,e,n){jf(e)?t.style.setProperty(e,n):t.style[e]=n}const Wf=Ai(()=>window.ScrollTimeline!==void 0),$f={};function Hf(t,e){const n=Ai(t);return()=>$f[e]??n()}const qa=Hf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),He=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ur={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:He([0,.65,.55,1]),circOut:He([.55,0,1,.45]),backIn:He([.31,.01,.66,-.59]),backOut:He([.33,1.53,.69,.99])};function Qa(t,e){if(t)return typeof t=="function"?qa()?Ka(t,e):"ease-out":La(t)?He(t):Array.isArray(t)?t.map(n=>Qa(n,e)||Ur.easeOut):Ur[t]}function _f(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Qa(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function Za(t){return typeof t=="function"&&"applyToOptions"in t}function Kf({type:t,...e}){return Za(t)&&qa()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class zf extends Ni{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Pi(typeof e.type!="string");const l=Kf(e);this.animation=_f(n,s,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Bi(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Uf(n,s,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Pt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pt(e)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Wf()?(this.animation.timeline=e,Mt):n(this)}}const Ja={anticipate:Da,backInOut:Ma,circInOut:Ia};function Yf(t){return t in Ja}function Xf(t){typeof t.ease=="string"&&Yf(t.ease)&&(t.ease=Ja[t.ease])}const xs=10;class Gf extends zf{constructor(e){Xf(e),Ya(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ji({...r,autoplay:!1}),c=Math.max(xs,bt.now()-this.startTime),l=Wt(0,xs,c-xs);n.setWithVelocity(a.sample(Math.max(0,c-l)).value,a.sample(c).value,l),a.stop()}}const Wr=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ne.test(t)||t==="0")&&!t.startsWith("url("));function qf(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qf(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Wr(i,e),a=Wr(o,e);return!r||!a?!1:qf(t)||(n==="spring"||Za(n))&&s}function Js(t){t.duration=0,t.type="keyframes"}const Zf=new Set(["opacity","clipPath","filter","transform"]),Jf=Ai(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function td(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Jf()&&n&&Zf.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ed=40;class nd extends Ni{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=bt.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:l,element:u,...f},h=u?.KeyframeResolver||Ui;this.keyframeResolver=new h(a,(m,g,v)=>this.onKeyframesResolved(m,g,d,!v),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=bt.now(),Qf(e,o,r,a)||((Yt.instantAnimations||!c)&&u?.(Bi(e,s,n)),e[0]=e[e.length-1],Js(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ed?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!l&&td(d),m=d.motionValue?.owner?.current,g=h?new Gf({...d,element:m}):new ji(d);g.finished.then(()=>{this.notifyFinished()}).catch(Mt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function tc(t,e,n,s=0,i=1){const o=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const sd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function id(t){const e=sd.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function ec(t,e,n=1){const[s,i]=id(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ta(r)?parseFloat(r):r}return Ii(i)?ec(i,e,n+1):i}const rd={type:"spring",stiffness:500,damping:25,restSpeed:10},od=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ad={type:"keyframes",duration:.8},cd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ld=(t,{keyframes:e})=>e.length>2?ad:Ve.has(t)?t.startsWith("scale")?od(e[1]):rd:cd,ud=t=>t!==null;function fd(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ud),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}function Wi(t,e){return t?.[e]??t?.default??t}function dd({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const $i=(t,e,n,s={},i,o)=>r=>{const a=Wi(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-Kt(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};dd(a)||Object.assign(u,ld(t,u)),u.duration&&(u.duration=Kt(u.duration)),u.repeatDelay&&(u.repeatDelay=Kt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Js(u),u.delay===0&&(f=!0)),(Yt.instantAnimations||Yt.skipAnimations)&&(f=!0,Js(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=fd(u.keyframes,a);if(d!==void 0){Q.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ji(u):new nd(u)};function $r(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Hi(t,e,n,s){if(typeof e=="function"){const[i,o]=$r(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=$r(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Se(t,e,n){const s=t.getProps();return Hi(s,e,n!==void 0?n:s.custom,t)}const nc=new Set(["width","height","top","left","right","bottom",...Ie]),Hr=30,hd=t=>!isNaN(parseFloat(t));class pd{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=bt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=bt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=hd(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mi);const s=this.events[e].add(n);return e==="change"?()=>{s(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=bt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Hr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hr);return Ea(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ce(t,e){return new pd(t,e)}const ti=t=>Array.isArray(t);function md(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ce(n))}function gd(t){return ti(t)?t[t.length-1]||0:t}function yd(t,e){const n=Se(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=gd(o[r]);md(t,r,a)}}const pt=t=>!!(t&&t.getVelocity);function vd(t){return!!(pt(t)&&t.add)}function ei(t,e){const n=t.getValue("willChange");if(vd(n))return n.add(e);if(!n&&Yt.WillChange){const s=new Yt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function _i(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const bd="framerAppearId",sc="data-"+_i(bd);function ic(t){return t.props[sc]}function xd({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function rc(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;const c=o?.reduceMotion;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),h=a[f];if(h===void 0||u&&xd(u,f))continue;const m={delay:n,...Wi(o||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const x=ic(t);if(x){const T=window.MotionHandoffAnimation(x,f,Q);T!==null&&(m.startTime=T,v=!0)}}ei(t,f);const y=c??t.shouldReduceMotion;d.start($i(f,d,h,y&&nc.has(f)?{type:!1}:m,t,v));const b=d.animation;b&&l.push(b)}return r&&Promise.all(l).then(()=>{Q.update(()=>{r&&yd(t,r)})}),l}function ni(t,e,n={}){const s=Se(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(rc(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=i;return Td(t,e,c,l,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>l())}else return Promise.all([o(),r(n.delay)])}function Td(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(ni(c,e,{...r,delay:n+(typeof s=="function"?0:s)+tc(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function wd(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ni(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ni(t,e,n);else{const i=typeof e=="function"?Se(t,e,n.custom):e;s=Promise.all(rc(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Sd={test:t=>t==="auto",parse:t=>t},oc=t=>e=>e.test(t),ac=[Oe,V,jt,Zt,Gu,Xu,Sd],_r=t=>ac.find(oc(t));function Ed(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Sa(t):!0}const Rd=new Set(["brightness","contrast","saturate","opacity"]);function Cd(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Vi)||[];if(!s)return t;const i=n.replace(s,"");let o=Rd.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Pd=/\b([a-z-]*)\(.*?\)/gu,si={...ne,getAnimatableNone:t=>{const e=t.match(Pd);return e?e.map(Cd).join(" "):t}},Kr={...Oe,transform:Math.round},Ad={rotate:Zt,rotateX:Zt,rotateY:Zt,rotateZ:Zt,scale:Tn,scaleX:Tn,scaleY:Tn,scaleZ:Tn,skew:Zt,skewX:Zt,skewY:Zt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Je,originX:Or,originY:Or,originZ:V},Ki={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Ad,zIndex:Kr,fillOpacity:Je,strokeOpacity:Je,numOctaves:Kr},Md={...Ki,color:rt,backgroundColor:rt,outlineColor:rt,fill:rt,stroke:rt,borderColor:rt,borderTopColor:rt,borderRightColor:rt,borderBottomColor:rt,borderLeftColor:rt,filter:si,WebkitFilter:si},cc=t=>Md[t];function lc(t,e){let n=cc(t);return n!==si&&(n=ne),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Dd=new Set(["auto","none","0"]);function Od(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Dd.has(o)&&tn(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=lc(n,i)}class Id extends Ui{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),Ii(f))){const d=ec(f,n.current);d!==void 0&&(e[u]=d),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!nc.has(s)||e.length!==2)return;const[i,o]=e,r=_r(i),a=_r(o),c=Dr(i),l=Dr(o);if(c!==l&&Jt[s]){this.needsMeasurement=!0;return}if(r!==a)if(jr(r)&&jr(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else Jt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ed(e[i]))&&s.push(i);s.length&&Od(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Jt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function Vd(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const uc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ii(t){return wa(t)&&"offsetHeight"in t}const{schedule:zi}=ka(queueMicrotask,!1),Vt={x:!1,y:!1};function fc(){return Vt.x||Vt.y}function Ld(t){return t==="x"||t==="y"?Vt[t]?null:(Vt[t]=!0,()=>{Vt[t]=!1}):Vt.x||Vt.y?null:(Vt.x=Vt.y=!0,()=>{Vt.x=Vt.y=!1})}function dc(t,e){const n=Vd(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function zr(t){return!(t.pointerType==="touch"||fc())}function kd(t,e,n={}){const[s,i,o]=dc(t,n),r=a=>{if(!zr(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{zr(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const hc=(t,e)=>e?t===e?!0:hc(t,e.parentElement):!1,Yi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Fd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pc(t){return Fd.has(t.tagName)||t.isContentEditable===!0}const Dn=new WeakSet;function Yr(t){return e=>{e.key==="Enter"&&t(e)}}function Ts(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Bd=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Yr(()=>{if(Dn.has(n))return;Ts(n,"down");const i=Yr(()=>{Ts(n,"up")}),o=()=>Ts(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Xr(t){return Yi(t)&&!fc()}function Nd(t,e,n={}){const[s,i,o]=dc(t,n),r=a=>{const c=a.currentTarget;if(!Xr(a))return;Dn.add(c);const l=e(c,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Dn.has(c)&&Dn.delete(c),Xr(h)&&typeof l=="function"&&l(h,{success:m})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||hc(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ii(a)&&(a.addEventListener("focus",l=>Bd(l,i)),!pc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function mc(t){return wa(t)&&"ownerSVGElement"in t}function jd(t){return mc(t)&&t.tagName==="svg"}const Ud=[...ac,rt,ne],Wd=t=>Ud.find(oc(t)),Gr=()=>({translate:0,scale:1,origin:0,originPoint:0}),be=()=>({x:Gr(),y:Gr()}),qr=()=>({min:0,max:0}),lt=()=>({x:qr(),y:qr()}),ri={current:null},gc={current:!1},$d=typeof window<"u";function Hd(){if(gc.current=!0,!!$d)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ri.current=t.matches;t.addEventListener("change",e),e()}else ri.current=!1}const _d=new WeakMap;function ss(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function en(t){return typeof t=="string"||Array.isArray(t)}const Xi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gi=["initial",...Xi];function is(t){return ss(t.animate)||Gi.some(e=>en(t[e]))}function yc(t){return!!(is(t)||t.variants)}function Kd(t,e,n){for(const s in e){const i=e[s],o=n[s];if(pt(i))t.addValue(s,i);else if(pt(o))t.addValue(s,Ce(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Ce(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Qr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wn={};function vc(t){Wn=t}function zd(){return Wn}class Yd{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ui,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=bt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,Q.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=is(n),this.isVariantNode=yc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&pt(h)&&h.set(c[d])}}mount(e){this.current=e,_d.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gc.current||Hd(),this.shouldReduceMotion=ri.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ee(this.notifyUpdate),ee(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Ve.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&Q.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wn){const n=Wn[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Qr.length;s++){const i=Qr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Kd(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Ce(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ta(s)||Sa(s))?s=parseFloat(s):!Wd(s)&&ne.test(n)&&(s=lc(e,n)),this.setBaseTarget(e,pt(s)?s.get():s)),pt(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Hi(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!pt(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mi),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){zi.render(this.render)}}class bc extends Yd{constructor(){super(...arguments),this.KeyframeResolver=Id}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;pt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ie{constructor(e){this.isMounted=!1,this.node=e}update(){}}function xc({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Xd({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Gd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ws(t){return t===void 0||t===1}function oi({scale:t,scaleX:e,scaleY:n}){return!ws(t)||!ws(e)||!ws(n)}function le(t){return oi(t)||Tc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tc(t){return Zr(t.x)||Zr(t.y)}function Zr(t){return t&&t!=="0%"}function $n(t,e,n){const s=t-n,i=e*s;return n+i}function Jr(t,e,n,s,i){return i!==void 0&&(t=$n(t,i,s)),$n(t,n,s)+e}function ai(t,e=0,n=1,s,i){t.min=Jr(t.min,e,n,s,i),t.max=Jr(t.max,e,n,s,i)}function wc(t,{x:e,y:n}){ai(t.x,e.translate,e.scale,e.originPoint),ai(t.y,n.translate,n.scale,n.originPoint)}const to=.999999999999,eo=1.0000000000001;function qd(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Te(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,wc(t,r)),s&&le(o.latestValues)&&Te(t,o.latestValues))}e.x<eo&&e.x>to&&(e.x=1),e.y<eo&&e.y>to&&(e.y=1)}function xe(t,e){t.min=t.min+e,t.max=t.max+e}function no(t,e,n,s,i=.5){const o=J(t.min,t.max,i);ai(t,e,n,o,s)}function Te(t,e){no(t.x,e.x,e.scaleX,e.scale,e.originX),no(t.y,e.y,e.scaleY,e.scale,e.originY)}function Sc(t,e){return xc(Gd(t.getBoundingClientRect(),e))}function Qd(t,e,n){const s=Sc(t,n),{scroll:i}=e;return i&&(xe(s.x,i.offset.x),xe(s.y,i.offset.y)),s}const Zd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jd=Ie.length;function th(t,e,n){let s="",i=!0;for(let o=0;o<Jd;o++){const r=Ie[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(r.startsWith("scale")?1:0);else{const l=parseFloat(a);c=r.startsWith("scale")?l===1:l===0}if(!c||n){const l=uc(a,Ki[r]);if(!c){i=!1;const u=Zd[r]||r;s+=`${u}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function qi(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const l=e[c];if(Ve.has(c)){r=!0;continue}else if(Ba(c)){i[c]=l;continue}else{const u=uc(l,Ki[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(e.transform||(r||n?s.transform=th(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${l} ${u}`}}function Ec(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function so(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const We={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=so(t,e.target.x),s=so(t,e.target.y);return`${n}% ${s}%`}},eh={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ne.parse(t);if(i.length>5)return s;const o=ne.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=J(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}},ci={borderRadius:{...We,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomLeftRadius:We,borderBottomRightRadius:We,boxShadow:eh};function Rc(t,{layout:e,layoutId:n}){return Ve.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ci[t]||t==="opacity")}function Qi(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(pt(s[r])||i&&pt(i[r])||Rc(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function nh(t){return window.getComputedStyle(t)}class sh extends bc{constructor(){super(...arguments),this.type="html",this.renderInstance=Ec}readValueFromInstance(e,n){if(Ve.has(n))return this.projection?.isProjecting?Xs(n):Vf(e,n);{const s=nh(e),i=(Ba(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Sc(e,n)}build(e,n,s){qi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Qi(e,n,s)}}const ih={offset:"stroke-dashoffset",array:"stroke-dasharray"},rh={offset:"strokeDashoffset",array:"strokeDasharray"};function oh(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?ih:rh;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const ah=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Cc(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,l,u){if(qi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox);for(const h of ah)f[h]!==void 0&&(d[h]=f[h],delete f[h]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&oh(f,i,o,r,!1)}const Pc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ac=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ch(t,e,n,s){Ec(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Pc.has(i)?i:_i(i),e.attrs[i])}function Mc(t,e,n){const s=Qi(t,e,n);for(const i in t)if(pt(t[i])||pt(e[i])){const o=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class lh extends bc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ve.has(n)){const s=cc(n);return s&&s.default||0}return n=Pc.has(n)?n:_i(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Mc(e,n,s)}build(e,n,s){Cc(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){ch(e,n,s,i)}mount(e){this.isSVGTag=Ac(e.tagName),super.mount(e)}}const uh=Gi.length;function Dc(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Dc(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<uh;n++){const s=Gi[n],i=t.props[s];(en(i)||i===!1)&&(e[s]=i)}return e}function Oc(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const fh=[...Xi].reverse(),dh=Xi.length;function hh(t){return e=>Promise.all(e.map(({animation:n,options:s})=>wd(t,n,s)))}function ph(t){let e=hh(t),n=io(),s=!0;const i=c=>(l,u)=>{const f=Se(t,u,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;l={...l,...m,...h}}return l};function o(c){e=c(t)}function r(c){const{props:l}=t,u=Dc(t.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<dh;v++){const y=fh[v],b=n[y],x=l[y]!==void 0?l[y]:u[y],T=en(x),w=y===c?b.isActive:null;w===!1&&(m=v);let E=x===u[y]&&x!==l[y]&&T;if(E&&s&&t.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&w===null||!x&&!b.prevProp||ss(x)||typeof x=="boolean")continue;const R=mh(b.prevProp,x);let S=R||y===c&&b.isActive&&!E&&T||v>m&&T,D=!1;const O=Array.isArray(x)?x:[x];let k=O.reduce(i(y),{});w===!1&&(k={});const{prevResolvedValues:M={}}=b,C={...M,...k},B=I=>{S=!0,d.has(I)&&(D=!0,d.delete(I)),b.needsAnimating[I]=!0;const P=t.getValue(I);P&&(P.liveStyle=!1)};for(const I in C){const P=k[I],L=M[I];if(h.hasOwnProperty(I))continue;let _=!1;ti(P)&&ti(L)?_=!Oc(P,L):_=P!==L,_?P!=null?B(I):d.add(I):P!==void 0&&d.has(I)?B(I):b.protectedKeys[I]=!0}b.prevProp=x,b.prevResolvedValues=k,b.isActive&&(h={...h,...k}),s&&t.blockInitialAnimation&&(S=!1);const F=E&&R;S&&(!F||D)&&f.push(...O.map(I=>{const P={type:y};if(typeof I=="string"&&s&&!F&&t.manuallyAnimateOnMount&&t.parent){const{parent:L}=t,_=Se(L,I);if(L.enteringChildren&&_){const{delayChildren:W}=_.transition||{};P.delay=tc(L.enteringChildren,t,W)}}return{animation:I,options:P}}))}if(d.size){const v={};if(typeof l.initial!="boolean"){const y=Se(t,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const b=t.getBaseTarget(y),x=t.getValue(y);x&&(x.liveStyle=!0),v[y]=b??null}),f.push({animation:v})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(c,l){if(n[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const u=r(c);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=io()}}}function mh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Oc(e,t):!1}function ce(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function io(){return{animate:ce(!0),whileInView:ce(),whileHover:ce(),whileTap:ce(),whileDrag:ce(),whileFocus:ce(),exit:ce()}}function ro(t,e){t.min=e.min,t.max=e.max}function Ot(t,e){ro(t.x,e.x),ro(t.y,e.y)}function oo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Ic=1e-4,gh=1-Ic,yh=1+Ic,Vc=.01,vh=0-Vc,bh=0+Vc;function xt(t){return t.max-t.min}function xh(t,e,n){return Math.abs(t-e)<=n}function ao(t,e,n,s=.5){t.origin=s,t.originPoint=J(e.min,e.max,t.origin),t.scale=xt(n)/xt(e),t.translate=J(n.min,n.max,t.origin)-t.originPoint,(t.scale>=gh&&t.scale<=yh||isNaN(t.scale))&&(t.scale=1),(t.translate>=vh&&t.translate<=bh||isNaN(t.translate))&&(t.translate=0)}function Xe(t,e,n,s){ao(t.x,e.x,n.x,s?s.originX:void 0),ao(t.y,e.y,n.y,s?s.originY:void 0)}function co(t,e,n){t.min=n.min+e.min,t.max=t.min+xt(e)}function Th(t,e,n){co(t.x,e.x,n.x),co(t.y,e.y,n.y)}function lo(t,e,n){t.min=e.min-n.min,t.max=t.min+xt(e)}function Hn(t,e,n){lo(t.x,e.x,n.x),lo(t.y,e.y,n.y)}function uo(t,e,n,s,i){return t-=e,t=$n(t,1/n,s),i!==void 0&&(t=$n(t,1/i,s)),t}function wh(t,e=0,n=1,s=.5,i,o=t,r=t){if(jt.test(e)&&(e=parseFloat(e),e=J(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=J(o.min,o.max,s);t===o&&(a-=e),t.min=uo(t.min,e,n,a,i),t.max=uo(t.max,e,n,a,i)}function fo(t,e,[n,s,i],o,r){wh(t,e[n],e[s],e[i],e.scale,o,r)}const Sh=["x","scaleX","originX"],Eh=["y","scaleY","originY"];function ho(t,e,n,s){fo(t.x,e,Sh,n?n.x:void 0,s?s.x:void 0),fo(t.y,e,Eh,n?n.y:void 0,s?s.y:void 0)}function po(t){return t.translate===0&&t.scale===1}function Lc(t){return po(t.x)&&po(t.y)}function mo(t,e){return t.min===e.min&&t.max===e.max}function Rh(t,e){return mo(t.x,e.x)&&mo(t.y,e.y)}function go(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function kc(t,e){return go(t.x,e.x)&&go(t.y,e.y)}function yo(t){return xt(t.x)/xt(t.y)}function vo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ct(t){return[t("x"),t("y")]}function Ch(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Fc=["TopLeft","TopRight","BottomLeft","BottomRight"],Ph=Fc.length,bo=t=>typeof t=="string"?parseFloat(t):t,xo=t=>typeof t=="number"||V.test(t);function Ah(t,e,n,s,i,o){i?(t.opacity=J(0,n.opacity??1,Mh(s)),t.opacityExit=J(e.opacity??1,0,Dh(s))):o&&(t.opacity=J(e.opacity??1,n.opacity??1,s));for(let r=0;r<Ph;r++){const a=`border${Fc[r]}Radius`;let c=To(e,a),l=To(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||xo(c)===xo(l)?(t[a]=Math.max(J(bo(c),bo(l),s),0),(jt.test(l)||jt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=J(e.rotate||0,n.rotate||0,s))}function To(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Mh=Bc(0,.5,Oa),Dh=Bc(.5,.95,Mt);function Bc(t,e,n){return s=>s<t?0:s>e?1:n(Ze(t,e,s))}function Oh(t,e,n){const s=pt(t)?t:Ce(t);return s.start($i("",s,e,n)),s.animation}function nn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ih=(t,e)=>t.depth-e.depth;class Vh{constructor(){this.children=[],this.isDirty=!1}add(e){Ri(this.children,e),this.isDirty=!0}remove(e){Ci(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ih),this.isDirty=!1,this.children.forEach(e)}}function Lh(t,e){const n=bt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ee(s),t(o-e))};return Q.setup(s,!0),()=>ee(s)}function On(t){return pt(t)?t.get():t}class kh{constructor(){this.members=[]}add(e){Ri(this.members,e),e.scheduleRender()}remove(e){if(Ci(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender();const i=s.options.layoutDependency,o=e.options.layoutDependency;i!==void 0&&o!==void 0&&i===o||(e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const In={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ss=["","X","Y","Z"],Fh=1e3;let Bh=0;function Es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Nc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ic(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Q,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Nc(s)}function jc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Bh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Uh),this.nodes.forEach(_h),this.nodes.forEach(Kh),this.nodes.forEach(Wh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Mi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=mc(r)&&!jd(r),this.instance=r;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;Q.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Lh(d,250),In.hasAnimatedSinceResize&&(In.hasAnimatedSinceResize=!1,this.nodes.forEach(Eo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||qh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=l.getProps(),y=!this.targetLayout||!kc(this.targetLayout,h),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Wi(m,"layout"),onPlay:g,onComplete:v};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else f||Eo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ee(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(wo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(So);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hh),this.nodes.forEach(Nh),this.nodes.forEach(jh)):this.nodes.forEach(So),this.clearAllSnapshots();const a=bt.now();ft.delta=Wt(0,1e3/60,a-ft.timestamp),ft.timestamp=a,ft.isProcessing=!0,ms.update.process(ft),ms.preRender.process(ft),ms.render.process(ft),ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($h),this.sharedNodes.forEach(Yh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lc(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&this.instance&&(a||le(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),Qh(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return lt();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Zh))){const{scroll:l}=this.root;l&&(xe(a.x,l.offset.x),xe(a.y,l.offset.y))}return a}removeElementScroll(r){const a=lt();if(Ot(a,r),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;l!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Ot(a,r),xe(a.x,u.offset.x),xe(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const c=lt();Ot(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Te(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),le(u.latestValues)&&Te(c,u.latestValues)}return le(this.latestValues)&&Te(c,this.latestValues),c}removeTransform(r){const a=lt();Ot(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!le(l.latestValues))continue;oi(l.latestValues)&&l.updateSnapshot();const u=lt(),f=l.measurePageBox();Ot(u,f),ho(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return le(this.latestValues)&&ho(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=ft.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Th(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ot(this.target,this.layout.layoutBox),wc(this.target,this.targetDelta)):Ot(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||oi(this.parent.latestValues)||Tc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Hn(this.relativeTargetOrigin,a,c),Ot(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ft.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;Ot(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;qd(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=lt());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(oo(this.prevProjectionDelta.x,this.projectionDelta.x),oo(this.prevProjectionDelta.y,this.projectionDelta.y)),Xe(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!vo(this.projectionDelta.x,this.prevProjectionDelta.x)||!vo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=be(),this.projectionDelta=be(),this.projectionDeltaWithTransform=be()}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=be();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=lt(),h=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,v=this.getStack(),y=!v||v.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Gh));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Ro(f.x,r.x,w),Ro(f.y,r.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hn(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xh(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&Rh(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=lt()),Ot(x,this.relativeTarget)),g&&(this.animationValues=u,Ah(u,l,this.latestValues,w,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ee(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{In.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ce(0)),this.currentAnimation=Oh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Uc(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||lt();const f=xt(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const d=xt(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+d}Ot(a,c),Te(a,u),Xe(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new kh),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Es("z",r,l,this.animationValues);for(let u=0;u<Ss.length;u++)Es(`rotate${Ss[u]}`,r,l,this.animationValues),Es(`skew${Ss[u]}`,r,l,this.animationValues);r.render();for(const u in l)r.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=On(a?.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=On(a?.pointerEvents)||""),this.hasProjected&&!le(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Ch(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?r.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in ci){if(u[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:y}=ci[m],b=f==="none"?u[m]:g(u[m],l);if(v){const x=v.length;for(let T=0;T<x;T++)r[v[T]]=b}else y?this.options.visualElement.renderState.vars[m]=b:r[m]=b}this.options.layoutId&&(r.pointerEvents=l===this?On(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(wo),this.root.sharedNodes.clear()}}}function Nh(t){t.updateLayout()}function jh(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Ct(u=>{const f=o?e.measuredBox[u]:e.layoutBox[u],d=xt(f);f.min=n[u].min,f.max=f.min+d}):Uc(i,e.layoutBox,n)&&Ct(u=>{const f=o?e.measuredBox[u]:e.layoutBox[u],d=xt(n[u]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const r=be();Xe(r,n,e.layoutBox);const a=be();o?Xe(a,t.applyTransform(s,!0),e.measuredBox):Xe(a,n,e.layoutBox);const c=!Lc(r);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=lt();Hn(h,e.layoutBox,f.layoutBox);const m=lt();Hn(m,n,d.layoutBox),kc(h,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=h,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Uh(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Wh(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $h(t){t.clearSnapshot()}function wo(t){t.clearMeasurements()}function So(t){t.isLayoutDirty=!1}function Hh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Eo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _h(t){t.resolveTargetDelta()}function Kh(t){t.calcProjection()}function zh(t){t.resetSkewAndRotation()}function Yh(t){t.removeLeadSnapshot()}function Ro(t,e,n){t.translate=J(e.translate,0,n),t.scale=J(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Co(t,e,n,s){t.min=J(e.min,n.min,s),t.max=J(e.max,n.max,s)}function Xh(t,e,n,s){Co(t.x,e.x,n.x,s),Co(t.y,e.y,n.y,s)}function Gh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const qh={duration:.45,ease:[.4,0,.1,1]},Po=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ao=Po("applewebkit/")&&!Po("chrome/")?Math.round:Mt;function Mo(t){t.min=Ao(t.min),t.max=Ao(t.max)}function Qh(t){Mo(t.x),Mo(t.y)}function Uc(t,e,n){return t==="position"||t==="preserve-aspect"&&!xh(yo(e),yo(n),.2)}function Zh(t){return t!==t.root&&t.scroll?.wasRoot}const Jh=jc({attachResizeListener:(t,e)=>nn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},Wc=jc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rs.current){const t=new Jh({});t.mount(window),t.setOptions({layoutScroll:!0}),Rs.current=t}return Rs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zi=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Do(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function tp(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Do(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Do(t[i],null)}}}}function ep(...t){return p.useCallback(tp(...t),t)}class np extends p.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ii(s)&&s.offsetWidth||0,o=ii(s)&&s.offsetHeight||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left,r.bottom=o-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function sp({children:t,isPresent:e,anchorX:n,anchorY:s,root:i}){const o=p.useId(),r=p.useRef(null),a=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=p.useContext(Zi),l=t.props?.ref??t?.ref,u=ep(r,l);return p.useInsertionEffect(()=>{const{width:f,height:d,top:h,left:m,right:g,bottom:v}=a.current;if(e||!r.current||!f||!d)return;const y=n==="left"?`left: ${m}`:`right: ${g}`,b=s==="bottom"?`bottom: ${v}`:`top: ${h}`;r.current.dataset.motionPopId=o;const x=document.createElement("style");c&&(x.nonce=c);const T=i??document.head;return T.appendChild(x),x.sheet&&x.sheet.insertRule(`
1
+ import{S as su,p as wr,k as Lt,s as Ns,l as Ke,f as js,m as Us,o as Sr,t as iu,q as bn,v as ru,w as ou,x as Er,n as ha,r as p,i as pa,u as au,j as X,y as ma,a as pe,z as cu,A as lu}from"./main-BlX7CS2-.js";import{f as De,u as se,a3 as we,a as es,a5 as uu,a6 as fu,c as ga,a7 as du,ab as Rr}from"./button-BcnCTjUT.js";var hu=class extends su{constructor(t,e){super(),this.options=e,this.#n=t,this.#i=null,this.#s=wr(),this.bindMethods(),this.setOptions(e)}#n;#t=void 0;#p=void 0;#e=void 0;#o;#u;#s;#i;#m;#f;#d;#a;#c;#r;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Cr(this.#t,this.options)?this.#l():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ws(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ws(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#T(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#n.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!Ns(this.options,e)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&Pr(this.#t,n,this.options,e)&&this.#l(),this.updateResult(),s&&(this.#t!==n||Lt(this.options.enabled,this.#t)!==Lt(e.enabled,this.#t)||Ke(this.options.staleTime,this.#t)!==Ke(e.staleTime,this.#t))&&this.#g();const i=this.#y();s&&(this.#t!==n||Lt(this.options.enabled,this.#t)!==Lt(e.enabled,this.#t)||i!==this.#r)&&this.#v(i)}getOptimisticResult(t){const e=this.#n.getQueryCache().build(this.#n,t),n=this.createResult(e,t);return mu(this,n)&&(this.#e=n,this.#u=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),e?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#n.defaultQueryOptions(t),n=this.#n.getQueryCache().build(this.#n,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(js)),e}#g(){this.#x();const t=Ke(this.options.staleTime,this.#t);if(Us||this.#e.isStale||!Sr(t))return;const n=iu(this.#e.dataUpdatedAt,t)+1;this.#a=bn.setTimeout(()=>{this.#e.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#T(),this.#r=t,!(Us||Lt(this.options.enabled,this.#t)===!1||!Sr(this.#r)||this.#r===0)&&(this.#c=bn.setInterval(()=>{(this.options.refetchIntervalInBackground||ru.isFocused())&&this.#l()},this.#r))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#a&&(bn.clearTimeout(this.#a),this.#a=void 0)}#T(){this.#c&&(bn.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const n=this.#t,s=this.options,i=this.#e,o=this.#o,r=this.#u,c=t!==n?t.state:this.#p,{state:l}=t;let u={...l},f=!1,d;if(e._optimisticResults){const S=this.hasListeners(),D=!S&&Cr(t,e),O=S&&Pr(t,n,e,s);(D||O)&&(u={...u,...ou(l.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:g}=u;d=u.data;let v=!1;if(e.placeholderData!==void 0&&d===void 0&&g==="pending"){let S;i?.isPlaceholderData&&e.placeholderData===r?.placeholderData?(S=i.data,v=!0):S=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,S!==void 0&&(g="success",d=Er(i?.data,S,e),f=!0)}if(e.select&&d!==void 0&&!v)if(i&&d===o?.data&&e.select===this.#m)d=this.#f;else try{this.#m=e.select,d=e.select(d),d=Er(i?.data,d,e),this.#f=d,this.#i=null}catch(S){this.#i=S}this.#i&&(h=this.#i,d=this.#f,m=Date.now(),g="error");const y=u.fetchStatus==="fetching",b=g==="pending",x=g==="error",T=b&&y,w=d!==void 0,R={status:g,fetchStatus:u.fetchStatus,isPending:b,isSuccess:g==="success",isError:x,isInitialLoading:T,isLoading:T,data:d,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:x&&!w,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&w,isStale:wi(t,e),refetch:this.refetch,promise:this.#s,isEnabled:Lt(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const S=R.data!==void 0,D=R.status==="error"&&!S,O=C=>{D?C.reject(R.error):S&&C.resolve(R.data)},k=()=>{const C=this.#s=R.promise=wr();O(C)},M=this.#s;switch(M.status){case"pending":t.queryHash===n.queryHash&&O(M);break;case"fulfilled":(D||R.data!==M.value)&&k();break;case"rejected":(!D||R.error!==M.reason)&&k();break}}return R}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#u=this.options,this.#o.data!==void 0&&(this.#d=this.#t),Ns(e,t))return;this.#e=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#h.size)return!0;const o=new Set(i??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#e).some(r=>{const a=r;return this.#e[a]!==t[a]&&o.has(a)})};this.#S({listeners:n()})}#w(){const t=this.#n.getQueryCache().build(this.#n,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(t){ha.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#n.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function pu(t,e){return Lt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Cr(t,e){return pu(t,e)||t.state.data!==void 0&&Ws(t,e,e.refetchOnMount)}function Ws(t,e,n){if(Lt(e.enabled,t)!==!1&&Ke(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&wi(t,e)}return!1}function Pr(t,e,n,s){return(t!==e||Lt(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&wi(t,n)}function wi(t,e){return Lt(e.enabled,t)!==!1&&t.isStaleByTime(Ke(e.staleTime,t))}function mu(t,e){return!Ns(t.getCurrentResult(),e)}var ya=p.createContext(!1),gu=()=>p.useContext(ya);ya.Provider;function yu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var vu=p.createContext(yu()),bu=()=>p.useContext(vu),xu=(t,e,n)=>{const s=n?.state.error&&typeof t.throwOnError=="function"?pa(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},Tu=t=>{p.useEffect(()=>{t.clearReset()},[t])},wu=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(i&&t.data===void 0||pa(n,[t.error,s])),Su=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Eu=(t,e)=>t.isLoading&&t.isFetching&&!e,Ru=(t,e)=>t?.suspense&&e.isPending,Ar=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Cu(t,e,n){const s=gu(),i=bu(),o=au(),r=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(r);const a=o.getQueryCache().get(r.queryHash);r._optimisticResults=s?"isRestoring":"optimistic",Su(r),xu(r,i,a),Tu(i);const c=!o.getQueryCache().get(r.queryHash),[l]=p.useState(()=>new e(o,r)),u=l.getOptimisticResult(r),f=!s&&t.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(d=>{const h=f?l.subscribe(ha.batchCalls(d)):js;return l.updateResult(),h},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(r)},[r,l]),Ru(r,u))throw Ar(r,l,i);if(wu({result:u,errorResetBoundary:i,throwOnError:r.throwOnError,query:a,suspense:r.suspense}))throw u.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(r,u),r.experimental_prefetchInRender&&!Us&&Eu(u,s)&&(c?Ar(r,l,i):a?.promise)?.catch(js).finally(()=>{l.updateResult()}),r.notifyOnChangeProps?u:l.trackResult(u)}function Kv(t,e){return Cu(t,hu)}const zv=500,Yv=500,Pu={style:{transition:"none"}},Xv="data-base-ui-click-trigger",Gv={fallbackAxisSide:"none"},Au={fallbackAxisSide:"end"},Mu={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Bn={isSidebarCollapsed:!1},va=["chat","ui"];function qv(t){const e=t.getQueryData(va);return e&&typeof e=="object"?{...Bn,...e}:Bn}function Qv(t,e){t.setQueryData(va,function(s){const i=s&&typeof s=="object"?{...Bn,...s}:Bn;return e(i)})}const Si=p.createContext({});function Ei(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const ba=typeof window<"u",xa=ba?p.useLayoutEffect:p.useEffect,ns=p.createContext(null);function Ri(t,e){t.indexOf(e)===-1&&t.push(e)}function Ci(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;let Pi=()=>{};const Yt={},Ta=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function wa(t){return typeof t=="object"&&t!==null}const Sa=t=>/^0[^.\s]+$/u.test(t);function Ai(t){let e;return()=>(e===void 0&&(e=t()),e)}const Mt=t=>t,Du=(t,e)=>n=>e(t(n)),on=(...t)=>t.reduce(Du),Ze=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Mi{constructor(){this.subscriptions=[]}add(e){return Ri(this.subscriptions,e),()=>Ci(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kt=t=>t*1e3,Pt=t=>t/1e3;function Ea(t,e){return e?t*(1e3/e):0}const Ra=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ou=1e-7,Iu=12;function Vu(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ra(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ou&&++a<Iu);return r}function an(t,e,n,s){if(t===e&&n===s)return Mt;const i=o=>Vu(o,0,1,t,n);return o=>o===0||o===1?o:Ra(i(o),e,s)}const Ca=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pa=t=>e=>1-t(1-e),Aa=an(.33,1.53,.69,.99),Di=Pa(Aa),Ma=Ca(Di),Da=t=>(t*=2)<1?.5*Di(t):.5*(2-Math.pow(2,-10*(t-1))),Oi=t=>1-Math.sin(Math.acos(t)),Oa=Pa(Oi),Ia=Ca(Oi),Lu=an(.42,0,1,1),ku=an(0,0,.58,1),Va=an(.42,0,.58,1),Fu=t=>Array.isArray(t)&&typeof t[0]!="number",La=t=>Array.isArray(t)&&typeof t[0]=="number",Bu={linear:Mt,easeIn:Lu,easeInOut:Va,easeOut:ku,circIn:Oi,circInOut:Ia,circOut:Oa,backIn:Di,backInOut:Ma,backOut:Aa,anticipate:Da},Nu=t=>typeof t=="string",Mr=t=>{if(La(t)){Pi(t.length===4);const[e,n,s,i]=t;return an(e,n,s,i)}else if(Nu(t))return Bu[t];return t},xn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ju(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){r.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const m=d&&i?n:s;return f&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(u))}};return l}const Uu=40;function ka(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=xn.reduce((x,T)=>(x[T]=ju(o),x),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const x=Yt.useManualTiming?i.timestamp:performance.now();n=!1,Yt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Uu),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:xn.reduce((x,T)=>{const w=r[T];return x[T]=(E,R=!1,S=!1)=>(n||v(),w.schedule(E,R,S)),x},{}),cancel:x=>{for(let T=0;T<xn.length;T++)r[xn[T]].cancel(x)},state:i,steps:r}}const{schedule:Q,cancel:ee,state:ft,steps:ms}=ka(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mt,!0);let Mn;function Wu(){Mn=void 0}const bt={now:()=>(Mn===void 0&&bt.set(ft.isProcessing||Yt.useManualTiming?ft.timestamp:performance.now()),Mn),set:t=>{Mn=t,queueMicrotask(Wu)}},Fa=t=>e=>typeof e=="string"&&e.startsWith(t),Ba=Fa("--"),$u=Fa("var(--"),Ii=t=>$u(t)?Hu.test(t.split("/*")[0].trim()):!1,Hu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Oe={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Je={...Oe,transform:t=>Wt(0,1,t)},Tn={...Oe,default:1},ze=t=>Math.round(t*1e5)/1e5,Vi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _u(t){return t==null}const Ku=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Li=(t,e)=>n=>!!(typeof n=="string"&&Ku.test(n)&&n.startsWith(t)||e&&!_u(n)&&Object.prototype.hasOwnProperty.call(n,e)),Na=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Vi);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},zu=t=>Wt(0,255,t),gs={...Oe,transform:t=>Math.round(zu(t))},ue={test:Li("rgb","red"),parse:Na("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+gs.transform(t)+", "+gs.transform(e)+", "+gs.transform(n)+", "+ze(Je.transform(s))+")"};function Yu(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const $s={test:Li("#"),parse:Yu,transform:ue.transform},cn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Zt=cn("deg"),jt=cn("%"),V=cn("px"),Xu=cn("vh"),Gu=cn("vw"),Or={...jt,parse:t=>jt.parse(t)/100,transform:t=>jt.transform(t*100)},ve={test:Li("hsl","hue"),parse:Na("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+jt.transform(ze(e))+", "+jt.transform(ze(n))+", "+ze(Je.transform(s))+")"},rt={test:t=>ue.test(t)||$s.test(t)||ve.test(t),parse:t=>ue.test(t)?ue.parse(t):ve.test(t)?ve.parse(t):$s.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ue.transform(t):ve.transform(t),getAnimatableNone:t=>{const e=rt.parse(t);return e.alpha=0,rt.transform(e)}},qu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qu(t){return isNaN(t)&&typeof t=="string"&&(t.match(Vi)?.length||0)+(t.match(qu)?.length||0)>0}const ja="number",Ua="color",Zu="var",Ju="var(",Ir="${}",tf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tn(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(tf,c=>(rt.test(c)?(s.color.push(o),i.push(Ua),n.push(rt.parse(c))):c.startsWith(Ju)?(s.var.push(o),i.push(Zu),n.push(c)):(s.number.push(o),i.push(ja),n.push(parseFloat(c))),++o,Ir)).split(Ir);return{values:n,split:a,indexes:s,types:i}}function Wa(t){return tn(t).values}function $a(t){const{split:e,types:n}=tn(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===ja?o+=ze(i[r]):a===Ua?o+=rt.transform(i[r]):o+=i[r]}return o}}const ef=t=>typeof t=="number"?0:rt.test(t)?rt.getAnimatableNone(t):t;function nf(t){const e=Wa(t);return $a(t)(e.map(ef))}const ne={test:Qu,parse:Wa,createTransformer:$a,getAnimatableNone:nf};function ys(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 sf({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=ys(c,a,t+1/3),o=ys(c,a,t),r=ys(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Nn(t,e){return n=>n>0?e:t}const J=(t,e,n)=>t+(e-t)*n,vs=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rf=[$s,ue,ve],of=t=>rf.find(e=>e.test(t));function Vr(t){const e=of(t);if(!e)return!1;let n=e.parse(t);return e===ve&&(n=sf(n)),n}const Lr=(t,e)=>{const n=Vr(t),s=Vr(e);if(!n||!s)return Nn(t,e);const i={...n};return o=>(i.red=vs(n.red,s.red,o),i.green=vs(n.green,s.green,o),i.blue=vs(n.blue,s.blue,o),i.alpha=J(n.alpha,s.alpha,o),ue.transform(i))},Hs=new Set(["none","hidden"]);function af(t,e){return Hs.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function cf(t,e){return n=>J(t,e,n)}function ki(t){return typeof t=="number"?cf:typeof t=="string"?Ii(t)?Nn:rt.test(t)?Lr:ff:Array.isArray(t)?Ha:typeof t=="object"?rt.test(t)?Lr:lf:Nn}function Ha(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>ki(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function lf(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ki(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function uf(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ff=(t,e)=>{const n=ne.createTransformer(e),s=tn(t),i=tn(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Hs.has(t)&&!i.values.length||Hs.has(e)&&!s.values.length?af(t,e):on(Ha(uf(s,i),i.values),n):Nn(t,e)};function _a(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?J(t,e,n):ki(t)(t,e)}const df=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Q.update(e,n),stop:()=>ee(e),now:()=>ft.isProcessing?ft.timestamp:bt.now()}},Ka=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},jn=2e4;function Fi(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<jn;)e+=n,s=t.next(e);return e>=jn?1/0:e}function hf(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Fi(s),jn);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:Pt(i)}}const pf=5;function za(t,e,n){const s=Math.max(e-pf,0);return Ea(n-t(s),e-s)}const et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bs=.001;function mf({duration:t=et.duration,bounce:e=et.bounce,velocity:n=et.velocity,mass:s=et.mass}){let i,o,r=1-e;r=Wt(et.minDamping,et.maxDamping,r),t=Wt(et.minDuration,et.maxDuration,Pt(t)),r<1?(i=l=>{const u=l*r,f=u*t,d=u-n,h=_s(l,r),m=Math.exp(-f);return bs-d/h*m},o=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,m=Math.exp(-f),g=_s(Math.pow(l,2),r);return(-i(l)+bs>0?-1:1)*((d-h)*m)/g}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-bs+u*f},o=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=yf(i,o,a);if(t=Kt(t),isNaN(c))return{stiffness:et.stiffness,damping:et.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const gf=12;function yf(t,e,n){let s=n;for(let i=1;i<gf;i++)s=s-t(s)/e(s);return s}function _s(t,e){return t*Math.sqrt(1-e*e)}const vf=["duration","bounce"],bf=["stiffness","damping","mass"];function kr(t,e){return e.some(n=>t[n]!==void 0)}function xf(t){let e={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...t};if(!kr(t,bf)&&kr(t,vf))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*Wt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:et.mass,stiffness:i,damping:o}}else{const n=mf(t);e={...e,...n,mass:et.mass},e.isResolvedFromDuration=!0}return e}function Un(t=et.visualDuration,e=et.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=xf({...n,velocity:-Pt(n.velocity||0)}),m=d||0,g=l/(2*Math.sqrt(c*u)),v=r-o,y=Pt(Math.sqrt(c/u)),b=Math.abs(v)<5;s||(s=b?et.restSpeed.granular:et.restSpeed.default),i||(i=b?et.restDelta.granular:et.restDelta.default);let x;if(g<1){const w=_s(y,g);x=E=>{const R=Math.exp(-g*y*E);return r-R*((m+g*y*v)/w*Math.sin(w*E)+v*Math.cos(w*E))}}else if(g===1)x=w=>r-Math.exp(-y*w)*(v+(m+y*v)*w);else{const w=y*Math.sqrt(g*g-1);x=E=>{const R=Math.exp(-g*y*E),S=Math.min(w*E,300);return r-R*((m+g*y*v)*Math.sinh(S)+w*v*Math.cosh(S))/w}}const T={calculatedDuration:h&&f||null,next:w=>{const E=x(w);if(h)a.done=w>=f;else{let R=w===0?m:0;g<1&&(R=w===0?Kt(m):za(x,w,E));const S=Math.abs(R)<=s,D=Math.abs(r-E)<=i;a.done=S&&D}return a.value=a.done?r:E,a},toString:()=>{const w=Math.min(Fi(T),jn),E=Ka(R=>T.next(w*R).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Un.applyToOptions=t=>{const e=hf(t,100,Un);return t.ease=e.ease,t.duration=Kt(e.duration),t.type="keyframes",t};function Ks({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=S=>a!==void 0&&S<a||c!==void 0&&S>c,m=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const b=S=>-g*Math.exp(-S/s),x=S=>y+b(S),T=S=>{const D=b(S),O=x(S);d.done=Math.abs(D)<=l,d.value=d.done?y:O};let w,E;const R=S=>{h(d.value)&&(w=S,E=Un({keyframes:[d.value,m(d.value)],velocity:za(x,S,d.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return R(0),{calculatedDuration:null,next:S=>{let D=!1;return!E&&w===void 0&&(D=!0,T(S),R(S)),w!==void 0&&S>=w?E.next(S-w):(!D&&T(S),d)}}}function Tf(t,e,n){const s=[],i=n||Yt.mix||_a,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||Mt:e;a=on(c,a)}s.push(a)}return s}function wf(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Pi(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Tf(e,s,i),c=a.length,l=u=>{if(r&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=Ze(t[f],t[f+1],u);return a[f](d)};return n?u=>l(Wt(t[0],t[o-1],u)):l}function Sf(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ze(0,e,s);t.push(J(n,1,i))}}function Ef(t){const e=[0];return Sf(e,t.length-1),e}function Rf(t,e){return t.map(n=>n*e)}function Cf(t,e){return t.map(()=>e||Va).splice(0,t.length-1)}function Ye({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fu(s)?s.map(Mr):Mr(s),o={done:!1,value:e[0]},r=Rf(n&&n.length===e.length?n:Ef(e),t),a=wf(r,e,{ease:Array.isArray(i)?i:Cf(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Pf=t=>t!==null;function Bi(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Pf),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Af={decay:Ks,inertia:Ks,tween:Ye,keyframes:Ye,spring:Un};function Ya(t){typeof t.type=="string"&&(t.type=Af[t.type])}class Ni{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Mf=t=>t/100;class ji extends Ni{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==bt.now()&&this.tick(bt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ya(e);const{type:n=Ye,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Ye;c!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=on(Mf,_a(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Fi(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,T=s;if(f){const S=Math.min(this.currentTime,i)/a;let D=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&D--,D=Math.min(D,f+1),D%2&&(d==="reverse"?(O=1-O,h&&(O-=h/a)):d==="mirror"&&(T=r)),x=Wt(0,1,O)*a}const w=b?{done:!1,value:u[0]}:T.next(x);o&&(w.value=o(w.value));let{done:E}=w;!b&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&m!==Ks&&(w.value=Bi(u,this.options,v,this.speed)),g&&g(w.value),R&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pt(e)}get time(){return Pt(this.currentTime)}set time(e){e=Kt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(bt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=df,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(bt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Df(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const fe=t=>t*180/Math.PI,zs=t=>{const e=fe(Math.atan2(t[1],t[0]));return Ys(e)},Of={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:zs,rotateZ:zs,skewX:t=>fe(Math.atan(t[1])),skewY:t=>fe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ys=t=>(t=t%360,t<0&&(t+=360),t),Fr=zs,Br=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Nr=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),If={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Br,scaleY:Nr,scale:t=>(Br(t)+Nr(t))/2,rotateX:t=>Ys(fe(Math.atan2(t[6],t[5]))),rotateY:t=>Ys(fe(Math.atan2(-t[2],t[0]))),rotateZ:Fr,rotate:Fr,skewX:t=>fe(Math.atan(t[4])),skewY:t=>fe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Xs(t){return t.includes("scale")?1:0}function Gs(t,e){if(!t||t==="none")return Xs(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=If,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Of,i=a}if(!i)return Xs(e);const o=s[e],r=i[1].split(",").map(Lf);return typeof o=="function"?o(r):r[o]}const Vf=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Gs(n,e)};function Lf(t){return parseFloat(t.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Ie),jr=t=>t===Oe||t===V,kf=new Set(["x","y","z"]),Ff=Ie.filter(t=>!kf.has(t));function Bf(t){const e=[];return Ff.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Jt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Gs(e,"x"),y:(t,{transform:e})=>Gs(e,"y")};Jt.translateX=Jt.x;Jt.translateY=Jt.y;const de=new Set;let qs=!1,Qs=!1,Zs=!1;function Xa(){if(Qs){const t=Array.from(de).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Bf(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Qs=!1,qs=!1,de.forEach(t=>t.complete(Zs)),de.clear()}function Ga(){de.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qs=!0)})}function Nf(){Zs=!0,Ga(),Xa(),Zs=!1}class Ui{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(de.add(this),qs||(qs=!0,Q.read(Ga),Q.resolveKeyframes(Xa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Df(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),de.delete(this)}cancel(){this.state==="scheduled"&&(de.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const jf=t=>t.startsWith("--");function Uf(t,e,n){jf(e)?t.style.setProperty(e,n):t.style[e]=n}const Wf=Ai(()=>window.ScrollTimeline!==void 0),$f={};function Hf(t,e){const n=Ai(t);return()=>$f[e]??n()}const qa=Hf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),He=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ur={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:He([0,.65,.55,1]),circOut:He([.55,0,1,.45]),backIn:He([.31,.01,.66,-.59]),backOut:He([.33,1.53,.69,.99])};function Qa(t,e){if(t)return typeof t=="function"?qa()?Ka(t,e):"ease-out":La(t)?He(t):Array.isArray(t)?t.map(n=>Qa(n,e)||Ur.easeOut):Ur[t]}function _f(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Qa(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function Za(t){return typeof t=="function"&&"applyToOptions"in t}function Kf({type:t,...e}){return Za(t)&&qa()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class zf extends Ni{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Pi(typeof e.type!="string");const l=Kf(e);this.animation=_f(n,s,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Bi(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Uf(n,s,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Pt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pt(e)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Wf()?(this.animation.timeline=e,Mt):n(this)}}const Ja={anticipate:Da,backInOut:Ma,circInOut:Ia};function Yf(t){return t in Ja}function Xf(t){typeof t.ease=="string"&&Yf(t.ease)&&(t.ease=Ja[t.ease])}const xs=10;class Gf extends zf{constructor(e){Xf(e),Ya(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ji({...r,autoplay:!1}),c=Math.max(xs,bt.now()-this.startTime),l=Wt(0,xs,c-xs);n.setWithVelocity(a.sample(Math.max(0,c-l)).value,a.sample(c).value,l),a.stop()}}const Wr=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ne.test(t)||t==="0")&&!t.startsWith("url("));function qf(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qf(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Wr(i,e),a=Wr(o,e);return!r||!a?!1:qf(t)||(n==="spring"||Za(n))&&s}function Js(t){t.duration=0,t.type="keyframes"}const Zf=new Set(["opacity","clipPath","filter","transform"]),Jf=Ai(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function td(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Jf()&&n&&Zf.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ed=40;class nd extends Ni{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=bt.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:l,element:u,...f},h=u?.KeyframeResolver||Ui;this.keyframeResolver=new h(a,(m,g,v)=>this.onKeyframesResolved(m,g,d,!v),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=bt.now(),Qf(e,o,r,a)||((Yt.instantAnimations||!c)&&u?.(Bi(e,s,n)),e[0]=e[e.length-1],Js(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ed?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!l&&td(d),m=d.motionValue?.owner?.current,g=h?new Gf({...d,element:m}):new ji(d);g.finished.then(()=>{this.notifyFinished()}).catch(Mt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function tc(t,e,n,s=0,i=1){const o=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const sd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function id(t){const e=sd.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function ec(t,e,n=1){const[s,i]=id(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ta(r)?parseFloat(r):r}return Ii(i)?ec(i,e,n+1):i}const rd={type:"spring",stiffness:500,damping:25,restSpeed:10},od=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ad={type:"keyframes",duration:.8},cd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ld=(t,{keyframes:e})=>e.length>2?ad:Ve.has(t)?t.startsWith("scale")?od(e[1]):rd:cd,ud=t=>t!==null;function fd(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ud),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}function Wi(t,e){return t?.[e]??t?.default??t}function dd({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const $i=(t,e,n,s={},i,o)=>r=>{const a=Wi(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-Kt(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};dd(a)||Object.assign(u,ld(t,u)),u.duration&&(u.duration=Kt(u.duration)),u.repeatDelay&&(u.repeatDelay=Kt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Js(u),u.delay===0&&(f=!0)),(Yt.instantAnimations||Yt.skipAnimations)&&(f=!0,Js(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=fd(u.keyframes,a);if(d!==void 0){Q.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ji(u):new nd(u)};function $r(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Hi(t,e,n,s){if(typeof e=="function"){const[i,o]=$r(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=$r(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Se(t,e,n){const s=t.getProps();return Hi(s,e,n!==void 0?n:s.custom,t)}const nc=new Set(["width","height","top","left","right","bottom",...Ie]),Hr=30,hd=t=>!isNaN(parseFloat(t));class pd{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=bt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=bt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=hd(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mi);const s=this.events[e].add(n);return e==="change"?()=>{s(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=bt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Hr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hr);return Ea(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ce(t,e){return new pd(t,e)}const ti=t=>Array.isArray(t);function md(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ce(n))}function gd(t){return ti(t)?t[t.length-1]||0:t}function yd(t,e){const n=Se(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=gd(o[r]);md(t,r,a)}}const pt=t=>!!(t&&t.getVelocity);function vd(t){return!!(pt(t)&&t.add)}function ei(t,e){const n=t.getValue("willChange");if(vd(n))return n.add(e);if(!n&&Yt.WillChange){const s=new Yt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function _i(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const bd="framerAppearId",sc="data-"+_i(bd);function ic(t){return t.props[sc]}function xd({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function rc(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;const c=o?.reduceMotion;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),h=a[f];if(h===void 0||u&&xd(u,f))continue;const m={delay:n,...Wi(o||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const x=ic(t);if(x){const T=window.MotionHandoffAnimation(x,f,Q);T!==null&&(m.startTime=T,v=!0)}}ei(t,f);const y=c??t.shouldReduceMotion;d.start($i(f,d,h,y&&nc.has(f)?{type:!1}:m,t,v));const b=d.animation;b&&l.push(b)}return r&&Promise.all(l).then(()=>{Q.update(()=>{r&&yd(t,r)})}),l}function ni(t,e,n={}){const s=Se(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(rc(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=i;return Td(t,e,c,l,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>l())}else return Promise.all([o(),r(n.delay)])}function Td(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(ni(c,e,{...r,delay:n+(typeof s=="function"?0:s)+tc(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function wd(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ni(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ni(t,e,n);else{const i=typeof e=="function"?Se(t,e,n.custom):e;s=Promise.all(rc(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Sd={test:t=>t==="auto",parse:t=>t},oc=t=>e=>e.test(t),ac=[Oe,V,jt,Zt,Gu,Xu,Sd],_r=t=>ac.find(oc(t));function Ed(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Sa(t):!0}const Rd=new Set(["brightness","contrast","saturate","opacity"]);function Cd(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Vi)||[];if(!s)return t;const i=n.replace(s,"");let o=Rd.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Pd=/\b([a-z-]*)\(.*?\)/gu,si={...ne,getAnimatableNone:t=>{const e=t.match(Pd);return e?e.map(Cd).join(" "):t}},Kr={...Oe,transform:Math.round},Ad={rotate:Zt,rotateX:Zt,rotateY:Zt,rotateZ:Zt,scale:Tn,scaleX:Tn,scaleY:Tn,scaleZ:Tn,skew:Zt,skewX:Zt,skewY:Zt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Je,originX:Or,originY:Or,originZ:V},Ki={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Ad,zIndex:Kr,fillOpacity:Je,strokeOpacity:Je,numOctaves:Kr},Md={...Ki,color:rt,backgroundColor:rt,outlineColor:rt,fill:rt,stroke:rt,borderColor:rt,borderTopColor:rt,borderRightColor:rt,borderBottomColor:rt,borderLeftColor:rt,filter:si,WebkitFilter:si},cc=t=>Md[t];function lc(t,e){let n=cc(t);return n!==si&&(n=ne),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Dd=new Set(["auto","none","0"]);function Od(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Dd.has(o)&&tn(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=lc(n,i)}class Id extends Ui{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),Ii(f))){const d=ec(f,n.current);d!==void 0&&(e[u]=d),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!nc.has(s)||e.length!==2)return;const[i,o]=e,r=_r(i),a=_r(o),c=Dr(i),l=Dr(o);if(c!==l&&Jt[s]){this.needsMeasurement=!0;return}if(r!==a)if(jr(r)&&jr(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else Jt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ed(e[i]))&&s.push(i);s.length&&Od(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Jt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function Vd(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const uc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ii(t){return wa(t)&&"offsetHeight"in t}const{schedule:zi}=ka(queueMicrotask,!1),Vt={x:!1,y:!1};function fc(){return Vt.x||Vt.y}function Ld(t){return t==="x"||t==="y"?Vt[t]?null:(Vt[t]=!0,()=>{Vt[t]=!1}):Vt.x||Vt.y?null:(Vt.x=Vt.y=!0,()=>{Vt.x=Vt.y=!1})}function dc(t,e){const n=Vd(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function zr(t){return!(t.pointerType==="touch"||fc())}function kd(t,e,n={}){const[s,i,o]=dc(t,n),r=a=>{if(!zr(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{zr(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const hc=(t,e)=>e?t===e?!0:hc(t,e.parentElement):!1,Yi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Fd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pc(t){return Fd.has(t.tagName)||t.isContentEditable===!0}const Dn=new WeakSet;function Yr(t){return e=>{e.key==="Enter"&&t(e)}}function Ts(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Bd=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Yr(()=>{if(Dn.has(n))return;Ts(n,"down");const i=Yr(()=>{Ts(n,"up")}),o=()=>Ts(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Xr(t){return Yi(t)&&!fc()}function Nd(t,e,n={}){const[s,i,o]=dc(t,n),r=a=>{const c=a.currentTarget;if(!Xr(a))return;Dn.add(c);const l=e(c,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Dn.has(c)&&Dn.delete(c),Xr(h)&&typeof l=="function"&&l(h,{success:m})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||hc(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ii(a)&&(a.addEventListener("focus",l=>Bd(l,i)),!pc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function mc(t){return wa(t)&&"ownerSVGElement"in t}function jd(t){return mc(t)&&t.tagName==="svg"}const Ud=[...ac,rt,ne],Wd=t=>Ud.find(oc(t)),Gr=()=>({translate:0,scale:1,origin:0,originPoint:0}),be=()=>({x:Gr(),y:Gr()}),qr=()=>({min:0,max:0}),lt=()=>({x:qr(),y:qr()}),ri={current:null},gc={current:!1},$d=typeof window<"u";function Hd(){if(gc.current=!0,!!$d)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ri.current=t.matches;t.addEventListener("change",e),e()}else ri.current=!1}const _d=new WeakMap;function ss(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function en(t){return typeof t=="string"||Array.isArray(t)}const Xi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gi=["initial",...Xi];function is(t){return ss(t.animate)||Gi.some(e=>en(t[e]))}function yc(t){return!!(is(t)||t.variants)}function Kd(t,e,n){for(const s in e){const i=e[s],o=n[s];if(pt(i))t.addValue(s,i);else if(pt(o))t.addValue(s,Ce(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Ce(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Qr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wn={};function vc(t){Wn=t}function zd(){return Wn}class Yd{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ui,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=bt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,Q.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=is(n),this.isVariantNode=yc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&pt(h)&&h.set(c[d])}}mount(e){this.current=e,_d.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gc.current||Hd(),this.shouldReduceMotion=ri.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ee(this.notifyUpdate),ee(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Ve.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&Q.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wn){const n=Wn[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Qr.length;s++){const i=Qr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Kd(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Ce(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ta(s)||Sa(s))?s=parseFloat(s):!Wd(s)&&ne.test(n)&&(s=lc(e,n)),this.setBaseTarget(e,pt(s)?s.get():s)),pt(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Hi(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!pt(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mi),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){zi.render(this.render)}}class bc extends Yd{constructor(){super(...arguments),this.KeyframeResolver=Id}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;pt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ie{constructor(e){this.isMounted=!1,this.node=e}update(){}}function xc({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Xd({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Gd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ws(t){return t===void 0||t===1}function oi({scale:t,scaleX:e,scaleY:n}){return!ws(t)||!ws(e)||!ws(n)}function le(t){return oi(t)||Tc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tc(t){return Zr(t.x)||Zr(t.y)}function Zr(t){return t&&t!=="0%"}function $n(t,e,n){const s=t-n,i=e*s;return n+i}function Jr(t,e,n,s,i){return i!==void 0&&(t=$n(t,i,s)),$n(t,n,s)+e}function ai(t,e=0,n=1,s,i){t.min=Jr(t.min,e,n,s,i),t.max=Jr(t.max,e,n,s,i)}function wc(t,{x:e,y:n}){ai(t.x,e.translate,e.scale,e.originPoint),ai(t.y,n.translate,n.scale,n.originPoint)}const to=.999999999999,eo=1.0000000000001;function qd(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Te(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,wc(t,r)),s&&le(o.latestValues)&&Te(t,o.latestValues))}e.x<eo&&e.x>to&&(e.x=1),e.y<eo&&e.y>to&&(e.y=1)}function xe(t,e){t.min=t.min+e,t.max=t.max+e}function no(t,e,n,s,i=.5){const o=J(t.min,t.max,i);ai(t,e,n,o,s)}function Te(t,e){no(t.x,e.x,e.scaleX,e.scale,e.originX),no(t.y,e.y,e.scaleY,e.scale,e.originY)}function Sc(t,e){return xc(Gd(t.getBoundingClientRect(),e))}function Qd(t,e,n){const s=Sc(t,n),{scroll:i}=e;return i&&(xe(s.x,i.offset.x),xe(s.y,i.offset.y)),s}const Zd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jd=Ie.length;function th(t,e,n){let s="",i=!0;for(let o=0;o<Jd;o++){const r=Ie[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(r.startsWith("scale")?1:0);else{const l=parseFloat(a);c=r.startsWith("scale")?l===1:l===0}if(!c||n){const l=uc(a,Ki[r]);if(!c){i=!1;const u=Zd[r]||r;s+=`${u}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function qi(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const l=e[c];if(Ve.has(c)){r=!0;continue}else if(Ba(c)){i[c]=l;continue}else{const u=uc(l,Ki[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(e.transform||(r||n?s.transform=th(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${l} ${u}`}}function Ec(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function so(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const We={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=so(t,e.target.x),s=so(t,e.target.y);return`${n}% ${s}%`}},eh={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ne.parse(t);if(i.length>5)return s;const o=ne.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=J(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}},ci={borderRadius:{...We,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomLeftRadius:We,borderBottomRightRadius:We,boxShadow:eh};function Rc(t,{layout:e,layoutId:n}){return Ve.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ci[t]||t==="opacity")}function Qi(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(pt(s[r])||i&&pt(i[r])||Rc(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function nh(t){return window.getComputedStyle(t)}class sh extends bc{constructor(){super(...arguments),this.type="html",this.renderInstance=Ec}readValueFromInstance(e,n){if(Ve.has(n))return this.projection?.isProjecting?Xs(n):Vf(e,n);{const s=nh(e),i=(Ba(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Sc(e,n)}build(e,n,s){qi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Qi(e,n,s)}}const ih={offset:"stroke-dashoffset",array:"stroke-dasharray"},rh={offset:"strokeDashoffset",array:"strokeDasharray"};function oh(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?ih:rh;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const ah=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Cc(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,l,u){if(qi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox);for(const h of ah)f[h]!==void 0&&(d[h]=f[h],delete f[h]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&oh(f,i,o,r,!1)}const Pc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ac=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ch(t,e,n,s){Ec(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Pc.has(i)?i:_i(i),e.attrs[i])}function Mc(t,e,n){const s=Qi(t,e,n);for(const i in t)if(pt(t[i])||pt(e[i])){const o=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class lh extends bc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ve.has(n)){const s=cc(n);return s&&s.default||0}return n=Pc.has(n)?n:_i(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Mc(e,n,s)}build(e,n,s){Cc(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){ch(e,n,s,i)}mount(e){this.isSVGTag=Ac(e.tagName),super.mount(e)}}const uh=Gi.length;function Dc(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Dc(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<uh;n++){const s=Gi[n],i=t.props[s];(en(i)||i===!1)&&(e[s]=i)}return e}function Oc(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const fh=[...Xi].reverse(),dh=Xi.length;function hh(t){return e=>Promise.all(e.map(({animation:n,options:s})=>wd(t,n,s)))}function ph(t){let e=hh(t),n=io(),s=!0;const i=c=>(l,u)=>{const f=Se(t,u,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;l={...l,...m,...h}}return l};function o(c){e=c(t)}function r(c){const{props:l}=t,u=Dc(t.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<dh;v++){const y=fh[v],b=n[y],x=l[y]!==void 0?l[y]:u[y],T=en(x),w=y===c?b.isActive:null;w===!1&&(m=v);let E=x===u[y]&&x!==l[y]&&T;if(E&&s&&t.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&w===null||!x&&!b.prevProp||ss(x)||typeof x=="boolean")continue;const R=mh(b.prevProp,x);let S=R||y===c&&b.isActive&&!E&&T||v>m&&T,D=!1;const O=Array.isArray(x)?x:[x];let k=O.reduce(i(y),{});w===!1&&(k={});const{prevResolvedValues:M={}}=b,C={...M,...k},B=I=>{S=!0,d.has(I)&&(D=!0,d.delete(I)),b.needsAnimating[I]=!0;const P=t.getValue(I);P&&(P.liveStyle=!1)};for(const I in C){const P=k[I],L=M[I];if(h.hasOwnProperty(I))continue;let _=!1;ti(P)&&ti(L)?_=!Oc(P,L):_=P!==L,_?P!=null?B(I):d.add(I):P!==void 0&&d.has(I)?B(I):b.protectedKeys[I]=!0}b.prevProp=x,b.prevResolvedValues=k,b.isActive&&(h={...h,...k}),s&&t.blockInitialAnimation&&(S=!1);const F=E&&R;S&&(!F||D)&&f.push(...O.map(I=>{const P={type:y};if(typeof I=="string"&&s&&!F&&t.manuallyAnimateOnMount&&t.parent){const{parent:L}=t,_=Se(L,I);if(L.enteringChildren&&_){const{delayChildren:W}=_.transition||{};P.delay=tc(L.enteringChildren,t,W)}}return{animation:I,options:P}}))}if(d.size){const v={};if(typeof l.initial!="boolean"){const y=Se(t,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const b=t.getBaseTarget(y),x=t.getValue(y);x&&(x.liveStyle=!0),v[y]=b??null}),f.push({animation:v})}let g=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(c,l){if(n[c].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const u=r(c);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=io()}}}function mh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Oc(e,t):!1}function ce(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function io(){return{animate:ce(!0),whileInView:ce(),whileHover:ce(),whileTap:ce(),whileDrag:ce(),whileFocus:ce(),exit:ce()}}function ro(t,e){t.min=e.min,t.max=e.max}function Ot(t,e){ro(t.x,e.x),ro(t.y,e.y)}function oo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Ic=1e-4,gh=1-Ic,yh=1+Ic,Vc=.01,vh=0-Vc,bh=0+Vc;function xt(t){return t.max-t.min}function xh(t,e,n){return Math.abs(t-e)<=n}function ao(t,e,n,s=.5){t.origin=s,t.originPoint=J(e.min,e.max,t.origin),t.scale=xt(n)/xt(e),t.translate=J(n.min,n.max,t.origin)-t.originPoint,(t.scale>=gh&&t.scale<=yh||isNaN(t.scale))&&(t.scale=1),(t.translate>=vh&&t.translate<=bh||isNaN(t.translate))&&(t.translate=0)}function Xe(t,e,n,s){ao(t.x,e.x,n.x,s?s.originX:void 0),ao(t.y,e.y,n.y,s?s.originY:void 0)}function co(t,e,n){t.min=n.min+e.min,t.max=t.min+xt(e)}function Th(t,e,n){co(t.x,e.x,n.x),co(t.y,e.y,n.y)}function lo(t,e,n){t.min=e.min-n.min,t.max=t.min+xt(e)}function Hn(t,e,n){lo(t.x,e.x,n.x),lo(t.y,e.y,n.y)}function uo(t,e,n,s,i){return t-=e,t=$n(t,1/n,s),i!==void 0&&(t=$n(t,1/i,s)),t}function wh(t,e=0,n=1,s=.5,i,o=t,r=t){if(jt.test(e)&&(e=parseFloat(e),e=J(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=J(o.min,o.max,s);t===o&&(a-=e),t.min=uo(t.min,e,n,a,i),t.max=uo(t.max,e,n,a,i)}function fo(t,e,[n,s,i],o,r){wh(t,e[n],e[s],e[i],e.scale,o,r)}const Sh=["x","scaleX","originX"],Eh=["y","scaleY","originY"];function ho(t,e,n,s){fo(t.x,e,Sh,n?n.x:void 0,s?s.x:void 0),fo(t.y,e,Eh,n?n.y:void 0,s?s.y:void 0)}function po(t){return t.translate===0&&t.scale===1}function Lc(t){return po(t.x)&&po(t.y)}function mo(t,e){return t.min===e.min&&t.max===e.max}function Rh(t,e){return mo(t.x,e.x)&&mo(t.y,e.y)}function go(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function kc(t,e){return go(t.x,e.x)&&go(t.y,e.y)}function yo(t){return xt(t.x)/xt(t.y)}function vo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ct(t){return[t("x"),t("y")]}function Ch(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Fc=["TopLeft","TopRight","BottomLeft","BottomRight"],Ph=Fc.length,bo=t=>typeof t=="string"?parseFloat(t):t,xo=t=>typeof t=="number"||V.test(t);function Ah(t,e,n,s,i,o){i?(t.opacity=J(0,n.opacity??1,Mh(s)),t.opacityExit=J(e.opacity??1,0,Dh(s))):o&&(t.opacity=J(e.opacity??1,n.opacity??1,s));for(let r=0;r<Ph;r++){const a=`border${Fc[r]}Radius`;let c=To(e,a),l=To(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||xo(c)===xo(l)?(t[a]=Math.max(J(bo(c),bo(l),s),0),(jt.test(l)||jt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=J(e.rotate||0,n.rotate||0,s))}function To(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Mh=Bc(0,.5,Oa),Dh=Bc(.5,.95,Mt);function Bc(t,e,n){return s=>s<t?0:s>e?1:n(Ze(t,e,s))}function Oh(t,e,n){const s=pt(t)?t:Ce(t);return s.start($i("",s,e,n)),s.animation}function nn(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ih=(t,e)=>t.depth-e.depth;class Vh{constructor(){this.children=[],this.isDirty=!1}add(e){Ri(this.children,e),this.isDirty=!0}remove(e){Ci(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ih),this.isDirty=!1,this.children.forEach(e)}}function Lh(t,e){const n=bt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ee(s),t(o-e))};return Q.setup(s,!0),()=>ee(s)}function On(t){return pt(t)?t.get():t}class kh{constructor(){this.members=[]}add(e){Ri(this.members,e),e.scheduleRender()}remove(e){if(Ci(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender();const i=s.options.layoutDependency,o=e.options.layoutDependency;i!==void 0&&o!==void 0&&i===o||(e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const In={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ss=["","X","Y","Z"],Fh=1e3;let Bh=0;function Es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Nc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ic(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Q,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Nc(s)}function jc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Bh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Uh),this.nodes.forEach(_h),this.nodes.forEach(Kh),this.nodes.forEach(Wh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Mi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=mc(r)&&!jd(r),this.instance=r;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;Q.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Lh(d,250),In.hasAnimatedSinceResize&&(In.hasAnimatedSinceResize=!1,this.nodes.forEach(Eo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||qh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=l.getProps(),y=!this.targetLayout||!kc(this.targetLayout,h),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Wi(m,"layout"),onPlay:g,onComplete:v};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else f||Eo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ee(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(wo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(So);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hh),this.nodes.forEach(Nh),this.nodes.forEach(jh)):this.nodes.forEach(So),this.clearAllSnapshots();const a=bt.now();ft.delta=Wt(0,1e3/60,a-ft.timestamp),ft.timestamp=a,ft.isProcessing=!0,ms.update.process(ft),ms.preRender.process(ft),ms.render.process(ft),ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($h),this.sharedNodes.forEach(Yh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lc(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&this.instance&&(a||le(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),Qh(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return lt();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Zh))){const{scroll:l}=this.root;l&&(xe(a.x,l.offset.x),xe(a.y,l.offset.y))}return a}removeElementScroll(r){const a=lt();if(Ot(a,r),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;l!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Ot(a,r),xe(a.x,u.offset.x),xe(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const c=lt();Ot(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Te(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),le(u.latestValues)&&Te(c,u.latestValues)}return le(this.latestValues)&&Te(c,this.latestValues),c}removeTransform(r){const a=lt();Ot(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!le(l.latestValues))continue;oi(l.latestValues)&&l.updateSnapshot();const u=lt(),f=l.measurePageBox();Ot(u,f),ho(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return le(this.latestValues)&&ho(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=ft.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Th(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ot(this.target,this.layout.layoutBox),wc(this.target,this.targetDelta)):Ot(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||oi(this.parent.latestValues)||Tc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Hn(this.relativeTargetOrigin,a,c),Ot(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ft.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;Ot(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;qd(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=lt());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(oo(this.prevProjectionDelta.x,this.projectionDelta.x),oo(this.prevProjectionDelta.y,this.projectionDelta.y)),Xe(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!vo(this.projectionDelta.x,this.prevProjectionDelta.x)||!vo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=be(),this.projectionDelta=be(),this.projectionDeltaWithTransform=be()}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=be();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=lt(),h=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,v=this.getStack(),y=!v||v.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Gh));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Ro(f.x,r.x,w),Ro(f.y,r.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hn(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xh(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&Rh(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=lt()),Ot(x,this.relativeTarget)),g&&(this.animationValues=u,Ah(u,l,this.latestValues,w,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ee(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{In.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ce(0)),this.currentAnimation=Oh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Uc(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||lt();const f=xt(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const d=xt(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+d}Ot(a,c),Te(a,u),Xe(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new kh),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Es("z",r,l,this.animationValues);for(let u=0;u<Ss.length;u++)Es(`rotate${Ss[u]}`,r,l,this.animationValues),Es(`skew${Ss[u]}`,r,l,this.animationValues);r.render();for(const u in l)r.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=On(a?.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=On(a?.pointerEvents)||""),this.hasProjected&&!le(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Ch(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?r.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in ci){if(u[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:y}=ci[m],b=f==="none"?u[m]:g(u[m],l);if(v){const x=v.length;for(let T=0;T<x;T++)r[v[T]]=b}else y?this.options.visualElement.renderState.vars[m]=b:r[m]=b}this.options.layoutId&&(r.pointerEvents=l===this?On(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(wo),this.root.sharedNodes.clear()}}}function Nh(t){t.updateLayout()}function jh(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Ct(u=>{const f=o?e.measuredBox[u]:e.layoutBox[u],d=xt(f);f.min=n[u].min,f.max=f.min+d}):Uc(i,e.layoutBox,n)&&Ct(u=>{const f=o?e.measuredBox[u]:e.layoutBox[u],d=xt(n[u]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const r=be();Xe(r,n,e.layoutBox);const a=be();o?Xe(a,t.applyTransform(s,!0),e.measuredBox):Xe(a,n,e.layoutBox);const c=!Lc(r);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=lt();Hn(h,e.layoutBox,f.layoutBox);const m=lt();Hn(m,n,d.layoutBox),kc(h,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=h,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Uh(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Wh(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $h(t){t.clearSnapshot()}function wo(t){t.clearMeasurements()}function So(t){t.isLayoutDirty=!1}function Hh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Eo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _h(t){t.resolveTargetDelta()}function Kh(t){t.calcProjection()}function zh(t){t.resetSkewAndRotation()}function Yh(t){t.removeLeadSnapshot()}function Ro(t,e,n){t.translate=J(e.translate,0,n),t.scale=J(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Co(t,e,n,s){t.min=J(e.min,n.min,s),t.max=J(e.max,n.max,s)}function Xh(t,e,n,s){Co(t.x,e.x,n.x,s),Co(t.y,e.y,n.y,s)}function Gh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const qh={duration:.45,ease:[.4,0,.1,1]},Po=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ao=Po("applewebkit/")&&!Po("chrome/")?Math.round:Mt;function Mo(t){t.min=Ao(t.min),t.max=Ao(t.max)}function Qh(t){Mo(t.x),Mo(t.y)}function Uc(t,e,n){return t==="position"||t==="preserve-aspect"&&!xh(yo(e),yo(n),.2)}function Zh(t){return t!==t.root&&t.scroll?.wasRoot}const Jh=jc({attachResizeListener:(t,e)=>nn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},Wc=jc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rs.current){const t=new Jh({});t.mount(window),t.setOptions({layoutScroll:!0}),Rs.current=t}return Rs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zi=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Do(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function tp(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Do(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Do(t[i],null)}}}}function ep(...t){return p.useCallback(tp(...t),t)}class np extends p.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ii(s)&&s.offsetWidth||0,o=ii(s)&&s.offsetHeight||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left,r.bottom=o-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function sp({children:t,isPresent:e,anchorX:n,anchorY:s,root:i}){const o=p.useId(),r=p.useRef(null),a=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=p.useContext(Zi),l=t.props?.ref??t?.ref,u=ep(r,l);return p.useInsertionEffect(()=>{const{width:f,height:d,top:h,left:m,right:g,bottom:v}=a.current;if(e||!r.current||!f||!d)return;const y=n==="left"?`left: ${m}`:`right: ${g}`,b=s==="bottom"?`bottom: ${v}`:`top: ${h}`;r.current.dataset.motionPopId=o;const x=document.createElement("style");c&&(x.nonce=c);const T=i??document.head;return T.appendChild(x),x.sheet&&x.sheet.insertRule(`
2
2
  [data-motion-pop-id="${o}"] {
3
3
  position: absolute !important;
4
4
  width: ${f}px !important;