@labelu/image-annotator-react
Version:
image annotator for react
1,196 lines (1,178 loc) • 1.17 MB
JavaScript
import { jsx as D, jsxs as te, Fragment as ot } from "react/jsx-runtime";
import * as _ from "react";
import Ce, { useRef as ye, useDebugValue as Ol, createElement as ws, useContext as Cn, useState as Te, useCallback as Re, useLayoutEffect as Ni, useEffect as Se, createContext as rr, version as Ay, forwardRef as Jo, useImperativeHandle as ei, useMemo as be, isValidElement as Ny, cloneElement as Ty, createRef as Ly } from "react";
import Dl, { createPortal as Iy } from "react-dom";
var On = function() {
return On = Object.assign || function(e) {
for (var n, r = 1, o = arguments.length; r < o; r++) {
n = arguments[r];
for (var i in n)
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
}
return e;
}, On.apply(this, arguments);
};
function wa(t, e, n) {
if (n || arguments.length === 2)
for (var r = 0, o = e.length, i; r < o; r++)
(i || !(r in e)) && (i || (i = Array.prototype.slice.call(e, 0, r)), i[r] = e[r]);
return t.concat(i || Array.prototype.slice.call(e));
}
function $y(t) {
var e = /* @__PURE__ */ Object.create(null);
return function(n) {
return e[n] === void 0 && (e[n] = t(n)), e[n];
};
}
var jy = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Ry = /* @__PURE__ */ $y(
function(t) {
return jy.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91;
}
/* Z+1 */
), Fs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function zy(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var bt = "-ms-", gs = "-moz-", nt = "-webkit-", Xg = "comm", ac = "rule", Yd = "decl", Fy = "@import", qg = "@keyframes", Uy = "@layer", Zg = Math.abs, Bd = String.fromCharCode, _u = Object.assign;
function Vy(t, e) {
return Qt(t, 0) ^ 45 ? (((e << 2 ^ Qt(t, 0)) << 2 ^ Qt(t, 1)) << 2 ^ Qt(t, 2)) << 2 ^ Qt(t, 3) : 0;
}
function Gg(t) {
return t.trim();
}
function po(t, e) {
return (t = e.exec(t)) ? t[0] : t;
}
function $e(t, e, n) {
return t.replace(e, n);
}
function dl(t, e, n) {
return t.indexOf(e, n);
}
function Qt(t, e) {
return t.charCodeAt(e) | 0;
}
function Ca(t, e, n) {
return t.slice(e, n);
}
function Ir(t) {
return t.length;
}
function Qg(t) {
return t.length;
}
function as(t, e) {
return e.push(t), t;
}
function Yy(t, e) {
return t.map(e).join("");
}
function Lh(t, e) {
return t.filter(function(n) {
return !po(n, e);
});
}
var sc = 1, Ma = 1, Kg = 0, er = 0, Lt = 0, Ra = "";
function lc(t, e, n, r, o, i, a, s) {
return { value: t, root: e, parent: n, type: r, props: o, children: i, line: sc, column: Ma, length: a, return: "", siblings: s };
}
function Io(t, e) {
return _u(lc("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e);
}
function Ui(t) {
for (; t.root; )
t = Io(t.root, { children: [t] });
as(t, t.siblings);
}
function By() {
return Lt;
}
function Hy() {
return Lt = er > 0 ? Qt(Ra, --er) : 0, Ma--, Lt === 10 && (Ma = 1, sc--), Lt;
}
function Cr() {
return Lt = er < Kg ? Qt(Ra, er++) : 0, Ma++, Lt === 10 && (Ma = 1, sc++), Lt;
}
function Si() {
return Qt(Ra, er);
}
function hl() {
return er;
}
function cc(t, e) {
return Ca(Ra, t, e);
}
function Eu(t) {
switch (t) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function Wy(t) {
return sc = Ma = 1, Kg = Ir(Ra = t), er = 0, [];
}
function Xy(t) {
return Ra = "", t;
}
function Uc(t) {
return Gg(cc(er - 1, Ou(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function qy(t) {
for (; (Lt = Si()) && Lt < 33; )
Cr();
return Eu(t) > 2 || Eu(Lt) > 3 ? "" : " ";
}
function Zy(t, e) {
for (; --e && Cr() && !(Lt < 48 || Lt > 102 || Lt > 57 && Lt < 65 || Lt > 70 && Lt < 97); )
;
return cc(t, hl() + (e < 6 && Si() == 32 && Cr() == 32));
}
function Ou(t) {
for (; Cr(); )
switch (Lt) {
case t:
return er;
case 34:
case 39:
t !== 34 && t !== 39 && Ou(Lt);
break;
case 40:
t === 41 && Ou(t);
break;
case 92:
Cr();
break;
}
return er;
}
function Gy(t, e) {
for (; Cr() && t + Lt !== 47 + 10; )
if (t + Lt === 42 + 42 && Si() === 47)
break;
return "/*" + cc(e, er - 1) + "*" + Bd(t === 47 ? t : Cr());
}
function Qy(t) {
for (; !Eu(Si()); )
Cr();
return cc(t, er);
}
function Ky(t) {
return Xy(pl("", null, null, null, [""], t = Wy(t), 0, [0], t));
}
function pl(t, e, n, r, o, i, a, s, l) {
for (var c = 0, u = 0, d = a, h = 0, p = 0, y = 0, m = 1, f = 1, v = 1, b = 0, w = "", M = o, x = i, C = r, S = w; f; )
switch (y = b, b = Cr()) {
case 40:
if (y != 108 && Qt(S, d - 1) == 58) {
dl(S += $e(Uc(b), "&", "&\f"), "&\f", Zg(c ? s[c - 1] : 0)) != -1 && (v = -1);
break;
}
case 34:
case 39:
case 91:
S += Uc(b);
break;
case 9:
case 10:
case 13:
case 32:
S += qy(y);
break;
case 92:
S += Zy(hl() - 1, 7);
continue;
case 47:
switch (Si()) {
case 42:
case 47:
as(Jy(Gy(Cr(), hl()), e, n, l), l);
break;
default:
S += "/";
}
break;
case 123 * m:
s[c++] = Ir(S) * v;
case 125 * m:
case 59:
case 0:
switch (b) {
case 0:
case 125:
f = 0;
case 59 + u:
v == -1 && (S = $e(S, /\f/g, "")), p > 0 && Ir(S) - d && as(p > 32 ? $h(S + ";", r, n, d - 1, l) : $h($e(S, " ", "") + ";", r, n, d - 2, l), l);
break;
case 59:
S += ";";
default:
if (as(C = Ih(S, e, n, c, u, o, s, w, M = [], x = [], d, i), i), b === 123)
if (u === 0)
pl(S, e, C, C, M, i, d, s, x);
else
switch (h === 99 && Qt(S, 3) === 110 ? 100 : h) {
case 100:
case 108:
case 109:
case 115:
pl(t, C, C, r && as(Ih(t, C, C, 0, 0, o, s, w, o, M = [], d, x), x), o, x, d, s, r ? M : x);
break;
default:
pl(S, C, C, C, [""], x, 0, s, x);
}
}
c = u = p = 0, m = v = 1, w = S = "", d = a;
break;
case 58:
d = 1 + Ir(S), p = y;
default:
if (m < 1) {
if (b == 123)
--m;
else if (b == 125 && m++ == 0 && Hy() == 125)
continue;
}
switch (S += Bd(b), b * m) {
case 38:
v = u > 0 ? 1 : (S += "\f", -1);
break;
case 44:
s[c++] = (Ir(S) - 1) * v, v = 1;
break;
case 64:
Si() === 45 && (S += Uc(Cr())), h = Si(), u = d = Ir(w = S += Qy(hl())), b++;
break;
case 45:
y === 45 && Ir(S) == 2 && (m = 0);
}
}
return i;
}
function Ih(t, e, n, r, o, i, a, s, l, c, u, d) {
for (var h = o - 1, p = o === 0 ? i : [""], y = Qg(p), m = 0, f = 0, v = 0; m < r; ++m)
for (var b = 0, w = Ca(t, h + 1, h = Zg(f = a[m])), M = t; b < y; ++b)
(M = Gg(f > 0 ? p[b] + " " + w : $e(w, /&\f/g, p[b]))) && (l[v++] = M);
return lc(t, e, n, o === 0 ? ac : s, l, c, u, d);
}
function Jy(t, e, n, r) {
return lc(t, e, n, Xg, Bd(By()), Ca(t, 2, -2), 0, r);
}
function $h(t, e, n, r, o) {
return lc(t, e, n, Yd, Ca(t, 0, r), Ca(t, r + 1, -1), r, o);
}
function Jg(t, e, n) {
switch (Vy(t, e)) {
case 5103:
return nt + "print-" + t + t;
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921:
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005:
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855:
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return nt + t + t;
case 4789:
return gs + t + t;
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return nt + t + gs + t + bt + t + t;
case 5936:
switch (Qt(t, e + 11)) {
case 114:
return nt + t + bt + $e(t, /[svh]\w+-[tblr]{2}/, "tb") + t;
case 108:
return nt + t + bt + $e(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t;
case 45:
return nt + t + bt + $e(t, /[svh]\w+-[tblr]{2}/, "lr") + t;
}
case 6828:
case 4268:
case 2903:
return nt + t + bt + t + t;
case 6165:
return nt + t + bt + "flex-" + t + t;
case 5187:
return nt + t + $e(t, /(\w+).+(:[^]+)/, nt + "box-$1$2" + bt + "flex-$1$2") + t;
case 5443:
return nt + t + bt + "flex-item-" + $e(t, /flex-|-self/g, "") + (po(t, /flex-|baseline/) ? "" : bt + "grid-row-" + $e(t, /flex-|-self/g, "")) + t;
case 4675:
return nt + t + bt + "flex-line-pack" + $e(t, /align-content|flex-|-self/g, "") + t;
case 5548:
return nt + t + bt + $e(t, "shrink", "negative") + t;
case 5292:
return nt + t + bt + $e(t, "basis", "preferred-size") + t;
case 6060:
return nt + "box-" + $e(t, "-grow", "") + nt + t + bt + $e(t, "grow", "positive") + t;
case 4554:
return nt + $e(t, /([^-])(transform)/g, "$1" + nt + "$2") + t;
case 6187:
return $e($e($e(t, /(zoom-|grab)/, nt + "$1"), /(image-set)/, nt + "$1"), t, "") + t;
case 5495:
case 3959:
return $e(t, /(image-set\([^]*)/, nt + "$1$`$1");
case 4968:
return $e($e(t, /(.+:)(flex-)?(.*)/, nt + "box-pack:$3" + bt + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + nt + t + t;
case 4200:
if (!po(t, /flex-|baseline/))
return bt + "grid-column-align" + Ca(t, e) + t;
break;
case 2592:
case 3360:
return bt + $e(t, "template-", "") + t;
case 4384:
case 3616:
return n && n.some(function(r, o) {
return e = o, po(r.props, /grid-\w+-end/);
}) ? ~dl(t + (n = n[e].value), "span", 0) ? t : bt + $e(t, "-start", "") + t + bt + "grid-row-span:" + (~dl(n, "span", 0) ? po(n, /\d+/) : +po(n, /\d+/) - +po(t, /\d+/)) + ";" : bt + $e(t, "-start", "") + t;
case 4896:
case 4128:
return n && n.some(function(r) {
return po(r.props, /grid-\w+-start/);
}) ? t : bt + $e($e(t, "-end", "-span"), "span ", "") + t;
case 4095:
case 3583:
case 4068:
case 2532:
return $e(t, /(.+)-inline(.+)/, nt + "$1$2") + t;
case 8116:
case 7059:
case 5753:
case 5535:
case 5445:
case 5701:
case 4933:
case 4677:
case 5533:
case 5789:
case 5021:
case 4765:
if (Ir(t) - 1 - e > 6)
switch (Qt(t, e + 1)) {
case 109:
if (Qt(t, e + 4) !== 45)
break;
case 102:
return $e(t, /(.+:)(.+)-([^]+)/, "$1" + nt + "$2-$3$1" + gs + (Qt(t, e + 3) == 108 ? "$3" : "$2-$3")) + t;
case 115:
return ~dl(t, "stretch", 0) ? Jg($e(t, "stretch", "fill-available"), e, n) + t : t;
}
break;
case 5152:
case 5920:
return $e(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, i, a, s, l, c) {
return bt + o + ":" + i + c + (a ? bt + o + "-span:" + (s ? l : +l - +i) + c : "") + t;
});
case 4949:
if (Qt(t, e + 6) === 121)
return $e(t, ":", ":" + nt) + t;
break;
case 6444:
switch (Qt(t, Qt(t, 14) === 45 ? 18 : 11)) {
case 120:
return $e(t, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + nt + (Qt(t, 14) === 45 ? "inline-" : "") + "box$3$1" + nt + "$2$3$1" + bt + "$2box$3") + t;
case 100:
return $e(t, ":", ":" + bt) + t;
}
break;
case 5719:
case 2647:
case 2135:
case 3927:
case 2391:
return $e(t, "scroll-", "scroll-snap-") + t;
}
return t;
}
function Pl(t, e) {
for (var n = "", r = 0; r < t.length; r++)
n += e(t[r], r, t, e) || "";
return n;
}
function ev(t, e, n, r) {
switch (t.type) {
case Uy:
if (t.children.length)
break;
case Fy:
case Yd:
return t.return = t.return || t.value;
case Xg:
return "";
case qg:
return t.return = t.value + "{" + Pl(t.children, r) + "}";
case ac:
if (!Ir(t.value = t.props.join(",")))
return "";
}
return Ir(n = Pl(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
}
function tv(t) {
var e = Qg(t);
return function(n, r, o, i) {
for (var a = "", s = 0; s < e; s++)
a += t[s](n, r, o, i) || "";
return a;
};
}
function nv(t) {
return function(e) {
e.root || (e = e.return) && t(e);
};
}
function rv(t, e, n, r) {
if (t.length > -1 && !t.return)
switch (t.type) {
case Yd:
t.return = Jg(t.value, t.length, n);
return;
case qg:
return Pl([Io(t, { value: $e(t.value, "@", "@" + nt) })], r);
case ac:
if (t.length)
return Yy(n = t.props, function(o) {
switch (po(o, r = /(::plac\w+|:read-\w+)/)) {
case ":read-only":
case ":read-write":
Ui(Io(t, { props: [$e(o, /:(read-\w+)/, ":" + gs + "$1")] })), Ui(Io(t, { props: [o] })), _u(t, { props: Lh(n, r) });
break;
case "::placeholder":
Ui(Io(t, { props: [$e(o, /:(plac\w+)/, ":" + nt + "input-$1")] })), Ui(Io(t, { props: [$e(o, /:(plac\w+)/, ":" + gs + "$1")] })), Ui(Io(t, { props: [$e(o, /:(plac\w+)/, bt + "input-$1")] })), Ui(Io(t, { props: [o] })), _u(t, { props: Lh(n, r) });
break;
}
return "";
});
}
}
var ov = {
animationIterationCount: 1,
aspectRatio: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
}, Ti = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", em = "active", tm = "data-styled-version", uc = "6.1.19", Hd = `/*!sc*/
`, Al = typeof window < "u" && typeof document < "u", iv = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), jh = /invalid hook call/i, Us = /* @__PURE__ */ new Set(), av = function(t, e) {
if (process.env.NODE_ENV !== "production") {
var n = e ? ' with the id of "'.concat(e, '"') : "", r = "The component ".concat(t).concat(n, ` has been created dynamically.
`) + `You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component.
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
`, o = console.error;
try {
var i = !0;
console.error = function(a) {
for (var s = [], l = 1; l < arguments.length; l++)
s[l - 1] = arguments[l];
jh.test(a) ? (i = !1, Us.delete(r)) : o.apply(void 0, wa([a], s, !1));
}, ye(), i && !Us.has(r) && (console.warn(r), Us.add(r));
} catch (a) {
jh.test(a.message) && Us.delete(r);
} finally {
console.error = o;
}
}
}, dc = Object.freeze([]), ka = Object.freeze({});
function sv(t, e, n) {
return n === void 0 && (n = ka), t.theme !== n.theme && t.theme || e || n.theme;
}
var Du = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), lv = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, cv = /(^-|-$)/g;
function Rh(t) {
return t.replace(lv, "-").replace(cv, "");
}
var uv = /(a)(d)/gi, Vs = 52, zh = function(t) {
return String.fromCharCode(t + (t > 25 ? 39 : 97));
};
function Pu(t) {
var e, n = "";
for (e = Math.abs(t); e > Vs; e = e / Vs | 0)
n = zh(e % Vs) + n;
return (zh(e % Vs) + n).replace(uv, "$1-$2");
}
var Vc, nm = 5381, vi = function(t, e) {
for (var n = e.length; n; )
t = 33 * t ^ e.charCodeAt(--n);
return t;
}, rm = function(t) {
return vi(nm, t);
};
function dv(t) {
return Pu(rm(t) >>> 0);
}
function om(t) {
return process.env.NODE_ENV !== "production" && typeof t == "string" && t || t.displayName || t.name || "Component";
}
function Yc(t) {
return typeof t == "string" && (process.env.NODE_ENV === "production" || t.charAt(0) === t.charAt(0).toLowerCase());
}
var im = typeof Symbol == "function" && Symbol.for, am = im ? Symbol.for("react.memo") : 60115, hv = im ? Symbol.for("react.forward_ref") : 60112, pv = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, fv = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, sm = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, gv = ((Vc = {})[hv] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Vc[am] = sm, Vc);
function Fh(t) {
return ("type" in (e = t) && e.type.$$typeof) === am ? sm : "$$typeof" in t ? gv[t.$$typeof] : pv;
var e;
}
var mv = Object.defineProperty, yv = Object.getOwnPropertyNames, Uh = Object.getOwnPropertySymbols, vv = Object.getOwnPropertyDescriptor, bv = Object.getPrototypeOf, Vh = Object.prototype;
function lm(t, e, n) {
if (typeof e != "string") {
if (Vh) {
var r = bv(e);
r && r !== Vh && lm(t, r, n);
}
var o = yv(e);
Uh && (o = o.concat(Uh(e)));
for (var i = Fh(t), a = Fh(e), s = 0; s < o.length; ++s) {
var l = o[s];
if (!(l in fv || n && n[l] || a && l in a || i && l in i)) {
var c = vv(e, l);
try {
mv(t, l, c);
} catch {
}
}
}
}
return t;
}
function Sa(t) {
return typeof t == "function";
}
function Wd(t) {
return typeof t == "object" && "styledComponentId" in t;
}
function xi(t, e) {
return t && e ? "".concat(t, " ").concat(e) : t || e || "";
}
function Yh(t, e) {
if (t.length === 0)
return "";
for (var n = t[0], r = 1; r < t.length; r++)
n += e ? e + t[r] : t[r];
return n;
}
function _a(t) {
return t !== null && typeof t == "object" && t.constructor.name === Object.name && !("props" in t && t.$$typeof);
}
function Au(t, e, n) {
if (n === void 0 && (n = !1), !n && !_a(t) && !Array.isArray(t))
return e;
if (Array.isArray(e))
for (var r = 0; r < e.length; r++)
t[r] = Au(t[r], e[r]);
else if (_a(e))
for (var r in e)
t[r] = Au(t[r], e[r]);
return t;
}
function Xd(t, e) {
Object.defineProperty(t, "toString", { value: e });
}
var xv = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
- Are you trying to reuse it across renders?
- Are you accidentally calling collectStyles twice?
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
- Does this error occur on the client and is your target falsy?
- Does this error occur on the server and is the sheet falsy?
`, 5: `The clone method cannot be used on the client!
- Are you running in a client-like environment on the server?
- Are you trying to run SSR on the client?
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
- Are you using a custom target that isn't mounted?
- Does your document not have a valid head element?
- Have you accidentally removed a style tag manually?
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
`, 14: `ThemeProvider: "theme" prop is required.
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
as for instance in your render method then you may be running into this limitation.
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
Has styled-components' style tag been unmounted or altered by another script?
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
function wv() {
for (var t = [], e = 0; e < arguments.length; e++)
t[e] = arguments[e];
for (var n = t[0], r = [], o = 1, i = t.length; o < i; o += 1)
r.push(t[o]);
return r.forEach(function(a) {
n = n.replace(/%[a-z]/, a);
}), n;
}
function za(t) {
for (var e = [], n = 1; n < arguments.length; n++)
e[n - 1] = arguments[n];
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(wv.apply(void 0, wa([xv[t]], e, !1)).trim());
}
var Cv = function() {
function t(e) {
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e;
}
return t.prototype.indexOfGroup = function(e) {
for (var n = 0, r = 0; r < e; r++)
n += this.groupSizes[r];
return n;
}, t.prototype.insertRules = function(e, n) {
if (e >= this.groupSizes.length) {
for (var r = this.groupSizes, o = r.length, i = o; e >= i; )
if ((i <<= 1) < 0)
throw za(16, "".concat(e));
this.groupSizes = new Uint32Array(i), this.groupSizes.set(r), this.length = i;
for (var a = o; a < i; a++)
this.groupSizes[a] = 0;
}
for (var s = this.indexOfGroup(e + 1), l = (a = 0, n.length); a < l; a++)
this.tag.insertRule(s, n[a]) && (this.groupSizes[e]++, s++);
}, t.prototype.clearGroup = function(e) {
if (e < this.length) {
var n = this.groupSizes[e], r = this.indexOfGroup(e), o = r + n;
this.groupSizes[e] = 0;
for (var i = r; i < o; i++)
this.tag.deleteRule(r);
}
}, t.prototype.getGroup = function(e) {
var n = "";
if (e >= this.length || this.groupSizes[e] === 0)
return n;
for (var r = this.groupSizes[e], o = this.indexOfGroup(e), i = o + r, a = o; a < i; a++)
n += "".concat(this.tag.getRule(a)).concat(Hd);
return n;
}, t;
}(), Mv = 1 << 30, fl = /* @__PURE__ */ new Map(), Nl = /* @__PURE__ */ new Map(), gl = 1, Ys = function(t) {
if (fl.has(t))
return fl.get(t);
for (; Nl.has(gl); )
gl++;
var e = gl++;
if (process.env.NODE_ENV !== "production" && ((0 | e) < 0 || e > Mv))
throw za(16, "".concat(e));
return fl.set(t, e), Nl.set(e, t), e;
}, kv = function(t, e) {
gl = e + 1, fl.set(t, e), Nl.set(e, t);
}, Sv = "style[".concat(Ti, "][").concat(tm, '="').concat(uc, '"]'), _v = new RegExp("^".concat(Ti, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ev = function(t, e, n) {
for (var r, o = n.split(","), i = 0, a = o.length; i < a; i++)
(r = o[i]) && t.registerName(e, r);
}, Ov = function(t, e) {
for (var n, r = ((n = e.textContent) !== null && n !== void 0 ? n : "").split(Hd), o = [], i = 0, a = r.length; i < a; i++) {
var s = r[i].trim();
if (s) {
var l = s.match(_v);
if (l) {
var c = 0 | parseInt(l[1], 10), u = l[2];
c !== 0 && (kv(u, c), Ev(t, u, l[3]), t.getTag().insertRules(c, o)), o.length = 0;
} else
o.push(s);
}
}
}, Bh = function(t) {
for (var e = document.querySelectorAll(Sv), n = 0, r = e.length; n < r; n++) {
var o = e[n];
o && o.getAttribute(Ti) !== em && (Ov(t, o), o.parentNode && o.parentNode.removeChild(o));
}
};
function Dv() {
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
}
var cm = function(t) {
var e = document.head, n = t || e, r = document.createElement("style"), o = function(s) {
var l = Array.from(s.querySelectorAll("style[".concat(Ti, "]")));
return l[l.length - 1];
}(n), i = o !== void 0 ? o.nextSibling : null;
r.setAttribute(Ti, em), r.setAttribute(tm, uc);
var a = Dv();
return a && r.setAttribute("nonce", a), n.insertBefore(r, i), r;
}, Pv = function() {
function t(e) {
this.element = cm(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(n) {
if (n.sheet)
return n.sheet;
for (var r = document.styleSheets, o = 0, i = r.length; o < i; o++) {
var a = r[o];
if (a.ownerNode === n)
return a;
}
throw za(17);
}(this.element), this.length = 0;
}
return t.prototype.insertRule = function(e, n) {
try {
return this.sheet.insertRule(n, e), this.length++, !0;
} catch {
return !1;
}
}, t.prototype.deleteRule = function(e) {
this.sheet.deleteRule(e), this.length--;
}, t.prototype.getRule = function(e) {
var n = this.sheet.cssRules[e];
return n && n.cssText ? n.cssText : "";
}, t;
}(), Av = function() {
function t(e) {
this.element = cm(e), this.nodes = this.element.childNodes, this.length = 0;
}
return t.prototype.insertRule = function(e, n) {
if (e <= this.length && e >= 0) {
var r = document.createTextNode(n);
return this.element.insertBefore(r, this.nodes[e] || null), this.length++, !0;
}
return !1;
}, t.prototype.deleteRule = function(e) {
this.element.removeChild(this.nodes[e]), this.length--;
}, t.prototype.getRule = function(e) {
return e < this.length ? this.nodes[e].textContent : "";
}, t;
}(), Nv = function() {
function t(e) {
this.rules = [], this.length = 0;
}
return t.prototype.insertRule = function(e, n) {
return e <= this.length && (this.rules.splice(e, 0, n), this.length++, !0);
}, t.prototype.deleteRule = function(e) {
this.rules.splice(e, 1), this.length--;
}, t.prototype.getRule = function(e) {
return e < this.length ? this.rules[e] : "";
}, t;
}(), Hh = Al, Tv = { isServer: !Al, useCSSOMInjection: !iv }, um = function() {
function t(e, n, r) {
e === void 0 && (e = ka), n === void 0 && (n = {});
var o = this;
this.options = On(On({}, Tv), e), this.gs = n, this.names = new Map(r), this.server = !!e.isServer, !this.server && Al && Hh && (Hh = !1, Bh(this)), Xd(this, function() {
return function(i) {
for (var a = i.getTag(), s = a.length, l = "", c = function(d) {
var h = function(v) {
return Nl.get(v);
}(d);
if (h === void 0)
return "continue";
var p = i.names.get(h), y = a.getGroup(d);
if (p === void 0 || !p.size || y.length === 0)
return "continue";
var m = "".concat(Ti, ".g").concat(d, '[id="').concat(h, '"]'), f = "";
p !== void 0 && p.forEach(function(v) {
v.length > 0 && (f += "".concat(v, ","));
}), l += "".concat(y).concat(m, '{content:"').concat(f, '"}').concat(Hd);
}, u = 0; u < s; u++)
c(u);
return l;
}(o);
});
}
return t.registerId = function(e) {
return Ys(e);
}, t.prototype.rehydrate = function() {
!this.server && Al && Bh(this);
}, t.prototype.reconstructWithOptions = function(e, n) {
return n === void 0 && (n = !0), new t(On(On({}, this.options), e), this.gs, n && this.names || void 0);
}, t.prototype.allocateGSInstance = function(e) {
return this.gs[e] = (this.gs[e] || 0) + 1;
}, t.prototype.getTag = function() {
return this.tag || (this.tag = (e = function(n) {
var r = n.useCSSOMInjection, o = n.target;
return n.isServer ? new Nv(o) : r ? new Pv(o) : new Av(o);
}(this.options), new Cv(e)));
var e;
}, t.prototype.hasNameForId = function(e, n) {
return this.names.has(e) && this.names.get(e).has(n);
}, t.prototype.registerName = function(e, n) {
if (Ys(e), this.names.has(e))
this.names.get(e).add(n);
else {
var r = /* @__PURE__ */ new Set();
r.add(n), this.names.set(e, r);
}
}, t.prototype.insertRules = function(e, n, r) {
this.registerName(e, n), this.getTag().insertRules(Ys(e), r);
}, t.prototype.clearNames = function(e) {
this.names.has(e) && this.names.get(e).clear();
}, t.prototype.clearRules = function(e) {
this.getTag().clearGroup(Ys(e)), this.clearNames(e);
}, t.prototype.clearTag = function() {
this.tag = void 0;
}, t;
}(), Lv = /&/g, Iv = /^\s*\/\/.*$/gm;
function dm(t, e) {
return t.map(function(n) {
return n.type === "rule" && (n.value = "".concat(e, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(e, " ")), n.props = n.props.map(function(r) {
return "".concat(e, " ").concat(r);
})), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = dm(n.children, e)), n;
});
}
function $v(t) {
var e, n, r, o = t === void 0 ? ka : t, i = o.options, a = i === void 0 ? ka : i, s = o.plugins, l = s === void 0 ? dc : s, c = function(h, p, y) {
return y.startsWith(n) && y.endsWith(n) && y.replaceAll(n, "").length > 0 ? ".".concat(e) : h;
}, u = l.slice();
u.push(function(h) {
h.type === ac && h.value.includes("&") && (h.props[0] = h.props[0].replace(Lv, n).replace(r, c));
}), a.prefix && u.push(rv), u.push(ev);
var d = function(h, p, y, m) {
p === void 0 && (p = ""), y === void 0 && (y = ""), m === void 0 && (m = "&"), e = m, n = p, r = new RegExp("\\".concat(n, "\\b"), "g");
var f = h.replace(Iv, ""), v = Ky(y || p ? "".concat(y, " ").concat(p, " { ").concat(f, " }") : f);
a.namespace && (v = dm(v, a.namespace));
var b = [];
return Pl(v, tv(u.concat(nv(function(w) {
return b.push(w);
})))), b;
};
return d.hash = l.length ? l.reduce(function(h, p) {
return p.name || za(15), vi(h, p.name);
}, nm).toString() : "", d;
}
var jv = new um(), Nu = $v(), hm = Ce.createContext({ shouldForwardProp: void 0, styleSheet: jv, stylis: Nu });
hm.Consumer;
Ce.createContext(void 0);
function Wh() {
return Cn(hm);
}
var Xh = function() {
function t(e, n) {
var r = this;
this.inject = function(o, i) {
i === void 0 && (i = Nu);
var a = r.name + i.hash;
o.hasNameForId(r.id, a) || o.insertRules(r.id, a, i(r.rules, a, "@keyframes"));
}, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = n, Xd(this, function() {
throw za(12, String(r.name));
});
}
return t.prototype.getName = function(e) {
return e === void 0 && (e = Nu), this.name + e.hash;
}, t;
}(), Rv = function(t) {
return t >= "A" && t <= "Z";
};
function qh(t) {
for (var e = "", n = 0; n < t.length; n++) {
var r = t[n];
if (n === 1 && r === "-" && t[0] === "-")
return t;
Rv(r) ? e += "-" + r.toLowerCase() : e += r;
}
return e.startsWith("ms-") ? "-" + e : e;
}
var pm = function(t) {
return t == null || t === !1 || t === "";
}, fm = function(t) {
var e, n, r = [];
for (var o in t) {
var i = t[o];
t.hasOwnProperty(o) && !pm(i) && (Array.isArray(i) && i.isCss || Sa(i) ? r.push("".concat(qh(o), ":"), i, ";") : _a(i) ? r.push.apply(r, wa(wa(["".concat(o, " {")], fm(i), !1), ["}"], !1)) : r.push("".concat(qh(o), ": ").concat((e = o, (n = i) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || e in ov || e.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";")));
}
return r;
};
function _i(t, e, n, r) {
if (pm(t))
return [];
if (Wd(t))
return [".".concat(t.styledComponentId)];
if (Sa(t)) {
if (!Sa(i = t) || i.prototype && i.prototype.isReactComponent || !e)
return [t];
var o = t(e);
return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof Xh || _a(o) || o === null || console.error("".concat(om(t), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), _i(o, e, n, r);
}
var i;
return t instanceof Xh ? n ? (t.inject(n, r), [t.getName(r)]) : [t] : _a(t) ? fm(t) : Array.isArray(t) ? Array.prototype.concat.apply(dc, t.map(function(a) {
return _i(a, e, n, r);
})) : [t.toString()];
}
function zv(t) {
for (var e = 0; e < t.length; e += 1) {
var n = t[e];
if (Sa(n) && !Wd(n))
return !1;
}
return !0;
}
var Fv = rm(uc), Uv = function() {
function t(e, n, r) {
this.rules = e, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (r === void 0 || r.isStatic) && zv(e), this.componentId = n, this.baseHash = vi(Fv, n), this.baseStyle = r, um.registerId(n);
}
return t.prototype.generateAndInjectStyles = function(e, n, r) {
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, n, r) : "";
if (this.isStatic && !r.hash)
if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId))
o = xi(o, this.staticRulesId);
else {
var i = Yh(_i(this.rules, e, n, r)), a = Pu(vi(this.baseHash, i) >>> 0);
if (!n.hasNameForId(this.componentId, a)) {
var s = r(i, ".".concat(a), void 0, this.componentId);
n.insertRules(this.componentId, a, s);
}
o = xi(o, a), this.staticRulesId = a;
}
else {
for (var l = vi(this.baseHash, r.hash), c = "", u = 0; u < this.rules.length; u++) {
var d = this.rules[u];
if (typeof d == "string")
c += d, process.env.NODE_ENV !== "production" && (l = vi(l, d));
else if (d) {
var h = Yh(_i(d, e, n, r));
l = vi(l, h + u), c += h;
}
}
if (c) {
var p = Pu(l >>> 0);
n.hasNameForId(this.componentId, p) || n.insertRules(this.componentId, p, r(c, ".".concat(p), void 0, this.componentId)), o = xi(o, p);
}
}
return o;
}, t;
}(), gm = Ce.createContext(void 0);
gm.Consumer;
var Bc = {}, Zh = /* @__PURE__ */ new Set();
function Vv(t, e, n) {
var r = Wd(t), o = t, i = !Yc(t), a = e.attrs, s = a === void 0 ? dc : a, l = e.componentId, c = l === void 0 ? function(M, x) {
var C = typeof M != "string" ? "sc" : Rh(M);
Bc[C] = (Bc[C] || 0) + 1;
var S = "".concat(C, "-").concat(dv(uc + C + Bc[C]));
return x ? "".concat(x, "-").concat(S) : S;
}(e.displayName, e.parentComponentId) : l, u = e.displayName, d = u === void 0 ? function(M) {
return Yc(M) ? "styled.".concat(M) : "Styled(".concat(om(M), ")");
}(t) : u, h = e.displayName && e.componentId ? "".concat(Rh(e.displayName), "-").concat(e.componentId) : e.componentId || c, p = r && o.attrs ? o.attrs.concat(s).filter(Boolean) : s, y = e.shouldForwardProp;
if (r && o.shouldForwardProp) {
var m = o.shouldForwardProp;
if (e.shouldForwardProp) {
var f = e.shouldForwardProp;
y = function(M, x) {
return m(M, x) && f(M, x);
};
} else
y = m;
}
var v = new Uv(n, h, r ? o.componentStyle : void 0);
function b(M, x) {
return function(C, S, P) {
var L = C.attrs, Y = C.componentStyle, I = C.defaultProps, q = C.foldedComponentIds, j = C.styledComponentId, R = C.target, W = Ce.useContext(gm), U = Wh(), V = C.shouldForwardProp || U.shouldForwardProp;
process.env.NODE_ENV !== "production" && Ol(j);
var k = sv(S, W, I) || ka, J = function(H, oe, G) {
for (var Q, K = On(On({}, oe), { className: void 0, theme: G }), X = 0; X < H.length; X += 1) {
var ie = Sa(Q = H[X]) ? Q(K) : Q;
for (var z in ie)
K[z] = z === "className" ? xi(K[z], ie[z]) : z === "style" ? On(On({}, K[z]), ie[z]) : ie[z];
}
return oe.className && (K.className = xi(K.className, oe.className)), K;
}(L, S, k), A = J.as || R, $ = {};
for (var F in J)
J[F] === void 0 || F[0] === "$" || F === "as" || F === "theme" && J.theme === k || (F === "forwardedAs" ? $.as = J.forwardedAs : V && !V(F, A) || ($[F] = J[F], V || process.env.NODE_ENV !== "development" || Ry(F) || Zh.has(F) || !Du.has(A) || (Zh.add(F), console.warn('styled-components: it looks like an unknown prop "'.concat(F, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
var Z = function(H, oe) {
var G = Wh(), Q = H.generateAndInjectStyles(oe, G.styleSheet, G.stylis);
return process.env.NODE_ENV !== "production" && Ol(Q), Q;
}(Y, J);
process.env.NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(Z);
var B = xi(q, j);
return Z && (B += " " + Z), J.className && (B += " " + J.className), $[Yc(A) && !Du.has(A) ? "class" : "className"] = B, P && ($.ref = P), ws(A, $);
}(w, M, x);
}
b.displayName = d;
var w = Ce.forwardRef(b);
return w.attrs = p, w.componentStyle = v, w.displayName = d, w.shouldForwardProp = y, w.foldedComponentIds = r ? xi(o.foldedComponentIds, o.styledComponentId) : "", w.styledComponentId = h, w.target = r ? o.target : t, Object.defineProperty(w, "defaultProps", { get: function() {
return this._foldedDefaultProps;
}, set: function(M) {
this._foldedDefaultProps = r ? function(x) {
for (var C = [], S = 1; S < arguments.length; S++)
C[S - 1] = arguments[S];
for (var P = 0, L = C; P < L.length; P++)
Au(x, L[P], !0);
return x;
}({}, o.defaultProps, M) : M;
} }), process.env.NODE_ENV !== "production" && (av(d, h), w.warnTooManyClasses = function(M, x) {
var C = {}, S = !1;
return function(P) {
if (!S && (C[P] = !0, Object.keys(C).length >= 200)) {
var L = x ? ' with the id of "'.concat(x, '"') : "";
console.warn("Over ".concat(200, " classes were generated for component ").concat(M).concat(L, `.
`) + `Consider using the attrs method, together with a style object for frequently changed styles.
Example:
const Component = styled.div.attrs(props => ({
style: {
background: props.background,
},
}))\`width: 100%;\`
<Component />`), S = !0, C = {};
}
};
}(d, h)), Xd(w, function() {
return ".".concat(w.styledComponentId);
}), i && lm(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w;
}
function Gh(t, e) {
for (var n = [t[0]], r = 0, o = e.length; r < o; r += 1)
n.push(e[r], t[r + 1]);
return n;
}
var Qh = function(t) {
return Object.assign(t, { isCss: !0 });
};
function Li(t) {
for (var e = [], n = 1; n < arguments.length; n++)
e[n - 1] = arguments[n];
if (Sa(t) || _a(t))
return Qh(_i(Gh(dc, wa([t], e, !0))));
var r = t;
return e.length === 0 && r.length === 1 && typeof r[0] == "string" ? _i(r) : Qh(_i(Gh(r, e)));
}
function Tu(t, e, n) {
if (n === void 0 && (n = ka), !e)
throw za(1, e);
var r = function(o) {
for (var i = [], a = 1; a < arguments.length; a++)
i[a - 1] = arguments[a];
return t(e, n, Li.apply(void 0, wa([o], i, !1)));
};
return r.attrs = function(o) {
return Tu(t, e, On(On({}, n), { attrs: Array.prototype.concat(n.attrs, o).filter(Boolean) }));
}, r.withConfig = function(o) {
return Tu(t, e, On(On({}, n), o));
}, r;
}
var mm = function(t) {
return Tu(Vv, t);
}, Ee = mm;
Du.forEach(function(t) {
Ee[t] = mm(t);
});
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
Perhaps you're looking to import 'styled-components/native'?
Read more about this at https://www.styled-components.com/docs/basics#react-native`);
var Bs = "__sc-".concat(Ti, "__");
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[Bs] || (window[Bs] = 0), window[Bs] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
See https://s-c.sh/2BAXzed for more info.`), window[Bs] += 1);
function Lu() {
return Lu = Object.assign ? Object.assign.bind() : function(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var r in n)
({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
}
return t;
}, Lu.apply(null, arguments);
}
var ym = ["shift", "alt", "meta", "mod", "ctrl"], Yv = {
esc: "escape",
return: "enter",
".": "period",
",": "comma",
"-": "slash",
" ": "space",
"`": "backquote",
"#": "backslash",
"+": "bracketright",
ShiftLeft: "shift",
ShiftRight: "shift",
AltLeft: "alt",
AltRight: "alt",
MetaLeft: "meta",
MetaRight: "meta",
OSLeft: "meta",
OSRight: "meta",
ControlLeft: "ctrl",
ControlRight: "ctrl"
};
function Ro(t) {
return (t && Yv[t] || t || "").trim().toLowerCase().replace(/key|digit|numpad|arrow/, "");
}
function Bv(t) {
return ym.includes(t);
}
function Hc(t, e) {
return e === void 0 && (e = ","), t.split(e);
}
function Wc(t, e, n) {
e === void 0 && (e = "+");
var r = t.toLocaleLowerCase().split(e).map(function(a) {
return Ro(a);
}), o = {
alt: r.includes("alt"),
ctrl: r.includes("ctrl") || r.includes("control"),
shift: r.includes("shift"),
meta: r.includes("meta"),
mod: