epic-designer-cjh
Version:
基于vue3的设计器,可视化开发页面表单
607 lines (606 loc) • 23.4 kB
JavaScript
import { c as V, g as ft } from "./_commonjsHelpers-c5d32002.js";
var ct = { exports: {} };
(function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
var O = 1e3, v = 6e4, $ = 36e5, k = "millisecond", p = "second", c = "minute", M = "hour", d = "day", C = "week", i = "month", m = "quarter", L = "year", U = "date", u = "Invalid Date", h = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
var e = ["th", "st", "nd", "rd"], t = a % 100;
return "[" + a + (e[(t - 20) % 10] || e[t] || e[0]) + "]";
} }, b = function(a, e, t) {
var n = String(a);
return !n || n.length >= e ? a : "" + Array(e + 1 - n.length).join(t) + a;
}, F = { s: b, z: function(a) {
var e = -a.utcOffset(), t = Math.abs(e), n = Math.floor(t / 60), r = t % 60;
return (e <= 0 ? "+" : "-") + b(n, 2, "0") + ":" + b(r, 2, "0");
}, m: function a(e, t) {
if (e.date() < t.date())
return -a(t, e);
var n = 12 * (t.year() - e.year()) + (t.month() - e.month()), r = e.clone().add(n, i), o = t - r < 0, s = e.clone().add(n + (o ? -1 : 1), i);
return +(-(n + (t - r) / (o ? r - s : s - r)) || 0);
}, a: function(a) {
return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
}, p: function(a) {
return { M: i, y: L, w: C, d, D: U, h: M, m: c, s: p, ms: k, Q: m }[a] || String(a || "").toLowerCase().replace(/s$/, "");
}, u: function(a) {
return a === void 0;
} }, T = "en", W = {};
W[T] = g;
var Z = function(a) {
return a instanceof _;
}, H = function a(e, t, n) {
var r;
if (!e)
return T;
if (typeof e == "string") {
var o = e.toLowerCase();
W[o] && (r = o), t && (W[o] = t, r = o);
var s = e.split("-");
if (!r && s.length > 1)
return a(s[0]);
} else {
var l = e.name;
W[l] = e, r = l;
}
return !n && r && (T = r), r || !n && T;
}, w = function(a, e) {
if (Z(a))
return a.clone();
var t = typeof e == "object" ? e : {};
return t.date = a, t.args = arguments, new _(t);
}, f = F;
f.l = H, f.i = Z, f.w = function(a, e) {
return w(a, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset });
};
var _ = function() {
function a(t) {
this.$L = H(t.locale, null, !0), this.parse(t);
}
var e = a.prototype;
return e.parse = function(t) {
this.$d = function(n) {
var r = n.date, o = n.utc;
if (r === null)
return /* @__PURE__ */ new Date(NaN);
if (f.u(r))
return /* @__PURE__ */ new Date();
if (r instanceof Date)
return new Date(r);
if (typeof r == "string" && !/Z$/i.test(r)) {
var s = r.match(h);
if (s) {
var l = s[2] - 1 || 0, y = (s[7] || "0").substring(0, 3);
return o ? new Date(Date.UTC(s[1], l, s[3] || 1, s[4] || 0, s[5] || 0, s[6] || 0, y)) : new Date(s[1], l, s[3] || 1, s[4] || 0, s[5] || 0, s[6] || 0, y);
}
}
return new Date(r);
}(t), this.$x = t.x || {}, this.init();
}, e.init = function() {
var t = this.$d;
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
}, e.$utils = function() {
return f;
}, e.isValid = function() {
return this.$d.toString() !== u;
}, e.isSame = function(t, n) {
var r = w(t);
return this.startOf(n) <= r && r <= this.endOf(n);
}, e.isAfter = function(t, n) {
return w(t) < this.startOf(n);
}, e.isBefore = function(t, n) {
return this.endOf(n) < w(t);
}, e.$g = function(t, n, r) {
return f.u(t) ? this[n] : this.set(r, t);
}, e.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, e.valueOf = function() {
return this.$d.getTime();
}, e.startOf = function(t, n) {
var r = this, o = !!f.u(n) || n, s = f.p(t), l = function(j, x) {
var q = f.w(r.$u ? Date.UTC(r.$y, x, j) : new Date(r.$y, x, j), r);
return o ? q : q.endOf(d);
}, y = function(j, x) {
return f.w(r.toDate()[j].apply(r.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), r);
}, S = this.$W, Y = this.$M, z = this.$D, P = "set" + (this.$u ? "UTC" : "");
switch (s) {
case L:
return o ? l(1, 0) : l(31, 11);
case i:
return o ? l(1, Y) : l(0, Y + 1);
case C:
var I = this.$locale().weekStart || 0, E = (S < I ? S + 7 : S) - I;
return l(o ? z - E : z + (6 - E), Y);
case d:
case U:
return y(P + "Hours", 0);
case M:
return y(P + "Minutes", 1);
case c:
return y(P + "Seconds", 2);
case p:
return y(P + "Milliseconds", 3);
default:
return this.clone();
}
}, e.endOf = function(t) {
return this.startOf(t, !1);
}, e.$set = function(t, n) {
var r, o = f.p(t), s = "set" + (this.$u ? "UTC" : ""), l = (r = {}, r[d] = s + "Date", r[U] = s + "Date", r[i] = s + "Month", r[L] = s + "FullYear", r[M] = s + "Hours", r[c] = s + "Minutes", r[p] = s + "Seconds", r[k] = s + "Milliseconds", r)[o], y = o === d ? this.$D + (n - this.$W) : n;
if (o === i || o === L) {
var S = this.clone().set(U, 1);
S.$d[l](y), S.init(), this.$d = S.set(U, Math.min(this.$D, S.daysInMonth())).$d;
} else
l && this.$d[l](y);
return this.init(), this;
}, e.set = function(t, n) {
return this.clone().$set(t, n);
}, e.get = function(t) {
return this[f.p(t)]();
}, e.add = function(t, n) {
var r, o = this;
t = Number(t);
var s = f.p(n), l = function(Y) {
var z = w(o);
return f.w(z.date(z.date() + Math.round(Y * t)), o);
};
if (s === i)
return this.set(i, this.$M + t);
if (s === L)
return this.set(L, this.$y + t);
if (s === d)
return l(1);
if (s === C)
return l(7);
var y = (r = {}, r[c] = v, r[M] = $, r[p] = O, r)[s] || 1, S = this.$d.getTime() + t * y;
return f.w(S, this);
}, e.subtract = function(t, n) {
return this.add(-1 * t, n);
}, e.format = function(t) {
var n = this, r = this.$locale();
if (!this.isValid())
return r.invalidDate || u;
var o = t || "YYYY-MM-DDTHH:mm:ssZ", s = f.z(this), l = this.$H, y = this.$m, S = this.$M, Y = r.weekdays, z = r.months, P = r.meridiem, I = function(x, q, N, R) {
return x && (x[q] || x(n, o)) || N[q].slice(0, R);
}, E = function(x) {
return f.s(l % 12 || 12, x, "0");
}, j = P || function(x, q, N) {
var R = x < 12 ? "AM" : "PM";
return N ? R.toLowerCase() : R;
};
return o.replace(D, function(x, q) {
return q || function(N) {
switch (N) {
case "YY":
return String(n.$y).slice(-2);
case "YYYY":
return f.s(n.$y, 4, "0");
case "M":
return S + 1;
case "MM":
return f.s(S + 1, 2, "0");
case "MMM":
return I(r.monthsShort, S, z, 3);
case "MMMM":
return I(z, S);
case "D":
return n.$D;
case "DD":
return f.s(n.$D, 2, "0");
case "d":
return String(n.$W);
case "dd":
return I(r.weekdaysMin, n.$W, Y, 2);
case "ddd":
return I(r.weekdaysShort, n.$W, Y, 3);
case "dddd":
return Y[n.$W];
case "H":
return String(l);
case "HH":
return f.s(l, 2, "0");
case "h":
return E(1);
case "hh":
return E(2);
case "a":
return j(l, y, !0);
case "A":
return j(l, y, !1);
case "m":
return String(y);
case "mm":
return f.s(y, 2, "0");
case "s":
return String(n.$s);
case "ss":
return f.s(n.$s, 2, "0");
case "SSS":
return f.s(n.$ms, 3, "0");
case "Z":
return s;
}
return null;
}(x) || s.replace(":", "");
});
}, e.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, e.diff = function(t, n, r) {
var o, s = this, l = f.p(n), y = w(t), S = (y.utcOffset() - this.utcOffset()) * v, Y = this - y, z = function() {
return f.m(s, y);
};
switch (l) {
case L:
o = z() / 12;
break;
case i:
o = z();
break;
case m:
o = z() / 3;
break;
case C:
o = (Y - S) / 6048e5;
break;
case d:
o = (Y - S) / 864e5;
break;
case M:
o = Y / $;
break;
case c:
o = Y / v;
break;
case p:
o = Y / O;
break;
default:
o = Y;
}
return r ? o : f.a(o);
}, e.daysInMonth = function() {
return this.endOf(i).$D;
}, e.$locale = function() {
return W[this.$L];
}, e.locale = function(t, n) {
if (!t)
return this.$L;
var r = this.clone(), o = H(t, n, !0);
return o && (r.$L = o), r;
}, e.clone = function() {
return f.w(this.$d, this);
}, e.toDate = function() {
return new Date(this.valueOf());
}, e.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, e.toISOString = function() {
return this.$d.toISOString();
}, e.toString = function() {
return this.$d.toUTCString();
}, a;
}(), A = _.prototype;
return w.prototype = A, [["$ms", k], ["$s", p], ["$m", c], ["$H", M], ["$W", d], ["$M", i], ["$y", L], ["$D", U]].forEach(function(a) {
A[a[1]] = function(e) {
return this.$g(e, a[0], a[1]);
};
}), w.extend = function(a, e) {
return a.$i || (a(e, _, w), a.$i = !0), w;
}, w.locale = H, w.isDayjs = Z, w.unix = function(a) {
return w(1e3 * a);
}, w.en = W[T], w.Ls = W, w.p = {}, w;
});
})(ct);
var ht = ct.exports;
const mt = /* @__PURE__ */ ft(ht);
var K = { exports: {} }, it;
function $t() {
return it || (it = 1, function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
var O = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, v = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, $ = /\d\d/, k = /\d\d?/, p = /\d*[^-_:/,()\s\d]+/, c = {}, M = function(u) {
return (u = +u) + (u > 68 ? 1900 : 2e3);
}, d = function(u) {
return function(h) {
this[u] = +h;
};
}, C = [/[+-]\d\d:?(\d\d)?|Z/, function(u) {
(this.zone || (this.zone = {})).offset = function(h) {
if (!h || h === "Z")
return 0;
var D = h.match(/([+-]|\d\d)/g), g = 60 * D[1] + (+D[2] || 0);
return g === 0 ? 0 : D[0] === "+" ? -g : g;
}(u);
}], i = function(u) {
var h = c[u];
return h && (h.indexOf ? h : h.s.concat(h.f));
}, m = function(u, h) {
var D, g = c.meridiem;
if (g) {
for (var b = 1; b <= 24; b += 1)
if (u.indexOf(g(b, 0, h)) > -1) {
D = b > 12;
break;
}
} else
D = u === (h ? "pm" : "PM");
return D;
}, L = { A: [p, function(u) {
this.afternoon = m(u, !1);
}], a: [p, function(u) {
this.afternoon = m(u, !0);
}], S: [/\d/, function(u) {
this.milliseconds = 100 * +u;
}], SS: [$, function(u) {
this.milliseconds = 10 * +u;
}], SSS: [/\d{3}/, function(u) {
this.milliseconds = +u;
}], s: [k, d("seconds")], ss: [k, d("seconds")], m: [k, d("minutes")], mm: [k, d("minutes")], H: [k, d("hours")], h: [k, d("hours")], HH: [k, d("hours")], hh: [k, d("hours")], D: [k, d("day")], DD: [$, d("day")], Do: [p, function(u) {
var h = c.ordinal, D = u.match(/\d+/);
if (this.day = D[0], h)
for (var g = 1; g <= 31; g += 1)
h(g).replace(/\[|\]/g, "") === u && (this.day = g);
}], M: [k, d("month")], MM: [$, d("month")], MMM: [p, function(u) {
var h = i("months"), D = (i("monthsShort") || h.map(function(g) {
return g.slice(0, 3);
})).indexOf(u) + 1;
if (D < 1)
throw new Error();
this.month = D % 12 || D;
}], MMMM: [p, function(u) {
var h = i("months").indexOf(u) + 1;
if (h < 1)
throw new Error();
this.month = h % 12 || h;
}], Y: [/[+-]?\d+/, d("year")], YY: [$, function(u) {
this.year = M(u);
}], YYYY: [/\d{4}/, d("year")], Z: C, ZZ: C };
function U(u) {
var h, D;
h = u, D = c && c.formats;
for (var g = (u = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(w, f, _) {
var A = _ && _.toUpperCase();
return f || D[_] || O[_] || D[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(a, e, t) {
return e || t.slice(1);
});
})).match(v), b = g.length, F = 0; F < b; F += 1) {
var T = g[F], W = L[T], Z = W && W[0], H = W && W[1];
g[F] = H ? { regex: Z, parser: H } : T.replace(/^\[|\]$/g, "");
}
return function(w) {
for (var f = {}, _ = 0, A = 0; _ < b; _ += 1) {
var a = g[_];
if (typeof a == "string")
A += a.length;
else {
var e = a.regex, t = a.parser, n = w.slice(A), r = e.exec(n)[0];
t.call(f, r), w = w.replace(r, "");
}
}
return function(o) {
var s = o.afternoon;
if (s !== void 0) {
var l = o.hours;
s ? l < 12 && (o.hours += 12) : l === 12 && (o.hours = 0), delete o.afternoon;
}
}(f), f;
};
}
return function(u, h, D) {
D.p.customParseFormat = !0, u && u.parseTwoDigitYear && (M = u.parseTwoDigitYear);
var g = h.prototype, b = g.parse;
g.parse = function(F) {
var T = F.date, W = F.utc, Z = F.args;
this.$u = W;
var H = Z[1];
if (typeof H == "string") {
var w = Z[2] === !0, f = Z[3] === !0, _ = w || f, A = Z[2];
f && (A = Z[2]), c = this.$locale(), !w && A && (c = D.Ls[A]), this.$d = function(n, r, o) {
try {
if (["x", "X"].indexOf(r) > -1)
return new Date((r === "X" ? 1e3 : 1) * n);
var s = U(r)(n), l = s.year, y = s.month, S = s.day, Y = s.hours, z = s.minutes, P = s.seconds, I = s.milliseconds, E = s.zone, j = /* @__PURE__ */ new Date(), x = S || (l || y ? 1 : j.getDate()), q = l || j.getFullYear(), N = 0;
l && !y || (N = y > 0 ? y - 1 : j.getMonth());
var R = Y || 0, X = z || 0, Q = P || 0, B = I || 0;
return E ? new Date(Date.UTC(q, N, x, R, X, Q, B + 60 * E.offset * 1e3)) : o ? new Date(Date.UTC(q, N, x, R, X, Q, B)) : new Date(q, N, x, R, X, Q, B);
} catch {
return /* @__PURE__ */ new Date("");
}
}(T, H, W), this.init(), A && A !== !0 && (this.$L = this.locale(A).$L), _ && T != this.format(H) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
} else if (H instanceof Array)
for (var a = H.length, e = 1; e <= a; e += 1) {
Z[1] = H[e - 1];
var t = D.apply(this, Z);
if (t.isValid()) {
this.$d = t.$d, this.$L = t.$L, this.init();
break;
}
e === a && (this.$d = /* @__PURE__ */ new Date(""));
}
else
b.call(this, F);
};
};
});
}(K)), K.exports;
}
var tt = { exports: {} }, st;
function Mt() {
return st || (st = 1, function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
return function(O, v, $) {
var k = v.prototype, p = function(i) {
return i && (i.indexOf ? i : i.s);
}, c = function(i, m, L, U, u) {
var h = i.name ? i : i.$locale(), D = p(h[m]), g = p(h[L]), b = D || g.map(function(T) {
return T.slice(0, U);
});
if (!u)
return b;
var F = h.weekStart;
return b.map(function(T, W) {
return b[(W + (F || 0)) % 7];
});
}, M = function() {
return $.Ls[$.locale()];
}, d = function(i, m) {
return i.formats[m] || function(L) {
return L.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(U, u, h) {
return u || h.slice(1);
});
}(i.formats[m.toUpperCase()]);
}, C = function() {
var i = this;
return { months: function(m) {
return m ? m.format("MMMM") : c(i, "months");
}, monthsShort: function(m) {
return m ? m.format("MMM") : c(i, "monthsShort", "months", 3);
}, firstDayOfWeek: function() {
return i.$locale().weekStart || 0;
}, weekdays: function(m) {
return m ? m.format("dddd") : c(i, "weekdays");
}, weekdaysMin: function(m) {
return m ? m.format("dd") : c(i, "weekdaysMin", "weekdays", 2);
}, weekdaysShort: function(m) {
return m ? m.format("ddd") : c(i, "weekdaysShort", "weekdays", 3);
}, longDateFormat: function(m) {
return d(i.$locale(), m);
}, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
};
k.localeData = function() {
return C.bind(this)();
}, $.localeData = function() {
var i = M();
return { firstDayOfWeek: function() {
return i.weekStart || 0;
}, weekdays: function() {
return $.weekdays();
}, weekdaysShort: function() {
return $.weekdaysShort();
}, weekdaysMin: function() {
return $.weekdaysMin();
}, months: function() {
return $.months();
}, monthsShort: function() {
return $.monthsShort();
}, longDateFormat: function(m) {
return d(i, m);
}, meridiem: i.meridiem, ordinal: i.ordinal };
}, $.months = function() {
return c(M(), "months");
}, $.monthsShort = function() {
return c(M(), "monthsShort", "months", 3);
}, $.weekdays = function(i) {
return c(M(), "weekdays", null, null, i);
}, $.weekdaysShort = function(i) {
return c(M(), "weekdaysShort", "weekdays", 3, i);
}, $.weekdaysMin = function(i) {
return c(M(), "weekdaysMin", "weekdays", 2, i);
};
};
});
}(tt)), tt.exports;
}
var et = { exports: {} }, at;
function vt() {
return at || (at = 1, function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
return function(O, v) {
var $ = v.prototype, k = $.format;
$.format = function(p) {
var c = this, M = this.$locale();
if (!this.isValid())
return k.bind(this)(p);
var d = this.$utils(), C = (p || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(i) {
switch (i) {
case "Q":
return Math.ceil((c.$M + 1) / 3);
case "Do":
return M.ordinal(c.$D);
case "gggg":
return c.weekYear();
case "GGGG":
return c.isoWeekYear();
case "wo":
return M.ordinal(c.week(), "W");
case "w":
case "ww":
return d.s(c.week(), i === "w" ? 1 : 2, "0");
case "W":
case "WW":
return d.s(c.isoWeek(), i === "W" ? 1 : 2, "0");
case "k":
case "kk":
return d.s(String(c.$H === 0 ? 24 : c.$H), i === "k" ? 1 : 2, "0");
case "X":
return Math.floor(c.$d.getTime() / 1e3);
case "x":
return c.$d.getTime();
case "z":
return "[" + c.offsetName() + "]";
case "zzz":
return "[" + c.offsetName("long") + "]";
default:
return i;
}
});
return k.bind(this)(C);
};
};
});
}(et)), et.exports;
}
var rt = { exports: {} }, ot;
function pt() {
return ot || (ot = 1, function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
var O = "week", v = "year";
return function($, k, p) {
var c = k.prototype;
c.week = function(M) {
if (M === void 0 && (M = null), M !== null)
return this.add(7 * (M - this.week()), "day");
var d = this.$locale().yearStart || 1;
if (this.month() === 11 && this.date() > 25) {
var C = p(this).startOf(v).add(1, v).date(d), i = p(this).endOf(O);
if (C.isBefore(i))
return 1;
}
var m = p(this).startOf(v).date(d).startOf(O).subtract(1, "millisecond"), L = this.diff(m, O, !0);
return L < 0 ? p(this).startOf("week").week() : Math.ceil(L);
}, c.weeks = function(M) {
return M === void 0 && (M = null), this.week(M);
};
};
});
}(rt)), rt.exports;
}
var nt = { exports: {} }, ut;
function wt() {
return ut || (ut = 1, function(G, J) {
(function(O, v) {
G.exports = v();
})(V, function() {
return function(O, v) {
v.prototype.weekYear = function() {
var $ = this.month(), k = this.week(), p = this.year();
return k === 1 && $ === 11 ? p + 1 : $ === 0 && k >= 52 ? p - 1 : p;
};
};
});
}(nt)), nt.exports;
}
export {
pt as a,
wt as b,
vt as c,
ht as d,
$t as e,
mt as f,
Mt as r
};