From 5086c34025f0f94ba748c718193fef3859662097 Mon Sep 17 00:00:00 2001 From: what Date: Mon, 15 Sep 2025 09:03:22 +0800 Subject: [PATCH] v0.5.5 --- dist/button.js | 2 +- dist/common/main-CDGdxjIv.js | 1071 +++++++++++++++++++++ dist/common/main-iMRzW1Jg.js | 1068 --------------------- dist/common/vender-C0IfHU5B.js | 1486 ----------------------------- dist/common/vender-CtjyT19B.js | 1608 ++++++++++++++++++++++++++++++++ dist/components.js | 2 +- dist/container.js | 2 +- dist/data-converter.js | 2 +- dist/data-list.js | 6 +- dist/data-list/utils.js | 2 +- dist/grid-layout-form.js | 2 +- dist/grid-layout-form/utils.js | 2 +- dist/grid-layout.js | 2 +- dist/grid-layout/utils.js | 2 +- dist/hooks.js | 6 +- dist/iconfont.js | 2 +- dist/index.js | 2 +- dist/pages.js | 2 +- dist/res-ws.js | 2 +- dist/style.css | 2 +- dist/utils.js | 18 +- package.json | 2 +- 22 files changed, 2710 insertions(+), 2583 deletions(-) create mode 100644 dist/common/main-CDGdxjIv.js delete mode 100644 dist/common/main-iMRzW1Jg.js delete mode 100644 dist/common/vender-C0IfHU5B.js create mode 100644 dist/common/vender-CtjyT19B.js diff --git a/dist/button.js b/dist/button.js index b7188bd..29163e6 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { a9 as s, a8 as u, aa as e } from "./common/main-iMRzW1Jg.js"; +import { aa as s, a9 as u, ab as e } from "./common/main-CDGdxjIv.js"; export { s as auth, u as default, diff --git a/dist/common/main-CDGdxjIv.js b/dist/common/main-CDGdxjIv.js new file mode 100644 index 0000000..caca7ca --- /dev/null +++ b/dist/common/main-CDGdxjIv.js @@ -0,0 +1,1071 @@ +var Oi = Object.defineProperty; +var Lt = (e) => { + throw TypeError(e); +}; +var ji = (e, t, i) => t in e ? Oi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; +var v = (e, t, i) => ji(e, typeof t != "symbol" ? t + "" : t, i), At = (e, t, i) => t.has(e) || Lt("Cannot " + i); +var y = (e, t, i) => (At(e, t, "read from private field"), i ? i.call(e) : t.get(e)), O = (e, t, i) => t.has(e) ? Lt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), H = (e, t, i, n) => (At(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); +var Vt = (e, t, i, n) => ({ + set _(r) { + H(e, t, r, i); + }, + get _() { + return y(e, t, n); + } +}); +import { jsx as p, jsxs as j } from "react/jsx-runtime"; +import x, { useEffect as A, useState as E, useCallback as X, useMemo as U, useRef as W, useContext as ce, useId as Ze, isValidElement as Li, useLayoutEffect as Ai } from "react"; +import w from "prop-types"; +import M from "classnames"; +import * as It from "react-is"; +import { useNotification as Vi } from "rc-notification"; +import d from "lodash"; +import te, { FieldContext as Yt, Field as Xt } from "rc-field-form"; +import { M as Ge, N as je, a as Le, P as mt, S as Ii } from "./vender-CtjyT19B.js"; +import Qt from "immutability-helper"; +import { Form as Xe, Input as Mi, Button as et, Pagination as zi, Tree as Bi, Breadcrumb as Di, Table as qi, Empty as Wi, Popconfirm as Ui, Tooltip as Hi, Popover as Ji } from "antd"; +import { useMergedState as Ki } from "rc-util"; +import { generatePath as _i, useInRouterContext as Zt, useParams as Gi, useLocation as Yi, createBrowserRouter as Xi, Navigate as Qi } from "react-router-dom"; +import "rc-util/lib/hooks/useMergedState"; +import Zi from "rc-drawer"; +import en from "rc-dialog"; +var Ne, Ie, Re, ue, Se, ve; +class ei { + constructor(t, i) { + O(this, Ne, /* @__PURE__ */ new Map()); + O(this, Ie, !0); + O(this, Re, []); + O(this, ue); + O(this, Se, () => y(this, ue)); + O(this, ve, () => Promise.resolve()); + v(this, "get", (...t) => new Promise((i, n) => { + const r = JSON.stringify(t); + if (y(this, Ne).has(r)) return i(y(this, ve).call(this, y(this, ue), ...t)); + if (y(this, ue) === void 0) y(this, Re).push([t, i, n]), y(this, Ie) && (H(this, Ie, !1), Promise.resolve(typeof y(this, Se) == "function" ? y(this, Se).call(this) : y(this, Se)).then((a) => H(this, ue, a || null)).finally(() => { + y(this, Re).forEach(([a, o, s]) => { + try { + const l = y(this, ve).call(this, y(this, ue), ...a); + y(this, Ne).set(JSON.stringify(a), l), o(l); + } catch (l) { + s(l); + } + }), y(this, Re).length = 0; + })); + else { + const a = y(this, ve).call(this, y(this, ue), ...t); + y(this, Ne).set(r, a), i(a); + } + })); + H(this, ve, i), H(this, Se, t); + } +} +Ne = new WeakMap(), Ie = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Se = new WeakMap(), ve = new WeakMap(); +const gr = () => p("div", { children: "Empty" }), We = x.createContext({ ele: {}, mount: () => { +}, unmount: () => { +} }), G = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => { + const { mount: l, unmount: u } = x.useContext(We); + return G.Action({ children: n }), G.Title({ children: r }), G.SubTitle({ children: a }), G.Extra({ children: o }), A(() => (l("rootClassName", e), () => u(e)), [e]), p("div", { className: M("ff-container", t), style: s, children: i }); +}, Ye = (e) => ({ children: t, className: i }) => { + const { mount: n, unmount: r } = x.useContext(We); + return A(() => (t && n(e, x.createElement("div", { key: `ff-${e}`, className: M(`ff-popup-${e}`, i) }, t)), () => r(e)), [i, t]), null; +}; +G.Action = Ye("actions"), G.Title = Ye("title"), G.SubTitle = Ye("sub-title"), G.Extra = Ye("extras"), G.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; +const pr = () => p(G, { className: "ff-loading", children: j("div", { className: "loader", children: [j("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), j("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), j("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), j("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] })] }) }), mr = () => p("div", { children: "NotFound" }), ti = ({ children: e }) => { + const [t, i] = E({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); + return typeof (e == null ? void 0 : e.type) == "string" ? e : p(We.Provider, { value: { ele: t, mount: n, unmount: r }, children: x.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); +}; +ti.propTypes = { children: w.element.isRequired }; +const Mt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, $t = ({ type: e, props: t }) => p("i", { ...t, children: p("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Mt[e] || Mt.info).map((i, n) => p("path", { d: i }, n)) }) }), ii = ({ className: e, content: t, icon: i, $close: n }) => j(x.Fragment, { children: [i && p("div", { className: M("ff-notification-icon", e), children: p($t, { type: i }) }), t] }), tn = ({}) => p(G, { children: "Confirm" }); +var pe, Fe; +const ne = class ne { + constructor() { + O(this, Fe, /* @__PURE__ */ new Map()); + v(this, "init", (t) => H(this, Fe, new Map(t))); + v(this, "check", (t) => !y(this, Fe).has(t) || y(this, Fe).get(t)); + if (y(ne, pe)) return y(ne, pe); + } +}; +pe = new WeakMap(), Fe = new WeakMap(), O(ne, pe, null), v(ne, "getInstance", () => (y(ne, pe) || H(ne, pe, new ne()), y(ne, pe))); +let ht = ne; +const nn = ht.getInstance(), rn = (e, t, i = "children") => { + if (d.isEmpty(e)) return {}; + const n = d.find(e, ["value", t]); + if (!d.isEmpty(n)) return n; + const r = e.length; + for (let a = 0; a < r; a++) { + const { [i]: o } = e[a], s = rn(o, t, i); + if (!d.isEmpty(s)) return s; + } + return {}; +}, ni = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`; +var me, Me; +const re = class re { + constructor() { + O(this, Me, null); + v(this, "init", (t) => H(this, Me, t)); + v(this, "get", (t, i) => d.get(y(this, Me), t, i)); + if (y(re, me)) return y(re, me); + } +}; +me = new WeakMap(), Me = new WeakMap(), O(re, me, null), v(re, "getInstance", () => (y(re, me) || H(re, me, new re()), y(re, me))); +let ft = re; +const Ae = ft.getInstance(), zt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { + switch (`${e}`.toLowerCase()) { + case "0": + case "false": + case "[]": + case "{}": + return !1; + } + return !!e; +}, string2string: (e) => e, json2json: (e) => e, json2array: (e) => e ? Object.values(e) : [], json2number: (e) => Object.keys(e).length, json2integer: (e) => Object.keys(e).length, json2float: (e) => Object.keys(e).length, json2bool: (e) => Object.keys(e).length > 0, json2string: (e) => e ? JSON.stringify(e) : "", array2json: (e) => ({ ...e }), array2array: (e) => e, array2number: (e) => e.length, array2integer: (e) => e.length, array2float: (e) => e.length, array2bool: (e) => e.length > 0, array2string: (e) => JSON.stringify(e), number2json: (e) => ({}), number2array: (e) => [e], number2number: (e) => e, number2integer: (e) => e, number2float: (e) => e, number2bool: (e) => !!e, number2string: (e) => e.toString(), boolean2json: (e) => ({}), boolean2array: (e) => [], boolean2number: (e) => +e, boolean2integer: (e) => +e, boolean2float: (e) => +e, boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }, ee = (e, t) => { + let i = "string"; + i = Array.isArray(e) ? "array" : typeof e, d.isObject(e) && (i = "json"); + const n = `${i}2${t}`; + return Reflect.has(zt, n) ? zt[n](e) : e; +}, Ue = (e = {}, t = {}, i = {}, n = "") => ri(e, (r, a) => a === "type" && r === "code") ? ai(e, t, i, n) : si(e, t, n), ri = (e, t = () => !1) => d.some(e, (i) => !!d.some(i, t) || (d.isEmpty(i) || !d.isPlainObject(i) && !d.isArray(i) ? void 0 : ri(i, t))), ai = async (e = {}, t = {}, i = {}, n = "") => { + let r = /* @__PURE__ */ Object.create(null); + for (let a in e) { + let o; + if (Reflect.has(e[a], "type") && ["code", "field", "router", "query", "string"].includes(e[a].type)) { + const { type: s, value: l = "", default: u = n } = e[a]; + switch (s) { + case "code": + o = await xe.exec(l, t, i); + break; + case "field": + o = d.get(t, l) ?? d.get(t, l.substring(l.indexOf(".") + 1)); + break; + case "router": + case "query": + o = ke.getPageParams(l); + break; + case "string": + o = l; + } + o ?? (o = u); + } else o = await ai(e[a], t, i, n); + d.set(r, a, o); + } + return r; +}, si = (e = {}, t = {}, i = "") => Object.keys(e || {}).reduce((n, r) => { + if (d.isPlainObject(e[r])) { + let a; + if (Reflect.has(e[r], "type") && ["field", "router", "query", "string"].includes(e[r].type)) { + const { type: o, value: s = "", default: l = i } = e[r]; + switch (o) { + case "field": + a = d.get(t, s) ?? d.get(t, s.substring(s.indexOf(".") + 1)); + break; + case "router": + case "query": + a = ke.getPageParams(s); + break; + case "string": + a = s; + } + a ?? (a = l); + } else a = si(e[r], t, i); + d.set(n, r, a); + } + return n; +}, {}), ut = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((i) => ut(i, t)) : Object.keys(e).reduce((i, n) => (t[n] ? i[t[n]] = ut(e[n], t) : i[n] = ut(e[n], t), i), {}) : e, hr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { + const t = 16 * Math.random() | 0; + return (e === "x" ? t : 3 & t | 8).toString(16); +}), fr = (e) => { + var t, i; + return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){3}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.name : ""; +}, yr = (e) => { + var t, i; + return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){2}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.category : ""; +}, wr = (e) => { + var t, i; + return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){1}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.owner : ""; +}, oi = () => K.$index++, an = (e, t = 32, i = "auto") => { + const n = yt(e), r = i === "auto" ? "x64" : i; + if (t === 32) return r === "x64" ? Ge.x64.hash32(n).toString() : Ge.x86.hash32(n).toString(); + if (t === 128) return r === "x64" ? Ge.x64.hash128(n) : Ge.x86.hash128(n); + throw new Error("bits 只能是 32 或 128"); +}, yt = (e) => e == null ? "null" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : Array.isArray(e) ? "[" + e.map(yt).join(",") + "]" : typeof e == "object" ? "{" + Object.keys(e).sort().map((t) => `${t}:${yt(e[t])}`).join(",") + "}" : String(e); +var it, ze, Be, nt; +const rt = class rt { + constructor(...t) { + O(this, ze, []); + O(this, Be, (t) => { + var i; + for (let n of t) Array.isArray(n[0]) ? y(this, Be).call(this, n) : y(this, ze).push(y(i = rt, it).call(i, n[0], n[1])); + }); + v(this, "toValue", async (t, i = null) => { + const n = { getValue: () => t, getRecord: () => i }; + return await y(this, ze).reduce(async (r, a) => { + try { + const o = await r; + return (await a).call(n, o); + } catch (o) { + return console.error(o), r; + } + }, t); + }); + v(this, "toRender", (t, i, n = null) => x.createElement(y(this, nt), { value: t, record: i }, n)); + O(this, nt, ({ value: t, record: i, children: n }) => { + const [r, a] = E(n); + return lt(() => { + let o = !1; + return a(n), this.toValue(t, i).then((s) => ee(s, "string")).then((s) => !o && a(s)).catch((s) => !o && a(`${s}`)), () => o = !0; + }, [t, i]), r; + }); + y(this, Be).call(this, t); + } +}; +it = new WeakMap(), ze = new WeakMap(), Be = new WeakMap(), nt = new WeakMap(), O(rt, it, d.memoize((t, i) => le.getWidgetComponent(t).then((n) => { + var r; + return ((r = n.default) == null ? void 0 : r.call(n, i)) || ((a) => a); +}), (t, i) => `${t}::${ee(i, "string")}`)); +let tt = rt; +const sn = (e, t = {}) => U(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new tt([i, n]).toRender(o, s, "-") } : r), [e, t]), br = (e) => { + const [t, i] = E({}); + return A(() => { + let n = !1; + return e && L.get(`/api/_/${e}`).then((r) => d.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0; + }, [e]), t; +}, Cr = (e, t = {}) => { + const [i, n] = E({ dataSource: [] }); + return He(() => { + let r = !1; + return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((a) => !r && n(a)), () => r = !0; + }, [e, t]), i; +}, li = (e = [], t = /* @__PURE__ */ new Map(), i = "id", n) => { + const r = X(n ? (a) => d.get(a, i, d.get(a, [n, i])) : (a) => d.get(a, i), [i, n]); + return X((a) => e == null ? void 0 : e.filter((o) => !o.uuid || !t.has(o.uuid) || t.get(o.uuid).some((s) => s == r(a))), [e, t, r]); +}, wt = (e = [], t = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { + const a = X(r ? (o) => d.get(o, n, d.get(o, [r, n])) : (o) => d.get(o, n), [n, r]); + return U(() => { + if (d.isEmpty(e) || !e.some(({ uuid: s }) => nn.check(s))) return !1; + if (d.isEmpty(t) || d.isEmpty(i)) return !0; + const o = i.map((s) => a(s)); + return e.some(({ uuid: s }) => !s || !t.has(s) || t.get(s).some((l) => o.some((u) => u == l))); + }, [e, i, t, a]); +}, on = (e, t, i = "id", n = null) => { + const r = ot(), a = W(!1), o = W(e.dataSource), s = W(e.itemOperationsAccess); + return A(() => (o.current = e.dataSource, s.current = e.itemOperationsAccess, () => a.current = !1), [e.dataSource, e.itemOperationsAccess]), a.current && (e.dataSource = o.current, e.itemOperationsAccess = s.current), [e, (l = 0, u = null) => { + var c, g; + if (a.current = !1, l === 1) return (c = e.onReload) == null ? void 0 : c.call(e); + if (l === 2) { + const h = d.get(u, "__PARENT_ID__", ""), m = d.get(u, i, d.get(u, [n, i], "")), f = d.findIndex(o.current, ["__PARENT_ID__", h]), C = d.findIndex(f > -1 ? d.get(o.current, [f, "children"]) : o.current, [i, m]); + if (C === -1) return (g = e.onReload) == null ? void 0 : g.call(e); + Promise.all([L.get(`/api/${t}/detail/${m}`), L.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([b, k]) => { + const S = d.get(o.current, f > -1 ? [f, "children", C, "children"] : [C, "children"]); + o.current = Qt(o.current, f > -1 ? { [f]: { children: { $splice: [[C, 1, { ...b, children: S }]] } } } : { $splice: [[C, 1, { ...b, children: S }]] }); + const $ = new Map(k); + s.current.forEach((T, I) => { + var q; + (q = $.get(I)) != null && q.some((z) => z == m) || s.current.set(I, T.filter((z) => z !== m)); + }), $.forEach((T, I) => { + s.current.has(I) ? s.current.set(I, d.uniq([...s.current.get(I) || [], ...T])) : s.current.set(I, T); + }); + }).then(() => { + a.current = !0, r(); + }); + } + }]; +}, ln = (e, t) => { + const i = ot(), n = W(t), r = W(/* @__PURE__ */ new Map()), a = W([]), o = d.throttle((l) => { + a.current = [], L.list(e, d.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: u, condition: c, total: g, tab: h, sider: m, page: f, pageSize: C, operationsAccess: b, dataSource: k }) => { + n.current = { tab: h, condition: c, sider: m, keyword: u, total: g, pageSize: C, page: k != null && k.length ? f : 1 }, a.current = k, r.current = new Map(b), i(); + }); + }, 380, { leading: !1, trailing: !0 }); + lt(() => { + a.current = [], e && o(t); + }, [e, t]); + const s = U(() => d.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); + return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, u) => o({ page: l, pageSize: u }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, u) => o({ keyword: u, condition: Qt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o, payload: t == null ? void 0 : t.payload }); +}, cn = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: g, title: h, itemGridLayout: m, $setting: f, tabs: C, isConditionFormLayout: b, isTreeSider: k, treeSiderConfig: S }) => { + const { classNames: $, onClickCallback: T } = ce(ie), I = d.pick(f, ["column", "colWidth", "beforeRender", "afterRender", "style"]), q = li(l, u, g, c), z = X((V, R, B) => p(dn, { className: M("ff-data-list-framework-item", $.item), operations: a ? q(R) : [], data: c ? { [c]: R } : R, children: V, onClickCallback: T }), [c, g, a, T, l, u]); + return j("div", { className: M("ff-data-list-framework", t), children: [p(i.sider, { isTreeSider: k, ...S }), j("div", { className: M("ff-data-list-container", $ == null ? void 0 : $.container), children: [p(i.filter, { isConditionFormLayout: b }), p(i.toolbar, { title: h, tabs: C }), p(xn, { ...I, ...m, primaryKey: g, itemRender: z, dataSource: n }), p(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); +}, dn = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => j("div", { className: M("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && p("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => p("span", { className: "data-list-grid-layout-item-action", children: p(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Ze()) }, (a == null ? void 0 : a.uuid) || Ze())) })] }), un = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: g, title: h, tabs: m, isPaginate: f, isTreeSider: C, treeSiderConfig: b, isConditionFormLayout: k, ...S }) => { + const { classNames: $, onClickCallback: T } = ce(ie), I = li(l, u, g, c), q = wt(l, u, n, g, c); + return j("div", { className: M("ff-data-table-framework", t), children: [p(i.sider, { isTreeSider: C, ...b }), j("div", { className: M("ff-data-table-container", $ == null ? void 0 : $.container), children: [p(i.filter, { isConditionFormLayout: k }), p(i.toolbar, { title: h, tabs: m }), p(yn, { ...S, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (z) => { + var V; + return p("div", { className: "ff-data-table-actions", children: (V = I(z)) == null ? void 0 : V.map((R, B) => p(P.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: z, confirm: R.confirm, onAfterClick: (N) => N !== !1 && (T == null ? void 0 : T(R.isRefresh, z)) }, R.uuid || B)) }); + } : null }), p(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] }); +}, ie = x.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => { +}, onReload: () => { +}, onClickCallback: () => { +}, onConditionChange: () => { +}, onTabChange: () => { +}, onSiderChange: () => { +}, onKeywordChange: () => { +}, onPageChange: () => { +}, onPageSizeChange: () => { +} }), ci = (e, t, i, n, r = {}, a = 0) => { + const o = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; + return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = Bt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = Bt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), a && (o.height = `${a}px`), o; +}, Bt = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, kr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, di = ({ className: e, isConditionFormLayout: t }) => { + var h, m; + const [i, n] = E({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = x.useContext(ie), { keyword: u, condition: c } = (s == null ? void 0 : s()) || {}, [g] = Xe.useForm(); + return A(() => { + r && t && L.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: C, marginY: b, rowHeight: k, cols: S, fields: $ }) => { + n({ resource: f, itemMargin: [C, b], rowHeight: k, cols: S, fields: $ }); + }).catch(() => n({})); + }, [r, t]), A(() => { + g.setFieldsValue({ keyword: u, ...c }); + }, [JSON.stringify([u, c])]), p("div", { className: M("ff-data-list-filter", l.filter, e), children: p(Xe, { form: g, layout: "vertical", autoComplete: "off", onFinish: ((h = i.fields) == null ? void 0 : h.length) > 1 ? (f) => o({ [i.resource]: f[i.resource] }, f.keyword) : () => { + }, onValuesChange: (f) => { + d.isEmpty(d.omit(f, ["keyword"])) || g.submit(); + }, children: ((m = i.fields) == null ? void 0 : m.length) > 1 ? p(Nt, { ...i, children: p(gn, { onReset: () => { + const { keyword: f, condition: C } = s("init") || {}; + g.setFieldsValue({ keyword: f, ...C }); + } }) }) : p("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: p("div", { className: "grid-layout-item", style: ci(20, 0, 5, 2), children: p(Xe.Item, { name: ["keyword"], children: p(Mi.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (f) => a(f) }) }) }) }) }) }); +}, gn = ({ cols: e, fields: t, onReset: i }) => { + const [n, r] = E(!1), a = U(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); + return j(Xe.Item, { label: " ", style: { "--item-span": 5 }, className: M("ff-data-list-filter-actions", { expanded: n }), children: [p(et, { onClick: i, children: "重置" }), p(et, { type: "primary", htmlType: "submit", children: "查询" }), a && p(P.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); +}; +di.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; +const pn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) => { + const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = x.useContext(ie), { total: l, page: u, pageSize: c } = (s == null ? void 0 : s()) || {}; + return i && !d.isEmpty(t) || n ? j("div", { className: M("ff-data-list-footer", e), children: [p("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((g, h) => p(P, { uuid: g.uuid, type: g.type, name: g.name, widget: g.widget, widgetType: g.widgetType, widgetProps: g.widgetProps, widgetData: g.widgetData, widgetSetting: g.widgetSetting, widgetContainerProps: g.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (o == null ? void 0 : o(g.isRefresh, null)) }, g.uuid || h)) }), n && p(zi, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (g) => `第 ${u} 页 / 总共 ${g} 条`, onChange: r, onShowSizeChange: a })] }) : null; +}, mn = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: p("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], hn = ({ className: e, width: t = 280, isTreeSider: i }) => { + const { classNames: n } = ce(ie); + return i ? p(Bi.DirectoryTree, { className: M("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: mn }) : null; +}, fn = ({ className: e, title: t, tabs: i }) => { + const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = ce(ie), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Ki((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); + return j("div", { className: M("ff-data-list-toolbar", o.toolbar, e), children: [p("div", { className: "ff-data-list-title", children: t }), p(Di, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: g, value: h }) => p("span", { onClick: () => u(h ?? g), className: M("ff-data-list-tab", { active: (h ?? g) == l }), children: c }), items: i }), j("div", { className: "ff-data-list-actions", children: [p(P.Link, { icon: "icon-reload", widget: () => a() }), p(P.Link, { icon: "icon-setting" })] })] }); +}, ui = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: c, tab: g, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: b, sider: k, onSiderChange: S, layouts: $, classNames: T = {}, payload: I = {}, ...q }) => { + const [z, V] = E(), R = X((N, F) => { + const J = { tab: g, page: s, pageSize: u, keyword: m, sider: k, condition: C, total: o, payload: I }; + return N && N != "init" ? d.get(J, N, F) : J; + }, [JSON.stringify(C), JSON.stringify(I), g, s, u, m, k, o]), B = U(() => { + let N = { sider: hn, filter: di, footer: pn, toolbar: fn }; + $ === !1 ? N = { sider: null, filter: null, footer: null, toolbar: null } : d.isPlainObject($) && (N = Object.assign({}, N, $)); + for (const F in N) if (N[F]) { + if (Li(N[F])) { + const J = N[F]; + N[F] = (de) => x.cloneElement(J, de); + } + } else N[F] = () => p(x.Fragment, {}); + return N; + }, [$]); + return A(() => { + t ? le.getWidgetComponent(t).then((N) => { + if (!N) throw `${t} not found`; + return N; + }).catch((N) => ({ default: () => `${N}` })).then((N) => V(x.createElement(N.default, { ...q, layouts: B, $setting: i }))) : V(p(e ? cn : un, { ...q, layouts: B, $setting: i })); + }, [t, i]), p(ie.Provider, { value: { classNames: T, listCode: a, onClickCallback: n, onReload: r, getBase62params: R, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: S, onKeywordChange: f, onConditionChange: b }, children: z && x.cloneElement(z, q) }); +}; +ui.propTypes = { classNames: w.exact({ sider: w.string, filter: w.string, footer: w.string, toolbar: w.string, container: w.string, content: w.string, item: w.string }), layouts: w.oneOfType([w.exact({ sider: w.oneOfType([w.elementType, w.element]), filter: w.oneOfType([w.elementType, w.element]), footer: w.oneOfType([w.elementType, w.element]), toolbar: w.oneOfType([w.elementType, w.element]) }), w.bool]) }; +var he, ge, Pe, at; +const ae = class ae { + constructor() { + O(this, ge, null); + O(this, Pe, /* @__PURE__ */ new Map()); + O(this, at, () => { + if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] }); + H(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => { + var i, n; + (i = t.data) != null && i.uuid ? y(this, Pe).forEach((r, a) => { + var o; + (r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, t.data.uuid)) && a(t.data); + }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && L.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { + y(this, ge).port.postMessage({ command: "initWs", data: [`ws${d.trimStart(L.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); + }); + }, y(this, ge).port.postMessage({ command: "status", data: [] }); + }); + v(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, Pe).set(t, i), y(this, Pe).size == 1 && y(this, at).call(this), () => this.unsubscribe(t))); + v(this, "unsubscribe", (t) => y(this, Pe).delete(t)); + if (y(ae, he)) return y(ae, he); + } +}; +he = new WeakMap(), ge = new WeakMap(), Pe = new WeakMap(), at = new WeakMap(), O(ae, he, null), v(ae, "getInstance", () => (y(ae, he) || H(ae, he, new ae()), y(ae, he))); +let bt = ae; +const gi = bt.getInstance(), Tt = x.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { + const [{ resource: l, primaryKey: u, batchOperations: c = [], itemOperations: g = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: b, treeSiderConfig: k, isItemGridLayout: S, itemGridLayout: $, title: T, isPaginate: I, tabs: q }, z] = E({ isItemGridLayout: !1, itemGridLayout: {} }), V = ln(e, t), [{ dataSource: R, itemOperationsAccess: B, condition: N, tab: F, keyword: J, page: de, total: $e, pageSize: Y, sider: Ke, onConditionChange: ct, onTabChange: Ot, onKeywordChange: Si, onPageChange: vi, onPageSizeChange: Pi, onSiderChange: $i, onReload: dt, payload: Ti }, jt] = on(V, e, u, l), Ni = wt(g, B, R, u), Ri = wt(c); + A(() => { + let Q = null; + return e && L.get(`/api/_/${e}`).resp(({ data: _e, res: Ei }) => { + _e != null && _e.isDynamicRefresh && (Q = gi.subscribe(() => dt(), Ei)), z(_e); + }).catch(() => z({})), () => Q == null ? void 0 : Q(); + }, [e]), x.useImperativeHandle(s, () => ({ onReload: dt, onClickCallback: jt })); + const Fi = { listCode: e, title: T, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: b, treeSiderConfig: k, isPaginate: I, tabs: q, isItemOperations: Ni, itemOperations: g == null ? void 0 : g.map((Q) => d.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Ri, batchOperations: c, isItemGridLayout: S, columns: h, itemGridLayout: $, isConditionFormLayout: C, itemOperationsAccess: B, dataSource: R, onConditionChange: ct, onTabChange: Ot, onKeywordChange: Si, onPageChange: vi, onPageSizeChange: Pi, onSiderChange: $i, condition: N, tab: F, keyword: J, page: de, total: $e, pageSize: Y, sider: Ke, payload: Ti }; + return p(ui, { ...Fi, className: M("ff-data-list-helper", i), onReload: dt, onClickCallback: jt }); +}), pi = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : d.isArray(e) && !d.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !d.isEmpty(r.children) ? n.concat(pi(r.children, t, i)) : n), []) : [], yn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { + const { classNames: s } = ce(ie); + Ze(); + const l = W(null), u = W(null), [c, g] = E([]), [h, m] = E({ width: 0, height: 0 }); + A(() => { + g(pi(n, t)); + }, [n, t]), Ai(() => { + const C = new ResizeObserver(() => { + var b; + m({ width: ((b = l.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || u.current.offsetWidth, height: u.current.offsetHeight }); + }); + return u.current && C.observe(u.current), () => { + u.current && C.unobserve(u.current); + }; + }, []); + const f = sn(i); + return p("div", { ref: u, className: M("ff-data-list-table", s.content, e), children: h.height ? p(qi, { ...o, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: f == null ? void 0 : f.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / h.width * 100).toFixed(2)}%`, render: (C, b, k) => r(b, k) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: h.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: c } }) : null }); +}, wn = "RC_FORM_INTERNAL_HOOKS", bn = (e, { initialValue: t, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, o = null) => { + const s = W(!1), l = ce(Yt), [u, c] = E(), [g, h] = E(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(wn) || {}; + return A(() => m == null ? void 0 : m((f, C, b) => { + if (!s.current) return; + const k = d.get(C, e); + d.isEqual(k, g) || h(ee(k, a)); + }), [g]), A(() => { + i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (f) => o ? o.getFieldValue(f) : l.getFieldValue(f), getFieldValue: (f) => l.getFieldValue(f) }).then((f) => h(ee(f, a))).catch((f) => notification.error({ message: `布局数据错误: ${JSON.stringify(f)}` })).finally(() => s.current = !0) : (t && h(ee(t ?? l.getFieldValue(e), a)), s.current = !0); + }, [t, i]), He(() => { + s.current && n && new tt([n, r]).toValue(g, l.getFieldsValue(!0)).then(c).catch((f) => { + c(f), console.error("布局数据转换错误: ", f, n); + }); + }, [g, n, r]), [u ?? g, g]; +}, mi = (e, t, i = null) => U(() => { + var n; + return (n = d.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: u, ...c } }, g) => p("div", { className: "grid-layout-item", style: ci(a, o, s, l, u), children: p(t, { ...c, basicForm: i }) }, r ?? g)); +}, [e]), Cn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { + const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = E(); + return A(() => { + r && le.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: kn(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(x.createElement(s.default, n))); + }, [r]), a; +}, kn = (e, t = {}, i = null) => (n) => { + const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: g, value: h, ...m } = d.merge({}, t, n), [f, C] = bn(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, i), b = U(() => { + const $ = Object.keys((t == null ? void 0 : t.extras) || {}); + return d.over([d.partialRight(d.pick, $), d.partialRight(d.omit, $)]); + }, [t == null ? void 0 : t.extras]), [k, S] = b(m); + return p(e, { ...S, value: f, rawValue: C, $setting: Object.assign({}, o, k) }); +}, hi = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...u }) => { + const [c] = te.useForm(), g = mi(o, Cn, l), h = U(() => [{ name: "__PROPS__", value: a }], [a]); + return He(() => (c.setFieldsValue(s), () => c.resetFields()), [s]), p(te, { fields: h, form: c, component: !1, children: p("div", { ...u, className: M("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: g }) }); +}, xr = (Dt = hi, function({ code: e, data: t, ...i }) { + const [n, r] = E({ resource: null, cols: 12, rowHeight: 21, fields: [] }); + return A(() => { + e && L.get(`/api/_/${e}`).then((a) => r(d.pick(a, ["resource", "cols", "rowHeight", "fields"]))); + }, [e]), (n == null ? void 0 : n.resource) && p(Dt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); +}); +var Dt; +const xn = ({ column: e = 0, colWidth: t = 0, cols: i, rowHeight: n, itemMargin: r, fields: a, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: u = null, afterRender: c = null, itemRender: g = (C, b, k) => C, empty: h = p(Wi, { description: null }), className: m, style: f = {} }) => { + const { classNames: C } = ce(ie), b = U(() => p(hi, { cols: i, rowHeight: n, itemMargin: r, fields: a, className: l }), [a, i, n, r]), k = d.isEmpty(s); + return j("div", { className: M("ff-data-list-content", C.content, m), style: Object.assign({}, f, e && { "--col-num": e }, t && { "--col-width": t }), children: [u == null ? void 0 : u(s), k ? h : s.map((S, $) => { + const T = g(x.cloneElement(b, { data: S }), S, $); + return x.cloneElement(T, { key: `${(S == null ? void 0 : S[o]) ?? $}-${an(S)}` }); + }), c == null ? void 0 : c(s)] }); +}, Sn = ({ component: e, $props: t }) => { + const { base62params: i } = Ue(t, {}); + return p(G, { children: p(Tt, { listCode: e, base62params: L.decode(i) }) }); +}, Sr = () => p(fi, {}), fi = () => "Empty", vn = ({ component: e, $setting: t, $props: i }) => { + const [n, r] = E(); + A(() => { + if (!e) return r(p(fi, { description: null })); + le.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => x.createElement(o.default, { $setting: t })).then(r); + }, [e]); + const a = Ue(i, {}); + return n ? x.cloneElement(n, a) : null; +}, vr = () => "NotFoundPage"; +var fe, Z, ye, we, De, qe; +const se = class se { + constructor() { + O(this, Z, /* @__PURE__ */ new Map()); + O(this, ye, {}); + O(this, we, null); + v(this, "init", (t, i) => { + H(this, Z, t), H(this, ye, i); + }); + v(this, "get", (t) => (y(this, Z).has(t) || (t = Array.from(y(this, Z).keys()).find((i) => y(this, Z).get(i).uri === t)), y(this, Z).get(t) || {})); + v(this, "redirect", (t, i, n = {}) => { + const { uri: r, type: a, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...u } = i || {}, c = Object.assign({}, u, s), g = Object.assign({}, u, l); + a == "list" && (c.base62params = L.encode(c != null && c.base62params ? c.base62params : c)); + let h = _i(r || t, c); + const m = new URLSearchParams(); + for (const f in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(g, f) && m.append(f, JSON.stringify(g[f])); + return m.size > 0 && (h = `${h}?${m.toString()}`), n != null && n.isOpenWindow ? window.open(h) : y(this, we).navigate(h, { replace: !!(n != null && n.isReplaceRouteHistory) }); + }); + v(this, "getMenus", (t) => { + var i; + return ((i = y(this, ye)) == null ? void 0 : i[t]) || []; + }); + v(this, "findMenuPathByUuid", (t) => { + let i = []; + for (const n in y(this, ye)) if (i = y(this, De).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; + return i; + }); + v(this, "getMenusByRouteUuid", (t) => y(this, qe).call(this, t, Object.values(y(this, ye)).flat())); + O(this, De, (t, i, n = []) => { + if (d.isEmpty(t)) return n; + for (const { uuid: r, children: a } of t) { + if (r == i) return n.concat(r); + if (!d.isEmpty(a)) return n.concat(r, y(this, De).call(this, a, i)); + } + return n; + }); + O(this, qe, (t, i) => { + var r; + let n = []; + for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, qe).call(this, t, a.children)))); + return n; + }); + v(this, "getCurrentMenu", () => { + const { uuid: t } = this.getCurrentRoute() || {}; + if (!t) return; + const i = this.getMenusByRouteUuid(t); + return d.isEmpty(i) ? void 0 : i[0]; + }); + v(this, "getCurrentRoute", (t = 0) => { + var n; + const i = (n = y(this, we).state.matches[y(this, we).state.matches.length - 1 - t]) == null ? void 0 : n.route; + if (!i) return null; + for (let [r, a] of y(this, Z)) if (a.uri === i.path) return a; + return null; + }); + v(this, "getPageParams", (t) => { + var r, a, o; + let i = "", n = {}; + if (Zt()) n = Gi(), i = (r = Yi()) == null ? void 0 : r.search; + else { + const { location: s = {}, matches: l = [] } = ((a = y(this, we)) == null ? void 0 : a.state) || {}; + n = ((o = l[l.length - 1]) == null ? void 0 : o.params) || {}, i = s.search; + } + return i && new URLSearchParams(i).forEach((s, l) => { + n[l] = s; + }), t ? d.get(n, t) : n; + }); + v(this, "createBrowserRouter", (t = {}) => { + if (y(this, Z).size == 0) return null; + const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(le.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => Promise.all([le.getWidgetComponent(s), Ue(l)]).then(([u, c]) => [u.default || function() { + return `${s}`; + }, c]).then(([u, c]) => ({ Component: () => x.createElement(ti, {}, x.createElement(u, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: u, name: c, type: g, component: h, widgetSetting: m, widgetProps: f, isLogin: C, isLayout: b, extra: k }) => { + let S = {}, $ = 0; + switch (g) { + case "list": + S.element = x.createElement(Sn, { component: h, $props: f }); + break; + case "fsdpf-component": + S.element = x.createElement(vn, { key: h, component: h, $setting: m, $props: f }); + } + const T = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout); + if (T) { + const I = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps); + if (!r[T]) return r[T] = s.length, [...s, { path: "/", lazy: a(T, I), children: [{ path: u, ...S }] }]; + $ = r[T]; + } + return b && $ > -1 ? (s[$].children.push({ path: u, ...S }), s) : [...s, { path: u, ...S }]; + }, [{ path: "/", lazy: a(i, {}), children: [] }]); + return o.push({ index: !0, element: x.createElement(Pn, { to: n, replace: !0 }) }), H(this, we, Xi(o, t)); + }); + if (y(se, fe)) return y(se, fe); + } +}; +fe = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), De = new WeakMap(), qe = new WeakMap(), O(se, fe, null), v(se, "getInstance", () => (y(se, fe) || H(se, fe, new se()), y(se, fe))); +let Ct = se; +const Pn = ({ to: e, replace: t }) => Zt() ? x.createElement(Qi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = Ct.getInstance(), Te = new Worker(new URL("/ff-worker/index.js", self.location)), qt = { getConfigure: (e) => Ae.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } }; +var st, Ee, be; +const D = class D { + constructor() { + v(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { + if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return a(); + const s = Vt(D, st)._++; + y(D, Ee).set(s, n), D.mQueue.set(s, [a, o]), Te.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); + })); + v(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" })); + if (y(D, be)) return y(D, be); + Promise.resolve().then(() => Gn).then((t) => { + qt.http = t.http; + }), Te.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { + if (a === "eval" && D.mQueue.has(t)) s !== null ? D.mQueue.get(t)[1](s) : D.mQueue.get(t)[0](o), y(D, Ee).delete(t), D.mQueue.delete(t); + else if (a === "util") try { + const u = d.get(qt, n.split("/")) || d.get(y(D, Ee).get(i), n.split("/")); + if (!d.isFunction(u)) throw `${n} not found`; + Promise.resolve(Reflect.apply(u, void 0, r)).then((c) => { + Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); + }).catch((c) => { + Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); + }); + } catch (u) { + Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: u }); + } + }, !1); + } +}; +st = new WeakMap(), Ee = new WeakMap(), be = new WeakMap(), v(D, "mQueue", /* @__PURE__ */ new Map()), O(D, st, 0), O(D, Ee, /* @__PURE__ */ new Map()), O(D, be, null), v(D, "getInstance", () => (y(D, be) || H(D, be, new D()), y(D, be))); +let kt = D; +const xe = kt.getInstance(), ot = () => { + const e = W(!0), [, t] = x.useReducer((i) => i + 1, 0); + return A(() => () => e.current = !1, []), () => e.current && t(); +}, Pr = (e) => { + const t = W(); + return A(() => { + t.current = e; + }, [e]), t.current; +}, $r = (e) => { + const [t, i] = E(e), n = W(null), r = X((a, o) => { + n.current = o, i(a); + }, []); + return A(() => { + n.current && (n.current(t), n.current = null); + }, [t]), [t, r]; +}, He = (e = (n) => { +}, t, i = d.isEqual) => { + const n = x.useRef(); + i(t, n.current) || (n.current = d.cloneDeep(t)), x.useEffect(e, [n.current]); +}, lt = He, yi = (e, t = "string") => { + var i; + if (!Array.isArray(e)) return e; + for (let n = 0; n < e.length; n++) e[n].value = ee((i = e[n]) == null ? void 0 : i.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = yi(e[n].children, t)); + return e; +}, Tr = (e, t = "json", i = "string", n, r = null) => { + const [a] = te.useForm(n), [o, s] = E([{ label: "无", value: "", disabled: !0 }]), l = W([]), u = te.useWatch((c) => l.current.length === 0 ? null : d.pick(c, l.current), a) || null; + return A(() => { + Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), a.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : a.getFieldValue(c)) }).then((c) => { + s(ee(c, "array")); + }) : e && s(ee(e, "array")); + }, [e, t, u]), yi(o, i); +}, Nr = (e) => { + const [t, i] = E(), n = { type: "GET" }; + if (typeof e == "string" ? n.url = e : d.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required"; + const r = (a) => L.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o)); + return He(() => { + let a = null; + return r().then((o) => { + a = gi.subscribe(d.throttle(r, 180, { leading: !1, trailing: !0 }), o.res); + }), () => a == null ? void 0 : a(); + }, n), t; +}, $n = (e) => { + const [t, i] = x.useState({ gridItems: [], hideItems: [] }); + return x.useEffect(() => { + e && L.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: g, listenChangeFields: h, listenChangeFieldsFunc: m, fields: f }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: g, listenChangeFields: h, listenChangeFieldsFunc: m, ...f.reduce((C, b) => { + var k; + return (k = b == null ? void 0 : b.field) != null && k.hidden ? C.hides.push(b == null ? void 0 : b.field) : C.items.push(b), C; + }, { items: [], hides: [] }) })).then(i); + }, [e]), t; +}, Tn = ({ max: e = 0, min: t = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: o } = {}, s, l) => { + const [u, c] = E([]); + return A(() => { + const g = []; + if (a) { + let h = l; + switch (l) { + case "number": + case "string": + case "array": + break; + case "bool": + h = "boolean"; + break; + case "json": + h = "object"; + } + g.push({ type: h, required: !0, whitespace: !0, message: "该项必填" }); + } + switch (i) { + case "string": + g.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) }); + break; + case "pattern": + g.push({ type: "string", pattern: r, message: n }); + break; + case "validator": + o && g.push(({ getFieldValue: h }) => ({ validator: async (m, f) => { + const C = await xe.exec(o, { value: f, fieldName: s }, { getFieldValue: h }); + return d.isString(C) && C ? Promise.reject(C) : d.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve(); + } })); + } + c(g); + }, [e, t, i, n, r, a, o]), u; +}, Nn = (e, t, i) => { + const [n, r] = E(null); + return A(() => { + const { initDataUri: a = `/api/${e}`, initDataMethod: o = "GET" } = i || {}; + t && L.request({ method: o, url: d.trimEnd(`${a}/${t}`, "/") }).then((s) => { + r(s); + }); + }, [e, t, i]), n; +}, wi = (e, t, i = {}, n = {}, r = {}) => { + const a = ce(Yt), o = ot(), s = W(!0), l = W([]), [u, c] = E(t), g = te.useWatch((h) => JSON.stringify(d.pick(h, l.current)), a) || "{}"; + return lt(() => { + e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (h) => r ? r.getFieldValue(h) : null, getFieldValue: d.wrap(a.getFieldValue, (h, m) => (l.current.some((f) => d.isEqual(f, m)) || (l.current.push(m), o()), h == null ? void 0 : h(m))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((h) => s.current && c(h)); + }, [e, g, a, i, n]), A(() => () => s.current = !1, []), u; +}, Rn = (e, t, i = [], n = {}) => { + const r = W({}); + if (!t) return [e, r.current]; + const a = W(), o = d.debounce(ot(), 180), s = ["disabled", "required"], l = (g, h) => { + s.includes(g) && (r.current[g] = h), o(); + }, u = U(() => ({ setDisabled: (g) => l("disabled", g), setRequired: (g) => l("required", g), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), c = wi(t, -1, {}, u, n) ?? -1; + if (a.current != c && (c >= 0 || !d.isEmpty(i == null ? void 0 : i[c]))) { + a.current = c; + const { widget: g, widgetPrefix: h, props: m } = i == null ? void 0 : i[c]; + e = ni(g, h), r.current = d.merge(m, d.pick(r.current, s)); + } + return [e, r.current]; +}, Wt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Rr = ({ value: e, onChange: t }, i = null) => { + const n = W(), [r] = te.useForm(i), a = W({}); + return lt(() => { + d.isEqual(n.current, e) || r.setFieldsValue(e); + }, [e]), A(() => () => r.resetFields(), []), [U(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { + const l = Wt(o); + s ? a.current[l] = s : delete a.current[l]; + } }, scrollToField: (o, s = {}) => { + console.warn("useMergedFormValuesChange scrollToField not work, unreferenced antd form"); + }, focusField: (o) => { + console.warn("useMergedFormValuesChange focusField not work, unreferenced antd form"); + }, getFieldInstance: (o) => { + const s = Wt(o); + return a.current[s]; + } }, [r]), (o, s) => { + n.current = s, t == null || t(s); + }]; +}, Fn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { + const a = wi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); + return A(() => { + i == "javascript" ? n(ee(a, e)) : t && n(ee(t, e)); + }, [e, t, a]), null; +}, bi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => { + const o = ni(e, t), [s, l] = Rn(o, i, n, r), [u, c] = E(); + return A(() => { + s && le.getWidgetComponent(s).then(({ defaultProps: g = {}, default: h }) => ({ default: En(h, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => c(x.createElement(g.default, a))); + }, [s]), u && x.cloneElement(u, { ...a, ...l }); +}, En = (e, t = {}, i = null) => (n) => { + const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: c, validators: g, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: b, ...k } = d.omit(d.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), S = Tn(Object.assign({}, g, u ? { required: !0 } : {}), a, r), $ = U(() => { + const V = Object.keys((t == null ? void 0 : t.extras) || {}); + return d.over([d.partialRight(d.pick, V), d.partialRight(d.omit, V)]); + }, [t == null ? void 0 : t.extras]), [T, I] = $(k), q = { label: o, noStyle: s, colon: !1, layout: "vertical" }, z = X((V) => V == null ? void 0 : ee(V, r), [r]); + return p(Xt, { name: a, rules: S, initialValue: z(C), normalize: z, children: (V, R, B) => { + var N; + return p(e, { type: r, rcform: B, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: h || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((N = S == null ? void 0 : S[0]) == null ? void 0 : N.required) || !1, ...q }, fieldProps: { placeholder: l, ...I, ...V }, $setting: Object.assign({}, c, T) }); + } }); +}, Nt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { + const s = mi(r, bi, o); + return j("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, a && x.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] }); +}; +Nt.propTypes = { fields: w.array }; +const On = (Ut = Nt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: c, onValuesChange: g = () => { +}, ...h }) => { + const { align: m, autoComplete: f, resource: C, items: b, hides: k, rowHeight: S, marginX: $, marginY: T, cols: I, listenChangeFields: q, listenChangeFieldsFunc: z, pk: V, uuid: R } = $n(e), [B] = te.useForm(o), N = U(() => [{ name: "__PK__", value: V }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: R }, { name: "__PRIMARY_KEY__", value: n }], [V, e, R, C, n, a]); + return j(te, { className: u, name: i || e, layout: t || m, fields: N, form: B, autoComplete: f, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (F, J) => (({ changedValues: de, allValues: $e, listenChangeFields: Y, listenChangeFieldsFunc: Ke, onValuesChange: ct, code: Ot }) => { + ct(de, $e), Ke && Array.isArray(Y) && xe.exec(Ke, { changedValues: de, allValues: $e }, { getFieldValue: B.getFieldValue, setFieldValue: B.setFieldValue, setFieldsValue: B.setFieldsValue, isFieldTouched: B.isFieldTouched, isFieldsTouched: B.isFieldsTouched }); + })({ changedValues: F, allValues: J, listenChangeFields: q, listenChangeFieldsFunc: z, onValuesChange: g, code: e }), children: [p(Ut, { ...h, form: B, basicForm: s, code: e, fields: b, cols: I, rowHeight: S, itemMargin: [$, T] }), k == null ? void 0 : k.map((F) => { + var J; + return p(Xt, { name: F.code, children: p(Fn, { form: B, basicForm: s, name: F.code, type: F.type, initialValue: F.initialValue, initialValueLanguage: (J = F.extras) == null ? void 0 : J.initialValueLanguage }) }, JSON.stringify(F.code)); + })] }, e); +}); +var Ut; +const Ci = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a }) => { + const [o] = te.useForm(), s = Nn(n, r, e); + return A(() => { + s && o.setFieldsValue(s); + }, [s]), p(G, { actions: j(x.Fragment, { children: [p(P, { name: "保存", type: "primary", widget: () => { + const l = o.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {}; + o.validateFields(!0).then((c) => l ? d.pick(c, [l]) : c).then((c) => L.post(r ? `${u}/${r}` : `${u}`, c).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 })); + } }), p(P, { name: "取消", widget: () => t(!1) })] }), extras: i, children: p(On, { form: o, code: n, primaryKey: r, ...a }) }); +}, Ht = /* @__PURE__ */ new Set(), xt = (e = [], t = 0) => { + const i = e[t]; + if (i.length && !Ht.has(i)) { + const n = document.createElement("script"); + n.setAttribute("src", i), n.setAttribute("data-namespace", i), e.length > t + 1 && (n.onload = () => { + xt(e, t + 1); + }, n.onerror = () => { + xt(e, t + 1); + }), Ht.add(i), document.body.appendChild(n); + } +}, St = ({ className: e, type: t, style: i = {}, ...n }) => p("span", { role: "img", className: M("ff-iconfont", e), style: i, ...n, children: p("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: p("use", { xlinkHref: `#${t}` }) }) }); +St.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, St.init = xt; +const jn = (e, t, i, n) => ke.redirect(i, t, n), Ln = (e, t = {}, i, n = {}) => { + var a; + const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, u]) => { + const c = d.get(t, ["router", s]); + if (!c && c !== 0 && l) throw `请传入 ${u}`; + return `${o}/${c}`; + }, `/api/${i}`); + return L.del(r, t.param).msg(); +}, Jt = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => { + const o = { loading: (s) => s === void 0 ? n : a((l) => ({ ...l, loading: s })), disabled: (s) => s === void 0 ? r : a((l) => ({ ...l, disabled: s })) }; + return d.isFunction(i) ? i.call(null, { ...t, ...o }) : d.isString(i) && i ? xe.exec(i, t, o) : null; +}, Kt = (e, t, i, n, r) => d.isString(i) && i ? le.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r)).catch((a) => { + _.error(i, { content: a.toString() }); +}) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), An = (e, t, i, n, r) => _.modal(Ci, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), Vn = (e, t, i, n, r) => _.modal(Tt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), In = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { + const l = ce(ie), [u, c] = E({ leading: !0, trailing: !1 }), g = U(() => { + switch (t) { + case "redirect": + return d.partialRight(jn, e, r); + case "func": + return d.partialRight(Jt, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: c }); + case "fsdpf-component": + return d.partialRight(Kt, e, r, a); + case "grid-layout-form": + return d.partialRight(An, e, r, a); + case "data-list": + return d.partialRight(Vn, e, r, a); + case "destroy": + return d.partialRight(Ln, e, r, a); + default: + if (Et(e) || x.isValidElement(e)) return d.partialRight(Kt, e, r, a); + if (d.isFunction(e)) return d.partialRight(Jt, (r == null ? void 0 : r.code) || e, { status: u, setStatus: c }); + } + return (...h) => console.error("useButton unknown widgetType", t, ...h); + }, [e, t]); + return [d.debounce((h) => (s == null || s(h), Promise.resolve(Ue(n, h, { list: l })).then((m) => g(h, { ...i, ...m })).then((m) => o == null ? void 0 : o(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u]; +}, ki = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, o = "default") => U(() => { + const s = { type: "primary", className: M("ff-button", i), iconPosition: r, size: a }; + return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = M(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = p(St, { type: n })), t && (s.children = t), s; +}, [o, e, i, n, r]), Je = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: c, data: g, loading: h, disabled: m, tooltip: f, confirm: C, widget: b = () => { +}, widgetType: k, widgetData: S, widgetProps: $, widgetSetting: T, widgetContainerProps: I, ...q }) { + const z = U(() => oi(), []), V = d.isEmpty(f) || !f.enabled ? {} : f, R = d.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), B = ki({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [N, F] = E(!1), [J, { disabled: de, loading: $e }] = In({ widget: b, widgetType: k, widgetData: S, widgetProps: $, widgetSetting: T, widgetContainerProps: I }, { onAfterClick: u, onBeforeClick: c }); + return p(Ui, { zIndex: z, okText: "确定", cancelText: "取消", getPopupContainer: (Y) => Y, ...R, disabled: de || m, open: N, onOpenChange: (Y) => { + if (!Y) return F(Y); + R.enabled ? F(Y) : J(g); + }, onConfirm: () => { + J(g); + }, onClick: (Y) => { + Y.stopPropagation(); + }, children: p(Hi, { zIndex: z, getPopupContainer: (Y) => Y, ...V, title: N ? null : V == null ? void 0 : V.title, trigger: ["hover", "click"], children: p(et, { loading: $e || h, disabled: de || m, ...B, ...q, children: n || r }) }) }); +}, P = Je("default"); +P.propTypes = { type: w.oneOf(["primary", "default", "danger", ""]), size: w.oneOf(["large", "middle", "small"]), name: w.string, icon: w.string, iconPosition: w.oneOf(["start", "end"]), data: w.any, widget: w.any, widgetType: w.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: w.object, widgetProps: w.object, widgetSetting: w.object, widgetContainerProps: w.object, tooltip: w.exact({ title: w.string.isRequired, placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func }), confirm: w.exact({ title: w.string.isRequired, cancelText: w.string, okText: w.string, okType: w.oneOf(["primary", "default", "danger", ""]), placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func, arrow: w.oneOfType([w.bool, w.exact({ pointAtCenter: w.bool })]) }) }; +const Mn = Je("link"), zn = Je("circle"), Bn = Je("round"), Dn = Je("dashed"), Rt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: c }) => { + const g = U(() => oi(), []), h = ce(ie), [m, f] = E(!1), [C, b] = E("hover"), [k, S] = E({}), [$, T] = E(), { placement: I, align: q, arrow: z = { pointAtCenter: !0 }, getPopupContainer: V, ...R } = o || {}; + A(() => { + i == "grid-layout-form" ? T(x.createElement(Ci, { ...n, $setting: a, code: t })) : i == "data-list" ? T(x.createElement(Tt, { base62params: e, $setting: a, listCode: t })) : d.isString(t) ? le.getWidgetComponent(t).then(({ default: F }) => { + T(x.createElement(F, { ...n, $setting: a })); + }).catch((F) => T(F.toString())) : Et(t) ? T(x.createElement(t, { ...n, $setting: a })) : x.isValidElement(t) && T(x.cloneElement(t, { ...n, $setting: a })); + }, [t, i, n]), A(() => { + Promise.resolve(Ue(r, e, { list: h })).then(S); + }, [r, e, h.getBase62params]); + const B = (F, J = !1) => (f(F), !F && b("hover"), F ? l == null ? void 0 : l(k) : s == null ? void 0 : s(J)), N = (F) => { + f(!0), b("click"); + }; + return p(Ji, { zIndex: g, placement: I, onPopupClick: N, onClick: N, open: m, align: q, arrow: z, trigger: C, getPopupContainer: V, content: p(qn, { ...R, extras: c, children: $ && x.cloneElement($, { ...k, $close: (F) => B(!1, F) }) }), children: u, onOpenChange: B }); +}, qn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { + const [s, l] = E({}), u = X((m, f) => l((C) => ({ ...C, [m]: f })), []), c = X((m) => l((f) => ({ ...f, [m]: void 0 })), []), g = e ? x.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? x.createElement("div", { className: "ff-popup-reserved-extras" }, n); + return p(We.Provider, { value: { ele: s, mount: u, unmount: c }, children: j("div", { className: M("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [j("div", { className: "ff-popup-header", children: [g, s == null ? void 0 : s["sub-title"]] }), i, j("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); +}; +Rt.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; +const _t = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, f, C) => { +}, onBeforeClick: n = (m, f, C) => { +}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (m, f) => p(P, { ...m, data: f }, m.uuid || Ze()), widgetContainerProps: c = {}, children: g, data: h }) => { + if (d.isEmpty(e)) return g; + const [m, f] = U(() => (e || []).reduce((b, k) => { + const S = t.indexOf(k.widgetType); + return S === -1 ? b[1].push(k) : b[0] ? S < t.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = k) : b[1].push(k) : b[0] = k, b; + }, [null, []]), [e, t]); + o ? g = o(m, h) || g : g || (g = p(et, { ...ki(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) })); + const C = f.map((b) => u(Object.assign({ uuid: b.uuid, type: b.type, name: b.name, widget: b.widget, widgetType: b.widgetType, widgetProps: b.widgetProps, widgetData: b.widgetData, widgetSetting: b.widgetSetting, widgetContainerProps: b.widgetContainerSetting, confirm: b.confirm, onAfterClick: d.partialRight(i, b, h), onBeforeClick: d.partialRight(n, b, h) }, { size: l, variant: s }), h)); + return p(Rt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, c, m == null ? void 0 : m.widgetContainerProps), data: h, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: d.partialRight(i, m, h), onBeforeClick: d.partialRight(n, m, h), children: g }); +}; +_t.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: w.func, btnVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: w.func, labelSize: P.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = Mn, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = zn, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Bn, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Dn, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Rt, P.GroupPopover = _t; +const Wn = ({ fields: e, formProps: t, $close: i }) => { + const [n] = te.useForm(), r = U(() => [{ name: "__PROPS__", value: t }], [t]); + return p(G, { actions: j(x.Fragment, { children: [p(P, { name: "取消", widget: () => i(!1) }), p(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: p(te, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => p(bi, { code: a, ...o }, a)) }) }); +}, Un = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => j(Zi, { ...s, prefixCls: "ff-drawer", className: M("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [j("div", { className: "ff-popup-header", children: [p("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: p($t, { type: "close" }) }), n, r] }), p("div", { className: "ff-popup-body", children: i }), j("div", { className: "ff-popup-footer", children: [o, a] })] }), Hn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...u }) => { + const c = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } }; + return p(en, { ...u, ...c, prefixCls: "ff-modal", modalRender: () => j("div", { className: M("ff-modal-content ff-popup", e), children: [j("div", { className: "ff-popup-header", children: [p("button", { "aria-label": "Close", className: "ff-popup-close", onClick: u.onClose, children: p($t, { type: "close" }) }), r, a] }), p("div", { className: "ff-popup-body", children: n }), j("div", { className: "ff-popup-footer", children: [s, o] })] }) }); +}, xi = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => { + const [o, s] = E({}), [l, u] = E(!0), c = X((f, C) => s((b) => ({ ...b, [f]: C })), []), g = X((f) => s((C) => ({ ...C, [f]: void 0 })), []); + let h = { ...a, className: o.rootClassName, title: o.title || r && x.createElement("div", { className: M("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => u(!1) }; + const m = () => { + t(!1); + }; + return p(We.Provider, { value: { ele: o, mount: c, unmount: g }, children: e && e !== "center" ? p(Un, { ...h, placement: e, open: l, afterOpenChange: (f) => !f && m() }) : p(Hn, { ...h, visible: l, afterClose: m }) }); +}; +xi.propTypes = { placement: w.oneOf(["center", "left", "top", "right", "bottom"]) }; +const K = () => { + const [e, t] = Vi({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (a) => { + const { offsetHeight: o } = a; + return { height: o }; + }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, i] = x.useReducer((a) => a + 1, 0); + A(() => { + K.$onClick = n, K.$queue.forEach(([a, o, s], l, u) => { + r([o, s], ...a), delete u[l]; + }); + }, []); + const n = (a, o = {}, s = {}) => new Promise((l, u) => r([l, u], a, o, s)), r = ([a, o], s, l = {}, u = {}) => { + const c = K.$index++, g = (h) => ((m, f) => (K.$popups.delete(m), i(), f == null ? void 0 : f()))(c, () => a(h)); + if (s === ii) return e.open({ ...u, key: c, content: x.createElement(s, { ...l, $close: () => e.close(c) }) }); + K.$popups.set(c, x.createElement(xi, { zIndex: c, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: c, $close: g }, x.isValidElement(s) ? x.cloneElement(s, { ...l, $close: g }) : s != null && s.name || It.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === It.ForwardRef ? x.createElement(s, { ...l, $close: g }) : s)), i(); + }; + return j(x.Fragment, { children: [Array.from(K.$popups).map(([a, o]) => o), t] }); +}; +K.$popups = /* @__PURE__ */ new Map(), K.$index = 9999, K.$queue = [], K.$onClick = (...e) => new Promise((t, i) => { + K.$queue.push([e, t, i]); +}); +const Gt = (e, t, i = {}) => K.$onClick(e, t, i), gt = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => K.$onClick(ii, { content: e, ...n }, { showProgress: t, duration: i }), _ = { modal: Gt, confirm: (e, t = {}) => K.$onClick(tn, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Gt(Wn, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => { + if (n === !1) throw !1; + return n; +}), notification: gt, success: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-error", icon: "close" }) }; +je.configure({ showSpinner: !1 }), Le.interceptors.request.use((e) => { + e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); + const t = window.localStorage.getItem(Qe); + return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, je.inc(), e; +}, (e) => (je.done(), Promise.reject({ code: -1, msg: e }))), Le.interceptors.response.use(({ data: e, headers: t }) => (je.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { + return je.done(), Promise.reject(e.message); +}), window.addEventListener("unhandledrejection", mt.onUnhandledRejection), mt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ke.redirect(Ae.get("Common.WEBSITE_LOGIN_PAGE"))); +const vt = { appUrl: "", init: (e, t, i) => { + vt.appUrl = i, Le.defaults.baseURL = i, Le.defaults.timeout = 15e3, Object.assign(vt, new mt(e, t, Le)); +} }, L = vt; +class Ft extends Error { + constructor(t, i) { + super(i), Error.captureStackTrace && Error.captureStackTrace(this, Ft), !i instanceof Ve && (this.name = `${t} Error Runtime`); + } +} +class Ve extends Error { + constructor(t, ...i) { + super(...i), Error.captureStackTrace && Error.captureStackTrace(this, Ve), this.name = `${t} Not Found`; + } +} +const pt = "mine", Qe = "token"; +var Ce, Oe; +const oe = class oe { + constructor() { + O(this, Oe, /* @__PURE__ */ new Map()); + v(this, "setVendor", (t, i) => y(this, Oe).set(t, new ei(i, async (n, r) => { + var o, s; + if (!(n != null && n.default)) throw "@pkg not found"; + let a = () => r; + switch ("function") { + case typeof (a = (o = n.default) == null ? void 0 : o[`./${r}/index.jsx`]): + case typeof (a = (s = n.default) == null ? void 0 : s[`./${r}/index.js`]): + return a(); + } + throw new Ve(r); + }))); + v(this, "getWidgetComponent", async (t) => { + if (!t) throw "getWidgetComponent widget is required"; + if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t); + const [, i] = t == null ? void 0 : t.split("@pkg/"); + if (!i) throw new Ve(t); + try { + return y(this, Oe).has("pkg") ? await y(this, Oe).get("pkg").get(i) : await import(`${L.appUrl}/api/pkg-import/web?name=${t}`); + } catch (n) { + throw new Ft(t, n); + } + }); + v(this, "getRoutes", () => L.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); + v(this, "getMenus", () => L.get("/api/my-menu")); + v(this, "getConfigure", () => L.get("api/init-configure")); + v(this, "getWidgetOperationAuth", () => L.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], []))); + v(this, "getPhoneNumber", (t) => L.get(`/api/user-wx-phone-number/${t}`)); + v(this, "getUserToken", () => { + const t = window.localStorage.getItem(Qe); + if (!t) return ""; + const i = t.split("."); + if (!Array.isArray(i) || i.length !== 3) throw "登录令牌无效!"; + const { iat: n } = JSON.parse(window.atob(i[1])); + if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; + return t; + }); + v(this, "checkUserToken", () => { + try { + return !!this.getUserToken(); + } catch { + return !1; + } + }); + v(this, "getUserInfo", (t = !0) => { + var i; + try { + const n = this.getUserToken(); + if (!n) return Promise.resolve(null); + const { iat: r } = JSON.parse(window.atob((i = n == null ? void 0 : n.split(".")) == null ? void 0 : i[1])), { iat: a, ...o } = L.decode(window.localStorage.getItem(pt) || "", {}); + return a === r ? Promise.resolve(o) : L.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(pt, L.encode({ ...s, iat: r })), s)); + } catch (n) { + console.error(n), t && _.error("请登录").then(this.logout); + } + return Promise.resolve(null); + }); + v(this, "login", (t, i, n = {}) => L.post("/api/user-token", { username: t, passwd: Ii.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Qe, r), r))); + v(this, "logout", (t) => (window.localStorage.removeItem(pt), window.localStorage.removeItem(Qe), t == null ? void 0 : t())); + if (y(oe, Ce)) return y(oe, Ce); + } +}; +Ce = new WeakMap(), Oe = new WeakMap(), O(oe, Ce, null), v(oe, "getInstance", () => (y(oe, Ce) || H(oe, Ce, new oe()), y(oe, Ce))); +let Pt = oe; +const le = Pt.getInstance(), Jn = x.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), Kn = x.createContext({ set: () => { +}, get: () => { +}, assign: () => { +}, currentRoute: () => { +} }), Et = (e) => !!(e != null && e.name) && (e.prototype instanceof x.Component || /^[A-Z]/.test(e.name)), _n = (e, t) => { + if (!e || typeof window > "u") return; + let i = document.querySelector(`style[ff-style-token="${t}"]`); + return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e); +}, Gn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Jn, AppGlobalParamsContext: Kn, cache: ei, configure: Ae, default: le, func: xe, http: L, insertStyle: _n, isReactComponent: Et, route: ke }, Symbol.toStringTag, { value: "Module" })); +export { + Nt as $, + yn as A, + xn as B, + cn as C, + tt as D, + un as E, + sn as F, + xr as G, + wn as H, + br as I, + Cr as J, + li as K, + wt as L, + on as M, + ln as N, + Sn as O, + vn as P, + Sr as Q, + gi as R, + vr as S, + ot as T, + Pr as U, + $r as V, + He as W, + lt as X, + Tr as Y, + Nr as Z, + On as _, + ni as a, + bi as a0, + Ci as a1, + $n as a2, + Tn as a3, + Nn as a4, + wi as a5, + Rn as a6, + Rr as a7, + St as a8, + P as a9, + nn as aa, + In as ab, + G as ac, + We as ad, + ti as ae, + K as af, + _ as ag, + gr as ah, + pr as ai, + mr as aj, + le as ak, + Et as al, + _n as am, + L as an, + ei as ao, + Ae as ap, + xe as aq, + ke as ar, + Jn as as, + Kn as at, + Ue as b, + fr as c, + ri as d, + yr as e, + wr as f, + rn as g, + oi as h, + an as i, + ci as j, + kr as k, + pi as l, + hi as m, + Cn as n, + bn as o, + mi as p, + ui as q, + ut as r, + di as s, + ee as t, + hr as u, + fn as v, + hn as w, + pn as x, + Tt as y, + ie as z +}; diff --git a/dist/common/main-iMRzW1Jg.js b/dist/common/main-iMRzW1Jg.js deleted file mode 100644 index 9bb023d..0000000 --- a/dist/common/main-iMRzW1Jg.js +++ /dev/null @@ -1,1068 +0,0 @@ -var Ei = Object.defineProperty; -var Ot = (e) => { - throw TypeError(e); -}; -var Fi = (e, t, i) => t in e ? Ei(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; -var S = (e, t, i) => Fi(e, typeof t != "symbol" ? t + "" : t, i), jt = (e, t, i) => t.has(e) || Ot("Cannot " + i); -var y = (e, t, i) => (jt(e, t, "read from private field"), i ? i.call(e) : t.get(e)), j = (e, t, i) => t.has(e) ? Ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), H = (e, t, i, n) => (jt(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); -var Lt = (e, t, i, n) => ({ - set _(r) { - H(e, t, r, i); - }, - get _() { - return y(e, t, n); - } -}); -import { jsx as g, jsxs as A } from "react/jsx-runtime"; -import k, { useEffect as V, useState as O, useCallback as X, useMemo as D, useRef as U, useContext as ce, useId as Ae, isValidElement as Oi, useLayoutEffect as ji } from "react"; -import w from "prop-types"; -import M from "classnames"; -import * as At from "react-is"; -import { useNotification as Li } from "rc-notification"; -import u from "lodash"; -import te, { FieldContext as _t, Field as Gt } from "rc-field-form"; -import { N as je, a as Le, P as pt, S as Ai } from "./vender-C0IfHU5B.js"; -import Yt from "immutability-helper"; -import { Form as Xe, Input as Vi, Button as Ze, Pagination as Ii, Tree as Mi, Breadcrumb as zi, Table as Bi, Empty as qi, Popconfirm as Wi, Tooltip as Di, Popover as Ui } from "antd"; -import { useMergedState as Hi } from "rc-util"; -import { generatePath as Ji, useInRouterContext as Xt, useParams as Ki, useLocation as _i, createBrowserRouter as Gi, Navigate as Yi } from "react-router-dom"; -import "rc-util/lib/hooks/useMergedState"; -import Xi from "rc-drawer"; -import Qi from "rc-dialog"; -var Ne, Me, Re, ue, Se, ve; -class Qt { - constructor(t, i) { - j(this, Ne, /* @__PURE__ */ new Map()); - j(this, Me, !0); - j(this, Re, []); - j(this, ue); - j(this, Se, () => y(this, ue)); - j(this, ve, () => Promise.resolve()); - S(this, "get", (...t) => new Promise((i, n) => { - const r = JSON.stringify(t); - if (y(this, Ne).has(r)) return i(y(this, ve).call(this, y(this, ue), ...t)); - if (y(this, ue) === void 0) y(this, Re).push([t, i, n]), y(this, Me) && (H(this, Me, !1), Promise.resolve(typeof y(this, Se) == "function" ? y(this, Se).call(this) : y(this, Se)).then((a) => H(this, ue, a || null)).finally(() => { - y(this, Re).forEach(([a, o, s]) => { - try { - const l = y(this, ve).call(this, y(this, ue), ...a); - y(this, Ne).set(JSON.stringify(a), l), o(l); - } catch (l) { - s(l); - } - }), y(this, Re).length = 0; - })); - else { - const a = y(this, ve).call(this, y(this, ue), ...t); - y(this, Ne).set(r, a), i(a); - } - })); - H(this, ve, i), H(this, Se, t); - } -} -Ne = new WeakMap(), Me = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Se = new WeakMap(), ve = new WeakMap(); -const cr = () => g("div", { children: "Empty" }), Ue = k.createContext({ ele: {}, mount: () => { -}, unmount: () => { -} }), G = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => { - const { mount: l, unmount: p } = k.useContext(Ue); - return G.Action({ children: n }), G.Title({ children: r }), G.SubTitle({ children: a }), G.Extra({ children: o }), V(() => (l("rootClassName", e), () => p(e)), [e]), g("div", { className: M("ff-container", t), style: s, children: i }); -}, Ye = (e) => ({ children: t, className: i }) => { - const { mount: n, unmount: r } = k.useContext(Ue); - return V(() => (t && n(e, k.createElement("div", { key: `ff-${e}`, className: M(`ff-popup-${e}`, i) }, t)), () => r(e)), [i, t]), null; -}; -G.Action = Ye("actions"), G.Title = Ye("title"), G.SubTitle = Ye("sub-title"), G.Extra = Ye("extras"), G.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; -const dr = () => g(G, { className: "ff-loading", children: A("div", { className: "loader", children: [A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] })] }) }), ur = () => g("div", { children: "NotFound" }), Zt = ({ children: e }) => { - const [t, i] = O({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); - return typeof (e == null ? void 0 : e.type) == "string" ? e : g(Ue.Provider, { value: { ele: t, mount: n, unmount: r }, children: k.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); -}; -Zt.propTypes = { children: w.element.isRequired }; -const Vt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, vt = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Vt[e] || Vt.info).map((i, n) => g("path", { d: i }, n)) }) }), ei = ({ className: e, content: t, icon: i, $close: n }) => A(k.Fragment, { children: [i && g("div", { className: M("ff-notification-icon", e), children: g(vt, { type: i }) }), t] }), Zi = ({}) => g(G, { children: "Confirm" }); -var pe, Ee; -const ne = class ne { - constructor() { - j(this, Ee, /* @__PURE__ */ new Map()); - S(this, "init", (t) => H(this, Ee, new Map(t))); - S(this, "check", (t) => !y(this, Ee).has(t) || y(this, Ee).get(t)); - if (y(ne, pe)) return y(ne, pe); - } -}; -pe = new WeakMap(), Ee = new WeakMap(), j(ne, pe, null), S(ne, "getInstance", () => (y(ne, pe) || H(ne, pe, new ne()), y(ne, pe))); -let mt = ne; -const en = mt.getInstance(), tn = (e, t, i = "children") => { - if (u.isEmpty(e)) return {}; - const n = u.find(e, ["value", t]); - if (!u.isEmpty(n)) return n; - const r = e.length; - for (let a = 0; a < r; a++) { - const { [i]: o } = e[a], s = tn(o, t, i); - if (!u.isEmpty(s)) return s; - } - return {}; -}, ti = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`; -var me, ze; -const re = class re { - constructor() { - j(this, ze, null); - S(this, "init", (t) => H(this, ze, t)); - S(this, "get", (t, i) => u.get(y(this, ze), t, i)); - if (y(re, me)) return y(re, me); - } -}; -me = new WeakMap(), ze = new WeakMap(), j(re, me, null), S(re, "getInstance", () => (y(re, me) || H(re, me, new re()), y(re, me))); -let ht = re; -const Ve = ht.getInstance(), It = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { - switch (`${e}`.toLowerCase()) { - case "0": - case "false": - case "[]": - case "{}": - return !1; - } - return !!e; -}, string2string: (e) => e, json2json: (e) => e, json2array: (e) => e ? Object.values(e) : [], json2number: (e) => Object.keys(e).length, json2integer: (e) => Object.keys(e).length, json2float: (e) => Object.keys(e).length, json2bool: (e) => Object.keys(e).length > 0, json2string: (e) => e ? JSON.stringify(e) : "", array2json: (e) => ({ ...e }), array2array: (e) => e, array2number: (e) => e.length, array2integer: (e) => e.length, array2float: (e) => e.length, array2bool: (e) => e.length > 0, array2string: (e) => JSON.stringify(e), number2json: (e) => ({}), number2array: (e) => [e], number2number: (e) => e, number2integer: (e) => e, number2float: (e) => e, number2bool: (e) => !!e, number2string: (e) => e.toString(), boolean2json: (e) => ({}), boolean2array: (e) => [], boolean2number: (e) => +e, boolean2integer: (e) => +e, boolean2float: (e) => +e, boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }, ee = (e, t) => { - let i = "string"; - i = Array.isArray(e) ? "array" : typeof e, u.isObject(e) && (i = "json"); - const n = `${i}2${t}`; - return Reflect.has(It, n) ? It[n](e) : e; -}, He = (e = {}, t = {}, i = {}, n = "") => ii(e, (r, a) => a === "type" && r === "code") ? ni(e, t, i, n) : ri(e, t, n), ii = (e, t = () => !1) => u.some(e, (i) => !!u.some(i, t) || (u.isEmpty(i) || !u.isPlainObject(i) && !u.isArray(i) ? void 0 : ii(i, t))), ni = async (e = {}, t = {}, i = {}, n = "") => { - let r = /* @__PURE__ */ Object.create(null); - for (let a in e) { - let o; - if (Reflect.has(e[a], "type") && ["code", "field", "router", "query", "string"].includes(e[a].type)) { - const { type: s, value: l = "", default: p = n } = e[a]; - switch (s) { - case "code": - o = await xe.exec(l, t, i); - break; - case "field": - o = u.get(t, l) ?? u.get(t, l.substring(l.indexOf(".") + 1)); - break; - case "router": - case "query": - o = ke.getPageParams(l); - break; - case "string": - o = l; - } - o ?? (o = p); - } else o = await ni(e[a], t, i, n); - u.set(r, a, o); - } - return r; -}, ri = (e = {}, t = {}, i = "") => Object.keys(e || {}).reduce((n, r) => { - if (u.isPlainObject(e[r])) { - let a; - if (Reflect.has(e[r], "type") && ["field", "router", "query", "string"].includes(e[r].type)) { - const { type: o, value: s = "", default: l = i } = e[r]; - switch (o) { - case "field": - a = u.get(t, s) ?? u.get(t, s.substring(s.indexOf(".") + 1)); - break; - case "router": - case "query": - a = ke.getPageParams(s); - break; - case "string": - a = s; - } - a ?? (a = l); - } else a = ri(e[r], t, i); - u.set(n, r, a); - } - return n; -}, {}), dt = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((i) => dt(i, t)) : Object.keys(e).reduce((i, n) => (t[n] ? i[t[n]] = dt(e[n], t) : i[n] = dt(e[n], t), i), {}) : e, gr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { - const t = 16 * Math.random() | 0; - return (e === "x" ? t : 3 & t | 8).toString(16); -}), pr = (e) => { - var t, i; - return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){3}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.name : ""; -}, mr = (e) => { - var t, i; - return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){2}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.category : ""; -}, hr = (e) => { - var t, i; - return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){1}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.owner : ""; -}, ai = () => K.$index++; -var tt, Be, qe, it; -const nt = class nt { - constructor(...t) { - j(this, Be, []); - j(this, qe, (t) => { - var i; - for (let n of t) Array.isArray(n[0]) ? y(this, qe).call(this, n) : y(this, Be).push(y(i = nt, tt).call(i, n[0], n[1])); - }); - S(this, "toValue", async (t, i = null) => { - const n = { getValue: () => t, getRecord: () => i }; - return await y(this, Be).reduce(async (r, a) => { - try { - const o = await r; - return (await a).call(n, o); - } catch (o) { - return console.error(o), r; - } - }, t); - }); - S(this, "toRender", (t, i, n = null) => k.createElement(y(this, it), { value: t, record: i }, n)); - j(this, it, ({ value: t, record: i, children: n }) => { - const [r, a] = O(n); - return ot(() => { - let o = !1; - return a(n), this.toValue(t, i).then((s) => ee(s, "string")).then((s) => !o && a(s)).catch((s) => !o && a(`${s}`)), () => o = !0; - }, [t, i]), r; - }); - y(this, qe).call(this, t); - } -}; -tt = new WeakMap(), Be = new WeakMap(), qe = new WeakMap(), it = new WeakMap(), j(nt, tt, u.memoize((t, i) => le.getWidgetComponent(t).then((n) => { - var r; - return ((r = n.default) == null ? void 0 : r.call(n, i)) || ((a) => a); -}), (t, i) => `${t}::${ee(i, "string")}`)); -let et = nt; -const nn = (e, t = {}) => D(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new et([i, n]).toRender(o, s, "-") } : r), [e, t]), fr = (e) => { - const [t, i] = O({}); - return V(() => { - let n = !1; - return e && L.get(`/api/_/${e}`).then((r) => u.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0; - }, [e]), t; -}, yr = (e, t = {}) => { - const [i, n] = O({ dataSource: [] }); - return Je(() => { - let r = !1; - return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((a) => !r && n(a)), () => r = !0; - }, [e, t]), i; -}, si = (e = [], t = /* @__PURE__ */ new Map(), i = "id", n) => { - const r = X(n ? (a) => u.get(a, i, u.get(a, [n, i])) : (a) => u.get(a, i), [i, n]); - return X((a) => e == null ? void 0 : e.filter((o) => !o.uuid || !t.has(o.uuid) || t.get(o.uuid).some((s) => s == r(a))), [e, t, r]); -}, ft = (e = [], t = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { - const a = X(r ? (o) => u.get(o, n, u.get(o, [r, n])) : (o) => u.get(o, n), [n, r]); - return D(() => { - if (u.isEmpty(e) || !e.some(({ uuid: s }) => en.check(s))) return !1; - if (u.isEmpty(t) || u.isEmpty(i)) return !0; - const o = i.map((s) => a(s)); - return e.some(({ uuid: s }) => !s || !t.has(s) || t.get(s).some((l) => o.some((p) => p == l))); - }, [e, i, t, a]); -}, rn = (e, t, i = "id", n = null) => { - const r = st(), a = U(!1), o = U(e.dataSource), s = U(e.itemOperationsAccess); - return V(() => (o.current = e.dataSource, s.current = e.itemOperationsAccess, () => a.current = !1), [e.dataSource, e.itemOperationsAccess]), a.current && (e.dataSource = o.current, e.itemOperationsAccess = s.current), [e, (l = 0, p = null) => { - var c, d; - if (a.current = !1, l === 1) return (c = e.onReload) == null ? void 0 : c.call(e); - if (l === 2) { - const f = u.get(p, "__PARENT_ID__", ""), h = u.get(p, i, u.get(p, [n, i], "")), m = u.findIndex(o.current, ["__PARENT_ID__", f]), C = u.findIndex(m > -1 ? u.get(o.current, [m, "children"]) : o.current, [i, h]); - if (C === -1) return (d = e.onReload) == null ? void 0 : d.call(e); - Promise.all([L.get(`/api/${t}/detail/${h}`), L.post(`/api/${t}/list-operations-access`, { ids: h })]).then(([b, x]) => { - const $ = u.get(o.current, m > -1 ? [m, "children", C, "children"] : [C, "children"]); - o.current = Yt(o.current, m > -1 ? { [m]: { children: { $splice: [[C, 1, { ...b, children: $ }]] } } } : { $splice: [[C, 1, { ...b, children: $ }]] }); - const P = new Map(x); - s.current.forEach((N, I) => { - var W; - (W = P.get(I)) != null && W.some((z) => z == h) || s.current.set(I, N.filter((z) => z !== h)); - }), P.forEach((N, I) => { - s.current.has(I) ? s.current.set(I, u.uniq([...s.current.get(I) || [], ...N])) : s.current.set(I, N); - }); - }).then(() => { - a.current = !0, r(); - }); - } - }]; -}, an = (e, t) => { - const i = st(), n = U(t), r = U(/* @__PURE__ */ new Map()), a = U([]), o = u.throttle((l) => { - a.current = [], L.list(e, u.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: p, condition: c, total: d, tab: f, sider: h, page: m, pageSize: C, operationsAccess: b, dataSource: x }) => { - n.current = { tab: f, condition: c, sider: h, keyword: p, total: d, pageSize: C, page: x != null && x.length ? m : 1 }, a.current = x, r.current = new Map(b), i(); - }); - }, 380, { leading: !1, trailing: !0 }); - ot(() => { - a.current = [], e && o(t); - }, [e, t]); - const s = D(() => u.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); - return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, p) => o({ page: l, pageSize: p }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, p) => o({ keyword: p, condition: Yt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o, payload: t == null ? void 0 : t.payload }); -}, sn = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, itemGridLayout: h, $setting: m, tabs: C, isConditionFormLayout: b, isTreeSider: x, treeSiderConfig: $ }) => { - const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), W = X((E, R, B) => g(on, { className: M("ff-data-list-framework-item", P.item), operations: a ? I(R) : [], data: c ? { [c]: R } : R, children: E, onClickCallback: N }), [c, d, a, N, l, p]), z = D(() => { - let E = {}; - return m != null && m.column && (E["--col-num"] = m.column), m != null && m.colNum && (E["--col-num"] = m.colNum), m != null && m.colWidth && (E["--col-width"] = m.colWidth), E; - }, [m]); - return A("div", { className: M("ff-data-list-framework", t), children: [g(i.sider, { isTreeSider: x, ...$ }), A("div", { className: M("ff-data-list-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: b }), g(i.toolbar, { title: f, tabs: C }), g(bn, { ...h, style: z, primaryKey: d, itemRender: W, dataSource: n }), g(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); -}, on = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => A("div", { className: M("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && g("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => g("span", { className: "data-list-grid-layout-item-action", children: g(v.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Ae()) }, (a == null ? void 0 : a.uuid) || Ae())) })] }), ln = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, tabs: h, isPaginate: m, isTreeSider: C, treeSiderConfig: b, isConditionFormLayout: x, ...$ }) => { - const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), W = ft(l, p, n, d, c); - return A("div", { className: M("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: C, ...b }), A("div", { className: M("ff-data-table-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: x }), g(i.toolbar, { title: f, tabs: h }), g(mn, { ...$, primaryKey: d, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: W ? (z) => { - var E; - return g("div", { className: "ff-data-table-actions", children: (E = I(z)) == null ? void 0 : E.map((R, B) => g(v.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: z, confirm: R.confirm, onAfterClick: (T) => T !== !1 && (N == null ? void 0 : N(R.isRefresh, z)) }, R.uuid || B)) }); - } : null }), g(i.footer, { isPaginate: m, isOperations: o, operations: s })] })] }); -}, ie = k.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => { -}, onReload: () => { -}, onClickCallback: () => { -}, onConditionChange: () => { -}, onTabChange: () => { -}, onSiderChange: () => { -}, onKeywordChange: () => { -}, onPageChange: () => { -}, onPageSizeChange: () => { -} }), oi = (e, t, i, n, r = {}, a = 0) => { - const o = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; - return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = Mt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = Mt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), a && (o.height = `${a}px`), o; -}, Mt = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, wr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, li = ({ className: e, isConditionFormLayout: t }) => { - var f, h; - const [i, n] = O({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = k.useContext(ie), { keyword: p, condition: c } = (s == null ? void 0 : s()) || {}, [d] = Xe.useForm(); - return V(() => { - r && t && L.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: m, marginX: C, marginY: b, rowHeight: x, cols: $, fields: P }) => { - n({ resource: m, itemMargin: [C, b], rowHeight: x, cols: $, fields: P }); - }).catch(() => n({})); - }, [r, t]), V(() => { - d.setFieldsValue({ keyword: p, ...c }); - }, [JSON.stringify([p, c])]), g("div", { className: M("ff-data-list-filter", l.filter, e), children: g(Xe, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (m) => o({ [i.resource]: m[i.resource] }, m.keyword) : () => { - }, onValuesChange: (m) => { - u.isEmpty(u.omit(m, ["keyword"])) || d.submit(); - }, children: ((h = i.fields) == null ? void 0 : h.length) > 1 ? g(Tt, { ...i, children: g(cn, { onReset: () => { - const { keyword: m, condition: C } = s("init") || {}; - d.setFieldsValue({ keyword: m, ...C }); - } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: oi(20, 0, 5, 2), children: g(Xe.Item, { name: ["keyword"], children: g(Vi.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (m) => a(m) }) }) }) }) }) }); -}, cn = ({ cols: e, fields: t, onReset: i }) => { - const [n, r] = O(!1), a = D(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); - return A(Xe.Item, { label: " ", style: { "--item-span": 5 }, className: M("ff-data-list-filter-actions", { expanded: n }), children: [g(Ze, { onClick: i, children: "重置" }), g(Ze, { type: "primary", htmlType: "submit", children: "查询" }), a && g(v.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); -}; -li.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; -const dn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) => { - const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = k.useContext(ie), { total: l, page: p, pageSize: c } = (s == null ? void 0 : s()) || {}; - return i && !u.isEmpty(t) || n ? A("div", { className: M("ff-data-list-footer", e), children: [g("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, f) => g(v, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (h) => h !== !1 && (o == null ? void 0 : o(d.isRefresh, null)) }, d.uuid || f)) }), n && g(Ii, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (d) => `第 ${p} 页 / 总共 ${d} 条`, onChange: r, onShowSizeChange: a })] }) : null; -}, un = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: g("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], gn = ({ className: e, width: t = 280, isTreeSider: i }) => { - const { classNames: n } = ce(ie); - return i ? g(Mi.DirectoryTree, { className: M("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: un }) : null; -}, pn = ({ className: e, title: t, tabs: i }) => { - const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = ce(ie), { tab: s } = (n == null ? void 0 : n()) || {}, [l, p] = Hi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); - return A("div", { className: M("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(zi, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: d, value: f }) => g("span", { onClick: () => p(f ?? d), className: M("ff-data-list-tab", { active: (f ?? d) == l }), children: c }), items: i }), A("div", { className: "ff-data-list-actions", children: [g(v.Link, { icon: "icon-reload", widget: () => a() }), g(v.Link, { icon: "icon-setting" })] })] }); -}, ci = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: p = 30, onPageSizeChange: c, tab: d, onTabChange: f, keyword: h, onKeywordChange: m, condition: C, onConditionChange: b, sider: x, onSiderChange: $, layouts: P, classNames: N = {}, payload: I = {}, ...W }) => { - const [z, E] = O(), R = X((T, F) => { - const J = { tab: d, page: s, pageSize: p, keyword: h, sider: x, condition: C, total: o, payload: I }; - return T && T != "init" ? u.get(J, T, F) : J; - }, [JSON.stringify(C), JSON.stringify(I), d, s, p, h, x, o]), B = D(() => { - let T = { sider: gn, filter: li, footer: dn, toolbar: pn }; - P === !1 ? T = { sider: null, filter: null, footer: null, toolbar: null } : u.isPlainObject(P) && (T = Object.assign({}, T, P)); - for (const F in T) if (T[F]) { - if (Oi(T[F])) { - const J = T[F]; - T[F] = (de) => k.cloneElement(J, de); - } - } else T[F] = () => g(k.Fragment, {}); - return T; - }, [P]); - return V(() => { - t ? le.getWidgetComponent(t).then((T) => { - if (!T) throw `${t} not found`; - return T; - }).catch((T) => ({ default: () => `${T}` })).then((T) => E(k.createElement(T.default, { ...W, layouts: B, $setting: i }))) : E(g(e ? sn : ln, { ...W, layouts: B, $setting: i })); - }, [t, i]), g(ie.Provider, { value: { classNames: N, listCode: a, onClickCallback: n, onReload: r, getBase62params: R, onPageChange: l, onPageSizeChange: c, onTabChange: f, onSiderChange: $, onKeywordChange: m, onConditionChange: b }, children: z && k.cloneElement(z, W) }); -}; -ci.propTypes = { classNames: w.exact({ sider: w.string, filter: w.string, footer: w.string, toolbar: w.string, container: w.string, content: w.string, item: w.string }), layouts: w.oneOfType([w.exact({ sider: w.oneOfType([w.elementType, w.element]), filter: w.oneOfType([w.elementType, w.element]), footer: w.oneOfType([w.elementType, w.element]), toolbar: w.oneOfType([w.elementType, w.element]) }), w.bool]) }; -var he, ge, Pe, rt; -const ae = class ae { - constructor() { - j(this, ge, null); - j(this, Pe, /* @__PURE__ */ new Map()); - j(this, rt, () => { - if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] }); - H(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => { - var i, n; - (i = t.data) != null && i.uuid ? y(this, Pe).forEach((r, a) => { - var o; - (r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, t.data.uuid)) && a(t.data); - }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && L.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { - y(this, ge).port.postMessage({ command: "initWs", data: [`ws${u.trimStart(L.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); - }); - }, y(this, ge).port.postMessage({ command: "status", data: [] }); - }); - S(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, Pe).set(t, i), y(this, Pe).size == 1 && y(this, rt).call(this), () => this.unsubscribe(t))); - S(this, "unsubscribe", (t) => y(this, Pe).delete(t)); - if (y(ae, he)) return y(ae, he); - } -}; -he = new WeakMap(), ge = new WeakMap(), Pe = new WeakMap(), rt = new WeakMap(), j(ae, he, null), S(ae, "getInstance", () => (y(ae, he) || H(ae, he, new ae()), y(ae, he))); -let yt = ae; -const di = yt.getInstance(), Pt = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { - const [{ resource: l, primaryKey: p, batchOperations: c = [], itemOperations: d = [], columns: f = [], themeConfig: h, theme: m, isConditionFormLayout: C = !1, isTreeSider: b, treeSiderConfig: x, isItemGridLayout: $, itemGridLayout: P, title: N, isPaginate: I, tabs: W }, z] = O({ isItemGridLayout: !1, itemGridLayout: {} }), E = an(e, t), [{ dataSource: R, itemOperationsAccess: B, condition: T, tab: F, keyword: J, page: de, total: Te, pageSize: Y, sider: _e, onConditionChange: lt, onTabChange: Et, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, onReload: ct, payload: Pi }, Ft] = rn(E, e, p, l), Ti = ft(d, B, R, p), $i = ft(c); - V(() => { - let Q = null; - return e && L.get(`/api/_/${e}`).resp(({ data: Ge, res: Ri }) => { - Ge != null && Ge.isDynamicRefresh && (Q = di.subscribe(() => ct(), Ri)), z(Ge); - }).catch(() => z({})), () => Q == null ? void 0 : Q(); - }, [e]), k.useImperativeHandle(s, () => ({ onReload: ct, onClickCallback: Ft })); - const Ni = { listCode: e, title: N, classNames: o, layouts: a, resource: l, primaryKey: p, theme: n || m, themeProps: r || h, isTreeSider: b, treeSiderConfig: x, isPaginate: I, tabs: W, isItemOperations: Ti, itemOperations: d == null ? void 0 : d.map((Q) => u.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: $i, batchOperations: c, isItemGridLayout: $, columns: f, itemGridLayout: P, isConditionFormLayout: C, itemOperationsAccess: B, dataSource: R, onConditionChange: lt, onTabChange: Et, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, condition: T, tab: F, keyword: J, page: de, total: Te, pageSize: Y, sider: _e, payload: Pi }; - return g(ci, { ...Ni, className: M("ff-data-list-helper", i), onReload: ct, onClickCallback: Ft }); -}), ui = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : u.isArray(e) && !u.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !u.isEmpty(r.children) ? n.concat(ui(r.children, t, i)) : n), []) : [], mn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { - const { classNames: s } = ce(ie); - Ae(); - const l = U(null), p = U(null), [c, d] = O([]), [f, h] = O({ width: 0, height: 0 }); - V(() => { - d(ui(n, t)); - }, [n, t]), ji(() => { - const C = new ResizeObserver(() => { - var b; - h({ width: ((b = l.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || p.current.offsetWidth, height: p.current.offsetHeight }); - }); - return p.current && C.observe(p.current), () => { - p.current && C.unobserve(p.current); - }; - }, []); - const m = nn(i); - return g("div", { ref: p, className: M("ff-data-list-table", s.content, e), children: f.height ? g(Bi, { ...o, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: m == null ? void 0 : m.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (C, b, x) => r(b, x) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: c } }) : null }); -}, hn = "RC_FORM_INTERNAL_HOOKS", fn = (e, { initialValue: t, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, o = null) => { - const s = U(!1), l = ce(_t), [p, c] = O(), [d, f] = O(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: h } = l.getInternalHooks(hn) || {}; - return V(() => h == null ? void 0 : h((m, C, b) => { - if (!s.current) return; - const x = u.get(C, e); - u.isEqual(x, d) || f(ee(x, a)); - }), [d]), V(() => { - i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (m) => o ? o.getFieldValue(m) : l.getFieldValue(m), getFieldValue: (m) => l.getFieldValue(m) }).then((m) => f(ee(m, a))).catch((m) => notification.error({ message: `布局数据错误: ${JSON.stringify(m)}` })).finally(() => s.current = !0) : (t && f(ee(t ?? l.getFieldValue(e), a)), s.current = !0); - }, [t, i]), Je(() => { - s.current && n && new et([n, r]).toValue(d, l.getFieldsValue(!0)).then(c).catch((m) => { - c(m), console.error("布局数据转换错误: ", m, n); - }); - }, [d, n, r]), [p ?? d, d]; -}, gi = (e, t, i = null) => D(() => { - var n; - return (n = u.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: p, ...c } }, d) => g("div", { className: "grid-layout-item", style: oi(a, o, s, l, p), children: g(t, { ...c, basicForm: i }) }, r ?? d)); -}, [e]), yn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { - const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = O(); - return V(() => { - r && le.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: wn(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(k.createElement(s.default, n))); - }, [r]), a; -}, wn = (e, t = {}, i = null) => (n) => { - const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, value: f, ...h } = u.merge({}, t, n), [m, C] = fn(s ? null : r, { initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, type: (h == null ? void 0 : h.type) || "string" }, i), b = D(() => { - const P = Object.keys((t == null ? void 0 : t.extras) || {}); - return u.over([u.partialRight(u.pick, P), u.partialRight(u.omit, P)]); - }, [t == null ? void 0 : t.extras]), [x, $] = b(h); - return g(e, { ...$, value: m, rawValue: C, $setting: Object.assign({}, o, x) }); -}, pi = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...p }) => { - const [c] = te.useForm(), d = gi(o, yn, l), f = D(() => [{ name: "__PROPS__", value: a }], [a]); - return Je(() => (c.setFieldsValue(s), () => c.resetFields()), [s]), g(te, { fields: f, form: c, component: !1, children: g("div", { ...p, className: M("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: d }) }); -}, br = (zt = pi, function({ code: e, data: t, ...i }) { - const [n, r] = O({ resource: null, cols: 12, rowHeight: 21, fields: [] }); - return V(() => { - e && L.get(`/api/_/${e}`).then((a) => r(u.pick(a, ["resource", "cols", "rowHeight", "fields"]))); - }, [e]), (n == null ? void 0 : n.resource) && g(zt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); -}); -var zt; -const bn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, dataSource: a, itemClassName: o, itemRender: s = (d, f, h) => d, empty: l = g(qi, { description: null }), className: p, style: c = {} }) => { - const { classNames: d } = ce(ie), f = Ae(), h = D(() => g(pi, { cols: e, rowHeight: t, itemMargin: i, fields: n, className: o }), [n, e, t, i]); - return g("div", { className: M("ff-data-list-content", d.content, p), style: c, children: u.isEmpty(a) ? l : a.map((m, C) => { - const b = s(k.cloneElement(h, { data: m }), m, C); - return k.cloneElement(b, { key: `${f}-${(m == null ? void 0 : m[r]) || C}` }); - }) }); -}, Cn = ({ component: e, $props: t }) => { - const { base62params: i } = He(t, {}); - return g(G, { children: g(Pt, { listCode: e, base62params: L.decode(i) }) }); -}, Cr = () => g(mi, {}), mi = () => "Empty", kn = ({ component: e, $setting: t, $props: i }) => { - const [n, r] = O(); - V(() => { - if (!e) return r(g(mi, { description: null })); - le.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => k.createElement(o.default, { $setting: t })).then(r); - }, [e]); - const a = He(i, {}); - return n ? k.cloneElement(n, a) : null; -}, kr = () => "NotFoundPage"; -var fe, Z, ye, we, We, De; -const se = class se { - constructor() { - j(this, Z, /* @__PURE__ */ new Map()); - j(this, ye, {}); - j(this, we, null); - S(this, "init", (t, i) => { - H(this, Z, t), H(this, ye, i); - }); - S(this, "get", (t) => (y(this, Z).has(t) || (t = Array.from(y(this, Z).keys()).find((i) => y(this, Z).get(i).uri === t)), y(this, Z).get(t) || {})); - S(this, "redirect", (t, i, n = {}) => { - const { uri: r, type: a, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...p } = i || {}, c = Object.assign({}, p, s), d = Object.assign({}, p, l); - a == "list" && (c.base62params = L.encode(c != null && c.base62params ? c.base62params : c)); - let f = Ji(r || t, c); - const h = new URLSearchParams(); - for (const m in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(d, m) && h.append(m, JSON.stringify(d[m])); - return h.size > 0 && (f = `${f}?${h.toString()}`), n != null && n.isOpenWindow ? window.open(f) : y(this, we).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); - }); - S(this, "getMenus", (t) => { - var i; - return ((i = y(this, ye)) == null ? void 0 : i[t]) || []; - }); - S(this, "findMenuPathByUuid", (t) => { - let i = []; - for (const n in y(this, ye)) if (i = y(this, We).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; - return i; - }); - S(this, "getMenusByRouteUuid", (t) => y(this, De).call(this, t, Object.values(y(this, ye)).flat())); - j(this, We, (t, i, n = []) => { - if (u.isEmpty(t)) return n; - for (const { uuid: r, children: a } of t) { - if (r == i) return n.concat(r); - if (!u.isEmpty(a)) return n.concat(r, y(this, We).call(this, a, i)); - } - return n; - }); - j(this, De, (t, i) => { - var r; - let n = []; - for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, De).call(this, t, a.children)))); - return n; - }); - S(this, "getCurrentMenu", () => { - const { uuid: t } = this.getCurrentRoute() || {}; - if (!t) return; - const i = this.getMenusByRouteUuid(t); - return u.isEmpty(i) ? void 0 : i[0]; - }); - S(this, "getCurrentRoute", (t = 0) => { - var n; - const i = (n = y(this, we).state.matches[y(this, we).state.matches.length - 1 - t]) == null ? void 0 : n.route; - if (!i) return null; - for (let [r, a] of y(this, Z)) if (a.uri === i.path) return a; - return null; - }); - S(this, "getPageParams", (t) => { - var r, a, o; - let i = "", n = {}; - if (Xt()) n = Ki(), i = (r = _i()) == null ? void 0 : r.search; - else { - const { location: s = {}, matches: l = [] } = ((a = y(this, we)) == null ? void 0 : a.state) || {}; - n = ((o = l[l.length - 1]) == null ? void 0 : o.params) || {}, i = s.search; - } - return i && new URLSearchParams(i).forEach((s, l) => { - n[l] = s; - }), t ? u.get(n, t) : n; - }); - S(this, "createBrowserRouter", (t = {}) => { - if (y(this, Z).size == 0) return null; - const i = Ve.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ve.get(le.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => Promise.all([le.getWidgetComponent(s), He(l)]).then(([p, c]) => [p.default || function() { - return `${s}`; - }, c]).then(([p, c]) => ({ Component: () => k.createElement(Zt, {}, k.createElement(p, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: p, name: c, type: d, component: f, widgetSetting: h, widgetProps: m, isLogin: C, isLayout: b, extra: x }) => { - let $ = {}, P = 0; - switch (d) { - case "list": - $.element = k.createElement(Cn, { component: f, $props: m }); - break; - case "fsdpf-component": - $.element = k.createElement(kn, { key: f, component: f, $setting: h, $props: m }); - } - const N = (x == null ? void 0 : x.theme) ?? (x == null ? void 0 : x.layout); - if (N) { - const I = (x == null ? void 0 : x.themeProps) ?? (x == null ? void 0 : x.layoutProps); - if (!r[N]) return r[N] = s.length, [...s, { path: "/", lazy: a(N, I), children: [{ path: p, ...$ }] }]; - P = r[N]; - } - return b && P > -1 ? (s[P].children.push({ path: p, ...$ }), s) : [...s, { path: p, ...$ }]; - }, [{ path: "/", lazy: a(i, {}), children: [] }]); - return o.push({ index: !0, element: k.createElement(xn, { to: n, replace: !0 }) }), H(this, we, Gi(o, t)); - }); - if (y(se, fe)) return y(se, fe); - } -}; -fe = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), We = new WeakMap(), De = new WeakMap(), j(se, fe, null), S(se, "getInstance", () => (y(se, fe) || H(se, fe, new se()), y(se, fe))); -let wt = se; -const xn = ({ to: e, replace: t }) => Xt() ? k.createElement(Yi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = wt.getInstance(), $e = new Worker(new URL("/ff-worker/index.js", self.location)), Bt = { getConfigure: (e) => Ve.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } }; -var at, Fe, be; -const q = class q { - constructor() { - S(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { - if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return a(); - const s = Lt(q, at)._++; - y(q, Fe).set(s, n), q.mQueue.set(s, [a, o]), $e.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); - })); - S(this, "clear", (t) => $e.postMessage({ session: t, category: "clear" })); - if (y(q, be)) return y(q, be); - Promise.resolve().then(() => Jn).then((t) => { - Bt.http = t.http; - }), $e.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { - if (a === "eval" && q.mQueue.has(t)) s !== null ? q.mQueue.get(t)[1](s) : q.mQueue.get(t)[0](o), y(q, Fe).delete(t), q.mQueue.delete(t); - else if (a === "util") try { - const p = u.get(Bt, n.split("/")) || u.get(y(q, Fe).get(i), n.split("/")); - if (!u.isFunction(p)) throw `${n} not found`; - Promise.resolve(Reflect.apply(p, void 0, r)).then((c) => { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); - }).catch((c) => { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); - }); - } catch (p) { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: p }); - } - }, !1); - } -}; -at = new WeakMap(), Fe = new WeakMap(), be = new WeakMap(), S(q, "mQueue", /* @__PURE__ */ new Map()), j(q, at, 0), j(q, Fe, /* @__PURE__ */ new Map()), j(q, be, null), S(q, "getInstance", () => (y(q, be) || H(q, be, new q()), y(q, be))); -let bt = q; -const xe = bt.getInstance(), st = () => { - const e = U(!0), [, t] = k.useReducer((i) => i + 1, 0); - return V(() => () => e.current = !1, []), () => e.current && t(); -}, xr = (e) => { - const t = U(); - return V(() => { - t.current = e; - }, [e]), t.current; -}, Sr = (e) => { - const [t, i] = O(e), n = U(null), r = X((a, o) => { - n.current = o, i(a); - }, []); - return V(() => { - n.current && (n.current(t), n.current = null); - }, [t]), [t, r]; -}, Je = (e = (n) => { -}, t, i = u.isEqual) => { - const n = k.useRef(); - i(t, n.current) || (n.current = u.cloneDeep(t)), k.useEffect(e, [n.current]); -}, ot = Je, hi = (e, t = "string") => { - var i; - if (!Array.isArray(e)) return e; - for (let n = 0; n < e.length; n++) e[n].value = ee((i = e[n]) == null ? void 0 : i.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = hi(e[n].children, t)); - return e; -}, vr = (e, t = "json", i = "string", n, r = null) => { - const [a] = te.useForm(n), [o, s] = O([{ label: "无", value: "", disabled: !0 }]), l = U([]), p = te.useWatch((c) => l.current.length === 0 ? null : u.pick(c, l.current), a) || null; - return V(() => { - Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), a.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : a.getFieldValue(c)) }).then((c) => { - s(ee(c, "array")); - }) : e && s(ee(e, "array")); - }, [e, t, p]), hi(o, i); -}, Pr = (e) => { - const [t, i] = O(), n = { type: "GET" }; - if (typeof e == "string" ? n.url = e : u.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required"; - const r = (a) => L.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o)); - return Je(() => { - let a = null; - return r().then((o) => { - a = di.subscribe(u.throttle(r, 180, { leading: !1, trailing: !0 }), o.res); - }), () => a == null ? void 0 : a(); - }, n), t; -}, Sn = (e) => { - const [t, i] = k.useState({ gridItems: [], hideItems: [] }); - return k.useEffect(() => { - e && L.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: h, fields: m }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: h, ...m.reduce((C, b) => { - var x; - return (x = b == null ? void 0 : b.field) != null && x.hidden ? C.hides.push(b == null ? void 0 : b.field) : C.items.push(b), C; - }, { items: [], hides: [] }) })).then(i); - }, [e]), t; -}, vn = ({ max: e = 0, min: t = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: o } = {}, s, l) => { - const [p, c] = O([]); - return V(() => { - const d = []; - if (a) { - let f = l; - switch (l) { - case "number": - case "string": - case "array": - break; - case "bool": - f = "boolean"; - break; - case "json": - f = "object"; - } - d.push({ type: f, required: !0, whitespace: !0, message: "该项必填" }); - } - switch (i) { - case "string": - d.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) }); - break; - case "pattern": - d.push({ type: "string", pattern: r, message: n }); - break; - case "validator": - o && d.push(({ getFieldValue: f }) => ({ validator: async (h, m) => { - const C = await xe.exec(o, { value: m, fieldName: s }, { getFieldValue: f }); - return u.isString(C) && C ? Promise.reject(C) : u.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve(); - } })); - } - c(d); - }, [e, t, i, n, r, a, o]), p; -}, Pn = (e, t, i) => { - const [n, r] = O(null); - return V(() => { - const { initDataUri: a = `/api/${e}`, initDataMethod: o = "GET" } = i || {}; - t && L.request({ method: o, url: u.trimEnd(`${a}/${t}`, "/") }).then((s) => { - r(s); - }); - }, [e, t, i]), n; -}, fi = (e, t, i = {}, n = {}, r = {}) => { - const a = ce(_t), o = st(), s = U(!0), l = U([]), [p, c] = O(t), d = te.useWatch((f) => JSON.stringify(u.pick(f, l.current)), a) || "{}"; - return ot(() => { - e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: u.wrap(a.getFieldValue, (f, h) => (l.current.some((m) => u.isEqual(m, h)) || (l.current.push(h), o()), f == null ? void 0 : f(h))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => s.current && c(f)); - }, [e, d, a, i, n]), V(() => () => s.current = !1, []), p; -}, Tn = (e, t, i = [], n = {}) => { - const r = U({}); - if (!t) return [e, r.current]; - const a = U(), o = u.debounce(st(), 180), s = ["disabled", "required"], l = (d, f) => { - s.includes(d) && (r.current[d] = f), o(); - }, p = D(() => ({ setDisabled: (d) => l("disabled", d), setRequired: (d) => l("required", d), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), c = fi(t, -1, {}, p, n) ?? -1; - if (a.current != c && (c >= 0 || !u.isEmpty(i == null ? void 0 : i[c]))) { - a.current = c; - const { widget: d, widgetPrefix: f, props: h } = i == null ? void 0 : i[c]; - e = ti(d, f), r.current = u.merge(h, u.pick(r.current, s)); - } - return [e, r.current]; -}, qt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Tr = ({ value: e, onChange: t }, i = null) => { - const n = U(), [r] = te.useForm(i), a = U({}); - return ot(() => { - u.isEqual(n.current, e) || r.setFieldsValue(e); - }, [e]), V(() => () => r.resetFields(), []), [D(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { - const l = qt(o); - s ? a.current[l] = s : delete a.current[l]; - } }, scrollToField: (o, s = {}) => { - console.warn("useMergedFormValuesChange scrollToField not work, unreferenced antd form"); - }, focusField: (o) => { - console.warn("useMergedFormValuesChange focusField not work, unreferenced antd form"); - }, getFieldInstance: (o) => { - const s = qt(o); - return a.current[s]; - } }, [r]), (o, s) => { - n.current = s, t == null || t(s); - }]; -}, $n = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { - const a = fi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); - return V(() => { - i == "javascript" ? n(ee(a, e)) : t && n(ee(t, e)); - }, [e, t, a]), null; -}, yi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => { - const o = ti(e, t), [s, l] = Tn(o, i, n, r), [p, c] = O(); - return V(() => { - s && le.getWidgetComponent(s).then(({ defaultProps: d = {}, default: f }) => ({ default: Nn(f, d, r) })).catch((d) => ({ default: () => `${d}` })).then((d) => c(k.createElement(d.default, a))); - }, [s]), p && k.cloneElement(p, { ...a, ...l }); -}, Nn = (e, t = {}, i = null) => (n) => { - const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: p = !1, extras: c, validators: d, help: f, isVirtual: h, $isReserved: m, initialValue: C, initialValueLanguage: b, ...x } = u.omit(u.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = vn(Object.assign({}, d, p ? { required: !0 } : {}), a, r), P = D(() => { - const E = Object.keys((t == null ? void 0 : t.extras) || {}); - return u.over([u.partialRight(u.pick, E), u.partialRight(u.omit, E)]); - }, [t == null ? void 0 : t.extras]), [N, I] = P(x), W = { label: o, noStyle: s, colon: !1, layout: "vertical" }, z = X((E) => E == null ? void 0 : ee(E, r), [r]); - return g(Gt, { name: a, rules: $, initialValue: z(C), normalize: z, children: (E, R, B) => { - var T; - return g(e, { type: r, rcform: B, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: f || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((T = $ == null ? void 0 : $[0]) == null ? void 0 : T.required) || !1, ...W }, fieldProps: { placeholder: l, ...I, ...E }, $setting: Object.assign({}, c, N) }); - } }); -}, Tt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { - const s = gi(r, yi, o); - return A("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, a && k.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] }); -}; -Tt.propTypes = { fields: w.array }; -const Rn = (Wt = Tt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: p, onFinish: c, onValuesChange: d = () => { -}, ...f }) => { - const { align: h, autoComplete: m, resource: C, items: b, hides: x, rowHeight: $, marginX: P, marginY: N, cols: I, listenChangeFields: W, listenChangeFieldsFunc: z, pk: E, uuid: R } = Sn(e), [B] = te.useForm(o), T = D(() => [{ name: "__PK__", value: E }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: R }, { name: "__PRIMARY_KEY__", value: n }], [E, e, R, C, n, a]); - return A(te, { className: p, name: i || e, layout: t || h, fields: T, form: B, autoComplete: m, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (F, J) => (({ changedValues: de, allValues: Te, listenChangeFields: Y, listenChangeFieldsFunc: _e, onValuesChange: lt, code: Et }) => { - lt(de, Te), _e && Array.isArray(Y) && xe.exec(_e, { changedValues: de, allValues: Te }, { getFieldValue: B.getFieldValue, setFieldValue: B.setFieldValue, setFieldsValue: B.setFieldsValue, isFieldTouched: B.isFieldTouched, isFieldsTouched: B.isFieldsTouched }); - })({ changedValues: F, allValues: J, listenChangeFields: W, listenChangeFieldsFunc: z, onValuesChange: d, code: e }), children: [g(Wt, { ...f, form: B, basicForm: s, code: e, fields: b, cols: I, rowHeight: $, itemMargin: [P, N] }), x == null ? void 0 : x.map((F) => { - var J; - return g(Gt, { name: F.code, children: g($n, { form: B, basicForm: s, name: F.code, type: F.type, initialValue: F.initialValue, initialValueLanguage: (J = F.extras) == null ? void 0 : J.initialValueLanguage }) }, JSON.stringify(F.code)); - })] }, e); -}); -var Wt; -const wi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a }) => { - const [o] = te.useForm(), s = Pn(n, r, e); - return V(() => { - s && o.setFieldsValue(s); - }, [s]), g(G, { actions: A(k.Fragment, { children: [g(v, { name: "保存", type: "primary", widget: () => { - const l = o.getFieldValue("__RESOURCE__"), { initDataUri: p = `/api/${n}` } = e || {}; - o.validateFields(!0).then((c) => l ? u.pick(c, [l]) : c).then((c) => L.post(r ? `${p}/${r}` : `${p}`, c).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 })); - } }), g(v, { name: "取消", widget: () => t(!1) })] }), extras: i, children: g(Rn, { form: o, code: n, primaryKey: r, ...a }) }); -}, Dt = /* @__PURE__ */ new Set(), Ct = (e = [], t = 0) => { - const i = e[t]; - if (i.length && !Dt.has(i)) { - const n = document.createElement("script"); - n.setAttribute("src", i), n.setAttribute("data-namespace", i), e.length > t + 1 && (n.onload = () => { - Ct(e, t + 1); - }, n.onerror = () => { - Ct(e, t + 1); - }), Dt.add(i), document.body.appendChild(n); - } -}, kt = ({ className: e, type: t, style: i = {}, ...n }) => g("span", { role: "img", className: M("ff-iconfont", e), style: i, ...n, children: g("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: g("use", { xlinkHref: `#${t}` }) }) }); -kt.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, kt.init = Ct; -const En = (e, t, i, n) => ke.redirect(i, t, n), Fn = (e, t = {}, i, n = {}) => { - var a; - const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, p]) => { - const c = u.get(t, ["router", s]); - if (!c && c !== 0 && l) throw `请传入 ${p}`; - return `${o}/${c}`; - }, `/api/${i}`); - return L.del(r, t.param).msg(); -}, Ut = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => { - const o = { loading: (s) => s === void 0 ? n : a((l) => ({ ...l, loading: s })), disabled: (s) => s === void 0 ? r : a((l) => ({ ...l, disabled: s })) }; - return u.isFunction(i) ? i.call(null, { ...t, ...o }) : u.isString(i) && i ? xe.exec(i, t, o) : null; -}, Ht = (e, t, i, n, r) => u.isString(i) && i ? le.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r)).catch((a) => { - _.error(i, { content: a.toString() }); -}) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), On = (e, t, i, n, r) => _.modal(wi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), jn = (e, t, i, n, r) => _.modal(Pt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), Ln = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { - const l = ce(ie), [p, c] = O({ leading: !0, trailing: !1 }), d = D(() => { - switch (t) { - case "redirect": - return u.partialRight(En, e, r); - case "func": - return u.partialRight(Ut, (r == null ? void 0 : r.code) ?? e, { status: p, setStatus: c }); - case "fsdpf-component": - return u.partialRight(Ht, e, r, a); - case "grid-layout-form": - return u.partialRight(On, e, r, a); - case "data-list": - return u.partialRight(jn, e, r, a); - case "destroy": - return u.partialRight(Fn, e, r, a); - default: - if (Rt(e) || k.isValidElement(e)) return u.partialRight(Ht, e, r, a); - if (u.isFunction(e)) return u.partialRight(Ut, (r == null ? void 0 : r.code) || e, { status: p, setStatus: c }); - } - return (...f) => console.error("useButton unknown widgetType", t, ...f); - }, [e, t]); - return [u.debounce((f) => (s == null || s(f), Promise.resolve(He(n, f, { list: l })).then((h) => d(f, { ...i, ...h })).then((h) => o == null ? void 0 : o(h)).catch(console.error)), 300, { leading: !0, trailing: !1 }), p]; -}, bi = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, o = "default") => D(() => { - const s = { type: "primary", className: M("ff-button", i), iconPosition: r, size: a }; - return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = M(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = g(kt, { type: n })), t && (s.children = t), s; -}, [o, e, i, n, r]), Ke = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: p, onBeforeClick: c, data: d, loading: f, disabled: h, tooltip: m, confirm: C, widget: b = () => { -}, widgetType: x, widgetData: $, widgetProps: P, widgetSetting: N, widgetContainerProps: I, ...W }) { - const z = D(() => ai(), []), E = u.isEmpty(m) || !m.enabled ? {} : m, R = u.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), B = bi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [T, F] = O(!1), [J, { disabled: de, loading: Te }] = Ln({ widget: b, widgetType: x, widgetData: $, widgetProps: P, widgetSetting: N, widgetContainerProps: I }, { onAfterClick: p, onBeforeClick: c }); - return g(Wi, { zIndex: z, okText: "确定", cancelText: "取消", getPopupContainer: (Y) => Y, ...R, disabled: de || h, open: T, onOpenChange: (Y) => { - if (!Y) return F(Y); - R.enabled ? F(Y) : J(d); - }, onConfirm: () => { - J(d); - }, onClick: (Y) => { - Y.stopPropagation(); - }, children: g(Di, { zIndex: z, getPopupContainer: (Y) => Y, ...E, title: T ? null : E == null ? void 0 : E.title, trigger: ["hover", "click"], children: g(Ze, { loading: Te || f, disabled: de || h, ...B, ...W, children: n || r }) }) }); -}, v = Ke("default"); -v.propTypes = { type: w.oneOf(["primary", "default", "danger", ""]), size: w.oneOf(["large", "middle", "small"]), name: w.string, icon: w.string, iconPosition: w.oneOf(["start", "end"]), data: w.any, widget: w.any, widgetType: w.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: w.object, widgetProps: w.object, widgetSetting: w.object, widgetContainerProps: w.object, tooltip: w.exact({ title: w.string.isRequired, placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func }), confirm: w.exact({ title: w.string.isRequired, cancelText: w.string, okText: w.string, okType: w.oneOf(["primary", "default", "danger", ""]), placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func, arrow: w.oneOfType([w.bool, w.exact({ pointAtCenter: w.bool })]) }) }; -const An = Ke("link"), Vn = Ke("circle"), In = Ke("round"), Mn = Ke("dashed"), $t = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: p, extras: c }) => { - const d = D(() => ai(), []), f = ce(ie), [h, m] = O(!1), [C, b] = O("hover"), [x, $] = O({}), [P, N] = O(), { placement: I, align: W, arrow: z = { pointAtCenter: !0 }, getPopupContainer: E, ...R } = o || {}; - V(() => { - i == "grid-layout-form" ? N(k.createElement(wi, { ...n, $setting: a, code: t })) : i == "data-list" ? N(k.createElement(Pt, { base62params: e, $setting: a, listCode: t })) : u.isString(t) ? le.getWidgetComponent(t).then(({ default: F }) => { - N(k.createElement(F, { ...n, $setting: a })); - }).catch((F) => N(F.toString())) : Rt(t) ? N(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && N(k.cloneElement(t, { ...n, $setting: a })); - }, [t, i, n]), V(() => { - Promise.resolve(He(r, e, { list: f })).then($); - }, [r, e, f.getBase62params]); - const B = (F, J = !1) => (m(F), !F && b("hover"), F ? l == null ? void 0 : l(x) : s == null ? void 0 : s(J)), T = (F) => { - m(!0), b("click"); - }; - return g(Ui, { zIndex: d, placement: I, onPopupClick: T, onClick: T, open: h, align: W, arrow: z, trigger: C, getPopupContainer: E, content: g(zn, { ...R, extras: c, children: P && k.cloneElement(P, { ...x, $close: (F) => B(!1, F) }) }), children: p, onOpenChange: B }); -}, zn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { - const [s, l] = O({}), p = X((h, m) => l((C) => ({ ...C, [h]: m })), []), c = X((h) => l((m) => ({ ...m, [h]: void 0 })), []), d = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, f = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n); - return g(Ue.Provider, { value: { ele: s, mount: p, unmount: c }, children: A("div", { className: M("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [A("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), i, A("div", { className: "ff-popup-footer", children: [f, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); -}; -$t.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const Jt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (h, m, C) => { -}, onBeforeClick: n = (h, m, C) => { -}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: p = (h, m) => g(v, { ...h, data: m }, h.uuid || Ae()), widgetContainerProps: c = {}, children: d, data: f }) => { - if (u.isEmpty(e)) return d; - const [h, m] = D(() => (e || []).reduce((b, x) => { - const $ = t.indexOf(x.widgetType); - return $ === -1 ? b[1].push(x) : b[0] ? $ < t.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = x) : b[1].push(x) : b[0] = x, b; - }, [null, []]), [e, t]); - o ? d = o(h, f) || d : d || (d = g(Ze, { ...bi(Object.assign(h != null && h.name || h != null && h.icon ? {} : { icon: "icon-location" }, h, { size: a }), r) })); - const C = m.map((b) => p(Object.assign({ uuid: b.uuid, type: b.type, name: b.name, widget: b.widget, widgetType: b.widgetType, widgetProps: b.widgetProps, widgetData: b.widgetData, widgetSetting: b.widgetSetting, widgetContainerProps: b.widgetContainerSetting, confirm: b.confirm, onAfterClick: u.partialRight(i, b, f), onBeforeClick: u.partialRight(n, b, f) }, { size: l, variant: s }), f)); - return g($t, { widget: h == null ? void 0 : h.widget, widgetType: h == null ? void 0 : h.widgetType, widgetProps: h == null ? void 0 : h.widgetProps, widgetSetting: h == null ? void 0 : h.widgetSetting, widgetContainerProps: Object.assign({}, c, h == null ? void 0 : h.widgetContainerProps), data: f, widgetData: h == null ? void 0 : h.widgetData, extras: C, onAfterClick: u.partialRight(i, h, f), onBeforeClick: u.partialRight(n, h, f), children: d }); -}; -Jt.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...v.propTypes, widgetType: v.propTypes.widgetType.isRequired })), btnSize: v.propTypes.size, btnRender: w.func, btnVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: w.func, labelSize: v.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: v.propTypes.widgetContainerProps, data: v.propTypes.data }, v.Link = An, v.Link.defaultProps = v.defaultProps, v.Link.propTypes = v.propTypes, v.Circle = Vn, v.Circle.defaultProps = v.defaultProps, v.Circle.propTypes = v.propTypes, v.Round = In, v.Round.defaultProps = v.defaultProps, v.Round.propTypes = v.propTypes, v.Dashed = Mn, v.Dashed.defaultProps = v.defaultProps, v.Dashed.propTypes = v.propTypes, v.Popover = $t, v.GroupPopover = Jt; -const Bn = ({ fields: e, formProps: t, $close: i }) => { - const [n] = te.useForm(), r = D(() => [{ name: "__PROPS__", value: t }], [t]); - return g(G, { actions: A(k.Fragment, { children: [g(v, { name: "取消", widget: () => i(!1) }), g(v, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(te, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => g(yi, { code: a, ...o }, a)) }) }); -}, qn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => A(Xi, { ...s, prefixCls: "ff-drawer", className: M("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [A("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: g(vt, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), A("div", { className: "ff-popup-footer", children: [o, a] })] }), Wn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...p }) => { - const c = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } }; - return g(Qi, { ...p, ...c, prefixCls: "ff-modal", modalRender: () => A("div", { className: M("ff-modal-content ff-popup", e), children: [A("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: p.onClose, children: g(vt, { type: "close" }) }), r, a] }), g("div", { className: "ff-popup-body", children: n }), A("div", { className: "ff-popup-footer", children: [s, o] })] }) }); -}, Ci = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => { - const [o, s] = O({}), [l, p] = O(!0), c = X((m, C) => s((b) => ({ ...b, [m]: C })), []), d = X((m) => s((C) => ({ ...C, [m]: void 0 })), []); - let f = { ...a, className: o.rootClassName, title: o.title || r && k.createElement("div", { className: M("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => p(!1) }; - const h = () => { - t(!1); - }; - return g(Ue.Provider, { value: { ele: o, mount: c, unmount: d }, children: e && e !== "center" ? g(qn, { ...f, placement: e, open: l, afterOpenChange: (m) => !m && h() }) : g(Wn, { ...f, visible: l, afterClose: h }) }); -}; -Ci.propTypes = { placement: w.oneOf(["center", "left", "top", "right", "bottom"]) }; -const K = () => { - const [e, t] = Li({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (a) => { - const { offsetHeight: o } = a; - return { height: o }; - }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, i] = k.useReducer((a) => a + 1, 0); - V(() => { - K.$onClick = n, K.$queue.forEach(([a, o, s], l, p) => { - r([o, s], ...a), delete p[l]; - }); - }, []); - const n = (a, o = {}, s = {}) => new Promise((l, p) => r([l, p], a, o, s)), r = ([a, o], s, l = {}, p = {}) => { - const c = K.$index++, d = (f) => ((h, m) => (K.$popups.delete(h), i(), m == null ? void 0 : m()))(c, () => a(f)); - if (s === ei) return e.open({ ...p, key: c, content: k.createElement(s, { ...l, $close: () => e.close(c) }) }); - K.$popups.set(c, k.createElement(Ci, { zIndex: c, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...p, key: c, $close: d }, k.isValidElement(s) ? k.cloneElement(s, { ...l, $close: d }) : s != null && s.name || At.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === At.ForwardRef ? k.createElement(s, { ...l, $close: d }) : s)), i(); - }; - return A(k.Fragment, { children: [Array.from(K.$popups).map(([a, o]) => o), t] }); -}; -K.$popups = /* @__PURE__ */ new Map(), K.$index = 9999, K.$queue = [], K.$onClick = (...e) => new Promise((t, i) => { - K.$queue.push([e, t, i]); -}); -const Kt = (e, t, i = {}) => K.$onClick(e, t, i), ut = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => K.$onClick(ei, { content: e, ...n }, { showProgress: t, duration: i }), _ = { modal: Kt, confirm: (e, t = {}) => K.$onClick(Zi, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Kt(Bn, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => { - if (n === !1) throw !1; - return n; -}), notification: ut, success: (e, t = { duration: 1.5 }) => ut(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => ut(e, { ...t, className: "ff-notification-error", icon: "close" }) }; -je.configure({ showSpinner: !1 }), Le.interceptors.request.use((e) => { - e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); - const t = window.localStorage.getItem(Qe); - return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, je.inc(), e; -}, (e) => (je.done(), Promise.reject({ code: -1, msg: e }))), Le.interceptors.response.use(({ data: e, headers: t }) => (je.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { - return je.done(), Promise.reject(e.message); -}), window.addEventListener("unhandledrejection", pt.onUnhandledRejection), pt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ke.redirect(Ve.get("Common.WEBSITE_LOGIN_PAGE"))); -const xt = { appUrl: "", init: (e, t, i) => { - xt.appUrl = i, Le.defaults.baseURL = i, Le.defaults.timeout = 15e3, Object.assign(xt, new pt(e, t, Le)); -} }, L = xt; -class Nt extends Error { - constructor(t, i) { - super(i), Error.captureStackTrace && Error.captureStackTrace(this, Nt), !i instanceof Ie && (this.name = `${t} Error Runtime`); - } -} -class Ie extends Error { - constructor(t, ...i) { - super(...i), Error.captureStackTrace && Error.captureStackTrace(this, Ie), this.name = `${t} Not Found`; - } -} -const gt = "mine", Qe = "token"; -var Ce, Oe; -const oe = class oe { - constructor() { - j(this, Oe, /* @__PURE__ */ new Map()); - S(this, "setVendor", (t, i) => y(this, Oe).set(t, new Qt(i, async (n, r) => { - var o, s; - if (!(n != null && n.default)) throw "@pkg not found"; - let a = () => r; - switch ("function") { - case typeof (a = (o = n.default) == null ? void 0 : o[`./${r}/index.jsx`]): - case typeof (a = (s = n.default) == null ? void 0 : s[`./${r}/index.js`]): - return a(); - } - throw new Ie(r); - }))); - S(this, "getWidgetComponent", async (t) => { - if (!t) throw "getWidgetComponent widget is required"; - if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t); - const [, i] = t == null ? void 0 : t.split("@pkg/"); - if (!i) throw new Ie(t); - try { - return y(this, Oe).has("pkg") ? await y(this, Oe).get("pkg").get(i) : await import(`${L.appUrl}/api/pkg-import/web?name=${t}`); - } catch (n) { - throw new Nt(t, n); - } - }); - S(this, "getRoutes", () => L.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); - S(this, "getMenus", () => L.get("/api/my-menu")); - S(this, "getConfigure", () => L.get("api/init-configure")); - S(this, "getWidgetOperationAuth", () => L.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], []))); - S(this, "getPhoneNumber", (t) => L.get(`/api/user-wx-phone-number/${t}`)); - S(this, "getUserToken", () => { - const t = window.localStorage.getItem(Qe); - if (!t) return ""; - const i = t.split("."); - if (!Array.isArray(i) || i.length !== 3) throw "登录令牌无效!"; - const { iat: n } = JSON.parse(window.atob(i[1])); - if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; - return t; - }); - S(this, "checkUserToken", () => { - try { - return !!this.getUserToken(); - } catch { - return !1; - } - }); - S(this, "getUserInfo", (t = !0) => { - var i; - try { - const n = this.getUserToken(); - if (!n) return Promise.resolve(null); - const { iat: r } = JSON.parse(window.atob((i = n == null ? void 0 : n.split(".")) == null ? void 0 : i[1])), { iat: a, ...o } = L.decode(window.localStorage.getItem(gt) || "", {}); - return a === r ? Promise.resolve(o) : L.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(gt, L.encode({ ...s, iat: r })), s)); - } catch (n) { - console.error(n), t && _.error("请登录").then(this.logout); - } - return Promise.resolve(null); - }); - S(this, "login", (t, i, n = {}) => L.post("/api/user-token", { username: t, passwd: Ai.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Qe, r), r))); - S(this, "logout", (t) => (window.localStorage.removeItem(gt), window.localStorage.removeItem(Qe), t == null ? void 0 : t())); - if (y(oe, Ce)) return y(oe, Ce); - } -}; -Ce = new WeakMap(), Oe = new WeakMap(), j(oe, Ce, null), S(oe, "getInstance", () => (y(oe, Ce) || H(oe, Ce, new oe()), y(oe, Ce))); -let St = oe; -const le = St.getInstance(), Dn = k.createContext({ user: {}, initUser: () => { -}, initUserComplete: !1 }), Un = k.createContext({ set: () => { -}, get: () => { -}, assign: () => { -}, currentRoute: () => { -} }), Rt = (e) => !!(e != null && e.name) && (e.prototype instanceof k.Component || /^[A-Z]/.test(e.name)), Hn = (e, t) => { - if (!e || typeof window > "u") return; - let i = document.querySelector(`style[ff-style-token="${t}"]`); - return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e); -}, Jn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Dn, AppGlobalParamsContext: Un, cache: Qt, configure: Ve, default: le, func: xe, http: L, insertStyle: Hn, isReactComponent: Rt, route: ke }, Symbol.toStringTag, { value: "Module" })); -export { - yi as $, - bn as A, - sn as B, - ln as C, - et as D, - nn as E, - fr as F, - br as G, - hn as H, - yr as I, - si as J, - ft as K, - rn as L, - an as M, - Cn as N, - kn as O, - Cr as P, - kr as Q, - di as R, - st as S, - xr as T, - Sr as U, - Je as V, - ot as W, - vr as X, - Pr as Y, - Rn as Z, - Tt as _, - ti as a, - wi as a0, - Sn as a1, - vn as a2, - Pn as a3, - fi as a4, - Tn as a5, - Tr as a6, - kt as a7, - v as a8, - en as a9, - Ln as aa, - G as ab, - Ue as ac, - Zt as ad, - K as ae, - _ as af, - cr as ag, - dr as ah, - ur as ai, - le as aj, - Rt as ak, - Hn as al, - L as am, - Qt as an, - Ve as ao, - xe as ap, - ke as aq, - Dn as ar, - Un as as, - He as b, - pr as c, - ii as d, - mr as e, - hr as f, - tn as g, - ai as h, - oi as i, - wr as j, - ui as k, - pi as l, - yn as m, - fn as n, - gi as o, - ci as p, - li as q, - dt as r, - pn as s, - ee as t, - gr as u, - gn as v, - dn as w, - Pt as x, - ie as y, - mn as z -}; diff --git a/dist/common/vender-C0IfHU5B.js b/dist/common/vender-C0IfHU5B.js deleted file mode 100644 index b68f3f5..0000000 --- a/dist/common/vender-C0IfHU5B.js +++ /dev/null @@ -1,1486 +0,0 @@ -function ce(t, e) { - return function() { - return t.apply(e, arguments); - }; -} -const { toString: Ce } = Object.prototype, { getPrototypeOf: xt } = Object, st = (ft = /* @__PURE__ */ Object.create(null), (t) => { - const e = Ce.call(t); - return ft[e] || (ft[e] = e.slice(8, -1).toLowerCase()); -}); -var ft; -const k = (t) => (t = t.toLowerCase(), (e) => st(e) === t), ut = (t) => (e) => typeof e === t, { isArray: W } = Array, J = ut("undefined"), Bt = k("ArrayBuffer"), Pe = ut("string"), N = ut("function"), Lt = ut("number"), Y = (t) => t !== null && typeof t == "object", Z = (t) => { - if (st(t) !== "object") return !1; - const e = xt(t); - return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t); -}, _e = k("Date"), xe = k("File"), je = k("Blob"), Ne = k("FileList"), Ue = k("URLSearchParams"), [ke, Be, Le, Fe] = ["ReadableStream", "Request", "Response", "Headers"].map(k); -function V(t, e, { allOwnKeys: n = !1 } = {}) { - if (t == null) return; - let r, s; - if (typeof t != "object" && (t = [t]), W(t)) for (r = 0, s = t.length; r < s; r++) e.call(null, t[r], r, t); - else { - const i = n ? Object.getOwnPropertyNames(t) : Object.keys(t), a = i.length; - let g; - for (r = 0; r < a; r++) g = i[r], e.call(null, t[g], g, t); - } -} -function Ft(t, e) { - e = e.toLowerCase(); - const n = Object.keys(t); - let r, s = n.length; - for (; s-- > 0; ) if (r = n[s], e === r.toLowerCase()) return r; - return null; -} -const ue = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Mt = (t) => !J(t) && t !== ue, Me = (ht = typeof Uint8Array < "u" && xt(Uint8Array), (t) => ht && t instanceof ht); -var ht; -const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), qe = k("RegExp"), qt = (t, e) => { - const n = Object.getOwnPropertyDescriptors(t), r = {}; - V(n, (s, i) => { - let a; - (a = e(s, i, t)) !== !1 && (r[i] = a || s); - }), Object.defineProperties(t, r); -}, dt = "abcdefghijklmnopqrstuvwxyz", It = "0123456789", Wt = { DIGIT: It, ALPHA: dt, ALPHA_DIGIT: dt + dt.toUpperCase() + It }, Ie = k("AsyncFunction"), y = { isArray: W, isArrayBuffer: Bt, isBuffer: function(t) { - return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && N(t.constructor.isBuffer) && t.constructor.isBuffer(t); -}, isFormData: (t) => { - let e; - return t && (typeof FormData == "function" && t instanceof FormData || N(t.append) && ((e = st(t)) === "formdata" || e === "object" && N(t.toString) && t.toString() === "[object FormData]")); -}, isArrayBufferView: function(t) { - let e; - return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && Bt(t.buffer), e; -}, isString: Pe, isNumber: Lt, isBoolean: (t) => t === !0 || t === !1, isObject: Y, isPlainObject: Z, isReadableStream: ke, isRequest: Be, isResponse: Le, isHeaders: Fe, isUndefined: J, isDate: _e, isFile: xe, isBlob: je, isRegExp: qe, isFunction: N, isStream: (t) => Y(t) && N(t.pipe), isURLSearchParams: Ue, isTypedArray: Me, isFileList: Ne, forEach: V, merge: function t() { - const { caseless: e } = Mt(this) && this || {}, n = {}, r = (s, i) => { - const a = e && Ft(n, i) || i; - Z(n[a]) && Z(s) ? n[a] = t(n[a], s) : Z(s) ? n[a] = t({}, s) : W(s) ? n[a] = s.slice() : n[a] = s; - }; - for (let s = 0, i = arguments.length; s < i; s++) arguments[s] && V(arguments[s], r); - return n; -}, extend: (t, e, n, { allOwnKeys: r } = {}) => (V(e, (s, i) => { - n && N(s) ? t[i] = ce(s, n) : t[i] = s; -}, { allOwnKeys: r }), t), trim: (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), stripBOM: (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits: (t, e, n, r) => { - t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), n && Object.assign(t.prototype, n); -}, toFlatObject: (t, e, n, r) => { - let s, i, a; - const g = {}; - if (e = e || {}, t == null) return e; - do { - for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; ) a = s[i], r && !r(a, t, e) || g[a] || (e[a] = t[a], g[a] = !0); - t = n !== !1 && xt(t); - } while (t && (!n || n(t, e)) && t !== Object.prototype); - return e; -}, kindOf: st, kindOfTest: k, endsWith: (t, e, n) => { - t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length; - const r = t.indexOf(e, n); - return r !== -1 && r === n; -}, toArray: (t) => { - if (!t) return null; - if (W(t)) return t; - let e = t.length; - if (!Lt(e)) return null; - const n = new Array(e); - for (; e-- > 0; ) n[e] = t[e]; - return n; -}, forEachEntry: (t, e) => { - const n = (t && t[Symbol.iterator]).call(t); - let r; - for (; (r = n.next()) && !r.done; ) { - const s = r.value; - e.call(t, s[0], s[1]); - } -}, matchAll: (t, e) => { - let n; - const r = []; - for (; (n = t.exec(e)) !== null; ) r.push(n); - return r; -}, isHTMLForm: De, hasOwnProperty: Dt, hasOwnProp: Dt, reduceDescriptors: qt, freezeMethods: (t) => { - qt(t, (e, n) => { - if (N(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; - const r = t[n]; - N(r) && (e.enumerable = !1, "writable" in e ? e.writable = !1 : e.set || (e.set = () => { - throw Error("Can not rewrite read-only method '" + n + "'"); - })); - }); -}, toObjectSet: (t, e) => { - const n = {}, r = (s) => { - s.forEach((i) => { - n[i] = !0; - }); - }; - return W(t) ? r(t) : r(String(t).split(e)), n; -}, toCamelCase: (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) { - return n.toUpperCase() + r; -}), noop: () => { -}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: Ft, global: ue, isContextDefined: Mt, ALPHABET: Wt, generateString: (t = 16, e = Wt.ALPHA_DIGIT) => { - let n = ""; - const { length: r } = e; - for (; t--; ) n += e[Math.random() * r | 0]; - return n; -}, isSpecCompliantForm: function(t) { - return !!(t && N(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]); -}, toJSONObject: (t) => { - const e = new Array(10), n = (r, s) => { - if (Y(r)) { - if (e.indexOf(r) >= 0) return; - if (!("toJSON" in r)) { - e[s] = r; - const i = W(r) ? [] : {}; - return V(r, (a, g) => { - const m = n(a, s + 1); - !J(m) && (i[g] = m); - }), e[s] = void 0, i; - } - } - return r; - }; - return n(t, 0); -}, isAsyncFn: Ie, isThenable: (t) => t && (Y(t) || N(t)) && N(t.then) && N(t.catch) }; -function O(t, e, n, r, s) { - Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s); -} -y.inherits(O, Error, { toJSON: function() { - return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: y.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; -} }); -const zt = O.prototype, $t = {}; -["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((t) => { - $t[t] = { value: t }; -}), Object.defineProperties(O, $t), Object.defineProperty(zt, "isAxiosError", { value: !0 }), O.from = (t, e, n, r, s, i) => { - const a = Object.create(zt); - return y.toFlatObject(t, a, function(g) { - return g !== Error.prototype; - }, (g) => g !== "isAxiosError"), O.call(a, t.message, e, n, r, s), a.cause = t, a.name = t.name, i && Object.assign(a, i), a; -}; -function pt(t) { - return y.isPlainObject(t) || y.isArray(t); -} -function le(t) { - return y.endsWith(t, "[]") ? t.slice(0, -2) : t; -} -function Ht(t, e, n) { - return t ? t.concat(e).map(function(r, s) { - return r = le(r), !n && s ? "[" + r + "]" : r; - }).join(n ? "." : "") : e; -} -const We = y.toFlatObject(y, {}, null, function(t) { - return /^is[A-Z]/.test(t); -}); -function it(t, e, n) { - if (!y.isObject(t)) throw new TypeError("target must be an object"); - e = e || new FormData(); - const r = (n = y.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(w, E) { - return !y.isUndefined(E[w]); - })).metaTokens, s = n.visitor || d, i = n.dots, a = n.indexes, g = (n.Blob || typeof Blob < "u" && Blob) && y.isSpecCompliantForm(e); - if (!y.isFunction(s)) throw new TypeError("visitor must be a function"); - function m(w) { - if (w === null) return ""; - if (y.isDate(w)) return w.toISOString(); - if (!g && y.isBlob(w)) throw new O("Blob is not supported. Use a Buffer instead."); - return y.isArrayBuffer(w) || y.isTypedArray(w) ? g && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w; - } - function d(w, E, h) { - let u = w; - if (w && !h && typeof w == "object") { - if (y.endsWith(E, "{}")) E = r ? E : E.slice(0, -2), w = JSON.stringify(w); - else if (y.isArray(w) && function(o) { - return y.isArray(o) && !o.some(pt); - }(w) || (y.isFileList(w) || y.endsWith(E, "[]")) && (u = y.toArray(w))) return E = le(E), u.forEach(function(o, c) { - !y.isUndefined(o) && o !== null && e.append(a === !0 ? Ht([E], c, i) : a === null ? E : E + "[]", m(o)); - }), !1; - } - return !!pt(w) || (e.append(Ht(h, E, i), m(w)), !1); - } - const b = [], v = Object.assign(We, { defaultVisitor: d, convertValue: m, isVisitable: pt }); - if (!y.isObject(t)) throw new TypeError("data must be an object"); - return function w(E, h) { - if (!y.isUndefined(E)) { - if (b.indexOf(E) !== -1) throw Error("Circular reference detected in " + h.join(".")); - b.push(E), y.forEach(E, function(u, o) { - (!(y.isUndefined(u) || u === null) && s.call(e, u, y.isString(o) ? o.trim() : o, h, v)) === !0 && w(u, h ? h.concat(o) : [o]); - }), b.pop(); - } - }(t), e; -} -function Jt(t) { - const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; - return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) { - return e[n]; - }); -} -function jt(t, e) { - this._pairs = [], t && it(t, this, e); -} -const Vt = jt.prototype; -function ze(t) { - return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); -} -function fe(t, e, n) { - if (!e) return t; - const r = n && n.encode || ze, s = n && n.serialize; - let i; - if (i = s ? s(e, n) : y.isURLSearchParams(e) ? e.toString() : new jt(e, n).toString(r), i) { - const a = t.indexOf("#"); - a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + i; - } - return t; -} -Vt.append = function(t, e) { - this._pairs.push([t, e]); -}, Vt.toString = function(t) { - const e = t ? function(n) { - return t.call(this, n, Jt); - } : Jt; - return this._pairs.map(function(n) { - return e(n[0]) + "=" + e(n[1]); - }, "").join("&"); -}; -class Kt { - constructor() { - this.handlers = []; - } - use(e, n, r) { - return this.handlers.push({ fulfilled: e, rejected: n, synchronous: !!r && r.synchronous, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; - } - eject(e) { - this.handlers[e] && (this.handlers[e] = null); - } - clear() { - this.handlers && (this.handlers = []); - } - forEach(e) { - y.forEach(this.handlers, function(n) { - n !== null && e(n); - }); - } -} -const he = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, $e = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : jt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Nt = typeof window < "u" && typeof document < "u", He = (Gt = typeof navigator < "u" && navigator.product, Nt && ["ReactNative", "NativeScript", "NS"].indexOf(Gt) < 0); -var Gt; -const Je = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ve = Nt && window.location.href || "http://localhost", U = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Nt, hasStandardBrowserEnv: He, hasStandardBrowserWebWorkerEnv: Je, origin: Ve }, Symbol.toStringTag, { value: "Module" })), ...$e }; -function de(t) { - function e(n, r, s, i) { - let a = n[i++]; - if (a === "__proto__") return !0; - const g = Number.isFinite(+a), m = i >= n.length; - return a = !a && y.isArray(s) ? s.length : a, m ? (y.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !g) : (s[a] && y.isObject(s[a]) || (s[a] = []), e(n, r, s[a], i) && y.isArray(s[a]) && (s[a] = function(d) { - const b = {}, v = Object.keys(d); - let w; - const E = v.length; - let h; - for (w = 0; w < E; w++) h = v[w], b[h] = d[h]; - return b; - }(s[a])), !g); - } - if (y.isFormData(t) && y.isFunction(t.entries)) { - const n = {}; - return y.forEachEntry(t, (r, s) => { - e(function(i) { - return y.matchAll(/\w+|\[(\w*)]/g, i).map((a) => a[0] === "[]" ? "" : a[1] || a[0]); - }(r), s, n, 0); - }), n; - } - return null; -} -const Q = { transitional: he, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) { - const n = e.getContentType() || "", r = n.indexOf("application/json") > -1, s = y.isObject(t); - if (s && y.isHTMLForm(t) && (t = new FormData(t)), y.isFormData(t)) return r ? JSON.stringify(de(t)) : t; - if (y.isArrayBuffer(t) || y.isBuffer(t) || y.isStream(t) || y.isFile(t) || y.isBlob(t) || y.isReadableStream(t)) return t; - if (y.isArrayBufferView(t)) return t.buffer; - if (y.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); - let i; - if (s) { - if (n.indexOf("application/x-www-form-urlencoded") > -1) return function(a, g) { - return it(a, new U.classes.URLSearchParams(), Object.assign({ visitor: function(m, d, b, v) { - return U.isNode && y.isBuffer(m) ? (this.append(d, m.toString("base64")), !1) : v.defaultVisitor.apply(this, arguments); - } }, g)); - }(t, this.formSerializer).toString(); - if ((i = y.isFileList(t)) || n.indexOf("multipart/form-data") > -1) { - const a = this.env && this.env.FormData; - return it(i ? { "files[]": t } : t, a && new a(), this.formSerializer); - } - } - return s || r ? (e.setContentType("application/json", !1), function(a, g, m) { - if (y.isString(a)) try { - return (g || JSON.parse)(a), y.trim(a); - } catch (d) { - if (d.name !== "SyntaxError") throw d; - } - return (m || JSON.stringify)(a); - }(t)) : t; -}], transformResponse: [function(t) { - const e = this.transitional || Q.transitional, n = e && e.forcedJSONParsing, r = this.responseType === "json"; - if (y.isResponse(t) || y.isReadableStream(t)) return t; - if (t && y.isString(t) && (n && !this.responseType || r)) { - const s = !(e && e.silentJSONParsing) && r; - try { - return JSON.parse(t); - } catch (i) { - if (s) - throw i.name === "SyntaxError" ? O.from(i, O.ERR_BAD_RESPONSE, this, null, this.response) : i; - } - } - return t; -}], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: U.classes.FormData, Blob: U.classes.Blob }, validateStatus: function(t) { - return t >= 200 && t < 300; -}, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; -y.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => { - Q.headers[t] = {}; -}); -const Ke = y.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), Xt = Symbol("internals"); -function H(t) { - return t && String(t).trim().toLowerCase(); -} -function tt(t) { - return t === !1 || t == null ? t : y.isArray(t) ? t.map(tt) : String(t); -} -function gt(t, e, n, r, s) { - return y.isFunction(r) ? r.call(this, e, n) : (s && (e = n), y.isString(e) ? y.isString(r) ? e.indexOf(r) !== -1 : y.isRegExp(r) ? r.test(e) : void 0 : void 0); -} -class x { - constructor(e) { - e && this.set(e); - } - set(e, n, r) { - const s = this; - function i(g, m, d) { - const b = H(m); - if (!b) throw new Error("header name must be a non-empty string"); - const v = y.findKey(s, b); - (!v || s[v] === void 0 || d === !0 || d === void 0 && s[v] !== !1) && (s[v || m] = tt(g)); - } - const a = (g, m) => y.forEach(g, (d, b) => i(d, b, m)); - if (y.isPlainObject(e) || e instanceof this.constructor) a(e, n); - else if (y.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) a(((g) => { - const m = {}; - let d, b, v; - return g && g.split(` -`).forEach(function(w) { - v = w.indexOf(":"), d = w.substring(0, v).trim().toLowerCase(), b = w.substring(v + 1).trim(), !d || m[d] && Ke[d] || (d === "set-cookie" ? m[d] ? m[d].push(b) : m[d] = [b] : m[d] = m[d] ? m[d] + ", " + b : b); - }), m; - })(e), n); - else if (y.isHeaders(e)) for (const [g, m] of e.entries()) i(m, g, r); - else e != null && i(n, e, r); - return this; - } - get(e, n) { - if (e = H(e)) { - const r = y.findKey(this, e); - if (r) { - const s = this[r]; - if (!n) return s; - if (n === !0) return function(i) { - const a = /* @__PURE__ */ Object.create(null), g = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let m; - for (; m = g.exec(i); ) a[m[1]] = m[2]; - return a; - }(s); - if (y.isFunction(n)) return n.call(this, s, r); - if (y.isRegExp(n)) return n.exec(s); - throw new TypeError("parser must be boolean|regexp|function"); - } - } - } - has(e, n) { - if (e = H(e)) { - const r = y.findKey(this, e); - return !(!r || this[r] === void 0 || n && !gt(0, this[r], r, n)); - } - return !1; - } - delete(e, n) { - const r = this; - let s = !1; - function i(a) { - if (a = H(a)) { - const g = y.findKey(r, a); - !g || n && !gt(0, r[g], g, n) || (delete r[g], s = !0); - } - } - return y.isArray(e) ? e.forEach(i) : i(e), s; - } - clear(e) { - const n = Object.keys(this); - let r = n.length, s = !1; - for (; r--; ) { - const i = n[r]; - e && !gt(0, this[i], i, e, !0) || (delete this[i], s = !0); - } - return s; - } - normalize(e) { - const n = this, r = {}; - return y.forEach(this, (s, i) => { - const a = y.findKey(r, i); - if (a) return n[a] = tt(s), void delete n[i]; - const g = e ? function(m) { - return m.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (d, b, v) => b.toUpperCase() + v); - }(i) : String(i).trim(); - g !== i && delete n[i], n[g] = tt(s), r[g] = !0; - }), this; - } - concat(...e) { - return this.constructor.concat(this, ...e); - } - toJSON(e) { - const n = /* @__PURE__ */ Object.create(null); - return y.forEach(this, (r, s) => { - r != null && r !== !1 && (n[s] = e && y.isArray(r) ? r.join(", ") : r); - }), n; - } - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - toString() { - return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(` -`); - } - get [Symbol.toStringTag]() { - return "AxiosHeaders"; - } - static from(e) { - return e instanceof this ? e : new this(e); - } - static concat(e, ...n) { - const r = new this(e); - return n.forEach((s) => r.set(s)), r; - } - static accessor(e) { - const n = (this[Xt] = this[Xt] = { accessors: {} }).accessors, r = this.prototype; - function s(i) { - const a = H(i); - n[a] || (function(g, m) { - const d = y.toCamelCase(" " + m); - ["get", "set", "has"].forEach((b) => { - Object.defineProperty(g, b + d, { value: function(v, w, E) { - return this[b].call(this, m, v, w, E); - }, configurable: !0 }); - }); - }(r, i), n[a] = !0); - } - return y.isArray(e) ? e.forEach(s) : s(e), this; - } -} -function mt(t, e) { - const n = this || Q, r = e || n, s = x.from(r.headers); - let i = r.data; - return y.forEach(t, function(a) { - i = a.call(n, i, s.normalize(), e ? e.status : void 0); - }), s.normalize(), i; -} -function pe(t) { - return !(!t || !t.__CANCEL__); -} -function $(t, e, n) { - O.call(this, t ?? "canceled", O.ERR_CANCELED, e, n), this.name = "CanceledError"; -} -function ge(t, e, n) { - const r = n.config.validateStatus; - n.status && r && !r(n.status) ? e(new O("Request failed with status code " + n.status, [O.ERR_BAD_REQUEST, O.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : t(n); -} -x.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), y.reduceDescriptors(x.prototype, ({ value: t }, e) => { - let n = e[0].toUpperCase() + e.slice(1); - return { get: () => t, set(r) { - this[n] = r; - } }; -}), y.freezeMethods(x), y.inherits($, O, { __CANCEL__: !0 }); -const at = (t, e, n = 3) => { - let r = 0; - const s = function(i, a) { - i = i || 10; - const g = new Array(i), m = new Array(i); - let d, b = 0, v = 0; - return a = a !== void 0 ? a : 1e3, function(w) { - const E = Date.now(), h = m[v]; - d || (d = E), g[b] = w, m[b] = E; - let u = v, o = 0; - for (; u !== b; ) o += g[u++], u %= i; - if (b = (b + 1) % i, b === v && (v = (v + 1) % i), E - d < a) return; - const c = h && E - h; - return c ? Math.round(1e3 * o / c) : void 0; - }; - }(50, 250); - return function(i, a) { - let g = 0; - const m = 1e3 / a; - let d = null; - return function() { - const b = this === !0, v = Date.now(); - if (b || v - g > m) return d && (clearTimeout(d), d = null), g = v, i.apply(null, arguments); - d || (d = setTimeout(() => (d = null, g = Date.now(), i.apply(null, arguments)), m - (v - g))); - }; - }((i) => { - const a = i.loaded, g = i.lengthComputable ? i.total : void 0, m = a - r, d = s(m); - r = a; - const b = { loaded: a, total: g, progress: g ? a / g : void 0, bytes: m, rate: d || void 0, estimated: d && g && a <= g ? (g - a) / d : void 0, event: i, lengthComputable: g != null }; - b[e ? "download" : "upload"] = !0, t(b); - }, n); -}, Ge = U.hasStandardBrowserEnv ? function() { - const t = /(msie|trident)/i.test(navigator.userAgent), e = document.createElement("a"); - let n; - function r(s) { - let i = s; - return t && (e.setAttribute("href", i), i = e.href), e.setAttribute("href", i), { href: e.href, protocol: e.protocol ? e.protocol.replace(/:$/, "") : "", host: e.host, search: e.search ? e.search.replace(/^\?/, "") : "", hash: e.hash ? e.hash.replace(/^#/, "") : "", hostname: e.hostname, port: e.port, pathname: e.pathname.charAt(0) === "/" ? e.pathname : "/" + e.pathname }; - } - return n = r(window.location.href), function(s) { - const i = y.isString(s) ? r(s) : s; - return i.protocol === n.protocol && i.host === n.host; - }; -}() : function() { - return !0; -}, Xe = U.hasStandardBrowserEnv ? { write(t, e, n, r, s, i) { - const a = [t + "=" + encodeURIComponent(e)]; - y.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), y.isString(r) && a.push("path=" + r), y.isString(s) && a.push("domain=" + s), i === !0 && a.push("secure"), document.cookie = a.join("; "); -}, read(t) { - const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)")); - return e ? decodeURIComponent(e[3]) : null; -}, remove(t) { - this.write(t, "", Date.now() - 864e5); -} } : { write() { -}, read: () => null, remove() { -} }; -function me(t, e) { - return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(n, r) { - return r ? n.replace(/\/?\/$/, "") + "/" + r.replace(/^\/+/, "") : n; - }(t, e) : e; -} -const Qt = (t) => t instanceof x ? { ...t } : t; -function I(t, e) { - e = e || {}; - const n = {}; - function r(d, b, v) { - return y.isPlainObject(d) && y.isPlainObject(b) ? y.merge.call({ caseless: v }, d, b) : y.isPlainObject(b) ? y.merge({}, b) : y.isArray(b) ? b.slice() : b; - } - function s(d, b, v) { - return y.isUndefined(b) ? y.isUndefined(d) ? void 0 : r(void 0, d, v) : r(d, b, v); - } - function i(d, b) { - if (!y.isUndefined(b)) return r(void 0, b); - } - function a(d, b) { - return y.isUndefined(b) ? y.isUndefined(d) ? void 0 : r(void 0, d) : r(void 0, b); - } - function g(d, b, v) { - return v in e ? r(d, b) : v in t ? r(void 0, d) : void 0; - } - const m = { url: i, method: i, data: i, baseURL: a, transformRequest: a, transformResponse: a, paramsSerializer: a, timeout: a, timeoutMessage: a, withCredentials: a, withXSRFToken: a, adapter: a, responseType: a, xsrfCookieName: a, xsrfHeaderName: a, onUploadProgress: a, onDownloadProgress: a, decompress: a, maxContentLength: a, maxBodyLength: a, beforeRedirect: a, transport: a, httpAgent: a, httpsAgent: a, cancelToken: a, socketPath: a, responseEncoding: a, validateStatus: g, headers: (d, b) => s(Qt(d), Qt(b), !0) }; - return y.forEach(Object.keys(Object.assign({}, t, e)), function(d) { - const b = m[d] || s, v = b(t[d], e[d], d); - y.isUndefined(v) && b !== g || (n[d] = v); - }), n; -} -const ye = (t) => { - const e = I({}, t); - let n, { data: r, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName: a, headers: g, auth: m } = e; - if (e.headers = g = x.from(g), e.url = fe(me(e.baseURL, e.url), t.params, t.paramsSerializer), m && g.set("Authorization", "Basic " + btoa((m.username || "") + ":" + (m.password ? unescape(encodeURIComponent(m.password)) : ""))), y.isFormData(r)) { - if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) g.setContentType(void 0); - else if ((n = g.getContentType()) !== !1) { - const [d, ...b] = n ? n.split(";").map((v) => v.trim()).filter(Boolean) : []; - g.setContentType([d || "multipart/form-data", ...b].join("; ")); - } - } - if (U.hasStandardBrowserEnv && (s && y.isFunction(s) && (s = s(e)), s || s !== !1 && Ge(e.url))) { - const d = i && a && Xe.read(a); - d && g.set(i, d); - } - return e; -}, Qe = typeof XMLHttpRequest < "u" && function(t) { - return new Promise(function(e, n) { - const r = ye(t); - let s = r.data; - const i = x.from(r.headers).normalize(); - let a, { responseType: g } = r; - function m() { - r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a); - } - let d = new XMLHttpRequest(); - function b() { - if (!d) return; - const w = x.from("getAllResponseHeaders" in d && d.getAllResponseHeaders()); - ge(function(E) { - e(E), m(); - }, function(E) { - n(E), m(); - }, { data: g && g !== "text" && g !== "json" ? d.response : d.responseText, status: d.status, statusText: d.statusText, headers: w, config: t, request: d }), d = null; - } - d.open(r.method.toUpperCase(), r.url, !0), d.timeout = r.timeout, "onloadend" in d ? d.onloadend = b : d.onreadystatechange = function() { - d && d.readyState === 4 && (d.status !== 0 || d.responseURL && d.responseURL.indexOf("file:") === 0) && setTimeout(b); - }, d.onabort = function() { - d && (n(new O("Request aborted", O.ECONNABORTED, r, d)), d = null); - }, d.onerror = function() { - n(new O("Network Error", O.ERR_NETWORK, r, d)), d = null; - }, d.ontimeout = function() { - let w = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; - const E = r.transitional || he; - r.timeoutErrorMessage && (w = r.timeoutErrorMessage), n(new O(w, E.clarifyTimeoutError ? O.ETIMEDOUT : O.ECONNABORTED, r, d)), d = null; - }, s === void 0 && i.setContentType(null), "setRequestHeader" in d && y.forEach(i.toJSON(), function(w, E) { - d.setRequestHeader(E, w); - }), y.isUndefined(r.withCredentials) || (d.withCredentials = !!r.withCredentials), g && g !== "json" && (d.responseType = r.responseType), typeof r.onDownloadProgress == "function" && d.addEventListener("progress", at(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && d.upload && d.upload.addEventListener("progress", at(r.onUploadProgress)), (r.cancelToken || r.signal) && (a = (w) => { - d && (n(!w || w.type ? new $(null, t, d) : w), d.abort(), d = null); - }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a))); - const v = function(w) { - const E = /^([-+\w]{1,25})(:?\/\/|:)/.exec(w); - return E && E[1] || ""; - }(r.url); - v && U.protocols.indexOf(v) === -1 ? n(new O("Unsupported protocol " + v + ":", O.ERR_BAD_REQUEST, t)) : d.send(s || null); - }); -}, Ye = (t, e) => { - let n, r = new AbortController(); - const s = function(m) { - if (!n) { - n = !0, a(); - const d = m instanceof Error ? m : this.reason; - r.abort(d instanceof O ? d : new $(d instanceof Error ? d.message : d)); - } - }; - let i = e && setTimeout(() => { - s(new O(`timeout ${e} of ms exceeded`, O.ETIMEDOUT)); - }, e); - const a = () => { - t && (i && clearTimeout(i), i = null, t.forEach((m) => { - m && (m.removeEventListener ? m.removeEventListener("abort", s) : m.unsubscribe(s)); - }), t = null); - }; - t.forEach((m) => m && m.addEventListener && m.addEventListener("abort", s)); - const { signal: g } = r; - return g.unsubscribe = a, [g, () => { - i && clearTimeout(i), i = null; - }]; -}, Ze = function* (t, e) { - let n = t.byteLength; - if (!e || n < e) return void (yield t); - let r, s = 0; - for (; s < n; ) r = s + e, yield t.slice(s, r), s = r; -}, Yt = (t, e, n, r, s) => { - const i = async function* (g, m, d) { - for await (const b of g) yield* Ze(ArrayBuffer.isView(b) ? b : await d(String(b)), m); - }(t, e, s); - let a = 0; - return new ReadableStream({ type: "bytes", async pull(g) { - const { done: m, value: d } = await i.next(); - if (m) return g.close(), void r(); - let b = d.byteLength; - n && n(a += b), g.enqueue(new Uint8Array(d)); - }, cancel: (g) => (r(g), i.return()) }, { highWaterMark: 2 }); -}, Zt = (t, e) => { - const n = t != null; - return (r) => setTimeout(() => e({ lengthComputable: n, total: t, loaded: r })); -}, lt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", be = lt && typeof ReadableStream == "function", wt = lt && (typeof TextEncoder == "function" ? (te = new TextEncoder(), (t) => te.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())); -var te; -const tn = be && (() => { - let t = !1; - const e = new Request(U.origin, { body: new ReadableStream(), method: "POST", get duplex() { - return t = !0, "half"; - } }).headers.has("Content-Type"); - return t && !e; -})(), vt = be && !!(() => { - try { - return y.isReadableStream(new Response("").body); - } catch { - } -})(), ct = { stream: vt && ((t) => t.body) }; -var ee; -lt && (ee = new Response(), ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { - !ct[t] && (ct[t] = y.isFunction(ee[t]) ? (e) => e[t]() : (e, n) => { - throw new O(`Response type '${t}' is not supported`, O.ERR_NOT_SUPPORT, n); - }); -})); -const en = async (t, e) => { - const n = y.toFiniteNumber(t.getContentLength()); - return n ?? (async (r) => r == null ? 0 : y.isBlob(r) ? r.size : y.isSpecCompliantForm(r) ? (await new Request(r).arrayBuffer()).byteLength : y.isArrayBufferView(r) ? r.byteLength : (y.isURLSearchParams(r) && (r += ""), y.isString(r) ? (await wt(r)).byteLength : void 0))(e); -}, we = { http: null, xhr: Qe, fetch: lt && (async (t) => { - let { url: e, method: n, data: r, signal: s, cancelToken: i, timeout: a, onDownloadProgress: g, onUploadProgress: m, responseType: d, headers: b, withCredentials: v = "same-origin", fetchOptions: w } = ye(t); - d = d ? (d + "").toLowerCase() : "text"; - let E, h, [u, o] = s || i || a ? Ye([s, i], a) : []; - const c = () => { - !E && setTimeout(() => { - u && u.unsubscribe(); - }), E = !0; - }; - let l; - try { - if (m && tn && n !== "get" && n !== "head" && (l = await en(b, r)) !== 0) { - let S, T = new Request(e, { method: "POST", body: r, duplex: "half" }); - y.isFormData(r) && (S = T.headers.get("content-type")) && b.setContentType(S), T.body && (r = Yt(T.body, 65536, Zt(l, at(m)), null, wt)); - } - y.isString(v) || (v = v ? "cors" : "omit"), h = new Request(e, { ...w, signal: u, method: n.toUpperCase(), headers: b.normalize().toJSON(), body: r, duplex: "half", withCredentials: v }); - let p = await fetch(h); - const f = vt && (d === "stream" || d === "response"); - if (vt && (g || f)) { - const S = {}; - ["status", "statusText", "headers"].forEach((j) => { - S[j] = p[j]; - }); - const T = y.toFiniteNumber(p.headers.get("content-length")); - p = new Response(Yt(p.body, 65536, g && Zt(T, at(g, !0)), f && c, wt), S); - } - d = d || "text"; - let A = await ct[y.findKey(ct, d) || "text"](p, t); - return !f && c(), o && o(), await new Promise((S, T) => { - ge(S, T, { data: A, headers: x.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: h }); - }); - } catch (p) { - throw c(), p && p.name === "TypeError" && /fetch/i.test(p.message) ? Object.assign(new O("Network Error", O.ERR_NETWORK, t, h), { cause: p.cause || p }) : O.from(p, p && p.code, t, h); - } -}) }; -y.forEach(we, (t, e) => { - if (t) { - try { - Object.defineProperty(t, "name", { value: e }); - } catch { - } - Object.defineProperty(t, "adapterName", { value: e }); - } -}); -const ne = (t) => `- ${t}`, nn = (t) => y.isFunction(t) || t === null || t === !1, ve = (t) => { - t = y.isArray(t) ? t : [t]; - const { length: e } = t; - let n, r; - const s = {}; - for (let i = 0; i < e; i++) { - let a; - if (n = t[i], r = n, !nn(n) && (r = we[(a = String(n)).toLowerCase()], r === void 0)) throw new O(`Unknown adapter '${a}'`); - if (r) break; - s[a || "#" + i] = r; - } - if (!r) { - const i = Object.entries(s).map(([a, g]) => `adapter ${a} ` + (g === !1 ? "is not supported by the environment" : "is not available in the build")); - throw new O("There is no suitable adapter to dispatch the request " + (e ? i.length > 1 ? `since : -` + i.map(ne).join(` -`) : " " + ne(i[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); - } - return r; -}; -function yt(t) { - if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new $(null, t); -} -function re(t) { - return yt(t), t.headers = x.from(t.headers), t.data = mt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ve(t.adapter || Q.adapter)(t).then(function(e) { - return yt(t), e.data = mt.call(t, t.transformResponse, e), e.headers = x.from(e.headers), e; - }, function(e) { - return pe(e) || (yt(t), e && e.response && (e.response.data = mt.call(t, t.transformResponse, e.response), e.response.headers = x.from(e.response.headers))), Promise.reject(e); - }); -} -const rn = "1.7.2", Ut = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { - Ut[t] = function(n) { - return typeof n === t || "a" + (e < 1 ? "n " : " ") + t; - }; -}); -const oe = {}; -Ut.transitional = function(t, e, n) { - function r(s, i) { - return "[Axios v1.7.2] Transitional option '" + s + "'" + i + (n ? ". " + n : ""); - } - return (s, i, a) => { - if (t === !1) throw new O(r(i, " has been removed" + (e ? " in " + e : "")), O.ERR_DEPRECATED); - return e && !oe[i] && (oe[i] = !0, console.warn(r(i, " has been deprecated since v" + e + " and will be removed in the near future"))), !t || t(s, i, a); - }; -}; -const Et = { assertOptions: function(t, e, n) { - if (typeof t != "object") throw new O("options must be an object", O.ERR_BAD_OPTION_VALUE); - const r = Object.keys(t); - let s = r.length; - for (; s-- > 0; ) { - const i = r[s], a = e[i]; - if (a) { - const g = t[i], m = g === void 0 || a(g, i, t); - if (m !== !0) throw new O("option " + i + " must be " + m, O.ERR_BAD_OPTION_VALUE); - } else if (n !== !0) throw new O("Unknown option " + i, O.ERR_BAD_OPTION); - } -}, validators: Ut }, F = Et.validators; -class q { - constructor(e) { - this.defaults = e, this.interceptors = { request: new Kt(), response: new Kt() }; - } - async request(e, n) { - try { - return await this._request(e, n); - } catch (r) { - if (r instanceof Error) { - let s; - Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error(); - const i = s.stack ? s.stack.replace(/^.+\n/, "") : ""; - try { - r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += ` -` + i) : r.stack = i; - } catch { - } - } - throw r; - } - } - _request(e, n) { - typeof e == "string" ? (n = n || {}).url = e : n = e || {}, n = I(this.defaults, n); - const { transitional: r, paramsSerializer: s, headers: i } = n; - r !== void 0 && Et.assertOptions(r, { silentJSONParsing: F.transitional(F.boolean), forcedJSONParsing: F.transitional(F.boolean), clarifyTimeoutError: F.transitional(F.boolean) }, !1), s != null && (y.isFunction(s) ? n.paramsSerializer = { serialize: s } : Et.assertOptions(s, { encode: F.function, serialize: F.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); - let a = i && y.merge(i.common, i[n.method]); - i && y.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (h) => { - delete i[h]; - }), n.headers = x.concat(a, i); - const g = []; - let m = !0; - this.interceptors.request.forEach(function(h) { - typeof h.runWhen == "function" && h.runWhen(n) === !1 || (m = m && h.synchronous, g.unshift(h.fulfilled, h.rejected)); - }); - const d = []; - let b; - this.interceptors.response.forEach(function(h) { - d.push(h.fulfilled, h.rejected); - }); - let v, w = 0; - if (!m) { - const h = [re.bind(this), void 0]; - for (h.unshift.apply(h, g), h.push.apply(h, d), v = h.length, b = Promise.resolve(n); w < v; ) b = b.then(h[w++], h[w++]); - return b; - } - v = g.length; - let E = n; - for (w = 0; w < v; ) { - const h = g[w++], u = g[w++]; - try { - E = h(E); - } catch (o) { - u.call(this, o); - break; - } - } - try { - b = re.call(this, E); - } catch (h) { - return Promise.reject(h); - } - for (w = 0, v = d.length; w < v; ) b = b.then(d[w++], d[w++]); - return b; - } - getUri(e) { - return fe(me((e = I(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer); - } -} -y.forEach(["delete", "get", "head", "options"], function(t) { - q.prototype[t] = function(e, n) { - return this.request(I(n || {}, { method: t, url: e, data: (n || {}).data })); - }; -}), y.forEach(["post", "put", "patch"], function(t) { - function e(n) { - return function(r, s, i) { - return this.request(I(i || {}, { method: t, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: s })); - }; - } - q.prototype[t] = e(), q.prototype[t + "Form"] = e(!0); -}); -class kt { - constructor(e) { - if (typeof e != "function") throw new TypeError("executor must be a function."); - let n; - this.promise = new Promise(function(s) { - n = s; - }); - const r = this; - this.promise.then((s) => { - if (!r._listeners) return; - let i = r._listeners.length; - for (; i-- > 0; ) r._listeners[i](s); - r._listeners = null; - }), this.promise.then = (s) => { - let i; - const a = new Promise((g) => { - r.subscribe(g), i = g; - }).then(s); - return a.cancel = function() { - r.unsubscribe(i); - }, a; - }, e(function(s, i, a) { - r.reason || (r.reason = new $(s, i, a), n(r.reason)); - }); - } - throwIfRequested() { - if (this.reason) throw this.reason; - } - subscribe(e) { - this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e]; - } - unsubscribe(e) { - if (!this._listeners) return; - const n = this._listeners.indexOf(e); - n !== -1 && this._listeners.splice(n, 1); - } - static source() { - let e; - return { token: new kt(function(n) { - e = n; - }), cancel: e }; - } -} -const St = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; -Object.entries(St).forEach(([t, e]) => { - St[e] = t; -}); -const C = function t(e) { - const n = new q(e), r = ce(q.prototype.request, n); - return y.extend(r, q.prototype, n, { allOwnKeys: !0 }), y.extend(r, n, null, { allOwnKeys: !0 }), r.create = function(s) { - return t(I(e, s)); - }, r; -}(Q); -C.Axios = q, C.CanceledError = $, C.CancelToken = kt, C.isCancel = pe, C.VERSION = rn, C.toFormData = it, C.AxiosError = O, C.Cancel = C.CanceledError, C.all = function(t) { - return Promise.all(t); -}, C.spread = function(t) { - return function(e) { - return t.apply(null, e); - }; -}, C.isAxiosError = function(t) { - return y.isObject(t) && t.isAxiosError === !0; -}, C.mergeConfig = I, C.AxiosHeaders = x, C.formToJSON = (t) => de(y.isHTMLForm(t) ? new FormData(t) : t), C.getAdapter = ve, C.HttpStatusCode = St, C.default = C; -var on = Object.defineProperty, P = (t, e, n) => (((r, s, i) => { - s in r ? on(r, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[s] = i; -})(t, typeof e != "symbol" ? e + "" : e, n), n), Ee = (t, e, n) => { - if (!e.has(t)) throw TypeError("Cannot " + n); -}, R = (t, e, n) => (Ee(t, e, "read from private field"), n ? n.call(t) : e.get(t)), _ = (t, e, n) => { - if (e.has(t)) throw TypeError("Cannot add the same private member more than once"); - e instanceof WeakSet ? e.add(t) : e.set(t, n); -}, B = (t, e, n, r) => (Ee(t, e, "write to private field"), e.set(t, n), n); -function sn(t) { - return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; -} -var se, Se = {}; -se = Se, function(t, e) { - var n = e(); - for (var r in n) se[r] = n[r]; -}(0, function() { - var t = function(i) { - return typeof i != "string" ? i : i.replace(/[\+ \|\^\%]/g, function(a) { - return { " ": "+", "+": "%2B", "|": "%7C", "^": "%5E", "%": "%25" }[a]; - }); - }, e = function(i) { - return typeof i != "string" ? i : i.replace(/\+|%2B|%7C|%5E|%25/g, function(a) { - return { "+": " ", "%2B": "+", "%7C": "|", "%5E": "^", "%25": "%" }[a]; - }); - }, n = function(i) { - return Number.prototype.toString.call(i, 36).toUpperCase(); - }, r = function(i) { - return parseInt(i, 36); - }, s = Array.prototype.indexOf || function(i, a) { - for (var g = a || 0, m = this.length; g < m; g++) if (this[g] === i) return g; - return -1; - }; - return { JSON, pack: function(i, a) { - var g = (a = a || {}).verbose || !1; - g && console.log("Normalize the JSON Object"), i = typeof i == "string" ? this.JSON.parse(i) : i, g && console.log("Creating a empty dictionary"); - var m = { strings: [], integers: [], floats: [] }; - g && console.log("Creating the AST"); - var d = function E(h) { - g && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(h)); - var u, o = typeof h; - if (h === null) return { type: "null", index: -3 }; - if (typeof h > "u") return { type: "undefined", index: -5 }; - if (h instanceof Array) { - var c = ["@"]; - for (var l in h) h.hasOwnProperty(l) && c.push(E(h[l])); - return c; - } - if (o === "object") { - for (var p in c = ["$"], h) h.hasOwnProperty(p) && (c.push(E(p)), c.push(E(h[p]))); - return c; - } - if (h === "") return { type: "empty", index: -4 }; - if (o === "string") return (u = s.call(m.strings, h)) == -1 && (m.strings.push(t(h)), u = m.strings.length - 1), { type: "strings", index: u }; - if (o === "number" && h % 1 == 0) return (u = s.call(m.integers, h)) == -1 && (m.integers.push(n(h)), u = m.integers.length - 1), { type: "integers", index: u }; - if (o === "number") return (u = s.call(m.floats, h)) == -1 && (m.floats.push(h), u = m.floats.length - 1), { type: "floats", index: u }; - if (o === "boolean") return { type: "boolean", index: h ? -1 : -2 }; - throw new Error("Unexpected argument of type " + typeof h); - }(i), b = m.strings.length, v = m.integers.length; - m.floats.length, g && console.log("Parsing the dictionary"); - var w = m.strings.join("|"); - return w += "^" + m.integers.join("|"), w += "^" + m.floats.join("|"), g && console.log("Parsing the structure"), w += "^" + function E(h) { - if (g && console.log("Calling a recursiveParser with " + this.JSON.stringify(h)), h instanceof Array) { - var u = h.shift(); - for (var o in h) h.hasOwnProperty(o) && (u += E(h[o]) + "|"); - return (u[u.length - 1] === "|" ? u.slice(0, -1) : u) + "]"; - } - var c = h.type, l = h.index; - if (c === "strings") return n(l); - if (c === "integers") return n(b + l); - if (c === "floats") return n(b + v + l); - if (c === "boolean") return h.index; - if (c === "null") return -3; - if (c === "undefined") return -5; - if (c === "empty") return -4; - throw new TypeError("The item is alien!"); - }(d), g && console.log("Ending parser"), a.debug ? { dictionary: m, ast: d, packed: w } : w; - }, unpack: function(i, a) { - a = a || {}; - var g = i.split("^"); - a.verbose && console.log("Building dictionary"); - var m = [], d = g[0]; - if (d !== "") { - d = d.split("|"), a.verbose && console.log("Parse the strings dictionary"); - for (var b = 0, v = d.length; b < v; b++) m.push(e(d[b])); - } - if ((d = g[1]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the integers dictionary"), b = 0, v = d.length; b < v; b++) m.push(r(d[b])); - if ((d = g[2]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the floats dictionary"), b = 0, v = d.length; b < v; b++) m.push(parseFloat(d[b])); - d = null, a.verbose && console.log("Tokenizing the structure"); - var w = "", E = [], h = g[3].length; - for (b = 0; b < h; b++) { - var u = g[3].charAt(b); - u === "|" || u === "$" || u === "@" || u === "]" ? (w && (E.push(r(w)), w = ""), u !== "|" && E.push(u)) : w += u; - } - var o = E.length, c = 0; - return a.verbose && console.log("Starting recursive parser"), function l() { - var p = E[c++]; - if (a.verbose && console.log("Reading collection type " + (p === "$" ? "object" : "Array")), p === "@") { - for (var f = []; c < o; c++) { - var A = E[c]; - if (a.verbose && console.log("Read " + A + " symbol"), A === "]") return f; - if (A === "@" || A === "$") f.push(l()); - else switch (A) { - case -1: - f.push(!0); - break; - case -2: - f.push(!1); - break; - case -3: - f.push(null); - break; - case -5: - f.push(void 0); - break; - case -4: - f.push(""); - break; - default: - f.push(m[A]); - } - } - return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; - } - if (p === "$") { - for (f = {}; c < o; c++) { - var S = E[c]; - if (S === "]") return f; - if (S = S === -4 ? "" : m[S], (A = E[++c]) === "@" || A === "$") f[S] = l(); - else switch (A) { - case -1: - f[S] = !0; - break; - case -2: - f[S] = !1; - break; - case -3: - f[S] = null; - break; - case -5: - f[S] = void 0; - break; - case -4: - f[S] = ""; - break; - default: - f[S] = m[A]; - } - } - return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; - } - throw new TypeError("Bad token " + p + " isn't a type"); - }(); - } }; -}); -const ie = sn(Se); -var K, G, z, D, Ot, Rt, et, At, Tt; -class Ct { - constructor(e, n, r, s, i) { - return P(this, "code", 0), P(this, "message", "操作成功"), P(this, "data", null), P(this, "url", ""), P(this, "res", ""), _(this, K, null), _(this, G, !0), _(this, z, !0), _(this, D, { get: (a, g) => R(this, Ot).call(this, g), ownKeys: () => Object.keys(R(this, D).getPrototypeOf() || {}), getPrototypeOf: () => R(this, G) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: R(this, D).getPrototypeOf() }) }), _(this, Ot, (a) => a === "$echoMsg" ? R(this, et) : a === "msg" ? R(this, Rt) : a === "then" || a === "resp" ? (B(this, z, !0), B(this, G, a === "resp"), R(this, At)) : a === "catch" ? R(this, Tt) : a === "IS_ECHO_MSG" ? R(this, z) : Reflect.get(this, a)), _(this, Rt, (a = (m) => m, g = !1) => (R(this, et).call(this), B(this, G, g), Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())))), _(this, et, () => { - R(this, z) && (B(this, z, !1), fn.onMsg(this.code, this.message)); - }), _(this, At, (a) => [0, 1].includes(this.code) ? Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())) : Promise.reject(R(this, K))), _(this, Tt, (a) => Promise.resolve(a(R(this, K)))), this.code = e, this.message = n, this.data = r, this.url = s, this.res = i, B(this, K, new Proxy(this, R(this, D))); - } -} -K = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(); -const bt = (t, e, n, r = "/", s = "") => new Ct(t, e, n, r, s); -var ae = ["utf8", "utf-8", "unicode-1-1-utf-8"], Oe = { TextEncoder: function(t) { - if (ae.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); - this.encoding = "utf-8", this.encode = function(e) { - if (typeof e != "string") throw new TypeError("passed argument must be of tye string"); - var n = unescape(encodeURIComponent(e)), r = new Uint8Array(n.length); - const s = n.split(""); - for (let i = 0; i < s.length; i++) r[i] = s[i].charCodeAt(0); - return r; - }; -}, TextDecoder: function(t) { - if (ae.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); - this.encoding = "utf-8", this.decode = function(e, n) { - if (typeof e > "u") return ""; - var r = typeof n < "u" && r in n && n.stream; - if (typeof r != "boolean") throw new TypeError("stream option must be boolean"); - if (ArrayBuffer.isView(e)) { - var s = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), i = new Array(s.length); - for (let a = 0; a < s.length; a++) i[a] = String.fromCharCode(s[a]); - return decodeURIComponent(escape(i.join(""))); - } - throw new TypeError("passed argument must be an array buffer view"); - }; -} }; -const an = new Oe.TextEncoder("utf8"); -new Oe.TextDecoder("utf8"); -class cn { - constructor(e) { - if (P(this, "encodeTable", []), P(this, "decodeMap", new Uint8Array(256).fill(255)), e.length !== 62) throw new Error("Encoding alphabet must be 62 characters long"); - if (e.includes(` -`) || e.includes("\r")) throw new Error("Encoding alphabet contains newline character"); - this.encodeTable = e.split(""), this.decodeMap = new Uint8Array(256).fill(255); - for (let n = 0; n < e.length; n++) this.decodeMap[e.charCodeAt(n)] = n; - } - encode(e) { - if (!e || e.length === 0) return []; - const n = new un(this).encodeV2(e); - return String.fromCharCode(...n); - } - decode(e) { - if (!e || e.length === 0) return new Uint8Array(); - const n = new ln(this).decode(e); - return new TextDecoder().decode(n); - } -} -var nt, rt, ot, X, Pt, L, M; -class un { - constructor(e) { - _(this, nt, null), B(this, nt, e); - } - get6bits() { - let e = 7 & this.pos, n = this.pos >> 3; - e === 0 && (n -= 1, e = 8); - let r = this.src[n] >> 8 - e; - return e < 6 && n > 0 && (r |= this.src[n - 1] << e), 63 & r; - } - encodeV2(e) { - this.src = ((r) => an.encode(r || ""))(e), this.pos = 8 * this.src.length; - const n = []; - for (; this.pos > 0; ) { - let r = 6, s = this.get6bits(); - !(30 & ~s) && ((this.pos > 6 || s > 31) && (r = 5), s &= 31), n.push(R(this, nt).encodeTable[s].charCodeAt(0)), this.pos -= r; - } - return n; - } -} -nt = /* @__PURE__ */ new WeakMap(); -class ln { - constructor(e) { - _(this, rt, null), B(this, rt, e); - } - decode(e) { - const n = new Uint8Array(Math.ceil(6 * e.length / 8) + 1); - let r = n.length, s = 0, i = 0; - for (let a = 0; a < e.length; a++) { - const g = e[a].charCodeAt(0), m = R(this, rt).decodeMap[g]; - if (m === 255) throw new Error(`CorruptInputError at index ${a}`); - a === e.length - 1 ? (i |= m << s, s += Math.ceil(Math.log2(m + 1))) : 30 & ~m ? (i |= m << s, s += 6) : (i |= m << s, s += 5), s >= 8 && (r--, n[r] = 255 & i, s %= 8, i >>= 8); - } - return s > 0 && (r--, n[r] = 255 & i), n.slice(r); - } -} -rt = /* @__PURE__ */ new WeakMap(), Promise.withResolvers || (Promise.withResolvers = function() { - let t, e; - return { promise: new Promise((n, r) => { - t = n, e = r; - }), resolve: t, reject: e }; -}); -class _t { - constructor(e, n, r = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) { - _(this, ot, void 0), _(this, X, void 0), _(this, Pt, void 0), _(this, L, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), _(this, M, /* @__PURE__ */ new Map()), P(this, "request", ({ url: s = "/", method: i = "GET", ...a }, g = !1) => { - var m; - s = ((u, o) => u.replace(new RegExp(`^${o}+|${o}+$`, "g"), ""))(s, "/"); - const d = i.toUpperCase(), b = ((u) => { - let o = 5381; - for (let c = 0; c < u.length; c++) o = 33 * o ^ u.charCodeAt(c); - return (o >>> 0).toString(16); - })(JSON.stringify([s, d, a])), v = (m = s == null ? void 0 : s.includes) != null && m.call(s, "/_/") ? "#" : "$", { promise: w, resolve: E, reject: h } = Promise.withResolvers(); - return R(this, L)[v].has(b) ? (console.log("cache", s), E(R(this, L)[v].get(b))) : R(this, M).has(b) ? R(this, M).get(b).push([E, h]) : (R(this, M).set(b, [[E, h]]), R(this, ot).call(this, { url: s, method: d, ...a }).then((u) => { - if (![0, 1].includes(u.code)) throw bt(u.code, u.msg, u.data, s, u == null ? void 0 : u.res); - return [u.code, u.msg, u.data, s, u == null ? void 0 : u.res]; - }).then((u) => ((v == "#" || d == "GET") && R(this, L)[v].set(b, u), v != "#" && d == "GET" && !g && setTimeout(() => { - R(this, L)[v].delete(b); - }, 300), u)).then((u) => { - var o; - return (o = R(this, M).get(b)) == null ? void 0 : o.forEach((c, l, p) => { - c && c[0](u), delete p[l]; - }); - }).catch((u) => { - var o; - R(this, L)[v].delete(b), (o = R(this, M).get(b)) == null || o.forEach((c, l, p) => { - c && c[1](u instanceof Ct ? u : bt(-1, u, null, s)), delete p[l]; - }); - }).finally(() => R(this, M).delete(b))), new Proxy(w, { get: (u, o) => (...c) => u.then((l) => bt(...l)[o](...c)).catch((l) => { - if (!l instanceof Ct) throw l; - return typeof l[o] == "function" ? l[o](...c) : l[o]; - }) }); - }), P(this, "get", (s, i = {}) => this.request({ url: s, method: "GET", params: i })), P(this, "post", (s, i = {}, a = {}) => this.request({ url: s, method: "POST", data: i, params: a })), P(this, "put", (s, i = {}, a = {}) => this.request({ url: s, method: "PUT", data: i, params: a })), P(this, "del", (s, i = {}, a = {}) => this.request({ url: s, method: "DELETE", data: i, params: a })), P(this, "download", (s, i) => { - }), P(this, "cache", (s, i = {}) => this.request({ url: s, method: "GET", params: i }, !0)), P(this, "list", (s, i = {}) => this.get(`/api/${s}/${this.encode(i)}`)), P(this, "getAppInfo", () => { - }), P(this, "refreshCache", (s = !1) => { - s && R(this, L)["#"].clear(), R(this, L).$.clear(); - }), P(this, "decode", (s = "", i = {}) => { - if (s === void 0 || s === "" || s === null) return i; - try { - const a = R(this, X).decode(s); - return ie.unpack(a); - } catch { - return console.warn("core.decode", s), i; - } - }), P(this, "encode", (s = {}) => { - const i = JSON.stringify(s, (a, g) => g === void 0 ? null : g); - return R(this, X).encode(ie.pack(i)); - }), B(this, Pt, e), B(this, ot, r), B(this, X, new cn(n)); - } -} -ot = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(); -const fn = _t; -_t.onUnhandledRejection = (t) => { - var e, n, r, s, i, a; - t != null && t.IS_ECHO_MSG ? ((e = t == null ? void 0 : t.$echoMsg) == null || e.call(t), (n = t == null ? void 0 : t.preventDefault) == null || n.call(t)) : (r = t.reason) != null && r.IS_ECHO_MSG && ((i = (s = t.reason) == null ? void 0 : s.$echoMsg) == null || i.call(s), (a = t == null ? void 0 : t.preventDefault) == null || a.call(t)); -}, _t.onMsg = (t, e) => [0, 1].includes(t) ? console.log(e) : console.warn(e); -function Re(t) { - return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; -} -var Ae = { exports: {} }; -/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT */ -Ae.exports = function() { - var t, e, n = { version: "0.2.0" }, r = n.settings = { minimum: 0.08, easing: "ease", positionUsing: "", speed: 200, trickle: !0, trickleRate: 0.02, trickleSpeed: 800, showSpinner: !0, barSelector: '[role="bar"]', spinnerSelector: '[role="spinner"]', parent: "body", template: '
' }; - function s(h, u, o) { - return h < u ? u : h > o ? o : h; - } - function i(h) { - return 100 * (-1 + h); - } - function a(h, u, o) { - var c; - return (c = r.positionUsing === "translate3d" ? { transform: "translate3d(" + i(h) + "%,0,0)" } : r.positionUsing === "translate" ? { transform: "translate(" + i(h) + "%,0)" } : { "margin-left": i(h) + "%" }).transition = "all " + u + "ms " + o, c; - } - n.configure = function(h) { - var u, o; - for (u in h) (o = h[u]) !== void 0 && h.hasOwnProperty(u) && (r[u] = o); - return this; - }, n.status = null, n.set = function(h) { - var u = n.isStarted(); - h = s(h, r.minimum, 1), n.status = h === 1 ? null : h; - var o = n.render(!u), c = o.querySelector(r.barSelector), l = r.speed, p = r.easing; - return o.offsetWidth, g(function(f) { - r.positionUsing === "" && (r.positionUsing = n.getPositioningCSS()), m(c, a(h, l, p)), h === 1 ? (m(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() { - m(o, { transition: "all " + l + "ms linear", opacity: 0 }), setTimeout(function() { - n.remove(), f(); - }, l); - }, l)) : setTimeout(f, l); - }), this; - }, n.isStarted = function() { - return typeof n.status == "number"; - }, n.start = function() { - n.status || n.set(0); - var h = function() { - setTimeout(function() { - n.status && (n.trickle(), h()); - }, r.trickleSpeed); - }; - return r.trickle && h(), this; - }, n.done = function(h) { - return h || n.status ? n.inc(0.3 + 0.5 * Math.random()).set(1) : this; - }, n.inc = function(h) { - var u = n.status; - return u ? (typeof h != "number" && (h = (1 - u) * s(Math.random() * u, 0.1, 0.95)), u = s(u + h, 0, 0.994), n.set(u)) : n.start(); - }, n.trickle = function() { - return n.inc(Math.random() * r.trickleRate); - }, t = 0, e = 0, n.promise = function(h) { - return h && h.state() !== "resolved" ? (e === 0 && n.start(), t++, e++, h.always(function() { - --e == 0 ? (t = 0, n.done()) : n.set((t - e) / t); - }), this) : this; - }, n.render = function(h) { - if (n.isRendered()) return document.getElementById("nprogress"); - b(document.documentElement, "nprogress-busy"); - var u = document.createElement("div"); - u.id = "nprogress", u.innerHTML = r.template; - var o, c = u.querySelector(r.barSelector), l = h ? "-100" : i(n.status || 0), p = document.querySelector(r.parent); - return m(c, { transition: "all 0 linear", transform: "translate3d(" + l + "%,0,0)" }), r.showSpinner || (o = u.querySelector(r.spinnerSelector)) && E(o), p != document.body && b(p, "nprogress-custom-parent"), p.appendChild(u), u; - }, n.remove = function() { - v(document.documentElement, "nprogress-busy"), v(document.querySelector(r.parent), "nprogress-custom-parent"); - var h = document.getElementById("nprogress"); - h && E(h); - }, n.isRendered = function() { - return !!document.getElementById("nprogress"); - }, n.getPositioningCSS = function() { - var h = document.body.style, u = "WebkitTransform" in h ? "Webkit" : "MozTransform" in h ? "Moz" : "msTransform" in h ? "ms" : "OTransform" in h ? "O" : ""; - return u + "Perspective" in h ? "translate3d" : u + "Transform" in h ? "translate" : "margin"; - }; - var g = /* @__PURE__ */ function() { - var h = []; - function u() { - var o = h.shift(); - o && o(u); - } - return function(o) { - h.push(o), h.length == 1 && u(); - }; - }(), m = /* @__PURE__ */ function() { - var h = ["Webkit", "O", "Moz", "ms"], u = {}; - function o(f) { - return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(A, S) { - return S.toUpperCase(); - }); - } - function c(f) { - var A = document.body.style; - if (f in A) return f; - for (var S, T = h.length, j = f.charAt(0).toUpperCase() + f.slice(1); T--; ) if ((S = h[T] + j) in A) return S; - return f; - } - function l(f) { - return f = o(f), u[f] || (u[f] = c(f)); - } - function p(f, A, S) { - A = l(A), f.style[A] = S; - } - return function(f, A) { - var S, T, j = arguments; - if (j.length == 2) for (S in A) (T = A[S]) !== void 0 && A.hasOwnProperty(S) && p(f, S, T); - else p(f, j[1], j[2]); - }; - }(); - function d(h, u) { - return (typeof h == "string" ? h : w(h)).indexOf(" " + u + " ") >= 0; - } - function b(h, u) { - var o = w(h), c = o + u; - d(o, u) || (h.className = c.substring(1)); - } - function v(h, u) { - var o, c = w(h); - d(h, u) && (o = c.replace(" " + u + " ", " "), h.className = o.substring(1, o.length - 1)); - } - function w(h) { - return (" " + (h.className || "") + " ").replace(/\s+/gi, " "); - } - function E(h) { - h && h.parentNode && h.parentNode.removeChild(h); - } - return n; -}(); -const hn = Re(Ae.exports); -var Te = { exports: {} }; -Te.exports = function(t) { - var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; - function n(u, o) { - var c = u[0], l = u[1], p = u[2], f = u[3]; - l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & p | ~l & f) + o[0] - 680876936 | 0) << 7 | c >>> 25) + l | 0) & l | ~c & p) + o[1] - 389564586 | 0) << 12 | f >>> 20) + c | 0) & c | ~f & l) + o[2] + 606105819 | 0) << 17 | p >>> 15) + f | 0) & f | ~p & c) + o[3] - 1044525330 | 0) << 22 | l >>> 10) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & p | ~l & f) + o[4] - 176418897 | 0) << 7 | c >>> 25) + l | 0) & l | ~c & p) + o[5] + 1200080426 | 0) << 12 | f >>> 20) + c | 0) & c | ~f & l) + o[6] - 1473231341 | 0) << 17 | p >>> 15) + f | 0) & f | ~p & c) + o[7] - 45705983 | 0) << 22 | l >>> 10) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & p | ~l & f) + o[8] + 1770035416 | 0) << 7 | c >>> 25) + l | 0) & l | ~c & p) + o[9] - 1958414417 | 0) << 12 | f >>> 20) + c | 0) & c | ~f & l) + o[10] - 42063 | 0) << 17 | p >>> 15) + f | 0) & f | ~p & c) + o[11] - 1990404162 | 0) << 22 | l >>> 10) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & p | ~l & f) + o[12] + 1804603682 | 0) << 7 | c >>> 25) + l | 0) & l | ~c & p) + o[13] - 40341101 | 0) << 12 | f >>> 20) + c | 0) & c | ~f & l) + o[14] - 1502002290 | 0) << 17 | p >>> 15) + f | 0) & f | ~p & c) + o[15] + 1236535329 | 0) << 22 | l >>> 10) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & f | p & ~f) + o[1] - 165796510 | 0) << 5 | c >>> 27) + l | 0) & p | l & ~p) + o[6] - 1069501632 | 0) << 9 | f >>> 23) + c | 0) & l | c & ~l) + o[11] + 643717713 | 0) << 14 | p >>> 18) + f | 0) & c | f & ~c) + o[0] - 373897302 | 0) << 20 | l >>> 12) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & f | p & ~f) + o[5] - 701558691 | 0) << 5 | c >>> 27) + l | 0) & p | l & ~p) + o[10] + 38016083 | 0) << 9 | f >>> 23) + c | 0) & l | c & ~l) + o[15] - 660478335 | 0) << 14 | p >>> 18) + f | 0) & c | f & ~c) + o[4] - 405537848 | 0) << 20 | l >>> 12) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & f | p & ~f) + o[9] + 568446438 | 0) << 5 | c >>> 27) + l | 0) & p | l & ~p) + o[14] - 1019803690 | 0) << 9 | f >>> 23) + c | 0) & l | c & ~l) + o[3] - 187363961 | 0) << 14 | p >>> 18) + f | 0) & c | f & ~c) + o[8] + 1163531501 | 0) << 20 | l >>> 12) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l & f | p & ~f) + o[13] - 1444681467 | 0) << 5 | c >>> 27) + l | 0) & p | l & ~p) + o[2] - 51403784 | 0) << 9 | f >>> 23) + c | 0) & l | c & ~l) + o[7] + 1735328473 | 0) << 14 | p >>> 18) + f | 0) & c | f & ~c) + o[12] - 1926607734 | 0) << 20 | l >>> 12) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l ^ p ^ f) + o[5] - 378558 | 0) << 4 | c >>> 28) + l | 0) ^ l ^ p) + o[8] - 2022574463 | 0) << 11 | f >>> 21) + c | 0) ^ c ^ l) + o[11] + 1839030562 | 0) << 16 | p >>> 16) + f | 0) ^ f ^ c) + o[14] - 35309556 | 0) << 23 | l >>> 9) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l ^ p ^ f) + o[1] - 1530992060 | 0) << 4 | c >>> 28) + l | 0) ^ l ^ p) + o[4] + 1272893353 | 0) << 11 | f >>> 21) + c | 0) ^ c ^ l) + o[7] - 155497632 | 0) << 16 | p >>> 16) + f | 0) ^ f ^ c) + o[10] - 1094730640 | 0) << 23 | l >>> 9) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l ^ p ^ f) + o[13] + 681279174 | 0) << 4 | c >>> 28) + l | 0) ^ l ^ p) + o[0] - 358537222 | 0) << 11 | f >>> 21) + c | 0) ^ c ^ l) + o[3] - 722521979 | 0) << 16 | p >>> 16) + f | 0) ^ f ^ c) + o[6] + 76029189 | 0) << 23 | l >>> 9) + p | 0, l = ((l += ((p = ((p += ((f = ((f += ((c = ((c += (l ^ p ^ f) + o[9] - 640364487 | 0) << 4 | c >>> 28) + l | 0) ^ l ^ p) + o[12] - 421815835 | 0) << 11 | f >>> 21) + c | 0) ^ c ^ l) + o[15] + 530742520 | 0) << 16 | p >>> 16) + f | 0) ^ f ^ c) + o[2] - 995338651 | 0) << 23 | l >>> 9) + p | 0, l = ((l += ((f = ((f += (l ^ ((c = ((c += (p ^ (l | ~f)) + o[0] - 198630844 | 0) << 6 | c >>> 26) + l | 0) | ~p)) + o[7] + 1126891415 | 0) << 10 | f >>> 22) + c | 0) ^ ((p = ((p += (c ^ (f | ~l)) + o[14] - 1416354905 | 0) << 15 | p >>> 17) + f | 0) | ~c)) + o[5] - 57434055 | 0) << 21 | l >>> 11) + p | 0, l = ((l += ((f = ((f += (l ^ ((c = ((c += (p ^ (l | ~f)) + o[12] + 1700485571 | 0) << 6 | c >>> 26) + l | 0) | ~p)) + o[3] - 1894986606 | 0) << 10 | f >>> 22) + c | 0) ^ ((p = ((p += (c ^ (f | ~l)) + o[10] - 1051523 | 0) << 15 | p >>> 17) + f | 0) | ~c)) + o[1] - 2054922799 | 0) << 21 | l >>> 11) + p | 0, l = ((l += ((f = ((f += (l ^ ((c = ((c += (p ^ (l | ~f)) + o[8] + 1873313359 | 0) << 6 | c >>> 26) + l | 0) | ~p)) + o[15] - 30611744 | 0) << 10 | f >>> 22) + c | 0) ^ ((p = ((p += (c ^ (f | ~l)) + o[6] - 1560198380 | 0) << 15 | p >>> 17) + f | 0) | ~c)) + o[13] + 1309151649 | 0) << 21 | l >>> 11) + p | 0, l = ((l += ((f = ((f += (l ^ ((c = ((c += (p ^ (l | ~f)) + o[4] - 145523070 | 0) << 6 | c >>> 26) + l | 0) | ~p)) + o[11] - 1120210379 | 0) << 10 | f >>> 22) + c | 0) ^ ((p = ((p += (c ^ (f | ~l)) + o[2] + 718787259 | 0) << 15 | p >>> 17) + f | 0) | ~c)) + o[9] - 343485551 | 0) << 21 | l >>> 11) + p | 0, u[0] = c + u[0] | 0, u[1] = l + u[1] | 0, u[2] = p + u[2] | 0, u[3] = f + u[3] | 0; - } - function r(u) { - var o, c = []; - for (o = 0; o < 64; o += 4) c[o >> 2] = u.charCodeAt(o) + (u.charCodeAt(o + 1) << 8) + (u.charCodeAt(o + 2) << 16) + (u.charCodeAt(o + 3) << 24); - return c; - } - function s(u) { - var o, c = []; - for (o = 0; o < 64; o += 4) c[o >> 2] = u[o] + (u[o + 1] << 8) + (u[o + 2] << 16) + (u[o + 3] << 24); - return c; - } - function i(u) { - var o, c, l, p, f, A, S = u.length, T = [1732584193, -271733879, -1732584194, 271733878]; - for (o = 64; o <= S; o += 64) n(T, r(u.substring(o - 64, o))); - for (c = (u = u.substring(o - 64)).length, l = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < c; o += 1) l[o >> 2] |= u.charCodeAt(o) << (o % 4 << 3); - if (l[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (n(T, l), o = 0; o < 16; o += 1) l[o] = 0; - return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(p[2], 16), A = parseInt(p[1], 16) || 0, l[14] = f, l[15] = A, n(T, l), T; - } - function a(u) { - var o, c, l, p, f, A, S = u.length, T = [1732584193, -271733879, -1732584194, 271733878]; - for (o = 64; o <= S; o += 64) n(T, s(u.subarray(o - 64, o))); - for (c = (u = o - 64 < S ? u.subarray(o - 64) : new Uint8Array(0)).length, l = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < c; o += 1) l[o >> 2] |= u[o] << (o % 4 << 3); - if (l[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (n(T, l), o = 0; o < 16; o += 1) l[o] = 0; - return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(p[2], 16), A = parseInt(p[1], 16) || 0, l[14] = f, l[15] = A, n(T, l), T; - } - function g(u) { - var o, c = ""; - for (o = 0; o < 4; o += 1) c += e[u >> 8 * o + 4 & 15] + e[u >> 8 * o & 15]; - return c; - } - function m(u) { - var o; - for (o = 0; o < u.length; o += 1) u[o] = g(u[o]); - return u.join(""); - } - function d(u) { - return /[\u0080-\uFFFF]/.test(u) && (u = unescape(encodeURIComponent(u))), u; - } - function b(u, o) { - var c, l = u.length, p = new ArrayBuffer(l), f = new Uint8Array(p); - for (c = 0; c < l; c += 1) f[c] = u.charCodeAt(c); - return o ? f : p; - } - function v(u) { - return String.fromCharCode.apply(null, new Uint8Array(u)); - } - function w(u, o, c) { - var l = new Uint8Array(u.byteLength + o.byteLength); - return l.set(new Uint8Array(u)), l.set(new Uint8Array(o), u.byteLength), l; - } - function E(u) { - var o, c = [], l = u.length; - for (o = 0; o < l - 1; o += 2) c.push(parseInt(u.substr(o, 2), 16)); - return String.fromCharCode.apply(String, c); - } - function h() { - this.reset(); - } - return m(i("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { - function u(o, c) { - return (o = 0 | o || 0) < 0 ? Math.max(o + c, 0) : Math.min(o, c); - } - ArrayBuffer.prototype.slice = function(o, c) { - var l, p, f, A, S = this.byteLength, T = u(o, S), j = S; - return c !== t && (j = u(c, S)), T > j ? new ArrayBuffer(0) : (l = j - T, p = new ArrayBuffer(l), f = new Uint8Array(p), A = new Uint8Array(this, T, l), f.set(A), p); - }; - }(), h.prototype.append = function(u) { - return this.appendBinary(d(u)), this; - }, h.prototype.appendBinary = function(u) { - this._buff += u, this._length += u.length; - var o, c = this._buff.length; - for (o = 64; o <= c; o += 64) n(this._hash, r(this._buff.substring(o - 64, o))); - return this._buff = this._buff.substring(o - 64), this; - }, h.prototype.end = function(u) { - var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (o = 0; o < p; o += 1) f[o >> 2] |= l.charCodeAt(o) << (o % 4 << 3); - return this._finish(f, p), c = m(this._hash), u && (c = E(c)), this.reset(), c; - }, h.prototype.reset = function() { - return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; - }, h.prototype.getState = function() { - return { buff: this._buff, length: this._length, hash: this._hash.slice() }; - }, h.prototype.setState = function(u) { - return this._buff = u.buff, this._length = u.length, this._hash = u.hash, this; - }, h.prototype.destroy = function() { - delete this._hash, delete this._buff, delete this._length; - }, h.prototype._finish = function(u, o) { - var c, l, p, f = o; - if (u[f >> 2] |= 128 << (f % 4 << 3), f > 55) for (n(this._hash, u), f = 0; f < 16; f += 1) u[f] = 0; - c = (c = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), l = parseInt(c[2], 16), p = parseInt(c[1], 16) || 0, u[14] = l, u[15] = p, n(this._hash, u); - }, h.hash = function(u, o) { - return h.hashBinary(d(u), o); - }, h.hashBinary = function(u, o) { - var c = m(i(u)); - return o ? E(c) : c; - }, h.ArrayBuffer = function() { - this.reset(); - }, h.ArrayBuffer.prototype.append = function(u) { - var o, c = w(this._buff.buffer, u), l = c.length; - for (this._length += u.byteLength, o = 64; o <= l; o += 64) n(this._hash, s(c.subarray(o - 64, o))); - return this._buff = o - 64 < l ? new Uint8Array(c.buffer.slice(o - 64)) : new Uint8Array(0), this; - }, h.ArrayBuffer.prototype.end = function(u) { - var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (o = 0; o < p; o += 1) f[o >> 2] |= l[o] << (o % 4 << 3); - return this._finish(f, p), c = m(this._hash), u && (c = E(c)), this.reset(), c; - }, h.ArrayBuffer.prototype.reset = function() { - return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; - }, h.ArrayBuffer.prototype.getState = function() { - var u = h.prototype.getState.call(this); - return u.buff = v(u.buff), u; - }, h.ArrayBuffer.prototype.setState = function(u) { - return u.buff = b(u.buff, !0), h.prototype.setState.call(this, u); - }, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(u, o) { - var c = m(a(new Uint8Array(u))); - return o ? E(c) : c; - }, h; -}(); -const dn = Re(Te.exports); -export { - hn as N, - fn as P, - dn as S, - C as a -}; diff --git a/dist/common/vender-CtjyT19B.js b/dist/common/vender-CtjyT19B.js new file mode 100644 index 0000000..2064151 --- /dev/null +++ b/dist/common/vender-CtjyT19B.js @@ -0,0 +1,1608 @@ +function pe(t, e) { + return function() { + return t.apply(e, arguments); + }; +} +const { toString: Ne } = Object.prototype, { getPrototypeOf: Bt } = Object, at = (dt = /* @__PURE__ */ Object.create(null), (t) => { + const e = Ne.call(t); + return dt[e] || (dt[e] = e.slice(8, -1).toLowerCase()); +}); +var dt; +const B = (t) => (t = t.toLowerCase(), (e) => at(e) === t), ft = (t) => (e) => typeof e === t, { isArray: z } = Array, V = ft("undefined"), It = B("ArrayBuffer"), Ue = ft("string"), U = ft("function"), Wt = ft("number"), tt = (t) => t !== null && typeof t == "object", et = (t) => { + if (at(t) !== "object") return !1; + const e = Bt(t); + return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t); +}, ke = B("Date"), Be = B("File"), Le = B("Blob"), Fe = B("FileList"), Me = B("URLSearchParams"), [De, qe, Ie, We] = ["ReadableStream", "Request", "Response", "Headers"].map(B); +function K(t, e, { allOwnKeys: r = !1 } = {}) { + if (t == null) return; + let n, i; + if (typeof t != "object" && (t = [t]), z(t)) for (n = 0, i = t.length; n < i; n++) e.call(null, t[n], n, t); + else { + const u = r ? Object.getOwnPropertyNames(t) : Object.keys(t), l = u.length; + let m; + for (n = 0; n < l; n++) m = u[n], e.call(null, t[m], m, t); + } +} +function zt(t, e) { + e = e.toLowerCase(); + const r = Object.keys(t); + let n, i = r.length; + for (; i-- > 0; ) if (n = r[i], e === n.toLowerCase()) return n; + return null; +} +const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ht = (t) => !V(t) && t !== ge, ze = (pt = typeof Uint8Array < "u" && Bt(Uint8Array), (t) => pt && t instanceof pt); +var pt; +const He = B("HTMLFormElement"), $t = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), $e = B("RegExp"), Jt = (t, e) => { + const r = Object.getOwnPropertyDescriptors(t), n = {}; + K(r, (i, u) => { + let l; + (l = e(i, u, t)) !== !1 && (n[u] = l || i); + }), Object.defineProperties(t, n); +}, gt = "abcdefghijklmnopqrstuvwxyz", Vt = "0123456789", Kt = { DIGIT: Vt, ALPHA: gt, ALPHA_DIGIT: gt + gt.toUpperCase() + Vt }, Je = B("AsyncFunction"), v = { isArray: z, isArrayBuffer: It, isBuffer: function(t) { + return t !== null && !V(t) && t.constructor !== null && !V(t.constructor) && U(t.constructor.isBuffer) && t.constructor.isBuffer(t); +}, isFormData: (t) => { + let e; + return t && (typeof FormData == "function" && t instanceof FormData || U(t.append) && ((e = at(t)) === "formdata" || e === "object" && U(t.toString) && t.toString() === "[object FormData]")); +}, isArrayBufferView: function(t) { + let e; + return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && It(t.buffer), e; +}, isString: Ue, isNumber: Wt, isBoolean: (t) => t === !0 || t === !1, isObject: tt, isPlainObject: et, isReadableStream: De, isRequest: qe, isResponse: Ie, isHeaders: We, isUndefined: V, isDate: ke, isFile: Be, isBlob: Le, isRegExp: $e, isFunction: U, isStream: (t) => tt(t) && U(t.pipe), isURLSearchParams: Me, isTypedArray: ze, isFileList: Fe, forEach: K, merge: function t() { + const { caseless: e } = Ht(this) && this || {}, r = {}, n = (i, u) => { + const l = e && zt(r, u) || u; + et(r[l]) && et(i) ? r[l] = t(r[l], i) : et(i) ? r[l] = t({}, i) : z(i) ? r[l] = i.slice() : r[l] = i; + }; + for (let i = 0, u = arguments.length; i < u; i++) arguments[i] && K(arguments[i], n); + return r; +}, extend: (t, e, r, { allOwnKeys: n } = {}) => (K(e, (i, u) => { + r && U(i) ? t[u] = pe(i, r) : t[u] = i; +}, { allOwnKeys: n }), t), trim: (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), stripBOM: (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits: (t, e, r, n) => { + t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), r && Object.assign(t.prototype, r); +}, toFlatObject: (t, e, r, n) => { + let i, u, l; + const m = {}; + if (e = e || {}, t == null) return e; + do { + for (i = Object.getOwnPropertyNames(t), u = i.length; u-- > 0; ) l = i[u], n && !n(l, t, e) || m[l] || (e[l] = t[l], m[l] = !0); + t = r !== !1 && Bt(t); + } while (t && (!r || r(t, e)) && t !== Object.prototype); + return e; +}, kindOf: at, kindOfTest: B, endsWith: (t, e, r) => { + t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length; + const n = t.indexOf(e, r); + return n !== -1 && n === r; +}, toArray: (t) => { + if (!t) return null; + if (z(t)) return t; + let e = t.length; + if (!Wt(e)) return null; + const r = new Array(e); + for (; e-- > 0; ) r[e] = t[e]; + return r; +}, forEachEntry: (t, e) => { + const r = (t && t[Symbol.iterator]).call(t); + let n; + for (; (n = r.next()) && !n.done; ) { + const i = n.value; + e.call(t, i[0], i[1]); + } +}, matchAll: (t, e) => { + let r; + const n = []; + for (; (r = t.exec(e)) !== null; ) n.push(r); + return n; +}, isHTMLForm: He, hasOwnProperty: $t, hasOwnProp: $t, reduceDescriptors: Jt, freezeMethods: (t) => { + Jt(t, (e, r) => { + if (U(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1) return !1; + const n = t[r]; + U(n) && (e.enumerable = !1, "writable" in e ? e.writable = !1 : e.set || (e.set = () => { + throw Error("Can not rewrite read-only method '" + r + "'"); + })); + }); +}, toObjectSet: (t, e) => { + const r = {}, n = (i) => { + i.forEach((u) => { + r[u] = !0; + }); + }; + return z(t) ? n(t) : n(String(t).split(e)), r; +}, toCamelCase: (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, r, n) { + return r.toUpperCase() + n; +}), noop: () => { +}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: zt, global: ge, isContextDefined: Ht, ALPHABET: Kt, generateString: (t = 16, e = Kt.ALPHA_DIGIT) => { + let r = ""; + const { length: n } = e; + for (; t--; ) r += e[Math.random() * n | 0]; + return r; +}, isSpecCompliantForm: function(t) { + return !!(t && U(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]); +}, toJSONObject: (t) => { + const e = new Array(10), r = (n, i) => { + if (tt(n)) { + if (e.indexOf(n) >= 0) return; + if (!("toJSON" in n)) { + e[i] = n; + const u = z(n) ? [] : {}; + return K(n, (l, m) => { + const y = r(l, i + 1); + !V(y) && (u[m] = y); + }), e[i] = void 0, u; + } + } + return n; + }; + return r(t, 0); +}, isAsyncFn: Je, isThenable: (t) => t && (tt(t) || U(t)) && U(t.then) && U(t.catch) }; +function C(t, e, r, n, i) { + Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), i && (this.response = i); +} +v.inherits(C, Error, { toJSON: function() { + return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: v.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; +} }); +const Gt = C.prototype, Xt = {}; +["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((t) => { + Xt[t] = { value: t }; +}), Object.defineProperties(C, Xt), Object.defineProperty(Gt, "isAxiosError", { value: !0 }), C.from = (t, e, r, n, i, u) => { + const l = Object.create(Gt); + return v.toFlatObject(t, l, function(m) { + return m !== Error.prototype; + }, (m) => m !== "isAxiosError"), C.call(l, t.message, e, r, n, i), l.cause = t, l.name = t.name, u && Object.assign(l, u), l; +}; +function yt(t) { + return v.isPlainObject(t) || v.isArray(t); +} +function ye(t) { + return v.endsWith(t, "[]") ? t.slice(0, -2) : t; +} +function Qt(t, e, r) { + return t ? t.concat(e).map(function(n, i) { + return n = ye(n), !r && i ? "[" + n + "]" : n; + }).join(r ? "." : "") : e; +} +const Ve = v.toFlatObject(v, {}, null, function(t) { + return /^is[A-Z]/.test(t); +}); +function ct(t, e, r) { + if (!v.isObject(t)) throw new TypeError("target must be an object"); + e = e || new FormData(); + const n = (r = v.toFlatObject(r, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(w, A) { + return !v.isUndefined(A[w]); + })).metaTokens, i = r.visitor || g, u = r.dots, l = r.indexes, m = (r.Blob || typeof Blob < "u" && Blob) && v.isSpecCompliantForm(e); + if (!v.isFunction(i)) throw new TypeError("visitor must be a function"); + function y(w) { + if (w === null) return ""; + if (v.isDate(w)) return w.toISOString(); + if (!m && v.isBlob(w)) throw new C("Blob is not supported. Use a Buffer instead."); + return v.isArrayBuffer(w) || v.isTypedArray(w) ? m && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w; + } + function g(w, A, d) { + let c = w; + if (w && !d && typeof w == "object") { + if (v.endsWith(A, "{}")) A = n ? A : A.slice(0, -2), w = JSON.stringify(w); + else if (v.isArray(w) && function(o) { + return v.isArray(o) && !o.some(yt); + }(w) || (v.isFileList(w) || v.endsWith(A, "[]")) && (c = v.toArray(w))) return A = ye(A), c.forEach(function(o, a) { + !v.isUndefined(o) && o !== null && e.append(l === !0 ? Qt([A], a, u) : l === null ? A : A + "[]", y(o)); + }), !1; + } + return !!yt(w) || (e.append(Qt(d, A, u), y(w)), !1); + } + const s = [], b = Object.assign(Ve, { defaultVisitor: g, convertValue: y, isVisitable: yt }); + if (!v.isObject(t)) throw new TypeError("data must be an object"); + return function w(A, d) { + if (!v.isUndefined(A)) { + if (s.indexOf(A) !== -1) throw Error("Circular reference detected in " + d.join(".")); + s.push(A), v.forEach(A, function(c, o) { + (!(v.isUndefined(c) || c === null) && i.call(e, c, v.isString(o) ? o.trim() : o, d, b)) === !0 && w(c, d ? d.concat(o) : [o]); + }), s.pop(); + } + }(t), e; +} +function Yt(t) { + const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; + return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) { + return e[r]; + }); +} +function Lt(t, e) { + this._pairs = [], t && ct(t, this, e); +} +const Zt = Lt.prototype; +function Ke(t) { + return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); +} +function me(t, e, r) { + if (!e) return t; + const n = r && r.encode || Ke, i = r && r.serialize; + let u; + if (u = i ? i(e, r) : v.isURLSearchParams(e) ? e.toString() : new Lt(e, r).toString(n), u) { + const l = t.indexOf("#"); + l !== -1 && (t = t.slice(0, l)), t += (t.indexOf("?") === -1 ? "?" : "&") + u; + } + return t; +} +Zt.append = function(t, e) { + this._pairs.push([t, e]); +}, Zt.toString = function(t) { + const e = t ? function(r) { + return t.call(this, r, Yt); + } : Yt; + return this._pairs.map(function(r) { + return e(r[0]) + "=" + e(r[1]); + }, "").join("&"); +}; +class te { + constructor() { + this.handlers = []; + } + use(e, r, n) { + return this.handlers.push({ fulfilled: e, rejected: r, synchronous: !!n && n.synchronous, runWhen: n ? n.runWhen : null }), this.handlers.length - 1; + } + eject(e) { + this.handlers[e] && (this.handlers[e] = null); + } + clear() { + this.handlers && (this.handlers = []); + } + forEach(e) { + v.forEach(this.handlers, function(r) { + r !== null && e(r); + }); + } +} +const be = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, Ge = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : Lt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Ft = typeof window < "u" && typeof document < "u", Xe = (ee = typeof navigator < "u" && navigator.product, Ft && ["ReactNative", "NativeScript", "NS"].indexOf(ee) < 0); +var ee; +const Qe = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ye = Ft && window.location.href || "http://localhost", k = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Ft, hasStandardBrowserEnv: Xe, hasStandardBrowserWebWorkerEnv: Qe, origin: Ye }, Symbol.toStringTag, { value: "Module" })), ...Ge }; +function we(t) { + function e(r, n, i, u) { + let l = r[u++]; + if (l === "__proto__") return !0; + const m = Number.isFinite(+l), y = u >= r.length; + return l = !l && v.isArray(i) ? i.length : l, y ? (v.hasOwnProp(i, l) ? i[l] = [i[l], n] : i[l] = n, !m) : (i[l] && v.isObject(i[l]) || (i[l] = []), e(r, n, i[l], u) && v.isArray(i[l]) && (i[l] = function(g) { + const s = {}, b = Object.keys(g); + let w; + const A = b.length; + let d; + for (w = 0; w < A; w++) d = b[w], s[d] = g[d]; + return s; + }(i[l])), !m); + } + if (v.isFormData(t) && v.isFunction(t.entries)) { + const r = {}; + return v.forEachEntry(t, (n, i) => { + e(function(u) { + return v.matchAll(/\w+|\[(\w*)]/g, u).map((l) => l[0] === "[]" ? "" : l[1] || l[0]); + }(n), i, r, 0); + }), r; + } + return null; +} +const Y = { transitional: be, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) { + const r = e.getContentType() || "", n = r.indexOf("application/json") > -1, i = v.isObject(t); + if (i && v.isHTMLForm(t) && (t = new FormData(t)), v.isFormData(t)) return n ? JSON.stringify(we(t)) : t; + if (v.isArrayBuffer(t) || v.isBuffer(t) || v.isStream(t) || v.isFile(t) || v.isBlob(t) || v.isReadableStream(t)) return t; + if (v.isArrayBufferView(t)) return t.buffer; + if (v.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); + let u; + if (i) { + if (r.indexOf("application/x-www-form-urlencoded") > -1) return function(l, m) { + return ct(l, new k.classes.URLSearchParams(), Object.assign({ visitor: function(y, g, s, b) { + return k.isNode && v.isBuffer(y) ? (this.append(g, y.toString("base64")), !1) : b.defaultVisitor.apply(this, arguments); + } }, m)); + }(t, this.formSerializer).toString(); + if ((u = v.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { + const l = this.env && this.env.FormData; + return ct(u ? { "files[]": t } : t, l && new l(), this.formSerializer); + } + } + return i || n ? (e.setContentType("application/json", !1), function(l, m, y) { + if (v.isString(l)) try { + return (m || JSON.parse)(l), v.trim(l); + } catch (g) { + if (g.name !== "SyntaxError") throw g; + } + return (y || JSON.stringify)(l); + }(t)) : t; +}], transformResponse: [function(t) { + const e = this.transitional || Y.transitional, r = e && e.forcedJSONParsing, n = this.responseType === "json"; + if (v.isResponse(t) || v.isReadableStream(t)) return t; + if (t && v.isString(t) && (r && !this.responseType || n)) { + const i = !(e && e.silentJSONParsing) && n; + try { + return JSON.parse(t); + } catch (u) { + if (i) + throw u.name === "SyntaxError" ? C.from(u, C.ERR_BAD_RESPONSE, this, null, this.response) : u; + } + } + return t; +}], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: k.classes.FormData, Blob: k.classes.Blob }, validateStatus: function(t) { + return t >= 200 && t < 300; +}, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; +v.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => { + Y.headers[t] = {}; +}); +const Ze = v.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), re = Symbol("internals"); +function J(t) { + return t && String(t).trim().toLowerCase(); +} +function rt(t) { + return t === !1 || t == null ? t : v.isArray(t) ? t.map(rt) : String(t); +} +function mt(t, e, r, n, i) { + return v.isFunction(n) ? n.call(this, e, r) : (i && (e = r), v.isString(e) ? v.isString(n) ? e.indexOf(n) !== -1 : v.isRegExp(n) ? n.test(e) : void 0 : void 0); +} +class N { + constructor(e) { + e && this.set(e); + } + set(e, r, n) { + const i = this; + function u(m, y, g) { + const s = J(y); + if (!s) throw new Error("header name must be a non-empty string"); + const b = v.findKey(i, s); + (!b || i[b] === void 0 || g === !0 || g === void 0 && i[b] !== !1) && (i[b || y] = rt(m)); + } + const l = (m, y) => v.forEach(m, (g, s) => u(g, s, y)); + if (v.isPlainObject(e) || e instanceof this.constructor) l(e, r); + else if (v.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) l(((m) => { + const y = {}; + let g, s, b; + return m && m.split(` +`).forEach(function(w) { + b = w.indexOf(":"), g = w.substring(0, b).trim().toLowerCase(), s = w.substring(b + 1).trim(), !g || y[g] && Ze[g] || (g === "set-cookie" ? y[g] ? y[g].push(s) : y[g] = [s] : y[g] = y[g] ? y[g] + ", " + s : s); + }), y; + })(e), r); + else if (v.isHeaders(e)) for (const [m, y] of e.entries()) u(y, m, n); + else e != null && u(r, e, n); + return this; + } + get(e, r) { + if (e = J(e)) { + const n = v.findKey(this, e); + if (n) { + const i = this[n]; + if (!r) return i; + if (r === !0) return function(u) { + const l = /* @__PURE__ */ Object.create(null), m = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let y; + for (; y = m.exec(u); ) l[y[1]] = y[2]; + return l; + }(i); + if (v.isFunction(r)) return r.call(this, i, n); + if (v.isRegExp(r)) return r.exec(i); + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(e, r) { + if (e = J(e)) { + const n = v.findKey(this, e); + return !(!n || this[n] === void 0 || r && !mt(0, this[n], n, r)); + } + return !1; + } + delete(e, r) { + const n = this; + let i = !1; + function u(l) { + if (l = J(l)) { + const m = v.findKey(n, l); + !m || r && !mt(0, n[m], m, r) || (delete n[m], i = !0); + } + } + return v.isArray(e) ? e.forEach(u) : u(e), i; + } + clear(e) { + const r = Object.keys(this); + let n = r.length, i = !1; + for (; n--; ) { + const u = r[n]; + e && !mt(0, this[u], u, e, !0) || (delete this[u], i = !0); + } + return i; + } + normalize(e) { + const r = this, n = {}; + return v.forEach(this, (i, u) => { + const l = v.findKey(n, u); + if (l) return r[l] = rt(i), void delete r[u]; + const m = e ? function(y) { + return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (g, s, b) => s.toUpperCase() + b); + }(u) : String(u).trim(); + m !== u && delete r[u], r[m] = rt(i), n[m] = !0; + }), this; + } + concat(...e) { + return this.constructor.concat(this, ...e); + } + toJSON(e) { + const r = /* @__PURE__ */ Object.create(null); + return v.forEach(this, (n, i) => { + n != null && n !== !1 && (r[i] = e && v.isArray(n) ? n.join(", ") : n); + }), r; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(` +`); + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(e) { + return e instanceof this ? e : new this(e); + } + static concat(e, ...r) { + const n = new this(e); + return r.forEach((i) => n.set(i)), n; + } + static accessor(e) { + const r = (this[re] = this[re] = { accessors: {} }).accessors, n = this.prototype; + function i(u) { + const l = J(u); + r[l] || (function(m, y) { + const g = v.toCamelCase(" " + y); + ["get", "set", "has"].forEach((s) => { + Object.defineProperty(m, s + g, { value: function(b, w, A) { + return this[s].call(this, y, b, w, A); + }, configurable: !0 }); + }); + }(n, u), r[l] = !0); + } + return v.isArray(e) ? e.forEach(i) : i(e), this; + } +} +function bt(t, e) { + const r = this || Y, n = e || r, i = N.from(n.headers); + let u = n.data; + return v.forEach(t, function(l) { + u = l.call(r, u, i.normalize(), e ? e.status : void 0); + }), i.normalize(), u; +} +function ve(t) { + return !(!t || !t.__CANCEL__); +} +function $(t, e, r) { + C.call(this, t ?? "canceled", C.ERR_CANCELED, e, r), this.name = "CanceledError"; +} +function Ae(t, e, r) { + const n = r.config.validateStatus; + r.status && n && !n(r.status) ? e(new C("Request failed with status code " + r.status, [C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r); +} +N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), v.reduceDescriptors(N.prototype, ({ value: t }, e) => { + let r = e[0].toUpperCase() + e.slice(1); + return { get: () => t, set(n) { + this[r] = n; + } }; +}), v.freezeMethods(N), v.inherits($, C, { __CANCEL__: !0 }); +const ut = (t, e, r = 3) => { + let n = 0; + const i = function(u, l) { + u = u || 10; + const m = new Array(u), y = new Array(u); + let g, s = 0, b = 0; + return l = l !== void 0 ? l : 1e3, function(w) { + const A = Date.now(), d = y[b]; + g || (g = A), m[s] = w, y[s] = A; + let c = b, o = 0; + for (; c !== s; ) o += m[c++], c %= u; + if (s = (s + 1) % u, s === b && (b = (b + 1) % u), A - g < l) return; + const a = d && A - d; + return a ? Math.round(1e3 * o / a) : void 0; + }; + }(50, 250); + return function(u, l) { + let m = 0; + const y = 1e3 / l; + let g = null; + return function() { + const s = this === !0, b = Date.now(); + if (s || b - m > y) return g && (clearTimeout(g), g = null), m = b, u.apply(null, arguments); + g || (g = setTimeout(() => (g = null, m = Date.now(), u.apply(null, arguments)), y - (b - m))); + }; + }((u) => { + const l = u.loaded, m = u.lengthComputable ? u.total : void 0, y = l - n, g = i(y); + n = l; + const s = { loaded: l, total: m, progress: m ? l / m : void 0, bytes: y, rate: g || void 0, estimated: g && m && l <= m ? (m - l) / g : void 0, event: u, lengthComputable: m != null }; + s[e ? "download" : "upload"] = !0, t(s); + }, r); +}, tr = k.hasStandardBrowserEnv ? function() { + const t = /(msie|trident)/i.test(navigator.userAgent), e = document.createElement("a"); + let r; + function n(i) { + let u = i; + return t && (e.setAttribute("href", u), u = e.href), e.setAttribute("href", u), { href: e.href, protocol: e.protocol ? e.protocol.replace(/:$/, "") : "", host: e.host, search: e.search ? e.search.replace(/^\?/, "") : "", hash: e.hash ? e.hash.replace(/^#/, "") : "", hostname: e.hostname, port: e.port, pathname: e.pathname.charAt(0) === "/" ? e.pathname : "/" + e.pathname }; + } + return r = n(window.location.href), function(i) { + const u = v.isString(i) ? n(i) : i; + return u.protocol === r.protocol && u.host === r.host; + }; +}() : function() { + return !0; +}, er = k.hasStandardBrowserEnv ? { write(t, e, r, n, i, u) { + const l = [t + "=" + encodeURIComponent(e)]; + v.isNumber(r) && l.push("expires=" + new Date(r).toGMTString()), v.isString(n) && l.push("path=" + n), v.isString(i) && l.push("domain=" + i), u === !0 && l.push("secure"), document.cookie = l.join("; "); +}, read(t) { + const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)")); + return e ? decodeURIComponent(e[3]) : null; +}, remove(t) { + this.write(t, "", Date.now() - 864e5); +} } : { write() { +}, read: () => null, remove() { +} }; +function Ee(t, e) { + return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(r, n) { + return n ? r.replace(/\/?\/$/, "") + "/" + n.replace(/^\/+/, "") : r; + }(t, e) : e; +} +const ne = (t) => t instanceof N ? { ...t } : t; +function W(t, e) { + e = e || {}; + const r = {}; + function n(g, s, b) { + return v.isPlainObject(g) && v.isPlainObject(s) ? v.merge.call({ caseless: b }, g, s) : v.isPlainObject(s) ? v.merge({}, s) : v.isArray(s) ? s.slice() : s; + } + function i(g, s, b) { + return v.isUndefined(s) ? v.isUndefined(g) ? void 0 : n(void 0, g, b) : n(g, s, b); + } + function u(g, s) { + if (!v.isUndefined(s)) return n(void 0, s); + } + function l(g, s) { + return v.isUndefined(s) ? v.isUndefined(g) ? void 0 : n(void 0, g) : n(void 0, s); + } + function m(g, s, b) { + return b in e ? n(g, s) : b in t ? n(void 0, g) : void 0; + } + const y = { url: u, method: u, data: u, baseURL: l, transformRequest: l, transformResponse: l, paramsSerializer: l, timeout: l, timeoutMessage: l, withCredentials: l, withXSRFToken: l, adapter: l, responseType: l, xsrfCookieName: l, xsrfHeaderName: l, onUploadProgress: l, onDownloadProgress: l, decompress: l, maxContentLength: l, maxBodyLength: l, beforeRedirect: l, transport: l, httpAgent: l, httpsAgent: l, cancelToken: l, socketPath: l, responseEncoding: l, validateStatus: m, headers: (g, s) => i(ne(g), ne(s), !0) }; + return v.forEach(Object.keys(Object.assign({}, t, e)), function(g) { + const s = y[g] || i, b = s(t[g], e[g], g); + v.isUndefined(b) && s !== m || (r[g] = b); + }), r; +} +const Se = (t) => { + const e = W({}, t); + let r, { data: n, withXSRFToken: i, xsrfHeaderName: u, xsrfCookieName: l, headers: m, auth: y } = e; + if (e.headers = m = N.from(m), e.url = me(Ee(e.baseURL, e.url), t.params, t.paramsSerializer), y && m.set("Authorization", "Basic " + btoa((y.username || "") + ":" + (y.password ? unescape(encodeURIComponent(y.password)) : ""))), v.isFormData(n)) { + if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv) m.setContentType(void 0); + else if ((r = m.getContentType()) !== !1) { + const [g, ...s] = r ? r.split(";").map((b) => b.trim()).filter(Boolean) : []; + m.setContentType([g || "multipart/form-data", ...s].join("; ")); + } + } + if (k.hasStandardBrowserEnv && (i && v.isFunction(i) && (i = i(e)), i || i !== !1 && tr(e.url))) { + const g = u && l && er.read(l); + g && m.set(u, g); + } + return e; +}, rr = typeof XMLHttpRequest < "u" && function(t) { + return new Promise(function(e, r) { + const n = Se(t); + let i = n.data; + const u = N.from(n.headers).normalize(); + let l, { responseType: m } = n; + function y() { + n.cancelToken && n.cancelToken.unsubscribe(l), n.signal && n.signal.removeEventListener("abort", l); + } + let g = new XMLHttpRequest(); + function s() { + if (!g) return; + const w = N.from("getAllResponseHeaders" in g && g.getAllResponseHeaders()); + Ae(function(A) { + e(A), y(); + }, function(A) { + r(A), y(); + }, { data: m && m !== "text" && m !== "json" ? g.response : g.responseText, status: g.status, statusText: g.statusText, headers: w, config: t, request: g }), g = null; + } + g.open(n.method.toUpperCase(), n.url, !0), g.timeout = n.timeout, "onloadend" in g ? g.onloadend = s : g.onreadystatechange = function() { + g && g.readyState === 4 && (g.status !== 0 || g.responseURL && g.responseURL.indexOf("file:") === 0) && setTimeout(s); + }, g.onabort = function() { + g && (r(new C("Request aborted", C.ECONNABORTED, n, g)), g = null); + }, g.onerror = function() { + r(new C("Network Error", C.ERR_NETWORK, n, g)), g = null; + }, g.ontimeout = function() { + let w = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded"; + const A = n.transitional || be; + n.timeoutErrorMessage && (w = n.timeoutErrorMessage), r(new C(w, A.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED, n, g)), g = null; + }, i === void 0 && u.setContentType(null), "setRequestHeader" in g && v.forEach(u.toJSON(), function(w, A) { + g.setRequestHeader(A, w); + }), v.isUndefined(n.withCredentials) || (g.withCredentials = !!n.withCredentials), m && m !== "json" && (g.responseType = n.responseType), typeof n.onDownloadProgress == "function" && g.addEventListener("progress", ut(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && g.upload && g.upload.addEventListener("progress", ut(n.onUploadProgress)), (n.cancelToken || n.signal) && (l = (w) => { + g && (r(!w || w.type ? new $(null, t, g) : w), g.abort(), g = null); + }, n.cancelToken && n.cancelToken.subscribe(l), n.signal && (n.signal.aborted ? l() : n.signal.addEventListener("abort", l))); + const b = function(w) { + const A = /^([-+\w]{1,25})(:?\/\/|:)/.exec(w); + return A && A[1] || ""; + }(n.url); + b && k.protocols.indexOf(b) === -1 ? r(new C("Unsupported protocol " + b + ":", C.ERR_BAD_REQUEST, t)) : g.send(i || null); + }); +}, nr = (t, e) => { + let r, n = new AbortController(); + const i = function(y) { + if (!r) { + r = !0, l(); + const g = y instanceof Error ? y : this.reason; + n.abort(g instanceof C ? g : new $(g instanceof Error ? g.message : g)); + } + }; + let u = e && setTimeout(() => { + i(new C(`timeout ${e} of ms exceeded`, C.ETIMEDOUT)); + }, e); + const l = () => { + t && (u && clearTimeout(u), u = null, t.forEach((y) => { + y && (y.removeEventListener ? y.removeEventListener("abort", i) : y.unsubscribe(i)); + }), t = null); + }; + t.forEach((y) => y && y.addEventListener && y.addEventListener("abort", i)); + const { signal: m } = n; + return m.unsubscribe = l, [m, () => { + u && clearTimeout(u), u = null; + }]; +}, or = function* (t, e) { + let r = t.byteLength; + if (!e || r < e) return void (yield t); + let n, i = 0; + for (; i < r; ) n = i + e, yield t.slice(i, n), i = n; +}, oe = (t, e, r, n, i) => { + const u = async function* (m, y, g) { + for await (const s of m) yield* or(ArrayBuffer.isView(s) ? s : await g(String(s)), y); + }(t, e, i); + let l = 0; + return new ReadableStream({ type: "bytes", async pull(m) { + const { done: y, value: g } = await u.next(); + if (y) return m.close(), void n(); + let s = g.byteLength; + r && r(l += s), m.enqueue(new Uint8Array(g)); + }, cancel: (m) => (n(m), u.return()) }, { highWaterMark: 2 }); +}, se = (t, e) => { + const r = t != null; + return (n) => setTimeout(() => e({ lengthComputable: r, total: t, loaded: n })); +}, ht = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ce = ht && typeof ReadableStream == "function", St = ht && (typeof TextEncoder == "function" ? (ie = new TextEncoder(), (t) => ie.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())); +var ie; +const sr = Ce && (() => { + let t = !1; + const e = new Request(k.origin, { body: new ReadableStream(), method: "POST", get duplex() { + return t = !0, "half"; + } }).headers.has("Content-Type"); + return t && !e; +})(), Ct = Ce && !!(() => { + try { + return v.isReadableStream(new Response("").body); + } catch { + } +})(), lt = { stream: Ct && ((t) => t.body) }; +var ae; +ht && (ae = new Response(), ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { + !lt[t] && (lt[t] = v.isFunction(ae[t]) ? (e) => e[t]() : (e, r) => { + throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, r); + }); +})); +const ir = async (t, e) => { + const r = v.toFiniteNumber(t.getContentLength()); + return r ?? (async (n) => n == null ? 0 : v.isBlob(n) ? n.size : v.isSpecCompliantForm(n) ? (await new Request(n).arrayBuffer()).byteLength : v.isArrayBufferView(n) ? n.byteLength : (v.isURLSearchParams(n) && (n += ""), v.isString(n) ? (await St(n)).byteLength : void 0))(e); +}, Oe = { http: null, xhr: rr, fetch: ht && (async (t) => { + let { url: e, method: r, data: n, signal: i, cancelToken: u, timeout: l, onDownloadProgress: m, onUploadProgress: y, responseType: g, headers: s, withCredentials: b = "same-origin", fetchOptions: w } = Se(t); + g = g ? (g + "").toLowerCase() : "text"; + let A, d, [c, o] = i || u || l ? nr([i, u], l) : []; + const a = () => { + !A && setTimeout(() => { + c && c.unsubscribe(); + }), A = !0; + }; + let f; + try { + if (y && sr && r !== "get" && r !== "head" && (f = await ir(s, n)) !== 0) { + let S, T = new Request(e, { method: "POST", body: n, duplex: "half" }); + v.isFormData(n) && (S = T.headers.get("content-type")) && s.setContentType(S), T.body && (n = oe(T.body, 65536, se(f, ut(y)), null, St)); + } + v.isString(b) || (b = b ? "cors" : "omit"), d = new Request(e, { ...w, signal: c, method: r.toUpperCase(), headers: s.normalize().toJSON(), body: n, duplex: "half", withCredentials: b }); + let p = await fetch(d); + const h = Ct && (g === "stream" || g === "response"); + if (Ct && (m || h)) { + const S = {}; + ["status", "statusText", "headers"].forEach((_) => { + S[_] = p[_]; + }); + const T = v.toFiniteNumber(p.headers.get("content-length")); + p = new Response(oe(p.body, 65536, m && se(T, ut(m, !0)), h && a, St), S); + } + g = g || "text"; + let E = await lt[v.findKey(lt, g) || "text"](p, t); + return !h && a(), o && o(), await new Promise((S, T) => { + Ae(S, T, { data: E, headers: N.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: d }); + }); + } catch (p) { + throw a(), p && p.name === "TypeError" && /fetch/i.test(p.message) ? Object.assign(new C("Network Error", C.ERR_NETWORK, t, d), { cause: p.cause || p }) : C.from(p, p && p.code, t, d); + } +}) }; +v.forEach(Oe, (t, e) => { + if (t) { + try { + Object.defineProperty(t, "name", { value: e }); + } catch { + } + Object.defineProperty(t, "adapterName", { value: e }); + } +}); +const ce = (t) => `- ${t}`, ar = (t) => v.isFunction(t) || t === null || t === !1, Re = (t) => { + t = v.isArray(t) ? t : [t]; + const { length: e } = t; + let r, n; + const i = {}; + for (let u = 0; u < e; u++) { + let l; + if (r = t[u], n = r, !ar(r) && (n = Oe[(l = String(r)).toLowerCase()], n === void 0)) throw new C(`Unknown adapter '${l}'`); + if (n) break; + i[l || "#" + u] = n; + } + if (!n) { + const u = Object.entries(i).map(([l, m]) => `adapter ${l} ` + (m === !1 ? "is not supported by the environment" : "is not available in the build")); + throw new C("There is no suitable adapter to dispatch the request " + (e ? u.length > 1 ? `since : +` + u.map(ce).join(` +`) : " " + ce(u[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); + } + return n; +}; +function wt(t) { + if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new $(null, t); +} +function ue(t) { + return wt(t), t.headers = N.from(t.headers), t.data = bt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Re(t.adapter || Y.adapter)(t).then(function(e) { + return wt(t), e.data = bt.call(t, t.transformResponse, e), e.headers = N.from(e.headers), e; + }, function(e) { + return ve(e) || (wt(t), e && e.response && (e.response.data = bt.call(t, t.transformResponse, e.response), e.response.headers = N.from(e.response.headers))), Promise.reject(e); + }); +} +const cr = "1.7.2", Mt = {}; +["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { + Mt[t] = function(r) { + return typeof r === t || "a" + (e < 1 ? "n " : " ") + t; + }; +}); +const le = {}; +Mt.transitional = function(t, e, r) { + function n(i, u) { + return "[Axios v1.7.2] Transitional option '" + i + "'" + u + (r ? ". " + r : ""); + } + return (i, u, l) => { + if (t === !1) throw new C(n(u, " has been removed" + (e ? " in " + e : "")), C.ERR_DEPRECATED); + return e && !le[u] && (le[u] = !0, console.warn(n(u, " has been deprecated since v" + e + " and will be removed in the near future"))), !t || t(i, u, l); + }; +}; +const Ot = { assertOptions: function(t, e, r) { + if (typeof t != "object") throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE); + const n = Object.keys(t); + let i = n.length; + for (; i-- > 0; ) { + const u = n[i], l = e[u]; + if (l) { + const m = t[u], y = m === void 0 || l(m, u, t); + if (y !== !0) throw new C("option " + u + " must be " + y, C.ERR_BAD_OPTION_VALUE); + } else if (r !== !0) throw new C("Unknown option " + u, C.ERR_BAD_OPTION); + } +}, validators: Mt }, M = Ot.validators; +class I { + constructor(e) { + this.defaults = e, this.interceptors = { request: new te(), response: new te() }; + } + async request(e, r) { + try { + return await this._request(e, r); + } catch (n) { + if (n instanceof Error) { + let i; + Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error(); + const u = i.stack ? i.stack.replace(/^.+\n/, "") : ""; + try { + n.stack ? u && !String(n.stack).endsWith(u.replace(/^.+\n.+\n/, "")) && (n.stack += ` +` + u) : n.stack = u; + } catch { + } + } + throw n; + } + } + _request(e, r) { + typeof e == "string" ? (r = r || {}).url = e : r = e || {}, r = W(this.defaults, r); + const { transitional: n, paramsSerializer: i, headers: u } = r; + n !== void 0 && Ot.assertOptions(n, { silentJSONParsing: M.transitional(M.boolean), forcedJSONParsing: M.transitional(M.boolean), clarifyTimeoutError: M.transitional(M.boolean) }, !1), i != null && (v.isFunction(i) ? r.paramsSerializer = { serialize: i } : Ot.assertOptions(i, { encode: M.function, serialize: M.function }, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase(); + let l = u && v.merge(u.common, u[r.method]); + u && v.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (d) => { + delete u[d]; + }), r.headers = N.concat(l, u); + const m = []; + let y = !0; + this.interceptors.request.forEach(function(d) { + typeof d.runWhen == "function" && d.runWhen(r) === !1 || (y = y && d.synchronous, m.unshift(d.fulfilled, d.rejected)); + }); + const g = []; + let s; + this.interceptors.response.forEach(function(d) { + g.push(d.fulfilled, d.rejected); + }); + let b, w = 0; + if (!y) { + const d = [ue.bind(this), void 0]; + for (d.unshift.apply(d, m), d.push.apply(d, g), b = d.length, s = Promise.resolve(r); w < b; ) s = s.then(d[w++], d[w++]); + return s; + } + b = m.length; + let A = r; + for (w = 0; w < b; ) { + const d = m[w++], c = m[w++]; + try { + A = d(A); + } catch (o) { + c.call(this, o); + break; + } + } + try { + s = ue.call(this, A); + } catch (d) { + return Promise.reject(d); + } + for (w = 0, b = g.length; w < b; ) s = s.then(g[w++], g[w++]); + return s; + } + getUri(e) { + return me(Ee((e = W(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer); + } +} +v.forEach(["delete", "get", "head", "options"], function(t) { + I.prototype[t] = function(e, r) { + return this.request(W(r || {}, { method: t, url: e, data: (r || {}).data })); + }; +}), v.forEach(["post", "put", "patch"], function(t) { + function e(r) { + return function(n, i, u) { + return this.request(W(u || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: n, data: i })); + }; + } + I.prototype[t] = e(), I.prototype[t + "Form"] = e(!0); +}); +class Dt { + constructor(e) { + if (typeof e != "function") throw new TypeError("executor must be a function."); + let r; + this.promise = new Promise(function(i) { + r = i; + }); + const n = this; + this.promise.then((i) => { + if (!n._listeners) return; + let u = n._listeners.length; + for (; u-- > 0; ) n._listeners[u](i); + n._listeners = null; + }), this.promise.then = (i) => { + let u; + const l = new Promise((m) => { + n.subscribe(m), u = m; + }).then(i); + return l.cancel = function() { + n.unsubscribe(u); + }, l; + }, e(function(i, u, l) { + n.reason || (n.reason = new $(i, u, l), r(n.reason)); + }); + } + throwIfRequested() { + if (this.reason) throw this.reason; + } + subscribe(e) { + this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e]; + } + unsubscribe(e) { + if (!this._listeners) return; + const r = this._listeners.indexOf(e); + r !== -1 && this._listeners.splice(r, 1); + } + static source() { + let e; + return { token: new Dt(function(r) { + e = r; + }), cancel: e }; + } +} +const Rt = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; +Object.entries(Rt).forEach(([t, e]) => { + Rt[e] = t; +}); +const x = function t(e) { + const r = new I(e), n = pe(I.prototype.request, r); + return v.extend(n, I.prototype, r, { allOwnKeys: !0 }), v.extend(n, r, null, { allOwnKeys: !0 }), n.create = function(i) { + return t(W(e, i)); + }, n; +}(Y); +x.Axios = I, x.CanceledError = $, x.CancelToken = Dt, x.isCancel = ve, x.VERSION = cr, x.toFormData = ct, x.AxiosError = C, x.Cancel = x.CanceledError, x.all = function(t) { + return Promise.all(t); +}, x.spread = function(t) { + return function(e) { + return t.apply(null, e); + }; +}, x.isAxiosError = function(t) { + return v.isObject(t) && t.isAxiosError === !0; +}, x.mergeConfig = W, x.AxiosHeaders = N, x.formToJSON = (t) => we(v.isHTMLForm(t) ? new FormData(t) : t), x.getAdapter = Re, x.HttpStatusCode = Rt, x.default = x; +var ur = Object.defineProperty, P = (t, e, r) => (((n, i, u) => { + i in n ? ur(n, i, { enumerable: !0, configurable: !0, writable: !0, value: u }) : n[i] = u; +})(t, typeof e != "symbol" ? e + "" : e, r), r), Te = (t, e, r) => { + if (!e.has(t)) throw TypeError("Cannot " + r); +}, O = (t, e, r) => (Te(t, e, "read from private field"), r ? r.call(t) : e.get(t)), j = (t, e, r) => { + if (e.has(t)) throw TypeError("Cannot add the same private member more than once"); + e instanceof WeakSet ? e.add(t) : e.set(t, r); +}, L = (t, e, r, n) => (Te(t, e, "write to private field"), e.set(t, r), r); +function lr(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var fe, xe = {}; +fe = xe, function(t, e) { + var r = e(); + for (var n in r) fe[n] = r[n]; +}(0, function() { + var t = function(u) { + return typeof u != "string" ? u : u.replace(/[\+ \|\^\%]/g, function(l) { + return { " ": "+", "+": "%2B", "|": "%7C", "^": "%5E", "%": "%25" }[l]; + }); + }, e = function(u) { + return typeof u != "string" ? u : u.replace(/\+|%2B|%7C|%5E|%25/g, function(l) { + return { "+": " ", "%2B": "+", "%7C": "|", "%5E": "^", "%25": "%" }[l]; + }); + }, r = function(u) { + return Number.prototype.toString.call(u, 36).toUpperCase(); + }, n = function(u) { + return parseInt(u, 36); + }, i = Array.prototype.indexOf || function(u, l) { + for (var m = l || 0, y = this.length; m < y; m++) if (this[m] === u) return m; + return -1; + }; + return { JSON, pack: function(u, l) { + var m = (l = l || {}).verbose || !1; + m && console.log("Normalize the JSON Object"), u = typeof u == "string" ? this.JSON.parse(u) : u, m && console.log("Creating a empty dictionary"); + var y = { strings: [], integers: [], floats: [] }; + m && console.log("Creating the AST"); + var g = function A(d) { + m && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(d)); + var c, o = typeof d; + if (d === null) return { type: "null", index: -3 }; + if (typeof d > "u") return { type: "undefined", index: -5 }; + if (d instanceof Array) { + var a = ["@"]; + for (var f in d) d.hasOwnProperty(f) && a.push(A(d[f])); + return a; + } + if (o === "object") { + for (var p in a = ["$"], d) d.hasOwnProperty(p) && (a.push(A(p)), a.push(A(d[p]))); + return a; + } + if (d === "") return { type: "empty", index: -4 }; + if (o === "string") return (c = i.call(y.strings, d)) == -1 && (y.strings.push(t(d)), c = y.strings.length - 1), { type: "strings", index: c }; + if (o === "number" && d % 1 == 0) return (c = i.call(y.integers, d)) == -1 && (y.integers.push(r(d)), c = y.integers.length - 1), { type: "integers", index: c }; + if (o === "number") return (c = i.call(y.floats, d)) == -1 && (y.floats.push(d), c = y.floats.length - 1), { type: "floats", index: c }; + if (o === "boolean") return { type: "boolean", index: d ? -1 : -2 }; + throw new Error("Unexpected argument of type " + typeof d); + }(u), s = y.strings.length, b = y.integers.length; + y.floats.length, m && console.log("Parsing the dictionary"); + var w = y.strings.join("|"); + return w += "^" + y.integers.join("|"), w += "^" + y.floats.join("|"), m && console.log("Parsing the structure"), w += "^" + function A(d) { + if (m && console.log("Calling a recursiveParser with " + this.JSON.stringify(d)), d instanceof Array) { + var c = d.shift(); + for (var o in d) d.hasOwnProperty(o) && (c += A(d[o]) + "|"); + return (c[c.length - 1] === "|" ? c.slice(0, -1) : c) + "]"; + } + var a = d.type, f = d.index; + if (a === "strings") return r(f); + if (a === "integers") return r(s + f); + if (a === "floats") return r(s + b + f); + if (a === "boolean") return d.index; + if (a === "null") return -3; + if (a === "undefined") return -5; + if (a === "empty") return -4; + throw new TypeError("The item is alien!"); + }(g), m && console.log("Ending parser"), l.debug ? { dictionary: y, ast: g, packed: w } : w; + }, unpack: function(u, l) { + l = l || {}; + var m = u.split("^"); + l.verbose && console.log("Building dictionary"); + var y = [], g = m[0]; + if (g !== "") { + g = g.split("|"), l.verbose && console.log("Parse the strings dictionary"); + for (var s = 0, b = g.length; s < b; s++) y.push(e(g[s])); + } + if ((g = m[1]) !== "") for (g = g.split("|"), l.verbose && console.log("Parse the integers dictionary"), s = 0, b = g.length; s < b; s++) y.push(n(g[s])); + if ((g = m[2]) !== "") for (g = g.split("|"), l.verbose && console.log("Parse the floats dictionary"), s = 0, b = g.length; s < b; s++) y.push(parseFloat(g[s])); + g = null, l.verbose && console.log("Tokenizing the structure"); + var w = "", A = [], d = m[3].length; + for (s = 0; s < d; s++) { + var c = m[3].charAt(s); + c === "|" || c === "$" || c === "@" || c === "]" ? (w && (A.push(n(w)), w = ""), c !== "|" && A.push(c)) : w += c; + } + var o = A.length, a = 0; + return l.verbose && console.log("Starting recursive parser"), function f() { + var p = A[a++]; + if (l.verbose && console.log("Reading collection type " + (p === "$" ? "object" : "Array")), p === "@") { + for (var h = []; a < o; a++) { + var E = A[a]; + if (l.verbose && console.log("Read " + E + " symbol"), E === "]") return h; + if (E === "@" || E === "$") h.push(f()); + else switch (E) { + case -1: + h.push(!0); + break; + case -2: + h.push(!1); + break; + case -3: + h.push(null); + break; + case -5: + h.push(void 0); + break; + case -4: + h.push(""); + break; + default: + h.push(y[E]); + } + } + return l.verbose && console.log("Parsed " + this.JSON.stringify(h)), h; + } + if (p === "$") { + for (h = {}; a < o; a++) { + var S = A[a]; + if (S === "]") return h; + if (S = S === -4 ? "" : y[S], (E = A[++a]) === "@" || E === "$") h[S] = f(); + else switch (E) { + case -1: + h[S] = !0; + break; + case -2: + h[S] = !1; + break; + case -3: + h[S] = null; + break; + case -5: + h[S] = void 0; + break; + case -4: + h[S] = ""; + break; + default: + h[S] = y[E]; + } + } + return l.verbose && console.log("Parsed " + this.JSON.stringify(h)), h; + } + throw new TypeError("Bad token " + p + " isn't a type"); + }(); + } }; +}); +const he = lr(xe); +var G, X, H, q, Tt, xt, nt, Pt, _t; +class jt { + constructor(e, r, n, i, u) { + return P(this, "code", 0), P(this, "message", "操作成功"), P(this, "data", null), P(this, "url", ""), P(this, "res", ""), j(this, G, null), j(this, X, !0), j(this, H, !0), j(this, q, { get: (l, m) => O(this, Tt).call(this, m), ownKeys: () => Object.keys(O(this, q).getPrototypeOf() || {}), getPrototypeOf: () => O(this, X) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: O(this, q).getPrototypeOf() }) }), j(this, Tt, (l) => l === "$echoMsg" ? O(this, nt) : l === "msg" ? O(this, xt) : l === "then" || l === "resp" ? (L(this, H, !0), L(this, X, l === "resp"), O(this, Pt)) : l === "catch" ? O(this, _t) : l === "IS_ECHO_MSG" ? O(this, H) : Reflect.get(this, l)), j(this, xt, (l = (y) => y, m = !1) => (O(this, nt).call(this), L(this, X, m), Promise.resolve(l == null ? void 0 : l(O(this, q).getPrototypeOf())))), j(this, nt, () => { + O(this, H) && (L(this, H, !1), gr.onMsg(this.code, this.message)); + }), j(this, Pt, (l) => [0, 1].includes(this.code) ? Promise.resolve(l == null ? void 0 : l(O(this, q).getPrototypeOf())) : Promise.reject(O(this, G))), j(this, _t, (l) => Promise.resolve(l(O(this, G)))), this.code = e, this.message = r, this.data = n, this.url = i, this.res = u, L(this, G, new Proxy(this, O(this, q))); + } +} +G = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(); +const vt = (t, e, r, n = "/", i = "") => new jt(t, e, r, n, i); +var de = ["utf8", "utf-8", "unicode-1-1-utf-8"], Pe = { TextEncoder: function(t) { + if (de.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); + this.encoding = "utf-8", this.encode = function(e) { + if (typeof e != "string") throw new TypeError("passed argument must be of tye string"); + var r = unescape(encodeURIComponent(e)), n = new Uint8Array(r.length); + const i = r.split(""); + for (let u = 0; u < i.length; u++) n[u] = i[u].charCodeAt(0); + return n; + }; +}, TextDecoder: function(t) { + if (de.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); + this.encoding = "utf-8", this.decode = function(e, r) { + if (typeof e > "u") return ""; + var n = typeof r < "u" && n in r && r.stream; + if (typeof n != "boolean") throw new TypeError("stream option must be boolean"); + if (ArrayBuffer.isView(e)) { + var i = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), u = new Array(i.length); + for (let l = 0; l < i.length; l++) u[l] = String.fromCharCode(i[l]); + return decodeURIComponent(escape(u.join(""))); + } + throw new TypeError("passed argument must be an array buffer view"); + }; +} }; +const fr = new Pe.TextEncoder("utf8"); +new Pe.TextDecoder("utf8"); +class hr { + constructor(e) { + if (P(this, "encodeTable", []), P(this, "decodeMap", new Uint8Array(256).fill(255)), e.length !== 62) throw new Error("Encoding alphabet must be 62 characters long"); + if (e.includes(` +`) || e.includes("\r")) throw new Error("Encoding alphabet contains newline character"); + this.encodeTable = e.split(""), this.decodeMap = new Uint8Array(256).fill(255); + for (let r = 0; r < e.length; r++) this.decodeMap[e.charCodeAt(r)] = r; + } + encode(e) { + if (!e || e.length === 0) return []; + const r = new dr(this).encodeV2(e); + return String.fromCharCode(...r); + } + decode(e) { + if (!e || e.length === 0) return new Uint8Array(); + const r = new pr(this).decode(e); + return new TextDecoder().decode(r); + } +} +var ot, st, it, Q, Nt, F, D; +class dr { + constructor(e) { + j(this, ot, null), L(this, ot, e); + } + get6bits() { + let e = 7 & this.pos, r = this.pos >> 3; + e === 0 && (r -= 1, e = 8); + let n = this.src[r] >> 8 - e; + return e < 6 && r > 0 && (n |= this.src[r - 1] << e), 63 & n; + } + encodeV2(e) { + this.src = ((n) => fr.encode(n || ""))(e), this.pos = 8 * this.src.length; + const r = []; + for (; this.pos > 0; ) { + let n = 6, i = this.get6bits(); + !(30 & ~i) && ((this.pos > 6 || i > 31) && (n = 5), i &= 31), r.push(O(this, ot).encodeTable[i].charCodeAt(0)), this.pos -= n; + } + return r; + } +} +ot = /* @__PURE__ */ new WeakMap(); +class pr { + constructor(e) { + j(this, st, null), L(this, st, e); + } + decode(e) { + const r = new Uint8Array(Math.ceil(6 * e.length / 8) + 1); + let n = r.length, i = 0, u = 0; + for (let l = 0; l < e.length; l++) { + const m = e[l].charCodeAt(0), y = O(this, st).decodeMap[m]; + if (y === 255) throw new Error(`CorruptInputError at index ${l}`); + l === e.length - 1 ? (u |= y << i, i += Math.ceil(Math.log2(y + 1))) : 30 & ~y ? (u |= y << i, i += 6) : (u |= y << i, i += 5), i >= 8 && (n--, r[n] = 255 & u, i %= 8, u >>= 8); + } + return i > 0 && (n--, r[n] = 255 & u), r.slice(n); + } +} +st = /* @__PURE__ */ new WeakMap(), Promise.withResolvers || (Promise.withResolvers = function() { + let t, e; + return { promise: new Promise((r, n) => { + t = r, e = n; + }), resolve: t, reject: e }; +}); +class Ut { + constructor(e, r, n = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) { + j(this, it, void 0), j(this, Q, void 0), j(this, Nt, void 0), j(this, F, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), j(this, D, /* @__PURE__ */ new Map()), P(this, "request", ({ url: i = "/", method: u = "GET", ...l }, m = !1) => { + var y; + i = ((c, o) => c.replace(new RegExp(`^${o}+|${o}+$`, "g"), ""))(i, "/"); + const g = u.toUpperCase(), s = ((c) => { + let o = 5381; + for (let a = 0; a < c.length; a++) o = 33 * o ^ c.charCodeAt(a); + return (o >>> 0).toString(16); + })(JSON.stringify([i, g, l])), b = (y = i == null ? void 0 : i.includes) != null && y.call(i, "/_/") ? "#" : "$", { promise: w, resolve: A, reject: d } = Promise.withResolvers(); + return O(this, F)[b].has(s) ? (console.log("cache", i), A(O(this, F)[b].get(s))) : O(this, D).has(s) ? O(this, D).get(s).push([A, d]) : (O(this, D).set(s, [[A, d]]), O(this, it).call(this, { url: i, method: g, ...l }).then((c) => { + if (![0, 1].includes(c.code)) throw vt(c.code, c.msg, c.data, i, c == null ? void 0 : c.res); + return [c.code, c.msg, c.data, i, c == null ? void 0 : c.res]; + }).then((c) => ((b == "#" || g == "GET") && O(this, F)[b].set(s, c), b != "#" && g == "GET" && !m && setTimeout(() => { + O(this, F)[b].delete(s); + }, 300), c)).then((c) => { + var o; + return (o = O(this, D).get(s)) == null ? void 0 : o.forEach((a, f, p) => { + a && a[0](c), delete p[f]; + }); + }).catch((c) => { + var o; + O(this, F)[b].delete(s), (o = O(this, D).get(s)) == null || o.forEach((a, f, p) => { + a && a[1](c instanceof jt ? c : vt(-1, c, null, i)), delete p[f]; + }); + }).finally(() => O(this, D).delete(s))), new Proxy(w, { get: (c, o) => (...a) => c.then((f) => vt(...f)[o](...a)).catch((f) => { + if (!f instanceof jt) throw f; + return typeof f[o] == "function" ? f[o](...a) : f[o]; + }) }); + }), P(this, "get", (i, u = {}) => this.request({ url: i, method: "GET", params: u })), P(this, "post", (i, u = {}, l = {}) => this.request({ url: i, method: "POST", data: u, params: l })), P(this, "put", (i, u = {}, l = {}) => this.request({ url: i, method: "PUT", data: u, params: l })), P(this, "del", (i, u = {}, l = {}) => this.request({ url: i, method: "DELETE", data: u, params: l })), P(this, "download", (i, u) => { + }), P(this, "cache", (i, u = {}) => this.request({ url: i, method: "GET", params: u }, !0)), P(this, "list", (i, u = {}) => this.get(`/api/${i}/${this.encode(u)}`)), P(this, "getAppInfo", () => { + }), P(this, "refreshCache", (i = !1) => { + i && O(this, F)["#"].clear(), O(this, F).$.clear(); + }), P(this, "decode", (i = "", u = {}) => { + if (i === void 0 || i === "" || i === null) return u; + try { + const l = O(this, Q).decode(i); + return he.unpack(l); + } catch { + return console.warn("core.decode", i), u; + } + }), P(this, "encode", (i = {}) => { + const u = JSON.stringify(i, (l, m) => m === void 0 ? null : m); + return O(this, Q).encode(he.pack(u)); + }), L(this, Nt, e), L(this, it, n), L(this, Q, new hr(r)); + } +} +it = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(); +const gr = Ut; +Ut.onUnhandledRejection = (t) => { + var e, r, n, i, u, l; + t != null && t.IS_ECHO_MSG ? ((e = t == null ? void 0 : t.$echoMsg) == null || e.call(t), (r = t == null ? void 0 : t.preventDefault) == null || r.call(t)) : (n = t.reason) != null && n.IS_ECHO_MSG && ((u = (i = t.reason) == null ? void 0 : i.$echoMsg) == null || u.call(i), (l = t == null ? void 0 : t.preventDefault) == null || l.call(t)); +}, Ut.onMsg = (t, e) => [0, 1].includes(t) ? console.log(e) : console.warn(e); +function qt(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var _e = { exports: {} }; +/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */ +_e.exports = function() { + var t, e, r = { version: "0.2.0" }, n = r.settings = { minimum: 0.08, easing: "ease", positionUsing: "", speed: 200, trickle: !0, trickleRate: 0.02, trickleSpeed: 800, showSpinner: !0, barSelector: '[role="bar"]', spinnerSelector: '[role="spinner"]', parent: "body", template: '
' }; + function i(d, c, o) { + return d < c ? c : d > o ? o : d; + } + function u(d) { + return 100 * (-1 + d); + } + function l(d, c, o) { + var a; + return (a = n.positionUsing === "translate3d" ? { transform: "translate3d(" + u(d) + "%,0,0)" } : n.positionUsing === "translate" ? { transform: "translate(" + u(d) + "%,0)" } : { "margin-left": u(d) + "%" }).transition = "all " + c + "ms " + o, a; + } + r.configure = function(d) { + var c, o; + for (c in d) (o = d[c]) !== void 0 && d.hasOwnProperty(c) && (n[c] = o); + return this; + }, r.status = null, r.set = function(d) { + var c = r.isStarted(); + d = i(d, n.minimum, 1), r.status = d === 1 ? null : d; + var o = r.render(!c), a = o.querySelector(n.barSelector), f = n.speed, p = n.easing; + return o.offsetWidth, m(function(h) { + n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), y(a, l(d, f, p)), d === 1 ? (y(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() { + y(o, { transition: "all " + f + "ms linear", opacity: 0 }), setTimeout(function() { + r.remove(), h(); + }, f); + }, f)) : setTimeout(h, f); + }), this; + }, r.isStarted = function() { + return typeof r.status == "number"; + }, r.start = function() { + r.status || r.set(0); + var d = function() { + setTimeout(function() { + r.status && (r.trickle(), d()); + }, n.trickleSpeed); + }; + return n.trickle && d(), this; + }, r.done = function(d) { + return d || r.status ? r.inc(0.3 + 0.5 * Math.random()).set(1) : this; + }, r.inc = function(d) { + var c = r.status; + return c ? (typeof d != "number" && (d = (1 - c) * i(Math.random() * c, 0.1, 0.95)), c = i(c + d, 0, 0.994), r.set(c)) : r.start(); + }, r.trickle = function() { + return r.inc(Math.random() * n.trickleRate); + }, t = 0, e = 0, r.promise = function(d) { + return d && d.state() !== "resolved" ? (e === 0 && r.start(), t++, e++, d.always(function() { + --e == 0 ? (t = 0, r.done()) : r.set((t - e) / t); + }), this) : this; + }, r.render = function(d) { + if (r.isRendered()) return document.getElementById("nprogress"); + s(document.documentElement, "nprogress-busy"); + var c = document.createElement("div"); + c.id = "nprogress", c.innerHTML = n.template; + var o, a = c.querySelector(n.barSelector), f = d ? "-100" : u(r.status || 0), p = document.querySelector(n.parent); + return y(a, { transition: "all 0 linear", transform: "translate3d(" + f + "%,0,0)" }), n.showSpinner || (o = c.querySelector(n.spinnerSelector)) && A(o), p != document.body && s(p, "nprogress-custom-parent"), p.appendChild(c), c; + }, r.remove = function() { + b(document.documentElement, "nprogress-busy"), b(document.querySelector(n.parent), "nprogress-custom-parent"); + var d = document.getElementById("nprogress"); + d && A(d); + }, r.isRendered = function() { + return !!document.getElementById("nprogress"); + }, r.getPositioningCSS = function() { + var d = document.body.style, c = "WebkitTransform" in d ? "Webkit" : "MozTransform" in d ? "Moz" : "msTransform" in d ? "ms" : "OTransform" in d ? "O" : ""; + return c + "Perspective" in d ? "translate3d" : c + "Transform" in d ? "translate" : "margin"; + }; + var m = /* @__PURE__ */ function() { + var d = []; + function c() { + var o = d.shift(); + o && o(c); + } + return function(o) { + d.push(o), d.length == 1 && c(); + }; + }(), y = /* @__PURE__ */ function() { + var d = ["Webkit", "O", "Moz", "ms"], c = {}; + function o(h) { + return h.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(E, S) { + return S.toUpperCase(); + }); + } + function a(h) { + var E = document.body.style; + if (h in E) return h; + for (var S, T = d.length, _ = h.charAt(0).toUpperCase() + h.slice(1); T--; ) if ((S = d[T] + _) in E) return S; + return h; + } + function f(h) { + return h = o(h), c[h] || (c[h] = a(h)); + } + function p(h, E, S) { + E = f(E), h.style[E] = S; + } + return function(h, E) { + var S, T, _ = arguments; + if (_.length == 2) for (S in E) (T = E[S]) !== void 0 && E.hasOwnProperty(S) && p(h, S, T); + else p(h, _[1], _[2]); + }; + }(); + function g(d, c) { + return (typeof d == "string" ? d : w(d)).indexOf(" " + c + " ") >= 0; + } + function s(d, c) { + var o = w(d), a = o + c; + g(o, c) || (d.className = a.substring(1)); + } + function b(d, c) { + var o, a = w(d); + g(d, c) && (o = a.replace(" " + c + " ", " "), d.className = o.substring(1, o.length - 1)); + } + function w(d) { + return (" " + (d.className || "") + " ").replace(/\s+/gi, " "); + } + function A(d) { + d && d.parentNode && d.parentNode.removeChild(d); + } + return r; +}(); +const yr = qt(_e.exports); +var At, Et, kt = { exports: {} }; +At = kt, Et = kt.exports, function() { + var t = { version: "3.0.1", x86: {}, x64: {} }; + function e(s, b) { + return (65535 & s) * b + (((s >>> 16) * b & 65535) << 16); + } + function r(s, b) { + return s << b | s >>> 32 - b; + } + function n(s) { + return s = e(s ^= s >>> 16, 2246822507), s = e(s ^= s >>> 13, 3266489909), s ^= s >>> 16; + } + function i(s, b) { + s = [s[0] >>> 16, 65535 & s[0], s[1] >>> 16, 65535 & s[1]], b = [b[0] >>> 16, 65535 & b[0], b[1] >>> 16, 65535 & b[1]]; + var w = [0, 0, 0, 0]; + return w[3] += s[3] + b[3], w[2] += w[3] >>> 16, w[3] &= 65535, w[2] += s[2] + b[2], w[1] += w[2] >>> 16, w[2] &= 65535, w[1] += s[1] + b[1], w[0] += w[1] >>> 16, w[1] &= 65535, w[0] += s[0] + b[0], w[0] &= 65535, [w[0] << 16 | w[1], w[2] << 16 | w[3]]; + } + function u(s, b) { + s = [s[0] >>> 16, 65535 & s[0], s[1] >>> 16, 65535 & s[1]], b = [b[0] >>> 16, 65535 & b[0], b[1] >>> 16, 65535 & b[1]]; + var w = [0, 0, 0, 0]; + return w[3] += s[3] * b[3], w[2] += w[3] >>> 16, w[3] &= 65535, w[2] += s[2] * b[3], w[1] += w[2] >>> 16, w[2] &= 65535, w[2] += s[3] * b[2], w[1] += w[2] >>> 16, w[2] &= 65535, w[1] += s[1] * b[3], w[0] += w[1] >>> 16, w[1] &= 65535, w[1] += s[2] * b[2], w[0] += w[1] >>> 16, w[1] &= 65535, w[1] += s[3] * b[1], w[0] += w[1] >>> 16, w[1] &= 65535, w[0] += s[0] * b[3] + s[1] * b[2] + s[2] * b[1] + s[3] * b[0], w[0] &= 65535, [w[0] << 16 | w[1], w[2] << 16 | w[3]]; + } + function l(s, b) { + return (b %= 64) == 32 ? [s[1], s[0]] : b < 32 ? [s[0] << b | s[1] >>> 32 - b, s[1] << b | s[0] >>> 32 - b] : (b -= 32, [s[1] << b | s[0] >>> 32 - b, s[0] << b | s[1] >>> 32 - b]); + } + function m(s, b) { + return (b %= 64) == 0 ? s : b < 32 ? [s[0] << b | s[1] >>> 32 - b, s[1] << b] : [s[1] << b - 32, 0]; + } + function y(s, b) { + return [s[0] ^ b[0], s[1] ^ b[1]]; + } + function g(s) { + return s = y(s, [0, s[0] >>> 1]), s = y(s = u(s, [4283543511, 3981806797]), [0, s[0] >>> 1]), s = y(s = u(s, [3301882366, 444984403]), [0, s[0] >>> 1]); + } + t.x86.hash32 = function(s, b) { + b = b || 0; + for (var w = (s = s || "").length % 4, A = s.length - w, d = b, c = 0, o = 3432918353, a = 461845907, f = 0; f < A; f += 4) c = e(c = 255 & s.charCodeAt(f) | (255 & s.charCodeAt(f + 1)) << 8 | (255 & s.charCodeAt(f + 2)) << 16 | (255 & s.charCodeAt(f + 3)) << 24, o), c = e(c = r(c, 15), a), d = e(d = r(d ^= c, 13), 5) + 3864292196; + switch (c = 0, w) { + case 3: + c ^= (255 & s.charCodeAt(f + 2)) << 16; + case 2: + c ^= (255 & s.charCodeAt(f + 1)) << 8; + case 1: + c = e(c ^= 255 & s.charCodeAt(f), o), d ^= c = e(c = r(c, 15), a); + } + return (d = n(d ^= s.length)) >>> 0; + }, t.x86.hash128 = function(s, b) { + b = b || 0; + for (var w = (s = s || "").length % 16, A = s.length - w, d = b, c = b, o = b, a = b, f = 0, p = 0, h = 0, E = 0, S = 597399067, T = 2869860233, _ = 951274213, Z = 2716044179, R = 0; R < A; R += 16) f = 255 & s.charCodeAt(R) | (255 & s.charCodeAt(R + 1)) << 8 | (255 & s.charCodeAt(R + 2)) << 16 | (255 & s.charCodeAt(R + 3)) << 24, p = 255 & s.charCodeAt(R + 4) | (255 & s.charCodeAt(R + 5)) << 8 | (255 & s.charCodeAt(R + 6)) << 16 | (255 & s.charCodeAt(R + 7)) << 24, h = 255 & s.charCodeAt(R + 8) | (255 & s.charCodeAt(R + 9)) << 8 | (255 & s.charCodeAt(R + 10)) << 16 | (255 & s.charCodeAt(R + 11)) << 24, E = 255 & s.charCodeAt(R + 12) | (255 & s.charCodeAt(R + 13)) << 8 | (255 & s.charCodeAt(R + 14)) << 16 | (255 & s.charCodeAt(R + 15)) << 24, f = r(f = e(f, S), 15), d = r(d ^= f = e(f, T), 19), d = e(d += c, 5) + 1444728091, p = r(p = e(p, T), 16), c = r(c ^= p = e(p, _), 17), c = e(c += o, 5) + 197830471, h = r(h = e(h, _), 17), o = r(o ^= h = e(h, Z), 15), o = e(o += a, 5) + 2530024501, E = r(E = e(E, Z), 18), a = r(a ^= E = e(E, S), 13), a = e(a += d, 5) + 850148119; + switch (f = 0, p = 0, h = 0, E = 0, w) { + case 15: + E ^= s.charCodeAt(R + 14) << 16; + case 14: + E ^= s.charCodeAt(R + 13) << 8; + case 13: + E = e(E ^= s.charCodeAt(R + 12), Z), a ^= E = e(E = r(E, 18), S); + case 12: + h ^= s.charCodeAt(R + 11) << 24; + case 11: + h ^= s.charCodeAt(R + 10) << 16; + case 10: + h ^= s.charCodeAt(R + 9) << 8; + case 9: + h = e(h ^= s.charCodeAt(R + 8), _), o ^= h = e(h = r(h, 17), Z); + case 8: + p ^= s.charCodeAt(R + 7) << 24; + case 7: + p ^= s.charCodeAt(R + 6) << 16; + case 6: + p ^= s.charCodeAt(R + 5) << 8; + case 5: + p = e(p ^= s.charCodeAt(R + 4), T), c ^= p = e(p = r(p, 16), _); + case 4: + f ^= s.charCodeAt(R + 3) << 24; + case 3: + f ^= s.charCodeAt(R + 2) << 16; + case 2: + f ^= s.charCodeAt(R + 1) << 8; + case 1: + f = e(f ^= s.charCodeAt(R), S), d ^= f = e(f = r(f, 15), T); + } + return d ^= s.length, d += c ^= s.length, d += o ^= s.length, c += d += a ^= s.length, o += d, a += d, d = n(d), d += c = n(c), d += o = n(o), c += d += a = n(a), o += d, a += d, ("00000000" + (d >>> 0).toString(16)).slice(-8) + ("00000000" + (c >>> 0).toString(16)).slice(-8) + ("00000000" + (o >>> 0).toString(16)).slice(-8) + ("00000000" + (a >>> 0).toString(16)).slice(-8); + }, t.x64.hash128 = function(s, b) { + b = b || 0; + for (var w = (s = s || "").length % 16, A = s.length - w, d = [0, b], c = [0, b], o = [0, 0], a = [0, 0], f = [2277735313, 289559509], p = [1291169091, 658871167], h = 0; h < A; h += 16) o = [255 & s.charCodeAt(h + 4) | (255 & s.charCodeAt(h + 5)) << 8 | (255 & s.charCodeAt(h + 6)) << 16 | (255 & s.charCodeAt(h + 7)) << 24, 255 & s.charCodeAt(h) | (255 & s.charCodeAt(h + 1)) << 8 | (255 & s.charCodeAt(h + 2)) << 16 | (255 & s.charCodeAt(h + 3)) << 24], a = [255 & s.charCodeAt(h + 12) | (255 & s.charCodeAt(h + 13)) << 8 | (255 & s.charCodeAt(h + 14)) << 16 | (255 & s.charCodeAt(h + 15)) << 24, 255 & s.charCodeAt(h + 8) | (255 & s.charCodeAt(h + 9)) << 8 | (255 & s.charCodeAt(h + 10)) << 16 | (255 & s.charCodeAt(h + 11)) << 24], o = l(o = u(o, f), 31), d = i(d = l(d = y(d, o = u(o, p)), 27), c), d = i(u(d, [0, 5]), [0, 1390208809]), a = l(a = u(a, p), 33), c = i(c = l(c = y(c, a = u(a, f)), 31), d), c = i(u(c, [0, 5]), [0, 944331445]); + switch (o = [0, 0], a = [0, 0], w) { + case 15: + a = y(a, m([0, s.charCodeAt(h + 14)], 48)); + case 14: + a = y(a, m([0, s.charCodeAt(h + 13)], 40)); + case 13: + a = y(a, m([0, s.charCodeAt(h + 12)], 32)); + case 12: + a = y(a, m([0, s.charCodeAt(h + 11)], 24)); + case 11: + a = y(a, m([0, s.charCodeAt(h + 10)], 16)); + case 10: + a = y(a, m([0, s.charCodeAt(h + 9)], 8)); + case 9: + a = u(a = y(a, [0, s.charCodeAt(h + 8)]), p), c = y(c, a = u(a = l(a, 33), f)); + case 8: + o = y(o, m([0, s.charCodeAt(h + 7)], 56)); + case 7: + o = y(o, m([0, s.charCodeAt(h + 6)], 48)); + case 6: + o = y(o, m([0, s.charCodeAt(h + 5)], 40)); + case 5: + o = y(o, m([0, s.charCodeAt(h + 4)], 32)); + case 4: + o = y(o, m([0, s.charCodeAt(h + 3)], 24)); + case 3: + o = y(o, m([0, s.charCodeAt(h + 2)], 16)); + case 2: + o = y(o, m([0, s.charCodeAt(h + 1)], 8)); + case 1: + o = u(o = y(o, [0, s.charCodeAt(h)]), f), d = y(d, o = u(o = l(o, 31), p)); + } + return d = i(d = y(d, [0, s.length]), c = y(c, [0, s.length])), c = i(c, d), d = i(d = g(d), c = g(c)), c = i(c, d), ("00000000" + (d[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (d[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (c[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (c[1] >>> 0).toString(16)).slice(-8); + }, At.exports && (Et = At.exports = t), Et.murmurHash3 = t; +}(); +const mr = qt(kt.exports); +var je = { exports: {} }; +je.exports = function(t) { + var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + function r(c, o) { + var a = c[0], f = c[1], p = c[2], h = c[3]; + f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & p | ~f & h) + o[0] - 680876936 | 0) << 7 | a >>> 25) + f | 0) & f | ~a & p) + o[1] - 389564586 | 0) << 12 | h >>> 20) + a | 0) & a | ~h & f) + o[2] + 606105819 | 0) << 17 | p >>> 15) + h | 0) & h | ~p & a) + o[3] - 1044525330 | 0) << 22 | f >>> 10) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & p | ~f & h) + o[4] - 176418897 | 0) << 7 | a >>> 25) + f | 0) & f | ~a & p) + o[5] + 1200080426 | 0) << 12 | h >>> 20) + a | 0) & a | ~h & f) + o[6] - 1473231341 | 0) << 17 | p >>> 15) + h | 0) & h | ~p & a) + o[7] - 45705983 | 0) << 22 | f >>> 10) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & p | ~f & h) + o[8] + 1770035416 | 0) << 7 | a >>> 25) + f | 0) & f | ~a & p) + o[9] - 1958414417 | 0) << 12 | h >>> 20) + a | 0) & a | ~h & f) + o[10] - 42063 | 0) << 17 | p >>> 15) + h | 0) & h | ~p & a) + o[11] - 1990404162 | 0) << 22 | f >>> 10) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & p | ~f & h) + o[12] + 1804603682 | 0) << 7 | a >>> 25) + f | 0) & f | ~a & p) + o[13] - 40341101 | 0) << 12 | h >>> 20) + a | 0) & a | ~h & f) + o[14] - 1502002290 | 0) << 17 | p >>> 15) + h | 0) & h | ~p & a) + o[15] + 1236535329 | 0) << 22 | f >>> 10) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & h | p & ~h) + o[1] - 165796510 | 0) << 5 | a >>> 27) + f | 0) & p | f & ~p) + o[6] - 1069501632 | 0) << 9 | h >>> 23) + a | 0) & f | a & ~f) + o[11] + 643717713 | 0) << 14 | p >>> 18) + h | 0) & a | h & ~a) + o[0] - 373897302 | 0) << 20 | f >>> 12) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & h | p & ~h) + o[5] - 701558691 | 0) << 5 | a >>> 27) + f | 0) & p | f & ~p) + o[10] + 38016083 | 0) << 9 | h >>> 23) + a | 0) & f | a & ~f) + o[15] - 660478335 | 0) << 14 | p >>> 18) + h | 0) & a | h & ~a) + o[4] - 405537848 | 0) << 20 | f >>> 12) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & h | p & ~h) + o[9] + 568446438 | 0) << 5 | a >>> 27) + f | 0) & p | f & ~p) + o[14] - 1019803690 | 0) << 9 | h >>> 23) + a | 0) & f | a & ~f) + o[3] - 187363961 | 0) << 14 | p >>> 18) + h | 0) & a | h & ~a) + o[8] + 1163531501 | 0) << 20 | f >>> 12) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f & h | p & ~h) + o[13] - 1444681467 | 0) << 5 | a >>> 27) + f | 0) & p | f & ~p) + o[2] - 51403784 | 0) << 9 | h >>> 23) + a | 0) & f | a & ~f) + o[7] + 1735328473 | 0) << 14 | p >>> 18) + h | 0) & a | h & ~a) + o[12] - 1926607734 | 0) << 20 | f >>> 12) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f ^ p ^ h) + o[5] - 378558 | 0) << 4 | a >>> 28) + f | 0) ^ f ^ p) + o[8] - 2022574463 | 0) << 11 | h >>> 21) + a | 0) ^ a ^ f) + o[11] + 1839030562 | 0) << 16 | p >>> 16) + h | 0) ^ h ^ a) + o[14] - 35309556 | 0) << 23 | f >>> 9) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f ^ p ^ h) + o[1] - 1530992060 | 0) << 4 | a >>> 28) + f | 0) ^ f ^ p) + o[4] + 1272893353 | 0) << 11 | h >>> 21) + a | 0) ^ a ^ f) + o[7] - 155497632 | 0) << 16 | p >>> 16) + h | 0) ^ h ^ a) + o[10] - 1094730640 | 0) << 23 | f >>> 9) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f ^ p ^ h) + o[13] + 681279174 | 0) << 4 | a >>> 28) + f | 0) ^ f ^ p) + o[0] - 358537222 | 0) << 11 | h >>> 21) + a | 0) ^ a ^ f) + o[3] - 722521979 | 0) << 16 | p >>> 16) + h | 0) ^ h ^ a) + o[6] + 76029189 | 0) << 23 | f >>> 9) + p | 0, f = ((f += ((p = ((p += ((h = ((h += ((a = ((a += (f ^ p ^ h) + o[9] - 640364487 | 0) << 4 | a >>> 28) + f | 0) ^ f ^ p) + o[12] - 421815835 | 0) << 11 | h >>> 21) + a | 0) ^ a ^ f) + o[15] + 530742520 | 0) << 16 | p >>> 16) + h | 0) ^ h ^ a) + o[2] - 995338651 | 0) << 23 | f >>> 9) + p | 0, f = ((f += ((h = ((h += (f ^ ((a = ((a += (p ^ (f | ~h)) + o[0] - 198630844 | 0) << 6 | a >>> 26) + f | 0) | ~p)) + o[7] + 1126891415 | 0) << 10 | h >>> 22) + a | 0) ^ ((p = ((p += (a ^ (h | ~f)) + o[14] - 1416354905 | 0) << 15 | p >>> 17) + h | 0) | ~a)) + o[5] - 57434055 | 0) << 21 | f >>> 11) + p | 0, f = ((f += ((h = ((h += (f ^ ((a = ((a += (p ^ (f | ~h)) + o[12] + 1700485571 | 0) << 6 | a >>> 26) + f | 0) | ~p)) + o[3] - 1894986606 | 0) << 10 | h >>> 22) + a | 0) ^ ((p = ((p += (a ^ (h | ~f)) + o[10] - 1051523 | 0) << 15 | p >>> 17) + h | 0) | ~a)) + o[1] - 2054922799 | 0) << 21 | f >>> 11) + p | 0, f = ((f += ((h = ((h += (f ^ ((a = ((a += (p ^ (f | ~h)) + o[8] + 1873313359 | 0) << 6 | a >>> 26) + f | 0) | ~p)) + o[15] - 30611744 | 0) << 10 | h >>> 22) + a | 0) ^ ((p = ((p += (a ^ (h | ~f)) + o[6] - 1560198380 | 0) << 15 | p >>> 17) + h | 0) | ~a)) + o[13] + 1309151649 | 0) << 21 | f >>> 11) + p | 0, f = ((f += ((h = ((h += (f ^ ((a = ((a += (p ^ (f | ~h)) + o[4] - 145523070 | 0) << 6 | a >>> 26) + f | 0) | ~p)) + o[11] - 1120210379 | 0) << 10 | h >>> 22) + a | 0) ^ ((p = ((p += (a ^ (h | ~f)) + o[2] + 718787259 | 0) << 15 | p >>> 17) + h | 0) | ~a)) + o[9] - 343485551 | 0) << 21 | f >>> 11) + p | 0, c[0] = a + c[0] | 0, c[1] = f + c[1] | 0, c[2] = p + c[2] | 0, c[3] = h + c[3] | 0; + } + function n(c) { + var o, a = []; + for (o = 0; o < 64; o += 4) a[o >> 2] = c.charCodeAt(o) + (c.charCodeAt(o + 1) << 8) + (c.charCodeAt(o + 2) << 16) + (c.charCodeAt(o + 3) << 24); + return a; + } + function i(c) { + var o, a = []; + for (o = 0; o < 64; o += 4) a[o >> 2] = c[o] + (c[o + 1] << 8) + (c[o + 2] << 16) + (c[o + 3] << 24); + return a; + } + function u(c) { + var o, a, f, p, h, E, S = c.length, T = [1732584193, -271733879, -1732584194, 271733878]; + for (o = 64; o <= S; o += 64) r(T, n(c.substring(o - 64, o))); + for (a = (c = c.substring(o - 64)).length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) f[o >> 2] |= c.charCodeAt(o) << (o % 4 << 3); + if (f[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, f), o = 0; o < 16; o += 1) f[o] = 0; + return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), h = parseInt(p[2], 16), E = parseInt(p[1], 16) || 0, f[14] = h, f[15] = E, r(T, f), T; + } + function l(c) { + var o, a, f, p, h, E, S = c.length, T = [1732584193, -271733879, -1732584194, 271733878]; + for (o = 64; o <= S; o += 64) r(T, i(c.subarray(o - 64, o))); + for (a = (c = o - 64 < S ? c.subarray(o - 64) : new Uint8Array(0)).length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) f[o >> 2] |= c[o] << (o % 4 << 3); + if (f[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, f), o = 0; o < 16; o += 1) f[o] = 0; + return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), h = parseInt(p[2], 16), E = parseInt(p[1], 16) || 0, f[14] = h, f[15] = E, r(T, f), T; + } + function m(c) { + var o, a = ""; + for (o = 0; o < 4; o += 1) a += e[c >> 8 * o + 4 & 15] + e[c >> 8 * o & 15]; + return a; + } + function y(c) { + var o; + for (o = 0; o < c.length; o += 1) c[o] = m(c[o]); + return c.join(""); + } + function g(c) { + return /[\u0080-\uFFFF]/.test(c) && (c = unescape(encodeURIComponent(c))), c; + } + function s(c, o) { + var a, f = c.length, p = new ArrayBuffer(f), h = new Uint8Array(p); + for (a = 0; a < f; a += 1) h[a] = c.charCodeAt(a); + return o ? h : p; + } + function b(c) { + return String.fromCharCode.apply(null, new Uint8Array(c)); + } + function w(c, o, a) { + var f = new Uint8Array(c.byteLength + o.byteLength); + return f.set(new Uint8Array(c)), f.set(new Uint8Array(o), c.byteLength), f; + } + function A(c) { + var o, a = [], f = c.length; + for (o = 0; o < f - 1; o += 2) a.push(parseInt(c.substr(o, 2), 16)); + return String.fromCharCode.apply(String, a); + } + function d() { + this.reset(); + } + return y(u("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { + function c(o, a) { + return (o = 0 | o || 0) < 0 ? Math.max(o + a, 0) : Math.min(o, a); + } + ArrayBuffer.prototype.slice = function(o, a) { + var f, p, h, E, S = this.byteLength, T = c(o, S), _ = S; + return a !== t && (_ = c(a, S)), T > _ ? new ArrayBuffer(0) : (f = _ - T, p = new ArrayBuffer(f), h = new Uint8Array(p), E = new Uint8Array(this, T, f), h.set(E), p); + }; + }(), d.prototype.append = function(c) { + return this.appendBinary(g(c)), this; + }, d.prototype.appendBinary = function(c) { + this._buff += c, this._length += c.length; + var o, a = this._buff.length; + for (o = 64; o <= a; o += 64) r(this._hash, n(this._buff.substring(o - 64, o))); + return this._buff = this._buff.substring(o - 64), this; + }, d.prototype.end = function(c) { + var o, a, f = this._buff, p = f.length, h = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (o = 0; o < p; o += 1) h[o >> 2] |= f.charCodeAt(o) << (o % 4 << 3); + return this._finish(h, p), a = y(this._hash), c && (a = A(a)), this.reset(), a; + }, d.prototype.reset = function() { + return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; + }, d.prototype.getState = function() { + return { buff: this._buff, length: this._length, hash: this._hash.slice() }; + }, d.prototype.setState = function(c) { + return this._buff = c.buff, this._length = c.length, this._hash = c.hash, this; + }, d.prototype.destroy = function() { + delete this._hash, delete this._buff, delete this._length; + }, d.prototype._finish = function(c, o) { + var a, f, p, h = o; + if (c[h >> 2] |= 128 << (h % 4 << 3), h > 55) for (r(this._hash, c), h = 0; h < 16; h += 1) c[h] = 0; + a = (a = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(a[2], 16), p = parseInt(a[1], 16) || 0, c[14] = f, c[15] = p, r(this._hash, c); + }, d.hash = function(c, o) { + return d.hashBinary(g(c), o); + }, d.hashBinary = function(c, o) { + var a = y(u(c)); + return o ? A(a) : a; + }, d.ArrayBuffer = function() { + this.reset(); + }, d.ArrayBuffer.prototype.append = function(c) { + var o, a = w(this._buff.buffer, c), f = a.length; + for (this._length += c.byteLength, o = 64; o <= f; o += 64) r(this._hash, i(a.subarray(o - 64, o))); + return this._buff = o - 64 < f ? new Uint8Array(a.buffer.slice(o - 64)) : new Uint8Array(0), this; + }, d.ArrayBuffer.prototype.end = function(c) { + var o, a, f = this._buff, p = f.length, h = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (o = 0; o < p; o += 1) h[o >> 2] |= f[o] << (o % 4 << 3); + return this._finish(h, p), a = y(this._hash), c && (a = A(a)), this.reset(), a; + }, d.ArrayBuffer.prototype.reset = function() { + return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; + }, d.ArrayBuffer.prototype.getState = function() { + var c = d.prototype.getState.call(this); + return c.buff = b(c.buff), c; + }, d.ArrayBuffer.prototype.setState = function(c) { + return c.buff = s(c.buff, !0), d.prototype.setState.call(this, c); + }, d.ArrayBuffer.prototype.destroy = d.prototype.destroy, d.ArrayBuffer.prototype._finish = d.prototype._finish, d.ArrayBuffer.hash = function(c, o) { + var a = y(l(new Uint8Array(c))); + return o ? A(a) : a; + }, d; +}(); +const br = qt(je.exports); +export { + mr as M, + yr as N, + gr as P, + br as S, + x as a +}; diff --git a/dist/components.js b/dist/components.js index 995d6f7..c023ea8 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { ag as s, a7 as p, ah as n, ai as t, af as d } from "./common/main-iMRzW1Jg.js"; +import { ah as s, a8 as p, ai as n, aj as t, ag as d } from "./common/main-CDGdxjIv.js"; export { s as Empty, p as Icon, diff --git a/dist/container.js b/dist/container.js index 4b98239..c1c48a8 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { ac as o, ag as s, ah as d, ai as p, ad as t, af as n, ae as r, ab as u } from "./common/main-iMRzW1Jg.js"; +import { ad as o, ah as s, ai as d, aj as p, ae as t, ag as n, af as r, ac as u } from "./common/main-CDGdxjIv.js"; export { o as Context, s as Empty, diff --git a/dist/data-converter.js b/dist/data-converter.js index b48934d..0895cb0 100644 --- a/dist/data-converter.js +++ b/dist/data-converter.js @@ -1,6 +1,6 @@ import "lodash"; import "react"; -import { D as p } from "./common/main-iMRzW1Jg.js"; +import { D as p } from "./common/main-CDGdxjIv.js"; export { p as default }; diff --git a/dist/data-list.js b/dist/data-list.js index e898636..63c7610 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { A as t, y as e, q as r, w as o, B as i, x as u, v as D, z as l, s as L, C as n, p, E as m, M as C, I as c, K as F, J as b, L as d, F as k } from "./common/main-iMRzW1Jg.js"; +import { B as t, z as e, s as r, x as o, C as i, y as u, w as D, A as l, v as L, E as n, q as m, F as p, N as C, J as c, L as F, K as b, M as d, I as k } from "./common/main-CDGdxjIv.js"; export { t as DataListContent, e as DataListContext, @@ -10,8 +10,8 @@ export { l as DataListTable, L as DataListToolbar, n as DataTableFramework, - p as default, - m as useColumnsRender, + m as default, + p as useColumnsRender, C as useDataListHelper, c as useDataSource, F as useHasOperationColumn, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index 6222374..bf73b24 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { k as a } from "../common/main-iMRzW1Jg.js"; +import { l as a } from "../common/main-CDGdxjIv.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index d8a0663..147bc29 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { _ as s, a0 as r, $ as u, Z as o, a4 as t, a3 as d, a6 as m, a2 as F, a1 as i, a5 as g } from "./common/main-iMRzW1Jg.js"; +import { $ as s, a1 as r, a0 as u, _ as o, a5 as t, a4 as d, a7 as m, a3 as F, a2 as i, a6 as g } from "./common/main-CDGdxjIv.js"; export { s as GridLayoutForm, r as GridLayoutFormHelper, diff --git a/dist/grid-layout-form/utils.js b/dist/grid-layout-form/utils.js index 41bd420..bbf1f5b 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { g as o, a as g } from "../common/main-iMRzW1Jg.js"; +import { g as o, a as g } from "../common/main-CDGdxjIv.js"; export { o as getOptionItemByValue, g as getWidgetByNormalize diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 75b0e95..2eedaab 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { l as d, m as e, H as i, G as o, n as t, o as u } from "./common/main-iMRzW1Jg.js"; +import { m as d, n as e, H as i, G as o, o as t, p as u } from "./common/main-CDGdxjIv.js"; export { d as GridLayout, e as GridLayoutWidget, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index 4738b47..5718582 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { i as o, j as a } from "../common/main-iMRzW1Jg.js"; +import { j as o, k as a } from "../common/main-CDGdxjIv.js"; export { o as getBoxStyle, a as getWidgetByNormalize diff --git a/dist/hooks.js b/dist/hooks.js index 85a95dd..74cd762 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,12 +1,12 @@ import "lodash"; import "rc-field-form"; import "react"; -import { W as r, V as o, X as p, T as f, U as i, Y as m, S as c } from "./common/main-iMRzW1Jg.js"; -import { default as S } from "rc-util/lib/hooks/useMergedState"; +import { X as r, W as o, Y as p, U as f, V as i, Z as m, T as c } from "./common/main-CDGdxjIv.js"; +import { default as b } from "rc-util/lib/hooks/useMergedState"; export { r as useDeepEffect, o as useDeepEqualEffect, - S as useMergedState, + b as useMergedState, p as useOptions, f as usePrevious, i as useStateWithCallback, diff --git a/dist/iconfont.js b/dist/iconfont.js index 16e37f8..3bff076 100644 --- a/dist/iconfont.js +++ b/dist/iconfont.js @@ -2,7 +2,7 @@ import "react/jsx-runtime"; import "react"; import "prop-types"; import "classnames"; -import { a7 as a } from "./common/main-iMRzW1Jg.js"; +import { a8 as a } from "./common/main-CDGdxjIv.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index 2d2634e..2925017 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { ar as t, as as e, an as o, ao as n, aj as p, ap as r, am as c, al as l, ak as f, aq as m } from "./common/main-iMRzW1Jg.js"; +import { as as t, at as e, ao as o, ap as n, ak as p, aq as r, an as c, am as l, al as f, ar as m } from "./common/main-CDGdxjIv.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/pages.js b/dist/pages.js index a2612c3..c467112 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { O as t, N as e, P as o, Q as P } from "./common/main-iMRzW1Jg.js"; +import { P as t, O as e, Q as o, S as P } from "./common/main-CDGdxjIv.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index 8a5f9b8..eccf327 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-iMRzW1Jg.js"; +import { R as a } from "./common/main-CDGdxjIv.js"; export { a as default }; diff --git a/dist/style.css b/dist/style.css index da62257..1a91688 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content[style*=--col-width]{grid-template-columns:repeat(auto-fit,minmax(var(--col-num),1fr))}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;width:min-content;margin:0 auto;max-height:calc(100vh - 150px);min-width:max(35vw,248px)}.ff-modal .ff-popup-close{top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:absolute;top:0;right:0;bottom:0;left:0;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:20px 24px}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} +#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content[style*=--col-width]{grid-template-columns:repeat(auto-fill,minmax(var(--col-num),1fr))}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;width:min-content;margin:0 auto;max-height:calc(100vh - 150px);min-width:max(35vw,248px)}.ff-modal .ff-popup-close{top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:absolute;top:0;right:0;bottom:0;left:0;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:20px 24px}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} diff --git a/dist/utils.js b/dist/utils.js index 0f23c6d..f1e7dd9 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,15 +1,17 @@ import "lodash"; -import { d as g, e as o, c as p, f as i, h as m, b as P, r as d, t as u, u as k } from "./common/main-iMRzW1Jg.js"; +import { d as g, e as i, c as p, f as m, h as P, b as d, i as u, r as h, t as k, u as c } from "./common/main-CDGdxjIv.js"; import "react/jsx-runtime"; import "react"; +import "./common/vender-CtjyT19B.js"; export { g as deepSome, - o as getPkgCategory, + i as getPkgCategory, p as getPkgName, - i as getPkgOwner, - m as getPopupzIndex, - P as getWidgetPropsData, - d as replaceKeys, - u as toPrimitive, - k as uuid + m as getPkgOwner, + P as getPopupzIndex, + d as getWidgetPropsData, + u as hashJSON, + h as replaceKeys, + k as toPrimitive, + c as uuid }; diff --git a/package.json b/package.json index f806dfd..83fb330 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.5.4", + "version": "0.5.5", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",