form-designer-xinyi
Version:
基于vue3的设计器,可视化开发页面表单
858 lines (849 loc) • 25.3 kB
JavaScript
import { inject as Se, ref as E, h as W, getCurrentInstance as Oe, nextTick as Te, reactive as ke, defineComponent as Ae, createVNode as k } from "vue";
function s(e, n) {
je(e) && (e = "100%");
var r = Ie(e);
return e = n === 360 ? e : Math.min(n, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * n), 10) / 100), Math.abs(e - n) < 1e-6 ? 1 : (n === 360 ? e = (e < 0 ? e % n + n : e % n) / parseFloat(String(n)) : e = e % n / parseFloat(String(n)), e);
}
function je(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function Ie(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function _e(e) {
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function S(e) {
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function M(e) {
return e.length === 1 ? "0" + e : String(e);
}
function Pe(e, n, r) {
return {
r: s(e, 255) * 255,
g: s(n, 255) * 255,
b: s(r, 255) * 255
};
}
function F(e, n, r) {
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (n - e) * (6 * r) : r < 1 / 2 ? n : r < 2 / 3 ? e + (n - e) * (2 / 3 - r) * 6 : e;
}
function Ee(e, n, r) {
var t, a, o;
if (e = s(e, 360), n = s(n, 100), r = s(r, 100), n === 0)
a = r, o = r, t = r;
else {
var f = r < 0.5 ? r * (1 + n) : r + n - r * n, i = 2 * r - f;
t = F(i, f, e + 1 / 3), a = F(i, f, e), o = F(i, f, e - 1 / 3);
}
return { r: t * 255, g: a * 255, b: o * 255 };
}
function Me(e, n, r) {
e = s(e, 255), n = s(n, 255), r = s(r, 255);
var t = Math.max(e, n, r), a = Math.min(e, n, r), o = 0, f = t, i = t - a, u = t === 0 ? 0 : i / t;
if (t === a)
o = 0;
else {
switch (t) {
case e:
o = (n - r) / i + (n < r ? 6 : 0);
break;
case n:
o = (r - e) / i + 2;
break;
case r:
o = (e - n) / i + 4;
break;
}
o /= 6;
}
return { h: o, s: u, v: f };
}
function Fe(e, n, r) {
e = s(e, 360) * 6, n = s(n, 100), r = s(r, 100);
var t = Math.floor(e), a = e - t, o = r * (1 - n), f = r * (1 - a * n), i = r * (1 - (1 - a) * n), u = t % 6, c = [r, f, o, o, i, r][u], m = [i, r, r, f, o, o][u], v = [o, o, i, r, r, f][u];
return { r: c * 255, g: m * 255, b: v * 255 };
}
function Ne(e, n, r, t) {
var a = [
M(Math.round(e).toString(16)),
M(Math.round(n).toString(16)),
M(Math.round(r).toString(16))
];
return a.join("");
}
function Q(e) {
return l(e) / 255;
}
function l(e) {
return parseInt(e, 16);
}
var G = {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyan: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
goldenrod: "#daa520",
gold: "#ffd700",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavenderblush: "#fff0f5",
lavender: "#e6e6fa",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
steelblue: "#4682b4",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
tomato: "#ff6347",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
};
function h(e) {
var n = { r: 0, g: 0, b: 0 }, r = 1, t = null, a = null, o = null, f = !1, i = !1;
return typeof e == "string" && (e = De(e)), typeof e == "object" && (g(e.r) && g(e.g) && g(e.b) ? (n = Pe(e.r, e.g, e.b), f = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : g(e.h) && g(e.s) && g(e.v) ? (t = S(e.s), a = S(e.v), n = Fe(e.h, t, a), f = !0, i = "hsv") : g(e.h) && g(e.s) && g(e.l) && (t = S(e.s), o = S(e.l), n = Ee(e.h, t, o), f = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = _e(r), {
ok: f,
format: e.format || i,
r: Math.min(255, Math.max(n.r, 0)),
g: Math.min(255, Math.max(n.g, 0)),
b: Math.min(255, Math.max(n.b, 0)),
a: r
};
}
var Re = "[-\\+]?\\d+%?", $e = "[-\\+]?\\d*\\.\\d+%?", p = "(?:".concat($e, ")|(?:").concat(Re, ")"), N = "[\\s|\\(]+(".concat(p, ")[,|\\s]+(").concat(p, ")[,|\\s]+(").concat(p, ")\\s*\\)?"), R = "[\\s|\\(]+(".concat(p, ")[,|\\s]+(").concat(p, ")[,|\\s]+(").concat(p, ")[,|\\s]+(").concat(p, ")\\s*\\)?"), d = {
CSS_UNIT: new RegExp(p),
rgb: new RegExp("rgb" + N),
rgba: new RegExp("rgba" + R),
hsl: new RegExp("hsl" + N),
hsla: new RegExp("hsla" + R),
hsv: new RegExp("hsv" + N),
hsva: new RegExp("hsva" + R),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function De(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return !1;
var n = !1;
if (G[e])
e = G[e], n = !0;
else if (e === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var r = d.rgb.exec(e);
return r ? { r: r[1], g: r[2], b: r[3] } : (r = d.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = d.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = d.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = d.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = d.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = d.hex8.exec(e), r ? {
r: l(r[1]),
g: l(r[2]),
b: l(r[3]),
a: Q(r[4]),
format: n ? "name" : "hex8"
} : (r = d.hex6.exec(e), r ? {
r: l(r[1]),
g: l(r[2]),
b: l(r[3]),
format: n ? "name" : "hex"
} : (r = d.hex4.exec(e), r ? {
r: l(r[1] + r[1]),
g: l(r[2] + r[2]),
b: l(r[3] + r[3]),
a: Q(r[4] + r[4]),
format: n ? "name" : "hex8"
} : (r = d.hex3.exec(e), r ? {
r: l(r[1] + r[1]),
g: l(r[2] + r[2]),
b: l(r[3] + r[3]),
format: n ? "name" : "hex"
} : !1)))))))));
}
function g(e) {
return !!d.CSS_UNIT.exec(String(e));
}
var O = 2, Y = 0.16, Be = 0.05, He = 0.05, ze = 0.15, fe = 5, ue = 4, Le = [{
index: 7,
opacity: 0.15
}, {
index: 6,
opacity: 0.25
}, {
index: 5,
opacity: 0.3
}, {
index: 5,
opacity: 0.45
}, {
index: 5,
opacity: 0.65
}, {
index: 5,
opacity: 0.85
}, {
index: 4,
opacity: 0.9
}, {
index: 3,
opacity: 0.95
}, {
index: 2,
opacity: 0.97
}, {
index: 1,
opacity: 0.98
}];
function Z(e) {
var n = e.r, r = e.g, t = e.b, a = Me(n, r, t);
return {
h: a.h * 360,
s: a.s,
v: a.v
};
}
function T(e) {
var n = e.r, r = e.g, t = e.b;
return "#".concat(Ne(n, r, t));
}
function qe(e, n, r) {
var t = r / 100, a = {
r: (n.r - e.r) * t + e.r,
g: (n.g - e.g) * t + e.g,
b: (n.b - e.b) * t + e.b
};
return a;
}
function J(e, n, r) {
var t;
return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? t = r ? Math.round(e.h) - O * n : Math.round(e.h) + O * n : t = r ? Math.round(e.h) + O * n : Math.round(e.h) - O * n, t < 0 ? t += 360 : t >= 360 && (t -= 360), t;
}
function X(e, n, r) {
if (e.h === 0 && e.s === 0)
return e.s;
var t;
return r ? t = e.s - Y * n : n === ue ? t = e.s + Y : t = e.s + Be * n, t > 1 && (t = 1), r && n === fe && t > 0.1 && (t = 0.1), t < 0.06 && (t = 0.06), Number(t.toFixed(2));
}
function K(e, n, r) {
var t;
return r ? t = e.v + He * n : t = e.v - ze * n, t > 1 && (t = 1), Number(t.toFixed(2));
}
function B(e) {
for (var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], t = h(e), a = fe; a > 0; a -= 1) {
var o = Z(t), f = T(h({
h: J(o, a, !0),
s: X(o, a, !0),
v: K(o, a, !0)
}));
r.push(f);
}
r.push(T(t));
for (var i = 1; i <= ue; i += 1) {
var u = Z(t), c = T(h({
h: J(u, i),
s: X(u, i),
v: K(u, i)
}));
r.push(c);
}
return n.theme === "dark" ? Le.map(function(m) {
var v = m.index, I = m.opacity, x = T(qe(h(n.backgroundColor || "#141414"), h(r[v]), I * 100));
return x;
}) : r;
}
var $ = {
red: "#F5222D",
volcano: "#FA541C",
orange: "#FA8C16",
gold: "#FAAD14",
yellow: "#FADB14",
lime: "#A0D911",
green: "#52C41A",
cyan: "#13C2C2",
blue: "#1890FF",
geekblue: "#2F54EB",
purple: "#722ED1",
magenta: "#EB2F96",
grey: "#666666"
}, A = {}, D = {};
Object.keys($).forEach(function(e) {
A[e] = B($[e]), A[e].primary = A[e][5], D[e] = B($[e], {
theme: "dark",
backgroundColor: "#141414"
}), D[e].primary = D[e][5];
});
var Ue = A.blue, Ve = Symbol("iconContext"), ce = function() {
return Se(Ve, {
prefixCls: E("anticon"),
rootClassName: E(""),
csp: E()
});
};
function L() {
return !!(typeof window < "u" && window.document && window.document.createElement);
}
function We(e, n) {
return e && e.contains ? e.contains(n) : !1;
}
var ee = "data-vc-order", Qe = "vc-icon-key", H = /* @__PURE__ */ new Map();
function le() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.mark;
return n ? n.startsWith("data-") ? n : "data-".concat(n) : Qe;
}
function q(e) {
if (e.attachTo)
return e.attachTo;
var n = document.querySelector("head");
return n || document.body;
}
function Ge(e) {
return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function se(e) {
return Array.from((H.get(e) || e).children).filter(function(n) {
return n.tagName === "STYLE";
});
}
function de(e) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (!L())
return null;
var r = n.csp, t = n.prepend, a = document.createElement("style");
a.setAttribute(ee, Ge(t)), r && r.nonce && (a.nonce = r.nonce), a.innerHTML = e;
var o = q(n), f = o.firstChild;
if (t) {
if (t === "queue") {
var i = se(o).filter(function(u) {
return ["prepend", "prependQueue"].includes(u.getAttribute(ee));
});
if (i.length)
return o.insertBefore(a, i[i.length - 1].nextSibling), a;
}
o.insertBefore(a, f);
} else
o.appendChild(a);
return a;
}
function Ye(e) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = q(n);
return se(r).find(function(t) {
return t.getAttribute(le(n)) === e;
});
}
function Ze(e, n) {
var r = H.get(e);
if (!r || !We(document, r)) {
var t = de("", n), a = t.parentNode;
H.set(e, a), e.removeChild(t);
}
}
function Je(e, n) {
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = q(r);
Ze(t, r);
var a = Ye(n, r);
if (a)
return r.csp && r.csp.nonce && a.nonce !== r.csp.nonce && (a.nonce = r.csp.nonce), a.innerHTML !== e && (a.innerHTML = e), a;
var o = de(e, r);
return o.setAttribute(le(r), n), o;
}
function re(e) {
for (var n = 1; n < arguments.length; n++) {
var r = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(r);
typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(r).filter(function(a) {
return Object.getOwnPropertyDescriptor(r, a).enumerable;
}))), t.forEach(function(a) {
Xe(e, a, r[a]);
});
}
return e;
}
function Xe(e, n, r) {
return n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
}
function Ke(e, n) {
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(n));
}
function er(e, n) {
Ke(e, "[@ant-design/icons-vue] ".concat(n));
}
function ne(e) {
return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function z(e, n, r) {
return r ? W(e.tag, re({
key: n
}, r, e.attrs), (e.children || []).map(function(t, a) {
return z(t, "".concat(n, "-").concat(e.tag, "-").concat(a));
})) : W(e.tag, re({
key: n
}, e.attrs), (e.children || []).map(function(t, a) {
return z(t, "".concat(n, "-").concat(e.tag, "-").concat(a));
}));
}
function ge(e) {
return B(e)[0];
}
function pe(e) {
return e ? Array.isArray(e) ? e : [e] : [];
}
var rr = `
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`;
function be(e) {
return e && e.getRootNode && e.getRootNode();
}
function nr(e) {
return L() ? be(e) instanceof ShadowRoot : !1;
}
function tr(e) {
return nr(e) ? be(e) : null;
}
var ar = function() {
var n = ce(), r = n.prefixCls, t = n.csp, a = Oe(), o = rr;
r && (o = o.replace(/anticon/g, r.value)), Te(function() {
if (L()) {
var f = a.vnode.el, i = tr(f);
Je(o, "@ant-design-vue-icons", {
prepend: !0,
csp: t.value,
attachTo: i
});
}
});
}, or = ["icon", "primaryColor", "secondaryColor"];
function ir(e, n) {
if (e == null) return {};
var r = fr(e, n), t, a;
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
for (a = 0; a < o.length; a++)
t = o[a], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
}
return r;
}
function fr(e, n) {
if (e == null) return {};
var r = {}, t = Object.keys(e), a, o;
for (o = 0; o < t.length; o++)
a = t[o], !(n.indexOf(a) >= 0) && (r[a] = e[a]);
return r;
}
function j(e) {
for (var n = 1; n < arguments.length; n++) {
var r = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(r);
typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(r).filter(function(a) {
return Object.getOwnPropertyDescriptor(r, a).enumerable;
}))), t.forEach(function(a) {
ur(e, a, r[a]);
});
}
return e;
}
function ur(e, n, r) {
return n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
}
var w = ke({
primaryColor: "#333",
secondaryColor: "#E6E6E6",
calculated: !1
});
function cr(e) {
var n = e.primaryColor, r = e.secondaryColor;
w.primaryColor = n, w.secondaryColor = r || ge(n), w.calculated = !!r;
}
function lr() {
return j({}, w);
}
var b = function(n, r) {
var t = j({}, n, r.attrs), a = t.icon, o = t.primaryColor, f = t.secondaryColor, i = ir(t, or), u = w;
if (o && (u = {
primaryColor: o,
secondaryColor: f || ge(o)
}), er(ne(a), "icon should be icon definiton, but got ".concat(a)), !ne(a))
return null;
var c = a;
return c && typeof c.icon == "function" && (c = j({}, c, {
icon: c.icon(u.primaryColor, u.secondaryColor)
})), z(c.icon, "svg-".concat(c.name), j({}, i, {
"data-icon": c.name,
width: "1em",
height: "1em",
fill: "currentColor",
"aria-hidden": "true"
}));
};
b.props = {
icon: Object,
primaryColor: String,
secondaryColor: String,
focusable: String
};
b.inheritAttrs = !1;
b.displayName = "IconBase";
b.getTwoToneColors = lr;
b.setTwoToneColors = cr;
function sr(e, n) {
return br(e) || pr(e, n) || gr(e, n) || dr();
}
function dr() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function gr(e, n) {
if (e) {
if (typeof e == "string") return te(e, n);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return te(e, n);
}
}
function te(e, n) {
(n == null || n > e.length) && (n = e.length);
for (var r = 0, t = new Array(n); r < n; r++)
t[r] = e[r];
return t;
}
function pr(e, n) {
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r != null) {
var t = [], a = !0, o = !1, f, i;
try {
for (r = r.call(e); !(a = (f = r.next()).done) && (t.push(f.value), !(n && t.length === n)); a = !0)
;
} catch (u) {
o = !0, i = u;
} finally {
try {
!a && r.return != null && r.return();
} finally {
if (o) throw i;
}
}
return t;
}
}
function br(e) {
if (Array.isArray(e)) return e;
}
function me(e) {
var n = pe(e), r = sr(n, 2), t = r[0], a = r[1];
return b.setTwoToneColors({
primaryColor: t,
secondaryColor: a
});
}
function mr() {
var e = b.getTwoToneColors();
return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var vr = Ae({
name: "InsertStyles",
setup: function() {
return ar(), function() {
return null;
};
}
}), yr = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function hr(e, n) {
return Sr(e) || xr(e, n) || wr(e, n) || Cr();
}
function Cr() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function wr(e, n) {
if (e) {
if (typeof e == "string") return ae(e, n);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ae(e, n);
}
}
function ae(e, n) {
(n == null || n > e.length) && (n = e.length);
for (var r = 0, t = new Array(n); r < n; r++)
t[r] = e[r];
return t;
}
function xr(e, n) {
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r != null) {
var t = [], a = !0, o = !1, f, i;
try {
for (r = r.call(e); !(a = (f = r.next()).done) && (t.push(f.value), !(n && t.length === n)); a = !0)
;
} catch (u) {
o = !0, i = u;
} finally {
try {
!a && r.return != null && r.return();
} finally {
if (o) throw i;
}
}
return t;
}
}
function Sr(e) {
if (Array.isArray(e)) return e;
}
function oe(e) {
for (var n = 1; n < arguments.length; n++) {
var r = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(r);
typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(r).filter(function(a) {
return Object.getOwnPropertyDescriptor(r, a).enumerable;
}))), t.forEach(function(a) {
C(e, a, r[a]);
});
}
return e;
}
function C(e, n, r) {
return n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
}
function Or(e, n) {
if (e == null) return {};
var r = Tr(e, n), t, a;
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
for (a = 0; a < o.length; a++)
t = o[a], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
}
return r;
}
function Tr(e, n) {
if (e == null) return {};
var r = {}, t = Object.keys(e), a, o;
for (o = 0; o < t.length; o++)
a = t[o], !(n.indexOf(a) >= 0) && (r[a] = e[a]);
return r;
}
me(Ue.primary);
var y = function(n, r) {
var t, a = oe({}, n, r.attrs), o = a.class, f = a.icon, i = a.spin, u = a.rotate, c = a.tabindex, m = a.twoToneColor, v = a.onClick, I = Or(a, yr), x = ce(), _ = x.prefixCls, U = x.rootClassName, ye = (t = {}, C(t, U.value, !!U.value), C(t, _.value, !0), C(t, "".concat(_.value, "-").concat(f.name), !!f.name), C(t, "".concat(_.value, "-spin"), !!i || f.name === "loading"), t), P = c;
P === void 0 && v && (P = -1);
var he = u ? {
msTransform: "rotate(".concat(u, "deg)"),
transform: "rotate(".concat(u, "deg)")
} : void 0, Ce = pe(m), V = hr(Ce, 2), we = V[0], xe = V[1];
return k("span", oe({
role: "img",
"aria-label": f.name
}, I, {
onClick: v,
class: [ye, o],
tabindex: P
}), [k(b, {
icon: f,
primaryColor: we,
secondaryColor: xe,
style: he
}, null), k(vr, null, null)]);
};
y.props = {
spin: Boolean,
rotate: Number,
icon: Object,
twoToneColor: [String, Array]
};
y.displayName = "AntdIcon";
y.inheritAttrs = !1;
y.getTwoToneColor = mr;
y.setTwoToneColor = me;
var kr = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function ie(e) {
for (var n = 1; n < arguments.length; n++) {
var r = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(r);
typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(r).filter(function(a) {
return Object.getOwnPropertyDescriptor(r, a).enumerable;
}))), t.forEach(function(a) {
Ar(e, a, r[a]);
});
}
return e;
}
function Ar(e, n, r) {
return n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
}
var ve = function(n, r) {
var t = ie({}, n, r.attrs);
return k(y, ie({}, t, {
icon: kr
}), null);
};
ve.displayName = "QuestionCircleOutlined";
ve.inheritAttrs = !1;
export {
y as I,
ve as Q
};