604 lines
18 KiB
JavaScript
604 lines
18 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: ab2e1927315c9199.b865cfe6f4.js
|
|
* Module id: 24083
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
e.i(23741);
|
|
var t = e.i(640404),
|
|
r = e.i(54168),
|
|
n = e.i(624977),
|
|
i = e.i(944356),
|
|
o = e.i(490210),
|
|
a = e.i(470360),
|
|
l = e.i(325576),
|
|
u = e.i(634885),
|
|
c = e.i(914528),
|
|
s = e.i(892388),
|
|
f = e.i(504997),
|
|
d = e.i(483926),
|
|
h = (0, c.default)(function e() {
|
|
(0, u.default)(this, e);
|
|
}),
|
|
v = "CALC_UNIT",
|
|
p = RegExp(v, "g");
|
|
function g(e) {
|
|
return "number" == typeof e ? "".concat(e).concat(v) : e;
|
|
}
|
|
var m = (function (e) {
|
|
(0, f.default)(i, e);
|
|
var r = (0, d.default)(i);
|
|
function i(e, o) {
|
|
(0, u.default)(this, i),
|
|
(a = r.call(this)),
|
|
(0, t.default)((0, s.default)(a), "result", ""),
|
|
(0, t.default)((0, s.default)(a), "unitlessCssVar", void 0),
|
|
(0, t.default)((0, s.default)(a), "lowPriority", void 0);
|
|
var a,
|
|
l = (0, n.default)(e);
|
|
return (
|
|
(a.unitlessCssVar = o),
|
|
e instanceof i
|
|
? (a.result = "(".concat(e.result, ")"))
|
|
: "number" === l
|
|
? (a.result = g(e))
|
|
: "string" === l && (a.result = e),
|
|
a
|
|
);
|
|
}
|
|
return (
|
|
(0, c.default)(i, [
|
|
{
|
|
key: "add",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof i
|
|
? (this.result = ""
|
|
.concat(this.result, " + ")
|
|
.concat(e.getResult()))
|
|
: ("number" == typeof e || "string" == typeof e) &&
|
|
(this.result = ""
|
|
.concat(this.result, " + ")
|
|
.concat(g(e))),
|
|
(this.lowPriority = !0),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "sub",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof i
|
|
? (this.result = ""
|
|
.concat(this.result, " - ")
|
|
.concat(e.getResult()))
|
|
: ("number" == typeof e || "string" == typeof e) &&
|
|
(this.result = ""
|
|
.concat(this.result, " - ")
|
|
.concat(g(e))),
|
|
(this.lowPriority = !0),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "mul",
|
|
value: function (e) {
|
|
return (
|
|
this.lowPriority &&
|
|
(this.result = "(".concat(this.result, ")")),
|
|
e instanceof i
|
|
? (this.result = ""
|
|
.concat(this.result, " * ")
|
|
.concat(e.getResult(!0)))
|
|
: ("number" == typeof e || "string" == typeof e) &&
|
|
(this.result = "".concat(this.result, " * ").concat(e)),
|
|
(this.lowPriority = !1),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "div",
|
|
value: function (e) {
|
|
return (
|
|
this.lowPriority &&
|
|
(this.result = "(".concat(this.result, ")")),
|
|
e instanceof i
|
|
? (this.result = ""
|
|
.concat(this.result, " / ")
|
|
.concat(e.getResult(!0)))
|
|
: ("number" == typeof e || "string" == typeof e) &&
|
|
(this.result = "".concat(this.result, " / ").concat(e)),
|
|
(this.lowPriority = !1),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "getResult",
|
|
value: function (e) {
|
|
return this.lowPriority || e
|
|
? "(".concat(this.result, ")")
|
|
: this.result;
|
|
},
|
|
},
|
|
{
|
|
key: "equal",
|
|
value: function (e) {
|
|
var t = this,
|
|
r = (e || {}).unit,
|
|
n = !0;
|
|
return ("boolean" == typeof r
|
|
? (n = r)
|
|
: Array.from(this.unitlessCssVar).some(function (e) {
|
|
return t.result.includes(e);
|
|
}) && (n = !1),
|
|
(this.result = this.result.replace(p, n ? "px" : "")),
|
|
void 0 !== this.lowPriority)
|
|
? "calc(".concat(this.result, ")")
|
|
: this.result;
|
|
},
|
|
},
|
|
]),
|
|
i
|
|
);
|
|
})(h),
|
|
b = (function (e) {
|
|
(0, f.default)(n, e);
|
|
var r = (0, d.default)(n);
|
|
function n(e) {
|
|
var i;
|
|
return (
|
|
(0, u.default)(this, n),
|
|
(i = r.call(this)),
|
|
(0, t.default)((0, s.default)(i), "result", 0),
|
|
e instanceof n
|
|
? (i.result = e.result)
|
|
: "number" == typeof e && (i.result = e),
|
|
i
|
|
);
|
|
}
|
|
return (
|
|
(0, c.default)(n, [
|
|
{
|
|
key: "add",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof n
|
|
? (this.result += e.result)
|
|
: "number" == typeof e && (this.result += e),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "sub",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof n
|
|
? (this.result -= e.result)
|
|
: "number" == typeof e && (this.result -= e),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "mul",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof n
|
|
? (this.result *= e.result)
|
|
: "number" == typeof e && (this.result *= e),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "div",
|
|
value: function (e) {
|
|
return (
|
|
e instanceof n
|
|
? (this.result /= e.result)
|
|
: "number" == typeof e && (this.result /= e),
|
|
this
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "equal",
|
|
value: function () {
|
|
return this.result;
|
|
},
|
|
},
|
|
]),
|
|
n
|
|
);
|
|
})(h);
|
|
e.s(
|
|
[
|
|
"default",
|
|
0,
|
|
function (e, t) {
|
|
var r = "css" === e ? m : b;
|
|
return function (e) {
|
|
return new r(e, t);
|
|
};
|
|
},
|
|
],
|
|
425703,
|
|
);
|
|
var y = e.i(552659),
|
|
S = (function () {
|
|
function e() {
|
|
(0, u.default)(this, e),
|
|
(0, t.default)(this, "cache", void 0),
|
|
(0, t.default)(this, "keys", void 0),
|
|
(0, t.default)(this, "cacheCallTimes", void 0),
|
|
(this.cache = new Map()),
|
|
(this.keys = []),
|
|
(this.cacheCallTimes = 0);
|
|
}
|
|
return (
|
|
(0, c.default)(e, [
|
|
{
|
|
key: "size",
|
|
value: function () {
|
|
return this.keys.length;
|
|
},
|
|
},
|
|
{
|
|
key: "internalGet",
|
|
value: function (e) {
|
|
var t,
|
|
r,
|
|
n =
|
|
arguments.length > 1 &&
|
|
void 0 !== arguments[1] &&
|
|
arguments[1],
|
|
i = { map: this.cache };
|
|
return (
|
|
e.forEach(function (e) {
|
|
if (i) {
|
|
var t;
|
|
i =
|
|
null == (t = i) || null == (t = t.map)
|
|
? void 0
|
|
: t.get(e);
|
|
} else i = void 0;
|
|
}),
|
|
null != (t = i) &&
|
|
t.value &&
|
|
n &&
|
|
(i.value[1] = this.cacheCallTimes++),
|
|
null == (r = i) ? void 0 : r.value
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "get",
|
|
value: function (e) {
|
|
var t;
|
|
return null == (t = this.internalGet(e, !0)) ? void 0 : t[0];
|
|
},
|
|
},
|
|
{
|
|
key: "has",
|
|
value: function (e) {
|
|
return !!this.internalGet(e);
|
|
},
|
|
},
|
|
{
|
|
key: "set",
|
|
value: function (t, r) {
|
|
var n = this;
|
|
if (!this.has(t)) {
|
|
if (this.size() + 1 > e.MAX_CACHE_SIZE + e.MAX_CACHE_OFFSET) {
|
|
var i = this.keys.reduce(
|
|
function (e, t) {
|
|
var r = (0, y.default)(e, 2)[1];
|
|
return n.internalGet(t)[1] < r
|
|
? [t, n.internalGet(t)[1]]
|
|
: e;
|
|
},
|
|
[this.keys[0], this.cacheCallTimes],
|
|
),
|
|
o = (0, y.default)(i, 1)[0];
|
|
this.delete(o);
|
|
}
|
|
this.keys.push(t);
|
|
}
|
|
var a = this.cache;
|
|
t.forEach(function (e, i) {
|
|
if (i === t.length - 1)
|
|
a.set(e, { value: [r, n.cacheCallTimes++] });
|
|
else {
|
|
var o = a.get(e);
|
|
o
|
|
? o.map || (o.map = new Map())
|
|
: a.set(e, { map: new Map() }),
|
|
(a = a.get(e).map);
|
|
}
|
|
});
|
|
},
|
|
},
|
|
{
|
|
key: "deleteByPath",
|
|
value: function (e, t) {
|
|
var r,
|
|
n = e.get(t[0]);
|
|
if (1 === t.length)
|
|
return (
|
|
n.map ? e.set(t[0], { map: n.map }) : e.delete(t[0]),
|
|
null == (r = n.value) ? void 0 : r[0]
|
|
);
|
|
var i = this.deleteByPath(n.map, t.slice(1));
|
|
return (
|
|
(n.map && 0 !== n.map.size) || n.value || e.delete(t[0]), i
|
|
);
|
|
},
|
|
},
|
|
{
|
|
key: "delete",
|
|
value: function (e) {
|
|
if (this.has(e))
|
|
return (
|
|
(this.keys = this.keys.filter(function (t) {
|
|
return !(function (e, t) {
|
|
if (e.length !== t.length) return !1;
|
|
for (var r = 0; r < e.length; r++)
|
|
if (e[r] !== t[r]) return !1;
|
|
return !0;
|
|
})(t, e);
|
|
})),
|
|
this.deleteByPath(this.cache, e)
|
|
);
|
|
},
|
|
},
|
|
]),
|
|
e
|
|
);
|
|
})();
|
|
(0, t.default)(S, "MAX_CACHE_SIZE", 20),
|
|
(0, t.default)(S, "MAX_CACHE_OFFSET", 5);
|
|
var x = e.i(992734),
|
|
C = 0,
|
|
k = (function () {
|
|
function e(r) {
|
|
(0, u.default)(this, e),
|
|
(0, t.default)(this, "derivatives", void 0),
|
|
(0, t.default)(this, "id", void 0),
|
|
(this.derivatives = Array.isArray(r) ? r : [r]),
|
|
(this.id = C),
|
|
0 === r.length &&
|
|
(0, x.warning)(
|
|
r.length > 0,
|
|
"[Ant Design CSS-in-JS] Theme should have at least one derivative function.",
|
|
),
|
|
(C += 1);
|
|
}
|
|
return (
|
|
(0, c.default)(e, [
|
|
{
|
|
key: "getDerivativeToken",
|
|
value: function (e) {
|
|
return this.derivatives.reduce(
|
|
function (t, r) {
|
|
return r(e, t);
|
|
},
|
|
void 0,
|
|
);
|
|
},
|
|
},
|
|
]),
|
|
e
|
|
);
|
|
})(),
|
|
w = new S();
|
|
function T(e) {
|
|
var t = Array.isArray(e) ? e : [e];
|
|
return w.has(t) || w.set(t, new k(t)), w.get(t);
|
|
}
|
|
e.s(["default", () => T], 95041),
|
|
e.s([], 42241),
|
|
e.s(["Theme", () => k], 597509);
|
|
var E = new WeakMap(),
|
|
M = {};
|
|
function A(e, t) {
|
|
for (var r = E, n = 0; n < t.length; n += 1) {
|
|
var i = t[n];
|
|
r.has(i) || r.set(i, new WeakMap()), (r = r.get(i));
|
|
}
|
|
return r.has(M) || r.set(M, e()), r.get(M);
|
|
}
|
|
var O = new WeakMap();
|
|
function _(e) {
|
|
var t = O.get(e) || "";
|
|
return (
|
|
t ||
|
|
(Object.keys(e).forEach(function (r) {
|
|
var i = e[r];
|
|
(t += r),
|
|
i instanceof k
|
|
? (t += i.id)
|
|
: i && "object" === (0, n.default)(i)
|
|
? (t += _(i))
|
|
: (t += i);
|
|
}),
|
|
(t = (0, i.default)(t)),
|
|
O.set(e, t)),
|
|
t
|
|
);
|
|
}
|
|
function j(e, t) {
|
|
return (0, i.default)("".concat(t, "_").concat(_(e)));
|
|
}
|
|
var P = "random-"
|
|
.concat(Date.now(), "-")
|
|
.concat(Math.random())
|
|
.replace(/\./g, ""),
|
|
H = "_bAmBoO_";
|
|
function L(e, t, r) {
|
|
if ((0, o.default)()) {
|
|
(0, a.updateCSS)(e, P);
|
|
var n,
|
|
i,
|
|
l = document.createElement("div");
|
|
(l.style.position = "fixed"),
|
|
(l.style.left = "0"),
|
|
(l.style.top = "0"),
|
|
null == t || t(l),
|
|
document.body.appendChild(l);
|
|
var u = r
|
|
? r(l)
|
|
: null == (n = getComputedStyle(l).content)
|
|
? void 0
|
|
: n.includes(H);
|
|
return (
|
|
null == (i = l.parentNode) || i.removeChild(l), (0, a.removeCSS)(P), u
|
|
);
|
|
}
|
|
return !1;
|
|
}
|
|
var R = void 0;
|
|
function I() {
|
|
return (
|
|
void 0 === R &&
|
|
(R = L(
|
|
":where(.".concat(P, ') { content: "').concat(H, '"!important; }'),
|
|
function (e) {
|
|
e.className = P;
|
|
},
|
|
)),
|
|
R
|
|
);
|
|
}
|
|
var B = void 0;
|
|
function z() {
|
|
return (
|
|
void 0 === B &&
|
|
(B = L(
|
|
".".concat(P, " { inset-block: 93px !important; }"),
|
|
function (e) {
|
|
e.className = P;
|
|
},
|
|
function (e) {
|
|
return "93px" === getComputedStyle(e).bottom;
|
|
},
|
|
)),
|
|
B
|
|
);
|
|
}
|
|
var F = (0, o.default)();
|
|
function D(e) {
|
|
return "number" == typeof e ? "".concat(e, "px") : e;
|
|
}
|
|
function N(e, n, i) {
|
|
var o =
|
|
arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
|
|
a = arguments.length > 4 && void 0 !== arguments[4] && arguments[4];
|
|
if (a) return e;
|
|
var u = (0, r.default)(
|
|
(0, r.default)({}, o),
|
|
{},
|
|
(0, t.default)((0, t.default)({}, l.ATTR_TOKEN, n), l.ATTR_MARK, i),
|
|
),
|
|
c = Object.keys(u)
|
|
.map(function (e) {
|
|
var t = u[e];
|
|
return t ? "".concat(e, '="').concat(t, '"') : null;
|
|
})
|
|
.filter(function (e) {
|
|
return e;
|
|
})
|
|
.join(" ");
|
|
return "<style ".concat(c, ">").concat(e, "</style>");
|
|
}
|
|
e.s(
|
|
[
|
|
"flattenToken",
|
|
() => _,
|
|
"isClientSide",
|
|
() => F,
|
|
"memoResult",
|
|
() => A,
|
|
"supportLogicProps",
|
|
() => z,
|
|
"supportWhere",
|
|
() => I,
|
|
"toStyleStr",
|
|
() => N,
|
|
"token2key",
|
|
() => j,
|
|
"unit",
|
|
() => D,
|
|
],
|
|
723378,
|
|
);
|
|
var X = function (e) {
|
|
var t =
|
|
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
|
|
return "--"
|
|
.concat(t ? "".concat(t, "-") : "")
|
|
.concat(e)
|
|
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
.replace(/([A-Z]+)([A-Z][a-z0-9]+)/g, "$1-$2")
|
|
.replace(/([a-z])([A-Z0-9])/g, "$1-$2")
|
|
.toLowerCase();
|
|
},
|
|
$ = function (e, t, r) {
|
|
var n,
|
|
i = {},
|
|
o = {};
|
|
return (
|
|
Object.entries(e).forEach(function (e) {
|
|
var t = (0, y.default)(e, 2),
|
|
n = t[0],
|
|
a = t[1];
|
|
if (null != r && null != (l = r.preserve) && l[n]) o[n] = a;
|
|
else if (
|
|
("string" == typeof a || "number" == typeof a) &&
|
|
!(null != r && null != (u = r.ignore) && u[n])
|
|
) {
|
|
var l,
|
|
u,
|
|
c,
|
|
s = X(n, null == r ? void 0 : r.prefix);
|
|
(i[s] =
|
|
"number" != typeof a ||
|
|
(null != r && null != (c = r.unitless) && c[n])
|
|
? String(a)
|
|
: "".concat(a, "px")),
|
|
(o[n] = "var(".concat(s, ")"));
|
|
}
|
|
}),
|
|
[
|
|
o,
|
|
((n = { scope: null == r ? void 0 : r.scope }),
|
|
Object.keys(i).length
|
|
? "."
|
|
.concat(t)
|
|
.concat(null != n && n.scope ? ".".concat(n.scope) : "", "{")
|
|
.concat(
|
|
Object.entries(i)
|
|
.map(function (e) {
|
|
var t = (0, y.default)(e, 2),
|
|
r = t[0],
|
|
n = t[1];
|
|
return "".concat(r, ":").concat(n, ";");
|
|
})
|
|
.join(""),
|
|
"}",
|
|
)
|
|
: ""),
|
|
]
|
|
);
|
|
};
|
|
e.s(["token2CSSVar", () => X, "transformToken", () => $], 24083);
|
|
};
|
|
|
|
export default moduleFactory;
|