@bwg-ui/core 1.1.20 → 1.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/chunks/{BwgDownload-CF_Zo2oU.js → BwgDownload-COsACbpJ.js} +3 -3
  2. package/dist/chunks/{BwgDownload-CF_Zo2oU.js.map → BwgDownload-COsACbpJ.js.map} +1 -1
  3. package/dist/chunks/{BwgDownload-DvCaLWCL.cjs → BwgDownload-i6w7ZD-i.cjs} +2 -2
  4. package/dist/chunks/{BwgDownload-DvCaLWCL.cjs.map → BwgDownload-i6w7ZD-i.cjs.map} +1 -1
  5. package/dist/chunks/{SSOHandler-Cr04mtMm.js → SSOHandler-B15Ssd5g.js} +627 -603
  6. package/dist/chunks/{SSOHandler-Cr04mtMm.js.map → SSOHandler-B15Ssd5g.js.map} +1 -1
  7. package/dist/chunks/{SSOHandler-C7echUZs.cjs → SSOHandler-oJlon6rn.cjs} +26 -26
  8. package/dist/chunks/{SSOHandler-C7echUZs.cjs.map → SSOHandler-oJlon6rn.cjs.map} +1 -1
  9. package/dist/chunks/{SearchBoxContext-C2ECWG9l.js → SearchBoxContext-BxJN-x3-.js} +2 -2
  10. package/dist/chunks/{SearchBoxContext-C2ECWG9l.js.map → SearchBoxContext-BxJN-x3-.js.map} +1 -1
  11. package/dist/chunks/{SearchBoxContext-aMXi2JmO.cjs → SearchBoxContext-DnQGaRgo.cjs} +2 -2
  12. package/dist/chunks/{SearchBoxContext-aMXi2JmO.cjs.map → SearchBoxContext-DnQGaRgo.cjs.map} +1 -1
  13. package/dist/chunks/{ViewContainer-DI7hvDi-.cjs → ViewContainer-HSyLfryI.cjs} +2 -2
  14. package/dist/chunks/{ViewContainer-DI7hvDi-.cjs.map → ViewContainer-HSyLfryI.cjs.map} +1 -1
  15. package/dist/chunks/{ViewContainer-DxhY26m3.js → ViewContainer-x2yzKkIG.js} +2 -2
  16. package/dist/chunks/{ViewContainer-DxhY26m3.js.map → ViewContainer-x2yzKkIG.js.map} +1 -1
  17. package/dist/chunks/apiUtils-CudW_FKE.cjs +3 -0
  18. package/dist/chunks/apiUtils-CudW_FKE.cjs.map +1 -0
  19. package/dist/chunks/apiUtils-DfPv_gmI.js +2064 -0
  20. package/dist/chunks/apiUtils-DfPv_gmI.js.map +1 -0
  21. package/dist/chunks/{codeStore-kuUEfWSS.js → codeStore-DefmZVgs.js} +2 -2
  22. package/dist/chunks/{codeStore-kuUEfWSS.js.map → codeStore-DefmZVgs.js.map} +1 -1
  23. package/dist/chunks/{codeStore-WWRT65Zk.cjs → codeStore-pQbDqWkZ.cjs} +2 -2
  24. package/dist/chunks/{codeStore-WWRT65Zk.cjs.map → codeStore-pQbDqWkZ.cjs.map} +1 -1
  25. package/dist/chunks/{favoriteStore-DdGoghEn.cjs → favoriteStore-BXBziAgB.cjs} +2 -2
  26. package/dist/chunks/{favoriteStore-DdGoghEn.cjs.map → favoriteStore-BXBziAgB.cjs.map} +1 -1
  27. package/dist/chunks/{favoriteStore-D40XfOmq.js → favoriteStore-DAPC01iF.js} +2 -2
  28. package/dist/chunks/{favoriteStore-D40XfOmq.js.map → favoriteStore-DAPC01iF.js.map} +1 -1
  29. package/dist/chunks/{popupStore-DKpp0bmC.cjs → popupStore-BV632k5p.cjs} +2 -2
  30. package/dist/chunks/{popupStore-DKpp0bmC.cjs.map → popupStore-BV632k5p.cjs.map} +1 -1
  31. package/dist/chunks/{popupStore-axohgTV-.js → popupStore-CcQg9AvK.js} +2 -2
  32. package/dist/chunks/{popupStore-axohgTV-.js.map → popupStore-CcQg9AvK.js.map} +1 -1
  33. package/dist/chunks/{usePopup-Dftb7Bbl.js → usePopup-Cw5xsOaH.js} +3 -3
  34. package/dist/chunks/{usePopup-Dftb7Bbl.js.map → usePopup-Cw5xsOaH.js.map} +1 -1
  35. package/dist/chunks/{usePopup-DYnRe9Th.cjs → usePopup-DoVGuobp.cjs} +2 -2
  36. package/dist/chunks/{usePopup-DYnRe9Th.cjs.map → usePopup-DoVGuobp.cjs.map} +1 -1
  37. package/dist/components/common/BwgView.d.ts.map +1 -1
  38. package/dist/components/common/index.cjs +1 -1
  39. package/dist/components/common/index.js +1 -1
  40. package/dist/components/core/index.cjs +1 -1
  41. package/dist/components/core/index.js +1 -1
  42. package/dist/components/layout/index.cjs +1 -1
  43. package/dist/components/layout/index.js +1 -1
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.js +9 -9
  46. package/dist/provider/index.cjs +1 -1
  47. package/dist/provider/index.js +2 -2
  48. package/dist/stores/index.cjs +1 -1
  49. package/dist/stores/index.js +6 -6
  50. package/dist/utils/commonUtils.d.ts +0 -6
  51. package/dist/utils/commonUtils.d.ts.map +1 -1
  52. package/dist/utils/index.cjs +1 -1
  53. package/dist/utils/index.d.ts.map +1 -1
  54. package/dist/utils/index.js +2 -2
  55. package/package.json +1 -1
  56. package/dist/chunks/apiUtils-BRaXRbjE.js +0 -1428
  57. package/dist/chunks/apiUtils-BRaXRbjE.js.map +0 -1
  58. package/dist/chunks/apiUtils-DL43X2ta.cjs +0 -3
  59. package/dist/chunks/apiUtils-DL43X2ta.cjs.map +0 -1
  60. package/dist/chunks/core-D7JhyoYH.cjs +0 -2
  61. package/dist/chunks/core-D7JhyoYH.cjs.map +0 -1
  62. package/dist/chunks/core-DLGhqegD.js +0 -514
  63. package/dist/chunks/core-DLGhqegD.js.map +0 -1
  64. package/dist/chunks/enc-base64-96WlVdPN.js +0 -102
  65. package/dist/chunks/enc-base64-96WlVdPN.js.map +0 -1
  66. package/dist/chunks/enc-base64-b9mIy966.cjs +0 -2
  67. package/dist/chunks/enc-base64-b9mIy966.cjs.map +0 -1
  68. package/dist/chunks/sha256-BMg1y0Py.js +0 -79
  69. package/dist/chunks/sha256-BMg1y0Py.js.map +0 -1
  70. package/dist/chunks/sha256-BxdSMFca.cjs +0 -2
  71. package/dist/chunks/sha256-BxdSMFca.cjs.map +0 -1
@@ -0,0 +1,2064 @@
1
+ import ce from "axios";
2
+ import A from "dayjs";
3
+ import { message as te, notification as P } from "antd";
4
+ import { create as X } from "zustand";
5
+ var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
+ function F(e) {
7
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8
+ }
9
+ function Ke(e) {
10
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
11
+ var r = e.default;
12
+ if (typeof r == "function") {
13
+ var t = function n() {
14
+ var a = !1;
15
+ try {
16
+ a = this instanceof n;
17
+ } catch {
18
+ }
19
+ return a ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
20
+ };
21
+ t.prototype = r.prototype;
22
+ } else t = {};
23
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
24
+ var a = Object.getOwnPropertyDescriptor(e, n);
25
+ Object.defineProperty(t, n, a.get ? a : {
26
+ enumerable: !0,
27
+ get: function() {
28
+ return e[n];
29
+ }
30
+ });
31
+ }), t;
32
+ }
33
+ const Me = {
34
+ // 권한 관련
35
+ AUTH_BTNS: "SCMSIGN00202",
36
+ // 버튼 권한 조회
37
+ AUTH_MENU: "SCMSIGN00201",
38
+ // 메뉴 권한 조회
39
+ SRCH_CODE: "SCMSIGN00301",
40
+ // 코드 조회
41
+ // 팝업 관련
42
+ SRCH_POPU: "SCMPOPU00101",
43
+ // 팝업 조회
44
+ // 즐겨찾기 관련
45
+ AUTH_BMRK: "SCMBMRK00101"
46
+ // 즐겨찾기 관리
47
+ };
48
+ let Y = {};
49
+ function Je(e) {
50
+ Y = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
51
+ }
52
+ function ue(e) {
53
+ return Y[e] && Y[e].trim() !== "" ? Y[e] : Me[e];
54
+ }
55
+ function Ce() {
56
+ const e = {};
57
+ for (const r of Object.keys(Me))
58
+ e[r] = ue(r);
59
+ return e;
60
+ }
61
+ function Xe() {
62
+ console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
63
+ const e = Ce();
64
+ for (const [r, t] of Object.entries(e)) {
65
+ const n = Y[r] ? "Provider 설정" : "기본값";
66
+ console.log(` ${r}: ${t} (${n})`);
67
+ }
68
+ }
69
+ const Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70
+ __proto__: null,
71
+ getAllServiceCodes: Ce,
72
+ getServiceCode: ue,
73
+ logServiceCodeConfig: Xe,
74
+ setServiceCodeOverrides: Je
75
+ }, Symbol.toStringTag, { value: "Module" }));
76
+ import.meta.env.DEV;
77
+ function Ze(e, r) {
78
+ let t;
79
+ try {
80
+ t = e();
81
+ } catch {
82
+ return;
83
+ }
84
+ return {
85
+ getItem: (a) => {
86
+ var i;
87
+ const f = (m) => m === null ? null : JSON.parse(m, void 0), _ = (i = t.getItem(a)) != null ? i : null;
88
+ return _ instanceof Promise ? _.then(f) : f(_);
89
+ },
90
+ setItem: (a, i) => t.setItem(a, JSON.stringify(i, void 0)),
91
+ removeItem: (a) => t.removeItem(a)
92
+ };
93
+ }
94
+ const oe = (e) => (r) => {
95
+ try {
96
+ const t = e(r);
97
+ return t instanceof Promise ? t : {
98
+ then(n) {
99
+ return oe(n)(t);
100
+ },
101
+ catch(n) {
102
+ return this;
103
+ }
104
+ };
105
+ } catch (t) {
106
+ return {
107
+ then(n) {
108
+ return this;
109
+ },
110
+ catch(n) {
111
+ return oe(n)(t);
112
+ }
113
+ };
114
+ }
115
+ }, Ve = (e, r) => (t, n, a) => {
116
+ let i = {
117
+ storage: Ze(() => localStorage),
118
+ partialize: (s) => s,
119
+ version: 0,
120
+ merge: (s, d) => ({
121
+ ...d,
122
+ ...s
123
+ }),
124
+ ...r
125
+ }, f = !1;
126
+ const _ = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
127
+ let w = i.storage;
128
+ if (!w)
129
+ return e(
130
+ (...s) => {
131
+ console.warn(
132
+ `[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`
133
+ ), t(...s);
134
+ },
135
+ n,
136
+ a
137
+ );
138
+ const y = () => {
139
+ const s = i.partialize({ ...n() });
140
+ return w.setItem(i.name, {
141
+ state: s,
142
+ version: i.version
143
+ });
144
+ }, p = a.setState;
145
+ a.setState = (s, d) => (p(s, d), y());
146
+ const l = e(
147
+ (...s) => (t(...s), y()),
148
+ n,
149
+ a
150
+ );
151
+ a.getInitialState = () => l;
152
+ let u;
153
+ const h = () => {
154
+ var s, d;
155
+ if (!w) return;
156
+ f = !1, _.forEach((o) => {
157
+ var c;
158
+ return o((c = n()) != null ? c : l);
159
+ });
160
+ const S = ((d = i.onRehydrateStorage) == null ? void 0 : d.call(i, (s = n()) != null ? s : l)) || void 0;
161
+ return oe(w.getItem.bind(w))(i.name).then((o) => {
162
+ if (o)
163
+ if (typeof o.version == "number" && o.version !== i.version) {
164
+ if (i.migrate) {
165
+ const c = i.migrate(
166
+ o.state,
167
+ o.version
168
+ );
169
+ return c instanceof Promise ? c.then((g) => [!0, g]) : [!0, c];
170
+ }
171
+ console.error(
172
+ "State loaded from storage couldn't be migrated since no migrate function was provided"
173
+ );
174
+ } else
175
+ return [!1, o.state];
176
+ return [!1, void 0];
177
+ }).then((o) => {
178
+ var c;
179
+ const [g, v] = o;
180
+ if (u = i.merge(
181
+ v,
182
+ (c = n()) != null ? c : l
183
+ ), t(u, !0), g)
184
+ return y();
185
+ }).then(() => {
186
+ S?.(u, void 0), u = n(), f = !0, m.forEach((o) => o(u));
187
+ }).catch((o) => {
188
+ S?.(void 0, o);
189
+ });
190
+ };
191
+ return a.persist = {
192
+ setOptions: (s) => {
193
+ i = {
194
+ ...i,
195
+ ...s
196
+ }, s.storage && (w = s.storage);
197
+ },
198
+ clearStorage: () => {
199
+ w?.removeItem(i.name);
200
+ },
201
+ getOptions: () => i,
202
+ rehydrate: () => h(),
203
+ hasHydrated: () => f,
204
+ onHydrate: (s) => (_.add(s), () => {
205
+ _.delete(s);
206
+ }),
207
+ onFinishHydration: (s) => (m.add(s), () => {
208
+ m.delete(s);
209
+ })
210
+ }, i.skipHydration || h(), u || l;
211
+ }, Qe = Ve, $ = X()(
212
+ Qe(
213
+ (e, r) => ({
214
+ user: null,
215
+ isLoggedIn: !1,
216
+ // 로그인
217
+ login: (t) => {
218
+ e({ user: t, isLoggedIn: !0 }), console.log("사용자 로그인:", t);
219
+ },
220
+ // 로그아웃
221
+ logout: () => {
222
+ e({ user: null, isLoggedIn: !1 }), console.log("사용자 로그아웃");
223
+ },
224
+ // 사용자 정보 업데이트
225
+ updateUser: (t) => {
226
+ const n = r().user;
227
+ n && e({ user: { ...n, ...t } });
228
+ }
229
+ }),
230
+ {
231
+ name: "user-storage",
232
+ // 로컬 스토리지 키
233
+ partialize: (e) => ({
234
+ user: e.user,
235
+ isLoggedIn: e.isLoggedIn
236
+ })
237
+ // 저장할 상태만 선택
238
+ }
239
+ )
240
+ ), et = () => $.getState().user?.crprCd || null, Te = () => $.getState().user?.userId || null, be = () => $.getState().user?.userNm || null, tt = () => $.getState().user?.userDvsn || null, rt = () => $.getState().user?.emplNo || null, xe = () => $.getState().user?.dprtCd || null, Ie = () => $.getState().user?.dprtNm || null, Z = () => $.getState().user?.roleList || null, nt = (e) => {
241
+ const r = Z();
242
+ return r ? r.includes(e) : !1;
243
+ }, st = (e) => {
244
+ const r = Z();
245
+ return r ? e.some((t) => r.includes(t)) : !1;
246
+ }, ot = (e) => {
247
+ const r = Z();
248
+ return r ? e.every((t) => r.includes(t)) : !1;
249
+ }, at = () => $.getState().isLoggedIn, V = () => $.getState().user, it = () => V() !== null, ct = () => {
250
+ const e = be(), r = Te();
251
+ return e || r || null;
252
+ }, ut = () => {
253
+ const e = Ie(), r = xe();
254
+ return e || (r ? String(r) : null);
255
+ }, Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
256
+ __proto__: null,
257
+ getCrprCd: et,
258
+ getDepartmentInfo: ut,
259
+ getDisplayName: ct,
260
+ getDprtCd: xe,
261
+ getDprtNm: Ie,
262
+ getEmplNo: rt,
263
+ getRoleList: Z,
264
+ getUserDvsn: tt,
265
+ getUserId: Te,
266
+ getUserInfo: V,
267
+ getUserNm: be,
268
+ hasAllRoles: ot,
269
+ hasAnyRole: st,
270
+ hasRole: nt,
271
+ hasUserInfo: it,
272
+ isLoggedIn: at
273
+ }, Symbol.toStringTag, { value: "Module" })), ae = {
274
+ DEFAULT_PRNT_GBCD: 1
275
+ }, lt = (e) => e && typeof e == "object" && typeof e.menuId == "string" && typeof e.menuNm == "string" && typeof e.crprCd == "string", he = (e) => Array.isArray(e) && e.every(lt);
276
+ let ne = [], me = [];
277
+ const dt = (e) => {
278
+ if (e && typeof e == "object") {
279
+ const r = e;
280
+ if (r.menus && he(r.menus)) return r.menus;
281
+ if (he(e)) return e;
282
+ }
283
+ return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
284
+ }, ft = (e, r) => !!r && e.crprCd === r.crprCd && e.userId === r.userId && (e.prntGbcd ?? ae.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? ae.DEFAULT_PRNT_GBCD), ht = (e) => {
285
+ if (ne.length === e.length && ne.every(
286
+ (i, f) => i.menuId === e[f]?.menuId && i.menuPrntId === e[f]?.menuPrntId
287
+ ))
288
+ return me;
289
+ if (!e.length) return [];
290
+ const r = /* @__PURE__ */ new Map(), t = [];
291
+ e.forEach((i) => i?.menuId && r.set(i.menuId, { ...i, children: [] })), e.forEach((i) => {
292
+ const f = r.get(i.menuId);
293
+ f && (i.menuPrntId && i.menuPrntId !== "" && i.menuPrntId !== "-" ? r.get(i.menuPrntId)?.children?.push(f) : t.push(f));
294
+ });
295
+ const n = (i) => i.sort((f, _) => (f?.menuNo ?? 0) - (_?.menuNo ?? 0)).map((f) => ({
296
+ ...f,
297
+ children: f.children && f.children.length ? n(f.children) : void 0
298
+ })), a = n(t);
299
+ return ne = [...e], me = a, a;
300
+ }, mt = X((e, r) => ({
301
+ // 📊 초기 상태값
302
+ menuList: [],
303
+ flatMenuList: [],
304
+ isLoading: !1,
305
+ error: null,
306
+ _lastFetchParams: null,
307
+ // 🔧 메뉴 모델 조회
308
+ // 서버에서 사용자별 메뉴 권한 데이터를 가져와서 트리/플랫 구조로 저장
309
+ fetchMenu: async ({ crprCd: t, userId: n, prntGbcd: a }) => {
310
+ const i = {
311
+ crprCd: t,
312
+ userId: n,
313
+ prntGbcd: a ?? ae.DEFAULT_PRNT_GBCD
314
+ };
315
+ if (ft(i, r()._lastFetchParams)) {
316
+ console.log("✅ 중복 fetch 차단", i);
317
+ return;
318
+ }
319
+ e({ isLoading: !0, error: null, _lastFetchParams: i });
320
+ try {
321
+ const f = await U(ue("AUTH_MENU"), i), _ = dt(f), m = ht(_);
322
+ e({
323
+ flatMenuList: _,
324
+ // 평면 리스트 저장
325
+ menuList: m,
326
+ // 트리 구조 저장
327
+ isLoading: !1,
328
+ error: null
329
+ });
330
+ } catch (f) {
331
+ e({ isLoading: !1, error: f?.message ?? "메뉴 로드 실패" });
332
+ }
333
+ },
334
+ // 🔧 메뉴 모델 초기화
335
+ // 로그아웃 시나 사용자 변경 시 메뉴 모델 클리어
336
+ clearMenu: () => {
337
+ e({
338
+ menuList: [],
339
+ flatMenuList: [],
340
+ error: null,
341
+ _lastFetchParams: null
342
+ });
343
+ },
344
+ // 🔧 메뉴 ID로 메뉴 아이템 찾기
345
+ // URL 파라미터나 프로그래밍 방식으로 특정 메뉴를 찾을 때 사용
346
+ findMenuById: (t) => {
347
+ const { flatMenuList: n } = r();
348
+ return n.find((a) => a.menuId === t) ?? null;
349
+ }
350
+ })), se = {
351
+ MAX_TABS: 15
352
+ }, De = X((e, r) => ({
353
+ // 📊 초기 상태값
354
+ activeMenuId: null,
355
+ activeMenuItem: null,
356
+ activeDetailItem: null,
357
+ tabs: [],
358
+ sidebarCollapsed: !1,
359
+ maxTabs: se.MAX_TABS,
360
+ tabProtectFlag: {},
361
+ tabParams: {},
362
+ componentLabelMap: {},
363
+ // 🔧 탭 추가 (메뉴 아이템 객체로)
364
+ // 사이드바에서 메뉴 클릭 시 호출되는 메인 함수
365
+ openTabFromMenu: (t, n) => {
366
+ const { tabs: a, activeMenuId: i } = r(), f = a.find((m) => m.key === t.menuId), _ = a.find((m) => m.key === t.menuId);
367
+ if (f)
368
+ _ != null ? (e({ activeMenuId: t.menuId, activeMenuItem: t }), r().setTabParams(t.menuId, n || {}), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId)) : te.warning("유효하지 않은 메뉴정보입니다.");
369
+ else {
370
+ if (a.length > se.MAX_TABS) {
371
+ console.warn("❌ 최대 탭 개수를 초과했습니다."), te.warning(
372
+ `최대 ${se.MAX_TABS}개의 탭만 열 수 있습니다.
373
+ 기존 탭을 닫고 다시 시도해주세요.`
374
+ );
375
+ return;
376
+ }
377
+ const m = {
378
+ key: t.menuId,
379
+ label: t.menuNm,
380
+ gubun: "M",
381
+ menuItem: t,
382
+ closable: !0
383
+ };
384
+ e({
385
+ tabs: [...a, m],
386
+ // 탭 목록에 추가
387
+ activeMenuId: t.menuId,
388
+ // 새 탭을 활성화
389
+ activeMenuItem: t
390
+ // 현재 프로그램으로 설정
391
+ }), r().setTabParams(t.menuId, n || {}), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId);
392
+ }
393
+ },
394
+ // 🔧 탭 추가 (메뉴 ID로)
395
+ // URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
396
+ openTabByMenuId: (t, n) => {
397
+ const a = mt.getState().findMenuById(t);
398
+ a ? r().openTabFromMenu(a, n) : te.warning("메뉴 ID를 찾을 수 없습니다.");
399
+ },
400
+ openDetailView: (t, n, a) => {
401
+ const { tabs: i, activeMenuId: f } = r();
402
+ if (i.find((m) => m.key === t.viewId))
403
+ r().focusTab(t.viewId);
404
+ else {
405
+ const m = {
406
+ key: t.viewId,
407
+ label: t.viewLabel,
408
+ gubun: "C",
409
+ componentItem: {
410
+ scrnPath: n,
411
+ prsnInfoYn: a,
412
+ prntInfo: t.prntInfo
413
+ },
414
+ closable: !0
415
+ };
416
+ e({
417
+ tabs: [...i, m],
418
+ // 탭 목록에 추가
419
+ activeMenuId: t.viewId,
420
+ // 새 탭을 활성화
421
+ activeDetailItem: t
422
+ }), r().setTabParams(t.viewId, t.viewParams || {});
423
+ }
424
+ },
425
+ // 🔧 탭 제거
426
+ // X 버튼 클릭 시 탭을 닫고 관련 상태도 정리
427
+ closeTab: (t) => {
428
+ const { tabs: n, activeMenuId: a } = r();
429
+ n.find((_) => _.key === t);
430
+ const i = n.filter((_) => _.key !== t);
431
+ let f = a;
432
+ if (a === t) {
433
+ const _ = n.findIndex((m) => m.key === t);
434
+ f = i.length ? i[Math.min(_, i.length - 1)]?.key ?? null : null;
435
+ }
436
+ e({
437
+ tabs: i
438
+ }), f && r().focusTab(f);
439
+ },
440
+ // 🔧 활성 탭 변경
441
+ // 탭 헤더 클릭 시 해당 탭으로 전환
442
+ focusTab: (t) => {
443
+ const { tabs: n } = r(), a = n.find((i) => i.key === t);
444
+ if (a) {
445
+ const i = a.gubun === "C" ? {
446
+ viewId: a.key,
447
+ viewLabel: a.label,
448
+ prntInfo: a.componentItem?.prntInfo
449
+ } : null;
450
+ a.menuItem?.prsnInfoYn === "Y" ? (e({
451
+ activeMenuId: t,
452
+ activeMenuItem: a.menuItem,
453
+ activeDetailItem: i
454
+ }), console.log(
455
+ "✅ 탭 포커스 (개인정보) - activeMenuItem:",
456
+ a.menuItem
457
+ ), r().setProtectFlagForKey(t)) : (e({
458
+ activeMenuId: t,
459
+ activeMenuItem: a.menuItem,
460
+ activeDetailItem: i
461
+ }), r().clearProtectFlagForKey(t));
462
+ } else
463
+ e({ activeMenuId: t, activeMenuItem: null, activeDetailItem: null }), console.warn("❌ 탭을 찾을 수 없음:", t);
464
+ },
465
+ // 🔧 모든 탭 제거
466
+ // 로그아웃이나 전체 초기화 시 사용
467
+ closeAllTabs: () => e({ tabs: [], activeMenuId: null, activeMenuItem: null, activeDetailItem: null }),
468
+ // 🔧 사이드바 토글
469
+ // 햄버거 메뉴 클릭 시 사이드바 접기/펼치기
470
+ toggleSidebar: () => e((t) => ({ sidebarCollapsed: !t.sidebarCollapsed })),
471
+ // useMenuViewStore.ts
472
+ reorderTabs: (t) => e((n) => {
473
+ const a = new Map(n.tabs.map((i) => [i.key, i]));
474
+ return { tabs: t.map((i) => a.get(i)).filter(Boolean) };
475
+ }),
476
+ // 개인정보 포함여부에 따른 탭 잠금 Flag 설정
477
+ setProtectFlagForKey: (t) => e((n) => ({
478
+ tabProtectFlag: { ...n.tabProtectFlag, [t]: !0 }
479
+ })),
480
+ // 개인정보 포함여부에 따른 탭 잠금 해제
481
+ clearProtectFlagForKey: (t) => e((n) => {
482
+ const a = { ...n.tabProtectFlag };
483
+ return delete a[t], { tabProtectFlag: a };
484
+ }),
485
+ // 탭 파라미터 설정
486
+ setTabParams: (t, n) => e((a) => {
487
+ const i = a.tabParams[t] || {}, f = { ...n || {} };
488
+ return Object.keys(i).length === Object.keys(f).length && Object.keys(f).every((m) => i[m] === f[m]) ? a : {
489
+ tabParams: { ...a.tabParams, [t]: f }
490
+ };
491
+ }),
492
+ // 컴포넌트 라벨 맵 설정
493
+ setComponentLabelMap: (t, n) => e({ componentLabelMap: t })
494
+ })), ie = X((e) => ({
495
+ requestCount: 0,
496
+ loading: !1,
497
+ showLoading: () => e((r) => {
498
+ const t = r.requestCount + 1;
499
+ return { requestCount: t, loading: t > 0 };
500
+ }),
501
+ hideLoading: () => e((r) => {
502
+ const t = Math.max(0, r.requestCount - 1);
503
+ return { requestCount: t, loading: t > 0 };
504
+ })
505
+ }));
506
+ var H = { exports: {} };
507
+ function gt(e) {
508
+ throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
509
+ }
510
+ var z = { exports: {} };
511
+ const pt = {}, vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
+ __proto__: null,
513
+ default: pt
514
+ }, Symbol.toStringTag, { value: "Module" })), yt = /* @__PURE__ */ Ke(vt);
515
+ var wt = z.exports, ge;
516
+ function Oe() {
517
+ return ge || (ge = 1, (function(e, r) {
518
+ (function(t, n) {
519
+ e.exports = n();
520
+ })(wt, function() {
521
+ var t = t || (function(n, a) {
522
+ var i;
523
+ if (typeof window < "u" && window.crypto && (i = window.crypto), typeof self < "u" && self.crypto && (i = self.crypto), typeof globalThis < "u" && globalThis.crypto && (i = globalThis.crypto), !i && typeof window < "u" && window.msCrypto && (i = window.msCrypto), !i && typeof re < "u" && re.crypto && (i = re.crypto), !i && typeof gt == "function")
524
+ try {
525
+ i = yt;
526
+ } catch {
527
+ }
528
+ var f = function() {
529
+ if (i) {
530
+ if (typeof i.getRandomValues == "function")
531
+ try {
532
+ return i.getRandomValues(new Uint32Array(1))[0];
533
+ } catch {
534
+ }
535
+ if (typeof i.randomBytes == "function")
536
+ try {
537
+ return i.randomBytes(4).readInt32LE();
538
+ } catch {
539
+ }
540
+ }
541
+ throw new Error("Native crypto module could not be used to get secure random number.");
542
+ }, _ = Object.create || /* @__PURE__ */ (function() {
543
+ function o() {
544
+ }
545
+ return function(c) {
546
+ var g;
547
+ return o.prototype = c, g = new o(), o.prototype = null, g;
548
+ };
549
+ })(), m = {}, w = m.lib = {}, y = w.Base = /* @__PURE__ */ (function() {
550
+ return {
551
+ /**
552
+ * Creates a new object that inherits from this object.
553
+ *
554
+ * @param {Object} overrides Properties to copy into the new object.
555
+ *
556
+ * @return {Object} The new object.
557
+ *
558
+ * @static
559
+ *
560
+ * @example
561
+ *
562
+ * var MyType = CryptoJS.lib.Base.extend({
563
+ * field: 'value',
564
+ *
565
+ * method: function () {
566
+ * }
567
+ * });
568
+ */
569
+ extend: function(o) {
570
+ var c = _(this);
571
+ return o && c.mixIn(o), (!c.hasOwnProperty("init") || this.init === c.init) && (c.init = function() {
572
+ c.$super.init.apply(this, arguments);
573
+ }), c.init.prototype = c, c.$super = this, c;
574
+ },
575
+ /**
576
+ * Extends this object and runs the init method.
577
+ * Arguments to create() will be passed to init().
578
+ *
579
+ * @return {Object} The new object.
580
+ *
581
+ * @static
582
+ *
583
+ * @example
584
+ *
585
+ * var instance = MyType.create();
586
+ */
587
+ create: function() {
588
+ var o = this.extend();
589
+ return o.init.apply(o, arguments), o;
590
+ },
591
+ /**
592
+ * Initializes a newly created object.
593
+ * Override this method to add some logic when your objects are created.
594
+ *
595
+ * @example
596
+ *
597
+ * var MyType = CryptoJS.lib.Base.extend({
598
+ * init: function () {
599
+ * // ...
600
+ * }
601
+ * });
602
+ */
603
+ init: function() {
604
+ },
605
+ /**
606
+ * Copies properties into this object.
607
+ *
608
+ * @param {Object} properties The properties to mix in.
609
+ *
610
+ * @example
611
+ *
612
+ * MyType.mixIn({
613
+ * field: 'value'
614
+ * });
615
+ */
616
+ mixIn: function(o) {
617
+ for (var c in o)
618
+ o.hasOwnProperty(c) && (this[c] = o[c]);
619
+ o.hasOwnProperty("toString") && (this.toString = o.toString);
620
+ },
621
+ /**
622
+ * Creates a copy of this object.
623
+ *
624
+ * @return {Object} The clone.
625
+ *
626
+ * @example
627
+ *
628
+ * var clone = instance.clone();
629
+ */
630
+ clone: function() {
631
+ return this.init.prototype.extend(this);
632
+ }
633
+ };
634
+ })(), p = w.WordArray = y.extend({
635
+ /**
636
+ * Initializes a newly created word array.
637
+ *
638
+ * @param {Array} words (Optional) An array of 32-bit words.
639
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
640
+ *
641
+ * @example
642
+ *
643
+ * var wordArray = CryptoJS.lib.WordArray.create();
644
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
645
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
646
+ */
647
+ init: function(o, c) {
648
+ o = this.words = o || [], c != a ? this.sigBytes = c : this.sigBytes = o.length * 4;
649
+ },
650
+ /**
651
+ * Converts this word array to a string.
652
+ *
653
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
654
+ *
655
+ * @return {string} The stringified word array.
656
+ *
657
+ * @example
658
+ *
659
+ * var string = wordArray + '';
660
+ * var string = wordArray.toString();
661
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
662
+ */
663
+ toString: function(o) {
664
+ return (o || u).stringify(this);
665
+ },
666
+ /**
667
+ * Concatenates a word array to this word array.
668
+ *
669
+ * @param {WordArray} wordArray The word array to append.
670
+ *
671
+ * @return {WordArray} This word array.
672
+ *
673
+ * @example
674
+ *
675
+ * wordArray1.concat(wordArray2);
676
+ */
677
+ concat: function(o) {
678
+ var c = this.words, g = o.words, v = this.sigBytes, M = o.sigBytes;
679
+ if (this.clamp(), v % 4)
680
+ for (var C = 0; C < M; C++) {
681
+ var T = g[C >>> 2] >>> 24 - C % 4 * 8 & 255;
682
+ c[v + C >>> 2] |= T << 24 - (v + C) % 4 * 8;
683
+ }
684
+ else
685
+ for (var b = 0; b < M; b += 4)
686
+ c[v + b >>> 2] = g[b >>> 2];
687
+ return this.sigBytes += M, this;
688
+ },
689
+ /**
690
+ * Removes insignificant bits.
691
+ *
692
+ * @example
693
+ *
694
+ * wordArray.clamp();
695
+ */
696
+ clamp: function() {
697
+ var o = this.words, c = this.sigBytes;
698
+ o[c >>> 2] &= 4294967295 << 32 - c % 4 * 8, o.length = n.ceil(c / 4);
699
+ },
700
+ /**
701
+ * Creates a copy of this word array.
702
+ *
703
+ * @return {WordArray} The clone.
704
+ *
705
+ * @example
706
+ *
707
+ * var clone = wordArray.clone();
708
+ */
709
+ clone: function() {
710
+ var o = y.clone.call(this);
711
+ return o.words = this.words.slice(0), o;
712
+ },
713
+ /**
714
+ * Creates a word array filled with random bytes.
715
+ *
716
+ * @param {number} nBytes The number of random bytes to generate.
717
+ *
718
+ * @return {WordArray} The random word array.
719
+ *
720
+ * @static
721
+ *
722
+ * @example
723
+ *
724
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
725
+ */
726
+ random: function(o) {
727
+ for (var c = [], g = 0; g < o; g += 4)
728
+ c.push(f());
729
+ return new p.init(c, o);
730
+ }
731
+ }), l = m.enc = {}, u = l.Hex = {
732
+ /**
733
+ * Converts a word array to a hex string.
734
+ *
735
+ * @param {WordArray} wordArray The word array.
736
+ *
737
+ * @return {string} The hex string.
738
+ *
739
+ * @static
740
+ *
741
+ * @example
742
+ *
743
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
744
+ */
745
+ stringify: function(o) {
746
+ for (var c = o.words, g = o.sigBytes, v = [], M = 0; M < g; M++) {
747
+ var C = c[M >>> 2] >>> 24 - M % 4 * 8 & 255;
748
+ v.push((C >>> 4).toString(16)), v.push((C & 15).toString(16));
749
+ }
750
+ return v.join("");
751
+ },
752
+ /**
753
+ * Converts a hex string to a word array.
754
+ *
755
+ * @param {string} hexStr The hex string.
756
+ *
757
+ * @return {WordArray} The word array.
758
+ *
759
+ * @static
760
+ *
761
+ * @example
762
+ *
763
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
764
+ */
765
+ parse: function(o) {
766
+ for (var c = o.length, g = [], v = 0; v < c; v += 2)
767
+ g[v >>> 3] |= parseInt(o.substr(v, 2), 16) << 24 - v % 8 * 4;
768
+ return new p.init(g, c / 2);
769
+ }
770
+ }, h = l.Latin1 = {
771
+ /**
772
+ * Converts a word array to a Latin1 string.
773
+ *
774
+ * @param {WordArray} wordArray The word array.
775
+ *
776
+ * @return {string} The Latin1 string.
777
+ *
778
+ * @static
779
+ *
780
+ * @example
781
+ *
782
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
783
+ */
784
+ stringify: function(o) {
785
+ for (var c = o.words, g = o.sigBytes, v = [], M = 0; M < g; M++) {
786
+ var C = c[M >>> 2] >>> 24 - M % 4 * 8 & 255;
787
+ v.push(String.fromCharCode(C));
788
+ }
789
+ return v.join("");
790
+ },
791
+ /**
792
+ * Converts a Latin1 string to a word array.
793
+ *
794
+ * @param {string} latin1Str The Latin1 string.
795
+ *
796
+ * @return {WordArray} The word array.
797
+ *
798
+ * @static
799
+ *
800
+ * @example
801
+ *
802
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
803
+ */
804
+ parse: function(o) {
805
+ for (var c = o.length, g = [], v = 0; v < c; v++)
806
+ g[v >>> 2] |= (o.charCodeAt(v) & 255) << 24 - v % 4 * 8;
807
+ return new p.init(g, c);
808
+ }
809
+ }, s = l.Utf8 = {
810
+ /**
811
+ * Converts a word array to a UTF-8 string.
812
+ *
813
+ * @param {WordArray} wordArray The word array.
814
+ *
815
+ * @return {string} The UTF-8 string.
816
+ *
817
+ * @static
818
+ *
819
+ * @example
820
+ *
821
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
822
+ */
823
+ stringify: function(o) {
824
+ try {
825
+ return decodeURIComponent(escape(h.stringify(o)));
826
+ } catch {
827
+ throw new Error("Malformed UTF-8 data");
828
+ }
829
+ },
830
+ /**
831
+ * Converts a UTF-8 string to a word array.
832
+ *
833
+ * @param {string} utf8Str The UTF-8 string.
834
+ *
835
+ * @return {WordArray} The word array.
836
+ *
837
+ * @static
838
+ *
839
+ * @example
840
+ *
841
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
842
+ */
843
+ parse: function(o) {
844
+ return h.parse(unescape(encodeURIComponent(o)));
845
+ }
846
+ }, d = w.BufferedBlockAlgorithm = y.extend({
847
+ /**
848
+ * Resets this block algorithm's data buffer to its initial state.
849
+ *
850
+ * @example
851
+ *
852
+ * bufferedBlockAlgorithm.reset();
853
+ */
854
+ reset: function() {
855
+ this._data = new p.init(), this._nDataBytes = 0;
856
+ },
857
+ /**
858
+ * Adds new data to this block algorithm's buffer.
859
+ *
860
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
861
+ *
862
+ * @example
863
+ *
864
+ * bufferedBlockAlgorithm._append('data');
865
+ * bufferedBlockAlgorithm._append(wordArray);
866
+ */
867
+ _append: function(o) {
868
+ typeof o == "string" && (o = s.parse(o)), this._data.concat(o), this._nDataBytes += o.sigBytes;
869
+ },
870
+ /**
871
+ * Processes available data blocks.
872
+ *
873
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
874
+ *
875
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
876
+ *
877
+ * @return {WordArray} The processed data.
878
+ *
879
+ * @example
880
+ *
881
+ * var processedData = bufferedBlockAlgorithm._process();
882
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
883
+ */
884
+ _process: function(o) {
885
+ var c, g = this._data, v = g.words, M = g.sigBytes, C = this.blockSize, T = C * 4, b = M / T;
886
+ o ? b = n.ceil(b) : b = n.max((b | 0) - this._minBufferSize, 0);
887
+ var I = b * C, D = n.min(I * 4, M);
888
+ if (I) {
889
+ for (var k = 0; k < I; k += C)
890
+ this._doProcessBlock(v, k);
891
+ c = v.splice(0, I), g.sigBytes -= D;
892
+ }
893
+ return new p.init(c, D);
894
+ },
895
+ /**
896
+ * Creates a copy of this object.
897
+ *
898
+ * @return {Object} The clone.
899
+ *
900
+ * @example
901
+ *
902
+ * var clone = bufferedBlockAlgorithm.clone();
903
+ */
904
+ clone: function() {
905
+ var o = y.clone.call(this);
906
+ return o._data = this._data.clone(), o;
907
+ },
908
+ _minBufferSize: 0
909
+ });
910
+ w.Hasher = d.extend({
911
+ /**
912
+ * Configuration options.
913
+ */
914
+ cfg: y.extend(),
915
+ /**
916
+ * Initializes a newly created hasher.
917
+ *
918
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
919
+ *
920
+ * @example
921
+ *
922
+ * var hasher = CryptoJS.algo.SHA256.create();
923
+ */
924
+ init: function(o) {
925
+ this.cfg = this.cfg.extend(o), this.reset();
926
+ },
927
+ /**
928
+ * Resets this hasher to its initial state.
929
+ *
930
+ * @example
931
+ *
932
+ * hasher.reset();
933
+ */
934
+ reset: function() {
935
+ d.reset.call(this), this._doReset();
936
+ },
937
+ /**
938
+ * Updates this hasher with a message.
939
+ *
940
+ * @param {WordArray|string} messageUpdate The message to append.
941
+ *
942
+ * @return {Hasher} This hasher.
943
+ *
944
+ * @example
945
+ *
946
+ * hasher.update('message');
947
+ * hasher.update(wordArray);
948
+ */
949
+ update: function(o) {
950
+ return this._append(o), this._process(), this;
951
+ },
952
+ /**
953
+ * Finalizes the hash computation.
954
+ * Note that the finalize operation is effectively a destructive, read-once operation.
955
+ *
956
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
957
+ *
958
+ * @return {WordArray} The hash.
959
+ *
960
+ * @example
961
+ *
962
+ * var hash = hasher.finalize();
963
+ * var hash = hasher.finalize('message');
964
+ * var hash = hasher.finalize(wordArray);
965
+ */
966
+ finalize: function(o) {
967
+ o && this._append(o);
968
+ var c = this._doFinalize();
969
+ return c;
970
+ },
971
+ blockSize: 16,
972
+ /**
973
+ * Creates a shortcut function to a hasher's object interface.
974
+ *
975
+ * @param {Hasher} hasher The hasher to create a helper for.
976
+ *
977
+ * @return {Function} The shortcut function.
978
+ *
979
+ * @static
980
+ *
981
+ * @example
982
+ *
983
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
984
+ */
985
+ _createHelper: function(o) {
986
+ return function(c, g) {
987
+ return new o.init(g).finalize(c);
988
+ };
989
+ },
990
+ /**
991
+ * Creates a shortcut function to the HMAC's object interface.
992
+ *
993
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
994
+ *
995
+ * @return {Function} The shortcut function.
996
+ *
997
+ * @static
998
+ *
999
+ * @example
1000
+ *
1001
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
1002
+ */
1003
+ _createHmacHelper: function(o) {
1004
+ return function(c, g) {
1005
+ return new S.HMAC.init(o, g).finalize(c);
1006
+ };
1007
+ }
1008
+ });
1009
+ var S = m.algo = {};
1010
+ return m;
1011
+ })(Math);
1012
+ return t;
1013
+ });
1014
+ })(z)), z.exports;
1015
+ }
1016
+ var _t = H.exports, pe;
1017
+ function St() {
1018
+ return pe || (pe = 1, (function(e, r) {
1019
+ (function(t, n) {
1020
+ e.exports = n(Oe());
1021
+ })(_t, function(t) {
1022
+ return (function(n) {
1023
+ var a = t, i = a.lib, f = i.WordArray, _ = i.Hasher, m = a.algo, w = [], y = [];
1024
+ (function() {
1025
+ function u(S) {
1026
+ for (var o = n.sqrt(S), c = 2; c <= o; c++)
1027
+ if (!(S % c))
1028
+ return !1;
1029
+ return !0;
1030
+ }
1031
+ function h(S) {
1032
+ return (S - (S | 0)) * 4294967296 | 0;
1033
+ }
1034
+ for (var s = 2, d = 0; d < 64; )
1035
+ u(s) && (d < 8 && (w[d] = h(n.pow(s, 1 / 2))), y[d] = h(n.pow(s, 1 / 3)), d++), s++;
1036
+ })();
1037
+ var p = [], l = m.SHA256 = _.extend({
1038
+ _doReset: function() {
1039
+ this._hash = new f.init(w.slice(0));
1040
+ },
1041
+ _doProcessBlock: function(u, h) {
1042
+ for (var s = this._hash.words, d = s[0], S = s[1], o = s[2], c = s[3], g = s[4], v = s[5], M = s[6], C = s[7], T = 0; T < 64; T++) {
1043
+ if (T < 16)
1044
+ p[T] = u[h + T] | 0;
1045
+ else {
1046
+ var b = p[T - 15], I = (b << 25 | b >>> 7) ^ (b << 14 | b >>> 18) ^ b >>> 3, D = p[T - 2], k = (D << 15 | D >>> 17) ^ (D << 13 | D >>> 19) ^ D >>> 10;
1047
+ p[T] = I + p[T - 7] + k + p[T - 16];
1048
+ }
1049
+ var ze = g & v ^ ~g & M, je = d & S ^ d & o ^ S & o, qe = (d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22), We = (g << 26 | g >>> 6) ^ (g << 21 | g >>> 11) ^ (g << 7 | g >>> 25), fe = C + We + ze + y[T] + p[T], Ge = qe + je;
1050
+ C = M, M = v, v = g, g = c + fe | 0, c = o, o = S, S = d, d = fe + Ge | 0;
1051
+ }
1052
+ s[0] = s[0] + d | 0, s[1] = s[1] + S | 0, s[2] = s[2] + o | 0, s[3] = s[3] + c | 0, s[4] = s[4] + g | 0, s[5] = s[5] + v | 0, s[6] = s[6] + M | 0, s[7] = s[7] + C | 0;
1053
+ },
1054
+ _doFinalize: function() {
1055
+ var u = this._data, h = u.words, s = this._nDataBytes * 8, d = u.sigBytes * 8;
1056
+ return h[d >>> 5] |= 128 << 24 - d % 32, h[(d + 64 >>> 9 << 4) + 14] = n.floor(s / 4294967296), h[(d + 64 >>> 9 << 4) + 15] = s, u.sigBytes = h.length * 4, this._process(), this._hash;
1057
+ },
1058
+ clone: function() {
1059
+ var u = _.clone.call(this);
1060
+ return u._hash = this._hash.clone(), u;
1061
+ }
1062
+ });
1063
+ a.SHA256 = _._createHelper(l), a.HmacSHA256 = _._createHmacHelper(l);
1064
+ })(Math), t.SHA256;
1065
+ });
1066
+ })(H)), H.exports;
1067
+ }
1068
+ var Mt = St();
1069
+ const Ct = /* @__PURE__ */ F(Mt);
1070
+ var j = { exports: {} }, Tt = j.exports, ve;
1071
+ function bt() {
1072
+ return ve || (ve = 1, (function(e, r) {
1073
+ (function(t, n) {
1074
+ e.exports = n(Oe());
1075
+ })(Tt, function(t) {
1076
+ return (function() {
1077
+ var n = t, a = n.lib, i = a.WordArray, f = n.enc;
1078
+ f.Base64 = {
1079
+ /**
1080
+ * Converts a word array to a Base64 string.
1081
+ *
1082
+ * @param {WordArray} wordArray The word array.
1083
+ *
1084
+ * @return {string} The Base64 string.
1085
+ *
1086
+ * @static
1087
+ *
1088
+ * @example
1089
+ *
1090
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
1091
+ */
1092
+ stringify: function(m) {
1093
+ var w = m.words, y = m.sigBytes, p = this._map;
1094
+ m.clamp();
1095
+ for (var l = [], u = 0; u < y; u += 3)
1096
+ for (var h = w[u >>> 2] >>> 24 - u % 4 * 8 & 255, s = w[u + 1 >>> 2] >>> 24 - (u + 1) % 4 * 8 & 255, d = w[u + 2 >>> 2] >>> 24 - (u + 2) % 4 * 8 & 255, S = h << 16 | s << 8 | d, o = 0; o < 4 && u + o * 0.75 < y; o++)
1097
+ l.push(p.charAt(S >>> 6 * (3 - o) & 63));
1098
+ var c = p.charAt(64);
1099
+ if (c)
1100
+ for (; l.length % 4; )
1101
+ l.push(c);
1102
+ return l.join("");
1103
+ },
1104
+ /**
1105
+ * Converts a Base64 string to a word array.
1106
+ *
1107
+ * @param {string} base64Str The Base64 string.
1108
+ *
1109
+ * @return {WordArray} The word array.
1110
+ *
1111
+ * @static
1112
+ *
1113
+ * @example
1114
+ *
1115
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
1116
+ */
1117
+ parse: function(m) {
1118
+ var w = m.length, y = this._map, p = this._reverseMap;
1119
+ if (!p) {
1120
+ p = this._reverseMap = [];
1121
+ for (var l = 0; l < y.length; l++)
1122
+ p[y.charCodeAt(l)] = l;
1123
+ }
1124
+ var u = y.charAt(64);
1125
+ if (u) {
1126
+ var h = m.indexOf(u);
1127
+ h !== -1 && (w = h);
1128
+ }
1129
+ return _(m, w, p);
1130
+ },
1131
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
1132
+ };
1133
+ function _(m, w, y) {
1134
+ for (var p = [], l = 0, u = 0; u < w; u++)
1135
+ if (u % 4) {
1136
+ var h = y[m.charCodeAt(u - 1)] << u % 4 * 2, s = y[m.charCodeAt(u)] >>> 6 - u % 4 * 2, d = h | s;
1137
+ p[l >>> 2] |= d << 24 - l % 4 * 8, l++;
1138
+ }
1139
+ return i.create(p, l);
1140
+ }
1141
+ })(), t.enc.Base64;
1142
+ });
1143
+ })(j)), j.exports;
1144
+ }
1145
+ var xt = bt();
1146
+ const It = /* @__PURE__ */ F(xt);
1147
+ var q = { exports: {} }, Dt = q.exports, ye;
1148
+ function Ot() {
1149
+ return ye || (ye = 1, (function(e, r) {
1150
+ (function(t, n) {
1151
+ e.exports = n(A);
1152
+ })(Dt, (function(t) {
1153
+ function n(f) {
1154
+ return f && typeof f == "object" && "default" in f ? f : { default: f };
1155
+ }
1156
+ var a = n(t), i = { 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(f) {
1157
+ return f + "일";
1158
+ }, 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(f) {
1159
+ return f < 12 ? "오전" : "오후";
1160
+ }, relativeTime: { future: "%s 후", past: "%s 전", s: "몇 초", m: "1분", mm: "%d분", h: "한 시간", hh: "%d시간", d: "하루", dd: "%d일", M: "한 달", MM: "%d달", y: "일 년", yy: "%d년" } };
1161
+ return a.default.locale(i, null, !0), i;
1162
+ }));
1163
+ })(q)), q.exports;
1164
+ }
1165
+ Ot();
1166
+ var W = { exports: {} }, Et = W.exports, we;
1167
+ function $t() {
1168
+ return we || (we = 1, (function(e, r) {
1169
+ (function(t, n) {
1170
+ e.exports = n();
1171
+ })(Et, (function() {
1172
+ return function(t, n, a) {
1173
+ t = t || {};
1174
+ var i = n.prototype, f = { 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" };
1175
+ function _(w, y, p, l) {
1176
+ return i.fromToBase(w, y, p, l);
1177
+ }
1178
+ a.en.relativeTime = f, i.fromToBase = function(w, y, p, l, u) {
1179
+ for (var h, s, d, S = p.$locale().relativeTime || f, o = 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" }], c = o.length, g = 0; g < c; g += 1) {
1180
+ var v = o[g];
1181
+ v.d && (h = l ? a(w).diff(p, v.d, !0) : p.diff(w, v.d, !0));
1182
+ var M = (t.rounding || Math.round)(Math.abs(h));
1183
+ if (d = h > 0, M <= v.r || !v.r) {
1184
+ M <= 1 && g > 0 && (v = o[g - 1]);
1185
+ var C = S[v.l];
1186
+ u && (M = u("" + M)), s = typeof C == "string" ? C.replace("%d", M) : C(M, y, v.l, d);
1187
+ break;
1188
+ }
1189
+ }
1190
+ if (y) return s;
1191
+ var T = d ? S.future : S.past;
1192
+ return typeof T == "function" ? T(s) : T.replace("%s", s);
1193
+ }, i.to = function(w, y) {
1194
+ return _(w, y, this, !0);
1195
+ }, i.from = function(w, y) {
1196
+ return _(w, y, this);
1197
+ };
1198
+ var m = function(w) {
1199
+ return w.$u ? a.utc() : a();
1200
+ };
1201
+ i.toNow = function(w) {
1202
+ return this.to(m(this), w);
1203
+ }, i.fromNow = function(w) {
1204
+ return this.from(m(this), w);
1205
+ };
1206
+ };
1207
+ }));
1208
+ })(W)), W.exports;
1209
+ }
1210
+ var Nt = $t();
1211
+ const Pt = /* @__PURE__ */ F(Nt);
1212
+ var G = { exports: {} }, Lt = G.exports, _e;
1213
+ function At() {
1214
+ return _e || (_e = 1, (function(e, r) {
1215
+ (function(t, n) {
1216
+ e.exports = n();
1217
+ })(Lt, (function() {
1218
+ var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
1219
+ return function(a, i, f) {
1220
+ var _, m = function(l, u, h) {
1221
+ h === void 0 && (h = {});
1222
+ var s = new Date(l), d = (function(S, o) {
1223
+ o === void 0 && (o = {});
1224
+ var c = o.timeZoneName || "short", g = S + "|" + c, v = n[g];
1225
+ return v || (v = 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: c }), n[g] = v), v;
1226
+ })(u, h);
1227
+ return d.formatToParts(s);
1228
+ }, w = function(l, u) {
1229
+ for (var h = m(l, u), s = [], d = 0; d < h.length; d += 1) {
1230
+ var S = h[d], o = S.type, c = S.value, g = t[o];
1231
+ g >= 0 && (s[g] = parseInt(c, 10));
1232
+ }
1233
+ var v = s[3], M = v === 24 ? 0 : v, C = s[0] + "-" + s[1] + "-" + s[2] + " " + M + ":" + s[4] + ":" + s[5] + ":000", T = +l;
1234
+ return (f.utc(C).valueOf() - (T -= T % 1e3)) / 6e4;
1235
+ }, y = i.prototype;
1236
+ y.tz = function(l, u) {
1237
+ l === void 0 && (l = _);
1238
+ var h, s = this.utcOffset(), d = this.toDate(), S = d.toLocaleString("en-US", { timeZone: l }), o = Math.round((d - new Date(S)) / 1e3 / 60), c = 15 * -Math.round(d.getTimezoneOffset() / 15) - o;
1239
+ if (!Number(c)) h = this.utcOffset(0, u);
1240
+ else if (h = f(S, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(c, !0), u) {
1241
+ var g = h.utcOffset();
1242
+ h = h.add(s - g, "minute");
1243
+ }
1244
+ return h.$x.$timezone = l, h;
1245
+ }, y.offsetName = function(l) {
1246
+ var u = this.$x.$timezone || f.tz.guess(), h = m(this.valueOf(), u, { timeZoneName: l }).find((function(s) {
1247
+ return s.type.toLowerCase() === "timezonename";
1248
+ }));
1249
+ return h && h.value;
1250
+ };
1251
+ var p = y.startOf;
1252
+ y.startOf = function(l, u) {
1253
+ if (!this.$x || !this.$x.$timezone) return p.call(this, l, u);
1254
+ var h = f(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1255
+ return p.call(h, l, u).tz(this.$x.$timezone, !0);
1256
+ }, f.tz = function(l, u, h) {
1257
+ var s = h && u, d = h || u || _, S = w(+f(), d);
1258
+ if (typeof l != "string") return f(l).tz(d);
1259
+ var o = (function(M, C, T) {
1260
+ var b = M - 60 * C * 1e3, I = w(b, T);
1261
+ if (C === I) return [b, C];
1262
+ var D = w(b -= 60 * (I - C) * 1e3, T);
1263
+ return I === D ? [b, I] : [M - 60 * Math.min(I, D) * 1e3, Math.max(I, D)];
1264
+ })(f.utc(l, s).valueOf(), S, d), c = o[0], g = o[1], v = f(c).utcOffset(g);
1265
+ return v.$x.$timezone = d, v;
1266
+ }, f.tz.guess = function() {
1267
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
1268
+ }, f.tz.setDefault = function(l) {
1269
+ _ = l;
1270
+ };
1271
+ };
1272
+ }));
1273
+ })(G)), G.exports;
1274
+ }
1275
+ var Ut = At();
1276
+ const Bt = /* @__PURE__ */ F(Ut);
1277
+ var K = { exports: {} }, kt = K.exports, Se;
1278
+ function Yt() {
1279
+ return Se || (Se = 1, (function(e, r) {
1280
+ (function(t, n) {
1281
+ e.exports = n();
1282
+ })(kt, (function() {
1283
+ var t = "minute", n = /[+-]\d\d(?::?\d\d)?/g, a = /([+-]|\d\d)/g;
1284
+ return function(i, f, _) {
1285
+ var m = f.prototype;
1286
+ _.utc = function(s) {
1287
+ var d = { date: s, utc: !0, args: arguments };
1288
+ return new f(d);
1289
+ }, m.utc = function(s) {
1290
+ var d = _(this.toDate(), { locale: this.$L, utc: !0 });
1291
+ return s ? d.add(this.utcOffset(), t) : d;
1292
+ }, m.local = function() {
1293
+ return _(this.toDate(), { locale: this.$L, utc: !1 });
1294
+ };
1295
+ var w = m.parse;
1296
+ m.parse = function(s) {
1297
+ s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), w.call(this, s);
1298
+ };
1299
+ var y = m.init;
1300
+ m.init = function() {
1301
+ if (this.$u) {
1302
+ var s = this.$d;
1303
+ 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();
1304
+ } else y.call(this);
1305
+ };
1306
+ var p = m.utcOffset;
1307
+ m.utcOffset = function(s, d) {
1308
+ var S = this.$utils().u;
1309
+ if (S(s)) return this.$u ? 0 : S(this.$offset) ? p.call(this) : this.$offset;
1310
+ if (typeof s == "string" && (s = (function(v) {
1311
+ v === void 0 && (v = "");
1312
+ var M = v.match(n);
1313
+ if (!M) return null;
1314
+ var C = ("" + M[0]).match(a) || ["-", 0, 0], T = C[0], b = 60 * +C[1] + +C[2];
1315
+ return b === 0 ? 0 : T === "+" ? b : -b;
1316
+ })(s), s === null)) return this;
1317
+ var o = Math.abs(s) <= 16 ? 60 * s : s, c = this;
1318
+ if (d) return c.$offset = o, c.$u = s === 0, c;
1319
+ if (s !== 0) {
1320
+ var g = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1321
+ (c = this.local().add(o + g, t)).$offset = o, c.$x.$localOffset = g;
1322
+ } else c = this.utc();
1323
+ return c;
1324
+ };
1325
+ var l = m.format;
1326
+ m.format = function(s) {
1327
+ var d = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1328
+ return l.call(this, d);
1329
+ }, m.valueOf = function() {
1330
+ var s = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1331
+ return this.$d.valueOf() - 6e4 * s;
1332
+ }, m.isUTC = function() {
1333
+ return !!this.$u;
1334
+ }, m.toISOString = function() {
1335
+ return this.toDate().toISOString();
1336
+ }, m.toString = function() {
1337
+ return this.toDate().toUTCString();
1338
+ };
1339
+ var u = m.toDate;
1340
+ m.toDate = function(s) {
1341
+ return s === "s" && this.$offset ? _(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : u.call(this);
1342
+ };
1343
+ var h = m.diff;
1344
+ m.diff = function(s, d, S) {
1345
+ if (s && this.$u === s.$u) return h.call(this, s, d, S);
1346
+ var o = this.local(), c = _(s).local();
1347
+ return h.call(o, c, d, S);
1348
+ };
1349
+ };
1350
+ }));
1351
+ })(K)), K.exports;
1352
+ }
1353
+ var Rt = Yt();
1354
+ const Ft = /* @__PURE__ */ F(Rt), Ht = "ui_theme", zt = (e) => typeof e == "string", jt = (e) => typeof e == "number" && !isNaN(e), qt = (e) => typeof e == "boolean", Wt = (e) => typeof e == "function", Gt = (e) => e !== null && typeof e == "object", Kt = (e) => Array.isArray(e), Jt = (e) => e === null, Xt = (e) => e === void 0, Zt = (e) => e == null, Vt = (e, r) => {
1355
+ let t = 0;
1356
+ return (...n) => {
1357
+ const a = Date.now();
1358
+ a - t >= r && (t = a, e(...n));
1359
+ };
1360
+ }, Qt = (e, r) => {
1361
+ let t;
1362
+ return (...n) => {
1363
+ clearTimeout(t), t = setTimeout(() => e(...n), r);
1364
+ };
1365
+ }, er = async (e) => {
1366
+ try {
1367
+ return await navigator.clipboard.writeText(e), !0;
1368
+ } catch (r) {
1369
+ return console.error("Error copying to clipboard:", r), !1;
1370
+ }
1371
+ }, Q = () => {
1372
+ const e = window.innerWidth;
1373
+ return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
1374
+ }, tr = () => Q() === "mobile", rr = () => Q() === "tablet", nr = () => Q() === "desktop", sr = () => "#" + Math.floor(Math.random() * 16777215).toString(16), ee = (e) => !e || e.length === 0, or = (e) => [...new Set(e)], ar = (e) => {
1375
+ if (!ee(e))
1376
+ return Math.max(...e);
1377
+ }, ir = (e) => {
1378
+ if (!ee(e))
1379
+ return Math.min(...e);
1380
+ }, cr = (e) => {
1381
+ if (!ee(e))
1382
+ return e.reduce((r, t) => r + t, 0) / e.length;
1383
+ }, ur = (e) => e.reduce((r, t) => r + t, 0), lr = (e, r) => e.filter(r).length, dr = (e) => [...e].reverse(), fr = (e) => {
1384
+ const r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
1385
+ return e.forEach((n) => {
1386
+ r.has(n) ? t.add(n) : r.add(n);
1387
+ }), Array.from(t);
1388
+ }, hr = (e, r) => Math.random() * (r - e) + e, mr = (e, r, t) => Math.min(Math.max(e, r), t), gr = (e, r = 0) => Math.round(e * Math.pow(10, r)) / Math.pow(10, r), pr = (e, r) => {
1389
+ try {
1390
+ sessionStorage.setItem(e, JSON.stringify(r));
1391
+ } catch (t) {
1392
+ console.error("Error saving to sessionStorage:", t);
1393
+ }
1394
+ }, vr = (e, r) => {
1395
+ try {
1396
+ const t = sessionStorage.getItem(e);
1397
+ return t ? JSON.parse(t) : r || null;
1398
+ } catch (t) {
1399
+ return console.error("Error reading from sessionStorage:", t), r || null;
1400
+ }
1401
+ }, yr = (e) => {
1402
+ try {
1403
+ sessionStorage.removeItem(e);
1404
+ } catch (r) {
1405
+ console.error("Error removing from sessionStorage:", r);
1406
+ }
1407
+ }, wr = () => {
1408
+ try {
1409
+ sessionStorage.clear();
1410
+ } catch (e) {
1411
+ console.error("Error clearing sessionStorage:", e);
1412
+ }
1413
+ }, _r = (e, r, t = 30) => {
1414
+ const n = /* @__PURE__ */ new Date();
1415
+ n.setTime(n.getTime() + t * 24 * 60 * 60 * 1e3), document.cookie = `${e}=${r};expires=${n.toUTCString()};path=/`;
1416
+ }, Sr = (e) => {
1417
+ const r = e + "=", t = document.cookie.split(";");
1418
+ for (let n = 0; n < t.length; n++) {
1419
+ let a = t[n];
1420
+ for (; a.charAt(0) === " "; ) a = a.substring(1, a.length);
1421
+ if (a.indexOf(r) === 0) return a.substring(r.length, a.length);
1422
+ }
1423
+ return null;
1424
+ }, Mr = (e) => {
1425
+ document.cookie = `${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
1426
+ }, Ee = (e) => typeof e != "string" ? !e : e.trim().length === 0, Cr = (e, r) => Ee(e) ? r : e || "", Tr = (e) => e.replace(/-([a-z])/g, (r) => r[1].toUpperCase()), br = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), xr = (e) => {
1427
+ try {
1428
+ return new URL(e), !0;
1429
+ } catch {
1430
+ return !1;
1431
+ }
1432
+ }, Ir = (e, r, t = " ") => e.padStart(r, t), Dr = (e, r, t = " ") => e.padEnd(r, t), $e = (e, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
1433
+ let t = "";
1434
+ for (let n = 0; n < e; n++)
1435
+ t += r.charAt(Math.floor(Math.random() * r.length));
1436
+ return t;
1437
+ }, Or = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1438
+ const r = Math.random() * 16 | 0;
1439
+ return (e === "x" ? r : r & 3 | 8).toString(16);
1440
+ }), Ne = (e = 32) => {
1441
+ const t = Or().replace(/-/g, "");
1442
+ return e >= 32 ? t + $e(e - 32, "0123456789abcdef") : t.substring(0, e);
1443
+ };
1444
+ async function Er(e) {
1445
+ return Ct(e).toString(It);
1446
+ }
1447
+ A.extend(Pt);
1448
+ A.extend(Ft);
1449
+ A.extend(Bt);
1450
+ A.locale("ko");
1451
+ const $r = () => A(), Nr = (e = "YYYY-MM-DD") => A().format(e), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1452
+ __proto__: null,
1453
+ THEME_COOKIE_NAME: Ht,
1454
+ arrAverage: cr,
1455
+ arrCount: lr,
1456
+ arrMax: ar,
1457
+ arrMin: ir,
1458
+ arrReverse: dr,
1459
+ arrSum: ur,
1460
+ arrUnique: or,
1461
+ clamp: mr,
1462
+ clearSessionStorage: wr,
1463
+ copyToClipboard: er,
1464
+ debounce: Qt,
1465
+ deleteCookie: Mr,
1466
+ duplicates: fr,
1467
+ encryptSha256: Er,
1468
+ generateRandomColor: sr,
1469
+ generateRandomString: $e,
1470
+ generateUID: Ne,
1471
+ getCookie: Sr,
1472
+ getCurrentDate: $r,
1473
+ getCurrentDateString: Nr,
1474
+ getDeviceType: Q,
1475
+ getSessionStorage: vr,
1476
+ isArray: Kt,
1477
+ isBoolean: qt,
1478
+ isDesktop: nr,
1479
+ isEmpty: Ee,
1480
+ isEmptyArray: ee,
1481
+ isFunction: Wt,
1482
+ isMobile: tr,
1483
+ isNull: Jt,
1484
+ isNullOrUndefined: Zt,
1485
+ isNumber: jt,
1486
+ isObject: Gt,
1487
+ isSafeEmpty: Cr,
1488
+ isString: zt,
1489
+ isTablet: rr,
1490
+ isUndefined: Xt,
1491
+ isValidEmail: br,
1492
+ isValidUrl: xr,
1493
+ padLeft: Ir,
1494
+ padRight: Dr,
1495
+ random: hr,
1496
+ removeSessionStorage: yr,
1497
+ round: gr,
1498
+ setCookie: _r,
1499
+ setSessionStorage: pr,
1500
+ throttle: Vt,
1501
+ toCamelCase: Tr
1502
+ }, Symbol.toStringTag, { value: "Module" })), L = (() => {
1503
+ try {
1504
+ if (import.meta.env.DEV)
1505
+ return !0;
1506
+ } catch {
1507
+ }
1508
+ return !1;
1509
+ })();
1510
+ let Pe = [], Le = [];
1511
+ function Pr(e) {
1512
+ e.devHosts && (Pe = e.devHosts), e.prodHosts && (Le = e.prodHosts);
1513
+ }
1514
+ function Ae() {
1515
+ if (typeof window < "u" && window.location)
1516
+ return window.location.hostname;
1517
+ }
1518
+ const Ue = (() => {
1519
+ const e = Ae();
1520
+ return !!(e && Pe.includes(e));
1521
+ })(), Be = (() => {
1522
+ const e = Ae();
1523
+ return !!(e && Le.includes(e));
1524
+ })();
1525
+ function Lr() {
1526
+ return L ? "X" : Ue ? "D" : Be ? "P" : "X";
1527
+ }
1528
+ const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1529
+ __proto__: null,
1530
+ configureEnvUtils: Pr,
1531
+ getEnvCode: Lr,
1532
+ isDev: Ue,
1533
+ isLocal: L,
1534
+ isProd: Be
1535
+ }, Symbol.toStringTag, { value: "Module" })), O = {
1536
+ duration: 4.5,
1537
+ // 4.5초
1538
+ placement: "topRight"
1539
+ };
1540
+ class B {
1541
+ constructor() {
1542
+ }
1543
+ static getInstance() {
1544
+ return B.instance || (B.instance = new B()), B.instance;
1545
+ }
1546
+ /**
1547
+ * BwgError 전용 에러 알림
1548
+ * @param props - 에러 메시지 설정
1549
+ */
1550
+ showBwgError(r) {
1551
+ const {
1552
+ message: t,
1553
+ description: n,
1554
+ duration: a = O.duration,
1555
+ placement: i = O.placement
1556
+ } = r;
1557
+ P.error({
1558
+ message: `${t}`,
1559
+ description: n || "오류가 발생했습니다. 다시 시도해주세요.",
1560
+ duration: a,
1561
+ placement: i,
1562
+ style: {
1563
+ borderLeft: "4px solid #ff4d4f",
1564
+ backgroundColor: "#fff2f0"
1565
+ }
1566
+ });
1567
+ }
1568
+ /**
1569
+ * 성공 알림
1570
+ */
1571
+ showSuccess(r, t, n) {
1572
+ P.success({
1573
+ message: `${r}`,
1574
+ description: t,
1575
+ duration: n || O.duration,
1576
+ placement: O.placement
1577
+ });
1578
+ }
1579
+ /**
1580
+ * 정보 알림
1581
+ */
1582
+ showInfo(r, t, n) {
1583
+ P.info({
1584
+ message: `${r}`,
1585
+ description: t,
1586
+ duration: n || O.duration,
1587
+ placement: O.placement
1588
+ });
1589
+ }
1590
+ /**
1591
+ * 경고 알림
1592
+ */
1593
+ showWarning(r, t, n) {
1594
+ P.warning({
1595
+ message: `${r}`,
1596
+ description: t,
1597
+ duration: n || O.duration,
1598
+ placement: O.placement
1599
+ });
1600
+ }
1601
+ /**
1602
+ * 일반 에러 알림
1603
+ */
1604
+ showError(r, t, n) {
1605
+ P.error({
1606
+ message: `${r}`,
1607
+ description: t,
1608
+ duration: n || O.duration,
1609
+ placement: O.placement
1610
+ });
1611
+ }
1612
+ /**
1613
+ * 모든 알림 닫기
1614
+ */
1615
+ destroy() {
1616
+ P.destroy();
1617
+ }
1618
+ /**
1619
+ * 특정 키의 알림 닫기
1620
+ */
1621
+ close(r) {
1622
+ P.destroy();
1623
+ }
1624
+ }
1625
+ const N = B.getInstance(), ke = (e) => {
1626
+ N.showBwgError(e);
1627
+ }, Ar = (e, r, t) => {
1628
+ N.showSuccess(e, r, t);
1629
+ }, Ye = (e, r, t) => {
1630
+ N.showInfo(e, r, t);
1631
+ }, Re = (e, r, t) => {
1632
+ N.showWarning(e, r, t);
1633
+ }, Ur = (e, r, t) => {
1634
+ N.showError(e, r, t);
1635
+ }, Br = () => {
1636
+ N.destroy();
1637
+ }, kr = (e) => {
1638
+ N.close(e);
1639
+ }, rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1640
+ __proto__: null,
1641
+ closeNotification: kr,
1642
+ destroyNotifications: Br,
1643
+ notiBwgError: ke,
1644
+ notiError: Ur,
1645
+ notiInfo: Ye,
1646
+ notiSuccess: Ar,
1647
+ notiWarning: Re,
1648
+ notificationService: N
1649
+ }, Symbol.toStringTag, { value: "Module" }));
1650
+ let E = null;
1651
+ const le = async (e) => {
1652
+ if (E === null)
1653
+ if (e === void 0)
1654
+ try {
1655
+ let t = (await ce.get("/api/ip")).data.trim();
1656
+ t = t.replace(/\s+/g, ""), E = t;
1657
+ } catch (r) {
1658
+ console.warn("IP 가져오기 실패:", r), E = "unknown";
1659
+ }
1660
+ else
1661
+ E = e;
1662
+ }, Yr = () => E, Rr = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), E || "unknown");
1663
+ class x extends Error {
1664
+ constructor(r, t, n, a, i) {
1665
+ super(r), this.name = "ApiError", this.detailMsg = t, this.response = n, this.msgCd = a, this.errorType = i, Error.captureStackTrace && Error.captureStackTrace(this, x);
1666
+ }
1667
+ }
1668
+ const J = {
1669
+ method: "POST",
1670
+ timeout: 3e4,
1671
+ // 30초
1672
+ withCredentials: !0,
1673
+ // 쿠키 포함
1674
+ showLoading: !0,
1675
+ showError: !0,
1676
+ retryCount: 0,
1677
+ retryDelay: 1e3
1678
+ }, R = ce.create({
1679
+ timeout: J.timeout,
1680
+ withCredentials: J.withCredentials,
1681
+ headers: {
1682
+ "Content-Type": "application/json; charset=utf-8",
1683
+ Accept: "application/json; charset=utf-8"
1684
+ }
1685
+ });
1686
+ R.interceptors.request.use(
1687
+ (e) => {
1688
+ e.showLoading && ie.getState().showLoading();
1689
+ let r = "UNKNOWN", t = "UNKNOWN";
1690
+ (/* @__PURE__ */ new Date()).getTime();
1691
+ try {
1692
+ 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");
1693
+ } catch (a) {
1694
+ console.warn("trxCd/guid 추출 실패:", a);
1695
+ }
1696
+ e.trxCd = r, e.guid = t, e.requestStartTime = Date.now(), console.log(`🚀 API 요청 시작 [거래코드: ${r} / GUID: ${t}]`);
1697
+ const n = localStorage.getItem("accessToken");
1698
+ 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;
1699
+ },
1700
+ (e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
1701
+ );
1702
+ R.interceptors.response.use(
1703
+ (e) => {
1704
+ e.config.showLoading && ie.getState().hideLoading();
1705
+ let r = "UNKNOWN", t = "UNKNOWN";
1706
+ const n = (/* @__PURE__ */ new Date()).getTime();
1707
+ try {
1708
+ 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");
1709
+ } catch (i) {
1710
+ console.warn("trxCd/guid 추출 실패:", i);
1711
+ }
1712
+ let a = 0;
1713
+ return e.config.requestStartTime && (a = n - e.config.requestStartTime), console.log(
1714
+ `✅ API 응답 성공 [거래코드: ${r} / GUID : ${t}] - (소요시간: ${a}ms)`
1715
+ ), e;
1716
+ },
1717
+ async (e) => {
1718
+ if (e.config && e.config.showLoading && ie.getState().hideLoading(), console.error("❌ API 응답 에러:", e), L && console.error("🚨 Error Details:", {
1719
+ message: e.message,
1720
+ status: e.response?.status,
1721
+ statusText: e.response?.statusText,
1722
+ data: e.response?.data,
1723
+ config: {
1724
+ url: e.config?.url,
1725
+ method: e.config?.method,
1726
+ baseURL: e.config?.baseURL
1727
+ }
1728
+ }), e.response?.status === 401) {
1729
+ const r = localStorage.getItem("refreshToken");
1730
+ if (r)
1731
+ try {
1732
+ const t = await ce.post("/auth/refresh", {
1733
+ refreshToken: r
1734
+ });
1735
+ if (t.data.accessToken) {
1736
+ localStorage.setItem(
1737
+ "accessToken",
1738
+ t.data.accessToken
1739
+ );
1740
+ const n = e.config;
1741
+ if (n)
1742
+ return n.headers.Authorization = `Bearer ${t.data.accessToken}`, R(n);
1743
+ }
1744
+ } catch {
1745
+ localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
1746
+ }
1747
+ }
1748
+ return Promise.reject(e);
1749
+ }
1750
+ );
1751
+ const de = () => Ne(), U = async (e, r, t) => {
1752
+ try {
1753
+ const n = {
1754
+ ...J,
1755
+ ...t
1756
+ }, { activeMenuId: a } = De.getState();
1757
+ if (E === null) {
1758
+ const p = Date.now();
1759
+ await le();
1760
+ const l = Date.now();
1761
+ console.log(`[INFO] IP 조회 소요시간: ${l - p}ms`);
1762
+ }
1763
+ const i = {
1764
+ method: n.method,
1765
+ url: "/api/service",
1766
+ timeout: n.timeout,
1767
+ withCredentials: n.withCredentials,
1768
+ showLoading: n.showLoading
1769
+ };
1770
+ n.headers && (i.headers = n.headers);
1771
+ const f = E || "unknown", _ = __APP_CD__, m = __SYS_CD__, w = {
1772
+ header: {
1773
+ trxCd: e,
1774
+ guid: de(),
1775
+ userInfo: V(),
1776
+ clientIp: f,
1777
+ // 클라이언트 IP 추가 (서버에서 재확인 권장)
1778
+ domainId: "DEFAULT",
1779
+ appCd: _,
1780
+ sysCd: m,
1781
+ screenId: a
1782
+ },
1783
+ // data: bxmEncrypt(JSON.stringify(data)),
1784
+ data: r
1785
+ };
1786
+ L && console.log("__BWG_LOCAL__ 테스트 입니다. ", L), n.method === "GET" ? i.params = w || n.params : (i.data = w || n.data, n.params && (i.params = n.params));
1787
+ let y;
1788
+ for (let p = 0; p <= (n.retryCount || 0); p++)
1789
+ try {
1790
+ const l = await R(i);
1791
+ if (l.data.header?.resCd == 0) {
1792
+ for (const u in l.data)
1793
+ if (u !== "header")
1794
+ return l.data[u];
1795
+ return {};
1796
+ } else {
1797
+ const u = l.data.header, h = u?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", s = u?.msgs?.detailMsgs || h, d = u?.msgCd, S = u?.msgs?.type;
1798
+ throw new x(h, s, l, d, S);
1799
+ }
1800
+ } catch (l) {
1801
+ if (l.isAxiosError && l.response) {
1802
+ const u = l, h = u.response, s = h.data, d = s?.header?.msgs?.basicMsg || u.message || // 실패 시 Axios 에러 메시지 사용
1803
+ "서버에서 오류가 발생했습니다.", S = s?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
1804
+ (typeof h.data == "string" ? h.data : JSON.stringify(h.data)) || d, o = s?.header?.msgCd, c = s?.header?.msgs?.type;
1805
+ y = new x(
1806
+ d,
1807
+ S,
1808
+ h,
1809
+ o,
1810
+ c
1811
+ );
1812
+ } else
1813
+ y = l;
1814
+ if (l.isAxiosError && Fe(l) && p < (n.retryCount || 0)) {
1815
+ await He(n.retryDelay || 1e3);
1816
+ continue;
1817
+ }
1818
+ break;
1819
+ }
1820
+ if (y) {
1821
+ if (n.showError) {
1822
+ const p = y instanceof x ? y.message : "요청 처리 중 오류가 발생했습니다.", l = y instanceof x ? y.msgCd : "요청 처리 중 오류가 발생했습니다.", u = y instanceof x ? y.detailMsg : y.message, h = y instanceof x ? y.errorType : "";
1823
+ l?.startsWith("BXM") ? ke({
1824
+ message: p,
1825
+ description: u,
1826
+ duration: 5
1827
+ }) : h == "I" ? Ye(p, u, 5) : Re(p, u, 5);
1828
+ }
1829
+ throw y;
1830
+ }
1831
+ throw new Error("알 수 없는 API 오류가 발생했습니다.");
1832
+ } catch (n) {
1833
+ throw console.error("callService 최종 에러:", n), n;
1834
+ }
1835
+ }, Fr = async (e, r, t, n) => {
1836
+ try {
1837
+ const a = {
1838
+ ...J,
1839
+ ...n
1840
+ }, { activeMenuId: i } = De.getState();
1841
+ if (E === null) {
1842
+ const l = Date.now();
1843
+ await le();
1844
+ const u = Date.now();
1845
+ console.log(`[INFO] IP 조회 소요시간: ${u - l}ms`);
1846
+ }
1847
+ const f = {
1848
+ method: a.method,
1849
+ url: "/api/" + e + "/service",
1850
+ timeout: a.timeout,
1851
+ withCredentials: a.withCredentials,
1852
+ showLoading: a.showLoading
1853
+ };
1854
+ a.headers && (f.headers = a.headers);
1855
+ const _ = E || "unknown", m = __APP_CD__, w = __SYS_CD__, y = {
1856
+ header: {
1857
+ trxCd: r,
1858
+ guid: de(),
1859
+ userInfo: V(),
1860
+ clientIp: _,
1861
+ // 클라이언트 IP 추가 (서버에서 재확인 권장)
1862
+ domainId: "DEFAULT",
1863
+ appCd: m,
1864
+ sysCd: w,
1865
+ screenId: i
1866
+ },
1867
+ // data: bxmEncrypt(JSON.stringify(data)),
1868
+ data: t
1869
+ };
1870
+ L && console.log("__BWG_LOCAL__ 테스트 입니다. ", L), a.method === "GET" ? f.params = y || a.params : (f.data = y || a.data, a.params && (f.params = a.params));
1871
+ let p;
1872
+ for (let l = 0; l <= (a.retryCount || 0); l++)
1873
+ try {
1874
+ const u = await R(f);
1875
+ if (u.data.header?.resCd == 0) {
1876
+ for (const h in u.data)
1877
+ if (h !== "header")
1878
+ return u.data[h];
1879
+ return {};
1880
+ } else {
1881
+ const h = u.data.header, s = h?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", d = h?.msgs?.detailMsgs || s, S = h?.msgCd, o = h?.msgs?.type;
1882
+ throw new x(s, d, u, S, o);
1883
+ }
1884
+ } catch (u) {
1885
+ if (u.isAxiosError && u.response) {
1886
+ const h = u, s = h.response, d = s.data, S = d?.header?.msgs?.basicMsg || h.message || // 실패 시 Axios 에러 메시지 사용
1887
+ "서버에서 오류가 발생했습니다.", o = d?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
1888
+ (typeof s.data == "string" ? s.data : JSON.stringify(s.data)) || S, c = d?.header?.msgCd, g = d?.header?.msgs?.type;
1889
+ p = new x(
1890
+ S,
1891
+ o,
1892
+ s,
1893
+ c,
1894
+ g
1895
+ );
1896
+ } else
1897
+ p = u;
1898
+ if (u.isAxiosError && Fe(u) && l < (a.retryCount || 0)) {
1899
+ await He(a.retryDelay || 1e3);
1900
+ continue;
1901
+ }
1902
+ break;
1903
+ }
1904
+ if (p) {
1905
+ if (a.showError) {
1906
+ const l = p instanceof x ? p.message : "요청 처리 중 오류가 발생했습니다.", u = p instanceof x ? p.msgCd : "요청 처리 중 오류가 발생했습니다.", h = p instanceof x ? p.detailMsg : p.message, s = p instanceof x ? p.errorType : "";
1907
+ u?.startsWith("BXM") ? showBwgError({
1908
+ message: l,
1909
+ description: h,
1910
+ duration: 5
1911
+ }) : s == "I" ? showInfo(l, h, 5) : showWarning(l, h, 5);
1912
+ }
1913
+ throw p;
1914
+ }
1915
+ throw new Error("알 수 없는 API 오류가 발생했습니다.");
1916
+ } catch (a) {
1917
+ throw console.error("callService 최종 에러:", a), a;
1918
+ }
1919
+ }, Fe = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, He = (e) => new Promise((r) => setTimeout(r, e)), Hr = (e, r, t) => U(e, r, { ...t, method: "GET" }), zr = (e, r, t) => U(e, r, { ...t, method: "POST" }), jr = (e, r, t) => U(e, r, { ...t, method: "PUT" }), qr = (e, r, t) => U(e, r, { ...t, method: "DELETE" }), Wr = (e, r, t) => U(e, r, { ...t, method: "PATCH" }), Gr = async (e, r, t) => {
1920
+ try {
1921
+ const n = await fetch("/api/permissions", {
1922
+ method: "POST",
1923
+ headers: {
1924
+ "Content-Type": "application/json"
1925
+ },
1926
+ body: JSON.stringify({
1927
+ userId: e,
1928
+ menuId: r,
1929
+ popupId: t
1930
+ })
1931
+ });
1932
+ if (!n.ok)
1933
+ throw new Error(`권한 확인 실패: ${n.status}`);
1934
+ return await n.json();
1935
+ } catch (n) {
1936
+ throw console.error("권한 확인 서비스 오류:", n), n;
1937
+ }
1938
+ }, nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1939
+ __proto__: null,
1940
+ ApiError: x,
1941
+ apiDelete: qr,
1942
+ apiGet: Hr,
1943
+ apiPatch: Wr,
1944
+ apiPost: zr,
1945
+ apiPut: jr,
1946
+ callService: U,
1947
+ callService_SYSCD: Fr,
1948
+ getClientIp: Yr,
1949
+ getGuid: de,
1950
+ getPermissionService: Gr,
1951
+ setClientIp: le,
1952
+ verifyClientIp: Rr
1953
+ }, Symbol.toStringTag, { value: "Module" }));
1954
+ export {
1955
+ br as $,
1956
+ x as A,
1957
+ rr as B,
1958
+ nr as C,
1959
+ sr as D,
1960
+ ee as E,
1961
+ or as F,
1962
+ ar as G,
1963
+ ir as H,
1964
+ cr as I,
1965
+ ur as J,
1966
+ lr as K,
1967
+ dr as L,
1968
+ fr as M,
1969
+ hr as N,
1970
+ mr as O,
1971
+ gr as P,
1972
+ pr as Q,
1973
+ vr as R,
1974
+ yr as S,
1975
+ Ht as T,
1976
+ wr as U,
1977
+ _r as V,
1978
+ Sr as W,
1979
+ Mr as X,
1980
+ Ee as Y,
1981
+ Cr as Z,
1982
+ Tr as _,
1983
+ de as a,
1984
+ xr as a0,
1985
+ Ir as a1,
1986
+ Dr as a2,
1987
+ $e as a3,
1988
+ Ne as a4,
1989
+ Er as a5,
1990
+ $r as a6,
1991
+ Nr as a7,
1992
+ L as a8,
1993
+ Pr as a9,
1994
+ at as aA,
1995
+ V as aB,
1996
+ it as aC,
1997
+ ct as aD,
1998
+ ut as aE,
1999
+ ie as aF,
2000
+ mt as aG,
2001
+ De as aH,
2002
+ $ as aI,
2003
+ Qe as aJ,
2004
+ nn as aK,
2005
+ en as aL,
2006
+ tn as aM,
2007
+ rn as aN,
2008
+ Vr as aO,
2009
+ Qr as aP,
2010
+ F as aQ,
2011
+ re as aR,
2012
+ Ue as aa,
2013
+ Be as ab,
2014
+ Lr as ac,
2015
+ N as ad,
2016
+ ke as ae,
2017
+ Ar as af,
2018
+ Ye as ag,
2019
+ Re as ah,
2020
+ Ur as ai,
2021
+ Br as aj,
2022
+ kr as ak,
2023
+ Je as al,
2024
+ ue as am,
2025
+ Ce as an,
2026
+ Xe as ao,
2027
+ et as ap,
2028
+ Te as aq,
2029
+ be as ar,
2030
+ tt as as,
2031
+ rt as at,
2032
+ xe as au,
2033
+ Ie as av,
2034
+ Z as aw,
2035
+ nt as ax,
2036
+ st as ay,
2037
+ ot as az,
2038
+ Fr as b,
2039
+ U as c,
2040
+ Hr as d,
2041
+ zr as e,
2042
+ jr as f,
2043
+ Yr as g,
2044
+ qr as h,
2045
+ Wr as i,
2046
+ Gr as j,
2047
+ zt as k,
2048
+ jt as l,
2049
+ qt as m,
2050
+ Wt as n,
2051
+ Gt as o,
2052
+ Kt as p,
2053
+ Jt as q,
2054
+ Xt as r,
2055
+ le as s,
2056
+ Zt as t,
2057
+ Vt as u,
2058
+ Rr as v,
2059
+ Qt as w,
2060
+ er as x,
2061
+ Q as y,
2062
+ tr as z
2063
+ };
2064
+ //# sourceMappingURL=apiUtils-DfPv_gmI.js.map