import{createContext as t}from"react";const r=(t,r,e)=>e>r?r:ea(t[r]))}function f(t){return Boolean(i(t)||t.variants)}const l=t=>r=>"string"==typeof r&&r.startsWith(t),u=l("--"),p=l("var(--"),c=t=>!!p(t)&&d.test(t.split("/*")[0].trim()),d=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,m={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},g={...m,transform:t=>r(0,1,t)},h={...m,default:1},y=t=>Math.round(1e5*t)/1e5,b=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const v=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,w=(t,r)=>e=>Boolean("string"==typeof e&&v.test(e)&&e.startsWith(t)||r&&!function(t){return null==t}(e)&&Object.prototype.hasOwnProperty.call(e,r)),x=(t,r,e)=>s=>{if("string"!=typeof s)return s;const[a,n,o,i]=s.match(b);return{[t]:parseFloat(a),[r]:parseFloat(n),[e]:parseFloat(o),alpha:void 0!==i?parseFloat(i):1}},R={...m,transform:t=>Math.round((t=>r(0,255,t))(t))},B={test:w("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:r,blue:e,alpha:s=1})=>"rgba("+R.transform(t)+", "+R.transform(r)+", "+R.transform(e)+", "+y(g.transform(s))+")"};const O={test:w("#"),parse:function(t){let r="",e="",s="",a="";return t.length>5?(r=t.substring(1,3),e=t.substring(3,5),s=t.substring(5,7),a=t.substring(7,9)):(r=t.substring(1,2),e=t.substring(2,3),s=t.substring(3,4),a=t.substring(4,5),r+=r,e+=e,s+=s,a+=a),{red:parseInt(r,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}},transform:B.transform},T=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),$=T("deg"),k=T("%"),L=T("px"),F=T("vh"),P=T("vw"),S=(()=>({...k,parse:t=>k.parse(t)/100,transform:t=>k.transform(100*t)}))(),W={test:w("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+k.transform(y(r))+", "+k.transform(y(e))+", "+y(g.transform(s))+")"},X={test:t=>B.test(t)||O.test(t)||W.test(t),parse:t=>B.test(t)?B.parse(t):W.test(t)?W.parse(t):O.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?B.transform(t):W.transform(t),getAnimatableNone:t=>{const r=X.parse(t);return r.alpha=0,X.transform(r)}},Y=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const I="number",A="color",Z=/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 V(t){const r=t.toString(),e=[],s={color:[],number:[],var:[]},a=[];let n=0;const o=r.replace(Z,t=>(X.test(t)?(s.color.push(n),a.push(A),e.push(X.parse(t))):t.startsWith("var(")?(s.var.push(n),a.push("var"),e.push(t)):(s.number.push(n),a.push(I),e.push(parseFloat(t))),++n,"${}")).split("${}");return{values:e,split:o,indexes:s,types:a}}function H(t){return V(t).values}function j(t){const{split:r,types:e}=V(t),s=r.length;return t=>{let a="";for(let n=0;n"number"==typeof t?0:X.test(t)?X.getAnimatableNone(t):t;const C={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(b)?.length||0)+(t.match(Y)?.length||0)>0},parse:H,createTransformer:j,getAnimatableNone:function(t){const r=H(t);return j(t)(r.map(z))}},D=(t,r,e)=>t+(r-t)*e,E=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],N=(()=>new Set(E))(),M={...m,transform:Math.round},q={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:h,scaleX:h,scaleY:h,scaleZ:h,skew:$,skewX:$,skewY:$,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:g,originX:S,originY:S,originZ:L},zIndex:M,fillOpacity:g,strokeOpacity:g,numOctaves:M},G=(t,r)=>r&&"number"==typeof t?r.transform(t):t,J=t=>Boolean(t&&t.getVelocity);function K(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const Q={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!L.test(t))return t;t=parseFloat(t)}return`${K(t,r.target.x)}% ${K(t,r.target.y)}%`}},U={correct:(t,{treeScale:r,projectionDelta:e})=>{const s=t,a=C.parse(t);if(a.length>5)return s;const n=C.createTransformer(t),o="number"!=typeof a[0]?1:0,i=e.x.scale*r.x,f=e.y.scale*r.y;a[0+o]/=i,a[1+o]/=f;const l=D(i,f,.5);return"number"==typeof a[2+o]&&(a[2+o]/=l),"number"==typeof a[3+o]&&(a[3+o]/=l),n(a)}},_={borderRadius:{...Q,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomLeftRadius:Q,borderBottomRightRadius:Q,boxShadow:U};function tt(t,{layout:r,layoutId:e}){return N.has(t)||t.startsWith("origin")||(r||void 0!==e)&&(!!_[t]||"opacity"===t)}const rt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},et=E.length;function st(t,r,e){const{style:s,vars:a,transformOrigin:n}=t;let o=!1,i=!1;for(const t in r){const e=r[t];if(N.has(t))o=!0;else if(u(t))a[t]=e;else{const r=G(e,q[t]);t.startsWith("origin")?(i=!0,n[t]=r):s[t]=r}}if(r.transform||(o||e?s.transform=function(t,r,e){let s="",a=!0;for(let n=0;n"string"==typeof t&&"svg"===t.toLowerCase(),ft=["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 lt(t){return"string"==typeof t&&!t.includes("-")&&!!(ft.indexOf(t)>-1||/[A-Z]/u.test(t))}const ut=t(null);function pt(t){const r=[{},{}];return t?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r}function ct(t,r,e,s){if("function"==typeof r){const[a,n]=pt(s);r=r(void 0!==e?e:t.custom,a,n)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[a,n]=pt(s);r=r(void 0!==e?e:t.custom,a,n)}return r}function dt(t){return J(t)?t.get():t}function mt(t,r,e){const{style:s}=t,a={};for(const n in s)(J(s[n])||r.style&&J(r.style[n])||tt(n,t)||void 0!==e?.getValue(n)?.liveStyle)&&(a[n]=s[n]);return a}function gt(t,r,e){const s=mt(t,r,e);for(const e in t)if(J(t[e])||J(r[e])){s[-1!==E.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=t[e]}return s}const ht="undefined"!=typeof window,yt={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"]},bt={};for(const t in yt)bt[t]={isEnabled:r=>yt[t].some(t=>!!r[t])};function vt(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const wt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xt="data-"+wt("framerAppearId"),Rt=t({});export{r as A,m as B,L as C,E as D,k as E,$ as F,P as G,F as H,b as I,q as J,N as K,e as L,_ as M,u as N,o as O,ut as P,n as Q,wt as R,Rt as S,a,J as b,tt as c,st as d,ot as e,it as f,lt as g,f as h,i,s as j,ct as k,gt as l,vt as m,ht as n,xt as o,bt as p,D as q,dt as r,mt as s,B as t,W as u,O as v,c as w,X as x,C as y,V as z};