@bwg-ui/core 1.1.19 → 1.1.21
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/{BwgDownload-Qhs6jJxM.js → BwgDownload-COsACbpJ.js} +3 -3
- package/dist/chunks/{BwgDownload-Qhs6jJxM.js.map → BwgDownload-COsACbpJ.js.map} +1 -1
- package/dist/chunks/{BwgDownload-Cm_XfYl_.cjs → BwgDownload-i6w7ZD-i.cjs} +2 -2
- package/dist/chunks/{BwgDownload-Cm_XfYl_.cjs.map → BwgDownload-i6w7ZD-i.cjs.map} +1 -1
- package/dist/chunks/{SSOHandler-B4yYaeJF.js → SSOHandler-BHJ5NexT.js} +4 -4
- package/dist/chunks/{SSOHandler-B4yYaeJF.js.map → SSOHandler-BHJ5NexT.js.map} +1 -1
- package/dist/chunks/{SSOHandler-C-pcl0On.cjs → SSOHandler-BtrmIPzQ.cjs} +2 -2
- package/dist/chunks/{SSOHandler-C-pcl0On.cjs.map → SSOHandler-BtrmIPzQ.cjs.map} +1 -1
- package/dist/chunks/{SearchBoxContext-CyTyFuB5.js → SearchBoxContext-BxJN-x3-.js} +2 -2
- package/dist/chunks/{SearchBoxContext-CyTyFuB5.js.map → SearchBoxContext-BxJN-x3-.js.map} +1 -1
- package/dist/chunks/{SearchBoxContext-BgAzWZQl.cjs → SearchBoxContext-DnQGaRgo.cjs} +2 -2
- package/dist/chunks/{SearchBoxContext-BgAzWZQl.cjs.map → SearchBoxContext-DnQGaRgo.cjs.map} +1 -1
- package/dist/chunks/{ViewContainer-pwafdfAs.cjs → ViewContainer-HSyLfryI.cjs} +2 -2
- package/dist/chunks/{ViewContainer-pwafdfAs.cjs.map → ViewContainer-HSyLfryI.cjs.map} +1 -1
- package/dist/chunks/{ViewContainer-CbO6vSvW.js → ViewContainer-x2yzKkIG.js} +2 -2
- package/dist/chunks/{ViewContainer-CbO6vSvW.js.map → ViewContainer-x2yzKkIG.js.map} +1 -1
- package/dist/chunks/apiUtils-CudW_FKE.cjs +3 -0
- package/dist/chunks/apiUtils-CudW_FKE.cjs.map +1 -0
- package/dist/chunks/apiUtils-DfPv_gmI.js +2064 -0
- package/dist/chunks/apiUtils-DfPv_gmI.js.map +1 -0
- package/dist/chunks/{codeStore-CC9_8nmU.js → codeStore-DefmZVgs.js} +2 -2
- package/dist/chunks/{codeStore-CC9_8nmU.js.map → codeStore-DefmZVgs.js.map} +1 -1
- package/dist/chunks/{codeStore-DVUySb7V.cjs → codeStore-pQbDqWkZ.cjs} +2 -2
- package/dist/chunks/{codeStore-DVUySb7V.cjs.map → codeStore-pQbDqWkZ.cjs.map} +1 -1
- package/dist/chunks/{favoriteStore-Byy7k_UI.cjs → favoriteStore-BXBziAgB.cjs} +2 -2
- package/dist/chunks/{favoriteStore-Byy7k_UI.cjs.map → favoriteStore-BXBziAgB.cjs.map} +1 -1
- package/dist/chunks/{favoriteStore-DYiTW7cU.js → favoriteStore-DAPC01iF.js} +2 -2
- package/dist/chunks/{favoriteStore-DYiTW7cU.js.map → favoriteStore-DAPC01iF.js.map} +1 -1
- package/dist/chunks/{popupStore-wA4nh-mr.cjs → popupStore-BV632k5p.cjs} +2 -2
- package/dist/chunks/{popupStore-wA4nh-mr.cjs.map → popupStore-BV632k5p.cjs.map} +1 -1
- package/dist/chunks/{popupStore-C8-CPKwz.js → popupStore-CcQg9AvK.js} +2 -2
- package/dist/chunks/{popupStore-C8-CPKwz.js.map → popupStore-CcQg9AvK.js.map} +1 -1
- package/dist/chunks/{usePopup-D7c9t7AW.js → usePopup-Cw5xsOaH.js} +3 -3
- package/dist/chunks/{usePopup-D7c9t7AW.js.map → usePopup-Cw5xsOaH.js.map} +1 -1
- package/dist/chunks/{usePopup-6-TNfqyf.cjs → usePopup-DoVGuobp.cjs} +2 -2
- package/dist/chunks/{usePopup-6-TNfqyf.cjs.map → usePopup-DoVGuobp.cjs.map} +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +9 -9
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +6 -6
- package/dist/utils/commonUtils.d.ts +0 -6
- package/dist/utils/commonUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +2 -1
- package/dist/chunks/apiUtils-CH40MvpT.js +0 -1402
- package/dist/chunks/apiUtils-CH40MvpT.js.map +0 -1
- package/dist/chunks/apiUtils-D9cBQG0u.cjs +0 -3
- package/dist/chunks/apiUtils-D9cBQG0u.cjs.map +0 -1
|
@@ -1,1402 +0,0 @@
|
|
|
1
|
-
import re from "axios";
|
|
2
|
-
import L from "dayjs";
|
|
3
|
-
import { message as X, notification as $ } from "antd";
|
|
4
|
-
import { create as B } from "zustand";
|
|
5
|
-
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
|
-
function ne(e) {
|
|
7
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8
|
-
}
|
|
9
|
-
const me = {
|
|
10
|
-
// 권한 관련
|
|
11
|
-
AUTH_BTNS: "SCMSIGN00202",
|
|
12
|
-
// 버튼 권한 조회
|
|
13
|
-
AUTH_MENU: "SCMSIGN00201",
|
|
14
|
-
// 메뉴 권한 조회
|
|
15
|
-
SRCH_CODE: "SCMSIGN00301",
|
|
16
|
-
// 코드 조회
|
|
17
|
-
// 팝업 관련
|
|
18
|
-
SRCH_POPU: "SCMPOPU00101",
|
|
19
|
-
// 팝업 조회
|
|
20
|
-
// 즐겨찾기 관련
|
|
21
|
-
AUTH_BMRK: "SCMBMRK00101"
|
|
22
|
-
// 즐겨찾기 관리
|
|
23
|
-
};
|
|
24
|
-
let k = {};
|
|
25
|
-
function Le(e) {
|
|
26
|
-
k = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
|
|
27
|
-
}
|
|
28
|
-
function se(e) {
|
|
29
|
-
return k[e] && k[e].trim() !== "" ? k[e] : me[e];
|
|
30
|
-
}
|
|
31
|
-
function he() {
|
|
32
|
-
const e = {};
|
|
33
|
-
for (const r of Object.keys(me))
|
|
34
|
-
e[r] = se(r);
|
|
35
|
-
return e;
|
|
36
|
-
}
|
|
37
|
-
function Pe() {
|
|
38
|
-
console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
|
|
39
|
-
const e = he();
|
|
40
|
-
for (const [r, t] of Object.entries(e)) {
|
|
41
|
-
const n = k[r] ? "Provider 설정" : "기본값";
|
|
42
|
-
console.log(` ${r}: ${t} (${n})`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
46
|
-
__proto__: null,
|
|
47
|
-
getAllServiceCodes: he,
|
|
48
|
-
getServiceCode: se,
|
|
49
|
-
logServiceCodeConfig: Pe,
|
|
50
|
-
setServiceCodeOverrides: Le
|
|
51
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
52
|
-
import.meta.env.DEV;
|
|
53
|
-
function Ue(e, r) {
|
|
54
|
-
let t;
|
|
55
|
-
try {
|
|
56
|
-
t = e();
|
|
57
|
-
} catch {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
getItem: (s) => {
|
|
62
|
-
var a;
|
|
63
|
-
const i = (d) => d === null ? null : JSON.parse(d, void 0), m = (a = t.getItem(s)) != null ? a : null;
|
|
64
|
-
return m instanceof Promise ? m.then(i) : i(m);
|
|
65
|
-
},
|
|
66
|
-
setItem: (s, a) => t.setItem(s, JSON.stringify(a, void 0)),
|
|
67
|
-
removeItem: (s) => t.removeItem(s)
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
const Q = (e) => (r) => {
|
|
71
|
-
try {
|
|
72
|
-
const t = e(r);
|
|
73
|
-
return t instanceof Promise ? t : {
|
|
74
|
-
then(n) {
|
|
75
|
-
return Q(n)(t);
|
|
76
|
-
},
|
|
77
|
-
catch(n) {
|
|
78
|
-
return this;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
} catch (t) {
|
|
82
|
-
return {
|
|
83
|
-
then(n) {
|
|
84
|
-
return this;
|
|
85
|
-
},
|
|
86
|
-
catch(n) {
|
|
87
|
-
return Q(n)(t);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}, Ae = (e, r) => (t, n, s) => {
|
|
92
|
-
let a = {
|
|
93
|
-
storage: Ue(() => localStorage),
|
|
94
|
-
partialize: (o) => o,
|
|
95
|
-
version: 0,
|
|
96
|
-
merge: (o, f) => ({
|
|
97
|
-
...f,
|
|
98
|
-
...o
|
|
99
|
-
}),
|
|
100
|
-
...r
|
|
101
|
-
}, i = !1;
|
|
102
|
-
const m = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
103
|
-
let v = a.storage;
|
|
104
|
-
if (!v)
|
|
105
|
-
return e(
|
|
106
|
-
(...o) => {
|
|
107
|
-
console.warn(
|
|
108
|
-
`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`
|
|
109
|
-
), t(...o);
|
|
110
|
-
},
|
|
111
|
-
n,
|
|
112
|
-
s
|
|
113
|
-
);
|
|
114
|
-
const g = () => {
|
|
115
|
-
const o = a.partialize({ ...n() });
|
|
116
|
-
return v.setItem(a.name, {
|
|
117
|
-
state: o,
|
|
118
|
-
version: a.version
|
|
119
|
-
});
|
|
120
|
-
}, p = s.setState;
|
|
121
|
-
s.setState = (o, f) => (p(o, f), g());
|
|
122
|
-
const c = e(
|
|
123
|
-
(...o) => (t(...o), g()),
|
|
124
|
-
n,
|
|
125
|
-
s
|
|
126
|
-
);
|
|
127
|
-
s.getInitialState = () => c;
|
|
128
|
-
let u;
|
|
129
|
-
const l = () => {
|
|
130
|
-
var o, f;
|
|
131
|
-
if (!v) return;
|
|
132
|
-
i = !1, m.forEach((h) => {
|
|
133
|
-
var y;
|
|
134
|
-
return h((y = n()) != null ? y : c);
|
|
135
|
-
});
|
|
136
|
-
const M = ((f = a.onRehydrateStorage) == null ? void 0 : f.call(a, (o = n()) != null ? o : c)) || void 0;
|
|
137
|
-
return Q(v.getItem.bind(v))(a.name).then((h) => {
|
|
138
|
-
if (h)
|
|
139
|
-
if (typeof h.version == "number" && h.version !== a.version) {
|
|
140
|
-
if (a.migrate) {
|
|
141
|
-
const y = a.migrate(
|
|
142
|
-
h.state,
|
|
143
|
-
h.version
|
|
144
|
-
);
|
|
145
|
-
return y instanceof Promise ? y.then((w) => [!0, w]) : [!0, y];
|
|
146
|
-
}
|
|
147
|
-
console.error(
|
|
148
|
-
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
149
|
-
);
|
|
150
|
-
} else
|
|
151
|
-
return [!1, h.state];
|
|
152
|
-
return [!1, void 0];
|
|
153
|
-
}).then((h) => {
|
|
154
|
-
var y;
|
|
155
|
-
const [w, S] = h;
|
|
156
|
-
if (u = a.merge(
|
|
157
|
-
S,
|
|
158
|
-
(y = n()) != null ? y : c
|
|
159
|
-
), t(u, !0), w)
|
|
160
|
-
return g();
|
|
161
|
-
}).then(() => {
|
|
162
|
-
M?.(u, void 0), u = n(), i = !0, d.forEach((h) => h(u));
|
|
163
|
-
}).catch((h) => {
|
|
164
|
-
M?.(void 0, h);
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
return s.persist = {
|
|
168
|
-
setOptions: (o) => {
|
|
169
|
-
a = {
|
|
170
|
-
...a,
|
|
171
|
-
...o
|
|
172
|
-
}, o.storage && (v = o.storage);
|
|
173
|
-
},
|
|
174
|
-
clearStorage: () => {
|
|
175
|
-
v?.removeItem(a.name);
|
|
176
|
-
},
|
|
177
|
-
getOptions: () => a,
|
|
178
|
-
rehydrate: () => l(),
|
|
179
|
-
hasHydrated: () => i,
|
|
180
|
-
onHydrate: (o) => (m.add(o), () => {
|
|
181
|
-
m.delete(o);
|
|
182
|
-
}),
|
|
183
|
-
onFinishHydration: (o) => (d.add(o), () => {
|
|
184
|
-
d.delete(o);
|
|
185
|
-
})
|
|
186
|
-
}, a.skipHydration || l(), u || c;
|
|
187
|
-
}, ke = Ae, D = B()(
|
|
188
|
-
ke(
|
|
189
|
-
(e, r) => ({
|
|
190
|
-
user: null,
|
|
191
|
-
isLoggedIn: !1,
|
|
192
|
-
// 로그인
|
|
193
|
-
login: (t) => {
|
|
194
|
-
e({ user: t, isLoggedIn: !0 }), console.log("사용자 로그인:", t);
|
|
195
|
-
},
|
|
196
|
-
// 로그아웃
|
|
197
|
-
logout: () => {
|
|
198
|
-
e({ user: null, isLoggedIn: !1 }), console.log("사용자 로그아웃");
|
|
199
|
-
},
|
|
200
|
-
// 사용자 정보 업데이트
|
|
201
|
-
updateUser: (t) => {
|
|
202
|
-
const n = r().user;
|
|
203
|
-
n && e({ user: { ...n, ...t } });
|
|
204
|
-
}
|
|
205
|
-
}),
|
|
206
|
-
{
|
|
207
|
-
name: "user-storage",
|
|
208
|
-
// 로컬 스토리지 키
|
|
209
|
-
partialize: (e) => ({
|
|
210
|
-
user: e.user,
|
|
211
|
-
isLoggedIn: e.isLoggedIn
|
|
212
|
-
})
|
|
213
|
-
// 저장할 상태만 선택
|
|
214
|
-
}
|
|
215
|
-
)
|
|
216
|
-
), Ye = () => D.getState().user?.crprCd || null, ge = () => D.getState().user?.userId || null, pe = () => D.getState().user?.userNm || null, Fe = () => D.getState().user?.userDvsn || null, Re = () => D.getState().user?.emplNo || null, ye = () => D.getState().user?.dprtCd || null, ve = () => D.getState().user?.dprtNm || null, q = () => D.getState().user?.roleList || null, je = (e) => {
|
|
217
|
-
const r = q();
|
|
218
|
-
return r ? r.includes(e) : !1;
|
|
219
|
-
}, He = (e) => {
|
|
220
|
-
const r = q();
|
|
221
|
-
return r ? e.some((t) => r.includes(t)) : !1;
|
|
222
|
-
}, ze = (e) => {
|
|
223
|
-
const r = q();
|
|
224
|
-
return r ? e.every((t) => r.includes(t)) : !1;
|
|
225
|
-
}, Be = () => D.getState().isLoggedIn, W = () => D.getState().user, qe = () => W() !== null, We = () => {
|
|
226
|
-
const e = pe(), r = ge();
|
|
227
|
-
return e || r || null;
|
|
228
|
-
}, Ge = () => {
|
|
229
|
-
const e = ve(), r = ye();
|
|
230
|
-
return e || (r ? String(r) : null);
|
|
231
|
-
}, _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
232
|
-
__proto__: null,
|
|
233
|
-
getCrprCd: Ye,
|
|
234
|
-
getDepartmentInfo: Ge,
|
|
235
|
-
getDisplayName: We,
|
|
236
|
-
getDprtCd: ye,
|
|
237
|
-
getDprtNm: ve,
|
|
238
|
-
getEmplNo: Re,
|
|
239
|
-
getRoleList: q,
|
|
240
|
-
getUserDvsn: Fe,
|
|
241
|
-
getUserId: ge,
|
|
242
|
-
getUserInfo: W,
|
|
243
|
-
getUserNm: pe,
|
|
244
|
-
hasAllRoles: ze,
|
|
245
|
-
hasAnyRole: He,
|
|
246
|
-
hasRole: je,
|
|
247
|
-
hasUserInfo: qe,
|
|
248
|
-
isLoggedIn: Be
|
|
249
|
-
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
250
|
-
DEFAULT_PRNT_GBCD: 1
|
|
251
|
-
}, Ke = (e) => e && typeof e == "object" && typeof e.menuId == "string" && typeof e.menuNm == "string" && typeof e.crprCd == "string", ie = (e) => Array.isArray(e) && e.every(Ke);
|
|
252
|
-
let Z = [], ce = [];
|
|
253
|
-
const Je = (e) => {
|
|
254
|
-
if (e && typeof e == "object") {
|
|
255
|
-
const r = e;
|
|
256
|
-
if (r.menus && ie(r.menus)) return r.menus;
|
|
257
|
-
if (ie(e)) return e;
|
|
258
|
-
}
|
|
259
|
-
return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
|
|
260
|
-
}, Xe = (e, r) => !!r && e.crprCd === r.crprCd && e.userId === r.userId && (e.prntGbcd ?? ee.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? ee.DEFAULT_PRNT_GBCD), Ze = (e) => {
|
|
261
|
-
if (Z.length === e.length && Z.every(
|
|
262
|
-
(a, i) => a.menuId === e[i]?.menuId && a.menuPrntId === e[i]?.menuPrntId
|
|
263
|
-
))
|
|
264
|
-
return ce;
|
|
265
|
-
if (!e.length) return [];
|
|
266
|
-
const r = /* @__PURE__ */ new Map(), t = [];
|
|
267
|
-
e.forEach((a) => a?.menuId && r.set(a.menuId, { ...a, children: [] })), e.forEach((a) => {
|
|
268
|
-
const i = r.get(a.menuId);
|
|
269
|
-
i && (a.menuPrntId && a.menuPrntId !== "" && a.menuPrntId !== "-" ? r.get(a.menuPrntId)?.children?.push(i) : t.push(i));
|
|
270
|
-
});
|
|
271
|
-
const n = (a) => a.sort((i, m) => (i?.menuNo ?? 0) - (m?.menuNo ?? 0)).map((i) => ({
|
|
272
|
-
...i,
|
|
273
|
-
children: i.children && i.children.length ? n(i.children) : void 0
|
|
274
|
-
})), s = n(t);
|
|
275
|
-
return Z = [...e], ce = s, s;
|
|
276
|
-
}, Ve = B((e, r) => ({
|
|
277
|
-
// 📊 초기 상태값
|
|
278
|
-
menuList: [],
|
|
279
|
-
flatMenuList: [],
|
|
280
|
-
isLoading: !1,
|
|
281
|
-
error: null,
|
|
282
|
-
_lastFetchParams: null,
|
|
283
|
-
// 🔧 메뉴 모델 조회
|
|
284
|
-
// 서버에서 사용자별 메뉴 권한 데이터를 가져와서 트리/플랫 구조로 저장
|
|
285
|
-
fetchMenu: async ({ crprCd: t, userId: n, prntGbcd: s }) => {
|
|
286
|
-
const a = {
|
|
287
|
-
crprCd: t,
|
|
288
|
-
userId: n,
|
|
289
|
-
prntGbcd: s ?? ee.DEFAULT_PRNT_GBCD
|
|
290
|
-
};
|
|
291
|
-
if (Xe(a, r()._lastFetchParams)) {
|
|
292
|
-
console.log("✅ 중복 fetch 차단", a);
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
e({ isLoading: !0, error: null, _lastFetchParams: a });
|
|
296
|
-
try {
|
|
297
|
-
const i = await P(se("AUTH_MENU"), a), m = Je(i), d = Ze(m);
|
|
298
|
-
e({
|
|
299
|
-
flatMenuList: m,
|
|
300
|
-
// 평면 리스트 저장
|
|
301
|
-
menuList: d,
|
|
302
|
-
// 트리 구조 저장
|
|
303
|
-
isLoading: !1,
|
|
304
|
-
error: null
|
|
305
|
-
});
|
|
306
|
-
} catch (i) {
|
|
307
|
-
e({ isLoading: !1, error: i?.message ?? "메뉴 로드 실패" });
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
// 🔧 메뉴 모델 초기화
|
|
311
|
-
// 로그아웃 시나 사용자 변경 시 메뉴 모델 클리어
|
|
312
|
-
clearMenu: () => {
|
|
313
|
-
e({
|
|
314
|
-
menuList: [],
|
|
315
|
-
flatMenuList: [],
|
|
316
|
-
error: null,
|
|
317
|
-
_lastFetchParams: null
|
|
318
|
-
});
|
|
319
|
-
},
|
|
320
|
-
// 🔧 메뉴 ID로 메뉴 아이템 찾기
|
|
321
|
-
// URL 파라미터나 프로그래밍 방식으로 특정 메뉴를 찾을 때 사용
|
|
322
|
-
findMenuById: (t) => {
|
|
323
|
-
const { flatMenuList: n } = r();
|
|
324
|
-
return n.find((s) => s.menuId === t) ?? null;
|
|
325
|
-
}
|
|
326
|
-
})), V = {
|
|
327
|
-
MAX_TABS: 15
|
|
328
|
-
}, Me = B((e, r) => ({
|
|
329
|
-
// 📊 초기 상태값
|
|
330
|
-
activeMenuId: null,
|
|
331
|
-
activeMenuItem: null,
|
|
332
|
-
activeDetailItem: null,
|
|
333
|
-
tabs: [],
|
|
334
|
-
sidebarCollapsed: !1,
|
|
335
|
-
maxTabs: V.MAX_TABS,
|
|
336
|
-
tabProtectFlag: {},
|
|
337
|
-
tabParams: {},
|
|
338
|
-
componentLabelMap: {},
|
|
339
|
-
// 🔧 탭 추가 (메뉴 아이템 객체로)
|
|
340
|
-
// 사이드바에서 메뉴 클릭 시 호출되는 메인 함수
|
|
341
|
-
openTabFromMenu: (t, n) => {
|
|
342
|
-
const { tabs: s, activeMenuId: a } = r(), i = s.find((d) => d.key === t.menuId), m = s.find((d) => d.key === t.menuId);
|
|
343
|
-
if (i)
|
|
344
|
-
m != null ? (e({ activeMenuId: t.menuId, activeMenuItem: t }), r().setTabParams(t.menuId, n || {}), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId)) : X.warning("유효하지 않은 메뉴정보입니다.");
|
|
345
|
-
else {
|
|
346
|
-
if (s.length > V.MAX_TABS) {
|
|
347
|
-
console.warn("❌ 최대 탭 개수를 초과했습니다."), X.warning(
|
|
348
|
-
`최대 ${V.MAX_TABS}개의 탭만 열 수 있습니다.
|
|
349
|
-
기존 탭을 닫고 다시 시도해주세요.`
|
|
350
|
-
);
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
const d = {
|
|
354
|
-
key: t.menuId,
|
|
355
|
-
label: t.menuNm,
|
|
356
|
-
gubun: "M",
|
|
357
|
-
menuItem: t,
|
|
358
|
-
closable: !0
|
|
359
|
-
};
|
|
360
|
-
e({
|
|
361
|
-
tabs: [...s, d],
|
|
362
|
-
// 탭 목록에 추가
|
|
363
|
-
activeMenuId: t.menuId,
|
|
364
|
-
// 새 탭을 활성화
|
|
365
|
-
activeMenuItem: t
|
|
366
|
-
// 현재 프로그램으로 설정
|
|
367
|
-
}), r().setTabParams(t.menuId, n || {}), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId);
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
// 🔧 탭 추가 (메뉴 ID로)
|
|
371
|
-
// URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
|
|
372
|
-
openTabByMenuId: (t, n) => {
|
|
373
|
-
const s = Ve.getState().findMenuById(t);
|
|
374
|
-
s ? r().openTabFromMenu(s, n) : X.warning("메뉴 ID를 찾을 수 없습니다.");
|
|
375
|
-
},
|
|
376
|
-
openDetailView: (t, n, s) => {
|
|
377
|
-
const { tabs: a, activeMenuId: i } = r();
|
|
378
|
-
if (a.find((d) => d.key === t.viewId))
|
|
379
|
-
r().focusTab(t.viewId);
|
|
380
|
-
else {
|
|
381
|
-
const d = {
|
|
382
|
-
key: t.viewId,
|
|
383
|
-
label: t.viewLabel,
|
|
384
|
-
gubun: "C",
|
|
385
|
-
componentItem: {
|
|
386
|
-
scrnPath: n,
|
|
387
|
-
prsnInfoYn: s,
|
|
388
|
-
prntInfo: t.prntInfo
|
|
389
|
-
},
|
|
390
|
-
closable: !0
|
|
391
|
-
};
|
|
392
|
-
e({
|
|
393
|
-
tabs: [...a, d],
|
|
394
|
-
// 탭 목록에 추가
|
|
395
|
-
activeMenuId: t.viewId,
|
|
396
|
-
// 새 탭을 활성화
|
|
397
|
-
activeDetailItem: t
|
|
398
|
-
}), r().setTabParams(t.viewId, t.viewParams || {});
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
// 🔧 탭 제거
|
|
402
|
-
// X 버튼 클릭 시 탭을 닫고 관련 상태도 정리
|
|
403
|
-
closeTab: (t) => {
|
|
404
|
-
const { tabs: n, activeMenuId: s } = r();
|
|
405
|
-
n.find((m) => m.key === t);
|
|
406
|
-
const a = n.filter((m) => m.key !== t);
|
|
407
|
-
let i = s;
|
|
408
|
-
if (s === t) {
|
|
409
|
-
const m = n.findIndex((d) => d.key === t);
|
|
410
|
-
i = a.length ? a[Math.min(m, a.length - 1)]?.key ?? null : null;
|
|
411
|
-
}
|
|
412
|
-
e({
|
|
413
|
-
tabs: a
|
|
414
|
-
}), i && r().focusTab(i);
|
|
415
|
-
},
|
|
416
|
-
// 🔧 활성 탭 변경
|
|
417
|
-
// 탭 헤더 클릭 시 해당 탭으로 전환
|
|
418
|
-
focusTab: (t) => {
|
|
419
|
-
const { tabs: n } = r(), s = n.find((a) => a.key === t);
|
|
420
|
-
if (s) {
|
|
421
|
-
const a = s.gubun === "C" ? {
|
|
422
|
-
viewId: s.key,
|
|
423
|
-
viewLabel: s.label,
|
|
424
|
-
prntInfo: s.componentItem?.prntInfo
|
|
425
|
-
} : null;
|
|
426
|
-
s.menuItem?.prsnInfoYn === "Y" ? (e({
|
|
427
|
-
activeMenuId: t,
|
|
428
|
-
activeMenuItem: s.menuItem,
|
|
429
|
-
activeDetailItem: a
|
|
430
|
-
}), console.log(
|
|
431
|
-
"✅ 탭 포커스 (개인정보) - activeMenuItem:",
|
|
432
|
-
s.menuItem
|
|
433
|
-
), r().setProtectFlagForKey(t)) : (e({
|
|
434
|
-
activeMenuId: t,
|
|
435
|
-
activeMenuItem: s.menuItem,
|
|
436
|
-
activeDetailItem: a
|
|
437
|
-
}), r().clearProtectFlagForKey(t));
|
|
438
|
-
} else
|
|
439
|
-
e({ activeMenuId: t, activeMenuItem: null, activeDetailItem: null }), console.warn("❌ 탭을 찾을 수 없음:", t);
|
|
440
|
-
},
|
|
441
|
-
// 🔧 모든 탭 제거
|
|
442
|
-
// 로그아웃이나 전체 초기화 시 사용
|
|
443
|
-
closeAllTabs: () => e({ tabs: [], activeMenuId: null, activeMenuItem: null, activeDetailItem: null }),
|
|
444
|
-
// 🔧 사이드바 토글
|
|
445
|
-
// 햄버거 메뉴 클릭 시 사이드바 접기/펼치기
|
|
446
|
-
toggleSidebar: () => e((t) => ({ sidebarCollapsed: !t.sidebarCollapsed })),
|
|
447
|
-
// useMenuViewStore.ts
|
|
448
|
-
reorderTabs: (t) => e((n) => {
|
|
449
|
-
const s = new Map(n.tabs.map((a) => [a.key, a]));
|
|
450
|
-
return { tabs: t.map((a) => s.get(a)).filter(Boolean) };
|
|
451
|
-
}),
|
|
452
|
-
// 개인정보 포함여부에 따른 탭 잠금 Flag 설정
|
|
453
|
-
setProtectFlagForKey: (t) => e((n) => ({
|
|
454
|
-
tabProtectFlag: { ...n.tabProtectFlag, [t]: !0 }
|
|
455
|
-
})),
|
|
456
|
-
// 개인정보 포함여부에 따른 탭 잠금 해제
|
|
457
|
-
clearProtectFlagForKey: (t) => e((n) => {
|
|
458
|
-
const s = { ...n.tabProtectFlag };
|
|
459
|
-
return delete s[t], { tabProtectFlag: s };
|
|
460
|
-
}),
|
|
461
|
-
// 탭 파라미터 설정
|
|
462
|
-
setTabParams: (t, n) => e((s) => {
|
|
463
|
-
const a = s.tabParams[t] || {}, i = { ...n || {} };
|
|
464
|
-
return Object.keys(a).length === Object.keys(i).length && Object.keys(i).every((d) => a[d] === i[d]) ? s : {
|
|
465
|
-
tabParams: { ...s.tabParams, [t]: i }
|
|
466
|
-
};
|
|
467
|
-
}),
|
|
468
|
-
// 컴포넌트 라벨 맵 설정
|
|
469
|
-
setComponentLabelMap: (t, n) => e({ componentLabelMap: t })
|
|
470
|
-
})), te = B((e) => ({
|
|
471
|
-
requestCount: 0,
|
|
472
|
-
loading: !1,
|
|
473
|
-
showLoading: () => e((r) => {
|
|
474
|
-
const t = r.requestCount + 1;
|
|
475
|
-
return { requestCount: t, loading: t > 0 };
|
|
476
|
-
}),
|
|
477
|
-
hideLoading: () => e((r) => {
|
|
478
|
-
const t = Math.max(0, r.requestCount - 1);
|
|
479
|
-
return { requestCount: t, loading: t > 0 };
|
|
480
|
-
})
|
|
481
|
-
}));
|
|
482
|
-
var F = { exports: {} }, Qe = F.exports, ue;
|
|
483
|
-
function et() {
|
|
484
|
-
return ue || (ue = 1, (function(e, r) {
|
|
485
|
-
(function(t, n) {
|
|
486
|
-
e.exports = n(L);
|
|
487
|
-
})(Qe, (function(t) {
|
|
488
|
-
function n(i) {
|
|
489
|
-
return i && typeof i == "object" && "default" in i ? i : { default: i };
|
|
490
|
-
}
|
|
491
|
-
var s = n(t), a = { name: "ko", weekdays: "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"), weekdaysShort: "일_월_화_수_목_금_토".split("_"), weekdaysMin: "일_월_화_수_목_금_토".split("_"), months: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), monthsShort: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), ordinal: function(i) {
|
|
492
|
-
return i + "일";
|
|
493
|
-
}, formats: { LT: "A h:mm", LTS: "A h:mm:ss", L: "YYYY.MM.DD.", LL: "YYYY년 MMMM D일", LLL: "YYYY년 MMMM D일 A h:mm", LLLL: "YYYY년 MMMM D일 dddd A h:mm", l: "YYYY.MM.DD.", ll: "YYYY년 MMMM D일", lll: "YYYY년 MMMM D일 A h:mm", llll: "YYYY년 MMMM D일 dddd A h:mm" }, meridiem: function(i) {
|
|
494
|
-
return i < 12 ? "오전" : "오후";
|
|
495
|
-
}, relativeTime: { future: "%s 후", past: "%s 전", s: "몇 초", m: "1분", mm: "%d분", h: "한 시간", hh: "%d시간", d: "하루", dd: "%d일", M: "한 달", MM: "%d달", y: "일 년", yy: "%d년" } };
|
|
496
|
-
return s.default.locale(a, null, !0), a;
|
|
497
|
-
}));
|
|
498
|
-
})(F)), F.exports;
|
|
499
|
-
}
|
|
500
|
-
et();
|
|
501
|
-
var R = { exports: {} }, tt = R.exports, le;
|
|
502
|
-
function rt() {
|
|
503
|
-
return le || (le = 1, (function(e, r) {
|
|
504
|
-
(function(t, n) {
|
|
505
|
-
e.exports = n();
|
|
506
|
-
})(tt, (function() {
|
|
507
|
-
return function(t, n, s) {
|
|
508
|
-
t = t || {};
|
|
509
|
-
var a = n.prototype, i = { 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" };
|
|
510
|
-
function m(v, g, p, c) {
|
|
511
|
-
return a.fromToBase(v, g, p, c);
|
|
512
|
-
}
|
|
513
|
-
s.en.relativeTime = i, a.fromToBase = function(v, g, p, c, u) {
|
|
514
|
-
for (var l, o, f, M = p.$locale().relativeTime || i, h = t.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" }], y = h.length, w = 0; w < y; w += 1) {
|
|
515
|
-
var S = h[w];
|
|
516
|
-
S.d && (l = c ? s(v).diff(p, S.d, !0) : p.diff(v, S.d, !0));
|
|
517
|
-
var C = (t.rounding || Math.round)(Math.abs(l));
|
|
518
|
-
if (f = l > 0, C <= S.r || !S.r) {
|
|
519
|
-
C <= 1 && w > 0 && (S = h[w - 1]);
|
|
520
|
-
var I = M[S.l];
|
|
521
|
-
u && (C = u("" + C)), o = typeof I == "string" ? I.replace("%d", C) : I(C, g, S.l, f);
|
|
522
|
-
break;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
if (g) return o;
|
|
526
|
-
var _ = f ? M.future : M.past;
|
|
527
|
-
return typeof _ == "function" ? _(o) : _.replace("%s", o);
|
|
528
|
-
}, a.to = function(v, g) {
|
|
529
|
-
return m(v, g, this, !0);
|
|
530
|
-
}, a.from = function(v, g) {
|
|
531
|
-
return m(v, g, this);
|
|
532
|
-
};
|
|
533
|
-
var d = function(v) {
|
|
534
|
-
return v.$u ? s.utc() : s();
|
|
535
|
-
};
|
|
536
|
-
a.toNow = function(v) {
|
|
537
|
-
return this.to(d(this), v);
|
|
538
|
-
}, a.fromNow = function(v) {
|
|
539
|
-
return this.from(d(this), v);
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
}));
|
|
543
|
-
})(R)), R.exports;
|
|
544
|
-
}
|
|
545
|
-
var nt = rt();
|
|
546
|
-
const st = /* @__PURE__ */ ne(nt);
|
|
547
|
-
var j = { exports: {} }, ot = j.exports, de;
|
|
548
|
-
function at() {
|
|
549
|
-
return de || (de = 1, (function(e, r) {
|
|
550
|
-
(function(t, n) {
|
|
551
|
-
e.exports = n();
|
|
552
|
-
})(ot, (function() {
|
|
553
|
-
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
|
|
554
|
-
return function(s, a, i) {
|
|
555
|
-
var m, d = function(c, u, l) {
|
|
556
|
-
l === void 0 && (l = {});
|
|
557
|
-
var o = new Date(c), f = (function(M, h) {
|
|
558
|
-
h === void 0 && (h = {});
|
|
559
|
-
var y = h.timeZoneName || "short", w = M + "|" + y, S = n[w];
|
|
560
|
-
return S || (S = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: M, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: y }), n[w] = S), S;
|
|
561
|
-
})(u, l);
|
|
562
|
-
return f.formatToParts(o);
|
|
563
|
-
}, v = function(c, u) {
|
|
564
|
-
for (var l = d(c, u), o = [], f = 0; f < l.length; f += 1) {
|
|
565
|
-
var M = l[f], h = M.type, y = M.value, w = t[h];
|
|
566
|
-
w >= 0 && (o[w] = parseInt(y, 10));
|
|
567
|
-
}
|
|
568
|
-
var S = o[3], C = S === 24 ? 0 : S, I = o[0] + "-" + o[1] + "-" + o[2] + " " + C + ":" + o[4] + ":" + o[5] + ":000", _ = +c;
|
|
569
|
-
return (i.utc(I).valueOf() - (_ -= _ % 1e3)) / 6e4;
|
|
570
|
-
}, g = a.prototype;
|
|
571
|
-
g.tz = function(c, u) {
|
|
572
|
-
c === void 0 && (c = m);
|
|
573
|
-
var l, o = this.utcOffset(), f = this.toDate(), M = f.toLocaleString("en-US", { timeZone: c }), h = Math.round((f - new Date(M)) / 1e3 / 60), y = 15 * -Math.round(f.getTimezoneOffset() / 15) - h;
|
|
574
|
-
if (!Number(y)) l = this.utcOffset(0, u);
|
|
575
|
-
else if (l = i(M, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(y, !0), u) {
|
|
576
|
-
var w = l.utcOffset();
|
|
577
|
-
l = l.add(o - w, "minute");
|
|
578
|
-
}
|
|
579
|
-
return l.$x.$timezone = c, l;
|
|
580
|
-
}, g.offsetName = function(c) {
|
|
581
|
-
var u = this.$x.$timezone || i.tz.guess(), l = d(this.valueOf(), u, { timeZoneName: c }).find((function(o) {
|
|
582
|
-
return o.type.toLowerCase() === "timezonename";
|
|
583
|
-
}));
|
|
584
|
-
return l && l.value;
|
|
585
|
-
};
|
|
586
|
-
var p = g.startOf;
|
|
587
|
-
g.startOf = function(c, u) {
|
|
588
|
-
if (!this.$x || !this.$x.$timezone) return p.call(this, c, u);
|
|
589
|
-
var l = i(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
590
|
-
return p.call(l, c, u).tz(this.$x.$timezone, !0);
|
|
591
|
-
}, i.tz = function(c, u, l) {
|
|
592
|
-
var o = l && u, f = l || u || m, M = v(+i(), f);
|
|
593
|
-
if (typeof c != "string") return i(c).tz(f);
|
|
594
|
-
var h = (function(C, I, _) {
|
|
595
|
-
var N = C - 60 * I * 1e3, U = v(N, _);
|
|
596
|
-
if (I === U) return [N, I];
|
|
597
|
-
var J = v(N -= 60 * (U - I) * 1e3, _);
|
|
598
|
-
return U === J ? [N, U] : [C - 60 * Math.min(U, J) * 1e3, Math.max(U, J)];
|
|
599
|
-
})(i.utc(c, o).valueOf(), M, f), y = h[0], w = h[1], S = i(y).utcOffset(w);
|
|
600
|
-
return S.$x.$timezone = f, S;
|
|
601
|
-
}, i.tz.guess = function() {
|
|
602
|
-
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
603
|
-
}, i.tz.setDefault = function(c) {
|
|
604
|
-
m = c;
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
}));
|
|
608
|
-
})(j)), j.exports;
|
|
609
|
-
}
|
|
610
|
-
var it = at();
|
|
611
|
-
const ct = /* @__PURE__ */ ne(it);
|
|
612
|
-
var H = { exports: {} }, ut = H.exports, fe;
|
|
613
|
-
function lt() {
|
|
614
|
-
return fe || (fe = 1, (function(e, r) {
|
|
615
|
-
(function(t, n) {
|
|
616
|
-
e.exports = n();
|
|
617
|
-
})(ut, (function() {
|
|
618
|
-
var t = "minute", n = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
619
|
-
return function(a, i, m) {
|
|
620
|
-
var d = i.prototype;
|
|
621
|
-
m.utc = function(o) {
|
|
622
|
-
var f = { date: o, utc: !0, args: arguments };
|
|
623
|
-
return new i(f);
|
|
624
|
-
}, d.utc = function(o) {
|
|
625
|
-
var f = m(this.toDate(), { locale: this.$L, utc: !0 });
|
|
626
|
-
return o ? f.add(this.utcOffset(), t) : f;
|
|
627
|
-
}, d.local = function() {
|
|
628
|
-
return m(this.toDate(), { locale: this.$L, utc: !1 });
|
|
629
|
-
};
|
|
630
|
-
var v = d.parse;
|
|
631
|
-
d.parse = function(o) {
|
|
632
|
-
o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), v.call(this, o);
|
|
633
|
-
};
|
|
634
|
-
var g = d.init;
|
|
635
|
-
d.init = function() {
|
|
636
|
-
if (this.$u) {
|
|
637
|
-
var o = this.$d;
|
|
638
|
-
this.$y = o.getUTCFullYear(), this.$M = o.getUTCMonth(), this.$D = o.getUTCDate(), this.$W = o.getUTCDay(), this.$H = o.getUTCHours(), this.$m = o.getUTCMinutes(), this.$s = o.getUTCSeconds(), this.$ms = o.getUTCMilliseconds();
|
|
639
|
-
} else g.call(this);
|
|
640
|
-
};
|
|
641
|
-
var p = d.utcOffset;
|
|
642
|
-
d.utcOffset = function(o, f) {
|
|
643
|
-
var M = this.$utils().u;
|
|
644
|
-
if (M(o)) return this.$u ? 0 : M(this.$offset) ? p.call(this) : this.$offset;
|
|
645
|
-
if (typeof o == "string" && (o = (function(S) {
|
|
646
|
-
S === void 0 && (S = "");
|
|
647
|
-
var C = S.match(n);
|
|
648
|
-
if (!C) return null;
|
|
649
|
-
var I = ("" + C[0]).match(s) || ["-", 0, 0], _ = I[0], N = 60 * +I[1] + +I[2];
|
|
650
|
-
return N === 0 ? 0 : _ === "+" ? N : -N;
|
|
651
|
-
})(o), o === null)) return this;
|
|
652
|
-
var h = Math.abs(o) <= 16 ? 60 * o : o, y = this;
|
|
653
|
-
if (f) return y.$offset = h, y.$u = o === 0, y;
|
|
654
|
-
if (o !== 0) {
|
|
655
|
-
var w = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
656
|
-
(y = this.local().add(h + w, t)).$offset = h, y.$x.$localOffset = w;
|
|
657
|
-
} else y = this.utc();
|
|
658
|
-
return y;
|
|
659
|
-
};
|
|
660
|
-
var c = d.format;
|
|
661
|
-
d.format = function(o) {
|
|
662
|
-
var f = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
663
|
-
return c.call(this, f);
|
|
664
|
-
}, d.valueOf = function() {
|
|
665
|
-
var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
666
|
-
return this.$d.valueOf() - 6e4 * o;
|
|
667
|
-
}, d.isUTC = function() {
|
|
668
|
-
return !!this.$u;
|
|
669
|
-
}, d.toISOString = function() {
|
|
670
|
-
return this.toDate().toISOString();
|
|
671
|
-
}, d.toString = function() {
|
|
672
|
-
return this.toDate().toUTCString();
|
|
673
|
-
};
|
|
674
|
-
var u = d.toDate;
|
|
675
|
-
d.toDate = function(o) {
|
|
676
|
-
return o === "s" && this.$offset ? m(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : u.call(this);
|
|
677
|
-
};
|
|
678
|
-
var l = d.diff;
|
|
679
|
-
d.diff = function(o, f, M) {
|
|
680
|
-
if (o && this.$u === o.$u) return l.call(this, o, f, M);
|
|
681
|
-
var h = this.local(), y = m(o).local();
|
|
682
|
-
return l.call(h, y, f, M);
|
|
683
|
-
};
|
|
684
|
-
};
|
|
685
|
-
}));
|
|
686
|
-
})(H)), H.exports;
|
|
687
|
-
}
|
|
688
|
-
var dt = lt();
|
|
689
|
-
const ft = /* @__PURE__ */ ne(dt), mt = "ui_theme", ht = (e) => typeof e == "string", gt = (e) => typeof e == "number" && !isNaN(e), pt = (e) => typeof e == "boolean", yt = (e) => typeof e == "function", vt = (e) => e !== null && typeof e == "object", Mt = (e) => Array.isArray(e), St = (e) => e === null, wt = (e) => e === void 0, Tt = (e) => e == null, Ct = (e, r) => {
|
|
690
|
-
let t = 0;
|
|
691
|
-
return (...n) => {
|
|
692
|
-
const s = Date.now();
|
|
693
|
-
s - t >= r && (t = s, e(...n));
|
|
694
|
-
};
|
|
695
|
-
}, It = (e, r) => {
|
|
696
|
-
let t;
|
|
697
|
-
return (...n) => {
|
|
698
|
-
clearTimeout(t), t = setTimeout(() => e(...n), r);
|
|
699
|
-
};
|
|
700
|
-
}, _t = async (e) => {
|
|
701
|
-
try {
|
|
702
|
-
return await navigator.clipboard.writeText(e), !0;
|
|
703
|
-
} catch (r) {
|
|
704
|
-
return console.error("Error copying to clipboard:", r), !1;
|
|
705
|
-
}
|
|
706
|
-
}, G = () => {
|
|
707
|
-
const e = window.innerWidth;
|
|
708
|
-
return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
|
|
709
|
-
}, bt = () => G() === "mobile", xt = () => G() === "tablet", Dt = () => G() === "desktop", Nt = () => "#" + Math.floor(Math.random() * 16777215).toString(16), K = (e) => !e || e.length === 0, Ot = (e) => [...new Set(e)], $t = (e) => {
|
|
710
|
-
if (!K(e))
|
|
711
|
-
return Math.max(...e);
|
|
712
|
-
}, Et = (e) => {
|
|
713
|
-
if (!K(e))
|
|
714
|
-
return Math.min(...e);
|
|
715
|
-
}, Lt = (e) => {
|
|
716
|
-
if (!K(e))
|
|
717
|
-
return e.reduce((r, t) => r + t, 0) / e.length;
|
|
718
|
-
}, Pt = (e) => e.reduce((r, t) => r + t, 0), Ut = (e, r) => e.filter(r).length, At = (e) => [...e].reverse(), kt = (e) => {
|
|
719
|
-
const r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
720
|
-
return e.forEach((n) => {
|
|
721
|
-
r.has(n) ? t.add(n) : r.add(n);
|
|
722
|
-
}), Array.from(t);
|
|
723
|
-
}, Yt = (e, r) => Math.random() * (r - e) + e, Ft = (e, r, t) => Math.min(Math.max(e, r), t), Rt = (e, r = 0) => Math.round(e * Math.pow(10, r)) / Math.pow(10, r), jt = (e, r) => {
|
|
724
|
-
try {
|
|
725
|
-
sessionStorage.setItem(e, JSON.stringify(r));
|
|
726
|
-
} catch (t) {
|
|
727
|
-
console.error("Error saving to sessionStorage:", t);
|
|
728
|
-
}
|
|
729
|
-
}, Ht = (e, r) => {
|
|
730
|
-
try {
|
|
731
|
-
const t = sessionStorage.getItem(e);
|
|
732
|
-
return t ? JSON.parse(t) : r || null;
|
|
733
|
-
} catch (t) {
|
|
734
|
-
return console.error("Error reading from sessionStorage:", t), r || null;
|
|
735
|
-
}
|
|
736
|
-
}, zt = (e) => {
|
|
737
|
-
try {
|
|
738
|
-
sessionStorage.removeItem(e);
|
|
739
|
-
} catch (r) {
|
|
740
|
-
console.error("Error removing from sessionStorage:", r);
|
|
741
|
-
}
|
|
742
|
-
}, Bt = () => {
|
|
743
|
-
try {
|
|
744
|
-
sessionStorage.clear();
|
|
745
|
-
} catch (e) {
|
|
746
|
-
console.error("Error clearing sessionStorage:", e);
|
|
747
|
-
}
|
|
748
|
-
}, qt = (e, r, t = 30) => {
|
|
749
|
-
const n = /* @__PURE__ */ new Date();
|
|
750
|
-
n.setTime(n.getTime() + t * 24 * 60 * 60 * 1e3), document.cookie = `${e}=${r};expires=${n.toUTCString()};path=/`;
|
|
751
|
-
}, Wt = (e) => {
|
|
752
|
-
const r = e + "=", t = document.cookie.split(";");
|
|
753
|
-
for (let n = 0; n < t.length; n++) {
|
|
754
|
-
let s = t[n];
|
|
755
|
-
for (; s.charAt(0) === " "; ) s = s.substring(1, s.length);
|
|
756
|
-
if (s.indexOf(r) === 0) return s.substring(r.length, s.length);
|
|
757
|
-
}
|
|
758
|
-
return null;
|
|
759
|
-
}, Gt = (e) => {
|
|
760
|
-
document.cookie = `${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
|
|
761
|
-
}, Se = (e) => typeof e != "string" ? !e : e.trim().length === 0, Kt = (e, r) => Se(e) ? r : e || "", Jt = (e) => e.replace(/-([a-z])/g, (r) => r[1].toUpperCase()), Xt = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), Zt = (e) => {
|
|
762
|
-
try {
|
|
763
|
-
return new URL(e), !0;
|
|
764
|
-
} catch {
|
|
765
|
-
return !1;
|
|
766
|
-
}
|
|
767
|
-
}, Vt = (e, r, t = " ") => e.padStart(r, t), Qt = (e, r, t = " ") => e.padEnd(r, t), we = (e, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
|
|
768
|
-
let t = "";
|
|
769
|
-
for (let n = 0; n < e; n++)
|
|
770
|
-
t += r.charAt(Math.floor(Math.random() * r.length));
|
|
771
|
-
return t;
|
|
772
|
-
}, er = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
773
|
-
const r = Math.random() * 16 | 0;
|
|
774
|
-
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
775
|
-
}), Te = (e = 32) => {
|
|
776
|
-
const t = er().replace(/-/g, "");
|
|
777
|
-
return e >= 32 ? t + we(e - 32, "0123456789abcdef") : t.substring(0, e);
|
|
778
|
-
};
|
|
779
|
-
async function tr(e) {
|
|
780
|
-
const r = new TextEncoder().encode(e), t = await crypto.subtle.digest("SHA-256", r);
|
|
781
|
-
let n = "";
|
|
782
|
-
for (const s of new Uint8Array(t)) n += String.fromCharCode(s);
|
|
783
|
-
return btoa(n);
|
|
784
|
-
}
|
|
785
|
-
L.extend(st);
|
|
786
|
-
L.extend(ft);
|
|
787
|
-
L.extend(ct);
|
|
788
|
-
L.locale("ko");
|
|
789
|
-
const rr = () => L(), nr = (e = "YYYY-MM-DD") => L().format(e), br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
790
|
-
__proto__: null,
|
|
791
|
-
THEME_COOKIE_NAME: mt,
|
|
792
|
-
arrAverage: Lt,
|
|
793
|
-
arrCount: Ut,
|
|
794
|
-
arrMax: $t,
|
|
795
|
-
arrMin: Et,
|
|
796
|
-
arrReverse: At,
|
|
797
|
-
arrSum: Pt,
|
|
798
|
-
arrUnique: Ot,
|
|
799
|
-
clamp: Ft,
|
|
800
|
-
clearSessionStorage: Bt,
|
|
801
|
-
copyToClipboard: _t,
|
|
802
|
-
debounce: It,
|
|
803
|
-
deleteCookie: Gt,
|
|
804
|
-
duplicates: kt,
|
|
805
|
-
encryptSha256: tr,
|
|
806
|
-
generateRandomColor: Nt,
|
|
807
|
-
generateRandomString: we,
|
|
808
|
-
generateUID: Te,
|
|
809
|
-
getCookie: Wt,
|
|
810
|
-
getCurrentDate: rr,
|
|
811
|
-
getCurrentDateString: nr,
|
|
812
|
-
getDeviceType: G,
|
|
813
|
-
getSessionStorage: Ht,
|
|
814
|
-
isArray: Mt,
|
|
815
|
-
isBoolean: pt,
|
|
816
|
-
isDesktop: Dt,
|
|
817
|
-
isEmpty: Se,
|
|
818
|
-
isEmptyArray: K,
|
|
819
|
-
isFunction: yt,
|
|
820
|
-
isMobile: bt,
|
|
821
|
-
isNull: St,
|
|
822
|
-
isNullOrUndefined: Tt,
|
|
823
|
-
isNumber: gt,
|
|
824
|
-
isObject: vt,
|
|
825
|
-
isSafeEmpty: Kt,
|
|
826
|
-
isString: ht,
|
|
827
|
-
isTablet: xt,
|
|
828
|
-
isUndefined: wt,
|
|
829
|
-
isValidEmail: Xt,
|
|
830
|
-
isValidUrl: Zt,
|
|
831
|
-
padLeft: Vt,
|
|
832
|
-
padRight: Qt,
|
|
833
|
-
random: Yt,
|
|
834
|
-
removeSessionStorage: zt,
|
|
835
|
-
round: Rt,
|
|
836
|
-
setCookie: qt,
|
|
837
|
-
setSessionStorage: jt,
|
|
838
|
-
throttle: Ct,
|
|
839
|
-
toCamelCase: Jt
|
|
840
|
-
}, Symbol.toStringTag, { value: "Module" })), E = (() => {
|
|
841
|
-
try {
|
|
842
|
-
if (import.meta.env.DEV)
|
|
843
|
-
return !0;
|
|
844
|
-
} catch {
|
|
845
|
-
}
|
|
846
|
-
return !1;
|
|
847
|
-
})();
|
|
848
|
-
let Ce = [], Ie = [];
|
|
849
|
-
function sr(e) {
|
|
850
|
-
e.devHosts && (Ce = e.devHosts), e.prodHosts && (Ie = e.prodHosts);
|
|
851
|
-
}
|
|
852
|
-
function _e() {
|
|
853
|
-
if (typeof window < "u" && window.location)
|
|
854
|
-
return window.location.hostname;
|
|
855
|
-
}
|
|
856
|
-
const be = (() => {
|
|
857
|
-
const e = _e();
|
|
858
|
-
return !!(e && Ce.includes(e));
|
|
859
|
-
})(), xe = (() => {
|
|
860
|
-
const e = _e();
|
|
861
|
-
return !!(e && Ie.includes(e));
|
|
862
|
-
})();
|
|
863
|
-
function or() {
|
|
864
|
-
return E ? "X" : be ? "D" : xe ? "P" : "X";
|
|
865
|
-
}
|
|
866
|
-
const xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
867
|
-
__proto__: null,
|
|
868
|
-
configureEnvUtils: sr,
|
|
869
|
-
getEnvCode: or,
|
|
870
|
-
isDev: be,
|
|
871
|
-
isLocal: E,
|
|
872
|
-
isProd: xe
|
|
873
|
-
}, Symbol.toStringTag, { value: "Module" })), b = {
|
|
874
|
-
duration: 4.5,
|
|
875
|
-
// 4.5초
|
|
876
|
-
placement: "topRight"
|
|
877
|
-
};
|
|
878
|
-
class A {
|
|
879
|
-
constructor() {
|
|
880
|
-
}
|
|
881
|
-
static getInstance() {
|
|
882
|
-
return A.instance || (A.instance = new A()), A.instance;
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* BwgError 전용 에러 알림
|
|
886
|
-
* @param props - 에러 메시지 설정
|
|
887
|
-
*/
|
|
888
|
-
showBwgError(r) {
|
|
889
|
-
const {
|
|
890
|
-
message: t,
|
|
891
|
-
description: n,
|
|
892
|
-
duration: s = b.duration,
|
|
893
|
-
placement: a = b.placement
|
|
894
|
-
} = r;
|
|
895
|
-
$.error({
|
|
896
|
-
message: `${t}`,
|
|
897
|
-
description: n || "오류가 발생했습니다. 다시 시도해주세요.",
|
|
898
|
-
duration: s,
|
|
899
|
-
placement: a,
|
|
900
|
-
style: {
|
|
901
|
-
borderLeft: "4px solid #ff4d4f",
|
|
902
|
-
backgroundColor: "#fff2f0"
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* 성공 알림
|
|
908
|
-
*/
|
|
909
|
-
showSuccess(r, t, n) {
|
|
910
|
-
$.success({
|
|
911
|
-
message: `${r}`,
|
|
912
|
-
description: t,
|
|
913
|
-
duration: n || b.duration,
|
|
914
|
-
placement: b.placement
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* 정보 알림
|
|
919
|
-
*/
|
|
920
|
-
showInfo(r, t, n) {
|
|
921
|
-
$.info({
|
|
922
|
-
message: `${r}`,
|
|
923
|
-
description: t,
|
|
924
|
-
duration: n || b.duration,
|
|
925
|
-
placement: b.placement
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
/**
|
|
929
|
-
* 경고 알림
|
|
930
|
-
*/
|
|
931
|
-
showWarning(r, t, n) {
|
|
932
|
-
$.warning({
|
|
933
|
-
message: `${r}`,
|
|
934
|
-
description: t,
|
|
935
|
-
duration: n || b.duration,
|
|
936
|
-
placement: b.placement
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
/**
|
|
940
|
-
* 일반 에러 알림
|
|
941
|
-
*/
|
|
942
|
-
showError(r, t, n) {
|
|
943
|
-
$.error({
|
|
944
|
-
message: `${r}`,
|
|
945
|
-
description: t,
|
|
946
|
-
duration: n || b.duration,
|
|
947
|
-
placement: b.placement
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* 모든 알림 닫기
|
|
952
|
-
*/
|
|
953
|
-
destroy() {
|
|
954
|
-
$.destroy();
|
|
955
|
-
}
|
|
956
|
-
/**
|
|
957
|
-
* 특정 키의 알림 닫기
|
|
958
|
-
*/
|
|
959
|
-
close(r) {
|
|
960
|
-
$.destroy();
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
const O = A.getInstance(), De = (e) => {
|
|
964
|
-
O.showBwgError(e);
|
|
965
|
-
}, ar = (e, r, t) => {
|
|
966
|
-
O.showSuccess(e, r, t);
|
|
967
|
-
}, Ne = (e, r, t) => {
|
|
968
|
-
O.showInfo(e, r, t);
|
|
969
|
-
}, Oe = (e, r, t) => {
|
|
970
|
-
O.showWarning(e, r, t);
|
|
971
|
-
}, ir = (e, r, t) => {
|
|
972
|
-
O.showError(e, r, t);
|
|
973
|
-
}, cr = () => {
|
|
974
|
-
O.destroy();
|
|
975
|
-
}, ur = (e) => {
|
|
976
|
-
O.close(e);
|
|
977
|
-
}, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
978
|
-
__proto__: null,
|
|
979
|
-
closeNotification: ur,
|
|
980
|
-
destroyNotifications: cr,
|
|
981
|
-
notiBwgError: De,
|
|
982
|
-
notiError: ir,
|
|
983
|
-
notiInfo: Ne,
|
|
984
|
-
notiSuccess: ar,
|
|
985
|
-
notiWarning: Oe,
|
|
986
|
-
notificationService: O
|
|
987
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
988
|
-
let x = null;
|
|
989
|
-
const oe = async (e) => {
|
|
990
|
-
if (x === null)
|
|
991
|
-
if (e === void 0)
|
|
992
|
-
try {
|
|
993
|
-
let t = (await re.get("/api/ip")).data.trim();
|
|
994
|
-
t = t.replace(/\s+/g, ""), x = t;
|
|
995
|
-
} catch (r) {
|
|
996
|
-
console.warn("IP 가져오기 실패:", r), x = "unknown";
|
|
997
|
-
}
|
|
998
|
-
else
|
|
999
|
-
x = e;
|
|
1000
|
-
}, lr = () => x, dr = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), x || "unknown");
|
|
1001
|
-
class T extends Error {
|
|
1002
|
-
constructor(r, t, n, s, a) {
|
|
1003
|
-
super(r), this.name = "ApiError", this.detailMsg = t, this.response = n, this.msgCd = s, this.errorType = a, Error.captureStackTrace && Error.captureStackTrace(this, T);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
const z = {
|
|
1007
|
-
method: "POST",
|
|
1008
|
-
timeout: 3e4,
|
|
1009
|
-
// 30초
|
|
1010
|
-
withCredentials: !0,
|
|
1011
|
-
// 쿠키 포함
|
|
1012
|
-
showLoading: !0,
|
|
1013
|
-
showError: !0,
|
|
1014
|
-
retryCount: 0,
|
|
1015
|
-
retryDelay: 1e3
|
|
1016
|
-
}, Y = re.create({
|
|
1017
|
-
timeout: z.timeout,
|
|
1018
|
-
withCredentials: z.withCredentials,
|
|
1019
|
-
headers: {
|
|
1020
|
-
"Content-Type": "application/json; charset=utf-8",
|
|
1021
|
-
Accept: "application/json; charset=utf-8"
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1024
|
-
Y.interceptors.request.use(
|
|
1025
|
-
(e) => {
|
|
1026
|
-
e.showLoading && te.getState().showLoading();
|
|
1027
|
-
let r = "UNKNOWN", t = "UNKNOWN";
|
|
1028
|
-
(/* @__PURE__ */ new Date()).getTime();
|
|
1029
|
-
try {
|
|
1030
|
-
e.data && e.data.header ? (r = e.data.header.trxCd || "UNKNOWN", t = e.data.header.guid || "UNKNOWN") : e.params && e.params.header && (r = e.params.header.trxCd || "UNKNOWN", t = e.params.header.guid || "UNKNOWN");
|
|
1031
|
-
} catch (s) {
|
|
1032
|
-
console.warn("trxCd/guid 추출 실패:", s);
|
|
1033
|
-
}
|
|
1034
|
-
e.trxCd = r, e.guid = t, e.requestStartTime = Date.now(), console.log(`🚀 API 요청 시작 [거래코드: ${r} / GUID: ${t}]`);
|
|
1035
|
-
const n = localStorage.getItem("accessToken");
|
|
1036
|
-
return n && (e.headers.Authorization = `Bearer ${n}`), e.headers["Content-Type"] = "application/json; charset=UTF-8", e.headers.Accept = "application/json; charset=UTF-8", e;
|
|
1037
|
-
},
|
|
1038
|
-
(e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
|
|
1039
|
-
);
|
|
1040
|
-
Y.interceptors.response.use(
|
|
1041
|
-
(e) => {
|
|
1042
|
-
e.config.showLoading && te.getState().hideLoading();
|
|
1043
|
-
let r = "UNKNOWN", t = "UNKNOWN";
|
|
1044
|
-
const n = (/* @__PURE__ */ new Date()).getTime();
|
|
1045
|
-
try {
|
|
1046
|
-
e.config.trxCd && (r = e.config.trxCd), e.config.guid ? t = e.config.guid : e.data && e.data.header && e.data.header.trxCd ? (r = e.data.header.trxCd, t = e.data.header.guid || "UNKNOWN") : e.config.data && e.config.data.header ? (r = e.config.data.header.trxCd || "UNKNOWN", t = e.config.data.header.guid || "UNKNOWN") : e.config.params && e.config.params.header && (r = e.config.params.header.trxCd || "UNKNOWN", t = e.config.params.header.guid || "UNKNOWN");
|
|
1047
|
-
} catch (a) {
|
|
1048
|
-
console.warn("trxCd/guid 추출 실패:", a);
|
|
1049
|
-
}
|
|
1050
|
-
let s = 0;
|
|
1051
|
-
return e.config.requestStartTime && (s = n - e.config.requestStartTime), console.log(
|
|
1052
|
-
`✅ API 응답 성공 [거래코드: ${r} / GUID : ${t}] - (소요시간: ${s}ms)`
|
|
1053
|
-
), e;
|
|
1054
|
-
},
|
|
1055
|
-
async (e) => {
|
|
1056
|
-
if (e.config && e.config.showLoading && te.getState().hideLoading(), console.error("❌ API 응답 에러:", e), E && console.error("🚨 Error Details:", {
|
|
1057
|
-
message: e.message,
|
|
1058
|
-
status: e.response?.status,
|
|
1059
|
-
statusText: e.response?.statusText,
|
|
1060
|
-
data: e.response?.data,
|
|
1061
|
-
config: {
|
|
1062
|
-
url: e.config?.url,
|
|
1063
|
-
method: e.config?.method,
|
|
1064
|
-
baseURL: e.config?.baseURL
|
|
1065
|
-
}
|
|
1066
|
-
}), e.response?.status === 401) {
|
|
1067
|
-
const r = localStorage.getItem("refreshToken");
|
|
1068
|
-
if (r)
|
|
1069
|
-
try {
|
|
1070
|
-
const t = await re.post("/auth/refresh", {
|
|
1071
|
-
refreshToken: r
|
|
1072
|
-
});
|
|
1073
|
-
if (t.data.accessToken) {
|
|
1074
|
-
localStorage.setItem(
|
|
1075
|
-
"accessToken",
|
|
1076
|
-
t.data.accessToken
|
|
1077
|
-
);
|
|
1078
|
-
const n = e.config;
|
|
1079
|
-
if (n)
|
|
1080
|
-
return n.headers.Authorization = `Bearer ${t.data.accessToken}`, Y(n);
|
|
1081
|
-
}
|
|
1082
|
-
} catch {
|
|
1083
|
-
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
return Promise.reject(e);
|
|
1087
|
-
}
|
|
1088
|
-
);
|
|
1089
|
-
const ae = () => Te(), P = async (e, r, t) => {
|
|
1090
|
-
try {
|
|
1091
|
-
const n = {
|
|
1092
|
-
...z,
|
|
1093
|
-
...t
|
|
1094
|
-
}, { activeMenuId: s } = Me.getState();
|
|
1095
|
-
if (x === null) {
|
|
1096
|
-
const p = Date.now();
|
|
1097
|
-
await oe();
|
|
1098
|
-
const c = Date.now();
|
|
1099
|
-
console.log(`[INFO] IP 조회 소요시간: ${c - p}ms`);
|
|
1100
|
-
}
|
|
1101
|
-
const a = {
|
|
1102
|
-
method: n.method,
|
|
1103
|
-
url: "/api/service",
|
|
1104
|
-
timeout: n.timeout,
|
|
1105
|
-
withCredentials: n.withCredentials,
|
|
1106
|
-
showLoading: n.showLoading
|
|
1107
|
-
};
|
|
1108
|
-
n.headers && (a.headers = n.headers);
|
|
1109
|
-
const i = x || "unknown", m = __APP_CD__, d = __SYS_CD__, v = {
|
|
1110
|
-
header: {
|
|
1111
|
-
trxCd: e,
|
|
1112
|
-
guid: ae(),
|
|
1113
|
-
userInfo: W(),
|
|
1114
|
-
clientIp: i,
|
|
1115
|
-
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
1116
|
-
domainId: "DEFAULT",
|
|
1117
|
-
appCd: m,
|
|
1118
|
-
sysCd: d,
|
|
1119
|
-
screenId: s
|
|
1120
|
-
},
|
|
1121
|
-
// data: bxmEncrypt(JSON.stringify(data)),
|
|
1122
|
-
data: r
|
|
1123
|
-
};
|
|
1124
|
-
E && console.log("__BWG_LOCAL__ 테스트 입니다. ", E), n.method === "GET" ? a.params = v || n.params : (a.data = v || n.data, n.params && (a.params = n.params));
|
|
1125
|
-
let g;
|
|
1126
|
-
for (let p = 0; p <= (n.retryCount || 0); p++)
|
|
1127
|
-
try {
|
|
1128
|
-
const c = await Y(a);
|
|
1129
|
-
if (c.data.header?.resCd == 0) {
|
|
1130
|
-
for (const u in c.data)
|
|
1131
|
-
if (u !== "header")
|
|
1132
|
-
return c.data[u];
|
|
1133
|
-
return {};
|
|
1134
|
-
} else {
|
|
1135
|
-
const u = c.data.header, l = u?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", o = u?.msgs?.detailMsgs || l, f = u?.msgCd, M = u?.msgs?.type;
|
|
1136
|
-
throw new T(l, o, c, f, M);
|
|
1137
|
-
}
|
|
1138
|
-
} catch (c) {
|
|
1139
|
-
if (c.isAxiosError && c.response) {
|
|
1140
|
-
const u = c, l = u.response, o = l.data, f = o?.header?.msgs?.basicMsg || u.message || // 실패 시 Axios 에러 메시지 사용
|
|
1141
|
-
"서버에서 오류가 발생했습니다.", M = o?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
|
|
1142
|
-
(typeof l.data == "string" ? l.data : JSON.stringify(l.data)) || f, h = o?.header?.msgCd, y = o?.header?.msgs?.type;
|
|
1143
|
-
g = new T(
|
|
1144
|
-
f,
|
|
1145
|
-
M,
|
|
1146
|
-
l,
|
|
1147
|
-
h,
|
|
1148
|
-
y
|
|
1149
|
-
);
|
|
1150
|
-
} else
|
|
1151
|
-
g = c;
|
|
1152
|
-
if (c.isAxiosError && $e(c) && p < (n.retryCount || 0)) {
|
|
1153
|
-
await Ee(n.retryDelay || 1e3);
|
|
1154
|
-
continue;
|
|
1155
|
-
}
|
|
1156
|
-
break;
|
|
1157
|
-
}
|
|
1158
|
-
if (g) {
|
|
1159
|
-
if (n.showError) {
|
|
1160
|
-
const p = g instanceof T ? g.message : "요청 처리 중 오류가 발생했습니다.", c = g instanceof T ? g.msgCd : "요청 처리 중 오류가 발생했습니다.", u = g instanceof T ? g.detailMsg : g.message, l = g instanceof T ? g.errorType : "";
|
|
1161
|
-
c?.startsWith("BXM") ? De({
|
|
1162
|
-
message: p,
|
|
1163
|
-
description: u,
|
|
1164
|
-
duration: 5
|
|
1165
|
-
}) : l == "I" ? Ne(p, u, 5) : Oe(p, u, 5);
|
|
1166
|
-
}
|
|
1167
|
-
throw g;
|
|
1168
|
-
}
|
|
1169
|
-
throw new Error("알 수 없는 API 오류가 발생했습니다.");
|
|
1170
|
-
} catch (n) {
|
|
1171
|
-
throw console.error("callService 최종 에러:", n), n;
|
|
1172
|
-
}
|
|
1173
|
-
}, fr = async (e, r, t, n) => {
|
|
1174
|
-
try {
|
|
1175
|
-
const s = {
|
|
1176
|
-
...z,
|
|
1177
|
-
...n
|
|
1178
|
-
}, { activeMenuId: a } = Me.getState();
|
|
1179
|
-
if (x === null) {
|
|
1180
|
-
const c = Date.now();
|
|
1181
|
-
await oe();
|
|
1182
|
-
const u = Date.now();
|
|
1183
|
-
console.log(`[INFO] IP 조회 소요시간: ${u - c}ms`);
|
|
1184
|
-
}
|
|
1185
|
-
const i = {
|
|
1186
|
-
method: s.method,
|
|
1187
|
-
url: "/api/" + e + "/service",
|
|
1188
|
-
timeout: s.timeout,
|
|
1189
|
-
withCredentials: s.withCredentials,
|
|
1190
|
-
showLoading: s.showLoading
|
|
1191
|
-
};
|
|
1192
|
-
s.headers && (i.headers = s.headers);
|
|
1193
|
-
const m = x || "unknown", d = __APP_CD__, v = __SYS_CD__, g = {
|
|
1194
|
-
header: {
|
|
1195
|
-
trxCd: r,
|
|
1196
|
-
guid: ae(),
|
|
1197
|
-
userInfo: W(),
|
|
1198
|
-
clientIp: m,
|
|
1199
|
-
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
1200
|
-
domainId: "DEFAULT",
|
|
1201
|
-
appCd: d,
|
|
1202
|
-
sysCd: v,
|
|
1203
|
-
screenId: a
|
|
1204
|
-
},
|
|
1205
|
-
// data: bxmEncrypt(JSON.stringify(data)),
|
|
1206
|
-
data: t
|
|
1207
|
-
};
|
|
1208
|
-
E && console.log("__BWG_LOCAL__ 테스트 입니다. ", E), s.method === "GET" ? i.params = g || s.params : (i.data = g || s.data, s.params && (i.params = s.params));
|
|
1209
|
-
let p;
|
|
1210
|
-
for (let c = 0; c <= (s.retryCount || 0); c++)
|
|
1211
|
-
try {
|
|
1212
|
-
const u = await Y(i);
|
|
1213
|
-
if (u.data.header?.resCd == 0) {
|
|
1214
|
-
for (const l in u.data)
|
|
1215
|
-
if (l !== "header")
|
|
1216
|
-
return u.data[l];
|
|
1217
|
-
return {};
|
|
1218
|
-
} else {
|
|
1219
|
-
const l = u.data.header, o = l?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", f = l?.msgs?.detailMsgs || o, M = l?.msgCd, h = l?.msgs?.type;
|
|
1220
|
-
throw new T(o, f, u, M, h);
|
|
1221
|
-
}
|
|
1222
|
-
} catch (u) {
|
|
1223
|
-
if (u.isAxiosError && u.response) {
|
|
1224
|
-
const l = u, o = l.response, f = o.data, M = f?.header?.msgs?.basicMsg || l.message || // 실패 시 Axios 에러 메시지 사용
|
|
1225
|
-
"서버에서 오류가 발생했습니다.", h = f?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
|
|
1226
|
-
(typeof o.data == "string" ? o.data : JSON.stringify(o.data)) || M, y = f?.header?.msgCd, w = f?.header?.msgs?.type;
|
|
1227
|
-
p = new T(
|
|
1228
|
-
M,
|
|
1229
|
-
h,
|
|
1230
|
-
o,
|
|
1231
|
-
y,
|
|
1232
|
-
w
|
|
1233
|
-
);
|
|
1234
|
-
} else
|
|
1235
|
-
p = u;
|
|
1236
|
-
if (u.isAxiosError && $e(u) && c < (s.retryCount || 0)) {
|
|
1237
|
-
await Ee(s.retryDelay || 1e3);
|
|
1238
|
-
continue;
|
|
1239
|
-
}
|
|
1240
|
-
break;
|
|
1241
|
-
}
|
|
1242
|
-
if (p) {
|
|
1243
|
-
if (s.showError) {
|
|
1244
|
-
const c = p instanceof T ? p.message : "요청 처리 중 오류가 발생했습니다.", u = p instanceof T ? p.msgCd : "요청 처리 중 오류가 발생했습니다.", l = p instanceof T ? p.detailMsg : p.message, o = p instanceof T ? p.errorType : "";
|
|
1245
|
-
u?.startsWith("BXM") ? showBwgError({
|
|
1246
|
-
message: c,
|
|
1247
|
-
description: l,
|
|
1248
|
-
duration: 5
|
|
1249
|
-
}) : o == "I" ? showInfo(c, l, 5) : showWarning(c, l, 5);
|
|
1250
|
-
}
|
|
1251
|
-
throw p;
|
|
1252
|
-
}
|
|
1253
|
-
throw new Error("알 수 없는 API 오류가 발생했습니다.");
|
|
1254
|
-
} catch (s) {
|
|
1255
|
-
throw console.error("callService 최종 에러:", s), s;
|
|
1256
|
-
}
|
|
1257
|
-
}, $e = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, Ee = (e) => new Promise((r) => setTimeout(r, e)), mr = (e, r, t) => P(e, r, { ...t, method: "GET" }), hr = (e, r, t) => P(e, r, { ...t, method: "POST" }), gr = (e, r, t) => P(e, r, { ...t, method: "PUT" }), pr = (e, r, t) => P(e, r, { ...t, method: "DELETE" }), yr = (e, r, t) => P(e, r, { ...t, method: "PATCH" }), vr = async (e, r, t) => {
|
|
1258
|
-
try {
|
|
1259
|
-
const n = await fetch("/api/permissions", {
|
|
1260
|
-
method: "POST",
|
|
1261
|
-
headers: {
|
|
1262
|
-
"Content-Type": "application/json"
|
|
1263
|
-
},
|
|
1264
|
-
body: JSON.stringify({
|
|
1265
|
-
userId: e,
|
|
1266
|
-
menuId: r,
|
|
1267
|
-
popupId: t
|
|
1268
|
-
})
|
|
1269
|
-
});
|
|
1270
|
-
if (!n.ok)
|
|
1271
|
-
throw new Error(`권한 확인 실패: ${n.status}`);
|
|
1272
|
-
return await n.json();
|
|
1273
|
-
} catch (n) {
|
|
1274
|
-
throw console.error("권한 확인 서비스 오류:", n), n;
|
|
1275
|
-
}
|
|
1276
|
-
}, Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1277
|
-
__proto__: null,
|
|
1278
|
-
ApiError: T,
|
|
1279
|
-
apiDelete: pr,
|
|
1280
|
-
apiGet: mr,
|
|
1281
|
-
apiPatch: yr,
|
|
1282
|
-
apiPost: hr,
|
|
1283
|
-
apiPut: gr,
|
|
1284
|
-
callService: P,
|
|
1285
|
-
callService_SYSCD: fr,
|
|
1286
|
-
getClientIp: lr,
|
|
1287
|
-
getGuid: ae,
|
|
1288
|
-
getPermissionService: vr,
|
|
1289
|
-
setClientIp: oe,
|
|
1290
|
-
verifyClientIp: dr
|
|
1291
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1292
|
-
export {
|
|
1293
|
-
Xt as $,
|
|
1294
|
-
T as A,
|
|
1295
|
-
xt as B,
|
|
1296
|
-
Dt as C,
|
|
1297
|
-
Nt as D,
|
|
1298
|
-
K as E,
|
|
1299
|
-
Ot as F,
|
|
1300
|
-
$t as G,
|
|
1301
|
-
Et as H,
|
|
1302
|
-
Lt as I,
|
|
1303
|
-
Pt as J,
|
|
1304
|
-
Ut as K,
|
|
1305
|
-
At as L,
|
|
1306
|
-
kt as M,
|
|
1307
|
-
Yt as N,
|
|
1308
|
-
Ft as O,
|
|
1309
|
-
Rt as P,
|
|
1310
|
-
jt as Q,
|
|
1311
|
-
Ht as R,
|
|
1312
|
-
zt as S,
|
|
1313
|
-
mt as T,
|
|
1314
|
-
Bt as U,
|
|
1315
|
-
qt as V,
|
|
1316
|
-
Wt as W,
|
|
1317
|
-
Gt as X,
|
|
1318
|
-
Se as Y,
|
|
1319
|
-
Kt as Z,
|
|
1320
|
-
Jt as _,
|
|
1321
|
-
ae as a,
|
|
1322
|
-
Zt as a0,
|
|
1323
|
-
Vt as a1,
|
|
1324
|
-
Qt as a2,
|
|
1325
|
-
we as a3,
|
|
1326
|
-
Te as a4,
|
|
1327
|
-
tr as a5,
|
|
1328
|
-
rr as a6,
|
|
1329
|
-
nr as a7,
|
|
1330
|
-
E as a8,
|
|
1331
|
-
sr as a9,
|
|
1332
|
-
Be as aA,
|
|
1333
|
-
W as aB,
|
|
1334
|
-
qe as aC,
|
|
1335
|
-
We as aD,
|
|
1336
|
-
Ge as aE,
|
|
1337
|
-
te as aF,
|
|
1338
|
-
Ve as aG,
|
|
1339
|
-
Me as aH,
|
|
1340
|
-
D as aI,
|
|
1341
|
-
ke as aJ,
|
|
1342
|
-
Nr as aK,
|
|
1343
|
-
br as aL,
|
|
1344
|
-
xr as aM,
|
|
1345
|
-
Dr as aN,
|
|
1346
|
-
Ir as aO,
|
|
1347
|
-
_r as aP,
|
|
1348
|
-
ne as aQ,
|
|
1349
|
-
Cr as aR,
|
|
1350
|
-
be as aa,
|
|
1351
|
-
xe as ab,
|
|
1352
|
-
or as ac,
|
|
1353
|
-
O as ad,
|
|
1354
|
-
De as ae,
|
|
1355
|
-
ar as af,
|
|
1356
|
-
Ne as ag,
|
|
1357
|
-
Oe as ah,
|
|
1358
|
-
ir as ai,
|
|
1359
|
-
cr as aj,
|
|
1360
|
-
ur as ak,
|
|
1361
|
-
Le as al,
|
|
1362
|
-
se as am,
|
|
1363
|
-
he as an,
|
|
1364
|
-
Pe as ao,
|
|
1365
|
-
Ye as ap,
|
|
1366
|
-
ge as aq,
|
|
1367
|
-
pe as ar,
|
|
1368
|
-
Fe as as,
|
|
1369
|
-
Re as at,
|
|
1370
|
-
ye as au,
|
|
1371
|
-
ve as av,
|
|
1372
|
-
q as aw,
|
|
1373
|
-
je as ax,
|
|
1374
|
-
He as ay,
|
|
1375
|
-
ze as az,
|
|
1376
|
-
fr as b,
|
|
1377
|
-
P as c,
|
|
1378
|
-
mr as d,
|
|
1379
|
-
hr as e,
|
|
1380
|
-
gr as f,
|
|
1381
|
-
lr as g,
|
|
1382
|
-
pr as h,
|
|
1383
|
-
yr as i,
|
|
1384
|
-
vr as j,
|
|
1385
|
-
ht as k,
|
|
1386
|
-
gt as l,
|
|
1387
|
-
pt as m,
|
|
1388
|
-
yt as n,
|
|
1389
|
-
vt as o,
|
|
1390
|
-
Mt as p,
|
|
1391
|
-
St as q,
|
|
1392
|
-
wt as r,
|
|
1393
|
-
oe as s,
|
|
1394
|
-
Tt as t,
|
|
1395
|
-
Ct as u,
|
|
1396
|
-
dr as v,
|
|
1397
|
-
It as w,
|
|
1398
|
-
_t as x,
|
|
1399
|
-
G as y,
|
|
1400
|
-
bt as z
|
|
1401
|
-
};
|
|
1402
|
-
//# sourceMappingURL=apiUtils-CH40MvpT.js.map
|