52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 39c0420b837da380.f3eff5e6e8.js
|
|
* Module id: 389435
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
function r(e) {
|
|
return "0rem" === e ? "0rem" : `calc(${e} * var(--mantine-scale))`;
|
|
}
|
|
function t(e, { shouldScale: n = !1 } = {}) {
|
|
return function t(o) {
|
|
if (0 === o || "0" === o) return `0${e}`;
|
|
if ("number" == typeof o) {
|
|
let t = `${o / 16}${e}`;
|
|
return n ? r(t) : t;
|
|
}
|
|
if ("string" == typeof o) {
|
|
if (
|
|
"" === o ||
|
|
o.startsWith("calc(") ||
|
|
o.startsWith("clamp(") ||
|
|
o.includes("rgba(")
|
|
)
|
|
return o;
|
|
if (o.includes(","))
|
|
return o
|
|
.split(",")
|
|
.map((e) => t(e))
|
|
.join(",");
|
|
if (o.includes(" "))
|
|
return o
|
|
.split(" ")
|
|
.map((e) => t(e))
|
|
.join(" ");
|
|
let i = o.replace("px", "");
|
|
if (!Number.isNaN(Number(i))) {
|
|
let t = `${Number(i) / 16}${e}`;
|
|
return n ? r(t) : t;
|
|
}
|
|
}
|
|
return o;
|
|
};
|
|
}
|
|
let n = t("rem", { shouldScale: !0 }),
|
|
o = t("em");
|
|
e.s(["em", () => o, "rem", () => n]);
|
|
};
|
|
|
|
export default moduleFactory;
|