@bwg-ui/core 1.1.11 → 1.1.12

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 (137) hide show
  1. package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs +3 -0
  2. package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs.map +1 -0
  3. package/dist/chunks/{BwgLargeUploader-B5EtYKUz.js → BwgLargeUploader-Nx2-wiD8.js} +802 -776
  4. package/dist/chunks/BwgLargeUploader-Nx2-wiD8.js.map +1 -0
  5. package/dist/chunks/{FileUtils-CaU9Bzu2.js → FileUtils-Bbz3AvQn.js} +2 -2
  6. package/dist/chunks/{FileUtils-CaU9Bzu2.js.map → FileUtils-Bbz3AvQn.js.map} +1 -1
  7. package/dist/chunks/FileUtils-D73GVmB8.cjs +2 -0
  8. package/dist/chunks/{FileUtils-BweAWoJt.cjs.map → FileUtils-D73GVmB8.cjs.map} +1 -1
  9. package/dist/chunks/SSOHandler-CZHPiuEh.js +25397 -0
  10. package/dist/chunks/SSOHandler-CZHPiuEh.js.map +1 -0
  11. package/dist/chunks/SSOHandler-rq0OGrpX.cjs +236 -0
  12. package/dist/chunks/SSOHandler-rq0OGrpX.cjs.map +1 -0
  13. package/dist/chunks/{SearchBoxContext-CY4tAQcg.js → SearchBoxContext-BxtHF9BO.js} +2 -2
  14. package/dist/chunks/{SearchBoxContext-CY4tAQcg.js.map → SearchBoxContext-BxtHF9BO.js.map} +1 -1
  15. package/dist/chunks/SearchBoxContext-Cpr9xa1S.cjs +2 -0
  16. package/dist/chunks/{SearchBoxContext-DDBY44Wr.cjs.map → SearchBoxContext-Cpr9xa1S.cjs.map} +1 -1
  17. package/dist/chunks/TabContainer-B7-6AQXV.js +254 -0
  18. package/dist/chunks/TabContainer-B7-6AQXV.js.map +1 -0
  19. package/dist/chunks/TabContainer-Dx2PVShz.cjs +36 -0
  20. package/dist/chunks/TabContainer-Dx2PVShz.cjs.map +1 -0
  21. package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  22. package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  23. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +9 -0
  24. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  25. package/dist/chunks/apiUtils-C45AWfu-.js +957 -0
  26. package/dist/chunks/apiUtils-C45AWfu-.js.map +1 -0
  27. package/dist/chunks/apiUtils-Cbg6NQLv.cjs +4 -0
  28. package/dist/chunks/apiUtils-Cbg6NQLv.cjs.map +1 -0
  29. package/dist/chunks/codeStore-BGLhSpAM.cjs +2 -0
  30. package/dist/chunks/{codeStore-KPL92rcv.cjs.map → codeStore-BGLhSpAM.cjs.map} +1 -1
  31. package/dist/chunks/{codeStore-IIp25egq.js → codeStore-BzT5wSd9.js} +2 -2
  32. package/dist/chunks/{codeStore-IIp25egq.js.map → codeStore-BzT5wSd9.js.map} +1 -1
  33. package/dist/chunks/commonUtils-BH6QwGUb.cjs +2 -0
  34. package/dist/chunks/commonUtils-BH6QwGUb.cjs.map +1 -0
  35. package/dist/chunks/{commonUtils-Cvx6_eK2.js → commonUtils-Bb16Yqjk.js} +24 -25
  36. package/dist/chunks/commonUtils-Bb16Yqjk.js.map +1 -0
  37. package/dist/chunks/envUtils-C9Gf5aek.js.map +1 -1
  38. package/dist/chunks/envUtils-CduTHoHu.cjs.map +1 -1
  39. package/dist/chunks/favoriteStore-3YceyayF.cjs +2 -0
  40. package/dist/chunks/favoriteStore-3YceyayF.cjs.map +1 -0
  41. package/dist/chunks/favoriteStore-C9utQ6sm.js +112 -0
  42. package/dist/chunks/favoriteStore-C9utQ6sm.js.map +1 -0
  43. package/dist/chunks/{popupStore-D8RI04bU.js → popupStore-DmFbkkjd.js} +19 -18
  44. package/dist/chunks/popupStore-DmFbkkjd.js.map +1 -0
  45. package/dist/chunks/popupStore-DnWLaQ70.cjs +2 -0
  46. package/dist/chunks/popupStore-DnWLaQ70.cjs.map +1 -0
  47. package/dist/chunks/usePopup-C8FrbrDD.cjs +2 -0
  48. package/dist/chunks/{UtilsContext-JSHHfnWl.js.map → usePopup-C8FrbrDD.cjs.map} +1 -1
  49. package/dist/chunks/{UtilsContext-JSHHfnWl.js → usePopup-pfh-ajfP.js} +82 -82
  50. package/dist/chunks/usePopup-pfh-ajfP.js.map +1 -0
  51. package/dist/components/common/BwgDetail.d.ts +5 -0
  52. package/dist/components/common/BwgDetail.d.ts.map +1 -0
  53. package/dist/components/common/BwgDrawer.d.ts.map +1 -1
  54. package/dist/components/common/BwgEditor.d.ts +7 -0
  55. package/dist/components/common/BwgEditor.d.ts.map +1 -0
  56. package/dist/components/common/BwgView.d.ts.map +1 -1
  57. package/dist/components/common/index.cjs +1 -1
  58. package/dist/components/common/index.d.ts +3 -1
  59. package/dist/components/common/index.d.ts.map +1 -1
  60. package/dist/components/common/index.js +27 -25
  61. package/dist/components/core/BwgDatePicker.d.ts +1 -1
  62. package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
  63. package/dist/components/core/BwgRangePicker.d.ts +1 -1
  64. package/dist/components/core/BwgRangePicker.d.ts.map +1 -1
  65. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  66. package/dist/components/core/index.cjs +1 -1
  67. package/dist/components/core/index.js +1 -1
  68. package/dist/components/layout/ErrorBound.d.ts +29 -0
  69. package/dist/components/layout/ErrorBound.d.ts.map +1 -0
  70. package/dist/components/layout/TabContainer.d.ts +9 -0
  71. package/dist/components/layout/TabContainer.d.ts.map +1 -0
  72. package/dist/components/layout/index.cjs +1 -1
  73. package/dist/components/layout/index.d.ts +3 -1
  74. package/dist/components/layout/index.d.ts.map +1 -1
  75. package/dist/components/layout/index.js +6 -4
  76. package/dist/index.cjs +1 -1
  77. package/dist/index.js +304 -299
  78. package/dist/provider/index.cjs +1 -1
  79. package/dist/provider/index.js +2 -2
  80. package/dist/stores/favoriteStore.d.ts.map +1 -1
  81. package/dist/stores/index.cjs +1 -1
  82. package/dist/stores/index.cjs.map +1 -1
  83. package/dist/stores/index.d.ts +3 -1
  84. package/dist/stores/index.d.ts.map +1 -1
  85. package/dist/stores/index.js +18 -16
  86. package/dist/stores/index.js.map +1 -1
  87. package/dist/stores/loadingStore.d.ts +9 -0
  88. package/dist/stores/loadingStore.d.ts.map +1 -0
  89. package/dist/stores/menuViewStore.d.ts +28 -3
  90. package/dist/stores/menuViewStore.d.ts.map +1 -1
  91. package/dist/stores/popupStore.d.ts.map +1 -1
  92. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  93. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  94. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  95. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  96. package/dist/utils/apiUtils.d.ts +3 -2
  97. package/dist/utils/apiUtils.d.ts.map +1 -1
  98. package/dist/utils/index.cjs +1 -1
  99. package/dist/utils/index.js +3 -3
  100. package/dist/utils/notificationUtils.d.ts +0 -1
  101. package/dist/utils/notificationUtils.d.ts.map +1 -1
  102. package/package.json +6 -7
  103. package/dist/chunks/BwgLargeUploader-B5EtYKUz.js.map +0 -1
  104. package/dist/chunks/BwgLargeUploader-BPJcShgF.cjs +0 -3
  105. package/dist/chunks/BwgLargeUploader-BPJcShgF.cjs.map +0 -1
  106. package/dist/chunks/FileUtils-BweAWoJt.cjs +0 -2
  107. package/dist/chunks/PublicLayout-3v46YZdi.cjs +0 -36
  108. package/dist/chunks/PublicLayout-3v46YZdi.cjs.map +0 -1
  109. package/dist/chunks/PublicLayout-B4wGo0ut.js +0 -139
  110. package/dist/chunks/PublicLayout-B4wGo0ut.js.map +0 -1
  111. package/dist/chunks/SSOHandler-C72Do3RD.js +0 -15717
  112. package/dist/chunks/SSOHandler-C72Do3RD.js.map +0 -1
  113. package/dist/chunks/SSOHandler-ColywAGZ.cjs +0 -184
  114. package/dist/chunks/SSOHandler-ColywAGZ.cjs.map +0 -1
  115. package/dist/chunks/SearchBoxContext-DDBY44Wr.cjs +0 -2
  116. package/dist/chunks/UtilsContext-C4tlOndT.cjs +0 -2
  117. package/dist/chunks/UtilsContext-C4tlOndT.cjs.map +0 -1
  118. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +0 -7
  119. package/dist/chunks/_commonjsHelpers-C6fGbg64.js.map +0 -1
  120. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs +0 -2
  121. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs.map +0 -1
  122. package/dist/chunks/codeStore-KPL92rcv.cjs +0 -2
  123. package/dist/chunks/commonUtils-Cvx6_eK2.js.map +0 -1
  124. package/dist/chunks/commonUtils-DaFg0y7C.cjs +0 -2
  125. package/dist/chunks/commonUtils-DaFg0y7C.cjs.map +0 -1
  126. package/dist/chunks/menuViewStore-DuS0VmkB.cjs +0 -3
  127. package/dist/chunks/menuViewStore-DuS0VmkB.cjs.map +0 -1
  128. package/dist/chunks/menuViewStore-OKcSQq-s.js +0 -343
  129. package/dist/chunks/menuViewStore-OKcSQq-s.js.map +0 -1
  130. package/dist/chunks/popupStore-BEoWGajT.cjs +0 -2
  131. package/dist/chunks/popupStore-BEoWGajT.cjs.map +0 -1
  132. package/dist/chunks/popupStore-D8RI04bU.js.map +0 -1
  133. package/dist/chunks/serviceConfig-9dHegQIK.cjs +0 -3
  134. package/dist/chunks/serviceConfig-9dHegQIK.cjs.map +0 -1
  135. package/dist/chunks/serviceConfig-Dhe7neaj.js +0 -709
  136. package/dist/chunks/serviceConfig-Dhe7neaj.js.map +0 -1
  137. package/scripts/gen-component-registry.js +0 -138
@@ -0,0 +1,957 @@
1
+ import j from "axios";
2
+ import d from "crypto-js";
3
+ import { notification as N, message as F } from "antd";
4
+ import { create as x } from "zustand";
5
+ import { i as B } from "./envUtils-C9Gf5aek.js";
6
+ const D = (e) => typeof e != "string" ? !e : e.trim().length === 0, se = (e, r) => D(e) ? r : e || "", ae = (e) => !D(e), oe = (e, r, t = "...") => e.length <= r ? e : e.substring(0, r) + t, J = (e) => D(e) ? e : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), ce = (e) => D(e) ? e : e.split(" ").map((r) => J(r)).join(" "), ie = (e) => e.replace(/-([a-z])/g, (r) => r[1].toUpperCase()), ue = (e) => e.replace(/[A-Z]/g, (r) => `_${r.toLowerCase()}`), le = (e) => e.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`), de = (e) => {
7
+ const t = e.replace(/\D/g, "").match(/^(\d{3})(\d{4})(\d{4})$/);
8
+ return t ? `${t[1]}-${t[2]}-${t[3]}` : e;
9
+ }, ge = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), me = (e) => {
10
+ try {
11
+ return new URL(e), !0;
12
+ } catch {
13
+ return !1;
14
+ }
15
+ }, pe = (e) => e.replace(/\D/g, ""), fe = (e) => e.replace(/[^a-zA-Z0-9가-힣\s]/g, ""), he = (e) => e.replace(/<[^>]*>/g, ""), Ie = (e) => e.replace(/\n/g, "<br>"), ye = (e) => e.replace(/<br\s*\/?>/gi, `
16
+ `), Se = (e, r) => {
17
+ const t = e.match(r);
18
+ return t || [];
19
+ }, Ce = (e, r) => e.repeat(r), be = (e, r, t = " ") => e.padStart(r, t), we = (e, r, t = " ") => e.padEnd(r, t), Me = (e, r, t = " ") => {
20
+ const n = r - e.length;
21
+ if (n <= 0) return e;
22
+ const a = Math.floor(n / 2), s = n - a;
23
+ return t.repeat(a) + e + t.repeat(s);
24
+ }, L = (e, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
25
+ let t = "";
26
+ for (let n = 0; n < e; n++)
27
+ t += r.charAt(Math.floor(Math.random() * r.length));
28
+ return t;
29
+ }, Te = (e) => e.split("").reverse().join(""), Ne = (e, r) => (e.match(new RegExp(r, "g")) || []).length, ve = (e) => e.trim().split(/\s+/).length, z = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
30
+ const r = Math.random() * 16 | 0;
31
+ return (e === "x" ? r : r & 3 | 8).toString(16);
32
+ }), q = (e = 32) => {
33
+ const t = z().replace(/-/g, "");
34
+ return e >= 32 ? t + L(e - 32, "0123456789abcdef") : t.substring(0, e);
35
+ }, Pe = () => q(16), Ue = () => q(64), Ee = (e = 16) => L(e, "0123456789"), De = (e = 16) => L(e, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"), V = () => z(), Z = () => V().replace(/-/g, ""), Le = () => {
36
+ const e = Date.now().toString(36), r = L(8, "0123456789abcdef");
37
+ return e + r;
38
+ }, Ae = (e, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") => e.replace(
39
+ /[X-Z]/g,
40
+ () => r.charAt(Math.floor(Math.random() * r.length))
41
+ ), xe = (e) => {
42
+ const r = d.SHA256(e);
43
+ return d.enc.Base64.stringify(r);
44
+ }, _ = () => "abcdefghij1234567890!@#$%^&*();;", Q = () => "123456098765!@#$", _e = (e) => {
45
+ if (!e) return "";
46
+ try {
47
+ const r = d.enc.Utf8.parse(_()), t = d.enc.Utf8.parse(Q());
48
+ return d.AES.encrypt(e, r, {
49
+ iv: t,
50
+ padding: d.pad.Pkcs7,
51
+ mode: d.mode.CBC
52
+ }).toString();
53
+ } catch (r) {
54
+ return console.error("암호화 오류:", r), "";
55
+ }
56
+ }, ke = (e) => {
57
+ if (!e) return "";
58
+ try {
59
+ const r = d.enc.Utf8.parse(_()), t = d.enc.Utf8.parse(Q());
60
+ return d.AES.decrypt(e, r, {
61
+ iv: t,
62
+ padding: d.pad.Pkcs7,
63
+ mode: d.mode.CBC
64
+ }).toString(d.enc.Utf8);
65
+ } catch (r) {
66
+ return console.error("복호화 오류:", r), "";
67
+ }
68
+ }, Fe = (e, r) => {
69
+ if (!e) return "";
70
+ try {
71
+ const t = r || _();
72
+ return d.AES.encrypt(e, t).toString();
73
+ } catch (t) {
74
+ return console.error("간단한 암호화 오류:", t), "";
75
+ }
76
+ }, Oe = (e, r) => {
77
+ if (!e) return "";
78
+ try {
79
+ const t = r || _();
80
+ return d.AES.decrypt(e, t).toString(d.enc.Utf8);
81
+ } catch (t) {
82
+ return console.error("간단한 복호화 오류:", t), "";
83
+ }
84
+ }, Re = (e) => e ? d.MD5(e).toString() : "", Be = (e) => e ? d.SHA256(e).toString() : "", $e = (e) => e ? d.enc.Base64.stringify(d.enc.Utf8.parse(e)) : "", We = (e) => {
85
+ if (!e) return "";
86
+ try {
87
+ return d.enc.Base64.parse(e).toString(d.enc.Utf8);
88
+ } catch (r) {
89
+ return console.error("Base64 디코딩 오류:", r), "";
90
+ }
91
+ }, mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
92
+ __proto__: null,
93
+ base64Decode: We,
94
+ base64Encode: $e,
95
+ br2nl: ye,
96
+ bxmDecrypt: ke,
97
+ bxmEncrypt: _e,
98
+ capitalize: J,
99
+ capitalizeWords: ce,
100
+ center: Me,
101
+ countChar: Ne,
102
+ countWords: ve,
103
+ encryptSha256: xe,
104
+ extractNumbers: pe,
105
+ findPattern: Se,
106
+ formatPhoneNumber: de,
107
+ generateAlphanumericUID: De,
108
+ generateCustomUID: Ae,
109
+ generateGUID: V,
110
+ generateGUIDWithoutHyphens: Z,
111
+ generateLongUID: Ue,
112
+ generateNumericUID: Ee,
113
+ generateRandomString: L,
114
+ generateShortUID: Pe,
115
+ generateTimestampUID: Le,
116
+ generateUID: q,
117
+ isEmpty: D,
118
+ isNotEmpty: ae,
119
+ isSafeEmpty: se,
120
+ isValidEmail: ge,
121
+ isValidUrl: me,
122
+ md5Hash: Re,
123
+ nl2br: Ie,
124
+ padLeft: be,
125
+ padRight: we,
126
+ removeHtmlTags: he,
127
+ removeSpecialChars: fe,
128
+ repeat: Ce,
129
+ reverse: Te,
130
+ sha256Hash: Be,
131
+ simpleDecrypt: Oe,
132
+ simpleEncrypt: Fe,
133
+ toCamelCase: ie,
134
+ toKebabCase: le,
135
+ toSnakeCase: ue,
136
+ truncate: oe
137
+ }, Symbol.toStringTag, { value: "Module" })), C = {
138
+ duration: 4.5,
139
+ // 4.5초
140
+ placement: "topRight"
141
+ };
142
+ class P {
143
+ constructor() {
144
+ }
145
+ static getInstance() {
146
+ return P.instance || (P.instance = new P()), P.instance;
147
+ }
148
+ /**
149
+ * BwgError 전용 에러 알림
150
+ * @param props - 에러 메시지 설정
151
+ */
152
+ showBwgError(r) {
153
+ const {
154
+ message: t,
155
+ description: n,
156
+ duration: a = C.duration,
157
+ placement: s = C.placement
158
+ } = r;
159
+ N.error({
160
+ message: `${t}`,
161
+ description: n || "오류가 발생했습니다. 다시 시도해주세요.",
162
+ duration: a,
163
+ placement: s,
164
+ style: {
165
+ borderLeft: "4px solid #ff4d4f",
166
+ backgroundColor: "#fff2f0"
167
+ }
168
+ });
169
+ }
170
+ /**
171
+ * 성공 알림
172
+ */
173
+ showSuccess(r, t, n) {
174
+ N.success({
175
+ message: `${r}`,
176
+ description: t,
177
+ duration: n || C.duration,
178
+ placement: C.placement
179
+ });
180
+ }
181
+ /**
182
+ * 정보 알림
183
+ */
184
+ showInfo(r, t, n) {
185
+ N.info({
186
+ message: `${r}`,
187
+ description: t,
188
+ duration: n || C.duration,
189
+ placement: C.placement
190
+ });
191
+ }
192
+ /**
193
+ * 경고 알림
194
+ */
195
+ showWarning(r, t, n) {
196
+ N.warning({
197
+ message: `${r}`,
198
+ description: t,
199
+ duration: n || C.duration,
200
+ placement: C.placement
201
+ });
202
+ }
203
+ /**
204
+ * 일반 에러 알림
205
+ */
206
+ showError(r, t, n) {
207
+ N.error({
208
+ message: `${r}`,
209
+ description: t,
210
+ duration: n || C.duration,
211
+ placement: C.placement
212
+ });
213
+ }
214
+ /**
215
+ * 모든 알림 닫기
216
+ */
217
+ destroy() {
218
+ N.destroy();
219
+ }
220
+ /**
221
+ * 특정 키의 알림 닫기
222
+ */
223
+ close(r) {
224
+ N.destroy();
225
+ }
226
+ }
227
+ const v = P.getInstance(), He = (e) => {
228
+ v.showBwgError(e);
229
+ }, pt = (e, r, t) => {
230
+ v.showSuccess(e, r, t);
231
+ }, Ge = (e, r, t) => {
232
+ v.showInfo(e, r, t);
233
+ }, je = (e, r, t) => {
234
+ v.showWarning(e, r, t);
235
+ }, ft = (e, r, t) => {
236
+ v.showError(e, r, t);
237
+ }, ht = () => {
238
+ v.destroy();
239
+ }, It = (e) => {
240
+ v.close(e);
241
+ };
242
+ import.meta.env.DEV;
243
+ function qe(e, r) {
244
+ let t;
245
+ try {
246
+ t = e();
247
+ } catch {
248
+ return;
249
+ }
250
+ return {
251
+ getItem: (a) => {
252
+ var s;
253
+ const o = (u) => u === null ? null : JSON.parse(u, void 0), i = (s = t.getItem(a)) != null ? s : null;
254
+ return i instanceof Promise ? i.then(o) : o(i);
255
+ },
256
+ setItem: (a, s) => t.setItem(a, JSON.stringify(s, void 0)),
257
+ removeItem: (a) => t.removeItem(a)
258
+ };
259
+ }
260
+ const $ = (e) => (r) => {
261
+ try {
262
+ const t = e(r);
263
+ return t instanceof Promise ? t : {
264
+ then(n) {
265
+ return $(n)(t);
266
+ },
267
+ catch(n) {
268
+ return this;
269
+ }
270
+ };
271
+ } catch (t) {
272
+ return {
273
+ then(n) {
274
+ return this;
275
+ },
276
+ catch(n) {
277
+ return $(n)(t);
278
+ }
279
+ };
280
+ }
281
+ }, Ke = (e, r) => (t, n, a) => {
282
+ let s = {
283
+ storage: qe(() => localStorage),
284
+ partialize: (c) => c,
285
+ version: 0,
286
+ merge: (c, y) => ({
287
+ ...y,
288
+ ...c
289
+ }),
290
+ ...r
291
+ }, o = !1;
292
+ const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
293
+ let h = s.storage;
294
+ if (!h)
295
+ return e(
296
+ (...c) => {
297
+ console.warn(
298
+ `[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`
299
+ ), t(...c);
300
+ },
301
+ n,
302
+ a
303
+ );
304
+ const m = () => {
305
+ const c = s.partialize({ ...n() });
306
+ return h.setItem(s.name, {
307
+ state: c,
308
+ version: s.version
309
+ });
310
+ }, I = a.setState;
311
+ a.setState = (c, y) => (I(c, y), m());
312
+ const l = e(
313
+ (...c) => (t(...c), m()),
314
+ n,
315
+ a
316
+ );
317
+ a.getInitialState = () => l;
318
+ let g;
319
+ const f = () => {
320
+ var c, y;
321
+ if (!h) return;
322
+ o = !1, i.forEach((p) => {
323
+ var S;
324
+ return p((S = n()) != null ? S : l);
325
+ });
326
+ const w = ((y = s.onRehydrateStorage) == null ? void 0 : y.call(s, (c = n()) != null ? c : l)) || void 0;
327
+ return $(h.getItem.bind(h))(s.name).then((p) => {
328
+ if (p)
329
+ if (typeof p.version == "number" && p.version !== s.version) {
330
+ if (s.migrate) {
331
+ const S = s.migrate(
332
+ p.state,
333
+ p.version
334
+ );
335
+ return S instanceof Promise ? S.then((k) => [!0, k]) : [!0, S];
336
+ }
337
+ console.error(
338
+ "State loaded from storage couldn't be migrated since no migrate function was provided"
339
+ );
340
+ } else
341
+ return [!1, p.state];
342
+ return [!1, void 0];
343
+ }).then((p) => {
344
+ var S;
345
+ const [k, ne] = p;
346
+ if (g = s.merge(
347
+ ne,
348
+ (S = n()) != null ? S : l
349
+ ), t(g, !0), k)
350
+ return m();
351
+ }).then(() => {
352
+ w?.(g, void 0), g = n(), o = !0, u.forEach((p) => p(g));
353
+ }).catch((p) => {
354
+ w?.(void 0, p);
355
+ });
356
+ };
357
+ return a.persist = {
358
+ setOptions: (c) => {
359
+ s = {
360
+ ...s,
361
+ ...c
362
+ }, c.storage && (h = c.storage);
363
+ },
364
+ clearStorage: () => {
365
+ h?.removeItem(s.name);
366
+ },
367
+ getOptions: () => s,
368
+ rehydrate: () => f(),
369
+ hasHydrated: () => o,
370
+ onHydrate: (c) => (i.add(c), () => {
371
+ i.delete(c);
372
+ }),
373
+ onFinishHydration: (c) => (u.add(c), () => {
374
+ u.delete(c);
375
+ })
376
+ }, s.skipHydration || f(), g || l;
377
+ }, Ye = Ke, b = x()(
378
+ Ye(
379
+ (e, r) => ({
380
+ user: null,
381
+ isLoggedIn: !1,
382
+ // 로그인
383
+ login: (t) => {
384
+ e({ user: t, isLoggedIn: !0 }), console.log("사용자 로그인:", t);
385
+ },
386
+ // 로그아웃
387
+ logout: () => {
388
+ e({ user: null, isLoggedIn: !1 }), console.log("사용자 로그아웃");
389
+ },
390
+ // 사용자 정보 업데이트
391
+ updateUser: (t) => {
392
+ const n = r().user;
393
+ n && e({ user: { ...n, ...t } });
394
+ }
395
+ }),
396
+ {
397
+ name: "user-storage",
398
+ // 로컬 스토리지 키
399
+ partialize: (e) => ({
400
+ user: e.user,
401
+ isLoggedIn: e.isLoggedIn
402
+ })
403
+ // 저장할 상태만 선택
404
+ }
405
+ )
406
+ ), yt = () => b.getState().user?.crprCd || null, Xe = () => b.getState().user?.userId || null, Je = () => b.getState().user?.userNm || null, St = () => b.getState().user?.userDvsn || null, Ct = () => b.getState().user?.emplNo || null, ze = () => b.getState().user?.dprtCd || null, Ve = () => b.getState().user?.dprtNm || null, K = () => b.getState().user?.roleList || null, bt = (e) => {
407
+ const r = K();
408
+ return r ? r.includes(e) : !1;
409
+ }, wt = (e) => {
410
+ const r = K();
411
+ return r ? e.some((t) => r.includes(t)) : !1;
412
+ }, Mt = (e) => {
413
+ const r = K();
414
+ return r ? e.every((t) => r.includes(t)) : !1;
415
+ }, Tt = () => b.getState().isLoggedIn, ee = () => b.getState().user, Nt = () => ee() !== null, vt = () => {
416
+ const e = Je(), r = Xe();
417
+ return e || r || null;
418
+ }, Pt = () => {
419
+ const e = Ve(), r = ze();
420
+ return e || (r ? String(r) : null);
421
+ }, te = {
422
+ // 권한 관련
423
+ AUTH_BTNS: "SCMSIGN00202",
424
+ // 버튼 권한 조회
425
+ AUTH_MENU: "SCMSIGN00201",
426
+ // 메뉴 권한 조회
427
+ SRCH_CODE: "SCMSIGN00301",
428
+ // 코드 조회
429
+ // 팝업 관련
430
+ SRCH_POPU: "SCMPOPU00101",
431
+ // 팝업 조회
432
+ // 즐겨찾기 관련
433
+ AUTH_BMRK: "SCMBMRK00101"
434
+ // 즐겨찾기 관리
435
+ };
436
+ let E = {};
437
+ function Ut(e) {
438
+ E = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
439
+ }
440
+ function re(e) {
441
+ if (E[e] && E[e].trim() !== "")
442
+ return console.log(`🔧 Provider 설정 사용: ${e} = ${E[e]}`), E[e];
443
+ const r = te[e];
444
+ return console.log(`🔧 기본값 사용: ${e} = ${r}`), r;
445
+ }
446
+ function Et() {
447
+ const e = {};
448
+ for (const r of Object.keys(te))
449
+ e[r] = re(r);
450
+ return e;
451
+ }
452
+ const W = {
453
+ DEFAULT_PRNT_GBCD: 1
454
+ }, Ze = (e) => e && typeof e == "object" && typeof e.menuId == "string" && typeof e.menuNm == "string" && typeof e.crprCd == "string", Y = (e) => Array.isArray(e) && e.every(Ze);
455
+ let O = [], X = [];
456
+ const Qe = (e) => {
457
+ if (e && typeof e == "object") {
458
+ const r = e;
459
+ if (r.menus && Y(r.menus)) return r.menus;
460
+ if (Y(e)) return e;
461
+ }
462
+ return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
463
+ }, et = (e, r) => !!r && e.crprCd === r.crprCd && e.userId === r.userId && (e.prntGbcd ?? W.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? W.DEFAULT_PRNT_GBCD), tt = (e) => {
464
+ if (O.length === e.length && O.every(
465
+ (s, o) => s.menuId === e[o]?.menuId && s.menuPrntId === e[o]?.menuPrntId
466
+ ))
467
+ return X;
468
+ if (!e.length) return [];
469
+ const r = /* @__PURE__ */ new Map(), t = [];
470
+ e.forEach((s) => s?.menuId && r.set(s.menuId, { ...s, children: [] })), e.forEach((s) => {
471
+ const o = r.get(s.menuId);
472
+ o && (s.menuPrntId && s.menuPrntId !== "" && s.menuPrntId !== "-" ? r.get(s.menuPrntId)?.children?.push(o) : t.push(o));
473
+ });
474
+ const n = (s) => s.sort((o, i) => (o?.menuNo ?? 0) - (i?.menuNo ?? 0)).map((o) => ({
475
+ ...o,
476
+ children: o.children && o.children.length ? n(o.children) : void 0
477
+ })), a = n(t);
478
+ return O = [...e], X = a, a;
479
+ }, rt = x((e, r) => ({
480
+ // 📊 초기 상태값
481
+ menuList: [],
482
+ flatMenuList: [],
483
+ isLoading: !1,
484
+ error: null,
485
+ _lastFetchParams: null,
486
+ // 🔧 메뉴 모델 조회
487
+ // 서버에서 사용자별 메뉴 권한 데이터를 가져와서 트리/플랫 구조로 저장
488
+ fetchMenu: async ({ crprCd: t, userId: n, prntGbcd: a }) => {
489
+ const s = {
490
+ crprCd: t,
491
+ userId: n,
492
+ prntGbcd: a ?? W.DEFAULT_PRNT_GBCD
493
+ };
494
+ if (et(s, r()._lastFetchParams)) {
495
+ console.log("✅ 중복 fetch 차단", s);
496
+ return;
497
+ }
498
+ e({ isLoading: !0, error: null, _lastFetchParams: s });
499
+ try {
500
+ const o = await U(re("AUTH_MENU"), s), i = Qe(o), u = tt(i);
501
+ e({
502
+ flatMenuList: i,
503
+ // 평면 리스트 저장
504
+ menuList: u,
505
+ // 트리 구조 저장
506
+ isLoading: !1,
507
+ error: null
508
+ });
509
+ } catch (o) {
510
+ e({ isLoading: !1, error: o?.message ?? "메뉴 로드 실패" });
511
+ }
512
+ },
513
+ // 🔧 메뉴 모델 초기화
514
+ // 로그아웃 시나 사용자 변경 시 메뉴 모델 클리어
515
+ clearMenu: () => {
516
+ e({
517
+ menuList: [],
518
+ flatMenuList: [],
519
+ error: null,
520
+ _lastFetchParams: null
521
+ });
522
+ },
523
+ // 🔧 메뉴 ID로 메뉴 아이템 찾기
524
+ // URL 파라미터나 프로그래밍 방식으로 특정 메뉴를 찾을 때 사용
525
+ findMenuById: (t) => {
526
+ const { flatMenuList: n } = r();
527
+ return n.find((a) => a.menuId === t) ?? null;
528
+ }
529
+ })), R = {
530
+ MAX_TABS: 15
531
+ }, nt = x((e, r) => ({
532
+ // 📊 초기 상태값
533
+ activeMenuId: null,
534
+ activeMenuItem: null,
535
+ activeDetailItem: null,
536
+ tabs: [],
537
+ sidebarCollapsed: !1,
538
+ maxTabs: R.MAX_TABS,
539
+ tabProtectFlag: {},
540
+ tabParams: {},
541
+ componentLabelMap: {},
542
+ // 🔧 탭 추가 (메뉴 아이템 객체로)
543
+ // 사이드바에서 메뉴 클릭 시 호출되는 메인 함수
544
+ openTabFromMenu: (t, n) => {
545
+ const { tabs: a, activeMenuId: s } = r(), o = a.find((u) => u.key === t.menuId), i = a.find((u) => u.key === t.menuId);
546
+ if (o)
547
+ i != null ? (e({ activeMenuId: t.menuId, activeMenuItem: t }), console.log("✅ 기존 탭 활성화 - activeMenuItem:", t), r().setTabParams(t.menuId, n || {}), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId)) : (console.warn("❌ 유효하지 않은 메뉴정보", t.menuId), F.warning("유효하지 않은 메뉴정보입니다."));
548
+ else {
549
+ if (a.length > R.MAX_TABS) {
550
+ console.warn("❌ 최대 탭 개수를 초과했습니다."), F.warning(
551
+ `최대 ${R.MAX_TABS}개의 탭만 열 수 있습니다.
552
+ 기존 탭을 닫고 다시 시도해주세요.`
553
+ );
554
+ return;
555
+ }
556
+ const u = {
557
+ key: t.menuId,
558
+ label: t.menuNm,
559
+ gubun: "M",
560
+ menuItem: t,
561
+ closable: !0
562
+ };
563
+ e({
564
+ tabs: [...a, u],
565
+ // 탭 목록에 추가
566
+ activeMenuId: t.menuId,
567
+ // 새 탭을 활성화
568
+ activeMenuItem: t
569
+ // 현재 프로그램으로 설정
570
+ }), r().setTabParams(t.menuId, n || {}), console.log("✅ 새 탭 추가 - activeMenuItem:", t), t?.prsnInfoYn === "Y" && r().setProtectFlagForKey(t.menuId);
571
+ }
572
+ },
573
+ // 🔧 탭 추가 (메뉴 ID로)
574
+ // URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
575
+ openTabByMenuId: (t, n) => {
576
+ const a = rt.getState().findMenuById(t);
577
+ a ? r().openTabFromMenu(a, n) : (console.warn("❌ 메뉴 ID를 찾을 수 없음:", t), F.warning("메뉴 ID를 찾을 수 없습니다."));
578
+ },
579
+ openDetailView: (t, n, a) => {
580
+ const { tabs: s, activeMenuId: o } = r();
581
+ if (s.find((u) => u.key === t.viewId))
582
+ r().focusTab(t.viewId);
583
+ else {
584
+ const u = {
585
+ key: t.viewId,
586
+ label: t.viewLabel,
587
+ gubun: "C",
588
+ componentItem: {
589
+ scrnPath: n,
590
+ prsnInfoYn: a,
591
+ prntInfo: t.prntInfo
592
+ },
593
+ closable: !0
594
+ };
595
+ e({
596
+ tabs: [...s, u],
597
+ // 탭 목록에 추가
598
+ activeMenuId: t.viewId,
599
+ // 새 탭을 활성화
600
+ activeDetailItem: t
601
+ }), r().setTabParams(t.viewId, t.viewParams || {});
602
+ }
603
+ },
604
+ // 🔧 탭 제거
605
+ // X 버튼 클릭 시 탭을 닫고 관련 상태도 정리
606
+ closeTab: (t) => {
607
+ const { tabs: n, activeMenuId: a } = r();
608
+ n.find((i) => i.key === t);
609
+ const s = n.filter((i) => i.key !== t);
610
+ let o = a;
611
+ if (a === t) {
612
+ const i = n.findIndex((u) => u.key === t);
613
+ o = s.length ? s[Math.min(i, s.length - 1)]?.key ?? null : null;
614
+ }
615
+ e({
616
+ tabs: s
617
+ }), o && r().focusTab(o);
618
+ },
619
+ // 🔧 활성 탭 변경
620
+ // 탭 헤더 클릭 시 해당 탭으로 전환
621
+ focusTab: (t) => {
622
+ const { tabs: n } = r(), a = n.find((s) => s.key === t);
623
+ if (a) {
624
+ const s = a.gubun === "C" ? {
625
+ viewId: a.key,
626
+ viewLabel: a.label,
627
+ prntInfo: a.componentItem?.prntInfo
628
+ } : null;
629
+ a.menuItem?.prsnInfoYn === "Y" ? (e({
630
+ activeMenuId: t,
631
+ activeMenuItem: a.menuItem,
632
+ activeDetailItem: s
633
+ }), console.log(
634
+ "✅ 탭 포커스 (개인정보) - activeMenuItem:",
635
+ a.menuItem
636
+ ), r().setProtectFlagForKey(t)) : (e({
637
+ activeMenuId: t,
638
+ activeMenuItem: a.menuItem,
639
+ activeDetailItem: s
640
+ }), console.log("✅ 탭 포커스 (일반) - activeMenuItem:", a.menuItem), r().clearProtectFlagForKey(t));
641
+ } else
642
+ e({ activeMenuId: t, activeMenuItem: null, activeDetailItem: null }), console.warn("❌ 탭을 찾을 수 없음:", t);
643
+ },
644
+ // 🔧 모든 탭 제거
645
+ // 로그아웃이나 전체 초기화 시 사용
646
+ closeAllTabs: () => e({ tabs: [], activeMenuId: null, activeMenuItem: null, activeDetailItem: null }),
647
+ // 🔧 사이드바 토글
648
+ // 햄버거 메뉴 클릭 시 사이드바 접기/펼치기
649
+ toggleSidebar: () => e((t) => ({ sidebarCollapsed: !t.sidebarCollapsed })),
650
+ // useMenuViewStore.ts
651
+ reorderTabs: (t) => e((n) => {
652
+ const a = new Map(n.tabs.map((s) => [s.key, s]));
653
+ return { tabs: t.map((s) => a.get(s)).filter(Boolean) };
654
+ }),
655
+ // 개인정보 포함여부에 따른 탭 잠금 Flag 설정
656
+ setProtectFlagForKey: (t) => e((n) => ({
657
+ tabProtectFlag: { ...n.tabProtectFlag, [t]: !0 }
658
+ })),
659
+ // 개인정보 포함여부에 따른 탭 잠금 해제
660
+ clearProtectFlagForKey: (t) => e((n) => {
661
+ const a = { ...n.tabProtectFlag };
662
+ return delete a[t], { tabProtectFlag: a };
663
+ }),
664
+ // 탭 파라미터 설정
665
+ setTabParams: (t, n) => e((a) => {
666
+ const s = a.tabParams[t] || {}, o = { ...n || {} };
667
+ return Object.keys(s).length === Object.keys(o).length && Object.keys(o).every((u) => s[u] === o[u]) ? a : {
668
+ tabParams: { ...a.tabParams, [t]: o }
669
+ };
670
+ }),
671
+ // 컴포넌트 라벨 맵 설정
672
+ setComponentLabelMap: (t, n) => e({ componentLabelMap: t })
673
+ })), H = x((e) => ({
674
+ requestCount: 0,
675
+ loading: !1,
676
+ showLoading: () => e((r) => {
677
+ const t = r.requestCount + 1;
678
+ return { requestCount: t, loading: t > 0 };
679
+ }),
680
+ hideLoading: () => e((r) => {
681
+ const t = Math.max(0, r.requestCount - 1);
682
+ return { requestCount: t, loading: t > 0 };
683
+ })
684
+ }));
685
+ let T = null;
686
+ const st = async (e) => {
687
+ if (T === null)
688
+ if (e === void 0)
689
+ try {
690
+ let t = (await j.get("/api/ip")).data.trim();
691
+ t = t.replace(/\s+/g, ""), T = t;
692
+ } catch (r) {
693
+ console.warn("IP 가져오기 실패:", r), T = "unknown";
694
+ }
695
+ else
696
+ T = e;
697
+ }, Dt = () => T, Lt = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), T || "unknown");
698
+ class M extends Error {
699
+ constructor(r, t, n, a, s) {
700
+ super(r), this.name = "ApiError", this.detailMsg = t, this.response = n, this.msgCd = a, this.errorType = s, Error.captureStackTrace && Error.captureStackTrace(this, M);
701
+ }
702
+ }
703
+ const G = {
704
+ method: "POST",
705
+ timeout: 3e4,
706
+ // 30초
707
+ withCredentials: !0,
708
+ // 쿠키 포함
709
+ showLoading: !0,
710
+ showError: !0,
711
+ retryCount: 0,
712
+ retryDelay: 1e3
713
+ }, A = j.create({
714
+ timeout: G.timeout,
715
+ withCredentials: G.withCredentials,
716
+ headers: {
717
+ "Content-Type": "application/json; charset=utf-8",
718
+ Accept: "application/json; charset=utf-8"
719
+ }
720
+ });
721
+ A.interceptors.request.use(
722
+ (e) => {
723
+ e.showLoading && H.getState().showLoading();
724
+ let r = "UNKNOWN", t = "UNKNOWN";
725
+ (/* @__PURE__ */ new Date()).getTime();
726
+ try {
727
+ 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");
728
+ } catch (a) {
729
+ console.warn("trxCd/guid 추출 실패:", a);
730
+ }
731
+ e.trxCd = r, e.guid = t, e.requestStartTime = Date.now(), console.log(`🚀 API 요청 시작 [거래코드: ${r} / GUID: ${t}]`);
732
+ const n = localStorage.getItem("accessToken");
733
+ 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;
734
+ },
735
+ (e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
736
+ );
737
+ A.interceptors.response.use(
738
+ (e) => {
739
+ e.config.showLoading && H.getState().hideLoading();
740
+ let r = "UNKNOWN", t = "UNKNOWN";
741
+ const n = (/* @__PURE__ */ new Date()).getTime();
742
+ try {
743
+ 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");
744
+ } catch (s) {
745
+ console.warn("trxCd/guid 추출 실패:", s);
746
+ }
747
+ let a = 0;
748
+ return e.config.requestStartTime && (a = n - e.config.requestStartTime), console.log(
749
+ `✅ API 응답 성공 [거래코드: ${r} / GUID : ${t}] - (소요시간: ${a}ms)`
750
+ ), e;
751
+ },
752
+ async (e) => {
753
+ if (e.config && e.config.showLoading && H.getState().hideLoading(), console.error("❌ API 응답 에러:", e), B && console.error("🚨 Error Details:", {
754
+ message: e.message,
755
+ status: e.response?.status,
756
+ statusText: e.response?.statusText,
757
+ data: e.response?.data,
758
+ config: {
759
+ url: e.config?.url,
760
+ method: e.config?.method,
761
+ baseURL: e.config?.baseURL
762
+ }
763
+ }), e.response?.status === 401) {
764
+ const r = localStorage.getItem("refreshToken");
765
+ if (r)
766
+ try {
767
+ const t = await j.post("/auth/refresh", {
768
+ refreshToken: r
769
+ });
770
+ if (t.data.accessToken) {
771
+ localStorage.setItem(
772
+ "accessToken",
773
+ t.data.accessToken
774
+ );
775
+ const n = e.config;
776
+ if (n)
777
+ return n.headers.Authorization = `Bearer ${t.data.accessToken}`, A(n);
778
+ }
779
+ } catch {
780
+ localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
781
+ }
782
+ }
783
+ return Promise.reject(e);
784
+ }
785
+ );
786
+ const at = () => Z(), U = async (e, r, t) => {
787
+ try {
788
+ const n = {
789
+ ...G,
790
+ ...t
791
+ }, { activeMenuId: a } = nt.getState();
792
+ if (T === null) {
793
+ const I = Date.now();
794
+ await st();
795
+ const l = Date.now();
796
+ console.log(`[INFO] IP 조회 소요시간: ${l - I}ms`);
797
+ }
798
+ const s = {
799
+ method: n.method,
800
+ url: "/api/service",
801
+ timeout: n.timeout,
802
+ withCredentials: n.withCredentials,
803
+ showLoading: n.showLoading
804
+ };
805
+ n.headers && (s.headers = n.headers);
806
+ const o = T || "unknown", i = __APP_CD__, u = __SYS_CD__, h = {
807
+ header: {
808
+ trxCd: e,
809
+ guid: at(),
810
+ userInfo: ee(),
811
+ clientIp: o,
812
+ // 클라이언트 IP 추가 (서버에서 재확인 권장)
813
+ domainId: "DEFAULT",
814
+ appCd: i,
815
+ sysCd: u,
816
+ screenId: a
817
+ },
818
+ // data: bxmEncrypt(JSON.stringify(data)),
819
+ data: r
820
+ };
821
+ B && console.log("__BWG_LOCAL__ 테스트 입니다. ", B), n.method === "GET" ? s.params = h || n.params : (s.data = h || n.data, n.params && (s.params = n.params));
822
+ let m;
823
+ for (let I = 0; I <= (n.retryCount || 0); I++)
824
+ try {
825
+ const l = await A(s);
826
+ if (l.data.header?.resCd == 0) {
827
+ for (const g in l.data)
828
+ if (g !== "header")
829
+ return l.data[g];
830
+ return {};
831
+ } else {
832
+ const g = l.data.header, f = g?.msgs?.basicMsg || "요청 처리 중 오류가 발생했습니다.", c = g?.msgs?.detailMsgs || f, y = g?.msgCd, w = g?.msgs?.type;
833
+ throw new M(f, c, l, y, w);
834
+ }
835
+ } catch (l) {
836
+ if (l.isAxiosError && l.response) {
837
+ const g = l, f = g.response, c = f.data, y = c?.header?.msgs?.basicMsg || g.message || // 실패 시 Axios 에러 메시지 사용
838
+ "서버에서 오류가 발생했습니다.", w = c?.header?.msgs?.detailMsgs || // 상세 메시지로 응답 본문 제공 (문자열이 아니면 JSON으로 변환)
839
+ (typeof f.data == "string" ? f.data : JSON.stringify(f.data)) || y, p = c?.header?.msgCd, S = c?.header?.msgs?.type;
840
+ m = new M(
841
+ y,
842
+ w,
843
+ f,
844
+ p,
845
+ S
846
+ );
847
+ } else
848
+ m = l;
849
+ if (l.isAxiosError && ot(l) && I < (n.retryCount || 0)) {
850
+ await ct(n.retryDelay || 1e3);
851
+ continue;
852
+ }
853
+ break;
854
+ }
855
+ if (m) {
856
+ if (n.showError) {
857
+ const I = m instanceof M ? m.message : "요청 처리 중 오류가 발생했습니다.", l = m instanceof M ? m.msgCd : "요청 처리 중 오류가 발생했습니다.", g = m instanceof M ? m.detailMsg : m.message, f = m instanceof M ? m.errorType : "";
858
+ l?.startsWith("BXM") ? He({
859
+ message: I,
860
+ description: g,
861
+ duration: 5
862
+ }) : f == "I" ? Ge(I, g, 5) : je(I, g, 5);
863
+ }
864
+ throw m;
865
+ }
866
+ throw new Error("알 수 없는 API 오류가 발생했습니다.");
867
+ } catch (n) {
868
+ throw console.error("callService 최종 에러:", n), n;
869
+ }
870
+ }, ot = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, ct = (e) => new Promise((r) => setTimeout(r, e)), At = (e, r, t) => U(e, r, { ...t, method: "GET" }), xt = (e, r, t) => U(e, r, { ...t, method: "POST" }), _t = (e, r, t) => U(e, r, { ...t, method: "PUT" }), kt = (e, r, t) => U(e, r, { ...t, method: "DELETE" }), Ft = (e, r, t) => U(e, r, { ...t, method: "PATCH" });
871
+ export {
872
+ Pt as $,
873
+ ge as A,
874
+ me as B,
875
+ Re as C,
876
+ Ie as D,
877
+ be as E,
878
+ we as F,
879
+ he as G,
880
+ fe as H,
881
+ Te as I,
882
+ Be as J,
883
+ Oe as K,
884
+ Fe as L,
885
+ ie as M,
886
+ le as N,
887
+ ue as O,
888
+ oe as P,
889
+ kt as Q,
890
+ At as R,
891
+ Ft as S,
892
+ xt as T,
893
+ _t as U,
894
+ U as V,
895
+ Dt as W,
896
+ at as X,
897
+ st as Y,
898
+ Lt as Z,
899
+ yt as _,
900
+ $e as a,
901
+ vt as a0,
902
+ ze as a1,
903
+ Ve as a2,
904
+ Ct as a3,
905
+ K as a4,
906
+ St as a5,
907
+ Xe as a6,
908
+ ee as a7,
909
+ Je as a8,
910
+ Mt as a9,
911
+ wt as aa,
912
+ bt as ab,
913
+ Nt as ac,
914
+ Tt as ad,
915
+ It as ae,
916
+ ht as af,
917
+ v as ag,
918
+ ft as ah,
919
+ Ge as ai,
920
+ pt as aj,
921
+ je as ak,
922
+ Et as al,
923
+ re as am,
924
+ Ut as an,
925
+ H as ao,
926
+ rt as ap,
927
+ nt as aq,
928
+ b as ar,
929
+ Ye as as,
930
+ mt as at,
931
+ We as b,
932
+ ye as c,
933
+ ke as d,
934
+ _e as e,
935
+ J as f,
936
+ ce as g,
937
+ Me as h,
938
+ Ne as i,
939
+ ve as j,
940
+ xe as k,
941
+ pe as l,
942
+ Se as m,
943
+ de as n,
944
+ De as o,
945
+ Ae as p,
946
+ V as q,
947
+ Z as r,
948
+ Ue as s,
949
+ Ee as t,
950
+ L as u,
951
+ Pe as v,
952
+ Le as w,
953
+ q as x,
954
+ D as y,
955
+ se as z
956
+ };
957
+ //# sourceMappingURL=apiUtils-C45AWfu-.js.map