import{useContext as e,createElement as r,Fragment as s,createContext as n,forwardRef as t}from"react";import o from"../../cache/dist/emotion-cache.esm.js";import{getRegisteredStyles as i,registerStyles as a,insertStyles as c}from"../../utils/dist/emotion-utils.esm.js";import{serializeStyles as l}from"../../serialize/dist/emotion-serialize.esm.js";import{useInsertionEffectAlwaysWithSyncFallback as f}from"../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js";var m="undefined"!=typeof document,p={}.hasOwnProperty,u=n("undefined"!=typeof HTMLElement?o({key:"css"}):null);"production"!==process.env.NODE_ENV&&(u.displayName="EmotionCacheContext"),u.Provider;var d=function(r){return t((function(s,n){var t=e(u);return r(s,t,n)}))};m||(d=function(s){return function(n){var t=e(u);return null===t?(t=o({key:"css"}),r(u.Provider,{value:t},s(n,t))):s(n,t)}});var v=n({});"production"!==process.env.NODE_ENV&&(v.displayName="EmotionThemeContext");var E=function(e){var r=e.split(".");return r[r.length-1]},_=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),N="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",h="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",O=function(e,r){if("production"!==process.env.NODE_ENV&&"string"==typeof r.css&&-1!==r.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+r.css+"`");var s={};for(var n in r)p.call(r,n)&&(s[n]=r[n]);if(s[N]=e,"production"!==process.env.NODE_ENV&&r.css&&("object"!=typeof r.css||"string"!=typeof r.css.name||-1===r.css.name.indexOf("-"))){var t=function(e){if(e)for(var r,s,n=e.split("\n"),t=0;t<n.length;t++){var o=(r=n[t],s=void 0,(s=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(r))||(s=/^([A-Za-z0-9$.]+)@/.exec(r))?E(s[1]):void 0);if(o){if(_.has(o))break;if(/^[A-Z]/.test(o))return o.replace(/\$/g,"-")}}}((new Error).stack);t&&(s[h]=t)}return s},g=function(e){var s=e.cache,n=e.serialized,t=e.isStringTag;a(s,n,t);var o=f((function(){return c(s,n,t)}));if(!m&&void 0!==o){for(var i,l=n.name,p=n.next;void 0!==p;)l+=" "+p.name,p=p.next;return r("style",((i={})["data-emotion"]=s.key+" "+l,i.dangerouslySetInnerHTML={__html:o},i.nonce=s.sheet.nonce,i))}return null},y=d((function(n,t,o){var a=n.css;"string"==typeof a&&void 0!==t.registered[a]&&(a=t.registered[a]);var c=n[N],f=[a],m="";"string"==typeof n.className?m=i(t.registered,f,n.className):null!=n.className&&(m=n.className+" ");var u=l(f,void 0,e(v));if("production"!==process.env.NODE_ENV&&-1===u.name.indexOf("-")){var d=n[h];d&&(u=l([u,"label:"+d+";"]))}m+=t.key+"-"+u.name;var E={};for(var _ in n)!p.call(n,_)||"css"===_||_===N||"production"!==process.env.NODE_ENV&&_===h||(E[_]=n[_]);return E.ref=o,E.className=m,r(s,null,r(g,{cache:t,serialized:u,isStringTag:"string"==typeof c}),r(c,E))}));"production"!==process.env.NODE_ENV&&(y.displayName="EmotionCssPropInternal");export{y as E,v as T,O as c,p as h,m as i,d as w};
//# sourceMappingURL=emotion-element-3838ba9e.esm.js.map
