import{createElement as e,useContext as n,useRef as t,Fragment as r}from"react";import{h as s,E as o,c as a,w as i,T as l,i as c}from"./emotion-element-3838ba9e.esm.js";import"../../../hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";import{insertStyles as u,registerStyles as m,getRegisteredStyles as d}from"../../utils/dist/emotion-utils.esm.js";import{serializeStyles as f}from"../../serialize/dist/emotion-serialize.esm.js";import{useInsertionEffectWithLayoutFallback as h,useInsertionEffectAlwaysWithSyncFallback as p}from"../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js";var v=function(n,t){var r=arguments;if(null==t||!s.call(t,"css"))return e.apply(void 0,r);var i=r.length,l=new Array(i);l[0]=o,l[1]=a(n,t);for(var c=2;c<i;c++)l[c]=r[c];return e.apply(null,l)},y=!1,g=i((function(r,s){"production"===process.env.NODE_ENV||y||!r.className&&!r.css||(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),y=!0);var o=r.styles,a=f([o],void 0,n(l));if(!c){for(var i,m=a.name,d=a.styles,p=a.next;void 0!==p;)m+=" "+p.name,d+=p.styles,p=p.next;var v=!0===s.compat,g=s.insert("",{name:m,styles:d},s.sheet,v);return v?null:e("style",((i={})["data-emotion"]=s.key+"-global "+m,i.dangerouslySetInnerHTML={__html:g},i.nonce=s.sheet.nonce,i))}var E=t();return h((function(){var e=s.key+"-global",n=new s.sheet.constructor({key:e,nonce:s.sheet.nonce,container:s.sheet.container,speedy:s.sheet.isSpeedy}),t=!1,r=document.querySelector('style[data-emotion="'+e+" "+a.name+'"]');return s.sheet.tags.length&&(n.before=s.sheet.tags[0]),null!==r&&(t=!0,r.setAttribute("data-emotion",e),n.hydrate([r])),E.current=[n,t],function(){n.flush()}}),[s]),h((function(){var e=E.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==a.next&&u(s,a.next,!0),n.tags.length){var t=n.tags[n.tags.length-1].nextElementSibling;n.before=t,n.flush()}s.insert("",a,n,!1)}}),[s,a.name]),null}));function E(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return f(n)}"production"!==process.env.NODE_ENV&&(g.displayName="EmotionGlobal");var b=function(){var e=E.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},_=function e(n){for(var t=n.length,r=0,s="";r<t;r++){var o=n[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var i in"production"!==process.env.NODE_ENV&&void 0!==o.styles&&void 0!==o.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),a="",o)o[i]&&i&&(a&&(a+=" "),a+=i);break;default:a=o}a&&(s&&(s+=" "),s+=a)}}return s};var N=function(n){var t,r=n.cache,s=n.serializedArr,o=p((function(){for(var e="",n=0;n<s.length;n++){var t=u(r,s[n],!1);c||void 0===t||(e+=t)}if(!c)return e}));return c||0===o.length?null:e("style",((t={})["data-emotion"]=r.key+" "+s.map((function(e){return e.name})).join(" "),t.dangerouslySetInnerHTML={__html:o},t.nonce=r.sheet.nonce,t))},w=i((function(t,s){var o=!1,a=[],i=function(){if(o&&"production"!==process.env.NODE_ENV)throw new Error("css can only be used during render");for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r=f(n,s.registered);return a.push(r),m(s,r,!1),s.key+"-"+r.name},c={css:i,cx:function(){if(o&&"production"!==process.env.NODE_ENV)throw new Error("cx can only be used during render");for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(e,n,t){var r=[],s=d(e,r,t);return r.length<2?t:s+n(r)}(s.registered,i,_(n))},theme:n(l)},u=t.children(c);return o=!0,e(r,null,e(N,{cache:s,serializedArr:a}),u)}));if("production"!==process.env.NODE_ENV&&(w.displayName="EmotionClassNames"),"production"!==process.env.NODE_ENV){var k="undefined"!=typeof document,O="undefined"!=typeof jest||"undefined"!=typeof vi;if(k&&!O){var x="undefined"!=typeof globalThis?globalThis:k?window:global,A="__EMOTION_REACT_"+"11.10.8".split(".")[0]+"__";x[A]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),x[A]=!0}}export{w as ClassNames,g as Global,l as ThemeContext,v as createElement,E as css,v as jsx,b as keyframes,i as withEmotionCache};
//# sourceMappingURL=emotion-react.esm.js.map
