renderloom 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/renderloom.css +1 -1
- package/dist/renderloom.js +239 -235
- package/dist/renderloom.js.map +1 -1
- package/dist/renderloom.umd.cjs +5 -5
- package/dist/renderloom.umd.cjs.map +1 -1
- package/package.json +2 -1
package/dist/renderloom.umd.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var As;function Pa(){if(As)return nt;As=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,r,o){var i=null;if(o!==void 0&&(i=""+o),r.key!==void 0&&(i=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:e,type:s,key:i,ref:r!==void 0?r:null,props:o}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var st={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ms;function
|
|
17
|
+
*/var Ms;function Aa(){return Ms||(Ms=1,process.env.NODE_ENV!=="production"&&(function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===_?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case x:return"Fragment";case v:return"Profiler";case k:return"StrictMode";case E:return"Suspense";case z:return"SuspenseList";case D:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case p:return"Portal";case T:return w.displayName||"Context";case y:return(w._context.displayName||"Context")+".Consumer";case S:var R=w.render;return w=w.displayName,w||(w=R.displayName||R.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case j:return R=w.displayName||null,R!==null?R:e(w.type)||"Memo";case V:R=w._payload,w=w._init;try{return e(w(R))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var R=!1}catch{R=!0}if(R){R=console;var U=R.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return U.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(w)}}function s(w){if(w===x)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===V)return"<...>";try{var R=e(w);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function r(){var w=B.A;return w===null?null:w.getOwner()}function o(){return Error("react-stack-top-frame")}function i(w){if(de.call(w,"key")){var R=Object.getOwnPropertyDescriptor(w,"key").get;if(R&&R.isReactWarning)return!1}return w.key!==void 0}function a(w,R){function U(){W||(W=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}U.isReactWarning=!0,Object.defineProperty(w,"key",{get:U,configurable:!0})}function c(){var w=e(this.type);return ye[w]||(ye[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function d(w,R,U,X,Q,se){var K=U.ref;return w={$$typeof:g,type:w,key:R,props:U,_owner:X},(K!==void 0?K:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:c}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function u(w,R,U,X,Q,se){var K=R.children;if(K!==void 0)if(X)if(ae(K)){for(X=0;X<K.length;X++)f(K[X]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(K);if(de.call(R,"key")){K=e(w);var Ce=Object.keys(R).filter(function(en){return en!=="key"});X=0<Ce.length?"{key: someKey, "+Ce.join(": ..., ")+": ...}":"{key: someKey}",A[K+X]||(Ce=0<Ce.length?"{"+Ce.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,X,K,Ce,K),
|
|
22
|
+
<%s key={someKey} {...props} />`,X,K,Ce,K),A[K+X]=!0)}if(K=null,U!==void 0&&(n(U),K=""+U),i(R)&&(n(R.key),K=""+R.key),"key"in R){U={};for(var q in R)q!=="key"&&(U[q]=R[q])}else U=R;return K&&a(U,typeof w=="function"?w.displayName||w.name||"Unknown":w),d(w,K,U,r(),Q,se)}function f(w){h(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===V&&(w._payload.status==="fulfilled"?h(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function h(w){return typeof w=="object"&&w!==null&&w.$$typeof===g}var m=b,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),T=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),B=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=Object.prototype.hasOwnProperty,ae=Array.isArray,J=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(w){return w()}};var W,ye={},Y=m.react_stack_bottom_frame.bind(m,o)(),ne=J(s(o)),A={};st.Fragment=x,st.jsx=function(w,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return u(w,R,U,!1,X?Error("react-stack-top-frame"):Y,X?J(s(w)):ne)},st.jsxs=function(w,R,U){var X=1e4>B.recentlyCreatedOwnerStacks++;return u(w,R,U,!0,X?Error("react-stack-top-frame"):Y,X?J(s(w)):ne)}})()),st}var Es;function Ma(){return Es||(Es=1,process.env.NODE_ENV==="production"?wt.exports=Pa():wt.exports=Aa()),wt.exports}var l=Ma();/**
|
|
23
23
|
* @license lucide-react v0.562.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
@@ -159,7 +159,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const Ne=G("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),an=b.createContext({});function ln(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Os=typeof window<"u"?b.useLayoutEffect:b.useEffect,Tt=b.createContext(null);function cn(e,t){e.indexOf(t)===-1&&e.push(t)}function St(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const be=(e,t,n)=>n>t?t:n<e?e:n;function dn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ge=()=>{},Te=()=>{};typeof process<"u"&&((Sa=process.env)==null?void 0:Sa.NODE_ENV)!=="production"&&(Ge=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(dn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(dn(t,n))});const Ae={},_s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fs(e){return typeof e=="object"&&e!==null}const Bs=e=>/^0[^.\s]+$/u.test(e);function $s(e){let t;return()=>(t===void 0&&(t=e()),t)}const fe=e=>e,qa=(e,t)=>n=>t(e(n)),it=(...e)=>e.reduce(qa),ot=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class un{constructor(){this.subscriptions=[]}add(t){return cn(this.subscriptions,t),()=>St(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ue=e=>e*1e3,he=e=>e/1e3;function Ws(e,t){return t?e*(1e3/t):0}const Us=new Set;function fn(e,t,n){e||Us.has(t)||(console.warn(dn(t,n)),Us.add(t))}const Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Za=1e-7,Ja=12;function Qa(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=Gs(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>Za&&++a<Ja);return i}function at(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Qa(o,0,1,e,n);return o=>o===0||o===1?o:Gs(r(o),t,s)}const Ys=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ks=e=>t=>1-e(1-t),Hs=at(.33,1.53,.69,.99),hn=Ks(Hs),Xs=Ys(hn),qs=e=>e>=1?1:(e*=2)<1?.5*hn(e):.5*(2-Math.pow(2,-10*(e-1))),mn=e=>1-Math.sin(Math.acos(e)),Zs=Ks(mn),Js=Ys(mn),el=at(.42,0,1,1),tl=at(0,0,.58,1),Qs=at(.42,0,.58,1),nl=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:el,easeInOut:Qs,easeOut:tl,circIn:mn,circInOut:Js,circOut:Zs,backIn:hn,backInOut:Xs,backOut:Hs,anticipate:qs},sl=e=>typeof e=="string",nr=e=>{if(er(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return at(t,n,s,r)}else if(sl(e))return Te(tr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tr[e];return e},Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rl(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){i.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,f=!1,h=!1)=>{const g=h&&r?n:s;return f&&i.add(u),g.add(u),u},cancel:u=>{s.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),r=!1,o&&(o=!1,d.process(u))}};return d}const il=40;function sr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Ct.reduce((y,T)=>(y[T]=rl(o),y),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const y=Ae.useManualTiming,T=y?r.timestamp:performance.now();n=!1,y||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,il),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),f.process(r),h.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(p))},x=()=>{n=!0,s=!0,r.isProcessing||e(p)};return{schedule:Ct.reduce((y,T)=>{const S=i[T];return y[T]=(E,z=!1,j=!1)=>(n||x(),S.schedule(E,z,j)),y},{}),cancel:y=>{for(let T=0;T<Ct.length;T++)i[Ct[T]].cancel(y)},state:r,steps:i}}const{schedule:F,cancel:Pe,state:re,steps:pn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Nt;function ol(){Nt=void 0}const le={now:()=>(Nt===void 0&&le.set(re.isProcessing||Ae.useManualTiming?re.timestamp:performance.now()),Nt),set:e=>{Nt=e,queueMicrotask(ol)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),al=rr("var(--"),gn=e=>al(e)?ll.test(e.split("/*")[0].trim()):!1,ll=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function or(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lt={...Ye,transform:e=>be(0,1,e)},At={...Ye,default:1},ct=e=>Math.round(e*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cl(e){return e==null}const dl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yn=(e,t)=>n=>!!(typeof n=="string"&&dl.test(n)&&n.startsWith(e)||t&&!cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),ar=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(xn);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},ul=e=>be(0,255,e),bn={...Ye,transform:e=>Math.round(ul(e))},Ie={test:yn("rgb","red"),parse:ar("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+bn.transform(e)+", "+bn.transform(t)+", "+bn.transform(n)+", "+ct(lt.transform(s))+")"};function fl(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const vn={test:yn("#"),parse:fl,transform:Ie.transform},dt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=dt("deg"),ve=dt("%"),A=dt("px"),hl=dt("vh"),ml=dt("vw"),lr={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ke={test:yn("hsl","hue"),parse:ar("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ve.transform(ct(t))+", "+ve.transform(ct(n))+", "+ct(lt.transform(s))+")"},Z={test:e=>Ie.test(e)||vn.test(e)||Ke.test(e),parse:e=>Ie.test(e)?Ie.parse(e):Ke.test(e)?Ke.parse(e):vn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ie.transform(e):Ke.transform(e),getAnimatableNone:e=>{const t=Z.parse(e);return t.alpha=0,Z.transform(t)}},pl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xn))==null?void 0:t.length)||0)+(((n=e.match(pl))==null?void 0:n.length)||0)>0}const cr="number",dr="color",xl="var",yl="var(",ur="${}",bl=/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 He(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(bl,c=>(Z.test(c)?(s.color.push(o),r.push(dr),n.push(Z.parse(c))):c.startsWith(yl)?(s.var.push(o),r.push(xl),n.push(c)):(s.number.push(o),r.push(cr),n.push(parseFloat(c))),++o,ur)).split(ur);return{values:n,split:a,indexes:s,types:r}}function vl(e){return He(e).values}function fr({split:e,types:t}){const n=e.length;return s=>{let r="";for(let o=0;o<n;o++)if(r+=e[o],s[o]!==void 0){const i=t[o];i===cr?r+=ct(s[o]):i===dr?r+=Z.transform(s[o]):r+=s[o]}return r}}function wl(e){return fr(He(e))}const kl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,jl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:kl(e);function Tl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>jl(s,t.split[r])))}const me={test:gl,parse:vl,createTransformer:wl,getAnimatableNone:Tl};function wn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Sl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=wn(c,a,e+1/3),o=wn(c,a,e),i=wn(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Pt(e,t){return n=>n>0?t:e}const $=(e,t,n)=>e+(t-e)*n,kn=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Cl=[vn,Ie,Ke],Nl=e=>Cl.find(t=>t.test(e));function hr(e){const t=Nl(e);if(Ge(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ke&&(n=Sl(n)),n}const mr=(e,t)=>{const n=hr(e),s=hr(t);if(!n||!s)return Pt(e,t);const r={...n};return o=>(r.red=kn(n.red,s.red,o),r.green=kn(n.green,s.green,o),r.blue=kn(n.blue,s.blue,o),r.alpha=$(n.alpha,s.alpha,o),Ie.transform(r))},jn=new Set(["none","hidden"]);function Al(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Pl(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?Pl:typeof e=="string"?gn(e)?Pt:Z.test(e)?mr:Vl:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:Ml:Pt}function pr(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>Tn(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Ml(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=Tn(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function El(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],a=e.values[i]??0;n[r]=a,s[o]++}return n}const Vl=(e,t)=>{const n=me.createTransformer(t),s=He(e),r=He(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?jn.has(e)&&!r.values.length||jn.has(t)&&!s.values.length?Al(e,t):it(pr(El(s,r),r.values),n):(Ge(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Pt(e,t))};function gr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$(e,t,n):Tn(e)(e,t)}const Dl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>F.update(t,n),stop:()=>Pe(t),now:()=>re.isProcessing?re.timestamp:le.now()}},xr=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Mt=2e4;function Sn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Mt;)t+=n,s=e.next(t);return t>=Mt?1/0:t}function Ll(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(Sn(s),Mt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:he(r)}}const H={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};function Cn(e,t){return e*Math.sqrt(1-t*t)}const Rl=12;function Il(e,t,n){let s=n;for(let r=1;r<Rl;r++)s=s-e(s)/t(s);return s}const Nn=.001;function zl({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:s=H.mass}){let r,o;Ge(e<=ue(H.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=be(H.minDamping,H.maxDamping,i),e=be(H.minDuration,H.maxDuration,he(e)),i<1?(r=d=>{const u=d*i,f=u*e,h=u-n,m=Cn(d,i),g=Math.exp(-f);return Nn-h/m*g},o=d=>{const f=d*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-f),p=Cn(Math.pow(d,2),i);return(-r(d)+Nn>0?-1:1)*((h-m)*g)/p}):(r=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-Nn+u*f},o=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=Il(r,o,a);if(e=ue(e),isNaN(c))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const Ol=["duration","bounce"],_l=["stiffness","damping","mass"];function yr(e,t){return t.some(n=>e[n]!==void 0)}function Fl(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!yr(e,_l)&&yr(e,Ol))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:H.mass,stiffness:r,damping:o}}else{const n=zl({...e,velocity:0});t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Et(e=H.visualDuration,t=H.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=Fl({...n,velocity:-he(n.velocity||0)}),g=h||0,p=d/(2*Math.sqrt(c*u)),x=i-o,k=he(Math.sqrt(c/u)),v=Math.abs(x)<5;s||(s=v?H.restSpeed.granular:H.restSpeed.default),r||(r=v?H.restDelta.granular:H.restDelta.default);let y,T,S,E,z,j;if(p<1)S=Cn(k,p),E=(g+p*k*x)/S,y=D=>{const _=Math.exp(-p*k*D);return i-_*(E*Math.sin(S*D)+x*Math.cos(S*D))},z=p*k*E+x*S,j=p*k*x-E*S,T=D=>Math.exp(-p*k*D)*(z*Math.sin(S*D)+j*Math.cos(S*D));else if(p===1){y=_=>i-Math.exp(-k*_)*(x+(g+k*x)*_);const D=g+k*x;T=_=>Math.exp(-k*_)*(k*D*_-g)}else{const D=k*Math.sqrt(p*p-1);y=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return i-J*((g+p*k*x)*Math.sinh(W)+D*x*Math.cosh(W))/D};const _=(g+p*k*x)/D,B=p*k*_-x*D,de=p*k*x-_*D;T=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return J*(B*Math.sinh(W)+de*Math.cosh(W))}}const V={calculatedDuration:m&&f||null,velocity:D=>ue(T(D)),next:D=>{if(!m&&p<1){const B=Math.exp(-p*k*D),de=Math.sin(S*D),ae=Math.cos(S*D),J=i-B*(E*de+x*ae),W=ue(B*(z*de+j*ae));return a.done=Math.abs(W)<=s&&Math.abs(i-J)<=r,a.value=a.done?i:J,a}const _=y(D);if(m)a.done=D>=f;else{const B=ue(T(D));a.done=Math.abs(B)<=s&&Math.abs(i-_)<=r}return a.value=a.done?i:_,a},toString:()=>{const D=Math.min(Sn(V),Mt),_=xr(B=>V.next(D*B).value,D,30);return D+"ms "+_},toTransition:()=>{}};return V}Et.applyToOptions=e=>{const t=Ll(e,100,Et);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const Bl=5;function br(e,t,n){const s=Math.max(t-Bl,0);return Ws(n-e(s),t-s)}function An({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=j=>a!==void 0&&j<a||c!==void 0&&j>c,g=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let p=n*t;const x=f+p,k=i===void 0?x:i(x);k!==x&&(p=k-f);const v=j=>-p*Math.exp(-j/s),y=j=>k+v(j),T=j=>{const V=v(j),D=y(j);h.done=Math.abs(V)<=d,h.value=h.done?k:D};let S,E;const z=j=>{m(h.value)&&(S=j,E=Et({keyframes:[h.value,g(h.value)],velocity:br(y,j,h.value),damping:r,stiffness:o,restDelta:d,restSpeed:u}))};return z(0),{calculatedDuration:null,next:j=>{let V=!1;return!E&&S===void 0&&(V=!0,T(j),z(j)),S!==void 0&&j>=S?E.next(j-S):(!V&&T(j),h)}}}function $l(e,t,n){const s=[],r=n||Ae.mix||gr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||fe:t;a=it(c,a)}s.push(a)}return s}function Wl(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$l(t,s,r),c=a.length,d=u=>{if(i&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=ot(e[f],e[f+1],u);return a[f](h)};return n?u=>d(be(e[0],e[o-1],u)):d}function Ul(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=ot(0,t,s);e.push($(n,1,r))}}function Gl(e){const t=[0];return Ul(t,e.length-1),t}function Yl(e,t){return e.map(n=>n*t)}function Kl(e,t){return e.map(()=>t||Qs).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=nl(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=Yl(n&&n.length===t.length?n:Gl(t),e),a=Wl(i,t,{ease:Array.isArray(r)?r:Kl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Hl=e=>e!==null;function Vt(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Hl),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Xl={decay:An,inertia:An,tween:Xe,keyframes:Xe,spring:Et};function vr(e){typeof e.type=="string"&&(e.type=Xl[e.type])}class Pn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ql=e=>e/100;class Dt extends Pn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==le.now()&&this.tick(le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vr(t);const{type:n=Xe,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Xe;process.env.NODE_ENV!=="production"&&c!==Xe&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Xe&&typeof a[0]!="number"&&(this.mixKeyframes=it(ql,gr(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Sn(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:m,type:g,onUpdate:p,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const k=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?k<0:k>r;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,T=s;if(f){const j=Math.min(this.currentTime,r)/a;let V=Math.floor(j),D=j%1;!D&&j>=1&&(D=1),D===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/a)):h==="mirror"&&(T=i)),y=be(0,1,D)*a}let S;v?(this.delayState.value=u[0],S=this.delayState):S=T.next(y),o&&!v&&(S.value=o(S.value));let{done:E}=S;!v&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return z&&g!==An&&(S.value=Vt(u,this.options,x,this.speed)),p&&p(S.value),z&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return he(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(this.currentTime)}set time(t){t=ue(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return br(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(le.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=he(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Dl,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);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(le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Zl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ze=e=>e*180/Math.PI,Mn=e=>{const t=ze(Math.atan2(e[1],e[0]));return En(t)},Jl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mn,rotateZ:Mn,skewX:e=>ze(Math.atan(e[1])),skewY:e=>ze(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},En=e=>(e=e%360,e<0&&(e+=360),e),wr=Mn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ql={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kr,scaleY:jr,scale:e=>(kr(e)+jr(e))/2,rotateX:e=>En(ze(Math.atan2(e[6],e[5]))),rotateY:e=>En(ze(Math.atan2(-e[2],e[0]))),rotateZ:wr,rotate:wr,skewX:e=>ze(Math.atan(e[4])),skewY:e=>ze(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vn(e){return e.includes("scale")?1:0}function Dn(e,t){if(!e||e==="none")return Vn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Ql,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Jl,r=a}if(!r)return Vn(t);const o=s[t],i=r[1].split(",").map(tc);return typeof o=="function"?o(i):i[o]}const ec=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Dn(n,t)};function tc(e){return parseFloat(e.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ze=new Set(qe),Tr=e=>e===Ye||e===A,nc=new Set(["x","y","z"]),sc=qe.filter(e=>!nc.has(e));function rc(e){const t=[];return sc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ee={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Dn(t,"x"),y:(e,{transform:t})=>Dn(t,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Oe=new Set;let Ln=!1,Rn=!1,In=!1;function Sr(){if(Rn){const e=Array.from(Oe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=rc(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var a;(a=s.getValue(o))==null||a.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Rn=!1,Ln=!1,Oe.forEach(e=>e.complete(In)),Oe.clear()}function Cr(){Oe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rn=!0)})}function ic(){In=!0,Cr(),Sr(),In=!1}class zn{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Oe.add(this),Ln||(Ln=!0,F.read(Cr),F.resolveKeyframes(Sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}Zl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oe.delete(this)}cancel(){this.state==="scheduled"&&(Oe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const oc=e=>e.startsWith("--");function Nr(e,t,n){oc(t)?e.style.setProperty(t,n):e.style[t]=n}const ac={};function Ar(e,t){const n=$s(e);return()=>ac[t]??n()}const lc=Ar(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pr=Ar(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ut=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ut([0,.65,.55,1]),circOut:ut([.55,0,1,.45]),backIn:ut([.31,.01,.66,-.59]),backOut:ut([.33,1.53,.69,.99])};function Er(e,t){if(e)return typeof e=="function"?Pr()?xr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Er(n,t)||Mr.easeOut):Mr[e]}function cc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Er(a,r);Array.isArray(f)&&(u.easing=f);const h={delay:s,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function Vr(e){return typeof e=="function"&&"applyToOptions"in e}function dc({type:e,...t}){return Vr(e)&&Pr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dr extends Pn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=dc(t);this.animation=cc(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Vt(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Nr(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return he(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ue(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:r}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&lc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),fe):r(this)}}const Lr={anticipate:qs,backInOut:Xs,circInOut:Js};function uc(e){return e in Lr}function fc(e){typeof e.ease=="string"&&uc(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class hc extends Dr{constructor(t){fc(t),vr(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Dt({...i,autoplay:!1}),c=Math.max(On,le.now()-this.startTime),d=be(0,On,c-On),u=a.sample(c).value,{name:f}=this.options;o&&f&&Nr(o,f,u),n.setWithVelocity(a.sample(Math.max(0,c-d)).value,u,d),a.stop()}}const Rr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(me.test(e)||e==="0")&&!e.startsWith("url("));function mc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pc(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Rr(r,t),a=Rr(o,t);return Ge(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:mc(e)||(n==="spring"||Vr(n))&&s}function _n(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),gc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function xc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&gc.test(e[t]))return!0;return!1}const yc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),bc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vc(e){var f;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return bc()&&n&&(Ir.has(n)||yc.has(n)&&xc(a))&&(n!=="transform"||!u)&&!d&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const wc=40;class kc extends Pn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:d,element:u,...f}){var g;super(),this.stop=()=>{var p,x;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=le.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:c,motionValue:d,element:u,...f},m=(u==null?void 0:u.KeyframeResolver)||zn;this.keyframeResolver=new m(a,(p,x,k)=>this.onKeyframesResolved(p,x,h,!k),c,d,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var k,v;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:d,onUpdate:u}=s;this.resolvedAt=le.now();let f=!0;pc(t,o,i,a)||(f=!1,(Ae.instantAnimations||!c)&&(u==null||u(Vt(t,s,n))),t[0]=t[t.length-1],_n(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>wc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!d&&vc(m),p=(v=(k=m.motionValue)==null?void 0:k.owner)==null?void 0:v.current;let x;if(g)try{x=new hc({...m,element:p})}catch{x=new Dt(m)}else x=new Dt(m);x.finished.then(()=>{this.notifyFinished()}).catch(fe),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ic()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function zr(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:a-o*s}const jc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tc(e){const t=jc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Sc=4;function Or(e,t,n=1){Te(n<=Sc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Tc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return _s(i)?parseFloat(i):i}return gn(r)?Or(r,t,n+1):r}const Cc={type:"spring",stiffness:500,damping:25,restSpeed:10},Nc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ac={type:"keyframes",duration:.8},Pc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mc=(e,{keyframes:t})=>t.length>2?Ac:Ze.has(e)?e.startsWith("scale")?Nc(t[1]):Cc:Pc;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Fn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Ec=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Vc(e){for(const t in e)if(!Ec.has(t))return!0;return!1}const Bn=(e,t,n,s={},r,o)=>i=>{const a=Fn(s,e)||{},c=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-ue(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};Vc(a)||Object.assign(u,Mc(e,u)),u.duration&&(u.duration=ue(u.duration)),u.repeatDelay&&(u.repeatDelay=ue(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(_n(u),u.delay===0&&(f=!0)),(Ae.instantAnimations||Ae.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,_n(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=Vt(u.keyframes,a);if(h!==void 0){F.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Dt(u):new kc(u)};function Fr(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function $n(e,t,n,s){if(typeof t=="function"){const[r,o]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function _e(e,t,n){const s=e.getProps();return $n(s,t,n!==void 0?n:s.custom,e)}const Br=new Set(["width","height","top","left","right","bottom",...qe]),$r=30,Dc=e=>!isNaN(parseFloat(e));class Lc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=le.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&fn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new un);const s=this.events[t].add(n);return t==="change"?()=>{s(),F.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$r)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$r);return Ws(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(e,t){return new Lc(e,t)}const Wn=e=>Array.isArray(e);function Rc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Je(n))}function Ic(e){return Wn(e)?e[e.length-1]||0:e}function zc(e,t){const n=_e(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Ic(o[i]);Rc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Oc(e){return!!(ie(e)&&e.add)}function Un(e,t){const n=e.getValue("willChange");if(Oc(n))return n.add(t);if(!n&&Ae.WillChange){const s=new Ae.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Gn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wr="data-"+Gn("framerAppearId");function Ur(e){return e.props[Wr]}function _c({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Gr(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...a}=t;const c=e.getDefaultTransition();o=o?_r(o,c):c;const d=o==null?void 0:o.reduceMotion;s&&(o=s);const u=[],f=r&&e.animationState&&e.animationState.getState()[r];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&_c(f,h))continue;const p={delay:n,...Fn(o||{},h)},x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!p.velocity){F.update(()=>m.set(g));continue}let k=!1;if(window.MotionHandoffAnimation){const T=Ur(e);if(T){const S=window.MotionHandoffAnimation(T,h,F);S!==null&&(p.startTime=S,k=!0)}}Un(e,h);const v=d??e.shouldReduceMotion;m.start(Bn(h,m,g,v&&Br.has(h)?{type:!1}:p,e,k));const y=m.animation;y&&u.push(y)}if(i){const h=()=>F.update(()=>{i&&zc(e,i)});u.length?Promise.all(u).then(h):h()}return u}function Yn(e,t,n={}){var c;const s=_e(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Gr(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=r;return Fc(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[o,i]:[i,o];return d().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function Fc(e,t,n=0,s=0,r=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Yn(c,t,{...i,delay:n+(typeof s=="function"?0:s)+zr(e.variantChildren,c,s,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Bc(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Yn(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Yn(e,t,n);else{const r=typeof t=="function"?_e(e,t,n.custom):t;s=Promise.all(Gr(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const $c={test:e=>e==="auto",parse:e=>e},Yr=e=>t=>t.test(e),Kr=[Ye,A,ve,Me,ml,hl,$c],Hr=e=>Kr.find(Yr(e));function Wc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const Uc=new Set(["brightness","contrast","saturate","opacity"]);function Gc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(xn)||[];if(!s)return e;const r=n.replace(s,"");let o=Uc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Yc=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(Yc);return t?t.map(Gc).join(" "):e}},Hn={...me,getAnimatableNone:e=>{const t=me.parse(e);return me.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Xr={...Ye,transform:Math.round},Xn={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...{rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Me,skewX:Me,skewY:Me,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:lt,originX:lr,originY:lr,originZ:A},zIndex:Xr,fillOpacity:lt,strokeOpacity:lt,numOctaves:Xr},Kc={...Xn,color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:Kn,WebkitFilter:Kn,mask:Hn,WebkitMask:Hn},qr=e=>Kc[e],Hc=new Set([Kn,Hn]);function Zr(e,t){let n=qr(e);return Hc.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Xc=new Set(["auto","none","0"]);function qc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Xc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Zc extends zn{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),gn(f))){const h=Or(f,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Br.has(s)||t.length!==2)return;const[r,o]=t,i=Hr(r),a=Hr(o),c=or(r),d=or(o);if(c!==d&&Ee[s]){this.needsMeasurement=!0;return}if(i!==a)if(Tr(i)&&Tr(a))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else Ee[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Wc(t[r]))&&s.push(r);s.length&&qc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ee[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Ee[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Jr(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Qr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Lt(e){return Fs(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qn}=sr(queueMicrotask,!1),pe={x:!1,y:!1};function ei(){return pe.x||pe.y}function Jc(e){return e==="x"||e==="y"?pe[e]?null:(pe[e]=!0,()=>{pe[e]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function ti(e,t){const n=Jr(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Qc(e){return!(e.pointerType==="touch"||ei())}function ed(e,t,n={}){const[s,r,o]=ti(e,n);return s.forEach(i=>{let a=!1,c=!1,d;const u=()=>{i.removeEventListener("pointerleave",g)},f=x=>{d&&(d(x),d=void 0),u()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(x))},m=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},g=x=>{if(x.pointerType!=="touch"){if(a){c=!0;return}f(x)}},p=x=>{if(!Qc(x))return;c=!1;const k=t(i,x);typeof k=="function"&&(d=k,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",p,r),i.addEventListener("pointerdown",m,r)}),o}const ni=(e,t)=>t?e===t?!0:ni(e,t.parentElement):!1,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,td=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nd(e){return td.has(e.tagName)||e.isContentEditable===!0}const sd=new Set(["INPUT","SELECT","TEXTAREA"]);function rd(e){return sd.has(e.tagName)||e.isContentEditable===!0}const Rt=new WeakSet;function si(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const id=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=si(()=>{if(Rt.has(n))return;Jn(n,"down");const r=si(()=>{Jn(n,"up")}),o=()=>Jn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function ri(e){return Zn(e)&&!ei()}const ii=new WeakSet;function od(e,t,n={}){const[s,r,o]=ti(e,n),i=a=>{const c=a.currentTarget;if(!ri(a)||ii.has(a))return;Rt.add(c),n.stopPropagation&&ii.add(a);const d=t(c,a),u=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Rt.has(c)&&Rt.delete(c),ri(m)&&typeof d=="function"&&d(m,{success:g})},f=m=>{u(m,c===window||c===document||n.useGlobalTarget||ni(c,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),Lt(a)&&(a.addEventListener("focus",d=>id(d,r)),!nd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Qn(e){return Fs(e)&&"ownerSVGElement"in e}const It=new WeakMap;let Ve;const oi=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:Qn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],ad=oi("inline","width","offsetWidth"),ld=oi("block","height","offsetHeight");function cd({target:e,borderBoxSize:t}){var n;(n=It.get(e))==null||n.forEach(s=>{s(e,{get width(){return ad(e,t)},get height(){return ld(e,t)}})})}function dd(e){e.forEach(cd)}function ud(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(dd))}function fd(e,t){Ve||ud();const n=Jr(e);return n.forEach(s=>{let r=It.get(s);r||(r=new Set,It.set(s,r)),r.add(t),Ve==null||Ve.observe(s)}),()=>{n.forEach(s=>{const r=It.get(s);r==null||r.delete(t),r!=null&&r.size||Ve==null||Ve.unobserve(s)})}}const zt=new Set;let Qe;function hd(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zt.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function md(e){return zt.add(e),Qe||hd(),()=>{zt.delete(e),!zt.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?md(e):fd(e,t)}function pd(e){return Qn(e)&&e.tagName==="svg"}const gd=[...Kr,Z,me],xd=e=>gd.find(Yr(e)),li=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:li(),y:li()}),ci=()=>({min:0,max:0}),ee=()=>({x:ci(),y:ci()}),yd=new WeakMap;function Ot(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ft(e){return typeof e=="string"||Array.isArray(e)}const es=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ts=["initial",...es];function _t(e){return Ot(e.animate)||ts.some(t=>ft(e[t]))}function di(e){return!!(_t(e)||e.variants)}function bd(e,t,n){for(const s in t){const r=t[s],o=n[s];if(ie(r))e.addValue(s,r);else if(ie(o))e.addValue(s,Je(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Je(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ns={current:null},ui={current:!1},vd=typeof window<"u";function wd(){if(ui.current=!0,!!vd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ns.current=e.matches;e.addEventListener("change",t),t()}else ns.current=!1}const fi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ft={};function hi(e){Ft=e}function kd(){return Ft}class jd{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=le.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,F.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=a;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=_t(n),this.isVariantNode=di(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];d[m]!==void 0&&ie(g)&&g.set(d[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,yd.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ui.current||wd(),this.shouldReduceMotion=ns.current),process.env.NODE_ENV!=="production"&&fn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Pe(this.notifyUpdate),Pe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ir.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:a,times:c,ease:d,duration:u}=n.accelerate,f=new Dr({element:this.current,name:t,keyframes:a,times:c,ease:d,duration:ue(u)}),h=i(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=Ze.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&F.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ft){const n=Ft[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];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):ee()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<fi.length;s++){const r=fi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=bd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Je(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(_s(s)||Bs(s))?s=parseFloat(s):!xd(s)&&me.test(n)&&(s=Zr(t,n)),this.setBaseTarget(t,ie(s)?s.get():s)),ie(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=$n(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){qn.render(this.render)}}class mi extends jd{constructor(){super(...arguments),this.KeyframeResolver=Zc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class De{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pi({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Td({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sd(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ss(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!ss(e)||!ss(t)||!ss(n)}function Fe(e){return rs(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return xi(e.x)||xi(e.y)}function xi(e){return e&&e!=="0%"}function Bt(e,t,n){const s=e-n,r=t*s;return n+r}function yi(e,t,n,s,r){return r!==void 0&&(e=Bt(e,r,s)),Bt(e,n,s)+t}function is(e,t=0,n=1,s,r){e.min=yi(e.min,t,n,s,r),e.max=yi(e.max,t,n,s,r)}function bi(e,{x:t,y:n}){is(e.x,t.translate,t.scale,t.originPoint),is(e.y,n.translate,n.scale,n.originPoint)}const vi=.999999999999,wi=1.0000000000001;function Cd(e,t,n,s=!1){var a;const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let c=0;c<r;c++){o=n[c],i=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(we(e.x,-o.scroll.offset.x),we(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),s&&Fe(o.latestValues)&&$t(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<wi&&t.x>vi&&(t.x=1),t.y<wi&&t.y>vi&&(t.y=1)}function we(e,t){e.min+=t,e.max+=t}function ki(e,t,n,s,r=.5){const o=$(e.min,e.max,r);is(e,t,n,o,s)}function ji(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function $t(e,t,n){const s=n??e;ki(e.x,ji(t.x,s.x),t.scaleX,t.scale,t.originX),ki(e.y,ji(t.y,s.y),t.scaleY,t.scale,t.originY)}function Ti(e,t){return pi(Sd(e.getBoundingClientRect(),t))}function Nd(e,t,n){const s=Ti(e,n),{scroll:r}=t;return r&&(we(s.x,r.offset.x),we(s.y,r.offset.y)),s}const Ad={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pd=qe.length;function Md(e,t,n){let s="",r=!0;for(let o=0;o<Pd;o++){const i=qe[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(i.startsWith("scale")?1:0);else{const d=parseFloat(a);c=i.startsWith("scale")?d===1:d===0}if(!c||n){const d=Qr(a,Xn[i]);if(!c){r=!1;const u=Ad[i]||i;s+=`${u}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function os(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const d=t[c];if(Ze.has(c)){i=!0;continue}else if(ir(c)){r[c]=d;continue}else{const u=Qr(d,Xn[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(t.transform||(i||n?s.transform=Md(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${d} ${u}`}}function Si(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ci(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ht={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Ed={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=me.parse(e);if(r.length>5)return s;const o=me.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=c;const d=$(a,c,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},as={borderRadius:{...ht,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomLeftRadius:ht,borderBottomRightRadius:ht,boxShadow:Ed};function Ni(e,{layout:t,layoutId:n}){return Ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!as[e]||e==="opacity")}function ls(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const a in s)(ie(s[a])||r&&ie(r[a])||Ni(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Vd(e){return window.getComputedStyle(e)}class Dd extends mi{constructor(){super(...arguments),this.type="html",this.renderInstance=Si}readValueFromInstance(t,n){var s;if(Ze.has(n))return(s=this.projection)!=null&&s.isProjecting?Vn(n):ec(t,n);{const r=Vd(t),o=(ir(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ti(t,n)}build(t,n,s){os(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return ls(t,n,s)}}const Ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rd={offset:"strokeDashoffset",array:"strokeDasharray"};function Id(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Ld:Rd;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const zd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ai(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},c,d,u){if(os(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const m of zd)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&Id(f,r,o,i,!1)}const Pi=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"]),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Od(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Pi.has(r)?r:Gn(r),t.attrs[r])}function Ei(e,t,n){const s=ls(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const o=qe.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class _d extends mi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ze.has(n)){const s=qr(n);return s&&s.default||0}return n=Pi.has(n)?n:Gn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ei(t,n,s)}build(t,n,s){Ai(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Od(t,n,s,r)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const Fd=ts.length;function Vi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Fd;n++){const s=ts[n],r=e.props[s];(ft(r)||r===!1)&&(t[s]=r)}return t}function Di(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Bd=[...es].reverse(),$d=es.length;function Wd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Bc(e,n,s)))}function Ud(e){let t=Wd(e),n=Li(),s=!0,r=!1;const o=d=>(u,f)=>{var m;const h=_e(e,f,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:p,...x}=h;u={...u,...x,...p}}return u};function i(d){t=d(e)}function a(d){const{props:u}=e,f=Vi(e.parent)||{},h=[],m=new Set;let g={},p=1/0;for(let k=0;k<$d;k++){const v=Bd[k],y=n[v],T=u[v]!==void 0?u[v]:f[v],S=ft(T),E=v===d?y.isActive:null;E===!1&&(p=k);let z=T===f[v]&&T!==u[v]&&S;if(z&&(s||r)&&e.manuallyAnimateOnMount&&(z=!1),y.protectedKeys={...g},!y.isActive&&E===null||!T&&!y.prevProp||Ot(T)||typeof T=="boolean")continue;if(v==="exit"&&y.isActive&&E!==!0){y.prevResolvedValues&&(g={...g,...y.prevResolvedValues});continue}const j=Gd(y.prevProp,T);let V=j||v===d&&y.isActive&&!z&&S||k>p&&S,D=!1;const _=Array.isArray(T)?T:[T];let B=_.reduce(o(v),{});E===!1&&(B={});const{prevResolvedValues:de={}}=y,ae={...de,...B},J=Y=>{V=!0,m.has(Y)&&(D=!0,m.delete(Y)),y.needsAnimating[Y]=!0;const ne=e.getValue(Y);ne&&(ne.liveStyle=!1)};for(const Y in ae){const ne=B[Y],P=de[Y];if(g.hasOwnProperty(Y))continue;let w=!1;Wn(ne)&&Wn(P)?w=!Di(ne,P):w=ne!==P,w?ne!=null?J(Y):m.add(Y):ne!==void 0&&m.has(Y)?J(Y):y.protectedKeys[Y]=!0}y.prevProp=T,y.prevResolvedValues=B,y.isActive&&(g={...g,...B}),(s||r)&&e.blockInitialAnimation&&(V=!1);const W=z&&j;V&&(!W||D)&&h.push(..._.map(Y=>{const ne={type:v};if(typeof Y=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,w=_e(P,Y);if(P.enteringChildren&&w){const{delayChildren:R}=w.transition||{};ne.delay=zr(P.enteringChildren,e,R)}}return{animation:Y,options:ne}}))}if(m.size){const k={};if(typeof u.initial!="boolean"){const v=_e(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(k.transition=v.transition)}m.forEach(v=>{const y=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),k[v]=y??null}),h.push({animation:k})}let x=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),s=!1,r=!1,x?t(h):Promise.resolve()}function c(d,u){var h;if(n[d].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(d,u)}),n[d].isActive=u;const f=a(d);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Li(),r=!0}}}function Gd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Di(t,e):!1}function Be(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Li(){return{animate:Be(!0),whileInView:Be(),whileHover:Be(),whileTap:Be(),whileDrag:Be(),whileFocus:Be(),exit:Be()}}function cs(e,t){e.min=t.min,e.max=t.max}function ge(e,t){cs(e.x,t.x),cs(e.y,t.y)}function Ri(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ii=1e-4,Yd=1-Ii,Kd=1+Ii,zi=.01,Hd=0-zi,Xd=0+zi;function ce(e){return e.max-e.min}function qd(e,t,n){return Math.abs(e-t)<=n}function Oi(e,t,n,s=.5){e.origin=s,e.originPoint=$(t.min,t.max,e.origin),e.scale=ce(n)/ce(t),e.translate=$(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Yd&&e.scale<=Kd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hd&&e.translate<=Xd||isNaN(e.translate))&&(e.translate=0)}function mt(e,t,n,s){Oi(e.x,t.x,n.x,s?s.originX:void 0),Oi(e.y,t.y,n.y,s?s.originY:void 0)}function _i(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=r+t.min,e.max=e.min+ce(t)}function Zd(e,t,n,s){_i(e.x,t.x,n.x,s==null?void 0:s.x),_i(e.y,t.y,n.y,s==null?void 0:s.y)}function Fi(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=t.min-r,e.max=e.min+ce(t)}function Wt(e,t,n,s){Fi(e.x,t.x,n.x,s==null?void 0:s.x),Fi(e.y,t.y,n.y,s==null?void 0:s.y)}function Bi(e,t,n,s,r){return e-=t,e=Bt(e,1/n,s),r!==void 0&&(e=Bt(e,1/r,s)),e}function Jd(e,t=0,n=1,s=.5,r,o=e,i=e){if(ve.test(t)&&(t=parseFloat(t),t=$(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=$(o.min,o.max,s);e===o&&(a-=t),e.min=Bi(e.min,t,n,a,r),e.max=Bi(e.max,t,n,a,r)}function $i(e,t,[n,s,r],o,i){Jd(e,t[n],t[s],t[r],t.scale,o,i)}const Qd=["x","scaleX","originX"],eu=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Qd,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,eu,n?n.y:void 0,s?s.y:void 0)}function Ui(e){return e.translate===0&&e.scale===1}function Gi(e){return Ui(e.x)&&Ui(e.y)}function Yi(e,t){return e.min===t.min&&e.max===t.max}function tu(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Xi(e){return ce(e.x)/ce(e.y)}function qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ke(e){return[e("x"),e("y")]}function nu(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||o||i)&&(s=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Zi=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],su=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||A.test(e);function ru(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,iu(s)),e.opacityExit=$(t.opacity??1,0,ou(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<su;i++){const a=Zi[i];let c=eo(t,a),d=eo(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Qi(c)===Qi(d)?(e[a]=Math.max($(Ji(c),Ji(d),s),0),(ve.test(d)||ve.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=$(t.rotate||0,n.rotate||0,s))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const iu=to(0,.5,Zs),ou=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(ot(e,t,s))}function au(e,t,n){const s=ie(e)?e:Je(e);return s.start(Bn("",s,t,n)),s.animation}function pt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const lu=(e,t)=>e.depth-t.depth;class cu{constructor(){this.children=[],this.isDirty=!1}add(t){cn(this.children,t),this.isDirty=!0}remove(t){St(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lu),this.isDirty=!1,this.children.forEach(t)}}function du(e,t){const n=le.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Pe(s),e(o-t))};return F.setup(s,!0),()=>Pe(s)}function Ut(e){return ie(e)?e.get():e}class uu{constructor(){this.members=[]}add(t){cn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const r=s.instance;(!r||r.isConnected===!1)&&!s.snapshot&&(St(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(St(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let s=this.members.indexOf(t)-1;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1&&((n=r.instance)==null?void 0:n.isConnected)!==!1)return this.promote(r),!0}return!1}promote(t,n){var r;const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=s.options,{layoutDependency:i}=t.options;(o===void 0||o!==i)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),(r=t.root)!=null&&r.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,s,r,o,i;(s=(n=t.options).onExitComplete)==null||s.call(n),(i=(r=t.resumingFrom)==null?void 0:(o=r.options).onExitComplete)==null||i.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Gt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ds=["","X","Y","Z"],fu=1e3;let hu=0;function us(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function no(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ur(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&no(s)}function so({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=hu++,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(gu),this.nodes.forEach(ku),this.nodes.forEach(ju),this.nodes.forEach(xu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 cu)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new un),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Qn(i)&&!pd(i),this.instance=i;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;F.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=du(h,250),Gt.hasAnimatedSinceResize&&(Gt.hasAnimatedSinceResize=!1,this.nodes.forEach(oo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||Au,{onLayoutAnimationStart:p,onLayoutAnimationComplete:x}=d.getProps(),k=!this.targetLayout||!Hi(this.targetLayout,m),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Fn(g,"layout"),onPlay:p,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,v)}else f||oo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pe(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(Tu),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&no(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,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(bu),this.nodes.forEach(ro);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(io);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vu),this.nodes.forEach(wu),this.nodes.forEach(mu),this.nodes.forEach(pu)):this.nodes.forEach(io),this.clearAllSnapshots();const a=le.now();re.delta=be(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,pn.update.process(re),pn.preRender.process(re),pn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(Su)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ce(this.snapshot.measuredBox.x)&&!ce(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 i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ee()),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;i&&this.instance&&(a||Fe(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),Pu(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:i}=this.options;if(!i)return ee();const a=i.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Mu))){const{scroll:u}=this.root;u&&(we(a.x,u.offset.x),we(a.y,u.offset.y))}return a}removeElementScroll(i){var c;const a=ee();if(ge(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ge(a,i),we(a.x,f.offset.x),we(a.y,f.offset.y))}return a}applyTransform(i,a=!1,c){var u,f;const d=c||ee();ge(d,i);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(we(d.x,-m.scroll.offset.x),we(d.y,-m.scroll.offset.y)),Fe(m.latestValues)&&$t(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return Fe(this.latestValues)&&$t(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(i){var c;const a=ee();ge(a,i);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Fe(u.latestValues))continue;let f;u.instance&&(rs(u.latestValues)&&u.updateSnapshot(),f=ee(),ge(f,u.measurePageBox())),Wi(a,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,f)}return Fe(this.latestValues)&&Wi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var m;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=re.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ee(),this.targetWithTransforms=ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ge(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ee(),this.relativeTargetOrigin=ee(),Wt(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===re.timestamp&&(c=!1),c)return;const{layout:d,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||!(d||u))return;ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Cd(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=ee());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ri(this.prevProjectionDelta.x,this.projectionDelta.x),Ri(this.prevProjectionDelta.y,this.projectionDelta.y)),mt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(i,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ee(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,p=m!==g,x=this.getStack(),k=!x||x.members.length<=1,v=!!(p&&!k&&this.options.crossfade===!0&&!this.path.some(Nu));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;ao(f.x,i.x,S),ao(f.y,i.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Cu(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&tu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ee()),ge(y,this.relativeTarget)),p&&(this.animationValues=u,ru(u,d,this.latestValues,S,v,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Gt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=au(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=i;if(!(!a||!c||!d)){if(this!==i&&this.layout&&d&&ho(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||ee();const f=ce(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+f;const h=ce(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}ge(a,c),$t(a,u),mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new uu),this.sharedNodes.get(i).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&us("z",i,d,this.animationValues);for(let u=0;u<ds.length;u++)us(`rotate${ds[u]}`,i,d,this.animationValues),us(`skew${ds[u]}`,i,d,this.animationValues);i.render();for(const u in d)i.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Ut(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ut(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fe(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=nu(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),i.transform=f;const{x:h,y:m}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,d.animationValues?i.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in as){if(u[g]===void 0)continue;const{correct:p,applyTo:x,isCSSVariable:k}=as[g],v=f==="none"?u[g]:p(u[g],d);if(x){const y=x.length;for(let T=0;T<y;T++)i[x[T]]=v}else k?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=d===this?Ut(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function mu(e){e.updateLayout()}function pu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;if(o==="size")ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=ce(h);h.min=s[f].min,h.max=h.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";cs(i?t.measuredBox[f]:t.layoutBox[f],s[f])}else ho(o,t.layoutBox,s)&&ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=ce(s[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=et();mt(a,s,t.layoutBox);const c=et();i?mt(c,e.applyTransform(r,!0),t.measuredBox):mt(c,s,t.layoutBox);const d=!Gi(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,p=ee();Wt(p,t.layoutBox,h.layoutBox,g);const x=ee();Wt(x,s,m.layoutBox,g),Hi(p,x)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function gu(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function xu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yu(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function bu(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function vu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function wu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ku(e){e.resolveTargetDelta()}function ju(e){e.calcProjection()}function Tu(e){e.resetSkewAndRotation()}function Su(e){e.removeLeadSnapshot()}function ao(e,t,n){e.translate=$(t.translate,0,n),e.scale=$(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lo(e,t,n,s){e.min=$(t.min,n.min,s),e.max=$(t.max,n.max,s)}function Cu(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function Nu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Au={duration:.45,ease:[.4,0,.1,1]},co=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uo=co("applewebkit/")&&!co("chrome/")?Math.round:fe;function fo(e){e.min=uo(e.min),e.max=uo(e.max)}function Pu(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!qd(Xi(t),Xi(n),.2)}function Mu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Eu=so({attachResizeListener:(e,t)=>pt(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),fs={current:void 0},mo=so({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fs.current){const e=new Eu({});e.mount(window),e.setOptions({layoutScroll:!0}),fs.current=e}return fs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hs=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function po(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vu(...e){return t=>{let n=!1;const s=e.map(r=>{const o=po(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():po(e[r],null)}}}}function Du(...e){return vt.useCallback(Vu(...e),e)}class Lu extends vt.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Lt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Lt(s)&&s.offsetWidth||0,o=Lt(s)&&s.offsetHeight||0,i=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=r-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ru({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var h;const i=b.useId(),a=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=b.useContext(hs),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=Du(a,u);return b.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:x,right:k,bottom:v}=c.current;if(t||o===!1||!a.current||!m||!g)return;const y=n==="left"?`left: ${x}`:`right: ${k}`,T=s==="bottom"?`bottom: ${v}`:`top: ${p}`;a.current.dataset.motionPopId=i;const S=document.createElement("style");d&&(S.nonce=d);const E=r??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
162
|
+
*/const Ne=G("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),an=b.createContext({});function ln(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Os=typeof window<"u"?b.useLayoutEffect:b.useEffect,Tt=b.createContext(null);function cn(e,t){e.indexOf(t)===-1&&e.push(t)}function St(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const be=(e,t,n)=>n>t?t:n<e?e:n;function dn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ge=()=>{},Te=()=>{};typeof process<"u"&&((Sa=process.env)==null?void 0:Sa.NODE_ENV)!=="production"&&(Ge=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(dn(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(dn(t,n))});const Pe={},_s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fs(e){return typeof e=="object"&&e!==null}const Bs=e=>/^0[^.\s]+$/u.test(e);function $s(e){let t;return()=>(t===void 0&&(t=e()),t)}const fe=e=>e,qa=(e,t)=>n=>t(e(n)),it=(...e)=>e.reduce(qa),ot=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class un{constructor(){this.subscriptions=[]}add(t){return cn(this.subscriptions,t),()=>St(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ue=e=>e*1e3,he=e=>e/1e3;function Ws(e,t){return t?e*(1e3/t):0}const Us=new Set;function fn(e,t,n){e||Us.has(t)||(console.warn(dn(t,n)),Us.add(t))}const Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Za=1e-7,Ja=12;function Qa(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=Gs(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>Za&&++a<Ja);return i}function at(e,t,n,s){if(e===t&&n===s)return fe;const r=o=>Qa(o,0,1,e,n);return o=>o===0||o===1?o:Gs(r(o),t,s)}const Ys=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ks=e=>t=>1-e(1-t),Hs=at(.33,1.53,.69,.99),hn=Ks(Hs),Xs=Ys(hn),qs=e=>e>=1?1:(e*=2)<1?.5*hn(e):.5*(2-Math.pow(2,-10*(e-1))),mn=e=>1-Math.sin(Math.acos(e)),Zs=Ks(mn),Js=Ys(mn),el=at(.42,0,1,1),tl=at(0,0,.58,1),Qs=at(.42,0,.58,1),nl=e=>Array.isArray(e)&&typeof e[0]!="number",er=e=>Array.isArray(e)&&typeof e[0]=="number",tr={linear:fe,easeIn:el,easeInOut:Qs,easeOut:tl,circIn:mn,circInOut:Js,circOut:Zs,backIn:hn,backInOut:Xs,backOut:Hs,anticipate:qs},sl=e=>typeof e=="string",nr=e=>{if(er(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return at(t,n,s,r)}else if(sl(e))return Te(tr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tr[e];return e},Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rl(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){i.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,f=!1,h=!1)=>{const g=h&&r?n:s;return f&&i.add(u),g.add(u),u},cancel:u=>{s.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),r=!1,o&&(o=!1,d.process(u))}};return d}const il=40;function sr(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Ct.reduce((y,T)=>(y[T]=rl(o),y),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:m,postRender:g}=i,p=()=>{const y=Pe.useManualTiming,T=y?r.timestamp:performance.now();n=!1,y||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,il),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),f.process(r),h.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(p))},x=()=>{n=!0,s=!0,r.isProcessing||e(p)};return{schedule:Ct.reduce((y,T)=>{const S=i[T];return y[T]=(E,z=!1,j=!1)=>(n||x(),S.schedule(E,z,j)),y},{}),cancel:y=>{for(let T=0;T<Ct.length;T++)i[Ct[T]].cancel(y)},state:r,steps:i}}const{schedule:F,cancel:Ae,state:re,steps:pn}=sr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0);let Nt;function ol(){Nt=void 0}const le={now:()=>(Nt===void 0&&le.set(re.isProcessing||Pe.useManualTiming?re.timestamp:performance.now()),Nt),set:e=>{Nt=e,queueMicrotask(ol)}},rr=e=>t=>typeof t=="string"&&t.startsWith(e),ir=rr("--"),al=rr("var(--"),gn=e=>al(e)?ll.test(e.split("/*")[0].trim()):!1,ll=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function or(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ye={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lt={...Ye,transform:e=>be(0,1,e)},Pt={...Ye,default:1},ct=e=>Math.round(e*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cl(e){return e==null}const dl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yn=(e,t)=>n=>!!(typeof n=="string"&&dl.test(n)&&n.startsWith(e)||t&&!cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),ar=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(xn);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},ul=e=>be(0,255,e),bn={...Ye,transform:e=>Math.round(ul(e))},Ie={test:yn("rgb","red"),parse:ar("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+bn.transform(e)+", "+bn.transform(t)+", "+bn.transform(n)+", "+ct(lt.transform(s))+")"};function fl(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const vn={test:yn("#"),parse:fl,transform:Ie.transform},dt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=dt("deg"),ve=dt("%"),P=dt("px"),hl=dt("vh"),ml=dt("vw"),lr={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ke={test:yn("hsl","hue"),parse:ar("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ve.transform(ct(t))+", "+ve.transform(ct(n))+", "+ct(lt.transform(s))+")"},Z={test:e=>Ie.test(e)||vn.test(e)||Ke.test(e),parse:e=>Ie.test(e)?Ie.parse(e):Ke.test(e)?Ke.parse(e):vn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ie.transform(e):Ke.transform(e),getAnimatableNone:e=>{const t=Z.parse(e);return t.alpha=0,Z.transform(t)}},pl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xn))==null?void 0:t.length)||0)+(((n=e.match(pl))==null?void 0:n.length)||0)>0}const cr="number",dr="color",xl="var",yl="var(",ur="${}",bl=/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 He(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(bl,c=>(Z.test(c)?(s.color.push(o),r.push(dr),n.push(Z.parse(c))):c.startsWith(yl)?(s.var.push(o),r.push(xl),n.push(c)):(s.number.push(o),r.push(cr),n.push(parseFloat(c))),++o,ur)).split(ur);return{values:n,split:a,indexes:s,types:r}}function vl(e){return He(e).values}function fr({split:e,types:t}){const n=e.length;return s=>{let r="";for(let o=0;o<n;o++)if(r+=e[o],s[o]!==void 0){const i=t[o];i===cr?r+=ct(s[o]):i===dr?r+=Z.transform(s[o]):r+=s[o]}return r}}function wl(e){return fr(He(e))}const kl=e=>typeof e=="number"?0:Z.test(e)?Z.getAnimatableNone(e):e,jl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:kl(e);function Tl(e){const t=He(e);return fr(t)(t.values.map((s,r)=>jl(s,t.split[r])))}const me={test:gl,parse:vl,createTransformer:wl,getAnimatableNone:Tl};function wn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Sl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=wn(c,a,e+1/3),o=wn(c,a,e),i=wn(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function At(e,t){return n=>n>0?t:e}const $=(e,t,n)=>e+(t-e)*n,kn=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Cl=[vn,Ie,Ke],Nl=e=>Cl.find(t=>t.test(e));function hr(e){const t=Nl(e);if(Ge(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ke&&(n=Sl(n)),n}const mr=(e,t)=>{const n=hr(e),s=hr(t);if(!n||!s)return At(e,t);const r={...n};return o=>(r.red=kn(n.red,s.red,o),r.green=kn(n.green,s.green,o),r.blue=kn(n.blue,s.blue,o),r.alpha=$(n.alpha,s.alpha,o),Ie.transform(r))},jn=new Set(["none","hidden"]);function Pl(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Al(e,t){return n=>$(e,t,n)}function Tn(e){return typeof e=="number"?Al:typeof e=="string"?gn(e)?At:Z.test(e)?mr:Vl:Array.isArray(e)?pr:typeof e=="object"?Z.test(e)?mr:Ml:At}function pr(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>Tn(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Ml(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=Tn(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function El(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],a=e.values[i]??0;n[r]=a,s[o]++}return n}const Vl=(e,t)=>{const n=me.createTransformer(t),s=He(e),r=He(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?jn.has(e)&&!r.values.length||jn.has(t)&&!s.values.length?Pl(e,t):it(pr(El(s,r),r.values),n):(Ge(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),At(e,t))};function gr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$(e,t,n):Tn(e)(e,t)}const Dl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>F.update(t,n),stop:()=>Ae(t),now:()=>re.isProcessing?re.timestamp:le.now()}},xr=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Mt=2e4;function Sn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Mt;)t+=n,s=e.next(t);return t>=Mt?1/0:t}function Ll(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(Sn(s),Mt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:he(r)}}const H={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};function Cn(e,t){return e*Math.sqrt(1-t*t)}const Rl=12;function Il(e,t,n){let s=n;for(let r=1;r<Rl;r++)s=s-e(s)/t(s);return s}const Nn=.001;function zl({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:s=H.mass}){let r,o;Ge(e<=ue(H.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=be(H.minDamping,H.maxDamping,i),e=be(H.minDuration,H.maxDuration,he(e)),i<1?(r=d=>{const u=d*i,f=u*e,h=u-n,m=Cn(d,i),g=Math.exp(-f);return Nn-h/m*g},o=d=>{const f=d*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-f),p=Cn(Math.pow(d,2),i);return(-r(d)+Nn>0?-1:1)*((h-m)*g)/p}):(r=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-Nn+u*f},o=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=Il(r,o,a);if(e=ue(e),isNaN(c))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const Ol=["duration","bounce"],_l=["stiffness","damping","mass"];function yr(e,t){return t.some(n=>e[n]!==void 0)}function Fl(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!yr(e,_l)&&yr(e,Ol))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:H.mass,stiffness:r,damping:o}}else{const n=zl({...e,velocity:0});t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Et(e=H.visualDuration,t=H.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=Fl({...n,velocity:-he(n.velocity||0)}),g=h||0,p=d/(2*Math.sqrt(c*u)),x=i-o,k=he(Math.sqrt(c/u)),v=Math.abs(x)<5;s||(s=v?H.restSpeed.granular:H.restSpeed.default),r||(r=v?H.restDelta.granular:H.restDelta.default);let y,T,S,E,z,j;if(p<1)S=Cn(k,p),E=(g+p*k*x)/S,y=D=>{const _=Math.exp(-p*k*D);return i-_*(E*Math.sin(S*D)+x*Math.cos(S*D))},z=p*k*E+x*S,j=p*k*x-E*S,T=D=>Math.exp(-p*k*D)*(z*Math.sin(S*D)+j*Math.cos(S*D));else if(p===1){y=_=>i-Math.exp(-k*_)*(x+(g+k*x)*_);const D=g+k*x;T=_=>Math.exp(-k*_)*(k*D*_-g)}else{const D=k*Math.sqrt(p*p-1);y=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return i-J*((g+p*k*x)*Math.sinh(W)+D*x*Math.cosh(W))/D};const _=(g+p*k*x)/D,B=p*k*_-x*D,de=p*k*x-_*D;T=ae=>{const J=Math.exp(-p*k*ae),W=Math.min(D*ae,300);return J*(B*Math.sinh(W)+de*Math.cosh(W))}}const V={calculatedDuration:m&&f||null,velocity:D=>ue(T(D)),next:D=>{if(!m&&p<1){const B=Math.exp(-p*k*D),de=Math.sin(S*D),ae=Math.cos(S*D),J=i-B*(E*de+x*ae),W=ue(B*(z*de+j*ae));return a.done=Math.abs(W)<=s&&Math.abs(i-J)<=r,a.value=a.done?i:J,a}const _=y(D);if(m)a.done=D>=f;else{const B=ue(T(D));a.done=Math.abs(B)<=s&&Math.abs(i-_)<=r}return a.value=a.done?i:_,a},toString:()=>{const D=Math.min(Sn(V),Mt),_=xr(B=>V.next(D*B).value,D,30);return D+"ms "+_},toTransition:()=>{}};return V}Et.applyToOptions=e=>{const t=Ll(e,100,Et);return e.ease=t.ease,e.duration=ue(t.duration),e.type="keyframes",e};const Bl=5;function br(e,t,n){const s=Math.max(t-Bl,0);return Ws(n-e(s),t-s)}function Pn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=j=>a!==void 0&&j<a||c!==void 0&&j>c,g=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let p=n*t;const x=f+p,k=i===void 0?x:i(x);k!==x&&(p=k-f);const v=j=>-p*Math.exp(-j/s),y=j=>k+v(j),T=j=>{const V=v(j),D=y(j);h.done=Math.abs(V)<=d,h.value=h.done?k:D};let S,E;const z=j=>{m(h.value)&&(S=j,E=Et({keyframes:[h.value,g(h.value)],velocity:br(y,j,h.value),damping:r,stiffness:o,restDelta:d,restSpeed:u}))};return z(0),{calculatedDuration:null,next:j=>{let V=!1;return!E&&S===void 0&&(V=!0,T(j),z(j)),S!==void 0&&j>=S?E.next(j-S):(!V&&T(j),h)}}}function $l(e,t,n){const s=[],r=n||Pe.mix||gr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||fe:t;a=it(c,a)}s.push(a)}return s}function Wl(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$l(t,s,r),c=a.length,d=u=>{if(i&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=ot(e[f],e[f+1],u);return a[f](h)};return n?u=>d(be(e[0],e[o-1],u)):d}function Ul(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=ot(0,t,s);e.push($(n,1,r))}}function Gl(e){const t=[0];return Ul(t,e.length-1),t}function Yl(e,t){return e.map(n=>n*t)}function Kl(e,t){return e.map(()=>t||Qs).splice(0,e.length-1)}function Xe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=nl(s)?s.map(nr):nr(s),o={done:!1,value:t[0]},i=Yl(n&&n.length===t.length?n:Gl(t),e),a=Wl(i,t,{ease:Array.isArray(r)?r:Kl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Hl=e=>e!==null;function Vt(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(Hl),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Xl={decay:Pn,inertia:Pn,tween:Xe,keyframes:Xe,spring:Et};function vr(e){typeof e.type=="string"&&(e.type=Xl[e.type])}class An{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ql=e=>e/100;class Dt extends An{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==le.now()&&this.tick(le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vr(t);const{type:n=Xe,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Xe;process.env.NODE_ENV!=="production"&&c!==Xe&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Xe&&typeof a[0]!="number"&&(this.mixKeyframes=it(ql,gr(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Sn(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:m,type:g,onUpdate:p,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const k=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?k<0:k>r;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,T=s;if(f){const j=Math.min(this.currentTime,r)/a;let V=Math.floor(j),D=j%1;!D&&j>=1&&(D=1),D===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(h==="reverse"?(D=1-D,m&&(D-=m/a)):h==="mirror"&&(T=i)),y=be(0,1,D)*a}let S;v?(this.delayState.value=u[0],S=this.delayState):S=T.next(y),o&&!v&&(S.value=o(S.value));let{done:E}=S;!v&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return z&&g!==Pn&&(S.value=Vt(u,this.options,x,this.speed)),p&&p(S.value),z&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return he(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(this.currentTime)}set time(t){t=ue(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return br(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(le.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=he(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Dl,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);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(le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Zl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ze=e=>e*180/Math.PI,Mn=e=>{const t=ze(Math.atan2(e[1],e[0]));return En(t)},Jl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mn,rotateZ:Mn,skewX:e=>ze(Math.atan(e[1])),skewY:e=>ze(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},En=e=>(e=e%360,e<0&&(e+=360),e),wr=Mn,kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ql={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kr,scaleY:jr,scale:e=>(kr(e)+jr(e))/2,rotateX:e=>En(ze(Math.atan2(e[6],e[5]))),rotateY:e=>En(ze(Math.atan2(-e[2],e[0]))),rotateZ:wr,rotate:wr,skewX:e=>ze(Math.atan(e[4])),skewY:e=>ze(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vn(e){return e.includes("scale")?1:0}function Dn(e,t){if(!e||e==="none")return Vn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Ql,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Jl,r=a}if(!r)return Vn(t);const o=s[t],i=r[1].split(",").map(tc);return typeof o=="function"?o(i):i[o]}const ec=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Dn(n,t)};function tc(e){return parseFloat(e.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ze=new Set(qe),Tr=e=>e===Ye||e===P,nc=new Set(["x","y","z"]),sc=qe.filter(e=>!nc.has(e));function rc(e){const t=[];return sc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ee={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const r=e.max-e.min;return s==="border-box"?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Dn(t,"x"),y:(e,{transform:t})=>Dn(t,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Oe=new Set;let Ln=!1,Rn=!1,In=!1;function Sr(){if(Rn){const e=Array.from(Oe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=rc(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var a;(a=s.getValue(o))==null||a.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Rn=!1,Ln=!1,Oe.forEach(e=>e.complete(In)),Oe.clear()}function Cr(){Oe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rn=!0)})}function ic(){In=!0,Cr(),Sr(),In=!1}class zn{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Oe.add(this),Ln||(Ln=!0,F.read(Cr),F.resolveKeyframes(Sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}Zl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oe.delete(this)}cancel(){this.state==="scheduled"&&(Oe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const oc=e=>e.startsWith("--");function Nr(e,t,n){oc(t)?e.style.setProperty(t,n):e.style[t]=n}const ac={};function Pr(e,t){const n=$s(e);return()=>ac[t]??n()}const lc=Pr(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ar=Pr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ut=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ut([0,.65,.55,1]),circOut:ut([.55,0,1,.45]),backIn:ut([.31,.01,.66,-.59]),backOut:ut([.33,1.53,.69,.99])};function Er(e,t){if(e)return typeof e=="function"?Ar()?xr(e,t):"ease-out":er(e)?ut(e):Array.isArray(e)?e.map(n=>Er(n,t)||Mr.easeOut):Mr[e]}function cc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Er(a,r);Array.isArray(f)&&(u.easing=f);const h={delay:s,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function Vr(e){return typeof e=="function"&&"applyToOptions"in e}function dc({type:e,...t}){return Vr(e)&&Ar()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dr extends An{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=dc(t);this.animation=cc(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Vt(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Nr(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return he(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ue(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:r}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&lc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),fe):r(this)}}const Lr={anticipate:qs,backInOut:Xs,circInOut:Js};function uc(e){return e in Lr}function fc(e){typeof e.ease=="string"&&uc(e.ease)&&(e.ease=Lr[e.ease])}const On=10;class hc extends Dr{constructor(t){fc(t),vr(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Dt({...i,autoplay:!1}),c=Math.max(On,le.now()-this.startTime),d=be(0,On,c-On),u=a.sample(c).value,{name:f}=this.options;o&&f&&Nr(o,f,u),n.setWithVelocity(a.sample(Math.max(0,c-d)).value,u,d),a.stop()}}const Rr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(me.test(e)||e==="0")&&!e.startsWith("url("));function mc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pc(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Rr(r,t),a=Rr(o,t);return Ge(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:mc(e)||(n==="spring"||Vr(n))&&s}function _n(e){e.duration=0,e.type="keyframes"}const Ir=new Set(["opacity","clipPath","filter","transform"]),gc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function xc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&gc.test(e[t]))return!0;return!1}const yc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),bc=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vc(e){var f;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return bc()&&n&&(Ir.has(n)||yc.has(n)&&xc(a))&&(n!=="transform"||!u)&&!d&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const wc=40;class kc extends An{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:d,element:u,...f}){var g;super(),this.stop=()=>{var p,x;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=le.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:c,motionValue:d,element:u,...f},m=(u==null?void 0:u.KeyframeResolver)||zn;this.keyframeResolver=new m(a,(p,x,k)=>this.onKeyframesResolved(p,x,h,!k),c,d,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var k,v;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:d,onUpdate:u}=s;this.resolvedAt=le.now();let f=!0;pc(t,o,i,a)||(f=!1,(Pe.instantAnimations||!c)&&(u==null||u(Vt(t,s,n))),t[0]=t[t.length-1],_n(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>wc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=f&&!d&&vc(m),p=(v=(k=m.motionValue)==null?void 0:k.owner)==null?void 0:v.current;let x;if(g)try{x=new hc({...m,element:p})}catch{x=new Dt(m)}else x=new Dt(m);x.finished.then(()=>{this.notifyFinished()}).catch(fe),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ic()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function zr(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:a-o*s}const jc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tc(e){const t=jc.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Sc=4;function Or(e,t,n=1){Te(n<=Sc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Tc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return _s(i)?parseFloat(i):i}return gn(r)?Or(r,t,n+1):r}const Cc={type:"spring",stiffness:500,damping:25,restSpeed:10},Nc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pc={type:"keyframes",duration:.8},Ac={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mc=(e,{keyframes:t})=>t.length>2?Pc:Ze.has(e)?e.startsWith("scale")?Nc(t[1]):Cc:Ac;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Fn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Ec=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Vc(e){for(const t in e)if(!Ec.has(t))return!0;return!1}const Bn=(e,t,n,s={},r,o)=>i=>{const a=Fn(s,e)||{},c=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-ue(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};Vc(a)||Object.assign(u,Mc(e,u)),u.duration&&(u.duration=ue(u.duration)),u.repeatDelay&&(u.repeatDelay=ue(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(_n(u),u.delay===0&&(f=!0)),(Pe.instantAnimations||Pe.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,_n(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=Vt(u.keyframes,a);if(h!==void 0){F.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Dt(u):new kc(u)};function Fr(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function $n(e,t,n,s){if(typeof t=="function"){const[r,o]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=Fr(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function _e(e,t,n){const s=e.getProps();return $n(s,t,n!==void 0?n:s.custom,e)}const Br=new Set(["width","height","top","left","right","bottom",...qe]),$r=30,Dc=e=>!isNaN(parseFloat(e));class Lc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=le.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&fn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new un);const s=this.events[t].add(n);return t==="change"?()=>{s(),F.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$r)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$r);return Ws(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(e,t){return new Lc(e,t)}const Wn=e=>Array.isArray(e);function Rc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Je(n))}function Ic(e){return Wn(e)?e[e.length-1]||0:e}function zc(e,t){const n=_e(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Ic(o[i]);Rc(e,i,a)}}const ie=e=>!!(e&&e.getVelocity);function Oc(e){return!!(ie(e)&&e.add)}function Un(e,t){const n=e.getValue("willChange");if(Oc(n))return n.add(t);if(!n&&Pe.WillChange){const s=new Pe.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Gn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wr="data-"+Gn("framerAppearId");function Ur(e){return e.props[Wr]}function _c({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Gr(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...a}=t;const c=e.getDefaultTransition();o=o?_r(o,c):c;const d=o==null?void 0:o.reduceMotion;s&&(o=s);const u=[],f=r&&e.animationState&&e.animationState.getState()[r];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&_c(f,h))continue;const p={delay:n,...Fn(o||{},h)},x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!p.velocity){F.update(()=>m.set(g));continue}let k=!1;if(window.MotionHandoffAnimation){const T=Ur(e);if(T){const S=window.MotionHandoffAnimation(T,h,F);S!==null&&(p.startTime=S,k=!0)}}Un(e,h);const v=d??e.shouldReduceMotion;m.start(Bn(h,m,g,v&&Br.has(h)?{type:!1}:p,e,k));const y=m.animation;y&&u.push(y)}if(i){const h=()=>F.update(()=>{i&&zc(e,i)});u.length?Promise.all(u).then(h):h()}return u}function Yn(e,t,n={}){var c;const s=_e(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Gr(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=r;return Fc(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[o,i]:[i,o];return d().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function Fc(e,t,n=0,s=0,r=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Yn(c,t,{...i,delay:n+(typeof s=="function"?0:s)+zr(e.variantChildren,c,s,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Bc(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Yn(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Yn(e,t,n);else{const r=typeof t=="function"?_e(e,t,n.custom):t;s=Promise.all(Gr(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const $c={test:e=>e==="auto",parse:e=>e},Yr=e=>t=>t.test(e),Kr=[Ye,P,ve,Me,ml,hl,$c],Hr=e=>Kr.find(Yr(e));function Wc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bs(e):!0}const Uc=new Set(["brightness","contrast","saturate","opacity"]);function Gc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(xn)||[];if(!s)return e;const r=n.replace(s,"");let o=Uc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Yc=/\b([a-z-]*)\(.*?\)/gu,Kn={...me,getAnimatableNone:e=>{const t=e.match(Yc);return t?t.map(Gc).join(" "):e}},Hn={...me,getAnimatableNone:e=>{const t=me.parse(e);return me.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Xr={...Ye,transform:Math.round},Xn={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Me,skewX:Me,skewY:Me,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:lt,originX:lr,originY:lr,originZ:P},zIndex:Xr,fillOpacity:lt,strokeOpacity:lt,numOctaves:Xr},Kc={...Xn,color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:Kn,WebkitFilter:Kn,mask:Hn,WebkitMask:Hn},qr=e=>Kc[e],Hc=new Set([Kn,Hn]);function Zr(e,t){let n=qr(e);return Hc.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Xc=new Set(["auto","none","0"]);function qc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!Xc.has(o)&&He(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Zr(n,r)}class Zc extends zn{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),gn(f))){const h=Or(f,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Br.has(s)||t.length!==2)return;const[r,o]=t,i=Hr(r),a=Hr(o),c=or(r),d=or(o);if(c!==d&&Ee[s]){this.needsMeasurement=!0;return}if(i!==a)if(Tr(i)&&Tr(a))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else Ee[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Wc(t[r]))&&s.push(r);s.length&&qc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ee[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Ee[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Jr(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Qr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Lt(e){return Fs(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qn}=sr(queueMicrotask,!1),pe={x:!1,y:!1};function ei(){return pe.x||pe.y}function Jc(e){return e==="x"||e==="y"?pe[e]?null:(pe[e]=!0,()=>{pe[e]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function ti(e,t){const n=Jr(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Qc(e){return!(e.pointerType==="touch"||ei())}function ed(e,t,n={}){const[s,r,o]=ti(e,n);return s.forEach(i=>{let a=!1,c=!1,d;const u=()=>{i.removeEventListener("pointerleave",g)},f=x=>{d&&(d(x),d=void 0),u()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(x))},m=()=>{a=!0,window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",h,r)},g=x=>{if(x.pointerType!=="touch"){if(a){c=!0;return}f(x)}},p=x=>{if(!Qc(x))return;c=!1;const k=t(i,x);typeof k=="function"&&(d=k,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",p,r),i.addEventListener("pointerdown",m,r)}),o}const ni=(e,t)=>t?e===t?!0:ni(e,t.parentElement):!1,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,td=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nd(e){return td.has(e.tagName)||e.isContentEditable===!0}const sd=new Set(["INPUT","SELECT","TEXTAREA"]);function rd(e){return sd.has(e.tagName)||e.isContentEditable===!0}const Rt=new WeakSet;function si(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const id=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=si(()=>{if(Rt.has(n))return;Jn(n,"down");const r=si(()=>{Jn(n,"up")}),o=()=>Jn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function ri(e){return Zn(e)&&!ei()}const ii=new WeakSet;function od(e,t,n={}){const[s,r,o]=ti(e,n),i=a=>{const c=a.currentTarget;if(!ri(a)||ii.has(a))return;Rt.add(c),n.stopPropagation&&ii.add(a);const d=t(c,a),u=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Rt.has(c)&&Rt.delete(c),ri(m)&&typeof d=="function"&&d(m,{success:g})},f=m=>{u(m,c===window||c===document||n.useGlobalTarget||ni(c,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),Lt(a)&&(a.addEventListener("focus",d=>id(d,r)),!nd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Qn(e){return Fs(e)&&"ownerSVGElement"in e}const It=new WeakMap;let Ve;const oi=(e,t,n)=>(s,r)=>r&&r[0]?r[0][e+"Size"]:Qn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],ad=oi("inline","width","offsetWidth"),ld=oi("block","height","offsetHeight");function cd({target:e,borderBoxSize:t}){var n;(n=It.get(e))==null||n.forEach(s=>{s(e,{get width(){return ad(e,t)},get height(){return ld(e,t)}})})}function dd(e){e.forEach(cd)}function ud(){typeof ResizeObserver>"u"||(Ve=new ResizeObserver(dd))}function fd(e,t){Ve||ud();const n=Jr(e);return n.forEach(s=>{let r=It.get(s);r||(r=new Set,It.set(s,r)),r.add(t),Ve==null||Ve.observe(s)}),()=>{n.forEach(s=>{const r=It.get(s);r==null||r.delete(t),r!=null&&r.size||Ve==null||Ve.unobserve(s)})}}const zt=new Set;let Qe;function hd(){Qe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zt.forEach(t=>t(e))},window.addEventListener("resize",Qe)}function md(e){return zt.add(e),Qe||hd(),()=>{zt.delete(e),!zt.size&&typeof Qe=="function"&&(window.removeEventListener("resize",Qe),Qe=void 0)}}function ai(e,t){return typeof e=="function"?md(e):fd(e,t)}function pd(e){return Qn(e)&&e.tagName==="svg"}const gd=[...Kr,Z,me],xd=e=>gd.find(Yr(e)),li=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:li(),y:li()}),ci=()=>({min:0,max:0}),ee=()=>({x:ci(),y:ci()}),yd=new WeakMap;function Ot(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ft(e){return typeof e=="string"||Array.isArray(e)}const es=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ts=["initial",...es];function _t(e){return Ot(e.animate)||ts.some(t=>ft(e[t]))}function di(e){return!!(_t(e)||e.variants)}function bd(e,t,n){for(const s in t){const r=t[s],o=n[s];if(ie(r))e.addValue(s,r);else if(ie(o))e.addValue(s,Je(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Je(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ns={current:null},ui={current:!1},vd=typeof window<"u";function wd(){if(ui.current=!0,!!vd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ns.current=e.matches;e.addEventListener("change",t),t()}else ns.current=!1}const fi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ft={};function hi(e){Ft=e}function kd(){return Ft}class jd{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=le.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,F.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=a;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=_t(n),this.isVariantNode=di(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];d[m]!==void 0&&ie(g)&&g.set(d[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,yd.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ui.current||wd(),this.shouldReduceMotion=ns.current),process.env.NODE_ENV!=="production"&&fn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ae(this.notifyUpdate),Ae(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ir.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:a,times:c,ease:d,duration:u}=n.accelerate,f=new Dr({element:this.current,name:t,keyframes:a,times:c,ease:d,duration:ue(u)}),h=i(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=Ze.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&F.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ft){const n=Ft[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];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):ee()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<fi.length;s++){const r=fi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=bd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Je(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(_s(s)||Bs(s))?s=parseFloat(s):!xd(s)&&me.test(n)&&(s=Zr(t,n)),this.setBaseTarget(t,ie(s)?s.get():s)),ie(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=$n(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){qn.render(this.render)}}class mi extends jd{constructor(){super(...arguments),this.KeyframeResolver=Zc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class De{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pi({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Td({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sd(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ss(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!ss(e)||!ss(t)||!ss(n)}function Fe(e){return rs(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return xi(e.x)||xi(e.y)}function xi(e){return e&&e!=="0%"}function Bt(e,t,n){const s=e-n,r=t*s;return n+r}function yi(e,t,n,s,r){return r!==void 0&&(e=Bt(e,r,s)),Bt(e,n,s)+t}function is(e,t=0,n=1,s,r){e.min=yi(e.min,t,n,s,r),e.max=yi(e.max,t,n,s,r)}function bi(e,{x:t,y:n}){is(e.x,t.translate,t.scale,t.originPoint),is(e.y,n.translate,n.scale,n.originPoint)}const vi=.999999999999,wi=1.0000000000001;function Cd(e,t,n,s=!1){var a;const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let c=0;c<r;c++){o=n[c],i=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(we(e.x,-o.scroll.offset.x),we(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),s&&Fe(o.latestValues)&&$t(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<wi&&t.x>vi&&(t.x=1),t.y<wi&&t.y>vi&&(t.y=1)}function we(e,t){e.min+=t,e.max+=t}function ki(e,t,n,s,r=.5){const o=$(e.min,e.max,r);is(e,t,n,o,s)}function ji(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function $t(e,t,n){const s=n??e;ki(e.x,ji(t.x,s.x),t.scaleX,t.scale,t.originX),ki(e.y,ji(t.y,s.y),t.scaleY,t.scale,t.originY)}function Ti(e,t){return pi(Sd(e.getBoundingClientRect(),t))}function Nd(e,t,n){const s=Ti(e,n),{scroll:r}=t;return r&&(we(s.x,r.offset.x),we(s.y,r.offset.y)),s}const Pd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ad=qe.length;function Md(e,t,n){let s="",r=!0;for(let o=0;o<Ad;o++){const i=qe[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(i.startsWith("scale")?1:0);else{const d=parseFloat(a);c=i.startsWith("scale")?d===1:d===0}if(!c||n){const d=Qr(a,Xn[i]);if(!c){r=!1;const u=Pd[i]||i;s+=`${u}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function os(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const d=t[c];if(Ze.has(c)){i=!0;continue}else if(ir(c)){r[c]=d;continue}else{const u=Qr(d,Xn[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(t.transform||(i||n?s.transform=Md(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${d} ${u}`}}function Si(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ci(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ht={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(P.test(e))e=parseFloat(e);else return e;const n=Ci(e,t.target.x),s=Ci(e,t.target.y);return`${n}% ${s}%`}},Ed={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=me.parse(e);if(r.length>5)return s;const o=me.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=c;const d=$(a,c,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},as={borderRadius:{...ht,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomLeftRadius:ht,borderBottomRightRadius:ht,boxShadow:Ed};function Ni(e,{layout:t,layoutId:n}){return Ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!as[e]||e==="opacity")}function ls(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const a in s)(ie(s[a])||r&&ie(r[a])||Ni(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Vd(e){return window.getComputedStyle(e)}class Dd extends mi{constructor(){super(...arguments),this.type="html",this.renderInstance=Si}readValueFromInstance(t,n){var s;if(Ze.has(n))return(s=this.projection)!=null&&s.isProjecting?Vn(n):ec(t,n);{const r=Vd(t),o=(ir(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ti(t,n)}build(t,n,s){os(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return ls(t,n,s)}}const Ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rd={offset:"strokeDashoffset",array:"strokeDasharray"};function Id(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Ld:Rd;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const zd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Pi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},c,d,u){if(os(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const m of zd)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&Id(f,r,o,i,!1)}const Ai=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"]),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Od(e,t,n,s){Si(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ai.has(r)?r:Gn(r),t.attrs[r])}function Ei(e,t,n){const s=ls(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const o=qe.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class _d extends mi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ze.has(n)){const s=qr(n);return s&&s.default||0}return n=Ai.has(n)?n:Gn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ei(t,n,s)}build(t,n,s){Pi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Od(t,n,s,r)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const Fd=ts.length;function Vi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Fd;n++){const s=ts[n],r=e.props[s];(ft(r)||r===!1)&&(t[s]=r)}return t}function Di(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Bd=[...es].reverse(),$d=es.length;function Wd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Bc(e,n,s)))}function Ud(e){let t=Wd(e),n=Li(),s=!0,r=!1;const o=d=>(u,f)=>{var m;const h=_e(e,f,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:p,...x}=h;u={...u,...x,...p}}return u};function i(d){t=d(e)}function a(d){const{props:u}=e,f=Vi(e.parent)||{},h=[],m=new Set;let g={},p=1/0;for(let k=0;k<$d;k++){const v=Bd[k],y=n[v],T=u[v]!==void 0?u[v]:f[v],S=ft(T),E=v===d?y.isActive:null;E===!1&&(p=k);let z=T===f[v]&&T!==u[v]&&S;if(z&&(s||r)&&e.manuallyAnimateOnMount&&(z=!1),y.protectedKeys={...g},!y.isActive&&E===null||!T&&!y.prevProp||Ot(T)||typeof T=="boolean")continue;if(v==="exit"&&y.isActive&&E!==!0){y.prevResolvedValues&&(g={...g,...y.prevResolvedValues});continue}const j=Gd(y.prevProp,T);let V=j||v===d&&y.isActive&&!z&&S||k>p&&S,D=!1;const _=Array.isArray(T)?T:[T];let B=_.reduce(o(v),{});E===!1&&(B={});const{prevResolvedValues:de={}}=y,ae={...de,...B},J=Y=>{V=!0,m.has(Y)&&(D=!0,m.delete(Y)),y.needsAnimating[Y]=!0;const ne=e.getValue(Y);ne&&(ne.liveStyle=!1)};for(const Y in ae){const ne=B[Y],A=de[Y];if(g.hasOwnProperty(Y))continue;let w=!1;Wn(ne)&&Wn(A)?w=!Di(ne,A):w=ne!==A,w?ne!=null?J(Y):m.add(Y):ne!==void 0&&m.has(Y)?J(Y):y.protectedKeys[Y]=!0}y.prevProp=T,y.prevResolvedValues=B,y.isActive&&(g={...g,...B}),(s||r)&&e.blockInitialAnimation&&(V=!1);const W=z&&j;V&&(!W||D)&&h.push(..._.map(Y=>{const ne={type:v};if(typeof Y=="string"&&(s||r)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,w=_e(A,Y);if(A.enteringChildren&&w){const{delayChildren:R}=w.transition||{};ne.delay=zr(A.enteringChildren,e,R)}}return{animation:Y,options:ne}}))}if(m.size){const k={};if(typeof u.initial!="boolean"){const v=_e(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(k.transition=v.transition)}m.forEach(v=>{const y=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),k[v]=y??null}),h.push({animation:k})}let x=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),s=!1,r=!1,x?t(h):Promise.resolve()}function c(d,u){var h;if(n[d].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(d,u)}),n[d].isActive=u;const f=a(d);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Li(),r=!0}}}function Gd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Di(t,e):!1}function Be(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Li(){return{animate:Be(!0),whileInView:Be(),whileHover:Be(),whileTap:Be(),whileDrag:Be(),whileFocus:Be(),exit:Be()}}function cs(e,t){e.min=t.min,e.max=t.max}function ge(e,t){cs(e.x,t.x),cs(e.y,t.y)}function Ri(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ii=1e-4,Yd=1-Ii,Kd=1+Ii,zi=.01,Hd=0-zi,Xd=0+zi;function ce(e){return e.max-e.min}function qd(e,t,n){return Math.abs(e-t)<=n}function Oi(e,t,n,s=.5){e.origin=s,e.originPoint=$(t.min,t.max,e.origin),e.scale=ce(n)/ce(t),e.translate=$(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Yd&&e.scale<=Kd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hd&&e.translate<=Xd||isNaN(e.translate))&&(e.translate=0)}function mt(e,t,n,s){Oi(e.x,t.x,n.x,s?s.originX:void 0),Oi(e.y,t.y,n.y,s?s.originY:void 0)}function _i(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=r+t.min,e.max=e.min+ce(t)}function Zd(e,t,n,s){_i(e.x,t.x,n.x,s==null?void 0:s.x),_i(e.y,t.y,n.y,s==null?void 0:s.y)}function Fi(e,t,n,s=0){const r=s?$(n.min,n.max,s):n.min;e.min=t.min-r,e.max=e.min+ce(t)}function Wt(e,t,n,s){Fi(e.x,t.x,n.x,s==null?void 0:s.x),Fi(e.y,t.y,n.y,s==null?void 0:s.y)}function Bi(e,t,n,s,r){return e-=t,e=Bt(e,1/n,s),r!==void 0&&(e=Bt(e,1/r,s)),e}function Jd(e,t=0,n=1,s=.5,r,o=e,i=e){if(ve.test(t)&&(t=parseFloat(t),t=$(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=$(o.min,o.max,s);e===o&&(a-=t),e.min=Bi(e.min,t,n,a,r),e.max=Bi(e.max,t,n,a,r)}function $i(e,t,[n,s,r],o,i){Jd(e,t[n],t[s],t[r],t.scale,o,i)}const Qd=["x","scaleX","originX"],eu=["y","scaleY","originY"];function Wi(e,t,n,s){$i(e.x,t,Qd,n?n.x:void 0,s?s.x:void 0),$i(e.y,t,eu,n?n.y:void 0,s?s.y:void 0)}function Ui(e){return e.translate===0&&e.scale===1}function Gi(e){return Ui(e.x)&&Ui(e.y)}function Yi(e,t){return e.min===t.min&&e.max===t.max}function tu(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Xi(e){return ce(e.x)/ce(e.y)}function qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ke(e){return[e("x"),e("y")]}function nu(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||o||i)&&(s=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Zi=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],su=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||P.test(e);function ru(e,t,n,s,r,o){r?(e.opacity=$(0,n.opacity??1,iu(s)),e.opacityExit=$(t.opacity??1,0,ou(s))):o&&(e.opacity=$(t.opacity??1,n.opacity??1,s));for(let i=0;i<su;i++){const a=Zi[i];let c=eo(t,a),d=eo(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Qi(c)===Qi(d)?(e[a]=Math.max($(Ji(c),Ji(d),s),0),(ve.test(d)||ve.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=$(t.rotate||0,n.rotate||0,s))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const iu=to(0,.5,Zs),ou=to(.5,.95,fe);function to(e,t,n){return s=>s<e?0:s>t?1:n(ot(e,t,s))}function au(e,t,n){const s=ie(e)?e:Je(e);return s.start(Bn("",s,t,n)),s.animation}function pt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const lu=(e,t)=>e.depth-t.depth;class cu{constructor(){this.children=[],this.isDirty=!1}add(t){cn(this.children,t),this.isDirty=!0}remove(t){St(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lu),this.isDirty=!1,this.children.forEach(t)}}function du(e,t){const n=le.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(Ae(s),e(o-t))};return F.setup(s,!0),()=>Ae(s)}function Ut(e){return ie(e)?e.get():e}class uu{constructor(){this.members=[]}add(t){cn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const r=s.instance;(!r||r.isConnected===!1)&&!s.snapshot&&(St(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(St(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let s=this.members.indexOf(t)-1;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1&&((n=r.instance)==null?void 0:n.isConnected)!==!1)return this.promote(r),!0}return!1}promote(t,n){var r;const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=s.options,{layoutDependency:i}=t.options;(o===void 0||o!==i)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),(r=t.root)!=null&&r.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,s,r,o,i;(s=(n=t.options).onExitComplete)==null||s.call(n),(i=(r=t.resumingFrom)==null?void 0:(o=r.options).onExitComplete)==null||i.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Gt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ds=["","X","Y","Z"],fu=1e3;let hu=0;function us(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function no(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ur(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&no(s)}function so({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=hu++,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(gu),this.nodes.forEach(ku),this.nodes.forEach(ju),this.nodes.forEach(xu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 cu)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new un),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Qn(i)&&!pd(i),this.instance=i;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;F.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=du(h,250),Gt.hasAnimatedSinceResize&&(Gt.hasAnimatedSinceResize=!1,this.nodes.forEach(oo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||Pu,{onLayoutAnimationStart:p,onLayoutAnimationComplete:x}=d.getProps(),k=!this.targetLayout||!Hi(this.targetLayout,m),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Fn(g,"layout"),onPlay:p,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,v)}else f||oo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ae(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(Tu),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&no(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,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(bu),this.nodes.forEach(ro);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(io);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vu),this.nodes.forEach(wu),this.nodes.forEach(mu),this.nodes.forEach(pu)):this.nodes.forEach(io),this.clearAllSnapshots();const a=le.now();re.delta=be(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,pn.update.process(re),pn.preRender.process(re),pn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(Su)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ce(this.snapshot.measuredBox.x)&&!ce(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 i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ee()),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;i&&this.instance&&(a||Fe(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),Au(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:i}=this.options;if(!i)return ee();const a=i.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Mu))){const{scroll:u}=this.root;u&&(we(a.x,u.offset.x),we(a.y,u.offset.y))}return a}removeElementScroll(i){var c;const a=ee();if(ge(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ge(a,i),we(a.x,f.offset.x),we(a.y,f.offset.y))}return a}applyTransform(i,a=!1,c){var u,f;const d=c||ee();ge(d,i);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(we(d.x,-m.scroll.offset.x),we(d.y,-m.scroll.offset.y)),Fe(m.latestValues)&&$t(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return Fe(this.latestValues)&&$t(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(i){var c;const a=ee();ge(a,i);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Fe(u.latestValues))continue;let f;u.instance&&(rs(u.latestValues)&&u.updateSnapshot(),f=ee(),ge(f,u.measurePageBox())),Wi(a,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,f)}return Fe(this.latestValues)&&Wi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var m;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=re.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ee(),this.targetWithTransforms=ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ge(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ee(),this.relativeTargetOrigin=ee(),Wt(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===re.timestamp&&(c=!1),c)return;const{layout:d,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||!(d||u))return;ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Cd(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=ee());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ri(this.prevProjectionDelta.x,this.projectionDelta.x),Ri(this.prevProjectionDelta.y,this.projectionDelta.y)),mt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(i,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ee(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,p=m!==g,x=this.getStack(),k=!x||x.members.length<=1,v=!!(p&&!k&&this.options.crossfade===!0&&!this.path.some(Nu));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;ao(f.x,i.x,S),ao(f.y,i.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Cu(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&tu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ee()),ge(y,this.relativeTarget)),p&&(this.animationValues=u,ru(u,d,this.latestValues,S,v,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{Gt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.motionValue.jump(0,!1),this.currentAnimation=au(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=i;if(!(!a||!c||!d)){if(this!==i&&this.layout&&d&&ho(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||ee();const f=ce(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+f;const h=ce(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}ge(a,c),$t(a,u),mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new uu),this.sharedNodes.get(i).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&us("z",i,d,this.animationValues);for(let u=0;u<ds.length;u++)us(`rotate${ds[u]}`,i,d,this.animationValues),us(`skew${ds[u]}`,i,d,this.animationValues);i.render();for(const u in d)i.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Ut(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ut(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fe(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=nu(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),i.transform=f;const{x:h,y:m}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,d.animationValues?i.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in as){if(u[g]===void 0)continue;const{correct:p,applyTo:x,isCSSVariable:k}=as[g],v=f==="none"?u[g]:p(u[g],d);if(x){const y=x.length;for(let T=0;T<y;T++)i[x[T]]=v}else k?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=d===this?Ut(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ro),this.root.sharedNodes.clear()}}}function mu(e){e.updateLayout()}function pu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;if(o==="size")ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=ce(h);h.min=s[f].min,h.max=h.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";cs(i?t.measuredBox[f]:t.layoutBox[f],s[f])}else ho(o,t.layoutBox,s)&&ke(f=>{const h=i?t.measuredBox[f]:t.layoutBox[f],m=ce(s[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=et();mt(a,s,t.layoutBox);const c=et();i?mt(c,e.applyTransform(r,!0),t.measuredBox):mt(c,s,t.layoutBox);const d=!Gi(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,p=ee();Wt(p,t.layoutBox,h.layoutBox,g);const x=ee();Wt(x,s,m.layoutBox,g),Hi(p,x)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function gu(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function xu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yu(e){e.clearSnapshot()}function ro(e){e.clearMeasurements()}function bu(e){e.isLayoutDirty=!0,e.updateLayout()}function io(e){e.isLayoutDirty=!1}function vu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function wu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ku(e){e.resolveTargetDelta()}function ju(e){e.calcProjection()}function Tu(e){e.resetSkewAndRotation()}function Su(e){e.removeLeadSnapshot()}function ao(e,t,n){e.translate=$(t.translate,0,n),e.scale=$(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lo(e,t,n,s){e.min=$(t.min,n.min,s),e.max=$(t.max,n.max,s)}function Cu(e,t,n,s){lo(e.x,t.x,n.x,s),lo(e.y,t.y,n.y,s)}function Nu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Pu={duration:.45,ease:[.4,0,.1,1]},co=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uo=co("applewebkit/")&&!co("chrome/")?Math.round:fe;function fo(e){e.min=uo(e.min),e.max=uo(e.max)}function Au(e){fo(e.x),fo(e.y)}function ho(e,t,n){return e==="position"||e==="preserve-aspect"&&!qd(Xi(t),Xi(n),.2)}function Mu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Eu=so({attachResizeListener:(e,t)=>pt(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),fs={current:void 0},mo=so({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fs.current){const e=new Eu({});e.mount(window),e.setOptions({layoutScroll:!0}),fs.current=e}return fs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hs=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function po(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vu(...e){return t=>{let n=!1;const s=e.map(r=>{const o=po(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():po(e[r],null)}}}}function Du(...e){return vt.useCallback(Vu(...e),e)}class Lu extends vt.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Lt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Lt(s)&&s.offsetWidth||0,o=Lt(s)&&s.offsetHeight||0,i=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=r-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ru({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var h;const i=b.useId(),a=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=b.useContext(hs),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=Du(a,u);return b.useInsertionEffect(()=>{const{width:m,height:g,top:p,left:x,right:k,bottom:v}=c.current;if(t||o===!1||!a.current||!m||!g)return;const y=n==="left"?`left: ${x}`:`right: ${k}`,T=s==="bottom"?`bottom: ${v}`:`top: ${p}`;a.current.dataset.motionPopId=i;const S=document.createElement("style");d&&(S.nonce=d);const E=r??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
163
163
|
[data-motion-pop-id="${i}"] {
|
|
164
164
|
position: absolute !important;
|
|
165
165
|
width: ${m}px !important;
|
|
@@ -167,7 +167,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
167
167
|
${y}px !important;
|
|
168
168
|
${T}px !important;
|
|
169
169
|
}
|
|
170
|
-
`),()=>{var z;(z=a.current)==null||z.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Lu,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:vt.cloneElement(e,{ref:f})})}const Iu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:d})=>{const u=ln(zu),f=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{u.set(g,!0);for(const p of u.values())if(!p)return;s&&s()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,s]);return o&&h&&(m={...m}),b.useMemo(()=>{u.forEach((g,p)=>u.set(p,!1))},[n]),vt.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),e=l.jsx(Ru,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:d,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function zu(){return new Map}function go(e=!0){const t=b.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=b.useId();b.useEffect(()=>{if(e)return r(o)},[e]);const i=b.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Yt=e=>e.key||"";function xo(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const oe=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:d})=>{const[u,f]=go(i),h=b.useMemo(()=>xo(e),[e]),m=i&&!u?[]:h.map(Yt),g=b.useRef(!0),p=b.useRef(h),x=ln(()=>new Map),k=b.useRef(new Set),[v,y]=b.useState(h),[T,S]=b.useState(h);Os(()=>{g.current=!1,p.current=h;for(let j=0;j<T.length;j++){const V=Yt(T[j]);m.includes(V)?(x.delete(V),k.current.delete(V)):x.get(V)!==!0&&x.set(V,!1)}},[T,m.length,m.join("-")]);const E=[];if(h!==v){let j=[...h];for(let V=0;V<T.length;V++){const D=T[V],_=Yt(D);m.includes(_)||(j.splice(V,0,D),E.push(D))}return o==="wait"&&E.length&&(j=E),S(xo(j)),y(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:z}=b.useContext(an);return l.jsx(l.Fragment,{children:T.map(j=>{const V=Yt(j),D=i&&!u?!1:h===T||m.includes(V),_=()=>{if(k.current.has(V))return;if(x.has(V))k.current.add(V),x.set(V,!0);else return;let B=!0;x.forEach(de=>{de||(B=!1)}),B&&(z==null||z(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Iu,{isPresent:D,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:D?void 0:_,anchorX:a,anchorY:c,children:j},V)})})},yo=b.createContext({strict:!1}),bo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let vo=!1;function Ou(){if(vo)return;const e={};for(const t in bo)e[t]={isEnabled:n=>bo[t].some(s=>!!n[s])};hi(e),vo=!0}function wo(){return Ou(),kd()}function _u(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Fu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fu.has(e)}let ko=e=>!Kt(e);function Bu(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Bu(require("@emotion/is-prop-valid").default)}catch{}function $u(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||ie(e[r])||(ko(r)||n===!0&&Kt(r)||!t&&!Kt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Ht=b.createContext({});function Wu(e,t){if(_t(e)){const{initial:n,animate:s}=e;return{initial:n===!1||ft(n)?n:void 0,animate:ft(s)?s:void 0}}return e.inherit!==!1?t:{}}function Uu(e){const{initial:t,animate:n}=Wu(e,b.useContext(Ht));return b.useMemo(()=>({initial:t,animate:n}),[jo(t),jo(n)])}function jo(e){return Array.isArray(e)?e.join(" "):e}const ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function To(e,t,n){for(const s in t)!ie(t[s])&&!Ni(s,n)&&(e[s]=t[s])}function Gu({transformTemplate:e},t){return b.useMemo(()=>{const n=ms();return os(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yu(e,t){const n=e.style||{},s={};return To(s,n,e),Object.assign(s,Gu(e,t)),s}function Ku(e,t){const n={},s=Yu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const So=()=>({...ms(),attrs:{}});function Hu(e,t,n,s){const r=b.useMemo(()=>{const o=So();return Ai(o,t,Mi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};To(o,e.style,e),r.style={...o,...r.style}}return r}const Xu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ps(e){return typeof e!="string"||e.includes("-")?!1:!!(Xu.indexOf(e)>-1||/[A-Z]/u.test(e))}function qu(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ps(e)?Hu:Ku)(t,s,r,e),d=$u(t,typeof e=="string",o),u=e!==b.Fragment?{...d,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ie(f)?f.get():f,[f]);return b.createElement(e,{...u,children:h})}function Zu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ju(n,s,r,e),renderState:t()}}function Ju(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Ut(o[h]);let{initial:i,animate:a}=e;const c=_t(e),d=di(e);t&&d&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const f=u?a:i;if(f&&typeof f!="boolean"&&!Ot(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=$n(e,h[m]);if(g){const{transitionEnd:p,transition:x,...k}=g;for(const v in k){let y=k[v];if(Array.isArray(y)){const T=u?y.length-1:0;y=y[T]}y!==null&&(r[v]=y)}for(const v in p)r[v]=p[v]}}}return r}const Co=e=>(t,n)=>{const s=b.useContext(Ht),r=b.useContext(Tt),o=()=>Zu(e,t,s,r);return n?o():ln(o)},Qu=Co({scrapeMotionValuesFromProps:ls,createRenderState:ms}),ef=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),tf=Symbol.for("motionComponentSymbol");function nf(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const r=b.useRef(null);return b.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const c=i(o);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const No=b.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sf(e,t,n,s,r,o){var y,T;const{visualElement:i}=b.useContext(Ht),a=b.useContext(yo),c=b.useContext(Tt),d=b.useContext(hs),u=d.reducedMotion,f=d.skipAnimations,h=b.useRef(null),m=b.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=b.useContext(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&rf(h.current,n,r,p);const x=b.useRef(!1);b.useInsertionEffect(()=>{g&&x.current&&g.update(n,c)});const k=n[Wr],v=b.useRef(!!k&&typeof window<"u"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,k))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,k)));return Os(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,k)}),v.current=!1),g.enteringChildren=void 0)}),g}function rf(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ao(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function Ao(e){if(e)return e.options.allowProjection!==!1?e.projection:Ao(e.parent)}function gs(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&_u(s);const o=n?n==="svg":ps(e),i=o?ef:Qu;function a(d,u){let f;const h={...b.useContext(hs),...d,layoutId:of(d)},{isStatic:m}=h,g=Uu(d),p=i(d,m);if(!m&&typeof window<"u"){af(h,s);const x=lf(h);f=x.MeasureLayout,g.visualElement=sf(e,p,h,r,x.ProjectionNode,o)}return l.jsxs(Ht.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,qu(e,d,nf(p,g.visualElement,u),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(a);return c[tf]=e,c}function of({layoutId:e}){const t=b.useContext(an).id;return t&&e!==void 0?t+"-"+e:e}function af(e,t){const n=b.useContext(yo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ge(!1,s,"lazy-strict-mode"):Te(!1,s,"lazy-strict-mode")}}function lf(e){const t=wo(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function cf(e,t){if(typeof Proxy>"u")return gs;const n=new Map,s=(o,i)=>gs(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&fn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,gs(i,void 0,e,t)),n.get(i))})}const df=(e,t)=>t.isSVG??ps(e)?new _d(t):new Dd(t,{allowProjection:e!==b.Fragment});class uf extends De{constructor(t){super(t),t.animationState||(t.animationState=Ud(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ot(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let ff=0;class hf extends De{constructor(){super(...arguments),this.id=ff++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const c=_e(this.node,i,a);if(c){const{transition:d,transitionEnd:u,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mf={animation:{Feature:uf},exit:{Feature:hf}};function gt(e){return{point:{x:e.pageX,y:e.pageY}}}const pf=e=>t=>Zn(t)&&e(t,gt(t));function xt(e,t,n,s){return pt(e,t,pf(n),s)}const Po=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function gf(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=new Set(["auto","scroll"]);class Vo{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xt(this.lastRawMoveEventInfo,this.transformPagePoint));const m=xs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=gf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:x}=m,{timestamp:k}=re;this.history.push({...x,timestamp:k});const{onStart:v,onMove:y}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Xt(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:x,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=xs(m.type==="pointercancel"?this.lastMoveEventInfo:Xt(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,v),x&&x(m,v)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=gt(t),d=Xt(c,this.transformPagePoint),{point:u}=d,{timestamp:f}=re;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,xs(d,this.history)),this.removeListeners=it(xt(this.contextWindow,"pointermove",this.handlePointerMove),xt(this.contextWindow,"pointerup",this.handlePointerUp),xt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Eo.has(s.overflowX)||Eo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,r=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(this.updatePoint)}}function Xt(e,t){return t?{point:t(e.point)}:e}function Do(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,xf(t)),velocity:yf(t,.1)}}function xf(e){return e[0]}function Lo(e){return e[e.length-1]}function yf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Lo(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>ue(t)*2&&(s=e[1]);const o=he(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function bf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?$(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?$(n,e,s.max):Math.min(e,n)),e}function Ro(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vf(e,{top:t,left:n,bottom:s,right:r}){return{x:Ro(e.x,n,r),y:Ro(e.y,t,s)}}function Io(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function wf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function kf(e,t){let n=.5;const s=ce(e),r=ce(t);return r>s?n=ot(t.min,t.max-s,e.min):s>r&&(n=ot(e.min,e.max-r,t.min)),be(0,1,n)}function jf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ys=.35;function Tf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:zo(e,"left","right"),y:zo(e,"top","bottom")}}function zo(e,t,n){return{min:Oo(e,t),max:Oo(e,n)}}function Oo(e,t){return typeof e=="number"?e:e[t]||0}const Sf=new WeakMap;class Cf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(gt(f).point),this.stopAnimation()},i=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Jc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ke(k=>{let v=this.getAxisMotionValue(k).get()||0;if(ve.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[k];T&&(v=ce(T)*(parseFloat(v)/100))}}this.originPoint[k]=v}),p&&F.update(()=>p(f,h),!1,!0),Un(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:k}=h;if(g&&this.currentDirection===null){this.currentDirection=Af(k),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),x&&F.update(()=>x(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Po(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&F.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!qt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=bf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&tt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=vf(s.layoutBox,t):this.constraints=!1,this.elastic=Tf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;Te(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=Nd(s,r.root,this.visualElement.getTransformPagePoint());let i=wf(r.layout.layoutBox,o);if(n){const a=n(Td(i));this.hasMutatedConstraints=!!a,a&&(i=pi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=ke(u=>{if(!qt(u,n,this.currentDirection))return;let f=c&&c[u]||{};(i===!0||i===u)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Un(this.visualElement,t),s.start(Bn(t,s,0,n,this.visualElement,!1))}stopAnimation(){ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ke(n=>{const{drag:s}=this.getProps();if(!qt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-$(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!tt(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ke(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=kf({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),ke(i=>{if(!qt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:d}=this.constraints[i];a.set($(c,d,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Sf.set(this.visualElement,this);const t=this.visualElement.current,n=xt(t,"pointerdown",d=>{const{drag:u,dragListener:f=!0}=this.getProps(),h=d.target,m=h!==t&&rd(h);u&&f&&!m&&this.start(d)});let s;const r=()=>{const{dragConstraints:d}=this.getProps();tt(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Nf(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.read(r);const a=pt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=d[f].translate,h.set(h.get()+d[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ys,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Nf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function qt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Af(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Cf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const bs=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)};class Mf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:bs(t),onStart:bs(n),onMove:bs(s),onEnd:(o,i)=>{delete this.session,r&&F.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=xt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vs=!1;class Ef extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),vs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),vs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||F.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),qn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;vs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Fo(e){const[t,n]=go(),s=b.useContext(an);return l.jsx(Ef,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(No),isPresent:t,safeToRemove:n})}const Vf={pan:{Feature:Mf},drag:{Feature:Pf,ProjectionNode:mo,MeasureLayout:Fo}};function Bo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&F.postRender(()=>o(t,gt(t)))}class Df extends De{mount(){const{current:t}=this.node;t&&(this.unmount=ed(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Lf extends De{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=it(pt(this.node.current,"focus",()=>this.onFocus()),pt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $o(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&F.postRender(()=>o(t,gt(t)))}class Rf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=od(t,(r,o)=>($o(this.node,o,"Start"),(i,{success:a})=>$o(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const ws=new WeakMap,ks=new WeakMap,If=e=>{const t=ws.get(e.target);t&&t(e)},zf=e=>{e.forEach(If)};function Of({root:e,...t}){const n=e||document;ks.has(n)||ks.set(n,{});const s=ks.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(zf,{root:e,...t})),s[r]}function _f(e,t,n){const s=Of(t);return ws.set(e,n),s.observe(e),()=>{ws.delete(e),s.unobserve(e)}}const Ff={some:0,all:1};class Bf extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Ff[r]},a=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=u?f:h;m&&m(d)};this.stopObserver=_f(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($f(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function $f({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wf={...mf,...{inView:{Feature:Bf},tap:{Feature:Rf},focus:{Feature:Lf},hover:{Feature:Df}},...Vf,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},O=cf(Wf,df);function Wo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Uf(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wo(e))&&(s&&(s+=" "),s+=t);return s}const Gf=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Yf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zt="-",Go=[],Kf="arbitrary..",Hf=e=>{const t=qf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Xf(i);const a=i.split(Zt),c=a[0]===""&&a.length>1?1:0;return Yo(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],d=n[i];return c?d?Gf(d,c):c:d||Go}return n[i]||Go}}},Yo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const d=Yo(e,t+1,o);if(d)return d}const i=n.validators;if(i===null)return;const a=t===0?e.join(Zt):e.slice(t).join(Zt),c=i.length;for(let d=0;d<c;d++){const u=i[d];if(u.validator(a))return u.classGroupId}},Xf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Kf+s:void 0})(),qf=e=>{const{theme:t,classGroups:n}=e;return Zf(n,t)},Zf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];js(r,n,s,t)}return n},js=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Jf(i,t,n,s)}},Jf=(e,t,n,s)=>{if(typeof e=="string"){Qf(e,t,n);return}if(typeof e=="function"){eh(e,t,n,s);return}th(e,t,n,s)},Qf=(e,t,n)=>{const s=e===""?t:Ko(t,e);s.classGroupId=n},eh=(e,t,n,s)=>{if(nh(e)){js(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Yf(n,e))},th=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];js(c,Ko(t,a),n,s)}},Ko=(e,t)=>{let n=e;const s=t.split(Zt),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=Uo(),n.nextPart.set(i,a)),n=a}return n},nh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},Ts="!",Ho=":",rh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),ih=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,d;const u=r.length;for(let p=0;p<u;p++){const x=r[p];if(i===0&&a===0){if(x===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(x==="/"){d=p;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const f=o.length===0?r:r.slice(c);let h=f,m=!1;f.endsWith(Ts)?(h=f.slice(0,-1),m=!0):f.startsWith(Ts)&&(h=f.slice(1),m=!0);const g=d&&d>c?d-c:void 0;return Xo(o,m,h,g)};if(t){const r=t+Ho,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Xo(rh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},oh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",c=t.has(i);a||c?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},ah=e=>({cache:sh(e.cacheSize),parseClassName:ih(e),sortModifiers:oh(e),postfixLookupClassGroupIds:lh(e),...Hf(e)}),lh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)t[n[s]]=!0;return t},ch=/\s+/,dh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(ch);let d="";for(let u=c.length-1;u>=0;u-=1){const f=c[u],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:x}=n(f);if(h){d=f+(d.length>0?" "+d:d);continue}let k=!!x,v;if(k){const z=p.substring(0,x);v=s(z);const j=v&&i[v]?s(p):void 0;j&&j!==v&&(v=j,k=!1)}else v=s(p);if(!v){if(!k){d=f+(d.length>0?" "+d:d);continue}if(v=s(p),!v){d=f+(d.length>0?" "+d:d);continue}k=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),T=g?y+Ts:y,S=T+v;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(v,k);for(let z=0;z<E.length;++z){const j=E[z];a.push(T+j)}d=f+(d.length>0?" "+d:d)}return d},uh=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=qo(n))&&(r&&(r+=" "),r+=s);return r},qo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=qo(e[s]))&&(n&&(n+=" "),n+=t);return n},fh=(e,...t)=>{let n,s,r,o;const i=c=>{const d=t.reduce((u,f)=>f(u),e());return n=ah(d),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const d=s(c);if(d)return d;const u=dh(c,n);return r(c,u),u};return o=i,(...c)=>o(uh(...c))},hh=[],te=e=>{const t=n=>n[e]||hh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ph=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>mh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Ss=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ph.test(e),Qo=()=>!0,vh=e=>gh.test(e)&&!xh.test(e),Cs=()=>!1,wh=e=>yh.test(e),kh=e=>bh.test(e),jh=e=>!C(e)&&!N(e),Th=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Sh=e=>Re(e,ia,Cs),C=e=>Zo.test(e),$e=e=>Re(e,oa,vh),ea=e=>Re(e,Dh,I),Ch=e=>Re(e,la,Qo),Nh=e=>Re(e,aa,Cs),ta=e=>Re(e,sa,Cs),Ah=e=>Re(e,ra,kh),Jt=e=>Re(e,ca,wh),N=e=>Jo.test(e),yt=e=>We(e,oa),Ph=e=>We(e,aa),na=e=>We(e,sa),Mh=e=>We(e,ia),Eh=e=>We(e,ra),Qt=e=>We(e,ca,!0),Vh=e=>We(e,la,!0),Re=(e,t,n)=>{const s=Zo.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},We=(e,t,n=!1)=>{const s=Jo.exec(e);return s?s[1]?t(s[1]):n:!1},sa=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",ia=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",Dh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Lh=fh(()=>{const e=te("color"),t=te("font"),n=te("text"),s=te("font-weight"),r=te("tracking"),o=te("leading"),i=te("breakpoint"),a=te("container"),c=te("spacing"),d=te("radius"),u=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),x=te("aspect"),k=te("ease"),v=te("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...T(),N,C],E=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[N,C,c],V=()=>[Le,"full","auto",...j()],D=()=>[je,"none","subgrid",N,C],_=()=>["auto",{span:["full",je,N,C]},je,N,C],B=()=>[je,"auto",N,C],de=()=>["auto","min","max","fr",N,C],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],ye=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Y=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],P=()=>[e,N,C],w=()=>[...T(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Mh,Sh,{size:[N,C]}],X=()=>[Ss,yt,$e],Q=()=>["","none","full",d,N,C],se=()=>["",I,yt,$e],K=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[I,Ss,na,ta],en=()=>["","none",g,N,C],tn=()=>["none",I,N,C],nn=()=>["none",I,N,C],As=()=>[I,N,C],sn=()=>[Le,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[Qo],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[jh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",I],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,C,N,x]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[Th],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Le,"auto","initial","none",C]}],grow:[{grow:["",I,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[je,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ye()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...ye()]}],"min-w":[{"min-w":[a,"screen","none",...ye()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ye()]}],h:[{h:["screen","lh",...ye()]}],"min-h":[{"min-h":["screen","lh","none",...ye()]}],"max-h":[{"max-h":["screen","lh",...ye()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Vh,Ch]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ss,C]}],"font-family":[{font:[Ph,Nh,t]}],"font-features":[{"font-features":[C]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[I,"auto",N,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[je,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:w()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,N,C],radial:["",N,C],conic:[je,N,C]},Eh,Ah]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Qt,Jt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,Qt,Jt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",h,Qt,Jt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[I,N,C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[N,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:en()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Qt,Jt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":en()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",k,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",v,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:tn()}],"rotate-x":[{"rotate-x":tn()}],"rotate-y":[{"rotate-y":tn()}],"rotate-z":[{"rotate-z":tn()}],scale:[{scale:nn()}],"scale-x":[{"scale-x":nn()}],"scale-y":[{"scale-y":nn()}],"scale-z":[{"scale-z":nn()}],"scale-3d":["scale-3d"],skew:[{skew:As()}],"skew-x":[{"skew-x":As()}],"skew-y":[{"skew-y":As()}],transform:[{transform:[N,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:sn()}],"translate-x":[{"translate-x":sn()}],"translate-y":[{"translate-y":sn()}],"translate-z":[{"translate-z":sn()}],"translate-none":["translate-none"],zoom:[{zoom:[je,N,C]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N,C]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function M(...e){return Lh(Uf(e))}const Rh=({title:e,children:t,className:n})=>{const[s,r]=b.useState(!1);return l.jsxs("div",{className:M("glass-card overflow-hidden p-0 border border-border/50",n),children:[l.jsxs("button",{type:"button",onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between font-bold text-foreground text-left cursor-pointer hover:bg-secondary/20 transition-colors",children:[l.jsx("span",{children:e}),l.jsx(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(oe,{initial:!1,children:s&&l.jsx(O.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},da={success:"border-green-500/20 bg-green-500/5",error:"border-red-500/20 bg-red-500/5",warning:"border-amber-500/20 bg-amber-500/5",info:"border-blue-500/20 bg-blue-500/5"},ua={success:{title:"var(--alert-success-title, #14532d)",desc:"var(--alert-success-desc, #15803d)"},error:{title:"var(--alert-error-title, #7f1d1d)",desc:"var(--alert-error-desc, #b91c1c)"},warning:{title:"var(--alert-warning-title, #78350f)",desc:"var(--alert-warning-desc, #b45309)"},info:{title:"var(--alert-info-title, #1e3a8a)",desc:"var(--alert-info-desc, #1d4ed8)"}},Ih=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=b.useState(!0),a=ua[n]||ua.info,c={success:l.jsx(kt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(on,{size:18,style:{color:a.title}}),info:l.jsx(jt,{size:18,style:{color:a.title}})};return l.jsx(oe,{children:o&&l.jsxs(O.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:M("flex items-start gap-4 p-4 rounded-2xl border text-left",da[n]||da.info,r),children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:c[n]||c.info}),l.jsxs("div",{className:"flex-1 space-y-1",children:[e&&l.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&l.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&l.jsx("button",{type:"button",onClick:()=>i(!1),style:{color:a.title},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors cursor-pointer shrink-0",children:l.jsx(Ne,{size:14})})]})})},fa={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},ha={online:"bg-emerald-500 ring-emerald-500/20",offline:"bg-zinc-400 ring-zinc-400/20",busy:"bg-destructive ring-destructive/20",syncing:"bg-primary ring-primary/20 animate-pulse"},zh=({src:e,alt:t="User Profile",name:n="",size:s="md",status:r,className:o})=>{const i=n?n.split(" ").map(a=>a[0]).slice(0,2).join("").toUpperCase():"";return l.jsxs("div",{className:"relative inline-block shrink-0",children:[l.jsx("div",{className:M("relative rounded-full overflow-hidden flex items-center justify-center border border-border/80 shadow-md bg-secondary/50 font-bold text-foreground font-sans",fa[s]||fa.md,o),children:e?l.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):l.jsx("span",{children:i||"?"})}),r&&ha[r]&&l.jsx("span",{className:M("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},bt=({children:e,className:t})=>l.jsx("div",{className:M("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Ue=({label:e,error:t,icon:n,className:s,id:r,...o})=>l.jsxs("div",{className:M("space-y-1.5 w-full text-left",s),children:[e&&l.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsxs("div",{className:"relative group",children:[n&&l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:l.jsx(n,{size:18})}),l.jsx("input",{id:r,className:M("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(O.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),xe=({children:e,className:t,variant:n="primary",loading:s=!1,...r})=>{const o={primary:"btn-primary",secondary:"btn-secondary",outline:"btn-outline",ghost:"btn-ghost",glass:"btn-glass",destructive:"btn-destructive"};return l.jsxs(O.button,{whileHover:{y:-2},whileTap:{scale:.98},className:M("relative overflow-hidden",o[n],s&&"opacity-70 cursor-not-allowed",t),disabled:s||r.disabled,...r,children:[s&&l.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e,l.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:animate-[shine_1.5s_infinite]"})]})},Ns=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:M("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(O.div,{className:M("w-5 h-5 rounded-lg border flex items-center justify-center transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(oe,{children:e&&l.jsx(O.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(_a,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Oh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Wa,title:o="Ether UI Console",className:i})=>{const[a,c]=b.useState(e),[d,u]=b.useState(""),[f,h]=b.useState(""),[m,g]=b.useState(""),[p,x]=b.useState(!1),[k,v]=b.useState(!1),[y,T]=b.useState(!1),S=async E=>{E.preventDefault(),T(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:d,email:f,password:m,acceptTerms:k}):a==="forgot"&&s&&await s({email:f})}finally{T(!1)}};return l.jsxs("div",{className:M("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/5 rounded-full blur-[120px] pointer-events-none animate-pulse"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px] pointer-events-none animate-pulse duration-4000"}),l.jsx("div",{className:"w-full max-w-md z-10",children:l.jsxs(oe,{mode:"wait",children:[a==="login"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Ns,{label:"Remember me",checked:p,onChange:x}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:d,onChange:E=>u(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Ns,{label:"I agree to the Terms & Conditions",checked:k,onChange:v})}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsxs("button",{type:"button",onClick:()=>c("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[l.jsx(za,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},ma=({children:e,variant:t="default",className:n})=>{const s={default:"bg-secondary text-secondary-foreground border-border",primary:"bg-primary text-primary-foreground border-primary",success:"bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/20",warning:"bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20",danger:"bg-destructive text-destructive-foreground border-destructive"};return l.jsx("span",{className:M("px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider border inline-flex items-center justify-center",s[t],n),children:e})},pa=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>l.jsx(oe,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(O.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:M("relative w-full max-w-lg glass-card overflow-hidden p-0 flex flex-col max-h-[90vh] text-left",o,r),children:[l.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[l.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),l.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:l.jsx(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),_h=({isOpen:e,onClose:t,onConfirm:n,title:s="Are you sure?",message:r="This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",confirmVariant:a="destructive",loading:c=!1})=>l.jsx(pa,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsx(xe,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(xe,{variant:a,onClick:n,loading:c,children:o})]})]})}),Fh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=b.useState(!1),c=b.useRef(null),d=t.find(u=>u.value===n);return b.useEffect(()=>{const u=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),l.jsxs("div",{ref:c,className:M("space-y-1.5 w-full text-left relative",o),children:[e&&l.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsx("div",{children:l.jsxs("button",{type:"button",onClick:()=>a(!i),className:"glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",children:[l.jsx("span",{className:M(!d&&"text-muted-foreground/60"),children:d?d.label:r}),l.jsx(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(oe,{children:i&&l.jsx(O.div,{initial:{opacity:0,y:5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.98},transition:{duration:.15},className:"absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",children:t.map((u,f)=>{const h=u.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(u.value),a(!1)},className:M("w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",h?"bg-primary text-primary-foreground font-semibold":"hover:bg-secondary text-foreground"),children:u.label},u.value||f)})})})]})},Bh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=b.useState(!1),[a,c]=b.useState([]),d=b.useRef(null),u=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const x=Array.from(p).map(v=>{const T=v.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:v.name,size:(v.size/1024).toFixed(1)+" KB",rawFile:v,progress:0,status:T?"failed":"uploading",error:T?`File exceeds limit of ${s}MB`:null}}),k=[...a,...x].slice(0,n);c(k),e&&e(k.map(v=>v.rawFile)),x.forEach(v=>{if(v.status==="failed")return;let y=0;const T=setInterval(()=>{y+=Math.floor(Math.random()*15)+5,y>=100?(y=100,clearInterval(T),c(S=>S.map(E=>E.id===v.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===v.id?{...E,progress:y}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(x=>x.id!==p))};return l.jsxs("div",{className:M("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:u,onDragOver:u,onDragLeave:u,onDrop:h,onClick:()=>d.current&&d.current.click(),className:M("relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",o?"border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"),children:[l.jsx("input",{ref:d,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(O.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:M("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Ba,{size:24})}),l.jsxs("div",{className:"text-center space-y-1",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),l.jsx(oe,{children:a.length>0&&l.jsxs(O.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},className:"space-y-2 border border-border/40 bg-card/60 rounded-2xl p-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[l.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),l.jsx("button",{onClick:()=>c([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),l.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>l.jsxs(O.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx($a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(O.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&l.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&l.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[l.jsx(kt,{size:10})," Upload complete!"]})]})]}),l.jsx("button",{onClick:()=>g(p.id),className:"p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ne,{size:14})})]},p.id))})]})})]})},$h=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(oe,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm cursor-pointer"}),l.jsxs(O.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:M("fixed top-4 right-4 z-50 h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-sm bg-card/95 backdrop-blur-xl border border-border/50 shadow-2xl rounded-3xl flex flex-col text-left overflow-hidden",o),children:[l.jsxs("div",{className:"p-4 border-b border-border/40 flex items-center justify-between min-h-[72px] shrink-0 bg-card/65 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:l.jsx(Ls,{size:18,className:"animate-bounce"})}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&l.jsx("button",{onClick:s,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-destructive cursor-pointer transition-colors",title:"Clear All",children:l.jsx(Xa,{size:16})}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ne,{size:16})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:l.jsx(oe,{initial:!1,children:n.length===0?l.jsxs(O.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[l.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:l.jsx(Ls,{size:32,className:"opacity-50"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",c=i.type==="warning";return l.jsxs(O.div,{layout:!0,initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-3.5 rounded-2xl bg-secondary/20 border border-border/10 flex items-start gap-3 relative overflow-hidden group hover:border-border/30 transition-all text-xs",children:[i.unread&&l.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),l.jsxs("div",{className:M("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",c&&"bg-amber-500/10 text-amber-500",!a&&!c&&"bg-sky-500/10 text-sky-500"),children:[a&&l.jsx(kt,{size:16}),c&&l.jsx(on,{size:16}),!a&&!c&&l.jsx(jt,{size:16})]}),l.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("p",{className:"font-bold text-foreground",children:i.title}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),l.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),l.jsx("button",{onClick:()=>r&&r(i.id),className:"absolute bottom-3 right-3 p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors opacity-0 group-hover:opacity-100",title:"Dismiss notification",children:l.jsx(Ne,{size:12})})]},i.id)})})})]})]})}),Wh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(c,d)=>d+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return l.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[l.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[l.jsx(xe,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(xe,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),l.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",l.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",l.jsx("span",{className:"font-bold text-foreground",children:t})]})}),l.jsx("div",{children:l.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[l.jsxs(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(rn,{size:16})]}),o.map((i,a)=>{if(i==="...")return l.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:l.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const c=e===i;return l.jsx(xe,{variant:c?"primary":"outline",className:`w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs font-semibold ${c?"":"text-muted-foreground hover:text-foreground"}`,onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(rt,{size:16})]})]})})]})]})},Uh=({children:e,content:t})=>{const[n,s]=b.useState(!1),[r,o]=b.useState({x:0,y:0}),i=b.useRef(null),a=()=>{if(i.current){const u=i.current.getBoundingClientRect();o({x:u.left+u.width/2,y:u.top+window.scrollY-8})}};b.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const c=()=>{t&&s(!0)},d=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:d,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&Ca.createPortal(l.jsx(oe,{children:l.jsxs(O.div,{initial:{opacity:0,scale:.95,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:4},style:{position:"absolute",left:r.x,top:r.y,transform:"translateX(-50%) translateY(-100%)",zIndex:99999,pointerEvents:"none"},className:"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-lg shadow-xl whitespace-nowrap",children:[t,l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-zinc-900 dark:border-t-zinc-100"})]})}),document.body)]})},Gh=({value:e=0,size:t=80,strokeWidth:n=6,showPercent:s=!0,className:r})=>{const o=(t-n)/2,i=o*2*Math.PI,a=Math.min(Math.max(e,0),100),c=i-a/100*i;return l.jsxs("div",{className:M("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[l.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[l.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),l.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:c,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&l.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},Yh=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:M("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),l.jsx(O.div,{className:M("w-5 h-5 rounded-full border flex items-center justify-center transition-colors duration-200",e?"border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(oe,{children:e&&l.jsx(O.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},className:"w-2.5 h-2.5 rounded-full bg-primary"})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),ga=b.createContext(),Kh=({children:e,defaultTheme:t="light"})=>{const[n,s]=b.useState(()=>{if(typeof window>"u")return!1;const i=new URLSearchParams(window.location.search).get("theme");if(i)return i==="dark";const a=localStorage.getItem("theme");return a?a==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});b.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]);const r=()=>s(o=>!o);return l.jsx(ga.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},xa=()=>{const e=b.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Hh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:c})=>{const[d,u]=b.useState(!1),[f,h]=b.useState(!e);b.useEffect(()=>{h(!e)},[e]),b.useEffect(()=>{const y=()=>{const T=window.innerWidth<768;u(T),T||h(!1)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);const m=()=>{if(d){const y=!f;h(y),t&&t(!y)}else t&&t(!e)},g=()=>{d&&(h(!1),t&&t(!0))};let p=!1,x=()=>{},k=!1;try{const y=xa();y&&(p=y.isDark,x=y.toggleTheme,k=!0)}catch{}const v=d?!f:e;return l.jsxs(l.Fragment,{children:[d&&a&&l.jsxs("div",{className:"flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),l.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[k&&l.jsx("button",{type:"button",onClick:x,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:p?l.jsx(Ha,{size:16,className:"text-amber-500"}):l.jsx(Ka,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:m,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:l.jsx(Ga,{size:16,className:"text-foreground"})})]})]}),d&&!v&&l.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),l.jsxs("aside",{className:M("h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative",d?"fixed top-0 bottom-0 left-0 z-50":"z-30",v?"w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20":"w-64 translate-x-0 border-r border-border/40",i),children:[l.jsxs("div",{className:M("flex border-b border-border/20 shrink-0 transition-all duration-300",v?"flex-col items-center justify-center gap-2.5 py-4 px-1 min-h-[88px]":"flex-row items-center justify-between p-4 min-h-[72px]"),children:[l.jsxs("div",{className:M("flex items-center gap-3 overflow-hidden",v&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!v&&l.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),l.jsx("button",{type:"button",onClick:m,className:"p-1.5 hover:bg-secondary/60 rounded-xl border border-border/20 text-muted-foreground hover:text-foreground cursor-pointer shrink-0 transition-colors",children:v?l.jsx(rt,{size:14}):l.jsx(rn,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",onClickCapture:g,children:r}),o&&l.jsxs("div",{className:M("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",v?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[l.jsx("div",{className:M("flex-1 min-w-0 flex overflow-hidden",v?"flex-col items-center justify-center":"flex-row items-center"),children:o}),c&&l.jsx("button",{type:"button",onClick:c,title:"Logout",className:M("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",v?"mt-2":""),children:l.jsx(Ua,{size:16})})]})]})]})},Xh=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o})=>l.jsxs("button",{type:"button",onClick:s,className:M("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-250 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary/8 text-primary border-primary/15 shadow-[0_0_20px_rgba(var(--primary),0.02)]":"text-muted-foreground hover:text-foreground hover:bg-secondary/35"),children:[e&&l.jsx(e,{size:18,className:"shrink-0"}),!r&&l.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!r&&o&&!n&&l.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-bold border shrink-0 bg-primary/10 text-primary border-primary/20",children:o}),!r&&n&&l.jsx(O.div,{layoutId:"active-sidebar-indicator",className:"w-1.5 h-1.5 rounded-full bg-primary shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),qh=({avatarLabel:e,avatarSrc:t,avatarClassName:n,title:s,subtitle:r,badges:o=[],meta:i,selected:a=!1,onClick:c,startSlot:d,endSlot:u,showChevron:f=!0,className:h,...m})=>l.jsxs(O.div,{layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},onClick:c,className:M("flex items-center gap-3 p-4 rounded-2xl border transition-all duration-200 cursor-pointer select-none group",a?"bg-primary/8 border-primary/30 shadow-md shadow-primary/5":"bg-card border-border hover:bg-secondary/50 hover:border-border/80",h),...m,children:[d&&l.jsx("div",{className:"shrink-0",onClick:g=>g.stopPropagation(),children:d}),l.jsx("div",{className:M("shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-sm font-black text-primary-foreground overflow-hidden",a?"bg-primary shadow-lg shadow-primary/20":"bg-primary/80",n),children:t?l.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"}):l.jsx("span",{children:e})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:M("text-sm font-bold truncate transition-colors",a?"text-primary":"text-foreground"),children:s}),r&&l.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5 font-medium",children:r}),o.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:o.map((g,p)=>l.jsx(Zh,{variant:g.variant,children:g.label},p))}),i&&l.jsx("div",{className:"mt-1",children:i})]}),u?l.jsx("div",{className:"shrink-0",children:u}):f?l.jsx(rt,{size:16,className:M("shrink-0 transition-all duration-200",a?"text-primary translate-x-0.5":"text-muted-foreground/40 group-hover:text-muted-foreground")}):null]}),ya={default:"bg-secondary text-foreground border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 border border-amber-500/20",danger:"bg-red-500/10 text-red-600 border border-red-500/20"},Zh=({variant:e="default",children:t,className:n})=>l.jsx("span",{className:M("inline-flex items-center px-2 py-0.5 rounded-md text-[9px] font-black uppercase tracking-widest",ya[e]??ya.default,n),children:t}),Jh=({count:e=4})=>l.jsx(l.Fragment,{children:Array.from({length:e}).map((t,n)=>l.jsx("div",{className:"h-[76px] rounded-2xl bg-secondary/50 border border-border animate-pulse"},n))}),Qh=({selectedItem:e=null,onBack:t,listHeader:n,list:s,listFooter:r,detail:o,emptyDetail:i,backLabel:a="Back to List",listWidth:c="w-full lg:w-[400px]",className:d,listClassName:u,detailClassName:f})=>l.jsxs("div",{className:M("h-full flex flex-col lg:flex-row gap-6 lg:gap-8",d),children:[l.jsxs("div",{className:M("flex flex-col gap-4 transition-all duration-300",e&&"hidden lg:flex",c,u),children:[n&&l.jsx("div",{className:"shrink-0",children:n}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-2 md:space-y-3 pr-1",children:l.jsx(oe,{mode:"popLayout",children:s})}),r&&l.jsx("div",{className:"shrink-0",children:r})]}),l.jsx("div",{className:M("flex-1 min-w-0 transition-all duration-300",!e&&"hidden lg:block",f),children:l.jsx(oe,{mode:"wait",children:e?l.jsxs(O.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:16},transition:{duration:.2,ease:"easeOut"},className:"h-full flex flex-col gap-4",children:[t&&l.jsxs("button",{onClick:t,className:"lg:hidden inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground font-bold text-xs uppercase tracking-widest transition-colors w-fit shrink-0",children:[l.jsx(rn,{size:15}),a]}),l.jsx("div",{className:"flex-1 min-h-0",children:o})]},(e==null?void 0:e.id)??"detail"):l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"h-full",children:i??l.jsx(em,{})},"split-view-empty")})})]}),em=()=>l.jsxs("div",{className:"h-full rounded-3xl flex flex-col items-center justify-center border-dashed border-2 border-border p-8 text-center bg-card/30",children:[l.jsx("div",{className:"w-16 h-16 rounded-2xl bg-secondary flex items-center justify-center mb-5 border border-border",children:l.jsx(rt,{className:"text-muted-foreground/30",size:28})}),l.jsx("p",{className:"text-muted-foreground font-black uppercase tracking-widest text-[10px]",children:"Select an item to view details"})]}),tm=({min:e=0,max:t=100,step:n=1,value:s=50,onChange:r,label:o,className:i})=>{const a=(s-e)/(t-e)*100;return l.jsxs("div",{className:M("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&l.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&l.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),l.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),l.jsxs("div",{className:"relative flex items-center group",children:[l.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:c=>r&&r(Number(c.target.value)),className:"w-full h-1.5 bg-secondary/50 dark:bg-zinc-800 rounded-full appearance-none outline-none cursor-pointer",style:{background:`linear-gradient(to right, var(--primary) 0%, var(--primary) ${a}%, var(--secondary) ${a}%, var(--secondary) 100%)`}}),l.jsx("style",{children:`
|
|
170
|
+
`),()=>{var z;(z=a.current)==null||z.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Lu,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:vt.cloneElement(e,{ref:f})})}const Iu=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:d})=>{const u=ln(zu),f=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{u.set(g,!0);for(const p of u.values())if(!p)return;s&&s()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,s]);return o&&h&&(m={...m}),b.useMemo(()=>{u.forEach((g,p)=>u.set(p,!1))},[n]),vt.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),e=l.jsx(Ru,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:d,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function zu(){return new Map}function go(e=!0){const t=b.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=b.useId();b.useEffect(()=>{if(e)return r(o)},[e]);const i=b.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Yt=e=>e.key||"";function xo(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const oe=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:d})=>{const[u,f]=go(i),h=b.useMemo(()=>xo(e),[e]),m=i&&!u?[]:h.map(Yt),g=b.useRef(!0),p=b.useRef(h),x=ln(()=>new Map),k=b.useRef(new Set),[v,y]=b.useState(h),[T,S]=b.useState(h);Os(()=>{g.current=!1,p.current=h;for(let j=0;j<T.length;j++){const V=Yt(T[j]);m.includes(V)?(x.delete(V),k.current.delete(V)):x.get(V)!==!0&&x.set(V,!1)}},[T,m.length,m.join("-")]);const E=[];if(h!==v){let j=[...h];for(let V=0;V<T.length;V++){const D=T[V],_=Yt(D);m.includes(_)||(j.splice(V,0,D),E.push(D))}return o==="wait"&&E.length&&(j=E),S(xo(j)),y(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:z}=b.useContext(an);return l.jsx(l.Fragment,{children:T.map(j=>{const V=Yt(j),D=i&&!u?!1:h===T||m.includes(V),_=()=>{if(k.current.has(V))return;if(x.has(V))k.current.add(V),x.set(V,!0);else return;let B=!0;x.forEach(de=>{de||(B=!1)}),B&&(z==null||z(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Iu,{isPresent:D,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:D?void 0:_,anchorX:a,anchorY:c,children:j},V)})})},yo=b.createContext({strict:!1}),bo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let vo=!1;function Ou(){if(vo)return;const e={};for(const t in bo)e[t]={isEnabled:n=>bo[t].some(s=>!!n[s])};hi(e),vo=!0}function wo(){return Ou(),kd()}function _u(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Fu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fu.has(e)}let ko=e=>!Kt(e);function Bu(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Bu(require("@emotion/is-prop-valid").default)}catch{}function $u(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||ie(e[r])||(ko(r)||n===!0&&Kt(r)||!t&&!Kt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Ht=b.createContext({});function Wu(e,t){if(_t(e)){const{initial:n,animate:s}=e;return{initial:n===!1||ft(n)?n:void 0,animate:ft(s)?s:void 0}}return e.inherit!==!1?t:{}}function Uu(e){const{initial:t,animate:n}=Wu(e,b.useContext(Ht));return b.useMemo(()=>({initial:t,animate:n}),[jo(t),jo(n)])}function jo(e){return Array.isArray(e)?e.join(" "):e}const ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function To(e,t,n){for(const s in t)!ie(t[s])&&!Ni(s,n)&&(e[s]=t[s])}function Gu({transformTemplate:e},t){return b.useMemo(()=>{const n=ms();return os(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yu(e,t){const n=e.style||{},s={};return To(s,n,e),Object.assign(s,Gu(e,t)),s}function Ku(e,t){const n={},s=Yu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const So=()=>({...ms(),attrs:{}});function Hu(e,t,n,s){const r=b.useMemo(()=>{const o=So();return Pi(o,t,Mi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};To(o,e.style,e),r.style={...o,...r.style}}return r}const Xu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ps(e){return typeof e!="string"||e.includes("-")?!1:!!(Xu.indexOf(e)>-1||/[A-Z]/u.test(e))}function qu(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ps(e)?Hu:Ku)(t,s,r,e),d=$u(t,typeof e=="string",o),u=e!==b.Fragment?{...d,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ie(f)?f.get():f,[f]);return b.createElement(e,{...u,children:h})}function Zu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ju(n,s,r,e),renderState:t()}}function Ju(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Ut(o[h]);let{initial:i,animate:a}=e;const c=_t(e),d=di(e);t&&d&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const f=u?a:i;if(f&&typeof f!="boolean"&&!Ot(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=$n(e,h[m]);if(g){const{transitionEnd:p,transition:x,...k}=g;for(const v in k){let y=k[v];if(Array.isArray(y)){const T=u?y.length-1:0;y=y[T]}y!==null&&(r[v]=y)}for(const v in p)r[v]=p[v]}}}return r}const Co=e=>(t,n)=>{const s=b.useContext(Ht),r=b.useContext(Tt),o=()=>Zu(e,t,s,r);return n?o():ln(o)},Qu=Co({scrapeMotionValuesFromProps:ls,createRenderState:ms}),ef=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),tf=Symbol.for("motionComponentSymbol");function nf(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const r=b.useRef(null);return b.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const c=i(o);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const No=b.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sf(e,t,n,s,r,o){var y,T;const{visualElement:i}=b.useContext(Ht),a=b.useContext(yo),c=b.useContext(Tt),d=b.useContext(hs),u=d.reducedMotion,f=d.skipAnimations,h=b.useRef(null),m=b.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=b.useContext(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&rf(h.current,n,r,p);const x=b.useRef(!1);b.useInsertionEffect(()=>{g&&x.current&&g.update(n,c)});const k=n[Wr],v=b.useRef(!!k&&typeof window<"u"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,k))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,k)));return Os(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,k)}),v.current=!1),g.enteringChildren=void 0)}),g}function rf(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Po(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function Po(e){if(e)return e.options.allowProjection!==!1?e.projection:Po(e.parent)}function gs(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&_u(s);const o=n?n==="svg":ps(e),i=o?ef:Qu;function a(d,u){let f;const h={...b.useContext(hs),...d,layoutId:of(d)},{isStatic:m}=h,g=Uu(d),p=i(d,m);if(!m&&typeof window<"u"){af(h,s);const x=lf(h);f=x.MeasureLayout,g.visualElement=sf(e,p,h,r,x.ProjectionNode,o)}return l.jsxs(Ht.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,qu(e,d,nf(p,g.visualElement,u),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(a);return c[tf]=e,c}function of({layoutId:e}){const t=b.useContext(an).id;return t&&e!==void 0?t+"-"+e:e}function af(e,t){const n=b.useContext(yo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ge(!1,s,"lazy-strict-mode"):Te(!1,s,"lazy-strict-mode")}}function lf(e){const t=wo(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function cf(e,t){if(typeof Proxy>"u")return gs;const n=new Map,s=(o,i)=>gs(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&fn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,gs(i,void 0,e,t)),n.get(i))})}const df=(e,t)=>t.isSVG??ps(e)?new _d(t):new Dd(t,{allowProjection:e!==b.Fragment});class uf extends De{constructor(t){super(t),t.animationState||(t.animationState=Ud(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ot(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let ff=0;class hf extends De{constructor(){super(...arguments),this.id=ff++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const c=_e(this.node,i,a);if(c){const{transition:d,transitionEnd:u,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mf={animation:{Feature:uf},exit:{Feature:hf}};function gt(e){return{point:{x:e.pageX,y:e.pageY}}}const pf=e=>t=>Zn(t)&&e(t,gt(t));function xt(e,t,n,s){return pt(e,t,pf(n),s)}const Ao=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function gf(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=new Set(["auto","scroll"]);class Vo{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xt(this.lastRawMoveEventInfo,this.transformPagePoint));const m=xs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=gf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:x}=m,{timestamp:k}=re;this.history.push({...x,timestamp:k});const{onStart:v,onMove:y}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Xt(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:x,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=xs(m.type==="pointercancel"?this.lastMoveEventInfo:Xt(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,v),x&&x(m,v)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=gt(t),d=Xt(c,this.transformPagePoint),{point:u}=d,{timestamp:f}=re;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,xs(d,this.history)),this.removeListeners=it(xt(this.contextWindow,"pointermove",this.handlePointerMove),xt(this.contextWindow,"pointerup",this.handlePointerUp),xt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Eo.has(s.overflowX)||Eo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,r=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ae(this.updatePoint)}}function Xt(e,t){return t?{point:t(e.point)}:e}function Do(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,xf(t)),velocity:yf(t,.1)}}function xf(e){return e[0]}function Lo(e){return e[e.length-1]}function yf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Lo(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>ue(t)*2&&(s=e[1]);const o=he(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function bf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?$(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?$(n,e,s.max):Math.min(e,n)),e}function Ro(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vf(e,{top:t,left:n,bottom:s,right:r}){return{x:Ro(e.x,n,r),y:Ro(e.y,t,s)}}function Io(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function wf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function kf(e,t){let n=.5;const s=ce(e),r=ce(t);return r>s?n=ot(t.min,t.max-s,e.min):s>r&&(n=ot(e.min,e.max-r,t.min)),be(0,1,n)}function jf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ys=.35;function Tf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:zo(e,"left","right"),y:zo(e,"top","bottom")}}function zo(e,t,n){return{min:Oo(e,t),max:Oo(e,n)}}function Oo(e,t){return typeof e=="number"?e:e[t]||0}const Sf=new WeakMap;class Cf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(gt(f).point),this.stopAnimation()},i=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Jc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ke(k=>{let v=this.getAxisMotionValue(k).get()||0;if(ve.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[k];T&&(v=ce(T)*(parseFloat(v)/100))}}this.originPoint[k]=v}),p&&F.update(()=>p(f,h),!1,!0),Un(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:k}=h;if(g&&this.currentDirection===null){this.currentDirection=Pf(k),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),x&&F.update(()=>x(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Ao(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&F.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!qt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=bf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&tt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=vf(s.layoutBox,t):this.constraints=!1,this.elastic=Tf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;Te(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=Nd(s,r.root,this.visualElement.getTransformPagePoint());let i=wf(r.layout.layoutBox,o);if(n){const a=n(Td(i));this.hasMutatedConstraints=!!a,a&&(i=pi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=ke(u=>{if(!qt(u,n,this.currentDirection))return;let f=c&&c[u]||{};(i===!0||i===u)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Un(this.visualElement,t),s.start(Bn(t,s,0,n,this.visualElement,!1))}stopAnimation(){ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ke(n=>{const{drag:s}=this.getProps();if(!qt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-$(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!tt(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ke(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=kf({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),ke(i=>{if(!qt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:d}=this.constraints[i];a.set($(c,d,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Sf.set(this.visualElement,this);const t=this.visualElement.current,n=xt(t,"pointerdown",d=>{const{drag:u,dragListener:f=!0}=this.getProps(),h=d.target,m=h!==t&&rd(h);u&&f&&!m&&this.start(d)});let s;const r=()=>{const{dragConstraints:d}=this.getProps();tt(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Nf(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.read(r);const a=pt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=d[f].translate,h.set(h.get()+d[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ys,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Nf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function qt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Af extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Cf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const bs=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)};class Mf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ao(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:bs(t),onStart:bs(n),onMove:bs(s),onEnd:(o,i)=>{delete this.session,r&&F.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=xt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vs=!1;class Ef extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),vs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),vs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||F.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),qn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;vs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Fo(e){const[t,n]=go(),s=b.useContext(an);return l.jsx(Ef,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(No),isPresent:t,safeToRemove:n})}const Vf={pan:{Feature:Mf},drag:{Feature:Af,ProjectionNode:mo,MeasureLayout:Fo}};function Bo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&F.postRender(()=>o(t,gt(t)))}class Df extends De{mount(){const{current:t}=this.node;t&&(this.unmount=ed(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Lf extends De{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=it(pt(this.node.current,"focus",()=>this.onFocus()),pt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $o(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&F.postRender(()=>o(t,gt(t)))}class Rf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=od(t,(r,o)=>($o(this.node,o,"Start"),(i,{success:a})=>$o(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const ws=new WeakMap,ks=new WeakMap,If=e=>{const t=ws.get(e.target);t&&t(e)},zf=e=>{e.forEach(If)};function Of({root:e,...t}){const n=e||document;ks.has(n)||ks.set(n,{});const s=ks.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(zf,{root:e,...t})),s[r]}function _f(e,t,n){const s=Of(t);return ws.set(e,n),s.observe(e),()=>{ws.delete(e),s.unobserve(e)}}const Ff={some:0,all:1};class Bf extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Ff[r]},a=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=u?f:h;m&&m(d)};this.stopObserver=_f(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($f(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function $f({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wf={...mf,...{inView:{Feature:Bf},tap:{Feature:Rf},focus:{Feature:Lf},hover:{Feature:Df}},...Vf,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},O=cf(Wf,df);function Wo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Uf(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wo(e))&&(s&&(s+=" "),s+=t);return s}const Gf=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Yf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zt="-",Go=[],Kf="arbitrary..",Hf=e=>{const t=qf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Xf(i);const a=i.split(Zt),c=a[0]===""&&a.length>1?1:0;return Yo(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],d=n[i];return c?d?Gf(d,c):c:d||Go}return n[i]||Go}}},Yo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const d=Yo(e,t+1,o);if(d)return d}const i=n.validators;if(i===null)return;const a=t===0?e.join(Zt):e.slice(t).join(Zt),c=i.length;for(let d=0;d<c;d++){const u=i[d];if(u.validator(a))return u.classGroupId}},Xf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Kf+s:void 0})(),qf=e=>{const{theme:t,classGroups:n}=e;return Zf(n,t)},Zf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];js(r,n,s,t)}return n},js=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Jf(i,t,n,s)}},Jf=(e,t,n,s)=>{if(typeof e=="string"){Qf(e,t,n);return}if(typeof e=="function"){eh(e,t,n,s);return}th(e,t,n,s)},Qf=(e,t,n)=>{const s=e===""?t:Ko(t,e);s.classGroupId=n},eh=(e,t,n,s)=>{if(nh(e)){js(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Yf(n,e))},th=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];js(c,Ko(t,a),n,s)}},Ko=(e,t)=>{let n=e;const s=t.split(Zt),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=Uo(),n.nextPart.set(i,a)),n=a}return n},nh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},Ts="!",Ho=":",rh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),ih=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,d;const u=r.length;for(let p=0;p<u;p++){const x=r[p];if(i===0&&a===0){if(x===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(x==="/"){d=p;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const f=o.length===0?r:r.slice(c);let h=f,m=!1;f.endsWith(Ts)?(h=f.slice(0,-1),m=!0):f.startsWith(Ts)&&(h=f.slice(1),m=!0);const g=d&&d>c?d-c:void 0;return Xo(o,m,h,g)};if(t){const r=t+Ho,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Xo(rh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},oh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",c=t.has(i);a||c?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},ah=e=>({cache:sh(e.cacheSize),parseClassName:ih(e),sortModifiers:oh(e),postfixLookupClassGroupIds:lh(e),...Hf(e)}),lh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)t[n[s]]=!0;return t},ch=/\s+/,dh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(ch);let d="";for(let u=c.length-1;u>=0;u-=1){const f=c[u],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:x}=n(f);if(h){d=f+(d.length>0?" "+d:d);continue}let k=!!x,v;if(k){const z=p.substring(0,x);v=s(z);const j=v&&i[v]?s(p):void 0;j&&j!==v&&(v=j,k=!1)}else v=s(p);if(!v){if(!k){d=f+(d.length>0?" "+d:d);continue}if(v=s(p),!v){d=f+(d.length>0?" "+d:d);continue}k=!1}const y=m.length===0?"":m.length===1?m[0]:o(m).join(":"),T=g?y+Ts:y,S=T+v;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(v,k);for(let z=0;z<E.length;++z){const j=E[z];a.push(T+j)}d=f+(d.length>0?" "+d:d)}return d},uh=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=qo(n))&&(r&&(r+=" "),r+=s);return r},qo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=qo(e[s]))&&(n&&(n+=" "),n+=t);return n},fh=(e,...t)=>{let n,s,r,o;const i=c=>{const d=t.reduce((u,f)=>f(u),e());return n=ah(d),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const d=s(c);if(d)return d;const u=dh(c,n);return r(c,u),u};return o=i,(...c)=>o(uh(...c))},hh=[],te=e=>{const t=n=>n[e]||hh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ph=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>mh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Ss=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ph.test(e),Qo=()=>!0,vh=e=>gh.test(e)&&!xh.test(e),Cs=()=>!1,wh=e=>yh.test(e),kh=e=>bh.test(e),jh=e=>!C(e)&&!N(e),Th=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Sh=e=>Re(e,ia,Cs),C=e=>Zo.test(e),$e=e=>Re(e,oa,vh),ea=e=>Re(e,Dh,I),Ch=e=>Re(e,la,Qo),Nh=e=>Re(e,aa,Cs),ta=e=>Re(e,sa,Cs),Ph=e=>Re(e,ra,kh),Jt=e=>Re(e,ca,wh),N=e=>Jo.test(e),yt=e=>We(e,oa),Ah=e=>We(e,aa),na=e=>We(e,sa),Mh=e=>We(e,ia),Eh=e=>We(e,ra),Qt=e=>We(e,ca,!0),Vh=e=>We(e,la,!0),Re=(e,t,n)=>{const s=Zo.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},We=(e,t,n=!1)=>{const s=Jo.exec(e);return s?s[1]?t(s[1]):n:!1},sa=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",ia=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",Dh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Lh=fh(()=>{const e=te("color"),t=te("font"),n=te("text"),s=te("font-weight"),r=te("tracking"),o=te("leading"),i=te("breakpoint"),a=te("container"),c=te("spacing"),d=te("radius"),u=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),x=te("aspect"),k=te("ease"),v=te("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...T(),N,C],E=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[N,C,c],V=()=>[Le,"full","auto",...j()],D=()=>[je,"none","subgrid",N,C],_=()=>["auto",{span:["full",je,N,C]},je,N,C],B=()=>[je,"auto",N,C],de=()=>["auto","min","max","fr",N,C],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],ye=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Y=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],A=()=>[e,N,C],w=()=>[...T(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Mh,Sh,{size:[N,C]}],X=()=>[Ss,yt,$e],Q=()=>["","none","full",d,N,C],se=()=>["",I,yt,$e],K=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[I,Ss,na,ta],en=()=>["","none",g,N,C],tn=()=>["none",I,N,C],nn=()=>["none",I,N,C],Ps=()=>[I,N,C],sn=()=>[Le,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[Qo],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[jh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",I],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,C,N,x]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[Th],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Le,"auto","initial","none",C]}],grow:[{grow:["",I,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[je,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ye()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...ye()]}],"min-w":[{"min-w":[a,"screen","none",...ye()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...ye()]}],h:[{h:["screen","lh",...ye()]}],"min-h":[{"min-h":["screen","lh","none",...ye()]}],"max-h":[{"max-h":["screen","lh",...ye()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Vh,Ch]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ss,C]}],"font-family":[{font:[Ah,Nh,t]}],"font-features":[{"font-features":[C]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[I,"auto",N,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[je,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:w()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,N,C],radial:["",N,C],conic:[je,N,C]},Eh,Ph]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,Qt,Jt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Qt,Jt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Qt,Jt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[I,N,C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[N,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:en()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Qt,Jt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":en()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",k,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",v,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:tn()}],"rotate-x":[{"rotate-x":tn()}],"rotate-y":[{"rotate-y":tn()}],"rotate-z":[{"rotate-z":tn()}],scale:[{scale:nn()}],"scale-x":[{"scale-x":nn()}],"scale-y":[{"scale-y":nn()}],"scale-z":[{"scale-z":nn()}],"scale-3d":["scale-3d"],skew:[{skew:Ps()}],"skew-x":[{"skew-x":Ps()}],"skew-y":[{"skew-y":Ps()}],transform:[{transform:[N,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:sn()}],"translate-x":[{"translate-x":sn()}],"translate-y":[{"translate-y":sn()}],"translate-z":[{"translate-z":sn()}],"translate-none":["translate-none"],zoom:[{zoom:[je,N,C]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N,C]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function M(...e){return Lh(Uf(e))}const Rh=({title:e,children:t,className:n})=>{const[s,r]=b.useState(!1);return l.jsxs("div",{className:M("glass-card overflow-hidden p-0 border border-border/50",n),children:[l.jsxs("button",{type:"button",onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between font-bold text-foreground text-left cursor-pointer hover:bg-secondary/20 transition-colors",children:[l.jsx("span",{children:e}),l.jsx(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(oe,{initial:!1,children:s&&l.jsx(O.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},da={success:"border-green-500/20 bg-green-500/5",error:"border-red-500/20 bg-red-500/5",warning:"border-amber-500/20 bg-amber-500/5",info:"border-blue-500/20 bg-blue-500/5"},ua={success:{title:"var(--alert-success-title, #14532d)",desc:"var(--alert-success-desc, #15803d)"},error:{title:"var(--alert-error-title, #7f1d1d)",desc:"var(--alert-error-desc, #b91c1c)"},warning:{title:"var(--alert-warning-title, #78350f)",desc:"var(--alert-warning-desc, #b45309)"},info:{title:"var(--alert-info-title, #1e3a8a)",desc:"var(--alert-info-desc, #1d4ed8)"}},Ih=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=b.useState(!0),a=ua[n]||ua.info,c={success:l.jsx(kt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(on,{size:18,style:{color:a.title}}),info:l.jsx(jt,{size:18,style:{color:a.title}})};return l.jsx(oe,{children:o&&l.jsxs(O.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:M("flex items-start gap-4 p-4 rounded-2xl border text-left",da[n]||da.info,r),children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:c[n]||c.info}),l.jsxs("div",{className:"flex-1 space-y-1",children:[e&&l.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&l.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&l.jsx("button",{type:"button",onClick:()=>i(!1),style:{color:a.title},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors cursor-pointer shrink-0",children:l.jsx(Ne,{size:14})})]})})},fa={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},ha={online:"bg-emerald-500 ring-emerald-500/20",offline:"bg-zinc-400 ring-zinc-400/20",busy:"bg-destructive ring-destructive/20",syncing:"bg-primary ring-primary/20 animate-pulse"},zh=({src:e,alt:t="User Profile",name:n="",size:s="md",status:r,className:o})=>{const i=n?n.split(" ").map(a=>a[0]).slice(0,2).join("").toUpperCase():"";return l.jsxs("div",{className:"relative inline-block shrink-0",children:[l.jsx("div",{className:M("relative rounded-full overflow-hidden flex items-center justify-center border border-border/80 shadow-md bg-secondary/50 font-bold text-foreground font-sans",fa[s]||fa.md,o),children:e?l.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):l.jsx("span",{children:i||"?"})}),r&&ha[r]&&l.jsx("span",{className:M("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},bt=({children:e,className:t})=>l.jsx("div",{className:M("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Ue=({label:e,error:t,icon:n,className:s,id:r,...o})=>l.jsxs("div",{className:M("space-y-1.5 w-full text-left",s),children:[e&&l.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsxs("div",{className:"relative group",children:[n&&l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:l.jsx(n,{size:18})}),l.jsx("input",{id:r,className:M("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(O.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),xe=({children:e,className:t,variant:n="primary",loading:s=!1,...r})=>{const o={primary:"btn-primary",secondary:"btn-secondary",outline:"btn-outline",ghost:"btn-ghost",glass:"btn-glass",destructive:"btn-destructive"};return l.jsxs(O.button,{whileHover:{y:-2},whileTap:{scale:.98},className:M("relative overflow-hidden",o[n],s&&"opacity-70 cursor-not-allowed",t),disabled:s||r.disabled,...r,children:[s&&l.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e,l.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:animate-[shine_1.5s_infinite]"})]})},Ns=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:M("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(O.div,{className:M("w-5 h-5 rounded-lg border flex items-center justify-center transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(oe,{children:e&&l.jsx(O.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(_a,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Oh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Wa,title:o="Ether UI Console",className:i})=>{const[a,c]=b.useState(e),[d,u]=b.useState(""),[f,h]=b.useState(""),[m,g]=b.useState(""),[p,x]=b.useState(!1),[k,v]=b.useState(!1),[y,T]=b.useState(!1),S=async E=>{E.preventDefault(),T(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:d,email:f,password:m,acceptTerms:k}):a==="forgot"&&s&&await s({email:f})}finally{T(!1)}};return l.jsxs("div",{className:M("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/5 rounded-full blur-[120px] pointer-events-none animate-pulse"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px] pointer-events-none animate-pulse duration-4000"}),l.jsx("div",{className:"w-full max-w-md z-10",children:l.jsxs(oe,{mode:"wait",children:[a==="login"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Ns,{label:"Remember me",checked:p,onChange:x}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:d,onChange:E=>u(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Ns,{label:"I agree to the Terms & Conditions",checked:k,onChange:v})}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&l.jsx(O.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(bt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsxs("button",{type:"button",onClick:()=>c("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[l.jsx(za,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(xe,{type:"submit",variant:"primary",loading:y,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},ma=({children:e,variant:t="default",className:n})=>{const s={default:"bg-secondary text-secondary-foreground border-border",primary:"bg-primary text-primary-foreground border-primary",success:"bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/20",warning:"bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20",danger:"bg-destructive text-destructive-foreground border-destructive"};return l.jsx("span",{className:M("px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider border inline-flex items-center justify-center",s[t],n),children:e})},pa=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>l.jsx(oe,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(O.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:M("relative w-full max-w-lg glass-card overflow-hidden p-0 flex flex-col max-h-[90vh] text-left",o,r),children:[l.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[l.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),l.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:l.jsx(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),_h=({isOpen:e,onClose:t,onConfirm:n,title:s="Are you sure?",message:r="This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",confirmVariant:a="destructive",loading:c=!1})=>l.jsx(pa,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsx(xe,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(xe,{variant:a,onClick:n,loading:c,children:o})]})]})}),Fh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=b.useState(!1),c=b.useRef(null),d=t.find(u=>u.value===n);return b.useEffect(()=>{const u=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),l.jsxs("div",{ref:c,className:M("space-y-1.5 w-full text-left relative",o),children:[e&&l.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsx("div",{children:l.jsxs("button",{type:"button",onClick:()=>a(!i),className:"glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",children:[l.jsx("span",{className:M(!d&&"text-muted-foreground/60"),children:d?d.label:r}),l.jsx(Rs,{size:18,className:M("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(oe,{children:i&&l.jsx(O.div,{initial:{opacity:0,y:5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.98},transition:{duration:.15},className:"absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",children:t.map((u,f)=>{const h=u.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(u.value),a(!1)},className:M("w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",h?"bg-primary text-primary-foreground font-semibold":"hover:bg-secondary text-foreground"),children:u.label},u.value||f)})})})]})},Bh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=b.useState(!1),[a,c]=b.useState([]),d=b.useRef(null),u=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const x=Array.from(p).map(v=>{const T=v.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:v.name,size:(v.size/1024).toFixed(1)+" KB",rawFile:v,progress:0,status:T?"failed":"uploading",error:T?`File exceeds limit of ${s}MB`:null}}),k=[...a,...x].slice(0,n);c(k),e&&e(k.map(v=>v.rawFile)),x.forEach(v=>{if(v.status==="failed")return;let y=0;const T=setInterval(()=>{y+=Math.floor(Math.random()*15)+5,y>=100?(y=100,clearInterval(T),c(S=>S.map(E=>E.id===v.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===v.id?{...E,progress:y}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(x=>x.id!==p))};return l.jsxs("div",{className:M("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:u,onDragOver:u,onDragLeave:u,onDrop:h,onClick:()=>d.current&&d.current.click(),className:M("relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",o?"border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"),children:[l.jsx("input",{ref:d,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(O.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:M("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Ba,{size:24})}),l.jsxs("div",{className:"text-center space-y-1",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),l.jsx(oe,{children:a.length>0&&l.jsxs(O.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},className:"space-y-2 border border-border/40 bg-card/60 rounded-2xl p-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[l.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),l.jsx("button",{onClick:()=>c([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),l.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>l.jsxs(O.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx($a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(O.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&l.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&l.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[l.jsx(kt,{size:10})," Upload complete!"]})]})]}),l.jsx("button",{onClick:()=>g(p.id),className:"p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ne,{size:14})})]},p.id))})]})})]})},$h=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(oe,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm cursor-pointer"}),l.jsxs(O.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:M("fixed top-4 right-4 z-50 h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-sm bg-card/95 backdrop-blur-xl border border-border/50 shadow-2xl rounded-3xl flex flex-col text-left overflow-hidden",o),children:[l.jsxs("div",{className:"p-4 border-b border-border/40 flex items-center justify-between min-h-[72px] shrink-0 bg-card/65 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:l.jsx(Ls,{size:18,className:"animate-bounce"})}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&l.jsx("button",{onClick:s,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-destructive cursor-pointer transition-colors",title:"Clear All",children:l.jsx(Xa,{size:16})}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ne,{size:16})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:l.jsx(oe,{initial:!1,children:n.length===0?l.jsxs(O.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[l.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:l.jsx(Ls,{size:32,className:"opacity-50"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",c=i.type==="warning";return l.jsxs(O.div,{layout:!0,initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-3.5 rounded-2xl bg-secondary/20 border border-border/10 flex items-start gap-3 relative overflow-hidden group hover:border-border/30 transition-all text-xs",children:[i.unread&&l.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),l.jsxs("div",{className:M("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",c&&"bg-amber-500/10 text-amber-500",!a&&!c&&"bg-sky-500/10 text-sky-500"),children:[a&&l.jsx(kt,{size:16}),c&&l.jsx(on,{size:16}),!a&&!c&&l.jsx(jt,{size:16})]}),l.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("p",{className:"font-bold text-foreground",children:i.title}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),l.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),l.jsx("button",{onClick:()=>r&&r(i.id),className:"absolute bottom-3 right-3 p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors opacity-0 group-hover:opacity-100",title:"Dismiss notification",children:l.jsx(Ne,{size:12})})]},i.id)})})})]})]})}),Wh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(c,d)=>d+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return l.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[l.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[l.jsx(xe,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(xe,{variant:"outline",className:"text-foreground font-semibold",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),l.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",l.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",l.jsx("span",{className:"font-bold text-foreground",children:t})]})}),l.jsx("div",{children:l.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[l.jsxs(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(rn,{size:16})]}),o.map((i,a)=>{if(i==="...")return l.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:l.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const c=e===i;return l.jsx(xe,{variant:c?"primary":"outline",className:`w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs font-semibold ${c?"":"text-muted-foreground hover:text-foreground"}`,onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(xe,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(rt,{size:16})]})]})})]})]})},Uh=({children:e,content:t})=>{const[n,s]=b.useState(!1),[r,o]=b.useState({x:0,y:0}),i=b.useRef(null),a=()=>{if(i.current){const u=i.current.getBoundingClientRect();o({x:u.left+u.width/2,y:u.top+window.scrollY-8})}};b.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const c=()=>{t&&s(!0)},d=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:d,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&Ca.createPortal(l.jsx(oe,{children:l.jsxs(O.div,{initial:{opacity:0,scale:.95,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:4},style:{position:"absolute",left:r.x,top:r.y,transform:"translateX(-50%) translateY(-100%)",zIndex:99999,pointerEvents:"none"},className:"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-lg shadow-xl whitespace-nowrap",children:[t,l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-zinc-900 dark:border-t-zinc-100"})]})}),document.body)]})},Gh=({value:e=0,size:t=80,strokeWidth:n=6,showPercent:s=!0,className:r})=>{const o=(t-n)/2,i=o*2*Math.PI,a=Math.min(Math.max(e,0),100),c=i-a/100*i;return l.jsxs("div",{className:M("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[l.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[l.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),l.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:c,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&l.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},Yh=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:M("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),l.jsx(O.div,{className:M("w-5 h-5 rounded-full border flex items-center justify-center transition-colors duration-200",e?"border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(oe,{children:e&&l.jsx(O.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},className:"w-2.5 h-2.5 rounded-full bg-primary"})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),ga=b.createContext(),Kh=({children:e,defaultTheme:t="light"})=>{const[n,s]=b.useState(()=>{if(typeof window>"u")return!1;const i=new URLSearchParams(window.location.search).get("theme");if(i)return i==="dark";const a=localStorage.getItem("theme");return a?a==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});b.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]);const r=()=>s(o=>!o);return l.jsx(ga.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},xa=()=>{const e=b.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Hh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:c})=>{const[d,u]=b.useState(!1),[f,h]=b.useState(!e);b.useEffect(()=>{h(!e)},[e]),b.useEffect(()=>{const y=()=>{const T=window.innerWidth<768;u(T),T||h(!1)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);const m=()=>{if(d){const y=!f;h(y),t&&t(!y)}else t&&t(!e)},g=()=>{d&&(h(!1),t&&t(!0))};let p=!1,x=()=>{},k=!1;try{const y=xa();y&&(p=y.isDark,x=y.toggleTheme,k=!0)}catch{}const v=d?!f:e;return l.jsxs(l.Fragment,{children:[d&&a&&l.jsxs("div",{className:"flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),l.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[k&&l.jsx("button",{type:"button",onClick:x,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:p?l.jsx(Ha,{size:16,className:"text-amber-500"}):l.jsx(Ka,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:m,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:l.jsx(Ga,{size:16,className:"text-foreground"})})]})]}),d&&!v&&l.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),l.jsxs("aside",{className:M("h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative",d?"fixed top-0 bottom-0 left-0 z-50":"z-30",v?"w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20":"w-64 translate-x-0 border-r border-border/40",i),children:[l.jsxs("div",{className:M("flex border-b border-border/20 shrink-0 transition-all duration-300",v?"flex-col items-center justify-center gap-2.5 py-4 px-1 min-h-[88px]":"flex-row items-center justify-between p-4 min-h-[72px]"),children:[l.jsxs("div",{className:M("flex items-center gap-3 overflow-hidden",v&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!v&&l.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),l.jsx("button",{type:"button",onClick:m,className:"p-1.5 hover:bg-secondary/60 rounded-xl border border-border/20 text-muted-foreground hover:text-foreground cursor-pointer shrink-0 transition-colors",children:v?l.jsx(rt,{size:14}):l.jsx(rn,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",onClickCapture:g,children:r}),o&&l.jsxs("div",{className:M("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",v?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[l.jsx("div",{className:M("flex-1 min-w-0 flex overflow-hidden",v?"flex-col items-center justify-center":"flex-row items-center"),children:o}),c&&l.jsx("button",{type:"button",onClick:c,title:"Logout",className:M("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",v?"mt-2":""),children:l.jsx(Ua,{size:16})})]})]})]})},Xh=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o,as:i,...a})=>{const c=u=>l.jsxs(l.Fragment,{children:[e&&l.jsx(e,{size:18,className:"shrink-0"}),!r&&l.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!r&&o&&!u&&l.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-bold border shrink-0 bg-primary/10 text-primary border-primary/20",children:o}),!r&&u&&l.jsx(O.div,{layoutId:"active-sidebar-indicator",className:"w-1.5 h-1.5 rounded-full bg-primary shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),d=u=>M("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-200 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",u?"bg-primary/10 text-primary border-primary/15":"text-muted-foreground hover:text-foreground hover:bg-secondary/35");return i?l.jsx(i,{className:({isActive:u})=>d(u),...a,children:({isActive:u})=>c(u)}):l.jsx("button",{type:"button",onClick:s,className:d(n),children:c(n)})},qh=({avatarLabel:e,avatarSrc:t,avatarClassName:n,title:s,subtitle:r,badges:o=[],meta:i,selected:a=!1,onClick:c,startSlot:d,endSlot:u,showChevron:f=!0,className:h,...m})=>l.jsxs(O.div,{layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},onClick:c,className:M("flex items-center gap-3 p-4 rounded-2xl border transition-all duration-200 cursor-pointer select-none group",a?"bg-primary/8 border-primary/30 shadow-md shadow-primary/5":"bg-card border-border hover:bg-secondary/50 hover:border-border/80",h),...m,children:[d&&l.jsx("div",{className:"shrink-0",onClick:g=>g.stopPropagation(),children:d}),l.jsx("div",{className:M("shrink-0 w-10 h-10 rounded-xl flex items-center justify-center text-sm font-black text-primary-foreground overflow-hidden",a?"bg-primary shadow-lg shadow-primary/20":"bg-primary/80",n),children:t?l.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"}):l.jsx("span",{children:e})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:M("text-sm font-bold truncate transition-colors",a?"text-primary":"text-foreground"),children:s}),r&&l.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5 font-medium",children:r}),o.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:o.map((g,p)=>l.jsx(Zh,{variant:g.variant,children:g.label},p))}),i&&l.jsx("div",{className:"mt-1",children:i})]}),u?l.jsx("div",{className:"shrink-0",children:u}):f?l.jsx(rt,{size:16,className:M("shrink-0 transition-all duration-200",a?"text-primary translate-x-0.5":"text-muted-foreground/40 group-hover:text-muted-foreground")}):null]}),ya={default:"bg-secondary text-foreground border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 border border-amber-500/20",danger:"bg-red-500/10 text-red-600 border border-red-500/20"},Zh=({variant:e="default",children:t,className:n})=>l.jsx("span",{className:M("inline-flex items-center px-2 py-0.5 rounded-md text-[9px] font-black uppercase tracking-widest",ya[e]??ya.default,n),children:t}),Jh=({count:e=4})=>l.jsx(l.Fragment,{children:Array.from({length:e}).map((t,n)=>l.jsx("div",{className:"h-[76px] rounded-2xl bg-secondary/50 border border-border animate-pulse"},n))}),Qh=({selectedItem:e=null,onBack:t,listHeader:n,list:s,listFooter:r,detail:o,emptyDetail:i,backLabel:a="Back to List",listWidth:c="w-full lg:w-[400px]",className:d,listClassName:u,detailClassName:f})=>l.jsxs("div",{className:M("h-full flex flex-col lg:flex-row gap-6 lg:gap-8",d),children:[l.jsxs("div",{className:M("flex flex-col gap-4 transition-all duration-300",e&&"hidden lg:flex",c,u),children:[n&&l.jsx("div",{className:"shrink-0",children:n}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-2 md:space-y-3 pr-1",children:l.jsx(oe,{mode:"popLayout",children:s})}),r&&l.jsx("div",{className:"shrink-0",children:r})]}),l.jsx("div",{className:M("flex-1 min-w-0 transition-all duration-300",!e&&"hidden lg:block",f),children:l.jsx(oe,{mode:"wait",children:e?l.jsxs(O.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:16},transition:{duration:.2,ease:"easeOut"},className:"h-full flex flex-col gap-4",children:[t&&l.jsxs("button",{onClick:t,className:"lg:hidden inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground font-bold text-xs uppercase tracking-widest transition-colors w-fit shrink-0",children:[l.jsx(rn,{size:15}),a]}),l.jsx("div",{className:"flex-1 min-h-0",children:o})]},(e==null?void 0:e.id)??"detail"):l.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"h-full",children:i??l.jsx(em,{})},"split-view-empty")})})]}),em=()=>l.jsxs("div",{className:"h-full rounded-3xl flex flex-col items-center justify-center border-dashed border-2 border-border p-8 text-center bg-card/30",children:[l.jsx("div",{className:"w-16 h-16 rounded-2xl bg-secondary flex items-center justify-center mb-5 border border-border",children:l.jsx(rt,{className:"text-muted-foreground/30",size:28})}),l.jsx("p",{className:"text-muted-foreground font-black uppercase tracking-widest text-[10px]",children:"Select an item to view details"})]}),tm=({min:e=0,max:t=100,step:n=1,value:s=50,onChange:r,label:o,className:i})=>{const a=(s-e)/(t-e)*100;return l.jsxs("div",{className:M("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&l.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&l.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),l.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),l.jsxs("div",{className:"relative flex items-center group",children:[l.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:c=>r&&r(Number(c.target.value)),className:"w-full h-1.5 bg-secondary/50 dark:bg-zinc-800 rounded-full appearance-none outline-none cursor-pointer",style:{background:`linear-gradient(to right, var(--primary) 0%, var(--primary) ${a}%, var(--secondary) ${a}%, var(--secondary) 100%)`}}),l.jsx("style",{children:`
|
|
171
171
|
input[type="range"]::-webkit-slider-thumb {
|
|
172
172
|
-webkit-appearance: none;
|
|
173
173
|
appearance: none;
|