@bwg-ui/core 1.0.0 → 1.1.1

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 (83) hide show
  1. package/dist/chunks/AuthContext-CXng9fj0.cjs +1 -0
  2. package/dist/chunks/AuthContext-Ei2P-z4d.js +52 -0
  3. package/dist/chunks/BwgLargeUploader-BOf905_l.cjs +2 -0
  4. package/dist/chunks/BwgLargeUploader-BeI8oV8y.js +3315 -0
  5. package/dist/chunks/FileUtils-BcnoJ2zn.js +140 -0
  6. package/dist/chunks/FileUtils-CCBueCSG.cjs +1 -0
  7. package/dist/chunks/PublicLayout-BiTPwkVq.cjs +35 -0
  8. package/dist/chunks/PublicLayout-g9WMtoZ0.js +138 -0
  9. package/dist/chunks/{QuickServiceToggle-y7esp1kp.js → SSOHandler-DVa4JKKb.js} +14831 -14630
  10. package/dist/chunks/SSOHandler-DiwKoTdN.cjs +183 -0
  11. package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs +1 -0
  12. package/dist/chunks/ScreenProtectContext-zByHldrr.js +114 -0
  13. package/dist/chunks/SearchBoxContext-B1nxG-Wd.cjs +1 -0
  14. package/dist/chunks/{ServiceCodeContext-CDZMr3Mm.js → SearchBoxContext-DhKP2pQj.js} +39 -39
  15. package/dist/chunks/{UtilsContext-B16Gh9LL.cjs → UtilsContext-CLJwXO1Q.cjs} +1 -1
  16. package/dist/chunks/{UtilsContext-BbfZYiMR.js → UtilsContext-CwVwmfrg.js} +9 -9
  17. package/dist/chunks/{codeStore-bxk_q1sl.js → codeStore-9alVvK1W.js} +1 -1
  18. package/dist/chunks/{codeStore-Dt6j826J.cjs → codeStore-B_4WPxpS.cjs} +1 -1
  19. package/dist/chunks/envUtils-C9Gf5aek.js +29 -0
  20. package/dist/chunks/envUtils-CduTHoHu.cjs +1 -0
  21. package/dist/chunks/menuStore-BwLORbDu.cjs +1 -0
  22. package/dist/chunks/{favoriteStore-CguRSEcH.js → menuStore-DXn19Xnr.js} +136 -123
  23. package/dist/chunks/{popupStore-CVD8SPTa.cjs → popupStore-D_-Wpcao.cjs} +1 -1
  24. package/dist/chunks/{popupStore-Dp_fqtim.js → popupStore-JBIRLYTL.js} +1 -1
  25. package/dist/chunks/{serviceConfig-BJBsdee_.js → serviceConfig-4iBLfLzF.js} +176 -205
  26. package/dist/chunks/serviceConfig-B5UJqk4b.cjs +2 -0
  27. package/dist/components/common/BwgCmptArea.d.ts +84 -6
  28. package/dist/components/common/BwgCol.d.ts +19 -0
  29. package/dist/components/common/BwgConfigProvider.d.ts +2 -1
  30. package/dist/components/common/BwgGrid.d.ts +9 -4
  31. package/dist/components/common/BwgInfoArea.d.ts +2 -1
  32. package/dist/components/common/BwgRow.d.ts +19 -0
  33. package/dist/components/common/BwgTitleBox.d.ts +5 -1
  34. package/dist/components/common/BwgView.d.ts +2 -13
  35. package/dist/components/common/SSOHandler.d.ts +2 -0
  36. package/dist/components/common/SearchBox.d.ts +59 -7
  37. package/dist/components/common/index.cjs +1 -1
  38. package/dist/components/common/index.d.ts +19 -16
  39. package/dist/components/common/index.js +20 -17
  40. package/dist/components/core/BwgLargeUploader.d.ts +4 -1
  41. package/dist/components/core/BwgSearch.d.ts +4 -0
  42. package/dist/components/core/BwgUploader.d.ts +30 -7
  43. package/dist/components/core/index.cjs +1 -1
  44. package/dist/components/core/index.js +1 -1
  45. package/dist/components/layout/ProgressOverlay.d.ts +10 -0
  46. package/dist/components/layout/ProtectLayout.d.ts +6 -0
  47. package/dist/components/layout/PublicLayout.d.ts +6 -0
  48. package/dist/components/layout/index.cjs +1 -0
  49. package/dist/components/layout/index.d.ts +3 -0
  50. package/dist/components/layout/index.js +6 -0
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +304 -289
  54. package/dist/provider/contexts/AuthContext.d.ts +12 -0
  55. package/dist/provider/contexts/ScreenProtectContext.d.ts +21 -0
  56. package/dist/provider/contexts/index.d.ts +2 -0
  57. package/dist/provider/index.cjs +1 -1
  58. package/dist/provider/index.js +25 -19
  59. package/dist/stores/index.cjs +1 -1
  60. package/dist/stores/index.js +5 -5
  61. package/dist/styles/assets/images/backgrounds/krx_login_bg.png +0 -0
  62. package/dist/styles/assets/images/contents/icon/ico-lockscreen.svg +44 -0
  63. package/dist/styles/assets/images/logos/krx-logo-full.svg +35 -0
  64. package/dist/styles/components.css +130 -17
  65. package/dist/styles/global.css +19 -0
  66. package/dist/styles/layout.css +108 -35
  67. package/dist/styles/login.css +39 -33
  68. package/dist/styles/variables.css +221 -5
  69. package/dist/types/global.d.ts +2 -0
  70. package/dist/utils/FileUtils.d.ts +7 -0
  71. package/dist/utils/envUtils.d.ts +8 -0
  72. package/dist/utils/index.cjs +1 -1
  73. package/dist/utils/index.d.ts +1 -0
  74. package/dist/utils/index.js +105 -103
  75. package/package.json +32 -5
  76. package/dist/chunks/BwgLargeUploader-ByN1XWV4.js +0 -809
  77. package/dist/chunks/BwgLargeUploader-CU0-MVk4.cjs +0 -1
  78. package/dist/chunks/QuickServiceToggle-CiCuWfCF.cjs +0 -183
  79. package/dist/chunks/ServiceCodeContext--ZnMtjzD.cjs +0 -1
  80. package/dist/chunks/favoriteStore-TgeeY32l.cjs +0 -1
  81. package/dist/chunks/messageUtils-9DXOwada.js +0 -117
  82. package/dist/chunks/messageUtils-RjJD_ArW.cjs +0 -1
  83. package/dist/chunks/serviceConfig-Cr2P4yr4.cjs +0 -2
@@ -0,0 +1,140 @@
1
+ import c from "react";
2
+ import { message as o } from "antd";
3
+ import { V as i, a7 as g } from "./serviceConfig-4iBLfLzF.js";
4
+ const p = (e) => {
5
+ try {
6
+ return new URL((/* @__PURE__ */ Object.assign({}))[`../assets/images/backgrounds/${e}`], import.meta.url).href;
7
+ } catch {
8
+ return l();
9
+ }
10
+ }, l = () => "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1920&h=1080&fit=crop&crop=center", S = (e) => {
11
+ try {
12
+ return new URL((/* @__PURE__ */ Object.assign({}))[`../assets/images/logos/${e}`], import.meta.url).href;
13
+ } catch {
14
+ return "/images/default-logo.png";
15
+ }
16
+ }, I = (e, s = "common") => {
17
+ try {
18
+ return new URL((/* @__PURE__ */ Object.assign({}))[`../assets/images/icons/${s}/${e}`], import.meta.url).href;
19
+ } catch {
20
+ return `/images/icons/${s}/default.svg`;
21
+ }
22
+ }, $ = (e) => {
23
+ try {
24
+ return new URL((/* @__PURE__ */ Object.assign({}))[`../assets/images/avatars/${e}`], import.meta.url).href;
25
+ } catch {
26
+ return "/images/avatars/default.png";
27
+ }
28
+ }, m = (e) => new Promise((s, t) => {
29
+ const r = new Image();
30
+ r.onload = () => s(), r.onerror = () => t(new Error(`Failed to load image: ${e}`)), r.src = e;
31
+ }), u = (e, s, t) => {
32
+ const r = new URL(e);
33
+ return r.searchParams.set("w", s.toString()), r.searchParams.set("h", t.toString()), r.toString();
34
+ }, E = (e, s) => {
35
+ const t = new URL(e);
36
+ return t.searchParams.set("fm", s), t.toString();
37
+ }, y = (e, s) => s.map((t) => `${u(e, t, t)} ${t}w`).join(", "), U = (e, s = {}) => {
38
+ const t = new URL(e);
39
+ return s.width && t.searchParams.set("w", s.width.toString()), s.height && t.searchParams.set("h", s.height.toString()), s.format && t.searchParams.set("fm", s.format), s.quality && t.searchParams.set("q", s.quality.toString()), t.toString();
40
+ }, C = (e) => {
41
+ const s = e.target;
42
+ s.src = "/images/placeholder.png", s.alt = "이미지를 불러올 수 없습니다";
43
+ }, L = (e) => {
44
+ const [s, t] = c.useState(!0), [r, a] = c.useState(!1);
45
+ return c.useEffect(() => {
46
+ t(!0), a(!1), m(e).then(() => t(!1)).catch(() => {
47
+ a(!0), t(!1);
48
+ });
49
+ }, [e]), { isLoading: s, hasError: r };
50
+ }, R = (e, s, t = 30) => {
51
+ const r = /* @__PURE__ */ new Date();
52
+ r.setTime(r.getTime() + t * 24 * 60 * 60 * 1e3), document.cookie = `${e}=${s};expires=${r.toUTCString()};path=/`;
53
+ }, k = (e) => {
54
+ const s = e + "=", t = document.cookie.split(";");
55
+ for (let r = 0; r < t.length; r++) {
56
+ let a = t[r];
57
+ for (; a.charAt(0) === " "; ) a = a.substring(1, a.length);
58
+ if (a.indexOf(s) === 0) return a.substring(s.length, a.length);
59
+ }
60
+ return null;
61
+ }, _ = (e) => {
62
+ document.cookie = `${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
63
+ }, b = "krx_ui_theme", h = (e, s = 3) => {
64
+ o.success({
65
+ content: e,
66
+ duration: s
67
+ });
68
+ }, n = (e, s = 5) => {
69
+ o.error({
70
+ content: e,
71
+ duration: s
72
+ });
73
+ }, P = (e = "처리중...") => o.loading({
74
+ content: e,
75
+ duration: 0
76
+ // 수동으로 닫을 때까지 유지
77
+ }), v = (e) => {
78
+ o.destroy(e);
79
+ }, O = () => {
80
+ o.destroy();
81
+ }, x = (e, s = "처리 중 오류가 발생했습니다.") => {
82
+ const t = e?.response?.data?.message || e?.message || s;
83
+ n(t);
84
+ }, F = (e = "저장") => {
85
+ h(`${e}이 완료되었습니다.`);
86
+ }, T = (e = "저장") => {
87
+ n(`${e} 중 오류가 발생했습니다.`);
88
+ }, j = (e) => {
89
+ n(`이미 사용중인 ${e}입니다.`);
90
+ }, D = (e) => {
91
+ n(`${e}을(를) 입력해주세요.`);
92
+ };
93
+ async function M(e) {
94
+ try {
95
+ return await i("SCMFILE00101", {
96
+ crprCd: g().crprCd,
97
+ sysCd: __SYS_CD__,
98
+ fileKey: e
99
+ }).then((t) => {
100
+ let r;
101
+ if (t.sub && (r = t.sub[0]), console.log(t), console.log(r), !r.lgclFileNm)
102
+ throw console.error("논리파일명이 없습니다."), new Error("논리 파일명 누락");
103
+ if (!r.filePath)
104
+ throw console.error("파일 경로가 없습니다."), new Error("파일 경로 누락");
105
+ const a = `api/download?filePath=${encodeURIComponent(
106
+ r.filePath
107
+ )}&logicalName=${encodeURIComponent(r.lgclFileNm)}`;
108
+ return window.open(a, "_blank"), { success: !0, message: "파일 다운로드 요청 성공" };
109
+ });
110
+ } catch (s) {
111
+ throw console.error("downloadByFileKey 함수 실행 중 오류 발생:", s), s;
112
+ }
113
+ }
114
+ export {
115
+ b as T,
116
+ $ as a,
117
+ p as b,
118
+ E as c,
119
+ l as d,
120
+ I as e,
121
+ S as f,
122
+ y as g,
123
+ U as h,
124
+ C as i,
125
+ _ as j,
126
+ k,
127
+ P as l,
128
+ v as m,
129
+ O as n,
130
+ x as o,
131
+ m as p,
132
+ F as q,
133
+ u as r,
134
+ R as s,
135
+ T as t,
136
+ L as u,
137
+ j as v,
138
+ D as w,
139
+ M as x
140
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("react"),n=require("antd"),g=require("./serviceConfig-B5UJqk4b.cjs");var a=typeof document<"u"?document.currentScript:null;const h=e=>{try{return new URL(Object.assign({})[`../assets/images/backgrounds/${e}`],typeof document>"u"?require("url").pathToFileURL(__filename).href:a&&a.tagName.toUpperCase()==="SCRIPT"&&a.src||new URL("chunks/FileUtils-CCBueCSG.cjs",document.baseURI).href).href}catch{return l()}},l=()=>"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1920&h=1080&fit=crop&crop=center",d=e=>{try{return new URL(Object.assign({})[`../assets/images/logos/${e}`],typeof document>"u"?require("url").pathToFileURL(__filename).href:a&&a.tagName.toUpperCase()==="SCRIPT"&&a.src||new URL("chunks/FileUtils-CCBueCSG.cjs",document.baseURI).href).href}catch{return"/images/default-logo.png"}},f=(e,t="common")=>{try{return new URL(Object.assign({})[`../assets/images/icons/${t}/${e}`],typeof document>"u"?require("url").pathToFileURL(__filename).href:a&&a.tagName.toUpperCase()==="SCRIPT"&&a.src||new URL("chunks/FileUtils-CCBueCSG.cjs",document.baseURI).href).href}catch{return`/images/icons/${t}/default.svg`}},w=e=>{try{return new URL(Object.assign({})[`../assets/images/avatars/${e}`],typeof document>"u"?require("url").pathToFileURL(__filename).href:a&&a.tagName.toUpperCase()==="SCRIPT"&&a.src||new URL("chunks/FileUtils-CCBueCSG.cjs",document.baseURI).href).href}catch{return"/images/avatars/default.png"}},u=e=>new Promise((t,r)=>{const s=new Image;s.onload=()=>t(),s.onerror=()=>r(new Error(`Failed to load image: ${e}`)),s.src=e}),m=(e,t,r)=>{const s=new URL(e);return s.searchParams.set("w",t.toString()),s.searchParams.set("h",r.toString()),s.toString()},p=(e,t)=>{const r=new URL(e);return r.searchParams.set("fm",t),r.toString()},I=(e,t)=>t.map(r=>`${m(e,r,r)} ${r}w`).join(", "),U=(e,t={})=>{const r=new URL(e);return t.width&&r.searchParams.set("w",t.width.toString()),t.height&&r.searchParams.set("h",t.height.toString()),t.format&&r.searchParams.set("fm",t.format),t.quality&&r.searchParams.set("q",t.quality.toString()),r.toString()},S=e=>{const t=e.target;t.src="/images/placeholder.png",t.alt="이미지를 불러올 수 없습니다"},R=e=>{const[t,r]=i.useState(!0),[s,o]=i.useState(!1);return i.useEffect(()=>{r(!0),o(!1),u(e).then(()=>r(!1)).catch(()=>{o(!0),r(!1)})},[e]),{isLoading:t,hasError:s}},C=(e,t,r=30)=>{const s=new Date;s.setTime(s.getTime()+r*24*60*60*1e3),document.cookie=`${e}=${t};expires=${s.toUTCString()};path=/`},E=e=>{const t=e+"=",r=document.cookie.split(";");for(let s=0;s<r.length;s++){let o=r[s];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},L=e=>{document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`},y="krx_ui_theme",_=(e,t=3)=>{n.message.success({content:e,duration:t})},c=(e,t=5)=>{n.message.error({content:e,duration:t})},k=(e="처리중...")=>n.message.loading({content:e,duration:0}),$=e=>{n.message.destroy(e)},F=()=>{n.message.destroy()},P=(e,t="처리 중 오류가 발생했습니다.")=>{const r=e?.response?.data?.message||e?.message||t;c(r)},T=(e="저장")=>{_(`${e}이 완료되었습니다.`)},b=(e="저장")=>{c(`${e} 중 오류가 발생했습니다.`)},v=e=>{c(`이미 사용중인 ${e}입니다.`)},q=e=>{c(`${e}을(를) 입력해주세요.`)};async function O(e){try{return await g.callService("SCMFILE00101",{crprCd:g.getUserInfo().crprCd,sysCd:__SYS_CD__,fileKey:e}).then(r=>{let s;if(r.sub&&(s=r.sub[0]),console.log(r),console.log(s),!s.lgclFileNm)throw console.error("논리파일명이 없습니다."),new Error("논리 파일명 누락");if(!s.filePath)throw console.error("파일 경로가 없습니다."),new Error("파일 경로 누락");const o=`api/download?filePath=${encodeURIComponent(s.filePath)}&logicalName=${encodeURIComponent(s.lgclFileNm)}`;return window.open(o,"_blank"),{success:!0,message:"파일 다운로드 요청 성공"}})}catch(t){throw console.error("downloadByFileKey 함수 실행 중 오류 발생:",t),t}}exports.THEME_COOKIE_NAME=y;exports.closeAllMessages=F;exports.closeMessage=$;exports.convertImageFormat=p;exports.deleteCookie=L;exports.downloadByFileKey=O;exports.generateSrcSet=I;exports.getAvatarImage=w;exports.getBackgroundImage=h;exports.getCookie=E;exports.getDefaultBackgroundImage=l;exports.getIconImage=f;exports.getLogoImage=d;exports.getOptimizedImageUrl=U;exports.handleImageError=S;exports.preloadImage=u;exports.resizeImage=m;exports.setCookie=C;exports.showApiError=P;exports.showDuplicateError=v;exports.showLoading=k;exports.showRequiredError=q;exports.showSaveError=b;exports.showSaveSuccess=T;exports.useImageLoader=R;
@@ -0,0 +1,35 @@
1
+ "use strict";const t=require("./jsx-runtime-CeSfJrVB.cjs"),d=require("./AuthContext-CXng9fj0.cjs"),f=require("./ScreenProtectContext-ofv2QgMp.cjs"),u=require("antd"),x=require("react-router-dom"),w=require("./envUtils-CduTHoHu.cjs"),j=require("react"),p="bwg-dot-line-wave-v4";function v(){if(typeof document>"u"||document.getElementById(p))return;const e=document.createElement("style");e.id=p,e.textContent=`
2
+ .bwg-dotline {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: var(--bwg-gap, 12px);
6
+ height: calc(var(--bwg-size, 12px) + 2 * var(--bwg-amp, 12px));
7
+ line-height: 0;
8
+ }
9
+ .bwg-dotline .dot {
10
+ width: var(--bwg-size, 12px);
11
+ height: var(--bwg-size, 12px);
12
+ border-radius: 50%;
13
+ background: currentColor;
14
+ will-change: transform, opacity;
15
+ filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
16
+ animation: bwg-dotline-sine var(--bwg-speed, 780ms) linear infinite;
17
+ }
18
+
19
+ /* sin(θ) 근사: 0, 45, 90, 135, 180, 225, 270, 315, 360deg */
20
+ @keyframes bwg-dotline-sine {
21
+ 0% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
22
+ 12.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
23
+ 25% { transform: translate3d(0, calc(-1 * var(--bwg-amp, 12px)), 0) scale(1.06); opacity: 1; }
24
+ 37.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
25
+ 50% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
26
+ 62.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
27
+ 75% { transform: translate3d(0, calc( 1 * var(--bwg-amp, 12px)), 0) scale(.96); opacity: .76; }
28
+ 87.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
29
+ 100% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
30
+ }
31
+
32
+ @media (prefers-reduced-motion: reduce) {
33
+ .bwg-dotline .dot { animation: none; }
34
+ }
35
+ `,document.head.appendChild(e)}const E=({colors:e=["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],count:r,size:s=12,gap:i=10,amp:m=16,speedMs:l=900,direction:g="ltr",phase:y=.7})=>{j.useEffect(()=>{v()},[]);const a=r??e.length,b=Array.from({length:a}),h={"--bwg-size":`${s}px`,"--bwg-gap":`${i}px`,"--bwg-amp":`${m}px`,"--bwg-speed":`${l}ms`},c=l/a*y;return t.jsxRuntimeExports.jsx("span",{className:"bwg-dotline",role:"img","aria-label":"loading",style:h,children:b.map((D,n)=>t.jsxRuntimeExports.jsx("span",{className:"dot",style:{backgroundColor:e[n%e.length],animationDelay:g==="ltr"?`${n*c}ms`:`${(a-1-n)*c}ms`}},n))})},o=({spin:e=null,text:r="인증중..."})=>{const{busy:s}=d.useAuth();return e??s?t.jsxRuntimeExports.jsxs("div",{style:{position:"fixed",height:"100vh",left:0,right:0,top:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:8,padding:"8px 12px",background:"rgba(0,0,0,0.6)",color:"#fff",zIndex:1e4},"aria-live":"polite","aria-busy":"true",role:"status",children:[t.jsxRuntimeExports.jsx(u.Spin,{indicator:t.jsxRuntimeExports.jsx(E,{colors:["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],size:12,gap:10,amp:16,speedMs:900,phase:.75,direction:"ltr"})}),t.jsxRuntimeExports.jsx("span",{className:"bwg-spin-txt",style:{marginTop:"15px"},children:r})]}):null},R=()=>{const{reauthWithPin:e}=d.useAuth();return t.jsxRuntimeExports.jsx(f.ScreenProtectProvider,{idleMs:30*6e4,onUnlock:async r=>w.isLocal?!0:!!r&&await e(r),children:t.jsxRuntimeExports.jsx(u.ConfigProvider,{getPopupContainer:()=>document.getElementById("app-shell")||document.body,children:t.jsxRuntimeExports.jsxs("div",{id:"app-shell",children:[t.jsxRuntimeExports.jsx(o,{}),t.jsxRuntimeExports.jsx(x.Outlet,{})]})})})},F=()=>t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx(o,{}),t.jsxRuntimeExports.jsx(x.Outlet,{})]});exports.ProgressOverlay=o;exports.ProtectedLayout=R;exports.PublicLayout=F;
@@ -0,0 +1,138 @@
1
+ import { j as e } from "./jsx-runtime-Dpn_P65e.js";
2
+ import { u as p } from "./AuthContext-Ei2P-z4d.js";
3
+ import { S as y } from "./ScreenProtectContext-zByHldrr.js";
4
+ import { Spin as h, ConfigProvider as w } from "antd";
5
+ import { Outlet as d } from "react-router-dom";
6
+ import { i as v } from "./envUtils-C9Gf5aek.js";
7
+ import { useEffect as j } from "react";
8
+ const c = "bwg-dot-line-wave-v4";
9
+ function F() {
10
+ if (typeof document > "u" || document.getElementById(c)) return;
11
+ const t = document.createElement("style");
12
+ t.id = c, t.textContent = `
13
+ .bwg-dotline {
14
+ display: inline-flex;
15
+ align-items: center;
16
+ gap: var(--bwg-gap, 12px);
17
+ height: calc(var(--bwg-size, 12px) + 2 * var(--bwg-amp, 12px));
18
+ line-height: 0;
19
+ }
20
+ .bwg-dotline .dot {
21
+ width: var(--bwg-size, 12px);
22
+ height: var(--bwg-size, 12px);
23
+ border-radius: 50%;
24
+ background: currentColor;
25
+ will-change: transform, opacity;
26
+ filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
27
+ animation: bwg-dotline-sine var(--bwg-speed, 780ms) linear infinite;
28
+ }
29
+
30
+ /* sin(θ) 근사: 0, 45, 90, 135, 180, 225, 270, 315, 360deg */
31
+ @keyframes bwg-dotline-sine {
32
+ 0% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
33
+ 12.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
34
+ 25% { transform: translate3d(0, calc(-1 * var(--bwg-amp, 12px)), 0) scale(1.06); opacity: 1; }
35
+ 37.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
36
+ 50% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
37
+ 62.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
38
+ 75% { transform: translate3d(0, calc( 1 * var(--bwg-amp, 12px)), 0) scale(.96); opacity: .76; }
39
+ 87.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
40
+ 100% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
41
+ }
42
+
43
+ @media (prefers-reduced-motion: reduce) {
44
+ .bwg-dotline .dot { animation: none; }
45
+ }
46
+ `, document.head.appendChild(t);
47
+ }
48
+ const D = ({
49
+ colors: t = ["#DAD3FF", "#B3A6FF", "#9380FF", "#816BFA"],
50
+ count: a,
51
+ size: n = 12,
52
+ gap: o = 10,
53
+ amp: g = 16,
54
+ speedMs: i = 900,
55
+ direction: u = "ltr",
56
+ phase: x = 0.7
57
+ }) => {
58
+ j(() => {
59
+ F();
60
+ }, []);
61
+ const s = a ?? t.length, f = Array.from({ length: s }), b = {
62
+ "--bwg-size": `${n}px`,
63
+ "--bwg-gap": `${o}px`,
64
+ "--bwg-amp": `${g}px`,
65
+ "--bwg-speed": `${i}ms`
66
+ }, l = i / s * x;
67
+ return /* @__PURE__ */ e.jsx("span", { className: "bwg-dotline", role: "img", "aria-label": "loading", style: b, children: f.map((P, r) => /* @__PURE__ */ e.jsx(
68
+ "span",
69
+ {
70
+ className: "dot",
71
+ style: {
72
+ backgroundColor: t[r % t.length],
73
+ animationDelay: u === "ltr" ? `${r * l}ms` : `${(s - 1 - r) * l}ms`
74
+ }
75
+ },
76
+ r
77
+ )) });
78
+ }, m = ({ spin: t = null, text: a = "인증중..." }) => {
79
+ const { busy: n } = p();
80
+ return t ?? n ? /* @__PURE__ */ e.jsxs(
81
+ "div",
82
+ {
83
+ style: {
84
+ position: "fixed",
85
+ height: "100vh",
86
+ left: 0,
87
+ right: 0,
88
+ top: 0,
89
+ display: "flex",
90
+ flexDirection: "column",
91
+ justifyContent: "center",
92
+ alignItems: "center",
93
+ gap: 8,
94
+ padding: "8px 12px",
95
+ background: "rgba(0,0,0,0.6)",
96
+ color: "#fff",
97
+ zIndex: 1e4
98
+ },
99
+ "aria-live": "polite",
100
+ "aria-busy": "true",
101
+ role: "status",
102
+ children: [
103
+ /* @__PURE__ */ e.jsx(
104
+ h,
105
+ {
106
+ indicator: /* @__PURE__ */ e.jsx(
107
+ D,
108
+ {
109
+ colors: ["#DAD3FF", "#B3A6FF", "#9380FF", "#816BFA"],
110
+ size: 12,
111
+ gap: 10,
112
+ amp: 16,
113
+ speedMs: 900,
114
+ phase: 0.75,
115
+ direction: "ltr"
116
+ }
117
+ )
118
+ }
119
+ ),
120
+ /* @__PURE__ */ e.jsx("span", { className: "bwg-spin-txt", style: { marginTop: "15px" }, children: a })
121
+ ]
122
+ }
123
+ ) : null;
124
+ }, B = () => {
125
+ const { reauthWithPin: t } = p();
126
+ return /* @__PURE__ */ e.jsx(y, { idleMs: 30 * 6e4, onUnlock: async (a) => v ? !0 : !!a && await t(a), children: /* @__PURE__ */ e.jsx(w, { getPopupContainer: () => document.getElementById("app-shell") || document.body, children: /* @__PURE__ */ e.jsxs("div", { id: "app-shell", children: [
127
+ /* @__PURE__ */ e.jsx(m, {}),
128
+ /* @__PURE__ */ e.jsx(d, {})
129
+ ] }) }) });
130
+ }, $ = () => /* @__PURE__ */ e.jsxs("div", { children: [
131
+ /* @__PURE__ */ e.jsx(m, {}),
132
+ /* @__PURE__ */ e.jsx(d, {})
133
+ ] });
134
+ export {
135
+ m as P,
136
+ B as a,
137
+ $ as b
138
+ };