@bwg-ui/core 1.2.11 → 1.2.13
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.
- package/dist/chunks/{MenuReport-CXsmjSvg.cjs → MenuReport-Bqeps5fC.cjs} +1 -1
- package/dist/chunks/{MenuReport-Dgq2wH6w.js → MenuReport-CozV1tpR.js} +28 -28
- package/dist/chunks/common-components-B-zgrX-L.cjs +1028 -0
- package/dist/chunks/common-components-XA2KG7Pl.js +30179 -0
- package/dist/chunks/{layout-components-yyItu5pi.js → layout-components-MrnKV5g7.js} +548 -478
- package/dist/chunks/layout-components-bb0cWC3I.cjs +35 -0
- package/dist/components/common/BwgGrid.d.ts +1 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts +9 -3
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.d.ts +1 -1
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +122 -122
- package/dist/components/guide/BwgPracticeGuide.d.ts +6 -0
- package/dist/components/guide/BwgPracticeGuide.d.ts.map +1 -0
- package/dist/components/guide/BwgPracticeGuideS00.d.ts +6 -0
- package/dist/components/guide/BwgPracticeGuideS00.d.ts.map +1 -0
- package/dist/components/guide/BwgPracticeGuideS01.d.ts +6 -0
- package/dist/components/guide/BwgPracticeGuideS01.d.ts.map +1 -0
- package/dist/components/guide/CMHldyCfg.d.ts +3 -0
- package/dist/components/guide/CMHldyCfg.d.ts.map +1 -0
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.d.ts +2 -0
- package/dist/components/guide/index.d.ts.map +1 -1
- package/dist/components/guide/index.js +645 -5
- package/dist/components/layout/BwgCoreLogin.d.ts +38 -0
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -0
- package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +13 -11
- package/dist/components/pages/auth/CMAuthMstrM01.d.ts +1 -2
- package/dist/components/pages/auth/CMAuthMstrM01.d.ts.map +1 -1
- package/dist/components/pages/auth/CMRoleMstrM01.d.ts +2 -1
- package/dist/components/pages/auth/CMRoleMstrM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMFileMstrM01.d.ts +2 -1
- package/dist/components/pages/rsrc/CMFileMstrM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMMenuMstrM01.d.ts +2 -1
- package/dist/components/pages/rsrc/CMMenuMstrM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts +2 -1
- package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMPrgrMstrM01.d.ts +2 -1
- package/dist/components/pages/rsrc/CMPrgrMstrM01.d.ts.map +1 -1
- package/dist/components/pages/syst/CMSystCfgM01.d.ts +2 -1
- package/dist/components/pages/syst/CMSystCfgM01.d.ts.map +1 -1
- package/dist/components/pages/syst/CMSystCodeM01.d.ts +2 -1
- package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +1 -1
- package/dist/components/pages/types.d.ts +5 -0
- package/dist/components/pages/types.d.ts.map +1 -0
- package/dist/components/pages/user/CMUserMstrM01.d.ts +2 -1
- package/dist/components/pages/user/CMUserMstrM01.d.ts.map +1 -1
- package/dist/components/popup/SearchHolidayP01.d.ts +4 -0
- package/dist/components/popup/SearchHolidayP01.d.ts.map +1 -0
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.d.ts +1 -0
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +4 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +256 -238
- package/dist/stores/favoriteStore.d.ts +10 -9
- package/dist/stores/favoriteStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.d.ts +4 -0
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +1129 -631
- package/dist/stores/loginStore.d.ts +64 -0
- package/dist/stores/loginStore.d.ts.map +1 -0
- package/dist/stores/menuModelStore.d.ts +1 -1
- package/dist/stores/menuViewStore.d.ts +1 -0
- package/dist/stores/menuViewStore.d.ts.map +1 -1
- package/dist/stores/systemStore.d.ts +32 -0
- package/dist/stores/systemStore.d.ts.map +1 -0
- package/dist/stores/userStore.d.ts +5 -5
- package/dist/stores/userStore.d.ts.map +1 -1
- package/dist/utils/apiUtils.d.ts +27 -60
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/gwUtils.d.ts +3 -2
- package/dist/utils/gwUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +3 -7
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1169 -1196
- package/dist/utils/serviceConfig.d.ts +1 -0
- package/dist/utils/serviceConfig.d.ts.map +1 -1
- package/dist/utils/userUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/common-components-Bp95qOup.js +0 -16236
- package/dist/chunks/common-components-CoRIM-Z-.cjs +0 -183
- package/dist/chunks/layout-components-hCEUMfz3.cjs +0 -35
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { message as B, notification as U } from "antd";
|
|
2
|
+
import { useUserStore as k, useSystemCode as Xt, useMenuViewStore as Qt, useLoadingStore as nt, usePopupLoadingStore as ot } from "../stores/index.js";
|
|
3
|
+
import at from "axios";
|
|
4
|
+
import { g as te, c as rt, a as L } from "../chunks/common-components-XA2KG7Pl.js";
|
|
5
|
+
import M from "dayjs";
|
|
6
|
+
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7
|
+
__proto__: null,
|
|
8
|
+
get ApiError() {
|
|
9
|
+
return O;
|
|
10
|
+
},
|
|
11
|
+
get apiGet() {
|
|
12
|
+
return Sn;
|
|
13
|
+
},
|
|
14
|
+
get callService() {
|
|
15
|
+
return P;
|
|
16
|
+
},
|
|
17
|
+
get callServiceBySysCd() {
|
|
18
|
+
return xn;
|
|
19
|
+
},
|
|
20
|
+
get getClientIp() {
|
|
21
|
+
return Wt;
|
|
22
|
+
},
|
|
23
|
+
get getPermissionService() {
|
|
24
|
+
return Cn;
|
|
25
|
+
},
|
|
26
|
+
get setClientIp() {
|
|
27
|
+
return Vt;
|
|
28
|
+
},
|
|
29
|
+
get verifyClientIp() {
|
|
30
|
+
return wn;
|
|
31
|
+
}
|
|
32
|
+
}, Symbol.toStringTag, { value: "Module" })), yt = {
|
|
7
33
|
// 권한 관련
|
|
8
34
|
AUTH_BTNS: "SCMSIGN00202",
|
|
9
35
|
// 버튼 권한 조회
|
|
@@ -15,126 +41,128 @@ const xe = {
|
|
|
15
41
|
SRCH_POPU: "SCMPOPU00101",
|
|
16
42
|
// 팝업 조회
|
|
17
43
|
// 즐겨찾기 관련
|
|
18
|
-
AUTH_BMRK: "SCMBMRK00101"
|
|
44
|
+
AUTH_BMRK: "SCMBMRK00101",
|
|
19
45
|
// 즐겨찾기 관리
|
|
46
|
+
SYST_CODE: "SCMSYST00101"
|
|
47
|
+
// 시스템 코드 조회
|
|
20
48
|
};
|
|
21
49
|
let F = {};
|
|
22
|
-
function
|
|
23
|
-
F =
|
|
50
|
+
function ee(t) {
|
|
51
|
+
F = t, console.log("🔧 Provider 서비스코드 오버라이드 설정:", t);
|
|
24
52
|
}
|
|
25
|
-
function
|
|
26
|
-
return F[
|
|
53
|
+
function vt(t) {
|
|
54
|
+
return F[t] && F[t].trim() !== "" ? F[t] : yt[t];
|
|
27
55
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
for (const
|
|
31
|
-
e
|
|
32
|
-
return
|
|
56
|
+
function wt() {
|
|
57
|
+
const t = {};
|
|
58
|
+
for (const e of Object.keys(yt))
|
|
59
|
+
t[e] = vt(e);
|
|
60
|
+
return t;
|
|
33
61
|
}
|
|
34
|
-
function
|
|
62
|
+
function re() {
|
|
35
63
|
console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
|
|
36
|
-
const
|
|
37
|
-
for (const [
|
|
38
|
-
const
|
|
39
|
-
console.log(` ${
|
|
64
|
+
const t = wt();
|
|
65
|
+
for (const [e, r] of Object.entries(t)) {
|
|
66
|
+
const n = F[e] ? "Provider 설정" : "기본값";
|
|
67
|
+
console.log(` ${e}: ${r} (${n})`);
|
|
40
68
|
}
|
|
41
69
|
}
|
|
42
|
-
const
|
|
70
|
+
const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
43
71
|
__proto__: null,
|
|
44
|
-
getAllServiceCodes:
|
|
45
|
-
getServiceCode:
|
|
46
|
-
logServiceCodeConfig:
|
|
47
|
-
setServiceCodeOverrides:
|
|
48
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
49
|
-
const
|
|
50
|
-
return k.getState().hrInfo?.empNo ||
|
|
51
|
-
},
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
},
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
},
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
},
|
|
67
|
-
const
|
|
68
|
-
return
|
|
69
|
-
},
|
|
72
|
+
getAllServiceCodes: wt,
|
|
73
|
+
getServiceCode: vt,
|
|
74
|
+
logServiceCodeConfig: re,
|
|
75
|
+
setServiceCodeOverrides: ee
|
|
76
|
+
}, Symbol.toStringTag, { value: "Module" })), V = () => k.getState().user?.crprCd || null, xt = () => {
|
|
77
|
+
const t = k.getState().user;
|
|
78
|
+
return k.getState().hrInfo?.empNo || t?.userId || null;
|
|
79
|
+
}, Ct = () => k.getState().user?.userNm || null, ne = () => k.getState().user?.userDvsn || null, oe = () => k.getState().user?.emplNo || null, bt = () => {
|
|
80
|
+
const t = k.getState().hrInfo, e = k.getState().user;
|
|
81
|
+
return t?.deptCd || e?.dprtCd || null;
|
|
82
|
+
}, $t = () => k.getState().user?.dprtNm || null, Q = () => k.getState().user?.roleList || null, se = (t) => {
|
|
83
|
+
const e = Q();
|
|
84
|
+
return e ? e.includes(t) : !1;
|
|
85
|
+
}, ae = (t) => {
|
|
86
|
+
const e = Q();
|
|
87
|
+
return e ? t.some((r) => e.includes(r)) : !1;
|
|
88
|
+
}, ie = (t) => {
|
|
89
|
+
const e = Q();
|
|
90
|
+
return e ? t.every((r) => e.includes(r)) : !1;
|
|
91
|
+
}, ce = () => k.getState().isLoggedIn(), z = () => k.getState().user, ue = () => z() !== null, le = () => {
|
|
92
|
+
const t = Ct(), e = xt();
|
|
93
|
+
return t || e || null;
|
|
94
|
+
}, de = () => {
|
|
95
|
+
const t = $t(), e = bt();
|
|
96
|
+
return t || (e ? String(e) : null);
|
|
97
|
+
}, R = () => k.getState().hrInfo, fe = () => R()?.jbpsCd || null, he = () => R()?.jbgdCd || null, me = () => R()?.jbdtCd || null, pe = () => R()?.jbkdCd || null, ge = () => R()?.wkplCd || null, _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
70
98
|
__proto__: null,
|
|
71
|
-
getCrprCd:
|
|
72
|
-
getDepartmentInfo:
|
|
73
|
-
getDisplayName:
|
|
74
|
-
getDprtCd:
|
|
75
|
-
getDprtNm:
|
|
76
|
-
getEmplNo:
|
|
77
|
-
getHrInfo:
|
|
78
|
-
getJbdtCd:
|
|
79
|
-
getJbgdCd:
|
|
80
|
-
getJbkdCd:
|
|
81
|
-
getJbpsCd:
|
|
82
|
-
getRoleList:
|
|
83
|
-
getUserDvsn:
|
|
84
|
-
getUserId:
|
|
85
|
-
getUserInfo:
|
|
86
|
-
getUserNm:
|
|
87
|
-
getWkplCd:
|
|
88
|
-
hasAllRoles:
|
|
89
|
-
hasAnyRole:
|
|
90
|
-
hasRole:
|
|
91
|
-
hasUserInfo:
|
|
92
|
-
isLoggedIn:
|
|
99
|
+
getCrprCd: V,
|
|
100
|
+
getDepartmentInfo: de,
|
|
101
|
+
getDisplayName: le,
|
|
102
|
+
getDprtCd: bt,
|
|
103
|
+
getDprtNm: $t,
|
|
104
|
+
getEmplNo: oe,
|
|
105
|
+
getHrInfo: R,
|
|
106
|
+
getJbdtCd: me,
|
|
107
|
+
getJbgdCd: he,
|
|
108
|
+
getJbkdCd: pe,
|
|
109
|
+
getJbpsCd: fe,
|
|
110
|
+
getRoleList: Q,
|
|
111
|
+
getUserDvsn: ne,
|
|
112
|
+
getUserId: xt,
|
|
113
|
+
getUserInfo: z,
|
|
114
|
+
getUserNm: Ct,
|
|
115
|
+
getWkplCd: ge,
|
|
116
|
+
hasAllRoles: ie,
|
|
117
|
+
hasAnyRole: ae,
|
|
118
|
+
hasRole: se,
|
|
119
|
+
hasUserInfo: ue,
|
|
120
|
+
isLoggedIn: ce
|
|
93
121
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
94
|
-
var
|
|
95
|
-
function
|
|
96
|
-
throw new Error('Could not dynamically require "' +
|
|
122
|
+
var W = { exports: {} };
|
|
123
|
+
function ye(t) {
|
|
124
|
+
throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
97
125
|
}
|
|
98
|
-
var
|
|
99
|
-
const
|
|
126
|
+
var q = { exports: {} };
|
|
127
|
+
const ve = {}, we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
100
128
|
__proto__: null,
|
|
101
|
-
default:
|
|
102
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
103
|
-
var
|
|
104
|
-
function
|
|
105
|
-
return
|
|
106
|
-
(function(r,
|
|
107
|
-
|
|
108
|
-
})(
|
|
109
|
-
var r = r || (function(
|
|
110
|
-
var
|
|
111
|
-
if (typeof window < "u" && window.crypto && (
|
|
129
|
+
default: ve
|
|
130
|
+
}, Symbol.toStringTag, { value: "Module" })), Se = /* @__PURE__ */ te(we);
|
|
131
|
+
var xe = q.exports, lt;
|
|
132
|
+
function Mt() {
|
|
133
|
+
return lt || (lt = 1, (function(t, e) {
|
|
134
|
+
(function(r, n) {
|
|
135
|
+
t.exports = n();
|
|
136
|
+
})(xe, function() {
|
|
137
|
+
var r = r || (function(n, u) {
|
|
138
|
+
var l;
|
|
139
|
+
if (typeof window < "u" && window.crypto && (l = window.crypto), typeof self < "u" && self.crypto && (l = self.crypto), typeof globalThis < "u" && globalThis.crypto && (l = globalThis.crypto), !l && typeof window < "u" && window.msCrypto && (l = window.msCrypto), !l && typeof rt < "u" && rt.crypto && (l = rt.crypto), !l && typeof ye == "function")
|
|
112
140
|
try {
|
|
113
|
-
|
|
141
|
+
l = Se;
|
|
114
142
|
} catch {
|
|
115
143
|
}
|
|
116
|
-
var
|
|
117
|
-
if (
|
|
118
|
-
if (typeof
|
|
144
|
+
var g = function() {
|
|
145
|
+
if (l) {
|
|
146
|
+
if (typeof l.getRandomValues == "function")
|
|
119
147
|
try {
|
|
120
|
-
return
|
|
148
|
+
return l.getRandomValues(new Uint32Array(1))[0];
|
|
121
149
|
} catch {
|
|
122
150
|
}
|
|
123
|
-
if (typeof
|
|
151
|
+
if (typeof l.randomBytes == "function")
|
|
124
152
|
try {
|
|
125
|
-
return
|
|
153
|
+
return l.randomBytes(4).readInt32LE();
|
|
126
154
|
} catch {
|
|
127
155
|
}
|
|
128
156
|
}
|
|
129
157
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
130
|
-
},
|
|
131
|
-
function
|
|
158
|
+
}, b = Object.create || /* @__PURE__ */ (function() {
|
|
159
|
+
function o() {
|
|
132
160
|
}
|
|
133
|
-
return function(
|
|
134
|
-
var
|
|
135
|
-
return
|
|
161
|
+
return function(a) {
|
|
162
|
+
var i;
|
|
163
|
+
return o.prototype = a, i = new o(), o.prototype = null, i;
|
|
136
164
|
};
|
|
137
|
-
})(), p = {},
|
|
165
|
+
})(), p = {}, y = p.lib = {}, w = y.Base = /* @__PURE__ */ (function() {
|
|
138
166
|
return {
|
|
139
167
|
/**
|
|
140
168
|
* Creates a new object that inherits from this object.
|
|
@@ -154,11 +182,11 @@ function Oe() {
|
|
|
154
182
|
* }
|
|
155
183
|
* });
|
|
156
184
|
*/
|
|
157
|
-
extend: function(
|
|
158
|
-
var
|
|
159
|
-
return
|
|
160
|
-
|
|
161
|
-
}),
|
|
185
|
+
extend: function(o) {
|
|
186
|
+
var a = b(this);
|
|
187
|
+
return o && a.mixIn(o), (!a.hasOwnProperty("init") || this.init === a.init) && (a.init = function() {
|
|
188
|
+
a.$super.init.apply(this, arguments);
|
|
189
|
+
}), a.init.prototype = a, a.$super = this, a;
|
|
162
190
|
},
|
|
163
191
|
/**
|
|
164
192
|
* Extends this object and runs the init method.
|
|
@@ -173,8 +201,8 @@ function Oe() {
|
|
|
173
201
|
* var instance = MyType.create();
|
|
174
202
|
*/
|
|
175
203
|
create: function() {
|
|
176
|
-
var
|
|
177
|
-
return
|
|
204
|
+
var o = this.extend();
|
|
205
|
+
return o.init.apply(o, arguments), o;
|
|
178
206
|
},
|
|
179
207
|
/**
|
|
180
208
|
* Initializes a newly created object.
|
|
@@ -201,10 +229,10 @@ function Oe() {
|
|
|
201
229
|
* field: 'value'
|
|
202
230
|
* });
|
|
203
231
|
*/
|
|
204
|
-
mixIn: function(
|
|
205
|
-
for (var
|
|
206
|
-
|
|
207
|
-
|
|
232
|
+
mixIn: function(o) {
|
|
233
|
+
for (var a in o)
|
|
234
|
+
o.hasOwnProperty(a) && (this[a] = o[a]);
|
|
235
|
+
o.hasOwnProperty("toString") && (this.toString = o.toString);
|
|
208
236
|
},
|
|
209
237
|
/**
|
|
210
238
|
* Creates a copy of this object.
|
|
@@ -219,7 +247,7 @@ function Oe() {
|
|
|
219
247
|
return this.init.prototype.extend(this);
|
|
220
248
|
}
|
|
221
249
|
};
|
|
222
|
-
})(),
|
|
250
|
+
})(), v = y.WordArray = w.extend({
|
|
223
251
|
/**
|
|
224
252
|
* Initializes a newly created word array.
|
|
225
253
|
*
|
|
@@ -232,8 +260,8 @@ function Oe() {
|
|
|
232
260
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
|
|
233
261
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
234
262
|
*/
|
|
235
|
-
init: function(
|
|
236
|
-
|
|
263
|
+
init: function(o, a) {
|
|
264
|
+
o = this.words = o || [], a != u ? this.sigBytes = a : this.sigBytes = o.length * 4;
|
|
237
265
|
},
|
|
238
266
|
/**
|
|
239
267
|
* Converts this word array to a string.
|
|
@@ -248,8 +276,8 @@ function Oe() {
|
|
|
248
276
|
* var string = wordArray.toString();
|
|
249
277
|
* var string = wordArray.toString(CryptoJS.enc.Utf8);
|
|
250
278
|
*/
|
|
251
|
-
toString: function(
|
|
252
|
-
return (
|
|
279
|
+
toString: function(o) {
|
|
280
|
+
return (o || f).stringify(this);
|
|
253
281
|
},
|
|
254
282
|
/**
|
|
255
283
|
* Concatenates a word array to this word array.
|
|
@@ -262,17 +290,17 @@ function Oe() {
|
|
|
262
290
|
*
|
|
263
291
|
* wordArray1.concat(wordArray2);
|
|
264
292
|
*/
|
|
265
|
-
concat: function(
|
|
266
|
-
var
|
|
267
|
-
if (this.clamp(),
|
|
268
|
-
for (var C = 0; C <
|
|
269
|
-
var
|
|
270
|
-
|
|
293
|
+
concat: function(o) {
|
|
294
|
+
var a = this.words, i = o.words, d = this.sigBytes, x = o.sigBytes;
|
|
295
|
+
if (this.clamp(), d % 4)
|
|
296
|
+
for (var C = 0; C < x; C++) {
|
|
297
|
+
var $ = i[C >>> 2] >>> 24 - C % 4 * 8 & 255;
|
|
298
|
+
a[d + C >>> 2] |= $ << 24 - (d + C) % 4 * 8;
|
|
271
299
|
}
|
|
272
300
|
else
|
|
273
|
-
for (var _ = 0; _ <
|
|
274
|
-
|
|
275
|
-
return this.sigBytes +=
|
|
301
|
+
for (var _ = 0; _ < x; _ += 4)
|
|
302
|
+
a[d + _ >>> 2] = i[_ >>> 2];
|
|
303
|
+
return this.sigBytes += x, this;
|
|
276
304
|
},
|
|
277
305
|
/**
|
|
278
306
|
* Removes insignificant bits.
|
|
@@ -282,8 +310,8 @@ function Oe() {
|
|
|
282
310
|
* wordArray.clamp();
|
|
283
311
|
*/
|
|
284
312
|
clamp: function() {
|
|
285
|
-
var
|
|
286
|
-
|
|
313
|
+
var o = this.words, a = this.sigBytes;
|
|
314
|
+
o[a >>> 2] &= 4294967295 << 32 - a % 4 * 8, o.length = n.ceil(a / 4);
|
|
287
315
|
},
|
|
288
316
|
/**
|
|
289
317
|
* Creates a copy of this word array.
|
|
@@ -295,8 +323,8 @@ function Oe() {
|
|
|
295
323
|
* var clone = wordArray.clone();
|
|
296
324
|
*/
|
|
297
325
|
clone: function() {
|
|
298
|
-
var
|
|
299
|
-
return
|
|
326
|
+
var o = w.clone.call(this);
|
|
327
|
+
return o.words = this.words.slice(0), o;
|
|
300
328
|
},
|
|
301
329
|
/**
|
|
302
330
|
* Creates a word array filled with random bytes.
|
|
@@ -311,12 +339,12 @@ function Oe() {
|
|
|
311
339
|
*
|
|
312
340
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
313
341
|
*/
|
|
314
|
-
random: function(
|
|
315
|
-
for (var
|
|
316
|
-
|
|
317
|
-
return new
|
|
342
|
+
random: function(o) {
|
|
343
|
+
for (var a = [], i = 0; i < o; i += 4)
|
|
344
|
+
a.push(g());
|
|
345
|
+
return new v.init(a, o);
|
|
318
346
|
}
|
|
319
|
-
}),
|
|
347
|
+
}), h = p.enc = {}, f = h.Hex = {
|
|
320
348
|
/**
|
|
321
349
|
* Converts a word array to a hex string.
|
|
322
350
|
*
|
|
@@ -330,12 +358,12 @@ function Oe() {
|
|
|
330
358
|
*
|
|
331
359
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
332
360
|
*/
|
|
333
|
-
stringify: function(
|
|
334
|
-
for (var
|
|
335
|
-
var C =
|
|
336
|
-
|
|
361
|
+
stringify: function(o) {
|
|
362
|
+
for (var a = o.words, i = o.sigBytes, d = [], x = 0; x < i; x++) {
|
|
363
|
+
var C = a[x >>> 2] >>> 24 - x % 4 * 8 & 255;
|
|
364
|
+
d.push((C >>> 4).toString(16)), d.push((C & 15).toString(16));
|
|
337
365
|
}
|
|
338
|
-
return
|
|
366
|
+
return d.join("");
|
|
339
367
|
},
|
|
340
368
|
/**
|
|
341
369
|
* Converts a hex string to a word array.
|
|
@@ -350,12 +378,12 @@ function Oe() {
|
|
|
350
378
|
*
|
|
351
379
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
352
380
|
*/
|
|
353
|
-
parse: function(
|
|
354
|
-
for (var
|
|
355
|
-
|
|
356
|
-
return new
|
|
381
|
+
parse: function(o) {
|
|
382
|
+
for (var a = o.length, i = [], d = 0; d < a; d += 2)
|
|
383
|
+
i[d >>> 3] |= parseInt(o.substr(d, 2), 16) << 24 - d % 8 * 4;
|
|
384
|
+
return new v.init(i, a / 2);
|
|
357
385
|
}
|
|
358
|
-
},
|
|
386
|
+
}, m = h.Latin1 = {
|
|
359
387
|
/**
|
|
360
388
|
* Converts a word array to a Latin1 string.
|
|
361
389
|
*
|
|
@@ -369,12 +397,12 @@ function Oe() {
|
|
|
369
397
|
*
|
|
370
398
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
371
399
|
*/
|
|
372
|
-
stringify: function(
|
|
373
|
-
for (var
|
|
374
|
-
var C =
|
|
375
|
-
|
|
400
|
+
stringify: function(o) {
|
|
401
|
+
for (var a = o.words, i = o.sigBytes, d = [], x = 0; x < i; x++) {
|
|
402
|
+
var C = a[x >>> 2] >>> 24 - x % 4 * 8 & 255;
|
|
403
|
+
d.push(String.fromCharCode(C));
|
|
376
404
|
}
|
|
377
|
-
return
|
|
405
|
+
return d.join("");
|
|
378
406
|
},
|
|
379
407
|
/**
|
|
380
408
|
* Converts a Latin1 string to a word array.
|
|
@@ -389,12 +417,12 @@ function Oe() {
|
|
|
389
417
|
*
|
|
390
418
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
391
419
|
*/
|
|
392
|
-
parse: function(
|
|
393
|
-
for (var
|
|
394
|
-
|
|
395
|
-
return new
|
|
420
|
+
parse: function(o) {
|
|
421
|
+
for (var a = o.length, i = [], d = 0; d < a; d++)
|
|
422
|
+
i[d >>> 2] |= (o.charCodeAt(d) & 255) << 24 - d % 4 * 8;
|
|
423
|
+
return new v.init(i, a);
|
|
396
424
|
}
|
|
397
|
-
},
|
|
425
|
+
}, s = h.Utf8 = {
|
|
398
426
|
/**
|
|
399
427
|
* Converts a word array to a UTF-8 string.
|
|
400
428
|
*
|
|
@@ -408,9 +436,9 @@ function Oe() {
|
|
|
408
436
|
*
|
|
409
437
|
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
|
|
410
438
|
*/
|
|
411
|
-
stringify: function(
|
|
439
|
+
stringify: function(o) {
|
|
412
440
|
try {
|
|
413
|
-
return decodeURIComponent(escape(
|
|
441
|
+
return decodeURIComponent(escape(m.stringify(o)));
|
|
414
442
|
} catch {
|
|
415
443
|
throw new Error("Malformed UTF-8 data");
|
|
416
444
|
}
|
|
@@ -428,10 +456,10 @@ function Oe() {
|
|
|
428
456
|
*
|
|
429
457
|
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
|
|
430
458
|
*/
|
|
431
|
-
parse: function(
|
|
432
|
-
return
|
|
459
|
+
parse: function(o) {
|
|
460
|
+
return m.parse(unescape(encodeURIComponent(o)));
|
|
433
461
|
}
|
|
434
|
-
},
|
|
462
|
+
}, c = y.BufferedBlockAlgorithm = w.extend({
|
|
435
463
|
/**
|
|
436
464
|
* Resets this block algorithm's data buffer to its initial state.
|
|
437
465
|
*
|
|
@@ -440,7 +468,7 @@ function Oe() {
|
|
|
440
468
|
* bufferedBlockAlgorithm.reset();
|
|
441
469
|
*/
|
|
442
470
|
reset: function() {
|
|
443
|
-
this._data = new
|
|
471
|
+
this._data = new v.init(), this._nDataBytes = 0;
|
|
444
472
|
},
|
|
445
473
|
/**
|
|
446
474
|
* Adds new data to this block algorithm's buffer.
|
|
@@ -452,8 +480,8 @@ function Oe() {
|
|
|
452
480
|
* bufferedBlockAlgorithm._append('data');
|
|
453
481
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
454
482
|
*/
|
|
455
|
-
_append: function(
|
|
456
|
-
typeof
|
|
483
|
+
_append: function(o) {
|
|
484
|
+
typeof o == "string" && (o = s.parse(o)), this._data.concat(o), this._nDataBytes += o.sigBytes;
|
|
457
485
|
},
|
|
458
486
|
/**
|
|
459
487
|
* Processes available data blocks.
|
|
@@ -469,16 +497,16 @@ function Oe() {
|
|
|
469
497
|
* var processedData = bufferedBlockAlgorithm._process();
|
|
470
498
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
471
499
|
*/
|
|
472
|
-
_process: function(
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
var
|
|
476
|
-
if (
|
|
477
|
-
for (var
|
|
478
|
-
this._doProcessBlock(
|
|
479
|
-
|
|
500
|
+
_process: function(o) {
|
|
501
|
+
var a, i = this._data, d = i.words, x = i.sigBytes, C = this.blockSize, $ = C * 4, _ = x / $;
|
|
502
|
+
o ? _ = n.ceil(_) : _ = n.max((_ | 0) - this._minBufferSize, 0);
|
|
503
|
+
var T = _ * C, D = n.min(T * 4, x);
|
|
504
|
+
if (T) {
|
|
505
|
+
for (var H = 0; H < T; H += C)
|
|
506
|
+
this._doProcessBlock(d, H);
|
|
507
|
+
a = d.splice(0, T), i.sigBytes -= D;
|
|
480
508
|
}
|
|
481
|
-
return new
|
|
509
|
+
return new v.init(a, D);
|
|
482
510
|
},
|
|
483
511
|
/**
|
|
484
512
|
* Creates a copy of this object.
|
|
@@ -490,16 +518,16 @@ function Oe() {
|
|
|
490
518
|
* var clone = bufferedBlockAlgorithm.clone();
|
|
491
519
|
*/
|
|
492
520
|
clone: function() {
|
|
493
|
-
var
|
|
494
|
-
return
|
|
521
|
+
var o = w.clone.call(this);
|
|
522
|
+
return o._data = this._data.clone(), o;
|
|
495
523
|
},
|
|
496
524
|
_minBufferSize: 0
|
|
497
525
|
});
|
|
498
|
-
|
|
526
|
+
y.Hasher = c.extend({
|
|
499
527
|
/**
|
|
500
528
|
* Configuration options.
|
|
501
529
|
*/
|
|
502
|
-
cfg:
|
|
530
|
+
cfg: w.extend(),
|
|
503
531
|
/**
|
|
504
532
|
* Initializes a newly created hasher.
|
|
505
533
|
*
|
|
@@ -509,8 +537,8 @@ function Oe() {
|
|
|
509
537
|
*
|
|
510
538
|
* var hasher = CryptoJS.algo.SHA256.create();
|
|
511
539
|
*/
|
|
512
|
-
init: function(
|
|
513
|
-
this.cfg = this.cfg.extend(
|
|
540
|
+
init: function(o) {
|
|
541
|
+
this.cfg = this.cfg.extend(o), this.reset();
|
|
514
542
|
},
|
|
515
543
|
/**
|
|
516
544
|
* Resets this hasher to its initial state.
|
|
@@ -520,7 +548,7 @@ function Oe() {
|
|
|
520
548
|
* hasher.reset();
|
|
521
549
|
*/
|
|
522
550
|
reset: function() {
|
|
523
|
-
|
|
551
|
+
c.reset.call(this), this._doReset();
|
|
524
552
|
},
|
|
525
553
|
/**
|
|
526
554
|
* Updates this hasher with a message.
|
|
@@ -534,8 +562,8 @@ function Oe() {
|
|
|
534
562
|
* hasher.update('message');
|
|
535
563
|
* hasher.update(wordArray);
|
|
536
564
|
*/
|
|
537
|
-
update: function(
|
|
538
|
-
return this._append(
|
|
565
|
+
update: function(o) {
|
|
566
|
+
return this._append(o), this._process(), this;
|
|
539
567
|
},
|
|
540
568
|
/**
|
|
541
569
|
* Finalizes the hash computation.
|
|
@@ -551,10 +579,10 @@ function Oe() {
|
|
|
551
579
|
* var hash = hasher.finalize('message');
|
|
552
580
|
* var hash = hasher.finalize(wordArray);
|
|
553
581
|
*/
|
|
554
|
-
finalize: function(
|
|
555
|
-
|
|
556
|
-
var
|
|
557
|
-
return
|
|
582
|
+
finalize: function(o) {
|
|
583
|
+
o && this._append(o);
|
|
584
|
+
var a = this._doFinalize();
|
|
585
|
+
return a;
|
|
558
586
|
},
|
|
559
587
|
blockSize: 16,
|
|
560
588
|
/**
|
|
@@ -570,9 +598,9 @@ function Oe() {
|
|
|
570
598
|
*
|
|
571
599
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
572
600
|
*/
|
|
573
|
-
_createHelper: function(
|
|
574
|
-
return function(
|
|
575
|
-
return new
|
|
601
|
+
_createHelper: function(o) {
|
|
602
|
+
return function(a, i) {
|
|
603
|
+
return new o.init(i).finalize(a);
|
|
576
604
|
};
|
|
577
605
|
},
|
|
578
606
|
/**
|
|
@@ -588,82 +616,82 @@ function Oe() {
|
|
|
588
616
|
*
|
|
589
617
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
590
618
|
*/
|
|
591
|
-
_createHmacHelper: function(
|
|
592
|
-
return function(
|
|
593
|
-
return new
|
|
619
|
+
_createHmacHelper: function(o) {
|
|
620
|
+
return function(a, i) {
|
|
621
|
+
return new S.HMAC.init(o, i).finalize(a);
|
|
594
622
|
};
|
|
595
623
|
}
|
|
596
624
|
});
|
|
597
|
-
var
|
|
625
|
+
var S = p.algo = {};
|
|
598
626
|
return p;
|
|
599
627
|
})(Math);
|
|
600
628
|
return r;
|
|
601
629
|
});
|
|
602
|
-
})(
|
|
630
|
+
})(q)), q.exports;
|
|
603
631
|
}
|
|
604
|
-
var
|
|
605
|
-
function
|
|
606
|
-
return
|
|
607
|
-
(function(r,
|
|
608
|
-
|
|
609
|
-
})(
|
|
610
|
-
return (function(
|
|
611
|
-
var
|
|
632
|
+
var Ce = W.exports, dt;
|
|
633
|
+
function be() {
|
|
634
|
+
return dt || (dt = 1, (function(t, e) {
|
|
635
|
+
(function(r, n) {
|
|
636
|
+
t.exports = n(/* @__PURE__ */ Mt());
|
|
637
|
+
})(Ce, function(r) {
|
|
638
|
+
return (function(n) {
|
|
639
|
+
var u = r, l = u.lib, g = l.WordArray, b = l.Hasher, p = u.algo, y = [], w = [];
|
|
612
640
|
(function() {
|
|
613
|
-
function
|
|
614
|
-
for (var
|
|
615
|
-
if (!(
|
|
641
|
+
function f(S) {
|
|
642
|
+
for (var o = n.sqrt(S), a = 2; a <= o; a++)
|
|
643
|
+
if (!(S % a))
|
|
616
644
|
return !1;
|
|
617
645
|
return !0;
|
|
618
646
|
}
|
|
619
|
-
function
|
|
620
|
-
return (
|
|
647
|
+
function m(S) {
|
|
648
|
+
return (S - (S | 0)) * 4294967296 | 0;
|
|
621
649
|
}
|
|
622
|
-
for (var
|
|
623
|
-
|
|
650
|
+
for (var s = 2, c = 0; c < 64; )
|
|
651
|
+
f(s) && (c < 8 && (y[c] = m(n.pow(s, 1 / 2))), w[c] = m(n.pow(s, 1 / 3)), c++), s++;
|
|
624
652
|
})();
|
|
625
|
-
var
|
|
653
|
+
var v = [], h = p.SHA256 = b.extend({
|
|
626
654
|
_doReset: function() {
|
|
627
|
-
this._hash = new
|
|
655
|
+
this._hash = new g.init(y.slice(0));
|
|
628
656
|
},
|
|
629
|
-
_doProcessBlock: function(
|
|
630
|
-
for (var
|
|
631
|
-
if (
|
|
632
|
-
|
|
657
|
+
_doProcessBlock: function(f, m) {
|
|
658
|
+
for (var s = this._hash.words, c = s[0], S = s[1], o = s[2], a = s[3], i = s[4], d = s[5], x = s[6], C = s[7], $ = 0; $ < 64; $++) {
|
|
659
|
+
if ($ < 16)
|
|
660
|
+
v[$] = f[m + $] | 0;
|
|
633
661
|
else {
|
|
634
|
-
var _ =
|
|
635
|
-
|
|
662
|
+
var _ = v[$ - 15], T = (_ << 25 | _ >>> 7) ^ (_ << 14 | _ >>> 18) ^ _ >>> 3, D = v[$ - 2], H = (D << 15 | D >>> 17) ^ (D << 13 | D >>> 19) ^ D >>> 10;
|
|
663
|
+
v[$] = T + v[$ - 7] + H + v[$ - 16];
|
|
636
664
|
}
|
|
637
|
-
var
|
|
638
|
-
C =
|
|
665
|
+
var qt = i & d ^ ~i & x, Kt = c & S ^ c & o ^ S & o, Gt = (c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22), Jt = (i << 26 | i >>> 6) ^ (i << 21 | i >>> 11) ^ (i << 7 | i >>> 25), ut = C + Jt + qt + w[$] + v[$], Zt = Gt + Kt;
|
|
666
|
+
C = x, x = d, d = i, i = a + ut | 0, a = o, o = S, S = c, c = ut + Zt | 0;
|
|
639
667
|
}
|
|
640
|
-
|
|
668
|
+
s[0] = s[0] + c | 0, s[1] = s[1] + S | 0, s[2] = s[2] + o | 0, s[3] = s[3] + a | 0, s[4] = s[4] + i | 0, s[5] = s[5] + d | 0, s[6] = s[6] + x | 0, s[7] = s[7] + C | 0;
|
|
641
669
|
},
|
|
642
670
|
_doFinalize: function() {
|
|
643
|
-
var
|
|
644
|
-
return
|
|
671
|
+
var f = this._data, m = f.words, s = this._nDataBytes * 8, c = f.sigBytes * 8;
|
|
672
|
+
return m[c >>> 5] |= 128 << 24 - c % 32, m[(c + 64 >>> 9 << 4) + 14] = n.floor(s / 4294967296), m[(c + 64 >>> 9 << 4) + 15] = s, f.sigBytes = m.length * 4, this._process(), this._hash;
|
|
645
673
|
},
|
|
646
674
|
clone: function() {
|
|
647
|
-
var
|
|
648
|
-
return
|
|
675
|
+
var f = b.clone.call(this);
|
|
676
|
+
return f._hash = this._hash.clone(), f;
|
|
649
677
|
}
|
|
650
678
|
});
|
|
651
|
-
|
|
679
|
+
u.SHA256 = b._createHelper(h), u.HmacSHA256 = b._createHmacHelper(h);
|
|
652
680
|
})(Math), r.SHA256;
|
|
653
681
|
});
|
|
654
|
-
})(
|
|
682
|
+
})(W)), W.exports;
|
|
655
683
|
}
|
|
656
|
-
var
|
|
657
|
-
const
|
|
658
|
-
var
|
|
659
|
-
function
|
|
660
|
-
return
|
|
661
|
-
(function(r,
|
|
662
|
-
|
|
663
|
-
})(
|
|
684
|
+
var $e = /* @__PURE__ */ be();
|
|
685
|
+
const _e = /* @__PURE__ */ L($e);
|
|
686
|
+
var K = { exports: {} }, Me = K.exports, ft;
|
|
687
|
+
function Te() {
|
|
688
|
+
return ft || (ft = 1, (function(t, e) {
|
|
689
|
+
(function(r, n) {
|
|
690
|
+
t.exports = n(/* @__PURE__ */ Mt());
|
|
691
|
+
})(Me, function(r) {
|
|
664
692
|
return (function() {
|
|
665
|
-
var
|
|
666
|
-
|
|
693
|
+
var n = r, u = n.lib, l = u.WordArray, g = n.enc;
|
|
694
|
+
g.Base64 = {
|
|
667
695
|
/**
|
|
668
696
|
* Converts a word array to a Base64 string.
|
|
669
697
|
*
|
|
@@ -678,16 +706,16 @@ function $t() {
|
|
|
678
706
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
679
707
|
*/
|
|
680
708
|
stringify: function(p) {
|
|
681
|
-
var
|
|
709
|
+
var y = p.words, w = p.sigBytes, v = this._map;
|
|
682
710
|
p.clamp();
|
|
683
|
-
for (var
|
|
684
|
-
for (var
|
|
685
|
-
|
|
686
|
-
var
|
|
687
|
-
if (
|
|
688
|
-
for (;
|
|
689
|
-
|
|
690
|
-
return
|
|
711
|
+
for (var h = [], f = 0; f < w; f += 3)
|
|
712
|
+
for (var m = y[f >>> 2] >>> 24 - f % 4 * 8 & 255, s = y[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, c = y[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, S = m << 16 | s << 8 | c, o = 0; o < 4 && f + o * 0.75 < w; o++)
|
|
713
|
+
h.push(v.charAt(S >>> 6 * (3 - o) & 63));
|
|
714
|
+
var a = v.charAt(64);
|
|
715
|
+
if (a)
|
|
716
|
+
for (; h.length % 4; )
|
|
717
|
+
h.push(a);
|
|
718
|
+
return h.join("");
|
|
691
719
|
},
|
|
692
720
|
/**
|
|
693
721
|
* Converts a Base64 string to a word array.
|
|
@@ -703,201 +731,201 @@ function $t() {
|
|
|
703
731
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
704
732
|
*/
|
|
705
733
|
parse: function(p) {
|
|
706
|
-
var
|
|
707
|
-
if (!
|
|
708
|
-
|
|
709
|
-
for (var
|
|
710
|
-
|
|
734
|
+
var y = p.length, w = this._map, v = this._reverseMap;
|
|
735
|
+
if (!v) {
|
|
736
|
+
v = this._reverseMap = [];
|
|
737
|
+
for (var h = 0; h < w.length; h++)
|
|
738
|
+
v[w.charCodeAt(h)] = h;
|
|
711
739
|
}
|
|
712
|
-
var
|
|
713
|
-
if (
|
|
714
|
-
var
|
|
715
|
-
|
|
740
|
+
var f = w.charAt(64);
|
|
741
|
+
if (f) {
|
|
742
|
+
var m = p.indexOf(f);
|
|
743
|
+
m !== -1 && (y = m);
|
|
716
744
|
}
|
|
717
|
-
return
|
|
745
|
+
return b(p, y, v);
|
|
718
746
|
},
|
|
719
747
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
720
748
|
};
|
|
721
|
-
function
|
|
722
|
-
for (var
|
|
723
|
-
if (
|
|
724
|
-
var
|
|
725
|
-
|
|
749
|
+
function b(p, y, w) {
|
|
750
|
+
for (var v = [], h = 0, f = 0; f < y; f++)
|
|
751
|
+
if (f % 4) {
|
|
752
|
+
var m = w[p.charCodeAt(f - 1)] << f % 4 * 2, s = w[p.charCodeAt(f)] >>> 6 - f % 4 * 2, c = m | s;
|
|
753
|
+
v[h >>> 2] |= c << 24 - h % 4 * 8, h++;
|
|
726
754
|
}
|
|
727
|
-
return
|
|
755
|
+
return l.create(v, h);
|
|
728
756
|
}
|
|
729
757
|
})(), r.enc.Base64;
|
|
730
758
|
});
|
|
731
|
-
})(
|
|
759
|
+
})(K)), K.exports;
|
|
732
760
|
}
|
|
733
|
-
var
|
|
734
|
-
const
|
|
735
|
-
var
|
|
736
|
-
function
|
|
737
|
-
return
|
|
738
|
-
(function(r,
|
|
739
|
-
|
|
740
|
-
})(
|
|
741
|
-
return function(r,
|
|
761
|
+
var ke = /* @__PURE__ */ Te();
|
|
762
|
+
const De = /* @__PURE__ */ L(ke);
|
|
763
|
+
var G = { exports: {} }, Ie = G.exports, ht;
|
|
764
|
+
function Ye() {
|
|
765
|
+
return ht || (ht = 1, (function(t, e) {
|
|
766
|
+
(function(r, n) {
|
|
767
|
+
t.exports = n();
|
|
768
|
+
})(Ie, (function() {
|
|
769
|
+
return function(r, n, u) {
|
|
742
770
|
r = r || {};
|
|
743
|
-
var
|
|
744
|
-
function
|
|
745
|
-
return
|
|
771
|
+
var l = n.prototype, g = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
772
|
+
function b(y, w, v, h) {
|
|
773
|
+
return l.fromToBase(y, w, v, h);
|
|
746
774
|
}
|
|
747
|
-
|
|
748
|
-
for (var
|
|
749
|
-
var
|
|
750
|
-
|
|
751
|
-
var
|
|
752
|
-
if (
|
|
753
|
-
|
|
754
|
-
var C =
|
|
755
|
-
|
|
775
|
+
u.en.relativeTime = g, l.fromToBase = function(y, w, v, h, f) {
|
|
776
|
+
for (var m, s, c, S = v.$locale().relativeTime || g, o = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], a = o.length, i = 0; i < a; i += 1) {
|
|
777
|
+
var d = o[i];
|
|
778
|
+
d.d && (m = h ? u(y).diff(v, d.d, !0) : v.diff(y, d.d, !0));
|
|
779
|
+
var x = (r.rounding || Math.round)(Math.abs(m));
|
|
780
|
+
if (c = m > 0, x <= d.r || !d.r) {
|
|
781
|
+
x <= 1 && i > 0 && (d = o[i - 1]);
|
|
782
|
+
var C = S[d.l];
|
|
783
|
+
f && (x = f("" + x)), s = typeof C == "string" ? C.replace("%d", x) : C(x, w, d.l, c);
|
|
756
784
|
break;
|
|
757
785
|
}
|
|
758
786
|
}
|
|
759
|
-
if (
|
|
760
|
-
var
|
|
761
|
-
return typeof
|
|
762
|
-
},
|
|
763
|
-
return
|
|
764
|
-
},
|
|
765
|
-
return
|
|
787
|
+
if (w) return s;
|
|
788
|
+
var $ = c ? S.future : S.past;
|
|
789
|
+
return typeof $ == "function" ? $(s) : $.replace("%s", s);
|
|
790
|
+
}, l.to = function(y, w) {
|
|
791
|
+
return b(y, w, this, !0);
|
|
792
|
+
}, l.from = function(y, w) {
|
|
793
|
+
return b(y, w, this);
|
|
766
794
|
};
|
|
767
|
-
var p = function(
|
|
768
|
-
return
|
|
795
|
+
var p = function(y) {
|
|
796
|
+
return y.$u ? u.utc() : u();
|
|
769
797
|
};
|
|
770
|
-
|
|
771
|
-
return this.to(p(this),
|
|
772
|
-
},
|
|
773
|
-
return this.from(p(this),
|
|
798
|
+
l.toNow = function(y) {
|
|
799
|
+
return this.to(p(this), y);
|
|
800
|
+
}, l.fromNow = function(y) {
|
|
801
|
+
return this.from(p(this), y);
|
|
774
802
|
};
|
|
775
803
|
};
|
|
776
804
|
}));
|
|
777
|
-
})(
|
|
805
|
+
})(G)), G.exports;
|
|
778
806
|
}
|
|
779
|
-
var
|
|
780
|
-
const
|
|
781
|
-
var
|
|
782
|
-
function
|
|
783
|
-
return
|
|
784
|
-
(function(r,
|
|
785
|
-
|
|
786
|
-
})(
|
|
787
|
-
var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 },
|
|
788
|
-
return function(
|
|
789
|
-
var
|
|
790
|
-
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
var
|
|
794
|
-
return
|
|
795
|
-
})(
|
|
796
|
-
return
|
|
797
|
-
},
|
|
798
|
-
for (var
|
|
799
|
-
var
|
|
800
|
-
|
|
807
|
+
var Ne = /* @__PURE__ */ Ye();
|
|
808
|
+
const Ue = /* @__PURE__ */ L(Ne);
|
|
809
|
+
var J = { exports: {} }, Ee = J.exports, mt;
|
|
810
|
+
function Oe() {
|
|
811
|
+
return mt || (mt = 1, (function(t, e) {
|
|
812
|
+
(function(r, n) {
|
|
813
|
+
t.exports = n();
|
|
814
|
+
})(Ee, (function() {
|
|
815
|
+
var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
|
|
816
|
+
return function(u, l, g) {
|
|
817
|
+
var b, p = function(h, f, m) {
|
|
818
|
+
m === void 0 && (m = {});
|
|
819
|
+
var s = new Date(h), c = (function(S, o) {
|
|
820
|
+
o === void 0 && (o = {});
|
|
821
|
+
var a = o.timeZoneName || "short", i = S + "|" + a, d = n[i];
|
|
822
|
+
return d || (d = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: S, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: a }), n[i] = d), d;
|
|
823
|
+
})(f, m);
|
|
824
|
+
return c.formatToParts(s);
|
|
825
|
+
}, y = function(h, f) {
|
|
826
|
+
for (var m = p(h, f), s = [], c = 0; c < m.length; c += 1) {
|
|
827
|
+
var S = m[c], o = S.type, a = S.value, i = r[o];
|
|
828
|
+
i >= 0 && (s[i] = parseInt(a, 10));
|
|
801
829
|
}
|
|
802
|
-
var
|
|
803
|
-
return (
|
|
804
|
-
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
var
|
|
808
|
-
if (!Number(
|
|
809
|
-
else if (
|
|
810
|
-
var
|
|
811
|
-
|
|
830
|
+
var d = s[3], x = d === 24 ? 0 : d, C = s[0] + "-" + s[1] + "-" + s[2] + " " + x + ":" + s[4] + ":" + s[5] + ":000", $ = +h;
|
|
831
|
+
return (g.utc(C).valueOf() - ($ -= $ % 1e3)) / 6e4;
|
|
832
|
+
}, w = l.prototype;
|
|
833
|
+
w.tz = function(h, f) {
|
|
834
|
+
h === void 0 && (h = b);
|
|
835
|
+
var m, s = this.utcOffset(), c = this.toDate(), S = c.toLocaleString("en-US", { timeZone: h }), o = Math.round((c - new Date(S)) / 1e3 / 60), a = 15 * -Math.round(c.getTimezoneOffset() / 15) - o;
|
|
836
|
+
if (!Number(a)) m = this.utcOffset(0, f);
|
|
837
|
+
else if (m = g(S, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(a, !0), f) {
|
|
838
|
+
var i = m.utcOffset();
|
|
839
|
+
m = m.add(s - i, "minute");
|
|
812
840
|
}
|
|
813
|
-
return
|
|
814
|
-
},
|
|
815
|
-
var
|
|
816
|
-
return
|
|
841
|
+
return m.$x.$timezone = h, m;
|
|
842
|
+
}, w.offsetName = function(h) {
|
|
843
|
+
var f = this.$x.$timezone || g.tz.guess(), m = p(this.valueOf(), f, { timeZoneName: h }).find((function(s) {
|
|
844
|
+
return s.type.toLowerCase() === "timezonename";
|
|
817
845
|
}));
|
|
818
|
-
return
|
|
846
|
+
return m && m.value;
|
|
819
847
|
};
|
|
820
|
-
var
|
|
821
|
-
|
|
822
|
-
if (!this.$x || !this.$x.$timezone) return
|
|
823
|
-
var
|
|
824
|
-
return
|
|
825
|
-
},
|
|
826
|
-
var
|
|
827
|
-
if (typeof
|
|
828
|
-
var
|
|
829
|
-
var _ =
|
|
830
|
-
if (C ===
|
|
831
|
-
var
|
|
832
|
-
return
|
|
833
|
-
})(
|
|
834
|
-
return
|
|
835
|
-
},
|
|
848
|
+
var v = w.startOf;
|
|
849
|
+
w.startOf = function(h, f) {
|
|
850
|
+
if (!this.$x || !this.$x.$timezone) return v.call(this, h, f);
|
|
851
|
+
var m = g(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
852
|
+
return v.call(m, h, f).tz(this.$x.$timezone, !0);
|
|
853
|
+
}, g.tz = function(h, f, m) {
|
|
854
|
+
var s = m && f, c = m || f || b, S = y(+g(), c);
|
|
855
|
+
if (typeof h != "string") return g(h).tz(c);
|
|
856
|
+
var o = (function(x, C, $) {
|
|
857
|
+
var _ = x - 60 * C * 1e3, T = y(_, $);
|
|
858
|
+
if (C === T) return [_, C];
|
|
859
|
+
var D = y(_ -= 60 * (T - C) * 1e3, $);
|
|
860
|
+
return T === D ? [_, T] : [x - 60 * Math.min(T, D) * 1e3, Math.max(T, D)];
|
|
861
|
+
})(g.utc(h, s).valueOf(), S, c), a = o[0], i = o[1], d = g(a).utcOffset(i);
|
|
862
|
+
return d.$x.$timezone = c, d;
|
|
863
|
+
}, g.tz.guess = function() {
|
|
836
864
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
837
|
-
},
|
|
838
|
-
|
|
865
|
+
}, g.tz.setDefault = function(h) {
|
|
866
|
+
b = h;
|
|
839
867
|
};
|
|
840
868
|
};
|
|
841
869
|
}));
|
|
842
|
-
})(
|
|
870
|
+
})(J)), J.exports;
|
|
843
871
|
}
|
|
844
|
-
var
|
|
845
|
-
const
|
|
846
|
-
var
|
|
847
|
-
function
|
|
848
|
-
return
|
|
849
|
-
(function(r,
|
|
850
|
-
|
|
851
|
-
})(
|
|
852
|
-
var r = "minute",
|
|
853
|
-
return function(
|
|
854
|
-
var p =
|
|
855
|
-
|
|
856
|
-
var
|
|
857
|
-
return new
|
|
858
|
-
}, p.utc = function(
|
|
859
|
-
var
|
|
860
|
-
return
|
|
872
|
+
var Be = /* @__PURE__ */ Oe();
|
|
873
|
+
const Ae = /* @__PURE__ */ L(Be);
|
|
874
|
+
var Z = { exports: {} }, Pe = Z.exports, pt;
|
|
875
|
+
function Re() {
|
|
876
|
+
return pt || (pt = 1, (function(t, e) {
|
|
877
|
+
(function(r, n) {
|
|
878
|
+
t.exports = n();
|
|
879
|
+
})(Pe, (function() {
|
|
880
|
+
var r = "minute", n = /[+-]\d\d(?::?\d\d)?/g, u = /([+-]|\d\d)/g;
|
|
881
|
+
return function(l, g, b) {
|
|
882
|
+
var p = g.prototype;
|
|
883
|
+
b.utc = function(s) {
|
|
884
|
+
var c = { date: s, utc: !0, args: arguments };
|
|
885
|
+
return new g(c);
|
|
886
|
+
}, p.utc = function(s) {
|
|
887
|
+
var c = b(this.toDate(), { locale: this.$L, utc: !0 });
|
|
888
|
+
return s ? c.add(this.utcOffset(), r) : c;
|
|
861
889
|
}, p.local = function() {
|
|
862
|
-
return
|
|
890
|
+
return b(this.toDate(), { locale: this.$L, utc: !1 });
|
|
863
891
|
};
|
|
864
|
-
var
|
|
865
|
-
p.parse = function(
|
|
866
|
-
|
|
892
|
+
var y = p.parse;
|
|
893
|
+
p.parse = function(s) {
|
|
894
|
+
s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), y.call(this, s);
|
|
867
895
|
};
|
|
868
|
-
var
|
|
896
|
+
var w = p.init;
|
|
869
897
|
p.init = function() {
|
|
870
898
|
if (this.$u) {
|
|
871
|
-
var
|
|
872
|
-
this.$y =
|
|
873
|
-
} else
|
|
899
|
+
var s = this.$d;
|
|
900
|
+
this.$y = s.getUTCFullYear(), this.$M = s.getUTCMonth(), this.$D = s.getUTCDate(), this.$W = s.getUTCDay(), this.$H = s.getUTCHours(), this.$m = s.getUTCMinutes(), this.$s = s.getUTCSeconds(), this.$ms = s.getUTCMilliseconds();
|
|
901
|
+
} else w.call(this);
|
|
874
902
|
};
|
|
875
|
-
var
|
|
876
|
-
p.utcOffset = function(
|
|
877
|
-
var
|
|
878
|
-
if (
|
|
879
|
-
if (typeof
|
|
880
|
-
|
|
881
|
-
var
|
|
882
|
-
if (!
|
|
883
|
-
var C = ("" +
|
|
884
|
-
return _ === 0 ? 0 :
|
|
885
|
-
})(
|
|
886
|
-
var
|
|
887
|
-
if (
|
|
888
|
-
if (
|
|
889
|
-
var
|
|
890
|
-
(
|
|
891
|
-
} else
|
|
892
|
-
return
|
|
903
|
+
var v = p.utcOffset;
|
|
904
|
+
p.utcOffset = function(s, c) {
|
|
905
|
+
var S = this.$utils().u;
|
|
906
|
+
if (S(s)) return this.$u ? 0 : S(this.$offset) ? v.call(this) : this.$offset;
|
|
907
|
+
if (typeof s == "string" && (s = (function(d) {
|
|
908
|
+
d === void 0 && (d = "");
|
|
909
|
+
var x = d.match(n);
|
|
910
|
+
if (!x) return null;
|
|
911
|
+
var C = ("" + x[0]).match(u) || ["-", 0, 0], $ = C[0], _ = 60 * +C[1] + +C[2];
|
|
912
|
+
return _ === 0 ? 0 : $ === "+" ? _ : -_;
|
|
913
|
+
})(s), s === null)) return this;
|
|
914
|
+
var o = Math.abs(s) <= 16 ? 60 * s : s, a = this;
|
|
915
|
+
if (c) return a.$offset = o, a.$u = s === 0, a;
|
|
916
|
+
if (s !== 0) {
|
|
917
|
+
var i = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
918
|
+
(a = this.local().add(o + i, r)).$offset = o, a.$x.$localOffset = i;
|
|
919
|
+
} else a = this.utc();
|
|
920
|
+
return a;
|
|
893
921
|
};
|
|
894
|
-
var
|
|
895
|
-
p.format = function(
|
|
896
|
-
var
|
|
897
|
-
return
|
|
922
|
+
var h = p.format;
|
|
923
|
+
p.format = function(s) {
|
|
924
|
+
var c = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
925
|
+
return h.call(this, c);
|
|
898
926
|
}, p.valueOf = function() {
|
|
899
|
-
var
|
|
900
|
-
return this.$d.valueOf() - 6e4 *
|
|
927
|
+
var s = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
928
|
+
return this.$d.valueOf() - 6e4 * s;
|
|
901
929
|
}, p.isUTC = function() {
|
|
902
930
|
return !!this.$u;
|
|
903
931
|
}, p.toISOString = function() {
|
|
@@ -905,189 +933,189 @@ function Pt() {
|
|
|
905
933
|
}, p.toString = function() {
|
|
906
934
|
return this.toDate().toUTCString();
|
|
907
935
|
};
|
|
908
|
-
var
|
|
909
|
-
p.toDate = function(
|
|
910
|
-
return
|
|
936
|
+
var f = p.toDate;
|
|
937
|
+
p.toDate = function(s) {
|
|
938
|
+
return s === "s" && this.$offset ? b(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : f.call(this);
|
|
911
939
|
};
|
|
912
|
-
var
|
|
913
|
-
p.diff = function(
|
|
914
|
-
if (
|
|
915
|
-
var
|
|
916
|
-
return
|
|
940
|
+
var m = p.diff;
|
|
941
|
+
p.diff = function(s, c, S) {
|
|
942
|
+
if (s && this.$u === s.$u) return m.call(this, s, c, S);
|
|
943
|
+
var o = this.local(), a = b(s).local();
|
|
944
|
+
return m.call(o, a, c, S);
|
|
917
945
|
};
|
|
918
946
|
};
|
|
919
947
|
}));
|
|
920
|
-
})(
|
|
948
|
+
})(Z)), Z.exports;
|
|
921
949
|
}
|
|
922
|
-
var
|
|
923
|
-
const
|
|
950
|
+
var He = /* @__PURE__ */ Re();
|
|
951
|
+
const Fe = /* @__PURE__ */ L(He), Le = "ui_theme", ze = (t) => typeof t == "string", je = (t) => typeof t == "number" && !isNaN(t), Ve = (t) => typeof t == "boolean", We = (t) => typeof t == "function", qe = (t) => t !== null && typeof t == "object", Ke = (t) => Array.isArray(t), Ge = (t) => t === null, Je = (t) => t === void 0, Ze = (t) => t == null, Xe = (t, e) => {
|
|
924
952
|
let r = 0;
|
|
925
|
-
return (...
|
|
926
|
-
const
|
|
927
|
-
|
|
953
|
+
return (...n) => {
|
|
954
|
+
const u = Date.now();
|
|
955
|
+
u - r >= e && (r = u, t(...n));
|
|
928
956
|
};
|
|
929
|
-
},
|
|
957
|
+
}, Qe = (t, e) => {
|
|
930
958
|
let r;
|
|
931
|
-
return (...
|
|
932
|
-
clearTimeout(r), r = setTimeout(() =>
|
|
959
|
+
return (...n) => {
|
|
960
|
+
clearTimeout(r), r = setTimeout(() => t(...n), e);
|
|
933
961
|
};
|
|
934
|
-
},
|
|
962
|
+
}, tr = async (t) => {
|
|
935
963
|
try {
|
|
936
|
-
return await navigator.clipboard.writeText(
|
|
937
|
-
} catch (
|
|
938
|
-
return console.error("Error copying to clipboard:",
|
|
964
|
+
return await navigator.clipboard.writeText(t), !0;
|
|
965
|
+
} catch (e) {
|
|
966
|
+
return console.error("Error copying to clipboard:", e), !1;
|
|
939
967
|
}
|
|
940
|
-
},
|
|
941
|
-
const
|
|
942
|
-
return
|
|
943
|
-
}, er = () =>
|
|
944
|
-
if (!
|
|
945
|
-
return Math.max(...
|
|
946
|
-
},
|
|
947
|
-
if (!
|
|
948
|
-
return Math.min(...
|
|
949
|
-
},
|
|
950
|
-
if (!
|
|
951
|
-
return
|
|
952
|
-
},
|
|
953
|
-
const
|
|
954
|
-
return
|
|
955
|
-
|
|
968
|
+
}, tt = () => {
|
|
969
|
+
const t = window.innerWidth;
|
|
970
|
+
return t < 768 ? "mobile" : t < 1024 ? "tablet" : "desktop";
|
|
971
|
+
}, er = () => tt() === "mobile", rr = () => tt() === "tablet", nr = () => tt() === "desktop", or = () => "#" + Math.floor(Math.random() * 16777215).toString(16), et = (t) => !t || t.length === 0, sr = (t) => [...new Set(t)], ar = (t) => {
|
|
972
|
+
if (!et(t))
|
|
973
|
+
return Math.max(...t);
|
|
974
|
+
}, ir = (t) => {
|
|
975
|
+
if (!et(t))
|
|
976
|
+
return Math.min(...t);
|
|
977
|
+
}, cr = (t) => {
|
|
978
|
+
if (!et(t))
|
|
979
|
+
return t.reduce((e, r) => e + r, 0) / t.length;
|
|
980
|
+
}, ur = (t) => t.reduce((e, r) => e + r, 0), lr = (t, e) => t.filter(e).length, dr = (t) => [...t].reverse(), fr = (t) => {
|
|
981
|
+
const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
982
|
+
return t.forEach((n) => {
|
|
983
|
+
e.has(n) ? r.add(n) : e.add(n);
|
|
956
984
|
}), Array.from(r);
|
|
957
|
-
},
|
|
985
|
+
}, hr = (t, e) => Math.random() * (e - t) + t, mr = (t, e, r) => Math.min(Math.max(t, e), r), pr = (t, e = 0) => Math.round(t * Math.pow(10, e)) / Math.pow(10, e), gr = (t, e) => {
|
|
958
986
|
try {
|
|
959
|
-
sessionStorage.setItem(
|
|
987
|
+
sessionStorage.setItem(t, JSON.stringify(e));
|
|
960
988
|
} catch (r) {
|
|
961
989
|
console.error("Error saving to sessionStorage:", r);
|
|
962
990
|
}
|
|
963
|
-
},
|
|
991
|
+
}, yr = (t, e) => {
|
|
964
992
|
try {
|
|
965
|
-
const r = sessionStorage.getItem(
|
|
966
|
-
return r ? JSON.parse(r) :
|
|
993
|
+
const r = sessionStorage.getItem(t);
|
|
994
|
+
return r ? JSON.parse(r) : e || null;
|
|
967
995
|
} catch (r) {
|
|
968
|
-
return console.error("Error reading from sessionStorage:", r),
|
|
996
|
+
return console.error("Error reading from sessionStorage:", r), e || null;
|
|
969
997
|
}
|
|
970
|
-
},
|
|
998
|
+
}, vr = (t) => {
|
|
971
999
|
try {
|
|
972
|
-
sessionStorage.removeItem(
|
|
973
|
-
} catch (
|
|
974
|
-
console.error("Error removing from sessionStorage:",
|
|
1000
|
+
sessionStorage.removeItem(t);
|
|
1001
|
+
} catch (e) {
|
|
1002
|
+
console.error("Error removing from sessionStorage:", e);
|
|
975
1003
|
}
|
|
976
|
-
},
|
|
1004
|
+
}, wr = () => {
|
|
977
1005
|
try {
|
|
978
1006
|
sessionStorage.clear();
|
|
979
|
-
} catch (
|
|
980
|
-
console.error("Error clearing sessionStorage:",
|
|
1007
|
+
} catch (t) {
|
|
1008
|
+
console.error("Error clearing sessionStorage:", t);
|
|
981
1009
|
}
|
|
982
|
-
},
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
}, xr = (
|
|
986
|
-
const
|
|
987
|
-
for (let
|
|
988
|
-
let
|
|
989
|
-
for (;
|
|
990
|
-
if (
|
|
1010
|
+
}, Sr = (t, e, r = 30) => {
|
|
1011
|
+
const n = /* @__PURE__ */ new Date();
|
|
1012
|
+
n.setTime(n.getTime() + r * 24 * 60 * 60 * 1e3), document.cookie = `${t}=${e};expires=${n.toUTCString()};path=/`;
|
|
1013
|
+
}, xr = (t) => {
|
|
1014
|
+
const e = t + "=", r = document.cookie.split(";");
|
|
1015
|
+
for (let n = 0; n < r.length; n++) {
|
|
1016
|
+
let u = r[n];
|
|
1017
|
+
for (; u.charAt(0) === " "; ) u = u.substring(1, u.length);
|
|
1018
|
+
if (u.indexOf(e) === 0) return u.substring(e.length, u.length);
|
|
991
1019
|
}
|
|
992
1020
|
return null;
|
|
993
|
-
},
|
|
994
|
-
document.cookie = `${
|
|
995
|
-
},
|
|
1021
|
+
}, Cr = (t) => {
|
|
1022
|
+
document.cookie = `${t}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
|
|
1023
|
+
}, Tt = (t) => typeof t != "string" ? !t : t.trim().length === 0, br = (t, e) => Tt(t) ? e : t || "", $r = (t) => t.replace(/-([a-z])/g, (e) => e[1].toUpperCase()), _r = (t) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t), Mr = (t) => {
|
|
996
1024
|
try {
|
|
997
|
-
return new URL(
|
|
1025
|
+
return new URL(t), !0;
|
|
998
1026
|
} catch {
|
|
999
1027
|
return !1;
|
|
1000
1028
|
}
|
|
1001
|
-
},
|
|
1029
|
+
}, Tr = (t, e, r = " ") => t.padStart(e, r), kr = (t, e, r = " ") => t.padEnd(e, r), kt = (t, e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
|
|
1002
1030
|
let r = "";
|
|
1003
|
-
for (let
|
|
1004
|
-
r +=
|
|
1031
|
+
for (let n = 0; n < t; n++)
|
|
1032
|
+
r += e.charAt(Math.floor(Math.random() * e.length));
|
|
1005
1033
|
return r;
|
|
1006
|
-
}, Dr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
|
1007
|
-
const
|
|
1008
|
-
return (
|
|
1009
|
-
}),
|
|
1034
|
+
}, Dr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
1035
|
+
const e = Math.random() * 16 | 0;
|
|
1036
|
+
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
1037
|
+
}), it = (t = 32) => {
|
|
1010
1038
|
const r = Dr().replace(/-/g, "");
|
|
1011
|
-
return
|
|
1039
|
+
return t >= 32 ? r + kt(t - 32, "0123456789abcdef") : r.substring(0, t);
|
|
1012
1040
|
};
|
|
1013
|
-
async function
|
|
1014
|
-
return
|
|
1041
|
+
async function Ir(t) {
|
|
1042
|
+
return _e(t).toString(De);
|
|
1015
1043
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1044
|
+
M.extend(Ue);
|
|
1045
|
+
M.extend(Fe);
|
|
1046
|
+
M.extend(Ae);
|
|
1047
|
+
M.locale("ko");
|
|
1048
|
+
const Y = "YYYYMMDD", Yr = () => M(), Dt = (t = Y) => M().format(t), Nr = (t) => M(t, Y, !0).isValid(), Ur = (t) => M(t, "YYYY", !0).isValid(), Er = (t) => M(t, "YYYYMM", !0).isValid(), Or = (t) => M(t, "YYYYMMDDHHmmss", !0).isValid(), Br = (t, e = "CM") => {
|
|
1021
1049
|
let r = "";
|
|
1022
|
-
return
|
|
1023
|
-
},
|
|
1024
|
-
const
|
|
1025
|
-
let
|
|
1026
|
-
return (r.month() <
|
|
1027
|
-
},
|
|
1050
|
+
return e == "CM" ? r = "YYYYMMDD" : e == "C" ? r = "YYYY.MM.DD" : e == "H" ? r = "YYYY년 MM월 DD일" : e == "D" ? r = "YYYY-MM-DD" : e == "S" ? r = "YYYY/MM/DD" : e == "M" ? r = "YYYY-MM" : e == "YM" ? r = "YYYY년 MM월" : e == "DT" ? r = "YYYY-MM-DD HH:mm:ss" : e == "T" ? r = "HH:mm:ss" : e == "HM" && (r = "HH:mm"), M(t).format(r);
|
|
1051
|
+
}, Ar = (t, e = "month") => M(t).endOf(e).format(Y), Pr = (t, e = "month") => M(t).startOf(e).format(Y), Rr = (t, e) => M(t).add(e, "month").format(Y), Hr = (t, e) => M(t).add(e, "day").format(Y), Fr = (t, e) => M(t).diff(e, "day"), Lr = (t = Y) => {
|
|
1052
|
+
const e = M(t), r = M();
|
|
1053
|
+
let n = r.year() - e.year();
|
|
1054
|
+
return (r.month() < e.month() || r.month() === e.month() && r.date() < e.date()) && n--, n;
|
|
1055
|
+
}, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1028
1056
|
__proto__: null,
|
|
1029
|
-
COMMON_DATE_FORMAT:
|
|
1030
|
-
THEME_COOKIE_NAME:
|
|
1057
|
+
COMMON_DATE_FORMAT: Y,
|
|
1058
|
+
THEME_COOKIE_NAME: Le,
|
|
1031
1059
|
addDays: Hr,
|
|
1032
|
-
addMonths:
|
|
1033
|
-
arrAverage:
|
|
1034
|
-
arrCount:
|
|
1035
|
-
arrMax:
|
|
1036
|
-
arrMin:
|
|
1037
|
-
arrReverse:
|
|
1038
|
-
arrSum:
|
|
1039
|
-
arrUnique:
|
|
1040
|
-
clamp:
|
|
1041
|
-
clearSessionStorage:
|
|
1042
|
-
copyToClipboard:
|
|
1043
|
-
datetimeFormat:
|
|
1044
|
-
debounce:
|
|
1045
|
-
deleteCookie:
|
|
1046
|
-
diffDays:
|
|
1047
|
-
duplicates:
|
|
1048
|
-
encryptSha256:
|
|
1060
|
+
addMonths: Rr,
|
|
1061
|
+
arrAverage: cr,
|
|
1062
|
+
arrCount: lr,
|
|
1063
|
+
arrMax: ar,
|
|
1064
|
+
arrMin: ir,
|
|
1065
|
+
arrReverse: dr,
|
|
1066
|
+
arrSum: ur,
|
|
1067
|
+
arrUnique: sr,
|
|
1068
|
+
clamp: mr,
|
|
1069
|
+
clearSessionStorage: wr,
|
|
1070
|
+
copyToClipboard: tr,
|
|
1071
|
+
datetimeFormat: Br,
|
|
1072
|
+
debounce: Qe,
|
|
1073
|
+
deleteCookie: Cr,
|
|
1074
|
+
diffDays: Fr,
|
|
1075
|
+
duplicates: fr,
|
|
1076
|
+
encryptSha256: Ir,
|
|
1049
1077
|
generateRandomColor: or,
|
|
1050
|
-
generateRandomString:
|
|
1051
|
-
generateUID:
|
|
1052
|
-
getAge:
|
|
1078
|
+
generateRandomString: kt,
|
|
1079
|
+
generateUID: it,
|
|
1080
|
+
getAge: Lr,
|
|
1053
1081
|
getCookie: xr,
|
|
1054
|
-
getCurrentDate:
|
|
1055
|
-
getCurrentDateString:
|
|
1056
|
-
getDeviceType:
|
|
1057
|
-
getLastDateByDiv:
|
|
1058
|
-
getSessionStorage:
|
|
1059
|
-
getStartDateByDiv:
|
|
1060
|
-
isArray:
|
|
1061
|
-
isBoolean:
|
|
1062
|
-
isDesktop:
|
|
1063
|
-
isEmpty:
|
|
1064
|
-
isEmptyArray:
|
|
1065
|
-
isFunction:
|
|
1082
|
+
getCurrentDate: Yr,
|
|
1083
|
+
getCurrentDateString: Dt,
|
|
1084
|
+
getDeviceType: tt,
|
|
1085
|
+
getLastDateByDiv: Ar,
|
|
1086
|
+
getSessionStorage: yr,
|
|
1087
|
+
getStartDateByDiv: Pr,
|
|
1088
|
+
isArray: Ke,
|
|
1089
|
+
isBoolean: Ve,
|
|
1090
|
+
isDesktop: nr,
|
|
1091
|
+
isEmpty: Tt,
|
|
1092
|
+
isEmptyArray: et,
|
|
1093
|
+
isFunction: We,
|
|
1066
1094
|
isMobile: er,
|
|
1067
|
-
isNull:
|
|
1068
|
-
isNullOrUndefined:
|
|
1069
|
-
isNumber:
|
|
1070
|
-
isObject:
|
|
1071
|
-
isSafeEmpty:
|
|
1072
|
-
isString:
|
|
1073
|
-
isTablet:
|
|
1074
|
-
isUndefined:
|
|
1075
|
-
isValidDate:
|
|
1076
|
-
isValidDateTime:
|
|
1077
|
-
isValidEmail:
|
|
1078
|
-
isValidUrl:
|
|
1079
|
-
isValidYear:
|
|
1095
|
+
isNull: Ge,
|
|
1096
|
+
isNullOrUndefined: Ze,
|
|
1097
|
+
isNumber: je,
|
|
1098
|
+
isObject: qe,
|
|
1099
|
+
isSafeEmpty: br,
|
|
1100
|
+
isString: ze,
|
|
1101
|
+
isTablet: rr,
|
|
1102
|
+
isUndefined: Je,
|
|
1103
|
+
isValidDate: Nr,
|
|
1104
|
+
isValidDateTime: Or,
|
|
1105
|
+
isValidEmail: _r,
|
|
1106
|
+
isValidUrl: Mr,
|
|
1107
|
+
isValidYear: Ur,
|
|
1080
1108
|
isValidYearMonth: Er,
|
|
1081
|
-
padLeft:
|
|
1082
|
-
padRight:
|
|
1083
|
-
random:
|
|
1084
|
-
removeSessionStorage:
|
|
1085
|
-
round:
|
|
1086
|
-
setCookie:
|
|
1087
|
-
setSessionStorage:
|
|
1088
|
-
throttle:
|
|
1089
|
-
toCamelCase:
|
|
1090
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1109
|
+
padLeft: Tr,
|
|
1110
|
+
padRight: kr,
|
|
1111
|
+
random: hr,
|
|
1112
|
+
removeSessionStorage: vr,
|
|
1113
|
+
round: pr,
|
|
1114
|
+
setCookie: Sr,
|
|
1115
|
+
setSessionStorage: gr,
|
|
1116
|
+
throttle: Xe,
|
|
1117
|
+
toCamelCase: $r
|
|
1118
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = (() => {
|
|
1091
1119
|
try {
|
|
1092
1120
|
if (import.meta.env.DEV)
|
|
1093
1121
|
return !0;
|
|
@@ -1095,58 +1123,140 @@ const E = "YYYYMMDD", Or = () => $(), Ee = (e = E) => $().format(e), Ir = (e) =>
|
|
|
1095
1123
|
}
|
|
1096
1124
|
return !1;
|
|
1097
1125
|
})();
|
|
1098
|
-
let
|
|
1099
|
-
function
|
|
1100
|
-
|
|
1126
|
+
let Yt = [], Nt = [];
|
|
1127
|
+
function zr(t) {
|
|
1128
|
+
t.devHosts && (Yt = t.devHosts), t.prodHosts && (Nt = t.prodHosts);
|
|
1101
1129
|
}
|
|
1102
|
-
function
|
|
1130
|
+
function Ut() {
|
|
1103
1131
|
if (typeof window < "u" && window.location)
|
|
1104
1132
|
return window.location.hostname;
|
|
1105
1133
|
}
|
|
1106
|
-
const
|
|
1107
|
-
const
|
|
1108
|
-
return !!(
|
|
1109
|
-
})(),
|
|
1110
|
-
const
|
|
1111
|
-
return !!(
|
|
1134
|
+
const Et = (() => {
|
|
1135
|
+
const t = Ut();
|
|
1136
|
+
return !!(t && Yt.includes(t));
|
|
1137
|
+
})(), Ot = (() => {
|
|
1138
|
+
const t = Ut();
|
|
1139
|
+
return !!(t && Nt.includes(t));
|
|
1112
1140
|
})();
|
|
1113
|
-
function
|
|
1114
|
-
return
|
|
1141
|
+
function jr() {
|
|
1142
|
+
return ct ? "X" : Et ? "D" : Ot ? "P" : "X";
|
|
1143
|
+
}
|
|
1144
|
+
const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1145
|
+
__proto__: null,
|
|
1146
|
+
configureEnvUtils: zr,
|
|
1147
|
+
getEnvCode: jr,
|
|
1148
|
+
isDev: Et,
|
|
1149
|
+
isLocal: ct,
|
|
1150
|
+
isProd: Ot
|
|
1151
|
+
}, Symbol.toStringTag, { value: "Module" })), Vr = (t, e, r = "text/plain") => {
|
|
1152
|
+
const n = new Blob([t], { type: r }), u = URL.createObjectURL(n), l = document.createElement("a");
|
|
1153
|
+
l.href = u, l.download = e, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(u);
|
|
1154
|
+
};
|
|
1155
|
+
async function Wr(t) {
|
|
1156
|
+
try {
|
|
1157
|
+
return await P("SCMFILE00101", {
|
|
1158
|
+
crprCd: z()?.crprCd,
|
|
1159
|
+
sysCd: __SYS_CD__,
|
|
1160
|
+
fileKey: t
|
|
1161
|
+
}).then((r) => {
|
|
1162
|
+
let n;
|
|
1163
|
+
if (r.sub && (n = r.sub[0]), console.log(r), console.log(n), !n.lgclFileNm)
|
|
1164
|
+
throw console.error("논리파일명이 없습니다."), new Error("논리 파일명 누락");
|
|
1165
|
+
if (!n.filePath)
|
|
1166
|
+
throw console.error("파일 경로가 없습니다."), new Error("파일 경로 누락");
|
|
1167
|
+
const u = `api/download?filePath=${encodeURIComponent(
|
|
1168
|
+
n.filePath
|
|
1169
|
+
)}&logicalName=${encodeURIComponent(n.lgclFileNm)}`;
|
|
1170
|
+
return window.open(u, "_blank"), { success: !0, message: "파일 다운로드 요청 성공" };
|
|
1171
|
+
});
|
|
1172
|
+
} catch (e) {
|
|
1173
|
+
throw console.error("downloadByFileKey 함수 실행 중 오류 발생:", e), e;
|
|
1174
|
+
}
|
|
1115
1175
|
}
|
|
1116
|
-
const
|
|
1176
|
+
const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1177
|
+
__proto__: null,
|
|
1178
|
+
downloadByFileKey: Wr,
|
|
1179
|
+
downloadFile: Vr
|
|
1180
|
+
}, Symbol.toStringTag, { value: "Module" })), Pt = (t, e = 3) => {
|
|
1181
|
+
B.success({
|
|
1182
|
+
content: t,
|
|
1183
|
+
duration: e
|
|
1184
|
+
});
|
|
1185
|
+
}, j = (t, e = 5) => {
|
|
1186
|
+
B.error({
|
|
1187
|
+
content: t,
|
|
1188
|
+
duration: e
|
|
1189
|
+
});
|
|
1190
|
+
}, qr = (t, e = 4) => {
|
|
1191
|
+
B.warning({
|
|
1192
|
+
content: t,
|
|
1193
|
+
duration: e
|
|
1194
|
+
});
|
|
1195
|
+
}, Kr = (t, e = 3) => {
|
|
1196
|
+
B.info({
|
|
1197
|
+
content: t,
|
|
1198
|
+
duration: e
|
|
1199
|
+
});
|
|
1200
|
+
}, Gr = (t = "처리중...") => B.loading({
|
|
1201
|
+
content: t,
|
|
1202
|
+
duration: 0
|
|
1203
|
+
// 수동으로 닫을 때까지 유지
|
|
1204
|
+
}), Jr = (t) => {
|
|
1205
|
+
B.destroy(t);
|
|
1206
|
+
}, Zr = () => {
|
|
1207
|
+
B.destroy();
|
|
1208
|
+
}, Xr = (t, e = "처리 중 오류가 발생했습니다.") => {
|
|
1209
|
+
const r = t?.response?.data?.message || t?.message || e;
|
|
1210
|
+
j(r);
|
|
1211
|
+
}, Qr = (t = "저장") => {
|
|
1212
|
+
Pt(`${t}이 완료되었습니다.`);
|
|
1213
|
+
}, tn = (t = "저장") => {
|
|
1214
|
+
j(`${t} 중 오류가 발생했습니다.`);
|
|
1215
|
+
}, en = (t) => {
|
|
1216
|
+
j(`이미 사용중인 ${t}입니다.`);
|
|
1217
|
+
}, rn = (t) => {
|
|
1218
|
+
j(`${t}을(를) 입력해주세요.`);
|
|
1219
|
+
}, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1117
1220
|
__proto__: null,
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1221
|
+
closeAllMessages: Zr,
|
|
1222
|
+
closeMessage: Jr,
|
|
1223
|
+
showApiError: Xr,
|
|
1224
|
+
showDuplicateError: en,
|
|
1225
|
+
showError: j,
|
|
1226
|
+
showInfo: Kr,
|
|
1227
|
+
showLoading: Gr,
|
|
1228
|
+
showRequiredError: rn,
|
|
1229
|
+
showSaveError: tn,
|
|
1230
|
+
showSaveSuccess: Qr,
|
|
1231
|
+
showSuccess: Pt,
|
|
1232
|
+
showWarning: qr
|
|
1123
1233
|
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
1124
1234
|
duration: 4.5,
|
|
1125
1235
|
// 4.5초
|
|
1126
1236
|
placement: "topRight"
|
|
1127
1237
|
};
|
|
1128
|
-
class
|
|
1238
|
+
class A {
|
|
1129
1239
|
constructor() {
|
|
1130
1240
|
}
|
|
1131
1241
|
static getInstance() {
|
|
1132
|
-
return
|
|
1242
|
+
return A.instance || (A.instance = new A()), A.instance;
|
|
1133
1243
|
}
|
|
1134
1244
|
/**
|
|
1135
1245
|
* BwgError 전용 에러 알림
|
|
1136
1246
|
* @param props - 에러 메시지 설정
|
|
1137
1247
|
*/
|
|
1138
|
-
showBwgError(
|
|
1248
|
+
showBwgError(e) {
|
|
1139
1249
|
const {
|
|
1140
1250
|
message: r,
|
|
1141
|
-
description:
|
|
1142
|
-
duration:
|
|
1143
|
-
placement:
|
|
1144
|
-
} =
|
|
1145
|
-
|
|
1251
|
+
description: n,
|
|
1252
|
+
duration: u = I.duration,
|
|
1253
|
+
placement: l = I.placement
|
|
1254
|
+
} = e;
|
|
1255
|
+
U.error({
|
|
1146
1256
|
message: `${r}`,
|
|
1147
|
-
description:
|
|
1148
|
-
duration:
|
|
1149
|
-
placement:
|
|
1257
|
+
description: n || "오류가 발생했습니다. 다시 시도해주세요.",
|
|
1258
|
+
duration: u,
|
|
1259
|
+
placement: l,
|
|
1150
1260
|
style: {
|
|
1151
1261
|
borderLeft: "4px solid #ff4d4f",
|
|
1152
1262
|
backgroundColor: "#fff2f0"
|
|
@@ -1156,44 +1266,44 @@ class P {
|
|
|
1156
1266
|
/**
|
|
1157
1267
|
* 성공 알림
|
|
1158
1268
|
*/
|
|
1159
|
-
showSuccess(
|
|
1160
|
-
|
|
1161
|
-
message: `${
|
|
1269
|
+
showSuccess(e, r, n) {
|
|
1270
|
+
U.success({
|
|
1271
|
+
message: `${e}`,
|
|
1162
1272
|
description: r,
|
|
1163
|
-
duration:
|
|
1273
|
+
duration: n || I.duration,
|
|
1164
1274
|
placement: I.placement
|
|
1165
1275
|
});
|
|
1166
1276
|
}
|
|
1167
1277
|
/**
|
|
1168
1278
|
* 정보 알림
|
|
1169
1279
|
*/
|
|
1170
|
-
showInfo(
|
|
1171
|
-
|
|
1172
|
-
message: `${
|
|
1280
|
+
showInfo(e, r, n) {
|
|
1281
|
+
U.info({
|
|
1282
|
+
message: `${e}`,
|
|
1173
1283
|
description: r,
|
|
1174
|
-
duration:
|
|
1284
|
+
duration: n || I.duration,
|
|
1175
1285
|
placement: I.placement
|
|
1176
1286
|
});
|
|
1177
1287
|
}
|
|
1178
1288
|
/**
|
|
1179
1289
|
* 경고 알림
|
|
1180
1290
|
*/
|
|
1181
|
-
showWarning(
|
|
1182
|
-
|
|
1183
|
-
message: `${
|
|
1291
|
+
showWarning(e, r, n) {
|
|
1292
|
+
U.warning({
|
|
1293
|
+
message: `${e}`,
|
|
1184
1294
|
description: r,
|
|
1185
|
-
duration:
|
|
1295
|
+
duration: n || I.duration,
|
|
1186
1296
|
placement: I.placement
|
|
1187
1297
|
});
|
|
1188
1298
|
}
|
|
1189
1299
|
/**
|
|
1190
1300
|
* 일반 에러 알림
|
|
1191
1301
|
*/
|
|
1192
|
-
showError(
|
|
1193
|
-
|
|
1194
|
-
message: `${
|
|
1302
|
+
showError(e, r, n) {
|
|
1303
|
+
U.error({
|
|
1304
|
+
message: `${e}`,
|
|
1195
1305
|
description: r,
|
|
1196
|
-
duration:
|
|
1306
|
+
duration: n || I.duration,
|
|
1197
1307
|
placement: I.placement
|
|
1198
1308
|
});
|
|
1199
1309
|
}
|
|
@@ -1201,429 +1311,40 @@ class P {
|
|
|
1201
1311
|
* 모든 알림 닫기
|
|
1202
1312
|
*/
|
|
1203
1313
|
destroy() {
|
|
1204
|
-
|
|
1314
|
+
U.destroy();
|
|
1205
1315
|
}
|
|
1206
1316
|
/**
|
|
1207
1317
|
* 특정 키의 알림 닫기
|
|
1208
1318
|
*/
|
|
1209
|
-
close(
|
|
1210
|
-
|
|
1319
|
+
close(e) {
|
|
1320
|
+
U.destroy();
|
|
1211
1321
|
}
|
|
1212
1322
|
}
|
|
1213
|
-
const N =
|
|
1214
|
-
N.showBwgError(
|
|
1215
|
-
},
|
|
1216
|
-
N.showSuccess(
|
|
1217
|
-
},
|
|
1218
|
-
N.showInfo(
|
|
1219
|
-
},
|
|
1220
|
-
N.showWarning(
|
|
1221
|
-
},
|
|
1222
|
-
N.showError(
|
|
1223
|
-
},
|
|
1323
|
+
const N = A.getInstance(), Ht = (t) => {
|
|
1324
|
+
N.showBwgError(t);
|
|
1325
|
+
}, nn = (t, e, r) => {
|
|
1326
|
+
N.showSuccess(t, e, r);
|
|
1327
|
+
}, Ft = (t, e, r) => {
|
|
1328
|
+
N.showInfo(t, e, r);
|
|
1329
|
+
}, Lt = (t, e, r) => {
|
|
1330
|
+
N.showWarning(t, e, r);
|
|
1331
|
+
}, on = (t, e, r) => {
|
|
1332
|
+
N.showError(t, e, r);
|
|
1333
|
+
}, sn = () => {
|
|
1224
1334
|
N.destroy();
|
|
1225
|
-
},
|
|
1226
|
-
N.close(
|
|
1227
|
-
},
|
|
1335
|
+
}, an = (t) => {
|
|
1336
|
+
N.close(t);
|
|
1337
|
+
}, zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1228
1338
|
__proto__: null,
|
|
1229
|
-
closeNotification:
|
|
1230
|
-
destroyNotifications:
|
|
1231
|
-
notiBwgError:
|
|
1232
|
-
notiError:
|
|
1233
|
-
notiInfo:
|
|
1234
|
-
notiSuccess:
|
|
1235
|
-
notiWarning:
|
|
1339
|
+
closeNotification: an,
|
|
1340
|
+
destroyNotifications: sn,
|
|
1341
|
+
notiBwgError: Ht,
|
|
1342
|
+
notiError: on,
|
|
1343
|
+
notiInfo: Ft,
|
|
1344
|
+
notiSuccess: nn,
|
|
1345
|
+
notiWarning: Lt,
|
|
1236
1346
|
notificationService: N
|
|
1237
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
1238
|
-
let Y = null;
|
|
1239
|
-
const de = async (e) => {
|
|
1240
|
-
if (Y === null)
|
|
1241
|
-
if (e === void 0)
|
|
1242
|
-
try {
|
|
1243
|
-
let r = (await ae.get("/api/ip")).data.trim();
|
|
1244
|
-
r = r.replace(/\s+/g, ""), Y = r;
|
|
1245
|
-
} catch (t) {
|
|
1246
|
-
console.warn("IP 가져오기 실패:", t), Y = "unknown";
|
|
1247
|
-
}
|
|
1248
|
-
else
|
|
1249
|
-
Y = e;
|
|
1250
|
-
}, Kr = () => Y, Gr = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), Y || "unknown");
|
|
1251
|
-
class T extends Error {
|
|
1252
|
-
constructor(t, r, o, l, m) {
|
|
1253
|
-
super(t), this.name = "ApiError", this.detailMsg = r, this.response = o, this.msgCd = l, this.errorType = m, Error.captureStackTrace && Error.captureStackTrace(this, T);
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
const Q = {
|
|
1257
|
-
method: "POST",
|
|
1258
|
-
timeout: 3e4,
|
|
1259
|
-
// 30초
|
|
1260
|
-
withCredentials: !0,
|
|
1261
|
-
// 쿠키 포함
|
|
1262
|
-
showLoading: !0,
|
|
1263
|
-
isPopup: !1,
|
|
1264
|
-
showError: !0,
|
|
1265
|
-
retryCount: 0,
|
|
1266
|
-
retryDelay: 1e3
|
|
1267
|
-
}, j = ae.create({
|
|
1268
|
-
timeout: Q.timeout,
|
|
1269
|
-
withCredentials: Q.withCredentials,
|
|
1270
|
-
headers: {
|
|
1271
|
-
"Content-Type": "application/json; charset=utf-8",
|
|
1272
|
-
Accept: "application/json; charset=utf-8",
|
|
1273
|
-
"Apm-Guid": ie()
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
j.interceptors.request.use(
|
|
1277
|
-
(e) => {
|
|
1278
|
-
e.showLoading && !e.isPopup && ne.getState().showLoading(), e.showLoading && e.isPopup && se.getState().showLoading();
|
|
1279
|
-
let t = "UNKNOWN";
|
|
1280
|
-
(/* @__PURE__ */ new Date()).getTime();
|
|
1281
|
-
try {
|
|
1282
|
-
e.data && e.data.header ? t = e.data.header.trxCd || "UNKNOWN" : e.params && e.params.header && (t = e.params.header.trxCd || "UNKNOWN");
|
|
1283
|
-
} catch (o) {
|
|
1284
|
-
console.warn("trxCd/guid 추출 실패:", o);
|
|
1285
|
-
}
|
|
1286
|
-
e.trxCd = t, e.requestStartTime = Date.now(), console.log(
|
|
1287
|
-
`🚀 API 요청 시작 [거래코드: ${t} / 서비스요청자: ${H()?.userId}]`
|
|
1288
|
-
);
|
|
1289
|
-
const r = localStorage.getItem("accessToken");
|
|
1290
|
-
return r && (e.headers.Authorization = `Bearer ${r}`), e.headers["Content-Type"] = "application/json; charset=UTF-8", e.headers.Accept = "application/json; charset=UTF-8", e;
|
|
1291
|
-
},
|
|
1292
|
-
(e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
|
|
1293
|
-
);
|
|
1294
|
-
j.interceptors.response.use(
|
|
1295
|
-
(e) => {
|
|
1296
|
-
e.config.showLoading && !e.config.isPopup && ne.getState().hideLoading(), e.config.isPopup && se.getState().hideLoading();
|
|
1297
|
-
let t = "UNKNOWN", r = "UNKNOWN";
|
|
1298
|
-
const o = (/* @__PURE__ */ new Date()).getTime();
|
|
1299
|
-
try {
|
|
1300
|
-
e.config.trxCd && (t = e.config.trxCd), e.config.guid ? r = e.config.guid : e.data && e.data.header && e.data.header.trxCd ? (t = e.data.header.trxCd, r = e.data.header.guid || "UNKNOWN") : e.config.data && e.config.data.header ? (t = e.config.data.header.trxCd || "UNKNOWN", r = e.config.data.header.guid || "UNKNOWN") : e.config.params && e.config.params.header && (t = e.config.params.header.trxCd || "UNKNOWN", r = e.config.params.header.guid || "UNKNOWN");
|
|
1301
|
-
} catch (m) {
|
|
1302
|
-
console.warn("trxCd/guid 추출 실패:", m);
|
|
1303
|
-
}
|
|
1304
|
-
let l = 0;
|
|
1305
|
-
return e.config.requestStartTime && (l = o - e.config.requestStartTime), console.log(
|
|
1306
|
-
`✅ API 응답 성공 [거래코드: ${t} / GUID : ${r}] - (소요시간: ${l}ms)`
|
|
1307
|
-
), e;
|
|
1308
|
-
},
|
|
1309
|
-
async (e) => {
|
|
1310
|
-
if (e.config && e.config.showLoading && !e.config.isPopup && ne.getState().hideLoading(), e.config && e.config.isPopup && se.getState().hideLoading(), console.error("❌ API 응답 에러:", e), z && console.error("🚨 Error Details:", {
|
|
1311
|
-
message: e.message,
|
|
1312
|
-
status: e.response?.status,
|
|
1313
|
-
statusText: e.response?.statusText,
|
|
1314
|
-
data: e.response?.data,
|
|
1315
|
-
config: {
|
|
1316
|
-
url: e.config?.url,
|
|
1317
|
-
method: e.config?.method,
|
|
1318
|
-
baseURL: e.config?.baseURL
|
|
1319
|
-
}
|
|
1320
|
-
}), e.response?.status === 401) {
|
|
1321
|
-
const t = localStorage.getItem("refreshToken");
|
|
1322
|
-
if (t)
|
|
1323
|
-
try {
|
|
1324
|
-
const r = await ae.post("/auth/refresh", {
|
|
1325
|
-
refreshToken: t
|
|
1326
|
-
});
|
|
1327
|
-
if (r.data.accessToken) {
|
|
1328
|
-
localStorage.setItem(
|
|
1329
|
-
"accessToken",
|
|
1330
|
-
r.data.accessToken
|
|
1331
|
-
);
|
|
1332
|
-
const o = e.config;
|
|
1333
|
-
if (o)
|
|
1334
|
-
return o.headers.Authorization = `Bearer ${r.data.accessToken}`, j(o);
|
|
1335
|
-
}
|
|
1336
|
-
} catch {
|
|
1337
|
-
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
return Promise.reject(e);
|
|
1341
|
-
}
|
|
1342
|
-
);
|
|
1343
|
-
const U = async (e, t, r) => {
|
|
1344
|
-
try {
|
|
1345
|
-
const o = {
|
|
1346
|
-
...Q,
|
|
1347
|
-
...r
|
|
1348
|
-
}, { activeMenuId: l } = we.getState();
|
|
1349
|
-
if (Y === null) {
|
|
1350
|
-
const f = Date.now();
|
|
1351
|
-
await de();
|
|
1352
|
-
const c = Date.now();
|
|
1353
|
-
console.log(`[INFO] IP 조회 소요시간: ${c - f}ms`);
|
|
1354
|
-
}
|
|
1355
|
-
const m = {
|
|
1356
|
-
method: o.method,
|
|
1357
|
-
url: "/api/service",
|
|
1358
|
-
timeout: o.timeout,
|
|
1359
|
-
withCredentials: o.withCredentials,
|
|
1360
|
-
showLoading: o.showLoading,
|
|
1361
|
-
isPopup: o.isPopup
|
|
1362
|
-
};
|
|
1363
|
-
o.headers && (m.headers = o.headers);
|
|
1364
|
-
const x = Y || "unknown", M = __APP_CD__, p = __SYS_CD__, v = {
|
|
1365
|
-
header: {
|
|
1366
|
-
trxCd: e,
|
|
1367
|
-
userInfo: H(),
|
|
1368
|
-
clientIp: x,
|
|
1369
|
-
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
1370
|
-
domainId: "DEFAULT",
|
|
1371
|
-
appCd: M,
|
|
1372
|
-
sysCd: p,
|
|
1373
|
-
screenId: l
|
|
1374
|
-
},
|
|
1375
|
-
// data: bxmEncrypt(JSON.stringify(data)),
|
|
1376
|
-
data: t
|
|
1377
|
-
};
|
|
1378
|
-
o.method === "GET" ? m.params = v || o.params : (m.data = v || o.data, o.params && (m.params = o.params));
|
|
1379
|
-
let g;
|
|
1380
|
-
for (let f = 0; f <= (o.retryCount || 0); f++)
|
|
1381
|
-
try {
|
|
1382
|
-
const c = await j(m);
|
|
1383
|
-
if (c.data.header?.resCd == 0) {
|
|
1384
|
-
for (const a in c.data)
|
|
1385
|
-
if (a !== "header")
|
|
1386
|
-
return c.data[a];
|
|
1387
|
-
return {};
|
|
1388
|
-
} else {
|
|
1389
|
-
const a = c.data.header, u = a?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", n = a?.msgs?.detailMsgs || u, d = a?.msgCd, w = a?.msgs?.type;
|
|
1390
|
-
throw new T(u, n, c, d, w);
|
|
1391
|
-
}
|
|
1392
|
-
} catch (c) {
|
|
1393
|
-
if (c.isAxiosError && c.response) {
|
|
1394
|
-
const a = c, u = a.response, n = u.data, d = n?.header?.msgs?.basicMsg || a.message || // 실패 시 Axios 에러 메시지 사용
|
|
1395
|
-
"서버에서 오류가 발생했습니다.", w = n?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
|
|
1396
|
-
(typeof u.data == "string" ? u.data : JSON.stringify(u.data)) || d, s = n?.header?.msgCd, i = n?.header?.msgs?.type;
|
|
1397
|
-
g = new T(
|
|
1398
|
-
d,
|
|
1399
|
-
w,
|
|
1400
|
-
u,
|
|
1401
|
-
s,
|
|
1402
|
-
i
|
|
1403
|
-
);
|
|
1404
|
-
} else
|
|
1405
|
-
g = c;
|
|
1406
|
-
if (c.isAxiosError && Fe(c) && f < (o.retryCount || 0)) {
|
|
1407
|
-
await ze(o.retryDelay || 1e3);
|
|
1408
|
-
continue;
|
|
1409
|
-
}
|
|
1410
|
-
break;
|
|
1411
|
-
}
|
|
1412
|
-
if (g) {
|
|
1413
|
-
if (o.showError) {
|
|
1414
|
-
const f = g instanceof T ? g.message : "요청 처리 중 오류가 발생했습니다.", c = g instanceof T ? g.msgCd : "요청 처리 중 오류가 발생했습니다.", a = g instanceof T ? g.detailMsg : g.message, u = g instanceof T ? g.errorType : "";
|
|
1415
|
-
c?.startsWith("BXM") ? ce({
|
|
1416
|
-
message: f,
|
|
1417
|
-
description: a,
|
|
1418
|
-
duration: 5
|
|
1419
|
-
}) : u == "I" ? ue(f, a, 5) : le(f, a, 5);
|
|
1420
|
-
}
|
|
1421
|
-
throw g;
|
|
1422
|
-
}
|
|
1423
|
-
throw new Error("알 수 없는 API 오류가 발생했습니다.");
|
|
1424
|
-
} catch (o) {
|
|
1425
|
-
throw console.error("callService 최종 에러:", o), o;
|
|
1426
|
-
}
|
|
1427
|
-
}, Jr = async (e, t, r, o) => {
|
|
1428
|
-
try {
|
|
1429
|
-
const l = {
|
|
1430
|
-
...Q,
|
|
1431
|
-
...o
|
|
1432
|
-
}, { activeMenuId: m } = we.getState();
|
|
1433
|
-
if (Y === null) {
|
|
1434
|
-
const c = Date.now();
|
|
1435
|
-
await de();
|
|
1436
|
-
const a = Date.now();
|
|
1437
|
-
console.log(`[INFO] IP 조회 소요시간: ${a - c}ms`);
|
|
1438
|
-
}
|
|
1439
|
-
const x = {
|
|
1440
|
-
method: l.method,
|
|
1441
|
-
url: "/api/" + e + "/service",
|
|
1442
|
-
timeout: l.timeout,
|
|
1443
|
-
withCredentials: l.withCredentials,
|
|
1444
|
-
showLoading: l.showLoading,
|
|
1445
|
-
isPopup: l.isPopup
|
|
1446
|
-
};
|
|
1447
|
-
l.headers && (x.headers = l.headers);
|
|
1448
|
-
const M = Y || "unknown", p = __APP_CD__, v = __SYS_CD__, g = {
|
|
1449
|
-
header: {
|
|
1450
|
-
trxCd: t,
|
|
1451
|
-
userInfo: H(),
|
|
1452
|
-
clientIp: M,
|
|
1453
|
-
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
1454
|
-
domainId: "DEFAULT",
|
|
1455
|
-
appCd: p,
|
|
1456
|
-
sysCd: v,
|
|
1457
|
-
screenId: m
|
|
1458
|
-
},
|
|
1459
|
-
// data: bxmEncrypt(JSON.stringify(data)),
|
|
1460
|
-
data: r
|
|
1461
|
-
};
|
|
1462
|
-
z && console.log("__BWG_LOCAL__ 테스트 입니다. ", z), l.method === "GET" ? x.params = g || l.params : (x.data = g || l.data, l.params && (x.params = l.params));
|
|
1463
|
-
let f;
|
|
1464
|
-
for (let c = 0; c <= (l.retryCount || 0); c++)
|
|
1465
|
-
try {
|
|
1466
|
-
const a = await j(x);
|
|
1467
|
-
if (a.data.header?.resCd == 0) {
|
|
1468
|
-
for (const u in a.data)
|
|
1469
|
-
if (u !== "header")
|
|
1470
|
-
return a.data[u];
|
|
1471
|
-
return {};
|
|
1472
|
-
} else {
|
|
1473
|
-
const u = a.data.header, n = u?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", d = u?.msgs?.detailMsgs || n, w = u?.msgCd, s = u?.msgs?.type;
|
|
1474
|
-
throw new T(n, d, a, w, s);
|
|
1475
|
-
}
|
|
1476
|
-
} catch (a) {
|
|
1477
|
-
if (a.isAxiosError && a.response) {
|
|
1478
|
-
const u = a, n = u.response, d = n.data, w = d?.header?.msgs?.basicMsg || u.message || // 실패 시 Axios 에러 메시지 사용
|
|
1479
|
-
"서버에서 오류가 발생했습니다.", s = d?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
|
|
1480
|
-
(typeof n.data == "string" ? n.data : JSON.stringify(n.data)) || w, i = d?.header?.msgCd, h = d?.header?.msgs?.type;
|
|
1481
|
-
f = new T(
|
|
1482
|
-
w,
|
|
1483
|
-
s,
|
|
1484
|
-
n,
|
|
1485
|
-
i,
|
|
1486
|
-
h
|
|
1487
|
-
);
|
|
1488
|
-
} else
|
|
1489
|
-
f = a;
|
|
1490
|
-
if (a.isAxiosError && Fe(a) && c < (l.retryCount || 0)) {
|
|
1491
|
-
await ze(l.retryDelay || 1e3);
|
|
1492
|
-
continue;
|
|
1493
|
-
}
|
|
1494
|
-
break;
|
|
1495
|
-
}
|
|
1496
|
-
if (f) {
|
|
1497
|
-
if (l.showError) {
|
|
1498
|
-
const c = f instanceof T ? f.message : "요청 처리 중 오류가 발생했습니다.", a = f instanceof T ? f.msgCd : "요청 처리 중 오류가 발생했습니다.", u = f instanceof T ? f.detailMsg : f.message, n = f instanceof T ? f.errorType : "";
|
|
1499
|
-
a?.startsWith("BXM") ? ce({
|
|
1500
|
-
message: c,
|
|
1501
|
-
description: u,
|
|
1502
|
-
duration: 5
|
|
1503
|
-
}) : n == "I" ? ue(c, u, 5) : le(c, u, 5);
|
|
1504
|
-
}
|
|
1505
|
-
throw f;
|
|
1506
|
-
}
|
|
1507
|
-
throw new Error("알 수 없는 API 오류가 발생했습니다.");
|
|
1508
|
-
} catch (l) {
|
|
1509
|
-
throw console.error("callService 최종 에러:", l), l;
|
|
1510
|
-
}
|
|
1511
|
-
}, Fe = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, ze = (e) => new Promise((t) => setTimeout(t, e)), Zr = (e, t, r) => U(e, t, { ...r, method: "GET" }), Xr = (e, t, r) => U(e, t, { ...r, method: "POST" }), Qr = (e, t, r) => U(e, t, { ...r, method: "PUT" }), eo = (e, t, r) => U(e, t, { ...r, method: "DELETE" }), to = (e, t, r) => U(e, t, { ...r, method: "PATCH" }), ro = async (e, t, r) => {
|
|
1512
|
-
try {
|
|
1513
|
-
const o = await fetch("/api/permissions", {
|
|
1514
|
-
method: "POST",
|
|
1515
|
-
headers: {
|
|
1516
|
-
"Content-Type": "application/json"
|
|
1517
|
-
},
|
|
1518
|
-
body: JSON.stringify({
|
|
1519
|
-
userId: e,
|
|
1520
|
-
menuId: t,
|
|
1521
|
-
popupId: r
|
|
1522
|
-
})
|
|
1523
|
-
});
|
|
1524
|
-
if (!o.ok)
|
|
1525
|
-
throw new Error(`권한 확인 실패: ${o.status}`);
|
|
1526
|
-
return await o.json();
|
|
1527
|
-
} catch (o) {
|
|
1528
|
-
throw console.error("권한 확인 서비스 오류:", o), o;
|
|
1529
|
-
}
|
|
1530
|
-
}, je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1531
|
-
__proto__: null,
|
|
1532
|
-
ApiError: T,
|
|
1533
|
-
apiDelete: eo,
|
|
1534
|
-
apiGet: Zr,
|
|
1535
|
-
apiPatch: to,
|
|
1536
|
-
apiPost: Xr,
|
|
1537
|
-
apiPut: Qr,
|
|
1538
|
-
callService: U,
|
|
1539
|
-
callService_SYSCD: Jr,
|
|
1540
|
-
getClientIp: Kr,
|
|
1541
|
-
getPermissionService: ro,
|
|
1542
|
-
setClientIp: de,
|
|
1543
|
-
verifyClientIp: Gr
|
|
1544
|
-
}, Symbol.toStringTag, { value: "Module" })), oo = (e, t, r = "text/plain") => {
|
|
1545
|
-
const o = new Blob([e], { type: r }), l = URL.createObjectURL(o), m = document.createElement("a");
|
|
1546
|
-
m.href = l, m.download = t, document.body.appendChild(m), m.click(), document.body.removeChild(m), URL.revokeObjectURL(l);
|
|
1547
|
-
};
|
|
1548
|
-
async function no(e) {
|
|
1549
|
-
try {
|
|
1550
|
-
return await U("SCMFILE00101", {
|
|
1551
|
-
crprCd: H()?.crprCd,
|
|
1552
|
-
sysCd: __SYS_CD__,
|
|
1553
|
-
fileKey: e
|
|
1554
|
-
}).then((r) => {
|
|
1555
|
-
let o;
|
|
1556
|
-
if (r.sub && (o = r.sub[0]), console.log(r), console.log(o), !o.lgclFileNm)
|
|
1557
|
-
throw console.error("논리파일명이 없습니다."), new Error("논리 파일명 누락");
|
|
1558
|
-
if (!o.filePath)
|
|
1559
|
-
throw console.error("파일 경로가 없습니다."), new Error("파일 경로 누락");
|
|
1560
|
-
const l = `api/download?filePath=${encodeURIComponent(
|
|
1561
|
-
o.filePath
|
|
1562
|
-
)}&logicalName=${encodeURIComponent(o.lgclFileNm)}`;
|
|
1563
|
-
return window.open(l, "_blank"), { success: !0, message: "파일 다운로드 요청 성공" };
|
|
1564
|
-
});
|
|
1565
|
-
} catch (t) {
|
|
1566
|
-
throw console.error("downloadByFileKey 함수 실행 중 오류 발생:", t), t;
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1570
|
-
__proto__: null,
|
|
1571
|
-
downloadByFileKey: no,
|
|
1572
|
-
downloadFile: oo
|
|
1573
|
-
}, Symbol.toStringTag, { value: "Module" })), We = (e, t = 3) => {
|
|
1574
|
-
A.success({
|
|
1575
|
-
content: e,
|
|
1576
|
-
duration: t
|
|
1577
|
-
});
|
|
1578
|
-
}, W = (e, t = 5) => {
|
|
1579
|
-
A.error({
|
|
1580
|
-
content: e,
|
|
1581
|
-
duration: t
|
|
1582
|
-
});
|
|
1583
|
-
}, so = (e, t = 4) => {
|
|
1584
|
-
A.warning({
|
|
1585
|
-
content: e,
|
|
1586
|
-
duration: t
|
|
1587
|
-
});
|
|
1588
|
-
}, ao = (e, t = 3) => {
|
|
1589
|
-
A.info({
|
|
1590
|
-
content: e,
|
|
1591
|
-
duration: t
|
|
1592
|
-
});
|
|
1593
|
-
}, io = (e = "처리중...") => A.loading({
|
|
1594
|
-
content: e,
|
|
1595
|
-
duration: 0
|
|
1596
|
-
// 수동으로 닫을 때까지 유지
|
|
1597
|
-
}), co = (e) => {
|
|
1598
|
-
A.destroy(e);
|
|
1599
|
-
}, uo = () => {
|
|
1600
|
-
A.destroy();
|
|
1601
|
-
}, lo = (e, t = "처리 중 오류가 발생했습니다.") => {
|
|
1602
|
-
const r = e?.response?.data?.message || e?.message || t;
|
|
1603
|
-
W(r);
|
|
1604
|
-
}, fo = (e = "저장") => {
|
|
1605
|
-
We(`${e}이 완료되었습니다.`);
|
|
1606
|
-
}, ho = (e = "저장") => {
|
|
1607
|
-
W(`${e} 중 오류가 발생했습니다.`);
|
|
1608
|
-
}, mo = (e) => {
|
|
1609
|
-
W(`이미 사용중인 ${e}입니다.`);
|
|
1610
|
-
}, po = (e) => {
|
|
1611
|
-
W(`${e}을(를) 입력해주세요.`);
|
|
1612
|
-
}, qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1613
|
-
__proto__: null,
|
|
1614
|
-
closeAllMessages: uo,
|
|
1615
|
-
closeMessage: co,
|
|
1616
|
-
showApiError: lo,
|
|
1617
|
-
showDuplicateError: mo,
|
|
1618
|
-
showError: W,
|
|
1619
|
-
showInfo: ao,
|
|
1620
|
-
showLoading: io,
|
|
1621
|
-
showRequiredError: po,
|
|
1622
|
-
showSaveError: ho,
|
|
1623
|
-
showSaveSuccess: fo,
|
|
1624
|
-
showSuccess: We,
|
|
1625
|
-
showWarning: so
|
|
1626
|
-
}, Symbol.toStringTag, { value: "Module" })), go = {
|
|
1347
|
+
}, Symbol.toStringTag, { value: "Module" })), cn = {
|
|
1627
1348
|
/*************************************************************************************************************************************************
|
|
1628
1349
|
* RealGrid2 use
|
|
1629
1350
|
*************************************************************************************************************************************************/
|
|
@@ -1923,15 +1644,15 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1923
1644
|
bg_gray01: {
|
|
1924
1645
|
background: "#cdcdcd"
|
|
1925
1646
|
}
|
|
1926
|
-
},
|
|
1927
|
-
if (
|
|
1928
|
-
|
|
1929
|
-
}), !
|
|
1647
|
+
}, un = async (t) => {
|
|
1648
|
+
if (t.map((e) => {
|
|
1649
|
+
e.status = "uploading", e.percent = 10, console.log(e);
|
|
1650
|
+
}), !t || !Array.isArray(t) || t.length === 0) {
|
|
1930
1651
|
alert("업로드할 파일을 선택해주세요.");
|
|
1931
1652
|
return;
|
|
1932
1653
|
}
|
|
1933
1654
|
try {
|
|
1934
|
-
const
|
|
1655
|
+
const e = {
|
|
1935
1656
|
//로컬 VM 설정-----------------------------------------
|
|
1936
1657
|
// sftpHost: "localhost",
|
|
1937
1658
|
// sftpPort: "2222",
|
|
@@ -1942,46 +1663,46 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1942
1663
|
//-------------------------------------------
|
|
1943
1664
|
remoteDir: "/home/krxuser/bkrx/files/testForGW",
|
|
1944
1665
|
useOriginalName: "true"
|
|
1945
|
-
}, r =
|
|
1666
|
+
}, r = t.map(async (g, b) => {
|
|
1946
1667
|
const p = new FormData();
|
|
1947
|
-
Object.entries(
|
|
1948
|
-
p.append(
|
|
1668
|
+
Object.entries(e).forEach(([v, h]) => {
|
|
1669
|
+
p.append(v, h);
|
|
1949
1670
|
});
|
|
1950
|
-
const
|
|
1951
|
-
p.append("file",
|
|
1952
|
-
const
|
|
1671
|
+
const y = g.originFileObj;
|
|
1672
|
+
p.append("file", y);
|
|
1673
|
+
const w = await fetch("/api/gw-sftp", {
|
|
1953
1674
|
method: "POST",
|
|
1954
1675
|
body: p
|
|
1955
1676
|
});
|
|
1956
|
-
return
|
|
1957
|
-
(
|
|
1958
|
-
...
|
|
1677
|
+
return w.ok ? (console.log(t), t.map(
|
|
1678
|
+
(v) => v === g ? {
|
|
1679
|
+
...v,
|
|
1959
1680
|
status: "success",
|
|
1960
1681
|
percent: 100
|
|
1961
|
-
} :
|
|
1962
|
-
)) :
|
|
1963
|
-
}),
|
|
1964
|
-
if (
|
|
1965
|
-
return alert(`${
|
|
1682
|
+
} : v
|
|
1683
|
+
)) : g.status = "done", { index: b, response: w, fileName: y.name };
|
|
1684
|
+
}), n = await Promise.all(r), u = n.filter((g) => g.response.ok).length, l = n.length - u;
|
|
1685
|
+
if (u === n.length)
|
|
1686
|
+
return alert(`${u}개 파일 업로드가 완료되었습니다.`), {
|
|
1966
1687
|
result: "success",
|
|
1967
|
-
message: `${
|
|
1968
|
-
successCount:
|
|
1969
|
-
failCount:
|
|
1688
|
+
message: `${u}개 파일 업로드가 완료되었습니다.`,
|
|
1689
|
+
successCount: u,
|
|
1690
|
+
failCount: l
|
|
1970
1691
|
};
|
|
1971
|
-
if (
|
|
1972
|
-
const
|
|
1973
|
-
return alert(
|
|
1692
|
+
if (u > 0) {
|
|
1693
|
+
const g = `${u}개 성공, ${l}개 실패`;
|
|
1694
|
+
return alert(g), {
|
|
1974
1695
|
result: "partial",
|
|
1975
|
-
message:
|
|
1976
|
-
successCount:
|
|
1977
|
-
failCount:
|
|
1696
|
+
message: g,
|
|
1697
|
+
successCount: u,
|
|
1698
|
+
failCount: l
|
|
1978
1699
|
};
|
|
1979
1700
|
}
|
|
1980
1701
|
return alert("모든 파일 업로드에 실패했습니다."), {
|
|
1981
1702
|
result: "error",
|
|
1982
1703
|
message: "모든 파일 업로드에 실패했습니다.",
|
|
1983
|
-
successCount:
|
|
1984
|
-
failCount:
|
|
1704
|
+
successCount: u,
|
|
1705
|
+
failCount: l
|
|
1985
1706
|
};
|
|
1986
1707
|
} catch {
|
|
1987
1708
|
return alert("파일 업로드 중 오류가 발생했습니다."), {
|
|
@@ -1989,189 +1710,441 @@ const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1989
1710
|
message: "파일 업로드 중 오류가 발생했습니다."
|
|
1990
1711
|
};
|
|
1991
1712
|
}
|
|
1992
|
-
},
|
|
1713
|
+
}, kn = async (t, e, r) => {
|
|
1993
1714
|
const {
|
|
1994
|
-
trxCd:
|
|
1995
|
-
connInfo:
|
|
1996
|
-
openDraft:
|
|
1997
|
-
draftUrlBase:
|
|
1998
|
-
windowFeatures:
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
1715
|
+
trxCd: n = "SCMINTF00102",
|
|
1716
|
+
connInfo: u = {},
|
|
1717
|
+
openDraft: l = !0,
|
|
1718
|
+
draftUrlBase: g = "https://dev.bwg.co.kr:5510",
|
|
1719
|
+
windowFeatures: b = "width=1000,height=600",
|
|
1720
|
+
fetchFilesTrxCd: p = "SCMFILE00101"
|
|
1721
|
+
} = r || {}, y = t ?? {}, w = y.aprvKey || it(), v = y.docTitle || "제목없음", h = await P("SCMINTF00101", {
|
|
1722
|
+
crprCd: V(),
|
|
1723
|
+
sysCd: __SYS_CD__,
|
|
1724
|
+
aprvKey: w
|
|
1725
|
+
});
|
|
1726
|
+
if (Array.isArray(h?.sub) && h.sub.length >= 1) {
|
|
1727
|
+
if (console.log("이미 승인된 기안입니다."), l) {
|
|
1728
|
+
const c = `${g}?key=${w}&docTitle=${v}`;
|
|
1729
|
+
window.open(c, "_blank", b);
|
|
1730
|
+
}
|
|
1731
|
+
return { skipped: !0, alreadyDrafted: !0, draftedRes: h };
|
|
2004
1732
|
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1733
|
+
let f;
|
|
1734
|
+
if (e) {
|
|
1735
|
+
const c = await P(p, {
|
|
1736
|
+
crprCd: V(),
|
|
1737
|
+
sysCd: __SYS_CD__,
|
|
1738
|
+
fileGrpKey: e
|
|
1739
|
+
}), S = Array.isArray(c?.sub) ? c.sub.filter((i) => i?.filePath && i?.lgclFileNm).map((i) => ({
|
|
1740
|
+
filePath: i.filePath,
|
|
1741
|
+
lgclFileNm: i.lgclFileNm
|
|
1742
|
+
})) : [];
|
|
1743
|
+
console.log("@@ files", S);
|
|
1744
|
+
const o = S.map(async ({ filePath: i, lgclFileNm: d }) => {
|
|
1745
|
+
const x = `/api/download?filePath=${encodeURIComponent(
|
|
1746
|
+
i
|
|
1747
|
+
)}&logicalName=${encodeURIComponent(d)}`, C = await fetch(x, { method: "GET" });
|
|
1748
|
+
if (!C.ok)
|
|
1749
|
+
throw new Error(`다운로드 실패: ${d}`);
|
|
1750
|
+
const $ = await C.blob();
|
|
1751
|
+
return { originFileObj: new File([$], d, {
|
|
1752
|
+
type: $.type || "application/octet-stream"
|
|
1753
|
+
}), name: d, status: "ready" };
|
|
1754
|
+
}), a = await Promise.all(o);
|
|
1755
|
+
if (S.length) {
|
|
1756
|
+
const i = await un(a);
|
|
1757
|
+
if (!i || i.result !== "success")
|
|
1758
|
+
throw new Error(i?.message || "파일 업로드 실패");
|
|
1759
|
+
f = a;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
const m = {
|
|
1763
|
+
...y,
|
|
1764
|
+
crprCd: V(),
|
|
1765
|
+
aprvKey: w,
|
|
2008
1766
|
sysCd: __SYS_CD__,
|
|
2009
|
-
draftDt:
|
|
1767
|
+
draftDt: Dt("YYYYMMDD"),
|
|
1768
|
+
docTitle: v,
|
|
2010
1769
|
/**
|
|
2011
1770
|
* 해당 그룹웨어 연계데이터는 추후 추가수정 필요
|
|
2012
1771
|
* +) 기안연계가 DB로 넣는것 외에 soap를 통한 파라미터 전달 & SAP방식 등등 여러개로 나눠진다고함..
|
|
2013
1772
|
* 해당 내용들은 공통화하기 힘들어 json & rest 방식으로 연계만 공통화 할듯함.
|
|
2014
1773
|
*/
|
|
2015
|
-
fileInfoList:
|
|
2016
|
-
// 그룹웨어 파일연계
|
|
2017
|
-
connInfo:
|
|
1774
|
+
fileInfoList: f,
|
|
1775
|
+
// 그룹웨어 파일연계 (fileGrpKey 기반 다운로드 파일)
|
|
1776
|
+
connInfo: u
|
|
2018
1777
|
// 그룹웨어 기안연계
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
1778
|
+
}, s = await P(n, m);
|
|
1779
|
+
if (l && m?.aprvKey) {
|
|
1780
|
+
const c = `${g}?key=${m.aprvKey}&docTitle=${m.docTitle}`;
|
|
1781
|
+
window.open(c, "_blank", b);
|
|
1782
|
+
}
|
|
1783
|
+
return s;
|
|
1784
|
+
}, Dn = gt, In = It, Yn = Bt, Nn = At, Un = Rt, En = zt, On = St, Bn = _t, An = {
|
|
1785
|
+
...gt,
|
|
1786
|
+
...It,
|
|
1787
|
+
...Bt,
|
|
1788
|
+
...At,
|
|
1789
|
+
...Rt,
|
|
1790
|
+
...zt,
|
|
1791
|
+
...St,
|
|
1792
|
+
..._t,
|
|
1793
|
+
realFormat: cn
|
|
1794
|
+
};
|
|
1795
|
+
class O extends Error {
|
|
1796
|
+
constructor(e, r, n, u, l) {
|
|
1797
|
+
super(e), this.name = "ApiError", this.detailMsg = r, this.response = n, this.msgCd = u, this.errorType = l, Error.captureStackTrace && Error.captureStackTrace(this, O);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
let E = null;
|
|
1801
|
+
const st = {
|
|
1802
|
+
method: "POST",
|
|
1803
|
+
timeout: 3e4,
|
|
1804
|
+
// 30초
|
|
1805
|
+
withCredentials: !0,
|
|
1806
|
+
// 쿠키 포함
|
|
1807
|
+
showLoading: !0,
|
|
1808
|
+
isPopup: !1,
|
|
1809
|
+
showError: !0,
|
|
1810
|
+
retryCount: 0,
|
|
1811
|
+
retryDelay: 1e3
|
|
1812
|
+
}, X = at.create({
|
|
1813
|
+
timeout: st.timeout,
|
|
1814
|
+
withCredentials: st.withCredentials,
|
|
1815
|
+
headers: {
|
|
1816
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
1817
|
+
Accept: "application/json; charset=utf-8",
|
|
1818
|
+
"Apm-Guid": it()
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
X.interceptors.request.use(
|
|
1822
|
+
(t) => {
|
|
1823
|
+
t.showLoading && !t.isPopup && nt.getState().showLoading(), t.showLoading && t.isPopup && ot.getState().showLoading();
|
|
1824
|
+
let e = "UNKNOWN";
|
|
1825
|
+
(/* @__PURE__ */ new Date()).getTime();
|
|
1826
|
+
try {
|
|
1827
|
+
t.data && t.data.header ? e = t.data.header.trxCd || "UNKNOWN" : t.params && t.params.header && (e = t.params.header.trxCd || "UNKNOWN");
|
|
1828
|
+
} catch (n) {
|
|
1829
|
+
console.warn("trxCd/guid 추출 실패:", n);
|
|
1830
|
+
}
|
|
1831
|
+
t.trxCd = e, t.requestStartTime = Date.now(), console.log(
|
|
1832
|
+
`🚀 API 요청 시작 [거래코드: ${e} / 서비스요청자: ${z()?.userId}]`
|
|
1833
|
+
);
|
|
1834
|
+
const r = localStorage.getItem("accessToken");
|
|
1835
|
+
return r && (t.headers.Authorization = `Bearer ${r}`), t.headers["Content-Type"] = "application/json; charset=UTF-8", t.headers.Accept = "application/json; charset=UTF-8", t;
|
|
1836
|
+
},
|
|
1837
|
+
(t) => (console.error("❌ 요청 인터셉터 에러:", t), Promise.reject(t))
|
|
1838
|
+
);
|
|
1839
|
+
X.interceptors.response.use(
|
|
1840
|
+
(t) => {
|
|
1841
|
+
t.config.showLoading && !t.config.isPopup && nt.getState().hideLoading(), t.config.isPopup && ot.getState().hideLoading();
|
|
1842
|
+
let e = "UNKNOWN", r = "UNKNOWN";
|
|
1843
|
+
const n = (/* @__PURE__ */ new Date()).getTime();
|
|
1844
|
+
try {
|
|
1845
|
+
t.config.trxCd && (e = t.config.trxCd), t.config.guid ? r = t.config.guid : t.data && t.data.header && t.data.header.trxCd ? (e = t.data.header.trxCd, r = t.data.header.guid || "UNKNOWN") : t.config.data && t.config.data.header ? (e = t.config.data.header.trxCd || "UNKNOWN", r = t.config.data.header.guid || "UNKNOWN") : t.config.params && t.config.params.header && (e = t.config.params.header.trxCd || "UNKNOWN", r = t.config.params.header.guid || "UNKNOWN");
|
|
1846
|
+
} catch (l) {
|
|
1847
|
+
console.warn("trxCd/guid 추출 실패:", l);
|
|
1848
|
+
}
|
|
1849
|
+
let u = 0;
|
|
1850
|
+
return t.config.requestStartTime && (u = n - t.config.requestStartTime), console.log(
|
|
1851
|
+
`✅ API 응답 성공 [거래코드: ${e} / GUID : ${r}] - (소요시간: ${u}ms)`
|
|
1852
|
+
), t;
|
|
1853
|
+
},
|
|
1854
|
+
async (t) => {
|
|
1855
|
+
if (t.config && t.config.showLoading && !t.config.isPopup && nt.getState().hideLoading(), t.config && t.config.isPopup && ot.getState().hideLoading(), console.error("❌ API 응답 에러:", t), ct && console.error("🚨 Error Details:", {
|
|
1856
|
+
message: t.message,
|
|
1857
|
+
status: t.response?.status,
|
|
1858
|
+
statusText: t.response?.statusText,
|
|
1859
|
+
data: t.response?.data,
|
|
1860
|
+
config: {
|
|
1861
|
+
url: t.config?.url,
|
|
1862
|
+
method: t.config?.method,
|
|
1863
|
+
baseURL: t.config?.baseURL
|
|
1864
|
+
}
|
|
1865
|
+
}), t.response?.status === 401) {
|
|
1866
|
+
const e = localStorage.getItem("refreshToken");
|
|
1867
|
+
if (e)
|
|
1868
|
+
try {
|
|
1869
|
+
const r = await at.post("/auth/refresh", {
|
|
1870
|
+
refreshToken: e
|
|
1871
|
+
});
|
|
1872
|
+
if (r.data.accessToken) {
|
|
1873
|
+
localStorage.setItem(
|
|
1874
|
+
"accessToken",
|
|
1875
|
+
r.data.accessToken
|
|
1876
|
+
);
|
|
1877
|
+
const n = t.config;
|
|
1878
|
+
if (n)
|
|
1879
|
+
return n.headers.Authorization = `Bearer ${r.data.accessToken}`, X(n);
|
|
1880
|
+
}
|
|
1881
|
+
} catch {
|
|
1882
|
+
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
return Promise.reject(t);
|
|
1886
|
+
}
|
|
1887
|
+
);
|
|
1888
|
+
const ln = async () => {
|
|
1889
|
+
if (E === null) {
|
|
1890
|
+
const t = Date.now();
|
|
1891
|
+
await Vt();
|
|
1892
|
+
const e = Date.now();
|
|
1893
|
+
console.log(`[INFO] IP 조회 소요시간: ${e - t}ms`);
|
|
1894
|
+
}
|
|
1895
|
+
}, dn = (t, e, r, n) => {
|
|
1896
|
+
const { activeMenuId: u } = Qt.getState();
|
|
1897
|
+
return {
|
|
1898
|
+
header: {
|
|
1899
|
+
trxCd: t,
|
|
1900
|
+
userInfo: z(),
|
|
1901
|
+
clientIp: r,
|
|
1902
|
+
domainId: "DEFAULT",
|
|
1903
|
+
sysCd: n.sysCd,
|
|
1904
|
+
appItDd: n.appItCd,
|
|
1905
|
+
appCd: n.appCd,
|
|
1906
|
+
screenId: u
|
|
1907
|
+
},
|
|
1908
|
+
// 추후 암호화(bxmEncrypt) 가능 지점
|
|
1909
|
+
data: e
|
|
1910
|
+
};
|
|
1911
|
+
}, fn = (t, e, r) => {
|
|
1912
|
+
const n = {
|
|
1913
|
+
method: e.method,
|
|
1914
|
+
url: t,
|
|
1915
|
+
timeout: e.timeout,
|
|
1916
|
+
withCredentials: e.withCredentials,
|
|
1917
|
+
showLoading: e.showLoading,
|
|
1918
|
+
isPopup: e.isPopup,
|
|
1919
|
+
headers: {
|
|
1920
|
+
...e.headers || {}
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
return e.method === "GET" ? (n.params = r || e.params, e.params && (n.params = e.params)) : (n.data = r || e.data, e.params && (n.params = e.params)), n;
|
|
1924
|
+
}, hn = async (t, e) => {
|
|
1925
|
+
let r;
|
|
1926
|
+
const n = e.retryCount || 0, u = e.retryDelay || 1e3;
|
|
1927
|
+
for (let l = 0; l <= n; l++)
|
|
1928
|
+
try {
|
|
1929
|
+
const g = await X(t);
|
|
1930
|
+
if (g.data?.header?.resCd == 0)
|
|
1931
|
+
return pn(g.data);
|
|
1932
|
+
const b = g.data?.header || {}, p = b?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", y = b?.msgs?.detailMsgs || p, w = b?.msgCd, v = b?.msgs?.type;
|
|
1933
|
+
throw new O(p, y, g, w, v);
|
|
1934
|
+
} catch (g) {
|
|
1935
|
+
if (r = mn(g), g?.isAxiosError && yn(g) && l < n) {
|
|
1936
|
+
await vn(u);
|
|
1937
|
+
continue;
|
|
1938
|
+
}
|
|
1939
|
+
break;
|
|
1940
|
+
}
|
|
1941
|
+
throw r ? (gn(r, e), r) : new Error("알 수 없는 API 오류가 발생했습니다.");
|
|
1942
|
+
}, mn = (t) => {
|
|
1943
|
+
if (t?.isAxiosError && t.response) {
|
|
1944
|
+
const e = t, r = e.response, n = r.data, u = n?.header?.msgs?.basicMsg || e.message || "서버에서 오류가 발생했습니다.", l = n?.header?.msgs?.detailMsgs || (typeof r.data == "string" ? r.data : JSON.stringify(r.data)) || u, g = n?.header?.msgCd, b = n?.header?.msgs?.type;
|
|
1945
|
+
return new O(u, l, r, g, b);
|
|
1946
|
+
}
|
|
1947
|
+
return t instanceof O, t;
|
|
1948
|
+
}, pn = (t) => {
|
|
1949
|
+
if (!t || typeof t != "object")
|
|
1950
|
+
return {};
|
|
1951
|
+
for (const e in t)
|
|
1952
|
+
if (Object.prototype.hasOwnProperty.call(t, e) && e !== "header")
|
|
1953
|
+
return t[e];
|
|
1954
|
+
return {};
|
|
1955
|
+
}, gn = (t, e) => {
|
|
1956
|
+
if (!e.showError) return;
|
|
1957
|
+
const r = t instanceof O, n = r ? t.message : "요청 처리 중 오류가 발생했습니다.", u = r ? t.msgCd : "요청 처리 중 오류가 발생했습니다.", l = r ? t.detailMsg : t.message, g = r ? t.errorType : "";
|
|
1958
|
+
u && u.startsWith?.("BXM") ? Ht({
|
|
1959
|
+
message: n,
|
|
1960
|
+
description: l,
|
|
1961
|
+
duration: 5
|
|
1962
|
+
}) : g === "I" ? Ft(n, l, 5) : Lt(n, l, 5);
|
|
1963
|
+
}, jt = async (t, e, r, n, u) => {
|
|
1964
|
+
console.log("## callService 호출"), console.log(`## 전역 :: ${__SYS_CD__} | ${__APP_CD__} | ${u} | ${e}`);
|
|
1965
|
+
const l = Xt().findByAppCd(u ?? __APP_CD__);
|
|
1966
|
+
if (!l || !l.sysCd)
|
|
1967
|
+
return console.error("해당 앱코드는 존재하지 않습니다.", u), Promise.reject(new Error("해당 앱코드는 존재하지 않습니다."));
|
|
1968
|
+
await ln();
|
|
1969
|
+
const g = {
|
|
1970
|
+
...st,
|
|
1971
|
+
...n
|
|
1972
|
+
}, b = dn(
|
|
1973
|
+
e,
|
|
1974
|
+
r,
|
|
1975
|
+
Wt() || "unknown",
|
|
1976
|
+
l
|
|
1977
|
+
), p = fn(t, g, b);
|
|
1978
|
+
try {
|
|
1979
|
+
return await hn(p, g);
|
|
1980
|
+
} catch (y) {
|
|
1981
|
+
throw console.error("callService 최종 에러:", y), y;
|
|
1982
|
+
}
|
|
1983
|
+
}, yn = (t) => !t.response || t.response.status >= 500 && t.response.status < 600, vn = (t) => new Promise((e) => setTimeout(e, t)), Vt = async (t) => {
|
|
1984
|
+
if (E === null)
|
|
1985
|
+
if (t === void 0)
|
|
1986
|
+
try {
|
|
1987
|
+
let r = (await at.get("/api/ip")).data.trim();
|
|
1988
|
+
r = r.replace(/\s+/g, ""), E = r;
|
|
1989
|
+
} catch (e) {
|
|
1990
|
+
console.warn("IP 가져오기 실패:", e), E = "unknown";
|
|
1991
|
+
}
|
|
1992
|
+
else
|
|
1993
|
+
E = t;
|
|
1994
|
+
}, Wt = () => E, wn = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), E || "unknown"), Sn = (t, e, r) => P(t, e, { ...r, method: "GET" }), P = async (t, e, r, n) => jt("/api/service", t, e, r, n), xn = async (t, e, r, n) => jt(`/api/${__SYS_CD__}/service`, t, e, r, n), Cn = async (t, e, r) => {
|
|
1995
|
+
try {
|
|
1996
|
+
const n = await fetch("/api/permissions", {
|
|
1997
|
+
method: "POST",
|
|
1998
|
+
headers: {
|
|
1999
|
+
"Content-Type": "application/json"
|
|
2000
|
+
},
|
|
2001
|
+
body: JSON.stringify({
|
|
2002
|
+
userId: t,
|
|
2003
|
+
menuId: e,
|
|
2004
|
+
popupId: r
|
|
2005
|
+
})
|
|
2006
|
+
});
|
|
2007
|
+
if (!n.ok)
|
|
2008
|
+
throw new Error(`권한 확인 실패: ${n.status}`);
|
|
2009
|
+
return await n.json();
|
|
2010
|
+
} catch (n) {
|
|
2011
|
+
throw console.error("권한 확인 서비스 오류:", n), n;
|
|
2024
2012
|
}
|
|
2025
|
-
return f;
|
|
2026
|
-
}, bo = je, _o = Ne, $o = Le, To = Ve, Do = qe, ko = Re, Oo = Me, Io = ke, Yo = {
|
|
2027
|
-
...je,
|
|
2028
|
-
...Ne,
|
|
2029
|
-
...Le,
|
|
2030
|
-
...Ve,
|
|
2031
|
-
...qe,
|
|
2032
|
-
...Re,
|
|
2033
|
-
...Me,
|
|
2034
|
-
...ke,
|
|
2035
|
-
realFormat: go
|
|
2036
2013
|
};
|
|
2037
2014
|
export {
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2015
|
+
O as ApiError,
|
|
2016
|
+
Y as COMMON_DATE_FORMAT,
|
|
2017
|
+
Le as THEME_COOKIE_NAME,
|
|
2041
2018
|
Hr as addDays,
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
ur as
|
|
2051
|
-
sr as
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
Jr as
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
dr as duplicates,
|
|
2076
|
-
kr as encryptSha256,
|
|
2077
|
-
$o as envUtils,
|
|
2078
|
-
To as fileUtils,
|
|
2019
|
+
Rr as addMonths,
|
|
2020
|
+
Sn as apiGet,
|
|
2021
|
+
Dn as apiUtils,
|
|
2022
|
+
cr as arrAverage,
|
|
2023
|
+
lr as arrCount,
|
|
2024
|
+
ar as arrMax,
|
|
2025
|
+
ir as arrMin,
|
|
2026
|
+
dr as arrReverse,
|
|
2027
|
+
ur as arrSum,
|
|
2028
|
+
sr as arrUnique,
|
|
2029
|
+
An as bwgUtils,
|
|
2030
|
+
P as callService,
|
|
2031
|
+
xn as callServiceBySysCd,
|
|
2032
|
+
mr as clamp,
|
|
2033
|
+
wr as clearSessionStorage,
|
|
2034
|
+
Zr as closeAllMessages,
|
|
2035
|
+
Jr as closeMessage,
|
|
2036
|
+
an as closeNotification,
|
|
2037
|
+
In as commonUtils,
|
|
2038
|
+
zr as configureEnvUtils,
|
|
2039
|
+
tr as copyToClipboard,
|
|
2040
|
+
Br as datetimeFormat,
|
|
2041
|
+
Qe as debounce,
|
|
2042
|
+
An as default,
|
|
2043
|
+
Cr as deleteCookie,
|
|
2044
|
+
sn as destroyNotifications,
|
|
2045
|
+
Fr as diffDays,
|
|
2046
|
+
Wr as downloadByFileKey,
|
|
2047
|
+
Vr as downloadFile,
|
|
2048
|
+
fr as duplicates,
|
|
2049
|
+
Ir as encryptSha256,
|
|
2050
|
+
Yn as envUtils,
|
|
2051
|
+
Nn as fileUtils,
|
|
2079
2052
|
or as generateRandomColor,
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2053
|
+
kt as generateRandomString,
|
|
2054
|
+
it as generateUID,
|
|
2055
|
+
Lr as getAge,
|
|
2056
|
+
wt as getAllServiceCodes,
|
|
2057
|
+
Wt as getClientIp,
|
|
2085
2058
|
xr as getCookie,
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2059
|
+
V as getCrprCd,
|
|
2060
|
+
Yr as getCurrentDate,
|
|
2061
|
+
Dt as getCurrentDateString,
|
|
2062
|
+
de as getDepartmentInfo,
|
|
2063
|
+
tt as getDeviceType,
|
|
2064
|
+
le as getDisplayName,
|
|
2065
|
+
bt as getDprtCd,
|
|
2066
|
+
$t as getDprtNm,
|
|
2067
|
+
oe as getEmplNo,
|
|
2068
|
+
jr as getEnvCode,
|
|
2069
|
+
R as getHrInfo,
|
|
2070
|
+
me as getJbdtCd,
|
|
2071
|
+
he as getJbgdCd,
|
|
2072
|
+
pe as getJbkdCd,
|
|
2073
|
+
fe as getJbpsCd,
|
|
2074
|
+
Ar as getLastDateByDiv,
|
|
2075
|
+
Cn as getPermissionService,
|
|
2076
|
+
Q as getRoleList,
|
|
2077
|
+
vt as getServiceCode,
|
|
2078
|
+
yr as getSessionStorage,
|
|
2079
|
+
Pr as getStartDateByDiv,
|
|
2080
|
+
ne as getUserDvsn,
|
|
2081
|
+
xt as getUserId,
|
|
2082
|
+
z as getUserInfo,
|
|
2083
|
+
Ct as getUserNm,
|
|
2084
|
+
ge as getWkplCd,
|
|
2085
|
+
ie as hasAllRoles,
|
|
2086
|
+
ae as hasAnyRole,
|
|
2087
|
+
se as hasRole,
|
|
2088
|
+
ue as hasUserInfo,
|
|
2089
|
+
Ke as isArray,
|
|
2090
|
+
Ve as isBoolean,
|
|
2091
|
+
nr as isDesktop,
|
|
2092
|
+
Et as isDev,
|
|
2093
|
+
Tt as isEmpty,
|
|
2094
|
+
et as isEmptyArray,
|
|
2095
|
+
We as isFunction,
|
|
2096
|
+
ct as isLocal,
|
|
2097
|
+
ce as isLoggedIn,
|
|
2125
2098
|
er as isMobile,
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2099
|
+
Ge as isNull,
|
|
2100
|
+
Ze as isNullOrUndefined,
|
|
2101
|
+
je as isNumber,
|
|
2102
|
+
qe as isObject,
|
|
2103
|
+
Ot as isProd,
|
|
2104
|
+
br as isSafeEmpty,
|
|
2105
|
+
ze as isString,
|
|
2106
|
+
rr as isTablet,
|
|
2107
|
+
Je as isUndefined,
|
|
2108
|
+
Nr as isValidDate,
|
|
2109
|
+
Or as isValidDateTime,
|
|
2110
|
+
_r as isValidEmail,
|
|
2111
|
+
Mr as isValidUrl,
|
|
2112
|
+
Ur as isValidYear,
|
|
2140
2113
|
Er as isValidYearMonth,
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2114
|
+
re as logServiceCodeConfig,
|
|
2115
|
+
Un as messageUtils,
|
|
2116
|
+
Ht as notiBwgError,
|
|
2117
|
+
on as notiError,
|
|
2118
|
+
Ft as notiInfo,
|
|
2119
|
+
nn as notiSuccess,
|
|
2120
|
+
Lt as notiWarning,
|
|
2148
2121
|
N as notificationService,
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2122
|
+
En as notificationUtils,
|
|
2123
|
+
Tr as padLeft,
|
|
2124
|
+
kr as padRight,
|
|
2125
|
+
hr as random,
|
|
2126
|
+
cn as realFormat,
|
|
2127
|
+
vr as removeSessionStorage,
|
|
2128
|
+
pr as round,
|
|
2129
|
+
On as serviceUtils,
|
|
2130
|
+
Vt as setClientIp,
|
|
2131
|
+
Sr as setCookie,
|
|
2132
|
+
ee as setServiceCodeOverrides,
|
|
2133
|
+
gr as setSessionStorage,
|
|
2134
|
+
Xr as showApiError,
|
|
2135
|
+
en as showDuplicateError,
|
|
2136
|
+
j as showError,
|
|
2137
|
+
Kr as showInfo,
|
|
2138
|
+
Gr as showLoading,
|
|
2139
|
+
rn as showRequiredError,
|
|
2140
|
+
tn as showSaveError,
|
|
2141
|
+
Qr as showSaveSuccess,
|
|
2142
|
+
Pt as showSuccess,
|
|
2143
|
+
qr as showWarning,
|
|
2144
|
+
kn as submitGwApproval,
|
|
2145
|
+
Xe as throttle,
|
|
2146
|
+
$r as toCamelCase,
|
|
2147
|
+
un as uploadFilesViaSftp,
|
|
2148
|
+
Bn as userUtils,
|
|
2149
|
+
wn as verifyClientIp
|
|
2177
2150
|
};
|