@bwg-ui/core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -0
- package/dist/chunks/BwgLargeUploader-ByN1XWV4.js +809 -0
- package/dist/chunks/BwgLargeUploader-CU0-MVk4.cjs +1 -0
- package/dist/chunks/BwgSpace-CnLM4qcg.js +26 -0
- package/dist/chunks/BwgSpace-b0hmM1Ht.cjs +1 -0
- package/dist/chunks/QuickServiceToggle-CiCuWfCF.cjs +183 -0
- package/dist/chunks/QuickServiceToggle-y7esp1kp.js +15510 -0
- package/dist/chunks/ServiceCodeContext--ZnMtjzD.cjs +1 -0
- package/dist/chunks/ServiceCodeContext-CDZMr3Mm.js +87 -0
- package/dist/chunks/UtilsContext-B16Gh9LL.cjs +1 -0
- package/dist/chunks/UtilsContext-BbfZYiMR.js +240 -0
- package/dist/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/chunks/codeStore-Dt6j826J.cjs +1 -0
- package/dist/chunks/codeStore-bxk_q1sl.js +449 -0
- package/dist/chunks/commonUtils-BV6WFv-z.js +628 -0
- package/dist/chunks/commonUtils-L9Jgc5y-.cjs +1 -0
- package/dist/chunks/favoriteStore-CguRSEcH.js +367 -0
- package/dist/chunks/favoriteStore-TgeeY32l.cjs +1 -0
- package/dist/chunks/jsx-runtime-CeSfJrVB.cjs +30 -0
- package/dist/chunks/jsx-runtime-Dpn_P65e.js +633 -0
- package/dist/chunks/messageUtils-9DXOwada.js +117 -0
- package/dist/chunks/messageUtils-RjJD_ArW.cjs +1 -0
- package/dist/chunks/popupStore-CVD8SPTa.cjs +1 -0
- package/dist/chunks/popupStore-Dp_fqtim.js +96 -0
- package/dist/chunks/realFormat-Cha7OTd9.cjs +1 -0
- package/dist/chunks/realFormat-DRGLFabQ.js +304 -0
- package/dist/chunks/serviceConfig-BJBsdee_.js +699 -0
- package/dist/chunks/serviceConfig-Cr2P4yr4.cjs +2 -0
- package/dist/components/common/BwgButtonGroup.d.ts +31 -0
- package/dist/components/common/BwgCmptArea.d.ts +16 -0
- package/dist/components/common/BwgConfigProvider.d.ts +10 -0
- package/dist/components/common/BwgDrawer.d.ts +20 -0
- package/dist/components/common/BwgGrid.d.ts +505 -0
- package/dist/components/common/BwgInfoArea.d.ts +8 -0
- package/dist/components/common/BwgPopup.d.ts +9 -0
- package/dist/components/common/BwgSpace.d.ts +11 -0
- package/dist/components/common/BwgTable.d.ts +13 -0
- package/dist/components/common/BwgTabs.d.ts +5 -0
- package/dist/components/common/BwgTitleBox.d.ts +29 -0
- package/dist/components/common/BwgView.d.ts +36 -0
- package/dist/components/common/ContentBox.d.ts +19 -0
- package/dist/components/common/ContentLayOut.d.ts +13 -0
- package/dist/components/common/GlobalConfigProvider.d.ts +9 -0
- package/dist/components/common/QuickServiceToggle.d.ts +13 -0
- package/dist/components/common/SearchBox.d.ts +16 -0
- package/dist/components/common/index.cjs +1 -0
- package/dist/components/common/index.d.ts +34 -0
- package/dist/components/common/index.js +24 -0
- package/dist/components/core/BwgButton.d.ts +6 -0
- package/dist/components/core/BwgCheck.d.ts +11 -0
- package/dist/components/core/BwgCheckList.d.ts +11 -0
- package/dist/components/core/BwgDatePicker.d.ts +10 -0
- package/dist/components/core/BwgForm.d.ts +6 -0
- package/dist/components/core/BwgFormItem.d.ts +17 -0
- package/dist/components/core/BwgInput.d.ts +9 -0
- package/dist/components/core/BwgLargeUploader.d.ts +15 -0
- package/dist/components/core/BwgMaskedInput.d.ts +20 -0
- package/dist/components/core/BwgMaskedPicker.d.ts +11 -0
- package/dist/components/core/BwgMultiSelect.d.ts +14 -0
- package/dist/components/core/BwgNumber.d.ts +13 -0
- package/dist/components/core/BwgRadio.d.ts +8 -0
- package/dist/components/core/BwgRangePicker.d.ts +12 -0
- package/dist/components/core/BwgSearch.d.ts +16 -0
- package/dist/components/core/BwgSelect.d.ts +15 -0
- package/dist/components/core/BwgTextArea.d.ts +8 -0
- package/dist/components/core/BwgUploader.d.ts +34 -0
- package/dist/components/core/index.cjs +1 -0
- package/dist/components/core/index.d.ts +36 -0
- package/dist/components/core/index.js +21 -0
- package/dist/components/guide/BwgComponentGuide.d.ts +2 -0
- package/dist/components/guide/BwgDeveloperGuide.d.ts +2 -0
- package/dist/components/guide/index.cjs +1 -0
- package/dist/components/guide/index.d.ts +2 -0
- package/dist/components/guide/index.js +7 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +291 -0
- package/dist/provider/contexts/CommonCodeContext.d.ts +46 -0
- package/dist/provider/contexts/SearchBoxContext.d.ts +15 -0
- package/dist/provider/contexts/ServiceCodeContext.d.ts +108 -0
- package/dist/provider/contexts/UtilsContext.d.ts +194 -0
- package/dist/provider/contexts/index.d.ts +4 -0
- package/dist/provider/hooks/index.d.ts +2 -0
- package/dist/provider/hooks/usePopup.d.ts +17 -0
- package/dist/provider/hooks/useViewState.d.ts +14 -0
- package/dist/provider/index.cjs +1 -0
- package/dist/provider/index.d.ts +2 -0
- package/dist/provider/index.js +27 -0
- package/dist/public/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
- package/dist/public/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
- package/dist/public/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
- package/dist/public/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
- package/dist/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +8 -0
- package/dist/public/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
- package/dist/public/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
- package/dist/public/test.txt +0 -0
- package/dist/stores/codeStore.d.ts +173 -0
- package/dist/stores/favoriteStore.d.ts +19 -0
- package/dist/stores/index.cjs +1 -0
- package/dist/stores/index.d.ts +14 -0
- package/dist/stores/index.js +20 -0
- package/dist/stores/menuStore.d.ts +52 -0
- package/dist/stores/popupStore.d.ts +72 -0
- package/dist/stores/userStore.d.ts +36 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-bold.eot +2751 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-bold.svg +626 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-bold.ttf +2755 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-bold.woff +2755 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-bold.woff2 +2754 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-medium.eot +0 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-medium.svg +1064 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-medium.ttf +0 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-medium.woff +0 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-medium.woff2 +2754 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-regular.eot +0 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-regular.svg +1063 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-regular.ttf +1597 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-regular.woff +1597 -0
- package/dist/styles/assets/fonts/Roboto/Roboto-regular.woff2 +1597 -0
- package/dist/styles/assets/fonts/material/MaterialIcons-Regular.eot +1594 -0
- package/dist/styles/assets/fonts/material/MaterialIcons-Regular.ttf +0 -0
- package/dist/styles/assets/fonts/material/MaterialIcons-Regular.woff +1594 -0
- package/dist/styles/assets/fonts/material/MaterialIcons-Regular.woff2 +1594 -0
- package/dist/styles/assets/fonts/material/MaterialSymbolsOutlined.woff2 +0 -0
- package/dist/styles/assets/fonts/meiryo/meiryo.ttf +0 -0
- package/dist/styles/assets/fonts/meiryo/meiryob.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.eot +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.woff +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.eot +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.woff +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.eot +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.woff +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.eot +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.woff +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.eot +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.ttf +0 -0
- package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.woff +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.eot +2314 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.otf +2314 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.svg +47 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.ttf +2301 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.woff +2314 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Bold.woff2 +2315 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Light.otf +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Light.woff +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.eot +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.otf +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.svg +47 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.ttf +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.woff +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.eot +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.otf +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.svg +47 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.ttf +2299 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.woff +0 -0
- package/dist/styles/assets/fonts/notokr/NotoSans-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.eot +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.ttf +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.woff +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.woff2 +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Light.eot +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Light.ttf +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Light.woff +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Medium.eot +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Medium.woff +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Regular.eot +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Regular.woff +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.eot +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.woff +0 -0
- package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Black.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Bold.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-ExtraBold.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-ExtraLight.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-SemiBold.woff2 +0 -0
- package/dist/styles/assets/fonts/pretendard/Pretendard-Thin.woff2 +0 -0
- package/dist/styles/assets/images/README.md +144 -0
- package/dist/styles/assets/images/backgrounds/landing_bg.png +0 -0
- package/dist/styles/assets/images/backgrounds/login_bg_01.png +0 -0
- package/dist/styles/assets/images/backgrounds/login_bg_02.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-down-on.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-down.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-left-on.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-left.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-right-on.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-right.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-up-on.png +0 -0
- package/dist/styles/assets/images/contents/btn/btn-up.png +0 -0
- package/dist/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
- package/dist/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
- package/dist/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
- package/dist/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
- package/dist/styles/assets/images/contents/icon/ico-quick-tab-move.svg +4 -0
- package/dist/styles/assets/images/contents/icon/ico-setting.svg +4 -0
- package/dist/styles/assets/images/contents/icon/ico_blue.png +0 -0
- package/dist/styles/assets/images/contents/icon/ico_red.png +0 -0
- package/dist/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
- package/dist/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
- package/dist/styles/assets/images/logos/KRX Logo.svg +22 -0
- package/dist/styles/assets/images/logos/bwg-logo-blue.png +0 -0
- package/dist/styles/assets/images/logos/krx-logo-x2.png +0 -0
- package/dist/styles/assets/images/logos/krx-logo.png +0 -0
- package/dist/styles/assets/react.svg +1 -0
- package/dist/styles/components.css +785 -0
- package/dist/styles/fonts.css +101 -0
- package/dist/styles/global.css +52 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/layout.css +1132 -0
- package/dist/styles/login.css +151 -0
- package/dist/styles/popup.css +30 -0
- package/dist/styles/renderers.css +190 -0
- package/dist/styles/size.css +4019 -0
- package/dist/styles/variables.css +106 -0
- package/dist/test.txt +0 -0
- package/dist/types/images.d.ts +25 -0
- package/dist/utils/apiUtils.d.ts +85 -0
- package/dist/utils/arrayUtils.d.ts +34 -0
- package/dist/utils/commonUtils.d.ts +54 -0
- package/dist/utils/cookieUtils.d.ts +4 -0
- package/dist/utils/dateUtils.d.ts +26 -0
- package/dist/utils/envUtils.d.ts +8 -0
- package/dist/utils/imageUtils.d.ts +31 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.js +211 -0
- package/dist/utils/messageUtils.d.ts +65 -0
- package/dist/utils/notificationUtils.d.ts +51 -0
- package/dist/utils/objectUtils.d.ts +27 -0
- package/dist/utils/realFormat.d.ts +242 -0
- package/dist/utils/serviceConfig.d.ts +35 -0
- package/dist/utils/stringUtils.d.ts +142 -0
- package/dist/utils/userUtils.d.ts +19 -0
- package/package.json +123 -0
- package/public/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
- package/public/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
- package/public/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
- package/public/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
- package/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +8 -0
- package/public/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
- package/public/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
- package/public/test.txt +0 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import H from "axios";
|
|
2
|
+
import c from "crypto-js";
|
|
3
|
+
import { notification as C } from "antd";
|
|
4
|
+
import { create as V } from "zustand";
|
|
5
|
+
const _ = (e) => typeof e != "string" ? !e : e.trim().length === 0, Z = (e, t) => _(e) ? t : e || "", X = (e) => !_(e), Y = (e, t, r = "...") => e.length <= t ? e : e.substring(0, t) + r, M = (e) => _(e) ? e : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), Q = (e) => _(e) ? e : e.split(" ").map((t) => M(t)).join(" "), ee = (e) => e.replace(/-([a-z])/g, (t) => t[1].toUpperCase()), te = (e) => e.replace(/[A-Z]/g, (t) => `_${t.toLowerCase()}`), re = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), ne = (e) => {
|
|
6
|
+
const r = e.replace(/\D/g, "").match(/^(\d{3})(\d{4})(\d{4})$/);
|
|
7
|
+
return r ? `${r[1]}-${r[2]}-${r[3]}` : e;
|
|
8
|
+
}, se = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), ae = (e) => {
|
|
9
|
+
try {
|
|
10
|
+
return new URL(e), !0;
|
|
11
|
+
} catch {
|
|
12
|
+
return !1;
|
|
13
|
+
}
|
|
14
|
+
}, oe = (e) => e.replace(/\D/g, ""), ce = (e) => e.replace(/[^a-zA-Z0-9가-힣\s]/g, ""), ie = (e) => e.replace(/<[^>]*>/g, ""), ue = (e) => e.replace(/\n/g, "<br>"), le = (e) => e.replace(/<br\s*\/?>/gi, `
|
|
15
|
+
`), de = (e, t) => {
|
|
16
|
+
const r = e.match(t);
|
|
17
|
+
return r || [];
|
|
18
|
+
}, ge = (e, t) => e.repeat(t), me = (e, t, r = " ") => e.padStart(t, r), fe = (e, t, r = " ") => e.padEnd(t, r), pe = (e, t, r = " ") => {
|
|
19
|
+
const n = t - e.length;
|
|
20
|
+
if (n <= 0) return e;
|
|
21
|
+
const a = Math.floor(n / 2), s = n - a;
|
|
22
|
+
return r.repeat(a) + e + r.repeat(s);
|
|
23
|
+
}, b = (e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") => {
|
|
24
|
+
let r = "";
|
|
25
|
+
for (let n = 0; n < e; n++)
|
|
26
|
+
r += t.charAt(Math.floor(Math.random() * t.length));
|
|
27
|
+
return r;
|
|
28
|
+
}, he = (e) => e.split("").reverse().join(""), ye = (e, t) => (e.match(new RegExp(t, "g")) || []).length, Se = (e) => e.trim().split(/\s+/).length, B = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
29
|
+
const t = Math.random() * 16 | 0;
|
|
30
|
+
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
31
|
+
}), R = (e = 32) => {
|
|
32
|
+
const r = B().replace(/-/g, "");
|
|
33
|
+
return e >= 32 ? r + b(e - 32, "0123456789abcdef") : r.substring(0, e);
|
|
34
|
+
}, Ce = () => R(16), Ie = () => R(64), Ne = (e = 16) => b(e, "0123456789"), Ue = (e = 16) => b(e, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"), G = () => B(), j = () => G().replace(/-/g, ""), we = () => {
|
|
35
|
+
const e = Date.now().toString(36), t = b(8, "0123456789abcdef");
|
|
36
|
+
return e + t;
|
|
37
|
+
}, ve = (e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") => e.replace(
|
|
38
|
+
/[X-Z]/g,
|
|
39
|
+
() => t.charAt(Math.floor(Math.random() * t.length))
|
|
40
|
+
), Ee = (e) => {
|
|
41
|
+
const t = c.SHA256(e);
|
|
42
|
+
return c.enc.Base64.stringify(t);
|
|
43
|
+
}, A = () => "abcdefghij1234567890!@#$%^&*();;", K = () => "123456098765!@#$", De = (e) => {
|
|
44
|
+
if (!e) return "";
|
|
45
|
+
try {
|
|
46
|
+
const t = c.enc.Utf8.parse(A()), r = c.enc.Utf8.parse(K());
|
|
47
|
+
return c.AES.encrypt(e, t, {
|
|
48
|
+
iv: r,
|
|
49
|
+
padding: c.pad.Pkcs7,
|
|
50
|
+
mode: c.mode.CBC
|
|
51
|
+
}).toString();
|
|
52
|
+
} catch (t) {
|
|
53
|
+
return console.error("암호화 오류:", t), "";
|
|
54
|
+
}
|
|
55
|
+
}, xe = (e) => {
|
|
56
|
+
if (!e) return "";
|
|
57
|
+
try {
|
|
58
|
+
const t = c.enc.Utf8.parse(A()), r = c.enc.Utf8.parse(K());
|
|
59
|
+
return c.AES.decrypt(e, t, {
|
|
60
|
+
iv: r,
|
|
61
|
+
padding: c.pad.Pkcs7,
|
|
62
|
+
mode: c.mode.CBC
|
|
63
|
+
}).toString(c.enc.Utf8);
|
|
64
|
+
} catch (t) {
|
|
65
|
+
return console.error("복호화 오류:", t), "";
|
|
66
|
+
}
|
|
67
|
+
}, _e = (e, t) => {
|
|
68
|
+
if (!e) return "";
|
|
69
|
+
try {
|
|
70
|
+
const r = t || A();
|
|
71
|
+
return c.AES.encrypt(e, r).toString();
|
|
72
|
+
} catch (r) {
|
|
73
|
+
return console.error("간단한 암호화 오류:", r), "";
|
|
74
|
+
}
|
|
75
|
+
}, be = (e, t) => {
|
|
76
|
+
if (!e) return "";
|
|
77
|
+
try {
|
|
78
|
+
const r = t || A();
|
|
79
|
+
return c.AES.decrypt(e, r).toString(c.enc.Utf8);
|
|
80
|
+
} catch (r) {
|
|
81
|
+
return console.error("간단한 복호화 오류:", r), "";
|
|
82
|
+
}
|
|
83
|
+
}, Oe = (e) => e ? c.MD5(e).toString() : "", Te = (e) => e ? c.SHA256(e).toString() : "", Ae = (e) => e ? c.enc.Base64.stringify(c.enc.Utf8.parse(e)) : "", Le = (e) => {
|
|
84
|
+
if (!e) return "";
|
|
85
|
+
try {
|
|
86
|
+
return c.enc.Base64.parse(e).toString(c.enc.Utf8);
|
|
87
|
+
} catch (t) {
|
|
88
|
+
return console.error("Base64 디코딩 오류:", t), "";
|
|
89
|
+
}
|
|
90
|
+
}, tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91
|
+
__proto__: null,
|
|
92
|
+
base64Decode: Le,
|
|
93
|
+
base64Encode: Ae,
|
|
94
|
+
br2nl: le,
|
|
95
|
+
bxmDecrypt: xe,
|
|
96
|
+
bxmEncrypt: De,
|
|
97
|
+
capitalize: M,
|
|
98
|
+
capitalizeWords: Q,
|
|
99
|
+
center: pe,
|
|
100
|
+
countChar: ye,
|
|
101
|
+
countWords: Se,
|
|
102
|
+
encryptSha256: Ee,
|
|
103
|
+
extractNumbers: oe,
|
|
104
|
+
findPattern: de,
|
|
105
|
+
formatPhoneNumber: ne,
|
|
106
|
+
generateAlphanumericUID: Ue,
|
|
107
|
+
generateCustomUID: ve,
|
|
108
|
+
generateGUID: G,
|
|
109
|
+
generateGUIDWithoutHyphens: j,
|
|
110
|
+
generateLongUID: Ie,
|
|
111
|
+
generateNumericUID: Ne,
|
|
112
|
+
generateRandomString: b,
|
|
113
|
+
generateShortUID: Ce,
|
|
114
|
+
generateTimestampUID: we,
|
|
115
|
+
generateUID: R,
|
|
116
|
+
isEmpty: _,
|
|
117
|
+
isNotEmpty: X,
|
|
118
|
+
isSafeEmpty: Z,
|
|
119
|
+
isValidEmail: se,
|
|
120
|
+
isValidUrl: ae,
|
|
121
|
+
md5Hash: Oe,
|
|
122
|
+
nl2br: ue,
|
|
123
|
+
padLeft: me,
|
|
124
|
+
padRight: fe,
|
|
125
|
+
removeHtmlTags: ie,
|
|
126
|
+
removeSpecialChars: ce,
|
|
127
|
+
repeat: ge,
|
|
128
|
+
reverse: he,
|
|
129
|
+
sha256Hash: Te,
|
|
130
|
+
simpleDecrypt: be,
|
|
131
|
+
simpleEncrypt: _e,
|
|
132
|
+
toCamelCase: ee,
|
|
133
|
+
toKebabCase: re,
|
|
134
|
+
toSnakeCase: te,
|
|
135
|
+
truncate: Y
|
|
136
|
+
}, Symbol.toStringTag, { value: "Module" })), d = {
|
|
137
|
+
duration: 4.5,
|
|
138
|
+
// 4.5초
|
|
139
|
+
placement: "topRight"
|
|
140
|
+
};
|
|
141
|
+
class w {
|
|
142
|
+
static instance;
|
|
143
|
+
constructor() {
|
|
144
|
+
}
|
|
145
|
+
static getInstance() {
|
|
146
|
+
return w.instance || (w.instance = new w()), w.instance;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* BwgError 전용 에러 알림
|
|
150
|
+
* @param props - 에러 메시지 설정
|
|
151
|
+
*/
|
|
152
|
+
showBwgError(t) {
|
|
153
|
+
const { message: r, description: n, duration: a = d.duration, placement: s = d.placement } = t;
|
|
154
|
+
C.error({
|
|
155
|
+
message: `${r}`,
|
|
156
|
+
description: n || "오류가 발생했습니다. 다시 시도해주세요.",
|
|
157
|
+
duration: a,
|
|
158
|
+
placement: s,
|
|
159
|
+
style: {
|
|
160
|
+
borderLeft: "4px solid #ff4d4f",
|
|
161
|
+
backgroundColor: "#fff2f0"
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 성공 알림
|
|
167
|
+
*/
|
|
168
|
+
showSuccess(t, r, n) {
|
|
169
|
+
C.success({
|
|
170
|
+
message: `${t}`,
|
|
171
|
+
description: r,
|
|
172
|
+
duration: n || d.duration,
|
|
173
|
+
placement: d.placement
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* 정보 알림
|
|
178
|
+
*/
|
|
179
|
+
showInfo(t, r, n) {
|
|
180
|
+
C.info({
|
|
181
|
+
message: `${t}`,
|
|
182
|
+
description: r,
|
|
183
|
+
duration: n || d.duration,
|
|
184
|
+
placement: d.placement
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* 경고 알림
|
|
189
|
+
*/
|
|
190
|
+
showWarning(t, r, n) {
|
|
191
|
+
C.warning({
|
|
192
|
+
message: `${t}`,
|
|
193
|
+
description: r,
|
|
194
|
+
duration: n || d.duration,
|
|
195
|
+
placement: d.placement
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* 일반 에러 알림
|
|
200
|
+
*/
|
|
201
|
+
showError(t, r, n) {
|
|
202
|
+
C.error({
|
|
203
|
+
message: `${t}`,
|
|
204
|
+
description: r,
|
|
205
|
+
duration: n || d.duration,
|
|
206
|
+
placement: d.placement
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* 모든 알림 닫기
|
|
211
|
+
*/
|
|
212
|
+
destroy() {
|
|
213
|
+
C.destroy();
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* 특정 키의 알림 닫기
|
|
217
|
+
*/
|
|
218
|
+
close(t) {
|
|
219
|
+
C.destroy();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const I = w.getInstance(), Pe = (e) => {
|
|
223
|
+
I.showBwgError(e);
|
|
224
|
+
}, rt = (e, t, r) => {
|
|
225
|
+
I.showSuccess(e, t, r);
|
|
226
|
+
}, nt = (e, t, r) => {
|
|
227
|
+
I.showInfo(e, t, r);
|
|
228
|
+
}, st = (e, t, r) => {
|
|
229
|
+
I.showWarning(e, t, r);
|
|
230
|
+
}, at = (e, t, r) => {
|
|
231
|
+
I.showError(e, t, r);
|
|
232
|
+
}, ot = () => {
|
|
233
|
+
I.destroy();
|
|
234
|
+
}, ct = (e) => {
|
|
235
|
+
I.close(e);
|
|
236
|
+
};
|
|
237
|
+
function ke(e, t) {
|
|
238
|
+
let r;
|
|
239
|
+
try {
|
|
240
|
+
r = e();
|
|
241
|
+
} catch {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
getItem: (a) => {
|
|
246
|
+
var s;
|
|
247
|
+
const p = (l) => l === null ? null : JSON.parse(l, void 0), m = (s = r.getItem(a)) != null ? s : null;
|
|
248
|
+
return m instanceof Promise ? m.then(p) : p(m);
|
|
249
|
+
},
|
|
250
|
+
setItem: (a, s) => r.setItem(a, JSON.stringify(s, void 0)),
|
|
251
|
+
removeItem: (a) => r.removeItem(a)
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
const P = (e) => (t) => {
|
|
255
|
+
try {
|
|
256
|
+
const r = e(t);
|
|
257
|
+
return r instanceof Promise ? r : {
|
|
258
|
+
then(n) {
|
|
259
|
+
return P(n)(r);
|
|
260
|
+
},
|
|
261
|
+
catch(n) {
|
|
262
|
+
return this;
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
} catch (r) {
|
|
266
|
+
return {
|
|
267
|
+
then(n) {
|
|
268
|
+
return this;
|
|
269
|
+
},
|
|
270
|
+
catch(n) {
|
|
271
|
+
return P(n)(r);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}, Re = (e, t) => (r, n, a) => {
|
|
276
|
+
let s = {
|
|
277
|
+
storage: ke(() => localStorage),
|
|
278
|
+
partialize: (o) => o,
|
|
279
|
+
version: 0,
|
|
280
|
+
merge: (o, U) => ({
|
|
281
|
+
...U,
|
|
282
|
+
...o
|
|
283
|
+
}),
|
|
284
|
+
...t
|
|
285
|
+
}, p = !1;
|
|
286
|
+
const m = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
287
|
+
let u = s.storage;
|
|
288
|
+
if (!u)
|
|
289
|
+
return e(
|
|
290
|
+
(...o) => {
|
|
291
|
+
console.warn(
|
|
292
|
+
`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`
|
|
293
|
+
), r(...o);
|
|
294
|
+
},
|
|
295
|
+
n,
|
|
296
|
+
a
|
|
297
|
+
);
|
|
298
|
+
const S = () => {
|
|
299
|
+
const o = s.partialize({ ...n() });
|
|
300
|
+
return u.setItem(s.name, {
|
|
301
|
+
state: o,
|
|
302
|
+
version: s.version
|
|
303
|
+
});
|
|
304
|
+
}, h = a.setState;
|
|
305
|
+
a.setState = (o, U) => (h(o, U), S());
|
|
306
|
+
const y = e(
|
|
307
|
+
(...o) => (r(...o), S()),
|
|
308
|
+
n,
|
|
309
|
+
a
|
|
310
|
+
);
|
|
311
|
+
a.getInitialState = () => y;
|
|
312
|
+
let N;
|
|
313
|
+
const $ = () => {
|
|
314
|
+
var o, U;
|
|
315
|
+
if (!u) return;
|
|
316
|
+
p = !1, m.forEach((i) => {
|
|
317
|
+
var f;
|
|
318
|
+
return i((f = n()) != null ? f : y);
|
|
319
|
+
});
|
|
320
|
+
const T = ((U = s.onRehydrateStorage) == null ? void 0 : U.call(s, (o = n()) != null ? o : y)) || void 0;
|
|
321
|
+
return P(u.getItem.bind(u))(s.name).then((i) => {
|
|
322
|
+
if (i)
|
|
323
|
+
if (typeof i.version == "number" && i.version !== s.version) {
|
|
324
|
+
if (s.migrate) {
|
|
325
|
+
const f = s.migrate(
|
|
326
|
+
i.state,
|
|
327
|
+
i.version
|
|
328
|
+
);
|
|
329
|
+
return f instanceof Promise ? f.then((L) => [!0, L]) : [!0, f];
|
|
330
|
+
}
|
|
331
|
+
console.error(
|
|
332
|
+
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
333
|
+
);
|
|
334
|
+
} else
|
|
335
|
+
return [!1, i.state];
|
|
336
|
+
return [!1, void 0];
|
|
337
|
+
}).then((i) => {
|
|
338
|
+
var f;
|
|
339
|
+
const [L, J] = i;
|
|
340
|
+
if (N = s.merge(
|
|
341
|
+
J,
|
|
342
|
+
(f = n()) != null ? f : y
|
|
343
|
+
), r(N, !0), L)
|
|
344
|
+
return S();
|
|
345
|
+
}).then(() => {
|
|
346
|
+
T?.(N, void 0), N = n(), p = !0, l.forEach((i) => i(N));
|
|
347
|
+
}).catch((i) => {
|
|
348
|
+
T?.(void 0, i);
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
return a.persist = {
|
|
352
|
+
setOptions: (o) => {
|
|
353
|
+
s = {
|
|
354
|
+
...s,
|
|
355
|
+
...o
|
|
356
|
+
}, o.storage && (u = o.storage);
|
|
357
|
+
},
|
|
358
|
+
clearStorage: () => {
|
|
359
|
+
u?.removeItem(s.name);
|
|
360
|
+
},
|
|
361
|
+
getOptions: () => s,
|
|
362
|
+
rehydrate: () => $(),
|
|
363
|
+
hasHydrated: () => p,
|
|
364
|
+
onHydrate: (o) => (m.add(o), () => {
|
|
365
|
+
m.delete(o);
|
|
366
|
+
}),
|
|
367
|
+
onFinishHydration: (o) => (l.add(o), () => {
|
|
368
|
+
l.delete(o);
|
|
369
|
+
})
|
|
370
|
+
}, s.skipHydration || $(), N || y;
|
|
371
|
+
}, We = Re, g = V()(
|
|
372
|
+
We(
|
|
373
|
+
(e, t) => ({
|
|
374
|
+
user: null,
|
|
375
|
+
isLoggedIn: !1,
|
|
376
|
+
// 로그인
|
|
377
|
+
login: (r) => {
|
|
378
|
+
e({ user: r, isLoggedIn: !0 }), console.log("사용자 로그인:", r);
|
|
379
|
+
},
|
|
380
|
+
// 로그아웃
|
|
381
|
+
logout: () => {
|
|
382
|
+
e({ user: null, isLoggedIn: !1 }), console.log("사용자 로그아웃");
|
|
383
|
+
},
|
|
384
|
+
// 사용자 정보 업데이트
|
|
385
|
+
updateUser: (r) => {
|
|
386
|
+
const n = t().user;
|
|
387
|
+
n && e({ user: { ...n, ...r } });
|
|
388
|
+
}
|
|
389
|
+
}),
|
|
390
|
+
{
|
|
391
|
+
name: "user-storage",
|
|
392
|
+
// 로컬 스토리지 키
|
|
393
|
+
partialize: (e) => ({
|
|
394
|
+
user: e.user,
|
|
395
|
+
isLoggedIn: e.isLoggedIn
|
|
396
|
+
})
|
|
397
|
+
// 저장할 상태만 선택
|
|
398
|
+
}
|
|
399
|
+
)
|
|
400
|
+
), it = () => g.getState().user?.crprCd || null, $e = () => g.getState().user?.userId || null, He = () => g.getState().user?.userNm || null, ut = () => g.getState().user?.userDvsn || null, lt = () => g.getState().user?.emplNo || null, Me = () => g.getState().user?.dprtCd || null, Be = () => g.getState().user?.dprtNm || null, W = () => g.getState().user?.roleList || null, dt = (e) => {
|
|
401
|
+
const t = W();
|
|
402
|
+
return t ? t.includes(e) : !1;
|
|
403
|
+
}, gt = (e) => {
|
|
404
|
+
const t = W();
|
|
405
|
+
return t ? e.some((r) => t.includes(r)) : !1;
|
|
406
|
+
}, mt = (e) => {
|
|
407
|
+
const t = W();
|
|
408
|
+
return t ? e.every((r) => t.includes(r)) : !1;
|
|
409
|
+
}, ft = () => g.getState().isLoggedIn, F = () => g.getState().user, pt = () => F() !== null, ht = () => {
|
|
410
|
+
const e = He(), t = $e();
|
|
411
|
+
return e || t || null;
|
|
412
|
+
}, yt = () => {
|
|
413
|
+
const e = Be(), t = Me();
|
|
414
|
+
return e || (t ? String(t) : null);
|
|
415
|
+
}, D = (() => {
|
|
416
|
+
try {
|
|
417
|
+
if (typeof __BWG_LOCAL__ < "u") return !!__BWG_LOCAL__;
|
|
418
|
+
} catch {
|
|
419
|
+
}
|
|
420
|
+
try {
|
|
421
|
+
const t = import.meta?.env;
|
|
422
|
+
if (typeof t?.DEV == "boolean") return t.DEV;
|
|
423
|
+
if (typeof t?.MODE == "string") return t.MODE === "development";
|
|
424
|
+
} catch {
|
|
425
|
+
}
|
|
426
|
+
return typeof process < "u" && process?.env?.NODE_ENV ? process.env.NODE_ENV !== "production" : !1;
|
|
427
|
+
})();
|
|
428
|
+
let Ge = [], je = [];
|
|
429
|
+
function q() {
|
|
430
|
+
if (typeof window < "u" && window.location)
|
|
431
|
+
return window.location.hostname;
|
|
432
|
+
}
|
|
433
|
+
const Ke = (() => {
|
|
434
|
+
const e = q();
|
|
435
|
+
return !!(e && Ge.includes(e));
|
|
436
|
+
})(), Fe = (() => {
|
|
437
|
+
const e = q();
|
|
438
|
+
return !!(e && je.includes(e));
|
|
439
|
+
})();
|
|
440
|
+
function qe() {
|
|
441
|
+
return D ? "X" : Ke ? "D" : Fe ? "P" : "X";
|
|
442
|
+
}
|
|
443
|
+
let x = null;
|
|
444
|
+
const St = (e) => {
|
|
445
|
+
x === null && (x = e);
|
|
446
|
+
}, Ct = () => x, It = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), x || "unknown"), k = {
|
|
447
|
+
method: "POST",
|
|
448
|
+
timeout: 3e4,
|
|
449
|
+
// 30초
|
|
450
|
+
withCredentials: !0,
|
|
451
|
+
// 쿠키 포함
|
|
452
|
+
showLoading: !0,
|
|
453
|
+
showError: !0,
|
|
454
|
+
retryCount: 3,
|
|
455
|
+
retryDelay: 1e3
|
|
456
|
+
}, v = H.create({
|
|
457
|
+
timeout: k.timeout,
|
|
458
|
+
withCredentials: k.withCredentials,
|
|
459
|
+
headers: {
|
|
460
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
461
|
+
Accept: "application/json; charset=utf-8"
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
D && (console.log("🔧 API Client Configuration:"), console.log(" - Timeout:", v.defaults.timeout), console.log(" - With Credentials:", v.defaults.withCredentials), console.log(" - Environment:", qe()));
|
|
465
|
+
v.interceptors.request.use(
|
|
466
|
+
(e) => {
|
|
467
|
+
let t = "UNKNOWN", r = "UNKNOWN";
|
|
468
|
+
(/* @__PURE__ */ new Date()).getTime();
|
|
469
|
+
try {
|
|
470
|
+
e.data && e.data.header ? (t = e.data.header.trxCd || "UNKNOWN", r = e.data.header.guid || "UNKNOWN") : e.params && e.params.header && (t = e.params.header.trxCd || "UNKNOWN", r = e.params.header.guid || "UNKNOWN");
|
|
471
|
+
} catch (a) {
|
|
472
|
+
console.warn("trxCd/guid 추출 실패:", a);
|
|
473
|
+
}
|
|
474
|
+
e.trxCd = t, e.guid = r, e.requestStartTime = Date.now(), console.log(`🚀 API 요청 시작 [거래코드: ${t} / GUID: ${r}]`);
|
|
475
|
+
const n = localStorage.getItem("accessToken");
|
|
476
|
+
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;
|
|
477
|
+
},
|
|
478
|
+
(e) => (console.error("❌ 요청 인터셉터 에러:", e), Promise.reject(e))
|
|
479
|
+
);
|
|
480
|
+
v.interceptors.response.use(
|
|
481
|
+
(e) => {
|
|
482
|
+
let t = "UNKNOWN", r = "UNKNOWN";
|
|
483
|
+
const n = (/* @__PURE__ */ new Date()).getTime();
|
|
484
|
+
try {
|
|
485
|
+
e.config.trxCd && (t = e.config.trxCd), e.config.guid ? r = e.config.guid : e.data && e.data.header && e.data.header.trxCd ? (t = e.data.header.trxCd, r = e.data.header.guid || "UNKNOWN") : e.config.data && e.config.data.header ? (t = e.config.data.header.trxCd || "UNKNOWN", r = e.config.data.header.guid || "UNKNOWN") : e.config.params && e.config.params.header && (t = e.config.params.header.trxCd || "UNKNOWN", r = e.config.params.header.guid || "UNKNOWN");
|
|
486
|
+
} catch (s) {
|
|
487
|
+
console.warn("trxCd/guid 추출 실패:", s);
|
|
488
|
+
}
|
|
489
|
+
let a = 0;
|
|
490
|
+
return e.config.requestStartTime && (a = n - e.config.requestStartTime), console.log(
|
|
491
|
+
`✅ API 응답 성공 [거래코드: ${t} / GUID : ${r}] - (소요시간: ${a}ms)`
|
|
492
|
+
), e;
|
|
493
|
+
},
|
|
494
|
+
async (e) => {
|
|
495
|
+
if (console.error("❌ API 응답 에러:", e), D && console.error("🚨 Error Details:", {
|
|
496
|
+
message: e.message,
|
|
497
|
+
status: e.response?.status,
|
|
498
|
+
statusText: e.response?.statusText,
|
|
499
|
+
data: e.response?.data,
|
|
500
|
+
config: {
|
|
501
|
+
url: e.config?.url,
|
|
502
|
+
method: e.config?.method,
|
|
503
|
+
baseURL: e.config?.baseURL
|
|
504
|
+
}
|
|
505
|
+
}), e.response?.status === 401) {
|
|
506
|
+
const t = localStorage.getItem("refreshToken");
|
|
507
|
+
if (t)
|
|
508
|
+
try {
|
|
509
|
+
const r = await H.post("/auth/refresh", {
|
|
510
|
+
refreshToken: t
|
|
511
|
+
});
|
|
512
|
+
if (r.data.accessToken) {
|
|
513
|
+
localStorage.setItem(
|
|
514
|
+
"accessToken",
|
|
515
|
+
r.data.accessToken
|
|
516
|
+
);
|
|
517
|
+
const n = e.config;
|
|
518
|
+
if (n)
|
|
519
|
+
return n.headers.Authorization = `Bearer ${r.data.accessToken}`, v(n);
|
|
520
|
+
}
|
|
521
|
+
} catch {
|
|
522
|
+
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken"), window.location.href = "/login";
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return Promise.reject(e);
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
const ze = () => j(), O = async (e, t, r) => {
|
|
529
|
+
try {
|
|
530
|
+
const n = {
|
|
531
|
+
...k,
|
|
532
|
+
...r
|
|
533
|
+
}, a = {
|
|
534
|
+
method: n.method,
|
|
535
|
+
url: "/api/service",
|
|
536
|
+
timeout: n.timeout,
|
|
537
|
+
withCredentials: n.withCredentials
|
|
538
|
+
};
|
|
539
|
+
n.headers && (a.headers = n.headers);
|
|
540
|
+
const s = x || "unknown", p = __APP_CD__, m = __SYS_CD__;
|
|
541
|
+
console.log("@@ request param :: ", t);
|
|
542
|
+
const l = {
|
|
543
|
+
header: {
|
|
544
|
+
trxCd: e,
|
|
545
|
+
guid: ze(),
|
|
546
|
+
userInfo: F(),
|
|
547
|
+
clientIp: s,
|
|
548
|
+
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
549
|
+
domainId: "DEFAULT",
|
|
550
|
+
appCd: p,
|
|
551
|
+
sysCd: m
|
|
552
|
+
},
|
|
553
|
+
// data: bxmEncrypt(JSON.stringify(data)),
|
|
554
|
+
data: t
|
|
555
|
+
};
|
|
556
|
+
D && (console.log("__BWG_LOCAL__ 테스트 입니다. ", D), console.log("📤 Request Data:", l)), n.method === "GET" ? a.params = l || n.params : (a.data = l || n.data, n.params && (a.params = n.params));
|
|
557
|
+
let u;
|
|
558
|
+
for (let S = 0; S <= (n.retryCount || 0); S++)
|
|
559
|
+
try {
|
|
560
|
+
const h = await v(a);
|
|
561
|
+
if (h.data.header?.resCd == 0) {
|
|
562
|
+
for (const y in h.data)
|
|
563
|
+
if (y !== "header")
|
|
564
|
+
return h.data[y];
|
|
565
|
+
} else
|
|
566
|
+
return Pe({
|
|
567
|
+
message: "서비스 호출 실패",
|
|
568
|
+
description: h.data.header?.resMsg || "요청 처리 중 오류가 발생했습니다.",
|
|
569
|
+
duration: 5
|
|
570
|
+
}), null;
|
|
571
|
+
} catch (h) {
|
|
572
|
+
if (u = h, Je(u) && S < (n.retryCount || 0)) {
|
|
573
|
+
await Ve(n.retryDelay || 1e3);
|
|
574
|
+
continue;
|
|
575
|
+
}
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
throw u;
|
|
579
|
+
} catch (n) {
|
|
580
|
+
throw console.error("callService 에러:", n), n;
|
|
581
|
+
}
|
|
582
|
+
}, Je = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, Ve = (e) => new Promise((t) => setTimeout(t, e)), Nt = (e, t, r) => O(e, t, { ...r, method: "GET" }), Ut = (e, t, r) => O(e, t, { ...r, method: "POST" }), wt = (e, t, r) => O(e, t, { ...r, method: "PUT" }), vt = (e, t, r) => O(e, t, { ...r, method: "DELETE" }), Et = (e, t, r) => O(e, t, { ...r, method: "PATCH" }), z = {
|
|
583
|
+
// 권한 관련
|
|
584
|
+
AUTH_BTNS: "SCMSIGN00202",
|
|
585
|
+
// 버튼 권한 조회
|
|
586
|
+
AUTH_MENU: "SCMSIGN00201",
|
|
587
|
+
// 메뉴 권한 조회
|
|
588
|
+
SRCH_CODE: "SCMSIGN00301",
|
|
589
|
+
// 코드 조회
|
|
590
|
+
// 팝업 관련
|
|
591
|
+
SRCH_POPU: "SCMPOPU00101",
|
|
592
|
+
// 팝업 조회
|
|
593
|
+
// 즐겨찾기 관련
|
|
594
|
+
AUTH_BMRK: "SCMBMRK00101"
|
|
595
|
+
// 즐겨찾기 관리
|
|
596
|
+
};
|
|
597
|
+
let E = {};
|
|
598
|
+
function Dt(e) {
|
|
599
|
+
E = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
|
|
600
|
+
}
|
|
601
|
+
function Ze(e) {
|
|
602
|
+
if (E[e] && E[e].trim() !== "")
|
|
603
|
+
return console.log(`🔧 Provider 설정 사용: ${e} = ${E[e]}`), E[e];
|
|
604
|
+
const t = z[e];
|
|
605
|
+
return console.log(`🔧 기본값 사용: ${e} = ${t}`), t;
|
|
606
|
+
}
|
|
607
|
+
function xt() {
|
|
608
|
+
const e = {};
|
|
609
|
+
for (const t of Object.keys(z))
|
|
610
|
+
e[t] = Ze(t);
|
|
611
|
+
return e;
|
|
612
|
+
}
|
|
613
|
+
export {
|
|
614
|
+
yt as $,
|
|
615
|
+
se as A,
|
|
616
|
+
ae as B,
|
|
617
|
+
Oe as C,
|
|
618
|
+
ue as D,
|
|
619
|
+
me as E,
|
|
620
|
+
fe as F,
|
|
621
|
+
ie as G,
|
|
622
|
+
ce as H,
|
|
623
|
+
he as I,
|
|
624
|
+
Te as J,
|
|
625
|
+
be as K,
|
|
626
|
+
_e as L,
|
|
627
|
+
ee as M,
|
|
628
|
+
re as N,
|
|
629
|
+
te as O,
|
|
630
|
+
Y as P,
|
|
631
|
+
vt as Q,
|
|
632
|
+
Nt as R,
|
|
633
|
+
Et as S,
|
|
634
|
+
Ut as T,
|
|
635
|
+
wt as U,
|
|
636
|
+
O as V,
|
|
637
|
+
Ct as W,
|
|
638
|
+
ze as X,
|
|
639
|
+
St as Y,
|
|
640
|
+
It as Z,
|
|
641
|
+
it as _,
|
|
642
|
+
Ae as a,
|
|
643
|
+
ht as a0,
|
|
644
|
+
Me as a1,
|
|
645
|
+
Be as a2,
|
|
646
|
+
lt as a3,
|
|
647
|
+
W as a4,
|
|
648
|
+
ut as a5,
|
|
649
|
+
$e as a6,
|
|
650
|
+
F as a7,
|
|
651
|
+
He as a8,
|
|
652
|
+
mt as a9,
|
|
653
|
+
gt as aa,
|
|
654
|
+
dt as ab,
|
|
655
|
+
pt as ac,
|
|
656
|
+
ft as ad,
|
|
657
|
+
ct as ae,
|
|
658
|
+
ot as af,
|
|
659
|
+
I as ag,
|
|
660
|
+
at as ah,
|
|
661
|
+
nt as ai,
|
|
662
|
+
rt as aj,
|
|
663
|
+
st as ak,
|
|
664
|
+
xt as al,
|
|
665
|
+
Ze as am,
|
|
666
|
+
Dt as an,
|
|
667
|
+
D as ao,
|
|
668
|
+
Ke as ap,
|
|
669
|
+
Fe as aq,
|
|
670
|
+
qe as ar,
|
|
671
|
+
g as as,
|
|
672
|
+
We as at,
|
|
673
|
+
tt as au,
|
|
674
|
+
Le as b,
|
|
675
|
+
le as c,
|
|
676
|
+
xe as d,
|
|
677
|
+
De as e,
|
|
678
|
+
M as f,
|
|
679
|
+
Q as g,
|
|
680
|
+
pe as h,
|
|
681
|
+
ye as i,
|
|
682
|
+
Se as j,
|
|
683
|
+
Ee as k,
|
|
684
|
+
oe as l,
|
|
685
|
+
de as m,
|
|
686
|
+
ne as n,
|
|
687
|
+
Ue as o,
|
|
688
|
+
ve as p,
|
|
689
|
+
G as q,
|
|
690
|
+
j as r,
|
|
691
|
+
Ie as s,
|
|
692
|
+
Ne as t,
|
|
693
|
+
b as u,
|
|
694
|
+
Ce as v,
|
|
695
|
+
we as w,
|
|
696
|
+
R as x,
|
|
697
|
+
_ as y,
|
|
698
|
+
Z as z
|
|
699
|
+
};
|