import * as v from "react";
import { createContext as _, forwardRef as S, useContext as h, createElement as l, Fragment as C } from "react";
import P from "../../../../../@emotion_cache@11.9.3/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js";
import { getRegisteredStyles as T, registerStyles as w, insertStyles as y } from "../../../../../@emotion_utils@1.1.0/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js";
import { serializeStyles as g } from "../../../../../@emotion_serialize@1.0.4/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js";
var O = {}.hasOwnProperty, d = /* @__PURE__ */ _(
  typeof HTMLElement < "u" ? /* @__PURE__ */ P({
    key: "css"
  }) : null
);
process.env.NODE_ENV !== "production" && (d.displayName = "EmotionCacheContext");
d.Provider;
var x = function(r) {
  return /* @__PURE__ */ S(function(e, n) {
    var i = h(d);
    return r(e, i, n);
  });
}, p = /* @__PURE__ */ _({});
process.env.NODE_ENV !== "production" && (p.displayName = "EmotionThemeContext");
var N = function(r) {
  var e = r.split(".");
  return e[e.length - 1];
}, I = function(r) {
  var e = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(r);
  if (e || (e = /^([A-Za-z0-9$.]+)@/.exec(r), e))
    return N(e[1]);
}, L = /* @__PURE__ */ new Set(["renderWithHooks", "processChild", "finishClassComponent", "renderToString"]), z = function(r) {
  return r.replace(/\$/g, "-");
}, D = function(r) {
  if (!!r)
    for (var e = r.split(`
`), n = 0; n < e.length; n++) {
      var i = I(e[n]);
      if (!!i) {
        if (L.has(i))
          break;
        if (/^[A-Z]/.test(i))
          return z(i);
      }
    }
}, F = v["useInsertionEffect"] ? v["useInsertionEffect"] : function(r) {
  r();
};
function V(t) {
  F(t);
}
var u = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", m = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", H = function(r, e) {
  if (process.env.NODE_ENV !== "production" && typeof e.css == "string" && e.css.indexOf(":") !== -1)
    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`" + e.css + "`");
  var n = {};
  for (var i in e)
    O.call(e, i) && (n[i] = e[i]);
  if (n[u] = r, process.env.NODE_ENV !== "production" && !!e.css && (typeof e.css != "object" || typeof e.css.name != "string" || e.css.name.indexOf("-") === -1)) {
    var s = D(new Error().stack);
    s && (n[m] = s);
  }
  return n;
}, A = function(r) {
  var e = r.cache, n = r.serialized, i = r.isStringTag;
  return w(e, n, i), V(function() {
    return y(e, n, i);
  }), null;
}, b = /* @__PURE__ */ x(function(t, r, e) {
  var n = t.css;
  typeof n == "string" && r.registered[n] !== void 0 && (n = r.registered[n]);
  var i = t[u], s = [n], c = "";
  typeof t.className == "string" ? c = T(r.registered, s, t.className) : t.className != null && (c = t.className + " ");
  var o = g(s, void 0, h(p));
  if (process.env.NODE_ENV !== "production" && o.name.indexOf("-") === -1) {
    var E = t[m];
    E && (o = g([o, "label:" + E + ";"]));
  }
  c += r.key + "-" + o.name;
  var f = {};
  for (var a in t)
    O.call(t, a) && a !== "css" && a !== u && (process.env.NODE_ENV === "production" || a !== m) && (f[a] = t[a]);
  return f.ref = e, f.className = c, /* @__PURE__ */ l(C, null, /* @__PURE__ */ l(A, {
    cache: r,
    serialized: o,
    isStringTag: typeof i == "string"
  }), /* @__PURE__ */ l(i, f));
});
process.env.NODE_ENV !== "production" && (b.displayName = "EmotionCssPropInternal");
export {
  b as E,
  p as T,
  H as c,
  O as h,
  V as u,
  x as w
};
//# sourceMappingURL=emotion-element-cbed451f.browser.esm.js.map
