@pubinfo-pr/core 0.222.2 → 0.222.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/{AppSetting-Adv5Y3SE.js → AppSetting-BWVulLPM.js} +38 -38
  2. package/dist/{HCheckList-WAAl9RiK.js → HCheckList-Bb4GvZ2_.js} +1 -1
  3. package/dist/HSlideover-DoCRa4dK.js +152 -0
  4. package/dist/{HToggle-YLmL7R0b.js → HToggle-Bnr5k93p.js} +1 -1
  5. package/dist/{HeaderFullMenu-ByedDsvz.js → HeaderFullMenu--AOcAS-6.js} +72 -72
  6. package/dist/{HeaderThinMenu-2q2iBtTH.js → HeaderThinMenu-CRPVfGgM.js} +132 -132
  7. package/dist/PreferencesContent-DW9HAzpr.js +486 -0
  8. package/dist/{SettingBreadcrumb-C1VwfnxX.js → SettingBreadcrumb-DKCK6V-n.js} +6 -7
  9. package/dist/{SettingCopyright-C--oGV21.js → SettingCopyright-C5Pc0I1w.js} +4 -4
  10. package/dist/{SettingEnableTransition-DW2gfisN.js → SettingEnableTransition-D2FDj0oR.js} +5 -5
  11. package/dist/{SettingHome-VUAS3uEg.js → SettingHome-1Y1rYeQb.js} +6 -6
  12. package/dist/{SettingMenu-BH7XU7eF.js → SettingMenu-DWtNX8Ti.js} +8 -9
  13. package/dist/{SettingMode-BIyHzTKH.js → SettingMode-CZV84QeW.js} +4 -4
  14. package/dist/{SettingNavSearch-PfSA-_ro.js → SettingNavSearch-CrMpbXFg.js} +5 -5
  15. package/dist/{SettingOther-DdqNapQX.js → SettingOther-D6gGuQJw.js} +6 -6
  16. package/dist/{SettingPage-DS-G9-X5.js → SettingPage-DuN13bXO.js} +3 -3
  17. package/dist/{SettingTabbar-2yfw2vsm.js → SettingTabbar-BhJxcU35.js} +10 -11
  18. package/dist/{SettingThemes-Bkcywy7v.js → SettingThemes-BjkWfY1C.js} +9 -10
  19. package/dist/{SettingToolbar-DP7-_nPK.js → SettingToolbar-BYOxXAXL.js} +5 -5
  20. package/dist/{SettingTopbar-C0Ia4-If.js → SettingTopbar-CxKsnIRK.js} +8 -9
  21. package/dist/{SettingWidthMode-DgSWsHFq.js → SettingWidthMode-dM88qSol.js} +5 -5
  22. package/dist/auth-DILNNEQ8.js +1230 -0
  23. package/dist/{change-organization-BfnI2yEl.js → change-organization-BXl4ZC7j.js} +24 -24
  24. package/dist/{change-password-Bj_GWzmn.js → change-password-P4SGdvdU.js} +64 -73
  25. package/dist/components-C9kcavB4.js +2768 -0
  26. package/dist/core-CKIhF3Vi.js +270 -0
  27. package/dist/{core-4H5JBsa5.js → core-D2ocBD0r.js} +57 -51
  28. package/dist/index.js +2249 -7757
  29. package/dist/{not-found-DbHOY5cU.js → not-found-C-1699o2.js} +4 -5
  30. package/dist/{not-permission-DwERxb_u.js → not-permission-CZGJzlSF.js} +4 -5
  31. package/dist/profile-B3Q7hRgl.js +123 -0
  32. package/dist/{question-line-D7ecIumZ.js → question-line-B4oDBb2H.js} +2 -2
  33. package/dist/{right-DYiPS7dU.js → right-BTHgfOSp.js} +4 -4
  34. package/dist/style.css +1 -1
  35. package/package.json +7 -7
  36. package/dist/HSlideover-CXBJxuQo.js +0 -1695
  37. package/dist/PreferencesContent-CiPweszy.js +0 -701
  38. package/dist/auth-B65CJEOe.js +0 -4242
  39. package/dist/chunk-CD4vhpVs.js +0 -18
  40. package/dist/components-BfkDsfck.js +0 -5238
  41. package/dist/dist-7OjQvlya.js +0 -468
  42. package/dist/form-C3VHofnN.js +0 -2768
  43. package/dist/modal-Bl5xHbxa.js +0 -43824
  44. package/dist/overlayscrollbars-vue-mGyICRMi.js +0 -1460
  45. package/dist/profile-Dq66-Gsl.js +0 -19269
  46. package/dist/tree-select-B8cTcGLa.js +0 -12497
  47. package/dist/watchDiff-CPZFtaOC.js +0 -655
  48. /package/dist/{HButton-Dt6qGhhR.js → HButton-BPbXqVbA.js} +0 -0
  49. /package/dist/{HDivider-Ds5MMqtm.js → HDivider-BSENlYnI.js} +0 -0
  50. /package/dist/{HInput-BrsX9848.js → HInput-DbvnkEO7.js} +0 -0
  51. /package/dist/{HTooltip-DjAU-Evn.js → HTooltip-tCnNrJUE.js} +0 -0
  52. /package/dist/{_plugin-vue_export-helper-sUTDUeGO.js → _plugin-vue_export-helper-BBf_fmJ_.js} +0 -0
  53. /package/dist/{engine-oniguruma-uxNZ2DGJ.js → engine-oniguruma-Bl7ZtyDI.js} +0 -0
  54. /package/dist/{json-CC4oV-bd.js → json-BuUwnwNo.js} +0 -0
  55. /package/dist/{reload-CbuQgTlC.js → reload-DWTXo9r2.js} +0 -0
  56. /package/dist/{useContext-DLtu9F7E.js → useContext-mDF2-tXy.js} +0 -0
  57. /package/dist/{vitesse-dark-CxkWMfh6.js → vitesse-dark-j0hKJETh.js} +0 -0
  58. /package/dist/{vitesse-light-DY25e6F3.js → vitesse-light-BfgKNo3X.js} +0 -0
  59. /package/dist/{wasm-DAU6f5s5.js → wasm-tXaxAgz9.js} +0 -0
@@ -0,0 +1,2768 @@
1
+ import { d as setupIcon, l as getCachedIcon, u as setCachedIcon } from "./core-CKIhF3Vi.js";
2
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BBf_fmJ_.js";
3
+ import { getActivePinia } from "pinia";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, unref, useModel, useSlots, watch, watchEffect, withCtx } from "vue";
5
+ import { isFunction } from "lodash-es";
6
+ import * as AntdIcons from "@ant-design/icons-vue";
7
+ import { DeleteOutlined, PlusOutlined, SendOutlined } from "@ant-design/icons-vue";
8
+ import { message } from "ant-design-vue";
9
+ import { Button, Checkbox, Divider, Input, InputNumber, Modal as Modal$1, RadioButton, RadioGroup, Select, SelectOption, Tag, Tooltip, TreeSelect } from "ant-design-vue/es";
10
+ import zxcvbn from "zxcvbn";
11
+ var _hoisted_1$12 = { class: "page-header mb-5 flex flex-wrap items-center justify-between gap-5 bg-[var(--g-container-bg)] px-5 py-4 transition-background-color-300" }, _hoisted_2$7 = { class: "main flex-[1_1_70%]" }, _hoisted_3$4 = { class: "text-2xl" }, _hoisted_4$2 = { class: "mt-2 text-sm text-stone-5 empty:hidden" }, _hoisted_5$2 = {
12
+ key: 0,
13
+ class: "ml-a flex-none"
14
+ }, PageHeader_default = /* @__PURE__ */ defineComponent({
15
+ name: "PageHeader",
16
+ __name: "index",
17
+ props: {
18
+ title: {},
19
+ content: {}
20
+ },
21
+ setup(e) {
22
+ let t = useSlots();
23
+ return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$12, [createElementVNode("div", _hoisted_2$7, [createElementVNode("div", _hoisted_3$4, [renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])]), createElementVNode("div", _hoisted_4$2, [renderSlot(n.$slots, "content", {}, () => [createTextVNode(toDisplayString(e.content), 1)])])]), unref(t).default ? (openBlock(), createElementBlock("div", _hoisted_5$2, [renderSlot(n.$slots, "default")])) : createCommentVNode("", !0)]));
24
+ }
25
+ }), matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/, stringToIcon = (e, t, n, r = "") => {
26
+ let i = e.split(":");
27
+ if (e.slice(0, 1) === "@") {
28
+ if (i.length < 2 || i.length > 3) return null;
29
+ r = i.shift().slice(1);
30
+ }
31
+ if (i.length > 3 || !i.length) return null;
32
+ if (i.length > 1) {
33
+ let e = i.pop(), n = i.pop(), a = {
34
+ provider: i.length > 0 ? i[0] : r,
35
+ prefix: n,
36
+ name: e
37
+ };
38
+ return t && !validateIconName(a) ? null : a;
39
+ }
40
+ let a = i[0], o = a.split("-");
41
+ if (o.length > 1) {
42
+ let e = {
43
+ provider: r,
44
+ prefix: o.shift(),
45
+ name: o.join("-")
46
+ };
47
+ return t && !validateIconName(e) ? null : e;
48
+ }
49
+ if (n && r === "") {
50
+ let e = {
51
+ provider: r,
52
+ prefix: "",
53
+ name: a
54
+ };
55
+ return t && !validateIconName(e, n) ? null : e;
56
+ }
57
+ return null;
58
+ }, validateIconName = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1, defaultIconDimensions = Object.freeze({
59
+ left: 0,
60
+ top: 0,
61
+ width: 16,
62
+ height: 16
63
+ }), defaultIconTransformations = Object.freeze({
64
+ rotate: 0,
65
+ vFlip: !1,
66
+ hFlip: !1
67
+ }), defaultIconProps = Object.freeze({
68
+ ...defaultIconDimensions,
69
+ ...defaultIconTransformations
70
+ }), defaultExtendedIconProps = Object.freeze({
71
+ ...defaultIconProps,
72
+ body: "",
73
+ hidden: !1
74
+ });
75
+ function mergeIconTransformations(e, t) {
76
+ let n = {};
77
+ !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
78
+ let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
79
+ return r && (n.rotate = r), n;
80
+ }
81
+ function mergeIconData(e, t) {
82
+ let n = mergeIconTransformations(e, t);
83
+ for (let r in defaultExtendedIconProps) r in defaultIconTransformations ? r in e && !(r in n) && (n[r] = defaultIconTransformations[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
84
+ return n;
85
+ }
86
+ function getIconsTree(e, t) {
87
+ let n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
88
+ function a(e) {
89
+ if (n[e]) return i[e] = [];
90
+ if (!(e in i)) {
91
+ i[e] = null;
92
+ let t = r[e] && r[e].parent, n = t && a(t);
93
+ n && (i[e] = [t].concat(n));
94
+ }
95
+ return i[e];
96
+ }
97
+ return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
98
+ }
99
+ function internalGetIconData(e, t, n) {
100
+ let r = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), a = {};
101
+ function o(e) {
102
+ a = mergeIconData(r[e] || i[e], a);
103
+ }
104
+ return o(t), n.forEach(o), mergeIconData(e, a);
105
+ }
106
+ function parseIconSet(e, t) {
107
+ let n = [];
108
+ if (typeof e != "object" || typeof e.icons != "object") return n;
109
+ e.not_found instanceof Array && e.not_found.forEach((e) => {
110
+ t(e, null), n.push(e);
111
+ });
112
+ let r = getIconsTree(e);
113
+ for (let i in r) {
114
+ let a = r[i];
115
+ a && (t(i, internalGetIconData(e, i, a)), n.push(i));
116
+ }
117
+ return n;
118
+ }
119
+ var optionalPropertyDefaults = {
120
+ provider: "",
121
+ aliases: {},
122
+ not_found: {},
123
+ ...defaultIconDimensions
124
+ };
125
+ function checkOptionalProps(e, t) {
126
+ for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
127
+ return !0;
128
+ }
129
+ function quicklyValidateIconSet(e) {
130
+ if (typeof e != "object" || !e) return null;
131
+ let t = e;
132
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !checkOptionalProps(e, optionalPropertyDefaults)) return null;
133
+ let n = t.icons;
134
+ for (let e in n) {
135
+ let t = n[e];
136
+ if (!e || typeof t.body != "string" || !checkOptionalProps(t, defaultExtendedIconProps)) return null;
137
+ }
138
+ let r = t.aliases || /* @__PURE__ */ Object.create(null);
139
+ for (let e in r) {
140
+ let t = r[e], i = t.parent;
141
+ if (!e || typeof i != "string" || !n[i] && !r[i] || !checkOptionalProps(t, defaultExtendedIconProps)) return null;
142
+ }
143
+ return t;
144
+ }
145
+ var dataStorage = /* @__PURE__ */ Object.create(null);
146
+ function newStorage(e, t) {
147
+ return {
148
+ provider: e,
149
+ prefix: t,
150
+ icons: /* @__PURE__ */ Object.create(null),
151
+ missing: /* @__PURE__ */ new Set()
152
+ };
153
+ }
154
+ function getStorage(e, t) {
155
+ let n = dataStorage[e] || (dataStorage[e] = /* @__PURE__ */ Object.create(null));
156
+ return n[t] || (n[t] = newStorage(e, t));
157
+ }
158
+ function addIconSet(e, t) {
159
+ return quicklyValidateIconSet(t) ? parseIconSet(t, (t, n) => {
160
+ n ? e.icons[t] = n : e.missing.add(t);
161
+ }) : [];
162
+ }
163
+ function addIconToStorage(e, t, n) {
164
+ try {
165
+ if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
166
+ } catch {}
167
+ return !1;
168
+ }
169
+ var simpleNames = !1;
170
+ function allowSimpleNames(e) {
171
+ return typeof e == "boolean" && (simpleNames = e), simpleNames;
172
+ }
173
+ function getIconData(e) {
174
+ let t = typeof e == "string" ? stringToIcon(e, !0, simpleNames) : e;
175
+ if (t) {
176
+ let e = getStorage(t.provider, t.prefix), n = t.name;
177
+ return e.icons[n] || (e.missing.has(n) ? null : void 0);
178
+ }
179
+ }
180
+ function addIcon(e, t) {
181
+ let n = stringToIcon(e, !0, simpleNames);
182
+ if (!n) return !1;
183
+ let r = getStorage(n.provider, n.prefix);
184
+ return t ? addIconToStorage(r, n.name, t) : (r.missing.add(n.name), !0);
185
+ }
186
+ function addCollection(e, t) {
187
+ if (typeof e != "object") return !1;
188
+ if (typeof t != "string" && (t = e.provider || ""), simpleNames && !t && !e.prefix) {
189
+ let t = !1;
190
+ return quicklyValidateIconSet(e) && (e.prefix = "", parseIconSet(e, (e, n) => {
191
+ addIcon(e, n) && (t = !0);
192
+ })), t;
193
+ }
194
+ let n = e.prefix;
195
+ return validateIconName({
196
+ prefix: n,
197
+ name: "a"
198
+ }) ? !!addIconSet(getStorage(t, n), e) : !1;
199
+ }
200
+ var defaultIconSizeCustomisations = Object.freeze({
201
+ width: null,
202
+ height: null
203
+ }), defaultIconCustomisations = Object.freeze({
204
+ ...defaultIconSizeCustomisations,
205
+ ...defaultIconTransformations
206
+ }), unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g, unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
207
+ function calculateSize(e, t, n) {
208
+ if (t === 1) return e;
209
+ if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
210
+ if (typeof e != "string") return e;
211
+ let r = e.split(unitsSplit);
212
+ if (r === null || !r.length) return e;
213
+ let i = [], a = r.shift(), o = unitsTest.test(a);
214
+ for (;;) {
215
+ if (o) {
216
+ let e = parseFloat(a);
217
+ isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
218
+ } else i.push(a);
219
+ if (a = r.shift(), a === void 0) return i.join("");
220
+ o = !o;
221
+ }
222
+ }
223
+ function splitSVGDefs(e, t = "defs") {
224
+ let n = "", r = e.indexOf("<" + t);
225
+ for (; r >= 0;) {
226
+ let i = e.indexOf(">", r), a = e.indexOf("</" + t);
227
+ if (i === -1 || a === -1) break;
228
+ let o = e.indexOf(">", a);
229
+ if (o === -1) break;
230
+ n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
231
+ }
232
+ return {
233
+ defs: n,
234
+ content: e
235
+ };
236
+ }
237
+ function mergeDefsAndContent(e, t) {
238
+ return e ? "<defs>" + e + "</defs>" + t : t;
239
+ }
240
+ function wrapSVGContent(e, t, n) {
241
+ let r = splitSVGDefs(e);
242
+ return mergeDefsAndContent(r.defs, t + r.content + n);
243
+ }
244
+ var isUnsetKeyword = (e) => e === "unset" || e === "undefined" || e === "none";
245
+ function iconToSVG(e, t) {
246
+ let n = {
247
+ ...defaultIconProps,
248
+ ...e
249
+ }, r = {
250
+ ...defaultIconCustomisations,
251
+ ...t
252
+ }, i = {
253
+ left: n.left,
254
+ top: n.top,
255
+ width: n.width,
256
+ height: n.height
257
+ }, a = n.body;
258
+ [n, r].forEach((e) => {
259
+ let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
260
+ n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
261
+ let s;
262
+ switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
263
+ case 1:
264
+ s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
265
+ break;
266
+ case 2:
267
+ t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
268
+ break;
269
+ case 3:
270
+ s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
271
+ break;
272
+ }
273
+ o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = wrapSVGContent(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
274
+ });
275
+ let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
276
+ o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = calculateSize(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? calculateSize(u, l / c) : s === "auto" ? l : s);
277
+ let f = {}, p = (e, t) => {
278
+ isUnsetKeyword(t) || (f[e] = t.toString());
279
+ };
280
+ p("width", u), p("height", d);
281
+ let m = [
282
+ i.left,
283
+ i.top,
284
+ c,
285
+ l
286
+ ];
287
+ return f.viewBox = m.join(" "), {
288
+ attributes: f,
289
+ viewBox: m,
290
+ body: a
291
+ };
292
+ }
293
+ var regex = /\sid="(\S+)"/g, randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16), counter = 0;
294
+ function replaceIDs(e, t = randomPrefix) {
295
+ let n = [], r;
296
+ for (; r = regex.exec(e);) n.push(r[1]);
297
+ if (!n.length) return e;
298
+ let i = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
299
+ return n.forEach((n) => {
300
+ let r = typeof t == "function" ? t(n) : t + (counter++).toString(), a = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
301
+ e = e.replace(RegExp("([#;\"])(" + a + ")([\")]|\\.[a-z])", "g"), "$1" + r + i + "$3");
302
+ }), e = e.replace(new RegExp(i, "g"), ""), e;
303
+ }
304
+ var storage = /* @__PURE__ */ Object.create(null);
305
+ function setAPIModule(e, t) {
306
+ storage[e] = t;
307
+ }
308
+ function getAPIModule(e) {
309
+ return storage[e] || storage[""];
310
+ }
311
+ function createAPIConfig(e) {
312
+ let t;
313
+ if (typeof e.resources == "string") t = [e.resources];
314
+ else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
315
+ return {
316
+ resources: t,
317
+ path: e.path || "/",
318
+ maxURL: e.maxURL || 500,
319
+ rotate: e.rotate || 750,
320
+ timeout: e.timeout || 5e3,
321
+ random: e.random === !0,
322
+ index: e.index || 0,
323
+ dataAfterTimeout: e.dataAfterTimeout !== !1
324
+ };
325
+ }
326
+ for (var configStorage = /* @__PURE__ */ Object.create(null), fallBackAPISources = ["https://api.simplesvg.com", "https://api.unisvg.com"], fallBackAPI = []; fallBackAPISources.length > 0;) fallBackAPISources.length === 1 || Math.random() > .5 ? fallBackAPI.push(fallBackAPISources.shift()) : fallBackAPI.push(fallBackAPISources.pop());
327
+ configStorage[""] = createAPIConfig({ resources: ["https://api.iconify.design"].concat(fallBackAPI) });
328
+ function addAPIProvider(e, t) {
329
+ let n = createAPIConfig(t);
330
+ return n === null ? !1 : (configStorage[e] = n, !0);
331
+ }
332
+ function getAPIConfig(e) {
333
+ return configStorage[e];
334
+ }
335
+ var fetchModule = (() => {
336
+ let e;
337
+ try {
338
+ if (e = fetch, typeof e == "function") return e;
339
+ } catch {}
340
+ })();
341
+ function calculateMaxLength(e, t) {
342
+ let n = getAPIConfig(e);
343
+ if (!n) return 0;
344
+ let r;
345
+ if (!n.maxURL) r = 0;
346
+ else {
347
+ let e = 0;
348
+ n.resources.forEach((t) => {
349
+ let n = t;
350
+ e = Math.max(e, n.length);
351
+ });
352
+ let i = t + ".json?icons=";
353
+ r = n.maxURL - e - n.path.length - i.length;
354
+ }
355
+ return r;
356
+ }
357
+ function shouldAbort(e) {
358
+ return e === 404;
359
+ }
360
+ var prepare = (e, t, n) => {
361
+ let r = [], i = calculateMaxLength(e, t), a = "icons", o = {
362
+ type: a,
363
+ provider: e,
364
+ prefix: t,
365
+ icons: []
366
+ }, s = 0;
367
+ return n.forEach((n, c) => {
368
+ s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
369
+ type: a,
370
+ provider: e,
371
+ prefix: t,
372
+ icons: []
373
+ }, s = n.length), o.icons.push(n);
374
+ }), r.push(o), r;
375
+ };
376
+ function getPath(e) {
377
+ if (typeof e == "string") {
378
+ let t = getAPIConfig(e);
379
+ if (t) return t.path;
380
+ }
381
+ return "/";
382
+ }
383
+ var fetchAPIModule = {
384
+ prepare,
385
+ send: (e, t, n) => {
386
+ if (!fetchModule) {
387
+ n("abort", 424);
388
+ return;
389
+ }
390
+ let r = getPath(t.provider);
391
+ switch (t.type) {
392
+ case "icons": {
393
+ let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
394
+ r += e + ".json?" + i.toString();
395
+ break;
396
+ }
397
+ case "custom": {
398
+ let e = t.uri;
399
+ r += e.slice(0, 1) === "/" ? e.slice(1) : e;
400
+ break;
401
+ }
402
+ default:
403
+ n("abort", 400);
404
+ return;
405
+ }
406
+ let i = 503;
407
+ fetchModule(e + r).then((e) => {
408
+ let t = e.status;
409
+ if (t !== 200) {
410
+ setTimeout(() => {
411
+ n(shouldAbort(t) ? "abort" : "next", t);
412
+ });
413
+ return;
414
+ }
415
+ return i = 501, e.json();
416
+ }).then((e) => {
417
+ if (typeof e != "object" || !e) {
418
+ setTimeout(() => {
419
+ e === 404 ? n("abort", e) : n("next", i);
420
+ });
421
+ return;
422
+ }
423
+ setTimeout(() => {
424
+ n("success", e);
425
+ });
426
+ }).catch(() => {
427
+ n("next", i);
428
+ });
429
+ }
430
+ };
431
+ function sortIcons(e) {
432
+ let t = {
433
+ loaded: [],
434
+ missing: [],
435
+ pending: []
436
+ }, n = /* @__PURE__ */ Object.create(null);
437
+ e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
438
+ let r = {
439
+ provider: "",
440
+ prefix: "",
441
+ name: ""
442
+ };
443
+ return e.forEach((e) => {
444
+ if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
445
+ r = e;
446
+ let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), c = s[a] || (s[a] = getStorage(i, a)), l;
447
+ l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
448
+ let u = {
449
+ provider: i,
450
+ prefix: a,
451
+ name: o
452
+ };
453
+ l.push(u);
454
+ }), t;
455
+ }
456
+ function removeCallback(e, t) {
457
+ e.forEach((e) => {
458
+ let n = e.loaderCallbacks;
459
+ n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
460
+ });
461
+ }
462
+ function updateCallbacks(e) {
463
+ e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
464
+ e.pendingCallbacksFlag = !1;
465
+ let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
466
+ if (!t.length) return;
467
+ let n = !1, r = e.provider, i = e.prefix;
468
+ t.forEach((t) => {
469
+ let a = t.icons, o = a.pending.length;
470
+ a.pending = a.pending.filter((t) => {
471
+ if (t.prefix !== i) return !0;
472
+ let o = t.name;
473
+ if (e.icons[o]) a.loaded.push({
474
+ provider: r,
475
+ prefix: i,
476
+ name: o
477
+ });
478
+ else if (e.missing.has(o)) a.missing.push({
479
+ provider: r,
480
+ prefix: i,
481
+ name: o
482
+ });
483
+ else return n = !0, !0;
484
+ return !1;
485
+ }), a.pending.length !== o && (n || removeCallback([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
486
+ });
487
+ }));
488
+ }
489
+ var idCounter = 0;
490
+ function storeCallback(e, t, n) {
491
+ let r = idCounter++, i = removeCallback.bind(null, n, r);
492
+ if (!t.pending.length) return i;
493
+ let a = {
494
+ id: r,
495
+ icons: t,
496
+ callback: e,
497
+ abort: i
498
+ };
499
+ return n.forEach((e) => {
500
+ (e.loaderCallbacks ||= []).push(a);
501
+ }), i;
502
+ }
503
+ function listToIcons(e, t = !0, n = !1) {
504
+ let r = [];
505
+ return e.forEach((e) => {
506
+ let i = typeof e == "string" ? stringToIcon(e, t, n) : e;
507
+ i && r.push(i);
508
+ }), r;
509
+ }
510
+ var defaultConfig = {
511
+ resources: [],
512
+ index: 0,
513
+ timeout: 2e3,
514
+ rotate: 750,
515
+ random: !1,
516
+ dataAfterTimeout: !1
517
+ };
518
+ function sendQuery(e, t, n, r) {
519
+ let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
520
+ if (e.random) {
521
+ let t = e.resources.slice(0);
522
+ for (o = []; t.length > 1;) {
523
+ let e = Math.floor(Math.random() * t.length);
524
+ o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
525
+ }
526
+ o = o.concat(t);
527
+ } else o = e.resources.slice(a).concat(e.resources.slice(0, a));
528
+ let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
529
+ typeof r == "function" && p.push(r);
530
+ function m() {
531
+ d &&= (clearTimeout(d), null);
532
+ }
533
+ function g() {
534
+ c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
535
+ e.status === "pending" && (e.status = "aborted");
536
+ }), f = [];
537
+ }
538
+ function _(e, t) {
539
+ t && (p = []), typeof e == "function" && p.push(e);
540
+ }
541
+ function v() {
542
+ return {
543
+ startTime: s,
544
+ payload: t,
545
+ status: c,
546
+ queriesSent: l,
547
+ queriesPending: f.length,
548
+ subscribe: _,
549
+ abort: g
550
+ };
551
+ }
552
+ function y() {
553
+ c = "failed", p.forEach((e) => {
554
+ e(void 0, u);
555
+ });
556
+ }
557
+ function b() {
558
+ f.forEach((e) => {
559
+ e.status === "pending" && (e.status = "aborted");
560
+ }), f = [];
561
+ }
562
+ function x(t, n, r) {
563
+ let i = n !== "success";
564
+ switch (f = f.filter((e) => e !== t), c) {
565
+ case "pending": break;
566
+ case "failed":
567
+ if (i || !e.dataAfterTimeout) return;
568
+ break;
569
+ default: return;
570
+ }
571
+ if (n === "abort") {
572
+ u = r, y();
573
+ return;
574
+ }
575
+ if (i) {
576
+ u = r, f.length || (o.length ? S() : y());
577
+ return;
578
+ }
579
+ if (m(), b(), !e.random) {
580
+ let n = e.resources.indexOf(t.resource);
581
+ n !== -1 && n !== e.index && (e.index = n);
582
+ }
583
+ c = "completed", p.forEach((e) => {
584
+ e(r);
585
+ });
586
+ }
587
+ function S() {
588
+ if (c !== "pending") return;
589
+ m();
590
+ let r = o.shift();
591
+ if (r === void 0) {
592
+ if (f.length) {
593
+ d = setTimeout(() => {
594
+ m(), c === "pending" && (b(), y());
595
+ }, e.timeout);
596
+ return;
597
+ }
598
+ y();
599
+ return;
600
+ }
601
+ let i = {
602
+ status: "pending",
603
+ resource: r,
604
+ callback: (e, t) => {
605
+ x(i, e, t);
606
+ }
607
+ };
608
+ f.push(i), l++, d = setTimeout(S, e.rotate), n(r, t, i.callback);
609
+ }
610
+ return setTimeout(S), v;
611
+ }
612
+ function initRedundancy(e) {
613
+ let t = {
614
+ ...defaultConfig,
615
+ ...e
616
+ }, n = [];
617
+ function r() {
618
+ n = n.filter((e) => e().status === "pending");
619
+ }
620
+ function i(e, i, a) {
621
+ let o = sendQuery(t, e, i, (e, t) => {
622
+ r(), a && a(e, t);
623
+ });
624
+ return n.push(o), o;
625
+ }
626
+ function a(e) {
627
+ return n.find((t) => e(t)) || null;
628
+ }
629
+ return {
630
+ query: i,
631
+ find: a,
632
+ setIndex: (e) => {
633
+ t.index = e;
634
+ },
635
+ getIndex: () => t.index,
636
+ cleanup: r
637
+ };
638
+ }
639
+ function emptyCallback$1() {}
640
+ var redundancyCache = /* @__PURE__ */ Object.create(null);
641
+ function getRedundancyCache(e) {
642
+ if (!redundancyCache[e]) {
643
+ let t = getAPIConfig(e);
644
+ if (!t) return;
645
+ redundancyCache[e] = {
646
+ config: t,
647
+ redundancy: initRedundancy(t)
648
+ };
649
+ }
650
+ return redundancyCache[e];
651
+ }
652
+ function sendAPIQuery(e, t, n) {
653
+ let r, i;
654
+ if (typeof e == "string") {
655
+ let t = getAPIModule(e);
656
+ if (!t) return n(void 0, 424), emptyCallback$1;
657
+ i = t.send;
658
+ let a = getRedundancyCache(e);
659
+ a && (r = a.redundancy);
660
+ } else {
661
+ let t = createAPIConfig(e);
662
+ if (t) {
663
+ r = initRedundancy(t);
664
+ let n = getAPIModule(e.resources ? e.resources[0] : "");
665
+ n && (i = n.send);
666
+ }
667
+ }
668
+ return !r || !i ? (n(void 0, 424), emptyCallback$1) : r.query(t, i, n)().abort;
669
+ }
670
+ function emptyCallback() {}
671
+ function loadedNewIcons(e) {
672
+ e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
673
+ e.iconsLoaderFlag = !1, updateCallbacks(e);
674
+ }));
675
+ }
676
+ function checkIconNamesForAPI(e) {
677
+ let t = [], n = [];
678
+ return e.forEach((e) => {
679
+ (e.match(matchIconName) ? t : n).push(e);
680
+ }), {
681
+ valid: t,
682
+ invalid: n
683
+ };
684
+ }
685
+ function parseLoaderResponse(e, t, n) {
686
+ function r() {
687
+ let n = e.pendingIcons;
688
+ t.forEach((t) => {
689
+ n && n.delete(t), e.icons[t] || e.missing.add(t);
690
+ });
691
+ }
692
+ if (n && typeof n == "object") try {
693
+ if (!addIconSet(e, n).length) {
694
+ r();
695
+ return;
696
+ }
697
+ } catch (e) {
698
+ console.error(e);
699
+ }
700
+ r(), loadedNewIcons(e);
701
+ }
702
+ function parsePossiblyAsyncResponse(e, t) {
703
+ e instanceof Promise ? e.then((e) => {
704
+ t(e);
705
+ }).catch(() => {
706
+ t(null);
707
+ }) : t(e);
708
+ }
709
+ function loadNewIcons(e, t) {
710
+ e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
711
+ e.iconsQueueFlag = !1;
712
+ let { provider: t, prefix: n } = e, r = e.iconsToLoad;
713
+ if (delete e.iconsToLoad, !r || !r.length) return;
714
+ let i = e.loadIcon;
715
+ if (e.loadIcons && (r.length > 1 || !i)) {
716
+ parsePossiblyAsyncResponse(e.loadIcons(r, n, t), (t) => {
717
+ parseLoaderResponse(e, r, t);
718
+ });
719
+ return;
720
+ }
721
+ if (i) {
722
+ r.forEach((r) => {
723
+ parsePossiblyAsyncResponse(i(r, n, t), (t) => {
724
+ parseLoaderResponse(e, [r], t ? {
725
+ prefix: n,
726
+ icons: { [r]: t }
727
+ } : null);
728
+ });
729
+ });
730
+ return;
731
+ }
732
+ let { valid: a, invalid: o } = checkIconNamesForAPI(r);
733
+ if (o.length && parseLoaderResponse(e, o, null), !a.length) return;
734
+ let s = n.match(matchIconName) ? getAPIModule(t) : null;
735
+ if (!s) {
736
+ parseLoaderResponse(e, a, null);
737
+ return;
738
+ }
739
+ s.prepare(t, n, a).forEach((n) => {
740
+ sendAPIQuery(t, n, (t) => {
741
+ parseLoaderResponse(e, n.icons, t);
742
+ });
743
+ });
744
+ }));
745
+ }
746
+ var loadIcons = (e, t) => {
747
+ let n = sortIcons(listToIcons(e, !0, allowSimpleNames()));
748
+ if (!n.pending.length) {
749
+ let e = !0;
750
+ return t && setTimeout(() => {
751
+ e && t(n.loaded, n.missing, n.pending, emptyCallback);
752
+ }), () => {
753
+ e = !1;
754
+ };
755
+ }
756
+ let r = /* @__PURE__ */ Object.create(null), i = [], a, o;
757
+ return n.pending.forEach((e) => {
758
+ let { provider: t, prefix: n } = e;
759
+ if (n === o && t === a) return;
760
+ a = t, o = n, i.push(getStorage(t, n));
761
+ let s = r[t] || (r[t] = /* @__PURE__ */ Object.create(null));
762
+ s[n] || (s[n] = []);
763
+ }), n.pending.forEach((e) => {
764
+ let { provider: t, prefix: n, name: i } = e, a = getStorage(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
765
+ o.has(i) || (o.add(i), r[t][n].push(i));
766
+ }), i.forEach((e) => {
767
+ let t = r[e.provider][e.prefix];
768
+ t.length && loadNewIcons(e, t);
769
+ }), t ? storeCallback(t, n, i) : emptyCallback;
770
+ };
771
+ function mergeCustomisations(e, t) {
772
+ let n = { ...e };
773
+ for (let e in t) {
774
+ let r = t[e], i = typeof r;
775
+ e in defaultIconSizeCustomisations ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
776
+ }
777
+ return n;
778
+ }
779
+ var separator = /[\s,]+/;
780
+ function flipFromString(e, t) {
781
+ t.split(separator).forEach((t) => {
782
+ switch (t.trim()) {
783
+ case "horizontal":
784
+ e.hFlip = !0;
785
+ break;
786
+ case "vertical":
787
+ e.vFlip = !0;
788
+ break;
789
+ }
790
+ });
791
+ }
792
+ function rotateFromString(e, t = 0) {
793
+ let n = e.replace(/^-?[0-9.]*/, "");
794
+ function r(e) {
795
+ for (; e < 0;) e += 4;
796
+ return e % 4;
797
+ }
798
+ if (n === "") {
799
+ let t = parseInt(e);
800
+ return isNaN(t) ? 0 : r(t);
801
+ } else if (n !== e) {
802
+ let t = 0;
803
+ switch (n) {
804
+ case "%":
805
+ t = 25;
806
+ break;
807
+ case "deg": t = 90;
808
+ }
809
+ if (t) {
810
+ let i = parseFloat(e.slice(0, e.length - n.length));
811
+ return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
812
+ }
813
+ }
814
+ return t;
815
+ }
816
+ function iconToHTML(e, t) {
817
+ let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
818
+ for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
819
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
820
+ }
821
+ function encodeSVGforURL(e) {
822
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
823
+ }
824
+ function svgToData(e) {
825
+ return "data:image/svg+xml," + encodeSVGforURL(e);
826
+ }
827
+ function svgToURL(e) {
828
+ return "url(\"" + svgToData(e) + "\")";
829
+ }
830
+ var defaultExtendedIconCustomisations = {
831
+ ...defaultIconCustomisations,
832
+ inline: !1
833
+ }, svgDefaults = {
834
+ xmlns: "http://www.w3.org/2000/svg",
835
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
836
+ "aria-hidden": !0,
837
+ role: "img"
838
+ }, commonProps = { display: "inline-block" }, monotoneProps = { backgroundColor: "currentColor" }, coloredProps = { backgroundColor: "transparent" }, propsToAdd = {
839
+ Image: "var(--svg)",
840
+ Repeat: "no-repeat",
841
+ Size: "100% 100%"
842
+ }, propsToAddTo = {
843
+ webkitMask: monotoneProps,
844
+ mask: monotoneProps,
845
+ background: coloredProps
846
+ };
847
+ for (let e in propsToAddTo) {
848
+ let t = propsToAddTo[e];
849
+ for (let n in propsToAdd) t[e + n] = propsToAdd[n];
850
+ }
851
+ var customisationAliases = {};
852
+ ["horizontal", "vertical"].forEach((e) => {
853
+ let t = e.slice(0, 1) + "Flip";
854
+ customisationAliases[e + "-flip"] = t, customisationAliases[e.slice(0, 1) + "-flip"] = t, customisationAliases[e + "Flip"] = t;
855
+ });
856
+ function fixSize(e) {
857
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
858
+ }
859
+ var render$2 = (e, t) => {
860
+ let n = mergeCustomisations(defaultExtendedIconCustomisations, t), r = { ...svgDefaults }, i = t.mode || "svg", a = {}, o = t.style, s = typeof o == "object" && !(o instanceof Array) ? o : {};
861
+ for (let e in t) {
862
+ let i = t[e];
863
+ if (i !== void 0) switch (e) {
864
+ case "icon":
865
+ case "style":
866
+ case "onLoad":
867
+ case "mode":
868
+ case "ssr": break;
869
+ case "inline":
870
+ case "hFlip":
871
+ case "vFlip":
872
+ n[e] = i === !0 || i === "true" || i === 1;
873
+ break;
874
+ case "flip":
875
+ typeof i == "string" && flipFromString(n, i);
876
+ break;
877
+ case "color":
878
+ a.color = i;
879
+ break;
880
+ case "rotate":
881
+ typeof i == "string" ? n[e] = rotateFromString(i) : typeof i == "number" && (n[e] = i);
882
+ break;
883
+ case "ariaHidden":
884
+ case "aria-hidden":
885
+ i !== !0 && i !== "true" && delete r["aria-hidden"];
886
+ break;
887
+ default: {
888
+ let t = customisationAliases[e];
889
+ t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) : defaultExtendedIconCustomisations[e] === void 0 && (r[e] = i);
890
+ }
891
+ }
892
+ }
893
+ let c = iconToSVG(e, n), l = c.attributes;
894
+ if (n.inline && (a.verticalAlign = "-0.125em"), i === "svg") {
895
+ r.style = {
896
+ ...a,
897
+ ...s
898
+ }, Object.assign(r, l);
899
+ let e = 0, n = t.id;
900
+ return typeof n == "string" && (n = n.replace(/-/g, "_")), r.innerHTML = replaceIDs(c.body, n ? () => n + "ID" + e++ : "iconifyVue"), h("svg", r);
901
+ }
902
+ let { body: u, width: d, height: f } = e, p = i === "mask" || (i === "bg" ? !1 : u.indexOf("currentColor") !== -1), g = iconToHTML(u, {
903
+ ...l,
904
+ width: d + "",
905
+ height: f + ""
906
+ });
907
+ return r.style = {
908
+ ...a,
909
+ "--svg": svgToURL(g),
910
+ width: fixSize(l.width),
911
+ height: fixSize(l.height),
912
+ ...commonProps,
913
+ ...p ? monotoneProps : coloredProps,
914
+ ...s
915
+ }, h("span", r);
916
+ };
917
+ if (allowSimpleNames(!0), setAPIModule("", fetchAPIModule), typeof document < "u" && typeof window < "u") {
918
+ let e = window;
919
+ if (e.IconifyPreload !== void 0) {
920
+ let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
921
+ typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
922
+ try {
923
+ (typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !addCollection(e)) && console.error(n);
924
+ } catch {
925
+ console.error(n);
926
+ }
927
+ });
928
+ }
929
+ if (e.IconifyProviders !== void 0) {
930
+ let t = e.IconifyProviders;
931
+ if (typeof t == "object" && t) for (let e in t) {
932
+ let n = "IconifyProviders[" + e + "] is invalid.";
933
+ try {
934
+ let r = t[e];
935
+ if (typeof r != "object" || !r || r.resources === void 0) continue;
936
+ addAPIProvider(e, r) || console.error(n);
937
+ } catch {
938
+ console.error(n);
939
+ }
940
+ }
941
+ }
942
+ }
943
+ var emptyIcon = {
944
+ ...defaultIconProps,
945
+ body: ""
946
+ }, Icon = defineComponent((e, { emit: t }) => {
947
+ let n = ref(null);
948
+ function r() {
949
+ n.value &&= (n.value.abort?.(), null);
950
+ }
951
+ let i = ref(!!e.ssr), a = ref(""), o = shallowRef(null);
952
+ function s() {
953
+ let i = e.icon;
954
+ if (typeof i == "object" && i && typeof i.body == "string") return a.value = "", { data: i };
955
+ let o;
956
+ if (typeof i != "string" || (o = stringToIcon(i, !1, !0)) === null) return null;
957
+ let s = getIconData(o);
958
+ if (!s) {
959
+ let e = n.value;
960
+ return (!e || e.name !== i) && (s === null ? n.value = { name: i } : n.value = {
961
+ name: i,
962
+ abort: loadIcons([o], c)
963
+ }), null;
964
+ }
965
+ r(), a.value !== i && (a.value = i, nextTick(() => {
966
+ t("load", i);
967
+ }));
968
+ let l = e.customise;
969
+ if (l) {
970
+ s = Object.assign({}, s);
971
+ let e = l(s.body, o.name, o.prefix, o.provider);
972
+ typeof e == "string" && (s.body = e);
973
+ }
974
+ let u = ["iconify"];
975
+ return o.prefix !== "" && u.push("iconify--" + o.prefix), o.provider !== "" && u.push("iconify--" + o.provider), {
976
+ data: s,
977
+ classes: u
978
+ };
979
+ }
980
+ function c() {
981
+ let e = s();
982
+ e ? e.data !== o.value?.data && (o.value = e) : o.value = null;
983
+ }
984
+ return i.value ? c() : onMounted(() => {
985
+ i.value = !0, c();
986
+ }), watch(() => e.icon, c), onUnmounted(r), () => {
987
+ let t = o.value;
988
+ if (!t) return render$2(emptyIcon, e);
989
+ let n = e;
990
+ return t.classes && (n = {
991
+ ...e,
992
+ class: t.classes.join(" ")
993
+ }), render$2({
994
+ ...defaultIconProps,
995
+ ...t.data
996
+ }, n);
997
+ };
998
+ }, {
999
+ props: [
1000
+ "icon",
1001
+ "mode",
1002
+ "ssr",
1003
+ "width",
1004
+ "height",
1005
+ "style",
1006
+ "color",
1007
+ "inline",
1008
+ "rotate",
1009
+ "hFlip",
1010
+ "horizontalFlip",
1011
+ "vFlip",
1012
+ "verticalFlip",
1013
+ "flip",
1014
+ "id",
1015
+ "ariaHidden",
1016
+ "customise",
1017
+ "title"
1018
+ ],
1019
+ emits: ["load"]
1020
+ });
1021
+ const pubinfoInjectionKey = Symbol("injectionKey");
1022
+ function createPubinfoProvider(e) {
1023
+ provide(pubinfoInjectionKey, e);
1024
+ }
1025
+ function useProvider() {
1026
+ return inject(pubinfoInjectionKey, {});
1027
+ }
1028
+ var PubinfoProvider_default = defineComponent({
1029
+ name: "PubinfoProvider",
1030
+ props: { loadIcon: { type: Function } },
1031
+ setup(e, { slots: t }) {
1032
+ let n = useProvider();
1033
+ return createPubinfoProvider({ loadIcon(t) {
1034
+ return e?.loadIcon?.(t) ?? n?.loadIcon?.(t);
1035
+ } }), () => t?.default?.();
1036
+ }
1037
+ }), PrismBox_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1038
+ __name: "PrismBox",
1039
+ setup(e) {
1040
+ let t = ref(null), n = null, r = null, i = !1;
1041
+ function a() {
1042
+ i || (i = !0, requestAnimationFrame(() => {
1043
+ i = !1, c();
1044
+ }));
1045
+ }
1046
+ function o(e) {
1047
+ if (!e) return null;
1048
+ let t = Number.parseFloat(e);
1049
+ return Number.isFinite(t) ? t : null;
1050
+ }
1051
+ function s(e, t) {
1052
+ if (!(e > 0 && t > 0)) return null;
1053
+ let n = e * .35, r = Math.min(t, n) / e * 100, i = [
1054
+ {
1055
+ x: 50,
1056
+ y: 0
1057
+ },
1058
+ {
1059
+ x: 93,
1060
+ y: 25
1061
+ },
1062
+ {
1063
+ x: 93,
1064
+ y: 75
1065
+ },
1066
+ {
1067
+ x: 50,
1068
+ y: 100
1069
+ },
1070
+ {
1071
+ x: 7,
1072
+ y: 75
1073
+ },
1074
+ {
1075
+ x: 7,
1076
+ y: 25
1077
+ }
1078
+ ], a = Math.min(r / 43, .5), o = (e, t, n) => ({
1079
+ x: e.x + (t.x - e.x) * n,
1080
+ y: e.y + (t.y - e.y) * n
1081
+ }), s = [], c = [];
1082
+ for (let e = 0; e < i.length; e++) {
1083
+ let t = i[e], n = i[(e - 1 + i.length) % i.length], r = i[(e + 1) % i.length];
1084
+ s.push(o(t, n, a)), c.push(o(t, r, a));
1085
+ }
1086
+ let l = `M ${c[0].x} ${c[0].y}`;
1087
+ for (let e = 1; e < i.length; e++) l += ` L ${s[e].x} ${s[e].y} Q ${i[e].x} ${i[e].y} ${c[e].x} ${c[e].y}`;
1088
+ l += ` L ${s[0].x} ${s[0].y} Q ${i[0].x} ${i[0].y} ${c[0].x} ${c[0].y} Z`;
1089
+ let u = `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path fill='white' d='${l}'/></svg>`;
1090
+ return `url("data:image/svg+xml,${encodeURIComponent(u).replace(/'/g, "%27").replace(/"/g, "%22")}")`;
1091
+ }
1092
+ function c() {
1093
+ let e = t.value;
1094
+ if (!e) return;
1095
+ let n = window.getComputedStyle(e), r = o(n.width), i = o(n.height), a = n.getPropertyValue("--pubinfo-box-radius").trim(), c = 0;
1096
+ if (a && (c = o(a) ?? (a.endsWith("px") ? o(a) ?? 0 : 0)), !c) {
1097
+ let e = o(n.borderTopLeftRadius || n.borderRadius);
1098
+ e && (c = e);
1099
+ }
1100
+ if (r && i && c > 0) {
1101
+ let t = s(Math.min(r, i), c);
1102
+ if (t) {
1103
+ let n = typeof CSS < "u" && (CSS.supports("mask-image", "url(\"data:image/svg+xml,%3Csvg%3E%3C/svg%3E\")") || CSS.supports("-webkit-mask-image", "url(\"data:image/svg+xml,%3Csvg%3E%3C/svg%3E\")"));
1104
+ e.style.webkitMaskImage = t, e.style.maskImage = t, e.style.webkitMaskRepeat = "no-repeat", e.style.maskRepeat = "no-repeat", e.style.webkitMaskSize = "100% 100%", e.style.maskSize = "100% 100%", e.style.webkitMaskPosition = "center", e.style.maskPosition = "center", n ? (e.style.clipPath = "none", e.style.webkitClipPath = "none") : (e.style.clipPath = "polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%)", e.style.webkitClipPath = "polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%)");
1105
+ return;
1106
+ }
1107
+ }
1108
+ e.style.webkitMaskImage = "", e.style.maskImage = "", e.style.webkitMaskRepeat = "", e.style.maskRepeat = "", e.style.webkitMaskSize = "", e.style.maskSize = "", e.style.webkitMaskPosition = "", e.style.maskPosition = "", e.style.clipPath = "polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%)", e.style.webkitClipPath = "polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%)";
1109
+ }
1110
+ return onMounted(() => {
1111
+ c(), n = new ResizeObserver(() => c()), t.value && n.observe(t.value), r = new MutationObserver(() => a()), t.value && r.observe(t.value, {
1112
+ attributes: !0,
1113
+ attributeFilter: ["style", "class"]
1114
+ }), r.observe(document.documentElement, {
1115
+ attributes: !0,
1116
+ attributeFilter: ["class", "style"],
1117
+ subtree: !0
1118
+ });
1119
+ }), onBeforeUnmount(() => {
1120
+ n && t.value && n.unobserve(t.value), n = null, r && r.disconnect(), r = null;
1121
+ }), (e, n) => (openBlock(), createElementBlock("div", {
1122
+ ref_key: "el",
1123
+ ref: t,
1124
+ class: "prism-box"
1125
+ }, [renderSlot(e.$slots, "default", {}, void 0, !0)], 512));
1126
+ }
1127
+ }), [["__scopeId", "data-v-17d38733"]]), _hoisted_1$11 = { class: "square-box" }, SquareBox_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1128
+ __name: "SquareBox",
1129
+ setup(e) {
1130
+ return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$11, [renderSlot(e.$slots, "default", {}, void 0, !0)]));
1131
+ }
1132
+ }), [["__scopeId", "data-v-80b6e9f9"]]), _hoisted_1$10 = ["data-icon"], _hoisted_2$6 = ["src"], PubinfoIcon_default = /* @__PURE__ */ defineComponent({
1133
+ name: "PubinfoIcon",
1134
+ __name: "index",
1135
+ props: {
1136
+ box: {},
1137
+ background: {},
1138
+ radius: {},
1139
+ angle: {},
1140
+ iconSize: {},
1141
+ small: { type: Boolean },
1142
+ name: {},
1143
+ async: { type: Boolean },
1144
+ flip: {},
1145
+ rotate: {},
1146
+ color: {},
1147
+ size: { default: "1rem" }
1148
+ },
1149
+ setup(r) {
1150
+ let i = r, { loadIcon: a } = useProvider(), u = computed(() => i.name.indexOf("i-") === 0 ? i.async ? "svg" : "css" : i.name.includes(":") && !i.name.startsWith("antd:") ? "svg" : i.name.startsWith("antd:") ? "antd" : "custom"), d = computed(() => {
1151
+ if (i.name.indexOf("i-") === 0) {
1152
+ let e = i.name;
1153
+ return i.async && (e = e.replace("i-", "")), e;
1154
+ }
1155
+ return i.name.startsWith("antd:") ? i.name.replace("antd:", "") : i.name;
1156
+ }), f = computed(() => i.box === void 0 ? "null" : ["square", "prism"].includes(i.box) ? i.box : "null"), p = computed(() => f.value === "square" ? SquareBox_default : f.value === "prism" ? PrismBox_default : "i"), m = shallowRef(void 0);
1157
+ function g(e) {
1158
+ let t = y(e);
1159
+ return {
1160
+ fileName: `${t.name}${t.ext || ".svg"}`,
1161
+ moduleId: t.prefix || void 0
1162
+ };
1163
+ }
1164
+ function _(e, n) {
1165
+ return getCachedIcon(e, n) ?? getCachedIcon(e, void 0);
1166
+ }
1167
+ function v() {
1168
+ if (u.value !== "custom") {
1169
+ m.value = void 0;
1170
+ return;
1171
+ }
1172
+ let { fileName: e, moduleId: t } = g(i.name), n = _(e, t);
1173
+ n && (m.value = n);
1174
+ }
1175
+ v(), watch(() => ({
1176
+ name: i.name,
1177
+ type: u.value
1178
+ }), async ({ name: t, type: r }, i, o) => {
1179
+ if (r !== "custom") {
1180
+ m.value = void 0;
1181
+ return;
1182
+ }
1183
+ let { fileName: s, moduleId: c } = g(t), l = _(s, c);
1184
+ if (l) {
1185
+ m.value = l;
1186
+ return;
1187
+ }
1188
+ let u = !1;
1189
+ o(() => {
1190
+ u = !0;
1191
+ });
1192
+ try {
1193
+ let e = await a?.(t);
1194
+ if (!u && e) {
1195
+ m.value = e, setCachedIcon(s, c, e), c && setCachedIcon(s, void 0, e);
1196
+ return;
1197
+ }
1198
+ } catch {}
1199
+ try {
1200
+ let t = await setupIcon(s, c);
1201
+ if (u) return;
1202
+ t && (m.value = t, setCachedIcon(s, c, t), c && setCachedIcon(s, void 0, t));
1203
+ } catch {}
1204
+ }, {
1205
+ immediate: !0,
1206
+ flush: "sync"
1207
+ });
1208
+ function y(e) {
1209
+ let t = "", n = "", r = "", i = e.match(/^([^-\s]+)-\[(.+)\]$/);
1210
+ if (i) {
1211
+ t = i[1];
1212
+ let e = i[2], a = e.lastIndexOf(".");
1213
+ a === -1 ? n = e : (n = e.slice(0, a), r = e.slice(a));
1214
+ } else {
1215
+ let t = e.lastIndexOf(".");
1216
+ t === -1 ? n = e : (n = e.slice(0, t), r = e.slice(t));
1217
+ }
1218
+ return {
1219
+ prefix: t,
1220
+ name: n,
1221
+ ext: r
1222
+ };
1223
+ }
1224
+ let x = computed(() => {
1225
+ let e = [];
1226
+ if (i.flip) switch (i.flip) {
1227
+ case "horizontal":
1228
+ e.push("rotateY(180deg)");
1229
+ break;
1230
+ case "vertical":
1231
+ e.push("rotateX(180deg)");
1232
+ break;
1233
+ case "both":
1234
+ e.push("rotateX(180deg)"), e.push("rotateY(180deg)");
1235
+ break;
1236
+ }
1237
+ i.rotate && e.push(`rotate(${i.rotate % 360}deg)`);
1238
+ let t = {
1239
+ "--pubinfo-icon-color": "",
1240
+ "--pubinfo-icon-size": "",
1241
+ "--pubinfo-icon-transform": ""
1242
+ };
1243
+ return i.color && (t["--pubinfo-icon-color"] = i.color), i.size && (t["--pubinfo-icon-size"] = typeof i.size == "number" ? `${i.size}px` : i.size), e.length && (t["--pubinfo-icon-transform"] = e.join(" ")), t.verticalAlign = "top", t;
1244
+ }), C = computed(() => {
1245
+ if (f.value !== "null") {
1246
+ let e = {
1247
+ "--pubinfo-box-background": "",
1248
+ "--pubinfo-box-size": "",
1249
+ "--pubinfo-box-radius": "",
1250
+ "--pubinfo-box-gradient-from": "",
1251
+ "--pubinfo-box-gradient-to": "",
1252
+ "--pubinfo-box-angle": "",
1253
+ "--pubinfo-box-full-background": "",
1254
+ "--pubinfo-box-icon-size": ""
1255
+ };
1256
+ typeof i.angle == "string" ? e["--pubinfo-box-angle"] = i.angle : e["--pubinfo-box-angle"] = `${i.angle || 65}deg`, typeof i.background == "string" ? (e["--pubinfo-box-full-background"] = i.background, e["--pubinfo-box-background"] = i.background) : (e["--pubinfo-box-gradient-from"] = i.background?.from || "#65E54A", e["--pubinfo-box-gradient-to"] = i.background?.to || "#35C724"), e["--pubinfo-box-radius"] = i.radius === void 0 ? i.box === "prism" ? `${i.small ? "3px" : "6px"}` : `${i.small ? "7px" : "14px"}` : typeof i.radius == "number" ? `${i.small ? i.radius / 2 : i.radius}px` : i.small ? `${i.radius}` : i.radius, i.size && (e["--pubinfo-box-size"] = typeof i.size == "number" ? `${i.size}px` : i.size);
1257
+ let t = i.iconSize;
1258
+ if (t !== void 0) {
1259
+ if (typeof t == "number" && Number.isFinite(t)) e["--pubinfo-box-icon-size"] = `calc(var(--pubinfo-box-size) * ${t / 100})`;
1260
+ else if (typeof t == "string") {
1261
+ let n = t.trim();
1262
+ if (n.endsWith("%")) {
1263
+ let t = Number.parseFloat(n);
1264
+ Number.isFinite(t) && (e["--pubinfo-box-icon-size"] = `calc(var(--pubinfo-box-size) * ${t / 100})`);
1265
+ } else e["--pubinfo-box-icon-size"] = n;
1266
+ }
1267
+ }
1268
+ return { style: {
1269
+ ...e,
1270
+ ...x.value
1271
+ } };
1272
+ } else return { style: x.value };
1273
+ });
1274
+ return (e, t) => (openBlock(), createBlock(resolveDynamicComponent(unref(p)), mergeProps({
1275
+ "data-icones": i.name,
1276
+ "data-box": unref(f) === "null" ? void 0 : "",
1277
+ "data-box-type": unref(f),
1278
+ "data-icon-type": unref(u),
1279
+ "data-icon-small": i.small ? "" : void 0,
1280
+ class: "data-[box-type=null]:relative data-[box-type=null]:inline-flex data-[box-type=null]:items-center data-[box-type=null]:justify-center data-[box-type=null]:fill-current data-[box-type=null]:leading-[1] data-[box-type=null]:align-top data-[box]:size-[var(--pubinfo-box-size)]! data-[box]:font-size-[var(--pubinfo-box-icon-size,_calc(var(--pubinfo-box-size)_*_.5))]! font-size-[calc(var(--pubinfo-icon-size))] text-[var(--pubinfo-icon-color)] [transform:var(--pubinfo-icon-transform)]"
1281
+ }, unref(C)), {
1282
+ default: withCtx(() => [unref(u) === "css" ? (openBlock(), createElementBlock("i", {
1283
+ key: 0,
1284
+ class: normalizeClass(unref(d))
1285
+ }, null, 2)) : unref(u) === "svg" ? (openBlock(), createBlock(unref(Icon), {
1286
+ key: 1,
1287
+ icon: unref(d)
1288
+ }, null, 8, ["icon"])) : unref(u) === "antd" ? (openBlock(), createElementBlock("span", {
1289
+ key: 2,
1290
+ class: "antd-icon",
1291
+ "data-icon": unref(d)
1292
+ }, [(openBlock(), createBlock(resolveDynamicComponent(AntdIcons[unref(d)])))], 8, _hoisted_1$10)) : m.value ? (openBlock(), createElementBlock("img", {
1293
+ key: 3,
1294
+ class: "size-1em",
1295
+ src: m.value
1296
+ }, null, 8, _hoisted_2$6)) : createCommentVNode("", !0)]),
1297
+ _: 1
1298
+ }, 16, [
1299
+ "data-icones",
1300
+ "data-box",
1301
+ "data-box-type",
1302
+ "data-icon-type",
1303
+ "data-icon-small"
1304
+ ]));
1305
+ }
1306
+ }), _hoisted_1$9 = {
1307
+ key: 0,
1308
+ class: "title-container border-b-1 border-b-[var(--g-bg)] border-b-solid px-5 py-4 transition-border-color-300"
1309
+ }, _hoisted_2$5 = { class: "main-container p-5" }, PageMain_default = /* @__PURE__ */ defineComponent({
1310
+ name: "PageMain",
1311
+ __name: "index",
1312
+ props: {
1313
+ title: { default: "" },
1314
+ collaspe: {
1315
+ type: Boolean,
1316
+ default: !1
1317
+ },
1318
+ height: { default: "" }
1319
+ },
1320
+ setup(e) {
1321
+ let t = e, n = !!useSlots().title, r = ref(t.collaspe);
1322
+ function i() {
1323
+ r.value = !1;
1324
+ }
1325
+ return (t, a) => (openBlock(), createElementBlock("div", {
1326
+ class: normalizeClass(["page-main relative m-4 flex flex-col bg-[var(--g-container-bg)] transition-background-color-300", { "of-hidden": unref(r) }]),
1327
+ style: normalizeStyle({ height: unref(r) ? e.height : "" })
1328
+ }, [
1329
+ n || e.title ? (openBlock(), createElementBlock("div", _hoisted_1$9, [renderSlot(t.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])])) : createCommentVNode("", !0),
1330
+ createElementVNode("div", _hoisted_2$5, [renderSlot(t.$slots, "default")]),
1331
+ unref(r) ? (openBlock(), createElementBlock("div", {
1332
+ key: 1,
1333
+ class: "collaspe absolute bottom-0 w-full cursor-pointer from-transparent to-[var(--g-container-bg)] bg-gradient-to-b pb-2 pt-10 text-center",
1334
+ onClick: i
1335
+ }, [createVNode(PubinfoIcon_default, {
1336
+ name: "i-ep-arrow-down",
1337
+ class: "text-xl op-30 transition-opacity hover:op-100"
1338
+ })])) : createCommentVNode("", !0)
1339
+ ], 6));
1340
+ }
1341
+ }), highlighterPromise = null;
1342
+ function getShikiHighlighter() {
1343
+ return highlighterPromise ||= (async () => {
1344
+ let [{ createHighlighterCore: e }, { createOnigurumaEngine: t }] = await Promise.all([import("./core-D2ocBD0r.js"), import("./engine-oniguruma-Bl7ZtyDI.js")]);
1345
+ return e({
1346
+ themes: [import("./vitesse-light-BfgKNo3X.js"), import("./vitesse-dark-j0hKJETh.js")],
1347
+ langs: [import("./json-BuUwnwNo.js")],
1348
+ engine: t(import("./wasm-tXaxAgz9.js"))
1349
+ });
1350
+ })(), highlighterPromise;
1351
+ }
1352
+ async function highlightCode(e, t = {}) {
1353
+ let { lang: n = "json", lightTheme: r = "vitesse-light", darkTheme: i = "vitesse-dark" } = t;
1354
+ try {
1355
+ return (await getShikiHighlighter()).codeToHtml(e, {
1356
+ lang: n,
1357
+ themes: {
1358
+ light: r,
1359
+ dark: i
1360
+ }
1361
+ });
1362
+ } catch (t) {
1363
+ return console.error("Failed to highlight code:", t), `<pre><code>${e}</code></pre>`;
1364
+ }
1365
+ }
1366
+ var MethodSelect_default = /* @__PURE__ */ defineComponent({
1367
+ name: "MethodSelect",
1368
+ __name: "MethodSelect",
1369
+ props: {
1370
+ modelValue: { default: "GET" },
1371
+ modelModifiers: {}
1372
+ },
1373
+ emits: ["update:modelValue"],
1374
+ setup(e) {
1375
+ let t = useModel(e, "modelValue"), n = ref([
1376
+ {
1377
+ label: "GET",
1378
+ value: "GET"
1379
+ },
1380
+ {
1381
+ label: "POST",
1382
+ value: "POST"
1383
+ },
1384
+ {
1385
+ label: "PUT",
1386
+ value: "PUT"
1387
+ },
1388
+ {
1389
+ label: "DELETE",
1390
+ value: "DELETE"
1391
+ },
1392
+ {
1393
+ label: "PATCH",
1394
+ value: "PATCH"
1395
+ },
1396
+ {
1397
+ label: "HEAD",
1398
+ value: "HEAD"
1399
+ },
1400
+ {
1401
+ label: "OPTIONS",
1402
+ value: "OPTIONS"
1403
+ }
1404
+ ]);
1405
+ return (e, r) => {
1406
+ let i = SelectOption, o = Select;
1407
+ return openBlock(), createBlock(o, {
1408
+ value: t.value,
1409
+ "onUpdate:value": r[0] ||= (e) => t.value = e,
1410
+ class: "w-30!"
1411
+ }, {
1412
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (e) => (openBlock(), createBlock(i, {
1413
+ key: e.value,
1414
+ value: e.value
1415
+ }, {
1416
+ default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
1417
+ _: 2
1418
+ }, 1032, ["value"]))), 128))]),
1419
+ _: 1
1420
+ }, 8, ["value"]);
1421
+ };
1422
+ }
1423
+ }), RequestFieldSelector_default = /* @__PURE__ */ defineComponent({
1424
+ name: "RequestFieldSelector",
1425
+ __name: "RequestFieldSelector",
1426
+ props: /* @__PURE__ */ mergeModels({ requestData: {} }, {
1427
+ value: { default: "" },
1428
+ valueModifiers: {},
1429
+ requestKey: { default: void 0 },
1430
+ requestKeyModifiers: {}
1431
+ }),
1432
+ emits: ["update:value", "update:requestKey"],
1433
+ setup(e, { expose: t }) {
1434
+ let n = e, r = useModel(e, "value"), i = useModel(e, "requestKey");
1435
+ function a(e) {
1436
+ let t = typeof e;
1437
+ return e == null || t === "string" || t === "number" || t === "boolean";
1438
+ }
1439
+ function c(e) {
1440
+ return typeof e == "boolean" ? e ? "true" : "false" : typeof e == "number" ? e : e == null ? "" : String(e);
1441
+ }
1442
+ function u(e) {
1443
+ if (typeof e == "boolean") return e ? "true" : "false";
1444
+ if (typeof e == "number") return String(e);
1445
+ if (e == null) return "";
1446
+ if (typeof e == "string") return e;
1447
+ try {
1448
+ return JSON.stringify(e);
1449
+ } catch {
1450
+ return String(e);
1451
+ }
1452
+ }
1453
+ function d(e, t = []) {
1454
+ let n = [];
1455
+ return Object.keys(e ?? {}).forEach((r) => {
1456
+ let i = e[r], o = [...t, r], s = o.join(".");
1457
+ if (Array.isArray(i)) {
1458
+ let e = [];
1459
+ i.forEach((t, n) => {
1460
+ let r = `${s}.${n}`;
1461
+ if (a(t)) e.push({
1462
+ title: String(t),
1463
+ value: r,
1464
+ key: r
1465
+ });
1466
+ else {
1467
+ let i = d(t, [...o, String(n)]);
1468
+ e.push({
1469
+ title: `[${n}]`,
1470
+ value: r,
1471
+ key: r,
1472
+ selectable: !1,
1473
+ children: i
1474
+ });
1475
+ }
1476
+ }), n.push({
1477
+ title: r,
1478
+ value: s,
1479
+ key: s,
1480
+ selectable: !1,
1481
+ children: e
1482
+ });
1483
+ } else if (i && typeof i == "object" && !a(i)) {
1484
+ let e = d(i, o);
1485
+ n.push({
1486
+ title: r,
1487
+ value: s,
1488
+ key: s,
1489
+ selectable: !1,
1490
+ children: e
1491
+ });
1492
+ } else n.push({
1493
+ title: r,
1494
+ value: s,
1495
+ key: s
1496
+ });
1497
+ }), n;
1498
+ }
1499
+ let f = computed(() => n.requestData ? d(n.requestData) : []);
1500
+ function p(e) {
1501
+ if (!n.requestData) return;
1502
+ let t = n.requestData;
1503
+ for (let n of e.split(".")) n && (t = t?.[n]);
1504
+ return t;
1505
+ }
1506
+ let m = ref();
1507
+ function g(e) {
1508
+ let t = p(e);
1509
+ r.value = c(t), i.value = e, m.value = {
1510
+ value: e,
1511
+ label: u(t)
1512
+ };
1513
+ }
1514
+ function v() {
1515
+ m.value = void 0, r.value = "", i.value = void 0;
1516
+ }
1517
+ onMounted(() => {
1518
+ if (i.value && n.requestData) {
1519
+ let e = p(i.value);
1520
+ m.value = {
1521
+ value: i.value,
1522
+ label: u(e)
1523
+ };
1524
+ } else i.value && !n.requestData && (r.value ||= i.value);
1525
+ });
1526
+ function y(e) {
1527
+ e && e.value ? g(e.value) : (m.value = void 0, r.value = "", i.value = void 0);
1528
+ }
1529
+ return watchEffect(() => {
1530
+ if (m.value?.value && n.requestData) {
1531
+ let e = p(m.value.value);
1532
+ r.value = c(e), m.value = {
1533
+ value: m.value.value,
1534
+ label: u(e)
1535
+ };
1536
+ }
1537
+ }), t({ initRequestSelection: v }), (t, n) => {
1538
+ let a = TreeSelect, o = Input;
1539
+ return openBlock(), createElementBlock("div", null, [e.requestData ? (openBlock(), createBlock(a, {
1540
+ key: 0,
1541
+ value: unref(m),
1542
+ "onUpdate:value": n[0] ||= (e) => isRef(m) ? m.value = e : null,
1543
+ "label-in-value": "",
1544
+ "tree-data": unref(f),
1545
+ placeholder: "Value",
1546
+ "allow-clear": "",
1547
+ "show-search": "",
1548
+ class: "w-full!",
1549
+ onChange: y
1550
+ }, null, 8, ["value", "tree-data"])) : (openBlock(), createBlock(o, {
1551
+ key: 1,
1552
+ value: r.value,
1553
+ "onUpdate:value": n[1] ||= (e) => r.value = e,
1554
+ placeholder: i.value ? "从请求结果获取的值" : "Value",
1555
+ class: "w-full"
1556
+ }, null, 8, ["value", "placeholder"]))]);
1557
+ };
1558
+ }
1559
+ }), SystemFieldSelector_default = /* @__PURE__ */ defineComponent({
1560
+ name: "SystemFieldSelector",
1561
+ __name: "SystemFieldSelector",
1562
+ props: {
1563
+ value: { default: "" },
1564
+ valueModifiers: {},
1565
+ systemKey: { default: void 0 },
1566
+ systemKeyModifiers: {}
1567
+ },
1568
+ emits: ["update:value", "update:systemKey"],
1569
+ setup(e, { expose: t }) {
1570
+ let n = useModel(e, "value"), r = useModel(e, "systemKey");
1571
+ function a(e) {
1572
+ let t = typeof e;
1573
+ return e == null || t === "string" || t === "number" || t === "boolean";
1574
+ }
1575
+ function c(e) {
1576
+ return typeof e == "boolean" ? e ? "true" : "false" : typeof e == "number" ? e : e == null ? "" : String(e);
1577
+ }
1578
+ function l(e) {
1579
+ if (typeof e == "boolean") return e ? "true" : "false";
1580
+ if (typeof e == "number") return String(e);
1581
+ if (e == null) return "";
1582
+ if (typeof e == "string") return e;
1583
+ try {
1584
+ return JSON.stringify(e);
1585
+ } catch {
1586
+ return String(e);
1587
+ }
1588
+ }
1589
+ function u(e, t, n = []) {
1590
+ let r = [];
1591
+ return Object.keys(t ?? {}).forEach((i) => {
1592
+ let o = t[i], s = [...n, i], c = `${e}:${s.join(".")}`;
1593
+ if (Array.isArray(o)) {
1594
+ let t = [];
1595
+ o.forEach((n, r) => {
1596
+ let o = `${c}.${r}`;
1597
+ if (a(n)) t.push({
1598
+ title: String(n),
1599
+ value: o,
1600
+ key: o
1601
+ });
1602
+ else {
1603
+ let a = u(e, n, [
1604
+ ...s,
1605
+ i,
1606
+ String(r)
1607
+ ]);
1608
+ t.push({
1609
+ title: `[${r}]`,
1610
+ value: o,
1611
+ key: o,
1612
+ selectable: !1,
1613
+ children: a
1614
+ });
1615
+ }
1616
+ }), r.push({
1617
+ title: i,
1618
+ value: c,
1619
+ key: c,
1620
+ selectable: !1,
1621
+ children: t
1622
+ });
1623
+ } else if (o && typeof o == "object" && !a(o)) {
1624
+ let t = u(e, o, s);
1625
+ r.push({
1626
+ title: i,
1627
+ value: c,
1628
+ key: c,
1629
+ selectable: !1,
1630
+ children: t
1631
+ });
1632
+ } else r.push({
1633
+ title: i,
1634
+ value: c,
1635
+ key: c
1636
+ });
1637
+ }), r;
1638
+ }
1639
+ let d = computed(() => {
1640
+ let e = getActivePinia?.();
1641
+ if (!e || !e._s) return [];
1642
+ let t = [];
1643
+ return e._s.forEach((e, n) => {
1644
+ if (n === "user") {
1645
+ let r = u(n, e.$state);
1646
+ t.push({
1647
+ title: n,
1648
+ value: n,
1649
+ key: n,
1650
+ selectable: !1,
1651
+ children: r
1652
+ });
1653
+ }
1654
+ }), t;
1655
+ });
1656
+ function f(e) {
1657
+ let [t, ...n] = e.split(":"), r = n.join(":"), a = (getActivePinia?.())?._s?.get(t);
1658
+ if (!a) return;
1659
+ let o = a.$state;
1660
+ if (!r) return o;
1661
+ for (let e of r.split(".")) e && (o = o?.[e]);
1662
+ return o;
1663
+ }
1664
+ function p(e) {
1665
+ for (let t of e) {
1666
+ if (!t.children || t.children.length === 0) return t;
1667
+ let e = p(t.children);
1668
+ if (e) return e;
1669
+ }
1670
+ }
1671
+ let m = ref();
1672
+ function g(e) {
1673
+ let t = f(e);
1674
+ n.value = c(t), r.value = e, m.value = {
1675
+ value: e,
1676
+ label: l(t)
1677
+ };
1678
+ }
1679
+ function v() {
1680
+ m.value = void 0, n.value = "", r.value = void 0;
1681
+ }
1682
+ onMounted(() => {
1683
+ if (r.value) {
1684
+ let e = f(r.value);
1685
+ m.value = {
1686
+ value: r.value,
1687
+ label: l(e)
1688
+ };
1689
+ }
1690
+ });
1691
+ function y(e) {
1692
+ e && e.value ? g(e.value) : (m.value = void 0, n.value = "", r.value = void 0);
1693
+ }
1694
+ return watchEffect(() => {
1695
+ if (m.value?.value) {
1696
+ let e = f(m.value.value);
1697
+ n.value = c(e), m.value = {
1698
+ value: m.value.value,
1699
+ label: l(e)
1700
+ };
1701
+ }
1702
+ }), t({ initSystemSelection: v }), (e, t) => {
1703
+ let n = TreeSelect;
1704
+ return openBlock(), createBlock(n, {
1705
+ value: unref(m),
1706
+ "onUpdate:value": t[0] ||= (e) => isRef(m) ? m.value = e : null,
1707
+ "label-in-value": "",
1708
+ "tree-data": unref(d),
1709
+ placeholder: "Value",
1710
+ "allow-clear": "",
1711
+ "show-search": "",
1712
+ class: "w-full!",
1713
+ onChange: y
1714
+ }, null, 8, ["value", "tree-data"]);
1715
+ };
1716
+ }
1717
+ }), _hoisted_1$8 = { class: "flex gap-2 items-center" }, _hoisted_2$4 = { class: "w-92 flex-shrink-0" }, ParamsItem_default = /* @__PURE__ */ defineComponent({
1718
+ name: "ParamsItem",
1719
+ __name: "ParamsItem",
1720
+ props: /* @__PURE__ */ mergeModels({
1721
+ mode: { default: "http" },
1722
+ requestData: {}
1723
+ }, {
1724
+ checked: {
1725
+ type: Boolean,
1726
+ default: !0
1727
+ },
1728
+ checkedModifiers: {},
1729
+ keyName: { default: "" },
1730
+ keyNameModifiers: {},
1731
+ type: { default: "string" },
1732
+ typeModifiers: {},
1733
+ value: { default: "" },
1734
+ valueModifiers: {},
1735
+ systemKey: { default: void 0 },
1736
+ systemKeyModifiers: {},
1737
+ requestKey: { default: void 0 },
1738
+ requestKeyModifiers: {}
1739
+ }),
1740
+ emits: /* @__PURE__ */ mergeModels(["remove"], [
1741
+ "update:checked",
1742
+ "update:keyName",
1743
+ "update:type",
1744
+ "update:value",
1745
+ "update:systemKey",
1746
+ "update:requestKey"
1747
+ ]),
1748
+ setup(e, { emit: t }) {
1749
+ let n = e, r = t, i = useModel(e, "checked"), o = useModel(e, "keyName"), p = useModel(e, "type"), m = useModel(e, "value"), g = useModel(e, "systemKey"), _ = useModel(e, "requestKey"), v = ref([
1750
+ {
1751
+ label: "String",
1752
+ value: "string",
1753
+ type: ["http", "oauth"],
1754
+ tooltip: "请求参数设置为字符串类型"
1755
+ },
1756
+ {
1757
+ label: "Number",
1758
+ value: "number",
1759
+ type: ["http", "oauth"],
1760
+ tooltip: "请求参数设置为数字类型"
1761
+ },
1762
+ {
1763
+ label: "Boolean",
1764
+ value: "boolean",
1765
+ type: ["http", "oauth"],
1766
+ tooltip: "请求参数设置为布尔类型"
1767
+ },
1768
+ {
1769
+ label: "System",
1770
+ value: "system",
1771
+ type: ["http", "oauth"],
1772
+ tooltip: "请求参数设置为系统中的字段,这些字段是在 pinia 中的"
1773
+ },
1774
+ {
1775
+ label: "Request",
1776
+ value: "request",
1777
+ type: ["oauth"],
1778
+ tooltip: "请求参数设置为上一步的请求结果中的字段"
1779
+ }
1780
+ ]), y = ref(), b = ref();
1781
+ function S(e, t) {
1782
+ let n = p.value;
1783
+ switch (e) {
1784
+ case "string":
1785
+ p.value = "string", n !== "string" && (m.value = "");
1786
+ break;
1787
+ case "number":
1788
+ p.value = "number", n !== "number" && (m.value = 0);
1789
+ break;
1790
+ case "boolean":
1791
+ p.value = "boolean", n !== "boolean" && (m.value = "true");
1792
+ break;
1793
+ case "system":
1794
+ p.value = "system", n !== "system" && nextTick(() => {
1795
+ y.value?.initSystemSelection(), m.value = "";
1796
+ });
1797
+ break;
1798
+ case "request":
1799
+ p.value = "request", n !== "request" && nextTick(() => {
1800
+ b.value?.initRequestSelection(), m.value = "";
1801
+ });
1802
+ break;
1803
+ }
1804
+ }
1805
+ return (t, x) => {
1806
+ let C = Checkbox, w = Input, T = InputNumber, E = SelectOption, D = Select, O = Tooltip, k = DeleteOutlined, j = Button;
1807
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
1808
+ createVNode(C, {
1809
+ checked: i.value,
1810
+ "onUpdate:checked": x[0] ||= (e) => i.value = e,
1811
+ class: "flex-shrink-0"
1812
+ }, null, 8, ["checked"]),
1813
+ createVNode(w, {
1814
+ value: o.value,
1815
+ "onUpdate:value": x[1] ||= (e) => o.value = e,
1816
+ placeholder: "Key",
1817
+ class: "w-92 flex-shrink-0"
1818
+ }, null, 8, ["value"]),
1819
+ createElementVNode("div", _hoisted_2$4, [p.value === "string" ? (openBlock(), createBlock(w, {
1820
+ key: 0,
1821
+ value: m.value,
1822
+ "onUpdate:value": x[2] ||= (e) => m.value = e,
1823
+ placeholder: "Value",
1824
+ class: "w-full"
1825
+ }, null, 8, ["value"])) : p.value === "number" ? (openBlock(), createBlock(T, {
1826
+ key: 1,
1827
+ value: m.value,
1828
+ "onUpdate:value": x[3] ||= (e) => m.value = e,
1829
+ placeholder: "Value",
1830
+ class: "w-full!"
1831
+ }, null, 8, ["value"])) : p.value === "boolean" ? (openBlock(), createBlock(D, {
1832
+ key: 2,
1833
+ value: m.value,
1834
+ "onUpdate:value": x[4] ||= (e) => m.value = e,
1835
+ placeholder: "Value",
1836
+ class: "w-full!"
1837
+ }, {
1838
+ default: withCtx(() => [createVNode(E, { value: "true" }, {
1839
+ default: withCtx(() => [...x[11] ||= [createTextVNode(" true ", -1)]]),
1840
+ _: 1
1841
+ }), createVNode(E, { value: "false" }, {
1842
+ default: withCtx(() => [...x[12] ||= [createTextVNode(" false ", -1)]]),
1843
+ _: 1
1844
+ })]),
1845
+ _: 1
1846
+ }, 8, ["value"])) : p.value === "system" ? (openBlock(), createBlock(SystemFieldSelector_default, {
1847
+ key: 3,
1848
+ ref_key: "systemSelectorRef",
1849
+ ref: y,
1850
+ value: m.value,
1851
+ "onUpdate:value": x[5] ||= (e) => m.value = e,
1852
+ "system-key": g.value,
1853
+ "onUpdate:systemKey": x[6] ||= (e) => g.value = e,
1854
+ class: "w-full!"
1855
+ }, null, 8, ["value", "system-key"])) : p.value === "request" ? (openBlock(), createBlock(RequestFieldSelector_default, {
1856
+ key: 4,
1857
+ ref_key: "requestSelectorRef",
1858
+ ref: b,
1859
+ value: m.value,
1860
+ "onUpdate:value": x[7] ||= (e) => m.value = e,
1861
+ "request-key": _.value,
1862
+ "onUpdate:requestKey": x[8] ||= (e) => _.value = e,
1863
+ "request-data": e.requestData,
1864
+ class: "w-full!"
1865
+ }, null, 8, [
1866
+ "value",
1867
+ "request-key",
1868
+ "request-data"
1869
+ ])) : createCommentVNode("", !0)]),
1870
+ createVNode(D, {
1871
+ value: p.value,
1872
+ "onUpdate:value": x[9] ||= (e) => p.value = e,
1873
+ class: "w-24 flex-shrink-0",
1874
+ onSelect: S
1875
+ }, {
1876
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(v), (e) => (openBlock(), createElementBlock(Fragment, null, [e.type.includes(n.mode) ? (openBlock(), createBlock(E, {
1877
+ key: e.value,
1878
+ value: e.value
1879
+ }, {
1880
+ default: withCtx(() => [e.tooltip ? (openBlock(), createBlock(O, {
1881
+ key: 0,
1882
+ title: e.tooltip
1883
+ }, {
1884
+ default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
1885
+ _: 2
1886
+ }, 1032, ["title"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(" ? " + toDisplayString(e.label), 1)], 64))]),
1887
+ _: 2
1888
+ }, 1032, ["value"])) : createCommentVNode("", !0)], 64))), 256))]),
1889
+ _: 1
1890
+ }, 8, ["value"]),
1891
+ createVNode(j, {
1892
+ class: "flex-shrink-0",
1893
+ onClick: x[10] ||= (e) => r("remove")
1894
+ }, {
1895
+ default: withCtx(() => [createVNode(k)]),
1896
+ _: 1
1897
+ })
1898
+ ]);
1899
+ };
1900
+ }
1901
+ }), _hoisted_1$7 = { class: "flex items-center justify-center gap-1" }, ParamsPanel_default = /* @__PURE__ */ defineComponent({
1902
+ name: "HTTPParamsPanel",
1903
+ __name: "ParamsPanel",
1904
+ props: /* @__PURE__ */ mergeModels({ method: {} }, {
1905
+ modelValue: { default: "query" },
1906
+ modelModifiers: {}
1907
+ }),
1908
+ emits: ["update:modelValue"],
1909
+ setup(e) {
1910
+ let t = e, n = useModel(e, "modelValue"), r = ref([
1911
+ {
1912
+ icon: "i-ph:question",
1913
+ label: "Query",
1914
+ value: "query",
1915
+ status: [
1916
+ "GET",
1917
+ "POST",
1918
+ "PUT",
1919
+ "DELETE",
1920
+ "PATCH",
1921
+ "HEAD",
1922
+ "OPTIONS"
1923
+ ]
1924
+ },
1925
+ {
1926
+ icon: "i-ph:file-text",
1927
+ label: "Body",
1928
+ value: "body",
1929
+ status: [
1930
+ "POST",
1931
+ "PUT",
1932
+ "DELETE",
1933
+ "PATCH"
1934
+ ]
1935
+ },
1936
+ {
1937
+ icon: "i-ph:file-html",
1938
+ label: "Header",
1939
+ value: "header",
1940
+ status: [
1941
+ "GET",
1942
+ "POST",
1943
+ "PUT",
1944
+ "DELETE",
1945
+ "PATCH",
1946
+ "HEAD",
1947
+ "OPTIONS"
1948
+ ]
1949
+ },
1950
+ {
1951
+ icon: "i-ph:cookie",
1952
+ label: "Cookie",
1953
+ value: "cookie",
1954
+ status: [
1955
+ "GET",
1956
+ "POST",
1957
+ "PUT",
1958
+ "DELETE",
1959
+ "PATCH",
1960
+ "HEAD",
1961
+ "OPTIONS"
1962
+ ]
1963
+ }
1964
+ ]);
1965
+ return (e, i) => {
1966
+ let o = RadioButton, p = RadioGroup;
1967
+ return openBlock(), createBlock(p, {
1968
+ value: n.value,
1969
+ "onUpdate:value": i[0] ||= (e) => n.value = e,
1970
+ "button-style": "solid"
1971
+ }, {
1972
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (e) => (openBlock(), createElementBlock(Fragment, null, [e.status.includes(t.method) ? (openBlock(), createBlock(o, {
1973
+ key: e.value,
1974
+ value: e.value
1975
+ }, {
1976
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$7, [createVNode(PubinfoIcon_default, { name: e.icon }, null, 8, ["name"]), createTextVNode(" " + toDisplayString(e.label), 1)])]),
1977
+ _: 2
1978
+ }, 1032, ["value"])) : createCommentVNode("", !0)], 64))), 256))]),
1979
+ _: 1
1980
+ }, 8, ["value"]);
1981
+ };
1982
+ }
1983
+ }), _hoisted_1$6 = { class: "size-full flex flex-col" }, _hoisted_2$3 = { class: "flex flex-col gap-2 flex-none top-0 z-10! p-4" }, _hoisted_3$3 = { class: "flex gap-2 items-center" }, _hoisted_4$1 = { class: "flex flex-wrap justify-between gap-2 items-center w-full text-sm text-center border-b-solid border-b border-b-[var(--g-border-color)] px-4 pb-2" }, _hoisted_5$1 = { class: "relative border-b-solid border-b border-b-[var(--g-border-color)]" }, _hoisted_6$1 = { class: "p-4 flex flex-col gap-4 max-h-xs of-y-auto" }, _hoisted_7 = {
1984
+ key: 0,
1985
+ class: "flex flex-col gap-2"
1986
+ }, _hoisted_8 = { class: "flex gap-4" }, _hoisted_9 = { class: "border-b-solid border-b border-b-[var(--g-border-color)] flex gap-2 px-4 py-2 items-center" }, _hoisted_10 = ["innerHTML"], _hoisted_11 = {
1987
+ key: 1,
1988
+ class: "h-full border-b-solid border-b border-b-[var(--g-border-color)] flex gap-2 px-4 py-2 items-center justify-center"
1989
+ }, One_default = /* @__PURE__ */ defineComponent({
1990
+ name: "PartyLoginStepOne",
1991
+ __name: "One",
1992
+ props: /* @__PURE__ */ mergeModels({
1993
+ isFetching: { type: Boolean },
1994
+ isFinished: { type: Boolean },
1995
+ statusCode: {},
1996
+ elapsedTime: {},
1997
+ data: {}
1998
+ }, {
1999
+ url: { default: "" },
2000
+ urlModifiers: {},
2001
+ method: { default: "GET" },
2002
+ methodModifiers: {},
2003
+ params: { default: "query" },
2004
+ paramsModifiers: {},
2005
+ panelItems: { required: !0 },
2006
+ panelItemsModifiers: {}
2007
+ }),
2008
+ emits: /* @__PURE__ */ mergeModels(["send"], [
2009
+ "update:url",
2010
+ "update:method",
2011
+ "update:params",
2012
+ "update:panelItems"
2013
+ ]),
2014
+ setup(e, { emit: t }) {
2015
+ let n = e, r = t, i = useModel(e, "url"), p = useModel(e, "method"), m = useModel(e, "params"), g = useModel(e, "panelItems"), _ = computed(() => g.value[m.value]);
2016
+ function v() {
2017
+ let e = Date.now();
2018
+ g.value[m.value].push({
2019
+ id: e,
2020
+ checked: !0,
2021
+ keyName: "",
2022
+ type: "string",
2023
+ value: ""
2024
+ });
2025
+ }
2026
+ function y() {
2027
+ g.value[m.value] = [];
2028
+ }
2029
+ function b(e) {
2030
+ let t = g.value[m.value], n = t.findIndex((t) => t.id === e);
2031
+ n >= 0 && t.splice(n, 1);
2032
+ }
2033
+ function x() {
2034
+ r("send");
2035
+ }
2036
+ let S = computed(() => {
2037
+ let e = n.statusCode || 0;
2038
+ return e >= 200 && e < 300 ? "success" : e >= 300 && e < 400 ? "processing" : e >= 400 && e < 500 ? "warning" : e >= 500 ? "error" : "default";
2039
+ }), C = computed(() => {
2040
+ let e = n.elapsedTime || 0;
2041
+ return e < 80 ? "success" : e < 200 ? "processing" : e < 500 ? "warning" : "error";
2042
+ }), w = ref("");
2043
+ return watch(() => n.data, async (e) => {
2044
+ e == null ? w.value = "" : w.value = await highlightCode(typeof e == "string" ? e : JSON.stringify(e, null, 2), { lang: "json" });
2045
+ }, { immediate: !0 }), (t, n) => {
2046
+ let r = Input, o = Button, g = Tag;
2047
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
2048
+ createElementVNode("div", _hoisted_2$3, [createElementVNode("div", _hoisted_3$3, [
2049
+ createVNode(MethodSelect_default, {
2050
+ modelValue: p.value,
2051
+ "onUpdate:modelValue": n[0] ||= (e) => p.value = e
2052
+ }, null, 8, ["modelValue"]),
2053
+ createVNode(r, {
2054
+ value: i.value,
2055
+ "onUpdate:value": n[1] ||= (e) => i.value = e,
2056
+ placeholder: "请输入调用的第三方的 http/https 请求地址"
2057
+ }, null, 8, ["value"]),
2058
+ createVNode(o, {
2059
+ type: "primary",
2060
+ loading: e.isFetching,
2061
+ disabled: !i.value,
2062
+ onClick: x
2063
+ }, {
2064
+ default: withCtx(() => [createVNode(unref(SendOutlined))]),
2065
+ _: 1
2066
+ }, 8, ["loading", "disabled"])
2067
+ ])]),
2068
+ createElementVNode("div", _hoisted_4$1, [createVNode(ParamsPanel_default, {
2069
+ modelValue: m.value,
2070
+ "onUpdate:modelValue": n[2] ||= (e) => m.value = e,
2071
+ method: p.value
2072
+ }, null, 8, ["modelValue", "method"])]),
2073
+ createElementVNode("div", _hoisted_5$1, [createElementVNode("div", _hoisted_6$1, [unref(_).length ? (openBlock(), createElementBlock("div", _hoisted_7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(_), (e) => (openBlock(), createBlock(ParamsItem_default, {
2074
+ key: e.id,
2075
+ checked: e.checked,
2076
+ "onUpdate:checked": (t) => e.checked = t,
2077
+ "key-name": e.keyName,
2078
+ "onUpdate:keyName": (t) => e.keyName = t,
2079
+ type: e.type,
2080
+ "onUpdate:type": (t) => e.type = t,
2081
+ value: e.value,
2082
+ "onUpdate:value": (t) => e.value = t,
2083
+ "system-key": e.systemKey,
2084
+ "onUpdate:systemKey": (t) => e.systemKey = t,
2085
+ onRemove: (t) => b(e.id)
2086
+ }, null, 8, [
2087
+ "checked",
2088
+ "onUpdate:checked",
2089
+ "key-name",
2090
+ "onUpdate:keyName",
2091
+ "type",
2092
+ "onUpdate:type",
2093
+ "value",
2094
+ "onUpdate:value",
2095
+ "system-key",
2096
+ "onUpdate:systemKey",
2097
+ "onRemove"
2098
+ ]))), 128))])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_8, [
2099
+ createVNode(o, { onClick: v }, {
2100
+ icon: withCtx(() => [createVNode(unref(PlusOutlined))]),
2101
+ default: withCtx(() => [n[3] ||= createTextVNode(" 添加 ", -1)]),
2102
+ _: 1
2103
+ }),
2104
+ n[5] ||= createElementVNode("div", { class: "flex-auto" }, null, -1),
2105
+ unref(_).length ? (openBlock(), createBlock(o, {
2106
+ key: 0,
2107
+ danger: "",
2108
+ onClick: y
2109
+ }, {
2110
+ icon: withCtx(() => [createVNode(unref(DeleteOutlined))]),
2111
+ default: withCtx(() => [n[4] ||= createTextVNode(" 删除全部 ", -1)]),
2112
+ _: 1
2113
+ })) : createCommentVNode("", !0)
2114
+ ])])]),
2115
+ e.isFinished ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", _hoisted_9, [
2116
+ n[6] ||= createElementVNode("div", null, "Response", -1),
2117
+ createVNode(g, {
2118
+ bordered: !1,
2119
+ color: unref(S)
2120
+ }, {
2121
+ default: withCtx(() => [createTextVNode(toDisplayString(e.statusCode), 1)]),
2122
+ _: 1
2123
+ }, 8, ["color"]),
2124
+ n[7] ||= createElementVNode("div", { class: "flex-auto" }, null, -1),
2125
+ n[8] ||= createElementVNode("div", { class: "op-50" }, " Request finished in ", -1),
2126
+ createVNode(g, {
2127
+ bordered: !1,
2128
+ color: unref(C)
2129
+ }, {
2130
+ default: withCtx(() => [createTextVNode(toDisplayString(`${e.elapsedTime} ms`), 1)]),
2131
+ _: 1
2132
+ }, 8, ["color"])
2133
+ ]), createElementVNode("pre", {
2134
+ class: "w-full mt-2 rounded text-sm whitespace-pre-wrap break-all of-auto! flex-1 px-4",
2135
+ innerHTML: unref(w)
2136
+ }, null, 8, _hoisted_10)], 64)) : (openBlock(), createElementBlock("div", _hoisted_11, [createVNode(o, {
2137
+ loading: e.isFetching,
2138
+ disabled: !i.value,
2139
+ onClick: x
2140
+ }, {
2141
+ icon: withCtx(() => [createVNode(unref(SendOutlined))]),
2142
+ default: withCtx(() => [n[9] ||= createTextVNode(" 发送请求 ", -1)]),
2143
+ _: 1
2144
+ }, 8, ["loading", "disabled"])]))
2145
+ ]);
2146
+ };
2147
+ }
2148
+ }), _hoisted_1$5 = { class: "size-full flex flex-col" }, _hoisted_2$2 = { class: "flex flex-col gap-2 flex-none top-0 z-10! p-4 border-b-solid border-b border-b-[var(--g-border-color)]" }, _hoisted_3$2 = { class: "relative border-b-solid border-b border-b-[var(--g-border-color)]" }, _hoisted_4 = { class: "p-4 flex flex-col gap-4 h-full of-y-auto" }, _hoisted_5 = {
2149
+ key: 0,
2150
+ class: "flex flex-col gap-2"
2151
+ }, _hoisted_6 = { class: "flex gap-4" }, Two_default = /* @__PURE__ */ defineComponent({
2152
+ name: "PartyLoginStepTwo",
2153
+ __name: "Two",
2154
+ props: /* @__PURE__ */ mergeModels({
2155
+ url: {},
2156
+ requestData: {}
2157
+ }, {
2158
+ oauthParams: { default: () => [] },
2159
+ oauthParamsModifiers: {}
2160
+ }),
2161
+ emits: ["update:oauthParams"],
2162
+ setup(e) {
2163
+ let t = e, n = useModel(e, "oauthParams");
2164
+ function r() {
2165
+ let e = Date.now();
2166
+ n.value.push({
2167
+ id: e,
2168
+ checked: !0,
2169
+ keyName: "",
2170
+ type: "string",
2171
+ value: ""
2172
+ });
2173
+ }
2174
+ function i() {
2175
+ n.value = [];
2176
+ }
2177
+ function o(e) {
2178
+ let t = n.value.findIndex((t) => t.id === e);
2179
+ t >= 0 && n.value.splice(t, 1);
2180
+ }
2181
+ return (e, p) => {
2182
+ let m = Input, g = Button;
2183
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", _hoisted_2$2, [createVNode(m, {
2184
+ value: t.url,
2185
+ placeholder: "跳转链接由外部配置提供",
2186
+ readonly: ""
2187
+ }, null, 8, ["value"])]), createElementVNode("div", _hoisted_3$2, [createElementVNode("div", _hoisted_4, [n.value.length ? (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (e) => (openBlock(), createBlock(ParamsItem_default, {
2188
+ key: e.id,
2189
+ checked: e.checked,
2190
+ "onUpdate:checked": (t) => e.checked = t,
2191
+ "key-name": e.keyName,
2192
+ "onUpdate:keyName": (t) => e.keyName = t,
2193
+ type: e.type,
2194
+ "onUpdate:type": (t) => e.type = t,
2195
+ value: e.value,
2196
+ "onUpdate:value": (t) => e.value = t,
2197
+ "system-key": e.systemKey,
2198
+ "onUpdate:systemKey": (t) => e.systemKey = t,
2199
+ "request-key": e.requestKey,
2200
+ "onUpdate:requestKey": (t) => e.requestKey = t,
2201
+ mode: "oauth",
2202
+ "request-data": t.requestData,
2203
+ onRemove: (t) => o(e.id)
2204
+ }, null, 8, [
2205
+ "checked",
2206
+ "onUpdate:checked",
2207
+ "key-name",
2208
+ "onUpdate:keyName",
2209
+ "type",
2210
+ "onUpdate:type",
2211
+ "value",
2212
+ "onUpdate:value",
2213
+ "system-key",
2214
+ "onUpdate:systemKey",
2215
+ "request-key",
2216
+ "onUpdate:requestKey",
2217
+ "request-data",
2218
+ "onRemove"
2219
+ ]))), 128))])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_6, [
2220
+ createVNode(g, { onClick: r }, {
2221
+ icon: withCtx(() => [createVNode(unref(PlusOutlined))]),
2222
+ default: withCtx(() => [p[0] ||= createTextVNode(" 添加 ", -1)]),
2223
+ _: 1
2224
+ }),
2225
+ p[2] ||= createElementVNode("div", { class: "flex-auto" }, null, -1),
2226
+ n.value.length ? (openBlock(), createBlock(g, {
2227
+ key: 0,
2228
+ danger: "",
2229
+ onClick: i
2230
+ }, {
2231
+ icon: withCtx(() => [createVNode(unref(DeleteOutlined))]),
2232
+ default: withCtx(() => [p[1] ||= createTextVNode(" 删除全部 ", -1)]),
2233
+ _: 1
2234
+ })) : createCommentVNode("", !0)
2235
+ ])])])]);
2236
+ };
2237
+ }
2238
+ });
2239
+ function usePartyRequest({ url: e, method: t, params: n }) {
2240
+ let r = ref(!1), i = ref(!1), a = ref(void 0), o = ref(void 0), s = ref(void 0);
2241
+ function c(e) {
2242
+ if (e == null) return e;
2243
+ if (typeof e == "string") try {
2244
+ return c(JSON.parse(e));
2245
+ } catch {
2246
+ return e;
2247
+ }
2248
+ if (Array.isArray(e)) return e.map((e) => c(e));
2249
+ if (typeof e == "object") {
2250
+ let t = {};
2251
+ for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = c(e[n]));
2252
+ return t;
2253
+ }
2254
+ return e;
2255
+ }
2256
+ function l(e) {
2257
+ let t = new URLSearchParams();
2258
+ Object.entries(e || {}).forEach(([e, n]) => {
2259
+ Array.isArray(n) ? n.forEach((n) => t.append(e, String(n))) : n != null && t.append(e, String(n));
2260
+ });
2261
+ let n = t.toString();
2262
+ return n ? `?${n}` : "";
2263
+ }
2264
+ function u(e, t) {
2265
+ try {
2266
+ let n = new URL(e), r = new URLSearchParams(n.search);
2267
+ return Object.entries(t || {}).forEach(([e, t]) => {
2268
+ Array.isArray(t) ? t.forEach((t) => r.append(e, String(t))) : t != null && r.set(e, String(t));
2269
+ }), n.search = r.toString(), n.toString();
2270
+ } catch {
2271
+ let n = l(t);
2272
+ return e.includes("?") ? `${e}&${n.replace(/^\?/, "")}` : `${e}${n}`;
2273
+ }
2274
+ }
2275
+ function d(e, t) {
2276
+ let n = Object.keys(t).find((e) => e.toLowerCase() === "content-type"), r = n ? t[n] : "application/json";
2277
+ if (n || (t["Content-Type"] = r), !e || Object.keys(e).length === 0) return;
2278
+ let i = r.split(";")[0].trim().toLowerCase();
2279
+ if (i === "application/json") return JSON.stringify(e);
2280
+ if (i === "application/x-www-form-urlencoded") {
2281
+ let t = new URLSearchParams();
2282
+ return Object.entries(e).forEach(([e, n]) => {
2283
+ Array.isArray(n) ? n.forEach((n) => t.append(e, String(n))) : n != null && t.append(e, String(n));
2284
+ }), t.toString();
2285
+ }
2286
+ if (i === "multipart/form-data") {
2287
+ let r = new FormData();
2288
+ return Object.entries(e).forEach(([e, t]) => {
2289
+ Array.isArray(t) ? t.forEach((t) => r.append(e, t)) : t != null && r.append(e, t);
2290
+ }), n ? delete t[n] : delete t["Content-Type"], r;
2291
+ }
2292
+ return String(e);
2293
+ }
2294
+ async function f() {
2295
+ i.value = !1, a.value = void 0, o.value = void 0, s.value = void 0;
2296
+ let l = e.value.trim();
2297
+ if (!l) {
2298
+ message.error("请输入请求地址");
2299
+ return;
2300
+ }
2301
+ let { query: f = {}, body: p = {}, header: m = {}, cookie: g = {} } = n.value || {}, _ = {};
2302
+ Object.entries(m).forEach(([e, t]) => {
2303
+ _[e] = String(t);
2304
+ });
2305
+ let v = Object.entries(g).map(([e, t]) => `${e}=${t}`), y = v.length > 0;
2306
+ y && (_.Cookie = v.join("; "));
2307
+ let b = u(l, f), x, S = t.value;
2308
+ ["GET", "HEAD"].includes(S) || (x = d(p, _));
2309
+ let C = Date.now();
2310
+ r.value = !0;
2311
+ try {
2312
+ let e = await fetch(b, {
2313
+ method: S,
2314
+ headers: _,
2315
+ body: x,
2316
+ credentials: y ? "include" : "same-origin",
2317
+ mode: "cors"
2318
+ });
2319
+ if (s.value = Date.now() - C, a.value = e.status, (e.headers.get("content-type") || "").includes("application/json")) o.value = c(await e.json());
2320
+ else {
2321
+ let t = await e.text();
2322
+ try {
2323
+ o.value = c(JSON.parse(t));
2324
+ } catch {
2325
+ o.value = t;
2326
+ }
2327
+ }
2328
+ } catch (e) {
2329
+ s.value = Date.now() - C, a.value = 0, o.value = {
2330
+ error: e?.message || String(e),
2331
+ message: "请求失败,可能是网络问题或 CORS 跨域限制"
2332
+ }, message.error(`请求失败: ${e?.message || String(e)}`);
2333
+ } finally {
2334
+ r.value = !1, i.value = !0;
2335
+ }
2336
+ }
2337
+ return {
2338
+ send: f,
2339
+ isFinished: i,
2340
+ isFetching: r,
2341
+ statusCode: a,
2342
+ data: o,
2343
+ elapsedTime: s
2344
+ };
2345
+ }
2346
+ var _hoisted_1$4 = { class: "of-y-auto! h-500px relative" }, _hoisted_2$1 = { class: "flex justify-between items-center" }, _hoisted_3$1 = { class: "flex gap-2" }, Modal_default = /* @__PURE__ */ defineComponent({
2347
+ name: "ThirdPartyLogin",
2348
+ __name: "Modal",
2349
+ props: /* @__PURE__ */ mergeModels({
2350
+ modelValue: {},
2351
+ targetUrl: {}
2352
+ }, {
2353
+ open: {
2354
+ type: Boolean,
2355
+ default: !1
2356
+ },
2357
+ openModifiers: {}
2358
+ }),
2359
+ emits: /* @__PURE__ */ mergeModels(["update:modelValue"], ["update:open"]),
2360
+ setup(e, { emit: t }) {
2361
+ let n = e, r = t, i = useModel(e, "open"), a = ref(0), p = ref(""), m = ref("GET"), g = ref("query"), v = reactive({
2362
+ query: [],
2363
+ body: [],
2364
+ header: [],
2365
+ cookie: []
2366
+ }), y = ref([]), b = computed(() => n.targetUrl || "");
2367
+ function x(e = !0) {
2368
+ i.value = e, e ? D() : A();
2369
+ }
2370
+ let S = 0;
2371
+ function C() {
2372
+ return {
2373
+ id: ++S,
2374
+ checked: !0,
2375
+ keyName: "",
2376
+ type: "string",
2377
+ value: ""
2378
+ };
2379
+ }
2380
+ function w() {
2381
+ return {
2382
+ id: ++S,
2383
+ checked: !0,
2384
+ keyName: "Content-Type",
2385
+ type: "string",
2386
+ value: "application/json;"
2387
+ };
2388
+ }
2389
+ function E() {
2390
+ [
2391
+ "query",
2392
+ "body",
2393
+ "header",
2394
+ "cookie"
2395
+ ].forEach((e) => {
2396
+ v[e].length === 0 && (e === "header" ? v[e].push(w()) : v[e].push(C()));
2397
+ }), y.value.length === 0 && y.value.push(C());
2398
+ }
2399
+ onMounted(() => {
2400
+ E();
2401
+ });
2402
+ function D() {
2403
+ if (!n.modelValue || n.modelValue.length === 0) return;
2404
+ let e = (e) => {
2405
+ let t = {
2406
+ id: ++S,
2407
+ checked: !0,
2408
+ keyName: e.key,
2409
+ type: e.type,
2410
+ value: e.value ?? ""
2411
+ };
2412
+ return e.type === "system" && e.field ? t.systemKey = e.field : e.type === "request" && e.field && (t.requestKey = e.field), t;
2413
+ };
2414
+ n.modelValue.forEach((t) => {
2415
+ t.step === 1 && t.request ? (p.value = t.request.url, m.value = t.request.method, [
2416
+ "query",
2417
+ "body",
2418
+ "header",
2419
+ "cookie"
2420
+ ].forEach((n) => {
2421
+ let r = t.request.params[n];
2422
+ r && r.length > 0 && (v[n] = r.map(e));
2423
+ })) : t.step === 2 && t.oauth && t.oauth.params && t.oauth.params.length > 0 && (y.value = t.oauth.params.map(e));
2424
+ });
2425
+ }
2426
+ function A() {
2427
+ a.value = 0, p.value = "", m.value = "GET", g.value = "query", v.query = [], v.body = [], v.header = [], v.cookie = [], y.value = [], E();
2428
+ }
2429
+ let { send: M, isFinished: N, isFetching: P, statusCode: F, data: I, elapsedTime: L } = usePartyRequest({
2430
+ url: p,
2431
+ method: m,
2432
+ params: computed(() => {
2433
+ let e = {
2434
+ query: {},
2435
+ body: {},
2436
+ header: {},
2437
+ cookie: {}
2438
+ };
2439
+ return Object.keys(v).forEach((t) => {
2440
+ v[t].filter((e) => e.checked && e.keyName.trim().length).forEach((n) => {
2441
+ let r = n.keyName.trim(), i = n.value;
2442
+ if (n.type === "number") {
2443
+ let e = Number(i);
2444
+ i = Number.isFinite(e) ? e : i;
2445
+ } else n.type === "boolean" && (i = n.value === "true");
2446
+ e[t][r] = i;
2447
+ });
2448
+ }), e;
2449
+ })
2450
+ });
2451
+ async function R() {
2452
+ await M();
2453
+ }
2454
+ function z() {
2455
+ a.value > 0 && a.value--;
2456
+ }
2457
+ function B() {
2458
+ a.value < 1 && a.value++;
2459
+ }
2460
+ function V() {
2461
+ let e = (e) => {
2462
+ let t = {
2463
+ key: e.keyName,
2464
+ type: e.type
2465
+ };
2466
+ return e.type === "system" && e.systemKey ? {
2467
+ ...t,
2468
+ field: e.systemKey
2469
+ } : e.type === "request" && e.requestKey ? {
2470
+ ...t,
2471
+ field: e.requestKey
2472
+ } : {
2473
+ ...t,
2474
+ value: e.value
2475
+ };
2476
+ }, t = {
2477
+ query: [],
2478
+ body: [],
2479
+ header: [],
2480
+ cookie: []
2481
+ };
2482
+ return Object.keys(v).forEach((n) => {
2483
+ t[n] = v[n].filter((e) => e.checked && e.keyName.trim().length > 0).map(e);
2484
+ }), [{
2485
+ step: 1,
2486
+ request: {
2487
+ url: p.value,
2488
+ method: m.value,
2489
+ params: t
2490
+ }
2491
+ }, {
2492
+ step: 2,
2493
+ oauth: { params: y.value.filter((e) => e.checked && e.keyName.trim().length > 0).map(e) }
2494
+ }];
2495
+ }
2496
+ function H() {
2497
+ r("update:modelValue", V()), x(!1);
2498
+ }
2499
+ return (e, t) => {
2500
+ let n = Button, r = Modal$1;
2501
+ return openBlock(), createElementBlock("div", null, [createElementVNode("div", { onClick: t[0] ||= (e) => x(!0) }, [renderSlot(e.$slots, "trigger")]), createVNode(r, {
2502
+ open: i.value,
2503
+ "onUpdate:open": t[7] ||= (e) => i.value = e,
2504
+ title: "第三方登录",
2505
+ centered: !0,
2506
+ "mask-closable": !1,
2507
+ width: 1020,
2508
+ onCancel: t[8] ||= (e) => x(!1)
2509
+ }, {
2510
+ footer: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createElementVNode("div", null, [unref(a) > 0 ? (openBlock(), createBlock(n, {
2511
+ key: 0,
2512
+ onClick: z
2513
+ }, {
2514
+ default: withCtx(() => [...t[9] ||= [createTextVNode(" 上一步 ", -1)]]),
2515
+ _: 1
2516
+ })) : createCommentVNode("", !0)]), createElementVNode("div", _hoisted_3$1, [
2517
+ createVNode(n, { onClick: t[6] ||= (e) => x(!1) }, {
2518
+ default: withCtx(() => [...t[10] ||= [createTextVNode(" 取消 ", -1)]]),
2519
+ _: 1
2520
+ }),
2521
+ unref(a) === 0 ? (openBlock(), createBlock(n, {
2522
+ key: 0,
2523
+ type: "primary",
2524
+ onClick: B
2525
+ }, {
2526
+ default: withCtx(() => [...t[11] ||= [createTextVNode(" 下一步 ", -1)]]),
2527
+ _: 1
2528
+ })) : createCommentVNode("", !0),
2529
+ unref(a) === 1 ? (openBlock(), createBlock(n, {
2530
+ key: 1,
2531
+ type: "primary",
2532
+ onClick: H
2533
+ }, {
2534
+ default: withCtx(() => [...t[12] ||= [createTextVNode(" 完成 ", -1)]]),
2535
+ _: 1
2536
+ })) : createCommentVNode("", !0)
2537
+ ])])]),
2538
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$4, [unref(a) === 0 ? (openBlock(), createBlock(One_default, {
2539
+ key: 0,
2540
+ url: unref(p),
2541
+ "onUpdate:url": t[1] ||= (e) => isRef(p) ? p.value = e : null,
2542
+ method: unref(m),
2543
+ "onUpdate:method": t[2] ||= (e) => isRef(m) ? m.value = e : null,
2544
+ params: unref(g),
2545
+ "onUpdate:params": t[3] ||= (e) => isRef(g) ? g.value = e : null,
2546
+ "panel-items": unref(v),
2547
+ "onUpdate:panelItems": t[4] ||= (e) => isRef(v) ? v.value = e : null,
2548
+ "is-fetching": unref(P),
2549
+ "is-finished": unref(N),
2550
+ "status-code": unref(F),
2551
+ "elapsed-time": unref(L),
2552
+ data: unref(I),
2553
+ onSend: R
2554
+ }, null, 8, [
2555
+ "url",
2556
+ "method",
2557
+ "params",
2558
+ "panel-items",
2559
+ "is-fetching",
2560
+ "is-finished",
2561
+ "status-code",
2562
+ "elapsed-time",
2563
+ "data"
2564
+ ])) : createCommentVNode("", !0), unref(a) === 1 ? (openBlock(), createBlock(Two_default, {
2565
+ key: 1,
2566
+ "oauth-params": unref(y),
2567
+ "onUpdate:oauthParams": t[5] ||= (e) => isRef(y) ? y.value = e : null,
2568
+ url: unref(b),
2569
+ "request-data": unref(I)
2570
+ }, null, 8, [
2571
+ "oauth-params",
2572
+ "url",
2573
+ "request-data"
2574
+ ])) : createCommentVNode("", !0)])]),
2575
+ _: 1
2576
+ }, 8, ["open"])]);
2577
+ };
2578
+ }
2579
+ }), _hoisted_1$3 = {
2580
+ viewBox: "0 0 1024 1024",
2581
+ width: "1.2em",
2582
+ height: "1.2em"
2583
+ };
2584
+ function render$1(e, t) {
2585
+ return openBlock(), createElementBlock("svg", _hoisted_1$3, [...t[0] ||= [
2586
+ createElementVNode("path", {
2587
+ fill: "currentColor",
2588
+ d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372"
2589
+ }, null, -1),
2590
+ createElementVNode("path", {
2591
+ fill: "currentColor",
2592
+ "fill-opacity": ".15",
2593
+ d: "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372s372-166.6 372-372s-166.6-372-372-372m193.4 225.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8l157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7"
2594
+ }, null, -1),
2595
+ createElementVNode("path", {
2596
+ fill: "currentColor",
2597
+ d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7"
2598
+ }, null, -1)
2599
+ ]]);
2600
+ }
2601
+ var check_circle_twotone_default = markRaw({
2602
+ name: "ant-design-check-circle-twotone",
2603
+ render: render$1
2604
+ }), _hoisted_1$2 = {
2605
+ viewBox: "0 0 1024 1024",
2606
+ width: "1.2em",
2607
+ height: "1.2em"
2608
+ };
2609
+ function render(e, t) {
2610
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [...t[0] ||= [
2611
+ createElementVNode("path", {
2612
+ fill: "currentColor",
2613
+ d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372"
2614
+ }, null, -1),
2615
+ createElementVNode("path", {
2616
+ fill: "currentColor",
2617
+ "fill-opacity": ".15",
2618
+ d: "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372s372-166.6 372-372s-166.6-372-372-372m171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2c0 4.5-3.6 8-8 8l-66-.3l-99.3-118.4l-99.3 118.5l-66.1.3c-4.4 0-8-3.6-8-8c0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 0 1-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3l99.3 118.4l99.4-118.5l66-.3c4.4 0 8 3.6 8 8c0 1.9-.6 3.8-1.8 5.2l-130.1 155z"
2619
+ }, null, -1),
2620
+ createElementVNode("path", {
2621
+ fill: "currentColor",
2622
+ d: "M685.8 352c0-4.4-3.6-8-8-8l-66 .3l-99.4 118.5l-99.3-118.4l-66.1-.3c-4.4 0-8 3.5-8 8c0 1.9.7 3.7 1.9 5.2l130.1 155l-130.1 154.9a8.32 8.32 0 0 0-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3l99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8c0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2"
2623
+ }, null, -1)
2624
+ ]]);
2625
+ }
2626
+ var close_circle_twotone_default = markRaw({
2627
+ name: "ant-design-close-circle-twotone",
2628
+ render
2629
+ }), _hoisted_1$1 = { class: "icon" }, rule_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2630
+ __name: "rule",
2631
+ props: {
2632
+ message: {},
2633
+ flag: { type: Boolean },
2634
+ source: {},
2635
+ vertical: { type: Boolean }
2636
+ },
2637
+ setup(e) {
2638
+ let t = e;
2639
+ return (e, n) => (openBlock(), createElementBlock("div", { class: normalizeClass(["rule-item", t.vertical ? "vertical" : ""]) }, [createElementVNode("div", _hoisted_1$1, [t.flag ? (openBlock(), createBlock(unref(check_circle_twotone_default), {
2640
+ key: 0,
2641
+ text: "16px green"
2642
+ })) : (openBlock(), createBlock(unref(close_circle_twotone_default), {
2643
+ key: 1,
2644
+ text: "16px red"
2645
+ }))]), createElementVNode("span", { class: normalizeClass([t.flag ? "line-through text-gray-400" : ""]) }, toDisplayString(t.message), 3)], 2));
2646
+ }
2647
+ }), [["__scopeId", "data-v-09f21a8f"]]), _hoisted_1 = { class: "rules-wrap" }, _hoisted_2 = { class: "basic-rules" }, _hoisted_3 = { class: "advanced-rules" }, PassStrengthValidator_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2648
+ name: "PassStrengthValidator",
2649
+ __name: "index",
2650
+ props: /* @__PURE__ */ mergeModels({ vertical: Boolean }, {
2651
+ modelValue: { default: "" },
2652
+ modelModifiers: {},
2653
+ validate: {},
2654
+ validateModifiers: {}
2655
+ }),
2656
+ emits: ["update:modelValue", "update:validate"],
2657
+ setup(e) {
2658
+ let t = useModel(e, "modelValue"), n = useModel(e, "validate"), r = computed(() => zxcvbn(t.value));
2659
+ function i(e) {
2660
+ return () => t.value === "" ? !1 : Array.isArray(r.value.sequence) ? r.value.sequence.every((t) => t?.pattern !== e) : !1;
2661
+ }
2662
+ let d = [
2663
+ {
2664
+ rule: /^.{8,16}$/,
2665
+ message: "密码长度必须在8到16个字符之间。",
2666
+ flag: !1,
2667
+ source: "basic"
2668
+ },
2669
+ {
2670
+ rule: /[a-z]/,
2671
+ message: "密码必须至少包含一个小写英文字母。",
2672
+ flag: !1,
2673
+ source: "basic"
2674
+ },
2675
+ {
2676
+ rule: /[A-Z]/,
2677
+ message: "密码必须至少包含一个大写英文字母。",
2678
+ flag: !1,
2679
+ source: "basic"
2680
+ },
2681
+ {
2682
+ rule: /\d/,
2683
+ message: "密码必须至少包含一个数字。",
2684
+ flag: !1,
2685
+ source: "basic"
2686
+ },
2687
+ {
2688
+ rule: /[~!@#$%^&*()_+=\-.,]/,
2689
+ message: "密码必须至少包含一个特殊字符(例如:~!@#$%^&*()_+=\\-.,)。",
2690
+ flag: !1,
2691
+ source: "basic"
2692
+ },
2693
+ {
2694
+ rule: i("dictionary"),
2695
+ message: "密码不应包含常用字典中的单词或短语。",
2696
+ flag: !1
2697
+ },
2698
+ {
2699
+ rule: i("spatial"),
2700
+ message: "密码不应基于键盘布局的简单模式(例如:连续的字母或键盘行)。",
2701
+ flag: !1
2702
+ },
2703
+ {
2704
+ rule: i("repeat"),
2705
+ message: "密码不应包含重复使用的字符或序列。",
2706
+ flag: !1
2707
+ },
2708
+ {
2709
+ rule: i("sequence"),
2710
+ message: "密码不应包含顺序排列的数字或字母序列。",
2711
+ flag: !1
2712
+ },
2713
+ {
2714
+ rule: i("date"),
2715
+ message: "密码不应使用常见的日期格式或数字序列。",
2716
+ flag: !1
2717
+ }
2718
+ ];
2719
+ return watchEffect(() => {
2720
+ d.forEach(({ rule: e }, n) => {
2721
+ if (isFunction(e)) {
2722
+ let t = e();
2723
+ d[n].flag = t;
2724
+ } else {
2725
+ let r = e.test(t.value);
2726
+ d[n].flag = r;
2727
+ }
2728
+ }), n.value = d.every(({ flag: e }) => e);
2729
+ }), (t, n) => {
2730
+ let r = Divider;
2731
+ return openBlock(), createElementBlock("div", { class: normalizeClass(["pass-strength-validator", { vertical: e.vertical }]) }, [n[2] ||= createElementVNode("div", { class: "title-wrap" }, " 密码强度校验提示 ", -1), createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [
2732
+ n[0] ||= createElementVNode("div", { class: "rules-title" }, " 标准规则集 ", -1),
2733
+ createElementVNode("div", null, [(openBlock(), createElementBlock(Fragment, null, renderList(d, (t, n) => (openBlock(), createElementBlock(Fragment, { key: n }, [t.source === "basic" ? (openBlock(), createBlock(rule_default, {
2734
+ key: 0,
2735
+ message: t.message,
2736
+ flag: t.flag,
2737
+ vertical: e.vertical
2738
+ }, null, 8, [
2739
+ "message",
2740
+ "flag",
2741
+ "vertical"
2742
+ ])) : createCommentVNode("", !0)], 64))), 64))]),
2743
+ e.vertical ? createCommentVNode("", !0) : (openBlock(), createBlock(r, { key: 0 }))
2744
+ ]), createElementVNode("div", _hoisted_3, [n[1] ||= createElementVNode("div", { class: "rules-title" }, " 高级规则集 ", -1), createElementVNode("div", null, [(openBlock(), createElementBlock(Fragment, null, renderList(d, (t, n) => (openBlock(), createElementBlock(Fragment, { key: n }, [t.source === "basic" ? createCommentVNode("", !0) : (openBlock(), createBlock(rule_default, {
2745
+ key: 0,
2746
+ rule: t.rule,
2747
+ message: t.message,
2748
+ flag: t.flag,
2749
+ vertical: e.vertical
2750
+ }, null, 8, [
2751
+ "rule",
2752
+ "message",
2753
+ "flag",
2754
+ "vertical"
2755
+ ]))], 64))), 64))])])])], 2);
2756
+ };
2757
+ }
2758
+ }), [["__scopeId", "data-v-741c7e91"]]), PubinfoApp_default = /* @__PURE__ */ defineComponent({
2759
+ name: "PubinfoApp",
2760
+ __name: "index",
2761
+ setup(e) {
2762
+ return (e, t) => {
2763
+ let n = resolveComponent("RouterView"), r = resolveComponent("SystemInfoPanel");
2764
+ return openBlock(), createElementBlock(Fragment, null, [createVNode(n), createVNode(r)], 64);
2765
+ };
2766
+ }
2767
+ });
2768
+ export { PubinfoIcon_default as a, PubinfoProvider_default as c, PageHeader_default as d, PageMain_default as i, createPubinfoProvider as l, PassStrengthValidator_default as n, SquareBox_default as o, Modal_default as r, PrismBox_default as s, PubinfoApp_default as t, pubinfoInjectionKey as u };