@bwg-ui/core 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{CMSearchIntfGwP01-CuGDAfFM.cjs → CMSearchIntfGwP01-0t3umcc_.cjs} +1 -1
- package/dist/chunks/{CMSearchIntfGwP01-DBpDpgQr.js → CMSearchIntfGwP01-DCHZJn2H.js} +1 -1
- package/dist/chunks/{MenuReport-yw8tZDUk.cjs → MenuReport-C70mGz2g.cjs} +1 -1
- package/dist/chunks/{MenuReport-CCbCy7yt.js → MenuReport-IBdoU2S3.js} +2 -2
- package/dist/chunks/common-components-DNgQR-Ge.cjs +1109 -0
- package/dist/chunks/{common-components-DtzVj5lz.js → common-components-DeYL3J6X.js} +13058 -13574
- package/dist/chunks/layout-components-Bf9IsLUS.cjs +38 -0
- package/dist/chunks/{layout-components-ljht1sHh.js → layout-components-DnuV2Psp.js} +831 -759
- package/dist/chunks/provider-Bi5OYngn.cjs +1 -0
- package/dist/chunks/{provider-Kxea5IoZ.js → provider-Bx4VpaFf.js} +90 -74
- package/dist/components/common/BwgGrid.d.ts +31 -8
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgEmpSearch.d.ts +2 -2
- package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedDate.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedRange.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +211 -208
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +2 -2
- package/dist/components/layout/AppWrapper.d.ts +5 -1
- package/dist/components/layout/AppWrapper.d.ts.map +1 -1
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +273 -271
- package/dist/provider/contexts/PageContentContext.d.ts +23 -0
- package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
- package/dist/provider/contexts/index.d.ts +1 -0
- package/dist/provider/contexts/index.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +21 -19
- package/dist/public/realgrid/css/realgrid-style-custom.css +6 -10
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/styles/assets/images/backgrounds/kiam_login_bg.png +0 -0
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/components_02.css +35 -0
- package/dist/styles/global.css +9 -1
- package/dist/styles/index.css +3 -0
- package/dist/styles/layout.css +14 -4
- package/dist/styles/layout_02.css +99 -0
- package/dist/styles/login.css +7 -44
- package/dist/styles/login_02.css +35 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +16 -22
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1253 -1222
- package/dist/utils/messageUtils.d.ts +36 -48
- package/dist/utils/messageUtils.d.ts.map +1 -1
- package/dist/utils/modalUtils.d.ts +68 -0
- package/dist/utils/modalUtils.d.ts.map +1 -0
- package/dist/utils/notificationUtils.d.ts +50 -41
- package/dist/utils/notificationUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/common-components-CbkWoYfX.cjs +0 -1111
- package/dist/chunks/layout-components-BzLAGXiu.cjs +0 -38
- package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),z=require("./provider-Bi5OYngn.cjs"),a=require("react"),O=require("react-router-dom"),te=require("./common-components-DNgQR-Ge.cjs"),V=require("../utils/index.cjs"),o=require("antd"),P=require("../stores/index.cjs"),E=require("@ant-design/icons"),q=require("@dnd-kit/core"),xe=require("@dnd-kit/modifiers"),Z=require("@dnd-kit/sortable");var Q=typeof document<"u"?document.currentScript:null;function fe(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const Y=fe(E),be=a.lazy(()=>Promise.resolve().then(()=>require("./MenuReport-C70mGz2g.cjs"))),ye=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchDepartmentP01$1)),je=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchDepartmentP02$1)),Ce=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchOrganizationP01$1)),we=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchOrganizationP02$1)),ve=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.CMPrgrMstrP02$1)),ke=a.lazy(()=>Promise.resolve().then(()=>require("./CMSearchIntfGwP01-0t3umcc_.cjs"))),Se=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchAddressP01$1)),Pe=a.lazy(()=>Promise.resolve().then(()=>require("./common-components-DNgQR-Ge.cjs")).then(n=>n.SearchHolidayP01$1)),ie={CORE_REPORT:{component:be,defaultConfig:{title:"게시판/문의",width:1200,height:800}},CORE_DEPARTMENT_01:{component:ye,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_DEPARTMENT_02:{component:je,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_ORGANIZATION_01:{component:Ce,defaultConfig:{title:"조직 검색",width:620,height:700}},CORE_ORGANIZATION_02:{component:we,defaultConfig:{title:"조직 검색",width:1e3,height:700}},CORE_PRGR_02:{component:ve,defaultConfig:{title:"프로그램 검색",width:700,height:800}},CORE_GW_DRAFTS:{component:ke,defaultConfig:{title:"기안 목록",width:1e3,height:700}},CORE_ADDRESS_01:{component:Se,defaultConfig:{title:"주소 검색",width:750,height:800}},CORE_HOLIDAY_01:{component:Pe,defaultConfig:{title:"휴일 검색",width:750,height:800}}},se="bwg-dot-line-wave-v4";function Ne(){if(typeof document>"u"||document.getElementById(se))return;const n=document.createElement("style");n.id=se,n.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(n)}const Me=({colors:n=["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],count:t,size:r=12,gap:s=10,amp:l=16,speedMs:c=900,direction:x="ltr",phase:d=.7})=>{a.useEffect(()=>{Ne()},[]);const p=t??n.length,b=Array.from({length:p}),f={"--bwg-size":`${r}px`,"--bwg-gap":`${s}px`,"--bwg-amp":`${l}px`,"--bwg-speed":`${c}ms`},N=c/p*d;return e.jsx("span",{className:"bwg-dotline",role:"img","aria-label":"loading",style:f,children:b.map((g,h)=>e.jsx("span",{className:"dot",style:{backgroundColor:n[h%n.length],animationDelay:x==="ltr"?`${h*N}ms`:`${(p-1-h)*N}ms`}},h))})},Ie=({spin:n=null,text:t="인증중...",dimStyle:r="dark"})=>{if(!(n??!0))return null;const c=r==="dark";return e.jsxs("div",{className:"loading-overlay",style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:8,padding:"8px 12px",background:c?"rgba(0, 0, 0, 0.6)":"rgba(255, 255, 255, 0.85)",color:c?"#fff":"#333",backdropFilter:"blur(4px)",zIndex:1e4},"aria-live":"polite","aria-busy":"true",role:"status",children:[e.jsx(o.Spin,{indicator:e.jsx(Me,{colors:["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],size:12,gap:10,amp:16,speedMs:900,phase:.75,direction:"ltr"})}),e.jsx("span",{className:"bwg-spin-txt",style:{marginTop:"15px"},children:t})]})},Le=({routes:n,useCommonProvider:t=!0,useServiceProvider:r=!0,modalStyle:s,notificationStyle:l,messageStyle:c})=>{a.useEffect(()=>{s&&V.setGlobalModalStyle(s)},[s]),a.useEffect(()=>{l&&V.setGlobalNotificationStyle(l)},[l]),a.useEffect(()=>{c&&V.setGlobalMessageStyle(c)},[c]);let d=e.jsxs(O.Routes,{children:[e.jsx(O.Route,{path:"/",element:e.jsx(O.Navigate,{to:"/login"})}),e.jsx(O.Route,{path:"/ssoLogin",element:n.ssoLogin}),e.jsx(O.Route,{path:"/login",element:n.login}),e.jsx(O.Route,{path:"/main/*",element:n.main}),e.jsx(O.Route,{path:"/sessionNotice",element:n.sessionNotice})]});return r&&(d=e.jsx(z.ServiceCodeProvider,{children:d})),t&&(d=e.jsx(z.CommonCodeProvider,{children:d})),e.jsx(te.GlobalConfigProvider,{children:d})},{Content:Te}=o.Layout,ne=({config:n={},children:t})=>{const r={wrapper:{className:"content-wrapper",...n.wrapper},body:{className:"content-body",...n.body},...n};return e.jsx(Te,{className:r.wrapper.className,style:r.wrapper.style,children:e.jsx(te.BwgConfigProvider,{children:e.jsx("div",{className:r.body.className,style:r.body.style,children:t})})})},Be="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.9998%2019.9993V20.9993C11.9998%2021.3932%2012.0774%2021.7833%2012.2282%2022.1473C12.3789%2022.5112%2012.5999%2022.8419%2012.8785%2023.1205C13.157%2023.399%2013.4877%2023.62%2013.8517%2023.7708C14.2156%2023.9215%2014.6057%2023.9991%2014.9997%2023.9991C15.3936%2023.9991%2015.7837%2023.9215%2016.1477%2023.7708C16.5116%2023.62%2016.8423%2023.399%2017.1209%2023.1205C17.3994%2022.8419%2017.6204%2022.5112%2017.7712%2022.1473C17.9219%2021.7833%2017.9995%2021.3932%2017.9995%2020.9993V19.9993M20.9994%2011.9997C20.9994%2014.9996%2022.9993%2019.9993%2022.9993%2019.9993H7.00006C7.00006%2019.9993%208.99996%2015.9995%208.99996%2011.9997C8.99996%208.73187%2011.7318%206%2014.9997%206C18.2675%206%2020.9994%208.73187%2020.9994%2011.9997Z'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ee="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_93_4488)'%3e%3cpath%20d='M18%207H21C22.1046%207%2023%207.89543%2023%209V21C23%2022.1046%2022.1046%2023%2021%2023H18M11%2011L7%2015M7%2015L11%2019M7%2015L19%2015'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_93_4488'%3e%3crect%20width='30'%20height='30'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Re="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%206H16C16.5523%206%2017%206.44772%2017%207V7.56879C17%207.99659%2017.2871%208.36825%2017.6822%208.53228C18.0775%208.69638%2018.5377%208.63384%2018.8403%208.33123L19.2426%207.92891C19.6331%207.53838%2020.2663%207.53838%2020.6568%207.92891L22.071%209.34312C22.4616%209.73365%2022.4615%2010.3668%2022.071%2010.7573L21.6688%2011.1596C21.3661%2011.4622%2021.3036%2011.9225%2021.4677%2012.3177C21.6317%2012.7129%2022.0034%2013%2022.4313%2013L23%2013C23.5523%2013%2024%2013.4477%2024%2014V16C24%2016.5523%2023.5523%2017%2023%2017H22.4312C22.0034%2017%2021.6318%2017.2871%2021.4677%2017.6822C21.3036%2018.0775%2021.3661%2018.5377%2021.6688%2018.8403L22.071%2019.2426C22.4616%2019.6331%2022.4616%2020.2663%2022.071%2020.6568L20.6568%2022.071C20.2663%2022.4616%2019.6331%2022.4616%2019.2426%2022.071L18.8403%2021.6688C18.5377%2021.3661%2018.0775%2021.3036%2017.6822%2021.4677C17.2871%2021.6318%2017%2022.0034%2017%2022.4312V23C17%2023.5523%2016.5523%2024%2016%2024H14C13.4477%2024%2013%2023.5523%2013%2023V22.4313C13%2022.0034%2012.7129%2021.6317%2012.3177%2021.4677C11.9225%2021.3036%2011.4622%2021.3661%2011.1596%2021.6688L10.7573%2022.071C10.3668%2022.4616%209.73363%2022.4616%209.34311%2022.071L7.92889%2020.6568C7.53837%2020.2663%207.53837%2019.6331%207.92889%2019.2426L8.33123%2018.8403C8.63384%2018.5377%208.69638%2018.0775%208.53228%2017.6822C8.36825%2017.2871%207.99659%2017%207.56879%2017H7C6.44772%2017%206%2016.5523%206%2016V14C6%2013.4477%206.44772%2013%207%2013L7.56877%2013C7.99658%2013%208.36825%2012.7129%208.53229%2012.3178C8.6964%2011.9225%208.63386%2011.4623%208.33123%2011.1597L7.92891%2010.7573C7.53838%2010.3668%207.53838%209.73365%207.92891%209.34313L9.34312%207.92891C9.73365%207.53839%2010.3668%207.53839%2010.7573%207.92891L11.1597%208.33123C11.4623%208.63386%2011.9225%208.6964%2012.3178%208.53229C12.7129%208.36825%2013%207.99658%2013%207.56876V7C13%206.44772%2013.4477%206%2014%206Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3cpath%20d='M17%2015C17%2016.1046%2016.1046%2017%2015%2017C13.8954%2017%2013%2016.1046%2013%2015C13%2013.8954%2013.8954%2013%2015%2013C16.1046%2013%2017%2013.8954%2017%2015Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3c/svg%3e",{Header:De}=o.Layout,{confirm:Oe}=o.Modal,K={light:{headerBg:"#ffffff",headerText:"#000000",sidebarBg:"#ffffff",sidebarText:"#000000",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#d9d9d9",buttonPermissionBorder:"#bdb1ff"},dark:{headerBg:"#4a4a4a",headerText:"#ffffff",sidebarBg:"#4a4a4a",sidebarText:"#ffffff",buttonPrimary:"#177ddc",buttonPrimaryHover:"#1890ff",buttonPrimaryActive:"#0958b5",buttonDefault:"#434343",buttonDefaultHover:"#303030",buttonDefaultBorder:"#434343",buttonPermissionBorder:"#bdb1ff"},blue:{headerBg:"#4a90e2",headerText:"#ffffff",sidebarBg:"#4a90e2",sidebarText:"#ffffff",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f0f8ff",buttonDefaultBorder:"#4a90e2",buttonPermissionBorder:"#bdb1ff"},modern:{headerBg:"#f3f4ff",headerText:"#333333",sidebarBg:"#ffffff",sidebarText:"#555555",buttonPrimary:"#6449FC",buttonPrimaryHover:"#6449FC",buttonPrimaryActive:"#6449FC",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#dddddd",buttonPermissionBorder:"#bdb1ff"}},J={0:"작게",1:"보통",2:"크게"},re=({config:n={},children:t})=>{const r={gap:14,minWidth:200,items:n.right?.items,alarm:{visible:!0,...n.right?.alarm||{}},theme:{visible:!0,...n.right?.theme||{}},logout:{visible:!0,...n.right?.logout||{}},avatar:{visible:!0,width:30,height:30,...n.right?.avatar||{}}},s={wrapper:{className:"header-wrapper",...n.wrapper},logo:{gap:10,...n.logo},right:r},l=O.useNavigate(),c=a.useRef(null),x=P.useLogout(()=>l("/login",{replace:!0})),{componentSize:d,setComponentSize:p,gridSize:b,setGridSize:f,spacingSize:N,setSpacingSize:g,enableProtectWrapper:h,setEnableProtectWrapper:I,theme:y,setTheme:u,clearAllGridLayouts:m}=P.useUserStore(),M=1,R=2,D=2,k=(j,L)=>{try{if(!/^[a-zA-Z0-9-]+$/.test(j)||!/^[#a-zA-Z0-9()\s,.-]+$/.test(L))return;document.documentElement.style.setProperty(j,L)}catch(v){console.error("CSS variable setting failed:",v)}},A=j=>{if(!K[j])return;u(j);const L={...K[j]};k("--header-bg",L.headerBg),k("--header-text",L.headerText),k("--sidebar-bg",L.sidebarBg),k("--sidebar-text",L.sidebarText),k("--button-primary",L.buttonPrimary),k("--button-primary-hover",L.buttonPrimaryHover),k("--button-primary-active",L.buttonPrimaryActive),k("--button-default",L.buttonDefault),k("--button-default-hover",L.buttonDefaultHover),k("--button-default-border",L.buttonDefaultBorder),k("--button-permission-border",L.buttonPermissionBorder),c.current&&c.current.setAttribute("data-theme",j),document.documentElement.setAttribute("data-theme",j)};a.useEffect(()=>{if(y&&K[y]){const j={...K[y]};k("--header-bg",j.headerBg),k("--header-text",j.headerText),k("--sidebar-bg",j.sidebarBg),k("--sidebar-text",j.sidebarText),k("--button-primary",j.buttonPrimary),k("--button-primary-hover",j.buttonPrimaryHover),k("--button-primary-active",j.buttonPrimaryActive),k("--button-default",j.buttonDefault),k("--button-default-hover",j.buttonDefaultHover),k("--button-default-border",j.buttonDefaultBorder),k("--button-permission-border",j.buttonPermissionBorder),c.current&&c.current.setAttribute("data-theme",y),document.documentElement.setAttribute("data-theme",y)}else A("modern")},[y]);const W=()=>{x()},_=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("g",{clipPath:"url(#clip0_1424_1089)",children:e.jsx("path",{d:"M15.1801 12.13C14.7801 13.25 14.0401 14.22 13.0401 14.87C12.0501 15.53 10.8701 15.85 9.68009 15.78C8.49009 15.71 7.36009 15.26 6.45009 14.49C5.54009 13.72 4.91009 12.68 4.64009 11.52C4.38009 10.36 4.50009 9.14996 4.98009 8.05996C5.47009 6.96996 6.29009 6.07996 7.33009 5.49996C8.37009 4.91996 9.57009 4.69996 10.7501 4.86996C12.7401 5.14996 14.0501 6.58996 15.4701 7.85996M15.4901 4.20996V7.86996H11.8301",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1424_1089",children:e.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});V.getTodateString?V.getTodateString("HH:mm:ss"):new Date().toLocaleTimeString("ko-KR");const G=e.jsxs("div",{className:"theme-setting-popover",style:{minWidth:"320px"},children:[e.jsxs("div",{style:{padding:"10px",backgroundColor:"#f5f6fb",borderRadius:"6px",marginBottom:"20px"},children:[e.jsx("div",{className:"sub-title",style:{marginBottom:10},children:"테마 선택"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"right",gap:"10px"},children:[e.jsx(o.Button,{className:`theme-swatch-btn theme-swatch-modern ${y==="modern"?"active":""}`,type:"text",size:"small",onClick:()=>A("modern")},"modern"),Object.entries(K).filter(([j])=>j!=="modern").map(([j,L])=>e.jsx(o.Button,{className:`theme-swatch-btn theme-swatch-${j} ${y===j?"active":""}`,type:"text",size:"small",onClick:()=>A(j)},j))]})]}),e.jsxs(o.ConfigProvider,{theme:{components:{Slider:{dotActiveBorderColor:"var(--primary-color)",dotBorderColor:"#d9d9d9",dotSize:8,handleActiveColor:"var(--primary-color)",handleActiveOutlineColor:"rgba(var(--primary-color-rgb),0.2)",handleLineWidth:0,handleSize:12,railBg:"#e0e2e5",trackBg:"var(--primary-color)",trackHoverBg:"var(--button-solid-hover)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"}}},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,padding:"0 10px"},children:[e.jsxs("div",{children:[e.jsxs(o.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"컴포넌트 크기"}),e.jsx(o.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(_,{}),onClick:()=>p(M),disabled:d===M,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(o.Slider,{className:"theme-ctrl-slider",marks:J,value:d,min:0,max:2,step:1,onChange:j=>p(j)})]}),e.jsxs("div",{children:[e.jsxs(o.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"그리드 크기"}),e.jsx(o.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(_,{}),onClick:()=>f(R),disabled:b===R,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(o.Slider,{className:"theme-ctrl-slider",marks:J,value:b,min:0,max:2,step:1,onChange:j=>f(j)})]}),e.jsxs("div",{children:[e.jsxs(o.Flex,{justify:"space-between",align:"center",children:[e.jsx("span",{className:"sub-title",children:"여백 조정"}),e.jsx(o.Button,{className:"bwg-btn",type:"text",size:"small",icon:e.jsx(_,{}),onClick:()=>g(D),disabled:N===D,style:{padding:"0",gap:"3px",height:"20px",lineHeight:"20px"},children:"초기화"})]}),e.jsx(o.Slider,{className:"theme-ctrl-slider",marks:J,value:N,min:0,max:2,step:1,onChange:j=>g(j)})]})]}),e.jsx(o.Divider,{style:{margin:"20px 0 15px",borderBlockStart:"1px solid #dddddd"}}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0 10px"},children:[e.jsx("span",{className:"sub-title",children:"화면 보호 활성화"}),e.jsx(o.Switch,{checked:h,onChange:I})]})]}),e.jsx(o.Divider,{style:{margin:"15px 0 20px",borderBlockStart:"1px solid #dddddd"}}),e.jsx("div",{style:{textAlign:"right"},children:e.jsx(o.Button,{className:"bwg-btn",type:"default",size:"small",icon:e.jsx(_,{}),onClick:()=>{Oe({title:"전체 그리드 레이아웃 초기화",content:"임의 변경한 그리드 레이아웃 변경사항을 초기화하시겠습니까? 기존 열려있는 화면들은 다시 열어야 적용됩니다.",onOk(){m()}})},children:"전체 그리드 레이아웃 초기화"})})]});return e.jsxs(De,{className:s.wrapper.className,style:{...s.wrapper.style},children:[s.logo&&e.jsx("div",{className:"header-left",children:e.jsx("div",{className:"logo-container",style:{gap:s.logo?.gap},children:s.logo?.items})}),t&&e.jsx("div",{className:"header-center top-menu-wrap",style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"},children:t}),e.jsxs("div",{className:"header-right",style:{gap:s.right?.gap,minWidth:s.right?.minWidth},children:[s.right?.items?.map((j,L)=>e.jsx("div",{children:j},L)),s.right?.alarm?.visible&&e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:Be,alt:"알림"}),className:"alarm-btn",onClick:s.right?.alarm?.onClick}),s.right?.theme?.visible&&e.jsx(o.Popover,{content:G,title:e.jsx("span",{style:{display:"inline-block",fontSize:16,color:"var(--text-primary)",lineHeight:"30px",marginBottom:"2px"},children:"개인 설정"}),trigger:"click",placement:"bottomRight",onOpenChange:j=>s.right?.theme?.onOpenChange?.(j),children:e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:Re,alt:"개인설정"}),className:"theme-btn",onClick:s.right?.theme?.onClick})}),s.right?.logout?.visible&&e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:Ee,alt:"로그아웃"}),onClick:s.right?.logout?.onClick||W,className:"logout-btn"}),s.right?.avatar?.visible&&e.jsx(o.Avatar,{icon:e.jsx(E.UserOutlined,{}),className:"avatar",style:{width:s.right?.avatar?.width,height:s.right?.avatar?.height},onClick:s.right?.avatar?.onClick})]})]})},ee=Object.freeze({Translate:{toString(n){if(!n)return;const{x:t,y:r}=n;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:t,scaleY:r}=n;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(n){if(n)return[ee.Translate.toString(n),ee.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:t,duration:r,easing:s}=n;return t+" "+r+"ms "+s}}}),_e=a.memo(({className:n,...t})=>{const r=a.useRef(null),{attributes:s,listeners:l,transform:c,transition:x,isDragging:d,setNodeRef:p}=Z.useSortable({id:t["data-node-key"]}),[b,f]=a.useState();a.useEffect(()=>{const m=r.current;if(m)if(d){const M=Math.round(m.getBoundingClientRect().width);f(M)}else f(void 0)},[d]);const N={...t.style,transform:c?ee.Transform.toString(c):void 0,transition:x??"transform 0.16s ease",cursor:"grab",userSelect:"none",willChange:"transform",width:b??void 0,minWidth:b??void 0,maxWidth:b??void 0,flex:b!==void 0?"0 0 auto":void 0},g=t.children,h=g.props?.className||"",u=t["data-gubun"]==="C"?h?`${h} tab-special`:"tab-special":h;return a.cloneElement(g,{ref:m=>{r.current!==m&&(r.current=m),p(m)},className:u,style:N,...s,...l})}),ze=a.memo(function({config:t,isFirst:r,isLast:s,canCloseAll:l,onFirst:c,onPrev:x,onNext:d,onLast:p,onCloseAll:b}){return e.jsxs("div",{className:t.wrapper?.className,style:t.wrapper?.style,children:[e.jsx(o.Tooltip,{title:"첫 번째 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(E.StepBackwardOutlined,{}),onClick:c,disabled:r})}),e.jsx(o.Tooltip,{title:"이전 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(E.LeftOutlined,{}),onClick:x,disabled:r})}),e.jsx(o.Tooltip,{title:"다음 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(E.RightOutlined,{}),onClick:d,disabled:s})}),e.jsx(o.Tooltip,{title:"마지막 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(E.StepForwardOutlined,{}),onClick:p,disabled:s})}),e.jsx(o.Tooltip,{title:"모든 탭 닫기",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(E.CloseOutlined,{}),onClick:b,disabled:!l})})]})}),ae=({config:n={}})=>{const t={wrapper:{className:"menu-tab-wrapper",...n?.wrapper},tabs:{className:"menu-tabs",...n?.tabs},nav:{wrapper:{className:"menu-nav-wrapper",...n?.nav?.wrapper},buttons:{className:"menu-nav-buttons",...n?.nav?.buttons},tooltip:{className:"menu-nav-tooltip",...n?.nav?.tooltip},...n?.nav},...n},r=P.useMenuViewStore(i=>i.tabs),s=P.useMenuViewStore(i=>i.activeMenuId),l=P.useMenuViewStore(i=>i.pinnedTabs),c=P.useMenuViewStore(i=>i.focusTab),x=P.useMenuViewStore(i=>i.closeTab),d=P.useMenuViewStore(i=>i.reorderTabs),p=P.useMenuViewStore(i=>i.togglePinTab),b=P.useMenuViewStore(i=>i.refreshTab),f=P.useMenuViewStore(i=>i.closeOtherTabs),N=P.useMenuViewStore(i=>i.closeRightTabs);P.useMenuViewStore(i=>i.closeAllTabs);const g=q.useSensors(q.useSensor(q.PointerSensor,{activationConstraint:{distance:6}})),h=i=>{c(i)},I=(i,w)=>{w==="remove"&&typeof i=="string"&&x(i)},y=()=>{r.length>0&&c(r[0].key)},u=()=>{if(!s||r.length<=1)return;const i=r.findIndex(w=>w.key===s);i>0&&c(r[i-1].key)},m=()=>{if(!s||r.length<=1)return;const i=r.findIndex(w=>w.key===s);i<r.length-1&&c(r[i+1].key)},M=()=>{r.length>0&&c(r[r.length-1].key)},R=()=>{r.forEach(i=>{l.has(i.key)||x(i.key)})},D=a.useCallback(i=>w=>{w.preventDefault(),w.stopPropagation()},[]),k=a.useCallback(i=>{const w=l.has(i),T=r.findIndex(U=>U.key===i),B=T>=0&&T<r.length-1,F=r.length>1;return[{key:"close",label:"닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsx("g",{"clip-path":"url(#clip0_1409_1182)",children:e.jsx("path",{d:"M16.2 5.80005L5.79004 16.21M5.80004 5.80005L16.21 16.21",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1182",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{w||x(i)},disabled:w},{key:"pin",label:w?"고정 해제":"고정",icon:w?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1222)",children:[e.jsx("path",{d:"M8.19998 8.28992C7.38998 8.41992 6.60998 8.78992 5.97998 9.41992L12.58 16.0199C13.2 15.3999 13.57 14.6299 13.7 13.8199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M13.7601 10.9099L16.2101 8.45993L13.5501 5.79993L11.1001 8.24993",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M5.27979 5.27991L16.7198 16.7199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1222",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1186)",children:[e.jsx("path",{d:"M13.32 11.3399L16.2 8.45993L13.54 5.79993L10.66 8.67993C9.13998 7.91993 7.24998 8.15993 5.97998 9.41993L12.58 16.0199C13.85 14.7499 14.08 12.8599 13.32 11.3399Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1186",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{p(i)}},{key:"refresh",label:"새로고침",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsx("g",{"clip-path":"url(#clip0_1409_1193)",children:e.jsx("path",{d:"M16.1801 13.13C15.7801 14.25 15.0401 15.22 14.0401 15.87C13.0501 16.53 11.8701 16.85 10.6801 16.78C9.49009 16.71 8.36009 16.26 7.45009 15.49C6.54009 14.72 5.91009 13.68 5.64009 12.52C5.38009 11.36 5.50009 10.15 5.98009 9.05996C6.47009 7.96996 7.29009 7.07996 8.33009 6.49996C9.37009 5.91996 10.5701 5.69996 11.7501 5.86996C13.7401 6.14996 15.0501 7.58996 16.4701 8.85996M16.4901 5.20996V8.86996H12.8301",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1193",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{b(i)}},{type:"divider"},{key:"closeOthers",label:"다른 탭 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1197)",children:[e.jsx("path",{d:"M4.52979 5.74005V16.2601C4.52979 16.7101 4.88979 17.0701 5.33979 17.0701H16.6698C17.1198 17.0701 17.4798 16.7101 17.4798 16.2601V8.17005C17.4798 7.72005 17.1198 7.36005 16.6698 7.36005H12.6898C12.3898 7.36005 12.1098 7.23005 11.9198 7.00005L10.4398 5.22005C10.2898 5.04005 10.0598 4.93005 9.81978 4.93005H5.33979C4.88979 4.93005 4.52979 5.29005 4.52979 5.74005Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M13.3598 7.36011H4.52979",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.7897 10.4301L9.19971 14.0201M9.20971 10.4301L12.7997 14.0201",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1197",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{f(i)},disabled:!F},{key:"closeRight",label:"우측 탭 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1204)",children:[e.jsx("path",{d:"M16.3402 10.53V16.51C16.3402 17.05 15.9302 17.49 15.4302 17.49H5.40023C4.90023 17.49 4.49023 17.05 4.49023 16.51V7.73C4.49023 7.19 4.90023 6.75 5.40023 6.75H10.1702",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.33 11.4301L8.5 15.2601M8.5 11.4301L12.33 15.2601",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.1699 6.76001H17.4199",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M17.4201 6.75996L15.3701 4.70996",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M17.4201 6.76001L15.3701 8.81001",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M4.49023 8.90002H13.3402",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1204",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{N(i)},disabled:!B},{key:"closeAll",label:"전체 닫기",icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1409_1215)",children:[e.jsx("path",{d:"M14.8405 10.15L10.2305 14.76M10.2305 10.15L14.8405 14.76",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M16.5101 7.47998H8.56006C8.00777 7.47998 7.56006 7.9277 7.56006 8.47998V16.43C7.56006 16.9823 8.00777 17.43 8.56006 17.43H16.5101C17.0623 17.43 17.5101 16.9823 17.5101 16.43V8.47998C17.5101 7.9277 17.0623 7.47998 16.5101 7.47998Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M5.53023 14.81C4.95023 14.81 4.49023 14.34 4.49023 13.77V5.89999C4.49023 5.31999 4.96023 4.85999 5.53023 4.85999H13.4002C13.9802 4.85999 14.4402 5.32999 14.4402 5.89999",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1409_1215",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),onClick:()=>{R()},disabled:r.length===0}]},[r,l,x,p,b,f,N]),A=s?r.findIndex(i=>i.key===s):-1,W=A===0,_=A===r.length-1,G=a.useMemo(()=>r.map(i=>{const w=l.has(i.key);return{key:i.key,label:e.jsxs("span",{className:"menu-tabs-text",style:{position:"relative"},children:[w&&e.jsxs("svg",{className:"tabs-pin-icon",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[e.jsxs("g",{"clip-path":"url(#clip0_1413_1595)",children:[e.jsx("path",{d:"M13.32 11.3399L16.2 8.45993L13.54 5.79993L10.66 8.67993C9.13998 7.91993 7.24998 8.15993 5.97998 9.41993L12.58 16.0199C13.85 14.7499 14.08 12.8599 13.32 11.3399Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M12.4502 4.70996L17.2902 9.54996",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("path",{d:"M9.27996 12.72L4.70996 17.29",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_1413_1595",children:e.jsx("rect",{width:"22",height:"22",fill:"white"})})})]}),i.label]}),closable:!w,children:null}}),[r,l]),[j,L]=a.useState(null),v=a.useCallback(({active:i})=>{L(null)},[]),S=a.useCallback(({active:i,over:w})=>{if(!w||i.id===w.id)return;const T=r.findIndex(H=>H.key===i.id),B=r.findIndex(H=>H.key===w.id);if(T<0||B<0||T===B)return;const F=r.map(H=>H.key),U=Z.arrayMove(F,T,B);d?.(U)},[r,d]),C=a.useCallback((i,w)=>e.jsx(q.DndContext,{sensors:g,onDragStart:v,onDragEnd:S,collisionDetection:q.closestCenter,modifiers:[xe.restrictToHorizontalAxis],children:e.jsx(Z.SortableContext,{items:r.map(T=>T.key),strategy:Z.horizontalListSortingStrategy,children:e.jsx(w,{...i,children:T=>{const B=T.key,F=j===B,H=r.find(X=>X.key===B)?.gubun;return e.jsx(o.Dropdown,{rootClassName:"menu-tabs-dropdown",menu:{items:k(B)},trigger:["contextMenu"],open:F,onOpenChange:X=>{L(X?B:null)},children:e.jsx("span",{onContextMenu:D(B),style:{display:"inline-block",width:"100%",height:"100%"},children:a.createElement(_e,{...T.props,key:T.key,"data-gubun":H},T)})})}})})}),[g,v,S,r,j,k,D]);return e.jsx("div",{className:t.wrapper.className,style:{...t.wrapper.style,display:r.length===0?"none":"block"},children:e.jsx(o.Tabs,{type:"editable-card",activeKey:s||void 0,onChange:h,onEdit:I,className:t.tabs.className,style:t.tabs.style,hideAdd:!0,items:G,tabBarExtraContent:e.jsx(ze,{config:t?.nav,isFirst:!!W,isLast:!!_,canCloseAll:r.length>0,onFirst:y,onPrev:u,onNext:m,onLast:M,onCloseAll:R}),renderTabBar:C})})},{Sider:Ae}=o.Layout,le=({config:n={}})=>{const t={collapsed:!1,width:230,menuGubunCode:{mainMenu:"MAIN",subMenu:"SUB",program:"PRGM",...n?.menuGubunCode},className:{wrapper:"side-wrapper",search:"sider-search-ipt",segmented:{wrapper:"sider-segmented",item:"sider-segment-item",...n?.className?.segmented},sider:{content:"sider-content",loading:"sider-loading",loadingText:"sider-loading-text",error:"sider-error",errorIcon:"sider-error-icon",errorText:"sider-error-text",menu:"sider-menu",menuContainer:"sider-menu-container",...n?.className?.sider},...n?.className},style:{search:{placeholder:"메뉴명, 메뉴번호 검색...",height:30,...n?.style?.search},...n?.style},...n},[r,s]=a.useState(""),[l,c]=a.useState("category"),[x,d]=a.useState([]),{activeMenuId:p,sidebarCollapsed:b,openTabFromMenu:f,toggleSidebar:N}=P.useMenuViewStore(),{menuList:g,isLoading:h,error:I,findMenuById:y,flatMenuList:u}=P.useMenuModelStore(),{nodes:m,treeNodes:M,loadFavoritesIfNeeded:R}=P.useFavoriteStore(),D=a.useMemo(()=>{const v=[],S=(C,i=0)=>{if(C.menuGbCd===t.menuGubunCode.program&&C.scrnPath){const w=" ".repeat(i),T=C.menuNo||"";v.push({value:C.menuId,label:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("span",{children:[w,C.menuNm]}),e.jsx("span",{style:{fontSize:"11px",color:"#999",backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"3px",marginLeft:"8px"},children:T})]}),menuItem:C})}C.children&&C.children.length>0&&C.children.forEach(w=>S(w,i+1))};return g.forEach(C=>S(C)),v},[g]),k=a.useMemo(()=>r.trim()?D.filter(v=>{const S=v.menuItem.menuNm.toLowerCase(),C=String(v.menuItem.menuNo||"미지정").toLowerCase(),i=r.toLowerCase();return S.includes(i)||C.includes(i)}):[],[D,r]),A=v=>{if(!v||typeof v!="string"){console.warn("Invalid menu selection value:",v);return}if(!/^[a-zA-Z0-9_-]+$/.test(v)){console.warn("Invalid menu ID format:",v);return}const S=D.find(C=>C.value===v);if(S){const{menuItem:C}=S;if(!C||!C.menuId||!C.menuNm){console.warn("Invalid menu item:",C);return}C.menuGbCd===t.menuGubunCode.program&&C.scrnPath?(console.log("✅ 검색으로 프로그램 메뉴 선택 - 탭 추가 및 setCurrentProgram 호출"),console.log("메뉴명:",C.menuNm,"경로:",C.scrnPath,"scrnId:",C.scrnId),f(C)):(C.menuGbCd===t.menuGubunCode.mainMenu||C.menuGbCd===t.menuGubunCode.subMenu)&&(console.log("❌ 검색으로 메인/서브 메뉴 선택 - 이벤트 무시"),console.log("메뉴명:",C.menuNm,"menuGbCd:",C.menuGbCd)),s("")}},W=a.useCallback(v=>{const S=y(v);S?.menuGbCd===t.menuGubunCode.program&&(console.log("메뉴명:",S.menuNm,"경로:",S.scrnPath,"scrnId:",S.scrnId),f(S))},[y,f,t.menuGubunCode.program]),_=a.useCallback(v=>v.map(S=>({key:S.menuId,label:e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:e.jsx("span",{children:S.menuNm})}),icon:G(S.iconCd,S.menuGbCd),children:S.children&&S.children.length>0?_(S.children):void 0})),[]),G=(v,S)=>{if(v){const C=Y[v];if(C)return e.jsx(C,{})}if(S)switch(S){case t.menuGubunCode.mainMenu:return e.jsx(Y.HomeOutlined,{});case t.menuGubunCode.subMenu:return null;case t.menuGubunCode.program:return null;default:return null}return null},j=a.useCallback(v=>{if(g.length===0)return[];const S=i=>{if(i)return typeof i=="string"?m[i]:i},C=i=>{if(i.type==="M"){const w=i,T=y(w.menuId)||void 0,B=!!T,F=B?`${T?.menuNm??w.menuNm??w.menuId}`:`${w.menuNm??w.menuId} (삭제됨)`;return{key:w.menuId,label:F,icon:B?void 0:e.jsx(E.WarningOutlined,{style:{color:"#faad14"}})}}else{const w=i,T=(w.children??[]).map(S).filter(Boolean).map(C);return{key:w.bkmkId,label:w.bkmkNm??w.bkmkId,icon:w.prntBkmkId==="-"?e.jsx(E.StarOutlined,{}):e.jsx(E.FolderOpenOutlined,{}),children:T}}};return v.map(C)},[y,m,g]),L=a.useMemo(()=>j(M),[j,M,m]);return a.useEffect(()=>{V.getUserId()&&R(V.getUserId())},[R]),a.useEffect(()=>{l==="category"&&s("")},[l]),a.useEffect(()=>{if(!p||l!=="category")return;const S=(C=>{const i=[],w=new Map(u.map(B=>[B.menuId,B]));let T=C;for(;T;){const B=w.get(T);if(!B)break;if(B.menuPrntId&&B.menuPrntId!=="-"&&B.menuPrntId!=="")i.push(B.menuPrntId),T=B.menuPrntId;else break}return i})(p);S.length>0&&d(C=>{const i=new Set([...C,...S]);return Array.from(i)})},[p,l,u]),e.jsxs(Ae,{className:t.className.wrapper,collapsed:t.collapsed||b,trigger:null,width:t.width||230,children:[e.jsx("div",{style:{position:"absolute",top:"9px",right:"-25px",zIndex:"1000",width:"25px",height:"41px",backgroundColor:"#ffffff",border:"1px solid #dddddd",borderRadius:"0 10px 10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"2px 2px 2px rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease"},children:e.jsx(o.Button,{type:"text",icon:t.collapsed||b?e.jsx(E.MenuUnfoldOutlined,{}):e.jsx(E.MenuFoldOutlined,{}),style:{fontSize:"12px",color:"#787878",padding:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0 10px 10px 0"},onClick:N})}),!(t.collapsed||b)&&e.jsx("div",{style:{padding:10},children:e.jsx(o.AutoComplete,{value:r,options:k,onSelect:A,onSearch:s,style:{width:"100%"},allowClear:!0,children:e.jsx(o.Input,{className:t.className.search,placeholder:t.style.search.placeholder,prefix:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M16.4972 16.6667L13.0355 13.1694M14.8475 8.75C14.8475 5.29822 12.0777 2.5 8.66105 2.5C5.24437 2.5 2.47461 5.29822 2.47461 8.75C2.47461 12.2018 5.24437 15 8.66105 15C12.0777 15 14.8475 12.2018 14.8475 8.75Z",stroke:"#5F5F5F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),size:"middle",style:{height:t.style.search.height||30}})})}),!(t.collapsed||b)&&e.jsx("div",{style:{width:"100%",padding:"0px 10px",marginBottom:"10px"},children:e.jsx(o.Segmented,{className:t.className.segmented.wrapper,options:[{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e.jsx("path",{d:"M2.46979 6.90625H13.0298C13.7298 6.90625 14.2965 7.47292 14.2965 8.17292V13.5396H1.20312V8.17292C1.20312 7.47292 1.76979 6.90625 2.46979 6.90625Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M2.76318 4.70626C2.76318 4.00626 3.18318 3.75293 3.69652 3.75293H11.8032C12.3165 3.75293 12.7365 4.00626 12.7365 4.70626",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M4.71631 1.45996H10.783",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),"카테고리"]}),value:"category"},{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M7.11329 1.33356C7.32084 0.888813 7.66676 0.888813 7.88296 1.33356L9.258 4.25619C9.46556 4.70094 10.0277 5.12753 10.4947 5.20014L13.5647 5.67212C14.0317 5.74473 14.1441 6.08964 13.7982 6.43455L11.5757 8.70367C11.2384 9.04858 11.0222 9.73839 11.1 10.2285L11.6276 13.4325C11.7054 13.9227 11.4287 14.1405 11.0049 13.9045L8.26348 12.3887C7.83972 12.1527 7.15653 12.1527 6.73277 12.3887L3.99134 13.9045C3.56759 14.1405 3.29085 13.9227 3.36868 13.4325L3.89621 10.2285C3.97405 9.73839 3.76649 9.04858 3.42057 8.70367L1.19802 6.43455C0.86075 6.08964 0.964526 5.74473 1.43152 5.67212L4.50158 5.20014C4.96857 5.12753 5.5307 4.70094 5.73825 4.25619L7.11329 1.33356Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"4"})})}),"즐겨찾기"]}),value:"favorite"}],value:l,onChange:v=>{c(v)},style:{width:"100%"},block:!0})}),e.jsxs("div",{className:t.className.sider.content,children:[h&&e.jsxs("div",{className:t.className.sider.loading,style:{padding:10,margin:"0 auto",textAlign:"center",color:"var(--text-primary)"},children:[e.jsx(o.ConfigProvider,{theme:{components:{Spin:{colorPrimary:"var(--primary-color)"}}},children:e.jsx(o.Spin,{size:"default"})}),e.jsx("div",{className:t.className.sider.loadingText,style:{marginTop:10},children:"메뉴 로딩 중..."})]}),I&&e.jsxs("div",{className:t.className.sider.error,children:[e.jsx(E.ExclamationCircleOutlined,{className:t.className.sider.errorIcon}),e.jsx("div",{className:t.className.sider.errorText,children:"메뉴 로드 실패"})]}),!h&&!I&&l==="category"&&g.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"메뉴가 없습니다"}),!h&&!I&&l==="favorite"&&L.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"즐겨찾기된 메뉴가 없습니다"}),!h&&!I&&l==="category"&&g.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(o.Menu,{theme:"light",mode:"inline",items:_(g),className:t.className.sider.menu,selectedKeys:[p||""],openKeys:x,onOpenChange:d,onClick:v=>W(v.key),onDoubleClick:v=>{v.preventDefault(),v.stopPropagation()}})}),!h&&!I&&l==="favorite"&&L.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(o.Menu,{theme:"light",mode:"inline",items:L,className:t.className.sider.menu,selectedKeys:[p||""],onClick:v=>W(v.key),onDoubleClick:v=>{v.preventDefault(),v.stopPropagation()}})})]})]})};class Fe extends a.Component{constructor(t){super(t),this.resetError=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBound caught an error:",t,r),this.setState({error:t,errorInfo:r})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{style:{padding:"40px 20px",textAlign:"center",backgroundColor:"#fafafa",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[e.jsx(o.Result,{status:"error",title:"컴포넌트 로딩 중 오류가 발생했습니다",subTitle:this.state.error?`오류 내용: ${this.state.error.message}`:"알 수 없는 오류가 발생했습니다",extra:[e.jsx(o.Button,{type:"primary",icon:e.jsx(E.ReloadOutlined,{}),onClick:this.resetError,style:{marginRight:8},children:"다시 시도"},"retry")]}),this.state.error&&e.jsxs("details",{style:{marginTop:"20px",textAlign:"left",maxWidth:"600px",backgroundColor:"#fff",padding:"16px",borderRadius:"6px",border:"1px solid #d9d9d9"},children:[e.jsx("summary",{style:{cursor:"pointer",fontWeight:"bold"},children:"오류 상세 정보"}),e.jsx("pre",{style:{marginTop:"8px",fontSize:"12px",color:"#666",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:this.state.error.stack})]})]}):this.props.children}}const He=({isActive:n,instance:t,params:r})=>{const{activeMenuId:s,closeTab:l}=P.useMenuViewStore(),c=()=>{s&&l(s)};return t?e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",visibility:n?"visible":"hidden",opacity:n?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:n?"auto":"none"},children:e.jsx(Fe,{children:e.jsx(a.Suspense,{fallback:null,children:t&&a.createElement(t,{params:r})})})}):e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",visibility:n?"visible":"hidden",opacity:n?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:n?"auto":"none"},children:e.jsx("div",{style:{width:500,maxWidth:"90%",background:"#fff",borderRadius:16,boxShadow:"0 8px 30px rgba(0,0,0,0.05)",padding:24},children:e.jsx(o.Result,{icon:e.jsx(E.ExclamationCircleTwoTone,{twoToneColor:"#69b1ff"}),status:"warning",title:"등록된 메뉴 정보가 없거나 유효한 메뉴가 아닙니다.",subTitle:e.jsx(o.Typography.Text,{type:"secondary",children:"자세한 내용은 관리자에게 문의바랍니다."}),extra:e.jsx(o.Space,{children:e.jsx(o.Button,{icon:e.jsx(E.CloseOutlined,{}),onClick:c,children:"탭 닫기"})})})})})},ce=a.memo(He),de=({menuGubunCode:n={mainMenu:"MAIN",subMenu:"SUB",program:"PRGM"},mode:t="horizontal",style:r,routeMap:s})=>{const{menuList:l,findMenuById:c,flatMenuList:x}=P.useMenuModelStore(),{activeMenuId:d}=P.useMenuViewStore(),p=O.useNavigate(),[b,f]=a.useState([]),N=a.useCallback((y,u)=>{if(y){const m=Y[y];if(m)return e.jsx(m,{})}if(u)switch(u){case n.mainMenu:return e.jsx(Y.HomeOutlined,{});default:return null}return null},[n]),g=a.useCallback(y=>y.map(u=>{const m=u.children&&u.children.length===1&&u.children[0].menuGbCd===n.program;return{key:u.menuId,label:u.menuNm,icon:N(u.iconCd,u.menuGbCd),children:u.children&&u.children.length>0&&!m?g(u.children):void 0}}),[N,n]),h=a.useMemo(()=>g(l),[l,g]),I=a.useCallback(y=>{const u=c(y.key);if(u){if(u.children&&u.children.length===1&&u.children[0].menuGbCd===n.program){const m=u.children[0];let M=s?.[m.menuId]||m.scrnPath||"/";M==="/"?M="/main":M.startsWith("/main")||(M=M.startsWith("/")?`/main${M}`:`/main/${M}`),p(M);return}if(u.menuGbCd===n.program&&u.scrnPath){let m=s?.[u.menuId]||u.scrnPath||"/";m==="/"?m="/main":m.startsWith("/main")||(m=m.startsWith("/")?`/main${m}`:`/main/${m}`),p(m);return}}},[c,n,p,s]);return a.useEffect(()=>{if(!d||t!=="vertical")return;const u=(m=>{const M=[],R=new Map(x.map(k=>[k.menuId,k]));let D=m;for(;D;){const k=R.get(D);if(!k)break;if(k.menuPrntId&&k.menuPrntId!=="-"&&k.menuPrntId!=="")M.push(k.menuPrntId),D=k.menuPrntId;else break}return M})(d);u.length>0&&f(m=>{const M=new Set([...m,...u]);return Array.from(M)})},[d,t,x]),e.jsx(o.Menu,{mode:t,theme:"light",items:h,selectedKeys:[d||""],openKeys:t==="vertical"?b:void 0,onOpenChange:t==="vertical"?f:void 0,onClick:I,style:r})},ue=()=>e.jsxs(e.Fragment,{children:[e.jsx("link",{rel:"preload",as:"image",href:"/src/styles/assets/images/backgrounds/LandingContainer_bg.png"}),e.jsx("div",{className:"LandingContainer-wrap",children:e.jsx("div",{className:"inner",children:e.jsx("div",{className:"content"})})})]}),$e=(n,t)=>{console.log("createPopupViewLoader 호출 - popupUrl:",n);const s=(l=>{if(l.startsWith("/src/pages/views/popup/")){const d=l+".tsx";return console.log(`팝업 URL 변환: ${l} -> ${d}`),d}const x=`/src/pages/views/popup/${l.startsWith("/")?l.substring(1):l}.tsx`;return console.log(`팝업 URL 변환: ${l} -> ${x}`),x})(n);return!s||!t?.glob||!t.glob[s]?(console.warn(`팝업 뷰를 찾을 수 없습니다: ${n} (${s})`),console.warn("사용 가능한 팝업 뷰들:",Object.keys(t?.glob||{})),null):t.glob[s]},Ve=({popup:n,modules:t})=>{const[r,s]=a.useState(null),[l,c]=a.useState(!1),[x,d]=a.useState(null),p=()=>{console.log("PopupArea - handleClose:",n.popupId),P.usePopupStore.getState().closePopup(n.popupId)};return a.useEffect(()=>{(async()=>{console.log("팝업 뷰 로드 시작:",n.popupUrl),c(!0),d(null);try{const f=$e(n.popupUrl,t);if(!f){const h=`팝업 뷰를 찾을 수 없습니다: ${n.popupUrl}`;console.error(h),d(h),c(!1);return}console.log("팝업 뷰 모듈 로드 중...");const N=await f();console.log("팝업 뷰 모듈 로드 완료:",N);const g=N.default;if(console.log("팝업 뷰 컴포넌트:",g),!g)throw new Error("팝업 뷰 컴포넌트를 찾을 수 없습니다");s(()=>g),console.log("팝업 뷰 설정 완료")}catch(f){console.error("팝업 뷰 로드 실패:",f),d(f instanceof Error?f.message:"팝업 뷰 로드 실패")}finally{c(!1)}})()},[n.popupUrl]),l?e.jsxs("div",{className:"popup-loading",children:[e.jsx(o.Spin,{size:"large"}),e.jsx("p",{children:"팝업을 로드하는 중..."})]}):x?e.jsxs("div",{className:"popup-error",children:[e.jsx(o.Empty,{description:x,image:o.Empty.PRESENTED_IMAGE_SIMPLE}),e.jsx(o.Button,{icon:e.jsx(E.ReloadOutlined,{}),onClick:()=>window.location.reload(),children:"다시 시도"})]}):r?e.jsx(a.Suspense,{fallback:e.jsxs("div",{className:"popup-loading",children:[e.jsx(o.Spin,{size:"large"}),e.jsx("p",{children:"컴포넌트를 로드하는 중..."})]}),children:e.jsx(r,{popup:{...n,close:p},onClose:p})}):e.jsx("div",{className:"popup-empty",children:e.jsx(o.Empty,{description:"팝업 내용을 불러올 수 없습니다."})})},he=({modules:n})=>{const{popups:t}=P.usePopupStore();return t.length===0?null:e.jsx(e.Fragment,{children:t.map(r=>{if(r.isLocal||r.popupCode.startsWith("CORE_"))return null;const s=r.config||{},l=s.width||r.width||800,c=s.height||r.height||600,x=s.title||r.popupTitle,d=r.buttonList?.map((p,b)=>({key:p.btnId||`btn_${b}`,text:p.btnNm,type:p.btnId==="CLOSE"?"default":"primary",disabled:p.enblYn!=="Y",danger:!1}))||[];return console.log("팝업 렌더링:",{popupId:r.popupId,popupCode:r.popupCode,title:x,width:l,height:c,buttons:d}),e.jsx(z.SearchBoxProvider,{children:e.jsx("div",{children:e.jsx(Ve,{popup:r,modules:n})},r.popupId)},`sbp-${r.popupId}`)})})},pe=()=>{const{popups:n,closePopup:t}=P.usePopupStore();return e.jsx(e.Fragment,{children:n.map(r=>{if(!(r.isLocal||r.popupCode.startsWith("CORE_")))return null;const s=ie[r.popupCode];if(!s)return null;const l=s.component;return e.jsx(z.SearchBoxProvider,{children:e.jsx(a.Suspense,{fallback:null,children:e.jsx(l,{popup:r,onClose:()=>t(r.popupId)})},r.popupId)},`sbp-${r.popupId}`)})})},We=n=>({position:"absolute",inset:0,visibility:n?"visible":"hidden",opacity:n?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:n?"auto":"none"}),Ge=({once:n=!0})=>{const{lock:t}=z.useLock(),r=a.useRef(!1);return a.useEffect(()=>{n&&r.current||(r.current=!0,t())},[n,t]),null},me=({isActive:n,flagged:t,tabKey:r,onUnlock:s,children:l})=>{const c=a.useRef(null),[x,d]=a.useState(!1),p=a.useCallback(f=>{c.current=f,d(!!f)},[]),b=We(n);return e.jsx("div",{ref:p,style:b,children:x?e.jsxs(z.ScreenProtectProvider,{idleMs:Number.POSITIVE_INFINITY,persistLocked:!1,overlayScope:"scoped",overlayPosition:"absolute",eventTarget:c.current,overlayId:`tab-overlay-${r}`,onUnlock:async()=>(s(),!0),children:[n&&t?e.jsx(Ge,{once:!0}):null,l]}):l})},qe=({config:n={},modules:t={view:{path:"/src/pages/views/content"},popup:{path:"/src/pages/views/popups"}}})=>{const r=a.useRef(new Map),{tabs:s,tabParams:l,activeMenuId:c,tabProtectFlag:x,refreshTabKey:d,clearProtectFlagForKey:p}=P.useMenuViewStore(),{enableProtectWrapper:b}=P.useUserStore(),f=a.useCallback(g=>{const h=r.current.get(g.key);if(h)return h;const I=g.gubun==="M"?`${t.view.path}${g.menuItem?.scrnPath}.tsx`:`${t.view.path}${g.componentItem?.scrnPath}.tsx`;let y=t.view?.glob?.[I];if(!y&&typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Q&&Q.tagName.toUpperCase()==="SCRIPT"&&Q.src||new URL("chunks/layout-components-Bf9IsLUS.cjs",document.baseURI).href}<"u",y){const u=a.lazy(y);return r.current.set(g.key,u),u}return null},[t.view?.glob]),N=a.useRef({});return a.useEffect(()=>{const g=N.current,h=d;Object.keys(h).forEach(I=>{const y=g[I],u=h[I];y!==u&&r.current.delete(I)}),N.current={...h}},[d]),a.useEffect(()=>{const g=h=>{if(h.key==="F5"||h.ctrlKey&&h.key==="r"||h.ctrlKey&&h.shiftKey&&h.key==="R"||h.ctrlKey&&h.key==="s")return h.preventDefault(),!1};return window.addEventListener("keydown",g,!0),()=>{window.removeEventListener("keydown",g,!0)}},[]),e.jsxs(o.Layout,{className:"main-layout",children:[e.jsx(re,{config:n?.header}),e.jsxs(o.Layout,{children:[e.jsx(le,{config:n?.sidebar}),e.jsxs("div",{className:"content-container",children:[e.jsx(ae,{config:n?.menuTab}),e.jsxs(ne,{config:n?.content,children:[e.jsx("div",{className:"view-container",children:e.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[s.map(g=>{const h=f(g),I=c===g.key,y=!!x?.[g.key],u=l[g.key]||{},m=d[g.key],M=m!==void 0?`${g.key}-${m}`:g.key,R=e.jsx(ce,{isActive:I,instance:h||void 0,params:u},M);return e.jsx(z.SearchBoxProvider,{children:b?e.jsx(me,{isActive:I,flagged:y,tabKey:g.key,onUnlock:()=>p(g.key),children:R},g.key):R},`sbp-${g.key}`)}),(!c||s.length===0)&&e.jsx(ue,{})]})}),e.jsx(pe,{}),e.jsx(he,{modules:t?.popup})]})]})]}),(n?.quickService?.visible??!0)&&e.jsx(te.QuickServiceToggle,{})]})},Ke=({children:n,menuGubunCode:t={mainMenu:"CMPRGRM",subMenu:"CMPRGRS",program:"CMPRGRP"},routeMap:r,routes:s})=>{const l=O.useLocation(),c=O.useNavigate(),{flatMenuList:x,findMenuById:d}=P.useMenuModelStore(),{title:p,extra:b}=z.usePageContent(),f=a.useMemo(()=>{const h=l.pathname,I=h.replace(/^\/main/,"")||"/";if(r){const y=Object.keys(r).find(m=>r[m]===h);if(y)return d(y);const u=Object.keys(r).find(m=>(r[m].replace(/^\/main/,"")||"/")===I);if(u)return d(u)}return x.find(y=>y.menuGbCd===t.program&&y.scrnPath&&(y.scrnPath===I||y.scrnPath===h||h.endsWith(y.scrnPath)||I===y.scrnPath))},[l.pathname,x,t.program,r,d]),N=a.useMemo(()=>{if(!f)return[];const h=[],I=u=>{if(!u||!u.menuPrntId||u.menuPrntId==="-")return[];const m=d(u.menuPrntId);return m?[...I(m),m]:[]};return I(f).forEach(u=>{if(u.menuGbCd===t.mainMenu||u.menuGbCd===t.subMenu){let m;if(r&&u.menuId&&(m=r[u.menuId]),!m&&s&&u.scrnPath){const M=u.scrnPath.startsWith("/")?u.scrnPath:`/${u.scrnPath}`,R=Object.keys(s).find(D=>D===M||D===`/main${M}`);R&&(m=R.startsWith("/main")?R:`/main${R.startsWith("/")?R:`/${R}`}`)}h.push({title:u.menuNm,onClick:m?()=>c(m):void 0})}}),h.push({title:f.menuNm}),h},[f,t,c,d]),g=p!==void 0?p:f?.menuNm||"타이틀";return e.jsxs("div",{className:"admin-page-inner",children:[e.jsxs("div",{className:"page-header",children:[e.jsx(o.Breadcrumb,{className:"admin-breadcrumb",separator:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M6.66675 11.3333L10.0001 7.99996L6.66675 4.66663",stroke:"#9A9A9A","stroke-linecap":"round","stroke-linejoin":"round"})}),items:N,style:{marginBottom:"15px"}}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"16px"},children:[e.jsx("h2",{className:"page-title",style:{margin:0,flex:1},children:g}),b&&e.jsx("div",{style:{flexShrink:0},children:b})]})]}),e.jsx("div",{className:"page-main-content",children:n})]})},ge=n=>e.jsx(z.PageContentProvider,{children:e.jsx(Ke,{...n})}),Ue=({config:n={}})=>{const t=n?.header?.menu,r=t?.visible!==!1,s=t?.routes,l=a.useMemo(()=>{if(!s)return;const c={},{flatMenuList:x}=P.useMenuModelStore.getState();return x.forEach(d=>{if(d.menuGbCd===t?.menuGubunCode?.program&&d.scrnPath){const p=d.scrnPath.startsWith("/")?d.scrnPath:`/${d.scrnPath}`,b=Object.keys(s).find(f=>{const N=f==="/"?"/":f.startsWith("/")?f:`/${f}`;return N===p||N===`/main${p}`||p===N.replace(/^\/main/,"")});if(b){const f=b==="/"?"/main":b.startsWith("/main")?b:`/main${b.startsWith("/")?b:`/${b}`}`;c[d.menuId]=f}}}),c},[s,t?.menuGubunCode?.program]);return e.jsxs(o.Layout,{className:"admin-layout",children:[e.jsx(re,{config:n?.header,children:r&&e.jsx(de,{menuGubunCode:t?.menuGubunCode,mode:t?.style?.mode||"horizontal",routeMap:l,style:{border:"none",backgroundColor:"transparent",minWidth:0,flex:1,...t?.style}})}),e.jsx("div",{className:"admin-content-container",children:e.jsxs(ne,{config:n?.content,children:[e.jsx("div",{className:"admin-view-container",children:e.jsx("div",{style:{position:"relative",width:"100%",height:"100%"},children:e.jsx(a.Suspense,{fallback:e.jsx("div",{children:"Loading..."}),children:e.jsx(O.Routes,{children:Object.entries(s||{}).map(([c,x])=>{const d=c==="/"?"":c.replace(/^\/main/,"").replace(/^\//,"")||"";return e.jsx(O.Route,{path:d,element:e.jsx(ge,{menuGubunCode:t?.menuGubunCode,routeMap:l,routes:s,children:e.jsx(x,{})})},c)})})})})}),e.jsx(pe,{})]})})]})};function Ze({config:n,ui:t}){const{loading:r,capsOn:s,prefills:l,onKeyDown:c,doLogin:x}=P.useLogin(n),d=p=>x(p);return a.useEffect(()=>{P.useSystemStore.getState().systemMap.length===0&&P.useSystemStore.getState().fetchSystemMap()},[]),e.jsx(e.Fragment,{children:t({onSubmit:d,loading:r,capsOn:s,onKeyDown:c,prefills:l})})}function Ye({onSubmit:n,loading:t,capsOn:r,onKeyDown:s,prefills:l,labels:c={id:"ID 혹은 사번",pw:"비밀번호",remember:"Remember me",login:"로그인"},header:x,footer:d}){const[p]=o.Form.useForm();return a.useEffect(()=>{l&&(l.id||l.pswr)&&p.setFieldsValue({id:l.id,pswr:l.pswr})},[l,p]),e.jsx("div",{className:"login-main",children:e.jsxs("div",{className:"login_wrap",children:[x||e.jsx("div",{className:"logo_box"}),e.jsx("div",{className:"login_title"}),e.jsx(o.ConfigProvider,{theme:{components:{Card:{bodyPadding:40},Button:{controlHeight:40,colorPrimary:"#6449fc",colorPrimaryActive:"#7163c3",colorPrimaryHover:"#7163c3",borderRadius:50,fontWeight:600},Input:{colorBorder:"var(--border-color)",hoverBorderColor:"#bdbd1ff",borderRadiusLG:6,fontSize:14},Checkbox:{colorPrimary:"#6377d1",colorPrimaryBorder:"#6377d1",colorPrimaryHover:"#6449fc",colorText:"var(--text-primary)",fontSize:13}}},children:e.jsx(o.Form,{form:p,onFinish:n,className:"login-form",children:e.jsxs(o.Flex,{vertical:!0,gap:50,children:[e.jsxs("div",{className:"login-form-item-group",children:[e.jsx(o.Form.Item,{name:"id",rules:[{required:!0,message:"아이디를 입력해주세요."},{whitespace:!0,message:"아이디는 공백이 들어갈 수 없습니다."}],children:e.jsx(o.Input,{allowClear:!0,placeholder:c.id,onKeyDown:s})}),e.jsx(o.Form.Item,{name:"pswr",rules:[{required:!0,message:"비밀번호를 입력하세요."}],children:e.jsx(o.Input.Password,{allowClear:!0,placeholder:c.pw,onKeyDown:s})}),e.jsx(o.Form.Item,{name:"remember",valuePropName:"checked",style:{marginBottom:0},children:e.jsx(o.Checkbox,{children:c.remember})}),e.jsx("div",{className:r?"caps-lock caps-lock-on":"caps-lock",children:r?"Caps Lock On":"Caps Lock Off"})]}),e.jsx(o.Form.Item,{style:{marginBottom:0},children:e.jsx(o.Button,{type:"primary",htmlType:"submit",loading:t,block:!0,style:{borderRadius:"50px"},children:c.login})})]})})}),d]})})}const{Text:$,Title:Xe}=o.Typography;function Qe({loginConfig:n,loginParams:t,mainLogo:r,systemLogo:s,onGoLogin:l,onGoMain:c}){const{loginStatus:x,doSsoLogin:d}=P.useSsoLogin(n);a.useEffect(()=>{p()},[t.userId]);const p=()=>d(t),b=({children:N})=>e.jsxs(Xe,{level:4,style:{marginBottom:8,display:"flex",alignItems:"center",justifyContent:"center"},children:[s&&s," ",N]}),f=()=>x==="LOADING"?e.jsxs(e.Fragment,{children:[e.jsx(o.Spin,{size:"large",style:{margin:"10px 0"}}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인 중입니다."}),e.jsxs($,{children:["인증 정보를 확인하는 중입니다.",e.jsx("br",{}),"브라우저 창을 닫지 말아 주세요."]})]}),e.jsx($,{type:"secondary",style:{fontSize:12},children:"인증이 완료되면 자동으로 다음 화면으로 이동합니다."}),e.jsx(o.Button,{style:{marginTop:8},onClick:l,children:"로그인 화면"})]}):x==="SUCCESS"?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:48},children:e.jsx(E.CheckCircleTwoTone,{twoToneColor:"#52c41a"})}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인에 성공했습니다."}),e.jsx($,{children:"잠시만 기다려 주세요."})]}),e.jsx($,{type:"secondary",style:{fontSize:12},children:"잠시 후 자동으로 다음 화면으로 이동합니다."}),e.jsx(o.Space,{style:{marginTop:8,justifyContent:"center"},children:e.jsx(o.Button,{type:"primary",onClick:c,children:"바로 이동하기"})})]}):x==="FAIL"?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:48},children:e.jsx(E.ExclamationCircleTwoTone,{twoToneColor:"#ff4d4f"})}),e.jsxs("div",{children:[e.jsx(b,{children:"로그인에 실패했습니다."}),e.jsxs($,{children:["인증 과정에서 오류가 발생했습니다.",e.jsx("br",{}),"다시 시도해 주세요."]})]}),e.jsx($,{type:"secondary",style:{fontSize:12},children:"문제가 지속되면 관리자에게 문의해 주세요."}),e.jsxs(o.Space,{style:{marginTop:8,justifyContent:"center"},children:[e.jsx(o.Button,{type:"primary",onClick:p,icon:e.jsx(E.ReloadOutlined,{}),children:"다시 시도"}),e.jsx(o.Button,{onClick:l,icon:e.jsx(E.LoginOutlined,{}),children:"로그인 화면"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(o.Spin,{size:"large",style:{margin:"10px 0"}}),e.jsx($,{children:"로그인 상태를 확인하는 중입니다."})]});return a.useEffect(()=>{P.useSystemStore.getState().systemMap.length===0&&P.useSystemStore.getState().fetchSystemMap()},[]),e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f5f5f5"},children:e.jsx(o.Card,{style:{width:420,padding:"32px 32px 28px",textAlign:"center",borderRadius:16,boxShadow:"0 8px 24px rgba(0,0,0,0.06)"},children:e.jsxs(o.Space,{direction:"vertical",size:16,style:{width:"100%"},children:[e.jsx("div",{children:r&&r}),f()]})})})}const{Text:oe,Title:Je}=o.Typography;function et({mode:n,mainLogo:t,systemLogo:r,newUserId:s,onContinue:l,onGoLogin:c}){const x=({children:f})=>e.jsxs(Je,{level:4,style:{marginBottom:8,display:"flex",alignItems:"center",justifyContent:"center",gap:6},children:[r&&r," ",f]}),{title:d,desc:p,subDesc:b}=n==="SESSION_CHANGED"?{title:"세션이 변경되었습니다.",desc:`이 브라우저에서 다른 계정으로 다시 로그인되었습니다.
|
|
36
|
+
현재 창에서는 이전 계정을 더 이상 사용할 수 없습니다.`,subDesc:s?`새로 로그인된 계정: ${s}`:"새로 로그인된 계정으로 계속 진행하거나, 로그인 화면으로 이동해 주세요."}:{title:"세션이 만료되었습니다.",desc:`일정 시간 동안 사용하지 않아 로그인이 해제되었습니다.
|
|
37
|
+
보안을 위해 다시 로그인해 주세요.`,subDesc:"계속 이용하시려면 로그인 화면으로 이동해 주세요."};return e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f5f5f5"},children:e.jsx(o.Card,{style:{width:450,padding:"32px 32px 28px",textAlign:"center",borderRadius:16,boxShadow:"0 8px 24px rgba(0,0,0,0.06)"},children:e.jsxs(o.Space,{direction:"vertical",size:16,style:{width:"100%"},children:[e.jsx("div",{children:t&&t}),e.jsx("div",{style:{fontSize:48},children:e.jsx(E.ExclamationCircleTwoTone,{twoToneColor:"#faad14"})}),e.jsxs("div",{children:[e.jsx(x,{children:d}),e.jsx(oe,{children:p.split(`
|
|
38
|
+
`).map((f,N)=>e.jsxs("span",{children:[f,e.jsx("br",{})]},N))})]}),e.jsx(oe,{type:"secondary",style:{fontSize:12},children:b}),e.jsx(o.Space,{style:{marginTop:8,justifyContent:"center"},children:l&&s&&e.jsxs(o.Button,{type:"primary",icon:e.jsx(E.CheckCircleTwoTone,{}),onClick:l,children:[s," 계정으로 계속 사용"]})})]})})})}exports.AppWrapper=Le;exports.BwgCoreLogin=Ze;exports.BwgPortal01=qe;exports.BwgPortal02=Ue;exports.BwgSessionNotice=et;exports.BwgSsoLogin=Qe;exports.ConfigurableContent=ne;exports.ConfigurableHeader=re;exports.ConfigurableMenuTab=ae;exports.ConfigurableSidebar=le;exports.ContentContainer=ce;exports.ContentWrapper=ge;exports.DefaultLoginView=Ye;exports.HeaderContainer=de;exports.LandingContainer=ue;exports.LoadingContainer=Ie;exports.PopupContainer=he;exports.ProtectWrapper=me;exports.localPopupRegistry=ie;
|