import{cw as q,cx as F,cy as G,cz as l,cA as H,cB as T,cC as J,cD as K}from"./index-d9e0bbb9.js";const N=["ownerState"],Q=["variants"],U=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function X(e){return Object.keys(e).length===0}function Y(e){return typeof e=="string"&&e.charCodeAt(0)>96}function A(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function V(e,o){return o&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${o}{${String(e.styles)}}`),e}const Z=H(),g=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function x({defaultTheme:e,theme:o,themeId:s}){return X(o)?e:o[s]||o}function z(e){return e?(o,s)=>s[e]:null}function C(e,o,s){let{ownerState:a}=o,h=F(o,N);const i=typeof e=="function"?e(l({ownerState:a},h)):e;if(Array.isArray(i))return i.flatMap(u=>C(u,l({ownerState:a},h),s));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:u=[]}=i;let r=F(i,Q);return u.forEach(t=>{let p=!0;if(typeof t.props=="function"?p=t.props(l({ownerState:a},h,a)):Object.keys(t.props).forEach(f=>{(a==null?void 0:a[f])!==t.props[f]&&h[f]!==t.props[f]&&(p=!1)}),p){Array.isArray(r)||(r=[r]);const f=typeof t.style=="function"?t.style(l({ownerState:a},h,a)):t.style;r.push(s?V(T(f),s):f)}}),r}return s?V(T(i),s):i}function ee(e={}){const{themeId:o,defaultTheme:s=Z,rootShouldForwardProp:a=A,slotShouldForwardProp:h=A}=e,i=u=>J(l({},u,{theme:x(l({},u,{defaultTheme:s,themeId:o}))}));return i.__mui_systemSx=!0,(u,R={})=>{q(u,n=>n.filter(m=>!(m!=null&&m.__mui_systemSx)));const{name:r,slot:t,skipVariantsResolver:p,skipSx:f,overridesResolver:j=z(g(t))}=R,$=F(R,U),E=r&&r.startsWith("Mui")||t?"components":"custom",W=p!==void 0?p:t&&t!=="Root"&&t!=="root"||!1,D=f||!1;let M,w=A;t==="Root"||t==="root"?w=a:t?w=h:Y(u)&&(w=void 0);const O=G(u,l({shouldForwardProp:w,label:M},$)),k=n=>typeof n=="function"&&n.__emotion_real!==n||K(n)?m=>{const y=x({theme:m.theme,defaultTheme:s,themeId:o});return C(n,l({},m,{theme:y}),y.modularCssLayers?E:void 0)}:n,L=(n,...m)=>{let y=k(n);const v=m?m.map(k):[];r&&j&&v.push(d=>{const c=x(l({},d,{defaultTheme:s,themeId:o}));if(!c.components||!c.components[r]||!c.components[r].styleOverrides)return null;const S=c.components[r].styleOverrides,_={};return Object.entries(S).forEach(([B,I])=>{_[B]=C(I,l({},d,{theme:c}),c.modularCssLayers?"theme":void 0)}),j(d,_)}),r&&!W&&v.push(d=>{var c;const S=x(l({},d,{defaultTheme:s,themeId:o})),_=S==null||(c=S.components)==null||(c=c[r])==null?void 0:c.variants;return C({variants:_},l({},d,{theme:S}),S.modularCssLayers?"theme":void 0)}),D||v.push(i);const P=v.length-m.length;if(Array.isArray(n)&&P>0){const d=new Array(P).fill("");y=[...n,...d],y.raw=[...n.raw,...d]}const b=O(y,...v);return u.muiName&&(b.muiName=u.muiName),b};return O.withConfig&&(L.withConfig=O.withConfig),L}}const te=ee(),se=te;export{A as a,se as s};
