@bwg-ui/core 1.3.1 → 1.3.2

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 (34) hide show
  1. package/dist/chunks/{CMSearchIntfGwP01-BWm9OqAH.js → CMSearchIntfGwP01-Bx5cpkhH.js} +1 -1
  2. package/dist/chunks/{CMSearchIntfGwP01-CihGc5Q1.cjs → CMSearchIntfGwP01-Uhl4uqiV.cjs} +1 -1
  3. package/dist/chunks/{MenuReport-khjaUz1Q.cjs → MenuReport-CPwq8w-z.cjs} +1 -1
  4. package/dist/chunks/{MenuReport-yYhMOHyq.js → MenuReport-DxJIaW8D.js} +1 -1
  5. package/dist/chunks/{common-components-DletnDTf.cjs → common-components-Dd_AsKs7.cjs} +36 -36
  6. package/dist/chunks/{common-components-coAoWxE9.js → common-components-dzN5Nuq0.js} +1380 -1318
  7. package/dist/chunks/{layout-components-C1DG2B74.js → layout-components-B25FFvXj.js} +679 -663
  8. package/dist/chunks/layout-components-Cz7Zets7.cjs +35 -0
  9. package/dist/components/common/BwgDetail.d.ts.map +1 -1
  10. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  11. package/dist/components/common/index.cjs +1 -1
  12. package/dist/components/common/index.js +1 -1
  13. package/dist/components/guide/index.cjs +1 -1
  14. package/dist/components/guide/index.js +1 -1
  15. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  16. package/dist/components/layout/custom/ConfigurableMenuTab.d.ts.map +1 -1
  17. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  18. package/dist/components/layout/default/LoadingContainer.d.ts.map +1 -1
  19. package/dist/components/layout/index.cjs +1 -1
  20. package/dist/components/layout/index.js +1 -1
  21. package/dist/components/popup/index.cjs +1 -1
  22. package/dist/components/popup/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +2 -2
  25. package/dist/stores/index.cjs +2 -2
  26. package/dist/stores/index.d.ts +6 -2
  27. package/dist/stores/index.d.ts.map +1 -1
  28. package/dist/stores/index.js +116 -100
  29. package/dist/stores/menuViewStore.d.ts +6 -2
  30. package/dist/stores/menuViewStore.d.ts.map +1 -1
  31. package/dist/utils/index.cjs +1 -1
  32. package/dist/utils/index.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunks/layout-components-C6KeWPIu.cjs +0 -35
@@ -1,4 +1,4 @@
1
- "use strict";const oe=require("../utils/index.cjs"),it=require("../stores/index.cjs"),o=require("react/jsx-runtime"),X=require("@ant-design/icons"),p=require("antd"),v=require("react"),L=require("../components/core/index.cjs"),ct=require("./provider-DrboIg2C.cjs"),tO=require("dompurify"),W1=require("quill"),rO=require("react-quill"),Km=require("quill-image-resize-module-react"),Ct=require("realgrid"),Ym=require("realgrid-react"),nO=require("react-rnd"),Oa=require("react-dom"),iO=require("./layout-components-C6KeWPIu.cjs"),qm=require("react-router-dom"),xl=require("dayjs");function U1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=U1(X),C=U1(v),Kf=({checkAuth:e=!1,buttons:t,gap:r=8})=>{const{user:n,getButtonAuth:i,setButtonAuth:a}=it.useUserStore(),s=ct.useServiceCodeValue("AUTH_BTNS"),[l,c]=v.useState({});v.useEffect(()=>{const u=e?e.menuId:void 0,f=e?e.grpId:void 0;if(!u||!f){c({});return}const h=i(u,f);if(h){c(h);return}oe.callService(s,{crprCd:n?.crprCd,userId:n?.userId,grpId:f.toUpperCase(),menuId:u}).then(g=>{const m=Array.isArray(g?.data)?g.data:Array.isArray(g)?g:[],x={};(m||[]).forEach(y=>{const w=String(y?.btnId||"").trim();if(!w)return;const b=y?.enblYn==null?!0:String(y.enblYn).toUpperCase()==="Y";x[w]=b}),a(u,f,x),c(x)}).catch(g=>{console.error(g),c({})})},[s,n?.crprCd,n?.userId,e?e.menuId:void 0,e?e.grpId:void 0,i,a]);const d=v.useMemo(()=>!t||t.length===0?null:t.filter(u=>u?.visible!==!1).map(u=>{const f=!!u.disabled;if(!e)return o.jsx(L.BwgButton,{type:u.type,disabled:f,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);const m=!(Object.prototype.hasOwnProperty.call(l,u.id)?!!l[u.id]:!1),x=f||m,y=o.jsx(L.BwgButton,{type:u.type,disabled:x,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);if(m){const w=o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o.jsx(X.ExclamationCircleFilled,{style:{color:"#faad14",fontSize:16}}),o.jsx("span",{style:{fontWeight:600},children:`'${u.label}' 버튼에 대한 사용 권한이 없습니다.`})]}),b=o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,paddingLeft:24},children:o.jsx("span",{style:{fontSize:12},children:"관리자에게 문의하세요."})});return o.jsx(p.Popover,{title:w,content:b,placement:"bottom",styles:{body:{backgroundColor:"#fffbe6"}},children:o.jsx("span",{children:y})},u.id)}return y}),[t,l,e]);return o.jsx(p.Flex,{gap:r,children:d})};var oO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Yf=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:i="middle",style:a,className:s,onButtonClick:l})=>{const c=ct.useServiceCodeValue("AUTH_BTNS"),{user:d}=it.useUserStore(),[u,f]=v.useState([]),[h,g]=v.useState(!0),[m,x]=v.useState(null),[y,w]=v.useState({}),b=async()=>{try{g(!0),x(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const E=await oe.callService(c,{userId:d?.userId,crprCd:d?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",E),E?.data&&Array.isArray(E.data)){const S=E.data.sort((O,k)=>O.btnSq-k.btnSq);f(S)}else f([])}catch(E){console.error("버튼 권한 조회 실패:",E),x("버튼 권한을 조회하는 중 오류가 발생했습니다."),f([])}finally{g(!1)}};v.useEffect(()=>{b()},[e,t]);const j=async(E,S)=>{w(O=>({...O,[E]:{loading:!0}}));try{const O=r?.[E];O?await O():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${E}`),l&&l(E,S,e)}catch(O){console.error("버튼 이벤트 실행 실패:",O),p.message.error("작업 중 오류가 발생했습니다.")}finally{w(O=>({...O,[E]:{loading:!1}}))}},P=E=>{const S=y[E.btnId]||{loading:!1};return o.jsxs(p.Button,{size:i,loading:S.loading,onClick:()=>j(E.btnId,E.btnNm),className:"bwg-btn",style:{...E.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[E.iconVal&&o.jsxs(o.Fragment,{children:[E.iconType==="ANTD"&&Ti[E.iconVal]&&v.createElement(Ti[E.iconVal],{style:{fontSize:"14px"}}),E.iconType!=="ANTD"&&o.jsx("span",{className:E.iconVal,style:{fontSize:"14px"}})]}),E.btnNm]},E.btnId)};return h?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Space,{direction:n==="vertical"?"vertical":"horizontal",size:i,children:o.jsx(p.Button,{loading:!0,size:i,children:"권한 조회 중..."})})}):m?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"권한 오류",description:m,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Flex,{gap:3,children:u.map(P)})})},sO=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:i=300,style:a,className:s})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return o.jsx("div",{style:a,className:s,children:e});const c=e.filter(g=>g&&g.length>0),d=v.useMemo(()=>{const g=c[0];if(!g||g.length===0)return{totalCols:0,baseWidth:0};let m=0;const x=[];g.forEach(w=>{const b=w,j=b?.props?.["data-colspan"]?parseInt(String(b.props["data-colspan"])):1;m+=j,x.push(j)});const y=m>0?100/m:0;return{totalCols:m,baseWidth:y,componentWidths:x}},[c]),u=(g,m,x)=>{const y=g,w=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1;switch(t){case"equal":return 100/x;case"auto":return 100/x;case"grid":return 100/d.totalCols*w;case"flex":default:const b=d.baseWidth*w;return Math.max(n,Math.min(i,b))}},f=g=>{if(!g||typeof g!="object")return g;const m=g;if(!m.props)return g;const y={...m.props.style||{},width:"100%"};return v.cloneElement(m,{...m.props,style:y})},h=(g,m)=>{if(!g||g.length===0)return null;const x=g.length;return t==="grid"?o.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${d.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:g.map((y,w)=>{const b=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1,j=f(y);return o.jsx("div",{style:{gridColumn:`span ${b}`,minWidth:`${n}px`},className:"form-component-wrapper",children:j},`row-${m}-col-${w}`)})},`row-${m}`):o.jsx(p.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:g.map((y,w)=>{const b=u(y,w,x),j=f(y),P=t==="flex"?{width:`${b}px`,minWidth:`${n}px`,maxWidth:`${i}px`,flexShrink:0}:{width:`${b}%`,minWidth:`${n}px`};return o.jsx("div",{style:P,className:"form-component-wrapper",children:j},`row-${m}-col-${w}`)})},`row-${m}`)};return o.jsx(p.Flex,{gap:"small",vertical:!0,style:a,className:s,children:c.map((g,m)=>h(g,m+1))})},$e=({children:e,className:t,style:r,...n})=>o.jsx(p.Col,{...n,className:`bwg-col ${t}`,style:r,children:e});var Qo={},Au={exports:{}},Gm;function Pc(){return Gm||(Gm=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Au)),Au.exports}var Jo={},Xm;function lO(){if(Xm)return Jo;Xm=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return Jo.default=e,Jo}var ea={},ta={},ra={},Iu={exports:{}},Nu={exports:{}},Du={exports:{}},_u={exports:{}},Zm;function K1(){return Zm||(Zm=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_u)),_u.exports}var Bu={exports:{}},Qm;function cO(){return Qm||(Qm=1,(function(e){var t=K1().default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Bu)),Bu.exports}var Jm;function uO(){return Jm||(Jm=1,(function(e){var t=K1().default,r=cO();function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Du)),Du.exports}var ev;function dO(){return ev||(ev=1,(function(e){var t=uO();function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Nu)),Nu.exports}var tv;function fO(){return tv||(tv=1,(function(e){var t=dO();function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Iu)),Iu.exports}var na={},rv;function pO(){return rv||(rv=1,Object.defineProperty(na,"__esModule",{value:!0}),na.commonLocale=void 0,na.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),na}var nv;function hO(){if(nv)return ra;nv=1;var e=Pc().default;Object.defineProperty(ra,"__esModule",{value:!0}),ra.default=void 0;var t=e(fO()),r=pO(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return ra.default=n,ra}var ia={},iv;function Y1(){if(iv)return ia;iv=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return ia.default=e,ia}var ov;function q1(){if(ov)return ta;ov=1;var e=Pc().default;Object.defineProperty(ta,"__esModule",{value:!0}),ta.default=void 0;var t=e(hO()),r=e(Y1());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return ta.default=n,ta}var av;function gO(){if(av)return ea;av=1;var e=Pc().default;Object.defineProperty(ea,"__esModule",{value:!0}),ea.default=void 0;var t=e(q1());return ea.default=t.default,ea}var sv;function mO(){if(sv)return Qo;sv=1;var e=Pc().default;Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var t=e(lO()),r=e(gO()),n=e(q1()),i=e(Y1());const a="${label} 유효하지 않은 ${type}",s={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:i.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return Qo.default=s,Qo}var $u,lv;function vO(){return lv||(lv=1,$u=mO()),$u}var yO=vO();const G1=wr(yO),X1=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:i})=>{const s=(()=>{const c={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm};switch(n){case"compact":return{...c,token:{...c.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...c,token:{...c.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...c,token:{...c.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),l={...s,...t,token:{...s.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)",buttonSolidCheckedBg:"var(--button-solid)",buttonSolidCheckedHoverBg:"var(--button-solid-hover)",buttonSolidCheckedActiveBg:"var(--button-solid-hover)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"},Tabs:{inkBarColor:"var(--primary-color)",itemSelectedColor:"var(--primary-color)",itemHoverColor:"var(--button-solid-hover)",itemActiveColor:"var(--button-solid-hover)",itemColor:"var(--text-primary)",horizontalItemGutter:0,horizontalItemPadding:"11px 24px"},Button:{borderColorDisabled:"var(--border-color)",defaultShadow:"none",dangerShadow:"none",iconGap:4},...t?.components??{}}};return o.jsx(p.ConfigProvider,{locale:G1,theme:l,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:i,children:e})},xO=({children:e})=>{const{activeDetailItem:t}=it.useMenuViewStore();return o.jsx("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column"},children:o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[o.jsx(p.Breadcrumb,{style:{marginBottom:10},separator:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M6.66675 11.3333L10.0001 7.99996L6.66675 4.66663",stroke:"#9A9A9A","stroke-linecap":"round","stroke-linejoin":"round"})}),items:[{title:t?.prntInfo?.menuNm},{title:t?.viewLabel}]}),e]})})})},bO=5,wO=0,Le=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:i,marginBottom:a,children:s})=>{const l=Ti.AppstoreTwoTone,{componentSize:c}=it.useUserStore(),d=v.useMemo(()=>({0:5,1:4,2:3})[c],[c]);v.useMemo(()=>t?.type==="antd"&&t.icon&&Ti[t.icon]||l,[t?.type,t?.icon]);const u=(g,m)=>(g??m).toString().padStart(2,"0"),f=`pb${u(i,wO)}`,h=`mb${u(a,bO)}`;return o.jsx(p.Flex,{vertical:!0,style:{width:"100%"},children:o.jsxs("div",{className:`bwg-title-box ${f} ${h}`,style:{display:"flex",justifyContent:"space-between"},children:[o.jsx("div",{className:"bwg-title-box-left",children:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(p.Typography.Title,{level:d,children:o.jsx("span",{children:e})}),r&&o.jsx(p.Tooltip,{title:r.title,placement:r.placement,children:o.jsx(Ti.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),o.jsx("div",{className:"bwg-title-box-right",children:o.jsx(p.Flex,{gap:6,children:s})})]})})},{Panel:cv}=p.Collapse,ko=v.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:i},a)=>{const[s]=p.Form.useForm(),[l,c]=v.useState("1"),{componentSize:d}=it.useUserStore(),u=v.useMemo(()=>{const g={0:12,1:14,2:16},m={0:"small",1:"middle",2:"large"};return{fontSize:g[d],componentSize:m[d]}},[d]),f=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};v.useImperativeHandle(a,()=>({getFormData:()=>s.getFieldsValue(),setFormData:g=>{s.setFieldsValue(g)},resetForm:()=>{s.resetFields()},validateForm:async()=>{try{return{success:!0,data:await s.validateFields()}}catch(g){return{success:!1,error:g}}}}));const h=()=>{c(g=>g.includes("subRows")?g.filter(m=>m!=="subRows"):[...g,"subRows"])};return o.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[i&&o.jsx(Le,{title:i.title,children:i.buttons}),o.jsx(p.ConfigProvider,{componentSize:u.componentSize,theme:{token:{fontSize:u.fontSize},components:{Collapse:{}}},children:o.jsx(p.Form,{form:s,layout:"inline",style:{width:"100%",fontSize:`${u.fontSize}px`},labelCol:f(),labelAlign:"left",children:o.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&o.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:l.includes("subRows")?o.jsx(p.Tooltip,{title:"접기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),o.jsxs(p.Collapse,{activeKey:["reqRows",...l.includes("subRows")?["subRows"]:[]],onChange:c,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&o.jsx(cv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&o.jsx(cv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})]})})})]})}),un=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!1,shotSettingButton:i=!0,styles:a,...s})=>{const[l,c]=v.useState(!0),[d,u]=v.useState(()=>{const w=s.placement;return w==="left"||w==="right"||w==="top"||w==="bottom"?w:"bottom"}),[f,h]=v.useState(!1),m=(w=>{const b={wrapper:{...s.width&&{width:s.width},...s.height&&{height:s.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(w){case"bottom":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...b.header,borderRadius:"30px 30px 0 0"}};case"top":return{...b,wrapper:{...b.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...b.header}};case"left":return{...b,wrapper:{...b.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...b.header,borderRadius:"0 30px 0 0"}};case"right":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...b.header,borderRadius:"30px 0 0 0"}};default:return b}})(d),x={wrapper:{...m?.wrapper,...a?.wrapper},content:{...m?.content,...a?.content},header:{...m?.header,...a?.header}},y=()=>{const w=[];if(i){const b=[{key:"top",label:"상단",icon:o.jsx(X.CaretUpOutlined,{})},{key:"right",label:"우측",icon:o.jsx(X.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:o.jsx(X.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:o.jsx(X.CaretLeftOutlined,{})}],j=o.jsx(p.Space.Compact,{children:b.map(P=>o.jsx(p.Button,{type:d===P.key?"primary":"default",size:"small",onClick:()=>{u(P.key),h(!1)},icon:P.icon},P.key))});w.push(o.jsx(p.Popover,{content:j,trigger:"click",placement:"left",open:f,onOpenChange:h,children:o.jsx(p.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:l?"배경 보기":"배경 숨기기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>c(!l)})},"eyes")),s.extra&&w.push(o.jsx("div",{style:{margin:"0 8px"},children:s.extra},"extra")),r&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:s.onClose,type:"text",size:"middle"})},"close")),w};return o.jsx(p.Drawer,{className:"main-drawer",footer:!0,...s,placement:d,styles:x,maskClosable:!1,closable:!1,mask:l,extra:o.jsx(p.Space,{size:"small",align:"center",children:y()}),afterOpenChange:w=>{w||(c(!0),u(s.placement)),s.afterOpenChange?.(w)},destroyOnHidden:!0,children:t?o.jsxs(ze,{type:"vertical",children:[o.jsxs(p.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[o.jsx("div",{children:t.title}),o.jsx(p.Flex,{gap:2,children:t.extra})]}),o.jsx(ko,{...t.searchBox}),o.jsx(p.Divider,{}),e]}):e})},De=({width:e="100%",height:t="100%",boxAlign:r,display:n="show",overflow:i,style:a,className:s,border:l=!0,children:c,ref:d})=>o.jsx("div",{style:{width:e,height:t,display:n==="show"?"":n,overflowX:i?.x,overflowY:i?.y,...a},className:`bwgview-content-box ${r?`content-box-${r}`:""} ${s||""} ${l?"":"none-box-st"}`,ref:d,children:c}),Z1=Km?.default??Km;try{W1.register("modules/imageResize",Z1)}catch(e){console.warn("quill-image-resize-module-react 로드 실패:",e)}const Nl=e=>tO.sanitize(e??"",{ALLOWED_TAGS:["p","br","div","span","strong","b","em","i","u","s","blockquote","pre","code","ul","ol","li","h1","h2","h3","h4","h5","h6","a","img"],ALLOWED_ATTR:["style","class","href","target","rel","src","alt","width","height","data-*","align"],ALLOWED_URI_REGEXP:/^(?:(?:https?|data|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),Dl=v.forwardRef(({border:e=!0,editorProps:t,value:r,defaultValue:n,onChange:i,onBlur:a,disabled:s,placeholder:l},c)=>{const{isEditing:d=!0,title:u,containerHeight:f="100%"}=t||{},h=v.useRef(null),g=v.useMemo(()=>{const P={toolbar:d?[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["link","image"],["clean"]]:!1};return Z1?{...P,imageResize:{parchment:W1.import("parchment"),modules:["Resize","DisplaySize","Toolbar"],displayStyles:{backgroundColor:"black",border:"none",color:"white"}}}:P},[d]),m=v.useMemo(()=>["header","bold","italic","underline","strike","color","background","list","bullet","indent","align","link","image","width","height"],[]),x=r!==void 0,[y,w]=v.useState(n??""),b=x?r:y,j=v.useCallback((P,E,S,O)=>{const k=Nl(P??"");x||w(k),i?.(k,E,S,O)},[x,i]);return v.useImperativeHandle(c,()=>({getHTML:()=>b??"",getText:()=>h.current?.getEditor()?.getText()??"",insertHTML:P=>{const E=h.current?.getEditor();if(!E)return;const S=E.getSelection(!0),O=Nl(P??"");E.clipboard.dangerouslyPasteHTML(S?S.index:E.getLength(),O)},insertImage:(P,E)=>{const S=h.current?.getEditor();if(!S)return;const O=S.getSelection(!0),k=typeof P=="string"?P:"";S.insertEmbed(O?O.index:S.getLength(),"image",k,"user")},getQuill:()=>h.current?.getEditor?.()??null})),o.jsx(De,{border:e,style:{opacity:s?.6:1,pointerEvents:s?"none":"auto",height:typeof f=="number"?`${f}px`:f,minHeight:0},children:o.jsxs("div",{className:"bwg-editor-wrap",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[u&&o.jsx(Le,{...u,paddingBottom:10}),o.jsx(rO,{ref:h,theme:d?"snow":"bubble",readOnly:!d,value:b,onChange:j,onBlur:a,modules:g,formats:m,style:{width:"100%",display:"flex",flexDirection:"column",minHeight:0,flex:"1"},placeholder:l},d?"snow":"bubble")]})})}),CO=(e,t,r,n)=>Nl(e??""),SO=({itemProps:e,...t})=>{const{rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s}=e;return o.jsx(p.Form.Item,{valuePropName:"value",trigger:"onChange",getValueFromEvent:CO,normalize:l=>l??"",rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s,children:o.jsx(Dl,{...t})})},jO=e=>{const{itemProps:t,onChange:r,editorProps:n,...i}=e,a=p.Form.useFormInstance();if(t?.name!=null){const s=t.name;return o.jsxs(o.Fragment,{children:[o.jsx(p.Form.Item,{hidden:!0,name:s,rules:t.rules,normalize:l=>l??"",children:o.jsx("input",{type:"hidden"})}),o.jsx(Dl,{...i,editorProps:n,value:a.getFieldValue(s)??"",onChange:(l,c,d,u)=>{const f=Nl(l??"");a.setFieldValue(s,f),r?.(f,c,d,u)},onBlur:()=>{a.validateFields([s]).catch(()=>{})}})]})}return o.jsx(Dl,{...e})},Ph=Object.assign(jO,{FormItem:SO,Core:Dl}),To=v.forwardRef(({currentPage:e,totalPages:t,pageSize:r=10,totalData:n,onPageChange:i,pageSizeOptions:a=[10,20,50,100],gridRef:s,mode:l="client",onServerPageChange:c},d)=>{const[u,f]=v.useState(r),[h,g]=v.useState(1),[m,x]=v.useState(r),[y,w]=v.useState(0);v.useEffect(()=>{f(r)},[r]),v.useEffect(()=>{f(r)},[]),v.useImperativeHandle(d,()=>({currentPage:h,pageSize:m,totalData:y,totalPages:Math.ceil(y/m),setPage:D=>{g(D),c?.(D,m)},setPageSize:D=>{x(D),g(1),c?.(1,D)},setTotalData:D=>{w(D)},reset:()=>{g(1),x(r),w(0)}}),[h,m,y,c,r]);const b=l==="client",j=b?(e||0)+1:h,P=b?(t||0)>0:y>0,S=b?P?Math.ceil((n||0)/u):0:Math.ceil(y/m),O=b?P&&n||0:y,k=Math.min(j,S||1),M=`${u}-${S}-${k}`,A=D=>{b?i?.(D-1):(g(D),c?.(D,m))},_=D=>{if(b){f(D);try{s?.current?.gridView?(s.current.gridView.setPaging(!0,D),s.current.gridView.setPage(0)):i?.(0)}catch(B){console.warn("페이지 사이즈 변경 중 오류:",B),i?.(0)}}else x(D),g(1),c?.(1,D)};return o.jsxs("div",{className:"bwg-pagination-container",style:{padding:"10px",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid #dddddd",position:"relative"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx("span",{style:{fontSize:"12px",color:"#333333"},children:"페이지당"}),o.jsx("select",{value:b?u:m,onChange:D=>_(Number(D.target.value)),disabled:!P,style:{padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"12px",color:"#333333",opacity:P?1:.5},children:a.map(D=>o.jsxs("option",{value:D,children:[D,"개"]},D))}),o.jsxs("span",{style:{fontSize:"12px",color:"#666",opacity:P?1:.5},children:["/ 총 ",O,"개"]})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultBorderColor:"#e8e8e8",defaultHoverBorderColor:"var(--primary-color)",defaultHoverColor:"var(--text-primary)",contentFontSize:13,defaultColor:"var(--text-primary)",paddingInline:0}}},children:[o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>A(1),disabled:!P||k===1,style:{width:"26px",height:"26px",border:0,background:!P||k===1?"#f1f1f1":"white",cursor:!P||k===1?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L7 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M17 17L12 12L17 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),o.jsx(p.Button,{onClick:()=>A(k-1),disabled:!P||k===1,style:{width:"26px",height:"26px",border:0,background:!P||k===1?"#f1f1f1":"white",cursor:!P||k===1?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M14 17L9 12L14 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:(()=>{if(!P||S===0)return o.jsx(p.Button,{disabled:!0,style:{width:"26px",height:"26px"},children:"1"});const D=5;let B=1,H=Math.min(D,S);k>3&&S>D&&(B=Math.max(1,k-2),H=Math.min(S,B+D-1),H===S&&(B=Math.max(1,H-D+1)));const T=[];for(let N=B;N<=H;N++)T.push(o.jsx(p.Button,{onClick:()=>A(N),style:{width:"26px",height:"26px",background:k===N?"var(--primary-color)":"#ffffff",color:k===N?"#ffffff":"#333333",cursor:"pointer"},children:N},N));return T})()},M),o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>A(k+1),disabled:!P||k>=S,style:{width:"26px",height:"26px",border:0,background:!P||k>=S?"#f1f1f1":"white",cursor:!P||k>=S?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M10 17L15 12L10 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),o.jsx(p.Button,{onClick:()=>A(S),disabled:!P||k>=S,style:{width:"26px",height:"26px",border:0,background:!P||k>=S?"#f1f1f1":"white",cursor:!P||k>=S?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L17 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7 17L12 12L7 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})]})})]})});To.displayName="BwgPagination";const EO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",PO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",OO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"},{label:"레이아웃 초기화",tag:"initLayout"}],kO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"},{label:"레이아웃 초기화",tag:"initLayout"}],TO=({children:e})=>{const[t,r]=v.useState(!1),[n,i]=v.useState(null);return t?o.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:o.jsx(p.Alert,{message:"리얼그리드 로드 실패",description:o.jsxs("div",{children:[o.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),o.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),o.jsx(p.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),i(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):o.jsx(MO,{onError:a=>{console.error("BwgGrid 에러:",a),i(a),r(!0)},children:e})};class MO extends v.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const Fe=v.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:i,gridEvents:a,bindRef:s,gridContext:l,renderers:c,gridInitCallback:d,gridId:u},f)=>{const h=v.useRef(null),g=v.useRef(new Map),m=v.useRef(null),{gridSize:x}=it.useUserStore(),y=ct.useGridSizeConfig(),b=ct.useBwgView()?.menuId||"",j=(W,te,ae,re)=>{let G=[],se=[];const K="treeNode";for(let ee in W){let Q=W[ee];G[Q[ae]]=W[ee];let de=G[Q[te]];if(de==null||de=="-"){se.push(Q);continue}de[K]==null&&(de[K]=[]),de[K].push(Q)}return se},P=v.useCallback(W=>{const te=re=>{const G=[];return re.forEach(se=>{se.children&&se.children.length>0?G.push(...te(se.children)):G.push(se)}),G};return te(W).map(re=>({fieldName:re.fieldName,dataType:re.dataType||"text"}))},[]),E=v.useCallback(W=>{const te=re=>{const G=[];return re.forEach(se=>{se.children&&se.children.length>0?G.push(...te(se.children)):G.push(se)}),G};return te(W).map(re=>({...re,header:{...re.header,template:re.required?`<img src='${PO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:re.editable?`<img src='${EO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:re.header?.text??""},text:re.header?.text||""},styleName:re.dataType==="number"?"right":re.styleName||"center"}))},[]);v.useImperativeHandle(f,()=>({addAllData(W,te){const ae=h.current?.gridView.getCurrent().dataRow;if(h.current?.dataProvider instanceof Ct.LocalDataProvider){h.current.dataProvider.clearRows();try{h.current?.gridView.showLoading(),h.current.dataProvider.setRows(W)}catch(re){console.error("fillJsonData 오류:",re)}finally{h.current?.gridView.closeLoading()}}if(h.current?.dataProvider instanceof Ct.LocalTreeDataProvider){if(h.current.dataProvider.clearRows(),te?.treeOption?.dataField==null||te?.treeOption?.parentField==null)return;const re={rows:"treeNode"};try{h.current?.gridView.showLoading();let G=j(W,te.treeOption?.parentField,te.treeOption?.dataField);h.current.dataProvider.fillJsonData({treeNode:G},re),te.treeOption.isExpand&&h.current.gridView?.expandAll()}catch(G){console.error("fillJsonData 오류:",G)}finally{h.current?.gridView.closeLoading()}}te?.isCurrent?h.current?.gridView.setCurrent({dataRow:ae}):h.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>h.current,getCurrentRow:()=>h.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>h.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(W){h.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!W?.indenting,header:"default",footer:"default",sheetName:"",fileName:W?.fileName||"sample.xlsx",...W})},getGridSaveData:()=>{const W=h.current?.dataProvider?.getAllStateRows();if(W===void 0)return[{}];let te=[];if(W.created!==void 0&&W.created.length>0)for(const ae in W.created){let re=h.current?.dataProvider?.getJsonRow(W.created[ae]);re={...re,iudFlag:"I"},te.push(re)}if(W.updated!==void 0&&W.updated.length>0)for(const ae in W.updated){let re=h.current?.dataProvider?.getJsonRow(W.updated[ae]);re={...re,iudFlag:"U"},te.push(re)}if(W.deleted!==void 0&&W.deleted.length>0)for(const ae in W.deleted){let re=h.current?.dataProvider?.getJsonRow(W.deleted[ae]);re={...re,iudFlag:"D"},te.push(re)}return te},deleteGridData:()=>{h?.current?.gridView?.getCheckedItems()?.map(te=>{let ae=h?.current?.gridView?.getDataRow(te)??-1;const re=h?.current?.dataProvider?.getRowState(ae);re==Ct.RowState.DELETED?(h?.current?.dataProvider?.setRowState(ae,g.current.get(te)??Ct.RowState.NONE),g.current.delete(te)):re==Ct.RowState.CREATED?h?.current?.dataProvider?.setRowState(ae,Ct.RowState.CREATE_AND_DELETED):re==Ct.RowState.CREATE_AND_DELETED?h?.current?.dataProvider?.setRowState(ae,Ct.RowState.CREATED):(g.current.set(te,re??Ct.RowState.NONE),h?.current?.dataProvider?.setRowState(ae,Ct.RowState.DELETED)),h?.current?.gridView?.checkItem(te,!1)})},_oriRowState:[{}],dp:h.current?.dataProvider??null,vw:h.current?.gridView??null}));const S=v.useCallback((W,te,ae)=>{if(s!==void 0&&ae>=0){let re=W.getDataSource().getJsonRow(ae);s?.current?.setFieldsValue(re)}else s!==void 0&&ae<0&&s?.current?.resetFields();W.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(W,te,ae)},[s,a]),O=v.useCallback((W,te,ae)=>{const re=te.fieldName??"";s?.current?.getFieldInstance(re)&&s?.current.setFieldValue(re,ae),a?.onEditChange&&a?.onEditChange(W,te,ae)},[s,a]),k=v.useCallback((W,te,ae)=>{const re=W.getOrgFieldName(ae),G=W.getValue(te,ae);s?.current?.setFieldValue(re,G)},[s]),M=v.useCallback((W,te,ae,re)=>{const G=W.getColumn(re).name??"",se=W.getValue(te,re);s?.current?.getFieldInstance(G)&&s?.current.setFieldValue(G,se),a?.onCellEdited&&a?.onCellEdited(W,te,ae,re)},[s,a]),A=v.useCallback((W,te,ae,re)=>{if(typeof te.dataRow=="number"&&te.dataRow!=-1){var G=W.getDataSource().getRowState(te.dataRow);if(G=="deleted"||G=="createAndDeleted")return!1}return a?.onShowEditor!=null&&a?.onShowEditor(W,te,ae,re),!0},[s,a]),_=v.useCallback(W=>{if(!h.current)return;const te=h.current.gridView,ae=te.getDataSource();if(i?.container?.page){const re=te.getPage(),G=te.getPageCount(),se=ae.getRowCount();Z({currentPage:re,totalPages:G,totalData:se})}},[i?.container?.page]),D=v.useCallback(()=>{if(!h.current)return;const W=h.current.gridView,te=W.getDataSource();__SYS_CD__;const ae=["onKeyDown"],re=["onRowInserted"];Object.keys(a??{}).map(G=>{ae.includes(G)?W[G+"Add"]=a?.[G]:W[G]=a?.[G],re.includes(G)?te[G+"Add"]=a?.[G]:te[G]=a?.[G]}),te instanceof Ct.LocalDataProvider&&(te.onRowInserted=(G,se)=>{se<0||(setTimeout(function(){W?.setCurrent({dataRow:se})},1),G.onRowInsertedAdd!==void 0&&G.onRowInsertedAdd(G,se))}),W.onKeyDown=function(G,se){if(se.code=="Space"){let K=G.getSelectedItems(!0);for(const ee in K)G.isCheckable(K[ee])&&(G.isCheckedItem(K[ee])?G.checkItem(K[ee],!1,!1):G.checkItem(K[ee],!0,!1))}return G.onKeyDownAdd!==void 0&&G.onKeyDownAdd(G,se),!0},h.current.gridView.onCurrentRowChanged=S,h.current.gridView.onEditChange=O,h.current.gridView.getDataSource().onValueChanged=k,h.current.gridView.onCellEdited=M,h.current.gridView.onShowEditor=A,h.current.gridView.onDataLoadComplated=_,h.current.gridView.onLayoutPropertyChanged=function(G,se,K,ee,Q){const de=se?.column||"알 수 없음";console.log("🔵 [BwgGrid] 레이아웃 속성 변경 감지:",{columnName:de,property:K,oldValue:ee,newValue:Q,layout:se}),K==="visible"&&console.log(`📌 컬럼 "${de}" ${Q?"표시":"숨김"}`),(K==="order"||K==="index")&&console.log(`📌 컬럼 "${de}" 위치 변경: ${ee} → ${Q}`),a?.onLayoutPropertyChanged&&a.onLayoutPropertyChanged(G,se,K,ee,Q)}},[S,O,k,M,A,_,u,b]),B=v.useCallback(W=>{if(!W)return;const te=u,ae=b,re=__SYS_CD__;try{W.gridView.setSortingOptions({enabled:!0}),W.gridView.sortMode=Ct.SortMode.EXPLICIT,W.gridView.editorOptions.viewGridInside=!0,W.gridView instanceof Ct.TreeView&&W.gridView.setTreeOptions({expandWhenSetData:Ct.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:Ct.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0});const G=()=>({0:25,1:30,2:43})[x];W.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:i?.display?.minRowHeight||25,maxRowHeight:i?.display?.maxRowHeight||100,rowHeight:G(),rowChangeDelay:i?.display?.rowChangeDelay||0,selectionStyle:i?.display?.selectionStyle||Ct.SelectionStyle.ROWS,fitStyle:i?.display?.fitStyle||Ct.GridFitStyle.FILL,useAlternateRowStyle:i?.display?.useAlternateRowStyle||!1}),W.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:i?.edit?.editable||!1,validateOnEdited:i?.edit?.validateOnEdited||!1}),W.gridView.setCopyOptions({singleMode:i?.copy?.singleMode||!1}),W.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),W.gridView.header.height=i?.header?.height||43,W.gridView.header.styleName=i?.header?.styleName||"bwgGridHeader",i?.container?.radio?W.gridView.setCheckBar({exclusive:i?.container?.radio||!1}):W.gridView.setCheckBar({visible:i?.container?.check||!1,showAll:i?.container?.checkAll||!1}),W.gridView.setStateBar({visible:i?.container?.state||!1}),W.gridView.rowIndicator.visible=i?.container?.indicator||!1,W.gridView instanceof Ct.GridView&&(W.gridView.groupPanel.visible=i?.container?.panel||!1),W.gridView.setFooters({visible:i?.container?.footer||!1}),W.gridView.setHeader({visible:i?.container?.header||!0,showTooltip:i?.container?.headerShowTooltip||!1}),W.gridView.formatOptions.numberFormat="#,##0"}catch(G){console.log("그리드 옵션 설정 중 오류:",G)}try{W.gridView instanceof Ct.TreeView?W.gridView.setContextMenu(kO):W.gridView.setContextMenu(OO),W.gridView.onContextMenuItemClicked=function(G,se,K){if(!(!K||!K.column)){if(se.tag=="excel")$(G,{isTitle:!1},l?.excel);else if(se.tag=="showIndentExcel")$(G,{isTitle:!1,treeBlank:!0},l?.excel);else if(se.tag=="withTitleExcel")$(G,{isTitle:!0,treeBlank:!1},l?.excel);else if(se.tag=="filter")U(G,se);else if(se.tag=="fixedCol"){const Q=G.getDataSource().getFieldIndex(K.column);G.setFixedOptions({colCount:Q})}else if(se.tag=="fixedRow")G.setFixedOptions({rowCount:(K.itemIndex||0)+1});else if(se.tag=="fixedCancel")G.setFixedOptions({colCount:0,rowCount:0});else if(se.tag=="hide")G.layoutByName(K.column).visible=!1,G._hideCols||(G._hideCols=[]),G._hideCols[G._hideCols.length]=K.column;else if(se.tag=="hideClear"){if(G._hideCols&&G._hideCols.length>0){for(var ee=0;ee<G._hideCols.length;ee++)G.layoutByName(G._hideCols[ee]).visible=!0;G._hideCols=[]}}else if(se.tag=="initLayout"){if(te&&ae)try{oe.removeGridLayout(re,ae,te)}catch(Q){console.warn("[BwgGrid] 레이아웃 삭제 실패:",Q)}if(n){G.setColumns(n);const Q=n.filter(de=>de.visible!==!1).map(de=>de.fieldName||de.name);Q.length>0&&G.setColumnLayout(Q)}}}}}catch(G){console.log("컨텍스트 설정 중 오류:",G)}},[i,x,u,b]),H=W=>{if(!(!c||c.length===0))try{c.forEach(te=>{const{name:ae,renderer:re}=te;if(ae&&re){const G=typeof re=="function"?new re:re;W.gridView.registerCustomRenderer(ae,G)}})}catch(te){console.error("커스텀 렌더러 초기화 중 오류:",te)}},T=W=>{W.onPageChanged=(te,ae)=>{Z(re=>({...re,currentPage:ae}))},W.onPageCountChanged=(te,ae)=>{Z(re=>({...re,totalPages:ae}))}},N=W=>{h.current?.gridView&&h.current.gridView.setPage(W)},I=W=>{if(i?.layout?.colspan&&i.layout.colspan.length>0&&i?.layout?.colspan.forEach(te=>{const ae=W.gridView.layoutByColumn(te.fieldName);if(ae){const re=te.span;ae.spanCallback=function(G,se,K){return re}}}),n&&n.length>0&&n.some(ae=>ae.children&&ae.children.length>0))try{(()=>{const re=JSON.parse(JSON.stringify(n)),G=[],se=K=>{const ee=[];return K.children.map(Q=>{if(Q.children&&Q.children.length>0){const de=se(Q),ce=Q.header?.text||Q.fieldName,ye=W.gridView.getColumnProperty(Q.fieldName,"header");delete Q.children,delete Q.header;let be={name:Q.fieldName,header:{text:ye?.text||ce,template:ye?.template,values:ye?.values,visible:ye?.visible??!0},items:de,...Q};ee.push(be)}else ee.push(Q.fieldName)}),ee};re.map(K=>{if(K.children&&K.children.length>0){const ee=se(K),Q=K.header?.text||K.fieldName,de=K.header?.visible??!0,ce=W.gridView.getColumnProperty(K.fieldName,"header");delete K.children,delete K.header;const ye={name:K.fieldName,header:{text:ce?.text||Q,template:ce?.template,values:ce?.values,visible:ce?.visible||de},items:ee,...K};G.push(ye)}else G.push(K.fieldName)}),console.log("Final Layout!!",G),W.gridView.setColumnLayout(G)})()}catch(ae){console.error("컬럼 레이아웃 설정 오류:",ae)}},R=()=>{if(h.current){if(e==="nrml"){const W=h.current;if(B(W),H(W),n&&n.length>0){const te=P(n),ae=E(n);W.gridView.getDataSource().setFields(te),W.gridView.setColumns(ae)}if(I(W),i?.container?.page){const te=i?.pagingOption?.pageSize||10;W.gridView.setPaging(!0,te),T(W.gridView)}}else{const W=h.current;if(B(W),H(W),n&&n.length>0){const te=P(n),ae=E(n);W.gridView.getDataSource().setFields(te),W.gridView.setColumns(ae)}I(h.current)}setTimeout(()=>{if(d){const W=typeof f=="object"&&f!==null?f.current:null;d(W)}},0)}},$=(W,te,ae)=>{const re=W.getDataSource();let G=ae?.footer==null?"default":ae.footer;re.getRowCount()<1&&(G="hidden");let se={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!te?.treeBlank,footer:G,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:ae?.fileName||"sample.xlsx"};re instanceof Ct.LocalTreeDataProvider&&(se.indenting=!!te?.treeBlank),ae?.isCellMerge==!0&&(se.separateRows=!1),oe.isEmpty(ae?.sheetName)==!1&&(se.sheetName=ae?.sheetName),te?.isTitle&&(se.documentTitle={message:oe.isSafeEmpty(ae?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},oe.isEmpty(ae?.subTitle)==!1&&(se.documentSubtitle={message:ae?.subTitle,visible:!0,styleName:"center",height:20}),oe.isEmpty(ae?.tailTitle)==!1&&(se.documentTail={message:ae?.tailTitle,visible:!0,styleName:"documentStyle"})),W.exportGrid(se)},U=(W,te)=>{const ae=W.getDataSource(),re=ae.getOrgFieldNames();if(te.checked)for(var G=0;G<re.length;G++){let K=[],ee=ae.getDistinctValues(re[G])??[];if(ee.length==0)continue;let Q=W.columnByName(re[G]);for(var se=0;se<ee.length;se++){if(ee[se]==null)continue;let de=Q.values!=null&&Q.values.indexOf(ee[se])!=-1?Q?.labels?.[Q.values.indexOf(ee[se])]:ee[se];oe.isEmpty(de)&&(oe.isEmpty(ee[se])?de=" ":de=ee[se]);let ce="";ee[se]==null?ce="value="+ee[se]:ce="value='"+ee[se]+"'",K.push({name:de,criteria:ce})}W.setColumnFilters(re[G],K)}else for(var G=0;G<re.length;G++)W.clearColumnFilters(re[G]),W.activateAllColumnFilters(re[G],!1),W.clearColumnFilters(re[G])};v.useEffect(()=>{if(!h.current?.gridView)return;const W=()=>({0:25,1:30,2:43})[x],te=()=>({0:12,1:13,2:14})[x];h.current.gridView.setDisplayOptions({rowHeight:W()}),m.current&&m.current.style.setProperty("--bwg-grid-font-size",`${te()}px`)},[x,i?.display?.rowHeight]),v.useEffect(()=>{if(h.current&&h.current.gridView)if(e==="nrml"){const W=h.current;B(W)}else{const W=h.current;B(W)}},[e,i,B]),v.useEffect(()=>{!h.current||!n||n.length===0||R()},[n]),v.useEffect(()=>{h.current&&D()},[a,D]),v.useLayoutEffect(()=>{if(!(!u||!b||!h.current?.gridView))try{const W=oe.getGridLayout(__SYS_CD__,b,u);if(W){const te=Array.isArray(W)?W:W.layout||W;te&&(h.current.gridView.setColumnLayout(te),console.log(`[BwgGrid] 저장된 레이아웃 로드 완료: ${__SYS_CD__}/${b}/${u}`))}}catch(W){console.warn("[BwgGrid] 레이아웃 로드 실패:",W)}},[u,b]);const[V,F]=v.useState(!1),[q,ie]=v.useState(""),ue=v.useRef(null),[ge,Ee]=v.useState(!1),[Pe,Z]=v.useState({currentPage:0,totalPages:0,totalData:0});v.useEffect(()=>{Z({currentPage:0,totalPages:0,totalData:0})},[]),v.useEffect(()=>{V&&setTimeout(()=>{ue.current?.focus?.()},0)},[V]),v.useEffect(()=>()=>{if(h.current)try{const W=h.current;W.gridView&&(W.gridView.onDataLoadComplated=void 0,W.gridView.onCurrentRowChanged=void 0,W.gridView.onCellClicked=void 0,W.gridView.onCellDblClicked=void 0,W.gridView.onEditRowChanged=void 0,W.gridView.onItemChecked=void 0,W.gridView.onItemAllChecked=void 0,W.gridView.onColumnCheckedChanged=void 0,W.gridView.onCellButtonClicked=void 0,W.gridView.onEditChange=void 0,W.gridView.onCellEdited=void 0,W.gridView.onKeyUp=void 0,W.gridView.onKeyDown=void 0,W.gridView.onWheel=void 0,W.gridView.onValidateColumn=void 0,W.gridView.onValidateRow=void 0,W.gridView.onValidationFail=void 0,W.gridView.onRowInserting=void 0,W.gridView.onCellItemClicked=void 0,W.gridView.onShowEditor=void 0,W.gridView.onLayoutPropertyChanged=void 0,W.gridView.getDataSource()&&(W.gridView.getDataSource().clearRows(),W.gridView.getDataSource().setFields([])),W.gridView.getDataSource().clearRows())}catch(W){console.warn("⚠️ BwgGrid cleanup error:",W)}},[]);const ve=v.useCallback(()=>{const W=q;console.log("@@ handleSearchEnter:",W);const te=h.current?.gridView;if(!te)return;if(te.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(te.commit(),oe.isEmpty(W))return;const ae=te.getCurrent().itemIndex??-1;if(ae<0)return;const re={value:W,startIndex:ae+1,wrap:!0,caseSensitive:!1,partialMatch:!0},G=te.searchCell(re);te.setCurrent(G)},[q]),fe=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),F(!1))},[]),z=v.useCallback(W=>{W.ctrlKey&&W.code==="KeyF"&&(W.preventDefault(),ie(""),F(!V))},[V]),ne=v.useCallback(W=>{W.ctrlKey&&W.code==="KeyG"&&(W.preventDefault(),Ee(!ge))},[ge]),Y=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),Ee(!1))},[]),le=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 저장 실패: gridId 또는 menuId가 없습니다.");return}try{const te=h.current.gridView.saveColumnLayout();te&&(oe.saveGridLayout(__SYS_CD__,b,u,te),Ee(!1))}catch(W){console.warn("[BwgGrid] 레이아웃 저장 실패:",W)}},[u,b]),pe=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 초기화 실패: gridId 또는 menuId가 없습니다.");return}try{if(oe.removeGridLayout(__SYS_CD__,b,u),n){const W=E(n);h.current.gridView.setColumns(W);const te=n.filter(ae=>ae.visible!==!1).map(ae=>ae.fieldName||ae.name);te.length>0&&h.current.gridView.setColumnLayout(te)}console.log(`[BwgGrid] 레이아웃 초기화 완료: ${__SYS_CD__}/${b}/${u}`),Ee(!1)}catch(W){console.warn("[BwgGrid] 레이아웃 초기화 실패:",W)}},[u,b,n,E]),xe={searchEnter:ve,handleCloseKeyword:fe,handleSearch:z,handleLayoutManager:ne,handleCloseLayoutManager:Y,handleSaveLayout:le,handleResetLayout:pe},je=v.useMemo(()=>({0:12,1:13,2:14})[x],[x]),Me=v.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%","--bwg-grid-font-size":`${je}px`}),[t,je]);return o.jsxs(TO,{children:[o.jsxs("div",{ref:m,style:Me,className:r,onKeyDown:W=>{xe.handleSearch(W),xe.handleLayoutManager(W)},children:[V&&o.jsx("div",{className:"grid-search-box",style:{"--search-button-size":`${y.buttonSize}px`,"--search-button-font-size":`${y.fontSize}px`,"--search-box-width":`${y.width}px`},children:o.jsx(p.ConfigProvider,{componentSize:y.componentSize,theme:{token:{fontSize:y.fontSize}},children:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Input,{ref:ue,value:q,name:"srchField",autoComplete:"off",placeholder:"검색어를 입력하세요.",onKeyUp:W=>xe.handleCloseKeyword(W),onChange:W=>ie(W.target.value),onPressEnter:()=>xe.searchEnter()}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>F(!1)})]})})}),ge&&o.jsx("div",{className:"grid-layout-manager-box",style:{"--search-button-size":`${y.buttonSize}px`,"--search-button-font-size":`${y.fontSize}px`,"--search-box-width":`${y.width}px`},onKeyUp:W=>xe.handleCloseLayoutManager(W),children:o.jsx(p.ConfigProvider,{componentSize:y.componentSize,theme:{token:{fontSize:y.fontSize}},children:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Button,{type:"primary",icon:o.jsx(X.SaveOutlined,{}),onClick:xe.handleSaveLayout,disabled:!u||!b,children:"레이아웃 저장"}),o.jsx(p.Button,{icon:o.jsx(X.ReloadOutlined,{}),onClick:xe.handleResetLayout,disabled:!u||!b,children:"레이아웃 초기화"}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>Ee(!1)})]})})}),e==="nrml"?o.jsx(Ym.RealGridReact,{ref:h,autoGenerateField:!0,onInitialized:R}):o.jsx(Ym.RealTreeReact,{ref:h,autoGenerateField:!1,onInitialized:R})]}),i?.container?.page&&o.jsx(To,{currentPage:Pe.currentPage,totalPages:Pe.totalPages,pageSize:i?.pagingOption?.pageSize,totalData:Pe.totalData,onPageChange:N,pageSizeOptions:i?.pagingOption?.pageSizeOptions,gridRef:h})]})}),dn=v.memo(({title:e,border:t,children:r,titleChildren:n})=>{const i=v.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return o.jsxs(ze,{type:"vertical",children:[o.jsx(Le,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),o.jsx(De,{border:!1,children:o.jsx(p.ConfigProvider,{theme:i,children:r})})]})}),ze=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:i,children:a})=>o.jsx("div",{style:i,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),uv=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,i=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:Math.round(i),y:Math.round(a)}},RO=({buttons:e,onClose:t})=>{const r=(e||[]).filter(n=>n?.visible!==!1);return r.length===0?o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"}):o.jsxs("div",{style:{display:"flex",gap:6},children:[r.map(n=>o.jsx(p.Button,{type:n.type,disabled:!!n.disabled,loading:n.loading,className:n.className||"bwg-btn popup-btn",style:n.style,icon:n.icon,onClick:n.onClick,children:n.label},n.id)),o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"})]})},di=({popup:e,popupEvent:t,onClose:r,children:n,buttons:i})=>{const a=v.useRef(null),s=e?.popupTitle||"팝업",l=e?.width||800,c=e?.height||600,[d,u]=v.useState(l),[f,h]=v.useState(c),g=v.useMemo(()=>{const P=Math.max(0,(window.innerWidth-l)/2),E=Math.max(0,(window.innerHeight-c)/2);return{x:Math.round(P),y:Math.round(E)}},[l,c]),[m,x]=v.useState(g),y=(P,E)=>{const S=uv({x:E.x,y:E.y},{width:d,height:f});x(S)},w=(P,E,S,O,k)=>{const M={width:Math.round(parseInt(S.style.width,10)),height:Math.round(parseInt(S.style.height,10))},A=uv(k,M);u(M.width),h(M.height),x(A)},b=()=>a.current??document.body,j=typeof e?.zIndex=="number"?e.zIndex:3e3;return o.jsxs("div",{style:{position:"fixed",inset:0,zIndex:j},children:[o.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),o.jsxs(nO.Rnd,{className:"bwg-popup",size:{width:d,height:f},position:m,bounds:"window",minWidth:400,minHeight:300,onDragStop:y,onResizeStop:w,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[o.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:o.jsx(X1,{getPopupContainer:b,children:o.jsx(ze,{type:"vertical",children:o.jsx(p.Card,{className:"popup-drag-container",title:o.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:s}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:o.jsx(RO,{buttons:i,onClose:()=>e?.close?.()||r?.()}),children:o.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:o.jsx(ct.SearchBoxProvider,{children:n})})})})})}),o.jsx("div",{ref:a,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},wt=({children:e,className:t,style:r,marginBottom:n=8,gutter:i=[16,8],...a})=>o.jsx(p.Row,{...a,gutter:i,className:`bwg-row ${t}`,style:{marginBottom:`${n}px`,...r},children:e}),Oc=({children:e})=>o.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:o.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:e})}),AO=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:i,size:a="middle",pagination:s=!1,...l})=>o.jsx(p.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:i,size:a,pagination:s,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...l}),ar=e=>{const{type:t="card",animated:r=!0,...n}=e;return o.jsx(p.Tabs,{type:t,animated:r,...n})};function qf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function IO(e){if(Array.isArray(e))return qf(e)}function Q1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Oh(e,t){if(e){if(typeof e=="string")return qf(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qf(e,t):void 0}}function NO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ "use strict";const oe=require("../utils/index.cjs"),et=require("../stores/index.cjs"),o=require("react/jsx-runtime"),X=require("@ant-design/icons"),p=require("antd"),v=require("react"),L=require("../components/core/index.cjs"),ct=require("./provider-DrboIg2C.cjs"),tO=require("dompurify"),W1=require("quill"),rO=require("react-quill"),Km=require("quill-image-resize-module-react"),Ct=require("realgrid"),Ym=require("realgrid-react"),nO=require("react-rnd"),Oa=require("react-dom"),iO=require("./layout-components-Cz7Zets7.cjs"),qm=require("react-router-dom"),xl=require("dayjs");function U1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=U1(X),C=U1(v),Kf=({checkAuth:e=!1,buttons:t,gap:r=8})=>{const{user:n,getButtonAuth:i,setButtonAuth:a}=et.useUserStore(),s=ct.useServiceCodeValue("AUTH_BTNS"),[l,c]=v.useState({});v.useEffect(()=>{const u=e?e.menuId:void 0,f=e?e.grpId:void 0;if(!u||!f){c({});return}const h=i(u,f);if(h){c(h);return}oe.callService(s,{crprCd:n?.crprCd,userId:n?.userId,grpId:f.toUpperCase(),menuId:u}).then(g=>{const m=Array.isArray(g?.data)?g.data:Array.isArray(g)?g:[],x={};(m||[]).forEach(y=>{const w=String(y?.btnId||"").trim();if(!w)return;const b=y?.enblYn==null?!0:String(y.enblYn).toUpperCase()==="Y";x[w]=b}),a(u,f,x),c(x)}).catch(g=>{console.error(g),c({})})},[s,n?.crprCd,n?.userId,e?e.menuId:void 0,e?e.grpId:void 0,i,a]);const d=v.useMemo(()=>!t||t.length===0?null:t.filter(u=>u?.visible!==!1).map(u=>{const f=!!u.disabled;if(!e)return o.jsx(L.BwgButton,{type:u.type,disabled:f,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);const m=!(Object.prototype.hasOwnProperty.call(l,u.id)?!!l[u.id]:!1),x=f||m,y=o.jsx(L.BwgButton,{type:u.type,disabled:x,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);if(m){const w=o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o.jsx(X.ExclamationCircleFilled,{style:{color:"#faad14",fontSize:16}}),o.jsx("span",{style:{fontWeight:600},children:`'${u.label}' 버튼에 대한 사용 권한이 없습니다.`})]}),b=o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,paddingLeft:24},children:o.jsx("span",{style:{fontSize:12},children:"관리자에게 문의하세요."})});return o.jsx(p.Popover,{title:w,content:b,placement:"bottom",styles:{body:{backgroundColor:"#fffbe6"}},children:o.jsx("span",{children:y})},u.id)}return y}),[t,l,e]);return o.jsx(p.Flex,{gap:r,children:d})};var oO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Yf=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:i="middle",style:a,className:s,onButtonClick:l})=>{const c=ct.useServiceCodeValue("AUTH_BTNS"),{user:d}=et.useUserStore(),[u,f]=v.useState([]),[h,g]=v.useState(!0),[m,x]=v.useState(null),[y,w]=v.useState({}),b=async()=>{try{g(!0),x(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const E=await oe.callService(c,{userId:d?.userId,crprCd:d?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",E),E?.data&&Array.isArray(E.data)){const S=E.data.sort((O,k)=>O.btnSq-k.btnSq);f(S)}else f([])}catch(E){console.error("버튼 권한 조회 실패:",E),x("버튼 권한을 조회하는 중 오류가 발생했습니다."),f([])}finally{g(!1)}};v.useEffect(()=>{b()},[e,t]);const j=async(E,S)=>{w(O=>({...O,[E]:{loading:!0}}));try{const O=r?.[E];O?await O():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${E}`),l&&l(E,S,e)}catch(O){console.error("버튼 이벤트 실행 실패:",O),p.message.error("작업 중 오류가 발생했습니다.")}finally{w(O=>({...O,[E]:{loading:!1}}))}},P=E=>{const S=y[E.btnId]||{loading:!1};return o.jsxs(p.Button,{size:i,loading:S.loading,onClick:()=>j(E.btnId,E.btnNm),className:"bwg-btn",style:{...E.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[E.iconVal&&o.jsxs(o.Fragment,{children:[E.iconType==="ANTD"&&Ti[E.iconVal]&&v.createElement(Ti[E.iconVal],{style:{fontSize:"14px"}}),E.iconType!=="ANTD"&&o.jsx("span",{className:E.iconVal,style:{fontSize:"14px"}})]}),E.btnNm]},E.btnId)};return h?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Space,{direction:n==="vertical"?"vertical":"horizontal",size:i,children:o.jsx(p.Button,{loading:!0,size:i,children:"권한 조회 중..."})})}):m?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"권한 오류",description:m,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Flex,{gap:3,children:u.map(P)})})},sO=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:i=300,style:a,className:s})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return o.jsx("div",{style:a,className:s,children:e});const c=e.filter(g=>g&&g.length>0),d=v.useMemo(()=>{const g=c[0];if(!g||g.length===0)return{totalCols:0,baseWidth:0};let m=0;const x=[];g.forEach(w=>{const b=w,j=b?.props?.["data-colspan"]?parseInt(String(b.props["data-colspan"])):1;m+=j,x.push(j)});const y=m>0?100/m:0;return{totalCols:m,baseWidth:y,componentWidths:x}},[c]),u=(g,m,x)=>{const y=g,w=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1;switch(t){case"equal":return 100/x;case"auto":return 100/x;case"grid":return 100/d.totalCols*w;case"flex":default:const b=d.baseWidth*w;return Math.max(n,Math.min(i,b))}},f=g=>{if(!g||typeof g!="object")return g;const m=g;if(!m.props)return g;const y={...m.props.style||{},width:"100%"};return v.cloneElement(m,{...m.props,style:y})},h=(g,m)=>{if(!g||g.length===0)return null;const x=g.length;return t==="grid"?o.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${d.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:g.map((y,w)=>{const b=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1,j=f(y);return o.jsx("div",{style:{gridColumn:`span ${b}`,minWidth:`${n}px`},className:"form-component-wrapper",children:j},`row-${m}-col-${w}`)})},`row-${m}`):o.jsx(p.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:g.map((y,w)=>{const b=u(y,w,x),j=f(y),P=t==="flex"?{width:`${b}px`,minWidth:`${n}px`,maxWidth:`${i}px`,flexShrink:0}:{width:`${b}%`,minWidth:`${n}px`};return o.jsx("div",{style:P,className:"form-component-wrapper",children:j},`row-${m}-col-${w}`)})},`row-${m}`)};return o.jsx(p.Flex,{gap:"small",vertical:!0,style:a,className:s,children:c.map((g,m)=>h(g,m+1))})},$e=({children:e,className:t,style:r,...n})=>o.jsx(p.Col,{...n,className:`bwg-col ${t}`,style:r,children:e});var Qo={},Au={exports:{}},Gm;function Pc(){return Gm||(Gm=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Au)),Au.exports}var Jo={},Xm;function lO(){if(Xm)return Jo;Xm=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return Jo.default=e,Jo}var ea={},ta={},ra={},Iu={exports:{}},Nu={exports:{}},Du={exports:{}},_u={exports:{}},Zm;function K1(){return Zm||(Zm=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_u)),_u.exports}var Bu={exports:{}},Qm;function cO(){return Qm||(Qm=1,(function(e){var t=K1().default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Bu)),Bu.exports}var Jm;function uO(){return Jm||(Jm=1,(function(e){var t=K1().default,r=cO();function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Du)),Du.exports}var ev;function dO(){return ev||(ev=1,(function(e){var t=uO();function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Nu)),Nu.exports}var tv;function fO(){return tv||(tv=1,(function(e){var t=dO();function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Iu)),Iu.exports}var na={},rv;function pO(){return rv||(rv=1,Object.defineProperty(na,"__esModule",{value:!0}),na.commonLocale=void 0,na.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),na}var nv;function hO(){if(nv)return ra;nv=1;var e=Pc().default;Object.defineProperty(ra,"__esModule",{value:!0}),ra.default=void 0;var t=e(fO()),r=pO(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return ra.default=n,ra}var ia={},iv;function Y1(){if(iv)return ia;iv=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return ia.default=e,ia}var ov;function q1(){if(ov)return ta;ov=1;var e=Pc().default;Object.defineProperty(ta,"__esModule",{value:!0}),ta.default=void 0;var t=e(hO()),r=e(Y1());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return ta.default=n,ta}var av;function gO(){if(av)return ea;av=1;var e=Pc().default;Object.defineProperty(ea,"__esModule",{value:!0}),ea.default=void 0;var t=e(q1());return ea.default=t.default,ea}var sv;function mO(){if(sv)return Qo;sv=1;var e=Pc().default;Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var t=e(lO()),r=e(gO()),n=e(q1()),i=e(Y1());const a="${label} 유효하지 않은 ${type}",s={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:i.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return Qo.default=s,Qo}var $u,lv;function vO(){return lv||(lv=1,$u=mO()),$u}var yO=vO();const G1=wr(yO),X1=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:i})=>{const s=(()=>{const c={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm};switch(n){case"compact":return{...c,token:{...c.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...c,token:{...c.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...c,token:{...c.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),l={...s,...t,token:{...s.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)",buttonSolidCheckedBg:"var(--button-solid)",buttonSolidCheckedHoverBg:"var(--button-solid-hover)",buttonSolidCheckedActiveBg:"var(--button-solid-hover)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"},Tabs:{inkBarColor:"var(--primary-color)",itemSelectedColor:"var(--primary-color)",itemHoverColor:"var(--button-solid-hover)",itemActiveColor:"var(--button-solid-hover)",itemColor:"var(--text-primary)",horizontalItemGutter:0,horizontalItemPadding:"11px 24px"},Button:{borderColorDisabled:"var(--border-color)",defaultShadow:"none",dangerShadow:"none",iconGap:4},...t?.components??{}}};return o.jsx(p.ConfigProvider,{locale:G1,theme:l,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:i,children:e})},xO=({children:e})=>{const{activeDetailItem:t,openTabByMenuId:r}=et.useMenuViewStore();et.useMenuModelStore();const{componentSize:n}=et.useUserStore(),i=v.useCallback(()=>{console.log("handleMenuClick",t);const s=t?.prntInfo?.menuId;s&&r(s,void 0,{skipRefreshModal:!0})},[t?.prntInfo?.menuId,r]),a=v.useMemo(()=>({0:"12px",1:"14px",2:"16px"})[n],[n]);return o.jsx("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column"},children:o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[o.jsx(p.Breadcrumb,{style:{marginBottom:10,fontSize:a},separator:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M6.66675 11.3333L10.0001 7.99996L6.66675 4.66663",stroke:"#9A9A9A","stroke-linecap":"round","stroke-linejoin":"round"})}),items:[{title:t?.prntInfo?.menuId?o.jsx("span",{onClick:i,style:{fontSize:a,cursor:"pointer",color:"#1890ff",textDecoration:"none"},onMouseEnter:s=>{s.currentTarget.style.textDecoration="underline"},onMouseLeave:s=>{s.currentTarget.style.textDecoration="none"},children:t.prntInfo.menuNm}):o.jsx("span",{style:{fontSize:a},children:t?.prntInfo?.menuNm})},{title:o.jsx("span",{style:{fontSize:a,color:"#666"},children:t?.viewLabel})}]}),e]})})})},bO=5,wO=0,Le=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:i,marginBottom:a,children:s})=>{const l=Ti.AppstoreTwoTone,{componentSize:c}=et.useUserStore(),d=v.useMemo(()=>({0:5,1:4,2:3})[c],[c]);v.useMemo(()=>t?.type==="antd"&&t.icon&&Ti[t.icon]||l,[t?.type,t?.icon]);const u=(g,m)=>(g??m).toString().padStart(2,"0"),f=`pb${u(i,wO)}`,h=`mb${u(a,bO)}`;return o.jsx(p.Flex,{vertical:!0,style:{width:"100%"},children:o.jsxs("div",{className:`bwg-title-box ${f} ${h}`,style:{display:"flex",justifyContent:"space-between"},children:[o.jsx("div",{className:"bwg-title-box-left",children:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(p.Typography.Title,{level:d,children:o.jsx("span",{children:e})}),r&&o.jsx(p.Tooltip,{title:r.title,placement:r.placement,children:o.jsx(Ti.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),o.jsx("div",{className:"bwg-title-box-right",children:o.jsx(p.Flex,{gap:6,children:s})})]})})},{Panel:cv}=p.Collapse,ko=v.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:i},a)=>{const[s]=p.Form.useForm(),[l,c]=v.useState("1"),{componentSize:d}=et.useUserStore(),u=v.useMemo(()=>{const g={0:12,1:14,2:16},m={0:"small",1:"middle",2:"large"};return{fontSize:g[d],componentSize:m[d]}},[d]),f=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};v.useImperativeHandle(a,()=>({getFormData:()=>s.getFieldsValue(),setFormData:g=>{s.setFieldsValue(g)},resetForm:()=>{s.resetFields()},validateForm:async()=>{try{return{success:!0,data:await s.validateFields()}}catch(g){return{success:!1,error:g}}}}));const h=()=>{c(g=>g.includes("subRows")?g.filter(m=>m!=="subRows"):[...g,"subRows"])};return o.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[i&&o.jsx(Le,{title:i.title,children:i.buttons}),o.jsx(p.ConfigProvider,{componentSize:u.componentSize,theme:{token:{fontSize:u.fontSize},components:{Collapse:{}}},children:o.jsx(p.Form,{form:s,layout:"inline",style:{width:"100%",fontSize:`${u.fontSize}px`},labelCol:f(),labelAlign:"left",children:o.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&o.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:l.includes("subRows")?o.jsx(p.Tooltip,{title:"접기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),o.jsxs(p.Collapse,{activeKey:["reqRows",...l.includes("subRows")?["subRows"]:[]],onChange:c,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&o.jsx(cv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&o.jsx(cv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})]})})})]})}),un=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!1,shotSettingButton:i=!0,styles:a,...s})=>{const[l,c]=v.useState(!0),[d,u]=v.useState(()=>{const w=s.placement;return w==="left"||w==="right"||w==="top"||w==="bottom"?w:"bottom"}),[f,h]=v.useState(!1),m=(w=>{const b={wrapper:{...s.width&&{width:s.width},...s.height&&{height:s.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(w){case"bottom":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...b.header,borderRadius:"30px 30px 0 0"}};case"top":return{...b,wrapper:{...b.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...b.header}};case"left":return{...b,wrapper:{...b.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...b.header,borderRadius:"0 30px 0 0"}};case"right":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...b.header,borderRadius:"30px 0 0 0"}};default:return b}})(d),x={wrapper:{...m?.wrapper,...a?.wrapper},content:{...m?.content,...a?.content},header:{...m?.header,...a?.header}},y=()=>{const w=[];if(i){const b=[{key:"top",label:"상단",icon:o.jsx(X.CaretUpOutlined,{})},{key:"right",label:"우측",icon:o.jsx(X.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:o.jsx(X.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:o.jsx(X.CaretLeftOutlined,{})}],j=o.jsx(p.Space.Compact,{children:b.map(P=>o.jsx(p.Button,{type:d===P.key?"primary":"default",size:"small",onClick:()=>{u(P.key),h(!1)},icon:P.icon},P.key))});w.push(o.jsx(p.Popover,{content:j,trigger:"click",placement:"left",open:f,onOpenChange:h,children:o.jsx(p.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:l?"배경 보기":"배경 숨기기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>c(!l)})},"eyes")),s.extra&&w.push(o.jsx("div",{style:{margin:"0 8px"},children:s.extra},"extra")),r&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:s.onClose,type:"text",size:"middle"})},"close")),w};return o.jsx(p.Drawer,{className:"main-drawer",footer:!0,...s,placement:d,styles:x,maskClosable:!1,closable:!1,mask:l,extra:o.jsx(p.Space,{size:"small",align:"center",children:y()}),afterOpenChange:w=>{w||(c(!0),u(s.placement)),s.afterOpenChange?.(w)},destroyOnHidden:!0,children:t?o.jsxs(ze,{type:"vertical",children:[o.jsxs(p.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[o.jsx("div",{children:t.title}),o.jsx(p.Flex,{gap:2,children:t.extra})]}),o.jsx(ko,{...t.searchBox}),o.jsx(p.Divider,{}),e]}):e})},De=({width:e="100%",height:t="100%",boxAlign:r,display:n="show",overflow:i,style:a,className:s,border:l=!0,children:c,ref:d})=>o.jsx("div",{style:{width:e,height:t,display:n==="show"?"":n,overflowX:i?.x,overflowY:i?.y,...a},className:`bwgview-content-box ${r?`content-box-${r}`:""} ${s||""} ${l?"":"none-box-st"}`,ref:d,children:c}),Z1=Km?.default??Km;try{W1.register("modules/imageResize",Z1)}catch(e){console.warn("quill-image-resize-module-react 로드 실패:",e)}const Nl=e=>tO.sanitize(e??"",{ALLOWED_TAGS:["p","br","div","span","strong","b","em","i","u","s","blockquote","pre","code","ul","ol","li","h1","h2","h3","h4","h5","h6","a","img"],ALLOWED_ATTR:["style","class","href","target","rel","src","alt","width","height","data-*","align"],ALLOWED_URI_REGEXP:/^(?:(?:https?|data|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),Dl=v.forwardRef(({border:e=!0,editorProps:t,value:r,defaultValue:n,onChange:i,onBlur:a,disabled:s,placeholder:l},c)=>{const{isEditing:d=!0,title:u,containerHeight:f="100%"}=t||{},h=v.useRef(null),g=v.useMemo(()=>{const P={toolbar:d?[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["link","image"],["clean"]]:!1};return Z1?{...P,imageResize:{parchment:W1.import("parchment"),modules:["Resize","DisplaySize","Toolbar"],displayStyles:{backgroundColor:"black",border:"none",color:"white"}}}:P},[d]),m=v.useMemo(()=>["header","bold","italic","underline","strike","color","background","list","bullet","indent","align","link","image","width","height"],[]),x=r!==void 0,[y,w]=v.useState(n??""),b=x?r:y,j=v.useCallback((P,E,S,O)=>{const k=Nl(P??"");x||w(k),i?.(k,E,S,O)},[x,i]);return v.useImperativeHandle(c,()=>({getHTML:()=>b??"",getText:()=>h.current?.getEditor()?.getText()??"",insertHTML:P=>{const E=h.current?.getEditor();if(!E)return;const S=E.getSelection(!0),O=Nl(P??"");E.clipboard.dangerouslyPasteHTML(S?S.index:E.getLength(),O)},insertImage:(P,E)=>{const S=h.current?.getEditor();if(!S)return;const O=S.getSelection(!0),k=typeof P=="string"?P:"";S.insertEmbed(O?O.index:S.getLength(),"image",k,"user")},getQuill:()=>h.current?.getEditor?.()??null})),o.jsx(De,{border:e,style:{opacity:s?.6:1,pointerEvents:s?"none":"auto",height:typeof f=="number"?`${f}px`:f,minHeight:0},children:o.jsxs("div",{className:"bwg-editor-wrap",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[u&&o.jsx(Le,{...u,paddingBottom:10}),o.jsx(rO,{ref:h,theme:d?"snow":"bubble",readOnly:!d,value:b,onChange:j,onBlur:a,modules:g,formats:m,style:{width:"100%",display:"flex",flexDirection:"column",minHeight:0,flex:"1"},placeholder:l},d?"snow":"bubble")]})})}),CO=(e,t,r,n)=>Nl(e??""),SO=({itemProps:e,...t})=>{const{rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s}=e;return o.jsx(p.Form.Item,{valuePropName:"value",trigger:"onChange",getValueFromEvent:CO,normalize:l=>l??"",rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s,children:o.jsx(Dl,{...t})})},jO=e=>{const{itemProps:t,onChange:r,editorProps:n,...i}=e,a=p.Form.useFormInstance();if(t?.name!=null){const s=t.name;return o.jsxs(o.Fragment,{children:[o.jsx(p.Form.Item,{hidden:!0,name:s,rules:t.rules,normalize:l=>l??"",children:o.jsx("input",{type:"hidden"})}),o.jsx(Dl,{...i,editorProps:n,value:a.getFieldValue(s)??"",onChange:(l,c,d,u)=>{const f=Nl(l??"");a.setFieldValue(s,f),r?.(f,c,d,u)},onBlur:()=>{a.validateFields([s]).catch(()=>{})}})]})}return o.jsx(Dl,{...e})},Ph=Object.assign(jO,{FormItem:SO,Core:Dl}),To=v.forwardRef(({currentPage:e,totalPages:t,pageSize:r=10,totalData:n,onPageChange:i,pageSizeOptions:a=[10,20,50,100],gridRef:s,mode:l="client",onServerPageChange:c},d)=>{const[u,f]=v.useState(r),[h,g]=v.useState(1),[m,x]=v.useState(r),[y,w]=v.useState(0);v.useEffect(()=>{f(r)},[r]),v.useEffect(()=>{f(r)},[]),v.useImperativeHandle(d,()=>({currentPage:h,pageSize:m,totalData:y,totalPages:Math.ceil(y/m),setPage:D=>{g(D),c?.(D,m)},setPageSize:D=>{x(D),g(1),c?.(1,D)},setTotalData:D=>{w(D)},reset:()=>{g(1),x(r),w(0)}}),[h,m,y,c,r]);const b=l==="client",j=b?(e||0)+1:h,P=b?(t||0)>0:y>0,S=b?P?Math.ceil((n||0)/u):0:Math.ceil(y/m),O=b?P&&n||0:y,k=Math.min(j,S||1),M=`${u}-${S}-${k}`,A=D=>{b?i?.(D-1):(g(D),c?.(D,m))},_=D=>{if(b){f(D);try{s?.current?.gridView?(s.current.gridView.setPaging(!0,D),s.current.gridView.setPage(0)):i?.(0)}catch(B){console.warn("페이지 사이즈 변경 중 오류:",B),i?.(0)}}else x(D),g(1),c?.(1,D)};return o.jsxs("div",{className:"bwg-pagination-container",style:{padding:"10px",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid #dddddd",position:"relative"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx("span",{style:{fontSize:"12px",color:"#333333"},children:"페이지당"}),o.jsx("select",{value:b?u:m,onChange:D=>_(Number(D.target.value)),disabled:!P,style:{padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"12px",color:"#333333",opacity:P?1:.5},children:a.map(D=>o.jsxs("option",{value:D,children:[D,"개"]},D))}),o.jsxs("span",{style:{fontSize:"12px",color:"#666",opacity:P?1:.5},children:["/ 총 ",O,"개"]})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultBorderColor:"#e8e8e8",defaultHoverBorderColor:"var(--primary-color)",defaultHoverColor:"var(--text-primary)",contentFontSize:13,defaultColor:"var(--text-primary)",paddingInline:0}}},children:[o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>A(1),disabled:!P||k===1,style:{width:"26px",height:"26px",border:0,background:!P||k===1?"#f1f1f1":"white",cursor:!P||k===1?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L7 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M17 17L12 12L17 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),o.jsx(p.Button,{onClick:()=>A(k-1),disabled:!P||k===1,style:{width:"26px",height:"26px",border:0,background:!P||k===1?"#f1f1f1":"white",cursor:!P||k===1?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M14 17L9 12L14 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:(()=>{if(!P||S===0)return o.jsx(p.Button,{disabled:!0,style:{width:"26px",height:"26px"},children:"1"});const D=5;let B=1,H=Math.min(D,S);k>3&&S>D&&(B=Math.max(1,k-2),H=Math.min(S,B+D-1),H===S&&(B=Math.max(1,H-D+1)));const T=[];for(let N=B;N<=H;N++)T.push(o.jsx(p.Button,{onClick:()=>A(N),style:{width:"26px",height:"26px",background:k===N?"var(--primary-color)":"#ffffff",color:k===N?"#ffffff":"#333333",cursor:"pointer"},children:N},N));return T})()},M),o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>A(k+1),disabled:!P||k>=S,style:{width:"26px",height:"26px",border:0,background:!P||k>=S?"#f1f1f1":"white",cursor:!P||k>=S?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M10 17L15 12L10 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),o.jsx(p.Button,{onClick:()=>A(S),disabled:!P||k>=S,style:{width:"26px",height:"26px",border:0,background:!P||k>=S?"#f1f1f1":"white",cursor:!P||k>=S?"not-allowed":"pointer",opacity:P?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L17 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7 17L12 12L7 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})]})})]})});To.displayName="BwgPagination";const EO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",PO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",OO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"},{label:"레이아웃 초기화",tag:"initLayout"}],kO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"},{label:"레이아웃 초기화",tag:"initLayout"}],TO=({children:e})=>{const[t,r]=v.useState(!1),[n,i]=v.useState(null);return t?o.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:o.jsx(p.Alert,{message:"리얼그리드 로드 실패",description:o.jsxs("div",{children:[o.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),o.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),o.jsx(p.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),i(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):o.jsx(MO,{onError:a=>{console.error("BwgGrid 에러:",a),i(a),r(!0)},children:e})};class MO extends v.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const Fe=v.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:i,gridEvents:a,bindRef:s,gridContext:l,renderers:c,gridInitCallback:d,gridId:u},f)=>{const h=v.useRef(null),g=v.useRef(new Map),m=v.useRef(null),{gridSize:x}=et.useUserStore(),y=ct.useGridSizeConfig(),b=ct.useBwgView()?.menuId||"",j=(W,te,ae,re)=>{let G=[],se=[];const K="treeNode";for(let ee in W){let Q=W[ee];G[Q[ae]]=W[ee];let de=G[Q[te]];if(de==null||de=="-"){se.push(Q);continue}de[K]==null&&(de[K]=[]),de[K].push(Q)}return se},P=v.useCallback(W=>{const te=re=>{const G=[];return re.forEach(se=>{se.children&&se.children.length>0?G.push(...te(se.children)):G.push(se)}),G};return te(W).map(re=>({fieldName:re.fieldName,dataType:re.dataType||"text"}))},[]),E=v.useCallback(W=>{const te=re=>{const G=[];return re.forEach(se=>{se.children&&se.children.length>0?G.push(...te(se.children)):G.push(se)}),G};return te(W).map(re=>({...re,header:{...re.header,template:re.required?`<img src='${PO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:re.editable?`<img src='${EO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:re.header?.text??""},text:re.header?.text||""},styleName:re.dataType==="number"?"right":re.styleName||"center"}))},[]);v.useImperativeHandle(f,()=>({addAllData(W,te){const ae=h.current?.gridView.getCurrent().dataRow;if(h.current?.dataProvider instanceof Ct.LocalDataProvider){h.current.dataProvider.clearRows();try{h.current?.gridView.showLoading(),h.current.dataProvider.setRows(W)}catch(re){console.error("fillJsonData 오류:",re)}finally{h.current?.gridView.closeLoading()}}if(h.current?.dataProvider instanceof Ct.LocalTreeDataProvider){if(h.current.dataProvider.clearRows(),te?.treeOption?.dataField==null||te?.treeOption?.parentField==null)return;const re={rows:"treeNode"};try{h.current?.gridView.showLoading();let G=j(W,te.treeOption?.parentField,te.treeOption?.dataField);h.current.dataProvider.fillJsonData({treeNode:G},re),te.treeOption.isExpand&&h.current.gridView?.expandAll()}catch(G){console.error("fillJsonData 오류:",G)}finally{h.current?.gridView.closeLoading()}}te?.isCurrent?h.current?.gridView.setCurrent({dataRow:ae}):h.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>h.current,getCurrentRow:()=>h.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>h.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(W){h.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!W?.indenting,header:"default",footer:"default",sheetName:"",fileName:W?.fileName||"sample.xlsx",...W})},getGridSaveData:()=>{const W=h.current?.dataProvider?.getAllStateRows();if(W===void 0)return[{}];let te=[];if(W.created!==void 0&&W.created.length>0)for(const ae in W.created){let re=h.current?.dataProvider?.getJsonRow(W.created[ae]);re={...re,iudFlag:"I"},te.push(re)}if(W.updated!==void 0&&W.updated.length>0)for(const ae in W.updated){let re=h.current?.dataProvider?.getJsonRow(W.updated[ae]);re={...re,iudFlag:"U"},te.push(re)}if(W.deleted!==void 0&&W.deleted.length>0)for(const ae in W.deleted){let re=h.current?.dataProvider?.getJsonRow(W.deleted[ae]);re={...re,iudFlag:"D"},te.push(re)}return te},deleteGridData:()=>{h?.current?.gridView?.getCheckedItems()?.map(te=>{let ae=h?.current?.gridView?.getDataRow(te)??-1;const re=h?.current?.dataProvider?.getRowState(ae);re==Ct.RowState.DELETED?(h?.current?.dataProvider?.setRowState(ae,g.current.get(te)??Ct.RowState.NONE),g.current.delete(te)):re==Ct.RowState.CREATED?h?.current?.dataProvider?.setRowState(ae,Ct.RowState.CREATE_AND_DELETED):re==Ct.RowState.CREATE_AND_DELETED?h?.current?.dataProvider?.setRowState(ae,Ct.RowState.CREATED):(g.current.set(te,re??Ct.RowState.NONE),h?.current?.dataProvider?.setRowState(ae,Ct.RowState.DELETED)),h?.current?.gridView?.checkItem(te,!1)})},_oriRowState:[{}],dp:h.current?.dataProvider??null,vw:h.current?.gridView??null}));const S=v.useCallback((W,te,ae)=>{if(s!==void 0&&ae>=0){let re=W.getDataSource().getJsonRow(ae);s?.current?.setFieldsValue(re)}else s!==void 0&&ae<0&&s?.current?.resetFields();W.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(W,te,ae)},[s,a]),O=v.useCallback((W,te,ae)=>{const re=te.fieldName??"";s?.current?.getFieldInstance(re)&&s?.current.setFieldValue(re,ae),a?.onEditChange&&a?.onEditChange(W,te,ae)},[s,a]),k=v.useCallback((W,te,ae)=>{const re=W.getOrgFieldName(ae),G=W.getValue(te,ae);s?.current?.setFieldValue(re,G)},[s]),M=v.useCallback((W,te,ae,re)=>{const G=W.getColumn(re).name??"",se=W.getValue(te,re);s?.current?.getFieldInstance(G)&&s?.current.setFieldValue(G,se),a?.onCellEdited&&a?.onCellEdited(W,te,ae,re)},[s,a]),A=v.useCallback((W,te,ae,re)=>{if(typeof te.dataRow=="number"&&te.dataRow!=-1){var G=W.getDataSource().getRowState(te.dataRow);if(G=="deleted"||G=="createAndDeleted")return!1}return a?.onShowEditor!=null&&a?.onShowEditor(W,te,ae,re),!0},[s,a]),_=v.useCallback(W=>{if(!h.current)return;const te=h.current.gridView,ae=te.getDataSource();if(i?.container?.page){const re=te.getPage(),G=te.getPageCount(),se=ae.getRowCount();Z({currentPage:re,totalPages:G,totalData:se})}},[i?.container?.page]),D=v.useCallback(()=>{if(!h.current)return;const W=h.current.gridView,te=W.getDataSource();__SYS_CD__;const ae=["onKeyDown"],re=["onRowInserted"];Object.keys(a??{}).map(G=>{ae.includes(G)?W[G+"Add"]=a?.[G]:W[G]=a?.[G],re.includes(G)?te[G+"Add"]=a?.[G]:te[G]=a?.[G]}),te instanceof Ct.LocalDataProvider&&(te.onRowInserted=(G,se)=>{se<0||(setTimeout(function(){W?.setCurrent({dataRow:se})},1),G.onRowInsertedAdd!==void 0&&G.onRowInsertedAdd(G,se))}),W.onKeyDown=function(G,se){if(se.code=="Space"){let K=G.getSelectedItems(!0);for(const ee in K)G.isCheckable(K[ee])&&(G.isCheckedItem(K[ee])?G.checkItem(K[ee],!1,!1):G.checkItem(K[ee],!0,!1))}return G.onKeyDownAdd!==void 0&&G.onKeyDownAdd(G,se),!0},h.current.gridView.onCurrentRowChanged=S,h.current.gridView.onEditChange=O,h.current.gridView.getDataSource().onValueChanged=k,h.current.gridView.onCellEdited=M,h.current.gridView.onShowEditor=A,h.current.gridView.onDataLoadComplated=_,h.current.gridView.onLayoutPropertyChanged=function(G,se,K,ee,Q){const de=se?.column||"알 수 없음";console.log("🔵 [BwgGrid] 레이아웃 속성 변경 감지:",{columnName:de,property:K,oldValue:ee,newValue:Q,layout:se}),K==="visible"&&console.log(`📌 컬럼 "${de}" ${Q?"표시":"숨김"}`),(K==="order"||K==="index")&&console.log(`📌 컬럼 "${de}" 위치 변경: ${ee} → ${Q}`),a?.onLayoutPropertyChanged&&a.onLayoutPropertyChanged(G,se,K,ee,Q)}},[S,O,k,M,A,_,u,b]),B=v.useCallback(W=>{if(!W)return;const te=u,ae=b,re=__SYS_CD__;try{W.gridView.setSortingOptions({enabled:!0}),W.gridView.sortMode=Ct.SortMode.EXPLICIT,W.gridView.editorOptions.viewGridInside=!0,W.gridView instanceof Ct.TreeView&&W.gridView.setTreeOptions({expandWhenSetData:Ct.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:Ct.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0});const G=()=>({0:25,1:30,2:43})[x];W.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:i?.display?.minRowHeight||25,maxRowHeight:i?.display?.maxRowHeight||100,rowHeight:G(),rowChangeDelay:i?.display?.rowChangeDelay||0,selectionStyle:i?.display?.selectionStyle||Ct.SelectionStyle.ROWS,fitStyle:i?.display?.fitStyle||Ct.GridFitStyle.FILL,useAlternateRowStyle:i?.display?.useAlternateRowStyle||!1}),W.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:i?.edit?.editable||!1,validateOnEdited:i?.edit?.validateOnEdited||!1}),W.gridView.setCopyOptions({singleMode:i?.copy?.singleMode||!1}),W.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),W.gridView.header.height=i?.header?.height||43,W.gridView.header.styleName=i?.header?.styleName||"bwgGridHeader",i?.container?.radio?W.gridView.setCheckBar({exclusive:i?.container?.radio||!1}):W.gridView.setCheckBar({visible:i?.container?.check||!1,showAll:i?.container?.checkAll||!1}),W.gridView.setStateBar({visible:i?.container?.state||!1}),W.gridView.rowIndicator.visible=i?.container?.indicator||!1,W.gridView instanceof Ct.GridView&&(W.gridView.groupPanel.visible=i?.container?.panel||!1),W.gridView.setFooters({visible:i?.container?.footer||!1}),W.gridView.setHeader({visible:i?.container?.header||!0,showTooltip:i?.container?.headerShowTooltip||!1}),W.gridView.formatOptions.numberFormat="#,##0"}catch(G){console.log("그리드 옵션 설정 중 오류:",G)}try{W.gridView instanceof Ct.TreeView?W.gridView.setContextMenu(kO):W.gridView.setContextMenu(OO),W.gridView.onContextMenuItemClicked=function(G,se,K){if(!(!K||!K.column)){if(se.tag=="excel")$(G,{isTitle:!1},l?.excel);else if(se.tag=="showIndentExcel")$(G,{isTitle:!1,treeBlank:!0},l?.excel);else if(se.tag=="withTitleExcel")$(G,{isTitle:!0,treeBlank:!1},l?.excel);else if(se.tag=="filter")U(G,se);else if(se.tag=="fixedCol"){const Q=G.getDataSource().getFieldIndex(K.column);G.setFixedOptions({colCount:Q})}else if(se.tag=="fixedRow")G.setFixedOptions({rowCount:(K.itemIndex||0)+1});else if(se.tag=="fixedCancel")G.setFixedOptions({colCount:0,rowCount:0});else if(se.tag=="hide")G.layoutByName(K.column).visible=!1,G._hideCols||(G._hideCols=[]),G._hideCols[G._hideCols.length]=K.column;else if(se.tag=="hideClear"){if(G._hideCols&&G._hideCols.length>0){for(var ee=0;ee<G._hideCols.length;ee++)G.layoutByName(G._hideCols[ee]).visible=!0;G._hideCols=[]}}else if(se.tag=="initLayout"){if(te&&ae)try{oe.removeGridLayout(re,ae,te)}catch(Q){console.warn("[BwgGrid] 레이아웃 삭제 실패:",Q)}if(n){G.setColumns(n);const Q=n.filter(de=>de.visible!==!1).map(de=>de.fieldName||de.name);Q.length>0&&G.setColumnLayout(Q)}}}}}catch(G){console.log("컨텍스트 설정 중 오류:",G)}},[i,x,u,b]),H=W=>{if(!(!c||c.length===0))try{c.forEach(te=>{const{name:ae,renderer:re}=te;if(ae&&re){const G=typeof re=="function"?new re:re;W.gridView.registerCustomRenderer(ae,G)}})}catch(te){console.error("커스텀 렌더러 초기화 중 오류:",te)}},T=W=>{W.onPageChanged=(te,ae)=>{Z(re=>({...re,currentPage:ae}))},W.onPageCountChanged=(te,ae)=>{Z(re=>({...re,totalPages:ae}))}},N=W=>{h.current?.gridView&&h.current.gridView.setPage(W)},I=W=>{if(i?.layout?.colspan&&i.layout.colspan.length>0&&i?.layout?.colspan.forEach(te=>{const ae=W.gridView.layoutByColumn(te.fieldName);if(ae){const re=te.span;ae.spanCallback=function(G,se,K){return re}}}),n&&n.length>0&&n.some(ae=>ae.children&&ae.children.length>0))try{(()=>{const re=JSON.parse(JSON.stringify(n)),G=[],se=K=>{const ee=[];return K.children.map(Q=>{if(Q.children&&Q.children.length>0){const de=se(Q),ce=Q.header?.text||Q.fieldName,ye=W.gridView.getColumnProperty(Q.fieldName,"header");delete Q.children,delete Q.header;let be={name:Q.fieldName,header:{text:ye?.text||ce,template:ye?.template,values:ye?.values,visible:ye?.visible??!0},items:de,...Q};ee.push(be)}else ee.push(Q.fieldName)}),ee};re.map(K=>{if(K.children&&K.children.length>0){const ee=se(K),Q=K.header?.text||K.fieldName,de=K.header?.visible??!0,ce=W.gridView.getColumnProperty(K.fieldName,"header");delete K.children,delete K.header;const ye={name:K.fieldName,header:{text:ce?.text||Q,template:ce?.template,values:ce?.values,visible:ce?.visible||de},items:ee,...K};G.push(ye)}else G.push(K.fieldName)}),console.log("Final Layout!!",G),W.gridView.setColumnLayout(G)})()}catch(ae){console.error("컬럼 레이아웃 설정 오류:",ae)}},R=()=>{if(h.current){if(e==="nrml"){const W=h.current;if(B(W),H(W),n&&n.length>0){const te=P(n),ae=E(n);W.gridView.getDataSource().setFields(te),W.gridView.setColumns(ae)}if(I(W),i?.container?.page){const te=i?.pagingOption?.pageSize||10;W.gridView.setPaging(!0,te),T(W.gridView)}}else{const W=h.current;if(B(W),H(W),n&&n.length>0){const te=P(n),ae=E(n);W.gridView.getDataSource().setFields(te),W.gridView.setColumns(ae)}I(h.current)}setTimeout(()=>{if(d){const W=typeof f=="object"&&f!==null?f.current:null;d(W)}},0)}},$=(W,te,ae)=>{const re=W.getDataSource();let G=ae?.footer==null?"default":ae.footer;re.getRowCount()<1&&(G="hidden");let se={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!te?.treeBlank,footer:G,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:ae?.fileName||"sample.xlsx"};re instanceof Ct.LocalTreeDataProvider&&(se.indenting=!!te?.treeBlank),ae?.isCellMerge==!0&&(se.separateRows=!1),oe.isEmpty(ae?.sheetName)==!1&&(se.sheetName=ae?.sheetName),te?.isTitle&&(se.documentTitle={message:oe.isSafeEmpty(ae?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},oe.isEmpty(ae?.subTitle)==!1&&(se.documentSubtitle={message:ae?.subTitle,visible:!0,styleName:"center",height:20}),oe.isEmpty(ae?.tailTitle)==!1&&(se.documentTail={message:ae?.tailTitle,visible:!0,styleName:"documentStyle"})),W.exportGrid(se)},U=(W,te)=>{const ae=W.getDataSource(),re=ae.getOrgFieldNames();if(te.checked)for(var G=0;G<re.length;G++){let K=[],ee=ae.getDistinctValues(re[G])??[];if(ee.length==0)continue;let Q=W.columnByName(re[G]);for(var se=0;se<ee.length;se++){if(ee[se]==null)continue;let de=Q.values!=null&&Q.values.indexOf(ee[se])!=-1?Q?.labels?.[Q.values.indexOf(ee[se])]:ee[se];oe.isEmpty(de)&&(oe.isEmpty(ee[se])?de=" ":de=ee[se]);let ce="";ee[se]==null?ce="value="+ee[se]:ce="value='"+ee[se]+"'",K.push({name:de,criteria:ce})}W.setColumnFilters(re[G],K)}else for(var G=0;G<re.length;G++)W.clearColumnFilters(re[G]),W.activateAllColumnFilters(re[G],!1),W.clearColumnFilters(re[G])};v.useEffect(()=>{if(!h.current?.gridView)return;const W=()=>({0:25,1:30,2:43})[x],te=()=>({0:12,1:13,2:14})[x];h.current.gridView.setDisplayOptions({rowHeight:W()}),m.current&&m.current.style.setProperty("--bwg-grid-font-size",`${te()}px`)},[x,i?.display?.rowHeight]),v.useEffect(()=>{if(h.current&&h.current.gridView)if(e==="nrml"){const W=h.current;B(W)}else{const W=h.current;B(W)}},[e,i,B]),v.useEffect(()=>{!h.current||!n||n.length===0||R()},[n]),v.useEffect(()=>{h.current&&D()},[a,D]),v.useLayoutEffect(()=>{if(!(!u||!b||!h.current?.gridView))try{const W=oe.getGridLayout(__SYS_CD__,b,u);if(W){const te=Array.isArray(W)?W:W.layout||W;te&&(h.current.gridView.setColumnLayout(te),console.log(`[BwgGrid] 저장된 레이아웃 로드 완료: ${__SYS_CD__}/${b}/${u}`))}}catch(W){console.warn("[BwgGrid] 레이아웃 로드 실패:",W)}},[u,b]);const[V,F]=v.useState(!1),[q,ie]=v.useState(""),ue=v.useRef(null),[ge,Ee]=v.useState(!1),[Pe,Z]=v.useState({currentPage:0,totalPages:0,totalData:0});v.useEffect(()=>{Z({currentPage:0,totalPages:0,totalData:0})},[]),v.useEffect(()=>{V&&setTimeout(()=>{ue.current?.focus?.()},0)},[V]),v.useEffect(()=>()=>{if(h.current)try{const W=h.current;W.gridView&&(W.gridView.onDataLoadComplated=void 0,W.gridView.onCurrentRowChanged=void 0,W.gridView.onCellClicked=void 0,W.gridView.onCellDblClicked=void 0,W.gridView.onEditRowChanged=void 0,W.gridView.onItemChecked=void 0,W.gridView.onItemAllChecked=void 0,W.gridView.onColumnCheckedChanged=void 0,W.gridView.onCellButtonClicked=void 0,W.gridView.onEditChange=void 0,W.gridView.onCellEdited=void 0,W.gridView.onKeyUp=void 0,W.gridView.onKeyDown=void 0,W.gridView.onWheel=void 0,W.gridView.onValidateColumn=void 0,W.gridView.onValidateRow=void 0,W.gridView.onValidationFail=void 0,W.gridView.onRowInserting=void 0,W.gridView.onCellItemClicked=void 0,W.gridView.onShowEditor=void 0,W.gridView.onLayoutPropertyChanged=void 0,W.gridView.getDataSource()&&(W.gridView.getDataSource().clearRows(),W.gridView.getDataSource().setFields([])),W.gridView.getDataSource().clearRows())}catch(W){console.warn("⚠️ BwgGrid cleanup error:",W)}},[]);const ve=v.useCallback(()=>{const W=q;console.log("@@ handleSearchEnter:",W);const te=h.current?.gridView;if(!te)return;if(te.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(te.commit(),oe.isEmpty(W))return;const ae=te.getCurrent().itemIndex??-1;if(ae<0)return;const re={value:W,startIndex:ae+1,wrap:!0,caseSensitive:!1,partialMatch:!0},G=te.searchCell(re);te.setCurrent(G)},[q]),fe=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),F(!1))},[]),z=v.useCallback(W=>{W.ctrlKey&&W.code==="KeyF"&&(W.preventDefault(),ie(""),F(!V))},[V]),ne=v.useCallback(W=>{W.ctrlKey&&W.code==="KeyG"&&(W.preventDefault(),Ee(!ge))},[ge]),Y=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),Ee(!1))},[]),le=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 저장 실패: gridId 또는 menuId가 없습니다.");return}try{const te=h.current.gridView.saveColumnLayout();te&&(oe.saveGridLayout(__SYS_CD__,b,u,te),Ee(!1))}catch(W){console.warn("[BwgGrid] 레이아웃 저장 실패:",W)}},[u,b]),pe=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 초기화 실패: gridId 또는 menuId가 없습니다.");return}try{if(oe.removeGridLayout(__SYS_CD__,b,u),n){const W=E(n);h.current.gridView.setColumns(W);const te=n.filter(ae=>ae.visible!==!1).map(ae=>ae.fieldName||ae.name);te.length>0&&h.current.gridView.setColumnLayout(te)}console.log(`[BwgGrid] 레이아웃 초기화 완료: ${__SYS_CD__}/${b}/${u}`),Ee(!1)}catch(W){console.warn("[BwgGrid] 레이아웃 초기화 실패:",W)}},[u,b,n,E]),xe={searchEnter:ve,handleCloseKeyword:fe,handleSearch:z,handleLayoutManager:ne,handleCloseLayoutManager:Y,handleSaveLayout:le,handleResetLayout:pe},je=v.useMemo(()=>({0:12,1:13,2:14})[x],[x]),Me=v.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%","--bwg-grid-font-size":`${je}px`}),[t,je]);return o.jsxs(TO,{children:[o.jsxs("div",{ref:m,style:Me,className:r,onKeyDown:W=>{xe.handleSearch(W),xe.handleLayoutManager(W)},children:[V&&o.jsx("div",{className:"grid-search-box",style:{"--search-button-size":`${y.buttonSize}px`,"--search-button-font-size":`${y.fontSize}px`,"--search-box-width":`${y.width}px`},children:o.jsx(p.ConfigProvider,{componentSize:y.componentSize,theme:{token:{fontSize:y.fontSize}},children:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Input,{ref:ue,value:q,name:"srchField",autoComplete:"off",placeholder:"검색어를 입력하세요.",onKeyUp:W=>xe.handleCloseKeyword(W),onChange:W=>ie(W.target.value),onPressEnter:()=>xe.searchEnter()}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>F(!1)})]})})}),ge&&o.jsx("div",{className:"grid-layout-manager-box",style:{"--search-button-size":`${y.buttonSize}px`,"--search-button-font-size":`${y.fontSize}px`,"--search-box-width":`${y.width}px`},onKeyUp:W=>xe.handleCloseLayoutManager(W),children:o.jsx(p.ConfigProvider,{componentSize:y.componentSize,theme:{token:{fontSize:y.fontSize}},children:o.jsxs(p.Flex,{vertical:!0,gap:3,children:[(!u||!b)&&o.jsx(p.Alert,{message:"그리드 설정정보가 완료되지 않았습니다. 관리자에게 문의하십시오",type:"warning",showIcon:!0,style:{fontSize:y.fontSize}}),o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Button,{type:"primary",icon:o.jsx(X.SaveOutlined,{}),onClick:xe.handleSaveLayout,disabled:!u||!b,children:"레이아웃 저장"}),o.jsx(p.Button,{icon:o.jsx(X.ReloadOutlined,{}),onClick:xe.handleResetLayout,disabled:!u||!b,children:"레이아웃 초기화"}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>Ee(!1)})]})]})})}),e==="nrml"?o.jsx(Ym.RealGridReact,{ref:h,autoGenerateField:!0,onInitialized:R}):o.jsx(Ym.RealTreeReact,{ref:h,autoGenerateField:!1,onInitialized:R})]}),i?.container?.page&&o.jsx(To,{currentPage:Pe.currentPage,totalPages:Pe.totalPages,pageSize:i?.pagingOption?.pageSize,totalData:Pe.totalData,onPageChange:N,pageSizeOptions:i?.pagingOption?.pageSizeOptions,gridRef:h})]})}),dn=v.memo(({title:e,border:t,children:r,titleChildren:n})=>{const i=v.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return o.jsxs(ze,{type:"vertical",children:[o.jsx(Le,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),o.jsx(De,{border:!1,children:o.jsx(p.ConfigProvider,{theme:i,children:r})})]})}),ze=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:i,children:a})=>o.jsx("div",{style:i,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),uv=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,i=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:Math.round(i),y:Math.round(a)}},RO=({buttons:e,onClose:t})=>{const r=(e||[]).filter(n=>n?.visible!==!1);return r.length===0?o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"}):o.jsxs("div",{style:{display:"flex",gap:6},children:[r.map(n=>o.jsx(p.Button,{type:n.type,disabled:!!n.disabled,loading:n.loading,className:n.className||"bwg-btn popup-btn",style:n.style,icon:n.icon,onClick:n.onClick,children:n.label},n.id)),o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"})]})},di=({popup:e,popupEvent:t,onClose:r,children:n,buttons:i})=>{const a=v.useRef(null),s=e?.popupTitle||"팝업",l=e?.width||800,c=e?.height||600,[d,u]=v.useState(l),[f,h]=v.useState(c),g=v.useMemo(()=>{const P=Math.max(0,(window.innerWidth-l)/2),E=Math.max(0,(window.innerHeight-c)/2);return{x:Math.round(P),y:Math.round(E)}},[l,c]),[m,x]=v.useState(g),y=(P,E)=>{const S=uv({x:E.x,y:E.y},{width:d,height:f});x(S)},w=(P,E,S,O,k)=>{const M={width:Math.round(parseInt(S.style.width,10)),height:Math.round(parseInt(S.style.height,10))},A=uv(k,M);u(M.width),h(M.height),x(A)},b=()=>a.current??document.body,j=typeof e?.zIndex=="number"?e.zIndex:3e3;return o.jsxs("div",{style:{position:"fixed",inset:0,zIndex:j},children:[o.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),o.jsxs(nO.Rnd,{className:"bwg-popup",size:{width:d,height:f},position:m,bounds:"window",minWidth:400,minHeight:300,onDragStop:y,onResizeStop:w,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[o.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:o.jsx(X1,{getPopupContainer:b,children:o.jsx(ze,{type:"vertical",children:o.jsx(p.Card,{className:"popup-drag-container",title:o.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:s}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:o.jsx(RO,{buttons:i,onClose:()=>e?.close?.()||r?.()}),children:o.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:o.jsx(ct.SearchBoxProvider,{children:n})})})})})}),o.jsx("div",{ref:a,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},wt=({children:e,className:t,style:r,marginBottom:n=8,gutter:i=[16,8],...a})=>o.jsx(p.Row,{...a,gutter:i,className:`bwg-row ${t}`,style:{marginBottom:`${n}px`,...r},children:e}),Oc=({children:e})=>o.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:o.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:e})}),AO=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:i,size:a="middle",pagination:s=!1,...l})=>o.jsx(p.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:i,size:a,pagination:s,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...l}),ar=e=>{const{type:t="card",animated:r=!0,...n}=e;return o.jsx(p.Tabs,{type:t,animated:r,...n})};function qf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function IO(e){if(Array.isArray(e))return qf(e)}function Q1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Oh(e,t){if(e){if(typeof e=="string")return qf(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qf(e,t):void 0}}function NO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zt(e){return IO(e)||Q1(e)||Oh(e)||NO()}function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mt.apply(null,arguments)}var DO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function J1(e){if(Array.isArray(e))return e}function _O(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,d=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return l}}function ew(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(e,t){return J1(e)||_O(e,t)||Oh(e,t)||ew()}function Ve(e){"@babel/helpers - typeof";return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ve(e)}function BO(e,t){if(Ve(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ve(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tw(e){var t=BO(e,"string");return Ve(t)=="symbol"?t:t+""}function we(e,t,r){return(t=tw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $O(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Jr(e,t){if(e==null)return{};var r,n,i=$O(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Lu={exports:{}};/*!
4
4
  Copyright (c) 2018 Jed Watson.
@@ -180,7 +180,7 @@ html body {
180
180
  ${t}-collapse,
181
181
  ${t}-edit,
182
182
  ${t}-copy
183
- `]:Object.assign(Object.assign({},iC(e)),{marginInlineStart:e.marginXXS})}),BI(e)),$I(e)),LI()),{"&-rtl":{direction:"rtl"}})}},FI=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),ZC=os("Typography",zI,FI),VI=e=>{const{prefixCls:t,"aria-label":r,className:n,style:i,direction:a,maxLength:s,autoSize:l=!0,value:c,onSave:d,onCancel:u,onEnd:f,component:h,enterIcon:g=C.createElement(DC,null)}=e,m=C.useRef(null),x=C.useRef(!1),y=C.useRef(null),[w,b]=C.useState(c);C.useEffect(()=>{b(c)},[c]),C.useEffect(()=>{var H;if(!((H=m.current)===null||H===void 0)&&H.resizableTextArea){const{textArea:T}=m.current.resizableTextArea;T.focus();const{length:N}=T.value;T.setSelectionRange(N,N)}},[]);const j=({target:H})=>{b(H.value.replace(/[\n\r]/g,""))},P=()=>{x.current=!0},E=()=>{x.current=!1},S=({keyCode:H})=>{x.current||(y.current=H)},O=()=>{d(w.trim())},k=({keyCode:H,ctrlKey:T,altKey:N,metaKey:I,shiftKey:R})=>{y.current!==H||x.current||T||N||I||R||(H===y0.ENTER?(O(),f?.()):H===y0.ESC&&u())},M=()=>{O()},[A,_,D]=ZC(t),B=Be(t,`${t}-edit-content`,{[`${t}-rtl`]:a==="rtl",[`${t}-${h}`]:!!h},n,_,D);return A(C.createElement("div",{className:B,style:i},C.createElement(AI,{ref:m,maxLength:s,value:w,onChange:j,onKeyDown:S,onKeyUp:k,onCompositionStart:P,onCompositionEnd:E,onBlur:M,"aria-label":r,rows:1,autoSize:l}),g!==null?AC(g,{className:`${t}-edit-content-confirm`}):null))};var nd,E0;function HI(){return E0||(E0=1,nd=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),nd}var id,P0;function QC(){if(P0)return id;P0=1;var e=HI(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,s)}function i(a,s){var l,c,d,u,f,h,g=!1;s||(s={}),l=s.debug||!1;try{d=e(),u=document.createRange(),f=document.getSelection(),h=document.createElement("span"),h.textContent=a,h.ariaHidden="true",h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",function(x){if(x.stopPropagation(),s.format)if(x.preventDefault(),typeof x.clipboardData>"u"){l&&console.warn("unable to use e.clipboardData"),l&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=t[s.format]||t.default;window.clipboardData.setData(y,a)}else x.clipboardData.clearData(),x.clipboardData.setData(s.format,a);s.onCopy&&(x.preventDefault(),s.onCopy(x.clipboardData))}),document.body.appendChild(h),u.selectNodeContents(h),f.addRange(u);var m=document.execCommand("copy");if(!m)throw new Error("copy command was unsuccessful");g=!0}catch(x){l&&console.error("unable to copy using execCommand: ",x),l&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",a),s.onCopy&&s.onCopy(window.clipboardData),g=!0}catch(y){l&&console.error("unable to copy using clipboardData: ",y),l&&console.error("falling back to prompt"),c=n("message"in s?s.message:r),window.prompt(c,a)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(u):f.removeAllRanges()),h&&document.body.removeChild(h),d()}return g}return id=i,id}var WI=QC();const UI=wr(WI),KI=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];var YI=exports&&exports.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(u){try{d(n.next(u))}catch(f){s(f)}}function c(u){try{d(n.throw(u))}catch(f){s(f)}}function d(u){u.done?a(u.value):i(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const qI=({copyConfig:e,children:t})=>{const[r,n]=C.useState(!1),[i,a]=C.useState(!1),s=C.useRef(null),l=()=>{s.current&&clearTimeout(s.current)},c={};e.format&&(c.format=e.format),C.useEffect(()=>l,[]);const d=yr(u=>YI(void 0,void 0,void 0,function*(){var f;u?.preventDefault(),u?.stopPropagation(),a(!0);try{const h=typeof e.text=="function"?yield e.text():e.text;UI(h||KI(t,!0).join("")||"",c),a(!1),n(!0),l(),s.current=setTimeout(()=>{n(!1)},3e3),(f=e.onCopy)===null||f===void 0||f.call(e,u)}catch(h){throw a(!1),h}}));return{copied:r,copyLoading:i,onClick:d}};function od(e,t){return C.useMemo(()=>{const r=!!e;return[r,Object.assign(Object.assign({},t),r&&typeof e=="object"?e:null)]},[e])}const GI=e=>{const t=v.useRef(void 0);return v.useEffect(()=>{t.current=e}),t.current},XI=(e,t,r)=>v.useMemo(()=>e===!0?{title:t??r}:v.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??r},e):{title:e},[e,t,r]);var ZI=exports&&exports.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const JC=C.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:i,rootClassName:a,setContentRef:s,children:l,direction:c,style:d}=e,u=ZI(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:f,direction:h,className:g,style:m}=Ic("typography"),x=c??h,y=s?es(t,s):t,w=f("typography",r);process.env.NODE_ENV!=="production"&&fn("Typography").deprecated(!s,"setContentRef","ref");const[b,j,P]=ZC(w),E=Be(w,g,{[`${w}-rtl`]:x==="rtl"},i,a,j,P),S=Object.assign(Object.assign({},m),d);return b(C.createElement(n,Object.assign({className:E,style:S,ref:y},u),l))});process.env.NODE_ENV!=="production"&&(JC.displayName="Typography");var QI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},JI=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:QI}))},eS=C.forwardRef(JI);process.env.NODE_ENV!=="production"&&(eS.displayName="CheckOutlined");var eN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},tN=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:eN}))},tS=C.forwardRef(tN);process.env.NODE_ENV!=="production"&&(tS.displayName="CopyOutlined");var rN={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},nN=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:rN}))},rS=C.forwardRef(nN);process.env.NODE_ENV!=="production"&&(rS.displayName="LoadingOutlined");function O0(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function ad(e,t,r){return e===!0||e===void 0?t:e||r&&t}function iN(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const qh=e=>["string","number"].includes(typeof e),oN=({prefixCls:e,copied:t,locale:r,iconOnly:n,tooltips:i,icon:a,tabIndex:s,onCopy:l,loading:c})=>{const d=O0(i),u=O0(a),{copied:f,copy:h}=r??{},g=t?f:h,m=ad(d[t?1:0],g),x=typeof m=="string"?m:g;return C.createElement(ss,{title:m,getPopupContainer:y=>y.parentNode},C.createElement("button",{type:"button",className:Be(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:n}),onClick:l,"aria-label":x,tabIndex:s},t?ad(u[1],C.createElement(eS,null),!0):ad(u[0],c?C.createElement(rS,null):C.createElement(tS,null),!0)))},qs=C.forwardRef(({style:e,children:t},r)=>{const n=C.useRef(null);return C.useImperativeHandle(r,()=>({isExceed:()=>{const i=n.current;return i.scrollHeight>i.clientHeight},getHeight:()=>n.current.clientHeight})),C.createElement("span",{"aria-hidden":!0,ref:n,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),aN=e=>e.reduce((t,r)=>t+(qh(r)?String(r).length:1),0);function k0(e,t){let r=0;const n=[];for(let i=0;i<e.length;i+=1){if(r===t)return n;const a=e[i],l=qh(a)?String(a).length:1,c=r+l;if(c>t){const d=t-r;return n.push(String(a).slice(0,d)),n}n.push(a),r=c}return e}const sd=0,ld=1,cd=2,ud=3,T0=4,Gs={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function sN(e){const{enableMeasure:t,width:r,text:n,children:i,rows:a,expanded:s,miscDeps:l,onEllipsis:c}=e,d=C.useMemo(()=>Ma(n),[n]),u=C.useMemo(()=>aN(d),[n]),f=C.useMemo(()=>i(d,!1),[n]),[h,g]=C.useState(null),m=C.useRef(null),x=C.useRef(null),y=C.useRef(null),w=C.useRef(null),b=C.useRef(null),[j,P]=C.useState(!1),[E,S]=C.useState(sd),[O,k]=C.useState(0),[M,A]=C.useState(null);pt(()=>{S(t&&r&&u?ld:sd)},[r,n,a,t,d]),pt(()=>{var H,T,N,I;if(E===ld){S(cd);const R=x.current&&getComputedStyle(x.current).whiteSpace;A(R)}else if(E===cd){const R=!!(!((H=y.current)===null||H===void 0)&&H.isExceed());S(R?ud:T0),g(R?[0,u]:null),P(R);const $=((T=y.current)===null||T===void 0?void 0:T.getHeight())||0,U=a===1?0:((N=w.current)===null||N===void 0?void 0:N.getHeight())||0,V=((I=b.current)===null||I===void 0?void 0:I.getHeight())||0,F=Math.max($,U+V);k(F+1),c(R)}},[E]);const _=h?Math.ceil((h[0]+h[1])/2):0;pt(()=>{var H;const[T,N]=h||[0,0];if(T!==N){const R=(((H=m.current)===null||H===void 0?void 0:H.getHeight())||0)>O;let $=_;N-T===1&&($=R?T:N),g(R?[T,$]:[$,N])}},[h,_]);const D=C.useMemo(()=>{if(!t)return i(d,!1);if(E!==ud||!h||h[0]!==h[1]){const H=i(d,!1);return[T0,sd].includes(E)?H:C.createElement("span",{style:Object.assign(Object.assign({},Gs),{WebkitLineClamp:a})},H)}return i(s?d:k0(d,h[0]),j)},[s,E,h,d].concat(zt(l))),B={width:r,margin:0,padding:0,whiteSpace:M==="nowrap"?"normal":"inherit"};return C.createElement(C.Fragment,null,D,E===cd&&C.createElement(C.Fragment,null,C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:a}),ref:y},f),C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:a-1}),ref:w},f),C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:1}),ref:b},i([],!0))),E===ud&&h&&h[0]!==h[1]&&C.createElement(qs,{style:Object.assign(Object.assign({},B),{top:400}),ref:m},i(k0(d,_),!0)),E===ld&&C.createElement("span",{style:{whiteSpace:"inherit"},ref:x}))}const nS=({enableEllipsis:e,isEllipsis:t,children:r,tooltipProps:n})=>!n?.title||!e?r:C.createElement(ss,Object.assign({open:t?void 0:!1},n),r);process.env.NODE_ENV!=="production"&&(nS.displayName="EllipsisTooltip");var lN=exports&&exports.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function cN({mark:e,code:t,underline:r,delete:n,strong:i,keyboard:a,italic:s},l){let c=l;function d(u,f){f&&(c=C.createElement(u,{},c))}return d("strong",i),d("u",r),d("del",n),d("code",t),d("mark",e),d("kbd",a),d("i",s),c}const uN="...",M0=["delete","mark","code","underline","strong","keyboard","italic"],dN=C.forwardRef((e,t)=>{var r;const{prefixCls:n,className:i,style:a,type:s,disabled:l,children:c,ellipsis:d,editable:u,copyable:f,component:h,title:g}=e,m=lN(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:x,direction:y}=C.useContext(Tn),[w]=aM("Text"),b=C.useRef(null),j=C.useRef(null),P=x("typography",n),E=Pw(m,M0),[S,O]=od(u),[k,M]=go(!1,{value:O.editing}),{triggerType:A=["icon"]}=O,_=Se=>{var Te;Se&&((Te=O.onStart)===null||Te===void 0||Te.call(O)),M(Se)},D=GI(k);pt(()=>{var Se;!k&&D&&((Se=j.current)===null||Se===void 0||Se.focus())},[k]);const B=Se=>{Se?.preventDefault(),_(!0)},H=Se=>{var Te;(Te=O.onChange)===null||Te===void 0||Te.call(O,Se),_(!1)},T=()=>{var Se;(Se=O.onCancel)===null||Se===void 0||Se.call(O),_(!1)},[N,I]=od(f),{copied:R,copyLoading:$,onClick:U}=qI({copyConfig:I,children:c}),[V,F]=C.useState(!1),[q,ie]=C.useState(!1),[ue,ge]=C.useState(!1),[Ee,Pe]=C.useState(!1),[Z,ve]=C.useState(!0),[fe,z]=od(d,{expandable:!1,symbol:Se=>Se?w?.collapse:w?.expand}),[ne,Y]=go(z.defaultExpanded||!1,{value:z.expanded}),le=fe&&(!ne||z.expandable==="collapsible"),{rows:pe=1}=z,xe=C.useMemo(()=>le&&(z.suffix!==void 0||z.onEllipsis||z.expandable||S||N),[le,z,S,N]);pt(()=>{fe&&!xe&&(F(kv("webkitLineClamp")),ie(kv("textOverflow")))},[xe,fe]);const[je,Me]=C.useState(le),W=C.useMemo(()=>xe?!1:pe===1?q:V,[xe,q,V]);pt(()=>{Me(W&&le)},[W,le]);const te=le&&(je?Ee:ue),ae=le&&pe===1&&je,re=le&&pe>1&&je,G=(Se,Te)=>{var ft;Y(Te.expanded),(ft=z.onExpand)===null||ft===void 0||ft.call(z,Se,Te)},[se,K]=C.useState(0),ee=({offsetWidth:Se})=>{K(Se)},Q=Se=>{var Te;ge(Se),ue!==Se&&((Te=z.onEllipsis)===null||Te===void 0||Te.call(z,Se))};C.useEffect(()=>{const Se=b.current;if(fe&&je&&Se){const Te=iN(Se);Ee!==Te&&Pe(Te)}},[fe,je,c,re,Z,se]),C.useEffect(()=>{const Se=b.current;if(typeof IntersectionObserver>"u"||!Se||!je||!le)return;const Te=new IntersectionObserver(()=>{ve(!!Se.offsetParent)});return Te.observe(Se),()=>{Te.disconnect()}},[je,le]);const de=XI(z.tooltip,O.text,c),ce=C.useMemo(()=>{if(!(!fe||je))return[O.text,c,g,de.title].find(qh)},[fe,je,g,de.title,te]);if(k)return C.createElement(VI,{value:(r=O.text)!==null&&r!==void 0?r:typeof c=="string"?c:"",onSave:H,onCancel:T,onEnd:O.onEnd,prefixCls:P,className:i,style:a,direction:y,component:h,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const ye=()=>{const{expandable:Se,symbol:Te}=z;return Se?C.createElement("button",{type:"button",key:"expand",className:`${P}-${ne?"collapse":"expand"}`,onClick:ft=>G(ft,{expanded:!ne}),"aria-label":ne?w.collapse:w?.expand},typeof Te=="function"?Te(ne):Te):null},be=()=>{if(!S)return;const{icon:Se,tooltip:Te,tabIndex:ft}=O,jr=Ma(Te)[0]||w?.edit,gi=typeof jr=="string"?jr:"";return A.includes("icon")?C.createElement(ss,{key:"edit",title:Te===!1?"":jr},C.createElement("button",{type:"button",ref:j,className:`${P}-edit`,onClick:B,"aria-label":gi,tabIndex:ft},Se||C.createElement(hw,{role:"button"}))):null},Ie=()=>N?C.createElement(oN,Object.assign({key:"copy"},I,{prefixCls:P,copied:R,locale:w,onCopy:U,loading:$,iconOnly:c==null})):null,Re=Se=>[Se&&ye(),be(),Ie()],me=Se=>[Se&&!ne&&C.createElement("span",{"aria-hidden":!0,key:"ellipsis"},uN),z.suffix,Re(Se)];return C.createElement(Ro,{onResize:ee,disabled:!le},Se=>C.createElement(nS,{tooltipProps:de,enableEllipsis:le,isEllipsis:te},C.createElement(JC,Object.assign({className:Be({[`${P}-${s}`]:s,[`${P}-disabled`]:l,[`${P}-ellipsis`]:fe,[`${P}-ellipsis-single-line`]:ae,[`${P}-ellipsis-multiple-line`]:re},i),prefixCls:n,style:Object.assign(Object.assign({},a),{WebkitLineClamp:re?pe:void 0}),component:h,ref:es(Se,b,t),direction:y,onClick:A.includes("text")?B:void 0,"aria-label":ce?.toString(),title:g},E),C.createElement(sN,{enableMeasure:le&&!je,text:c,rows:pe,width:se,onEllipsis:Q,expanded:ne,miscDeps:[R,ne,$,S,N,w].concat(zt(M0.map(Te=>e[Te])))},(Te,ft)=>cN(e,C.createElement(C.Fragment,null,Te.length>0&&ft&&!ne&&ce?C.createElement("span",{key:"show-content","aria-hidden":!0},Te):Te,me(ft)))))))}),fN=C.forwardRef((e,t)=>C.createElement(dN,Object.assign({ref:t},e,{component:"div"}))),iS=(e,t,r=null)=>{for(let n=0;n<e.length;n++){const i=e[n];if(i.key===t)return{node:i,ctx:{parent:r,index:n,siblings:e}};if(i.children?.length){const a=iS(i.children,t,i);if(a.node)return a}}return{node:null,ctx:null}},oS=(e,t)=>{if(!e.children)return!1;for(const r of e.children)if(r.key===t||oS(r,t))return!0;return!1};function pN({open:e,onClose:t}){const{nodes:r,rootIds:n,addFolder:i,editFolder:a,removeFolder:s,removeMenu:l,moveNode:c}=it.useFavoriteStore(),d=v.useRef(null),[u,f]=v.useState([]),[h,g]=v.useState([]),[m,x]=v.useState(""),[y,w]=v.useState("ADD"),[b,j]=v.useState(!1),[P,E]=v.useState("");v.useEffect(()=>{e&&g(n)},[e]),v.useEffect(()=>{const k=S(r,n);f(k)},[r]),v.useEffect(()=>{b&&P&&(d.current.setFieldValue("prntBkmkId",P),d.current.setFieldValue("prntBkmkNm",r[P]?.bkmkNm??"-")),b&&y==="EDIT"&&(d.current.setFieldValue("bkmkId",P),d.current.setFieldValue("bkmkNm",r[P]?.bkmkNm)),!b&&y=="ADD"&&g(k=>[...k,P]),!b&&d.current&&(E("-"),d.current.resetFields())},[b,y,P,r]);const S=(k,M)=>{const A=(_,D="-")=>{const B=k[_];if(!B)return null;const H={key:B.bkmkId,type:B.type,title:B.type==="F"?B.bkmkNm:B.menuNm?`${B.menuNm} (${B.menuId})`:B.menuId,parentId:D,sortOrdr:B.sortOrdr??0};if(B.type==="F"){const N=(B.children??[]).map(I=>A(I,B.bkmkId)).filter(Boolean);return{...H,children:N}}return H};return M.map(_=>A(_,"-")).filter(Boolean)},O=()=>{if(w("ADD"),!m){E("-"),j(!0);return}const k=r[m];if(!k){E("-"),j(!0);return}k.type==="F"?E(k.bkmkId):E(k.prntBkmkId),j(!0)};return o.jsxs(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0},Button:{defaultColor:"var(--text-secondary)",defaultHoverColor:"var(--primary-color)",defaultHoverBorderColor:"var(--primary-color)",controlHeight:30,fontSize:13,borderRadius:"var(--border-radius-sm)"}}},children:[o.jsxs(p.Modal,{open:e,okButtonProps:{style:{display:"none"}},cancelText:"닫기",width:560,style:{zIndex:1001},styles:{body:{paddingTop:12,paddingBottom:12}},title:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:12},children:o.jsx(p.Typography.Text,{style:{fontSize:18},children:"북마크 관리"})}),onCancel:t,children:[o.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",marginBottom:10},children:[o.jsx(p.Button,{type:"primary",variant:"solid",className:"bwg-btn",icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsxs("g",{"clip-path":"url(#clip0_1298_1781)",children:[o.jsx("path",{d:"M9.3002 14.26H13.5702C14.4002 14.26 15.0702 13.59 15.0702 12.76V7.45999C15.0702 6.89999 14.6102 6.43999 14.0502 6.43999H8.8302L7.7102 3.48999H4.1702C3.6402 3.48999 3.2002 3.92999 3.2002 4.45999V8.10999",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M8.18018 4.58997H14.0502C14.6102 4.58997 15.0702 5.04997 15.0702 5.60997V8.25997",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M5.43018 9.52002V14.52",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7.93018 12.01H2.93018",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1298_1781",children:o.jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),style:{padding:"0 10px",boxShadow:"none"},onClick:O,children:"새 폴더"}),o.jsx("div",{children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultHoverColor:"#333333",defaultHoverBorderColor:"#d9d9d9",defaultHoverBg:"#f1f1f1",defaultActiveColor:"#777777",defaultActiveBorderColor:"#d9d9d9",contentFontSize:13,defaultColor:"#777777"}}},children:[o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332M7.99984 2.66667V13.3333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>{const k=Object.values(r).filter(M=>M.type==="F").map(M=>M.bkmkId);g(k)}})}),o.jsx(p.Tooltip,{title:"접기",children:o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28,marginLeft:5},onClick:()=>g([])})})]})})]}),o.jsxs("div",{style:{maxHeight:420,height:350,overflow:"auto",border:"1px solid #e0e0e0",borderRadius:8,padding:10},children:[u.length==0&&o.jsx(p.Empty,{description:o.jsxs(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:["아직 저장된 북마크가 없습니다.",o.jsx("br",{}),"새로운 폴더를 생성해보세요."]})}),o.jsx(p.Tree,{blockNode:!0,draggable:!0,allowDrop:({dropNode:k,dropPosition:M})=>{const A=k.type==="F";return M===0?A:!0},onDrop:k=>{const{dragNode:M,node:A,dropPosition:_,dropToGap:D}=k;if(M.key===A.key||oS(M,A.key))return;let B,H;if(D){const N=iS(u,A.key).ctx,I=N.index;B=N.parent?N.parent.key:"-",H=_>0?I+1:I}else{if(A.type!=="F")return;const N=A.children||[];B=A.key,H=N.length}const T=oe.getUserId();if(M.type==="F")c({bkmkId:M.key,newPrntBkmkId:B,sortOrdr:H,userId:T}).catch(()=>{p.Modal.error({title:"이동 실패",content:"폴더 이동 중 오류가 발생했어요."})});else{if(B==="-"){p.Modal.warning({title:"이동 불가",content:"메뉴는 최상위로 이동할 수 없어요."});return}c({bkmkId:M.key,newPrntBkmkId:B,sortOrdr:H,userId:T}).catch(()=>{p.Modal.error({title:"이동 실패",content:"메뉴 이동 중 오류가 발생했어요."})})}D===!1&&g(N=>Array.from(new Set([...N,A.key])))},showLine:!0,treeData:u,selectedKeys:[m],expandedKeys:h,onExpand:g,onSelect:k=>x(k[0]),titleRender:k=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[o.jsxs("span",{children:[k.type==="F"?"📁":"📄"," ",k.title,k.isNew?o.jsx(p.Tag,{color:"gold",style:{marginLeft:4,fontSize:"10px",height:"16px",lineHeight:"16px",padding:"0 5px"},children:"N"}):null]}),o.jsxs("span",{style:{display:"inline-flex",gap:8},children:[k.type==="F"&&o.jsxs(o.Fragment,{children:[o.jsx(X.PlusOutlined,{style:{opacity:.8},onClick:()=>{w("ADD"),E(k.key),j(!0)}}),o.jsx(X.EditOutlined,{style:{opacity:.8},onClick:()=>{w("EDIT"),E(k.key),j(!0)}})]}),o.jsx(X.DeleteOutlined,{style:{cursor:"pointer",opacity:.5},onClick:()=>{k.type==="F"?p.Modal.confirm({title:"삭제 안내",content:"폴더를 삭제하면 하위 폴더와 메뉴도 모두 삭제됩니다. 삭제하시겠습니까?",centered:!0,onOk:()=>s(k.key)}):p.Modal.confirm({title:"삭제 안내",centered:!0,content:"메뉴를 삭제하시겠습니까?",onOk:()=>l(k.key)})}})]})]})})]})]}),o.jsx(p.ConfigProvider,{theme:{components:{Modal:{titleColor:y==="ADD"?"var(--primary-color)":"#ff6767",headerBg:y==="ADD"?"var(--drawer-header-bg)":"#fff0f0",titleFontSize:18},Button:{defaultColor:"var(--text-secondary)",defaultHoverColor:"var(--primary-color)",defaultHoverBorderColor:"var(--primary-color)",controlHeight:30,fontSize:13,borderRadius:"var(--border-radius-sm)"}}},children:o.jsx(p.Modal,{title:o.jsx(o.Fragment,{children:o.jsxs(p.Typography.Text,{style:{fontSize:16,display:"flex",alignItems:"center",gap:6},children:[y==="ADD"?o.jsx("span",{className:"bookmark-folder-modal-icon ico-new-folder"}):o.jsx("span",{className:"bookmark-folder-modal-icon ico-edit-folder"}),"폴더",y==="ADD"?" 추가":"명 수정"]})}),open:b,okText:"저장",onOk:()=>{const k=d.current.getFieldValue("bkmkNm"),M=oe.getUserId();if(y==="ADD"){const A=__SYS_CD__??"KH",_=d.current.getFieldValue("prntBkmkId");i(k,_,A,M).then(()=>{j(!1)})}else{const A=d.current.getFieldValue("bkmkId");a(A,M,k).then(()=>{j(!1)})}},centered:!0,width:400,onCancel:()=>j(!1),okButtonProps:{className:"bwg-btn"},cancelButtonProps:{className:"bwg-btn"},styles:{body:{padding:20}},children:o.jsxs(L.BwgForm,{ref:d,style:{padding:0},children:[o.jsx(L.BwgInput,{itemProps:{name:y==="EDIT"?"bkmkId":"prntBkmkId",hidden:!0}}),o.jsx(L.BwgInput,{itemProps:{label:"상위 폴더명",name:"prntBkmkNm",hidden:P==="-"||y==="EDIT"},inputProps:{disabled:!0}}),o.jsx(L.BwgInput,{itemProps:{label:"폴더명",name:"bkmkNm"}})]})})})]})}function hN({triggerIcon:e}){const[t,r]=v.useState(!1),[n,i]=v.useState(""),[a,s]=v.useState(null),[l,c]=v.useState([]),[d,u]=v.useState([]),[f,h]=v.useState(!1),[g,m]=v.useState(!1),[x,y]=v.useState(!1),[w,b]=v.useState(null);it.useFavoriteStore($=>$.treeNodes);const{nodes:j,getPrntBkmkIdByMenuId:P,getNodeByMenuId:E,isMenuBookmarked:S,removeMenuByMenuId:O,addMenuToFolder:k,convertToAntTreeData:M}=it.useFavoriteStore(),A=it.useFavoriteStore($=>$.rootIds),_=v.useMemo(()=>M(j,A,n,!0),[j,A,n]),D=it.useMenuViewStore($=>$.activeMenuItem??{menuId:"",menuNm:""}),B=v.useMemo(()=>{if(!D?.menuId)return"";const $=E(D.menuId);if(!$)return"";if($.fullPath)return $.fullPath;const U=V=>{const F=j[V];if(!F)return"";if(F.prntBkmkId==="-")return`${F.bkmkNm||D?.menuNm}`;const q=U(F.prntBkmkId);return q?`${q} > ${F.bkmkNm||D?.menuNm}`:F.bkmkNm||D?.menuNm};return console.log("bookmarkNode ::::: ",$),console.log(U($.bkmkId)),U($.bkmkId)},[D?.menuId,E,j]);v.useEffect(()=>{t&&D?.menuId&&S(D.menuId)?u([P(D.menuId)]):t&&D?.menuId&&!S(D.menuId)?u(A):(u([]),c([]),b(null),y(!1))},[t,D?.menuId,S,P]),v.useEffect(()=>{if(!x||!D?.menuId)return;const $=P(D.menuId);!$||!j[$]||(i(""),c([$]),b($))},[x,D?.menuId,j,P]);const H=($,U)=>{k($,U).then(V=>{console.log("AddMenuToFolder ::::: ",V),V||u(F=>F.includes($)?F:[...F,$])})},T=$=>{O($)},N=async $=>{D?.menuId&&(await O(D.menuId),await k($,D),y(!1),b(null),u(U=>U.includes($)?U:[...U,$]))},I=()=>o.jsxs("div",{className:"bookmark-popover-wrap",style:{width:360},children:[o.jsx("div",{style:{padding:"20px 20px 15px",borderBottom:"1px solid #eeeeee"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",rowGap:10},children:[o.jsxs(p.Typography.Text,{style:{fontSize:18,display:"flex",alignItems:"center",gap:6},children:[o.jsx(p.Button,{type:"text",icon:o.jsx(X.ArrowLeftOutlined,{}),onClick:()=>y(!1),style:{width:26,height:26}}),"폴더 변경"]}),D&&o.jsxs(p.Typography.Text,{type:"secondary",style:{display:"inline-block",width:"100%",color:"#555555",fontWeight:"400",background:"#f0eff4",padding:"3px 10px",borderRadius:6},children:["현재 화면: ",o.jsx("b",{children:D.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",D.menuId,")"]})]})]})}),R(),o.jsxs("div",{style:{padding:"15px 20px",borderTop:"1px solid #eeeeee",display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{type:"default",className:"bwg-btn",onClick:()=>{y(!1),b(null)},children:"취소"}),o.jsx(p.Button,{type:"primary",className:"bwg-btn",disabled:!w,onClick:()=>w&&N(String(w)),children:"이동"})]})]}),R=()=>o.jsxs("div",{style:{maxHeight:360,overflow:"auto",padding:"15px 20px 20px"},children:[o.jsxs(p.Space,{style:{width:"100%",marginBottom:12,display:"flex",justifyContent:"space-between",columnGap:10},children:[o.jsx(p.Input,{placeholder:"검색(폴더명)",prefix:o.jsx(X.SearchOutlined,{}),allowClear:!0,value:n,onChange:$=>i($.target.value),style:{width:"250px",height:28}}),o.jsx(p.ConfigProvider,{theme:{components:{Button:{defaultHoverColor:"#333333",defaultHoverBorderColor:"#d9d9d9",defaultHoverBg:"#f1f1f1",defaultActiveColor:"#777777",defaultActiveBorderColor:"#d9d9d9",contentFontSize:13,defaultColor:"#777777"}}},children:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332M7.99984 2.66667V13.3333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>{const $=Object.values(j).filter(U=>U.type==="F").map(U=>U.bkmkId);u($)},title:"모두 확장"}),o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>u([]),title:"모두 축소"})]})})]}),_.length===0?o.jsx(p.Empty,{description:o.jsxs(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:["아직 저장된 북마크가 없습니다.",o.jsx("br",{}),"새로운 폴더를 만들어 시작해보세요."]}),image:p.Empty.PRESENTED_IMAGE_SIMPLE}):o.jsx(p.Tree,{blockNode:!0,showLine:!0,treeData:_,selectedKeys:l,expandedKeys:d,onExpand:u,onSelect:$=>{c($),b($[0])},autoExpandParent:!0,titleRender:$=>{const U=String($.key),V=a===U;return o.jsxs("div",{onMouseEnter:()=>s(U),onMouseLeave:()=>s(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[o.jsx("div",{children:$.title}),!S(D?.menuId)&&D&&V&&o.jsx(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"rgba(0,0,0,0.5)",defaultHoverColor:"rgba(0,0,0,0.8)"}}},children:o.jsx(p.Button,{size:"small",type:"link",onClick:F=>{F.stopPropagation(),H(U,D)},style:{color:"rgba(0,0,0,0.5)"},children:"+ 현재화면 추가"})})]})}})]});return o.jsxs(o.Fragment,{children:[o.jsx(p.Popover,{open:t&&!f,onOpenChange:r,trigger:"click",placement:"bottomLeft",styles:{body:{padding:0,borderRadius:12,boxShadow:"0 12px 32px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.2)",background:"#ffffff",zIndex:1e3}},content:x?I():o.jsxs("div",{style:{width:360},children:[o.jsx("div",{style:{padding:"20px 20px 15px",borderBottom:"1px solid #eeeeee"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",rowGap:10},children:[o.jsxs(p.Typography.Text,{style:{fontSize:18,display:"flex",alignItems:"center",gap:6},children:[o.jsx("span",{className:`bookmark-title-icon ${S(D?.menuId)?"saved":"add"}`}),"북마크"," ",S(D?.menuId)?"저장됨":"추가"]}),D&&o.jsxs(p.Typography.Text,{type:"secondary",style:{display:"inline-block",width:"100%",color:"#555555",fontWeight:"400",background:"#f0eff4",padding:"3px 10px",borderRadius:6},children:["현재 화면: ",o.jsx("b",{children:D.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",D.menuId,")"]})]})]})}),S(D?.menuId)?o.jsxs("div",{style:{padding:"10px 12px",margin:"15px 20px",borderRadius:8,backgroundColor:"#f7f6fB"},children:[o.jsx(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:"저장 위치"}),o.jsx("div",{style:{marginTop:4},children:`📁 > ${B}`||"알 수 없음"})]}):R(),o.jsxs(ze,{style:{padding:"15px 20px",borderTop:"1px solid #eeeeee"},layoutAlign:"right",children:[D&&!S(D.menuId)?o.jsx(p.Button,{style:{padding:"0 10px"},type:"primary",className:"bwg-btn",icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:o.jsx("path",{d:"M3 9H15M9 3V15",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),onClick:()=>{const $=String(l[0]);let U="-";$&&j[$]&&(U=j[$].type=="M"?j[$].prntBkmkId:$),H(U,D)},children:"추가"}):o.jsxs(ze,{layoutAlign:"between",children:[o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px"},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsxs("g",{"clip-path":"url(#clip0_1289_1745)",children:[o.jsx("path",{d:"M13.9198 6.57H8.69982L7.57982 3.62H4.03982C3.50982 3.62 3.06982 4.06 3.06982 4.59V12.89C3.06982 13.72 3.73982 14.39 4.56982 14.39H13.4398C14.2698 14.39 14.9398 13.72 14.9398 12.89V7.59C14.9398 7.03 14.4798 6.57 13.9198 6.57Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M8.0498 4.72H13.9198C14.4798 4.72 14.9398 5.18 14.9398 5.74V8.39",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1289_1745",children:o.jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),onClick:()=>y(!0),children:"폴더 변경"}),o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px"},color:"danger",variant:"solid",icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:o.jsx("path",{d:"M7.5 7.5V12M10.5 7.5V12M13.5 4.5V13.5C13.5 14.3284 12.8284 15 12 15H6C5.17157 15 4.5 14.3284 4.5 13.5V4.5M3 4.5H15M11.25 4.5V3.75C11.25 2.92157 10.5784 2.25 9.75 2.25H8.25C7.42157 2.25 6.75 2.92157 6.75 3.75V4.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),onClick:()=>T(D.menuId),children:"삭제"})]}),o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px",marginLeft:5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsx("path",{d:"M8.25 2.25H9.75C10.1642 2.25 10.5 2.58579 10.5 3V3.42659C10.5 3.74744 10.7153 4.02619 11.0117 4.14921C11.3081 4.27229 11.6532 4.22538 11.8802 3.99842L12.182 3.69668C12.4748 3.40379 12.9497 3.40379 13.2426 3.69668L14.3033 4.75734C14.5962 5.05023 14.5962 5.52511 14.3033 5.818L14.0016 6.1197C13.7746 6.34667 13.7277 6.69185 13.8508 6.98831C13.9738 7.28465 14.2526 7.5 14.5734 7.5L15 7.5C15.4142 7.5 15.75 7.83579 15.75 8.25V9.75C15.75 10.1642 15.4142 10.5 15 10.5H14.5734C14.2526 10.5 13.9738 10.7153 13.8508 11.0117C13.7277 11.3081 13.7746 11.6533 14.0016 11.8803L14.3033 12.182C14.5962 12.4749 14.5962 12.9497 14.3033 13.2426L13.2426 14.3033C12.9497 14.5962 12.4749 14.5962 12.182 14.3033L11.8803 14.0016C11.6533 13.7746 11.3081 13.7277 11.0117 13.8508C10.7153 13.9738 10.5 14.2526 10.5 14.5734V15C10.5 15.4142 10.1642 15.75 9.75 15.75H8.25C7.83579 15.75 7.5 15.4142 7.5 15V14.5734C7.5 14.2526 7.28465 13.9738 6.98831 13.8508C6.69185 13.7277 6.34667 13.7746 6.1197 14.0016L5.81799 14.3033C5.5251 14.5962 5.05022 14.5962 4.75733 14.3033L3.69667 13.2426C3.40378 12.9497 3.40378 12.4749 3.69667 12.182L3.99842 11.8802C4.22538 11.6532 4.27229 11.3081 4.14921 11.0117C4.02619 10.7153 3.74744 10.5 3.42659 10.5H3C2.58579 10.5 2.25 10.1642 2.25 9.75V8.25C2.25 7.83579 2.58579 7.5 3 7.5L3.42657 7.5C3.74743 7.5 4.02619 7.28466 4.14922 6.98832C4.2723 6.69188 4.22539 6.34671 3.99842 6.11975L3.69668 5.818C3.40379 5.52511 3.40379 5.05024 3.69668 4.75734L4.75734 3.69668C5.05023 3.40379 5.52511 3.40379 5.818 3.69668L6.11974 3.99842C6.34671 4.22539 6.69187 4.2723 6.98832 4.14922C7.28466 4.02619 7.5 3.74743 7.5 3.42657V3C7.5 2.58579 7.83579 2.25 8.25 2.25Z",stroke:"currentColor"}),o.jsx("path",{d:"M10.5 9C10.5 9.82843 9.82843 10.5 9 10.5C8.17157 10.5 7.5 9.82843 7.5 9C7.5 8.17157 8.17157 7.5 9 7.5C9.82843 7.5 10.5 8.17157 10.5 9Z",stroke:"currentColor"})]}),onClick:()=>{m(t),h(!0)},children:"관리"})]})]}),children:o.jsx("span",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center"},children:e})}),o.jsx(pN,{open:f,onClose:()=>{h(!1),g&&r(!0)}})]})}const gN=({reqRows:e,subRows:t})=>{const{searchBoxRef:r}=ct.useSearchBox();return o.jsx(ko,{ref:r,reqRows:e,subRows:t})},kt=v.forwardRef(({children:e,searchBox:t,title:r,preRenderEvents:n=[],postRenderEvents:i=[],loading:a=!1,error:s=null,grantEvent:l={},customEvent:c={},buttons:d},u)=>{const{user:f,spacingSize:h}=it.useUserStore(),{activeMenuItem:g}=it.useMenuViewStore(),{loadFavoritesIfNeeded:m,isMenuBookmarked:x}=it.useFavoriteStore(),{loading:y}=it.useLoadingStore(),w=ct.useSizeConfig();v.useImperativeHandle(u,()=>({menuId:g?.menuId}),[g?.menuId]);const[b,j]=v.useState({isInitialized:!1,isReady:!1,error:null,loading:!0,preRenderComplete:!1,postRenderComplete:!1}),{openCorePopup:P}=ct.usePopup(),E=async()=>{if(n.length===0){j(T=>({...T,preRenderComplete:!0}));return}try{for(const T of n)await T();j(T=>({...T,preRenderComplete:!0}))}catch(T){j(N=>({...N,error:T instanceof Error?T.message:"사전 렌더링 실패",preRenderComplete:!0}))}},S=async()=>{if(i.length===0){j(T=>({...T,postRenderComplete:!0}));return}try{for(const T of i)await T();j(T=>({...T,postRenderComplete:!0}))}catch(T){j(N=>({...N,error:T instanceof Error?T.message:"사후 렌더링 실패",postRenderComplete:!0}))}};v.useEffect(()=>{if(b.isInitialized)return;(async()=>{try{await E(),j(N=>({...N,isInitialized:!0,loading:!1}))}catch(N){console.error("BwgView 초기화 실패:",N),j(I=>({...I,isInitialized:!0,loading:!1}))}})()},[]),v.useEffect(()=>{f?.userId&&m(f.userId)},[m,f?.userId]);const O=v.useMemo(()=>g?.menuId?{menuId:g.menuId,grpId:"CUSTOM"}:!1,[g?.menuId]),k=v.useMemo(()=>g?.menuId?{menuId:g.menuId,grpId:"DEFAULT"}:!1,[g?.menuId]);v.useEffect(()=>{b.isInitialized&&b.preRenderComplete&&!b.isReady&&setTimeout(async()=>{await S(),j(N=>({...N,isReady:!0}))},100)},[b.isInitialized,b.preRenderComplete,b.isReady]),v.useEffect(()=>{s&&j(T=>({...T,error:s}))},[s]);const M=()=>o.jsxs("div",{className:"bwgview-header-container",children:[o.jsxs("div",{className:"bwgview-header",children:[o.jsx("div",{className:"bwgview-header-left",children:H.LEFT}),o.jsx("div",{className:"bwgview-header-right",children:H.RIGHT})]}),t&&o.jsx(gN,{reqRows:t.reqRows,subRows:t.subRows})]});if(v.useEffect(()=>{},[f,g]),b.error||s)return o.jsx("div",{style:{padding:"24px"},children:o.jsx(p.Alert,{message:"오류 발생",description:b.error||s,type:"error",showIcon:!0})});const A=()=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:o.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62179 6.15374 7.92513 5.5344L9.9348 1.4645Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"})}),_=()=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:o.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62178 6.15374 7.92513 5.5344L9.9348 1.4645Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",fill:"none"})}),D=T=>o.jsx(X,{component:A,...T}),B=T=>o.jsx(X,{component:_,...T}),H={LEFT:o.jsx("div",{className:"bwgview-header-left",children:o.jsxs(p.ConfigProvider,{theme:{components:{Tag:{controlHeight:28,controlHeightLG:28,controlHeightSM:28,controlHeightXS:28}}},children:[o.jsxs(p.Space,{children:[g&&o.jsx(hN,{triggerIcon:x(g.menuId)?o.jsx(D,{className:"bookmark-icon",style:{color:"#faad14"}}):o.jsx(B,{className:"bookmark-icon"})}),o.jsxs(p.Space.Compact,{style:{alignItems:"center"},children:[o.jsx("span",{className:"pageMenuNm",children:(()=>{let T="";return r?.useMenuTitle&&g?T=g.menuNm:r?.text?T=r.text:g&&(T=g.menuPrntId==="CM00"?g.menuNm.substring(g.menuNm.indexOf(" ")+1):g.menuNm),r?.prefix&&(T=`${r.prefix} ${T}`),r?.suffix&&(T=`${T} ${r.suffix}`),T})()}),g?.menuNo&&o.jsx(p.Tag,{className:"page-num-tag",children:g?.menuNo}),o.jsx(p.Tooltip,{title:"도움말",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",className:"menu-help-btn",icon:o.jsx(X.QuestionCircleTwoTone,{twoToneColor:"orange"})})}),o.jsx(p.Tooltip,{title:"게시판",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",onClick:()=>P("CORE_REPORT"),icon:o.jsx(X.BugFilled,{style:{color:"#1890ff"}})})})]})]}),g?.scrnId&&oe.isLocal&&o.jsx(p.Tag,{style:{marginLeft:8,fontSize:13,fontWeight:500,display:"flex"},children:o.jsx(fN,{copyable:!0,style:{display:"inherit",justifyContent:"center",alignItems:"center",marginBottom:0},children:g?.scrnId})})]})}),RIGHT:o.jsx("div",{className:"bwgview-header-right",children:o.jsx(p.ConfigProvider,{theme:{components:{Space:{padding:8}}},children:o.jsxs(p.Space,{children:[o.jsx(p.Flex,{gap:8,children:o.jsx(Kf,{checkAuth:O,buttons:d?.custom||[],gap:8})}),o.jsx(p.ConfigProvider,{theme:{components:{Divider:{verticalMarginInline:0}}},children:o.jsx(p.Divider,{type:"vertical"})}),o.jsx(p.Flex,{gap:8,className:"permission-buttons",children:o.jsx(Kf,{checkAuth:k,buttons:d?.grant||[],gap:8})})]})})})};return o.jsxs("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column",gap:h===0?8:h===1?14:20,padding:h===0?"8px 12px":h===1?"14px 20px":"20px 30px 26px"},children:[M(),o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{className:"bwgview-content",children:[o.jsx(p.ConfigProvider,{componentSize:w.componentSize,theme:{token:{fontSize:w.fontSize}},children:o.jsx(ct.BwgViewProvider,{menuId:g?.menuId,children:o.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",fontSize:`${w.fontSize}px`},children:e})})}),(b.loading||a||y)&&o.jsx(iO.LoadingContainer,{dimStyle:"light",text:y?"처리 중...":"화면 로드 중..."})]})})]})});kt.displayName="BwgView";const mN=({children:e,customTheme:t,customComponentSize:r="middle"})=>{const n={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',fontSize:14,fontSizeHeading1:38,fontSizeHeading2:30,fontSizeHeading3:24,fontSizeHeading4:20,fontSizeHeading5:16,padding:16,margin:16,borderRadius:6,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm},i={...n,...t,token:{...n.token,...t?.token}};return o.jsx(p.ConfigProvider,{locale:G1,theme:i,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},children:e})},vN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9289)'%3e%3cpath%20d='M27.3705%2010.9919C28.5405%2010.9919%2029.489%2010.0434%2029.489%208.87338C29.489%207.70337%2028.5405%206.75488%2027.3705%206.75488C26.2004%206.75488%2025.252%207.70337%2025.252%208.87338C25.252%2010.0434%2026.2004%2010.9919%2027.3705%2010.9919Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.3053%2017.2998V32.3098H24.4248V17.2998'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M27.3701%2032.31V23.3135'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2305%2022.1925V17.642V15.6945C22.2305%2014.3075%2023.3515%2013.1865%2024.7385%2013.1865H29.9825C31.3695%2013.1865%2032.4905%2014.3075%2032.4905%2015.6945V17.642V22.1925'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.2519%2021.4229H18.6199C19.1044%2021.4229%2019.5034%2021.8219%2019.5034%2022.3064V24.4154H16.3779V22.3064C16.3779%2021.8219%2016.7769%2021.4229%2017.2614%2021.4229H17.2519Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.8339%2024.4062H15.0294C14.6254%2024.4062%2014.2979%2024.7338%2014.2979%2025.1377V31.6832C14.2979%2032.0872%2014.6254%2032.4147%2015.0294%2032.4147H20.8339C21.2378%2032.4147%2021.5654%2032.0872%2021.5654%2031.6832V25.1377C21.5654%2024.7338%2021.2378%2024.4062%2020.8339%2024.4062Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.8252%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.0391%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.71875%2014.1642H8.53075C9.03425%2014.1642%209.49025%2013.8602%209.68025%2013.4042L10.3263%2011.8652'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.4991%205.54803L12.2266%2011.8655H17.5371L19.8836%205.51953L17.4991%205.54803Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2017%2016.4639H6.57421C5.97571%2016.4639%205.49121%2015.9794%205.49121%2015.3809C5.49121%2013.4334%207.06821%2011.8564%209.01571%2011.8564H20.3492'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.56738%2032.4805H32.2909'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9289'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",yN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9314)'%3e%3cpath%20d='M15.1807%2019.3994L18.7717%2029.7164'%20stroke='%23FF8CC3'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2010.7443%2014.7724%2013.2618%2022.0209'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2016.2448%2012.8534%2018.7718%2020.1019'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8257%2016.71C22.2202%2012.112%2017.1947%209.67999%2012.5967%2011.276C7.99871%2012.8815%205.56671%2017.907%207.16271%2022.505L7.67571%2023.968L7.88471%2023.892C7.93221%2022.7235%208.67321%2021.6405%209.85121%2021.232C11.0292%2020.8235%2012.2737%2021.2035%2013.0432%2022.0965L13.4422%2021.954C13.4897%2020.7855%2014.2307%2019.7025%2015.4087%2019.294C16.5867%2018.8855%2017.8312%2019.2655%2018.6007%2020.1585L18.9997%2020.016C19.0472%2018.8475%2019.7882%2017.7645%2020.9662%2017.356C22.1442%2016.9475%2023.3887%2017.3275%2024.1582%2018.2205L24.3577%2018.154L23.8447%2016.691L23.8257%2016.71Z'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.37%2015.4193C23.636%2015.4858%2023.9115%2015.5238%2024.1965%2015.5238C26.068%2015.5238%2027.5785%2014.0038%2027.5785%2012.1418C27.5785%2010.2798%2026.0585%208.75977%2024.1965%208.75977C22.3345%208.75977%2020.8145%2010.2798%2020.8145%2012.1418'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M24.2061%206.12784V5.00684'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.8641%207.79018L19.1611%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5381%2016.4736L29.2411%2017.1766'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.21%2012.1318H31.331'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5469%207.79018L29.2404%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.3355%2029.8213H14.2305'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.2302%2029.8213L10.3447%2025.2803'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8527%2028.4531L7.76074%2032.9941'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8447%2029.8213L27.4072%2032.9943'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9314'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",xN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9273)'%3e%3cpath%20d='M25.9254%2020.8996C27.5151%2020.8996%2028.8039%2019.6108%2028.8039%2018.0211C28.8039%2016.4313%2027.5151%2015.1426%2025.9254%2015.1426C24.3356%2015.1426%2023.0469%2016.4313%2023.0469%2018.0211C23.0469%2019.6108%2024.3356%2020.8996%2025.9254%2020.8996Z'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M31.4825%2032.4711V25.9066C31.4825%2024.5671%2030.485%2023.4746%2029.2595%2023.4746H22.6C21.3745%2023.4746%2020.377%2024.5671%2020.377%2025.9066'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.2696%2026.7334H14.2686L16.5106%2032.6234H27.5021L25.2696%2026.7334Z'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5617%2018.8385C6.1462%2017.4135%205.2627%2015.447%205.2627%2013.2715C5.2627%208.91095%208.7967%205.37695%2013.1572%205.37695C17.5177%205.37695%2021.0517%208.91095%2021.0517%2013.2715C21.0517%2015.124%2020.4152%2016.815%2019.3512%2018.164C18.0497%2019.8075%2016.1117%2020.919%2013.9172%2021.128'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%2013.2715L16.0167%2015.5705'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%208.62598V13.2715'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.35963%2016.1973L7.84663%2019.1328L4.91113%2018.6293'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.91113%2032.623H33.0881'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9273'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bN=({children:e})=>{const[t,r]=v.useState({x:0,y:0}),[n,i]=v.useState(!1),[a,s]=v.useState({x:0,y:0}),[l,c]=v.useState(!1),[d,u]=v.useState(!0),f=v.useRef(null),h=[{id:"overtime",title:"시간 외 근무신청",icon:o.jsx("img",{src:xN,alt:"시간외근무신청",className:"quick-overtime"}),color:"#722ed1",onClick:()=>{console.log("시간 외 근무 신청 클릭")}},{id:"business-trip",title:"출장신청",icon:o.jsx("img",{src:vN,alt:"출장신청",className:"quick-business-trip"}),color:"#1890ff",onClick:()=>{console.log("출장 신청 클릭")}},{id:"vacation",title:"휴가신청",icon:o.jsx("img",{src:yN,alt:"휴가신청",className:"quick-holiday"}),color:"#eb2f96",onClick:()=>{console.log("휴가 신청 클릭")}},{id:"document",title:"문서신청",icon:o.jsx(X.FileTextOutlined,{}),color:"#52c41a",onClick:()=>{console.log("문서 신청 클릭")}},{id:"profile",title:"인사정보",icon:o.jsx(X.UserOutlined,{}),color:"#fa8c16",onClick:()=>{console.log("인사 정보 클릭")}},{id:"settings",title:"설정",icon:o.jsx(X.SettingOutlined,{}),color:"#13c2c2",onClick:()=>{console.log("설정 클릭")}}];v.useEffect(()=>{const b=()=>{const j=window.innerHeight,E=Math.max(64,(j-300)/3);r({x:0,y:E});const S=j/2;u(E<S)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const g=b=>{if(b.preventDefault(),b.stopPropagation(),f.current){const j=f.current.getBoundingClientRect();s({x:b.clientX-j.left,y:b.clientY-j.top}),i(!0)}},m=b=>{if(n){const j=b.clientY-a.y,P=window.innerHeight-24,S=Math.max(64,Math.min(P,j));r({x:t.x,y:S});const O=window.innerHeight/2;u(S<O)}},x=()=>{i(!1)},y=()=>{c(!l)},w=b=>{b.onClick&&b.onClick()};return v.useEffect(()=>{if(n)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",x),()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",x)}},[n,a]),o.jsxs("div",{className:"quick-tab-container",ref:f,style:{position:"fixed",right:0,top:t.y,zIndex:1e3,userSelect:"none",touchAction:"none"},children:[o.jsxs("div",{className:"quick-tab",style:{position:"absolute",right:"40px",top:d?0:"auto",bottom:d?"auto":0,display:"flex",flexDirection:"column",gap:"15px",border:"1px solid #E0DEEF",borderRadius:"15px",padding:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.3)",minWidth:"88px",maxWidth:"88px",maxHeight:d?`calc(100vh - ${t.y+12}px)`:`${t.y-12}px`,transform:l?"translateX(0)":"translateX(calc(100% + 100px))",transition:"transform 0.3s ease",marginTop:d&&t.y<100?"32px":"0",marginBottom:!d&&t.y>window.innerHeight-100?"8px":"0"},children:[o.jsx("div",{className:"quick-tab-items-wrap",style:{background:"#ffffff",borderRadius:"10px",flex:1,overflowY:"auto",maxHeight:d?`calc(100vh - ${t.y+120}px)`:`${t.y-60}px`,padding:"14px 0"},children:h.map(b=>o.jsx(p.Card,{className:"quick-tab-items",size:"small",style:{border:"none",boxShadow:"none",marginBottom:"15px",cursor:"pointer",transition:"all 0.2s ease"},styles:{body:{padding:"0"}},onClick:()=>w(b),onMouseEnter:j=>{},onMouseLeave:j=>{},children:o.jsxs("div",{className:"quick-tab-item-inner",children:[o.jsx("div",{className:"quick-tab-items-icon",style:{width:"44px",height:"44px",borderRadius:"8PX",fontSize:"24px",color:b.color,marginBottom:"5px"},children:b.icon}),o.jsx("div",{className:"quick-tab-items-title",children:b.title})]})},b.id))}),o.jsx("div",{className:"quick-tab-add-btn",style:{height:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease",flexShrink:0,marginBottom:"7px"},onMouseEnter:b=>{},onMouseLeave:b=>{},children:o.jsx("span",{className:"quick-tab-add-icon",children:o.jsx(X.PlusOutlined,{style:{color:"#CDC4FF",fontSize:"15px"}})})})]}),o.jsx("div",{className:"quick-tab-drag-btn",style:{cursor:n?"grabbing":"grab",zIndex:1001},onMouseDown:b=>g(b)}),o.jsx(p.Button,{className:`quick-tab-toggle-btn ${l?"expanded":""}`,type:"default",style:{border:"0",backgroundColor:"transparent"},onClick:y})]})},wN=()=>{const{verifyWithToken:e}=ct.useAuth(),t=qm.useNavigate(),r=qm.useLocation();return v.useEffect(()=>{const i=new URLSearchParams(r.search).get("token");if(!i){t("/login",{replace:!0});return}(async()=>{const a=await e(i);t(a?"/main":"/login",{replace:!0})})()},[r.search]),o.jsx("div",{style:{display:"grid",placeItems:"center",height:"100dvh"},children:o.jsx(p.Spin,{tip:"인증중..."})})},CN=e=>{const{showPopup:t}=ct.usePopup(),r=v.useRef(null),n=v.useRef(null),i=v.useRef(null),a=v.useRef(null),[s,l]=v.useState(!1),[c,d]=v.useState(null),[u,f]=v.useState("common"),{getCodeColor:h,getCodeName:g,getCodeList:m}=ct.useCommonCode(),x=v.useMemo(()=>oe.createBwgGridRenderer((I,R,$,U,V)=>{const F=R.value,q=h?.(F)||"blue",ie=g?.(F)||F,ue=F?o.jsx(p.Tag,{color:q,style:{fontSize:"11px"},children:ie}):null;V.render(o.jsx("div",{style:{padding:"4px"},children:ue}))}),[h,g]),[y,w]=v.useState({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),[b,j]=v.useState(!1),P=v.useMemo(()=>[{fieldName:"authId",header:{text:"권한ID"},width:120,visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:120,visible:!1},{fieldName:"menuNm",header:{text:"메뉴명"},width:200,visible:!1},{fieldName:"grpId",header:{text:"그룹ID"},width:100},{fieldName:"btnId",header:{text:"버튼ID"},width:100},{fieldName:"btnNm",header:{text:"버튼명"},width:150},{fieldName:"btnSq",header:{text:"출력순서"},width:80,dataType:"number"},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),E={container:{check:!0,indicator:!0,footer:!0}},S={onCurrentRowChanged(I,R,$){console.log("공통 버튼 그리드 - 현재 행 변경:",{oldRow:R,newRow:$,activeTabKey:u})}},O={onCurrentRowChanged(I,R,$){console.log("커스텀 버튼 그리드 - 현재 행 변경:",{oldRow:R,newRow:$,activeTabKey:u})}},k=I=>{f(I)};v.useEffect(()=>{},[]),v.useEffect(()=>{const I=n.current?.vw?.getCurrent().itemIndex??-1;if(I<0)return;const R=n.current?.vw?.getValues(I);_.SCMAUTH00201({crprCd:R.crprCd,systId:R.systId,authId:R.authId,menuId:R.authMenu,grpId:u==="common"?"DEFAULT":"CUSTOM"})},[u]);const M=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"회사코드"},width:80,visible:!1},{fieldName:"systId",header:{text:"업무분류"},width:80,renderer:"tag"},{fieldName:"authId",header:{text:"권한ID"},width:120,required:!0},{fieldName:"authNm",header:{text:"권한명칭"},width:200,styleName:"left",editable:!0},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{fieldName:"authMenu",header:{text:"메뉴"},width:100,visible:!1},{fieldName:"authMenuNm",header:{text:"메뉴"},width:100,styleName:"left"},{fieldName:"authDscr",header:{text:"권한설명"},width:300,visible:!1}],[]),A={onCurrentRowChanged(I,R,$){if($<0)return;const U=I.getValues($);console.log("권한 선택:",U),console.log("현재 activeTabKey:",u),r.current?.setFieldsValue(U),_.SCMAUTH00201({crprCd:U.crprCd,systId:U.systId,authId:U.authId,menuId:U.authMenu,grpId:u==="common"?"DEFAULT":"CUSTOM"})}},_={SCMAUTH00101:()=>{oe.callService("SCMAUTH00101",{crprCd:oe.getCrprCd()},{}).then(I=>{n.current?.addAllData(I.data)})},SCMAUTH00102:I=>{oe.callService("SCMAUTH00102",{...I},{}).then(R=>{R.result||r.current?.setFields([{name:"authId",errors:[R.message]}])})},SCMAUTH00201:I=>{oe.callService("SCMAUTH00201",{...I},{}).then(R=>{u==="common"?i.current?.addAllData(R.data):a.current?.addAllData(R.data)}).catch(R=>{console.error("SCMAUTH00201 호출 실패:",R)})},SCMAUTH00301:async I=>{try{const R=await oe.callService("SCMAUTH00301",{...I,crprCd:oe.getCrprCd()},{});return console.log("권한 정보 저장 성공:",R),j(!1),_.SCMAUTH00101(),R}catch(R){throw console.error("권한 정보 저장 실패:",R),R}},SCMAUTH00401:async I=>{try{const R=await oe.callService("SCMAUTH00401",{...I,crprCd:oe.getCrprCd()},{});return console.log("권한 정보 수정 성공:",R),j(!1),_.SCMAUTH00101(),R}catch(R){throw console.error("권한 정보 수정 실패:",R),R}}},D={search:()=>{_.SCMAUTH00101()},new:()=>{j(!1),w({crprCd:String(oe.getCrprCd()||""),systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),l(!0)},edit:()=>{const I=n.current?.getCurrentRow();I&&typeof I=="object"&&(j(!0),w({crprCd:I.crprCd||String(oe.getCrprCd()||""),systId:I.systId||"",authId:I.authId||"",authNm:I.authNm||"",authDscr:I.authDscr||"",authMenu:I.authMenu||"",enblYn:I.enblYn||"Y"}),l(!0))}},B={test:()=>{console.log("test")}},H={openPopup:I=>{t("CMDprtSrchP02",{isDefault:I})},add:()=>{console.log("add")},modify:()=>{console.log("edit")},delete:()=>{console.log("delete")}},T=(I,R)=>{w($=>({...$,[I]:R}))},N=async()=>{try{b||await _.SCMAUTH00102({auth:r.current?.getFieldsValue()})}catch(I){console.error("권한 정보 처리 실패:",I)}};return v.useEffect(()=>{_.SCMAUTH00101()},[]),v.useEffect(()=>{},[n.current?.getGridInstance()?.gridView]),o.jsx(kt,{grantEvent:D,customEvent:B,children:o.jsxs(ze,{children:[o.jsxs(De,{className:"w40",children:[o.jsx(Le,{title:"권한 관리",icons:{type:"antd"},children:o.jsx(p.Popover,{styles:{body:{border:"1px solid #ededed",background:"#ededed"}},content:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Button,{type:"primary",onClick:()=>H.openPopup(!0),children:"공통권한버튼"}),o.jsx(p.Button,{onClick:()=>H.openPopup(!1),children:"커스텀 버튼"})]}),placement:"bottom",children:o.jsx(p.Button,{icon:o.jsx(X.SettingTwoTone,{}),title:"버튼관리",children:"버튼관리"})})}),o.jsx(Fe,{type:"nrml",ref:n,gridColumns:M,renderers:[{name:"tag",renderer:x}],gridOptions:{container:{indicator:!0,check:!0,checkAll:!0}},gridEvents:A})]}),o.jsx(De,{className:"w60",border:!0,children:o.jsxs(dn,{title:"권한 상세",children:[o.jsxs(L.BwgForm,{ref:r,style:{padding:"10px 20px"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"업무분류",name:"systId"},selectProps:{variant:"borderless",options:m("SYST"),copyable:!0,disabled:!0}})}),o.jsx(p.Col,{span:8,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",children:o.jsx(p.Select,{variant:"borderless",options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}],disabled:!0})})}),o.jsx(p.Col,{span:8})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgFormItem,{label:"권한ID",name:"authId",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:16,children:o.jsx(L.BwgFormItem,{label:"권한명",name:"authNm",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{label:"권한메뉴",style:{width:"100%",marginBottom:0},validateStatus:"",help:"",children:o.jsxs(p.Space.Compact,{block:!0,children:[o.jsx(p.Form.Item,{name:"authMenu",style:{width:"40%"},validateStatus:"",help:"",children:o.jsx(p.Input,{readOnly:!0,variant:"filled"})}),o.jsx(p.Form.Item,{name:"authMenuNm",style:{width:"60%"},validateStatus:"",help:"",children:o.jsx(p.Input,{readOnly:!0})})]})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{label:"권한설명",name:"authDscr",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0})})})})]}),o.jsx(ar,{size:"small",activeKey:u,onChange:k,items:[{key:"common",label:"공통버튼",children:o.jsxs(De,{children:[o.jsx(Le,{title:"공통 버튼 매핑",children:o.jsx(Yf,{grpId:"AUTH",menuId:"CM010303",btnEvent:H})}),o.jsx(Fe,{ref:i,type:"nrml",gridColumns:P,gridOptions:E,gridEvents:S})]})},{key:"custom",label:"커스텀",children:o.jsxs(De,{children:[o.jsx(Le,{title:"커스텀 버튼 매핑",children:o.jsx(Yf,{grpId:"AUTH2",menuId:"CM010303"})}),o.jsx(Fe,{ref:a,type:"nrml",gridColumns:P,gridOptions:E,gridEvents:O})]})}],tabPosition:"left"})]})}),o.jsx(un,{title:`권한별 메뉴 관리 - ${c?.authNm||""}`,open:s,placement:"right",onClose:()=>{l(!1),w({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),j(!1)},width:"40%",size:"large",afterOpenChange:I=>{console.log("afterOpenChange:",I)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:()=>{l(!1),r.current?.resetFields(),j(!1)},className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:N,className:"bwg-btn",children:"저장"})]}),children:o.jsxs(L.BwgForm,{ref:r,initialValues:y,children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSearch,{itemProps:{name:["crprCd","crprNm"],label:"회사 코드"},placeholder:["회사 코드","회사 명칭"],popuCd:"CMAuthMstrP01"})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"systId",label:"시스템 ID"},selectProps:{variant:"borderless",options:m("SYST"),copyable:!0,disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{name:"authId",label:"권한 ID",children:o.jsx(p.Input,{onChange:I=>T("authId",I.target.value),placeholder:"권한 ID를 입력하세요",disabled:b})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{name:"enblYn",label:"사용여부",children:o.jsx(p.Select,{onChange:I=>T("enblYn",I),options:[{value:"Y",label:"사용"},{value:"N",label:"미사용"}]})})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{name:"authNm",label:"권한 명칭",children:o.jsx(p.Input,{onChange:I=>T("authNm",I.target.value),placeholder:"권한 명칭을 입력하세요"})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{name:"authDscr",label:"권한 설명",children:o.jsx(p.Input.TextArea,{onChange:I=>T("authDscr",I.target.value),placeholder:"권한 설명을 입력하세요",rows:2})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{name:["authMenu","authMenuNm"],label:"권한 메뉴"},placeholder:["메뉴ID","메뉴명명"],popuCd:"CMMenuMstrP01"})})})]})})]})})},SN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState("menu"),s=v.useMemo(()=>oe.createBwgGridRenderer((m,x,y,w,b)=>{const j=m.getValue(x.index?.itemIndex,"systId"),P=m.getValue(x.index?.itemIndex,"roleId"),E=m.getValue(x.index?.itemIndex,"roleNm"),S=m.getValue(x.index?.itemIndex,"enblYn"),O=m.getValue(x.index?.itemIndex,"roleDscr");b.render(o.jsx(p.Card,{size:"small",style:{height:"95px"},children:o.jsxs(p.Flex,{style:{height:"95px"},children:[o.jsxs(De,{className:"w60",style:{position:"relative",padding:"8px"},children:[o.jsx("div",{style:{position:"absolute",top:"8px",left:"8px"},children:o.jsx(p.Tag,{color:"blue",style:{fontSize:"13px"},children:j})}),o.jsx("div",{style:{position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"16px",fontWeight:"bold",color:"#262626",textAlign:"center"},children:E}),o.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%)",fontSize:"13px",color:"#8c8c8c",fontFamily:"monospace"},children:P}),o.jsx("div",{style:{position:"absolute",bottom:"8px",right:"8px",fontSize:"16px",color:S==="Y"?"#52c41a":"#ff4d4f"},children:S==="Y"?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):o.jsx(X.CloseCircleOutlined,{style:{color:"#ff4d4f"}})})]}),o.jsx(p.Divider,{type:"vertical",style:{height:"95px"}}),o.jsx(De,{className:"w40",children:O&&o.jsx(p.Typography.Text,{style:{fontSize:"13px",color:"#595959",lineHeight:"1.4",textAlign:"left",display:"block",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:o.jsx("blockquote",{children:O})})})]})}))}),[]),l=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"법인코드"},width:100,visible:!1},{fieldName:"systId",header:{text:"시스템ID"},width:100,renderer:"systCard"},{fieldName:"roleId",header:{text:"역할ID"},width:120},{fieldName:"roleNm",header:{text:"역할명"},width:150},{fieldName:"roleDscr",header:{text:"역할설명"},width:200,visible:!1},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80,visible:!1},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"},visible:!1}],[]),c=[{fieldName:"crprCd",header:{text:"법인코드"},width:100,visible:!1},{fieldName:"roleId",header:{text:"역할ID"},width:120,visible:!1},{fieldName:"dprtCd",header:{text:"부서코드"},width:120},{fieldName:"dprtNm",header:{text:"부서"},width:120},{fieldName:"subSyncYn",header:{text:"동기화여부"},width:100,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],d=[{fieldName:"userId",header:{text:"사용자ID"},width:120},{fieldName:"userNm",header:{text:"사용자명"},width:150},{fieldName:"deptNm",header:{text:"부서명"},width:150},{fieldName:"email",header:{text:"이메일"},width:200,visible:!1},{fieldName:"enblYn",header:{text:"사용여부"},width:80,visible:!1}],u=v.useMemo(()=>({display:{rowHeight:100},layout:{colspan:[{fieldName:"systId",span:3}]},container:{state:!0,check:!0,checkAll:!0,indicator:!0,footer:!0}}),[]),f={onCurrentRowChanged(m,x,y){if(y<0)return;const w=m.getValues(y);switch(i){case"menu":break;case"dept":h.SCMROLE00103(w.roleId);break;case"user":h.SCMROLE00104(w.roleId);break}}},h={SCMROLE00101:()=>{oe.callService("SCMROLE00101",{crprCd:oe.getCrprCd()}).then(m=>{console.log("SCMROLE00101:",m),t.current?.addAllData(m.data)})},SCMROLE00102:m=>{oe.callService("SCMROLE00102",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00102:",x)})},SCMROLE00103:m=>{oe.callService("SCMROLE00103",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00103:",x),r.current?.addAllData(x.data)})},SCMROLE00104:m=>{oe.callService("SCMROLE00104",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00104:",x),n.current?.addAllData(x.data)})}},g={search:()=>{h.SCMROLE00101()}};return v.useEffect(()=>{const m=t.current?.getCurrentIndex()??-1;if(m<0)return;const x=t.current?.vw?.getValue(m,"roleId");switch(i){case"menu":break;case"dept":h.SCMROLE00103(x);break;case"user":h.SCMROLE00104(x);break}},[i]),o.jsx(kt,{grantEvent:g,children:o.jsxs(ze,{children:[o.jsxs(De,{className:"w40",children:[o.jsx(Le,{title:"역할 목록",icons:{type:"antd"}}),o.jsx(Fe,{ref:t,type:"nrml",gridColumns:l,gridOptions:u,gridEvents:f,renderers:[{name:"systCard",renderer:s}]})]}),o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"역할별 관리"}),o.jsx(p.Tabs,{className:"bwg-tab",activeKey:i,onChange:m=>a(m),items:[{key:"menu",label:"역할별 메뉴",icon:o.jsx(X.MenuOutlined,{}),children:o.jsx(Fe,{type:"tree",gridColumns:[{fieldName:"menuId",header:{text:"메뉴ID"},width:120},{fieldName:"menuNm",header:{text:"메뉴명"},width:200},{fieldName:"menuPath",header:{text:"메뉴경로"},width:300},{fieldName:"enblYn",header:{text:"사용여부"},width:80}],gridOptions:{display:{rowHeight:40}}})},{key:"dept",label:"역할별 부서",icon:o.jsx(X.TeamOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(De,{className:"w50",children:o.jsx(Fe,{ref:r,type:"nrml",gridColumns:c,gridOptions:{display:{rowHeight:40}}})}),o.jsx(De,{className:"w50",border:!0,children:o.jsx(dn,{title:"부서정보",children:"123"})})]})},{key:"user",label:"역할별 사용자",icon:o.jsx(X.UserOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(De,{className:"w50",children:o.jsx(Fe,{ref:n,type:"nrml",gridColumns:d,gridOptions:{display:{rowHeight:40}}})}),o.jsx(De,{className:"w50",border:!0,children:o.jsx(dn,{title:"사용자정보",children:"123"})})]})}]})]})]})})};var ca={},R0;function jN(){if(R0)return ca;R0=1;function e(E){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},e(E)}Object.defineProperty(ca,"__esModule",{value:!0}),ca.CopyToClipboard=void 0;var t=i(v),r=i(QC()),n=["text","onCopy","options","children"];function i(E){return E&&E.__esModule?E:{default:E}}function a(E,S){var O=Object.keys(E);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(E);S&&(k=k.filter(function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable})),O.push.apply(O,k)}return O}function s(E){for(var S=1;S<arguments.length;S++){var O=arguments[S]!=null?arguments[S]:{};S%2?a(Object(O),!0).forEach(function(k){j(E,k,O[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):a(Object(O)).forEach(function(k){Object.defineProperty(E,k,Object.getOwnPropertyDescriptor(O,k))})}return E}function l(E,S){if(E==null)return{};var O=c(E,S),k,M;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(E);for(M=0;M<A.length;M++)k=A[M],!(S.indexOf(k)>=0)&&Object.prototype.propertyIsEnumerable.call(E,k)&&(O[k]=E[k])}return O}function c(E,S){if(E==null)return{};var O={},k=Object.keys(E),M,A;for(A=0;A<k.length;A++)M=k[A],!(S.indexOf(M)>=0)&&(O[M]=E[M]);return O}function d(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function u(E,S){for(var O=0;O<S.length;O++){var k=S[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(E,k.key,k)}}function f(E,S,O){return S&&u(E.prototype,S),Object.defineProperty(E,"prototype",{writable:!1}),E}function h(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),S&&g(E,S)}function g(E,S){return g=Object.setPrototypeOf||function(k,M){return k.__proto__=M,k},g(E,S)}function m(E){var S=w();return function(){var k=b(E),M;if(S){var A=b(this).constructor;M=Reflect.construct(k,arguments,A)}else M=k.apply(this,arguments);return x(this,M)}}function x(E,S){if(S&&(e(S)==="object"||typeof S=="function"))return S;if(S!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(E)}function y(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(E){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},b(E)}function j(E,S,O){return S in E?Object.defineProperty(E,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):E[S]=O,E}var P=(function(E){h(O,E);var S=m(O);function O(){var k;d(this,O);for(var M=arguments.length,A=new Array(M),_=0;_<M;_++)A[_]=arguments[_];return k=S.call.apply(S,[this].concat(A)),j(y(k),"onClick",function(D){var B=k.props,H=B.text,T=B.onCopy,N=B.children,I=B.options,R=t.default.Children.only(N),$=(0,r.default)(H,I);T&&T(H,$),R&&R.props&&typeof R.props.onClick=="function"&&R.props.onClick(D)}),k}return f(O,[{key:"render",value:function(){var M=this.props,A=M.children,_=l(M,n),D=t.default.Children.only(A);return t.default.cloneElement(D,s(s({},_),{},{onClick:this.onClick}))}}]),O})(t.default.PureComponent);return ca.CopyToClipboard=P,j(P,"defaultProps",{onCopy:void 0,options:void 0}),ca}var dd,A0;function EN(){if(A0)return dd;A0=1;var e=jN(),t=e.CopyToClipboard;return t.CopyToClipboard=t,dd=t,dd}var PN=EN();const Gh=wr(PN),pr=({children:e,onClick:t,isActive:r=!1,icon:n})=>{const[i,a]=v.useState(!1),s={width:"100%",textAlign:"left",marginBottom:"8px",border:"none",borderRadius:"8px",padding:"12px 16px",fontWeight:500,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative",overflow:"hidden",background:r?"#00bcd4":"transparent",color:r?"#ffffff":"#595959",transform:i?"translateX(4px)":"translateX(0)",boxShadow:r?i?"0 4px 12px rgba(0, 188, 212, 0.3)":"none":i?"0 2px 8px rgba(0, 0, 0, 0.1)":"none"},l={position:"absolute",left:0,top:0,bottom:0,width:"4px",background:"#00bcd4",borderRadius:"0 2px 2px 0"};return o.jsxs(p.Button,{type:"text",onClick:t,style:s,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r&&o.jsx("div",{style:l}),n&&o.jsx("span",{style:{marginRight:"8px",fontSize:"16px"},children:n}),o.jsx("span",{style:{fontSize:"14px",lineHeight:1.4},children:e})]})},hr=({importText:e,onCopy:t})=>o.jsx(Gh,{text:e,onCopy:()=>{p.message.success("import 문이 복사되었습니다!"),t?.()},children:o.jsxs("div",{style:{background:"#1e1e1e",border:"1px solid #3c3c3c",borderRadius:"6px",padding:"12px 16px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:"13px",color:"#d4d4d4",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"all 0.2s ease",userSelect:"none"},onMouseEnter:r=>{r.currentTarget.style.background="#2d2d30",r.currentTarget.style.borderColor="#4a4a4a"},onMouseLeave:r=>{r.currentTarget.style.background="#1e1e1e",r.currentTarget.style.borderColor="#3c3c3c"},children:[o.jsx("code",{children:e}),o.jsx(X.CopyOutlined,{style:{color:"#858585",fontSize:"14px"}})]})}),qr=({selectedRowKeys:e,onSelectionChange:t,componentName:r})=>{const n=[{property:"label",description:"폼 아이템의 라벨 텍스트입니다. 필수 항목일 경우 자동으로 별표(*)가 추가됩니다.",type:"string | React.ReactNode"},{property:"name",description:"폼 필드의 이름입니다. Form.useForm과 함께 사용되어 필드 값을 관리합니다.",type:"string | string[]"},{property:"rules",description:'필드의 유효성 검사 규칙입니다. Ant Design의 Form.Item rules를 따릅니다. (예: [{ required: true, message: "필수 입력 항목입니다." }])',type:"Rule[]"},{property:"initialValue",description:"필드의 초기값을 설정합니다.",type:"any"}],i=()=>{if(e.length===0){p.message.warning("선택된 속성이 없습니다!");return}const a={label:"'라벨'",name:"'fieldName'",rules:"[{ required: true, message: '필수 항목입니다.' }]",initialValue:"'초기값'"},s=e.map(c=>` ${c}: ${a[c]||"true"}`).join(`,
183
+ `]:Object.assign(Object.assign({},iC(e)),{marginInlineStart:e.marginXXS})}),BI(e)),$I(e)),LI()),{"&-rtl":{direction:"rtl"}})}},FI=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),ZC=os("Typography",zI,FI),VI=e=>{const{prefixCls:t,"aria-label":r,className:n,style:i,direction:a,maxLength:s,autoSize:l=!0,value:c,onSave:d,onCancel:u,onEnd:f,component:h,enterIcon:g=C.createElement(DC,null)}=e,m=C.useRef(null),x=C.useRef(!1),y=C.useRef(null),[w,b]=C.useState(c);C.useEffect(()=>{b(c)},[c]),C.useEffect(()=>{var H;if(!((H=m.current)===null||H===void 0)&&H.resizableTextArea){const{textArea:T}=m.current.resizableTextArea;T.focus();const{length:N}=T.value;T.setSelectionRange(N,N)}},[]);const j=({target:H})=>{b(H.value.replace(/[\n\r]/g,""))},P=()=>{x.current=!0},E=()=>{x.current=!1},S=({keyCode:H})=>{x.current||(y.current=H)},O=()=>{d(w.trim())},k=({keyCode:H,ctrlKey:T,altKey:N,metaKey:I,shiftKey:R})=>{y.current!==H||x.current||T||N||I||R||(H===y0.ENTER?(O(),f?.()):H===y0.ESC&&u())},M=()=>{O()},[A,_,D]=ZC(t),B=Be(t,`${t}-edit-content`,{[`${t}-rtl`]:a==="rtl",[`${t}-${h}`]:!!h},n,_,D);return A(C.createElement("div",{className:B,style:i},C.createElement(AI,{ref:m,maxLength:s,value:w,onChange:j,onKeyDown:S,onKeyUp:k,onCompositionStart:P,onCompositionEnd:E,onBlur:M,"aria-label":r,rows:1,autoSize:l}),g!==null?AC(g,{className:`${t}-edit-content-confirm`}):null))};var nd,E0;function HI(){return E0||(E0=1,nd=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),nd}var id,P0;function QC(){if(P0)return id;P0=1;var e=HI(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,s)}function i(a,s){var l,c,d,u,f,h,g=!1;s||(s={}),l=s.debug||!1;try{d=e(),u=document.createRange(),f=document.getSelection(),h=document.createElement("span"),h.textContent=a,h.ariaHidden="true",h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",function(x){if(x.stopPropagation(),s.format)if(x.preventDefault(),typeof x.clipboardData>"u"){l&&console.warn("unable to use e.clipboardData"),l&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=t[s.format]||t.default;window.clipboardData.setData(y,a)}else x.clipboardData.clearData(),x.clipboardData.setData(s.format,a);s.onCopy&&(x.preventDefault(),s.onCopy(x.clipboardData))}),document.body.appendChild(h),u.selectNodeContents(h),f.addRange(u);var m=document.execCommand("copy");if(!m)throw new Error("copy command was unsuccessful");g=!0}catch(x){l&&console.error("unable to copy using execCommand: ",x),l&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",a),s.onCopy&&s.onCopy(window.clipboardData),g=!0}catch(y){l&&console.error("unable to copy using clipboardData: ",y),l&&console.error("falling back to prompt"),c=n("message"in s?s.message:r),window.prompt(c,a)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(u):f.removeAllRanges()),h&&document.body.removeChild(h),d()}return g}return id=i,id}var WI=QC();const UI=wr(WI),KI=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];var YI=exports&&exports.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(u){try{d(n.next(u))}catch(f){s(f)}}function c(u){try{d(n.throw(u))}catch(f){s(f)}}function d(u){u.done?a(u.value):i(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const qI=({copyConfig:e,children:t})=>{const[r,n]=C.useState(!1),[i,a]=C.useState(!1),s=C.useRef(null),l=()=>{s.current&&clearTimeout(s.current)},c={};e.format&&(c.format=e.format),C.useEffect(()=>l,[]);const d=yr(u=>YI(void 0,void 0,void 0,function*(){var f;u?.preventDefault(),u?.stopPropagation(),a(!0);try{const h=typeof e.text=="function"?yield e.text():e.text;UI(h||KI(t,!0).join("")||"",c),a(!1),n(!0),l(),s.current=setTimeout(()=>{n(!1)},3e3),(f=e.onCopy)===null||f===void 0||f.call(e,u)}catch(h){throw a(!1),h}}));return{copied:r,copyLoading:i,onClick:d}};function od(e,t){return C.useMemo(()=>{const r=!!e;return[r,Object.assign(Object.assign({},t),r&&typeof e=="object"?e:null)]},[e])}const GI=e=>{const t=v.useRef(void 0);return v.useEffect(()=>{t.current=e}),t.current},XI=(e,t,r)=>v.useMemo(()=>e===!0?{title:t??r}:v.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??r},e):{title:e},[e,t,r]);var ZI=exports&&exports.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const JC=C.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:i,rootClassName:a,setContentRef:s,children:l,direction:c,style:d}=e,u=ZI(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:f,direction:h,className:g,style:m}=Ic("typography"),x=c??h,y=s?es(t,s):t,w=f("typography",r);process.env.NODE_ENV!=="production"&&fn("Typography").deprecated(!s,"setContentRef","ref");const[b,j,P]=ZC(w),E=Be(w,g,{[`${w}-rtl`]:x==="rtl"},i,a,j,P),S=Object.assign(Object.assign({},m),d);return b(C.createElement(n,Object.assign({className:E,style:S,ref:y},u),l))});process.env.NODE_ENV!=="production"&&(JC.displayName="Typography");var QI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},JI=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:QI}))},eS=C.forwardRef(JI);process.env.NODE_ENV!=="production"&&(eS.displayName="CheckOutlined");var eN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},tN=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:eN}))},tS=C.forwardRef(tN);process.env.NODE_ENV!=="production"&&(tS.displayName="CopyOutlined");var rN={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},nN=function(t,r){return C.createElement(Nn,Mt({},t,{ref:r,icon:rN}))},rS=C.forwardRef(nN);process.env.NODE_ENV!=="production"&&(rS.displayName="LoadingOutlined");function O0(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function ad(e,t,r){return e===!0||e===void 0?t:e||r&&t}function iN(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const qh=e=>["string","number"].includes(typeof e),oN=({prefixCls:e,copied:t,locale:r,iconOnly:n,tooltips:i,icon:a,tabIndex:s,onCopy:l,loading:c})=>{const d=O0(i),u=O0(a),{copied:f,copy:h}=r??{},g=t?f:h,m=ad(d[t?1:0],g),x=typeof m=="string"?m:g;return C.createElement(ss,{title:m,getPopupContainer:y=>y.parentNode},C.createElement("button",{type:"button",className:Be(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:n}),onClick:l,"aria-label":x,tabIndex:s},t?ad(u[1],C.createElement(eS,null),!0):ad(u[0],c?C.createElement(rS,null):C.createElement(tS,null),!0)))},qs=C.forwardRef(({style:e,children:t},r)=>{const n=C.useRef(null);return C.useImperativeHandle(r,()=>({isExceed:()=>{const i=n.current;return i.scrollHeight>i.clientHeight},getHeight:()=>n.current.clientHeight})),C.createElement("span",{"aria-hidden":!0,ref:n,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),aN=e=>e.reduce((t,r)=>t+(qh(r)?String(r).length:1),0);function k0(e,t){let r=0;const n=[];for(let i=0;i<e.length;i+=1){if(r===t)return n;const a=e[i],l=qh(a)?String(a).length:1,c=r+l;if(c>t){const d=t-r;return n.push(String(a).slice(0,d)),n}n.push(a),r=c}return e}const sd=0,ld=1,cd=2,ud=3,T0=4,Gs={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function sN(e){const{enableMeasure:t,width:r,text:n,children:i,rows:a,expanded:s,miscDeps:l,onEllipsis:c}=e,d=C.useMemo(()=>Ma(n),[n]),u=C.useMemo(()=>aN(d),[n]),f=C.useMemo(()=>i(d,!1),[n]),[h,g]=C.useState(null),m=C.useRef(null),x=C.useRef(null),y=C.useRef(null),w=C.useRef(null),b=C.useRef(null),[j,P]=C.useState(!1),[E,S]=C.useState(sd),[O,k]=C.useState(0),[M,A]=C.useState(null);pt(()=>{S(t&&r&&u?ld:sd)},[r,n,a,t,d]),pt(()=>{var H,T,N,I;if(E===ld){S(cd);const R=x.current&&getComputedStyle(x.current).whiteSpace;A(R)}else if(E===cd){const R=!!(!((H=y.current)===null||H===void 0)&&H.isExceed());S(R?ud:T0),g(R?[0,u]:null),P(R);const $=((T=y.current)===null||T===void 0?void 0:T.getHeight())||0,U=a===1?0:((N=w.current)===null||N===void 0?void 0:N.getHeight())||0,V=((I=b.current)===null||I===void 0?void 0:I.getHeight())||0,F=Math.max($,U+V);k(F+1),c(R)}},[E]);const _=h?Math.ceil((h[0]+h[1])/2):0;pt(()=>{var H;const[T,N]=h||[0,0];if(T!==N){const R=(((H=m.current)===null||H===void 0?void 0:H.getHeight())||0)>O;let $=_;N-T===1&&($=R?T:N),g(R?[T,$]:[$,N])}},[h,_]);const D=C.useMemo(()=>{if(!t)return i(d,!1);if(E!==ud||!h||h[0]!==h[1]){const H=i(d,!1);return[T0,sd].includes(E)?H:C.createElement("span",{style:Object.assign(Object.assign({},Gs),{WebkitLineClamp:a})},H)}return i(s?d:k0(d,h[0]),j)},[s,E,h,d].concat(zt(l))),B={width:r,margin:0,padding:0,whiteSpace:M==="nowrap"?"normal":"inherit"};return C.createElement(C.Fragment,null,D,E===cd&&C.createElement(C.Fragment,null,C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:a}),ref:y},f),C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:a-1}),ref:w},f),C.createElement(qs,{style:Object.assign(Object.assign(Object.assign({},B),Gs),{WebkitLineClamp:1}),ref:b},i([],!0))),E===ud&&h&&h[0]!==h[1]&&C.createElement(qs,{style:Object.assign(Object.assign({},B),{top:400}),ref:m},i(k0(d,_),!0)),E===ld&&C.createElement("span",{style:{whiteSpace:"inherit"},ref:x}))}const nS=({enableEllipsis:e,isEllipsis:t,children:r,tooltipProps:n})=>!n?.title||!e?r:C.createElement(ss,Object.assign({open:t?void 0:!1},n),r);process.env.NODE_ENV!=="production"&&(nS.displayName="EllipsisTooltip");var lN=exports&&exports.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function cN({mark:e,code:t,underline:r,delete:n,strong:i,keyboard:a,italic:s},l){let c=l;function d(u,f){f&&(c=C.createElement(u,{},c))}return d("strong",i),d("u",r),d("del",n),d("code",t),d("mark",e),d("kbd",a),d("i",s),c}const uN="...",M0=["delete","mark","code","underline","strong","keyboard","italic"],dN=C.forwardRef((e,t)=>{var r;const{prefixCls:n,className:i,style:a,type:s,disabled:l,children:c,ellipsis:d,editable:u,copyable:f,component:h,title:g}=e,m=lN(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:x,direction:y}=C.useContext(Tn),[w]=aM("Text"),b=C.useRef(null),j=C.useRef(null),P=x("typography",n),E=Pw(m,M0),[S,O]=od(u),[k,M]=go(!1,{value:O.editing}),{triggerType:A=["icon"]}=O,_=Se=>{var Te;Se&&((Te=O.onStart)===null||Te===void 0||Te.call(O)),M(Se)},D=GI(k);pt(()=>{var Se;!k&&D&&((Se=j.current)===null||Se===void 0||Se.focus())},[k]);const B=Se=>{Se?.preventDefault(),_(!0)},H=Se=>{var Te;(Te=O.onChange)===null||Te===void 0||Te.call(O,Se),_(!1)},T=()=>{var Se;(Se=O.onCancel)===null||Se===void 0||Se.call(O),_(!1)},[N,I]=od(f),{copied:R,copyLoading:$,onClick:U}=qI({copyConfig:I,children:c}),[V,F]=C.useState(!1),[q,ie]=C.useState(!1),[ue,ge]=C.useState(!1),[Ee,Pe]=C.useState(!1),[Z,ve]=C.useState(!0),[fe,z]=od(d,{expandable:!1,symbol:Se=>Se?w?.collapse:w?.expand}),[ne,Y]=go(z.defaultExpanded||!1,{value:z.expanded}),le=fe&&(!ne||z.expandable==="collapsible"),{rows:pe=1}=z,xe=C.useMemo(()=>le&&(z.suffix!==void 0||z.onEllipsis||z.expandable||S||N),[le,z,S,N]);pt(()=>{fe&&!xe&&(F(kv("webkitLineClamp")),ie(kv("textOverflow")))},[xe,fe]);const[je,Me]=C.useState(le),W=C.useMemo(()=>xe?!1:pe===1?q:V,[xe,q,V]);pt(()=>{Me(W&&le)},[W,le]);const te=le&&(je?Ee:ue),ae=le&&pe===1&&je,re=le&&pe>1&&je,G=(Se,Te)=>{var ft;Y(Te.expanded),(ft=z.onExpand)===null||ft===void 0||ft.call(z,Se,Te)},[se,K]=C.useState(0),ee=({offsetWidth:Se})=>{K(Se)},Q=Se=>{var Te;ge(Se),ue!==Se&&((Te=z.onEllipsis)===null||Te===void 0||Te.call(z,Se))};C.useEffect(()=>{const Se=b.current;if(fe&&je&&Se){const Te=iN(Se);Ee!==Te&&Pe(Te)}},[fe,je,c,re,Z,se]),C.useEffect(()=>{const Se=b.current;if(typeof IntersectionObserver>"u"||!Se||!je||!le)return;const Te=new IntersectionObserver(()=>{ve(!!Se.offsetParent)});return Te.observe(Se),()=>{Te.disconnect()}},[je,le]);const de=XI(z.tooltip,O.text,c),ce=C.useMemo(()=>{if(!(!fe||je))return[O.text,c,g,de.title].find(qh)},[fe,je,g,de.title,te]);if(k)return C.createElement(VI,{value:(r=O.text)!==null&&r!==void 0?r:typeof c=="string"?c:"",onSave:H,onCancel:T,onEnd:O.onEnd,prefixCls:P,className:i,style:a,direction:y,component:h,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const ye=()=>{const{expandable:Se,symbol:Te}=z;return Se?C.createElement("button",{type:"button",key:"expand",className:`${P}-${ne?"collapse":"expand"}`,onClick:ft=>G(ft,{expanded:!ne}),"aria-label":ne?w.collapse:w?.expand},typeof Te=="function"?Te(ne):Te):null},be=()=>{if(!S)return;const{icon:Se,tooltip:Te,tabIndex:ft}=O,jr=Ma(Te)[0]||w?.edit,gi=typeof jr=="string"?jr:"";return A.includes("icon")?C.createElement(ss,{key:"edit",title:Te===!1?"":jr},C.createElement("button",{type:"button",ref:j,className:`${P}-edit`,onClick:B,"aria-label":gi,tabIndex:ft},Se||C.createElement(hw,{role:"button"}))):null},Ie=()=>N?C.createElement(oN,Object.assign({key:"copy"},I,{prefixCls:P,copied:R,locale:w,onCopy:U,loading:$,iconOnly:c==null})):null,Re=Se=>[Se&&ye(),be(),Ie()],me=Se=>[Se&&!ne&&C.createElement("span",{"aria-hidden":!0,key:"ellipsis"},uN),z.suffix,Re(Se)];return C.createElement(Ro,{onResize:ee,disabled:!le},Se=>C.createElement(nS,{tooltipProps:de,enableEllipsis:le,isEllipsis:te},C.createElement(JC,Object.assign({className:Be({[`${P}-${s}`]:s,[`${P}-disabled`]:l,[`${P}-ellipsis`]:fe,[`${P}-ellipsis-single-line`]:ae,[`${P}-ellipsis-multiple-line`]:re},i),prefixCls:n,style:Object.assign(Object.assign({},a),{WebkitLineClamp:re?pe:void 0}),component:h,ref:es(Se,b,t),direction:y,onClick:A.includes("text")?B:void 0,"aria-label":ce?.toString(),title:g},E),C.createElement(sN,{enableMeasure:le&&!je,text:c,rows:pe,width:se,onEllipsis:Q,expanded:ne,miscDeps:[R,ne,$,S,N,w].concat(zt(M0.map(Te=>e[Te])))},(Te,ft)=>cN(e,C.createElement(C.Fragment,null,Te.length>0&&ft&&!ne&&ce?C.createElement("span",{key:"show-content","aria-hidden":!0},Te):Te,me(ft)))))))}),fN=C.forwardRef((e,t)=>C.createElement(dN,Object.assign({ref:t},e,{component:"div"}))),iS=(e,t,r=null)=>{for(let n=0;n<e.length;n++){const i=e[n];if(i.key===t)return{node:i,ctx:{parent:r,index:n,siblings:e}};if(i.children?.length){const a=iS(i.children,t,i);if(a.node)return a}}return{node:null,ctx:null}},oS=(e,t)=>{if(!e.children)return!1;for(const r of e.children)if(r.key===t||oS(r,t))return!0;return!1};function pN({open:e,onClose:t}){const{nodes:r,rootIds:n,addFolder:i,editFolder:a,removeFolder:s,removeMenu:l,moveNode:c}=et.useFavoriteStore(),d=v.useRef(null),[u,f]=v.useState([]),[h,g]=v.useState([]),[m,x]=v.useState(""),[y,w]=v.useState("ADD"),[b,j]=v.useState(!1),[P,E]=v.useState("");v.useEffect(()=>{e&&g(n)},[e]),v.useEffect(()=>{const k=S(r,n);f(k)},[r]),v.useEffect(()=>{b&&P&&(d.current.setFieldValue("prntBkmkId",P),d.current.setFieldValue("prntBkmkNm",r[P]?.bkmkNm??"-")),b&&y==="EDIT"&&(d.current.setFieldValue("bkmkId",P),d.current.setFieldValue("bkmkNm",r[P]?.bkmkNm)),!b&&y=="ADD"&&g(k=>[...k,P]),!b&&d.current&&(E("-"),d.current.resetFields())},[b,y,P,r]);const S=(k,M)=>{const A=(_,D="-")=>{const B=k[_];if(!B)return null;const H={key:B.bkmkId,type:B.type,title:B.type==="F"?B.bkmkNm:B.menuNm?`${B.menuNm} (${B.menuId})`:B.menuId,parentId:D,sortOrdr:B.sortOrdr??0};if(B.type==="F"){const N=(B.children??[]).map(I=>A(I,B.bkmkId)).filter(Boolean);return{...H,children:N}}return H};return M.map(_=>A(_,"-")).filter(Boolean)},O=()=>{if(w("ADD"),!m){E("-"),j(!0);return}const k=r[m];if(!k){E("-"),j(!0);return}k.type==="F"?E(k.bkmkId):E(k.prntBkmkId),j(!0)};return o.jsxs(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0},Button:{defaultColor:"var(--text-secondary)",defaultHoverColor:"var(--primary-color)",defaultHoverBorderColor:"var(--primary-color)",controlHeight:30,fontSize:13,borderRadius:"var(--border-radius-sm)"}}},children:[o.jsxs(p.Modal,{open:e,okButtonProps:{style:{display:"none"}},cancelText:"닫기",width:560,style:{zIndex:1001},styles:{body:{paddingTop:12,paddingBottom:12}},title:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:12},children:o.jsx(p.Typography.Text,{style:{fontSize:18},children:"북마크 관리"})}),onCancel:t,children:[o.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",marginBottom:10},children:[o.jsx(p.Button,{type:"primary",variant:"solid",className:"bwg-btn",icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsxs("g",{"clip-path":"url(#clip0_1298_1781)",children:[o.jsx("path",{d:"M9.3002 14.26H13.5702C14.4002 14.26 15.0702 13.59 15.0702 12.76V7.45999C15.0702 6.89999 14.6102 6.43999 14.0502 6.43999H8.8302L7.7102 3.48999H4.1702C3.6402 3.48999 3.2002 3.92999 3.2002 4.45999V8.10999",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M8.18018 4.58997H14.0502C14.6102 4.58997 15.0702 5.04997 15.0702 5.60997V8.25997",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M5.43018 9.52002V14.52",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7.93018 12.01H2.93018",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1298_1781",children:o.jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),style:{padding:"0 10px",boxShadow:"none"},onClick:O,children:"새 폴더"}),o.jsx("div",{children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultHoverColor:"#333333",defaultHoverBorderColor:"#d9d9d9",defaultHoverBg:"#f1f1f1",defaultActiveColor:"#777777",defaultActiveBorderColor:"#d9d9d9",contentFontSize:13,defaultColor:"#777777"}}},children:[o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332M7.99984 2.66667V13.3333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>{const k=Object.values(r).filter(M=>M.type==="F").map(M=>M.bkmkId);g(k)}})}),o.jsx(p.Tooltip,{title:"접기",children:o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28,marginLeft:5},onClick:()=>g([])})})]})})]}),o.jsxs("div",{style:{maxHeight:420,height:350,overflow:"auto",border:"1px solid #e0e0e0",borderRadius:8,padding:10},children:[u.length==0&&o.jsx(p.Empty,{description:o.jsxs(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:["아직 저장된 북마크가 없습니다.",o.jsx("br",{}),"새로운 폴더를 생성해보세요."]})}),o.jsx(p.Tree,{blockNode:!0,draggable:!0,allowDrop:({dropNode:k,dropPosition:M})=>{const A=k.type==="F";return M===0?A:!0},onDrop:k=>{const{dragNode:M,node:A,dropPosition:_,dropToGap:D}=k;if(M.key===A.key||oS(M,A.key))return;let B,H;if(D){const N=iS(u,A.key).ctx,I=N.index;B=N.parent?N.parent.key:"-",H=_>0?I+1:I}else{if(A.type!=="F")return;const N=A.children||[];B=A.key,H=N.length}const T=oe.getUserId();if(M.type==="F")c({bkmkId:M.key,newPrntBkmkId:B,sortOrdr:H,userId:T}).catch(()=>{p.Modal.error({title:"이동 실패",content:"폴더 이동 중 오류가 발생했어요."})});else{if(B==="-"){p.Modal.warning({title:"이동 불가",content:"메뉴는 최상위로 이동할 수 없어요."});return}c({bkmkId:M.key,newPrntBkmkId:B,sortOrdr:H,userId:T}).catch(()=>{p.Modal.error({title:"이동 실패",content:"메뉴 이동 중 오류가 발생했어요."})})}D===!1&&g(N=>Array.from(new Set([...N,A.key])))},showLine:!0,treeData:u,selectedKeys:[m],expandedKeys:h,onExpand:g,onSelect:k=>x(k[0]),titleRender:k=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[o.jsxs("span",{children:[k.type==="F"?"📁":"📄"," ",k.title,k.isNew?o.jsx(p.Tag,{color:"gold",style:{marginLeft:4,fontSize:"10px",height:"16px",lineHeight:"16px",padding:"0 5px"},children:"N"}):null]}),o.jsxs("span",{style:{display:"inline-flex",gap:8},children:[k.type==="F"&&o.jsxs(o.Fragment,{children:[o.jsx(X.PlusOutlined,{style:{opacity:.8},onClick:()=>{w("ADD"),E(k.key),j(!0)}}),o.jsx(X.EditOutlined,{style:{opacity:.8},onClick:()=>{w("EDIT"),E(k.key),j(!0)}})]}),o.jsx(X.DeleteOutlined,{style:{cursor:"pointer",opacity:.5},onClick:()=>{k.type==="F"?p.Modal.confirm({title:"삭제 안내",content:"폴더를 삭제하면 하위 폴더와 메뉴도 모두 삭제됩니다. 삭제하시겠습니까?",centered:!0,onOk:()=>s(k.key)}):p.Modal.confirm({title:"삭제 안내",centered:!0,content:"메뉴를 삭제하시겠습니까?",onOk:()=>l(k.key)})}})]})]})})]})]}),o.jsx(p.ConfigProvider,{theme:{components:{Modal:{titleColor:y==="ADD"?"var(--primary-color)":"#ff6767",headerBg:y==="ADD"?"var(--drawer-header-bg)":"#fff0f0",titleFontSize:18},Button:{defaultColor:"var(--text-secondary)",defaultHoverColor:"var(--primary-color)",defaultHoverBorderColor:"var(--primary-color)",controlHeight:30,fontSize:13,borderRadius:"var(--border-radius-sm)"}}},children:o.jsx(p.Modal,{title:o.jsx(o.Fragment,{children:o.jsxs(p.Typography.Text,{style:{fontSize:16,display:"flex",alignItems:"center",gap:6},children:[y==="ADD"?o.jsx("span",{className:"bookmark-folder-modal-icon ico-new-folder"}):o.jsx("span",{className:"bookmark-folder-modal-icon ico-edit-folder"}),"폴더",y==="ADD"?" 추가":"명 수정"]})}),open:b,okText:"저장",onOk:()=>{const k=d.current.getFieldValue("bkmkNm"),M=oe.getUserId();if(y==="ADD"){const A=__SYS_CD__??"KH",_=d.current.getFieldValue("prntBkmkId");i(k,_,A,M).then(()=>{j(!1)})}else{const A=d.current.getFieldValue("bkmkId");a(A,M,k).then(()=>{j(!1)})}},centered:!0,width:400,onCancel:()=>j(!1),okButtonProps:{className:"bwg-btn"},cancelButtonProps:{className:"bwg-btn"},styles:{body:{padding:20}},children:o.jsxs(L.BwgForm,{ref:d,style:{padding:0},children:[o.jsx(L.BwgInput,{itemProps:{name:y==="EDIT"?"bkmkId":"prntBkmkId",hidden:!0}}),o.jsx(L.BwgInput,{itemProps:{label:"상위 폴더명",name:"prntBkmkNm",hidden:P==="-"||y==="EDIT"},inputProps:{disabled:!0}}),o.jsx(L.BwgInput,{itemProps:{label:"폴더명",name:"bkmkNm"}})]})})})]})}function hN({triggerIcon:e}){const[t,r]=v.useState(!1),[n,i]=v.useState(""),[a,s]=v.useState(null),[l,c]=v.useState([]),[d,u]=v.useState([]),[f,h]=v.useState(!1),[g,m]=v.useState(!1),[x,y]=v.useState(!1),[w,b]=v.useState(null);et.useFavoriteStore($=>$.treeNodes);const{nodes:j,getPrntBkmkIdByMenuId:P,getNodeByMenuId:E,isMenuBookmarked:S,removeMenuByMenuId:O,addMenuToFolder:k,convertToAntTreeData:M}=et.useFavoriteStore(),A=et.useFavoriteStore($=>$.rootIds),_=v.useMemo(()=>M(j,A,n,!0),[j,A,n]),D=et.useMenuViewStore($=>$.activeMenuItem??{menuId:"",menuNm:""}),B=v.useMemo(()=>{if(!D?.menuId)return"";const $=E(D.menuId);if(!$)return"";if($.fullPath)return $.fullPath;const U=V=>{const F=j[V];if(!F)return"";if(F.prntBkmkId==="-")return`${F.bkmkNm||D?.menuNm}`;const q=U(F.prntBkmkId);return q?`${q} > ${F.bkmkNm||D?.menuNm}`:F.bkmkNm||D?.menuNm};return console.log("bookmarkNode ::::: ",$),console.log(U($.bkmkId)),U($.bkmkId)},[D?.menuId,E,j]);v.useEffect(()=>{t&&D?.menuId&&S(D.menuId)?u([P(D.menuId)]):t&&D?.menuId&&!S(D.menuId)?u(A):(u([]),c([]),b(null),y(!1))},[t,D?.menuId,S,P]),v.useEffect(()=>{if(!x||!D?.menuId)return;const $=P(D.menuId);!$||!j[$]||(i(""),c([$]),b($))},[x,D?.menuId,j,P]);const H=($,U)=>{k($,U).then(V=>{console.log("AddMenuToFolder ::::: ",V),V||u(F=>F.includes($)?F:[...F,$])})},T=$=>{O($)},N=async $=>{D?.menuId&&(await O(D.menuId),await k($,D),y(!1),b(null),u(U=>U.includes($)?U:[...U,$]))},I=()=>o.jsxs("div",{className:"bookmark-popover-wrap",style:{width:360},children:[o.jsx("div",{style:{padding:"20px 20px 15px",borderBottom:"1px solid #eeeeee"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",rowGap:10},children:[o.jsxs(p.Typography.Text,{style:{fontSize:18,display:"flex",alignItems:"center",gap:6},children:[o.jsx(p.Button,{type:"text",icon:o.jsx(X.ArrowLeftOutlined,{}),onClick:()=>y(!1),style:{width:26,height:26}}),"폴더 변경"]}),D&&o.jsxs(p.Typography.Text,{type:"secondary",style:{display:"inline-block",width:"100%",color:"#555555",fontWeight:"400",background:"#f0eff4",padding:"3px 10px",borderRadius:6},children:["현재 화면: ",o.jsx("b",{children:D.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",D.menuId,")"]})]})]})}),R(),o.jsxs("div",{style:{padding:"15px 20px",borderTop:"1px solid #eeeeee",display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{type:"default",className:"bwg-btn",onClick:()=>{y(!1),b(null)},children:"취소"}),o.jsx(p.Button,{type:"primary",className:"bwg-btn",disabled:!w,onClick:()=>w&&N(String(w)),children:"이동"})]})]}),R=()=>o.jsxs("div",{style:{maxHeight:360,overflow:"auto",padding:"15px 20px 20px"},children:[o.jsxs(p.Space,{style:{width:"100%",marginBottom:12,display:"flex",justifyContent:"space-between",columnGap:10},children:[o.jsx(p.Input,{placeholder:"검색(폴더명)",prefix:o.jsx(X.SearchOutlined,{}),allowClear:!0,value:n,onChange:$=>i($.target.value),style:{width:"250px",height:28}}),o.jsx(p.ConfigProvider,{theme:{components:{Button:{defaultHoverColor:"#333333",defaultHoverBorderColor:"#d9d9d9",defaultHoverBg:"#f1f1f1",defaultActiveColor:"#777777",defaultActiveBorderColor:"#d9d9d9",contentFontSize:13,defaultColor:"#777777"}}},children:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332M7.99984 2.66667V13.3333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>{const $=Object.values(j).filter(U=>U.type==="F").map(U=>U.bkmkId);u($)},title:"모두 확장"}),o.jsx(p.Button,{icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o.jsx("path",{d:"M2.6665 8H13.3332",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),size:"small",style:{width:28,height:28},onClick:()=>u([]),title:"모두 축소"})]})})]}),_.length===0?o.jsx(p.Empty,{description:o.jsxs(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:["아직 저장된 북마크가 없습니다.",o.jsx("br",{}),"새로운 폴더를 만들어 시작해보세요."]}),image:p.Empty.PRESENTED_IMAGE_SIMPLE}):o.jsx(p.Tree,{blockNode:!0,showLine:!0,treeData:_,selectedKeys:l,expandedKeys:d,onExpand:u,onSelect:$=>{c($),b($[0])},autoExpandParent:!0,titleRender:$=>{const U=String($.key),V=a===U;return o.jsxs("div",{onMouseEnter:()=>s(U),onMouseLeave:()=>s(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[o.jsx("div",{children:$.title}),!S(D?.menuId)&&D&&V&&o.jsx(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"rgba(0,0,0,0.5)",defaultHoverColor:"rgba(0,0,0,0.8)"}}},children:o.jsx(p.Button,{size:"small",type:"link",onClick:F=>{F.stopPropagation(),H(U,D)},style:{color:"rgba(0,0,0,0.5)"},children:"+ 현재화면 추가"})})]})}})]});return o.jsxs(o.Fragment,{children:[o.jsx(p.Popover,{open:t&&!f,onOpenChange:r,trigger:"click",placement:"bottomLeft",styles:{body:{padding:0,borderRadius:12,boxShadow:"0 12px 32px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.2)",background:"#ffffff",zIndex:1e3}},content:x?I():o.jsxs("div",{style:{width:360},children:[o.jsx("div",{style:{padding:"20px 20px 15px",borderBottom:"1px solid #eeeeee"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",rowGap:10},children:[o.jsxs(p.Typography.Text,{style:{fontSize:18,display:"flex",alignItems:"center",gap:6},children:[o.jsx("span",{className:`bookmark-title-icon ${S(D?.menuId)?"saved":"add"}`}),"북마크"," ",S(D?.menuId)?"저장됨":"추가"]}),D&&o.jsxs(p.Typography.Text,{type:"secondary",style:{display:"inline-block",width:"100%",color:"#555555",fontWeight:"400",background:"#f0eff4",padding:"3px 10px",borderRadius:6},children:["현재 화면: ",o.jsx("b",{children:D.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",D.menuId,")"]})]})]})}),S(D?.menuId)?o.jsxs("div",{style:{padding:"10px 12px",margin:"15px 20px",borderRadius:8,backgroundColor:"#f7f6fB"},children:[o.jsx(p.Typography.Text,{type:"secondary",style:{fontSize:13},children:"저장 위치"}),o.jsx("div",{style:{marginTop:4},children:`📁 > ${B}`||"알 수 없음"})]}):R(),o.jsxs(ze,{style:{padding:"15px 20px",borderTop:"1px solid #eeeeee"},layoutAlign:"right",children:[D&&!S(D.menuId)?o.jsx(p.Button,{style:{padding:"0 10px"},type:"primary",className:"bwg-btn",icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:o.jsx("path",{d:"M3 9H15M9 3V15",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),onClick:()=>{const $=String(l[0]);let U="-";$&&j[$]&&(U=j[$].type=="M"?j[$].prntBkmkId:$),H(U,D)},children:"추가"}):o.jsxs(ze,{layoutAlign:"between",children:[o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px"},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsxs("g",{"clip-path":"url(#clip0_1289_1745)",children:[o.jsx("path",{d:"M13.9198 6.57H8.69982L7.57982 3.62H4.03982C3.50982 3.62 3.06982 4.06 3.06982 4.59V12.89C3.06982 13.72 3.73982 14.39 4.56982 14.39H13.4398C14.2698 14.39 14.9398 13.72 14.9398 12.89V7.59C14.9398 7.03 14.4798 6.57 13.9198 6.57Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M8.0498 4.72H13.9198C14.4798 4.72 14.9398 5.18 14.9398 5.74V8.39",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1289_1745",children:o.jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),onClick:()=>y(!0),children:"폴더 변경"}),o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px"},color:"danger",variant:"solid",icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:o.jsx("path",{d:"M7.5 7.5V12M10.5 7.5V12M13.5 4.5V13.5C13.5 14.3284 12.8284 15 12 15H6C5.17157 15 4.5 14.3284 4.5 13.5V4.5M3 4.5H15M11.25 4.5V3.75C11.25 2.92157 10.5784 2.25 9.75 2.25H8.25C7.42157 2.25 6.75 2.92157 6.75 3.75V4.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),onClick:()=>T(D.menuId),children:"삭제"})]}),o.jsx(p.Button,{type:"default",className:"bwg-btn",style:{padding:"0 10px",marginLeft:5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[o.jsx("path",{d:"M8.25 2.25H9.75C10.1642 2.25 10.5 2.58579 10.5 3V3.42659C10.5 3.74744 10.7153 4.02619 11.0117 4.14921C11.3081 4.27229 11.6532 4.22538 11.8802 3.99842L12.182 3.69668C12.4748 3.40379 12.9497 3.40379 13.2426 3.69668L14.3033 4.75734C14.5962 5.05023 14.5962 5.52511 14.3033 5.818L14.0016 6.1197C13.7746 6.34667 13.7277 6.69185 13.8508 6.98831C13.9738 7.28465 14.2526 7.5 14.5734 7.5L15 7.5C15.4142 7.5 15.75 7.83579 15.75 8.25V9.75C15.75 10.1642 15.4142 10.5 15 10.5H14.5734C14.2526 10.5 13.9738 10.7153 13.8508 11.0117C13.7277 11.3081 13.7746 11.6533 14.0016 11.8803L14.3033 12.182C14.5962 12.4749 14.5962 12.9497 14.3033 13.2426L13.2426 14.3033C12.9497 14.5962 12.4749 14.5962 12.182 14.3033L11.8803 14.0016C11.6533 13.7746 11.3081 13.7277 11.0117 13.8508C10.7153 13.9738 10.5 14.2526 10.5 14.5734V15C10.5 15.4142 10.1642 15.75 9.75 15.75H8.25C7.83579 15.75 7.5 15.4142 7.5 15V14.5734C7.5 14.2526 7.28465 13.9738 6.98831 13.8508C6.69185 13.7277 6.34667 13.7746 6.1197 14.0016L5.81799 14.3033C5.5251 14.5962 5.05022 14.5962 4.75733 14.3033L3.69667 13.2426C3.40378 12.9497 3.40378 12.4749 3.69667 12.182L3.99842 11.8802C4.22538 11.6532 4.27229 11.3081 4.14921 11.0117C4.02619 10.7153 3.74744 10.5 3.42659 10.5H3C2.58579 10.5 2.25 10.1642 2.25 9.75V8.25C2.25 7.83579 2.58579 7.5 3 7.5L3.42657 7.5C3.74743 7.5 4.02619 7.28466 4.14922 6.98832C4.2723 6.69188 4.22539 6.34671 3.99842 6.11975L3.69668 5.818C3.40379 5.52511 3.40379 5.05024 3.69668 4.75734L4.75734 3.69668C5.05023 3.40379 5.52511 3.40379 5.818 3.69668L6.11974 3.99842C6.34671 4.22539 6.69187 4.2723 6.98832 4.14922C7.28466 4.02619 7.5 3.74743 7.5 3.42657V3C7.5 2.58579 7.83579 2.25 8.25 2.25Z",stroke:"currentColor"}),o.jsx("path",{d:"M10.5 9C10.5 9.82843 9.82843 10.5 9 10.5C8.17157 10.5 7.5 9.82843 7.5 9C7.5 8.17157 8.17157 7.5 9 7.5C9.82843 7.5 10.5 8.17157 10.5 9Z",stroke:"currentColor"})]}),onClick:()=>{m(t),h(!0)},children:"관리"})]})]}),children:o.jsx("span",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center"},children:e})}),o.jsx(pN,{open:f,onClose:()=>{h(!1),g&&r(!0)}})]})}const gN=({reqRows:e,subRows:t})=>{const{searchBoxRef:r}=ct.useSearchBox();return o.jsx(ko,{ref:r,reqRows:e,subRows:t})},kt=v.forwardRef(({children:e,searchBox:t,title:r,preRenderEvents:n=[],postRenderEvents:i=[],loading:a=!1,error:s=null,grantEvent:l={},customEvent:c={},buttons:d},u)=>{const{user:f,spacingSize:h}=et.useUserStore(),{activeMenuItem:g}=et.useMenuViewStore(),{loadFavoritesIfNeeded:m,isMenuBookmarked:x}=et.useFavoriteStore(),{loading:y}=et.useLoadingStore(),w=ct.useSizeConfig();v.useImperativeHandle(u,()=>({menuId:g?.menuId}),[g?.menuId]);const[b,j]=v.useState({isInitialized:!1,isReady:!1,error:null,loading:!0,preRenderComplete:!1,postRenderComplete:!1}),{openCorePopup:P}=ct.usePopup(),E=async()=>{if(n.length===0){j(T=>({...T,preRenderComplete:!0}));return}try{for(const T of n)await T();j(T=>({...T,preRenderComplete:!0}))}catch(T){j(N=>({...N,error:T instanceof Error?T.message:"사전 렌더링 실패",preRenderComplete:!0}))}},S=async()=>{if(i.length===0){j(T=>({...T,postRenderComplete:!0}));return}try{for(const T of i)await T();j(T=>({...T,postRenderComplete:!0}))}catch(T){j(N=>({...N,error:T instanceof Error?T.message:"사후 렌더링 실패",postRenderComplete:!0}))}};v.useEffect(()=>{if(b.isInitialized)return;(async()=>{try{await E(),j(N=>({...N,isInitialized:!0,loading:!1}))}catch(N){console.error("BwgView 초기화 실패:",N),j(I=>({...I,isInitialized:!0,loading:!1}))}})()},[]),v.useEffect(()=>{f?.userId&&m(f.userId)},[m,f?.userId]);const O=v.useMemo(()=>g?.menuId?{menuId:g.menuId,grpId:"CUSTOM"}:!1,[g?.menuId]),k=v.useMemo(()=>g?.menuId?{menuId:g.menuId,grpId:"DEFAULT"}:!1,[g?.menuId]);v.useEffect(()=>{b.isInitialized&&b.preRenderComplete&&!b.isReady&&setTimeout(async()=>{await S(),j(N=>({...N,isReady:!0}))},100)},[b.isInitialized,b.preRenderComplete,b.isReady]),v.useEffect(()=>{s&&j(T=>({...T,error:s}))},[s]);const M=()=>o.jsxs("div",{className:"bwgview-header-container",children:[o.jsxs("div",{className:"bwgview-header",children:[o.jsx("div",{className:"bwgview-header-left",children:H.LEFT}),o.jsx("div",{className:"bwgview-header-right",children:H.RIGHT})]}),t&&o.jsx(gN,{reqRows:t.reqRows,subRows:t.subRows})]});if(v.useEffect(()=>{},[f,g]),b.error||s)return o.jsx("div",{style:{padding:"24px"},children:o.jsx(p.Alert,{message:"오류 발생",description:b.error||s,type:"error",showIcon:!0})});const A=()=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:o.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62179 6.15374 7.92513 5.5344L9.9348 1.4645Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"})}),_=()=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:o.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62178 6.15374 7.92513 5.5344L9.9348 1.4645Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",fill:"none"})}),D=T=>o.jsx(X,{component:A,...T}),B=T=>o.jsx(X,{component:_,...T}),H={LEFT:o.jsx("div",{className:"bwgview-header-left",children:o.jsxs(p.ConfigProvider,{theme:{components:{Tag:{controlHeight:28,controlHeightLG:28,controlHeightSM:28,controlHeightXS:28}}},children:[o.jsxs(p.Space,{children:[g&&o.jsx(hN,{triggerIcon:x(g.menuId)?o.jsx(D,{className:"bookmark-icon",style:{color:"#faad14"}}):o.jsx(B,{className:"bookmark-icon"})}),o.jsxs(p.Space.Compact,{style:{alignItems:"center"},children:[o.jsx("span",{className:"pageMenuNm",children:(()=>{let T="";return r?.useMenuTitle&&g?T=g.menuNm:r?.text?T=r.text:g&&(T=g.menuPrntId==="CM00"?g.menuNm.substring(g.menuNm.indexOf(" ")+1):g.menuNm),r?.prefix&&(T=`${r.prefix} ${T}`),r?.suffix&&(T=`${T} ${r.suffix}`),T})()}),g?.menuNo&&o.jsx(p.Tag,{className:"page-num-tag",children:g?.menuNo}),o.jsx(p.Tooltip,{title:"도움말",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",className:"menu-help-btn",icon:o.jsx(X.QuestionCircleTwoTone,{twoToneColor:"orange"})})}),o.jsx(p.Tooltip,{title:"게시판",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",onClick:()=>P("CORE_REPORT"),icon:o.jsx(X.BugFilled,{style:{color:"#1890ff"}})})})]})]}),g?.scrnId&&oe.isLocal&&o.jsx(p.Tag,{style:{marginLeft:8,fontSize:13,fontWeight:500,display:"flex"},children:o.jsx(fN,{copyable:!0,style:{display:"inherit",justifyContent:"center",alignItems:"center",marginBottom:0},children:g?.scrnId})})]})}),RIGHT:o.jsx("div",{className:"bwgview-header-right",children:o.jsx(p.ConfigProvider,{theme:{components:{Space:{padding:8}}},children:o.jsxs(p.Space,{children:[o.jsx(p.Flex,{gap:8,children:o.jsx(Kf,{checkAuth:O,buttons:d?.custom||[],gap:8})}),o.jsx(p.ConfigProvider,{theme:{components:{Divider:{verticalMarginInline:0}}},children:o.jsx(p.Divider,{type:"vertical"})}),o.jsx(p.Flex,{gap:8,className:"permission-buttons",children:o.jsx(Kf,{checkAuth:k,buttons:d?.grant||[],gap:8})})]})})})};return o.jsxs("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column",gap:h===0?8:h===1?14:20,padding:h===0?"8px 12px":h===1?"14px 20px":"20px 30px 26px"},children:[M(),o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{className:"bwgview-content",children:[o.jsx(p.ConfigProvider,{componentSize:w.componentSize,theme:{token:{fontSize:w.fontSize}},children:o.jsx(ct.BwgViewProvider,{menuId:g?.menuId,children:o.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",fontSize:`${w.fontSize}px`},children:e})})}),(b.loading||a||y)&&o.jsx(iO.LoadingContainer,{dimStyle:"light",text:y?"처리 중...":"화면 로드 중..."})]})})]})});kt.displayName="BwgView";const mN=({children:e,customTheme:t,customComponentSize:r="middle"})=>{const n={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',fontSize:14,fontSizeHeading1:38,fontSizeHeading2:30,fontSizeHeading3:24,fontSizeHeading4:20,fontSizeHeading5:16,padding:16,margin:16,borderRadius:6,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm},i={...n,...t,token:{...n.token,...t?.token}};return o.jsx(p.ConfigProvider,{locale:G1,theme:i,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},children:e})},vN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9289)'%3e%3cpath%20d='M27.3705%2010.9919C28.5405%2010.9919%2029.489%2010.0434%2029.489%208.87338C29.489%207.70337%2028.5405%206.75488%2027.3705%206.75488C26.2004%206.75488%2025.252%207.70337%2025.252%208.87338C25.252%2010.0434%2026.2004%2010.9919%2027.3705%2010.9919Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.3053%2017.2998V32.3098H24.4248V17.2998'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M27.3701%2032.31V23.3135'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2305%2022.1925V17.642V15.6945C22.2305%2014.3075%2023.3515%2013.1865%2024.7385%2013.1865H29.9825C31.3695%2013.1865%2032.4905%2014.3075%2032.4905%2015.6945V17.642V22.1925'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.2519%2021.4229H18.6199C19.1044%2021.4229%2019.5034%2021.8219%2019.5034%2022.3064V24.4154H16.3779V22.3064C16.3779%2021.8219%2016.7769%2021.4229%2017.2614%2021.4229H17.2519Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.8339%2024.4062H15.0294C14.6254%2024.4062%2014.2979%2024.7338%2014.2979%2025.1377V31.6832C14.2979%2032.0872%2014.6254%2032.4147%2015.0294%2032.4147H20.8339C21.2378%2032.4147%2021.5654%2032.0872%2021.5654%2031.6832V25.1377C21.5654%2024.7338%2021.2378%2024.4062%2020.8339%2024.4062Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.8252%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.0391%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.71875%2014.1642H8.53075C9.03425%2014.1642%209.49025%2013.8602%209.68025%2013.4042L10.3263%2011.8652'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.4991%205.54803L12.2266%2011.8655H17.5371L19.8836%205.51953L17.4991%205.54803Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2017%2016.4639H6.57421C5.97571%2016.4639%205.49121%2015.9794%205.49121%2015.3809C5.49121%2013.4334%207.06821%2011.8564%209.01571%2011.8564H20.3492'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.56738%2032.4805H32.2909'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9289'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",yN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9314)'%3e%3cpath%20d='M15.1807%2019.3994L18.7717%2029.7164'%20stroke='%23FF8CC3'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2010.7443%2014.7724%2013.2618%2022.0209'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2016.2448%2012.8534%2018.7718%2020.1019'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8257%2016.71C22.2202%2012.112%2017.1947%209.67999%2012.5967%2011.276C7.99871%2012.8815%205.56671%2017.907%207.16271%2022.505L7.67571%2023.968L7.88471%2023.892C7.93221%2022.7235%208.67321%2021.6405%209.85121%2021.232C11.0292%2020.8235%2012.2737%2021.2035%2013.0432%2022.0965L13.4422%2021.954C13.4897%2020.7855%2014.2307%2019.7025%2015.4087%2019.294C16.5867%2018.8855%2017.8312%2019.2655%2018.6007%2020.1585L18.9997%2020.016C19.0472%2018.8475%2019.7882%2017.7645%2020.9662%2017.356C22.1442%2016.9475%2023.3887%2017.3275%2024.1582%2018.2205L24.3577%2018.154L23.8447%2016.691L23.8257%2016.71Z'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.37%2015.4193C23.636%2015.4858%2023.9115%2015.5238%2024.1965%2015.5238C26.068%2015.5238%2027.5785%2014.0038%2027.5785%2012.1418C27.5785%2010.2798%2026.0585%208.75977%2024.1965%208.75977C22.3345%208.75977%2020.8145%2010.2798%2020.8145%2012.1418'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M24.2061%206.12784V5.00684'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.8641%207.79018L19.1611%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5381%2016.4736L29.2411%2017.1766'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.21%2012.1318H31.331'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5469%207.79018L29.2404%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.3355%2029.8213H14.2305'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.2302%2029.8213L10.3447%2025.2803'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8527%2028.4531L7.76074%2032.9941'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8447%2029.8213L27.4072%2032.9943'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9314'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",xN="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9273)'%3e%3cpath%20d='M25.9254%2020.8996C27.5151%2020.8996%2028.8039%2019.6108%2028.8039%2018.0211C28.8039%2016.4313%2027.5151%2015.1426%2025.9254%2015.1426C24.3356%2015.1426%2023.0469%2016.4313%2023.0469%2018.0211C23.0469%2019.6108%2024.3356%2020.8996%2025.9254%2020.8996Z'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M31.4825%2032.4711V25.9066C31.4825%2024.5671%2030.485%2023.4746%2029.2595%2023.4746H22.6C21.3745%2023.4746%2020.377%2024.5671%2020.377%2025.9066'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.2696%2026.7334H14.2686L16.5106%2032.6234H27.5021L25.2696%2026.7334Z'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5617%2018.8385C6.1462%2017.4135%205.2627%2015.447%205.2627%2013.2715C5.2627%208.91095%208.7967%205.37695%2013.1572%205.37695C17.5177%205.37695%2021.0517%208.91095%2021.0517%2013.2715C21.0517%2015.124%2020.4152%2016.815%2019.3512%2018.164C18.0497%2019.8075%2016.1117%2020.919%2013.9172%2021.128'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%2013.2715L16.0167%2015.5705'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%208.62598V13.2715'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.35963%2016.1973L7.84663%2019.1328L4.91113%2018.6293'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.91113%2032.623H33.0881'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9273'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bN=({children:e})=>{const[t,r]=v.useState({x:0,y:0}),[n,i]=v.useState(!1),[a,s]=v.useState({x:0,y:0}),[l,c]=v.useState(!1),[d,u]=v.useState(!0),f=v.useRef(null),h=[{id:"overtime",title:"시간 외 근무신청",icon:o.jsx("img",{src:xN,alt:"시간외근무신청",className:"quick-overtime"}),color:"#722ed1",onClick:()=>{console.log("시간 외 근무 신청 클릭")}},{id:"business-trip",title:"출장신청",icon:o.jsx("img",{src:vN,alt:"출장신청",className:"quick-business-trip"}),color:"#1890ff",onClick:()=>{console.log("출장 신청 클릭")}},{id:"vacation",title:"휴가신청",icon:o.jsx("img",{src:yN,alt:"휴가신청",className:"quick-holiday"}),color:"#eb2f96",onClick:()=>{console.log("휴가 신청 클릭")}},{id:"document",title:"문서신청",icon:o.jsx(X.FileTextOutlined,{}),color:"#52c41a",onClick:()=>{console.log("문서 신청 클릭")}},{id:"profile",title:"인사정보",icon:o.jsx(X.UserOutlined,{}),color:"#fa8c16",onClick:()=>{console.log("인사 정보 클릭")}},{id:"settings",title:"설정",icon:o.jsx(X.SettingOutlined,{}),color:"#13c2c2",onClick:()=>{console.log("설정 클릭")}}];v.useEffect(()=>{const b=()=>{const j=window.innerHeight,E=Math.max(64,(j-300)/3);r({x:0,y:E});const S=j/2;u(E<S)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const g=b=>{if(b.preventDefault(),b.stopPropagation(),f.current){const j=f.current.getBoundingClientRect();s({x:b.clientX-j.left,y:b.clientY-j.top}),i(!0)}},m=b=>{if(n){const j=b.clientY-a.y,P=window.innerHeight-24,S=Math.max(64,Math.min(P,j));r({x:t.x,y:S});const O=window.innerHeight/2;u(S<O)}},x=()=>{i(!1)},y=()=>{c(!l)},w=b=>{b.onClick&&b.onClick()};return v.useEffect(()=>{if(n)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",x),()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",x)}},[n,a]),o.jsxs("div",{className:"quick-tab-container",ref:f,style:{position:"fixed",right:0,top:t.y,zIndex:1e3,userSelect:"none",touchAction:"none"},children:[o.jsxs("div",{className:"quick-tab",style:{position:"absolute",right:"40px",top:d?0:"auto",bottom:d?"auto":0,display:"flex",flexDirection:"column",gap:"15px",border:"1px solid #E0DEEF",borderRadius:"15px",padding:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.3)",minWidth:"88px",maxWidth:"88px",maxHeight:d?`calc(100vh - ${t.y+12}px)`:`${t.y-12}px`,transform:l?"translateX(0)":"translateX(calc(100% + 100px))",transition:"transform 0.3s ease",marginTop:d&&t.y<100?"32px":"0",marginBottom:!d&&t.y>window.innerHeight-100?"8px":"0"},children:[o.jsx("div",{className:"quick-tab-items-wrap",style:{background:"#ffffff",borderRadius:"10px",flex:1,overflowY:"auto",maxHeight:d?`calc(100vh - ${t.y+120}px)`:`${t.y-60}px`,padding:"14px 0"},children:h.map(b=>o.jsx(p.Card,{className:"quick-tab-items",size:"small",style:{border:"none",boxShadow:"none",marginBottom:"15px",cursor:"pointer",transition:"all 0.2s ease"},styles:{body:{padding:"0"}},onClick:()=>w(b),onMouseEnter:j=>{},onMouseLeave:j=>{},children:o.jsxs("div",{className:"quick-tab-item-inner",children:[o.jsx("div",{className:"quick-tab-items-icon",style:{width:"44px",height:"44px",borderRadius:"8PX",fontSize:"24px",color:b.color,marginBottom:"5px"},children:b.icon}),o.jsx("div",{className:"quick-tab-items-title",children:b.title})]})},b.id))}),o.jsx("div",{className:"quick-tab-add-btn",style:{height:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease",flexShrink:0,marginBottom:"7px"},onMouseEnter:b=>{},onMouseLeave:b=>{},children:o.jsx("span",{className:"quick-tab-add-icon",children:o.jsx(X.PlusOutlined,{style:{color:"#CDC4FF",fontSize:"15px"}})})})]}),o.jsx("div",{className:"quick-tab-drag-btn",style:{cursor:n?"grabbing":"grab",zIndex:1001},onMouseDown:b=>g(b)}),o.jsx(p.Button,{className:`quick-tab-toggle-btn ${l?"expanded":""}`,type:"default",style:{border:"0",backgroundColor:"transparent"},onClick:y})]})},wN=()=>{const{verifyWithToken:e}=ct.useAuth(),t=qm.useNavigate(),r=qm.useLocation();return v.useEffect(()=>{const i=new URLSearchParams(r.search).get("token");if(!i){t("/login",{replace:!0});return}(async()=>{const a=await e(i);t(a?"/main":"/login",{replace:!0})})()},[r.search]),o.jsx("div",{style:{display:"grid",placeItems:"center",height:"100dvh"},children:o.jsx(p.Spin,{tip:"인증중..."})})},CN=e=>{const{showPopup:t}=ct.usePopup(),r=v.useRef(null),n=v.useRef(null),i=v.useRef(null),a=v.useRef(null),[s,l]=v.useState(!1),[c,d]=v.useState(null),[u,f]=v.useState("common"),{getCodeColor:h,getCodeName:g,getCodeList:m}=ct.useCommonCode(),x=v.useMemo(()=>oe.createBwgGridRenderer((I,R,$,U,V)=>{const F=R.value,q=h?.(F)||"blue",ie=g?.(F)||F,ue=F?o.jsx(p.Tag,{color:q,style:{fontSize:"11px"},children:ie}):null;V.render(o.jsx("div",{style:{padding:"4px"},children:ue}))}),[h,g]),[y,w]=v.useState({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),[b,j]=v.useState(!1),P=v.useMemo(()=>[{fieldName:"authId",header:{text:"권한ID"},width:120,visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:120,visible:!1},{fieldName:"menuNm",header:{text:"메뉴명"},width:200,visible:!1},{fieldName:"grpId",header:{text:"그룹ID"},width:100},{fieldName:"btnId",header:{text:"버튼ID"},width:100},{fieldName:"btnNm",header:{text:"버튼명"},width:150},{fieldName:"btnSq",header:{text:"출력순서"},width:80,dataType:"number"},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),E={container:{check:!0,indicator:!0,footer:!0}},S={onCurrentRowChanged(I,R,$){console.log("공통 버튼 그리드 - 현재 행 변경:",{oldRow:R,newRow:$,activeTabKey:u})}},O={onCurrentRowChanged(I,R,$){console.log("커스텀 버튼 그리드 - 현재 행 변경:",{oldRow:R,newRow:$,activeTabKey:u})}},k=I=>{f(I)};v.useEffect(()=>{},[]),v.useEffect(()=>{const I=n.current?.vw?.getCurrent().itemIndex??-1;if(I<0)return;const R=n.current?.vw?.getValues(I);_.SCMAUTH00201({crprCd:R.crprCd,systId:R.systId,authId:R.authId,menuId:R.authMenu,grpId:u==="common"?"DEFAULT":"CUSTOM"})},[u]);const M=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"회사코드"},width:80,visible:!1},{fieldName:"systId",header:{text:"업무분류"},width:80,renderer:"tag"},{fieldName:"authId",header:{text:"권한ID"},width:120,required:!0},{fieldName:"authNm",header:{text:"권한명칭"},width:200,styleName:"left",editable:!0},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{fieldName:"authMenu",header:{text:"메뉴"},width:100,visible:!1},{fieldName:"authMenuNm",header:{text:"메뉴"},width:100,styleName:"left"},{fieldName:"authDscr",header:{text:"권한설명"},width:300,visible:!1}],[]),A={onCurrentRowChanged(I,R,$){if($<0)return;const U=I.getValues($);console.log("권한 선택:",U),console.log("현재 activeTabKey:",u),r.current?.setFieldsValue(U),_.SCMAUTH00201({crprCd:U.crprCd,systId:U.systId,authId:U.authId,menuId:U.authMenu,grpId:u==="common"?"DEFAULT":"CUSTOM"})}},_={SCMAUTH00101:()=>{oe.callService("SCMAUTH00101",{crprCd:oe.getCrprCd()},{}).then(I=>{n.current?.addAllData(I.data)})},SCMAUTH00102:I=>{oe.callService("SCMAUTH00102",{...I},{}).then(R=>{R.result||r.current?.setFields([{name:"authId",errors:[R.message]}])})},SCMAUTH00201:I=>{oe.callService("SCMAUTH00201",{...I},{}).then(R=>{u==="common"?i.current?.addAllData(R.data):a.current?.addAllData(R.data)}).catch(R=>{console.error("SCMAUTH00201 호출 실패:",R)})},SCMAUTH00301:async I=>{try{const R=await oe.callService("SCMAUTH00301",{...I,crprCd:oe.getCrprCd()},{});return console.log("권한 정보 저장 성공:",R),j(!1),_.SCMAUTH00101(),R}catch(R){throw console.error("권한 정보 저장 실패:",R),R}},SCMAUTH00401:async I=>{try{const R=await oe.callService("SCMAUTH00401",{...I,crprCd:oe.getCrprCd()},{});return console.log("권한 정보 수정 성공:",R),j(!1),_.SCMAUTH00101(),R}catch(R){throw console.error("권한 정보 수정 실패:",R),R}}},D={search:()=>{_.SCMAUTH00101()},new:()=>{j(!1),w({crprCd:String(oe.getCrprCd()||""),systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),l(!0)},edit:()=>{const I=n.current?.getCurrentRow();I&&typeof I=="object"&&(j(!0),w({crprCd:I.crprCd||String(oe.getCrprCd()||""),systId:I.systId||"",authId:I.authId||"",authNm:I.authNm||"",authDscr:I.authDscr||"",authMenu:I.authMenu||"",enblYn:I.enblYn||"Y"}),l(!0))}},B={test:()=>{console.log("test")}},H={openPopup:I=>{t("CMDprtSrchP02",{isDefault:I})},add:()=>{console.log("add")},modify:()=>{console.log("edit")},delete:()=>{console.log("delete")}},T=(I,R)=>{w($=>({...$,[I]:R}))},N=async()=>{try{b||await _.SCMAUTH00102({auth:r.current?.getFieldsValue()})}catch(I){console.error("권한 정보 처리 실패:",I)}};return v.useEffect(()=>{_.SCMAUTH00101()},[]),v.useEffect(()=>{},[n.current?.getGridInstance()?.gridView]),o.jsx(kt,{grantEvent:D,customEvent:B,children:o.jsxs(ze,{children:[o.jsxs(De,{className:"w40",children:[o.jsx(Le,{title:"권한 관리",icons:{type:"antd"},children:o.jsx(p.Popover,{styles:{body:{border:"1px solid #ededed",background:"#ededed"}},content:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.Button,{type:"primary",onClick:()=>H.openPopup(!0),children:"공통권한버튼"}),o.jsx(p.Button,{onClick:()=>H.openPopup(!1),children:"커스텀 버튼"})]}),placement:"bottom",children:o.jsx(p.Button,{icon:o.jsx(X.SettingTwoTone,{}),title:"버튼관리",children:"버튼관리"})})}),o.jsx(Fe,{type:"nrml",ref:n,gridColumns:M,renderers:[{name:"tag",renderer:x}],gridOptions:{container:{indicator:!0,check:!0,checkAll:!0}},gridEvents:A})]}),o.jsx(De,{className:"w60",border:!0,children:o.jsxs(dn,{title:"권한 상세",children:[o.jsxs(L.BwgForm,{ref:r,style:{padding:"10px 20px"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"업무분류",name:"systId"},selectProps:{variant:"borderless",options:m("SYST"),copyable:!0,disabled:!0}})}),o.jsx(p.Col,{span:8,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",children:o.jsx(p.Select,{variant:"borderless",options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}],disabled:!0})})}),o.jsx(p.Col,{span:8})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgFormItem,{label:"권한ID",name:"authId",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:16,children:o.jsx(L.BwgFormItem,{label:"권한명",name:"authNm",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{label:"권한메뉴",style:{width:"100%",marginBottom:0},validateStatus:"",help:"",children:o.jsxs(p.Space.Compact,{block:!0,children:[o.jsx(p.Form.Item,{name:"authMenu",style:{width:"40%"},validateStatus:"",help:"",children:o.jsx(p.Input,{readOnly:!0,variant:"filled"})}),o.jsx(p.Form.Item,{name:"authMenuNm",style:{width:"60%"},validateStatus:"",help:"",children:o.jsx(p.Input,{readOnly:!0})})]})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{label:"권한설명",name:"authDscr",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0})})})})]}),o.jsx(ar,{size:"small",activeKey:u,onChange:k,items:[{key:"common",label:"공통버튼",children:o.jsxs(De,{children:[o.jsx(Le,{title:"공통 버튼 매핑",children:o.jsx(Yf,{grpId:"AUTH",menuId:"CM010303",btnEvent:H})}),o.jsx(Fe,{ref:i,type:"nrml",gridColumns:P,gridOptions:E,gridEvents:S})]})},{key:"custom",label:"커스텀",children:o.jsxs(De,{children:[o.jsx(Le,{title:"커스텀 버튼 매핑",children:o.jsx(Yf,{grpId:"AUTH2",menuId:"CM010303"})}),o.jsx(Fe,{ref:a,type:"nrml",gridColumns:P,gridOptions:E,gridEvents:O})]})}],tabPosition:"left"})]})}),o.jsx(un,{title:`권한별 메뉴 관리 - ${c?.authNm||""}`,open:s,placement:"right",onClose:()=>{l(!1),w({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),j(!1)},width:"40%",size:"large",afterOpenChange:I=>{console.log("afterOpenChange:",I)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:()=>{l(!1),r.current?.resetFields(),j(!1)},className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:N,className:"bwg-btn",children:"저장"})]}),children:o.jsxs(L.BwgForm,{ref:r,initialValues:y,children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSearch,{itemProps:{name:["crprCd","crprNm"],label:"회사 코드"},placeholder:["회사 코드","회사 명칭"],popuCd:"CMAuthMstrP01"})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"systId",label:"시스템 ID"},selectProps:{variant:"borderless",options:m("SYST"),copyable:!0,disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{name:"authId",label:"권한 ID",children:o.jsx(p.Input,{onChange:I=>T("authId",I.target.value),placeholder:"권한 ID를 입력하세요",disabled:b})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{name:"enblYn",label:"사용여부",children:o.jsx(p.Select,{onChange:I=>T("enblYn",I),options:[{value:"Y",label:"사용"},{value:"N",label:"미사용"}]})})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{name:"authNm",label:"권한 명칭",children:o.jsx(p.Input,{onChange:I=>T("authNm",I.target.value),placeholder:"권한 명칭을 입력하세요"})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgFormItem,{name:"authDscr",label:"권한 설명",children:o.jsx(p.Input.TextArea,{onChange:I=>T("authDscr",I.target.value),placeholder:"권한 설명을 입력하세요",rows:2})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{name:["authMenu","authMenuNm"],label:"권한 메뉴"},placeholder:["메뉴ID","메뉴명명"],popuCd:"CMMenuMstrP01"})})})]})})]})})},SN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState("menu"),s=v.useMemo(()=>oe.createBwgGridRenderer((m,x,y,w,b)=>{const j=m.getValue(x.index?.itemIndex,"systId"),P=m.getValue(x.index?.itemIndex,"roleId"),E=m.getValue(x.index?.itemIndex,"roleNm"),S=m.getValue(x.index?.itemIndex,"enblYn"),O=m.getValue(x.index?.itemIndex,"roleDscr");b.render(o.jsx(p.Card,{size:"small",style:{height:"95px"},children:o.jsxs(p.Flex,{style:{height:"95px"},children:[o.jsxs(De,{className:"w60",style:{position:"relative",padding:"8px"},children:[o.jsx("div",{style:{position:"absolute",top:"8px",left:"8px"},children:o.jsx(p.Tag,{color:"blue",style:{fontSize:"13px"},children:j})}),o.jsx("div",{style:{position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"16px",fontWeight:"bold",color:"#262626",textAlign:"center"},children:E}),o.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%)",fontSize:"13px",color:"#8c8c8c",fontFamily:"monospace"},children:P}),o.jsx("div",{style:{position:"absolute",bottom:"8px",right:"8px",fontSize:"16px",color:S==="Y"?"#52c41a":"#ff4d4f"},children:S==="Y"?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):o.jsx(X.CloseCircleOutlined,{style:{color:"#ff4d4f"}})})]}),o.jsx(p.Divider,{type:"vertical",style:{height:"95px"}}),o.jsx(De,{className:"w40",children:O&&o.jsx(p.Typography.Text,{style:{fontSize:"13px",color:"#595959",lineHeight:"1.4",textAlign:"left",display:"block",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:o.jsx("blockquote",{children:O})})})]})}))}),[]),l=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"법인코드"},width:100,visible:!1},{fieldName:"systId",header:{text:"시스템ID"},width:100,renderer:"systCard"},{fieldName:"roleId",header:{text:"역할ID"},width:120},{fieldName:"roleNm",header:{text:"역할명"},width:150},{fieldName:"roleDscr",header:{text:"역할설명"},width:200,visible:!1},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80,visible:!1},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"},visible:!1}],[]),c=[{fieldName:"crprCd",header:{text:"법인코드"},width:100,visible:!1},{fieldName:"roleId",header:{text:"역할ID"},width:120,visible:!1},{fieldName:"dprtCd",header:{text:"부서코드"},width:120},{fieldName:"dprtNm",header:{text:"부서"},width:120},{fieldName:"subSyncYn",header:{text:"동기화여부"},width:100,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],d=[{fieldName:"userId",header:{text:"사용자ID"},width:120},{fieldName:"userNm",header:{text:"사용자명"},width:150},{fieldName:"deptNm",header:{text:"부서명"},width:150},{fieldName:"email",header:{text:"이메일"},width:200,visible:!1},{fieldName:"enblYn",header:{text:"사용여부"},width:80,visible:!1}],u=v.useMemo(()=>({display:{rowHeight:100},layout:{colspan:[{fieldName:"systId",span:3}]},container:{state:!0,check:!0,checkAll:!0,indicator:!0,footer:!0}}),[]),f={onCurrentRowChanged(m,x,y){if(y<0)return;const w=m.getValues(y);switch(i){case"menu":break;case"dept":h.SCMROLE00103(w.roleId);break;case"user":h.SCMROLE00104(w.roleId);break}}},h={SCMROLE00101:()=>{oe.callService("SCMROLE00101",{crprCd:oe.getCrprCd()}).then(m=>{console.log("SCMROLE00101:",m),t.current?.addAllData(m.data)})},SCMROLE00102:m=>{oe.callService("SCMROLE00102",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00102:",x)})},SCMROLE00103:m=>{oe.callService("SCMROLE00103",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00103:",x),r.current?.addAllData(x.data)})},SCMROLE00104:m=>{oe.callService("SCMROLE00104",{crprCd:oe.getCrprCd(),roleId:m}).then(x=>{console.log("SCMROLE00104:",x),n.current?.addAllData(x.data)})}},g={search:()=>{h.SCMROLE00101()}};return v.useEffect(()=>{const m=t.current?.getCurrentIndex()??-1;if(m<0)return;const x=t.current?.vw?.getValue(m,"roleId");switch(i){case"menu":break;case"dept":h.SCMROLE00103(x);break;case"user":h.SCMROLE00104(x);break}},[i]),o.jsx(kt,{grantEvent:g,children:o.jsxs(ze,{children:[o.jsxs(De,{className:"w40",children:[o.jsx(Le,{title:"역할 목록",icons:{type:"antd"}}),o.jsx(Fe,{ref:t,type:"nrml",gridColumns:l,gridOptions:u,gridEvents:f,renderers:[{name:"systCard",renderer:s}]})]}),o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"역할별 관리"}),o.jsx(p.Tabs,{className:"bwg-tab",activeKey:i,onChange:m=>a(m),items:[{key:"menu",label:"역할별 메뉴",icon:o.jsx(X.MenuOutlined,{}),children:o.jsx(Fe,{type:"tree",gridColumns:[{fieldName:"menuId",header:{text:"메뉴ID"},width:120},{fieldName:"menuNm",header:{text:"메뉴명"},width:200},{fieldName:"menuPath",header:{text:"메뉴경로"},width:300},{fieldName:"enblYn",header:{text:"사용여부"},width:80}],gridOptions:{display:{rowHeight:40}}})},{key:"dept",label:"역할별 부서",icon:o.jsx(X.TeamOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(De,{className:"w50",children:o.jsx(Fe,{ref:r,type:"nrml",gridColumns:c,gridOptions:{display:{rowHeight:40}}})}),o.jsx(De,{className:"w50",border:!0,children:o.jsx(dn,{title:"부서정보",children:"123"})})]})},{key:"user",label:"역할별 사용자",icon:o.jsx(X.UserOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(De,{className:"w50",children:o.jsx(Fe,{ref:n,type:"nrml",gridColumns:d,gridOptions:{display:{rowHeight:40}}})}),o.jsx(De,{className:"w50",border:!0,children:o.jsx(dn,{title:"사용자정보",children:"123"})})]})}]})]})]})})};var ca={},R0;function jN(){if(R0)return ca;R0=1;function e(E){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},e(E)}Object.defineProperty(ca,"__esModule",{value:!0}),ca.CopyToClipboard=void 0;var t=i(v),r=i(QC()),n=["text","onCopy","options","children"];function i(E){return E&&E.__esModule?E:{default:E}}function a(E,S){var O=Object.keys(E);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(E);S&&(k=k.filter(function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable})),O.push.apply(O,k)}return O}function s(E){for(var S=1;S<arguments.length;S++){var O=arguments[S]!=null?arguments[S]:{};S%2?a(Object(O),!0).forEach(function(k){j(E,k,O[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):a(Object(O)).forEach(function(k){Object.defineProperty(E,k,Object.getOwnPropertyDescriptor(O,k))})}return E}function l(E,S){if(E==null)return{};var O=c(E,S),k,M;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(E);for(M=0;M<A.length;M++)k=A[M],!(S.indexOf(k)>=0)&&Object.prototype.propertyIsEnumerable.call(E,k)&&(O[k]=E[k])}return O}function c(E,S){if(E==null)return{};var O={},k=Object.keys(E),M,A;for(A=0;A<k.length;A++)M=k[A],!(S.indexOf(M)>=0)&&(O[M]=E[M]);return O}function d(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function u(E,S){for(var O=0;O<S.length;O++){var k=S[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(E,k.key,k)}}function f(E,S,O){return S&&u(E.prototype,S),Object.defineProperty(E,"prototype",{writable:!1}),E}function h(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),S&&g(E,S)}function g(E,S){return g=Object.setPrototypeOf||function(k,M){return k.__proto__=M,k},g(E,S)}function m(E){var S=w();return function(){var k=b(E),M;if(S){var A=b(this).constructor;M=Reflect.construct(k,arguments,A)}else M=k.apply(this,arguments);return x(this,M)}}function x(E,S){if(S&&(e(S)==="object"||typeof S=="function"))return S;if(S!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(E)}function y(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(E){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},b(E)}function j(E,S,O){return S in E?Object.defineProperty(E,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):E[S]=O,E}var P=(function(E){h(O,E);var S=m(O);function O(){var k;d(this,O);for(var M=arguments.length,A=new Array(M),_=0;_<M;_++)A[_]=arguments[_];return k=S.call.apply(S,[this].concat(A)),j(y(k),"onClick",function(D){var B=k.props,H=B.text,T=B.onCopy,N=B.children,I=B.options,R=t.default.Children.only(N),$=(0,r.default)(H,I);T&&T(H,$),R&&R.props&&typeof R.props.onClick=="function"&&R.props.onClick(D)}),k}return f(O,[{key:"render",value:function(){var M=this.props,A=M.children,_=l(M,n),D=t.default.Children.only(A);return t.default.cloneElement(D,s(s({},_),{},{onClick:this.onClick}))}}]),O})(t.default.PureComponent);return ca.CopyToClipboard=P,j(P,"defaultProps",{onCopy:void 0,options:void 0}),ca}var dd,A0;function EN(){if(A0)return dd;A0=1;var e=jN(),t=e.CopyToClipboard;return t.CopyToClipboard=t,dd=t,dd}var PN=EN();const Gh=wr(PN),pr=({children:e,onClick:t,isActive:r=!1,icon:n})=>{const[i,a]=v.useState(!1),s={width:"100%",textAlign:"left",marginBottom:"8px",border:"none",borderRadius:"8px",padding:"12px 16px",fontWeight:500,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative",overflow:"hidden",background:r?"#00bcd4":"transparent",color:r?"#ffffff":"#595959",transform:i?"translateX(4px)":"translateX(0)",boxShadow:r?i?"0 4px 12px rgba(0, 188, 212, 0.3)":"none":i?"0 2px 8px rgba(0, 0, 0, 0.1)":"none"},l={position:"absolute",left:0,top:0,bottom:0,width:"4px",background:"#00bcd4",borderRadius:"0 2px 2px 0"};return o.jsxs(p.Button,{type:"text",onClick:t,style:s,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r&&o.jsx("div",{style:l}),n&&o.jsx("span",{style:{marginRight:"8px",fontSize:"16px"},children:n}),o.jsx("span",{style:{fontSize:"14px",lineHeight:1.4},children:e})]})},hr=({importText:e,onCopy:t})=>o.jsx(Gh,{text:e,onCopy:()=>{p.message.success("import 문이 복사되었습니다!"),t?.()},children:o.jsxs("div",{style:{background:"#1e1e1e",border:"1px solid #3c3c3c",borderRadius:"6px",padding:"12px 16px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:"13px",color:"#d4d4d4",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"all 0.2s ease",userSelect:"none"},onMouseEnter:r=>{r.currentTarget.style.background="#2d2d30",r.currentTarget.style.borderColor="#4a4a4a"},onMouseLeave:r=>{r.currentTarget.style.background="#1e1e1e",r.currentTarget.style.borderColor="#3c3c3c"},children:[o.jsx("code",{children:e}),o.jsx(X.CopyOutlined,{style:{color:"#858585",fontSize:"14px"}})]})}),qr=({selectedRowKeys:e,onSelectionChange:t,componentName:r})=>{const n=[{property:"label",description:"폼 아이템의 라벨 텍스트입니다. 필수 항목일 경우 자동으로 별표(*)가 추가됩니다.",type:"string | React.ReactNode"},{property:"name",description:"폼 필드의 이름입니다. Form.useForm과 함께 사용되어 필드 값을 관리합니다.",type:"string | string[]"},{property:"rules",description:'필드의 유효성 검사 규칙입니다. Ant Design의 Form.Item rules를 따릅니다. (예: [{ required: true, message: "필수 입력 항목입니다." }])',type:"Rule[]"},{property:"initialValue",description:"필드의 초기값을 설정합니다.",type:"any"}],i=()=>{if(e.length===0){p.message.warning("선택된 속성이 없습니다!");return}const a={label:"'라벨'",name:"'fieldName'",rules:"[{ required: true, message: '필수 항목입니다.' }]",initialValue:"'초기값'"},s=e.map(c=>` ${c}: ${a[c]||"true"}`).join(`,
184
184
  `),l=`<${r}
185
185
  itemProps={{
186
186
  ${s}
@@ -307,7 +307,7 @@ ${le}
307
307
  setDrawerOpen(false);
308
308
  }}
309
309
  placement="right"
310
- ><div>드로어 영역</div></BwgDrawer>`})]})]})})]})},tt=({importText:e,onCopy:t})=>o.jsx(Gh,{text:e,onCopy:()=>{p.message.success("코드가 복사되었습니다!"),t?.()},children:o.jsxs("div",{style:{background:"#1e1e1e",border:"1px solid #3c3c3c",borderRadius:"6px",padding:"12px 16px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:"13px",color:"#d4d4d4",cursor:"pointer",display:"flex",alignItems:"flex-start",justifyContent:"space-between",transition:"all 0.2s ease",userSelect:"none",marginBottom:"16px"},onMouseEnter:r=>{r.currentTarget.style.background="#2d2d30",r.currentTarget.style.borderColor="#4a4a4a"},onMouseLeave:r=>{r.currentTarget.style.background="#1e1e1e",r.currentTarget.style.borderColor="#3c3c3c"},children:[o.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",flex:1,lineHeight:"1.5"},children:o.jsx("code",{children:e})}),o.jsx(X.CopyOutlined,{style:{color:"#858585",fontSize:"14px",marginLeft:"12px",flexShrink:0}})]})}),Gn=({id:e,children:t,onClick:r,isActive:n=!1,icon:i})=>{const[a,s]=v.useState(!1),l={width:"100%",textAlign:"left",marginBottom:"8px",border:"none",borderRadius:"8px",padding:"12px 16px",fontWeight:500,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative",overflow:"hidden",background:n?"#00bcd4":"transparent",color:n?"#ffffff":"#595959",transform:a?"translateX(4px)":"translateX(0)",boxShadow:n?a?"0 4px 12px rgba(0, 188, 212, 0.3)":"none":a?"0 2px 8px rgba(0, 0, 0, 0.1)":"none"},c={position:"absolute",left:0,top:0,bottom:0,width:"4px",background:"#00bcd4",borderRadius:"0 2px 2px 0"};return o.jsxs(p.Button,{id:e,type:"text",onClick:r,style:l,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[n&&o.jsx("div",{style:c}),i&&o.jsx("span",{style:{marginRight:"8px",fontSize:"16px"},children:i}),o.jsx("span",{style:{fontSize:"14px",lineHeight:1.4},children:t})]})},Xn=({title:e,subtitle:t})=>o.jsxs("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:[e,o.jsx("span",{id:"subtitle",style:{marginLeft:"10px",color:"#00bcd4",fontSize:"14px",fontWeight:400},children:t})]}),I0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState("");return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx("strong",{children:"카운터:"})," ",e,o.jsxs("div",{style:{marginTop:"8px"},children:[o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginRight:"8px"},children:"증가"}),o.jsx(p.Button,{onClick:()=>t(e-1),children:"감소"})]})]}),o.jsxs("div",{children:[o.jsx("strong",{children:"이름 입력:"}),o.jsx(p.Input,{value:r,onChange:i=>n(i.target.value),placeholder:"이름을 입력하세요",style:{marginTop:"8px"}}),r&&o.jsxs("div",{style:{marginTop:"8px"},children:["안녕하세요, ",r,"님!"]})]})]})]})},N0=()=>{const e=v.useRef(null),t=v.useRef(0),[r,n]=v.useState(0),i=()=>{e.current?.focus()},a=()=>{t.current+=1,alert(`Ref 카운트: ${t.current}`)};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx(p.Input,{ref:e,placeholder:"이 입력 필드에 포커스됩니다"}),o.jsx(p.Button,{onClick:i,style:{marginTop:"8px"},children:"입력 필드에 포커스"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["렌더링 횟수: ",r]}),o.jsxs("div",{children:["Ref 카운트: ",t.current," (렌더링과 무관)"]}),o.jsxs("div",{style:{marginTop:"8px"},children:[o.jsx(p.Button,{onClick:()=>n(r+1),style:{marginRight:"8px"},children:"리렌더링"}),o.jsx(p.Button,{onClick:a,children:"Ref 카운트 증가"})]})]})]})]})},D0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(["할 일 1","할 일 2"]),i=v.useMemo(()=>(console.log("비싼 계산 실행됨"),e*1e3),[e]),a=()=>{n([...r,`할 일 ${r.length+1}`])};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e]}),o.jsxs("div",{children:["계산된 값 (useMemo): ",i]}),o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginTop:"8px"},children:"카운트 증가"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsx("div",{children:"할 일 목록:"}),r.map((s,l)=>o.jsxs("div",{children:["• ",s]},l)),o.jsx(p.Button,{onClick:a,style:{marginTop:"8px"},children:"할 일 추가 (useMemo 재계산 안됨)"})]})]})]})},_0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(""),i=v.useCallback(()=>{t(s=>s+1)},[]),a=v.useCallback(s=>{n(s)},[]);return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e]}),o.jsx(p.Button,{onClick:i,style:{marginTop:"8px"},children:"증가 (useCallback 사용)"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["이름: ",r]}),o.jsx(p.Input,{value:r,onChange:s=>a(s.target.value),placeholder:"이름 입력",style:{marginTop:"8px"}})]})]})]})},B0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(window.innerWidth);return v.useEffect(()=>(console.log("컴포넌트가 마운트되었습니다"),()=>{console.log("컴포넌트가 언마운트됩니다")}),[]),v.useEffect(()=>{document.title=`카운트: ${e}`},[e]),v.useEffect(()=>{const i=()=>{n(window.innerWidth)};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e," (브라우저 탭 제목 확인)"]}),o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginTop:"8px"},children:"카운트 증가"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["현재 윈도우 너비: ",r,"px"]}),o.jsx("div",{style:{fontSize:"12px",color:"#666"},children:"(브라우저 창 크기를 조절해보세요)"})]})]})]})},RN=v.forwardRef((e,t)=>{const[r,n]=v.useState("");return o.jsxs("div",{children:[o.jsx(p.Input,{ref:t,value:r,onChange:i=>n(i.target.value),placeholder:e.placeholder,style:{marginBottom:"8px"}}),o.jsxs("div",{style:{fontSize:"12px",color:"#666"},children:["현재 값: ",r]})]})}),AN=()=>{const e=v.useRef(null),t=()=>{e.current?.focus()},r=()=>{e.current?.select()};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"ForwardRef 실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(RN,{ref:e,placeholder:"이 입력 필드는 ref가 전달됩니다"}),o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:t,children:"포커스"}),o.jsx(p.Button,{onClick:r,children:"전체 선택"})]})]})]})},IN=()=>{const e=v.useRef(null),t=()=>{e.current?.focus()},r=()=>{e.current?.clear()},n=()=>{const i=e.current?.getValue();alert(`현재 값: ${i}`)};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"useImperativeHandle 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(NN,{ref:e}),o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:t,children:"포커스"}),o.jsx(p.Button,{onClick:r,children:"클리어"}),o.jsx(p.Button,{onClick:n,children:"값 가져오기"})]})]})]})},NN=v.forwardRef((e,t)=>{const r=v.useRef(null),[n,i]=v.useState("");return v.useImperativeHandle(t,()=>({focus:()=>{r.current?.focus()},clear:()=>{i(""),r.current?.focus()},getValue:()=>n})),o.jsx(p.Input,{ref:r,value:n,onChange:a=>i(a.target.value),placeholder:"부모에서 제어되는 입력 필드"})}),DN=()=>{const e=v.useRef(null),[t,r]=v.useState("intro"),n=i=>{const a=document.getElementById(i);a&&e.current&&(e.current.scrollTo({top:a.offsetTop-20,behavior:"smooth"}),r(i))};return o.jsx(Oc,{children:o.jsxs(p.Row,{style:{height:"100%"},children:[o.jsxs(p.Col,{span:4,style:{height:"100%",overflow:"auto"},children:[o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"React Hooks 가이드"})})}),o.jsx("div",{id:"nav-container",style:{padding:"10px"},children:o.jsx(Gn,{id:"introBtn",onClick:()=>{n("intro")},isActive:t==="intro",children:"소개"})}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"Section 1: 기본 Hooks"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(Gn,{id:"useStateBtn",onClick:()=>{n("useState")},isActive:t==="useState",children:"useState"}),o.jsx(Gn,{id:"useRefBtn",onClick:()=>{n("useRef")},isActive:t==="useRef",children:"useRef"}),o.jsx(Gn,{id:"useMemoBtn",onClick:()=>{n("useMemo")},isActive:t==="useMemo",children:"useMemo"}),o.jsx(Gn,{id:"useCallbackBtn",onClick:()=>{n("useCallback")},isActive:t==="useCallback",children:"useCallback"}),o.jsx(Gn,{id:"useEffectBtn",onClick:()=>{n("useEffect")},isActive:t==="useEffect",children:"useEffect"})]}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"Section 2: 고급 Hooks"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(Gn,{id:"forwardRefBtn",onClick:()=>{n("forwardRef")},isActive:t==="forwardRef",children:"forwardRef"}),o.jsx(Gn,{id:"useImperativeHandleBtn",onClick:()=>{n("useImperativeHandle")},isActive:t==="useImperativeHandle",children:"useImperativeHandle"})]})]}),o.jsxs(p.Col,{ref:e,id:"content-container",span:20,style:{height:"100%",background:"#f0f0f0",overflow:"auto",padding:"20px"},children:[o.jsx("div",{id:"intro",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"React Hooks 가이드",subtitle:"초보자를 위한 완벽 가이드"}),style:{borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",border:"1px solid #f0f0f0"},children:o.jsxs("div",{style:{padding:"20px 0"},children:[o.jsx(p.Alert,{message:"React Hooks란?",description:"React 16.8에서 도입된 기능으로, 함수형 컴포넌트에서도 state와 생명주기 메서드를 사용할 수 있게 해주는 특별한 함수들입니다.",type:"info",showIcon:!0,style:{marginBottom:"20px"}}),o.jsx(p.Typography.Paragraph,{children:"이 가이드는 두 섹션으로 구성되어 있습니다:"}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx(p.Typography.Title,{level:5,style:{color:"#1890ff",marginBottom:"12px"},children:"📚 Section 1: 기본 Hooks"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.8"},children:[o.jsxs("li",{children:[o.jsx("strong",{children:"useState"})," - 상태 관리"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useRef"})," - DOM 참조 및 값 저장"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useMemo"})," - 값 메모이제이션"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useCallback"})," - 함수 메모이제이션"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useEffect"})," - 부수 효과 처리"]})]})]}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx(p.Typography.Title,{level:5,style:{color:"#52c41a",marginBottom:"12px"},children:"🚀 Section 2: 고급 Hooks"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.8"},children:[o.jsxs("li",{children:[o.jsx("strong",{children:"forwardRef"})," - 컴포넌트 간 ref 전달"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useImperativeHandle"})," - 부모에게 노출할 인스턴스 값 커스터마이징"]})]})]})]})})}),o.jsx("div",{id:"useState",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useState",subtitle:"상태 관리의 기본"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useState는 컴포넌트에서 변하는 값을 기억하고 화면에 반영하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsx(p.Typography.Paragraph,{children:"컴포넌트에서 변경 가능한 데이터를 관리할 때 사용합니다. 예: 사용자 입력, 카운터, 토글 상태 등"})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { useState } from 'react';
310
+ ><div>드로어 영역</div></BwgDrawer>`})]})]})})]})},rt=({importText:e,onCopy:t})=>o.jsx(Gh,{text:e,onCopy:()=>{p.message.success("코드가 복사되었습니다!"),t?.()},children:o.jsxs("div",{style:{background:"#1e1e1e",border:"1px solid #3c3c3c",borderRadius:"6px",padding:"12px 16px",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:"13px",color:"#d4d4d4",cursor:"pointer",display:"flex",alignItems:"flex-start",justifyContent:"space-between",transition:"all 0.2s ease",userSelect:"none",marginBottom:"16px"},onMouseEnter:r=>{r.currentTarget.style.background="#2d2d30",r.currentTarget.style.borderColor="#4a4a4a"},onMouseLeave:r=>{r.currentTarget.style.background="#1e1e1e",r.currentTarget.style.borderColor="#3c3c3c"},children:[o.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",flex:1,lineHeight:"1.5"},children:o.jsx("code",{children:e})}),o.jsx(X.CopyOutlined,{style:{color:"#858585",fontSize:"14px",marginLeft:"12px",flexShrink:0}})]})}),Gn=({id:e,children:t,onClick:r,isActive:n=!1,icon:i})=>{const[a,s]=v.useState(!1),l={width:"100%",textAlign:"left",marginBottom:"8px",border:"none",borderRadius:"8px",padding:"12px 16px",fontWeight:500,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative",overflow:"hidden",background:n?"#00bcd4":"transparent",color:n?"#ffffff":"#595959",transform:a?"translateX(4px)":"translateX(0)",boxShadow:n?a?"0 4px 12px rgba(0, 188, 212, 0.3)":"none":a?"0 2px 8px rgba(0, 0, 0, 0.1)":"none"},c={position:"absolute",left:0,top:0,bottom:0,width:"4px",background:"#00bcd4",borderRadius:"0 2px 2px 0"};return o.jsxs(p.Button,{id:e,type:"text",onClick:r,style:l,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[n&&o.jsx("div",{style:c}),i&&o.jsx("span",{style:{marginRight:"8px",fontSize:"16px"},children:i}),o.jsx("span",{style:{fontSize:"14px",lineHeight:1.4},children:t})]})},Xn=({title:e,subtitle:t})=>o.jsxs("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:[e,o.jsx("span",{id:"subtitle",style:{marginLeft:"10px",color:"#00bcd4",fontSize:"14px",fontWeight:400},children:t})]}),I0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState("");return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx("strong",{children:"카운터:"})," ",e,o.jsxs("div",{style:{marginTop:"8px"},children:[o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginRight:"8px"},children:"증가"}),o.jsx(p.Button,{onClick:()=>t(e-1),children:"감소"})]})]}),o.jsxs("div",{children:[o.jsx("strong",{children:"이름 입력:"}),o.jsx(p.Input,{value:r,onChange:i=>n(i.target.value),placeholder:"이름을 입력하세요",style:{marginTop:"8px"}}),r&&o.jsxs("div",{style:{marginTop:"8px"},children:["안녕하세요, ",r,"님!"]})]})]})]})},N0=()=>{const e=v.useRef(null),t=v.useRef(0),[r,n]=v.useState(0),i=()=>{e.current?.focus()},a=()=>{t.current+=1,alert(`Ref 카운트: ${t.current}`)};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx(p.Input,{ref:e,placeholder:"이 입력 필드에 포커스됩니다"}),o.jsx(p.Button,{onClick:i,style:{marginTop:"8px"},children:"입력 필드에 포커스"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["렌더링 횟수: ",r]}),o.jsxs("div",{children:["Ref 카운트: ",t.current," (렌더링과 무관)"]}),o.jsxs("div",{style:{marginTop:"8px"},children:[o.jsx(p.Button,{onClick:()=>n(r+1),style:{marginRight:"8px"},children:"리렌더링"}),o.jsx(p.Button,{onClick:a,children:"Ref 카운트 증가"})]})]})]})]})},D0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(["할 일 1","할 일 2"]),i=v.useMemo(()=>(console.log("비싼 계산 실행됨"),e*1e3),[e]),a=()=>{n([...r,`할 일 ${r.length+1}`])};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e]}),o.jsxs("div",{children:["계산된 값 (useMemo): ",i]}),o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginTop:"8px"},children:"카운트 증가"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsx("div",{children:"할 일 목록:"}),r.map((s,l)=>o.jsxs("div",{children:["• ",s]},l)),o.jsx(p.Button,{onClick:a,style:{marginTop:"8px"},children:"할 일 추가 (useMemo 재계산 안됨)"})]})]})]})},_0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(""),i=v.useCallback(()=>{t(s=>s+1)},[]),a=v.useCallback(s=>{n(s)},[]);return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e]}),o.jsx(p.Button,{onClick:i,style:{marginTop:"8px"},children:"증가 (useCallback 사용)"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["이름: ",r]}),o.jsx(p.Input,{value:r,onChange:s=>a(s.target.value),placeholder:"이름 입력",style:{marginTop:"8px"}})]})]})]})},B0=()=>{const[e,t]=v.useState(0),[r,n]=v.useState(window.innerWidth);return v.useEffect(()=>(console.log("컴포넌트가 마운트되었습니다"),()=>{console.log("컴포넌트가 언마운트됩니다")}),[]),v.useEffect(()=>{document.title=`카운트: ${e}`},[e]),v.useEffect(()=>{const i=()=>{n(window.innerWidth)};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsxs("div",{children:["카운트: ",e," (브라우저 탭 제목 확인)"]}),o.jsx(p.Button,{onClick:()=>t(e+1),style:{marginTop:"8px"},children:"카운트 증가"})]}),o.jsx(p.Divider,{}),o.jsxs("div",{children:[o.jsxs("div",{children:["현재 윈도우 너비: ",r,"px"]}),o.jsx("div",{style:{fontSize:"12px",color:"#666"},children:"(브라우저 창 크기를 조절해보세요)"})]})]})]})},RN=v.forwardRef((e,t)=>{const[r,n]=v.useState("");return o.jsxs("div",{children:[o.jsx(p.Input,{ref:t,value:r,onChange:i=>n(i.target.value),placeholder:e.placeholder,style:{marginBottom:"8px"}}),o.jsxs("div",{style:{fontSize:"12px",color:"#666"},children:["현재 값: ",r]})]})}),AN=()=>{const e=v.useRef(null),t=()=>{e.current?.focus()},r=()=>{e.current?.select()};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"ForwardRef 실습 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(RN,{ref:e,placeholder:"이 입력 필드는 ref가 전달됩니다"}),o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:t,children:"포커스"}),o.jsx(p.Button,{onClick:r,children:"전체 선택"})]})]})]})},IN=()=>{const e=v.useRef(null),t=()=>{e.current?.focus()},r=()=>{e.current?.clear()},n=()=>{const i=e.current?.getValue();alert(`현재 값: ${i}`)};return o.jsxs("div",{style:{padding:"16px",background:"#f9f9f9",borderRadius:"8px"},children:[o.jsx("h4",{children:"useImperativeHandle 예제"}),o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(NN,{ref:e}),o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:t,children:"포커스"}),o.jsx(p.Button,{onClick:r,children:"클리어"}),o.jsx(p.Button,{onClick:n,children:"값 가져오기"})]})]})]})},NN=v.forwardRef((e,t)=>{const r=v.useRef(null),[n,i]=v.useState("");return v.useImperativeHandle(t,()=>({focus:()=>{r.current?.focus()},clear:()=>{i(""),r.current?.focus()},getValue:()=>n})),o.jsx(p.Input,{ref:r,value:n,onChange:a=>i(a.target.value),placeholder:"부모에서 제어되는 입력 필드"})}),DN=()=>{const e=v.useRef(null),[t,r]=v.useState("intro"),n=i=>{const a=document.getElementById(i);a&&e.current&&(e.current.scrollTo({top:a.offsetTop-20,behavior:"smooth"}),r(i))};return o.jsx(Oc,{children:o.jsxs(p.Row,{style:{height:"100%"},children:[o.jsxs(p.Col,{span:4,style:{height:"100%",overflow:"auto"},children:[o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"React Hooks 가이드"})})}),o.jsx("div",{id:"nav-container",style:{padding:"10px"},children:o.jsx(Gn,{id:"introBtn",onClick:()=>{n("intro")},isActive:t==="intro",children:"소개"})}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"Section 1: 기본 Hooks"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(Gn,{id:"useStateBtn",onClick:()=>{n("useState")},isActive:t==="useState",children:"useState"}),o.jsx(Gn,{id:"useRefBtn",onClick:()=>{n("useRef")},isActive:t==="useRef",children:"useRef"}),o.jsx(Gn,{id:"useMemoBtn",onClick:()=>{n("useMemo")},isActive:t==="useMemo",children:"useMemo"}),o.jsx(Gn,{id:"useCallbackBtn",onClick:()=>{n("useCallback")},isActive:t==="useCallback",children:"useCallback"}),o.jsx(Gn,{id:"useEffectBtn",onClick:()=>{n("useEffect")},isActive:t==="useEffect",children:"useEffect"})]}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"Section 2: 고급 Hooks"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(Gn,{id:"forwardRefBtn",onClick:()=>{n("forwardRef")},isActive:t==="forwardRef",children:"forwardRef"}),o.jsx(Gn,{id:"useImperativeHandleBtn",onClick:()=>{n("useImperativeHandle")},isActive:t==="useImperativeHandle",children:"useImperativeHandle"})]})]}),o.jsxs(p.Col,{ref:e,id:"content-container",span:20,style:{height:"100%",background:"#f0f0f0",overflow:"auto",padding:"20px"},children:[o.jsx("div",{id:"intro",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"React Hooks 가이드",subtitle:"초보자를 위한 완벽 가이드"}),style:{borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",border:"1px solid #f0f0f0"},children:o.jsxs("div",{style:{padding:"20px 0"},children:[o.jsx(p.Alert,{message:"React Hooks란?",description:"React 16.8에서 도입된 기능으로, 함수형 컴포넌트에서도 state와 생명주기 메서드를 사용할 수 있게 해주는 특별한 함수들입니다.",type:"info",showIcon:!0,style:{marginBottom:"20px"}}),o.jsx(p.Typography.Paragraph,{children:"이 가이드는 두 섹션으로 구성되어 있습니다:"}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx(p.Typography.Title,{level:5,style:{color:"#1890ff",marginBottom:"12px"},children:"📚 Section 1: 기본 Hooks"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.8"},children:[o.jsxs("li",{children:[o.jsx("strong",{children:"useState"})," - 상태 관리"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useRef"})," - DOM 참조 및 값 저장"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useMemo"})," - 값 메모이제이션"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useCallback"})," - 함수 메모이제이션"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useEffect"})," - 부수 효과 처리"]})]})]}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx(p.Typography.Title,{level:5,style:{color:"#52c41a",marginBottom:"12px"},children:"🚀 Section 2: 고급 Hooks"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.8"},children:[o.jsxs("li",{children:[o.jsx("strong",{children:"forwardRef"})," - 컴포넌트 간 ref 전달"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"useImperativeHandle"})," - 부모에게 노출할 인스턴스 값 커스터마이징"]})]})]})]})})}),o.jsx("div",{id:"useState",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useState",subtitle:"상태 관리의 기본"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useState는 컴포넌트에서 변하는 값을 기억하고 화면에 반영하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsx(p.Typography.Paragraph,{children:"컴포넌트에서 변경 가능한 데이터를 관리할 때 사용합니다. 예: 사용자 입력, 카운터, 토글 상태 등"})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { useState } from 'react';
311
311
 
312
312
  const MyComponent = () => {
313
313
  // [현재값, 값을변경하는함수] = useState(초기값)
@@ -321,7 +321,7 @@ const MyComponent = () => {
321
321
  <button onClick={() => setCount(count + 1)}>증가</button>
322
322
  </div>
323
323
  );
324
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"상태는 직접 변경하지 말고 항상 set 함수를 사용하세요"}),o.jsx("li",{children:"객체나 배열 상태를 업데이트할 때는 새로운 객체/배열을 만들어야 합니다"}),o.jsx("li",{children:"이전 상태를 기반으로 업데이트할 때는 함수형 업데이트를 사용하세요"})]})]}),o.jsx(I0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useState 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useState 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 사이드바 검색 기능 (Sidebar.tsx)"}),o.jsx(tt,{importText:`// 검색어와 활성 세그먼트 상태 관리
324
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"상태는 직접 변경하지 말고 항상 set 함수를 사용하세요"}),o.jsx("li",{children:"객체나 배열 상태를 업데이트할 때는 새로운 객체/배열을 만들어야 합니다"}),o.jsx("li",{children:"이전 상태를 기반으로 업데이트할 때는 함수형 업데이트를 사용하세요"})]})]}),o.jsx(I0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useState 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useState 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 사이드바 검색 기능 (Sidebar.tsx)"}),o.jsx(rt,{importText:`// 검색어와 활성 세그먼트 상태 관리
325
325
  const [searchValue, setSearchValue] = useState('');
326
326
  const [activeSegment, setActiveSegment] = useState<'category' | 'favorite'>(
327
327
  'category'
@@ -334,7 +334,7 @@ const handleSegmentChange = (value: 'category' | 'favorite') => {
334
334
  if (value === 'category') {
335
335
  setSearchValue('');
336
336
  }
337
- };`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 시스템 코드 관리 (CMSystCodeM01.tsx)"}),o.jsx(tt,{importText:`// 선택된 시스템과 탭 상태 관리
337
+ };`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 시스템 코드 관리 (CMSystCodeM01.tsx)"}),o.jsx(rt,{importText:`// 선택된 시스템과 탭 상태 관리
338
338
  const [selectedSystem, setSelectedSystem] = useState<SystemInfo | null>(null);
339
339
  const [activeTab, setActiveTab] = useState<'group' | 'detail'>('group');
340
340
 
@@ -343,7 +343,7 @@ const handleSystemClick = (system: SystemInfo) => {
343
343
  setSelectedSystem(system);
344
344
  // 시스템 변경 시 그룹 탭으로 초기화
345
345
  setActiveTab('group');
346
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 로딩 상태 관리 (Main.tsx)"}),o.jsx(tt,{importText:`// 전역 로딩 상태 관리
346
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 로딩 상태 관리 (Main.tsx)"}),o.jsx(rt,{importText:`// 전역 로딩 상태 관리
347
347
  const [loading, setLoading] = useState(false);
348
348
 
349
349
  // API 호출 시 로딩 상태 제어
@@ -355,7 +355,7 @@ const loadData = async () => {
355
355
  } finally {
356
356
  setLoading(false);
357
357
  }
358
- };`})]})]}),o.jsx(I0,{})]})})}),o.jsx("div",{id:"useRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useRef",subtitle:"DOM 접근과 값 저장"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useRef는 DOM 요소에 직접 접근하거나, 리렌더링 없이 값을 저장하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"DOM 요소에 직접 접근할 때 (focus, scroll 등)"}),o.jsx("li",{children:"리렌더링되지 않는 값을 저장할 때"}),o.jsx("li",{children:"이전 값을 기억해야 할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { useRef } from 'react';
358
+ };`})]})]}),o.jsx(I0,{})]})})}),o.jsx("div",{id:"useRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useRef",subtitle:"DOM 접근과 값 저장"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useRef는 DOM 요소에 직접 접근하거나, 리렌더링 없이 값을 저장하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"DOM 요소에 직접 접근할 때 (focus, scroll 등)"}),o.jsx("li",{children:"리렌더링되지 않는 값을 저장할 때"}),o.jsx("li",{children:"이전 값을 기억해야 할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { useRef } from 'react';
359
359
 
360
360
  const MyComponent = () => {
361
361
  // DOM 참조용
@@ -379,7 +379,7 @@ const MyComponent = () => {
379
379
  <button onClick={focusInput}>포커스</button>
380
380
  </div>
381
381
  );
382
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 useState vs useRef"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"useState"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값이 변경되면 리렌더링"}),o.jsx("li",{children:"화면에 표시되는 데이터"}),o.jsx("li",{children:"사용자에게 보여야 하는 상태"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useRef"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값이 변경되어도 리렌더링 안됨"}),o.jsx("li",{children:"내부적으로만 사용되는 데이터"}),o.jsx("li",{children:"DOM 요소 참조"})]})]})]})]}),o.jsx(N0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useRef 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useRef 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 그리드 참조 관리 (CMRoleMstrM01.tsx)"}),o.jsx(tt,{importText:`// 여러 그리드 컴포넌트에 대한 ref 관리
382
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 useState vs useRef"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"useState"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값이 변경되면 리렌더링"}),o.jsx("li",{children:"화면에 표시되는 데이터"}),o.jsx("li",{children:"사용자에게 보여야 하는 상태"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useRef"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값이 변경되어도 리렌더링 안됨"}),o.jsx("li",{children:"내부적으로만 사용되는 데이터"}),o.jsx("li",{children:"DOM 요소 참조"})]})]})]})]}),o.jsx(N0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useRef 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useRef 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 그리드 참조 관리 (CMRoleMstrM01.tsx)"}),o.jsx(rt,{importText:`// 여러 그리드 컴포넌트에 대한 ref 관리
383
383
  const roleGridRef = useRef<BwgGridRef>(null);
384
384
  const dprtGridRef = useRef<BwgGridRef>(null);
385
385
  const userGridRef = useRef<BwgGridRef>(null);
@@ -392,7 +392,7 @@ const serviceEvent = {
392
392
  roleGridRef.current?.addAllData(response.data);
393
393
  });
394
394
  }
395
- };`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 컴포넌트 캐싱 (Main.tsx)"}),o.jsx(tt,{importText:`// 컴포넌트 인스턴스를 캐싱하여 성능 최적화
395
+ };`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 컴포넌트 캐싱 (Main.tsx)"}),o.jsx(rt,{importText:`// 컴포넌트 인스턴스를 캐싱하여 성능 최적화
396
396
  const componentCache = useRef<Map<string, React.ComponentType>>(new Map());
397
397
  const componentInstances = useRef<Map<string, React.ReactElement>>(new Map());
398
398
 
@@ -407,7 +407,7 @@ const createViewLoader = (scrnPath: string) => {
407
407
  const component = views[globKey];
408
408
  componentCache.current.set(scrnPath, component);
409
409
  return component;
410
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 스크롤 제어 (BwgReactGuideM01.tsx)"}),o.jsx(tt,{importText:`// 콘텐츠 영역 스크롤 제어
410
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 스크롤 제어 (BwgReactGuideM01.tsx)"}),o.jsx(rt,{importText:`// 콘텐츠 영역 스크롤 제어
411
411
  const contentRef = useRef<HTMLDivElement>(null);
412
412
 
413
413
  const scrollToSection = (id: string) => {
@@ -419,7 +419,7 @@ const scrollToSection = (id: string) => {
419
419
  behavior: 'smooth',
420
420
  });
421
421
  }
422
- };`})]})]}),o.jsx(N0,{})]})})}),o.jsx("div",{id:"useMemo",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useMemo",subtitle:"값 메모이제이션으로 성능 최적화"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useMemo는 비싼 계산 결과를 기억해두고, 의존성이 바뀔 때만 다시 계산하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"계산 비용이 높은 연산 결과를 캐싱할 때"}),o.jsx("li",{children:"의존성이 변경되지 않으면 이전 결과를 재사용하고 싶을 때"}),o.jsx("li",{children:"불필요한 재계산을 방지하여 성능을 최적화할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { useMemo, useState } from 'react';
422
+ };`})]})]}),o.jsx(N0,{})]})})}),o.jsx("div",{id:"useMemo",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useMemo",subtitle:"값 메모이제이션으로 성능 최적화"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useMemo는 비싼 계산 결과를 기억해두고, 의존성이 바뀔 때만 다시 계산하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"계산 비용이 높은 연산 결과를 캐싱할 때"}),o.jsx("li",{children:"의존성이 변경되지 않으면 이전 결과를 재사용하고 싶을 때"}),o.jsx("li",{children:"불필요한 재계산을 방지하여 성능을 최적화할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { useMemo, useState } from 'react';
423
423
 
424
424
  const MyComponent = () => {
425
425
  const [count, setCount] = useState(0);
@@ -439,7 +439,7 @@ const MyComponent = () => {
439
439
  </button>
440
440
  </div>
441
441
  );
442
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsx(p.Alert,{message:"남용하지 마세요!",description:"useMemo는 성능 최적화 도구입니다. 단순한 계산에는 오히려 오버헤드가 될 수 있으니, 정말 필요한 경우에만 사용하세요.",type:"warning",showIcon:!0})]}),o.jsx(D0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useMemo 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useMemo 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 메뉴 검색 옵션 최적화 (Sidebar.tsx)"}),o.jsx(tt,{importText:`// 메뉴 검색 옵션을 메모이제이션하여 성능 최적화
442
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsx(p.Alert,{message:"남용하지 마세요!",description:"useMemo는 성능 최적화 도구입니다. 단순한 계산에는 오히려 오버헤드가 될 수 있으니, 정말 필요한 경우에만 사용하세요.",type:"warning",showIcon:!0})]}),o.jsx(D0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useMemo 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useMemo 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 메뉴 검색 옵션 최적화 (Sidebar.tsx)"}),o.jsx(rt,{importText:`// 메뉴 검색 옵션을 메모이제이션하여 성능 최적화
443
443
  const menuSearchOptions = useMemo(() => {
444
444
  if (!menuList || menuList.length === 0) {
445
445
  return [];
@@ -468,7 +468,7 @@ const menuSearchOptions = useMemo(() => {
468
468
 
469
469
  addMenuOptions(menuList);
470
470
  return options;
471
- }, [menuList]); // menuList가 변경될 때만 재계산`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 필터링된 데이터 최적화 예제"}),o.jsx(tt,{importText:`// 대용량 데이터 필터링 시 useMemo 활용
471
+ }, [menuList]); // menuList가 변경될 때만 재계산`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 필터링된 데이터 최적화 예제"}),o.jsx(rt,{importText:`// 대용량 데이터 필터링 시 useMemo 활용
472
472
  const FilteredDataExample = () => {
473
473
  const [searchTerm, setSearchTerm] = useState('');
474
474
  const [data] = useState(largeDataSet); // 큰 데이터셋
@@ -498,7 +498,7 @@ const FilteredDataExample = () => {
498
498
  <div>활성: {statistics.active}, 비활성: {statistics.inactive}</div>
499
499
  </div>
500
500
  );
501
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 복잡한 계산 최적화 예제"}),o.jsx(tt,{importText:`// 복잡한 차트 데이터 가공 시 useMemo 활용
501
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 복잡한 계산 최적화 예제"}),o.jsx(rt,{importText:`// 복잡한 차트 데이터 가공 시 useMemo 활용
502
502
  const ChartDataExample = () => {
503
503
  const [rawData, setRawData] = useState([]);
504
504
  const [dateRange, setDateRange] = useState({ start: '', end: '' });
@@ -537,7 +537,7 @@ const ChartDataExample = () => {
537
537
  }, [rawData, dateRange]); // rawData나 dateRange가 변경될 때만 재계산
538
538
 
539
539
  return <Chart data={chartData} />;
540
- };`})]})]}),o.jsx(D0,{})]})})}),o.jsx("div",{id:"useCallback",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useCallback",subtitle:"함수 메모이제이션"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useCallback은 함수를 기억해두고, 의존성이 바뀔 때만 새로운 함수를 만드는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"자식 컴포넌트에 함수를 props로 전달할 때"}),o.jsx("li",{children:"함수가 다른 Hook의 의존성 배열에 포함될 때"}),o.jsx("li",{children:"불필요한 리렌더링을 방지하고 싶을 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { useCallback, useState } from 'react';
540
+ };`})]})]}),o.jsx(D0,{})]})})}),o.jsx("div",{id:"useCallback",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useCallback",subtitle:"함수 메모이제이션"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useCallback은 함수를 기억해두고, 의존성이 바뀔 때만 새로운 함수를 만드는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"자식 컴포넌트에 함수를 props로 전달할 때"}),o.jsx("li",{children:"함수가 다른 Hook의 의존성 배열에 포함될 때"}),o.jsx("li",{children:"불필요한 리렌더링을 방지하고 싶을 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { useCallback, useState } from 'react';
541
541
 
542
542
  const MyComponent = () => {
543
543
  const [count, setCount] = useState(0);
@@ -560,7 +560,7 @@ const MyComponent = () => {
560
560
  />
561
561
  </div>
562
562
  );
563
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 useMemo vs useCallback"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"useMemo"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값을 메모이제이션"}),o.jsx("li",{children:"계산 결과를 캐싱"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useCallback"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"함수를 메모이제이션"}),o.jsx("li",{children:"함수 참조를 캐싱"}),o.jsx("li",{children:"useCallback(fn, [deps])"})]})]})]})]}),o.jsx(_0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useCallback 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useCallback 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 즐겨찾기 토글 함수 (Sidebar.tsx)"}),o.jsx(tt,{importText:`// 즐겨찾기 토글 함수를 메모이제이션하여 불필요한 리렌더링 방지
563
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 useMemo vs useCallback"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"useMemo"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"값을 메모이제이션"}),o.jsx("li",{children:"계산 결과를 캐싱"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useCallback"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"함수를 메모이제이션"}),o.jsx("li",{children:"함수 참조를 캐싱"}),o.jsx("li",{children:"useCallback(fn, [deps])"})]})]})]})]}),o.jsx(_0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useCallback 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useCallback 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 즐겨찾기 토글 함수 (Sidebar.tsx)"}),o.jsx(rt,{importText:`// 즐겨찾기 토글 함수를 메모이제이션하여 불필요한 리렌더링 방지
564
564
  const handleFavoriteToggle = useCallback(async (menuItem: MenuItem) => {
565
565
  try {
566
566
  // 메뉴 아이템 유효성 검증
@@ -583,7 +583,7 @@ const handleFavoriteToggle = useCallback(async (menuItem: MenuItem) => {
583
583
  } catch (error) {
584
584
  console.error('즐겨찾기 토글 실패:', error);
585
585
  }
586
- }, [isFavorite, removeFavorite, addFavorite]); // 의존성 함수들이 변경될 때만 재생성`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 이벤트 핸들러 최적화 예제"}),o.jsx(tt,{importText:`// 자식 컴포넌트에 전달되는 이벤트 핸들러 최적화
586
+ }, [isFavorite, removeFavorite, addFavorite]); // 의존성 함수들이 변경될 때만 재생성`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 이벤트 핸들러 최적화 예제"}),o.jsx(rt,{importText:`// 자식 컴포넌트에 전달되는 이벤트 핸들러 최적화
587
587
  const OptimizedParent = () => {
588
588
  const [items, setItems] = useState([]);
589
589
  const [filter, setFilter] = useState('');
@@ -615,7 +615,7 @@ const OptimizedParent = () => {
615
615
  />
616
616
  </div>
617
617
  );
618
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. API 호출 함수 최적화"}),o.jsx(tt,{importText:`// API 호출 함수를 메모이제이션하여 useEffect 의존성 안정화
618
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. API 호출 함수 최적화"}),o.jsx(rt,{importText:`// API 호출 함수를 메모이제이션하여 useEffect 의존성 안정화
619
619
  const DataComponent = () => {
620
620
  const [data, setData] = useState([]);
621
621
  const [loading, setLoading] = useState(false);
@@ -650,7 +650,7 @@ const DataComponent = () => {
650
650
  <Pagination onPageChange={handlePageChange} />
651
651
  </div>
652
652
  );
653
- };`})]})]}),o.jsx(_0,{})]})})}),o.jsx("div",{id:"useEffect",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useEffect",subtitle:"부수 효과 처리"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useEffect는 컴포넌트의 생명주기에 맞춰 부수 효과(API 호출, 타이머 등)를 처리하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"컴포넌트가 마운트/언마운트될 때 실행할 코드"}),o.jsx("li",{children:"API 호출, 타이머 설정, 이벤트 리스너 등록"}),o.jsx("li",{children:"특정 값이 변경될 때 실행할 코드"}),o.jsx("li",{children:"정리(cleanup) 작업이 필요한 경우"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { useEffect, useState } from 'react';
653
+ };`})]})]}),o.jsx(_0,{})]})})}),o.jsx("div",{id:"useEffect",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useEffect",subtitle:"부수 효과 처리"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useEffect는 컴포넌트의 생명주기에 맞춰 부수 효과(API 호출, 타이머 등)를 처리하는 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"컴포넌트가 마운트/언마운트될 때 실행할 코드"}),o.jsx("li",{children:"API 호출, 타이머 설정, 이벤트 리스너 등록"}),o.jsx("li",{children:"특정 값이 변경될 때 실행할 코드"}),o.jsx("li",{children:"정리(cleanup) 작업이 필요한 경우"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { useEffect, useState } from 'react';
654
654
 
655
655
  const MyComponent = () => {
656
656
  const [count, setCount] = useState(0);
@@ -675,7 +675,7 @@ const MyComponent = () => {
675
675
  }, [count]); // count가 의존성
676
676
 
677
677
  return <div>카운트: {count}</div>;
678
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔄 의존성 배열 패턴"}),o.jsxs("div",{style:{background:"#f9f9f9",padding:"16px",borderRadius:"8px"},children:[o.jsxs("div",{style:{marginBottom:"12px"},children:[o.jsx("code",{children:"useEffect(fn)"})," - 매 렌더링마다 실행 ❌"]}),o.jsxs("div",{style:{marginBottom:"12px"},children:[o.jsx("code",{children:"useEffect(fn, [])"})," - 마운트/언마운트 시에만 실행 ✅"]}),o.jsxs("div",{children:[o.jsx("code",{children:"useEffect(fn, [a, b])"})," - a 또는 b가 변경될 때 실행 ✅"]})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🧹 정리(Cleanup) 함수"}),o.jsx(tt,{importText:`useEffect(() => {
678
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔄 의존성 배열 패턴"}),o.jsxs("div",{style:{background:"#f9f9f9",padding:"16px",borderRadius:"8px"},children:[o.jsxs("div",{style:{marginBottom:"12px"},children:[o.jsx("code",{children:"useEffect(fn)"})," - 매 렌더링마다 실행 ❌"]}),o.jsxs("div",{style:{marginBottom:"12px"},children:[o.jsx("code",{children:"useEffect(fn, [])"})," - 마운트/언마운트 시에만 실행 ✅"]}),o.jsxs("div",{children:[o.jsx("code",{children:"useEffect(fn, [a, b])"})," - a 또는 b가 변경될 때 실행 ✅"]})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🧹 정리(Cleanup) 함수"}),o.jsx(rt,{importText:`useEffect(() => {
679
679
  // 이벤트 리스너 등록
680
680
  const handleResize = () => {
681
681
  console.log('윈도우 크기 변경됨');
@@ -687,7 +687,7 @@ const MyComponent = () => {
687
687
  return () => {
688
688
  window.removeEventListener('resize', handleResize);
689
689
  };
690
- }, []);`})]}),o.jsx(B0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useEffect 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useEffect 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 메뉴 데이터 로딩 (Main.tsx)"}),o.jsx(tt,{importText:`// 사용자 인증 확인 및 메뉴 데이터 가져오기
690
+ }, []);`})]}),o.jsx(B0,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 useEffect 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용되고 있는 useEffect 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 메뉴 데이터 로딩 (Main.tsx)"}),o.jsx(rt,{importText:`// 사용자 인증 확인 및 메뉴 데이터 가져오기
691
691
  useEffect(() => {
692
692
  const loadData = async () => {
693
693
  if (!user?.userId) {
@@ -720,7 +720,7 @@ useEffect(() => {
720
720
  fetchMenu,
721
721
  fetchCommonCodes,
722
722
  codeData,
723
- ]); // 의존성 배열에 필요한 모든 값 포함`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 탭 변경에 따른 데이터 로딩 (CMSystCodeM01.tsx)"}),o.jsx(tt,{importText:`// 선택된 시스템 변경 시 앱 데이터 로드
723
+ ]); // 의존성 배열에 필요한 모든 값 포함`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 탭 변경에 따른 데이터 로딩 (CMSystCodeM01.tsx)"}),o.jsx(rt,{importText:`// 선택된 시스템 변경 시 앱 데이터 로드
724
724
  useEffect(() => {
725
725
  if (selectedSystem) {
726
726
  callService('SCMAPP00101', {
@@ -746,7 +746,7 @@ useEffect(() => {
746
746
  : detailGridRef.current?.addAllData(response.data);
747
747
  });
748
748
  }
749
- }, [activeTab, selectedSystem]); // activeTab과 selectedSystem 변경 시 실행`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 팝업 데이터 초기화 (CMAuthMstrP01.tsx)"}),o.jsx(tt,{importText:`// 팝업 열릴 때 데이터 로드 및 초기화
749
+ }, [activeTab, selectedSystem]); // activeTab과 selectedSystem 변경 시 실행`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 팝업 데이터 초기화 (CMAuthMstrP01.tsx)"}),o.jsx(rt,{importText:`// 팝업 열릴 때 데이터 로드 및 초기화
750
750
  useEffect(() => {
751
751
  // 팝업 데이터에서 기존 선택된 메뉴 가져오기
752
752
  const currentPopup: any = popups.find(p => p.popupId === activePopupId);
@@ -774,7 +774,7 @@ const loadMenuData = async () => {
774
774
  } catch (error) {
775
775
  console.error('메뉴 데이터 로드 실패:', error);
776
776
  }
777
- };`})]})]}),o.jsx(B0,{})]})})}),o.jsx("div",{id:"forwardRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"forwardRef",subtitle:"컴포넌트 간 ref 전달"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"forwardRef는 부모 컴포넌트에서 자식 컴포넌트의 DOM 요소에 직접 접근할 수 있게 해주는 기능입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"부모 컴포넌트에서 자식 컴포넌트의 DOM 요소에 직접 접근할 때"}),o.jsx("li",{children:"재사용 가능한 컴포넌트 라이브러리를 만들 때"}),o.jsx("li",{children:"HOC(Higher-Order Component)나 래퍼 컴포넌트에서 ref를 전달할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { forwardRef, useRef } from 'react';
777
+ };`})]})]}),o.jsx(B0,{})]})})}),o.jsx("div",{id:"forwardRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"forwardRef",subtitle:"컴포넌트 간 ref 전달"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"forwardRef는 부모 컴포넌트에서 자식 컴포넌트의 DOM 요소에 직접 접근할 수 있게 해주는 기능입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"부모 컴포넌트에서 자식 컴포넌트의 DOM 요소에 직접 접근할 때"}),o.jsx("li",{children:"재사용 가능한 컴포넌트 라이브러리를 만들 때"}),o.jsx("li",{children:"HOC(Higher-Order Component)나 래퍼 컴포넌트에서 ref를 전달할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { forwardRef, useRef } from 'react';
778
778
 
779
779
  // forwardRef를 사용한 컴포넌트 정의
780
780
  const MyInput = forwardRef<HTMLInputElement, { placeholder?: string }>(
@@ -803,7 +803,7 @@ const Parent = () => {
803
803
  <button onClick={focusInput}>포커스</button>
804
804
  </div>
805
805
  );
806
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"forwardRef는 함수형 컴포넌트에서만 사용 가능합니다"}),o.jsx("li",{children:"TypeScript 사용 시 제네릭으로 ref와 props 타입을 명시해야 합니다"}),o.jsx("li",{children:"남용하지 마세요. 대부분의 경우 props로 충분합니다"})]})]}),o.jsx(AN,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 forwardRef와 useImperativeHandle 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용할 수 있는 고급 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 재사용 가능한 그리드 컴포넌트 (BwgGrid 스타일)"}),o.jsx(tt,{importText:`// 그리드 컴포넌트에 forwardRef와 useImperativeHandle 적용
806
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"forwardRef는 함수형 컴포넌트에서만 사용 가능합니다"}),o.jsx("li",{children:"TypeScript 사용 시 제네릭으로 ref와 props 타입을 명시해야 합니다"}),o.jsx("li",{children:"남용하지 마세요. 대부분의 경우 props로 충분합니다"})]})]}),o.jsx(AN,{}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🏢 실제 프로젝트 사용 예제"}),o.jsx(p.Alert,{message:"실제 프로젝트에서 forwardRef와 useImperativeHandle 사용 사례",description:"다음은 KRX UI 프로젝트에서 실제로 사용할 수 있는 고급 패턴들입니다.",type:"success",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"1. 재사용 가능한 그리드 컴포넌트 (BwgGrid 스타일)"}),o.jsx(rt,{importText:`// 그리드 컴포넌트에 forwardRef와 useImperativeHandle 적용
807
807
  interface GridRef {
808
808
  addAllData: (data: any[]) => void;
809
809
  getCurrentIndex: () => number;
@@ -842,7 +842,7 @@ const CustomGrid = forwardRef<GridRef, { columns: any[]; options?: any }>(
842
842
  </div>
843
843
  );
844
844
  }
845
- );`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 복합 입력 컴포넌트 (검색 필드)"}),o.jsx(tt,{importText:`// 검색 기능이 포함된 복합 입력 컴포넌트
845
+ );`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 복합 입력 컴포넌트 (검색 필드)"}),o.jsx(rt,{importText:`// 검색 기능이 포함된 복합 입력 컴포넌트
846
846
  interface SearchInputRef {
847
847
  focus: () => void;
848
848
  clear: () => void;
@@ -902,7 +902,7 @@ const SearchInput = forwardRef<
902
902
  </button>
903
903
  </div>
904
904
  );
905
- });`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 모달 컴포넌트 제어 (팝업 스타일)"}),o.jsx(tt,{importText:`// 팝업/모달 컴포넌트의 외부 제어 인터페이스
905
+ });`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 모달 컴포넌트 제어 (팝업 스타일)"}),o.jsx(rt,{importText:`// 팝업/모달 컴포넌트의 외부 제어 인터페이스
906
906
  interface ModalRef {
907
907
  open: () => void;
908
908
  close: () => void;
@@ -969,7 +969,7 @@ const ParentComponent = () => {
969
969
  <CustomModal ref={modalRef} />
970
970
  </div>
971
971
  );
972
- };`})]})]})]})})}),o.jsx("div",{id:"useImperativeHandle",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useImperativeHandle",subtitle:"부모에게 노출할 인스턴스 값 커스터마이징"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useImperativeHandle은 부모 컴포넌트에게 노출할 메서드를 직접 정의할 수 있는 고급 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"부모 컴포넌트에 특정 메서드만 노출하고 싶을 때"}),o.jsx("li",{children:"복잡한 컴포넌트의 내부 로직을 캡슐화하면서 필요한 기능만 제공할 때"}),o.jsx("li",{children:"라이브러리 컴포넌트에서 공개 API를 정의할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(tt,{importText:`import React, { forwardRef, useImperativeHandle, useRef } from 'react';
972
+ };`})]})]})]})})}),o.jsx("div",{id:"useImperativeHandle",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(Xn,{title:"useImperativeHandle",subtitle:"부모에게 노출할 인스턴스 값 커스터마이징"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[o.jsx(p.Alert,{message:"useImperativeHandle은 부모 컴포넌트에게 노출할 메서드를 직접 정의할 수 있는 고급 Hook입니다.",type:"info",showIcon:!0,style:{marginBottom:"16px"}}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🎯 언제 사용하나요?"}),o.jsxs("ul",{style:{paddingLeft:"20px",lineHeight:"1.6"},children:[o.jsx("li",{children:"부모 컴포넌트에 특정 메서드만 노출하고 싶을 때"}),o.jsx("li",{children:"복잡한 컴포넌트의 내부 로직을 캡슐화하면서 필요한 기능만 제공할 때"}),o.jsx("li",{children:"라이브러리 컴포넌트에서 공개 API를 정의할 때"})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"📝 기본 문법"}),o.jsx(rt,{importText:`import React, { forwardRef, useImperativeHandle, useRef } from 'react';
973
973
 
974
974
  // 자식 컴포넌트
975
975
  const CustomInput = forwardRef<
@@ -1025,7 +1025,7 @@ const Parent = () => {
1025
1025
  <button onClick={handleGetValue}>값 가져오기</button>
1026
1026
  </div>
1027
1027
  );
1028
- };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 forwardRef vs useImperativeHandle"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"forwardRef"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"DOM 요소를 그대로 전달"}),o.jsx("li",{children:"단순한 ref 전달"}),o.jsx("li",{children:"DOM의 모든 속성/메서드 접근 가능"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useImperativeHandle"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"커스텀 메서드만 노출"}),o.jsx("li",{children:"내부 구현 숨김"}),o.jsx("li",{children:"필요한 기능만 선택적 제공"})]})]})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsx(p.Alert,{message:"꼭 필요한 경우에만 사용하세요!",description:"useImperativeHandle은 React의 선언적 패러다임을 벗어나는 명령형 API입니다. 대부분의 경우 props와 state로 충분하므로, 정말 필요한 경우에만 사용하세요.",type:"warning",showIcon:!0})]}),o.jsx(IN,{})]})})})]})]})})},_N=e=>{v.useEffect(()=>{g({sysCd:__SYS_CD__,fileGrpKey:null}),j.search()},[]);const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState(""),[s,l]=v.useState(""),[c,d]=v.useState(""),[u,f]=v.useState(""),{getFormData:h,setFormData:g}=ct.useSearchBox(),m=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"법인코드"},width:80,styleName:"center"},{fieldName:"sysCd",header:{text:"시스템코드"},width:100,styleName:"center"},{fieldName:"fileGrpKey",header:{text:"파일그룹키"},width:120,styleName:"center"},{fieldName:"fileKey",header:{text:"파일키"},width:200,styleName:"center"},{fieldName:"lgclFileNm",header:{text:"파일 논리명"},width:250,styleName:"left"},{fieldName:"fileSize",header:{text:"파일 크기"},width:100,styleName:"right",displayCallback:(P,E,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,M=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,A)).toFixed(2))+" "+M[A]}},{fieldName:"fileExtn",header:{text:"파일 확장자"},width:100,styleName:"center"},{fieldName:"fileType",header:{text:"파일 타입"},width:120,styleName:"center"}],[]),x=v.useMemo(()=>[{fieldName:"fileGrpKey",header:{text:"파일 그룹키"},width:50,styleName:"center"},{fieldName:"fileKey",header:{text:"파일 키"},width:50,styleName:"center"},{fieldName:"fileSeq",header:{text:"파일 정렬순서"},width:50,styleName:"center"},{fieldName:"lgclFileNm",header:{text:"파일 논리명"},width:200,styleName:"left"},{fieldName:"physFileNm",header:{text:"파일 물리명"},width:200,styleName:"left"},{fieldName:"fileExtn",header:{text:"파일 확장자"},width:100},{fieldName:"mltpYn",header:{text:"대용량파일 여부"},width:100},{fieldName:"fileSize",header:{text:"파일 크기"},width:100,styleName:"right",displayCallback:(P,E,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,M=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,A)).toFixed(2))+" "+M[A]}},{fieldName:"filePath",header:{text:"파일 경로"},width:100,styleName:"right"}],[]),y={onCurrentRowChanged(P,E,S){if(S<0)return;let O=P.getDataSource().getJsonRow(S);a(O.fileGrpKey),O.mltpYn=="Y"?oe.callEndpoint({trxCd:"SCMFILE00106",appCd:e.appCd},{crprCd:oe.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:O.fileGrpKey,fileKey:O.fileKey}).then(k=>{n.current?.addAllData(k.sub)}):n.current?.dp?.clearRows()}},w={container:{check:!0,checkAll:!0,indicator:!0,footer:!0}},b={SCMFILE00101:()=>{oe.callEndpoint({trxCd:"SCMFILE00101",appCd:e.appCd},{crprCd:oe.getUserInfo()?.crprCd,...h()}).then(P=>{r.current?.addAllData(P.sub)}).catch(P=>{console.error("오류:",P)})}},j={search:()=>{b.SCMFILE00101()},download:()=>{console.log("download");let P=r.current?.dp?.getJsonRow(r.current?.getCurrentRow());oe.downloadByFileKey(P.fileKey)}};return o.jsx(kt,{searchBox:{reqRows:[o.jsxs(wt,{children:[o.jsx($e,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"시스템 코드",name:"sysCd"}})}),o.jsx($e,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키",name:"fileGrpKey"}})})]})]},buttons:{grant:[{id:"search",label:"조회",onClick:()=>{j.search()}},{id:"download",label:"다운로드",onClick:()=>{j.download()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"파일 목록",children:o.jsx("div",{style:{float:"right"},children:o.jsx(p.Space,{children:o.jsx(L.BwgButton,{onClick:()=>j.download(),children:"다운로드"})})})}),o.jsx(Fe,{ref:r,gridColumns:x,gridOptions:w,gridEvents:y})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(p.Tabs,{type:"card",defaultActiveKey:"1",style:{height:"100%"},items:[{label:"파일상세",key:"1",children:o.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[o.jsx(Le,{title:"dtls 그리드"}),o.jsx(Fe,{ref:n,gridColumns:m})]})},{label:"파일 샘플",key:"2",children:o.jsx("div",{style:{height:"100%",overflowY:"auto",padding:"10px"},children:o.jsx(dn,{title:"샘플 업로드",children:o.jsxs(p.Form,{layout:"vertical",ref:t,children:[o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"그리드 onCurrentRowChanged연동"}),o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:i,onChange:P=>a(P.target.value)}}),o.jsx(L.BwgUploader,{fileGrpKey:i}),o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"파일업로드시 fileGrpKey 채번 및 연동"}),o.jsx(L.BwgInput,{itemProps:{label:"채번 그룹키 (fileGrpKey2)"},inputProps:{value:s,disabled:!0}}),o.jsx(L.BwgUploader,{fileGrpKey:s,multiple:!0,onUploadComplete:P=>{console.log(P),s||l(P.fileGrpKey)}}),o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"대용량파일 업로드(zip압축 후 업로드)"}),o.jsx(L.BwgLargeUploader,{fileGrpKey:s})]})})})},{label:"파일 다운로드",key:"3",children:o.jsxs("div",{children:[o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:c,onChange:P=>d(P.target.value)}}),o.jsx(L.BwgInput,{itemProps:{label:"앱코드 (appCd)"},inputProps:{value:u,onChange:P=>f(P.target.value)}}),o.jsx(L.BwgDownload,{fileGrpKey:c,appCd:u})]})}]})})]})})},aS=({width:e="40%",searchContext:t,onOk:r,onClose:n,...i})=>{const a=v.useRef(null),s=v.useRef(null),[l,c]=v.useState([]),d=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",width:60,header:{text:"애플리케이션"},styleName:"left"},{fieldName:"prgrId",width:120,header:{text:"프로그램ID"},styleName:"left"},{fieldName:"prgrNm",width:200,header:{text:"프로그램명"},styleName:"left"},{fieldName:"enblYn",width:80,header:{text:"사용여부"},styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]);v.useEffect(()=>{t?.sysCd&&(a.current?.setFormData({sysCd:t.sysCd}),m.SCMPRGR00101())},[t?.sysCd]);const u=()=>{m.SCMPRGR00101()},f=y=>{y.key==="Enter"&&u()},h=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},g=()=>{i.onCancel?.(),n?.()},m=v.useMemo(()=>({SCMPRGR00101:()=>{const y={...a.current?.getFormData()};oe.callService("SCMPRGR00101",y).then(w=>{console.log("response.programs:",w.data),s.current?.addAllData(w.data||[])}).catch(w=>{console.error("오류:",w)})}}),[]),x={onCurrentRowChanged:(y,w,b)=>{if(b>=0){const j=s.current?.vw?.getItemIndex(b),P=s.current?.vw?.getValues(j||0);c([P])}},onCellDblClicked:(y,w)=>{const b=w.itemIndex;if(b>=0){const j=s.current?.vw?.getValues(b);console.log(j),c([j]),r?.(j)}}};return o.jsx(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0,titleColor:"#08979c",headerBg:"#e6fffb"}}},children:o.jsx(p.Modal,{title:"프로그램 선택",width:e,maskClosable:!1,styles:{body:{paddingTop:"10px"}},okText:"적용",...i,onOk:h,onCancel:g,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(ko,{ref:a,reqRows:o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",style:{marginBottom:0},labelCol:{flex:"80px"}},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],style:{fontSize:"12px"},onChange:m.SCMPRGR00101}})}),o.jsx(p.Col,{span:16,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어",style:{marginBottom:0},labelCol:{flex:"90px"}},inputProps:{placeholder:"프로그램ID 또는 프로그램명을 입력하세요",suffix:o.jsx(X.SearchOutlined,{style:{color:"#1890ff",cursor:"pointer"},onClick:u}),onKeyPress:f}})})]})}),o.jsx(Fe,{ref:s,gridColumns:d,gridOptions:{container:{radio:!0,footer:!1}},gridEvents:x,gridDivStyle:{marginTop:8,height:400}}),l.length>0&&o.jsxs("div",{style:{marginTop:16,padding:12,backgroundColor:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6},children:[o.jsx("strong",{children:"선택된 프로그램:"})," ",l[0]?.prgrNm," (",l[0]?.prgrId,")"]})]})})})},sS=({width:e="40%",searchContext:t,onOk:r,onClose:n,...i})=>{const a=v.useRef(null),s=v.useRef(null),[l,c]=v.useState([]),d=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",width:120,header:{text:"애플리케이션"},styleName:"left"},{fieldName:"menuGbCd",width:100,header:{text:"메뉴구분"},styleName:"center",lookupDisplay:!0,labels:["메인메뉴","서브메뉴","프로그램"],values:["CMPRGRM","CMPRGRS","CMPRGRP"],renderer:{type:"text",showTooltip:!1}},{fieldName:"menuId",width:120,header:{text:"메뉴ID"},styleName:"left"},{fieldName:"menuNm",width:200,header:{text:"메뉴명"},styleName:"left"},{fieldName:"menuPrntId",width:120,header:{text:"상위메뉴ID"},styleName:"left"}],[]);v.useEffect(()=>{setTimeout(()=>{s.current?.vw&&s.current.vw.setRowStyleCallback(function(b,j,P){const E=b.getValue(j.index,"menuGbCd");if(E==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(E==="CMPRGRS")return{style:{background:"#f0f8ff"}}})},200)},[]),v.useEffect(()=>{t?.sysCd&&a.current?.setFormData({sysCd:t.sysCd,appCd:"",keyword:t.keyword||""})},[t?.sysCd,t?.keyword]);const u=()=>{x.SCMMENU00104()},f=w=>{w.key==="Enter"&&u()},h=()=>{a.current?.setFormData({sysCd:"",appCd:"",keyword:""})},g=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},m=()=>{i.onCancel?.(),n?.()},x=v.useMemo(()=>({SCMMENU00104:()=>{const w={crprCd:oe.getCrprCd(),...a.current?.getFormData()};oe.callService("SCMMENU00104",w).then(b=>{console.log("response.menus:",b.sub),s.current?.addAllData(b.sub,{treeOption:{isExpand:!0,dataField:"menuId",parentField:"menuPrntId"}})}).catch(b=>{console.error("오류:",b)})}}),[]),y=v.useMemo(()=>({onCurrentRowChanged:(w,b,j)=>{if(j>=0){const P=s.current?.vw?.getItemIndex(j),E=s?.current?.vw?.getValues(P||0);c([E])}},onCellDblClicked:(w,b)=>{const j=b.itemIndex;if(j>=0){const P=s.current?.vw?.getValues(j);console.log(P),c([P]),r?.(P)}}}),[r]);return o.jsx(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0,titleColor:"#08979c",headerBg:"#e6fffb"}}},children:o.jsx(p.Modal,{title:"상위 메뉴 선택",width:e,maskClosable:!1,styles:{body:{paddingTop:"10px"}},okText:"적용",...i,onOk:g,onCancel:m,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(ko,{border:!0,header:{title:"메뉴 선택",buttons:[o.jsx(L.BwgButton,{onClick:()=>x.SCMMENU00104(),style:{marginRight:8},children:"검색"},"search"),o.jsx(L.BwgButton,{onClick:h,children:"초기화"},"reset")]},ref:a,reqRows:o.jsxs(p.Row,{gutter:[20,5],children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",style:{marginBottom:0}},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],style:{fontSize:"12px"},onChange:x.SCMMENU00104}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션",style:{marginBottom:0}},selectProps:{options:[{label:"선택하세요",value:""},{label:"ERP",value:"ERP"},{label:"HR",value:"HR"},{label:"SUPPORT",value:"SUPPORT"}],style:{fontSize:"12px"}}})}),o.jsx(p.Col,{span:7,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어",style:{marginBottom:0}},inputProps:{placeholder:"메뉴ID 또는 메뉴명을 입력하세요",style:{fontSize:"12px"},onKeyPress:f}})}),o.jsx(p.Col,{span:5,style:{textAlign:"right"}})]})}),o.jsx(Fe,{ref:s,type:"tree",gridColumns:d,gridOptions:{container:{radio:!0,footer:!1}},gridEvents:y,gridDivStyle:{marginTop:8,height:400}}),l.length>0&&o.jsxs("div",{style:{marginTop:16,padding:12,backgroundColor:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6},children:[o.jsx("strong",{children:"선택된 메뉴:"})," ",l[0]?.menuNm," (",l[0].menuId,")"]})]})})})},ao={KE:[{label:"재무회계",value:"FI"},{label:"예산관리",value:"FM"},{label:"구매계약",value:"MM"},{label:"영업관리",value:"SD"},{label:"파트너관리",value:"PMN"}],KH:[{label:"HR 솔루션",value:"HR"},{label:"연말정산",value:"YT"},{label:"평정",value:"PE"}],KS:[{label:"온통",value:"BCOM"},{label:"e-감사",value:"EAUD"},{label:"청령신고",value:"INR"},{label:"ITAM",value:"ITAM"},{label:"차량/회의실",value:"CMM"},{label:"OA전산물품관리",value:"OAM"},{label:"총무관리",value:"GAM"},{label:"출입관리",value:"ACM"},{label:"비품관리",value:"IVM"},{label:"인장서비스",value:"SGS"},{label:"사료관리",value:"HIS"},{label:"웹펙스서비스",value:"WFAX"},{label:"메시지서비스",value:"SMS"},{label:"경영공시",value:"BID"},{label:"언론미디어",value:"PAM"},{label:"심의자문위원회",value:"DAC"},{label:"지식재산권신청",value:"IPR"},{label:"정보공유게시판",value:"ISB"}]},BN={container:{check:!0,checkAll:!0,indicator:!0,footer:!0}},$0=({readOnly:e=!1,drawerMode:t=""})=>{const r=p.Form.useFormInstance(),[n,i]=v.useState(null),[a,s]=v.useState(null),[l,c]=v.useState([]),[d,u]=v.useState("CMPRGRP"),[f,h]=v.useState(!0),[g,m]=v.useState(!1),[x,y]=v.useState({}),[w,b]=v.useState(!1),[j,P]=v.useState({});v.useEffect(()=>{const M=r.getFieldValue("sysCd"),A=r.getFieldValue("appCd"),_=r.getFieldValue("menuGbCd"),D=r.getFieldValue("deftMenuNo");i(M??null),s(A??null),u(_??"CMPRGRP"),h(D??!0),M&&ao[M]?c(ao[M]):c([])},[r]);const E=M=>{i(M),M&&ao[M]?c(ao[M]):c([]),r.resetFields(["appCd","scrnId","scrnNm","menuPrntId","menuPrntNm"])},S=M=>{h(M),M&&r.setFieldsValue({menuNo:""})},O=M=>{M&&r.setFieldsValue({menuPrntId:M.menuId,menuPrntNm:M.menuNm}),m(!1),y({})},k=M=>{M&&r.setFieldsValue({scrnId:M.prgrId,scrnNm:M.prgrNm}),b(!1),P({})};return o.jsxs(o.Fragment,{children:[o.jsx(p.Row,{gutter:12,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgRadio,{itemProps:{name:"menuGbCd"},inputProps:{options:[{label:"메인메뉴",value:"CMPRGRM"},{label:"서브메뉴",value:"CMPRGRS"},{label:"프로그램",value:"CMPRGRP"}],defaultValue:"CMPRGRP",optionType:"button",size:"middle",style:{pointerEvents:e?"none":void 0},onChange:M=>{u(M.target.value)}}})})}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템"},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:E,disabled:e||t==="EDIT",placeholder:"시스템을 선택하세요"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:l,disabled:e||!n||t==="EDIT",placeholder:"시스템을 먼저 선택하세요"}})})]}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"menuId",label:"메뉴ID"},inputProps:{placeholder:"자동 채번",disabled:!0,readOnly:e,variant:e?"borderless":"outlined"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"menuNm",label:"메뉴명"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),d==="CMPRGRP"&&o.jsx(p.Row,{gutter:24,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{label:"프로그램ID",name:["scrnId","scrnNm"]},readOnly:e,popupConfig:!0,onSearch:()=>{n?(b(!0),P({sysCd:n,keyword:r.getFieldValue("scrnNm")})):oe.showWarning("시스템을 선택하세요")}})})}),d!=="CMPRGRM"&&o.jsx(p.Row,{gutter:24,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{label:"상위 메뉴",name:["menuPrntId","menuPrntNm"]},readOnly:e,onSearch:()=>{console.log("formSysCd:",n),n?(m(!0),y({sysCd:n,keyword:r.getFieldValue("menuPrntNm")})):oe.showWarning("시스템을 선택하세요")}})})}),o.jsxs(p.Row,{gutter:12,children:[d=="CMPRGRP"&&o.jsxs(o.Fragment,{children:[o.jsx(p.Col,{span:t=="NEW"?8:12,children:o.jsx(L.BwgFormItem,{name:"menuNo",label:"메뉴번호",children:o.jsx(p.Input.OTP,{length:4,formatter:M=>M.replace(/\D/g,""),disabled:t=="NEW"?f:e,style:{width:"180px"}})})}),t=="NEW"&&o.jsx(p.Col,{span:3,offset:1,children:o.jsx(L.BwgCheck,{itemProps:{name:"isAutoMenuNo",label:"자동채번"},inputProps:{defaultChecked:!0,onChange:M=>S(M.target.checked)}})})]}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgRadio,{itemProps:{name:"useYn",label:"사용여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0,width:"100%"}}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgNumber,{itemProps:{name:"sortOrdr",label:"정렬순서"},inputProps:{defaultValue:0,min:1,max:99,precision:0,controls:!0,readOnly:e,variant:e?"borderless":"outlined"}})}),d=="CMPRGRM"&&o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"iconCd",label:"아이콘명"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),o.jsx(L.BwgTextArea,{itemProps:{name:"menuDscr",label:"메뉴 설명"},inputProps:{disabled:e,rows:3}}),o.jsx(aS,{open:w,searchContext:j,onOk:k,onClose:()=>{b(!1),P({})}}),o.jsx(sS,{open:g,searchContext:x,onOk:O,onClose:()=>{m(!1),y({})}})]})},$N=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=it.useCodeStore(),{getFormData:a,setFormData:s}=ct.useSearchBox(),[l,c]=v.useState([]),[d,u]=v.useState(!1),[f,h]=v.useState(""),[g,m]=v.useState(-1),x=v.useCallback(k=>{u(!0),h(k)},[]),y=v.useCallback(()=>{u(!1),h("")},[]),w=v.useMemo(()=>i.getGridLookup("CMPRGR"),[i]),b=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",visible:!1},{fieldName:"menuPrntId",visible:!1},{fieldName:"menuPrntNm",visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,styleName:"left"},{fieldName:"menuGbCd",header:{text:"메뉴구분"},width:100,styleName:"left",...w},{name:"menuNm",fieldName:"menuNm",header:{text:"메뉴명"},width:200,styleName:"left"},{fieldName:"scrnId",header:{text:"화면ID"},width:100,styleName:"left"},{fieldName:"scrnNm",header:{text:"화면이름"},width:100,styleName:"left"},{fieldName:"menuNo",header:{text:"메뉴번호"},width:100,styleName:"left"},{fieldName:"useYn",visible:!1},{fieldName:"sortOrdr",visible:!1},{fieldName:"iconCd",visible:!1},{fieldName:"menuDscr",visible:!1}],[w]);v.useEffect(()=>{if(f==="NEW")r.current?.setFieldsValue({useYn:"Y",deftMenuNo:!0,menuGbCd:"CMPRGRP"});else if(f==="EDIT"){const k=n.current?.getCurrentIndex();if(k!==void 0&&k>=0){const M=n.current?.vw?.getValues(k);r.current?.setFieldsValue(M)}}else r.current?.resetFields()},[f]),v.useEffect(()=>{setTimeout(()=>{n.current?.vw&&n.current.vw.setRowStyleCallback(function(M,A,_){const D=M.getValue(A.index,"menuGbCd");if(D==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(D==="CMPRGRS")return{style:{background:"#f0f8ff"}};if(D==="CMPRGRP")return{style:{background:"#fff"}}})},200)},[]);const j=k=>{k&&ao[k]?c([{label:"전체",value:""},...ao[k]]):c([{label:"전체",value:""}]),s({appCd:""}),E.SCMMENU00101()},P=()=>{r.current?.validateFields().then(k=>{console.log("Form values:",k),(f==="NEW"||f==="EDIT")&&E.SCMMENU00102()}).catch(k=>{console.log("Validation failed:",k)})},E={SCMMENU00101:()=>{const k={crprCd:oe.getCrprCd(),...a()};console.log("Search data:",k),oe.callService("SCMMENU00101",k,{}).then(M=>{n.current?.addAllData(M.menus,{treeOption:{isExpand:!0,dataField:"menuId",parentField:"menuPrntId"}})}).catch(M=>{console.error("오류:",M)})},SCMMENU00102:()=>{const k={iudFlag:f==="EDIT"?"U":"I",crprCd:oe.getCrprCd(),...r?.current?.getFieldsValue()};delete k.scrnNm,delete k.menuPrntNm,oe.callService("SCMMENU00102",k,{}).then(M=>{console.log("Save response:",M),M.result>0&&(y(),E.SCMMENU00101())}).catch(M=>{console.error("저장 오류:",M)})},SCMMENU00103:()=>{const k={},M=n.current?.vw?.getCheckedRows(!1),A=[];M?.forEach(_=>{const D=n.current?.dp?.getJsonRow(_);A.push({crprCd:D.crprCd,sysCd:D.sysCd,appCd:D.appCd,menuId:D.menuId,menuGbCd:D.menuGbCd})}),k.sub=A,oe.callService("SCMMENU00103",k,{}).then(_=>{console.log(_),_?.result>0&&E.SCMMENU00101()})}},S={search:()=>{E.SCMMENU00101()},new:()=>{x("NEW")},delete:()=>{const k=n.current?.vw?.getCheckedRows(!1);if(k?.length==0){oe.showWarning("삭제할 행을 체크하세요");return}else{let M=0,A=0,_=0;k?.forEach(D=>{const B=n.current?.dp?.getValue(D,"menuGbCd");B==="CMPRGRM"?M++:B==="CMPRGRS"?A++:B==="CMPRGRP"&&_++}),p.Modal.confirm({title:"삭제 안내",content:o.jsxs(o.Fragment,{children:[M>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"blue",children:["메인메뉴: ",M,"개"]})}),A>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"green",children:["서브메뉴: ",A,"개"]})}),_>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"orange",children:["프로그램: ",_,"개"]})}),"를 삭제하시겠습니까?"]}),onOk:()=>{E.SCMMENU00103()},onCancel:()=>{}})}}},O=v.useMemo(()=>({onCurrentRowChanged:(k,M,A)=>{m(A)},onItemChecked:(k,M,A)=>{if(!k._isUpdatingChildren)try{k._isUpdatingChildren=!0;const _=(D,B)=>{const H=k.getChildren(D);H&&H.length>0&&H.forEach(T=>{k.isCheckedItem(T)!==B&&(k.checkItem(T,B),_(T,B))})};_(M,A)}finally{setTimeout(()=>{k._isUpdatingChildren=!1},0)}}}),[]);return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:S.search},{id:"new",label:"신규",onClick:S.new},{id:"delete",label:"삭제",onClick:S.delete}]},searchBox:{reqRows:o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",initialValue:"",labelCol:{flex:"180px"}},selectProps:{options:[{label:"전체",value:""},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:j}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션",initialValue:""},selectProps:{options:l,placeholder:"시스템코드를 먼저 선택해주세요",onChange:S.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어"},inputProps:{placeholder:"메뉴ID/메뉴명을 입력하세요.",onPressEnter:S.search}})})]})},children:[o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w65 mr20",children:[o.jsx(Le,{title:"메뉴 트리"}),o.jsx(Fe,{ref:n,type:"tree",gridColumns:b,gridOptions:BN,gridEvents:O,bindRef:t})]}),o.jsx(De,{className:"w35",border:!0,overflow:{x:"auto",y:"auto"},children:o.jsx(dn,{title:"메뉴 상세",titleChildren:o.jsx(o.Fragment,{children:g>=0&&o.jsx(L.BwgButton,{color:"gold",onClick:()=>x("EDIT"),children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:t,children:o.jsx($0,{readOnly:!0})})})})]}),o.jsx(un,{title:`메뉴 ${f==="EDIT"?"변경":"등록"}`,open:d,placement:"right",onClose:y,width:"30%",size:"large",afterOpenChange:k=>{console.log("Drawer afterOpenChange:",k)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:y,className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:P,className:"bwg-btn",children:"저장"})]}),children:o.jsx(p.Form,{layout:"vertical",ref:r,className:"sub-form pd10",children:o.jsx($0,{readOnly:!1,drawerMode:f})})})]})},LN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=it.useCodeStore(),{showPopup:a}=ct.usePopup(),{getFormData:s}=ct.useSearchBox(),[l,c]=v.useState(!1),[d,u]=v.useState("new"),[f,h]=v.useState(null),[g,m]=v.useState([]),[x,y]=v.useState(""),[w,b]=v.useState(!1),[j,P]=v.useState(["조회","닫기"]),[E,S]=v.useState("");v.useEffect(()=>{console.log("SYST 공통코드 목록 :: ",i.getCodeList("SYST"))},[i]),v.useEffect(()=>()=>{r.current&&(r.current.resetFields(),console.log("CMPopuMstrM01: BwgInfoArea form 초기화 완료")),n.current&&(n.current.resetFields(),console.log("CMPopuMstrM01: Drawer form 초기화 완료")),h(null),m([]),y(""),b(!1),P(["조회","닫기"]),S(""),console.log("CMPopuMstrM01: 컴포넌트 언마운트 - 모든 상태 초기화 완료")},[]);const O=v.useMemo(()=>[{name:"crprCd",fieldName:"crprCd",width:80,header:{text:"회사코드"},visible:!1},{name:"systId",fieldName:"systId",width:80,header:{text:"시스템ID"},lookupDisplay:!0,editor:{type:"dropdown"},tag:"req"},{name:"popuCd",fieldName:"popuCd",width:120,header:{text:"팝업코드"},styleName:"left",tag:"req"},{name:"popuNm",fieldName:"popuNm",width:200,header:{text:"팝업명칭"},styleName:"left"},{name:"popuUrl",fieldName:"popuUrl",width:250,header:{text:"팝업호출URL"},styleName:"left"},{name:"popuWdth",fieldName:"popuWdth",width:80,header:{text:"팝업너비"},visible:!1},{name:"wdthUnit",fieldName:"wdthUnit",width:60,header:{text:"너비단위"},visible:!1},{name:"popuHght",fieldName:"popuHght",width:80,header:{text:"팝업높이"},visible:!1},{name:"hghtUnit",fieldName:"hghtUnit",width:60,header:{text:"높이단위"},visible:!1},{name:"enblYn",fieldName:"enblYn",width:60,header:{text:"사용여부"},renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{name:"rmrk",fieldName:"rmrk",width:200,header:{text:"비고"},styleName:"left",visible:!1},{name:"inptDt",fieldName:"inptDt",width:150,header:{text:"입력일시"},visible:!1},{name:"inptId",fieldName:"inptId",width:100,header:{text:"입력자ID"},visible:!1},{name:"chngDt",fieldName:"chngDt",width:150,header:{text:"변경일시"},visible:!1},{name:"chngId",fieldName:"chngId",width:100,header:{text:"변경자ID"},visible:!1},{name:"dtlsInfo",fieldName:"dtlsInfo",width:100,header:{text:"버튼목록"},dataType:"json",visible:!1}],[]),k={display:{},edit:{editable:!1},copy:{singleMode:!0},container:{state:!0,check:!0,checkAll:!0,indicator:!0}},M={SCMPOPU00101:()=>{oe.callService("SCMPOPU00101",{},{}).then(V=>{console.log("SCMPOPU00101:",V.data)}).catch(V=>{console.error("오류:",V)})},SCMPOPU00102:V=>{oe.callService("SCMPOPU00102",V,{}).then(F=>{console.log("SCMPOPU00102:",F.data),t.current?.addAllData(F.data)}).catch(F=>{console.error("오류:",F)})},SCMPOPU00103:V=>{console.log("save params:",V),oe.callService("SCMPOPU00103",V,{}).then(F=>{console.log("response:",F),F.result?(oe.showSuccess(d==="new"?"팝업이 등록되었습니다.":"팝업이 수정되었습니다."),c(!1),h(null),m([]),y(""),n.current?.resetFields(),M.SCMPOPU00102()):(oe.showDuplicateError("팝업코드"),n.current?.setFields([{name:"popuCd",errors:["이미 사용중인 팝업코드입니다."]}]))}).catch(F=>{console.error("오류:",F),oe.showError("저장 중 오류가 발생했습니다.")})}},A={formFinish:async()=>{try{const V=await n.current?.validateFields();if(g.length>0&&g.filter(q=>!q.btnId||q.btnId.trim()==="").length>0){S("버튼ID가 입력되지 않은 버튼이 있습니다. 모든 버튼의 버튼ID를 입력해주세요.");return}S(""),M.SCMPOPU00103({edit:d!=="new",info:{crprCd:oe.getUserInfo()?.crprCd||"100",systId:V.systId,popuCd:V.popuCd,popuNm:V.popuNm,popuUrl:V.popuUrl,popuWdth:V.popuWdth,wdthUnit:V.wdthUnit,popuHght:V.popuHght,hghtUnit:V.hghtUnit,enblYn:V.enblYn,rmrk:V.rmrk,dtlsInfo:g}})}catch(V){console.error("폼 유효성 검사 실패:",V)}},addButton:()=>{const V=g.length>0?Math.max(...g.map(q=>q.btnSq||0)):0,F={key:Date.now().toString(),btnSq:V+1,btnId:"",btnNm:"",iconType:"ANTD",iconVal:"",enblYn:"Y"};m(q=>[...q,F]),y(F.key)},openDefaultModal:()=>{b(!0)},applyDefaultButtons:()=>{const V={조회:{btnId:"SEARCH",btnNm:"조회",iconType:"ANTD",iconVal:"SearchOutlined",enblYn:"Y"},선택적용:{btnId:"APPLY",btnNm:"선택적용",iconType:"ANTD",iconVal:"CheckOutlined",enblYn:"Y"},신규:{btnId:"NEW",btnNm:"신규",iconType:"ANTD",iconVal:"PlusOutlined",enblYn:"Y"},저장:{btnId:"SAVE",btnNm:"저장",iconType:"ANTD",iconVal:"SaveOutlined",enblYn:"Y"},삭제:{btnId:"DELETE",btnNm:"삭제",iconType:"ANTD",iconVal:"DeleteOutlined",enblYn:"Y"},닫기:{btnId:"CLOSE",btnNm:"닫기",iconType:"ANTD",iconVal:"CloseOutlined",enblYn:"Y"}},F=g.length>0?Math.max(...g.map(ie=>ie.btnSq||0)):0,q=j.map((ie,ue)=>({key:Date.now().toString()+Math.random(),btnSq:F+ue+1,...V[ie]}));m(ie=>[...ie,...q]),b(!1)},previewPopup:async()=>{let V=f;if(!V){const F=t.current?.getCurrentRow();if(F===void 0||F<0){oe.showError("미리보기할 팝업을 선택해주세요.");return}if(V=t.current?.vw?.getDataSource()?.getJsonRow(F),!V){oe.showError("팝업 데이터를 가져올 수 없습니다.");return}}try{console.log("미리보기 팝업 실행:",V.popuCd),await a(V.popuCd,{popupData:V,isPreview:!0}),console.log("미리보기 팝업 열기 완료")}catch(F){console.error("미리보기 팝업 열기 실패:",F),oe.showError("미리보기 팝업을 열 수 없습니다.")}}},_={onCurrentRowChanged(V,F,q){if(q<0)return;const ie=V.getValues(q);console.log("onCurrentRowChanged rowData:",ie),r.current?.setFieldsValue(ie),h(ie)}},D={search:async()=>{try{const V=s();console.log("SearchBox FormData:",V);const F={...V,userId:oe.getUserInfo()?.userId};console.log("검색 파라미터:",F),M.SCMPOPU00102(F)}catch(V){console.error("SearchBox formData 접근 오류:",V),M.SCMPOPU00102()}},new:()=>{u("new"),h(null),m([]),c(!0),setTimeout(()=>{n.current?.resetFields()},100)},update:()=>{const V=t.current?.getCurrentRow();if(V===void 0||V<0){console.log("선택된 행이 없습니다.");return}const F=t.current?.vw?.getDataSource()?.getJsonRow(V);if(F){if(u("update"),h(F),c(!0),console.log("전체 rowData:",F),console.log("rowData.dtlsInfo 존재 여부:",!!F.dtlsInfo),console.log("rowData.dtlsInfo 타입:",typeof F.dtlsInfo),console.log("rowData.dtlsInfo 값:",F.dtlsInfo),F.dtlsInfo){console.log("rowData.dtlsInfo 원본:",F.dtlsInfo);let q;if(Array.isArray(F.dtlsInfo)?(q=F.dtlsInfo,console.log("dtlsInfo가 배열입니다:",q)):typeof F.dtlsInfo=="object"?(q=[F.dtlsInfo],console.log("dtlsInfo가 객체입니다. 배열로 변환:",q)):(q=[],console.log("dtlsInfo가 다른 타입입니다:",typeof F.dtlsInfo)),q&&q.length>0){console.log("최종 buttonListData:",q);const ie=q.map((ue,ge)=>({...ue,key:ue.key||`btn_${Date.now()}_${ge}`,btnSq:ue.btnSq||ge+1}));console.log("처리된 buttonListWithKeys:",ie),m(ie)}else console.log("buttonListData가 비어있음, 빈 배열로 설정"),m([])}else console.log("dtlsInfo가 없음, 빈 배열로 설정"),m([]);setTimeout(()=>{const q={...F,popuUrl:F.popuUrl?.startsWith("/popup/")?F.popuUrl.substring(8):F.popuUrl};n.current?.setFieldsValue(q)},100)}}},B={previewPopup:A.previewPopup},H=[{title:"순서",key:"order",width:80,align:"center",render:(V,F)=>{const q=g.findIndex(ie=>ie.key===F.key);return o.jsxs(p.Space,{direction:"vertical",size:"small",children:[o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.UpOutlined,{}),disabled:q===0,onClick:()=>$(F.key)}),o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.DownOutlined,{}),disabled:q===g.length-1,onClick:()=>U(F.key)})]})}},{title:"순번",dataIndex:"btnSq",key:"btnSq",width:60,align:"center",render:V=>V||"-"},{title:"버튼ID",dataIndex:"btnId",key:"btnId",width:120,render:(V,F)=>{const q=F.key===x,ie=!V||V.trim()==="",ue=E&&ie;return q?o.jsx(p.Input,{value:V,status:ue?"error":void 0,onChange:ge=>{const Ee=[...g],Pe=Ee.find(Z=>F.key===Z.key);Pe&&(Pe.btnId=ge.target.value,m(Ee),ge.target.value.trim()!==""&&S(""))}}):o.jsx("span",{style:{color:ue?"#cf1322":"inherit",fontWeight:ue?"bold":"normal"},children:V||(ue?"입력 필요":"")})}},{title:"버튼명",dataIndex:"btnNm",key:"btnNm",width:150,render:(V,F)=>F.key===x?o.jsx(p.Input,{value:V,onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.btnNm=ie.target.value,m(ue))}}):V},{title:"아이콘타입",dataIndex:"iconType",align:"center",key:"iconType",width:100,render:(V,F)=>F.key===x?o.jsx(p.Select,{value:V,style:{width:"100%"},onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.iconType=ie,m(ue))},options:[{label:"ANTD",value:"ANTD"},{label:"CSS",value:"CSS"},{label:"SVG",value:"SVG"}]}):o.jsx(p.Tag,{color:V==="ANTD"?"blue":V==="CSS"?"green":"orange",children:V})},{title:"아이콘값",dataIndex:"iconVal",key:"iconVal",width:120,render:(V,F)=>F.key===x?o.jsx(p.Input,{value:V,onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.iconVal=ie.target.value,m(ue))}}):V},{title:"사용여부",dataIndex:"enblYn",align:"center",key:"enblYn",width:80,render:(V,F)=>F.key===x?o.jsx(p.Switch,{checked:V==="Y",onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.enblYn=ie?"Y":"N",m(ue))}}):o.jsx(p.Tag,{color:V==="Y"?"green":"red",children:V==="Y"?"사용":"미사용"})},{title:"작업",key:"action",align:"center",width:120,render:(V,F)=>F.key===x?o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"저장",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.SaveOutlined,{}),onClick:()=>I()})}),o.jsx(p.Tooltip,{title:"취소",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.RedoOutlined,{}),onClick:N})})]}):o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"편집",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.EditOutlined,{}),onClick:()=>T(F)})}),o.jsx(p.Tooltip,{title:"삭제",children:o.jsx(p.Button,{type:"link",size:"small",danger:!0,icon:o.jsx(X.RestOutlined,{}),onClick:()=>R(F.key)})})]})}],T=V=>{y(V.key)},N=()=>{y("")},I=V=>{y("")},R=V=>{m(F=>F.filter(q=>q.key!==V))},$=V=>{m(F=>{const q=F.findIndex(ie=>ie.key===V);if(q>0){const ie=[...F];return[ie[q],ie[q-1]]=[ie[q-1],ie[q]],ie.forEach((ue,ge)=>{ue.btnSq=ge+1}),ie}return F})},U=V=>{m(F=>{const q=F.findIndex(ie=>ie.key===V);if(q<F.length-1){const ie=[...F];return[ie[q],ie[q+1]]=[ie[q+1],ie[q]],ie.forEach((ue,ge)=>{ue.btnSq=ge+1}),ie}return F})};return console.log("CMPopuMstrM01 grantEvent:",D),console.log("CMPopuMstrM01 customEvent:",B),console.log("grantEvent.update 함수 존재 여부:",!!D.update),o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:D.search},{id:"new",label:"신규",onClick:D.new},{id:"update",label:"변경",onClick:D.update}],custom:[{id:"preview",label:"미리보기",onClick:B.previewPopup}]},searchBox:{reqRows:[o.jsx(L.BwgFormItem,{name:"systId",label:"시스템ID",children:o.jsx(p.Select,{options:i.getCodeList("SYST"),placeholder:"검색어를 입력하세요",allowClear:!0},"input1")}),o.jsx(L.BwgFormItem,{name:"keyword",label:"검색어",children:o.jsx(p.Input,{placeholder:"프로그램ID, 프로그램명, 페이지URL"})}),o.jsx(o.Fragment,{}),o.jsx(o.Fragment,{})]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"팝업 목록",icons:{type:"antd"}}),o.jsx(Fe,{type:"nrml",gridColumns:O,gridOptions:k,gridEvents:_,ref:t})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(dn,{title:"팝업 상세",children:o.jsxs(p.Form,{layout:"vertical",ref:r,style:{padding:"10px 20px"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템ID",name:"systId"},selectProps:{variant:"borderless",options:[{label:"공통",value:"CM"},{label:"인사",value:"HR"}],copyable:!0,disabled:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",children:o.jsx(p.Select,{variant:"borderless",options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}],disabled:!0})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업코드",name:"popuCd",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업명",name:"popuNm",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업너비",name:"popuWdth",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuWdth",noStyle:!0,children:o.jsx(p.InputNumber,{variant:"borderless",style:{flex:1},readOnly:!0})}),o.jsx(p.Form.Item,{name:"wdthUnit",noStyle:!0,children:o.jsx(p.Select,{variant:"borderless",style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}],disabled:!0})})]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업높이",name:"popuHght",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuHght",noStyle:!0,children:o.jsx(p.InputNumber,{variant:"borderless",style:{flex:1},readOnly:!0})}),o.jsx(p.Form.Item,{name:"hghtUnit",noStyle:!0,children:o.jsx(p.Select,{variant:"borderless",style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}],disabled:!0})})]})})})]}),o.jsx(L.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})}),o.jsx(L.BwgFormItem,{label:"비고",name:"rmrk",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0,rows:3})}),o.jsx(L.BwgFormItem,{label:"할당버튼",name:"btnList",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(p.Row,{gutter:[16,8],children:f?.dtlsInfo&&Array.isArray(f.dtlsInfo)?f.dtlsInfo.map((V,F)=>o.jsx(p.Col,{span:6,children:o.jsx(p.Button,{disabled:V.enblYn!=="Y",style:{width:"100%",marginBottom:"8px"},children:V.btnNm})},F)):o.jsx(p.Col,{span:24,children:o.jsx("div",{style:{textAlign:"center",color:"#999",padding:"20px"},children:"등록된 버튼이 없습니다."})})})})})]})})}),o.jsx(un,{title:d==="new"?"팝업 등록":"팝업 수정",open:l,placement:"right",width:"40%",onClose:()=>{c(!1),h(null),m([]),y("")},children:o.jsxs(L.BwgForm,{ref:n,style:{padding:"10px 20px"},initialValues:{popuWdth:400,wdthUnit:"px",popuHght:100,hghtUnit:"%"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템ID",name:"systId"},selectProps:{placeholder:"시스템을 선택하세요",variant:"borderless",options:[{label:"공통",value:"CM"},{label:"인사",value:"HR"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",initialValue:"Y",children:o.jsx(p.Select,{options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}]})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업코드",name:"popuCd",rules:[{required:!0,message:"팝업코드를 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업코드를 입력하세요"})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업명",name:"popuNm",rules:[{required:!0,message:"팝업명을 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업명을 입력하세요"})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업너비",name:"popuWdth",rules:[{required:!0,message:"팝업너비를 입력하세요"}],children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuWdth",noStyle:!0,children:o.jsx(p.InputNumber,{placeholder:"팝업너비를 입력하세요",style:{flex:1},min:1})}),o.jsx(p.Form.Item,{name:"wdthUnit",noStyle:!0,children:o.jsx(p.Select,{style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}]})})]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업높이",name:"popuHght",rules:[{required:!0,message:"팝업높이를 입력하세요"}],children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuHght",noStyle:!0,children:o.jsx(p.InputNumber,{placeholder:"팝업높이를 입력하세요",style:{flex:1},min:1})}),o.jsx(p.Form.Item,{name:"hghtUnit",noStyle:!0,children:o.jsx(p.Select,{style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}]})})]})})})]}),o.jsx(L.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",rules:[{required:!0,message:"팝업호출URL을 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업 URL을 입력하세요 (예: cm/TestPopup)",addonBefore:"popup/"})}),o.jsx(L.BwgFormItem,{label:"비고",name:"rmrk",children:o.jsx(p.Input.TextArea,{placeholder:"비고를 입력하세요",rows:3})}),o.jsxs(Le,{title:"버튼 목록",iconVisible:!1,children:[o.jsx(p.Button,{icon:o.jsx(X.SettingTwoTone,{}),onClick:A.openDefaultModal,children:"기본값"}),o.jsx(p.Button,{icon:o.jsx(X.PlusOutlined,{}),onClick:A.addButton,children:"추가"})]}),o.jsx(p.Table,{columns:H,dataSource:g,pagination:!1,size:"small",bordered:!0,scroll:{x:600},rowKey:"key"}),E&&o.jsxs("div",{style:{marginTop:"8px",padding:"8px 12px",backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"6px",color:"#cf1322",fontSize:"14px"},children:["⚠️ ",E]}),o.jsxs("div",{style:{textAlign:"right",marginTop:"16px"},children:[o.jsx(p.Button,{type:"primary",onClick:A.formFinish,style:{marginRight:"8px"},children:"저장"}),o.jsx(p.Button,{onClick:()=>{c(!1),h(null)},children:"취소"})]})]})}),o.jsxs(p.Modal,{title:"기본 버튼 선택",open:w,onOk:A.applyDefaultButtons,onCancel:()=>b(!1),okText:"적용",cancelText:"취소",children:[o.jsx("p",{children:"추가할 기본 버튼을 선택하세요:"}),o.jsx(p.Checkbox.Group,{value:j,onChange:V=>P(V),style:{width:"100%"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(p.Checkbox,{value:"조회",children:"조회"}),o.jsx(p.Checkbox,{value:"선택적용",children:"선택적용"}),o.jsx(p.Checkbox,{value:"신규",children:"신규"}),o.jsx(p.Checkbox,{value:"저장",children:"저장"}),o.jsx(p.Checkbox,{value:"삭제",children:"삭제"}),o.jsx(p.Checkbox,{value:"닫기",children:"닫기"})]})})]})]})})},{confirm:zN}=p.Modal,Pi={KE:[{label:"재무회계",value:"FI"},{label:"예산관리",value:"FM"},{label:"구매계약",value:"MM"},{label:"영업관리",value:"SD"},{label:"파트너관리",value:"PMN"}],KH:[{label:"HR 솔루션",value:"HR"},{label:"연말정산",value:"YT"},{label:"평정",value:"PE"}],KS:[{label:"온통",value:"BCOM"},{label:"e-감사",value:"EAUD"},{label:"청령신고",value:"INR"},{label:"ITAM",value:"ITAM"},{label:"차량/회의실",value:"CMM"},{label:"OA전산물품관리",value:"OAM"},{label:"총무관리",value:"GAM"},{label:"출입관리",value:"ACM"},{label:"비품관리",value:"IVM"},{label:"인장서비스",value:"SGS"},{label:"사료관리",value:"HIS"},{label:"웹펙스서비스",value:"WFAX"},{label:"메시지서비스",value:"SMS"},{label:"경영공시",value:"BID"},{label:"언론미디어",value:"PAM"},{label:"심의자문위원회",value:"DAC"},{label:"지식재산권신청",value:"IPR"},{label:"정보공유게시판",value:"ISB"}]},FN=[{name:"appCd",fieldName:"appCd",visible:!1},{name:"sysCd",fieldName:"sysCd",width:80,header:{text:"업무"},tag:"req"},{name:"prgrId",fieldName:"prgrId",width:150,header:{text:"프로그램 코드"},styleName:"left",tag:"req"},{name:"prgrNm",fieldName:"prgrNm",width:200,header:{text:"프로그램 명칭"},styleName:"left"},{name:"prgrUrl",fieldName:"prgrUrl",width:250,header:{text:"프로그램 URL"},styleName:"left"},{name:"enblYn",fieldName:"enblYn",width:60,header:{text:"사용"},renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{name:"prsnInfoYn",fieldName:"prsnInfoYn",visible:!1}],VN={display:{},edit:{editable:!1},copy:{singleMode:!0},container:{state:!0,check:!0,checkAll:!0,indicator:!0}},L0=({readOnly:e=!1,drawerMode:t=""})=>{const r=p.Form.useFormInstance(),[n,i]=v.useState(null),[a,s]=v.useState([]);v.useEffect(()=>{const c=r.getFieldValue("sysCd");i(c??null),c&&Pi[c]?s(Pi[c]):s([])},[r]);const l=c=>{i(c??null),c&&Pi[c]?s(Pi[c]):s([]),r.setFieldsValue({sysCd:c,appCd:null})};return o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템"},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"HR"},{label:"K-업무지원",value:"KS"}],onChange:l,disabled:e||t==="EDIT",placeholder:"시스템을 선택하세요"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:a,disabled:e||!n||t==="EDIT",placeholder:"시스템을 먼저 선택하세요"}})})]}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"prgrId",label:"프로그램 코드"},inputProps:{disabled:t==="EDIT",readOnly:e,variant:e?"borderless":"outlined"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"prgrNm",label:"프로그램 명칭"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),o.jsxs(p.Row,{children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgRadio,{itemProps:{name:"enblYn",label:"사용여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0}}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgRadio,{itemProps:{name:"prsnInfoYn",label:"개인정보 포함여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0}}})})]}),o.jsx(L.BwgInput,{itemProps:{name:"prgrUrl",label:"프로그램 URL"},inputProps:{readOnly:e,variant:e?"borderless":"outlined",placeholder:"/cm/rsrc/파일명 (.tsx 생략)"}}),o.jsx(L.BwgTextArea,{itemProps:{name:"prgrDscr",label:"프로그램 설명"},inputProps:{readOnly:e,rows:4,variant:e?"borderless":"outlined"}})]})},HN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),{getFormData:i,setFormData:a}=ct.useSearchBox(),[s,l]=v.useState([]),[c,d]=v.useState(!1),[u,f]=v.useState(""),[h,g]=v.useState(-1),m=v.useCallback(S=>{d(!0),f(S)},[]),x=v.useCallback(()=>{d(!1),f("")},[]);v.useEffect(()=>{const S=it.useSystemCode().findByAppCd(e.appCd);console.log("PRGR APPCD :: ",e.appCd),a({sysCd:S?.sysCd,appCd:S?.appCd})},[e.appCd]),v.useEffect(()=>{if(u=="NEW")n.current?.setFieldsValue({enblYn:"Y",prsnInfoYn:"Y"});else if(u=="EDIT"){const S=t.current?.getCurrentIndex()??-1,O=t.current?.vw?.getValues(S)??{};n.current?.setFieldsValue(O)}else n.current?.resetFields()},[u]);const y=v.useCallback(S=>{if(S==="ALL"){const O=Object.values(Pi).flat();l(O)}else S&&Pi[S]?l(Pi[S]):l([]);a({appCd:null}),b.search()},[a]),w=v.useCallback(()=>{j.SCMPRGR00102()},[u]),b={search:()=>{j.SCMPRGR00101()},new:()=>{m("NEW")},delete:()=>{const S=t.current?.vw?.getCheckedRows(!1)??[];if(S.length==0){oe.showWarning("삭제할 행을 체크하세요");return}zN({title:"삭제 안내",content:`${S.length}개 행을 삭제하시겠습니까?`,onOk:()=>{j.SCMPRGR00103()}})}},j={SCMPRGR00101:()=>{oe.callService("SCMPRGR00101",i(),{}).then(S=>{t.current?.addAllData(S.data)})},SCMPRGR00102:()=>{const S={iudFlag:u==="EDIT"?"U":"I",...n.current?.getFieldsValue()??{}};oe.callService("SCMPRGR00102",S,{}).then(O=>{O.result>0?(x(),j.SCMPRGR00101()):oe.showError(O.message)}).catch(O=>{console.error("오류:",O)})},SCMPRGR00103:()=>{const S={},O=t.current?.vw?.getCheckedRows(!1)??[],k=[];O.forEach(M=>{const A=t.current?.dp?.getJsonRow(M);k.push({sysCd:A.sysCd,appCd:A.appCd,prgrId:A.prgrId})}),S.sub=k,oe.callService("SCMPRGR00103",S).then(M=>{M.result>0&&j.SCMPRGR00101()}).catch(M=>{console.error("오류:",M)})}},P={editForm:()=>{if((t.current?.getCurrentRow()??-1)<0){oe.showWarning("행 선택 후 변경 가능합니다.");return}m("EDIT")}},E={onCurrentRowChanged(S,O,k){g(k)}};return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{b.search()}},{id:"new",label:"신규",onClick:()=>{b.new()}},{id:"delete",label:"삭제",onClick:()=>{b.delete()}}]},searchBox:{reqRows:o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",initialValue:""},selectProps:{options:[{label:"전체",value:""},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:y}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:s,placeholder:"시스템코드를 먼저 선택해주세요",onChange:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"프로그램명"},inputProps:{placeholder:"프로그램ID/프로그램명을 입력하세요.",onPressEnter:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgRadio,{itemProps:{name:"enblYn",label:"사용여부"},inputProps:{defaultValue:"",size:"small",options:[{label:"전체",value:""},{label:"Y",value:"Y"},{label:"N",value:"N"}]}})})]})},children:[o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60 mr20",children:[o.jsx(Le,{title:"프로그램 목록",icons:{type:"antd"}}),o.jsx(Fe,{ref:t,gridColumns:FN,gridOptions:VN,gridEvents:E,bindRef:r})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(dn,{title:"프로그램 상세",titleChildren:o.jsx(o.Fragment,{children:h>=0&&o.jsx(L.BwgButton,{type:"dashed",onClick:P.editForm,children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:r,className:"sub-form pd10",children:o.jsx(L0,{readOnly:!0})})})})]}),o.jsx(un,{title:`프로그램 ${u=="EDIT"?"변경":"등록"}`,open:c,placement:"right",onClose:x,width:"30%",size:"large",afterOpenChange:S=>{console.log("afterOpenChange:",S)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:()=>{x()},className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:w,className:"bwg-btn",children:"저장"})]}),children:o.jsx(p.Form,{layout:"vertical",ref:n,className:"sub-form pd10",children:o.jsx(L0,{readOnly:!1,drawerMode:u})})})]})},WN=()=>{const e=v.useRef(null),t=v.useRef(null),r=v.useRef(null),{openCorePopup:n}=ct.usePopup(),i=v.useMemo(()=>[{fieldName:"seq",header:{text:"순번"},width:60,styleName:"center",visible:!1},{fieldName:"stndYmd",header:{text:"휴일일자"},width:100,styleName:"center",required:!0},{fieldName:"hldyDscr",header:{text:"휴일명"},width:150,styleName:"left",required:!0},{fieldName:"hldyYn",header:{text:"휴일여부"},width:100,styleName:"center"},{fieldName:"lglHldyYn",header:{text:"법정휴일여부"},width:100,styleName:"center"}],[]),a=v.useMemo(()=>[{fieldName:"seq",header:{text:"순번"},width:60,styleName:"center",visible:!1},{fieldName:"stndYmd",header:{text:"휴일일자"},width:100,styleName:"center",required:!0},{fieldName:"hldyDscr",header:{text:"휴일명"},width:150,styleName:"left",required:!0},{fieldName:"hldyYn",header:{text:"휴일여부"},width:100,styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{fieldName:"lglHldyYn",header:{text:"법정휴일여부"},width:100,styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),s={edit:{editable:!1},container:{indicator:!0,footer:!0}},l={edit:{editable:!0},container:{check:!0,checkAll:!0,indicator:!0,footer:!0,state:!0}},c={search:()=>{d.SCMHLDY00101()},edit:()=>{d.SCMHLDY00102()}};v.useEffect(()=>{r.current?.setFormData({stndYmd:xl().format("YYYY")}),c.search()},[]);const d={SCMHLDY00101:()=>{oe.callService("SCMHLDY00101",{...r.current?.getFormData()||{},crprCd:oe.getCrprCd(),sysCd:__SYS_CD__}).then(u=>{e.current?.addAllData(u.sub.filter(f=>f.sysCd==="CM")||[]),t.current?.addAllData(u.sub.filter(f=>f.sysCd!=="CM")||[])})},SCMHLDY00102:()=>{const u=t.current?.getGridSaveData();oe.callService("SCMHLDY00102",{sub:u,crprCd:oe.getCrprCd(),sysCd:__SYS_CD__}).then(f=>{c.search()})}};return o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{c.search()}},{id:"edit",label:"수정",onClick:()=>{c.edit()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w50",children:[o.jsx(Le,{title:"국경일/공휴일 API"}),o.jsx(Fe,{ref:e,type:"nrml",gridColumns:i,gridOptions:s})]}),o.jsxs(De,{className:"w50",border:!0,children:[o.jsxs(Le,{title:"사업장 휴일",children:[o.jsx(L.BwgButton,{type:"primary",onClick:()=>{t.current?.dp?.addRow?.({iudFlag:"I"})},children:"추가"}),o.jsx(L.BwgButton,{type:"primary",onClick:()=>{t.current?.deleteGridData()},children:"삭제"}),o.jsx(L.BwgButton,{onClick:()=>{n("CORE_HOLIDAY_01")},children:"조회팝업"})]}),o.jsx(Fe,{ref:t,type:"nrml",gridColumns:a,gridOptions:l})]})]})})},UN=e=>o.jsx("div",{children:"CMSystCfgM01"}),KN=e=>{const[t,r]=v.useState(null),[n,i]=v.useState("group"),[a,s]=v.useState(null),l=v.useRef(null),c=v.useRef(null),d=v.useRef(null),u=[{id:"KH",name:"HR 솔루션",description:"인사 관리 시스템",icon:o.jsx(X.UserOutlined,{}),color:"blue",status:"active"},{id:"KE",name:"K-ERP 서비스",description:"전사적 자원 관리 시스템",icon:o.jsx(X.DatabaseOutlined,{}),color:"green",status:"active"},{id:"KS",name:"K-업무지원",description:"경영 지원 시스템",icon:o.jsx(X.SettingOutlined,{}),color:"orange",status:"active"}],f=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"applCd",visible:!1},{fieldName:"systId",header:{text:"업무코드"},width:100},{fieldName:"systNm",header:{text:"업무명"},width:100},{fieldName:"systIco",header:{text:"업무아이콘"},width:100},{fieldName:"sortOrd",header:{text:"정렬순서"},width:100},{fieldName:"enblYn",header:{text:"사용여부"},width:60,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),h=v.useMemo(()=>[{fieldName:"cmmnCd",header:{text:"그룹코드"},width:120},{fieldName:"cmmnCdNm",header:{text:"그룹명"},width:150},{fieldName:"cmmnCdAbrv",header:{text:"설명"},width:200},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),g=v.useMemo(()=>[{fieldName:"grpCd",header:{text:"그룹코드"},width:120},{fieldName:"cmmnCd",header:{text:"코드"},width:100},{fieldName:"cmmnCdNm",header:{text:"코드명"},width:150},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80},{fieldName:"useYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),m={container:{indicator:!0}},x=w=>{r(w)},y=w=>{i(w),w==="group"&&s(null)};return v.useEffect(()=>{t&&oe.callService("SCMSYST00101",{crprCd:oe.getCrprCd(),applCd:t},{}).then(w=>{console.log({SCMSYST00101:w.data}),l.current?.addAllData(w.data)})},[t]),v.useEffect(()=>{t&&oe.callService("SCMCODE00101",{crprCd:oe.getCrprCd(),srchGb:n==="group"?"group":"detail"},{}).then(w=>{console.log({SCMCODE00101:w.data}),n==="group"?c.current?.addAllData(w.data):d.current?.addAllData(w.data)})},[n,t]),o.jsxs(kt,{children:[o.jsx(De,{style:{padding:"0px 20px",height:"200px",overflow:"hidden"},children:o.jsx(p.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:3,xl:3,xxl:3},dataSource:u,renderItem:w=>o.jsx(p.List.Item,{children:o.jsx(p.Card,{hoverable:!0,style:{height:"100%",cursor:"pointer",border:t===w.id?"2px solid #1890ff":"1px solid #f0f0f0",backgroundColor:t===w.id?"#f0f8ff":"#ffffff",boxShadow:t===w.id?"0 4px 12px rgba(24, 144, 255, 0.15)":"0 2px 8px rgba(0, 0, 0, 0.06)",position:"relative",zIndex:t===w.id?1:0},onClick:()=>x(w.id),actions:[o.jsx(p.Tag,{color:w.color,children:w.status==="active"?"활성":"비활성"},"status")],children:o.jsx(p.Card.Meta,{avatar:o.jsx("div",{style:{fontSize:"24px",color:w.color==="blue"?"#1890ff":w.color==="green"?"#52c41a":"#fa8c16"},children:w.icon}),title:o.jsxs(p.Space,{children:[o.jsx("span",{style:{fontWeight:"bold",color:t===w.id?"#1890ff":"#333"},children:w.name}),o.jsx(p.Tag,{color:w.color,children:w.id})]}),description:o.jsx("div",{style:{marginTop:"8px"},children:o.jsx("p",{style:{color:t===w.id?"#1890ff":"#666",margin:0},children:w.description})})})})})})}),o.jsx(De,{border:!0,children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w40",children:[o.jsxs(Le,{title:"업무코드 목록",children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(Fe,{ref:l,type:"nrml",gridColumns:f,gridOptions:m})]}),o.jsxs(De,{className:"w60",children:[o.jsxs(Le,{title:"시스템 공통코드 목록",tooltip:{title:"시스템 전역에 배포될 코드 목록입니다."},children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(ar,{defaultActiveKey:"group",size:"small",tabPosition:"left",style:{height:"100%"},activeKey:n,onChange:y,items:[{key:"group",label:"그룹코드",icon:o.jsx(X.GroupOutlined,{}),children:o.jsx(ze,{children:o.jsx(De,{children:o.jsx(Fe,{ref:c,type:"nrml",gridColumns:h,gridOptions:m})})})},{key:"detail",label:"상세코드",icon:o.jsx(X.UngroupOutlined,{}),children:o.jsx(Fe,{ref:d,type:"nrml",gridColumns:g,gridOptions:m})}]})]})]})})]})};function lS(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=lS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Qe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=lS(e))&&(n&&(n+=" "),n+=t);return n}var YN=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Xh(e){if(typeof e!="string")return!1;var t=YN;return t.includes(e)}var qN=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function cS(e){if(typeof e!="string")return!1;var t=qN;return t.includes(e)}function uS(e){return typeof e=="string"&&e.startsWith("data-")}function Qr(e){var t=Object.entries(e).filter(r=>{var[n]=r;return cS(n)||uS(n)});return Object.fromEntries(t)}function za(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Qr(t)}return typeof e=="object"&&!Array.isArray(e)?Qr(e):null}function _r(e){var t=Object.entries(e).filter(r=>{var[n]=r;return cS(n)||uS(n)||Xh(n)});return Object.fromEntries(t)}var GN=["children","width","height","viewBox","className","style","title","desc"];function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kp.apply(null,arguments)}function XN(e,t){if(e==null)return{};var r,n,i=ZN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ZN(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zh=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:s,style:l,title:c,desc:d}=e,u=XN(e,GN),f=a||{width:n,height:i,x:0,y:0},h=Qe("recharts-surface",s);return C.createElement("svg",kp({},_r(u),{className:h,width:n,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),C.createElement("title",null,c),C.createElement("desc",null,d),r)}),QN=["children","className"];function Tp(){return Tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tp.apply(null,arguments)}function JN(e,t){if(e==null)return{};var r,n,i=eD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ur=C.forwardRef((e,t)=>{var{children:r,className:n}=e,i=JN(e,QN),a=Qe("recharts-layer",n);return C.createElement("g",Tp({className:a},_r(i),{ref:t}),r)}),dS=v.createContext(null),tD=()=>v.useContext(dS);function rt(e){return function(){return e}}const fS=Math.cos,Wl=Math.sin,en=Math.sqrt,Ul=Math.PI,_c=2*Ul,Mp=Math.PI,Rp=2*Mp,Ci=1e-6,rD=Rp-Ci;function pS(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function nD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return pS;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class iD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?pS:nD(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,l=this._y1,c=n-t,d=i-r,u=s-t,f=l-r,h=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Ci)if(!(Math.abs(f*c-d*u)>Ci)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-s,m=i-l,x=c*c+d*d,y=g*g+m*m,w=Math.sqrt(x),b=Math.sqrt(h),j=a*Math.tan((Mp-Math.acos((x+h-y)/(2*w*b)))/2),P=j/b,E=j/w;Math.abs(P-1)>Ci&&this._append`L${t+P*u},${r+P*f}`,this._append`A${a},${a},0,0,${+(f*g>u*m)},${this._x1=t+E*c},${this._y1=r+E*d}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),d=t+l,u=r+c,f=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${d},${u}`:(Math.abs(this._x1-d)>Ci||Math.abs(this._y1-u)>Ci)&&this._append`L${d},${u}`,n&&(h<0&&(h=h%Rp+Rp),h>rD?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=d},${this._y1=u}`:h>Ci&&this._append`A${n},${n},0,${+(h>=Mp)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Qh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new iD(t)}function Jh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hS(e){this._context=e}hS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bc(e){return new hS(e)}function gS(e){return e[0]}function mS(e){return e[1]}function vS(e,t){var r=rt(!0),n=null,i=Bc,a=null,s=Qh(l);e=typeof e=="function"?e:e===void 0?gS:rt(e),t=typeof t=="function"?t:t===void 0?mS:rt(t);function l(c){var d,u=(c=Jh(c)).length,f,h=!1,g;for(n==null&&(a=i(g=s())),d=0;d<=u;++d)!(d<u&&r(f=c[d],d,c))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,d,c),+t(f,d,c));if(g)return a=null,g+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:rt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:rt(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:rt(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function Zs(e,t,r){var n=null,i=rt(!0),a=null,s=Bc,l=null,c=Qh(d);e=typeof e=="function"?e:e===void 0?gS:rt(+e),t=typeof t=="function"?t:rt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?mS:rt(+r);function d(f){var h,g,m,x=(f=Jh(f)).length,y,w=!1,b,j=new Array(x),P=new Array(x);for(a==null&&(l=s(b=c())),h=0;h<=x;++h){if(!(h<x&&i(y=f[h],h,f))===w)if(w=!w)g=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),m=h-1;m>=g;--m)l.point(j[m],P[m]);l.lineEnd(),l.areaEnd()}w&&(j[h]=+e(y,h,f),P[h]=+t(y,h,f),l.point(n?+n(y,h,f):j[h],r?+r(y,h,f):P[h]))}if(b)return l=null,b+""||null}function u(){return vS().defined(i).curve(s).context(a)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:rt(+f),n=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:rt(+f),d):e},d.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:rt(+f),d):n},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:rt(+f),r=null,d):t},d.y0=function(f){return arguments.length?(t=typeof f=="function"?f:rt(+f),d):t},d.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:rt(+f),d):r},d.lineX0=d.lineY0=function(){return u().x(e).y(t)},d.lineY1=function(){return u().x(e).y(r)},d.lineX1=function(){return u().x(n).y(t)},d.defined=function(f){return arguments.length?(i=typeof f=="function"?f:rt(!!f),d):i},d.curve=function(f){return arguments.length?(s=f,a!=null&&(l=s(a)),d):s},d.context=function(f){return arguments.length?(f==null?a=l=null:l=s(a=f),d):a},d}class yS{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function oD(e){return new yS(e,!0)}function aD(e){return new yS(e,!1)}const eg={draw(e,t){const r=en(t/Ul);e.moveTo(r,0),e.arc(0,0,r,0,_c)}},sD={draw(e,t){const r=en(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},xS=en(1/3),lD=xS*2,cD={draw(e,t){const r=en(t/lD),n=r*xS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},uD={draw(e,t){const r=en(t),n=-r/2;e.rect(n,n,r,r)}},dD=.8908130915292852,bS=Wl(Ul/10)/Wl(7*Ul/10),fD=Wl(_c/10)*bS,pD=-fS(_c/10)*bS,hD={draw(e,t){const r=en(t*dD),n=fD*r,i=pD*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=_c*a/5,l=fS(s),c=Wl(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},fd=en(3),gD={draw(e,t){const r=-en(t/(fd*3));e.moveTo(0,r*2),e.lineTo(-fd*r,-r),e.lineTo(fd*r,-r),e.closePath()}},Tr=-.5,Mr=en(3)/2,Ap=1/en(12),mD=(Ap/2+1)*3,vD={draw(e,t){const r=en(t/mD),n=r/2,i=r*Ap,a=n,s=r*Ap+r,l=-a,c=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(l,c),e.lineTo(Tr*n-Mr*i,Mr*n+Tr*i),e.lineTo(Tr*a-Mr*s,Mr*a+Tr*s),e.lineTo(Tr*l-Mr*c,Mr*l+Tr*c),e.lineTo(Tr*n+Mr*i,Tr*i-Mr*n),e.lineTo(Tr*a+Mr*s,Tr*s-Mr*a),e.lineTo(Tr*l+Mr*c,Tr*c-Mr*l),e.closePath()}};function yD(e,t){let r=null,n=Qh(i);e=typeof e=="function"?e:rt(e||eg),t=typeof t=="function"?t:rt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:rt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:rt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Kl(){}function Yl(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function wS(e){this._context=e}wS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xD(e){return new wS(e)}function CS(e){this._context=e}CS.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bD(e){return new CS(e)}function SS(e){this._context=e}SS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wD(e){return new SS(e)}function jS(e){this._context=e}jS.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function CD(e){return new jS(e)}function z0(e){return e<0?-1:1}function F0(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(z0(a)+z0(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function V0(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function pd(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,s-l*r,a,s)}function ql(e){this._context=e}ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:pd(this,this._t0,V0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,pd(this,V0(this,r=F0(this,e,t)),r);break;default:pd(this,this._t0,r=F0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ES(e){this._context=new PS(e)}(ES.prototype=Object.create(ql.prototype)).point=function(e,t){ql.prototype.point.call(this,t,e)};function PS(e){this._context=e}PS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function SD(e){return new ql(e)}function jD(e){return new ES(e)}function OS(e){this._context=e}OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=H0(e),i=H0(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function H0(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function ED(e){return new OS(e)}function $c(e,t){this._context=e,this._t=t}$c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function PD(e){return new $c(e,.5)}function OD(e){return new $c(e,0)}function kD(e){return new $c(e,1)}function wo(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,l=a.length;r<s;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ip(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function TD(e,t){return e[t]}function MD(e){const t=[];return t.key=e,t}function RD(){var e=rt([]),t=Ip,r=wo,n=TD;function i(a){var s=Array.from(e.apply(this,arguments),MD),l,c=s.length,d=-1,u;for(const f of a)for(l=0,++d;l<c;++l)(s[l][d]=[0,+n(f,s[l].key,d,a)]).data=f;for(l=0,u=Jh(t(s));l<c;++l)s[u[l]].index=l;return r(s,u),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:rt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:rt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Ip:typeof a=="function"?a:rt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??wo,i):r},i}function AD(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=e[r][i][1]||0;if(s)for(r=0;r<n;++r)e[r][i][1]/=s}wo(e,t)}}function ID(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var s=0,l=0;s<i;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}wo(e,t)}}function ND(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var l=0,c=0,d=0;l<s;++l){for(var u=e[t[l]],f=u[n][1]||0,h=u[n-1][1]||0,g=(f-h)/2,m=0;m<l;++m){var x=e[t[m]],y=x[n][1]||0,w=x[n-1][1]||0;g+=y-w}c+=f,d+=g*f}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,wo(e,t)}}var hd={},gd={},W0;function DD(){return W0||(W0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(gd)),gd}var md={},U0;function kS(){return U0||(U0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(md)),md}var vd={},K0;function tg(){return K0||(K0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(vd)),vd}var yd={},xd={},Y0;function _D(){return Y0||(Y0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(xd)),xd}var q0;function rg(){return q0||(q0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_D(),r=tg();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],s=i.length;if(s===0)return a;let l=0,c="",d="",u=!1;for(i.charCodeAt(0)===46&&(a.push(""),l++);l<s;){const f=i[l];d?f==="\\"&&l+1<s?(l++,c+=i[l]):f===d?d="":c+=f:u?f==='"'||f==="'"?d=f:f==="]"?(u=!1,a.push(c),c=""):c+=f:f==="["?(u=!0,c&&(a.push(c),c="")):f==="."?c&&(a.push(c),c=""):c+=f,l++}return c&&a.push(c),a}e.toPath=n})(yd)),yd}var G0;function ng(){return G0||(G0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DD(),r=kS(),n=tg(),i=rg();function a(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const u=l[c];return u===void 0?r.isDeepKey(c)?a(l,i.toPath(c),d):d:u}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const u=l[c];return u===void 0?d:u}default:{if(Array.isArray(c))return s(l,c,d);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const u=l[c];return u===void 0?d:u}}}function s(l,c,d){if(c.length===0)return d;let u=l;for(let f=0;f<c.length;f++){if(u==null||t.isUnsafeProperty(c[f]))return d;u=u[c[f]]}return u===void 0?d:u}e.get=a})(hd)),hd}var bd,X0;function BD(){return X0||(X0=1,bd=ng().get),bd}var $D=BD();const _i=wr($D);var Lt=e=>e===0?0:e>0?1:-1,Br=e=>typeof e=="number"&&e!=+e,Mn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Br(e),pn=e=>Ne(e)||typeof e=="string",LD=0,Fa=e=>{var t=++LD;return"".concat(e||"").concat(t)},Zt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var a;if(Mn(t)){if(r==null)return n;var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Br(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},TS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function qt(e,t,r){return Ne(e)&&Ne(t)?e+r*(t-e):t}function zD(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):_i(n,t))===r)}var Ft=e=>e===null||typeof e>"u",ls=e=>Ft(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),FD=["type","size","sizeType"];function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Np.apply(null,arguments)}function Z0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z0(Object(r),!0).forEach(function(n){VD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VD(e,t,r){return(t=HD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HD(e){var t=WD(e,"string");return typeof t=="symbol"?t:t+""}function WD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UD(e,t){if(e==null)return{};var r,n,i=KD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function KD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var MS={symbolCircle:eg,symbolCross:sD,symbolDiamond:cD,symbolSquare:uD,symbolStar:hD,symbolTriangle:gD,symbolWye:vD},YD=Math.PI/180,qD=e=>{var t="symbol".concat(ls(e));return MS[t]||eg},GD=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*YD;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},XD=(e,t)=>{MS["symbol".concat(ls(e))]=t},ig=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=UD(e,FD),a=Q0(Q0({},i),{},{type:t,size:r,sizeType:n}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var h=qD(s),g=yD().type(h).size(GD(r,n,s)),m=g();if(m!==null)return m},{className:c,cx:d,cy:u}=a,f=_r(a);return d===+d&&u===+u&&r===+r?C.createElement("path",Np({},f,{className:Qe("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(u,")"),d:l()})):null};ig.registerSymbol=XD;var ZD=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Xh(i)&&(n[i]=(a=>r[i](r,a)))}),n},QD=(e,t,r)=>n=>(e(t,r,n),null),cs=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Xh(i)&&typeof a=="function"&&(n||(n={}),n[i]=QD(a,t,r))}),n};function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(null,arguments)}function J0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J0(Object(r),!0).forEach(function(n){og(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function og(e,t,r){return(t=e_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e_(e){var t=t_(e,"string");return typeof t=="symbol"?t:t+""}function t_(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=32;class ag extends v.PureComponent{renderIcon(t,r){var{inactiveColor:n}=this.props,i=Rr/2,a=Rr/6,s=Rr/3,l=t.inactive?n:t.color,c=r??t.type;if(c==="none")return null;if(c==="plainline")return C.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Rr,y2:i,className:"recharts-legend-icon"});if(c==="line")return C.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
1028
+ };`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"🔍 forwardRef vs useImperativeHandle"}),o.jsxs("div",{style:{display:"flex",gap:"16px"},children:[o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0f9ff",borderRadius:"6px"},children:[o.jsx("strong",{children:"forwardRef"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"DOM 요소를 그대로 전달"}),o.jsx("li",{children:"단순한 ref 전달"}),o.jsx("li",{children:"DOM의 모든 속성/메서드 접근 가능"})]})]}),o.jsxs("div",{style:{flex:1,padding:"12px",background:"#f0fdf4",borderRadius:"6px"},children:[o.jsx("strong",{children:"useImperativeHandle"}),o.jsxs("ul",{style:{paddingLeft:"16px",fontSize:"14px"},children:[o.jsx("li",{children:"커스텀 메서드만 노출"}),o.jsx("li",{children:"내부 구현 숨김"}),o.jsx("li",{children:"필요한 기능만 선택적 제공"})]})]})]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:4,children:"⚠️ 주의사항"}),o.jsx(p.Alert,{message:"꼭 필요한 경우에만 사용하세요!",description:"useImperativeHandle은 React의 선언적 패러다임을 벗어나는 명령형 API입니다. 대부분의 경우 props와 state로 충분하므로, 정말 필요한 경우에만 사용하세요.",type:"warning",showIcon:!0})]}),o.jsx(IN,{})]})})})]})]})})},_N=e=>{v.useEffect(()=>{g({sysCd:__SYS_CD__,fileGrpKey:null}),j.search()},[]);const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState(""),[s,l]=v.useState(""),[c,d]=v.useState(""),[u,f]=v.useState(""),{getFormData:h,setFormData:g}=ct.useSearchBox(),m=v.useMemo(()=>[{fieldName:"crprCd",header:{text:"법인코드"},width:80,styleName:"center"},{fieldName:"sysCd",header:{text:"시스템코드"},width:100,styleName:"center"},{fieldName:"fileGrpKey",header:{text:"파일그룹키"},width:120,styleName:"center"},{fieldName:"fileKey",header:{text:"파일키"},width:200,styleName:"center"},{fieldName:"lgclFileNm",header:{text:"파일 논리명"},width:250,styleName:"left"},{fieldName:"fileSize",header:{text:"파일 크기"},width:100,styleName:"right",displayCallback:(P,E,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,M=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,A)).toFixed(2))+" "+M[A]}},{fieldName:"fileExtn",header:{text:"파일 확장자"},width:100,styleName:"center"},{fieldName:"fileType",header:{text:"파일 타입"},width:120,styleName:"center"}],[]),x=v.useMemo(()=>[{fieldName:"fileGrpKey",header:{text:"파일 그룹키"},width:50,styleName:"center"},{fieldName:"fileKey",header:{text:"파일 키"},width:50,styleName:"center"},{fieldName:"fileSeq",header:{text:"파일 정렬순서"},width:50,styleName:"center"},{fieldName:"lgclFileNm",header:{text:"파일 논리명"},width:200,styleName:"left"},{fieldName:"physFileNm",header:{text:"파일 물리명"},width:200,styleName:"left"},{fieldName:"fileExtn",header:{text:"파일 확장자"},width:100},{fieldName:"mltpYn",header:{text:"대용량파일 여부"},width:100},{fieldName:"fileSize",header:{text:"파일 크기"},width:100,styleName:"right",displayCallback:(P,E,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,M=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,A)).toFixed(2))+" "+M[A]}},{fieldName:"filePath",header:{text:"파일 경로"},width:100,styleName:"right"}],[]),y={onCurrentRowChanged(P,E,S){if(S<0)return;let O=P.getDataSource().getJsonRow(S);a(O.fileGrpKey),O.mltpYn=="Y"?oe.callEndpoint({trxCd:"SCMFILE00106",appCd:e.appCd},{crprCd:oe.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:O.fileGrpKey,fileKey:O.fileKey}).then(k=>{n.current?.addAllData(k.sub)}):n.current?.dp?.clearRows()}},w={container:{check:!0,checkAll:!0,indicator:!0,footer:!0}},b={SCMFILE00101:()=>{oe.callEndpoint({trxCd:"SCMFILE00101",appCd:e.appCd},{crprCd:oe.getUserInfo()?.crprCd,...h()}).then(P=>{r.current?.addAllData(P.sub)}).catch(P=>{console.error("오류:",P)})}},j={search:()=>{b.SCMFILE00101()},download:()=>{console.log("download");let P=r.current?.dp?.getJsonRow(r.current?.getCurrentRow());oe.downloadByFileKey(P.fileKey)}};return o.jsx(kt,{searchBox:{reqRows:[o.jsxs(wt,{children:[o.jsx($e,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"시스템 코드",name:"sysCd"}})}),o.jsx($e,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키",name:"fileGrpKey"}})})]})]},buttons:{grant:[{id:"search",label:"조회",onClick:()=>{j.search()}},{id:"download",label:"다운로드",onClick:()=>{j.download()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"파일 목록",children:o.jsx("div",{style:{float:"right"},children:o.jsx(p.Space,{children:o.jsx(L.BwgButton,{onClick:()=>j.download(),children:"다운로드"})})})}),o.jsx(Fe,{ref:r,gridColumns:x,gridOptions:w,gridEvents:y})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(p.Tabs,{type:"card",defaultActiveKey:"1",style:{height:"100%"},items:[{label:"파일상세",key:"1",children:o.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[o.jsx(Le,{title:"dtls 그리드"}),o.jsx(Fe,{ref:n,gridColumns:m})]})},{label:"파일 샘플",key:"2",children:o.jsx("div",{style:{height:"100%",overflowY:"auto",padding:"10px"},children:o.jsx(dn,{title:"샘플 업로드",children:o.jsxs(p.Form,{layout:"vertical",ref:t,children:[o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"그리드 onCurrentRowChanged연동"}),o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:i,onChange:P=>a(P.target.value)}}),o.jsx(L.BwgUploader,{fileGrpKey:i}),o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"파일업로드시 fileGrpKey 채번 및 연동"}),o.jsx(L.BwgInput,{itemProps:{label:"채번 그룹키 (fileGrpKey2)"},inputProps:{value:s,disabled:!0}}),o.jsx(L.BwgUploader,{fileGrpKey:s,multiple:!0,onUploadComplete:P=>{console.log(P),s||l(P.fileGrpKey)}}),o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"대용량파일 업로드(zip압축 후 업로드)"}),o.jsx(L.BwgLargeUploader,{fileGrpKey:s})]})})})},{label:"파일 다운로드",key:"3",children:o.jsxs("div",{children:[o.jsx(L.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:c,onChange:P=>d(P.target.value)}}),o.jsx(L.BwgInput,{itemProps:{label:"앱코드 (appCd)"},inputProps:{value:u,onChange:P=>f(P.target.value)}}),o.jsx(L.BwgDownload,{fileGrpKey:c,appCd:u})]})}]})})]})})},aS=({width:e="40%",searchContext:t,onOk:r,onClose:n,...i})=>{const a=v.useRef(null),s=v.useRef(null),[l,c]=v.useState([]),d=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",width:60,header:{text:"애플리케이션"},styleName:"left"},{fieldName:"prgrId",width:120,header:{text:"프로그램ID"},styleName:"left"},{fieldName:"prgrNm",width:200,header:{text:"프로그램명"},styleName:"left"},{fieldName:"enblYn",width:80,header:{text:"사용여부"},styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]);v.useEffect(()=>{t?.sysCd&&(a.current?.setFormData({sysCd:t.sysCd}),m.SCMPRGR00101())},[t?.sysCd]);const u=()=>{m.SCMPRGR00101()},f=y=>{y.key==="Enter"&&u()},h=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},g=()=>{i.onCancel?.(),n?.()},m=v.useMemo(()=>({SCMPRGR00101:()=>{const y={...a.current?.getFormData()};oe.callService("SCMPRGR00101",y).then(w=>{console.log("response.programs:",w.data),s.current?.addAllData(w.data||[])}).catch(w=>{console.error("오류:",w)})}}),[]),x={onCurrentRowChanged:(y,w,b)=>{if(b>=0){const j=s.current?.vw?.getItemIndex(b),P=s.current?.vw?.getValues(j||0);c([P])}},onCellDblClicked:(y,w)=>{const b=w.itemIndex;if(b>=0){const j=s.current?.vw?.getValues(b);console.log(j),c([j]),r?.(j)}}};return o.jsx(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0,titleColor:"#08979c",headerBg:"#e6fffb"}}},children:o.jsx(p.Modal,{title:"프로그램 선택",width:e,maskClosable:!1,styles:{body:{paddingTop:"10px"}},okText:"적용",...i,onOk:h,onCancel:g,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(ko,{ref:a,reqRows:o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",style:{marginBottom:0},labelCol:{flex:"80px"}},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],style:{fontSize:"12px"},onChange:m.SCMPRGR00101}})}),o.jsx(p.Col,{span:16,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어",style:{marginBottom:0},labelCol:{flex:"90px"}},inputProps:{placeholder:"프로그램ID 또는 프로그램명을 입력하세요",suffix:o.jsx(X.SearchOutlined,{style:{color:"#1890ff",cursor:"pointer"},onClick:u}),onKeyPress:f}})})]})}),o.jsx(Fe,{ref:s,gridColumns:d,gridOptions:{container:{radio:!0,footer:!1}},gridEvents:x,gridDivStyle:{marginTop:8,height:400}}),l.length>0&&o.jsxs("div",{style:{marginTop:16,padding:12,backgroundColor:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6},children:[o.jsx("strong",{children:"선택된 프로그램:"})," ",l[0]?.prgrNm," (",l[0]?.prgrId,")"]})]})})})},sS=({width:e="40%",searchContext:t,onOk:r,onClose:n,...i})=>{const a=v.useRef(null),s=v.useRef(null),[l,c]=v.useState([]),d=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",width:120,header:{text:"애플리케이션"},styleName:"left"},{fieldName:"menuGbCd",width:100,header:{text:"메뉴구분"},styleName:"center",lookupDisplay:!0,labels:["메인메뉴","서브메뉴","프로그램"],values:["CMPRGRM","CMPRGRS","CMPRGRP"],renderer:{type:"text",showTooltip:!1}},{fieldName:"menuId",width:120,header:{text:"메뉴ID"},styleName:"left"},{fieldName:"menuNm",width:200,header:{text:"메뉴명"},styleName:"left"},{fieldName:"menuPrntId",width:120,header:{text:"상위메뉴ID"},styleName:"left"}],[]);v.useEffect(()=>{setTimeout(()=>{s.current?.vw&&s.current.vw.setRowStyleCallback(function(b,j,P){const E=b.getValue(j.index,"menuGbCd");if(E==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(E==="CMPRGRS")return{style:{background:"#f0f8ff"}}})},200)},[]),v.useEffect(()=>{t?.sysCd&&a.current?.setFormData({sysCd:t.sysCd,appCd:"",keyword:t.keyword||""})},[t?.sysCd,t?.keyword]);const u=()=>{x.SCMMENU00104()},f=w=>{w.key==="Enter"&&u()},h=()=>{a.current?.setFormData({sysCd:"",appCd:"",keyword:""})},g=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},m=()=>{i.onCancel?.(),n?.()},x=v.useMemo(()=>({SCMMENU00104:()=>{const w={crprCd:oe.getCrprCd(),...a.current?.getFormData()};oe.callService("SCMMENU00104",w).then(b=>{console.log("response.menus:",b.sub),s.current?.addAllData(b.sub,{treeOption:{isExpand:!0,dataField:"menuId",parentField:"menuPrntId"}})}).catch(b=>{console.error("오류:",b)})}}),[]),y=v.useMemo(()=>({onCurrentRowChanged:(w,b,j)=>{if(j>=0){const P=s.current?.vw?.getItemIndex(j),E=s?.current?.vw?.getValues(P||0);c([E])}},onCellDblClicked:(w,b)=>{const j=b.itemIndex;if(j>=0){const P=s.current?.vw?.getValues(j);console.log(P),c([P]),r?.(P)}}}),[r]);return o.jsx(p.ConfigProvider,{theme:{components:{Modal:{wireframe:!0,titleColor:"#08979c",headerBg:"#e6fffb"}}},children:o.jsx(p.Modal,{title:"상위 메뉴 선택",width:e,maskClosable:!1,styles:{body:{paddingTop:"10px"}},okText:"적용",...i,onOk:g,onCancel:m,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(ko,{border:!0,header:{title:"메뉴 선택",buttons:[o.jsx(L.BwgButton,{onClick:()=>x.SCMMENU00104(),style:{marginRight:8},children:"검색"},"search"),o.jsx(L.BwgButton,{onClick:h,children:"초기화"},"reset")]},ref:a,reqRows:o.jsxs(p.Row,{gutter:[20,5],children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",style:{marginBottom:0}},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],style:{fontSize:"12px"},onChange:x.SCMMENU00104}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션",style:{marginBottom:0}},selectProps:{options:[{label:"선택하세요",value:""},{label:"ERP",value:"ERP"},{label:"HR",value:"HR"},{label:"SUPPORT",value:"SUPPORT"}],style:{fontSize:"12px"}}})}),o.jsx(p.Col,{span:7,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어",style:{marginBottom:0}},inputProps:{placeholder:"메뉴ID 또는 메뉴명을 입력하세요",style:{fontSize:"12px"},onKeyPress:f}})}),o.jsx(p.Col,{span:5,style:{textAlign:"right"}})]})}),o.jsx(Fe,{ref:s,type:"tree",gridColumns:d,gridOptions:{container:{radio:!0,footer:!1}},gridEvents:y,gridDivStyle:{marginTop:8,height:400}}),l.length>0&&o.jsxs("div",{style:{marginTop:16,padding:12,backgroundColor:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6},children:[o.jsx("strong",{children:"선택된 메뉴:"})," ",l[0]?.menuNm," (",l[0].menuId,")"]})]})})})},ao={KE:[{label:"재무회계",value:"FI"},{label:"예산관리",value:"FM"},{label:"구매계약",value:"MM"},{label:"영업관리",value:"SD"},{label:"파트너관리",value:"PMN"}],KH:[{label:"HR 솔루션",value:"HR"},{label:"연말정산",value:"YT"},{label:"평정",value:"PE"}],KS:[{label:"온통",value:"BCOM"},{label:"e-감사",value:"EAUD"},{label:"청령신고",value:"INR"},{label:"ITAM",value:"ITAM"},{label:"차량/회의실",value:"CMM"},{label:"OA전산물품관리",value:"OAM"},{label:"총무관리",value:"GAM"},{label:"출입관리",value:"ACM"},{label:"비품관리",value:"IVM"},{label:"인장서비스",value:"SGS"},{label:"사료관리",value:"HIS"},{label:"웹펙스서비스",value:"WFAX"},{label:"메시지서비스",value:"SMS"},{label:"경영공시",value:"BID"},{label:"언론미디어",value:"PAM"},{label:"심의자문위원회",value:"DAC"},{label:"지식재산권신청",value:"IPR"},{label:"정보공유게시판",value:"ISB"}]},BN={container:{check:!0,checkAll:!0,indicator:!0,footer:!0}},$0=({readOnly:e=!1,drawerMode:t=""})=>{const r=p.Form.useFormInstance(),[n,i]=v.useState(null),[a,s]=v.useState(null),[l,c]=v.useState([]),[d,u]=v.useState("CMPRGRP"),[f,h]=v.useState(!0),[g,m]=v.useState(!1),[x,y]=v.useState({}),[w,b]=v.useState(!1),[j,P]=v.useState({});v.useEffect(()=>{const M=r.getFieldValue("sysCd"),A=r.getFieldValue("appCd"),_=r.getFieldValue("menuGbCd"),D=r.getFieldValue("deftMenuNo");i(M??null),s(A??null),u(_??"CMPRGRP"),h(D??!0),M&&ao[M]?c(ao[M]):c([])},[r]);const E=M=>{i(M),M&&ao[M]?c(ao[M]):c([]),r.resetFields(["appCd","scrnId","scrnNm","menuPrntId","menuPrntNm"])},S=M=>{h(M),M&&r.setFieldsValue({menuNo:""})},O=M=>{M&&r.setFieldsValue({menuPrntId:M.menuId,menuPrntNm:M.menuNm}),m(!1),y({})},k=M=>{M&&r.setFieldsValue({scrnId:M.prgrId,scrnNm:M.prgrNm}),b(!1),P({})};return o.jsxs(o.Fragment,{children:[o.jsx(p.Row,{gutter:12,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgRadio,{itemProps:{name:"menuGbCd"},inputProps:{options:[{label:"메인메뉴",value:"CMPRGRM"},{label:"서브메뉴",value:"CMPRGRS"},{label:"프로그램",value:"CMPRGRP"}],defaultValue:"CMPRGRP",optionType:"button",size:"middle",style:{pointerEvents:e?"none":void 0},onChange:M=>{u(M.target.value)}}})})}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템"},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:E,disabled:e||t==="EDIT",placeholder:"시스템을 선택하세요"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:l,disabled:e||!n||t==="EDIT",placeholder:"시스템을 먼저 선택하세요"}})})]}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"menuId",label:"메뉴ID"},inputProps:{placeholder:"자동 채번",disabled:!0,readOnly:e,variant:e?"borderless":"outlined"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"menuNm",label:"메뉴명"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),d==="CMPRGRP"&&o.jsx(p.Row,{gutter:24,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{label:"프로그램ID",name:["scrnId","scrnNm"]},readOnly:e,popupConfig:!0,onSearch:()=>{n?(b(!0),P({sysCd:n,keyword:r.getFieldValue("scrnNm")})):oe.showWarning("시스템을 선택하세요")}})})}),d!=="CMPRGRM"&&o.jsx(p.Row,{gutter:24,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgSearch,{itemProps:{label:"상위 메뉴",name:["menuPrntId","menuPrntNm"]},readOnly:e,onSearch:()=>{console.log("formSysCd:",n),n?(m(!0),y({sysCd:n,keyword:r.getFieldValue("menuPrntNm")})):oe.showWarning("시스템을 선택하세요")}})})}),o.jsxs(p.Row,{gutter:12,children:[d=="CMPRGRP"&&o.jsxs(o.Fragment,{children:[o.jsx(p.Col,{span:t=="NEW"?8:12,children:o.jsx(L.BwgFormItem,{name:"menuNo",label:"메뉴번호",children:o.jsx(p.Input.OTP,{length:4,formatter:M=>M.replace(/\D/g,""),disabled:t=="NEW"?f:e,style:{width:"180px"}})})}),t=="NEW"&&o.jsx(p.Col,{span:3,offset:1,children:o.jsx(L.BwgCheck,{itemProps:{name:"isAutoMenuNo",label:"자동채번"},inputProps:{defaultChecked:!0,onChange:M=>S(M.target.checked)}})})]}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgRadio,{itemProps:{name:"useYn",label:"사용여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0,width:"100%"}}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgNumber,{itemProps:{name:"sortOrdr",label:"정렬순서"},inputProps:{defaultValue:0,min:1,max:99,precision:0,controls:!0,readOnly:e,variant:e?"borderless":"outlined"}})}),d=="CMPRGRM"&&o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"iconCd",label:"아이콘명"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),o.jsx(L.BwgTextArea,{itemProps:{name:"menuDscr",label:"메뉴 설명"},inputProps:{disabled:e,rows:3}}),o.jsx(aS,{open:w,searchContext:j,onOk:k,onClose:()=>{b(!1),P({})}}),o.jsx(sS,{open:g,searchContext:x,onOk:O,onClose:()=>{m(!1),y({})}})]})},$N=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=et.useCodeStore(),{getFormData:a,setFormData:s}=ct.useSearchBox(),[l,c]=v.useState([]),[d,u]=v.useState(!1),[f,h]=v.useState(""),[g,m]=v.useState(-1),x=v.useCallback(k=>{u(!0),h(k)},[]),y=v.useCallback(()=>{u(!1),h("")},[]),w=v.useMemo(()=>i.getGridLookup("CMPRGR"),[i]),b=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appCd",visible:!1},{fieldName:"menuPrntId",visible:!1},{fieldName:"menuPrntNm",visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,styleName:"left"},{fieldName:"menuGbCd",header:{text:"메뉴구분"},width:100,styleName:"left",...w},{name:"menuNm",fieldName:"menuNm",header:{text:"메뉴명"},width:200,styleName:"left"},{fieldName:"scrnId",header:{text:"화면ID"},width:100,styleName:"left"},{fieldName:"scrnNm",header:{text:"화면이름"},width:100,styleName:"left"},{fieldName:"menuNo",header:{text:"메뉴번호"},width:100,styleName:"left"},{fieldName:"useYn",visible:!1},{fieldName:"sortOrdr",visible:!1},{fieldName:"iconCd",visible:!1},{fieldName:"menuDscr",visible:!1}],[w]);v.useEffect(()=>{if(f==="NEW")r.current?.setFieldsValue({useYn:"Y",deftMenuNo:!0,menuGbCd:"CMPRGRP"});else if(f==="EDIT"){const k=n.current?.getCurrentIndex();if(k!==void 0&&k>=0){const M=n.current?.vw?.getValues(k);r.current?.setFieldsValue(M)}}else r.current?.resetFields()},[f]),v.useEffect(()=>{setTimeout(()=>{n.current?.vw&&n.current.vw.setRowStyleCallback(function(M,A,_){const D=M.getValue(A.index,"menuGbCd");if(D==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(D==="CMPRGRS")return{style:{background:"#f0f8ff"}};if(D==="CMPRGRP")return{style:{background:"#fff"}}})},200)},[]);const j=k=>{k&&ao[k]?c([{label:"전체",value:""},...ao[k]]):c([{label:"전체",value:""}]),s({appCd:""}),E.SCMMENU00101()},P=()=>{r.current?.validateFields().then(k=>{console.log("Form values:",k),(f==="NEW"||f==="EDIT")&&E.SCMMENU00102()}).catch(k=>{console.log("Validation failed:",k)})},E={SCMMENU00101:()=>{const k={crprCd:oe.getCrprCd(),...a()};console.log("Search data:",k),oe.callService("SCMMENU00101",k,{}).then(M=>{n.current?.addAllData(M.menus,{treeOption:{isExpand:!0,dataField:"menuId",parentField:"menuPrntId"}})}).catch(M=>{console.error("오류:",M)})},SCMMENU00102:()=>{const k={iudFlag:f==="EDIT"?"U":"I",crprCd:oe.getCrprCd(),...r?.current?.getFieldsValue()};delete k.scrnNm,delete k.menuPrntNm,oe.callService("SCMMENU00102",k,{}).then(M=>{console.log("Save response:",M),M.result>0&&(y(),E.SCMMENU00101())}).catch(M=>{console.error("저장 오류:",M)})},SCMMENU00103:()=>{const k={},M=n.current?.vw?.getCheckedRows(!1),A=[];M?.forEach(_=>{const D=n.current?.dp?.getJsonRow(_);A.push({crprCd:D.crprCd,sysCd:D.sysCd,appCd:D.appCd,menuId:D.menuId,menuGbCd:D.menuGbCd})}),k.sub=A,oe.callService("SCMMENU00103",k,{}).then(_=>{console.log(_),_?.result>0&&E.SCMMENU00101()})}},S={search:()=>{E.SCMMENU00101()},new:()=>{x("NEW")},delete:()=>{const k=n.current?.vw?.getCheckedRows(!1);if(k?.length==0){oe.showWarning("삭제할 행을 체크하세요");return}else{let M=0,A=0,_=0;k?.forEach(D=>{const B=n.current?.dp?.getValue(D,"menuGbCd");B==="CMPRGRM"?M++:B==="CMPRGRS"?A++:B==="CMPRGRP"&&_++}),p.Modal.confirm({title:"삭제 안내",content:o.jsxs(o.Fragment,{children:[M>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"blue",children:["메인메뉴: ",M,"개"]})}),A>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"green",children:["서브메뉴: ",A,"개"]})}),_>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"orange",children:["프로그램: ",_,"개"]})}),"를 삭제하시겠습니까?"]}),onOk:()=>{E.SCMMENU00103()},onCancel:()=>{}})}}},O=v.useMemo(()=>({onCurrentRowChanged:(k,M,A)=>{m(A)},onItemChecked:(k,M,A)=>{if(!k._isUpdatingChildren)try{k._isUpdatingChildren=!0;const _=(D,B)=>{const H=k.getChildren(D);H&&H.length>0&&H.forEach(T=>{k.isCheckedItem(T)!==B&&(k.checkItem(T,B),_(T,B))})};_(M,A)}finally{setTimeout(()=>{k._isUpdatingChildren=!1},0)}}}),[]);return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:S.search},{id:"new",label:"신규",onClick:S.new},{id:"delete",label:"삭제",onClick:S.delete}]},searchBox:{reqRows:o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",initialValue:"",labelCol:{flex:"180px"}},selectProps:{options:[{label:"전체",value:""},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:j}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션",initialValue:""},selectProps:{options:l,placeholder:"시스템코드를 먼저 선택해주세요",onChange:S.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"검색어"},inputProps:{placeholder:"메뉴ID/메뉴명을 입력하세요.",onPressEnter:S.search}})})]})},children:[o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w65 mr20",children:[o.jsx(Le,{title:"메뉴 트리"}),o.jsx(Fe,{ref:n,type:"tree",gridColumns:b,gridOptions:BN,gridEvents:O,bindRef:t})]}),o.jsx(De,{className:"w35",border:!0,overflow:{x:"auto",y:"auto"},children:o.jsx(dn,{title:"메뉴 상세",titleChildren:o.jsx(o.Fragment,{children:g>=0&&o.jsx(L.BwgButton,{color:"gold",onClick:()=>x("EDIT"),children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:t,children:o.jsx($0,{readOnly:!0})})})})]}),o.jsx(un,{title:`메뉴 ${f==="EDIT"?"변경":"등록"}`,open:d,placement:"right",onClose:y,width:"30%",size:"large",afterOpenChange:k=>{console.log("Drawer afterOpenChange:",k)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:y,className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:P,className:"bwg-btn",children:"저장"})]}),children:o.jsx(p.Form,{layout:"vertical",ref:r,className:"sub-form pd10",children:o.jsx($0,{readOnly:!1,drawerMode:f})})})]})},LN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=et.useCodeStore(),{showPopup:a}=ct.usePopup(),{getFormData:s}=ct.useSearchBox(),[l,c]=v.useState(!1),[d,u]=v.useState("new"),[f,h]=v.useState(null),[g,m]=v.useState([]),[x,y]=v.useState(""),[w,b]=v.useState(!1),[j,P]=v.useState(["조회","닫기"]),[E,S]=v.useState("");v.useEffect(()=>{console.log("SYST 공통코드 목록 :: ",i.getCodeList("SYST"))},[i]),v.useEffect(()=>()=>{r.current&&(r.current.resetFields(),console.log("CMPopuMstrM01: BwgInfoArea form 초기화 완료")),n.current&&(n.current.resetFields(),console.log("CMPopuMstrM01: Drawer form 초기화 완료")),h(null),m([]),y(""),b(!1),P(["조회","닫기"]),S(""),console.log("CMPopuMstrM01: 컴포넌트 언마운트 - 모든 상태 초기화 완료")},[]);const O=v.useMemo(()=>[{name:"crprCd",fieldName:"crprCd",width:80,header:{text:"회사코드"},visible:!1},{name:"systId",fieldName:"systId",width:80,header:{text:"시스템ID"},lookupDisplay:!0,editor:{type:"dropdown"},tag:"req"},{name:"popuCd",fieldName:"popuCd",width:120,header:{text:"팝업코드"},styleName:"left",tag:"req"},{name:"popuNm",fieldName:"popuNm",width:200,header:{text:"팝업명칭"},styleName:"left"},{name:"popuUrl",fieldName:"popuUrl",width:250,header:{text:"팝업호출URL"},styleName:"left"},{name:"popuWdth",fieldName:"popuWdth",width:80,header:{text:"팝업너비"},visible:!1},{name:"wdthUnit",fieldName:"wdthUnit",width:60,header:{text:"너비단위"},visible:!1},{name:"popuHght",fieldName:"popuHght",width:80,header:{text:"팝업높이"},visible:!1},{name:"hghtUnit",fieldName:"hghtUnit",width:60,header:{text:"높이단위"},visible:!1},{name:"enblYn",fieldName:"enblYn",width:60,header:{text:"사용여부"},renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{name:"rmrk",fieldName:"rmrk",width:200,header:{text:"비고"},styleName:"left",visible:!1},{name:"inptDt",fieldName:"inptDt",width:150,header:{text:"입력일시"},visible:!1},{name:"inptId",fieldName:"inptId",width:100,header:{text:"입력자ID"},visible:!1},{name:"chngDt",fieldName:"chngDt",width:150,header:{text:"변경일시"},visible:!1},{name:"chngId",fieldName:"chngId",width:100,header:{text:"변경자ID"},visible:!1},{name:"dtlsInfo",fieldName:"dtlsInfo",width:100,header:{text:"버튼목록"},dataType:"json",visible:!1}],[]),k={display:{},edit:{editable:!1},copy:{singleMode:!0},container:{state:!0,check:!0,checkAll:!0,indicator:!0}},M={SCMPOPU00101:()=>{oe.callService("SCMPOPU00101",{},{}).then(V=>{console.log("SCMPOPU00101:",V.data)}).catch(V=>{console.error("오류:",V)})},SCMPOPU00102:V=>{oe.callService("SCMPOPU00102",V,{}).then(F=>{console.log("SCMPOPU00102:",F.data),t.current?.addAllData(F.data)}).catch(F=>{console.error("오류:",F)})},SCMPOPU00103:V=>{console.log("save params:",V),oe.callService("SCMPOPU00103",V,{}).then(F=>{console.log("response:",F),F.result?(oe.showSuccess(d==="new"?"팝업이 등록되었습니다.":"팝업이 수정되었습니다."),c(!1),h(null),m([]),y(""),n.current?.resetFields(),M.SCMPOPU00102()):(oe.showDuplicateError("팝업코드"),n.current?.setFields([{name:"popuCd",errors:["이미 사용중인 팝업코드입니다."]}]))}).catch(F=>{console.error("오류:",F),oe.showError("저장 중 오류가 발생했습니다.")})}},A={formFinish:async()=>{try{const V=await n.current?.validateFields();if(g.length>0&&g.filter(q=>!q.btnId||q.btnId.trim()==="").length>0){S("버튼ID가 입력되지 않은 버튼이 있습니다. 모든 버튼의 버튼ID를 입력해주세요.");return}S(""),M.SCMPOPU00103({edit:d!=="new",info:{crprCd:oe.getUserInfo()?.crprCd||"100",systId:V.systId,popuCd:V.popuCd,popuNm:V.popuNm,popuUrl:V.popuUrl,popuWdth:V.popuWdth,wdthUnit:V.wdthUnit,popuHght:V.popuHght,hghtUnit:V.hghtUnit,enblYn:V.enblYn,rmrk:V.rmrk,dtlsInfo:g}})}catch(V){console.error("폼 유효성 검사 실패:",V)}},addButton:()=>{const V=g.length>0?Math.max(...g.map(q=>q.btnSq||0)):0,F={key:Date.now().toString(),btnSq:V+1,btnId:"",btnNm:"",iconType:"ANTD",iconVal:"",enblYn:"Y"};m(q=>[...q,F]),y(F.key)},openDefaultModal:()=>{b(!0)},applyDefaultButtons:()=>{const V={조회:{btnId:"SEARCH",btnNm:"조회",iconType:"ANTD",iconVal:"SearchOutlined",enblYn:"Y"},선택적용:{btnId:"APPLY",btnNm:"선택적용",iconType:"ANTD",iconVal:"CheckOutlined",enblYn:"Y"},신규:{btnId:"NEW",btnNm:"신규",iconType:"ANTD",iconVal:"PlusOutlined",enblYn:"Y"},저장:{btnId:"SAVE",btnNm:"저장",iconType:"ANTD",iconVal:"SaveOutlined",enblYn:"Y"},삭제:{btnId:"DELETE",btnNm:"삭제",iconType:"ANTD",iconVal:"DeleteOutlined",enblYn:"Y"},닫기:{btnId:"CLOSE",btnNm:"닫기",iconType:"ANTD",iconVal:"CloseOutlined",enblYn:"Y"}},F=g.length>0?Math.max(...g.map(ie=>ie.btnSq||0)):0,q=j.map((ie,ue)=>({key:Date.now().toString()+Math.random(),btnSq:F+ue+1,...V[ie]}));m(ie=>[...ie,...q]),b(!1)},previewPopup:async()=>{let V=f;if(!V){const F=t.current?.getCurrentRow();if(F===void 0||F<0){oe.showError("미리보기할 팝업을 선택해주세요.");return}if(V=t.current?.vw?.getDataSource()?.getJsonRow(F),!V){oe.showError("팝업 데이터를 가져올 수 없습니다.");return}}try{console.log("미리보기 팝업 실행:",V.popuCd),await a(V.popuCd,{popupData:V,isPreview:!0}),console.log("미리보기 팝업 열기 완료")}catch(F){console.error("미리보기 팝업 열기 실패:",F),oe.showError("미리보기 팝업을 열 수 없습니다.")}}},_={onCurrentRowChanged(V,F,q){if(q<0)return;const ie=V.getValues(q);console.log("onCurrentRowChanged rowData:",ie),r.current?.setFieldsValue(ie),h(ie)}},D={search:async()=>{try{const V=s();console.log("SearchBox FormData:",V);const F={...V,userId:oe.getUserInfo()?.userId};console.log("검색 파라미터:",F),M.SCMPOPU00102(F)}catch(V){console.error("SearchBox formData 접근 오류:",V),M.SCMPOPU00102()}},new:()=>{u("new"),h(null),m([]),c(!0),setTimeout(()=>{n.current?.resetFields()},100)},update:()=>{const V=t.current?.getCurrentRow();if(V===void 0||V<0){console.log("선택된 행이 없습니다.");return}const F=t.current?.vw?.getDataSource()?.getJsonRow(V);if(F){if(u("update"),h(F),c(!0),console.log("전체 rowData:",F),console.log("rowData.dtlsInfo 존재 여부:",!!F.dtlsInfo),console.log("rowData.dtlsInfo 타입:",typeof F.dtlsInfo),console.log("rowData.dtlsInfo 값:",F.dtlsInfo),F.dtlsInfo){console.log("rowData.dtlsInfo 원본:",F.dtlsInfo);let q;if(Array.isArray(F.dtlsInfo)?(q=F.dtlsInfo,console.log("dtlsInfo가 배열입니다:",q)):typeof F.dtlsInfo=="object"?(q=[F.dtlsInfo],console.log("dtlsInfo가 객체입니다. 배열로 변환:",q)):(q=[],console.log("dtlsInfo가 다른 타입입니다:",typeof F.dtlsInfo)),q&&q.length>0){console.log("최종 buttonListData:",q);const ie=q.map((ue,ge)=>({...ue,key:ue.key||`btn_${Date.now()}_${ge}`,btnSq:ue.btnSq||ge+1}));console.log("처리된 buttonListWithKeys:",ie),m(ie)}else console.log("buttonListData가 비어있음, 빈 배열로 설정"),m([])}else console.log("dtlsInfo가 없음, 빈 배열로 설정"),m([]);setTimeout(()=>{const q={...F,popuUrl:F.popuUrl?.startsWith("/popup/")?F.popuUrl.substring(8):F.popuUrl};n.current?.setFieldsValue(q)},100)}}},B={previewPopup:A.previewPopup},H=[{title:"순서",key:"order",width:80,align:"center",render:(V,F)=>{const q=g.findIndex(ie=>ie.key===F.key);return o.jsxs(p.Space,{direction:"vertical",size:"small",children:[o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.UpOutlined,{}),disabled:q===0,onClick:()=>$(F.key)}),o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.DownOutlined,{}),disabled:q===g.length-1,onClick:()=>U(F.key)})]})}},{title:"순번",dataIndex:"btnSq",key:"btnSq",width:60,align:"center",render:V=>V||"-"},{title:"버튼ID",dataIndex:"btnId",key:"btnId",width:120,render:(V,F)=>{const q=F.key===x,ie=!V||V.trim()==="",ue=E&&ie;return q?o.jsx(p.Input,{value:V,status:ue?"error":void 0,onChange:ge=>{const Ee=[...g],Pe=Ee.find(Z=>F.key===Z.key);Pe&&(Pe.btnId=ge.target.value,m(Ee),ge.target.value.trim()!==""&&S(""))}}):o.jsx("span",{style:{color:ue?"#cf1322":"inherit",fontWeight:ue?"bold":"normal"},children:V||(ue?"입력 필요":"")})}},{title:"버튼명",dataIndex:"btnNm",key:"btnNm",width:150,render:(V,F)=>F.key===x?o.jsx(p.Input,{value:V,onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.btnNm=ie.target.value,m(ue))}}):V},{title:"아이콘타입",dataIndex:"iconType",align:"center",key:"iconType",width:100,render:(V,F)=>F.key===x?o.jsx(p.Select,{value:V,style:{width:"100%"},onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.iconType=ie,m(ue))},options:[{label:"ANTD",value:"ANTD"},{label:"CSS",value:"CSS"},{label:"SVG",value:"SVG"}]}):o.jsx(p.Tag,{color:V==="ANTD"?"blue":V==="CSS"?"green":"orange",children:V})},{title:"아이콘값",dataIndex:"iconVal",key:"iconVal",width:120,render:(V,F)=>F.key===x?o.jsx(p.Input,{value:V,onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.iconVal=ie.target.value,m(ue))}}):V},{title:"사용여부",dataIndex:"enblYn",align:"center",key:"enblYn",width:80,render:(V,F)=>F.key===x?o.jsx(p.Switch,{checked:V==="Y",onChange:ie=>{const ue=[...g],ge=ue.find(Ee=>F.key===Ee.key);ge&&(ge.enblYn=ie?"Y":"N",m(ue))}}):o.jsx(p.Tag,{color:V==="Y"?"green":"red",children:V==="Y"?"사용":"미사용"})},{title:"작업",key:"action",align:"center",width:120,render:(V,F)=>F.key===x?o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"저장",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.SaveOutlined,{}),onClick:()=>I()})}),o.jsx(p.Tooltip,{title:"취소",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.RedoOutlined,{}),onClick:N})})]}):o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"편집",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(X.EditOutlined,{}),onClick:()=>T(F)})}),o.jsx(p.Tooltip,{title:"삭제",children:o.jsx(p.Button,{type:"link",size:"small",danger:!0,icon:o.jsx(X.RestOutlined,{}),onClick:()=>R(F.key)})})]})}],T=V=>{y(V.key)},N=()=>{y("")},I=V=>{y("")},R=V=>{m(F=>F.filter(q=>q.key!==V))},$=V=>{m(F=>{const q=F.findIndex(ie=>ie.key===V);if(q>0){const ie=[...F];return[ie[q],ie[q-1]]=[ie[q-1],ie[q]],ie.forEach((ue,ge)=>{ue.btnSq=ge+1}),ie}return F})},U=V=>{m(F=>{const q=F.findIndex(ie=>ie.key===V);if(q<F.length-1){const ie=[...F];return[ie[q],ie[q+1]]=[ie[q+1],ie[q]],ie.forEach((ue,ge)=>{ue.btnSq=ge+1}),ie}return F})};return console.log("CMPopuMstrM01 grantEvent:",D),console.log("CMPopuMstrM01 customEvent:",B),console.log("grantEvent.update 함수 존재 여부:",!!D.update),o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:D.search},{id:"new",label:"신규",onClick:D.new},{id:"update",label:"변경",onClick:D.update}],custom:[{id:"preview",label:"미리보기",onClick:B.previewPopup}]},searchBox:{reqRows:[o.jsx(L.BwgFormItem,{name:"systId",label:"시스템ID",children:o.jsx(p.Select,{options:i.getCodeList("SYST"),placeholder:"검색어를 입력하세요",allowClear:!0},"input1")}),o.jsx(L.BwgFormItem,{name:"keyword",label:"검색어",children:o.jsx(p.Input,{placeholder:"프로그램ID, 프로그램명, 페이지URL"})}),o.jsx(o.Fragment,{}),o.jsx(o.Fragment,{})]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60",children:[o.jsx(Le,{title:"팝업 목록",icons:{type:"antd"}}),o.jsx(Fe,{type:"nrml",gridColumns:O,gridOptions:k,gridEvents:_,ref:t})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(dn,{title:"팝업 상세",children:o.jsxs(p.Form,{layout:"vertical",ref:r,style:{padding:"10px 20px"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템ID",name:"systId"},selectProps:{variant:"borderless",options:[{label:"공통",value:"CM"},{label:"인사",value:"HR"}],copyable:!0,disabled:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",children:o.jsx(p.Select,{variant:"borderless",options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}],disabled:!0})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업코드",name:"popuCd",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업명",name:"popuNm",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업너비",name:"popuWdth",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuWdth",noStyle:!0,children:o.jsx(p.InputNumber,{variant:"borderless",style:{flex:1},readOnly:!0})}),o.jsx(p.Form.Item,{name:"wdthUnit",noStyle:!0,children:o.jsx(p.Select,{variant:"borderless",style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}],disabled:!0})})]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업높이",name:"popuHght",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuHght",noStyle:!0,children:o.jsx(p.InputNumber,{variant:"borderless",style:{flex:1},readOnly:!0})}),o.jsx(p.Form.Item,{name:"hghtUnit",noStyle:!0,children:o.jsx(p.Select,{variant:"borderless",style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}],disabled:!0})})]})})})]}),o.jsx(L.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})}),o.jsx(L.BwgFormItem,{label:"비고",name:"rmrk",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0,rows:3})}),o.jsx(L.BwgFormItem,{label:"할당버튼",name:"btnList",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(p.Row,{gutter:[16,8],children:f?.dtlsInfo&&Array.isArray(f.dtlsInfo)?f.dtlsInfo.map((V,F)=>o.jsx(p.Col,{span:6,children:o.jsx(p.Button,{disabled:V.enblYn!=="Y",style:{width:"100%",marginBottom:"8px"},children:V.btnNm})},F)):o.jsx(p.Col,{span:24,children:o.jsx("div",{style:{textAlign:"center",color:"#999",padding:"20px"},children:"등록된 버튼이 없습니다."})})})})})]})})}),o.jsx(un,{title:d==="new"?"팝업 등록":"팝업 수정",open:l,placement:"right",width:"40%",onClose:()=>{c(!1),h(null),m([]),y("")},children:o.jsxs(L.BwgForm,{ref:n,style:{padding:"10px 20px"},initialValues:{popuWdth:400,wdthUnit:"px",popuHght:100,hghtUnit:"%"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템ID",name:"systId"},selectProps:{placeholder:"시스템을 선택하세요",variant:"borderless",options:[{label:"공통",value:"CM"},{label:"인사",value:"HR"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"사용여부",name:"enblYn",initialValue:"Y",children:o.jsx(p.Select,{options:[{label:"사용",value:"Y"},{label:"미사용",value:"N"}]})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업코드",name:"popuCd",rules:[{required:!0,message:"팝업코드를 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업코드를 입력하세요"})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업명",name:"popuNm",rules:[{required:!0,message:"팝업명을 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업명을 입력하세요"})})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업너비",name:"popuWdth",rules:[{required:!0,message:"팝업너비를 입력하세요"}],children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuWdth",noStyle:!0,children:o.jsx(p.InputNumber,{placeholder:"팝업너비를 입력하세요",style:{flex:1},min:1})}),o.jsx(p.Form.Item,{name:"wdthUnit",noStyle:!0,children:o.jsx(p.Select,{style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}]})})]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"팝업높이",name:"popuHght",rules:[{required:!0,message:"팝업높이를 입력하세요"}],children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"popuHght",noStyle:!0,children:o.jsx(p.InputNumber,{placeholder:"팝업높이를 입력하세요",style:{flex:1},min:1})}),o.jsx(p.Form.Item,{name:"hghtUnit",noStyle:!0,children:o.jsx(p.Select,{style:{width:"80px"},options:[{label:"px",value:"px"},{label:"%",value:"%"}]})})]})})})]}),o.jsx(L.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",rules:[{required:!0,message:"팝업호출URL을 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업 URL을 입력하세요 (예: cm/TestPopup)",addonBefore:"popup/"})}),o.jsx(L.BwgFormItem,{label:"비고",name:"rmrk",children:o.jsx(p.Input.TextArea,{placeholder:"비고를 입력하세요",rows:3})}),o.jsxs(Le,{title:"버튼 목록",iconVisible:!1,children:[o.jsx(p.Button,{icon:o.jsx(X.SettingTwoTone,{}),onClick:A.openDefaultModal,children:"기본값"}),o.jsx(p.Button,{icon:o.jsx(X.PlusOutlined,{}),onClick:A.addButton,children:"추가"})]}),o.jsx(p.Table,{columns:H,dataSource:g,pagination:!1,size:"small",bordered:!0,scroll:{x:600},rowKey:"key"}),E&&o.jsxs("div",{style:{marginTop:"8px",padding:"8px 12px",backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"6px",color:"#cf1322",fontSize:"14px"},children:["⚠️ ",E]}),o.jsxs("div",{style:{textAlign:"right",marginTop:"16px"},children:[o.jsx(p.Button,{type:"primary",onClick:A.formFinish,style:{marginRight:"8px"},children:"저장"}),o.jsx(p.Button,{onClick:()=>{c(!1),h(null)},children:"취소"})]})]})}),o.jsxs(p.Modal,{title:"기본 버튼 선택",open:w,onOk:A.applyDefaultButtons,onCancel:()=>b(!1),okText:"적용",cancelText:"취소",children:[o.jsx("p",{children:"추가할 기본 버튼을 선택하세요:"}),o.jsx(p.Checkbox.Group,{value:j,onChange:V=>P(V),style:{width:"100%"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(p.Checkbox,{value:"조회",children:"조회"}),o.jsx(p.Checkbox,{value:"선택적용",children:"선택적용"}),o.jsx(p.Checkbox,{value:"신규",children:"신규"}),o.jsx(p.Checkbox,{value:"저장",children:"저장"}),o.jsx(p.Checkbox,{value:"삭제",children:"삭제"}),o.jsx(p.Checkbox,{value:"닫기",children:"닫기"})]})})]})]})})},{confirm:zN}=p.Modal,Pi={KE:[{label:"재무회계",value:"FI"},{label:"예산관리",value:"FM"},{label:"구매계약",value:"MM"},{label:"영업관리",value:"SD"},{label:"파트너관리",value:"PMN"}],KH:[{label:"HR 솔루션",value:"HR"},{label:"연말정산",value:"YT"},{label:"평정",value:"PE"}],KS:[{label:"온통",value:"BCOM"},{label:"e-감사",value:"EAUD"},{label:"청령신고",value:"INR"},{label:"ITAM",value:"ITAM"},{label:"차량/회의실",value:"CMM"},{label:"OA전산물품관리",value:"OAM"},{label:"총무관리",value:"GAM"},{label:"출입관리",value:"ACM"},{label:"비품관리",value:"IVM"},{label:"인장서비스",value:"SGS"},{label:"사료관리",value:"HIS"},{label:"웹펙스서비스",value:"WFAX"},{label:"메시지서비스",value:"SMS"},{label:"경영공시",value:"BID"},{label:"언론미디어",value:"PAM"},{label:"심의자문위원회",value:"DAC"},{label:"지식재산권신청",value:"IPR"},{label:"정보공유게시판",value:"ISB"}]},FN=[{name:"appCd",fieldName:"appCd",visible:!1},{name:"sysCd",fieldName:"sysCd",width:80,header:{text:"업무"},tag:"req"},{name:"prgrId",fieldName:"prgrId",width:150,header:{text:"프로그램 코드"},styleName:"left",tag:"req"},{name:"prgrNm",fieldName:"prgrNm",width:200,header:{text:"프로그램 명칭"},styleName:"left"},{name:"prgrUrl",fieldName:"prgrUrl",width:250,header:{text:"프로그램 URL"},styleName:"left"},{name:"enblYn",fieldName:"enblYn",width:60,header:{text:"사용"},renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{name:"prsnInfoYn",fieldName:"prsnInfoYn",visible:!1}],VN={display:{},edit:{editable:!1},copy:{singleMode:!0},container:{state:!0,check:!0,checkAll:!0,indicator:!0}},L0=({readOnly:e=!1,drawerMode:t=""})=>{const r=p.Form.useFormInstance(),[n,i]=v.useState(null),[a,s]=v.useState([]);v.useEffect(()=>{const c=r.getFieldValue("sysCd");i(c??null),c&&Pi[c]?s(Pi[c]):s([])},[r]);const l=c=>{i(c??null),c&&Pi[c]?s(Pi[c]):s([]),r.setFieldsValue({sysCd:c,appCd:null})};return o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템"},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"HR"},{label:"K-업무지원",value:"KS"}],onChange:l,disabled:e||t==="EDIT",placeholder:"시스템을 선택하세요"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:a,disabled:e||!n||t==="EDIT",placeholder:"시스템을 먼저 선택하세요"}})})]}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"prgrId",label:"프로그램 코드"},inputProps:{disabled:t==="EDIT",readOnly:e,variant:e?"borderless":"outlined"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{name:"prgrNm",label:"프로그램 명칭"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),o.jsxs(p.Row,{children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgRadio,{itemProps:{name:"enblYn",label:"사용여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0}}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgRadio,{itemProps:{name:"prsnInfoYn",label:"개인정보 포함여부"},inputProps:{defaultValue:"Y",options:[{label:"Y",value:"Y"},{label:"N",value:"N"}],optionType:"button",style:{pointerEvents:e?"none":void 0}}})})]}),o.jsx(L.BwgInput,{itemProps:{name:"prgrUrl",label:"프로그램 URL"},inputProps:{readOnly:e,variant:e?"borderless":"outlined",placeholder:"/cm/rsrc/파일명 (.tsx 생략)"}}),o.jsx(L.BwgTextArea,{itemProps:{name:"prgrDscr",label:"프로그램 설명"},inputProps:{readOnly:e,rows:4,variant:e?"borderless":"outlined"}})]})},HN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),{getFormData:i,setFormData:a}=ct.useSearchBox(),[s,l]=v.useState([]),[c,d]=v.useState(!1),[u,f]=v.useState(""),[h,g]=v.useState(-1),m=v.useCallback(S=>{d(!0),f(S)},[]),x=v.useCallback(()=>{d(!1),f("")},[]);v.useEffect(()=>{const S=et.useSystemCode().findByAppCd(e.appCd);console.log("PRGR APPCD :: ",e.appCd),a({sysCd:S?.sysCd,appCd:S?.appCd})},[e.appCd]),v.useEffect(()=>{if(u=="NEW")n.current?.setFieldsValue({enblYn:"Y",prsnInfoYn:"Y"});else if(u=="EDIT"){const S=t.current?.getCurrentIndex()??-1,O=t.current?.vw?.getValues(S)??{};n.current?.setFieldsValue(O)}else n.current?.resetFields()},[u]);const y=v.useCallback(S=>{if(S==="ALL"){const O=Object.values(Pi).flat();l(O)}else S&&Pi[S]?l(Pi[S]):l([]);a({appCd:null}),b.search()},[a]),w=v.useCallback(()=>{j.SCMPRGR00102()},[u]),b={search:()=>{j.SCMPRGR00101()},new:()=>{m("NEW")},delete:()=>{const S=t.current?.vw?.getCheckedRows(!1)??[];if(S.length==0){oe.showWarning("삭제할 행을 체크하세요");return}zN({title:"삭제 안내",content:`${S.length}개 행을 삭제하시겠습니까?`,onOk:()=>{j.SCMPRGR00103()}})}},j={SCMPRGR00101:()=>{oe.callService("SCMPRGR00101",i(),{}).then(S=>{t.current?.addAllData(S.data)})},SCMPRGR00102:()=>{const S={iudFlag:u==="EDIT"?"U":"I",...n.current?.getFieldsValue()??{}};oe.callService("SCMPRGR00102",S,{}).then(O=>{O.result>0?(x(),j.SCMPRGR00101()):oe.showError(O.message)}).catch(O=>{console.error("오류:",O)})},SCMPRGR00103:()=>{const S={},O=t.current?.vw?.getCheckedRows(!1)??[],k=[];O.forEach(M=>{const A=t.current?.dp?.getJsonRow(M);k.push({sysCd:A.sysCd,appCd:A.appCd,prgrId:A.prgrId})}),S.sub=k,oe.callService("SCMPRGR00103",S).then(M=>{M.result>0&&j.SCMPRGR00101()}).catch(M=>{console.error("오류:",M)})}},P={editForm:()=>{if((t.current?.getCurrentRow()??-1)<0){oe.showWarning("행 선택 후 변경 가능합니다.");return}m("EDIT")}},E={onCurrentRowChanged(S,O,k){g(k)}};return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{b.search()}},{id:"new",label:"신규",onClick:()=>{b.new()}},{id:"delete",label:"삭제",onClick:()=>{b.delete()}}]},searchBox:{reqRows:o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템",initialValue:""},selectProps:{options:[{label:"전체",value:""},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:y}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:s,placeholder:"시스템코드를 먼저 선택해주세요",onChange:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{name:"keyword",label:"프로그램명"},inputProps:{placeholder:"프로그램ID/프로그램명을 입력하세요.",onPressEnter:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgRadio,{itemProps:{name:"enblYn",label:"사용여부"},inputProps:{defaultValue:"",size:"small",options:[{label:"전체",value:""},{label:"Y",value:"Y"},{label:"N",value:"N"}]}})})]})},children:[o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w60 mr20",children:[o.jsx(Le,{title:"프로그램 목록",icons:{type:"antd"}}),o.jsx(Fe,{ref:t,gridColumns:FN,gridOptions:VN,gridEvents:E,bindRef:r})]}),o.jsx(De,{className:"w40",border:!0,children:o.jsx(dn,{title:"프로그램 상세",titleChildren:o.jsx(o.Fragment,{children:h>=0&&o.jsx(L.BwgButton,{type:"dashed",onClick:P.editForm,children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:r,className:"sub-form pd10",children:o.jsx(L0,{readOnly:!0})})})})]}),o.jsx(un,{title:`프로그램 ${u=="EDIT"?"변경":"등록"}`,open:c,placement:"right",onClose:x,width:"30%",size:"large",afterOpenChange:S=>{console.log("afterOpenChange:",S)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:()=>{x()},className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:w,className:"bwg-btn",children:"저장"})]}),children:o.jsx(p.Form,{layout:"vertical",ref:n,className:"sub-form pd10",children:o.jsx(L0,{readOnly:!1,drawerMode:u})})})]})},WN=()=>{const e=v.useRef(null),t=v.useRef(null),r=v.useRef(null),{openCorePopup:n}=ct.usePopup(),i=v.useMemo(()=>[{fieldName:"seq",header:{text:"순번"},width:60,styleName:"center",visible:!1},{fieldName:"stndYmd",header:{text:"휴일일자"},width:100,styleName:"center",required:!0},{fieldName:"hldyDscr",header:{text:"휴일명"},width:150,styleName:"left",required:!0},{fieldName:"hldyYn",header:{text:"휴일여부"},width:100,styleName:"center"},{fieldName:"lglHldyYn",header:{text:"법정휴일여부"},width:100,styleName:"center"}],[]),a=v.useMemo(()=>[{fieldName:"seq",header:{text:"순번"},width:60,styleName:"center",visible:!1},{fieldName:"stndYmd",header:{text:"휴일일자"},width:100,styleName:"center",required:!0},{fieldName:"hldyDscr",header:{text:"휴일명"},width:150,styleName:"left",required:!0},{fieldName:"hldyYn",header:{text:"휴일여부"},width:100,styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}},{fieldName:"lglHldyYn",header:{text:"법정휴일여부"},width:100,styleName:"center",renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),s={edit:{editable:!1},container:{indicator:!0,footer:!0}},l={edit:{editable:!0},container:{check:!0,checkAll:!0,indicator:!0,footer:!0,state:!0}},c={search:()=>{d.SCMHLDY00101()},edit:()=>{d.SCMHLDY00102()}};v.useEffect(()=>{r.current?.setFormData({stndYmd:xl().format("YYYY")}),c.search()},[]);const d={SCMHLDY00101:()=>{oe.callService("SCMHLDY00101",{...r.current?.getFormData()||{},crprCd:oe.getCrprCd(),sysCd:__SYS_CD__}).then(u=>{e.current?.addAllData(u.sub.filter(f=>f.sysCd==="CM")||[]),t.current?.addAllData(u.sub.filter(f=>f.sysCd!=="CM")||[])})},SCMHLDY00102:()=>{const u=t.current?.getGridSaveData();oe.callService("SCMHLDY00102",{sub:u,crprCd:oe.getCrprCd(),sysCd:__SYS_CD__}).then(f=>{c.search()})}};return o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{c.search()}},{id:"edit",label:"수정",onClick:()=>{c.edit()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w50",children:[o.jsx(Le,{title:"국경일/공휴일 API"}),o.jsx(Fe,{ref:e,type:"nrml",gridColumns:i,gridOptions:s})]}),o.jsxs(De,{className:"w50",border:!0,children:[o.jsxs(Le,{title:"사업장 휴일",children:[o.jsx(L.BwgButton,{type:"primary",onClick:()=>{t.current?.dp?.addRow?.({iudFlag:"I"})},children:"추가"}),o.jsx(L.BwgButton,{type:"primary",onClick:()=>{t.current?.deleteGridData()},children:"삭제"}),o.jsx(L.BwgButton,{onClick:()=>{n("CORE_HOLIDAY_01")},children:"조회팝업"})]}),o.jsx(Fe,{ref:t,type:"nrml",gridColumns:a,gridOptions:l})]})]})})},UN=e=>o.jsx("div",{children:"CMSystCfgM01"}),KN=e=>{const[t,r]=v.useState(null),[n,i]=v.useState("group"),[a,s]=v.useState(null),l=v.useRef(null),c=v.useRef(null),d=v.useRef(null),u=[{id:"KH",name:"HR 솔루션",description:"인사 관리 시스템",icon:o.jsx(X.UserOutlined,{}),color:"blue",status:"active"},{id:"KE",name:"K-ERP 서비스",description:"전사적 자원 관리 시스템",icon:o.jsx(X.DatabaseOutlined,{}),color:"green",status:"active"},{id:"KS",name:"K-업무지원",description:"경영 지원 시스템",icon:o.jsx(X.SettingOutlined,{}),color:"orange",status:"active"}],f=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"applCd",visible:!1},{fieldName:"systId",header:{text:"업무코드"},width:100},{fieldName:"systNm",header:{text:"업무명"},width:100},{fieldName:"systIco",header:{text:"업무아이콘"},width:100},{fieldName:"sortOrd",header:{text:"정렬순서"},width:100},{fieldName:"enblYn",header:{text:"사용여부"},width:60,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),h=v.useMemo(()=>[{fieldName:"cmmnCd",header:{text:"그룹코드"},width:120},{fieldName:"cmmnCdNm",header:{text:"그룹명"},width:150},{fieldName:"cmmnCdAbrv",header:{text:"설명"},width:200},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80},{fieldName:"enblYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),g=v.useMemo(()=>[{fieldName:"grpCd",header:{text:"그룹코드"},width:120},{fieldName:"cmmnCd",header:{text:"코드"},width:100},{fieldName:"cmmnCdNm",header:{text:"코드명"},width:150},{fieldName:"sortOrd",header:{text:"정렬순서"},width:80},{fieldName:"useYn",header:{text:"사용여부"},width:80,renderer:{type:"check",trueValues:"Y",falseValues:"N"}}],[]),m={container:{indicator:!0}},x=w=>{r(w)},y=w=>{i(w),w==="group"&&s(null)};return v.useEffect(()=>{t&&oe.callService("SCMSYST00101",{crprCd:oe.getCrprCd(),applCd:t},{}).then(w=>{console.log({SCMSYST00101:w.data}),l.current?.addAllData(w.data)})},[t]),v.useEffect(()=>{t&&oe.callService("SCMCODE00101",{crprCd:oe.getCrprCd(),srchGb:n==="group"?"group":"detail"},{}).then(w=>{console.log({SCMCODE00101:w.data}),n==="group"?c.current?.addAllData(w.data):d.current?.addAllData(w.data)})},[n,t]),o.jsxs(kt,{children:[o.jsx(De,{style:{padding:"0px 20px",height:"200px",overflow:"hidden"},children:o.jsx(p.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:3,xl:3,xxl:3},dataSource:u,renderItem:w=>o.jsx(p.List.Item,{children:o.jsx(p.Card,{hoverable:!0,style:{height:"100%",cursor:"pointer",border:t===w.id?"2px solid #1890ff":"1px solid #f0f0f0",backgroundColor:t===w.id?"#f0f8ff":"#ffffff",boxShadow:t===w.id?"0 4px 12px rgba(24, 144, 255, 0.15)":"0 2px 8px rgba(0, 0, 0, 0.06)",position:"relative",zIndex:t===w.id?1:0},onClick:()=>x(w.id),actions:[o.jsx(p.Tag,{color:w.color,children:w.status==="active"?"활성":"비활성"},"status")],children:o.jsx(p.Card.Meta,{avatar:o.jsx("div",{style:{fontSize:"24px",color:w.color==="blue"?"#1890ff":w.color==="green"?"#52c41a":"#fa8c16"},children:w.icon}),title:o.jsxs(p.Space,{children:[o.jsx("span",{style:{fontWeight:"bold",color:t===w.id?"#1890ff":"#333"},children:w.name}),o.jsx(p.Tag,{color:w.color,children:w.id})]}),description:o.jsx("div",{style:{marginTop:"8px"},children:o.jsx("p",{style:{color:t===w.id?"#1890ff":"#666",margin:0},children:w.description})})})})})})}),o.jsx(De,{border:!0,children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(De,{className:"w40",children:[o.jsxs(Le,{title:"업무코드 목록",children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(Fe,{ref:l,type:"nrml",gridColumns:f,gridOptions:m})]}),o.jsxs(De,{className:"w60",children:[o.jsxs(Le,{title:"시스템 공통코드 목록",tooltip:{title:"시스템 전역에 배포될 코드 목록입니다."},children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(ar,{defaultActiveKey:"group",size:"small",tabPosition:"left",style:{height:"100%"},activeKey:n,onChange:y,items:[{key:"group",label:"그룹코드",icon:o.jsx(X.GroupOutlined,{}),children:o.jsx(ze,{children:o.jsx(De,{children:o.jsx(Fe,{ref:c,type:"nrml",gridColumns:h,gridOptions:m})})})},{key:"detail",label:"상세코드",icon:o.jsx(X.UngroupOutlined,{}),children:o.jsx(Fe,{ref:d,type:"nrml",gridColumns:g,gridOptions:m})}]})]})]})})]})};function lS(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=lS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Qe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=lS(e))&&(n&&(n+=" "),n+=t);return n}var YN=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Xh(e){if(typeof e!="string")return!1;var t=YN;return t.includes(e)}var qN=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function cS(e){if(typeof e!="string")return!1;var t=qN;return t.includes(e)}function uS(e){return typeof e=="string"&&e.startsWith("data-")}function Qr(e){var t=Object.entries(e).filter(r=>{var[n]=r;return cS(n)||uS(n)});return Object.fromEntries(t)}function za(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Qr(t)}return typeof e=="object"&&!Array.isArray(e)?Qr(e):null}function _r(e){var t=Object.entries(e).filter(r=>{var[n]=r;return cS(n)||uS(n)||Xh(n)});return Object.fromEntries(t)}var GN=["children","width","height","viewBox","className","style","title","desc"];function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kp.apply(null,arguments)}function XN(e,t){if(e==null)return{};var r,n,i=ZN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ZN(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zh=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:s,style:l,title:c,desc:d}=e,u=XN(e,GN),f=a||{width:n,height:i,x:0,y:0},h=Qe("recharts-surface",s);return C.createElement("svg",kp({},_r(u),{className:h,width:n,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),C.createElement("title",null,c),C.createElement("desc",null,d),r)}),QN=["children","className"];function Tp(){return Tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tp.apply(null,arguments)}function JN(e,t){if(e==null)return{};var r,n,i=eD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ur=C.forwardRef((e,t)=>{var{children:r,className:n}=e,i=JN(e,QN),a=Qe("recharts-layer",n);return C.createElement("g",Tp({className:a},_r(i),{ref:t}),r)}),dS=v.createContext(null),tD=()=>v.useContext(dS);function nt(e){return function(){return e}}const fS=Math.cos,Wl=Math.sin,en=Math.sqrt,Ul=Math.PI,_c=2*Ul,Mp=Math.PI,Rp=2*Mp,Ci=1e-6,rD=Rp-Ci;function pS(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function nD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return pS;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class iD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?pS:nD(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,l=this._y1,c=n-t,d=i-r,u=s-t,f=l-r,h=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Ci)if(!(Math.abs(f*c-d*u)>Ci)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-s,m=i-l,x=c*c+d*d,y=g*g+m*m,w=Math.sqrt(x),b=Math.sqrt(h),j=a*Math.tan((Mp-Math.acos((x+h-y)/(2*w*b)))/2),P=j/b,E=j/w;Math.abs(P-1)>Ci&&this._append`L${t+P*u},${r+P*f}`,this._append`A${a},${a},0,0,${+(f*g>u*m)},${this._x1=t+E*c},${this._y1=r+E*d}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),d=t+l,u=r+c,f=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${d},${u}`:(Math.abs(this._x1-d)>Ci||Math.abs(this._y1-u)>Ci)&&this._append`L${d},${u}`,n&&(h<0&&(h=h%Rp+Rp),h>rD?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=d},${this._y1=u}`:h>Ci&&this._append`A${n},${n},0,${+(h>=Mp)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Qh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new iD(t)}function Jh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hS(e){this._context=e}hS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bc(e){return new hS(e)}function gS(e){return e[0]}function mS(e){return e[1]}function vS(e,t){var r=nt(!0),n=null,i=Bc,a=null,s=Qh(l);e=typeof e=="function"?e:e===void 0?gS:nt(e),t=typeof t=="function"?t:t===void 0?mS:nt(t);function l(c){var d,u=(c=Jh(c)).length,f,h=!1,g;for(n==null&&(a=i(g=s())),d=0;d<=u;++d)!(d<u&&r(f=c[d],d,c))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,d,c),+t(f,d,c));if(g)return a=null,g+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:nt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:nt(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:nt(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function Zs(e,t,r){var n=null,i=nt(!0),a=null,s=Bc,l=null,c=Qh(d);e=typeof e=="function"?e:e===void 0?gS:nt(+e),t=typeof t=="function"?t:nt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?mS:nt(+r);function d(f){var h,g,m,x=(f=Jh(f)).length,y,w=!1,b,j=new Array(x),P=new Array(x);for(a==null&&(l=s(b=c())),h=0;h<=x;++h){if(!(h<x&&i(y=f[h],h,f))===w)if(w=!w)g=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),m=h-1;m>=g;--m)l.point(j[m],P[m]);l.lineEnd(),l.areaEnd()}w&&(j[h]=+e(y,h,f),P[h]=+t(y,h,f),l.point(n?+n(y,h,f):j[h],r?+r(y,h,f):P[h]))}if(b)return l=null,b+""||null}function u(){return vS().defined(i).curve(s).context(a)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),n=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),d):e},d.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:nt(+f),d):n},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:nt(+f),r=null,d):t},d.y0=function(f){return arguments.length?(t=typeof f=="function"?f:nt(+f),d):t},d.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:nt(+f),d):r},d.lineX0=d.lineY0=function(){return u().x(e).y(t)},d.lineY1=function(){return u().x(e).y(r)},d.lineX1=function(){return u().x(n).y(t)},d.defined=function(f){return arguments.length?(i=typeof f=="function"?f:nt(!!f),d):i},d.curve=function(f){return arguments.length?(s=f,a!=null&&(l=s(a)),d):s},d.context=function(f){return arguments.length?(f==null?a=l=null:l=s(a=f),d):a},d}class yS{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function oD(e){return new yS(e,!0)}function aD(e){return new yS(e,!1)}const eg={draw(e,t){const r=en(t/Ul);e.moveTo(r,0),e.arc(0,0,r,0,_c)}},sD={draw(e,t){const r=en(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},xS=en(1/3),lD=xS*2,cD={draw(e,t){const r=en(t/lD),n=r*xS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},uD={draw(e,t){const r=en(t),n=-r/2;e.rect(n,n,r,r)}},dD=.8908130915292852,bS=Wl(Ul/10)/Wl(7*Ul/10),fD=Wl(_c/10)*bS,pD=-fS(_c/10)*bS,hD={draw(e,t){const r=en(t*dD),n=fD*r,i=pD*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=_c*a/5,l=fS(s),c=Wl(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},fd=en(3),gD={draw(e,t){const r=-en(t/(fd*3));e.moveTo(0,r*2),e.lineTo(-fd*r,-r),e.lineTo(fd*r,-r),e.closePath()}},Tr=-.5,Mr=en(3)/2,Ap=1/en(12),mD=(Ap/2+1)*3,vD={draw(e,t){const r=en(t/mD),n=r/2,i=r*Ap,a=n,s=r*Ap+r,l=-a,c=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(l,c),e.lineTo(Tr*n-Mr*i,Mr*n+Tr*i),e.lineTo(Tr*a-Mr*s,Mr*a+Tr*s),e.lineTo(Tr*l-Mr*c,Mr*l+Tr*c),e.lineTo(Tr*n+Mr*i,Tr*i-Mr*n),e.lineTo(Tr*a+Mr*s,Tr*s-Mr*a),e.lineTo(Tr*l+Mr*c,Tr*c-Mr*l),e.closePath()}};function yD(e,t){let r=null,n=Qh(i);e=typeof e=="function"?e:nt(e||eg),t=typeof t=="function"?t:nt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:nt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:nt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Kl(){}function Yl(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function wS(e){this._context=e}wS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xD(e){return new wS(e)}function CS(e){this._context=e}CS.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bD(e){return new CS(e)}function SS(e){this._context=e}SS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Yl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wD(e){return new SS(e)}function jS(e){this._context=e}jS.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function CD(e){return new jS(e)}function z0(e){return e<0?-1:1}function F0(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(z0(a)+z0(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function V0(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function pd(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,s-l*r,a,s)}function ql(e){this._context=e}ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:pd(this,this._t0,V0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,pd(this,V0(this,r=F0(this,e,t)),r);break;default:pd(this,this._t0,r=F0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ES(e){this._context=new PS(e)}(ES.prototype=Object.create(ql.prototype)).point=function(e,t){ql.prototype.point.call(this,t,e)};function PS(e){this._context=e}PS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function SD(e){return new ql(e)}function jD(e){return new ES(e)}function OS(e){this._context=e}OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=H0(e),i=H0(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function H0(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function ED(e){return new OS(e)}function $c(e,t){this._context=e,this._t=t}$c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function PD(e){return new $c(e,.5)}function OD(e){return new $c(e,0)}function kD(e){return new $c(e,1)}function wo(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,l=a.length;r<s;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Ip(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function TD(e,t){return e[t]}function MD(e){const t=[];return t.key=e,t}function RD(){var e=nt([]),t=Ip,r=wo,n=TD;function i(a){var s=Array.from(e.apply(this,arguments),MD),l,c=s.length,d=-1,u;for(const f of a)for(l=0,++d;l<c;++l)(s[l][d]=[0,+n(f,s[l].key,d,a)]).data=f;for(l=0,u=Jh(t(s));l<c;++l)s[u[l]].index=l;return r(s,u),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:nt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:nt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Ip:typeof a=="function"?a:nt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??wo,i):r},i}function AD(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=e[r][i][1]||0;if(s)for(r=0;r<n;++r)e[r][i][1]/=s}wo(e,t)}}function ID(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var s=0,l=0;s<i;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}wo(e,t)}}function ND(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var l=0,c=0,d=0;l<s;++l){for(var u=e[t[l]],f=u[n][1]||0,h=u[n-1][1]||0,g=(f-h)/2,m=0;m<l;++m){var x=e[t[m]],y=x[n][1]||0,w=x[n-1][1]||0;g+=y-w}c+=f,d+=g*f}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,wo(e,t)}}var hd={},gd={},W0;function DD(){return W0||(W0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(gd)),gd}var md={},U0;function kS(){return U0||(U0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(md)),md}var vd={},K0;function tg(){return K0||(K0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(vd)),vd}var yd={},xd={},Y0;function _D(){return Y0||(Y0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(xd)),xd}var q0;function rg(){return q0||(q0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_D(),r=tg();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],s=i.length;if(s===0)return a;let l=0,c="",d="",u=!1;for(i.charCodeAt(0)===46&&(a.push(""),l++);l<s;){const f=i[l];d?f==="\\"&&l+1<s?(l++,c+=i[l]):f===d?d="":c+=f:u?f==='"'||f==="'"?d=f:f==="]"?(u=!1,a.push(c),c=""):c+=f:f==="["?(u=!0,c&&(a.push(c),c="")):f==="."?c&&(a.push(c),c=""):c+=f,l++}return c&&a.push(c),a}e.toPath=n})(yd)),yd}var G0;function ng(){return G0||(G0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DD(),r=kS(),n=tg(),i=rg();function a(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const u=l[c];return u===void 0?r.isDeepKey(c)?a(l,i.toPath(c),d):d:u}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const u=l[c];return u===void 0?d:u}default:{if(Array.isArray(c))return s(l,c,d);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const u=l[c];return u===void 0?d:u}}}function s(l,c,d){if(c.length===0)return d;let u=l;for(let f=0;f<c.length;f++){if(u==null||t.isUnsafeProperty(c[f]))return d;u=u[c[f]]}return u===void 0?d:u}e.get=a})(hd)),hd}var bd,X0;function BD(){return X0||(X0=1,bd=ng().get),bd}var $D=BD();const _i=wr($D);var Lt=e=>e===0?0:e>0?1:-1,Br=e=>typeof e=="number"&&e!=+e,Mn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Br(e),pn=e=>Ne(e)||typeof e=="string",LD=0,Fa=e=>{var t=++LD;return"".concat(e||"").concat(t)},Zt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var a;if(Mn(t)){if(r==null)return n;var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Br(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},TS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function qt(e,t,r){return Ne(e)&&Ne(t)?e+r*(t-e):t}function zD(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):_i(n,t))===r)}var Ft=e=>e===null||typeof e>"u",ls=e=>Ft(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),FD=["type","size","sizeType"];function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Np.apply(null,arguments)}function Z0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z0(Object(r),!0).forEach(function(n){VD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VD(e,t,r){return(t=HD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HD(e){var t=WD(e,"string");return typeof t=="symbol"?t:t+""}function WD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UD(e,t){if(e==null)return{};var r,n,i=KD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function KD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var MS={symbolCircle:eg,symbolCross:sD,symbolDiamond:cD,symbolSquare:uD,symbolStar:hD,symbolTriangle:gD,symbolWye:vD},YD=Math.PI/180,qD=e=>{var t="symbol".concat(ls(e));return MS[t]||eg},GD=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*YD;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},XD=(e,t)=>{MS["symbol".concat(ls(e))]=t},ig=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=UD(e,FD),a=Q0(Q0({},i),{},{type:t,size:r,sizeType:n}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var h=qD(s),g=yD().type(h).size(GD(r,n,s)),m=g();if(m!==null)return m},{className:c,cx:d,cy:u}=a,f=_r(a);return d===+d&&u===+u&&r===+r?C.createElement("path",Np({},f,{className:Qe("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(u,")"),d:l()})):null};ig.registerSymbol=XD;var ZD=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Xh(i)&&(n[i]=(a=>r[i](r,a)))}),n},QD=(e,t,r)=>n=>(e(t,r,n),null),cs=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Xh(i)&&typeof a=="function"&&(n||(n={}),n[i]=QD(a,t,r))}),n};function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(null,arguments)}function J0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J0(Object(r),!0).forEach(function(n){og(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function og(e,t,r){return(t=e_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e_(e){var t=t_(e,"string");return typeof t=="symbol"?t:t+""}function t_(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=32;class ag extends v.PureComponent{renderIcon(t,r){var{inactiveColor:n}=this.props,i=Rr/2,a=Rr/6,s=Rr/3,l=t.inactive?n:t.color,c=r??t.type;if(c==="none")return null;if(c==="plainline")return C.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Rr,y2:i,className:"recharts-legend-icon"});if(c==="line")return C.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
1029
1029
  A`).concat(a,",").concat(a,",0,1,1,").concat(2*s,",").concat(i,`
1030
1030
  H`).concat(Rr,"M").concat(2*s,",").concat(i,`
1031
1031
  A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return C.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Rr/8,"h").concat(Rr,"v").concat(Rr*3/4,"h").concat(-Rr,"z"),className:"recharts-legend-icon"});if(C.isValidElement(t.legendIcon)){var d=JD({},t);return delete d.legendIcon,C.cloneElement(t.legendIcon,d)}return C.createElement(ig,{fill:l,cx:i,cy:i,size:Rr,sizeType:"diameter",type:c})}renderItems(){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:s}=this.props,l={x:0,y:0,width:Rr,height:Rr},c={display:n==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,f)=>{var h=u.formatter||i,g=Qe({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:u.inactive});if(u.type==="none")return null;var m=u.inactive?a:u.color,x=h?h(u.value,u,f):u.value;return C.createElement("li",Dp({className:g,style:c,key:"legend-item-".concat(f)},cs(this.props,u,f)),C.createElement(Zh,{width:r,height:r,viewBox:l,style:d,"aria-label":"".concat(x," legend icon")},this.renderIcon(u,s)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},x))})}render(){var{payload:t,layout:r,align:n}=this.props;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?n:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}og(ag,"displayName","Legend");og(ag,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var wd={},Cd={},ey;function r_(){return ey||(ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const s=r[a],l=n(s);i.has(l)||i.set(l,s)}return Array.from(i.values())}e.uniqBy=t})(Cd)),Cd}var Sd={},ty;function RS(){return ty||(ty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Sd)),Sd}var jd={},Ed={},Pd={},ry;function n_(){return ry||(ry=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Pd)),Pd}var ny;function sg(){return ny||(ny=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n_();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Ed)),Ed}var Od={},iy;function i_(){return iy||(iy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Od)),Od}var oy;function o_(){return oy||(oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sg(),r=i_();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(jd)),jd}var kd={},Td={},ay;function a_(){return ay||(ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ng();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Td)),Td}var Md={},Rd={},Ad={},Id={},sy;function AS(){return sy||(sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Id)),Id}var Nd={},ly;function IS(){return ly||(ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Nd)),Nd}var Dd={},cy;function NS(){return cy||(cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(Dd)),Dd}var uy;function s_(){return uy||(uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AS(),r=IS(),n=NS();function i(u,f,h){return typeof h!="function"?i(u,f,()=>{}):a(u,f,function g(m,x,y,w,b,j){const P=h(m,x,y,w,b,j);return P!==void 0?!!P:a(m,x,g,j)},new Map)}function a(u,f,h,g){if(f===u)return!0;switch(typeof f){case"object":return s(u,f,h,g);case"function":return Object.keys(f).length>0?a(u,{...f},h,g):n.eq(u,f);default:return t.isObject(u)?typeof f=="string"?f==="":!0:n.eq(u,f)}}function s(u,f,h,g){if(f==null)return!0;if(Array.isArray(f))return c(u,f,h,g);if(f instanceof Map)return l(u,f,h,g);if(f instanceof Set)return d(u,f,h,g);const m=Object.keys(f);if(u==null)return m.length===0;if(m.length===0)return!0;if(g?.has(f))return g.get(f)===u;g?.set(f,u);try{for(let x=0;x<m.length;x++){const y=m[x];if(!r.isPrimitive(u)&&!(y in u)||f[y]===void 0&&u[y]!==void 0||f[y]===null&&u[y]!==null||!h(u[y],f[y],y,u,f,g))return!1}return!0}finally{g?.delete(f)}}function l(u,f,h,g){if(f.size===0)return!0;if(!(u instanceof Map))return!1;for(const[m,x]of f.entries()){const y=u.get(m);if(h(y,x,m,u,f,g)===!1)return!1}return!0}function c(u,f,h,g){if(f.length===0)return!0;if(!Array.isArray(u))return!1;const m=new Set;for(let x=0;x<f.length;x++){const y=f[x];let w=!1;for(let b=0;b<u.length;b++){if(m.has(b))continue;const j=u[b];let P=!1;if(h(j,y,x,u,f,g)&&(P=!0),P){m.add(b),w=!0;break}}if(!w)return!1}return!0}function d(u,f,h,g){return f.size===0?!0:u instanceof Set?c([...u],[...f],h,g):!1}e.isMatchWith=i,e.isSetMatch=d})(Ad)),Ad}var dy;function DS(){return dy||(dy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s_();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Rd)),Rd}var _d={},Bd={},$d={},fy;function l_(){return fy||(fy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})($d)),$d}var Ld={},py;function _S(){return py||(py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Ld)),Ld}var zd={},hy;function BS(){return hy||(hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",s="[object Symbol]",l="[object Date]",c="[object Map]",d="[object Set]",u="[object Array]",f="[object Function]",h="[object ArrayBuffer]",g="[object Object]",m="[object Error]",x="[object DataView]",y="[object Uint8Array]",w="[object Uint8ClampedArray]",b="[object Uint16Array]",j="[object Uint32Array]",P="[object BigUint64Array]",E="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",k="[object BigInt64Array]",M="[object Float32Array]",A="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=h,e.arrayTag=u,e.bigInt64ArrayTag=k,e.bigUint64ArrayTag=P,e.booleanTag=i,e.dataViewTag=x,e.dateTag=l,e.errorTag=m,e.float32ArrayTag=M,e.float64ArrayTag=A,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=O,e.int8ArrayTag=E,e.mapTag=c,e.numberTag=n,e.objectTag=g,e.regexpTag=t,e.setTag=d,e.stringTag=r,e.symbolTag=s,e.uint16ArrayTag=b,e.uint32ArrayTag=j,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=w})(zd)),zd}var Fd={},gy;function c_(){return gy||(gy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Fd)),Fd}var my;function $S(){return my||(my=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l_(),r=_S(),n=BS(),i=IS(),a=c_();function s(u,f){return l(u,void 0,u,new Map,f)}function l(u,f,h,g=new Map,m=void 0){const x=m?.(u,f,h,g);if(x!==void 0)return x;if(i.isPrimitive(u))return u;if(g.has(u))return g.get(u);if(Array.isArray(u)){const y=new Array(u.length);g.set(u,y);for(let w=0;w<u.length;w++)y[w]=l(u[w],w,h,g,m);return Object.hasOwn(u,"index")&&(y.index=u.index),Object.hasOwn(u,"input")&&(y.input=u.input),y}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const y=new RegExp(u.source,u.flags);return y.lastIndex=u.lastIndex,y}if(u instanceof Map){const y=new Map;g.set(u,y);for(const[w,b]of u)y.set(w,l(b,w,h,g,m));return y}if(u instanceof Set){const y=new Set;g.set(u,y);for(const w of u)y.add(l(w,void 0,h,g,m));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(a.isTypedArray(u)){const y=new(Object.getPrototypeOf(u)).constructor(u.length);g.set(u,y);for(let w=0;w<u.length;w++)y[w]=l(u[w],w,h,g,m);return y}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const y=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return g.set(u,y),c(y,u,h,g,m),y}if(typeof File<"u"&&u instanceof File){const y=new File([u],u.name,{type:u.type});return g.set(u,y),c(y,u,h,g,m),y}if(typeof Blob<"u"&&u instanceof Blob){const y=new Blob([u],{type:u.type});return g.set(u,y),c(y,u,h,g,m),y}if(u instanceof Error){const y=new u.constructor;return g.set(u,y),y.message=u.message,y.name=u.name,y.stack=u.stack,y.cause=u.cause,c(y,u,h,g,m),y}if(u instanceof Boolean){const y=new Boolean(u.valueOf());return g.set(u,y),c(y,u,h,g,m),y}if(u instanceof Number){const y=new Number(u.valueOf());return g.set(u,y),c(y,u,h,g,m),y}if(u instanceof String){const y=new String(u.valueOf());return g.set(u,y),c(y,u,h,g,m),y}if(typeof u=="object"&&d(u)){const y=Object.create(Object.getPrototypeOf(u));return g.set(u,y),c(y,u,h,g,m),y}return u}function c(u,f,h=u,g,m){const x=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<x.length;y++){const w=x[y],b=Object.getOwnPropertyDescriptor(u,w);(b==null||b.writable)&&(u[w]=l(f[w],w,h,g,m))}}function d(u){switch(r.getTag(u)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=l,e.copyProperties=c})(Bd)),Bd}var vy;function u_(){return vy||(vy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$S();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(_d)),_d}var yy;function d_(){return yy||(yy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DS(),r=u_();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(Md)),Md}var Vd={},Hd={},Wd={},xy;function f_(){return xy||(xy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$S(),r=BS();function n(i,a){return t.cloneDeepWith(i,(s,l,c,d)=>{const u=a?.(s,l,c,d);if(u!==void 0)return u;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case r.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}})}e.cloneDeepWith=n})(Wd)),Wd}var by;function p_(){return by||(by=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f_();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Hd)),Hd}var Ud={},Kd={},wy;function LS(){return wy||(wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Kd)),Kd}var Yd={},Cy;function h_(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_S();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Yd)),Yd}var Sy;function g_(){return Sy||(Sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kS(),r=LS(),n=h_(),i=rg();function a(s,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&s?.[l]==null?c=i.toPath(l):c=[l],c.length===0)return!1;let d=s;for(let u=0;u<c.length;u++){const f=c[u];if((d==null||!Object.hasOwn(d,f))&&!((Array.isArray(d)||n.isArguments(d))&&r.isIndex(f)&&f<d.length))return!1;d=d[f]}return!0}e.has=a})(Ud)),Ud}var jy;function m_(){return jy||(jy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DS(),r=tg(),n=p_(),i=ng(),a=g_();function s(l,c){switch(typeof l){case"object":{Object.is(l?.valueOf(),-0)&&(l="-0");break}case"number":{l=r.toKey(l);break}}return c=n.cloneDeep(c),function(d){const u=i.get(d,l);return u===void 0?a.has(d,l):c===void 0?u===void 0:t.isMatch(u,c)}}e.matchesProperty=s})(Vd)),Vd}var Ey;function v_(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RS(),r=a_(),n=d_(),i=m_();function a(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):n.matches(s);case"string":case"symbol":case"number":return r.property(s)}}e.iteratee=a})(kd)),kd}var Py;function y_(){return Py||(Py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r_(),r=RS(),n=o_(),i=v_();function a(s,l=r.identity){return n.isArrayLikeObject(s)?t.uniqBy(Array.from(s),i.iteratee(l)):[]}e.uniqBy=a})(wd)),wd}var qd,Oy;function x_(){return Oy||(Oy=1,qd=y_().uniqBy),qd}var b_=x_();const ky=wr(b_);function zS(e,t,r){return t===!0?ky(e,r):typeof t=="function"?ky(e,t):e}var Qs={exports:{}},Gd={},Js={exports:{}},Xd={};/**
@@ -1066,18 +1066,18 @@ This could lead to inefficient memoization and unnecessary re-renders.
1066
1066
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},R_=(e,t,r)=>{const{memoize:n,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:s}=e,l=n(()=>({}),...i);if(!(l.apply(null,a)===l.apply(null,s))){let d;try{throw new Error}catch(u){({stack:d}=u)}console.warn(`An input selector returned a different result when passed same arguments.
1067
1067
  This means your output selector will likely run more frequently than intended.
1068
1068
  Avoid returning a new reference inside your input selector, e.g.
1069
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:s,stack:d})}},A_={inputStabilityCheck:"once",identityFunctionCheck:"once"};function I_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function N_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function D_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Dy=e=>Array.isArray(e)?e:[e];function __(e){const t=Array.isArray(e[0])?e[0]:e;return D_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _y(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var B_=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...A_,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:M_},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:R_}}},$_=class{constructor(e){this.value=e}deref(){return this.value}},L_=typeof WeakRef<"u"?WeakRef:$_,z_=0,By=1;function el(){return{s:z_,v:void 0,o:null,p:null}}function VS(e,t={}){let r=el();const{resultEqualityCheck:n}=t;let i,a=0;function s(){let l=r;const{length:c}=arguments;for(let f=0,h=c;f<h;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let m=l.o;m===null&&(l.o=m=new WeakMap);const x=m.get(g);x===void 0?(l=el(),m.set(g,l)):l=x}else{let m=l.p;m===null&&(l.p=m=new Map);const x=m.get(g);x===void 0?(l=el(),m.set(g,l)):l=x}}const d=l;let u;if(l.s===By)u=l.v;else if(u=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new L_(u):u}return d.s=By,d.v=u,u}return s.clearCache=()=>{r=el(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function F_(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,s=0,l,c={},d=i.pop();typeof d=="object"&&(c=d,d=i.pop()),I_(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const u={...r,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:g=VS,argsMemoizeOptions:m=[],devModeChecks:x={}}=u,y=Dy(h),w=Dy(m),b=__(i),j=f(function(){return a++,d.apply(null,arguments)},...y);let P=!0;const E=g(function(){s++;const O=_y(b,arguments);if(l=j.apply(null,O),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:M}=B_(P,x);if(k.shouldRun&&k.run(d,O,l),M.shouldRun){const A=_y(b,arguments);M.run({inputSelectorResults:O,inputSelectorResultsCopy:A},{memoize:f,memoizeOptions:y},arguments)}P&&(P=!1)}return l},...w);return Object.assign(E,{resultFunc:d,memoizedResultFunc:j,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var J=F_(VS),V_=Object.assign((e,t=J)=>{N_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((s,l,c)=>(s[r[c]]=l,s),{}))},{withTypes:()=>V_}),Jd={},ef={},tf={},$y;function H_(){return $y||($y=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const s=t(n),l=t(i);if(s===l&&s===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?l-s:s-l}return 0};e.compareValues=r})(tf)),tf}var rf={},nf={},Ly;function HS(){return Ly||(Ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(nf)),nf}var zy;function W_(){return zy||(zy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HS(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||s!=null&&Object.hasOwn(s,a)}e.isKey=i})(rf)),rf}var Fy;function U_(){return Fy||(Fy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H_(),r=W_(),n=rg();function i(a,s,l,c){if(a==null)return[];l=c?void 0:l,Array.isArray(a)||(a=Object.values(a)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(g=>String(g));const d=(g,m)=>{let x=g;for(let y=0;y<m.length&&x!=null;++y)x=x[m[y]];return x},u=(g,m)=>m==null||g==null?m:typeof g=="object"&&"key"in g?Object.hasOwn(m,g.key)?m[g.key]:d(m,g.path):typeof g=="function"?g(m):Array.isArray(g)?d(m,g):typeof m=="object"?m[g]:m,f=s.map(g=>(Array.isArray(g)&&g.length===1&&(g=g[0]),g==null||typeof g=="function"||Array.isArray(g)||r.isKey(g)?g:{key:g,path:n.toPath(g)}));return a.map(g=>({original:g,criteria:f.map(m=>u(m,g))})).slice().sort((g,m)=>{for(let x=0;x<f.length;x++){const y=t.compareValues(g.criteria[x],m.criteria[x],l[x]);if(y!==0)return y}return 0}).map(g=>g.original)}e.orderBy=i})(ef)),ef}var of={},Vy;function K_(){return Vy||(Vy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),s=(l,c)=>{for(let d=0;d<l.length;d++){const u=l[d];Array.isArray(u)&&c<a?s(u,c+1):i.push(u)}};return s(r,0),i}e.flatten=t})(of)),of}var af={},Hy;function WS(){return Hy||(Hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LS(),r=sg(),n=AS(),i=NS();function a(s,l,c){return n.isObject(c)&&(typeof l=="number"&&r.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?i.eq(c[l],s):!1}e.isIterateeCall=a})(af)),af}var Wy;function Y_(){return Wy||(Wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U_(),r=K_(),n=WS();function i(a,...s){const l=s.length;return l>1&&n.isIterateeCall(a,s[0],s[1])?s=[]:l>2&&n.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(a,r.flatten(s),["asc"])}e.sortBy=i})(Jd)),Jd}var sf,Uy;function q_(){return Uy||(Uy=1,sf=Y_().sortBy),sf}var G_=q_();const Lc=wr(G_);var US=e=>e.legend.settings,X_=e=>e.legend.size,Z_=e=>e.legend.payload,Q_=J([Z_,US],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Lc(n,r):n});function J_(){return Ae(Q_)}var tl=1;function KS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=v.useState({height:0,left:0,top:0,width:0}),n=v.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),s={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(s.height-t.height)>tl||Math.abs(s.left-t.left)>tl||Math.abs(s.top-t.top)>tl||Math.abs(s.width-t.width)>tl)&&r({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Kt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eB=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ky=eB,lf=()=>Math.random().toString(36).substring(7).split("").join("."),tB={INIT:`@@redux/INIT${lf()}`,REPLACE:`@@redux/REPLACE${lf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lf()}`},Ri=tB;function us(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function rB(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(oB(e))return"date";if(iB(e))return"error";const r=nB(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function nB(e){return typeof e.constructor=="function"?e.constructor.name:null}function iB(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function oB(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Jn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=rB(e)),t}function YS(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(2):`Expected the root reducer to be a function. Instead, received: '${Jn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Kt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(1):`Expected the enhancer to be a function. Instead, received: '${Jn(r)}'`);return r(YS)(e,t)}let n=e,i=t,a=new Map,s=a,l=0,c=!1;function d(){s===a&&(s=new Map,a.forEach((y,w)=>{s.set(w,y)}))}function u(){if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(y){if(typeof y!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(4):`Expected the listener to be a function. Instead, received: '${Jn(y)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let w=!0;d();const b=l++;return s.set(b,y),function(){if(w){if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");w=!1,d(),s.delete(b),a=null}}}function h(y){if(!us(y))throw new Error(process.env.NODE_ENV==="production"?Kt(7):`Actions must be plain objects. Instead, the actual type was: '${Jn(y)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof y.type>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof y.type!="string")throw new Error(process.env.NODE_ENV==="production"?Kt(17):`Action "type" property must be a string. Instead, the actual type was: '${Jn(y.type)}'. Value was: '${y.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(9):"Reducers may not dispatch actions.");try{c=!0,i=n(i,y)}finally{c=!1}return(a=s).forEach(b=>{b()}),y}function g(y){if(typeof y!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(10):`Expected the nextReducer to be a function. Instead, received: '${Jn(y)}`);n=y,h({type:Ri.REPLACE})}function m(){const y=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?Kt(11):`Expected the observer to be an object. Instead, received: '${Jn(w)}'`);function b(){const P=w;P.next&&P.next(u())}return b(),{unsubscribe:y(b)}},[Ky](){return this}}}return h({type:Ri.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:g,[Ky]:m}}function Yy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function aB(e,t,r,n){const i=Object.keys(t),a=r&&r.type===Ri.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!us(e))return`The ${a} has unexpected type of "${Jn(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(e).filter(l=>!t.hasOwnProperty(l)&&!n[l]);if(s.forEach(l=>{n[l]=!0}),!(r&&r.type===Ri.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function sB(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ri.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Ri.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Ri.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function qS(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const l=t[s];process.env.NODE_ENV!=="production"&&typeof e[l]>"u"&&Yy(`No reducer provided for key "${l}"`),typeof e[l]=="function"&&(r[l]=e[l])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let a;try{sB(r)}catch(s){a=s}return function(l={},c){if(a)throw a;if(process.env.NODE_ENV!=="production"){const f=aB(l,r,c,i);f&&Yy(f)}let d=!1;const u={};for(let f=0;f<n.length;f++){const h=n[f],g=r[h],m=l[h],x=g(m,c);if(typeof x>"u"){const y=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?Kt(14):`When called with an action of type ${y?`"${String(y)}"`:"(unknown type)"}, the slice reducer for key "${h}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[h]=x,d=d||x!==m}return d=d||n.length!==Object.keys(l).length,d?u:l}}function Gl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function lB(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(process.env.NODE_ENV==="production"?Kt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:i.getState,dispatch:(c,...d)=>a(c,...d)},l=e.map(c=>c(s));return a=Gl(...l)(i.dispatch),{...i,dispatch:a}}}function cg(e){return us(e)&&"type"in e&&typeof e.type=="string"}var GS=Symbol.for("immer-nothing"),qy=Symbol.for("immer-draftable"),br=Symbol.for("immer-state"),cB=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function lr(e,...t){if(process.env.NODE_ENV!=="production"){const r=cB[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Va=Object.getPrototypeOf;function Bi(e){return!!e&&!!e[br]}function Rn(e){return e?XS(e)||Array.isArray(e)||!!e[qy]||!!e.constructor?.[qy]||ds(e)||Fc(e):!1}var uB=Object.prototype.constructor.toString(),Gy=new WeakMap;function XS(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Gy.get(r);return n===void 0&&(n=Function.toString.call(r),Gy.set(r,n)),n===uB}function Xl(e,t,r=!0){zc(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function zc(e){const t=e[br];return t?t.type_:Array.isArray(e)?1:ds(e)?2:Fc(e)?3:0}function _p(e,t){return zc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ZS(e,t,r){const n=zc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function dB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ds(e){return e instanceof Map}function Fc(e){return e instanceof Set}function Si(e){return e.copy_||e.base_}function Bp(e,t){if(ds(e))return new Map(e);if(Fc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=XS(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[br];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const s=i[a],l=n[s];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[s]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[s]})}return Object.create(Va(e),n)}else{const n=Va(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function ug(e,t=!1){return Vc(e)||Bi(e)||!Rn(e)||(zc(e)>1&&Object.defineProperties(e,{set:rl,add:rl,clear:rl,delete:rl}),Object.freeze(e),t&&Object.values(e).forEach(r=>ug(r,!0))),e}function fB(){lr(2)}var rl={value:fB};function Vc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var pB={};function $i(e){const t=pB[e];return t||lr(0,e),t}var Ha;function QS(){return Ha}function hB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xy(e,t){t&&($i("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $p(e){Lp(e),e.drafts_.forEach(gB),e.drafts_=null}function Lp(e){e===Ha&&(Ha=e.parent_)}function Zy(e){return Ha=hB(Ha,e)}function gB(e){const t=e[br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[br].modified_&&($p(t),lr(4)),Rn(e)&&(e=Zl(t,e),t.parent_||Ql(t,e)),t.patches_&&$i("Patches").generateReplacementPatches_(r[br].base_,e,t.patches_,t.inversePatches_)):e=Zl(t,r,[]),$p(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==GS?e:void 0}function Zl(e,t,r){if(Vc(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[br];if(!i)return Xl(t,(a,s)=>Jy(e,i,t,a,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Ql(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let s=a,l=!1;i.type_===3&&(s=new Set(a),a.clear(),l=!0),Xl(s,(c,d)=>Jy(e,i,a,c,d,r,l),n),Ql(e,a,!1),r&&e.patches_&&$i("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function Jy(e,t,r,n,i,a,s){if(i==null||typeof i!="object"&&!s)return;const l=Vc(i);if(!(l&&!s)){if(process.env.NODE_ENV!=="production"&&i===r&&lr(5),Bi(i)){const c=a&&t&&t.type_!==3&&!_p(t.assigned_,n)?a.concat(n):void 0,d=Zl(e,i,c);if(ZS(r,n,d),Bi(d))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Rn(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&l)return;Zl(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(ds(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ql(e,i)}}}function Ql(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ug(t,r)}function mB(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:QS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=dg;r&&(i=[n],a=Wa);const{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,l}var dg={get(e,t){if(t===br)return e;const r=Si(e);if(!_p(r,t))return vB(e,r,t);const n=r[t];return e.finalized_||!Rn(n)?n:n===cf(e.base_,t)?(uf(e),e.copy_[t]=Fp(n,e)):n},has(e,t){return t in Si(e)},ownKeys(e){return Reflect.ownKeys(Si(e))},set(e,t,r){const n=JS(Si(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cf(Si(e),t),a=i?.[br];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(dB(r,i)&&(r!==void 0||_p(e.base_,t)))return!0;uf(e),zp(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uf(e),zp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Si(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){lr(11)},getPrototypeOf(e){return Va(e.base_)},setPrototypeOf(){lr(12)}},Wa={};Xl(dg,(e,t)=>{Wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wa.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&lr(13),Wa.set.call(this,e,t,void 0)};Wa.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&lr(14),dg.set.call(this,e[0],t,r,e[0])};function cf(e,t){const r=e[br];return(r?Si(r):e)[t]}function vB(e,t,r){const n=JS(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function JS(e,t){if(!(t in e))return;let r=Va(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Va(r)}}function zp(e){e.modified_||(e.modified_=!0,e.parent_&&zp(e.parent_))}function uf(e){e.copy_||(e.copy_=Bp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const s=this;return function(c=a,...d){return s.produce(c,u=>r.call(this,u,...d))}}typeof r!="function"&&lr(6),n!==void 0&&typeof n!="function"&&lr(7);let i;if(Rn(t)){const a=Zy(this),s=Fp(t,void 0);let l=!0;try{i=r(s),l=!1}finally{l?$p(a):Lp(a)}return Xy(a,n),Qy(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===GS&&(i=void 0),this.autoFreeze_&&ug(i,!0),n){const a=[],s=[];$i("Patches").generateReplacementPatches_(t,i,a,s),n(a,s)}return i}else lr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,c=>t(c,...l));let n,i;return[this.produce(t,r,(s,l)=>{n=s,i=l}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Rn(e)||lr(8),Bi(e)&&(e=On(e));const t=Zy(this),r=Fp(e,void 0);return r[br].isManual_=!0,Lp(t),r}finishDraft(e,t){const r=e&&e[br];(!r||!r.isManual_)&&lr(9);const{scope_:n}=r;return Xy(n,t),Qy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=$i("Patches").applyPatches_;return Bi(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Fp(e,t){const r=ds(e)?$i("MapSet").proxyMap_(e,t):Fc(e)?$i("MapSet").proxySet_(e,t):mB(e,t);return(t?t.scope_:QS()).drafts_.push(r),r}function On(e){return Bi(e)||lr(10,e),ej(e)}function ej(e){if(!Rn(e)||Vc(e))return e;const t=e[br];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Bp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Bp(e,!0);return Xl(r,(i,a)=>{ZS(r,i,ej(a))},n),t&&(t.finalized_=!1),r}var Vp=new yB,tj=Vp.produce,xB=Vp.setUseStrictIteration.bind(Vp);function rj(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var bB=rj(),wB=rj,CB=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gl:Gl.apply(null,arguments)},SB=e=>e&&typeof e.match=="function";function $r(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>cg(n)&&n.type===e,r}function jB(e){return typeof e=="function"&&"type"in e&&SB(e)}function EB(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
1070
- Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function PB(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=jB}=e;return()=>r=>n=>(t(n)&&console.warn(EB(n.type)),r(n))}function nj(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{const a=Date.now();r+=a-i}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
1069
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:s,stack:d})}},A_={inputStabilityCheck:"once",identityFunctionCheck:"once"};function I_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function N_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function D_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Dy=e=>Array.isArray(e)?e:[e];function __(e){const t=Array.isArray(e[0])?e[0]:e;return D_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _y(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var B_=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...A_,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:M_},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:R_}}},$_=class{constructor(e){this.value=e}deref(){return this.value}},L_=typeof WeakRef<"u"?WeakRef:$_,z_=0,By=1;function el(){return{s:z_,v:void 0,o:null,p:null}}function VS(e,t={}){let r=el();const{resultEqualityCheck:n}=t;let i,a=0;function s(){let l=r;const{length:c}=arguments;for(let f=0,h=c;f<h;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let m=l.o;m===null&&(l.o=m=new WeakMap);const x=m.get(g);x===void 0?(l=el(),m.set(g,l)):l=x}else{let m=l.p;m===null&&(l.p=m=new Map);const x=m.get(g);x===void 0?(l=el(),m.set(g,l)):l=x}}const d=l;let u;if(l.s===By)u=l.v;else if(u=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new L_(u):u}return d.s=By,d.v=u,u}return s.clearCache=()=>{r=el(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function F_(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,s=0,l,c={},d=i.pop();typeof d=="object"&&(c=d,d=i.pop()),I_(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const u={...r,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:g=VS,argsMemoizeOptions:m=[],devModeChecks:x={}}=u,y=Dy(h),w=Dy(m),b=__(i),j=f(function(){return a++,d.apply(null,arguments)},...y);let P=!0;const E=g(function(){s++;const O=_y(b,arguments);if(l=j.apply(null,O),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:M}=B_(P,x);if(k.shouldRun&&k.run(d,O,l),M.shouldRun){const A=_y(b,arguments);M.run({inputSelectorResults:O,inputSelectorResultsCopy:A},{memoize:f,memoizeOptions:y},arguments)}P&&(P=!1)}return l},...w);return Object.assign(E,{resultFunc:d,memoizedResultFunc:j,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var J=F_(VS),V_=Object.assign((e,t=J)=>{N_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((s,l,c)=>(s[r[c]]=l,s),{}))},{withTypes:()=>V_}),Jd={},ef={},tf={},$y;function H_(){return $y||($y=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const s=t(n),l=t(i);if(s===l&&s===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?l-s:s-l}return 0};e.compareValues=r})(tf)),tf}var rf={},nf={},Ly;function HS(){return Ly||(Ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(nf)),nf}var zy;function W_(){return zy||(zy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HS(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||s!=null&&Object.hasOwn(s,a)}e.isKey=i})(rf)),rf}var Fy;function U_(){return Fy||(Fy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H_(),r=W_(),n=rg();function i(a,s,l,c){if(a==null)return[];l=c?void 0:l,Array.isArray(a)||(a=Object.values(a)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(g=>String(g));const d=(g,m)=>{let x=g;for(let y=0;y<m.length&&x!=null;++y)x=x[m[y]];return x},u=(g,m)=>m==null||g==null?m:typeof g=="object"&&"key"in g?Object.hasOwn(m,g.key)?m[g.key]:d(m,g.path):typeof g=="function"?g(m):Array.isArray(g)?d(m,g):typeof m=="object"?m[g]:m,f=s.map(g=>(Array.isArray(g)&&g.length===1&&(g=g[0]),g==null||typeof g=="function"||Array.isArray(g)||r.isKey(g)?g:{key:g,path:n.toPath(g)}));return a.map(g=>({original:g,criteria:f.map(m=>u(m,g))})).slice().sort((g,m)=>{for(let x=0;x<f.length;x++){const y=t.compareValues(g.criteria[x],m.criteria[x],l[x]);if(y!==0)return y}return 0}).map(g=>g.original)}e.orderBy=i})(ef)),ef}var of={},Vy;function K_(){return Vy||(Vy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),s=(l,c)=>{for(let d=0;d<l.length;d++){const u=l[d];Array.isArray(u)&&c<a?s(u,c+1):i.push(u)}};return s(r,0),i}e.flatten=t})(of)),of}var af={},Hy;function WS(){return Hy||(Hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LS(),r=sg(),n=AS(),i=NS();function a(s,l,c){return n.isObject(c)&&(typeof l=="number"&&r.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?i.eq(c[l],s):!1}e.isIterateeCall=a})(af)),af}var Wy;function Y_(){return Wy||(Wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U_(),r=K_(),n=WS();function i(a,...s){const l=s.length;return l>1&&n.isIterateeCall(a,s[0],s[1])?s=[]:l>2&&n.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(a,r.flatten(s),["asc"])}e.sortBy=i})(Jd)),Jd}var sf,Uy;function q_(){return Uy||(Uy=1,sf=Y_().sortBy),sf}var G_=q_();const Lc=wr(G_);var US=e=>e.legend.settings,X_=e=>e.legend.size,Z_=e=>e.legend.payload,Q_=J([Z_,US],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Lc(n,r):n});function J_(){return Ae(Q_)}var tl=1;function KS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=v.useState({height:0,left:0,top:0,width:0}),n=v.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),s={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(s.height-t.height)>tl||Math.abs(s.left-t.left)>tl||Math.abs(s.top-t.top)>tl||Math.abs(s.width-t.width)>tl)&&r({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Kt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var e6=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ky=e6,lf=()=>Math.random().toString(36).substring(7).split("").join("."),t6={INIT:`@@redux/INIT${lf()}`,REPLACE:`@@redux/REPLACE${lf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lf()}`},Ri=t6;function us(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function r6(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(o6(e))return"date";if(i6(e))return"error";const r=n6(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function n6(e){return typeof e.constructor=="function"?e.constructor.name:null}function i6(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function o6(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Jn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=r6(e)),t}function YS(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(2):`Expected the root reducer to be a function. Instead, received: '${Jn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Kt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(1):`Expected the enhancer to be a function. Instead, received: '${Jn(r)}'`);return r(YS)(e,t)}let n=e,i=t,a=new Map,s=a,l=0,c=!1;function d(){s===a&&(s=new Map,a.forEach((y,w)=>{s.set(w,y)}))}function u(){if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(y){if(typeof y!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(4):`Expected the listener to be a function. Instead, received: '${Jn(y)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let w=!0;d();const b=l++;return s.set(b,y),function(){if(w){if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");w=!1,d(),s.delete(b),a=null}}}function h(y){if(!us(y))throw new Error(process.env.NODE_ENV==="production"?Kt(7):`Actions must be plain objects. Instead, the actual type was: '${Jn(y)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof y.type>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof y.type!="string")throw new Error(process.env.NODE_ENV==="production"?Kt(17):`Action "type" property must be a string. Instead, the actual type was: '${Jn(y.type)}'. Value was: '${y.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?Kt(9):"Reducers may not dispatch actions.");try{c=!0,i=n(i,y)}finally{c=!1}return(a=s).forEach(b=>{b()}),y}function g(y){if(typeof y!="function")throw new Error(process.env.NODE_ENV==="production"?Kt(10):`Expected the nextReducer to be a function. Instead, received: '${Jn(y)}`);n=y,h({type:Ri.REPLACE})}function m(){const y=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?Kt(11):`Expected the observer to be an object. Instead, received: '${Jn(w)}'`);function b(){const P=w;P.next&&P.next(u())}return b(),{unsubscribe:y(b)}},[Ky](){return this}}}return h({type:Ri.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:g,[Ky]:m}}function Yy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function a6(e,t,r,n){const i=Object.keys(t),a=r&&r.type===Ri.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!us(e))return`The ${a} has unexpected type of "${Jn(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(e).filter(l=>!t.hasOwnProperty(l)&&!n[l]);if(s.forEach(l=>{n[l]=!0}),!(r&&r.type===Ri.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function s6(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ri.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Ri.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Kt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Ri.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function qS(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const l=t[s];process.env.NODE_ENV!=="production"&&typeof e[l]>"u"&&Yy(`No reducer provided for key "${l}"`),typeof e[l]=="function"&&(r[l]=e[l])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let a;try{s6(r)}catch(s){a=s}return function(l={},c){if(a)throw a;if(process.env.NODE_ENV!=="production"){const f=a6(l,r,c,i);f&&Yy(f)}let d=!1;const u={};for(let f=0;f<n.length;f++){const h=n[f],g=r[h],m=l[h],x=g(m,c);if(typeof x>"u"){const y=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?Kt(14):`When called with an action of type ${y?`"${String(y)}"`:"(unknown type)"}, the slice reducer for key "${h}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[h]=x,d=d||x!==m}return d=d||n.length!==Object.keys(l).length,d?u:l}}function Gl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function l6(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(process.env.NODE_ENV==="production"?Kt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:i.getState,dispatch:(c,...d)=>a(c,...d)},l=e.map(c=>c(s));return a=Gl(...l)(i.dispatch),{...i,dispatch:a}}}function cg(e){return us(e)&&"type"in e&&typeof e.type=="string"}var GS=Symbol.for("immer-nothing"),qy=Symbol.for("immer-draftable"),br=Symbol.for("immer-state"),c6=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function lr(e,...t){if(process.env.NODE_ENV!=="production"){const r=c6[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Va=Object.getPrototypeOf;function Bi(e){return!!e&&!!e[br]}function Rn(e){return e?XS(e)||Array.isArray(e)||!!e[qy]||!!e.constructor?.[qy]||ds(e)||Fc(e):!1}var u6=Object.prototype.constructor.toString(),Gy=new WeakMap;function XS(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Gy.get(r);return n===void 0&&(n=Function.toString.call(r),Gy.set(r,n)),n===u6}function Xl(e,t,r=!0){zc(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function zc(e){const t=e[br];return t?t.type_:Array.isArray(e)?1:ds(e)?2:Fc(e)?3:0}function _p(e,t){return zc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ZS(e,t,r){const n=zc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function d6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ds(e){return e instanceof Map}function Fc(e){return e instanceof Set}function Si(e){return e.copy_||e.base_}function Bp(e,t){if(ds(e))return new Map(e);if(Fc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=XS(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[br];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const s=i[a],l=n[s];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[s]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[s]})}return Object.create(Va(e),n)}else{const n=Va(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function ug(e,t=!1){return Vc(e)||Bi(e)||!Rn(e)||(zc(e)>1&&Object.defineProperties(e,{set:rl,add:rl,clear:rl,delete:rl}),Object.freeze(e),t&&Object.values(e).forEach(r=>ug(r,!0))),e}function f6(){lr(2)}var rl={value:f6};function Vc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var p6={};function $i(e){const t=p6[e];return t||lr(0,e),t}var Ha;function QS(){return Ha}function h6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xy(e,t){t&&($i("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $p(e){Lp(e),e.drafts_.forEach(g6),e.drafts_=null}function Lp(e){e===Ha&&(Ha=e.parent_)}function Zy(e){return Ha=h6(Ha,e)}function g6(e){const t=e[br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[br].modified_&&($p(t),lr(4)),Rn(e)&&(e=Zl(t,e),t.parent_||Ql(t,e)),t.patches_&&$i("Patches").generateReplacementPatches_(r[br].base_,e,t.patches_,t.inversePatches_)):e=Zl(t,r,[]),$p(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==GS?e:void 0}function Zl(e,t,r){if(Vc(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[br];if(!i)return Xl(t,(a,s)=>Jy(e,i,t,a,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Ql(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let s=a,l=!1;i.type_===3&&(s=new Set(a),a.clear(),l=!0),Xl(s,(c,d)=>Jy(e,i,a,c,d,r,l),n),Ql(e,a,!1),r&&e.patches_&&$i("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function Jy(e,t,r,n,i,a,s){if(i==null||typeof i!="object"&&!s)return;const l=Vc(i);if(!(l&&!s)){if(process.env.NODE_ENV!=="production"&&i===r&&lr(5),Bi(i)){const c=a&&t&&t.type_!==3&&!_p(t.assigned_,n)?a.concat(n):void 0,d=Zl(e,i,c);if(ZS(r,n,d),Bi(d))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Rn(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&l)return;Zl(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(ds(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ql(e,i)}}}function Ql(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ug(t,r)}function m6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:QS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=dg;r&&(i=[n],a=Wa);const{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,l}var dg={get(e,t){if(t===br)return e;const r=Si(e);if(!_p(r,t))return v6(e,r,t);const n=r[t];return e.finalized_||!Rn(n)?n:n===cf(e.base_,t)?(uf(e),e.copy_[t]=Fp(n,e)):n},has(e,t){return t in Si(e)},ownKeys(e){return Reflect.ownKeys(Si(e))},set(e,t,r){const n=JS(Si(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cf(Si(e),t),a=i?.[br];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(d6(r,i)&&(r!==void 0||_p(e.base_,t)))return!0;uf(e),zp(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uf(e),zp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Si(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){lr(11)},getPrototypeOf(e){return Va(e.base_)},setPrototypeOf(){lr(12)}},Wa={};Xl(dg,(e,t)=>{Wa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wa.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&lr(13),Wa.set.call(this,e,t,void 0)};Wa.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&lr(14),dg.set.call(this,e[0],t,r,e[0])};function cf(e,t){const r=e[br];return(r?Si(r):e)[t]}function v6(e,t,r){const n=JS(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function JS(e,t){if(!(t in e))return;let r=Va(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Va(r)}}function zp(e){e.modified_||(e.modified_=!0,e.parent_&&zp(e.parent_))}function uf(e){e.copy_||(e.copy_=Bp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const s=this;return function(c=a,...d){return s.produce(c,u=>r.call(this,u,...d))}}typeof r!="function"&&lr(6),n!==void 0&&typeof n!="function"&&lr(7);let i;if(Rn(t)){const a=Zy(this),s=Fp(t,void 0);let l=!0;try{i=r(s),l=!1}finally{l?$p(a):Lp(a)}return Xy(a,n),Qy(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===GS&&(i=void 0),this.autoFreeze_&&ug(i,!0),n){const a=[],s=[];$i("Patches").generateReplacementPatches_(t,i,a,s),n(a,s)}return i}else lr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,c=>t(c,...l));let n,i;return[this.produce(t,r,(s,l)=>{n=s,i=l}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Rn(e)||lr(8),Bi(e)&&(e=On(e));const t=Zy(this),r=Fp(e,void 0);return r[br].isManual_=!0,Lp(t),r}finishDraft(e,t){const r=e&&e[br];(!r||!r.isManual_)&&lr(9);const{scope_:n}=r;return Xy(n,t),Qy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=$i("Patches").applyPatches_;return Bi(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Fp(e,t){const r=ds(e)?$i("MapSet").proxyMap_(e,t):Fc(e)?$i("MapSet").proxySet_(e,t):m6(e,t);return(t?t.scope_:QS()).drafts_.push(r),r}function On(e){return Bi(e)||lr(10,e),ej(e)}function ej(e){if(!Rn(e)||Vc(e))return e;const t=e[br];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Bp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Bp(e,!0);return Xl(r,(i,a)=>{ZS(r,i,ej(a))},n),t&&(t.finalized_=!1),r}var Vp=new y6,tj=Vp.produce,x6=Vp.setUseStrictIteration.bind(Vp);function rj(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var b6=rj(),w6=rj,C6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gl:Gl.apply(null,arguments)},S6=e=>e&&typeof e.match=="function";function $r(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>cg(n)&&n.type===e,r}function j6(e){return typeof e=="function"&&"type"in e&&S6(e)}function E6(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
1070
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function P6(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=j6}=e;return()=>r=>n=>(t(n)&&console.warn(E6(n.type)),r(n))}function nj(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{const a=Date.now();r+=a-i}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
1071
1071
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
1072
- It is disabled in production builds, so you don't need to worry about that.`)}}}var ij=class xa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xa.prototype)}static get[Symbol.species](){return xa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xa(...t[0].concat(this)):new xa(...t.concat(this))}};function ex(e){return Rn(e)?tj(e,()=>{}):e}function nl(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function OB(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function kB(e,t,r){const n=oj(e,t,r);return{detectMutations(){return aj(e,t,n,r)}}}function oj(e,t=[],r,n="",i=new Set){const a={value:r};if(!e(r)&&!i.has(r)){i.add(r),a.children={};for(const s in r){const l=n?n+"."+s:s;t.length&&t.indexOf(l)!==-1||(a.children[s]=oj(e,t,r[s],l))}}return a}function aj(e,t=[],r,n,i=!1,a=""){const s=r?r.value:void 0,l=s===n;if(i&&!l&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(s)||e(n))return{wasMutated:!1};const c={};for(let u in r.children)c[u]=!0;for(let u in n)c[u]=!0;const d=t.length>0;for(let u in c){const f=a?a+"."+u:u;if(d&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const h=aj(e,t,r.children[u],n[u],l,f);if(h.wasMutated)return h}return{wasMutated:!1}}function TB(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(l,c,d,u){return JSON.stringify(l,r(c,u),d)},r=function(l,c){let d=[],u=[];return c||(c=function(f,h){return d[0]===h?"[Circular ~]":"[Circular ~."+u.slice(0,d.indexOf(h)).join(".")+"]"}),function(f,h){if(d.length>0){var g=d.indexOf(this);~g?d.splice(g+1):d.push(this),~g?u.splice(g,1/0,f):u.push(f),~d.indexOf(h)&&(h=c.call(this,f,h))}else d.push(h);return l==null?h:l.call(this,f,h)}},{isImmutable:n=OB,ignoredPaths:i,warnAfter:a=32}=e;const s=kB.bind(null,n,i);return({getState:l})=>{let c=l(),d=s(c),u;return f=>h=>{const g=nj(a,"ImmutableStateInvariantMiddleware");g.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ue(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(h);return g.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ue(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(h)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),g.warnIfExceeded(),m}}}}function sj(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||us(e)}function Hp(e,t="",r=sj,n,i=[],a){let s;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||a?.has(e))return!1;const l=n!=null?n(e):Object.entries(e),c=i.length>0;for(const[d,u]of l){const f=t?t+"."+d:d;if(!(c&&i.some(g=>g instanceof RegExp?g.test(f):f===g))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=Hp(u,f,r,n,i,a),s))return s}}return a&&lj(e)&&a.add(e),!1}function lj(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!lj(t))return!1;return!0}function MB(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=sj,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:s=32,ignoreState:l=!1,ignoreActions:c=!1,disableCache:d=!1}=e,u=!d&&WeakSet?new WeakSet:void 0;return f=>h=>g=>{if(!cg(g))return h(g);const m=h(g),x=nj(s,"SerializableStateInvariantMiddleware");return!c&&!(n.length&&n.indexOf(g.type)!==-1)&&x.measureTime(()=>{const y=Hp(g,"",t,r,i,u);if(y){const{keyPath:w,value:b}=y;console.error(`A non-serializable value was detected in an action, in the path: \`${w}\`. Value:`,b,`
1072
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var ij=class xa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xa.prototype)}static get[Symbol.species](){return xa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xa(...t[0].concat(this)):new xa(...t.concat(this))}};function ex(e){return Rn(e)?tj(e,()=>{}):e}function nl(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function O6(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function k6(e,t,r){const n=oj(e,t,r);return{detectMutations(){return aj(e,t,n,r)}}}function oj(e,t=[],r,n="",i=new Set){const a={value:r};if(!e(r)&&!i.has(r)){i.add(r),a.children={};for(const s in r){const l=n?n+"."+s:s;t.length&&t.indexOf(l)!==-1||(a.children[s]=oj(e,t,r[s],l))}}return a}function aj(e,t=[],r,n,i=!1,a=""){const s=r?r.value:void 0,l=s===n;if(i&&!l&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(s)||e(n))return{wasMutated:!1};const c={};for(let u in r.children)c[u]=!0;for(let u in n)c[u]=!0;const d=t.length>0;for(let u in c){const f=a?a+"."+u:u;if(d&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const h=aj(e,t,r.children[u],n[u],l,f);if(h.wasMutated)return h}return{wasMutated:!1}}function T6(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(l,c,d,u){return JSON.stringify(l,r(c,u),d)},r=function(l,c){let d=[],u=[];return c||(c=function(f,h){return d[0]===h?"[Circular ~]":"[Circular ~."+u.slice(0,d.indexOf(h)).join(".")+"]"}),function(f,h){if(d.length>0){var g=d.indexOf(this);~g?d.splice(g+1):d.push(this),~g?u.splice(g,1/0,f):u.push(f),~d.indexOf(h)&&(h=c.call(this,f,h))}else d.push(h);return l==null?h:l.call(this,f,h)}},{isImmutable:n=O6,ignoredPaths:i,warnAfter:a=32}=e;const s=k6.bind(null,n,i);return({getState:l})=>{let c=l(),d=s(c),u;return f=>h=>{const g=nj(a,"ImmutableStateInvariantMiddleware");g.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ue(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(h);return g.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ue(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(h)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),g.warnIfExceeded(),m}}}}function sj(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||us(e)}function Hp(e,t="",r=sj,n,i=[],a){let s;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||a?.has(e))return!1;const l=n!=null?n(e):Object.entries(e),c=i.length>0;for(const[d,u]of l){const f=t?t+"."+d:d;if(!(c&&i.some(g=>g instanceof RegExp?g.test(f):f===g))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=Hp(u,f,r,n,i,a),s))return s}}return a&&lj(e)&&a.add(e),!1}function lj(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!lj(t))return!1;return!0}function M6(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=sj,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:s=32,ignoreState:l=!1,ignoreActions:c=!1,disableCache:d=!1}=e,u=!d&&WeakSet?new WeakSet:void 0;return f=>h=>g=>{if(!cg(g))return h(g);const m=h(g),x=nj(s,"SerializableStateInvariantMiddleware");return!c&&!(n.length&&n.indexOf(g.type)!==-1)&&x.measureTime(()=>{const y=Hp(g,"",t,r,i,u);if(y){const{keyPath:w,value:b}=y;console.error(`A non-serializable value was detected in an action, in the path: \`${w}\`. Value:`,b,`
1073
1073
  Take a look at the logic that dispatched this action: `,g,`
1074
1074
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
1075
1075
  (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),l||(x.measureTime(()=>{const y=f.getState(),w=Hp(y,"",t,r,a,u);if(w){const{keyPath:b,value:j}=w;console.error(`A non-serializable value was detected in the state, in the path: \`${b}\`. Value:`,j,`
1076
1076
  Take a look at the reducer(s) handling this action type: ${g.type}.
1077
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),x.warnIfExceeded()),m}}}function il(e){return typeof e=="boolean"}var RB=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new ij;if(r&&(il(r)?s.push(bB):s.push(wB(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let l={};il(n)||(l=n),s.unshift(TB(l))}if(i){let l={};il(i)||(l=i),s.push(MB(l))}if(a){let l={};il(a)||(l=a),s.unshift(PB(l))}}return s},cj="RTK_autoBatch",er=()=>e=>({payload:e,meta:{[cj]:!0}}),tx=e=>t=>{setTimeout(t,e)},uj=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tx(10):e.type==="callback"?e.queueNotification:tx(e.timeout),d=()=>{s=!1,a&&(a=!1,l.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>i&&u(),h=n.subscribe(f);return l.add(u),()=>{h(),l.delete(u)}},dispatch(u){try{return i=!u?.meta?.[cj],a=!i,a&&(s||(s=!0,c(d))),n.dispatch(u)}finally{i=!0}}})},AB=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new ij(e);return n&&i.push(uj(typeof n=="object"?n:void 0)),i};function IB(e){const t=RB(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(us(r))c=qS(r);else throw new Error(process.env.NODE_ENV==="production"?Ue(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(2):"`middleware` field must be a callback");let d;if(typeof n=="function"){if(d=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?Ue(3):"when using a middleware builder function, an array of middleware must be returned")}else d=t();if(process.env.NODE_ENV!=="production"&&d.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Ue(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let x=new Set;d.forEach(y=>{if(x.has(y))throw new Error(process.env.NODE_ENV==="production"?Ue(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");x.add(y)})}let u=Gl;i&&(u=CB({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=lB(...d),h=AB(f);if(process.env.NODE_ENV!=="production"&&l&&typeof l!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(5):"`enhancers` field must be a callback");let g=typeof l=="function"?l(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Ue(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Ue(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!g.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...g);return YS(c,s,m)}function dj(e){const t={},r=[];let n;const i={addCase(a,s){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Ue(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Ue(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const l=typeof a=="string"?a:a.type;if(!l)throw new Error(process.env.NODE_ENV==="production"?Ue(28):"`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error(process.env.NODE_ENV==="production"?Ue(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${l}'`);return t[l]=s,i},addAsyncThunk(a,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[a.pending.type]=s.pending),s.rejected&&(t[a.rejected.type]=s.rejected),s.fulfilled&&(t[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}xB(!1);function NB(e){return typeof e=="function"}function DB(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Ue(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=dj(t),a;if(NB(e))a=()=>ex(e());else{const l=ex(e);a=()=>l}function s(l=a(),c){let d=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[i]),d.reduce((u,f)=>{if(f)if(Bi(u)){const g=f(u,c);return g===void 0?u:g}else{if(Rn(u))return tj(u,h=>f(h,c));{const h=f(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},l)}return s.getInitialState=a,s}var _B="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",BB=(e=21)=>{let t="",r=e;for(;r--;)t+=_B[Math.random()*64|0];return t},$B=Symbol.for("rtk-slice-createasyncthunk");function LB(e,t){return`${e}/${t}`}function zB({creators:e}={}){const t=e?.asyncThunk?.[$B];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof n.reducers=="function"?n.reducers(VB()):n.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(j,P){const E=typeof j=="string"?j:j.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Ue(12):"`context.addCase` cannot be called with an empty action type");if(E in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Ue(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return c.sliceCaseReducersByType[E]=P,d},addMatcher(j,P){return c.sliceMatchers.push({matcher:j,reducer:P}),d},exposeAction(j,P){return c.actionCreators[j]=P,d},exposeCaseReducer(j,P){return c.sliceCaseReducersByName[j]=P,d}};l.forEach(j=>{const P=s[j],E={reducerName:j,type:LB(i,j),createNotation:typeof n.reducers=="function"};WB(P)?KB(E,P,d,t):HB(E,P,d)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Ue(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[j={},P=[],E=void 0]=typeof n.extraReducers=="function"?dj(n.extraReducers):[n.extraReducers],S={...j,...c.sliceCaseReducersByType};return DB(n.initialState,O=>{for(let k in S)O.addCase(k,S[k]);for(let k of c.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of P)O.addMatcher(k.matcher,k.reducer);E&&O.addDefaultCase(E)})}const f=j=>j,h=new Map,g=new WeakMap;let m;function x(j,P){return m||(m=u()),m(j,P)}function y(){return m||(m=u()),m.getInitialState()}function w(j,P=!1){function E(O){let k=O[j];if(typeof k>"u"){if(P)k=nl(g,E,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ue(15):"selectSlice returned undefined for an uninjected slice reducer")}return k}function S(O=f){const k=nl(h,P,()=>new WeakMap);return nl(k,O,()=>{const M={};for(const[A,_]of Object.entries(n.selectors??{}))M[A]=FB(_,O,()=>nl(g,O,y),P);return M})}return{reducerPath:j,getSelectors:S,get selectors(){return S(E)},selectSlice:E}}const b={name:i,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...w(a),injectInto(j,{reducerPath:P,...E}={}){const S=P??a;return j.inject({reducerPath:S,reducer:x},E),{...b,...w(S,!0)}}};return b}}function FB(e,t,r,n){function i(a,...s){let l=t(a);if(typeof l>"u"){if(n)l=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ue(16):"selectState returned undefined for an uninjected slice reducer")}return e(l,...s)}return i.unwrapped=e,i}var Cr=zB();function VB(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function HB({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!UB(n))throw new Error(process.env.NODE_ENV==="production"?Ue(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?$r(e,s):$r(e))}function WB(e){return e._reducerDefinitionType==="asyncThunk"}function UB(e){return e._reducerDefinitionType==="reducerWithPrepare"}function KB({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:s,pending:l,rejected:c,settled:d,options:u}=r,f=i(e,a,u);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),c&&n.addCase(f.rejected,c),d&&n.addMatcher(f.settled,d),n.exposeCaseReducer(t,{fulfilled:s||ol,pending:l||ol,rejected:c||ol,settled:d||ol})}function ol(){}var YB="task",fj="listener",pj="completed",fg="cancelled",qB=`task-${fg}`,GB=`task-${pj}`,Wp=`${fj}-${fg}`,XB=`${fj}-${pj}`,Hc=class{constructor(e){this.code=e,this.message=`${YB} ${fg} (reason: ${e})`}name="TaskAbortError";message},pg=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Ue(32):`${t} is not a function`)},Jl=()=>{},hj=(e,t=Jl)=>(e.catch(t),e),gj=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ai=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ii=e=>{if(e.aborted){const{reason:t}=e;throw new Hc(t)}};function mj(e,t){let r=Jl;return new Promise((n,i)=>{const a=()=>i(new Hc(e.reason));if(e.aborted){a();return}r=gj(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Jl})}var ZB=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Hc?"cancelled":"rejected",error:r}}finally{t?.()}},ec=e=>t=>hj(mj(e,t).then(r=>(Ii(e),r))),vj=e=>{const t=ec(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:uo}=Object,rx={},fs="listenerMiddleware",QB=(e,t)=>{const r=n=>gj(e,()=>Ai(n,e.reason));return(n,i)=>{pg(n,"taskExecutor");const a=new AbortController;r(a);const s=ZB(async()=>{Ii(e),Ii(a.signal);const l=await n({pause:ec(a.signal),delay:vj(a.signal),signal:a.signal});return Ii(a.signal),l},()=>Ai(a,GB));return i?.autoJoin&&t.push(s.catch(Jl)),{result:ec(e)(s),cancel(){Ai(a,qB)}}}},JB=(e,t)=>{const r=async(n,i)=>{Ii(t);let a=()=>{};const l=[new Promise((c,d)=>{let u=e({predicate:n,effect:(f,h)=>{h.unsubscribe(),c([f,h.getState(),h.getOriginalState()])}});a=()=>{u(),d()}})];i!=null&&l.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await mj(t,Promise.race(l));return Ii(t),c}finally{a()}};return(n,i)=>hj(r(n,i))},yj=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=$r(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(21):"Creating or removing a listener requires one of the known fields for matching an action");return pg(a,"options.listener"),{predicate:i,type:t,effect:a}},xj=uo(e=>{const{type:t,predicate:r,effect:n}=yj(e);return{id:BB(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Ue(22):"Unsubscribe not initialized")}}},{withTypes:()=>xj}),nx=(e,t)=>{const{type:r,effect:n,predicate:i}=yj(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Up=e=>{e.pending.forEach(t=>{Ai(t,Wp)})},e6=(e,t)=>()=>{for(const r of t.keys())Up(r);e.clear()},ix=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},bj=uo($r(`${fs}/add`),{withTypes:()=>bj}),t6=$r(`${fs}/removeAll`),wj=uo($r(`${fs}/remove`),{withTypes:()=>wj}),r6=(...e)=>{console.error(`${fs}/error`,...e)},ps=(e={})=>{const t=new Map,r=new Map,n=g=>{const m=r.get(g)??0;r.set(g,m+1)},i=g=>{const m=r.get(g)??1;m===1?r.delete(g):r.set(g,m-1)},{extra:a,onError:s=r6}=e;pg(s,"onError");const l=g=>(g.unsubscribe=()=>t.delete(g.id),t.set(g.id,g),m=>{g.unsubscribe(),m?.cancelActive&&Up(g)}),c=g=>{const m=nx(t,g)??xj(g);return l(m)};uo(c,{withTypes:()=>c});const d=g=>{const m=nx(t,g);return m&&(m.unsubscribe(),g.cancelActive&&Up(m)),!!m};uo(d,{withTypes:()=>d});const u=async(g,m,x,y)=>{const w=new AbortController,b=JB(c,w.signal),j=[];try{g.pending.add(w),n(g),await Promise.resolve(g.effect(m,uo({},x,{getOriginalState:y,condition:(P,E)=>b(P,E).then(Boolean),take:b,delay:vj(w.signal),pause:ec(w.signal),extra:a,signal:w.signal,fork:QB(w.signal,j),unsubscribe:g.unsubscribe,subscribe:()=>{t.set(g.id,g)},cancelActiveListeners:()=>{g.pending.forEach((P,E,S)=>{P!==w&&(Ai(P,Wp),S.delete(P))})},cancel:()=>{Ai(w,Wp),g.pending.delete(w)},throwIfCancelled:()=>{Ii(w.signal)}})))}catch(P){P instanceof Hc||ix(s,P,{raisedBy:"effect"})}finally{await Promise.all(j),Ai(w,XB),i(g),g.pending.delete(w)}},f=e6(t,r);return{middleware:g=>m=>x=>{if(!cg(x))return m(x);if(bj.match(x))return c(x.payload);if(t6.match(x)){f();return}if(wj.match(x))return d(x.payload);let y=g.getState();const w=()=>{if(y===rx)throw new Error(process.env.NODE_ENV==="production"?Ue(23):`${fs}: getOriginalState can only be called synchronously`);return y};let b;try{if(b=m(x),t.size>0){const j=g.getState(),P=Array.from(t.values());for(const E of P){let S=!1;try{S=E.predicate(x,j,y)}catch(O){S=!1,ix(s,O,{raisedBy:"predicate"})}S&&u(E,x,g,w)}}}finally{y=rx}return b},startListening:c,stopListening:d,clearListeners:f}};function Ue(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var n6={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Cj=Cr({name:"chartLayout",initialState:n6,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:i6,setLayout:o6,setChartSize:a6,setScale:s6}=Cj.actions,l6=Cj.reducer;function ox(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ax(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ox(Object(r),!0).forEach(function(n){c6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c6(e,t,r){return(t=u6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u6(e){var t=d6(e,"string");return typeof t=="symbol"?t:t+""}function d6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tc=Math.PI/180,f6=e=>e*180/Math.PI,jt=(e,t,r,n)=>({x:e+Math.cos(-tc*n)*r,y:t+Math.sin(-tc*n)*r}),Sj=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},p6=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},h6=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,s=p6({x:r,y:n},{x:i,y:a});if(s<=0)return{radius:s,angle:0};var l=(r-i)/s,c=Math.acos(l);return n>a&&(c=2*Math.PI-c),{radius:s,angle:f6(c),angleInRadian:c}},g6=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},m6=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return e+s*360},v6=(e,t)=>{var{x:r,y:n}=e,{radius:i,angle:a}=h6({x:r,y:n},t),{innerRadius:s,outerRadius:l}=t;if(i<s||i>l||i===0)return null;var{startAngle:c,endAngle:d}=g6(t),u=a,f;if(c<=d){for(;u>d;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=d}else{for(;u>c;)u-=360;for(;u<d;)u+=360;f=u>=d&&u<=c}return f?ax(ax({},t),{},{radius:i,angle:m6(u,t)}):null};function jj(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function sx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sx(Object(r),!0).forEach(function(n){y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y6(e,t,r){return(t=x6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x6(e){var t=b6(e,"string");return typeof t=="symbol"?t:t+""}function b6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e,t,r){return Ft(e)||Ft(t)?r:pn(t)?_i(e,t,r):typeof t=="function"?t(e):r}var w6=(e,t,r,n,i)=>{var a,s=-1,l=(a=t?.length)!==null&&a!==void 0?a:0;if(l<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<l;c++){var d=c>0?r[c-1].coordinate:r[l-1].coordinate,u=r[c].coordinate,f=c>=l-1?r[0].coordinate:r[c+1].coordinate,h=void 0;if(Lt(u-d)!==Lt(f-u)){var g=[];if(Lt(f-u)===Lt(i[1]-i[0])){h=f;var m=u+i[1]-i[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{h=d;var x=f+i[1]-i[0];g[0]=Math.min(u,(x+u)/2),g[1]=Math.max(u,(x+u)/2)}var y=[Math.min(u,(h+u)/2),Math.max(u,(h+u)/2)];if(e>y[0]&&e<=y[1]||e>=g[0]&&e<=g[1]){({index:s}=r[c]);break}}else{var w=Math.min(d,f),b=Math.max(d,f);if(e>(w+u)/2&&e<=(b+u)/2){({index:s}=r[c]);break}}}else if(t){for(var j=0;j<l;j++)if(j===0&&e<=(t[j].coordinate+t[j+1].coordinate)/2||j>0&&j<l-1&&e>(t[j].coordinate+t[j-1].coordinate)/2&&e<=(t[j].coordinate+t[j+1].coordinate)/2||j===l-1&&e>(t[j].coordinate+t[j-1].coordinate)/2){({index:s}=t[j]);break}}return s},C6=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:s,layout:l}=t;if((l==="vertical"||l==="horizontal"&&s==="middle")&&a!=="center"&&Ne(e[a]))return Ir(Ir({},e),{},{[a]:e[a]+(n||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&s!=="middle"&&Ne(e[s]))return Ir(Ir({},e),{},{[s]:e[s]+(i||0)})}return e},Wi=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",Ej=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var i,a,s=e.map(l=>(l.coordinate===t&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate));return i||s.push(t),a||s.push(r),s},Pj=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:s,realScaleType:l,isCategorical:c,categoricalDomain:d,tickCount:u,ticks:f,niceTicks:h,axisType:g}=e;if(!s)return null;var m=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=i==="category"&&s.bandwidth?s.bandwidth()/m:0;if(x=g==="angleAxis"&&a&&a.length>=2?Lt(a[0]-a[1])*2*x:x,f||h){var y=(f||h||[]).map((w,b)=>{var j=n?n.indexOf(w):w;return{coordinate:s(j)+x,value:w,offset:x,index:b}});return y.filter(w=>!Br(w.coordinate))}return c&&d?d.map((w,b)=>({coordinate:s(w)+x,value:w,index:b,offset:x})):s.ticks&&u!=null?s.ticks(u).map((w,b)=>({coordinate:s(w)+x,value:w,offset:x,index:b})):s.domain().map((w,b)=>({coordinate:s(w)+x,value:n?n[w]:w,index:b,offset:x}))},lx=1e-4,S6=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-lx,a=Math.max(n[0],n[1])+lx,s=e(t[0]),l=e(t[r-1]);(s<i||s>a||l<i||l>a)&&e.domain([t[0],t[r-1]])}},j6=(e,t)=>{if(!t||t.length!==2||!Ne(t[0])||!Ne(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Ne(e[0])||e[0]<r)&&(i[0]=r),(!Ne(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},E6=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,s=0;s<t;++s){var l=Br(e[s][r][1])?e[s][r][0]:e[s][r][1];l>=0?(e[s][r][0]=i,e[s][r][1]=i+l,i=e[s][r][1]):(e[s][r][0]=a,e[s][r][1]=a+l,a=e[s][r][1])}},P6=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var s=Br(e[a][r][1])?e[a][r][0]:e[a][r][1];s>=0?(e[a][r][0]=i,e[a][r][1]=i+s,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},O6={sign:E6,expand:AD,none:wo,silhouette:ID,wiggle:ND,positive:P6},k6=(e,t,r)=>{var n=O6[r],i=RD().keys(t).value((a,s)=>+ht(a,s,0)).order(Ip).offset(n);return i(e)};function T6(e){return e==null?void 0:String(e)}var cx=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:s}=e;if(t.type==="category")return r[s]?r[s].coordinate+n:null;var l=ht(a,t.dataKey,t.scale.domain()[s]);return Ft(l)?null:t.scale(l)-i/2+n},M6=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},R6=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},A6=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],I6=(e,t,r)=>{if(e!=null)return A6(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:s}=a,l=s.reduce((c,d)=>{var u=jj(d,t,r),f=R6(u);return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},ux=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dx=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hg=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Lc(t,u=>u.coordinate),a=1/0,s=1,l=i.length;s<l;s++){var c=i[s],d=i[s-1];a=Math.min((c.coordinate||0)-(d.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function fx(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return Ir(Ir({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Wc(e,t){if(e)return String(e);if(typeof t=="string")return t}function N6(e,t,r,n,i){if(r==="horizontal"||r==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return n?v6({x:e,y:t},n):null}var D6=(e,t,r,n)=>{var i=t.find(d=>d&&d.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:s}=n;return Ir(Ir(Ir({},n),jt(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,{angle:c}=n;return Ir(Ir(Ir({},n),jt(n.cx,n.cy,l,c)),{},{angle:c,radius:l})}return{x:0,y:0}},_6=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,_n=e=>e.layout.width,Bn=e=>e.layout.height,B6=e=>e.layout.scale,Oj=e=>e.layout.margin,Uc=J(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Kc=J(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),kj="data-recharts-item-index",Tj="data-recharts-item-data-key",hs=60;function px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?px(Object(r),!0).forEach(function(n){$6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $6(e,t,r){return(t=L6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L6(e){var t=z6(e,"string");return typeof t=="symbol"?t:t+""}function z6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F6=e=>e.brush.height;function V6(e){var t=Kc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:hs;return r+i}return r},0)}function H6(e){var t=Kc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:hs;return r+i}return r},0)}function W6(e){var t=Uc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function U6(e){var t=Uc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Rt=J([_n,Bn,Oj,F6,V6,H6,W6,U6,US,X_],(e,t,r,n,i,a,s,l,c,d)=>{var u={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+s,bottom:(r.bottom||0)+l},h=al(al({},f),u),g=h.bottom;h.bottom+=n,h=C6(h,c,d);var m=e-h.left-h.right,x=t-h.top-h.bottom;return al(al({brushBottom:g},h),{},{width:Math.max(m,0),height:Math.max(x,0)})}),K6=J(Rt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),gg=J(_n,Bn,(e,t)=>({x:0,y:0,width:e,height:t})),Y6=v.createContext(null),Sr=()=>v.useContext(Y6)!=null,Yc=e=>e.brush,qc=J([Yc,Rt,Oj],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Ne(e.width)?e.width:t.width})),df={},ff={},pf={},hx;function q6(){return hx||(hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let s,l=null;const c=a!=null&&a.includes("leading"),d=a==null||a.includes("trailing"),u=()=>{l!==null&&(r.apply(s,l),s=void 0,l=null)},f=()=>{d&&u(),x()};let h=null;const g=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},n)},m=()=>{h!==null&&(clearTimeout(h),h=null)},x=()=>{m(),s=void 0,l=null},y=()=>{u()},w=function(...b){if(i?.aborted)return;s=this,l=b;const j=h==null;g(),c&&j&&u()};return w.schedule=g,w.cancel=x,w.flush=y,i?.addEventListener("abort",x,{once:!0}),w}e.debounce=t})(pf)),pf}var gx;function G6(){return gx||(gx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=q6();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:s=!1,trailing:l=!0,maxWait:c}=a,d=Array(2);s&&(d[0]="leading"),l&&(d[1]="trailing");let u,f=null;const h=t.debounce(function(...x){u=n.apply(this,x),f=null},i,{edges:d}),g=function(...x){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(u=n.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,x),u)},m=()=>(h.flush(),u);return g.cancel=h.cancel,g.flush=m,g}e.debounce=r})(ff)),ff}var mx;function X6(){return mx||(mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G6();function r(n,i=0,a={}){const{leading:s=!0,trailing:l=!0}=a;return t.debounce(n,i,{leading:s,maxWait:i,trailing:l})}e.throttle=r})(df)),df}var hf,vx;function Z6(){return vx||(vx=1,hf=X6().throttle),hf}var Q6=Z6();const J6=wr(Q6);var e3=process.env.NODE_ENV!=="production",rc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(e3&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(r.replace(/%s/g,()=>i[s++]))}},Mj=(e,t,r)=>{var{width:n="100%",height:i="100%",aspect:a,maxHeight:s}=r,l=Mn(n)?e:Number(n),c=Mn(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),s&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},t3={width:0,height:0,overflow:"visible"},r3={width:0,overflowX:"visible"},n3={height:0,overflowY:"visible"},i3={},o3=e=>{var{width:t,height:r}=e,n=Mn(t),i=Mn(r);return n&&i?t3:n?r3:i?n3:i3};function a3(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i="100%",a="100%"):i===void 0?i=n&&n>0?void 0:"100%":a===void 0&&(a=n&&n>0?void 0:"100%"),{width:i,height:a}}function Qt(e){return Number.isFinite(e)}function Co(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kp.apply(null,arguments)}function yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(n){s3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s3(e,t,r){return(t=l3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l3(e){var t=c3(e,"string");return typeof t=="symbol"?t:t+""}function c3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rj=v.createContext({width:-1,height:-1});function Aj(e){var{children:t,width:r,height:n}=e,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return r<=0||n<=0?null:C.createElement(Rj.Provider,{value:i},t)}var mg=()=>v.useContext(Rj),u3=v.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:a,minWidth:s=0,minHeight:l,maxHeight:c,children:d,debounce:u=0,id:f,className:h,onResize:g,style:m={}}=e,x=v.useRef(null),y=v.useRef();y.current=g,v.useImperativeHandle(t,()=>x.current);var[w,b]=v.useState({containerWidth:n.width,containerHeight:n.height}),j=v.useCallback((k,M)=>{b(A=>{var _=Math.round(k),D=Math.round(M);return A.containerWidth===_&&A.containerHeight===D?A:{containerWidth:_,containerHeight:D}})},[]);v.useEffect(()=>{var k=D=>{var B,{width:H,height:T}=D[0].contentRect;j(H,T),(B=y.current)===null||B===void 0||B.call(y,H,T)};u>0&&(k=J6(k,u,{trailing:!0,leading:!1}));var M=new ResizeObserver(k),{width:A,height:_}=x.current.getBoundingClientRect();return j(A,_),M.observe(x.current),()=>{M.disconnect()}},[j,u]);var{containerWidth:P,containerHeight:E}=w;rc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:O}=Mj(P,E,{width:i,height:a,aspect:r,maxHeight:c});return rc(S>0||O>0,`The width(%s) and height(%s) of chart should be greater than 0,
1077
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),x.warnIfExceeded()),m}}}function il(e){return typeof e=="boolean"}var R6=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new ij;if(r&&(il(r)?s.push(b6):s.push(w6(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let l={};il(n)||(l=n),s.unshift(T6(l))}if(i){let l={};il(i)||(l=i),s.push(M6(l))}if(a){let l={};il(a)||(l=a),s.unshift(P6(l))}}return s},cj="RTK_autoBatch",er=()=>e=>({payload:e,meta:{[cj]:!0}}),tx=e=>t=>{setTimeout(t,e)},uj=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tx(10):e.type==="callback"?e.queueNotification:tx(e.timeout),d=()=>{s=!1,a&&(a=!1,l.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>i&&u(),h=n.subscribe(f);return l.add(u),()=>{h(),l.delete(u)}},dispatch(u){try{return i=!u?.meta?.[cj],a=!i,a&&(s||(s=!0,c(d))),n.dispatch(u)}finally{i=!0}}})},A6=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new ij(e);return n&&i.push(uj(typeof n=="object"?n:void 0)),i};function I6(e){const t=R6(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(us(r))c=qS(r);else throw new Error(process.env.NODE_ENV==="production"?Ue(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(2):"`middleware` field must be a callback");let d;if(typeof n=="function"){if(d=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?Ue(3):"when using a middleware builder function, an array of middleware must be returned")}else d=t();if(process.env.NODE_ENV!=="production"&&d.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Ue(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let x=new Set;d.forEach(y=>{if(x.has(y))throw new Error(process.env.NODE_ENV==="production"?Ue(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");x.add(y)})}let u=Gl;i&&(u=C6({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=l6(...d),h=A6(f);if(process.env.NODE_ENV!=="production"&&l&&typeof l!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(5):"`enhancers` field must be a callback");let g=typeof l=="function"?l(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Ue(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Ue(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!g.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...g);return YS(c,s,m)}function dj(e){const t={},r=[];let n;const i={addCase(a,s){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Ue(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Ue(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const l=typeof a=="string"?a:a.type;if(!l)throw new Error(process.env.NODE_ENV==="production"?Ue(28):"`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error(process.env.NODE_ENV==="production"?Ue(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${l}'`);return t[l]=s,i},addAsyncThunk(a,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[a.pending.type]=s.pending),s.rejected&&(t[a.rejected.type]=s.rejected),s.fulfilled&&(t[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Ue(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}x6(!1);function N6(e){return typeof e=="function"}function D6(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Ue(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=dj(t),a;if(N6(e))a=()=>ex(e());else{const l=ex(e);a=()=>l}function s(l=a(),c){let d=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[i]),d.reduce((u,f)=>{if(f)if(Bi(u)){const g=f(u,c);return g===void 0?u:g}else{if(Rn(u))return tj(u,h=>f(h,c));{const h=f(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},l)}return s.getInitialState=a,s}var _6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",B6=(e=21)=>{let t="",r=e;for(;r--;)t+=_6[Math.random()*64|0];return t},$6=Symbol.for("rtk-slice-createasyncthunk");function L6(e,t){return`${e}/${t}`}function z6({creators:e}={}){const t=e?.asyncThunk?.[$6];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof n.reducers=="function"?n.reducers(V6()):n.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(j,P){const E=typeof j=="string"?j:j.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Ue(12):"`context.addCase` cannot be called with an empty action type");if(E in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Ue(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return c.sliceCaseReducersByType[E]=P,d},addMatcher(j,P){return c.sliceMatchers.push({matcher:j,reducer:P}),d},exposeAction(j,P){return c.actionCreators[j]=P,d},exposeCaseReducer(j,P){return c.sliceCaseReducersByName[j]=P,d}};l.forEach(j=>{const P=s[j],E={reducerName:j,type:L6(i,j),createNotation:typeof n.reducers=="function"};W6(P)?K6(E,P,d,t):H6(E,P,d)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Ue(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[j={},P=[],E=void 0]=typeof n.extraReducers=="function"?dj(n.extraReducers):[n.extraReducers],S={...j,...c.sliceCaseReducersByType};return D6(n.initialState,O=>{for(let k in S)O.addCase(k,S[k]);for(let k of c.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of P)O.addMatcher(k.matcher,k.reducer);E&&O.addDefaultCase(E)})}const f=j=>j,h=new Map,g=new WeakMap;let m;function x(j,P){return m||(m=u()),m(j,P)}function y(){return m||(m=u()),m.getInitialState()}function w(j,P=!1){function E(O){let k=O[j];if(typeof k>"u"){if(P)k=nl(g,E,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ue(15):"selectSlice returned undefined for an uninjected slice reducer")}return k}function S(O=f){const k=nl(h,P,()=>new WeakMap);return nl(k,O,()=>{const M={};for(const[A,_]of Object.entries(n.selectors??{}))M[A]=F6(_,O,()=>nl(g,O,y),P);return M})}return{reducerPath:j,getSelectors:S,get selectors(){return S(E)},selectSlice:E}}const b={name:i,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...w(a),injectInto(j,{reducerPath:P,...E}={}){const S=P??a;return j.inject({reducerPath:S,reducer:x},E),{...b,...w(S,!0)}}};return b}}function F6(e,t,r,n){function i(a,...s){let l=t(a);if(typeof l>"u"){if(n)l=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ue(16):"selectState returned undefined for an uninjected slice reducer")}return e(l,...s)}return i.unwrapped=e,i}var Cr=z6();function V6(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function H6({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!U6(n))throw new Error(process.env.NODE_ENV==="production"?Ue(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?$r(e,s):$r(e))}function W6(e){return e._reducerDefinitionType==="asyncThunk"}function U6(e){return e._reducerDefinitionType==="reducerWithPrepare"}function K6({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:s,pending:l,rejected:c,settled:d,options:u}=r,f=i(e,a,u);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),c&&n.addCase(f.rejected,c),d&&n.addMatcher(f.settled,d),n.exposeCaseReducer(t,{fulfilled:s||ol,pending:l||ol,rejected:c||ol,settled:d||ol})}function ol(){}var Y6="task",fj="listener",pj="completed",fg="cancelled",q6=`task-${fg}`,G6=`task-${pj}`,Wp=`${fj}-${fg}`,X6=`${fj}-${pj}`,Hc=class{constructor(e){this.code=e,this.message=`${Y6} ${fg} (reason: ${e})`}name="TaskAbortError";message},pg=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Ue(32):`${t} is not a function`)},Jl=()=>{},hj=(e,t=Jl)=>(e.catch(t),e),gj=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ai=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ii=e=>{if(e.aborted){const{reason:t}=e;throw new Hc(t)}};function mj(e,t){let r=Jl;return new Promise((n,i)=>{const a=()=>i(new Hc(e.reason));if(e.aborted){a();return}r=gj(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Jl})}var Z6=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Hc?"cancelled":"rejected",error:r}}finally{t?.()}},ec=e=>t=>hj(mj(e,t).then(r=>(Ii(e),r))),vj=e=>{const t=ec(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:uo}=Object,rx={},fs="listenerMiddleware",Q6=(e,t)=>{const r=n=>gj(e,()=>Ai(n,e.reason));return(n,i)=>{pg(n,"taskExecutor");const a=new AbortController;r(a);const s=Z6(async()=>{Ii(e),Ii(a.signal);const l=await n({pause:ec(a.signal),delay:vj(a.signal),signal:a.signal});return Ii(a.signal),l},()=>Ai(a,G6));return i?.autoJoin&&t.push(s.catch(Jl)),{result:ec(e)(s),cancel(){Ai(a,q6)}}}},J6=(e,t)=>{const r=async(n,i)=>{Ii(t);let a=()=>{};const l=[new Promise((c,d)=>{let u=e({predicate:n,effect:(f,h)=>{h.unsubscribe(),c([f,h.getState(),h.getOriginalState()])}});a=()=>{u(),d()}})];i!=null&&l.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await mj(t,Promise.race(l));return Ii(t),c}finally{a()}};return(n,i)=>hj(r(n,i))},yj=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=$r(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Ue(21):"Creating or removing a listener requires one of the known fields for matching an action");return pg(a,"options.listener"),{predicate:i,type:t,effect:a}},xj=uo(e=>{const{type:t,predicate:r,effect:n}=yj(e);return{id:B6(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Ue(22):"Unsubscribe not initialized")}}},{withTypes:()=>xj}),nx=(e,t)=>{const{type:r,effect:n,predicate:i}=yj(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Up=e=>{e.pending.forEach(t=>{Ai(t,Wp)})},eB=(e,t)=>()=>{for(const r of t.keys())Up(r);e.clear()},ix=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},bj=uo($r(`${fs}/add`),{withTypes:()=>bj}),tB=$r(`${fs}/removeAll`),wj=uo($r(`${fs}/remove`),{withTypes:()=>wj}),rB=(...e)=>{console.error(`${fs}/error`,...e)},ps=(e={})=>{const t=new Map,r=new Map,n=g=>{const m=r.get(g)??0;r.set(g,m+1)},i=g=>{const m=r.get(g)??1;m===1?r.delete(g):r.set(g,m-1)},{extra:a,onError:s=rB}=e;pg(s,"onError");const l=g=>(g.unsubscribe=()=>t.delete(g.id),t.set(g.id,g),m=>{g.unsubscribe(),m?.cancelActive&&Up(g)}),c=g=>{const m=nx(t,g)??xj(g);return l(m)};uo(c,{withTypes:()=>c});const d=g=>{const m=nx(t,g);return m&&(m.unsubscribe(),g.cancelActive&&Up(m)),!!m};uo(d,{withTypes:()=>d});const u=async(g,m,x,y)=>{const w=new AbortController,b=J6(c,w.signal),j=[];try{g.pending.add(w),n(g),await Promise.resolve(g.effect(m,uo({},x,{getOriginalState:y,condition:(P,E)=>b(P,E).then(Boolean),take:b,delay:vj(w.signal),pause:ec(w.signal),extra:a,signal:w.signal,fork:Q6(w.signal,j),unsubscribe:g.unsubscribe,subscribe:()=>{t.set(g.id,g)},cancelActiveListeners:()=>{g.pending.forEach((P,E,S)=>{P!==w&&(Ai(P,Wp),S.delete(P))})},cancel:()=>{Ai(w,Wp),g.pending.delete(w)},throwIfCancelled:()=>{Ii(w.signal)}})))}catch(P){P instanceof Hc||ix(s,P,{raisedBy:"effect"})}finally{await Promise.all(j),Ai(w,X6),i(g),g.pending.delete(w)}},f=eB(t,r);return{middleware:g=>m=>x=>{if(!cg(x))return m(x);if(bj.match(x))return c(x.payload);if(tB.match(x)){f();return}if(wj.match(x))return d(x.payload);let y=g.getState();const w=()=>{if(y===rx)throw new Error(process.env.NODE_ENV==="production"?Ue(23):`${fs}: getOriginalState can only be called synchronously`);return y};let b;try{if(b=m(x),t.size>0){const j=g.getState(),P=Array.from(t.values());for(const E of P){let S=!1;try{S=E.predicate(x,j,y)}catch(O){S=!1,ix(s,O,{raisedBy:"predicate"})}S&&u(E,x,g,w)}}}finally{y=rx}return b},startListening:c,stopListening:d,clearListeners:f}};function Ue(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var nB={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Cj=Cr({name:"chartLayout",initialState:nB,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:iB,setLayout:oB,setChartSize:aB,setScale:sB}=Cj.actions,lB=Cj.reducer;function ox(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ax(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ox(Object(r),!0).forEach(function(n){cB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cB(e,t,r){return(t=uB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uB(e){var t=dB(e,"string");return typeof t=="symbol"?t:t+""}function dB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tc=Math.PI/180,fB=e=>e*180/Math.PI,jt=(e,t,r,n)=>({x:e+Math.cos(-tc*n)*r,y:t+Math.sin(-tc*n)*r}),Sj=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},pB=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},hB=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,s=pB({x:r,y:n},{x:i,y:a});if(s<=0)return{radius:s,angle:0};var l=(r-i)/s,c=Math.acos(l);return n>a&&(c=2*Math.PI-c),{radius:s,angle:fB(c),angleInRadian:c}},gB=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},mB=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return e+s*360},vB=(e,t)=>{var{x:r,y:n}=e,{radius:i,angle:a}=hB({x:r,y:n},t),{innerRadius:s,outerRadius:l}=t;if(i<s||i>l||i===0)return null;var{startAngle:c,endAngle:d}=gB(t),u=a,f;if(c<=d){for(;u>d;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=d}else{for(;u>c;)u-=360;for(;u<d;)u+=360;f=u>=d&&u<=c}return f?ax(ax({},t),{},{radius:i,angle:mB(u,t)}):null};function jj(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function sx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sx(Object(r),!0).forEach(function(n){yB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yB(e,t,r){return(t=xB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xB(e){var t=bB(e,"string");return typeof t=="symbol"?t:t+""}function bB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e,t,r){return Ft(e)||Ft(t)?r:pn(t)?_i(e,t,r):typeof t=="function"?t(e):r}var wB=(e,t,r,n,i)=>{var a,s=-1,l=(a=t?.length)!==null&&a!==void 0?a:0;if(l<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<l;c++){var d=c>0?r[c-1].coordinate:r[l-1].coordinate,u=r[c].coordinate,f=c>=l-1?r[0].coordinate:r[c+1].coordinate,h=void 0;if(Lt(u-d)!==Lt(f-u)){var g=[];if(Lt(f-u)===Lt(i[1]-i[0])){h=f;var m=u+i[1]-i[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{h=d;var x=f+i[1]-i[0];g[0]=Math.min(u,(x+u)/2),g[1]=Math.max(u,(x+u)/2)}var y=[Math.min(u,(h+u)/2),Math.max(u,(h+u)/2)];if(e>y[0]&&e<=y[1]||e>=g[0]&&e<=g[1]){({index:s}=r[c]);break}}else{var w=Math.min(d,f),b=Math.max(d,f);if(e>(w+u)/2&&e<=(b+u)/2){({index:s}=r[c]);break}}}else if(t){for(var j=0;j<l;j++)if(j===0&&e<=(t[j].coordinate+t[j+1].coordinate)/2||j>0&&j<l-1&&e>(t[j].coordinate+t[j-1].coordinate)/2&&e<=(t[j].coordinate+t[j+1].coordinate)/2||j===l-1&&e>(t[j].coordinate+t[j-1].coordinate)/2){({index:s}=t[j]);break}}return s},CB=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:s,layout:l}=t;if((l==="vertical"||l==="horizontal"&&s==="middle")&&a!=="center"&&Ne(e[a]))return Ir(Ir({},e),{},{[a]:e[a]+(n||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&s!=="middle"&&Ne(e[s]))return Ir(Ir({},e),{},{[s]:e[s]+(i||0)})}return e},Wi=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",Ej=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var i,a,s=e.map(l=>(l.coordinate===t&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate));return i||s.push(t),a||s.push(r),s},Pj=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:s,realScaleType:l,isCategorical:c,categoricalDomain:d,tickCount:u,ticks:f,niceTicks:h,axisType:g}=e;if(!s)return null;var m=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=i==="category"&&s.bandwidth?s.bandwidth()/m:0;if(x=g==="angleAxis"&&a&&a.length>=2?Lt(a[0]-a[1])*2*x:x,f||h){var y=(f||h||[]).map((w,b)=>{var j=n?n.indexOf(w):w;return{coordinate:s(j)+x,value:w,offset:x,index:b}});return y.filter(w=>!Br(w.coordinate))}return c&&d?d.map((w,b)=>({coordinate:s(w)+x,value:w,index:b,offset:x})):s.ticks&&u!=null?s.ticks(u).map((w,b)=>({coordinate:s(w)+x,value:w,offset:x,index:b})):s.domain().map((w,b)=>({coordinate:s(w)+x,value:n?n[w]:w,index:b,offset:x}))},lx=1e-4,SB=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-lx,a=Math.max(n[0],n[1])+lx,s=e(t[0]),l=e(t[r-1]);(s<i||s>a||l<i||l>a)&&e.domain([t[0],t[r-1]])}},jB=(e,t)=>{if(!t||t.length!==2||!Ne(t[0])||!Ne(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Ne(e[0])||e[0]<r)&&(i[0]=r),(!Ne(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},EB=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,s=0;s<t;++s){var l=Br(e[s][r][1])?e[s][r][0]:e[s][r][1];l>=0?(e[s][r][0]=i,e[s][r][1]=i+l,i=e[s][r][1]):(e[s][r][0]=a,e[s][r][1]=a+l,a=e[s][r][1])}},PB=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var s=Br(e[a][r][1])?e[a][r][0]:e[a][r][1];s>=0?(e[a][r][0]=i,e[a][r][1]=i+s,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},OB={sign:EB,expand:AD,none:wo,silhouette:ID,wiggle:ND,positive:PB},kB=(e,t,r)=>{var n=OB[r],i=RD().keys(t).value((a,s)=>+ht(a,s,0)).order(Ip).offset(n);return i(e)};function TB(e){return e==null?void 0:String(e)}var cx=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:s}=e;if(t.type==="category")return r[s]?r[s].coordinate+n:null;var l=ht(a,t.dataKey,t.scale.domain()[s]);return Ft(l)?null:t.scale(l)-i/2+n},MB=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},RB=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},AB=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],IB=(e,t,r)=>{if(e!=null)return AB(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:s}=a,l=s.reduce((c,d)=>{var u=jj(d,t,r),f=RB(u);return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},ux=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dx=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hg=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Lc(t,u=>u.coordinate),a=1/0,s=1,l=i.length;s<l;s++){var c=i[s],d=i[s-1];a=Math.min((c.coordinate||0)-(d.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function fx(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return Ir(Ir({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Wc(e,t){if(e)return String(e);if(typeof t=="string")return t}function NB(e,t,r,n,i){if(r==="horizontal"||r==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return n?vB({x:e,y:t},n):null}var DB=(e,t,r,n)=>{var i=t.find(d=>d&&d.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:s}=n;return Ir(Ir(Ir({},n),jt(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,{angle:c}=n;return Ir(Ir(Ir({},n),jt(n.cx,n.cy,l,c)),{},{angle:c,radius:l})}return{x:0,y:0}},_B=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,_n=e=>e.layout.width,Bn=e=>e.layout.height,BB=e=>e.layout.scale,Oj=e=>e.layout.margin,Uc=J(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Kc=J(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),kj="data-recharts-item-index",Tj="data-recharts-item-data-key",hs=60;function px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?px(Object(r),!0).forEach(function(n){$B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $B(e,t,r){return(t=LB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LB(e){var t=zB(e,"string");return typeof t=="symbol"?t:t+""}function zB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FB=e=>e.brush.height;function VB(e){var t=Kc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:hs;return r+i}return r},0)}function HB(e){var t=Kc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:hs;return r+i}return r},0)}function WB(e){var t=Uc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function UB(e){var t=Uc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Rt=J([_n,Bn,Oj,FB,VB,HB,WB,UB,US,X_],(e,t,r,n,i,a,s,l,c,d)=>{var u={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+s,bottom:(r.bottom||0)+l},h=al(al({},f),u),g=h.bottom;h.bottom+=n,h=CB(h,c,d);var m=e-h.left-h.right,x=t-h.top-h.bottom;return al(al({brushBottom:g},h),{},{width:Math.max(m,0),height:Math.max(x,0)})}),KB=J(Rt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),gg=J(_n,Bn,(e,t)=>({x:0,y:0,width:e,height:t})),YB=v.createContext(null),Sr=()=>v.useContext(YB)!=null,Yc=e=>e.brush,qc=J([Yc,Rt,Oj],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Ne(e.width)?e.width:t.width})),df={},ff={},pf={},hx;function qB(){return hx||(hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let s,l=null;const c=a!=null&&a.includes("leading"),d=a==null||a.includes("trailing"),u=()=>{l!==null&&(r.apply(s,l),s=void 0,l=null)},f=()=>{d&&u(),x()};let h=null;const g=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},n)},m=()=>{h!==null&&(clearTimeout(h),h=null)},x=()=>{m(),s=void 0,l=null},y=()=>{u()},w=function(...b){if(i?.aborted)return;s=this,l=b;const j=h==null;g(),c&&j&&u()};return w.schedule=g,w.cancel=x,w.flush=y,i?.addEventListener("abort",x,{once:!0}),w}e.debounce=t})(pf)),pf}var gx;function GB(){return gx||(gx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qB();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:s=!1,trailing:l=!0,maxWait:c}=a,d=Array(2);s&&(d[0]="leading"),l&&(d[1]="trailing");let u,f=null;const h=t.debounce(function(...x){u=n.apply(this,x),f=null},i,{edges:d}),g=function(...x){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(u=n.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,x),u)},m=()=>(h.flush(),u);return g.cancel=h.cancel,g.flush=m,g}e.debounce=r})(ff)),ff}var mx;function XB(){return mx||(mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GB();function r(n,i=0,a={}){const{leading:s=!0,trailing:l=!0}=a;return t.debounce(n,i,{leading:s,maxWait:i,trailing:l})}e.throttle=r})(df)),df}var hf,vx;function ZB(){return vx||(vx=1,hf=XB().throttle),hf}var QB=ZB();const JB=wr(QB);var e3=process.env.NODE_ENV!=="production",rc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(e3&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(r.replace(/%s/g,()=>i[s++]))}},Mj=(e,t,r)=>{var{width:n="100%",height:i="100%",aspect:a,maxHeight:s}=r,l=Mn(n)?e:Number(n),c=Mn(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),s&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},t3={width:0,height:0,overflow:"visible"},r3={width:0,overflowX:"visible"},n3={height:0,overflowY:"visible"},i3={},o3=e=>{var{width:t,height:r}=e,n=Mn(t),i=Mn(r);return n&&i?t3:n?r3:i?n3:i3};function a3(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i="100%",a="100%"):i===void 0?i=n&&n>0?void 0:"100%":a===void 0&&(a=n&&n>0?void 0:"100%"),{width:i,height:a}}function Qt(e){return Number.isFinite(e)}function Co(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kp.apply(null,arguments)}function yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(n){s3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s3(e,t,r){return(t=l3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l3(e){var t=c3(e,"string");return typeof t=="symbol"?t:t+""}function c3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rj=v.createContext({width:-1,height:-1});function Aj(e){var{children:t,width:r,height:n}=e,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return r<=0||n<=0?null:C.createElement(Rj.Provider,{value:i},t)}var mg=()=>v.useContext(Rj),u3=v.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:a,minWidth:s=0,minHeight:l,maxHeight:c,children:d,debounce:u=0,id:f,className:h,onResize:g,style:m={}}=e,x=v.useRef(null),y=v.useRef();y.current=g,v.useImperativeHandle(t,()=>x.current);var[w,b]=v.useState({containerWidth:n.width,containerHeight:n.height}),j=v.useCallback((k,M)=>{b(A=>{var _=Math.round(k),D=Math.round(M);return A.containerWidth===_&&A.containerHeight===D?A:{containerWidth:_,containerHeight:D}})},[]);v.useEffect(()=>{var k=D=>{var B,{width:H,height:T}=D[0].contentRect;j(H,T),(B=y.current)===null||B===void 0||B.call(y,H,T)};u>0&&(k=JB(k,u,{trailing:!0,leading:!1}));var M=new ResizeObserver(k),{width:A,height:_}=x.current.getBoundingClientRect();return j(A,_),M.observe(x.current),()=>{M.disconnect()}},[j,u]);var{containerWidth:P,containerHeight:E}=w;rc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:O}=Mj(P,E,{width:i,height:a,aspect:r,maxHeight:c});return rc(S>0||O>0,`The width(%s) and height(%s) of chart should be greater than 0,
1078
1078
  please check the style of container, or the props width(%s) and height(%s),
1079
1079
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
1080
- height and width.`,S,O,i,a,s,l,r),C.createElement("div",{id:f?"".concat(f):void 0,className:Qe("recharts-responsive-container",h),style:xx(xx({},m),{},{width:i,height:a,minWidth:s,minHeight:l,maxHeight:c}),ref:x},C.createElement("div",{style:o3({width:i,height:a})},C.createElement(Aj,{width:S,height:O},d)))}),sl=v.forwardRef((e,t)=>{var r=mg();if(Co(r.width)&&Co(r.height))return e.children;var{width:n,height:i}=a3({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=Mj(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Ne(a)&&Ne(s)?C.createElement(Aj,{width:a,height:s},e.children):C.createElement(u3,Kp({},e,{width:n,height:i,ref:t}))}),Gc=()=>{var e,t=Sr(),r=Ae(K6),n=Ae(qc),i=(e=Ae(Yc))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},d3={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Ij=()=>{var e;return(e=Ae(Rt))!==null&&e!==void 0?e:d3},vg=()=>Ae(_n),yg=()=>Ae(Bn),f3=()=>Ae(e=>e.layout.margin),We=e=>e.layout.layoutType,xg=()=>Ae(We),Xc=e=>{var t=ut(),r=Sr(),{width:n,height:i}=e,a=mg(),s=n,l=i;return a&&(s=a.width>0?a.width:n,l=a.height>0?a.height:i),v.useEffect(()=>{!r&&Co(s)&&Co(l)&&t(a6({width:s,height:l}))},[t,r,s,l]),null},p3={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Nj=Cr({name:"legend",initialState:p3,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:er()},removeLegendPayload:{reducer(e,t){var r=On(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:er()}}}),{setLegendSize:bx,setLegendSettings:h3,addLegendPayload:Dj,removeLegendPayload:_j}=Nj.actions,g3=Nj.reducer,m3=["contextPayload"];function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(null,arguments)}function wx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function So(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wx(Object(r),!0).forEach(function(n){bg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bg(e,t,r){return(t=v3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v3(e){var t=y3(e,"string");return typeof t=="symbol"?t:t+""}function y3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x3(e,t){if(e==null)return{};var r,n,i=b3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function b3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function w3(e){return e.value}function C3(e){var{contextPayload:t}=e,r=x3(e,m3),n=zS(t,e.payloadUniqBy,w3),i=So(So({},r),{},{payload:n});return C.isValidElement(e.content)?C.cloneElement(e.content,i):typeof e.content=="function"?C.createElement(e.content,i):C.createElement(ag,i)}function S3(e,t,r,n,i,a){var{layout:s,align:l,verticalAlign:c}=t,d,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l==="center"&&s==="vertical"?d={left:((n||0)-a.width)/2}:d=l==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?u={top:((i||0)-a.height)/2}:u=c==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),So(So({},d),u)}function j3(e){var t=ut();return v.useEffect(()=>{t(h3(e))},[t,e]),null}function E3(e){var t=ut();return v.useEffect(()=>(t(bx(e)),()=>{t(bx({width:0,height:0}))}),[t,e]),null}function P3(e){var t=J_(),r=tD(),n=f3(),{width:i,height:a,wrapperStyle:s,portal:l}=e,[c,d]=KS([t]),u=vg(),f=yg();if(u==null||f==null)return null;var h=u-(n.left||0)-(n.right||0),g=Zc.getWidthOrHeight(e.layout,a,i,h),m=l?s:So(So({position:"absolute",width:g?.width||i||"auto",height:g?.height||a||"auto"},S3(s,e,n,u,f,c)),s),x=l??r;if(x==null)return null;var y=C.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:d},C.createElement(j3,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),C.createElement(E3,{width:c.width,height:c.height}),C.createElement(C3,Yp({},e,g,{margin:n,chartWidth:u,chartHeight:f,contextPayload:t})));return Oa.createPortal(y,x)}class Zc extends v.PureComponent{static getWidthOrHeight(t,r,n,i){return t==="vertical"&&Ne(r)?{height:r}:t==="horizontal"?{width:n||i}:null}render(){return C.createElement(P3,this.props)}}bg(Zc,"displayName","Legend");bg(Zc,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(null,arguments)}function Cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(r),!0).forEach(function(n){O3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O3(e,t,r){return(t=k3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k3(e){var t=T3(e,"string");return typeof t=="symbol"?t:t+""}function T3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M3(e){return Array.isArray(e)&&pn(e[0])&&pn(e[1])?e.join(" ~ "):e}var R3=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:d,label:u,labelFormatter:f,accessibilityLayer:h=!1}=e,g=()=>{if(a&&a.length){var E={padding:0,margin:0},S=(l?Lc(a,l):a).map((O,k)=>{if(O.type==="none")return null;var M=O.formatter||s||M3,{value:A,name:_}=O,D=A,B=_;if(M){var H=M(A,_,O,k,a);if(Array.isArray(H))[D,B]=H;else if(H!=null)D=H;else return null}var T=gf({display:"block",paddingTop:4,paddingBottom:4,color:O.color||"#000"},n);return C.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:T},pn(B)?C.createElement("span",{className:"recharts-tooltip-item-name"},B):null,pn(B)?C.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,C.createElement("span",{className:"recharts-tooltip-item-value"},D),C.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:E},S)}return null},m=gf({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),x=gf({margin:0},i),y=!Ft(u),w=y?u:"",b=Qe("recharts-default-tooltip",c),j=Qe("recharts-tooltip-label",d);y&&f&&a!==void 0&&a!==null&&(w=f(u,a));var P=h?{role:"status","aria-live":"assertive"}:{};return C.createElement("div",qp({className:b,style:m},P),C.createElement("p",{className:j,style:x},C.isValidElement(w)?w:"".concat(w)),g())},da="recharts-tooltip-wrapper",A3={visibility:"hidden"};function I3(e){var{coordinate:t,translateX:r,translateY:n}=e;return Qe(da,{["".concat(da,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(da,"-left")]:Ne(r)&&t&&Ne(t.x)&&r<t.x,["".concat(da,"-bottom")]:Ne(n)&&t&&Ne(t.y)&&n>=t.y,["".concat(da,"-top")]:Ne(n)&&t&&Ne(t.y)&&n<t.y})}function Sx(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:s,tooltipDimension:l,viewBox:c,viewBoxDimension:d}=e;if(a&&Ne(a[n]))return a[n];var u=r[n]-l-(i>0?i:0),f=r[n]+i;if(t[n])return s[n]?u:f;var h=c[n];if(h==null)return 0;if(s[n]){var g=u,m=h;return g<m?Math.max(f,h):Math.max(u,h)}if(d==null)return 0;var x=f+l,y=h+d;return x>y?Math.max(u,h):Math.max(f,h)}function N3(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function D3(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,d,u,f;return s.height>0&&s.width>0&&r?(u=Sx({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=Sx({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=N3({translateX:u,translateY:f,useTranslate3d:l})):d=A3,{cssProperties:d,cssClasses:I3({translateX:u,translateY:f,coordinate:r})}}function jx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(r),!0).forEach(function(n){Gp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gp(e,t,r){return(t=_3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _3(e){var t=B3(e,"string");return typeof t=="symbol"?t:t+""}function B3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class $3 extends v.PureComponent{constructor(){super(...arguments),Gp(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Gp(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:s,hasPayload:l,isAnimationActive:c,offset:d,position:u,reverseDirection:f,useTranslate3d:h,viewBox:g,wrapperStyle:m,lastBoundingBox:x,innerRef:y,hasPortalFromProps:w}=this.props,{cssClasses:b,cssProperties:j}=D3({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:d,position:u,reverseDirection:f,tooltipBox:{height:x.height,width:x.width},useTranslate3d:h,viewBox:g}),P=w?{}:ll(ll({transition:c&&t?"transform ".concat(n,"ms ").concat(i):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),E=ll(ll({},P),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},m);return C.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:E,ref:y},a)}}var L3=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Ui={devToolsEnabled:!1,isSsr:L3()},Bj=()=>Ae(e=>e.rootProps.accessibilityLayer);function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(null,arguments)}function Ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Px(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){z3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z3(e,t,r){return(t=F3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F3(e){var t=V3(e,"string");return typeof t=="symbol"?t:t+""}function V3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ox={curveBasisClosed:bD,curveBasisOpen:wD,curveBasis:xD,curveBumpX:oD,curveBumpY:aD,curveLinearClosed:CD,curveLinear:Bc,curveMonotoneX:SD,curveMonotoneY:jD,curveNatural:ED,curveStep:PD,curveStepAfter:kD,curveStepBefore:OD},cl=e=>Qt(e.x)&&Qt(e.y),fa=e=>e.x,pa=e=>e.y,H3=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(ls(e));return(r==="curveMonotone"||r==="curveBump")&&t?Ox["".concat(r).concat(t==="vertical"?"Y":"X")]:Ox[r]||Bc},W3=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,s=H3(t,i),l=a?r.filter(cl):r,c;if(Array.isArray(n)){var d=a?n.filter(f=>cl(f)):n,u=l.map((f,h)=>Px(Px({},f),{},{base:d[h]}));return i==="vertical"?c=Zs().y(pa).x1(fa).x0(f=>f.base.x):c=Zs().x(fa).y1(pa).y0(f=>f.base.y),c.defined(cl).curve(s),c(u)}return i==="vertical"&&Ne(n)?c=Zs().y(pa).x1(fa).x0(n):Ne(n)?c=Zs().x(fa).y1(pa).y0(n):c=vS().x(fa).y(pa),c.defined(cl).curve(s),c(l)},$j=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?W3(e):n;return C.createElement("path",Xp({},Qr(e),ZD(e),{className:Qe("recharts-curve",t),d:a===null?void 0:a,ref:i}))},U3=["x","y","top","left","width","height","className"];function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zp.apply(null,arguments)}function kx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kx(Object(r),!0).forEach(function(n){Y3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y3(e,t,r){return(t=q3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=G3(e,"string");return typeof t=="symbol"?t:t+""}function G3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X3(e,t){if(e==null)return{};var r,n,i=Z3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Z3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Q3=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),J3=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=X3(e,U3),d=K3({x:t,y:r,top:n,left:i,width:a,height:s},c);return!Ne(t)||!Ne(r)||!Ne(a)||!Ne(s)||!Ne(n)||!Ne(i)?null:C.createElement("path",Zp({},_r(d),{className:Qe("recharts-cross",l),d:Q3(t,r,a,s,n,i)}))};function e5(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Tx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(r),!0).forEach(function(n){r5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r5(e,t,r){return(t=n5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n5(e){var t=i5(e,"string");return typeof t=="symbol"?t:t+""}function i5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ir(e,t){var r=t5({},e),n=t,i=Object.keys(t),a=i.reduce((s,l)=>(s[l]===void 0&&n[l]!==void 0&&(s[l]=n[l]),s),r);return a}function o5(){}function a5(e){return e!=null}function Mx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(r),!0).forEach(function(n){s5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s5(e,t,r){return(t=l5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=c5(e,"string");return typeof t=="symbol"?t:t+""}function c5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u5=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Lj=(e,t,r)=>e.map(n=>"".concat(u5(n)," ").concat(t,"ms ").concat(r)).join(","),d5=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Ua=(e,t)=>Object.keys(t).reduce((r,n)=>Rx(Rx({},r),{},{[n]:e(n,t[n])}),{});function Ax(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ax(Object(r),!0).forEach(function(n){f5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ax(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f5(e,t,r){return(t=p5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p5(e){var t=h5(e,"string");return typeof t=="symbol"?t:t+""}function h5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nc=(e,t,r)=>e+(t-e)*r,Qp=e=>{var{from:t,to:r}=e;return t!==r},zj=(e,t,r)=>{var n=Ua((i,a)=>{if(Qp(a)){var[s,l]=e(a.from,a.to,a.velocity);return Yt(Yt({},a),{},{from:s,velocity:l})}return a},t);return r<1?Ua((i,a)=>Qp(a)?Yt(Yt({},a),{},{velocity:nc(a.velocity,n[i].velocity,r),from:nc(a.from,n[i].from,r)}):a,t):zj(e,n,r-1)};function g5(e,t,r,n,i,a){var s,l=n.reduce((h,g)=>Yt(Yt({},h),{},{[g]:{from:e[g],velocity:0,to:t[g]}}),{}),c=()=>Ua((h,g)=>g.from,l),d=()=>!Object.values(l).filter(Qp).length,u=null,f=h=>{s||(s=h);var g=h-s,m=g/r.dt;l=zj(r,l,m),i(Yt(Yt(Yt({},e),t),c())),s=h,d()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{u()})}function m5(e,t,r,n,i,a,s){var l=null,c=i.reduce((f,h)=>Yt(Yt({},f),{},{[h]:[e[h],t[h]]}),{}),d,u=f=>{d||(d=f);var h=(f-d)/n,g=Ua((x,y)=>nc(...y,r(h)),c);if(a(Yt(Yt(Yt({},e),t),g)),h<1)l=s.setTimeout(u);else{var m=Ua((x,y)=>nc(...y,r(1)),c);a(Yt(Yt(Yt({},e),t),m))}};return()=>(l=s.setTimeout(u),()=>{l()})}const v5=(e,t,r,n,i,a)=>{var s=d5(e,t);return r.isStepper===!0?g5(e,t,r,s,i,a):m5(e,t,r,n,s,i,a)};var ic=1e-4,Fj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Vj=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ix=(e,t)=>r=>{var n=Fj(e,t);return Vj(n,r)},y5=(e,t)=>r=>{var n=Fj(e,t),i=[...n.map((a,s)=>a*s).slice(1),0];return Vj(i,r)},Nx=function(){for(var t,r,n,i,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];if(s.length===1)switch(s[0]){case"linear":[t,n,r,i]=[0,0,1,1];break;case"ease":[t,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[t,n,r,i]=[.42,0,1,1];break;case"ease-out":[t,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[t,n,r,i]=[0,0,.58,1];break;default:{var c=s[0].split("(");c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4&&([t,n,r,i]=c[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else s.length===4&&([t,n,r,i]=s);var d=Ix(t,r),u=Ix(n,i),f=y5(t,r),h=m=>m>1?1:m<0?0:m,g=m=>{for(var x=m>1?1:m,y=x,w=0;w<8;++w){var b=d(y)-x,j=f(y);if(Math.abs(b-x)<ic||j<ic)return u(y);y=h(y-b/j)}return u(y)};return g.isStepper=!1,g},x5=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(s,l,c)=>{var d=-(s-l)*r,u=c*n,f=c+(d-u)*i/1e3,h=c*i/1e3+s;return Math.abs(h-l)<ic&&Math.abs(f)<ic?[l,0]:[h,f]};return a.isStepper=!0,a.dt=i,a},b5=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Nx(e);case"spring":return x5();default:if(e.split("(")[0]==="cubic-bezier")return Nx(e)}return typeof e=="function"?e:null};function w5(e){var t,r=()=>null,n=!1,i=null,a=s=>{if(!n){if(Array.isArray(s)){if(!s.length)return;var l=s,[c,...d]=l;if(typeof c=="number"){i=e.setTimeout(a.bind(null,d),c);return}a(c),i=e.setTimeout(a.bind(null,d));return}typeof s=="string"&&(t=s,r(t)),typeof s=="object"&&(t=s,r(t)),typeof s=="function"&&s()}};return{stop:()=>{n=!0},start:s=>{n=!1,i&&(i(),i=null),a(s)},subscribe:s=>(r=s,()=>{r=()=>null}),getTimeoutController:()=>e}}class C5{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=s=>{s-n>=r?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function S5(){return w5(new C5)}var j5=v.createContext(S5);function E5(e,t){var r=v.useContext(j5);return v.useMemo(()=>t??r(e),[e,t,r])}var P5={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Dx={t:0},mf={t:1};function Qc(e){var t=ir(e,P5),{isActive:r,canBegin:n,duration:i,easing:a,begin:s,onAnimationEnd:l,onAnimationStart:c,children:d}=t,u=E5(t.animationId,t.animationManager),[f,h]=v.useState(r?Dx:mf),g=v.useRef(null);return v.useEffect(()=>{r||h(mf)},[r]),v.useEffect(()=>{if(!r||!n)return o5;var m=v5(Dx,mf,b5(a),i,h,u.getTimeoutController()),x=()=>{g.current=m()};return u.start([c,s,x,i,l]),()=>{u.stop(),g.current&&g.current(),l()}},[r,n,i,a,s,c,l,u]),d(f.t)}function Jc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Fa(t)),n=v.useRef(e);return n.current!==e&&(r.current=Fa(t),n.current=e),r.current}var O5=["radius"],k5=["radius"];function _x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_x(Object(r),!0).forEach(function(n){T5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T5(e,t,r){return(t=M5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M5(e){var t=R5(e,"string");return typeof t=="symbol"?t:t+""}function R5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oc.apply(null,arguments)}function $x(e,t){if(e==null)return{};var r,n,i=A5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Lx=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),s=n>=0?1:-1,l=r>=0?1:-1,c=n>=0&&r>=0||n<0&&r<0?1:0,d;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,h=4;f<h;f++)u[f]=i[f]>a?a:i[f];d="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(d+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),d+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(d+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,`,
1080
+ height and width.`,S,O,i,a,s,l,r),C.createElement("div",{id:f?"".concat(f):void 0,className:Qe("recharts-responsive-container",h),style:xx(xx({},m),{},{width:i,height:a,minWidth:s,minHeight:l,maxHeight:c}),ref:x},C.createElement("div",{style:o3({width:i,height:a})},C.createElement(Aj,{width:S,height:O},d)))}),sl=v.forwardRef((e,t)=>{var r=mg();if(Co(r.width)&&Co(r.height))return e.children;var{width:n,height:i}=a3({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=Mj(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Ne(a)&&Ne(s)?C.createElement(Aj,{width:a,height:s},e.children):C.createElement(u3,Kp({},e,{width:n,height:i,ref:t}))}),Gc=()=>{var e,t=Sr(),r=Ae(KB),n=Ae(qc),i=(e=Ae(Yc))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},d3={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Ij=()=>{var e;return(e=Ae(Rt))!==null&&e!==void 0?e:d3},vg=()=>Ae(_n),yg=()=>Ae(Bn),f3=()=>Ae(e=>e.layout.margin),We=e=>e.layout.layoutType,xg=()=>Ae(We),Xc=e=>{var t=ut(),r=Sr(),{width:n,height:i}=e,a=mg(),s=n,l=i;return a&&(s=a.width>0?a.width:n,l=a.height>0?a.height:i),v.useEffect(()=>{!r&&Co(s)&&Co(l)&&t(aB({width:s,height:l}))},[t,r,s,l]),null},p3={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Nj=Cr({name:"legend",initialState:p3,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:er()},removeLegendPayload:{reducer(e,t){var r=On(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:er()}}}),{setLegendSize:bx,setLegendSettings:h3,addLegendPayload:Dj,removeLegendPayload:_j}=Nj.actions,g3=Nj.reducer,m3=["contextPayload"];function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(null,arguments)}function wx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function So(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wx(Object(r),!0).forEach(function(n){bg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bg(e,t,r){return(t=v3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v3(e){var t=y3(e,"string");return typeof t=="symbol"?t:t+""}function y3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x3(e,t){if(e==null)return{};var r,n,i=b3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function b3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function w3(e){return e.value}function C3(e){var{contextPayload:t}=e,r=x3(e,m3),n=zS(t,e.payloadUniqBy,w3),i=So(So({},r),{},{payload:n});return C.isValidElement(e.content)?C.cloneElement(e.content,i):typeof e.content=="function"?C.createElement(e.content,i):C.createElement(ag,i)}function S3(e,t,r,n,i,a){var{layout:s,align:l,verticalAlign:c}=t,d,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l==="center"&&s==="vertical"?d={left:((n||0)-a.width)/2}:d=l==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?u={top:((i||0)-a.height)/2}:u=c==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),So(So({},d),u)}function j3(e){var t=ut();return v.useEffect(()=>{t(h3(e))},[t,e]),null}function E3(e){var t=ut();return v.useEffect(()=>(t(bx(e)),()=>{t(bx({width:0,height:0}))}),[t,e]),null}function P3(e){var t=J_(),r=tD(),n=f3(),{width:i,height:a,wrapperStyle:s,portal:l}=e,[c,d]=KS([t]),u=vg(),f=yg();if(u==null||f==null)return null;var h=u-(n.left||0)-(n.right||0),g=Zc.getWidthOrHeight(e.layout,a,i,h),m=l?s:So(So({position:"absolute",width:g?.width||i||"auto",height:g?.height||a||"auto"},S3(s,e,n,u,f,c)),s),x=l??r;if(x==null)return null;var y=C.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:d},C.createElement(j3,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),C.createElement(E3,{width:c.width,height:c.height}),C.createElement(C3,Yp({},e,g,{margin:n,chartWidth:u,chartHeight:f,contextPayload:t})));return Oa.createPortal(y,x)}class Zc extends v.PureComponent{static getWidthOrHeight(t,r,n,i){return t==="vertical"&&Ne(r)?{height:r}:t==="horizontal"?{width:n||i}:null}render(){return C.createElement(P3,this.props)}}bg(Zc,"displayName","Legend");bg(Zc,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(null,arguments)}function Cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(r),!0).forEach(function(n){O3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O3(e,t,r){return(t=k3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k3(e){var t=T3(e,"string");return typeof t=="symbol"?t:t+""}function T3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M3(e){return Array.isArray(e)&&pn(e[0])&&pn(e[1])?e.join(" ~ "):e}var R3=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:d,label:u,labelFormatter:f,accessibilityLayer:h=!1}=e,g=()=>{if(a&&a.length){var E={padding:0,margin:0},S=(l?Lc(a,l):a).map((O,k)=>{if(O.type==="none")return null;var M=O.formatter||s||M3,{value:A,name:_}=O,D=A,B=_;if(M){var H=M(A,_,O,k,a);if(Array.isArray(H))[D,B]=H;else if(H!=null)D=H;else return null}var T=gf({display:"block",paddingTop:4,paddingBottom:4,color:O.color||"#000"},n);return C.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:T},pn(B)?C.createElement("span",{className:"recharts-tooltip-item-name"},B):null,pn(B)?C.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,C.createElement("span",{className:"recharts-tooltip-item-value"},D),C.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:E},S)}return null},m=gf({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),x=gf({margin:0},i),y=!Ft(u),w=y?u:"",b=Qe("recharts-default-tooltip",c),j=Qe("recharts-tooltip-label",d);y&&f&&a!==void 0&&a!==null&&(w=f(u,a));var P=h?{role:"status","aria-live":"assertive"}:{};return C.createElement("div",qp({className:b,style:m},P),C.createElement("p",{className:j,style:x},C.isValidElement(w)?w:"".concat(w)),g())},da="recharts-tooltip-wrapper",A3={visibility:"hidden"};function I3(e){var{coordinate:t,translateX:r,translateY:n}=e;return Qe(da,{["".concat(da,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(da,"-left")]:Ne(r)&&t&&Ne(t.x)&&r<t.x,["".concat(da,"-bottom")]:Ne(n)&&t&&Ne(t.y)&&n>=t.y,["".concat(da,"-top")]:Ne(n)&&t&&Ne(t.y)&&n<t.y})}function Sx(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:s,tooltipDimension:l,viewBox:c,viewBoxDimension:d}=e;if(a&&Ne(a[n]))return a[n];var u=r[n]-l-(i>0?i:0),f=r[n]+i;if(t[n])return s[n]?u:f;var h=c[n];if(h==null)return 0;if(s[n]){var g=u,m=h;return g<m?Math.max(f,h):Math.max(u,h)}if(d==null)return 0;var x=f+l,y=h+d;return x>y?Math.max(u,h):Math.max(f,h)}function N3(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function D3(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,d,u,f;return s.height>0&&s.width>0&&r?(u=Sx({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=Sx({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=N3({translateX:u,translateY:f,useTranslate3d:l})):d=A3,{cssProperties:d,cssClasses:I3({translateX:u,translateY:f,coordinate:r})}}function jx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(r),!0).forEach(function(n){Gp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gp(e,t,r){return(t=_3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _3(e){var t=B3(e,"string");return typeof t=="symbol"?t:t+""}function B3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class $3 extends v.PureComponent{constructor(){super(...arguments),Gp(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Gp(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:s,hasPayload:l,isAnimationActive:c,offset:d,position:u,reverseDirection:f,useTranslate3d:h,viewBox:g,wrapperStyle:m,lastBoundingBox:x,innerRef:y,hasPortalFromProps:w}=this.props,{cssClasses:b,cssProperties:j}=D3({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:d,position:u,reverseDirection:f,tooltipBox:{height:x.height,width:x.width},useTranslate3d:h,viewBox:g}),P=w?{}:ll(ll({transition:c&&t?"transform ".concat(n,"ms ").concat(i):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),E=ll(ll({},P),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},m);return C.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:E,ref:y},a)}}var L3=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Ui={devToolsEnabled:!1,isSsr:L3()},Bj=()=>Ae(e=>e.rootProps.accessibilityLayer);function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(null,arguments)}function Ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Px(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){z3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z3(e,t,r){return(t=F3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F3(e){var t=V3(e,"string");return typeof t=="symbol"?t:t+""}function V3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ox={curveBasisClosed:bD,curveBasisOpen:wD,curveBasis:xD,curveBumpX:oD,curveBumpY:aD,curveLinearClosed:CD,curveLinear:Bc,curveMonotoneX:SD,curveMonotoneY:jD,curveNatural:ED,curveStep:PD,curveStepAfter:kD,curveStepBefore:OD},cl=e=>Qt(e.x)&&Qt(e.y),fa=e=>e.x,pa=e=>e.y,H3=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(ls(e));return(r==="curveMonotone"||r==="curveBump")&&t?Ox["".concat(r).concat(t==="vertical"?"Y":"X")]:Ox[r]||Bc},W3=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,s=H3(t,i),l=a?r.filter(cl):r,c;if(Array.isArray(n)){var d=a?n.filter(f=>cl(f)):n,u=l.map((f,h)=>Px(Px({},f),{},{base:d[h]}));return i==="vertical"?c=Zs().y(pa).x1(fa).x0(f=>f.base.x):c=Zs().x(fa).y1(pa).y0(f=>f.base.y),c.defined(cl).curve(s),c(u)}return i==="vertical"&&Ne(n)?c=Zs().y(pa).x1(fa).x0(n):Ne(n)?c=Zs().x(fa).y1(pa).y0(n):c=vS().x(fa).y(pa),c.defined(cl).curve(s),c(l)},$j=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?W3(e):n;return C.createElement("path",Xp({},Qr(e),ZD(e),{className:Qe("recharts-curve",t),d:a===null?void 0:a,ref:i}))},U3=["x","y","top","left","width","height","className"];function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zp.apply(null,arguments)}function kx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kx(Object(r),!0).forEach(function(n){Y3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y3(e,t,r){return(t=q3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=G3(e,"string");return typeof t=="symbol"?t:t+""}function G3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X3(e,t){if(e==null)return{};var r,n,i=Z3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Z3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Q3=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),J3=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=X3(e,U3),d=K3({x:t,y:r,top:n,left:i,width:a,height:s},c);return!Ne(t)||!Ne(r)||!Ne(a)||!Ne(s)||!Ne(n)||!Ne(i)?null:C.createElement("path",Zp({},_r(d),{className:Qe("recharts-cross",l),d:Q3(t,r,a,s,n,i)}))};function e5(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Tx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(r),!0).forEach(function(n){r5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r5(e,t,r){return(t=n5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n5(e){var t=i5(e,"string");return typeof t=="symbol"?t:t+""}function i5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ir(e,t){var r=t5({},e),n=t,i=Object.keys(t),a=i.reduce((s,l)=>(s[l]===void 0&&n[l]!==void 0&&(s[l]=n[l]),s),r);return a}function o5(){}function a5(e){return e!=null}function Mx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(r),!0).forEach(function(n){s5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s5(e,t,r){return(t=l5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=c5(e,"string");return typeof t=="symbol"?t:t+""}function c5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u5=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Lj=(e,t,r)=>e.map(n=>"".concat(u5(n)," ").concat(t,"ms ").concat(r)).join(","),d5=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Ua=(e,t)=>Object.keys(t).reduce((r,n)=>Rx(Rx({},r),{},{[n]:e(n,t[n])}),{});function Ax(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ax(Object(r),!0).forEach(function(n){f5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ax(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f5(e,t,r){return(t=p5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p5(e){var t=h5(e,"string");return typeof t=="symbol"?t:t+""}function h5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nc=(e,t,r)=>e+(t-e)*r,Qp=e=>{var{from:t,to:r}=e;return t!==r},zj=(e,t,r)=>{var n=Ua((i,a)=>{if(Qp(a)){var[s,l]=e(a.from,a.to,a.velocity);return Yt(Yt({},a),{},{from:s,velocity:l})}return a},t);return r<1?Ua((i,a)=>Qp(a)?Yt(Yt({},a),{},{velocity:nc(a.velocity,n[i].velocity,r),from:nc(a.from,n[i].from,r)}):a,t):zj(e,n,r-1)};function g5(e,t,r,n,i,a){var s,l=n.reduce((h,g)=>Yt(Yt({},h),{},{[g]:{from:e[g],velocity:0,to:t[g]}}),{}),c=()=>Ua((h,g)=>g.from,l),d=()=>!Object.values(l).filter(Qp).length,u=null,f=h=>{s||(s=h);var g=h-s,m=g/r.dt;l=zj(r,l,m),i(Yt(Yt(Yt({},e),t),c())),s=h,d()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{u()})}function m5(e,t,r,n,i,a,s){var l=null,c=i.reduce((f,h)=>Yt(Yt({},f),{},{[h]:[e[h],t[h]]}),{}),d,u=f=>{d||(d=f);var h=(f-d)/n,g=Ua((x,y)=>nc(...y,r(h)),c);if(a(Yt(Yt(Yt({},e),t),g)),h<1)l=s.setTimeout(u);else{var m=Ua((x,y)=>nc(...y,r(1)),c);a(Yt(Yt(Yt({},e),t),m))}};return()=>(l=s.setTimeout(u),()=>{l()})}const v5=(e,t,r,n,i,a)=>{var s=d5(e,t);return r.isStepper===!0?g5(e,t,r,s,i,a):m5(e,t,r,n,s,i,a)};var ic=1e-4,Fj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Vj=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ix=(e,t)=>r=>{var n=Fj(e,t);return Vj(n,r)},y5=(e,t)=>r=>{var n=Fj(e,t),i=[...n.map((a,s)=>a*s).slice(1),0];return Vj(i,r)},Nx=function(){for(var t,r,n,i,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];if(s.length===1)switch(s[0]){case"linear":[t,n,r,i]=[0,0,1,1];break;case"ease":[t,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[t,n,r,i]=[.42,0,1,1];break;case"ease-out":[t,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[t,n,r,i]=[0,0,.58,1];break;default:{var c=s[0].split("(");c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4&&([t,n,r,i]=c[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else s.length===4&&([t,n,r,i]=s);var d=Ix(t,r),u=Ix(n,i),f=y5(t,r),h=m=>m>1?1:m<0?0:m,g=m=>{for(var x=m>1?1:m,y=x,w=0;w<8;++w){var b=d(y)-x,j=f(y);if(Math.abs(b-x)<ic||j<ic)return u(y);y=h(y-b/j)}return u(y)};return g.isStepper=!1,g},x5=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(s,l,c)=>{var d=-(s-l)*r,u=c*n,f=c+(d-u)*i/1e3,h=c*i/1e3+s;return Math.abs(h-l)<ic&&Math.abs(f)<ic?[l,0]:[h,f]};return a.isStepper=!0,a.dt=i,a},b5=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Nx(e);case"spring":return x5();default:if(e.split("(")[0]==="cubic-bezier")return Nx(e)}return typeof e=="function"?e:null};function w5(e){var t,r=()=>null,n=!1,i=null,a=s=>{if(!n){if(Array.isArray(s)){if(!s.length)return;var l=s,[c,...d]=l;if(typeof c=="number"){i=e.setTimeout(a.bind(null,d),c);return}a(c),i=e.setTimeout(a.bind(null,d));return}typeof s=="string"&&(t=s,r(t)),typeof s=="object"&&(t=s,r(t)),typeof s=="function"&&s()}};return{stop:()=>{n=!0},start:s=>{n=!1,i&&(i(),i=null),a(s)},subscribe:s=>(r=s,()=>{r=()=>null}),getTimeoutController:()=>e}}class C5{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=s=>{s-n>=r?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function S5(){return w5(new C5)}var j5=v.createContext(S5);function E5(e,t){var r=v.useContext(j5);return v.useMemo(()=>t??r(e),[e,t,r])}var P5={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Dx={t:0},mf={t:1};function Qc(e){var t=ir(e,P5),{isActive:r,canBegin:n,duration:i,easing:a,begin:s,onAnimationEnd:l,onAnimationStart:c,children:d}=t,u=E5(t.animationId,t.animationManager),[f,h]=v.useState(r?Dx:mf),g=v.useRef(null);return v.useEffect(()=>{r||h(mf)},[r]),v.useEffect(()=>{if(!r||!n)return o5;var m=v5(Dx,mf,b5(a),i,h,u.getTimeoutController()),x=()=>{g.current=m()};return u.start([c,s,x,i,l]),()=>{u.stop(),g.current&&g.current(),l()}},[r,n,i,a,s,c,l,u]),d(f.t)}function Jc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Fa(t)),n=v.useRef(e);return n.current!==e&&(r.current=Fa(t),n.current=e),r.current}var O5=["radius"],k5=["radius"];function _x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_x(Object(r),!0).forEach(function(n){T5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T5(e,t,r){return(t=M5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M5(e){var t=R5(e,"string");return typeof t=="symbol"?t:t+""}function R5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oc.apply(null,arguments)}function $x(e,t){if(e==null)return{};var r,n,i=A5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Lx=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),s=n>=0?1:-1,l=r>=0?1:-1,c=n>=0&&r>=0||n<0&&r<0?1:0,d;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,h=4;f<h;f++)u[f]=i[f]>a?a:i[f];d="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(d+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),d+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(d+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,`,
1081
1081
  `).concat(e+r,",").concat(t+s*u[1])),d+="L ".concat(e+r,",").concat(t+n-s*u[2]),u[2]>0&&(d+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,`,
1082
1082
  `).concat(e+r-l*u[2],",").concat(t+n)),d+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(d+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,`,
1083
1083
  `).concat(e,",").concat(t+n-s*u[3])),d+="Z"}else if(a>0&&i===+i&&i>0){var g=Math.min(a,i);d="M ".concat(e,",").concat(t+s*g,`
@@ -1104,6 +1104,6 @@ Take a look at the reducer(s) handling this action type: ${g.type}.
1104
1104
  `);if(n>0){var{circleTangency:j,lineTangency:P,theta:E}=ul({cx:t,cy:r,radius:n,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),{circleTangency:S,lineTangency:O,theta:k}=ul({cx:t,cy:r,radius:n,angle:d,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),M=l?Math.abs(c-d):Math.abs(c-d)-E-k;if(M<0&&a===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+="L".concat(O.x,",").concat(O.y,`
1105
1105
  A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,`
1106
1106
  A`).concat(n,",").concat(n,",0,").concat(+(M>180),",").concat(+(u>0),",").concat(j.x,",").concat(j.y,`
1107
- A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(P.x,",").concat(P.y,"Z")}else b+="L".concat(t,",").concat(r,"Z");return b},_5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Kj=e=>{var t=ir(e,_5),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:u,className:f}=t;if(a<i||d===u)return null;var h=Qe("recharts-sector",f),g=a-i,m=Zt(s,g,0,!0),x;return m>0&&Math.abs(d-u)<360?x=D5({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:u}):x=Uj({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:d,endAngle:u}),C.createElement("path",Jp({},_r(t),{className:h,d:x}))};function B5(e,t,r){var n,i,a,s;if(e==="horizontal")n=t.x,a=n,i=r.top,s=r.top+r.height;else if(e==="vertical")i=t.y,s=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:l,cy:c,innerRadius:d,outerRadius:u,angle:f}=t,h=jt(l,c,d,f),g=jt(l,c,u,f);n=h.x,i=h.y,a=g.x,s=g.y}else return Wj(t);return[{x:n,y:i},{x:a,y:s}]}var vf={},yf={},xf={},zx;function $5(){return zx||(zx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HS();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(xf)),xf}var Fx;function L5(){return Fx||(Fx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$5();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(yf)),yf}var Vx;function z5(){return Vx||(Vx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WS(),r=L5();function n(i,a,s){s&&typeof s!="number"&&t.isIterateeCall(i,a,s)&&(a=s=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),s=s===void 0?i<a?1:-1:r.toFinite(s);const l=Math.max(Math.ceil((a-i)/(s||1)),0),c=new Array(l);for(let d=0;d<l;d++)c[d]=i,i+=s;return c}e.range=n})(vf)),vf}var bf,Hx;function F5(){return Hx||(Hx=1,bf=z5().range),bf}var V5=F5();const Yj=wr(V5);function ai(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function H5(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wg(e){let t,r,n;e.length!==2?(t=ai,r=(l,c)=>ai(e(l),c),n=(l,c)=>e(l)-c):(t=e===ai||e===H5?e:W5,r=e,n=e);function i(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<0?d=f+1:u=f}while(d<u)}return d}function a(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<=0?d=f+1:u=f}while(d<u)}return d}function s(l,c,d=0,u=l.length){const f=i(l,c,d,u-1);return f>d&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:i,center:s,right:a}}function W5(){return 0}function qj(e){return e===null?NaN:+e}function*U5(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const K5=wg(ai),gs=K5.right;wg(qj).center;class Wx extends Map{constructor(t,r=G5){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Ux(this,t))}has(t){return super.has(Ux(this,t))}set(t,r){return super.set(Y5(this,t),r)}delete(t){return super.delete(q5(this,t))}}function Ux({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Y5({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function q5({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function G5(e){return e!==null&&typeof e=="object"?e.valueOf():e}function X5(e=ai){if(e===ai)return Gj;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function Gj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Z5=Math.sqrt(50),Q5=Math.sqrt(10),J5=Math.sqrt(2);function ac(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=Z5?10:a>=Q5?5:a>=J5?2:1;let l,c,d;return i<0?(d=Math.pow(10,-i)/s,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*s,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=r&&r<2?ac(e,t,r*2):[l,c,d]}function eh(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,s]=n?ac(t,e,r):ac(e,t,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(s<0)for(let d=0;d<l;++d)c[d]=(a-d)/-s;else for(let d=0;d<l;++d)c[d]=(a-d)*s;else if(s<0)for(let d=0;d<l;++d)c[d]=(i+d)/-s;else for(let d=0;d<l;++d)c[d]=(i+d)*s;return c}function th(e,t,r){return t=+t,e=+e,r=+r,ac(e,t,r)[2]}function rh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?th(t,e,r):th(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Kx(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Yx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Xj(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?Gj:X5(i);n>r;){if(n-r>600){const c=n-r+1,d=t-r+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(d-c/2<0?-1:1),g=Math.max(r,Math.floor(t-d*f/c+h)),m=Math.min(n,Math.floor(t+(c-d)*f/c+h));Xj(e,t,g,m,i)}const a=e[t];let s=r,l=n;for(ha(e,r,t),i(e[n],a)>0&&ha(e,r,n);s<l;){for(ha(e,s,l),++s,--l;i(e[s],a)<0;)++s;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?ha(e,r,l):(++l,ha(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function ha(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function e$(e,t,r){if(e=Float64Array.from(U5(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Yx(e);if(t>=1)return Kx(e);var n,i=(n-1)*t,a=Math.floor(i),s=Kx(Xj(e,a).subarray(0,a+1)),l=Yx(e.subarray(a+1));return s+(l-s)*(i-a)}}function t$(e,t,r=qj){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return s+(l-s)*(i-a)}}function r$(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function $n(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const nh=Symbol("implicit");function Cg(){var e=new Wx,t=[],r=[],n=nh;function i(a){let s=e.get(a);if(s===void 0){if(n!==nh)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Wx;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Cg(t,r).unknown(n)},Hr.apply(i,arguments),i}function Sg(){var e=Cg().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,l=!1,c=0,d=0,u=.5;delete e.unknown;function f(){var h=t().length,g=i<n,m=g?i:n,x=g?n:i;a=(x-m)/Math.max(1,h-c+d*2),l&&(a=Math.floor(a)),m+=(x-m-a*(h-c))*u,s=a*(1-c),l&&(m=Math.round(m),s=Math.round(s));var y=r$(h).map(function(w){return m+a*w});return r(g?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,l=!0,f()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(l=!!h,f()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,d=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(d=+h,f()):d},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},e.copy=function(){return Sg(t(),[n,i]).round(l).paddingInner(c).paddingOuter(d).align(u)},Hr.apply(f(),arguments)}function Zj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Zj(t())},e}function n$(){return Zj(Sg.apply(null,arguments).paddingInner(1))}function jg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Qj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ms(){}var Ka=.7,sc=1/Ka,fo="\\s*([+-]?\\d+)\\s*",Ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i$=/^#([0-9a-f]{3,8})$/,o$=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),a$=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),s$=new RegExp(`^rgba\\(${fo},${fo},${fo},${Ya}\\)$`),l$=new RegExp(`^rgba\\(${cn},${cn},${cn},${Ya}\\)$`),c$=new RegExp(`^hsl\\(${Ya},${cn},${cn}\\)$`),u$=new RegExp(`^hsla\\(${Ya},${cn},${cn},${Ya}\\)$`),qx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jg(ms,qa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gx,formatHex:Gx,formatHex8:d$,formatHsl:f$,formatRgb:Xx,toString:Xx});function Gx(){return this.rgb().formatHex()}function d$(){return this.rgb().formatHex8()}function f$(){return Jj(this).formatHsl()}function Xx(){return this.rgb().formatRgb()}function qa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=i$.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Zx(t):r===3?new cr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?dl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=o$.exec(e))?new cr(t[1],t[2],t[3],1):(t=a$.exec(e))?new cr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=s$.exec(e))?dl(t[1],t[2],t[3],t[4]):(t=l$.exec(e))?dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=c$.exec(e))?eb(t[1],t[2]/100,t[3]/100,1):(t=u$.exec(e))?eb(t[1],t[2]/100,t[3]/100,t[4]):qx.hasOwnProperty(e)?Zx(qx[e]):e==="transparent"?new cr(NaN,NaN,NaN,0):null}function Zx(e){return new cr(e>>16&255,e>>8&255,e&255,1)}function dl(e,t,r,n){return n<=0&&(e=t=r=NaN),new cr(e,t,r,n)}function p$(e){return e instanceof ms||(e=qa(e)),e?(e=e.rgb(),new cr(e.r,e.g,e.b,e.opacity)):new cr}function ih(e,t,r,n){return arguments.length===1?p$(e):new cr(e,t,r,n??1)}function cr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}jg(cr,ih,Qj(ms,{brighter(e){return e=e==null?sc:Math.pow(sc,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ka:Math.pow(Ka,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cr(Ni(this.r),Ni(this.g),Ni(this.b),lc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qx,formatHex:Qx,formatHex8:h$,formatRgb:Jx,toString:Jx}));function Qx(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}`}function h$(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}${Oi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jx(){const e=lc(this.opacity);return`${e===1?"rgb(":"rgba("}${Ni(this.r)}, ${Ni(this.g)}, ${Ni(this.b)}${e===1?")":`, ${e})`}`}function lc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ni(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oi(e){return e=Ni(e),(e<16?"0":"")+e.toString(16)}function eb(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xr(e,t,r,n)}function Jj(e){if(e instanceof Xr)return new Xr(e.h,e.s,e.l,e.opacity);if(e instanceof ms||(e=qa(e)),!e)return new Xr;if(e instanceof Xr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,l=a-i,c=(a+i)/2;return l?(t===a?s=(r-n)/l+(r<n)*6:r===a?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?a+i:2-a-i,s*=60):l=c>0&&c<1?0:s,new Xr(s,l,c,e.opacity)}function g$(e,t,r,n){return arguments.length===1?Jj(e):new Xr(e,t,r,n??1)}function Xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}jg(Xr,g$,Qj(ms,{brighter(e){return e=e==null?sc:Math.pow(sc,e),new Xr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ka:Math.pow(Ka,e),new Xr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new cr(wf(e>=240?e-240:e+120,i,n),wf(e,i,n),wf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Xr(tb(this.h),fl(this.s),fl(this.l),lc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lc(this.opacity);return`${e===1?"hsl(":"hsla("}${tb(this.h)}, ${fl(this.s)*100}%, ${fl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tb(e){return e=(e||0)%360,e<0?e+360:e}function fl(e){return Math.max(0,Math.min(1,e||0))}function wf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Eg=e=>()=>e;function m$(e,t){return function(r){return e+r*t}}function v$(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function y$(e){return(e=+e)==1?e2:function(t,r){return r-t?v$(t,r,e):Eg(isNaN(t)?r:t)}}function e2(e,t){var r=t-e;return r?m$(e,r):Eg(isNaN(e)?t:e)}const rb=(function e(t){var r=y$(t);function n(i,a){var s=r((i=ih(i)).r,(a=ih(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),d=e2(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=l(u),i.b=c(u),i.opacity=d(u),i+""}}return n.gamma=e,n})(1);function x$(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function b$(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function w$(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Do(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(l){for(s=0;s<n;++s)a[s]=i[s](l);return a}}function C$(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function cc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function S$(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Do(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var oh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cf=new RegExp(oh.source,"g");function j$(e){return function(){return e}}function E$(e){return function(t){return e(t)+""}}function P$(e,t){var r=oh.lastIndex=Cf.lastIndex=0,n,i,a,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=oh.exec(e))&&(i=Cf.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:cc(n,i)})),r=Cf.lastIndex;return r<t.length&&(a=t.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?c[0]?E$(c[0].x):j$(t):(t=c.length,function(d){for(var u=0,f;u<t;++u)l[(f=c[u]).i]=f.x(d);return l.join("")})}function Do(e,t){var r=typeof t,n;return t==null||r==="boolean"?Eg(t):(r==="number"?cc:r==="string"?(n=qa(t))?(t=n,rb):P$:t instanceof qa?rb:t instanceof Date?C$:b$(t)?x$:Array.isArray(t)?w$:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?S$:cc)(e,t)}function Pg(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function O$(e,t){t===void 0&&(t=e,e=Do);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[l](s-l)}}function k$(e){return function(){return e}}function uc(e){return+e}var nb=[0,1];function rr(e){return e}function ah(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:k$(isNaN(t)?NaN:.5)}function T$(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function M$(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=ah(i,n),a=r(s,a)):(n=ah(n,i),a=r(a,s)),function(l){return a(n(l))}}function R$(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=ah(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(l){var c=gs(e,l,1,n)-1;return a[c](i[c](l))}}function vs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eu(){var e=nb,t=nb,r=Do,n,i,a,s=rr,l,c,d;function u(){var h=Math.min(e.length,t.length);return s!==rr&&(s=T$(e[0],e[h-1])),l=h>2?R$:M$,c=d=null,f}function f(h){return h==null||isNaN(h=+h)?a:(c||(c=l(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(i((d||(d=l(t,e.map(n),cc)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,uc),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=Pg,u()},f.clamp=function(h){return arguments.length?(s=h?!0:rr,u()):s!==rr},f.interpolate=function(h){return arguments.length?(r=h,u()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,g){return n=h,i=g,u()}}function Og(){return eu()(rr,rr)}function A$(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function dc(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function jo(e){return e=dc(Math.abs(e)),e?e[1]:NaN}function I$(e,t){return function(r,n){for(var i=r.length,a=[],s=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return a.reverse().join(t)}}function N$(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var D$=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ga(e){if(!(t=D$.exec(e)))throw new Error("invalid format: "+e);var t;return new kg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ga.prototype=kg.prototype;function kg(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}kg.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _$(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var t2;function B$(e,t){var r=dc(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(t2=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+dc(e,Math.max(0,t+a-1))[0]}function ib(e,t){var r=dc(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const ob={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:A$,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ib(e*100,t),r:ib,s:B$,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ab(e){return e}var sb=Array.prototype.map,lb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $$(e){var t=e.grouping===void 0||e.thousands===void 0?ab:I$(sb.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?ab:N$(sb.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(f){f=Ga(f);var h=f.fill,g=f.align,m=f.sign,x=f.symbol,y=f.zero,w=f.width,b=f.comma,j=f.precision,P=f.trim,E=f.type;E==="n"?(b=!0,E="g"):ob[E]||(j===void 0&&(j=12),P=!0,E="g"),(y||h==="0"&&g==="=")&&(y=!0,h="0",g="=");var S=x==="$"?r:x==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",O=x==="$"?n:/[%p]/.test(E)?s:"",k=ob[E],M=/[defgprs%]/.test(E);j=j===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function A(_){var D=S,B=O,H,T,N;if(E==="c")B=k(_)+B,_="";else{_=+_;var I=_<0||1/_<0;if(_=isNaN(_)?c:k(Math.abs(_),j),P&&(_=_$(_)),I&&+_==0&&m!=="+"&&(I=!1),D=(I?m==="("?m:l:m==="-"||m==="("?"":m)+D,B=(E==="s"?lb[8+t2/3]:"")+B+(I&&m==="("?")":""),M){for(H=-1,T=_.length;++H<T;)if(N=_.charCodeAt(H),48>N||N>57){B=(N===46?i+_.slice(H+1):_.slice(H))+B,_=_.slice(0,H);break}}}b&&!y&&(_=t(_,1/0));var R=D.length+_.length+B.length,$=R<w?new Array(w-R+1).join(h):"";switch(b&&y&&(_=t($+_,$.length?w-B.length:1/0),$=""),g){case"<":_=D+_+B+$;break;case"=":_=D+$+_+B;break;case"^":_=$.slice(0,R=$.length>>1)+D+_+B+$.slice(R);break;default:_=$+D+_+B;break}return a(_)}return A.toString=function(){return f+""},A}function u(f,h){var g=d((f=Ga(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(jo(h)/3)))*3,x=Math.pow(10,-m),y=lb[8+m/3];return function(w){return g(x*w)+y}}return{format:d,formatPrefix:u}}var pl,Tg,r2;L$({thousands:",",grouping:[3],currency:["$",""]});function L$(e){return pl=$$(e),Tg=pl.format,r2=pl.formatPrefix,pl}function z$(e){return Math.max(0,-jo(Math.abs(e)))}function F$(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jo(t)/3)))*3-jo(Math.abs(e)))}function V$(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,jo(t)-jo(e))+1}function n2(e,t,r,n){var i=rh(e,t,r),a;switch(n=Ga(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=F$(i,s))&&(n.precision=a),r2(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=V$(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=z$(i))&&(n.precision=a-(n.type==="%")*2);break}}return Tg(n)}function fi(e){var t=e.domain;return e.ticks=function(r){var n=t();return eh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return n2(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],l=n[a],c,d,u=10;for(l<s&&(d=s,s=l,l=d,d=i,i=a,a=d);u-- >0;){if(d=th(s,l,r),d===c)return n[i]=s,n[a]=l,t(n);if(d>0)s=Math.floor(s/d)*d,l=Math.ceil(l/d)*d;else if(d<0)s=Math.ceil(s*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function i2(){var e=Og();return e.copy=function(){return vs(e,i2())},Hr.apply(e,arguments),fi(e)}function o2(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,uc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return o2(e).unknown(t)},e=arguments.length?Array.from(e,uc):[0,1],fi(r)}function a2(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),e[r]=t.floor(i),e[n]=t.ceil(a),e}function cb(e){return Math.log(e)}function ub(e){return Math.exp(e)}function H$(e){return-Math.log(-e)}function W$(e){return-Math.exp(-e)}function U$(e){return isFinite(e)?+("1e"+e):e<0?0:e}function K$(e){return e===10?U$:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Y$(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function db(e){return(t,r)=>-e(-t,r)}function Mg(e){const t=e(cb,ub),r=t.domain;let n=10,i,a;function s(){return i=Y$(n),a=K$(n),r()[0]<0?(i=db(i),a=db(a),e(H$,W$)):e(cb,ub),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let d=c[0],u=c[c.length-1];const f=u<d;f&&([d,u]=[u,d]);let h=i(d),g=i(u),m,x;const y=l==null?10:+l;let w=[];if(!(n%1)&&g-h<y){if(h=Math.floor(h),g=Math.ceil(g),d>0){for(;h<=g;++h)for(m=1;m<n;++m)if(x=h<0?m/a(-h):m*a(h),!(x<d)){if(x>u)break;w.push(x)}}else for(;h<=g;++h)for(m=n-1;m>=1;--m)if(x=h>0?m/a(-h):m*a(h),!(x<d)){if(x>u)break;w.push(x)}w.length*2<y&&(w=eh(d,u,y))}else w=eh(h,g,Math.min(g-h,y)).map(a);return f?w.reverse():w},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Ga(c)).precision==null&&(c.trim=!0),c=Tg(c)),l===1/0)return c;const d=Math.max(1,n*l/t.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*n<n-.5&&(f*=n),f<=d?c(u):""}},t.nice=()=>r(a2(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function s2(){const e=Mg(eu()).domain([1,10]);return e.copy=()=>vs(e,s2()).base(e.base()),Hr.apply(e,arguments),e}function fb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Rg(e){var t=1,r=e(fb(t),pb(t));return r.constant=function(n){return arguments.length?e(fb(t=+n),pb(t)):t},fi(r)}function l2(){var e=Rg(eu());return e.copy=function(){return vs(e,l2()).constant(e.constant())},Hr.apply(e,arguments)}function hb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function q$(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function G$(e){return e<0?-e*e:e*e}function Ag(e){var t=e(rr,rr),r=1;function n(){return r===1?e(rr,rr):r===.5?e(q$,G$):e(hb(r),hb(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},fi(t)}function Ig(){var e=Ag(eu());return e.copy=function(){return vs(e,Ig()).exponent(e.exponent())},Hr.apply(e,arguments),e}function X$(){return Ig.apply(null,arguments).exponent(.5)}function gb(e){return Math.sign(e)*e*e}function Z$(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function c2(){var e=Og(),t=[0,1],r=!1,n;function i(a){var s=Z$(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(gb(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,uc)).map(gb)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return c2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Hr.apply(i,arguments),fi(i)}function u2(){var e=[],t=[],r=[],n;function i(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=t$(e,s/l);return a}function a(s){return s==null||isNaN(s=+s)?n:t[gs(r,s)]}return a.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(ai),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return u2().domain(e).range(t).unknown(n)},Hr.apply(a,arguments)}function d2(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[gs(n,c,0,r)]:a}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},s.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,n[0]]:d>=r?[n[r-1],t]:[n[d-1],n[d]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return d2().domain([e,t]).range(i).unknown(a)},Hr.apply(fi(s),arguments)}function f2(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[gs(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return f2().domain(e).range(t).unknown(r)},Hr.apply(i,arguments)}const Sf=new Date,jf=new Date;function At(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),l=i.ceil(a);return a-s<l-a?s:l},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<s)||!(l>0))return c;let d;do c.push(d=new Date(+a)),t(a,l),e(a);while(d<a&&a<s);return c},i.filter=a=>At(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!a(s););else for(;--l>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(Sf.setTime(+a),jf.setTime(+s),e(Sf),e(jf),Math.floor(r(Sf,jf))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const sh=At(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?At(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):sh);const jn=1e3,Nr=jn*60,En=Nr*60,An=En*24,Ng=An*7,mb=An*30,Ef=An*365,so=At(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jn)},(e,t)=>(t-e)/jn,e=>e.getUTCSeconds()),p2=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jn)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getMinutes()),h2=At(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getUTCMinutes()),g2=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jn-e.getMinutes()*Nr)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getHours()),m2=At(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCHours()),tu=At(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nr)/An,e=>e.getDate()-1),Dg=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>e.getUTCDate()-1),Q$=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>Math.floor(e/An));function Ki(e){return At(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nr)/Ng)}const _g=Ki(0),lh=Ki(1);Ki(2);Ki(3);const Xa=Ki(4);Ki(5);Ki(6);function Yi(e){return At(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ng)}const Bg=Yi(0),ch=Yi(1);Yi(2);Yi(3);const Za=Yi(4);Yi(5);Yi(6);const v2=At(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),y2=At(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),si=At(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());si.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});const li=At(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});function x2(e,t,r,n,i,a){const s=[[so,1,jn],[so,5,5*jn],[so,15,15*jn],[so,30,30*jn],[a,1,Nr],[a,5,5*Nr],[a,15,15*Nr],[a,30,30*Nr],[i,1,En],[i,3,3*En],[i,6,6*En],[i,12,12*En],[n,1,An],[n,2,2*An],[r,1,Ng],[t,1,mb],[t,3,3*mb],[e,1,Ef]];function l(d,u,f){const h=u<d;h&&([d,u]=[u,d]);const g=f&&typeof f.range=="function"?f:c(d,u,f),m=g?g.range(d,+u+1):[];return h?m.reverse():m}function c(d,u,f){const h=Math.abs(u-d)/f,g=wg(([,,y])=>y).right(s,h);if(g===s.length)return e.every(rh(d/Ef,u/Ef,f));if(g===0)return sh.every(Math.max(rh(d,u,f),1));const[m,x]=s[h/s[g-1][2]<s[g][2]/h?g-1:g];return m.every(x)}return[l,c]}const[J$,e4]=x2(li,y2,Bg,Q$,m2,h2),[t4,r4]=x2(si,v2,_g,tu,g2,p2);function Pf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Of(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ga(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function n4(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,d=ma(i),u=va(i),f=ma(a),h=va(a),g=ma(s),m=va(s),x=ma(l),y=va(l),w=ma(c),b=va(c),j={a:I,A:R,b:$,B:U,c:null,d:Cb,e:Cb,f:P4,g:_4,G:$4,H:S4,I:j4,j:E4,L:b2,m:O4,M:k4,p:V,q:F,Q:Eb,s:Pb,S:T4,u:M4,U:R4,V:A4,w:I4,W:N4,x:null,X:null,y:D4,Y:B4,Z:L4,"%":jb},P={a:q,A:ie,b:ue,B:ge,c:null,d:Sb,e:Sb,f:H4,g:J4,G:t8,H:z4,I:F4,j:V4,L:C2,m:W4,M:U4,p:Ee,q:Pe,Q:Eb,s:Pb,S:K4,u:Y4,U:q4,V:G4,w:X4,W:Z4,x:null,X:null,y:Q4,Y:e8,Z:r8,"%":jb},E={a:A,A:_,b:D,B,c:H,d:bb,e:bb,f:x4,g:xb,G:yb,H:wb,I:wb,j:g4,L:y4,m:h4,M:m4,p:M,q:p4,Q:w4,s:C4,S:v4,u:l4,U:c4,V:u4,w:s4,W:d4,x:T,X:N,y:xb,Y:yb,Z:f4,"%":b4};j.x=S(r,j),j.X=S(n,j),j.c=S(t,j),P.x=S(r,P),P.X=S(n,P),P.c=S(t,P);function S(Z,ve){return function(fe){var z=[],ne=-1,Y=0,le=Z.length,pe,xe,je;for(fe instanceof Date||(fe=new Date(+fe));++ne<le;)Z.charCodeAt(ne)===37&&(z.push(Z.slice(Y,ne)),(xe=vb[pe=Z.charAt(++ne)])!=null?pe=Z.charAt(++ne):xe=pe==="e"?" ":"0",(je=ve[pe])&&(pe=je(fe,xe)),z.push(pe),Y=ne+1);return z.push(Z.slice(Y,ne)),z.join("")}}function O(Z,ve){return function(fe){var z=ga(1900,void 0,1),ne=k(z,Z,fe+="",0),Y,le;if(ne!=fe.length)return null;if("Q"in z)return new Date(z.Q);if("s"in z)return new Date(z.s*1e3+("L"in z?z.L:0));if(ve&&!("Z"in z)&&(z.Z=0),"p"in z&&(z.H=z.H%12+z.p*12),z.m===void 0&&(z.m="q"in z?z.q:0),"V"in z){if(z.V<1||z.V>53)return null;"w"in z||(z.w=1),"Z"in z?(Y=Of(ga(z.y,0,1)),le=Y.getUTCDay(),Y=le>4||le===0?ch.ceil(Y):ch(Y),Y=Dg.offset(Y,(z.V-1)*7),z.y=Y.getUTCFullYear(),z.m=Y.getUTCMonth(),z.d=Y.getUTCDate()+(z.w+6)%7):(Y=Pf(ga(z.y,0,1)),le=Y.getDay(),Y=le>4||le===0?lh.ceil(Y):lh(Y),Y=tu.offset(Y,(z.V-1)*7),z.y=Y.getFullYear(),z.m=Y.getMonth(),z.d=Y.getDate()+(z.w+6)%7)}else("W"in z||"U"in z)&&("w"in z||(z.w="u"in z?z.u%7:"W"in z?1:0),le="Z"in z?Of(ga(z.y,0,1)).getUTCDay():Pf(ga(z.y,0,1)).getDay(),z.m=0,z.d="W"in z?(z.w+6)%7+z.W*7-(le+5)%7:z.w+z.U*7-(le+6)%7);return"Z"in z?(z.H+=z.Z/100|0,z.M+=z.Z%100,Of(z)):Pf(z)}}function k(Z,ve,fe,z){for(var ne=0,Y=ve.length,le=fe.length,pe,xe;ne<Y;){if(z>=le)return-1;if(pe=ve.charCodeAt(ne++),pe===37){if(pe=ve.charAt(ne++),xe=E[pe in vb?ve.charAt(ne++):pe],!xe||(z=xe(Z,fe,z))<0)return-1}else if(pe!=fe.charCodeAt(z++))return-1}return z}function M(Z,ve,fe){var z=d.exec(ve.slice(fe));return z?(Z.p=u.get(z[0].toLowerCase()),fe+z[0].length):-1}function A(Z,ve,fe){var z=g.exec(ve.slice(fe));return z?(Z.w=m.get(z[0].toLowerCase()),fe+z[0].length):-1}function _(Z,ve,fe){var z=f.exec(ve.slice(fe));return z?(Z.w=h.get(z[0].toLowerCase()),fe+z[0].length):-1}function D(Z,ve,fe){var z=w.exec(ve.slice(fe));return z?(Z.m=b.get(z[0].toLowerCase()),fe+z[0].length):-1}function B(Z,ve,fe){var z=x.exec(ve.slice(fe));return z?(Z.m=y.get(z[0].toLowerCase()),fe+z[0].length):-1}function H(Z,ve,fe){return k(Z,t,ve,fe)}function T(Z,ve,fe){return k(Z,r,ve,fe)}function N(Z,ve,fe){return k(Z,n,ve,fe)}function I(Z){return s[Z.getDay()]}function R(Z){return a[Z.getDay()]}function $(Z){return c[Z.getMonth()]}function U(Z){return l[Z.getMonth()]}function V(Z){return i[+(Z.getHours()>=12)]}function F(Z){return 1+~~(Z.getMonth()/3)}function q(Z){return s[Z.getUTCDay()]}function ie(Z){return a[Z.getUTCDay()]}function ue(Z){return c[Z.getUTCMonth()]}function ge(Z){return l[Z.getUTCMonth()]}function Ee(Z){return i[+(Z.getUTCHours()>=12)]}function Pe(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ve=S(Z+="",j);return ve.toString=function(){return Z},ve},parse:function(Z){var ve=O(Z+="",!1);return ve.toString=function(){return Z},ve},utcFormat:function(Z){var ve=S(Z+="",P);return ve.toString=function(){return Z},ve},utcParse:function(Z){var ve=O(Z+="",!0);return ve.toString=function(){return Z},ve}}}var vb={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,i4=/^%/,o4=/[\\^$*+?|[\]().{}]/g;function He(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function a4(e){return e.replace(o4,"\\$&")}function ma(e){return new RegExp("^(?:"+e.map(a4).join("|")+")","i")}function va(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function s4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function l4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function c4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function u4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function d4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function yb(e,t,r){var n=Vt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function xb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function f4(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function p4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function h4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function bb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function g4(e,t,r){var n=Vt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function m4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function v4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function y4(e,t,r){var n=Vt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function x4(e,t,r){var n=Vt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function b4(e,t,r){var n=i4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function w4(e,t,r){var n=Vt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function C4(e,t,r){var n=Vt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Cb(e,t){return He(e.getDate(),t,2)}function S4(e,t){return He(e.getHours(),t,2)}function j4(e,t){return He(e.getHours()%12||12,t,2)}function E4(e,t){return He(1+tu.count(si(e),e),t,3)}function b2(e,t){return He(e.getMilliseconds(),t,3)}function P4(e,t){return b2(e,t)+"000"}function O4(e,t){return He(e.getMonth()+1,t,2)}function k4(e,t){return He(e.getMinutes(),t,2)}function T4(e,t){return He(e.getSeconds(),t,2)}function M4(e){var t=e.getDay();return t===0?7:t}function R4(e,t){return He(_g.count(si(e)-1,e),t,2)}function w2(e){var t=e.getDay();return t>=4||t===0?Xa(e):Xa.ceil(e)}function A4(e,t){return e=w2(e),He(Xa.count(si(e),e)+(si(e).getDay()===4),t,2)}function I4(e){return e.getDay()}function N4(e,t){return He(lh.count(si(e)-1,e),t,2)}function D4(e,t){return He(e.getFullYear()%100,t,2)}function _4(e,t){return e=w2(e),He(e.getFullYear()%100,t,2)}function B4(e,t){return He(e.getFullYear()%1e4,t,4)}function $4(e,t){var r=e.getDay();return e=r>=4||r===0?Xa(e):Xa.ceil(e),He(e.getFullYear()%1e4,t,4)}function L4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+He(t/60|0,"0",2)+He(t%60,"0",2)}function Sb(e,t){return He(e.getUTCDate(),t,2)}function z4(e,t){return He(e.getUTCHours(),t,2)}function F4(e,t){return He(e.getUTCHours()%12||12,t,2)}function V4(e,t){return He(1+Dg.count(li(e),e),t,3)}function C2(e,t){return He(e.getUTCMilliseconds(),t,3)}function H4(e,t){return C2(e,t)+"000"}function W4(e,t){return He(e.getUTCMonth()+1,t,2)}function U4(e,t){return He(e.getUTCMinutes(),t,2)}function K4(e,t){return He(e.getUTCSeconds(),t,2)}function Y4(e){var t=e.getUTCDay();return t===0?7:t}function q4(e,t){return He(Bg.count(li(e)-1,e),t,2)}function S2(e){var t=e.getUTCDay();return t>=4||t===0?Za(e):Za.ceil(e)}function G4(e,t){return e=S2(e),He(Za.count(li(e),e)+(li(e).getUTCDay()===4),t,2)}function X4(e){return e.getUTCDay()}function Z4(e,t){return He(ch.count(li(e)-1,e),t,2)}function Q4(e,t){return He(e.getUTCFullYear()%100,t,2)}function J4(e,t){return e=S2(e),He(e.getUTCFullYear()%100,t,2)}function e8(e,t){return He(e.getUTCFullYear()%1e4,t,4)}function t8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Za(e):Za.ceil(e),He(e.getUTCFullYear()%1e4,t,4)}function r8(){return"+0000"}function jb(){return"%"}function Eb(e){return+e}function Pb(e){return Math.floor(+e/1e3)}var hl,j2,E2;n8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function n8(e){return hl=n4(e),j2=hl.format,E2=hl.utcFormat,hl}function i8(e){return new Date(e)}function o8(e){return e instanceof Date?+e:+new Date(+e)}function $g(e,t,r,n,i,a,s,l,c,d){var u=Og(),f=u.invert,h=u.domain,g=d(".%L"),m=d(":%S"),x=d("%I:%M"),y=d("%I %p"),w=d("%a %d"),b=d("%b %d"),j=d("%B"),P=d("%Y");function E(S){return(c(S)<S?g:l(S)<S?m:s(S)<S?x:a(S)<S?y:n(S)<S?i(S)<S?w:b:r(S)<S?j:P)(S)}return u.invert=function(S){return new Date(f(S))},u.domain=function(S){return arguments.length?h(Array.from(S,o8)):h().map(i8)},u.ticks=function(S){var O=h();return e(O[0],O[O.length-1],S??10)},u.tickFormat=function(S,O){return O==null?E:d(O)},u.nice=function(S){var O=h();return(!S||typeof S.range!="function")&&(S=t(O[0],O[O.length-1],S??10)),S?h(a2(O,S)):u},u.copy=function(){return vs(u,$g(e,t,r,n,i,a,s,l,c,d))},u}function a8(){return Hr.apply($g(t4,r4,si,v2,_g,tu,g2,p2,so,j2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function s8(){return Hr.apply($g(J$,e4,li,y2,Bg,Dg,m2,h2,so,E2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ru(){var e=0,t=1,r,n,i,a,s=rr,l=!1,c;function d(f){return f==null||isNaN(f=+f)?c:s(i===0?.5:(f=(a(f)-r)*i,l?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),d):[e,t]},d.clamp=function(f){return arguments.length?(l=!!f,d):l},d.interpolator=function(f){return arguments.length?(s=f,d):s};function u(f){return function(h){var g,m;return arguments.length?([g,m]=h,s=f(g,m),d):[s(0),s(1)]}}return d.range=u(Do),d.rangeRound=u(Pg),d.unknown=function(f){return arguments.length?(c=f,d):c},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),d}}function pi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function P2(){var e=fi(ru()(rr));return e.copy=function(){return pi(e,P2())},$n.apply(e,arguments)}function O2(){var e=Mg(ru()).domain([1,10]);return e.copy=function(){return pi(e,O2()).base(e.base())},$n.apply(e,arguments)}function k2(){var e=Rg(ru());return e.copy=function(){return pi(e,k2()).constant(e.constant())},$n.apply(e,arguments)}function Lg(){var e=Ag(ru());return e.copy=function(){return pi(e,Lg()).exponent(e.exponent())},$n.apply(e,arguments)}function l8(){return Lg.apply(null,arguments).exponent(.5)}function T2(){var e=[],t=rr;function r(n){if(n!=null&&!isNaN(n=+n))return t((gs(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ai),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>e$(e,a/n))},r.copy=function(){return T2(t).domain(e)},$n.apply(r,arguments)}function nu(){var e=0,t=.5,r=1,n=1,i,a,s,l,c,d=rr,u,f=!1,h;function g(x){return isNaN(x=+x)?h:(x=.5+((x=+u(x))-a)*(n*x<n*a?l:c),d(f?Math.max(0,Math.min(1,x)):x))}g.domain=function(x){return arguments.length?([e,t,r]=x,i=u(e=+e),a=u(t=+t),s=u(r=+r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g):[e,t,r]},g.clamp=function(x){return arguments.length?(f=!!x,g):f},g.interpolator=function(x){return arguments.length?(d=x,g):d};function m(x){return function(y){var w,b,j;return arguments.length?([w,b,j]=y,d=O$(x,[w,b,j]),g):[d(0),d(.5),d(1)]}}return g.range=m(Do),g.rangeRound=m(Pg),g.unknown=function(x){return arguments.length?(h=x,g):h},function(x){return u=x,i=x(e),a=x(t),s=x(r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g}}function M2(){var e=fi(nu()(rr));return e.copy=function(){return pi(e,M2())},$n.apply(e,arguments)}function R2(){var e=Mg(nu()).domain([.1,1,10]);return e.copy=function(){return pi(e,R2()).base(e.base())},$n.apply(e,arguments)}function A2(){var e=Rg(nu());return e.copy=function(){return pi(e,A2()).constant(e.constant())},$n.apply(e,arguments)}function zg(){var e=Ag(nu());return e.copy=function(){return pi(e,zg()).exponent(e.exponent())},$n.apply(e,arguments)}function c8(){return zg.apply(null,arguments).exponent(.5)}const ba=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sg,scaleDiverging:M2,scaleDivergingLog:R2,scaleDivergingPow:zg,scaleDivergingSqrt:c8,scaleDivergingSymlog:A2,scaleIdentity:o2,scaleImplicit:nh,scaleLinear:i2,scaleLog:s2,scaleOrdinal:Cg,scalePoint:n$,scalePow:Ig,scaleQuantile:u2,scaleQuantize:d2,scaleRadial:c2,scaleSequential:P2,scaleSequentialLog:O2,scaleSequentialPow:Lg,scaleSequentialQuantile:T2,scaleSequentialSqrt:l8,scaleSequentialSymlog:k2,scaleSqrt:X$,scaleSymlog:l2,scaleThreshold:f2,scaleTime:a8,scaleUtc:s8,tickFormat:n2},Symbol.toStringTag,{value:"Module"}));var hi=e=>e.chartData,Fg=J([hi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Vg=(e,t,r,n)=>n?Fg(e):hi(e);function Li(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Qt(t)&&Qt(r))return!0}return!1}function Ob(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function I2(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Qt(r))i=r;else if(typeof r=="function")return;if(Qt(n))a=n;else if(typeof n=="function")return;var s=[i,a];if(Li(s))return s}}function u8(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Li(n))return Ob(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,s,l;if(i==="auto")t!=null&&(s=Math.min(...t));else if(Ne(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&ux.test(i)){var c=ux.exec(i);if(c==null||t==null)s=void 0;else{var d=+c[1];s=t[0]-d}}else s=t?.[0];if(a==="auto")t!=null&&(l=Math.max(...t));else if(Ne(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t?.[1]))}catch{}else if(typeof a=="string"&&dx.test(a)){var u=dx.exec(a);if(u==null||t==null)l=void 0;else{var f=+u[1];l=t[1]+f}}else l=t?.[1];var h=[s,l];if(Li(h))return t==null?h:Ob(h,t,r)}}}var _o=1e9,d8={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wg,lt=!0,Lr="[DecimalError] ",Di=Lr+"Invalid argument: ",Hg=Lr+"Exponent out of range: ",Bo=Math.floor,ji=Math.pow,f8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xr,$t=1e7,nt=7,N2=9007199254740991,fc=Bo(N2/nt),Oe={};Oe.absoluteValue=Oe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Oe.comparedTo=Oe.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Oe.decimalPlaces=Oe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Oe.dividedBy=Oe.div=function(e){return kn(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,r=t.constructor;return et(kn(t,new r(e),0,1),r.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return Et(this)};Oe.greaterThan=Oe.gt=function(e){return this.cmp(e)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(e){return this.cmp(e)>=0};Oe.isInteger=Oe.isint=function(){return this.e>this.d.length-2};Oe.isNegative=Oe.isneg=function(){return this.s<0};Oe.isPositive=Oe.ispos=function(){return this.s>0};Oe.isZero=function(){return this.s===0};Oe.lessThan=Oe.lt=function(e){return this.cmp(e)<0};Oe.lessThanOrEqualTo=Oe.lte=function(e){return this.cmp(e)<1};Oe.logarithm=Oe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(xr))throw Error(Lr+"NaN");if(r.s<1)throw Error(Lr+(r.s?"NaN":"-Infinity"));return r.eq(xr)?new n(0):(lt=!1,t=kn(Qa(r,a),Qa(e,a),a),lt=!0,et(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?B2(t,e):D2(t,(e.s=-e.s,e))};Oe.modulo=Oe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Lr+"NaN");return r.s?(lt=!1,t=kn(r,e,0,1).times(e),lt=!0,r.minus(t)):et(new n(r),i)};Oe.naturalExponential=Oe.exp=function(){return _2(this)};Oe.naturalLogarithm=Oe.ln=function(){return Qa(this)};Oe.negated=Oe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Oe.plus=Oe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D2(t,e):B2(t,(e.s=-e.s,e))};Oe.precision=Oe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Di+e);if(t=Et(i)+1,n=i.d.length-1,r=n*nt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Oe.squareRoot=Oe.sqrt=function(){var e,t,r,n,i,a,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Lr+"NaN")}for(e=Et(l),lt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=sn(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Bo((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(kn(l,a,s+2)).times(.5),sn(a.d).slice(0,s)===(t=sn(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(et(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;s+=4}return lt=!0,et(n,r)};Oe.times=Oe.mul=function(e){var t,r,n,i,a,s,l,c,d,u=this,f=u.constructor,h=u.d,g=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,c=h.length,d=g.length,c<d&&(a=h,h=g,g=a,s=c,c=d,d=s),a=[],s=c+d,n=s;n--;)a.push(0);for(n=d;--n>=0;){for(t=0,i=c+n;i>n;)l=a[i]+g[n]*h[i-n-1]+t,a[i--]=l%$t|0,t=l/$t|0;a[i]=(a[i]+t)%$t|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,lt?et(e,f.precision):e};Oe.toDecimalPlaces=Oe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(hn(e,0,_o),t===void 0?t=n.rounding:hn(t,0,8),et(r,e+Et(r)+1,t))};Oe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=zi(n,!0):(hn(e,0,_o),t===void 0?t=i.rounding:hn(t,0,8),n=et(new i(n),e+1,t),r=zi(n,!0,e+1)),r};Oe.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?zi(i):(hn(e,0,_o),t===void 0?t=a.rounding:hn(t,0,8),n=et(new a(i),e+Et(i)+1,t),r=zi(n.abs(),!1,e+Et(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return et(new t(e),Et(e)+1,t.rounding)};Oe.toNumber=function(){return+this};Oe.toPower=Oe.pow=function(e){var t,r,n,i,a,s,l=this,c=l.constructor,d=12,u=+(e=new c(e));if(!e.s)return new c(xr);if(l=new c(l),!l.s){if(e.s<1)throw Error(Lr+"Infinity");return l}if(l.eq(xr))return l;if(n=c.precision,e.eq(xr))return et(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=l.s,s){if((r=u<0?-u:u)<=N2){for(i=new c(xr),t=Math.ceil(n/nt+4),lt=!1;r%2&&(i=i.times(l),Tb(i.d,t)),r=Bo(r/2),r!==0;)l=l.times(l),Tb(l.d,t);return lt=!0,e.s<0?new c(xr).div(i):et(i,n)}}else if(a<0)throw Error(Lr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,lt=!1,i=e.times(Qa(l,n+d)),lt=!0,i=_2(i),i.s=a,i};Oe.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Et(i),n=zi(i,r<=a.toExpNeg||r>=a.toExpPos)):(hn(e,1,_o),t===void 0?t=a.rounding:hn(t,0,8),i=et(new a(i),e,t),r=Et(i),n=zi(i,e<=r||r<=a.toExpNeg,e)),n};Oe.toSignificantDigits=Oe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(hn(e,1,_o),t===void 0?t=n.rounding:hn(t,0,8)),et(new n(r),e,t)};Oe.toString=Oe.valueOf=Oe.val=Oe.toJSON=Oe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Et(e),r=e.constructor;return zi(e,t<=r.toExpNeg||t>=r.toExpPos)};function D2(e,t){var r,n,i,a,s,l,c,d,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),lt?et(t,f):t;if(c=e.d,d=t.d,s=e.e,i=t.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,l=d.length):(n=d,i=s,l=c.length),s=Math.ceil(f/nt),l=s>l?s+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=d.length,l-a<0&&(a=l,n=d,d=c,c=n),r=0;a;)r=(c[--a]=c[a]+d[a]+r)/$t|0,c[a]%=$t;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,lt?et(t,f):t}function hn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Di+e)}function sn(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)n=e[t]+"",r=nt-n.length,r&&(a+=ei(r)),a+=n;s=e[t],n=s+"",r=nt-n.length,r&&(a+=ei(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var kn=(function(){function e(n,i){var a,s=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+s,n[l]=a%$t|0,s=a/$t|0;return s&&n.unshift(s),n}function t(n,i,a,s){var l,c;if(a!=s)c=a>s?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*$t+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var l,c,d,u,f,h,g,m,x,y,w,b,j,P,E,S,O,k,M=n.constructor,A=n.s==i.s?1:-1,_=n.d,D=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(Lr+"Division by zero");for(c=n.e-i.e,O=D.length,E=_.length,g=new M(A),m=g.d=[],d=0;D[d]==(_[d]||0);)++d;if(D[d]>(_[d]||0)&&--c,a==null?b=a=M.precision:s?b=a+(Et(n)-Et(i))+1:b=a,b<0)return new M(0);if(b=b/nt+2|0,d=0,O==1)for(u=0,D=D[0],b++;(d<E||u)&&b--;d++)j=u*$t+(_[d]||0),m[d]=j/D|0,u=j%D|0;else{for(u=$t/(D[0]+1)|0,u>1&&(D=e(D,u),_=e(_,u),O=D.length,E=_.length),P=O,x=_.slice(0,O),y=x.length;y<O;)x[y++]=0;k=D.slice(),k.unshift(0),S=D[0],D[1]>=$t/2&&++S;do u=0,l=t(D,x,O,y),l<0?(w=x[0],O!=y&&(w=w*$t+(x[1]||0)),u=w/S|0,u>1?(u>=$t&&(u=$t-1),f=e(D,u),h=f.length,y=x.length,l=t(f,x,h,y),l==1&&(u--,r(f,O<h?k:D,h))):(u==0&&(l=u=1),f=D.slice()),h=f.length,h<y&&f.unshift(0),r(x,f,y),l==-1&&(y=x.length,l=t(D,x,O,y),l<1&&(u++,r(x,O<y?k:D,y))),y=x.length):l===0&&(u++,x=[0]),m[d++]=u,l&&x[0]?x[y++]=_[P]||0:(x=[_[P]],y=1);while((P++<E||x[0]!==void 0)&&b--)}return m[0]||m.shift(),g.e=c,et(g,s?a+Et(g)+1:a)}})();function _2(e,t){var r,n,i,a,s,l,c=0,d=0,u=e.constructor,f=u.precision;if(Et(e)>16)throw Error(Hg+Et(e));if(!e.s)return new u(xr);for(lt=!1,l=f,s=new u(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(n=Math.log(ji(2,d))/Math.LN10*2+5|0,l+=n,r=i=a=new u(xr),u.precision=l;;){if(i=et(i.times(e),l),r=r.times(++c),s=a.plus(kn(i,r,l)),sn(s.d).slice(0,l)===sn(a.d).slice(0,l)){for(;d--;)a=et(a.times(a),l);return u.precision=f,t==null?(lt=!0,et(a,f)):a}a=s}}function Et(e){for(var t=e.e*nt,r=e.d[0];r>=10;r/=10)t++;return t}function kf(e,t,r){if(t>e.LN10.sd())throw lt=!0,r&&(e.precision=r),Error(Lr+"LN10 precision limit exceeded");return et(new e(e.LN10),t)}function ei(e){for(var t="";e--;)t+="0";return t}function Qa(e,t){var r,n,i,a,s,l,c,d,u,f=1,h=10,g=e,m=g.d,x=g.constructor,y=x.precision;if(g.s<1)throw Error(Lr+(g.s?"NaN":"-Infinity"));if(g.eq(xr))return new x(0);if(t==null?(lt=!1,d=y):d=t,g.eq(10))return t==null&&(lt=!0),kf(x,d);if(d+=h,x.precision=d,r=sn(m),n=r.charAt(0),a=Et(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=sn(g.d),n=r.charAt(0),f++;a=Et(g),n>1?(g=new x("0."+r),a++):g=new x(n+"."+r.slice(1))}else return c=kf(x,d+2,y).times(a+""),g=Qa(new x(n+"."+r.slice(1)),d-h).plus(c),x.precision=y,t==null?(lt=!0,et(g,y)):g;for(l=s=g=kn(g.minus(xr),g.plus(xr),d),u=et(g.times(g),d),i=3;;){if(s=et(s.times(u),d),c=l.plus(kn(s,new x(i),d)),sn(c.d).slice(0,d)===sn(l.d).slice(0,d))return l=l.times(2),a!==0&&(l=l.plus(kf(x,d+2,y).times(a+""))),l=kn(l,new x(f),d),x.precision=y,t==null?(lt=!0,et(l,y)):l;l=c,i+=2}}function kb(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Bo(r/nt),e.d=[],n=(r+1)%nt,r<0&&(n+=nt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=nt;n<i;)e.d.push(+t.slice(n,n+=nt));t=t.slice(n),n=nt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),lt&&(e.e>fc||e.e<-fc))throw Error(Hg+r)}else e.s=0,e.e=0,e.d=[0];return e}function et(e,t,r){var n,i,a,s,l,c,d,u,f=e.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=nt,i=t,d=f[u=0];else{if(u=Math.ceil((n+1)/nt),a=f.length,u>=a)return e;for(d=a=f[u],s=1;a>=10;a/=10)s++;n%=nt,i=n-nt+s}if(r!==void 0&&(a=ji(10,s-i-1),l=d/a%10|0,c=t<0||f[u+1]!==void 0||d%a,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?d/ji(10,s-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(a=Et(e),f.length=1,t=t-a-1,f[0]=ji(10,(nt-t%nt)%nt),e.e=Bo(-t/nt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,a=1,u--):(f.length=u+1,a=ji(10,nt-n),f[u]=i>0?(d/ji(10,s-i)%ji(10,i)|0)*a:0),c)for(;;)if(u==0){(f[0]+=a)==$t&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=$t)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(lt&&(e.e>fc||e.e<-fc))throw Error(Hg+Et(e));return e}function B2(e,t){var r,n,i,a,s,l,c,d,u,f,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),lt?et(t,g):t;if(c=e.d,f=t.d,n=t.e,d=e.e,c=c.slice(),s=d-n,s){for(u=s<0,u?(r=c,s=-s,l=f.length):(r=f,n=d,l=c.length),i=Math.max(Math.ceil(g/nt),l)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=f.length,u=i<l,u&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){u=c[i]<f[i];break}s=0}for(u&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>s;){if(c[--i]<f[i]){for(a=i;a&&c[--a]===0;)c[a]=$t-1;--c[a],c[i]+=$t}c[i]-=f[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,lt?et(t,g):t):new h(0)}function zi(e,t,r){var n,i=Et(e),a=sn(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+ei(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ei(-i-1)+a,r&&(n=r-s)>0&&(a+=ei(n))):i>=s?(a+=ei(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+ei(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=ei(n))),e.s<0?"-"+a:a}function Tb(e,t){if(e.length>t)return e.length=t,!0}function $2(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Di+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return kb(s,a.toString())}else if(typeof a!="string")throw Error(Di+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,f8.test(a))kb(s,a);else throw Error(Di+a)}if(i.prototype=Oe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=$2,i.config=i.set=p8,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function p8(e){if(!e||typeof e!="object")throw Error(Lr+"Object expected");var t,r,n,i=["precision",1,_o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Bo(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Di+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Di+r+": "+n);return this}var Wg=$2(d8);xr=new Wg(1);const Xe=Wg;var h8=e=>e,L2={},z2=e=>e===L2,Mb=e=>function t(){return arguments.length===0||arguments.length===1&&z2(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},F2=(e,t)=>e===1?t:Mb(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(s=>s!==L2).length;return a>=e?t(...n):F2(e-a,Mb(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=n.map(u=>z2(u)?l.shift():u);return t(...d,...l)}))}),g8=e=>F2(e.length,e),uh=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},m8=g8((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),v8=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return h8;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce((l,c)=>c(l),a(...arguments))}},dh=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),V2=e=>{var t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t&&i.every((s,l)=>{var c;return s===((c=t)===null||c===void 0?void 0:c[l])})||(t=i,r=e(...i)),r}};function H2(e){var t;return e===0?t=1:t=Math.floor(new Xe(e).abs().log(10).toNumber())+1,t}function W2(e,t,r){for(var n=new Xe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var U2=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},K2=(e,t,r)=>{if(e.lte(0))return new Xe(0);var n=H2(e.toNumber()),i=new Xe(10).pow(n),a=e.div(i),s=n!==1?.05:.1,l=new Xe(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=l.mul(i);return t?new Xe(c.toNumber()):new Xe(Math.ceil(c.toNumber()))},y8=(e,t,r)=>{var n=new Xe(1),i=new Xe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Xe(10).pow(H2(e)-1),i=new Xe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):r||(i=new Xe(Math.floor(e)));var s=Math.floor((t-1)/2),l=v8(m8(c=>i.add(new Xe(c-s).mul(n)).toNumber()),uh);return l(0,t)},Y2=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var s=K2(new Xe(r).sub(t).div(n-1),i,a),l;t<=0&&r>=0?l=new Xe(0):(l=new Xe(t).add(r).div(2),l=l.sub(new Xe(l).mod(s)));var c=Math.ceil(l.sub(t).div(s).toNumber()),d=Math.ceil(new Xe(r).sub(l).div(s).toNumber()),u=c+d+1;return u>n?Y2(t,r,n,i,a+1):(u<n&&(d=r>0?d+(n-u):d,c=r>0?c:c+(n-u)),{step:s,tickMin:l.sub(new Xe(c).mul(s)),tickMax:l.add(new Xe(d).mul(s))})};function x8(e){var[t,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(n,2),[s,l]=U2([t,r]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...uh(0,n-1).map(()=>1/0)]:[...uh(0,n-1).map(()=>-1/0),l];return t>r?dh(c):c}if(s===l)return y8(s,n,i);var{step:d,tickMin:u,tickMax:f}=Y2(s,l,a,i,0),h=W2(u,f.add(new Xe(.1).mul(d)),d);return t>r?dh(h):h}function b8(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=U2([r,n]);if(a===-1/0||s===1/0)return[r,n];if(a===s)return[a];var l=Math.max(t,2),c=K2(new Xe(s).sub(a).div(l-1),i,0),d=[...W2(new Xe(a),new Xe(s),c),s];return i===!1&&(d=d.map(u=>Math.round(u))),r>n?dh(d):d}var w8=V2(x8),C8=V2(b8),q2=e=>e.rootProps.maxBarSize,S8=e=>e.rootProps.barGap,G2=e=>e.rootProps.barCategoryGap,j8=e=>e.rootProps.barSize,ys=e=>e.rootProps.stackOffset,Ug=e=>e.options.chartName,Kg=e=>e.rootProps.syncId,X2=e=>e.rootProps.syncMethod,Yg=e=>e.options.eventEmitter,wn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},vr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},iu=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},E8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:wn.angleAxisId,includeHidden:!1,name:void 0,reversed:wn.reversed,scale:wn.scale,tick:wn.tick,tickCount:void 0,ticks:void 0,type:wn.type,unit:void 0},P8={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:vr.type,unit:void 0},O8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:wn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:wn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:wn.scale,tick:wn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},k8={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:"category",unit:void 0},qg=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?O8:E8,Gg=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?k8:P8,ou=e=>e.polarOptions,Xg=J([_n,Bn,Rt],Sj),Z2=J([ou,Xg],(e,t)=>{if(e!=null)return Zt(e.innerRadius,t,0)}),Q2=J([ou,Xg],(e,t)=>{if(e!=null)return Zt(e.outerRadius,t,t*.8)}),T8=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},J2=J([ou],T8);J([qg,J2],iu);var eE=J([Xg,Z2,Q2],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});J([Gg,eE],iu);var tE=J([We,ou,Z2,Q2,_n,Bn],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:s,cy:l,startAngle:c,endAngle:d}=t;return{cx:Zt(s,i,i/2),cy:Zt(l,a,a/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:d,clockWise:!1}}}),dt=(e,t)=>t,xs=(e,t,r)=>r;function Zg(e){return e?.id}var It=e=>{var t=We(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},$o=e=>e.tooltip.settings.axisId,Nt=e=>{var t=It(e),r=$o(e);return bs(e,t,r)},rE=J([Nt],e=>e?.dataKey);function nE(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,s=new Map;return e.forEach(l=>{var c,d=(c=l.data)!==null&&c!==void 0?c:n;if(!(d==null||d.length===0)){var u=Zg(l);d.forEach((f,h)=>{var g=a==null||i?h:String(ht(f,a,null)),m=ht(f,l.dataKey,0),x;s.has(g)?x=s.get(g):x={},Object.assign(x,{[u]:m}),s.set(g,x)})}}),Array.from(s.values())}function au(e){return e.stackId!=null&&e.dataKey!=null}var su=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function lu(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){M8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M8(e,t,r){return(t=R8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R8(e){var t=A8(e,"string");return typeof t=="symbol"?t:t+""}function A8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fh=[0,"auto"],gr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},iE=(e,t)=>e.cartesianAxis.xAxis[t],Ln=(e,t)=>{var r=iE(e,t);return r??gr},mr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:fh,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:hs},oE=(e,t)=>e.cartesianAxis.yAxis[t],zn=(e,t)=>{var r=oE(e,t);return r??mr},I8={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Qg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??I8},gt=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);case"zAxis":return Qg(e,r);case"angleAxis":return qg(e,r);case"radiusAxis":return Gg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},N8=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},bs=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);case"angleAxis":return qg(e,r);case"radiusAxis":return Gg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},aE=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Jg(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var em=e=>e.graphicalItems.cartesianItems,D8=J([dt,xs],Jg),tm=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),ws=J([em,gt,D8],tm,{memoizeOptions:{resultEqualityCheck:lu}}),sE=J([ws],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(au)),lE=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),_8=J([ws],lE),rm=e=>e.map(t=>t.data).filter(Boolean).flat(1),B8=J([ws],rm,{memoizeOptions:{resultEqualityCheck:lu}}),nm=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},im=J([B8,Vg],nm),om=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:ht(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:ht(i,n)}))):e.map(n=>({value:n})),cu=J([im,gt,ws],om);function cE(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function kl(e){if(pn(e)||e instanceof Date){var t=Number(e);if(Qt(t))return t}}function Ab(e){if(Array.isArray(e)){var t=[kl(e[0]),kl(e[1])];return Li(t)?t:void 0}var r=kl(e);if(r!=null)return[r,r]}function Lo(e){return e.map(kl).filter(a5)}function $8(e,t,r){return!r||typeof t!="number"||Br(t)?[]:r.length?Lo(r.flatMap(n=>{var i=ht(e,n.dataKey),a,s;if(Array.isArray(i)?[a,s]=i:a=s=i,!(!Qt(a)||!Qt(s)))return[t-a,t+s]})):[]}var L8=J([sE,Vg,Nt],nE),uE=(e,t,r)=>{var n={},i=t.reduce((a,s)=>(s.stackId==null||(a[s.stackId]==null&&(a[s.stackId]=[]),a[s.stackId].push(s)),a),n);return Object.fromEntries(Object.entries(i).map(a=>{var[s,l]=a,c=l.map(Zg);return[s,{stackedData:k6(e,c,r),graphicalItems:l}]}))},ph=J([L8,sE,ys],uE),dE=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var s=I6(e,i,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},z8=J([gt],e=>e.allowDataOverflow),am=e=>{var t;if(e==null||!("domain"in e))return fh;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Lo(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:fh},sm=J([gt],am),lm=J([sm,z8],I2),F8=J([ph,hi,dt,lm],dE,{memoizeOptions:{resultEqualityCheck:su}}),uu=e=>e.errorBars,V8=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>cE(r,n)),hc=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),s=Math.min(...a),l=Math.max(...a);return[s,l]}},cm=(e,t,r,n,i)=>{var a,s;if(r.length>0&&e.forEach(l=>{r.forEach(c=>{var d,u,f=(d=n[c.id])===null||d===void 0?void 0:d.filter(w=>cE(i,w)),h=ht(l,(u=t.dataKey)!==null&&u!==void 0?u:c.dataKey),g=$8(l,h,f);if(g.length>=2){var m=Math.min(...g),x=Math.max(...g);(a==null||m<a)&&(a=m),(s==null||x>s)&&(s=x)}var y=Ab(h);y!=null&&(a=a==null?y[0]:Math.min(a,y[0]),s=s==null?y[1]:Math.max(s,y[1]))})}),t?.dataKey!=null&&e.forEach(l=>{var c=Ab(ht(l,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),s=s==null?c[1]:Math.max(s,c[1]))}),Qt(a)&&Qt(s))return[a,s]},H8=J([im,gt,_8,uu,dt],cm,{memoizeOptions:{resultEqualityCheck:su}});function W8(e){var{value:t}=e;if(pn(t)||t instanceof Date)return t}var U8=(e,t,r)=>{var n=e.map(W8).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&TS(n))?Yj(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},fE=e=>e.referenceElements.dots,zo=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),K8=J([fE,dt,xs],zo),pE=e=>e.referenceElements.areas,Y8=J([pE,dt,xs],zo),hE=e=>e.referenceElements.lines,q8=J([hE,dt,xs],zo),gE=(e,t)=>{var r=Lo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},G8=J(K8,dt,gE),mE=(e,t)=>{var r=Lo(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},X8=J([Y8,dt],mE),vE=(e,t)=>{var r=Lo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Z8=J(q8,dt,vE),Q8=J(G8,Z8,X8,(e,t,r)=>hc(e,r,t)),um=(e,t,r,n,i,a,s,l)=>{if(r!=null)return r;var c=s==="vertical"&&l==="xAxis"||s==="horizontal"&&l==="yAxis",d=c?hc(n,a,i):hc(a,i);return u8(t,d,e.allowDataOverflow)},J8=J([gt,sm,lm,F8,H8,Q8,We,dt],um,{memoizeOptions:{resultEqualityCheck:su}}),eL=[0,1],dm=(e,t,r,n,i,a,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var{dataKey:l,type:c}=e,d=Wi(t,a);return d&&l==null?Yj(0,r.length):c==="category"?U8(n,e,d):i==="expand"?eL:s}},fm=J([gt,We,im,cu,ys,dt,J8],dm),yE=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:s}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":s==="category"?"band":"linear";if(typeof a=="string"){var l="scale".concat(ls(a));return l in ba?l:"point"}}},Fo=J([gt,We,aE,Ug,dt],yE);function tL(e){if(e!=null){if(e in ba)return ba[e]();var t="scale".concat(ls(e));if(t in ba)return ba[t]()}}function pm(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=tL(t);if(i!=null){var a=i.domain(r).range(n);return S6(a),a}}}var hm=(e,t,r)=>{var n=am(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Li(e))return w8(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Li(e))return C8(e,t.tickCount,t.allowDecimals)}},gm=J([fm,bs,Fo],hm),mm=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Li(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],s=t[1],l=r[r.length-1];return[Math.min(i,a),Math.max(s,l)]}return t},rL=J([gt,fm,gm,dt],mm),nL=J(cu,gt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Lo(e.map(l=>l.value))).sort((l,c)=>l-c);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var s=n[a+1]-n[a];r=Math.min(r,s)}return r/i}}),xE=J(nL,We,G2,Rt,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!Qt(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=Zt(r,e*a),l=e*a/2;return l-s-(l-s)/a*s}return 0}),iL=(e,t)=>{var r=Ln(e,t);return r==null||typeof r.padding!="string"?0:xE(e,"xAxis",t,r.padding)},oL=(e,t)=>{var r=zn(e,t);return r==null||typeof r.padding!="string"?0:xE(e,"yAxis",t,r.padding)},aL=J(Ln,iL,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),sL=J(zn,oL,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),lL=J([Rt,aL,qc,Yc,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),cL=J([Rt,We,sL,qc,Yc,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:s}=i;return a?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Cs=(e,t,r,n)=>{var i;switch(t){case"xAxis":return lL(e,r,n);case"yAxis":return cL(e,r,n);case"zAxis":return(i=Qg(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return J2(e);case"radiusAxis":return eE(e,r);default:return}},bE=J([gt,Cs],iu),Vo=J([gt,Fo,rL,bE],pm);J([ws,uu,dt],V8);function wE(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var du=(e,t)=>t,fu=(e,t,r)=>r,uL=J(Uc,du,fu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(wE)),dL=J(Kc,du,fu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(wE)),CE=(e,t)=>({width:e.width,height:t.height}),fL=(e,t)=>{var r=typeof t.width=="number"?t.width:hs;return{width:r,height:e.height}},SE=J(Rt,Ln,CE),pL=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},hL=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},gL=J(Bn,Rt,uL,du,fu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=CE(t,l);s==null&&(s=pL(t,n,e));var d=n==="top"&&!i||n==="bottom"&&i;a[l.id]=s-Number(d)*c.height,s+=(d?-1:1)*c.height}),a}),mL=J(_n,Rt,dL,du,fu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=fL(t,l);s==null&&(s=hL(t,n,e));var d=n==="left"&&!i||n==="right"&&i;a[l.id]=s-Number(d)*c.width,s+=(d?-1:1)*c.width}),a}),vL=(e,t)=>{var r=Ln(e,t);if(r!=null)return gL(e,r.orientation,r.mirror)},yL=J([Rt,Ln,vL,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),xL=(e,t)=>{var r=zn(e,t);if(r!=null)return mL(e,r.orientation,r.mirror)},bL=J([Rt,zn,xL,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),jE=J(Rt,zn,(e,t)=>{var r=typeof t.width=="number"?t.width:hs;return{width:r,height:e.height}}),Ib=(e,t,r)=>{switch(t){case"xAxis":return SE(e,r).width;case"yAxis":return jE(e,r).height;default:return}},EE=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=r,l=Wi(e,n),c=t.map(d=>d.value);if(s&&l&&a==="category"&&i&&TS(c))return c}},vm=J([We,cu,gt,dt],EE),PE=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,s=Wi(e,n);if(s&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},ym=J([We,cu,bs,dt],PE),Nb=J([We,N8,Fo,Vo,vm,ym,Cs,gm,dt],(e,t,r,n,i,a,s,l,c)=>{if(t==null)return null;var d=Wi(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:d,niceTicks:l,range:s,realScaleType:r,scale:n}}),wL=(e,t,r,n,i,a,s,l,c)=>{if(!(t==null||n==null)){var d=Wi(e,c),{type:u,ticks:f,tickCount:h}=t,g=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,m=u==="category"&&n.bandwidth?n.bandwidth()/g:0;m=c==="angleAxis"&&a!=null&&a.length>=2?Lt(a[0]-a[1])*2*m:m;var x=f||i;if(x){var y=x.map((w,b)=>{var j=s?s.indexOf(w):w;return{index:b,coordinate:n(j)+m,value:w,offset:m}});return y.filter(w=>!Br(w.coordinate))}return d&&l?l.map((w,b)=>({coordinate:n(w)+m,value:w,index:b,offset:m})):n.ticks?n.ticks(h).map(w=>({coordinate:n(w)+m,value:w,offset:m})):n.domain().map((w,b)=>({coordinate:n(w)+m,value:s?s[w]:w,index:b,offset:m}))}},OE=J([We,bs,Fo,Vo,gm,Cs,vm,ym,dt],wL),CL=(e,t,r,n,i,a,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Wi(e,s),{tickCount:c}=t,d=0;return d=s==="angleAxis"&&n?.length>=2?Lt(n[0]-n[1])*2*d:d,l&&a?a.map((u,f)=>({coordinate:r(u)+d,value:u,index:f,offset:d})):r.ticks?r.ticks(c).map(u=>({coordinate:r(u)+d,value:u,offset:d})):r.domain().map((u,f)=>({coordinate:r(u)+d,value:i?i[u]:u,index:f,offset:d}))}},Eo=J([We,bs,Vo,Cs,vm,ym,dt],CL),Po=J(gt,Vo,(e,t)=>{if(!(e==null||t==null))return pc(pc({},e),{},{scale:t})}),SL=J([gt,Fo,fm,bE],pm);J((e,t,r)=>Qg(e,r),SL,(e,t)=>{if(!(e==null||t==null))return pc(pc({},e),{},{scale:t})});var jL=J([We,Uc,Kc],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),kE=e=>e.options.defaultTooltipEventType,TE=e=>e.options.validateTooltipEventTypes;function ME(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function xm(e,t){var r=kE(e),n=TE(e);return ME(t,r,n)}function EL(e){return Ae(t=>xm(t,e))}var RE=(e,t)=>{var r,n=Number(t);if(!(Br(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},PL=e=>e.tooltip.settings,ri={active:!1,index:null,dataKey:void 0,coordinate:void 0},OL={itemInteraction:{click:ri,hover:ri},axisInteraction:{click:ri,hover:ri},keyboardInteraction:ri,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},AE=Cr({name:"tooltip",initialState:OL,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:er()},removeTooltipEntrySettings:{reducer(e,t){var r=On(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:er()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:kL,removeTooltipEntrySettings:TL,setTooltipSettingsState:ML,setActiveMouseOverItemIndex:IE,mouseLeaveItem:RL,mouseLeaveChart:NE,setActiveClickItemIndex:AL,setMouseOverAxisIndex:DE,setMouseClickAxisIndex:IL,setSyncInteraction:hh,setKeyboardInteraction:gh}=AE.actions,NL=AE.reducer;function Db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(r),!0).forEach(function(n){DL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DL(e,t,r){return(t=_L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _L(e){var t=BL(e,"string");return typeof t=="symbol"?t:t+""}function BL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $L(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function LL(e){return e.index!=null}var _E=(e,t,r,n)=>{if(t==null)return ri;var i=$L(e,t,r);if(i==null)return ri;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(LL(i)){if(a)return gl(gl({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return gl(gl({},ri),{},{coordinate:i.coordinate})},bm=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!Qt(n))return r;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(n,a)))},BE=(e,t,r,n,i,a,s,l)=>{if(!(a==null||l==null)){var c=s[0],d=c==null?void 0:l(c.positions,a);if(d!=null)return d;var u=i?.[Number(a)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},$E=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.dataKey)===i})},Ss=e=>e.options.tooltipPayloadSearcher,Ho=e=>e.tooltip;function _b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_b(Object(r),!0).forEach(function(n){zL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zL(e,t,r){return(t=FL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FL(e){var t=VL(e,"string");return typeof t=="symbol"?t:t+""}function VL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e,t){return e??t}var LE=(e,t,r,n,i,a,s)=>{if(!(t==null||a==null)){var{chartData:l,computedData:c,dataStartIndex:d,dataEndIndex:u}=r,f=[];return e.reduce((h,g)=>{var m,{dataDefinedOnItem:x,settings:y}=g,w=HL(x,l),b=Array.isArray(w)?jj(w,d,u):w,j=(m=y?.dataKey)!==null&&m!==void 0?m:n,P=y?.nameKey,E;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&s==="axis"?E=zD(b,n,i):E=a(b,t,c,P),Array.isArray(E))E.forEach(O=>{var k=Bb(Bb({},y),{},{name:O.name,unit:O.unit,color:void 0,fill:void 0});h.push(fx({tooltipEntrySettings:k,dataKey:O.dataKey,payload:O.payload,value:ht(O.payload,O.dataKey),name:O.name}))});else{var S;h.push(fx({tooltipEntrySettings:y,dataKey:j,payload:E,value:ht(E,j),name:(S=ht(E,P))!==null&&S!==void 0?S:y?.name}))}return h},f)}},wm=J([Nt,We,aE,Ug,It],yE),WL=J([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),UL=J([It,$o],Jg),js=J([WL,Nt,UL],tm,{memoizeOptions:{resultEqualityCheck:lu}}),KL=J([js],e=>e.filter(au)),YL=J([js],rm,{memoizeOptions:{resultEqualityCheck:lu}}),Wo=J([YL,hi],nm),qL=J([KL,hi,Nt],nE),Cm=J([Wo,Nt,js],om),zE=J([Nt],am),GL=J([Nt],e=>e.allowDataOverflow),FE=J([zE,GL],I2),XL=J([js],e=>e.filter(au)),ZL=J([qL,XL,ys],uE),QL=J([ZL,hi,It,FE],dE),JL=J([js],lE),ez=J([Wo,Nt,JL,uu,It],cm,{memoizeOptions:{resultEqualityCheck:su}}),tz=J([fE,It,$o],zo),rz=J([tz,It],gE),nz=J([pE,It,$o],zo),iz=J([nz,It],mE),oz=J([hE,It,$o],zo),az=J([oz,It],vE),sz=J([rz,az,iz],hc),lz=J([Nt,zE,FE,QL,ez,sz,We,It],um),VE=J([Nt,We,Wo,Cm,ys,It,lz],dm),cz=J([VE,Nt,wm],hm),uz=J([Nt,VE,cz,It],mm),HE=e=>{var t=It(e),r=$o(e),n=!1;return Cs(e,t,r,n)},WE=J([Nt,HE],iu),UE=J([Nt,wm,uz,WE],pm),dz=J([We,Cm,Nt,It],EE),fz=J([We,Cm,Nt,It],PE),pz=(e,t,r,n,i,a,s,l)=>{if(t){var{type:c}=t,d=Wi(e,l);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=c==="category"&&n.bandwidth?n.bandwidth()/u:0;return f=l==="angleAxis"&&i!=null&&i?.length>=2?Lt(i[0]-i[1])*2*f:f,d&&s?s.map((h,g)=>({coordinate:n(h)+f,value:h,index:g,offset:f})):n.domain().map((h,g)=>({coordinate:n(h)+f,value:a?a[h]:h,index:g,offset:f}))}}},Fn=J([We,Nt,wm,UE,HE,dz,fz,It],pz),Sm=J([kE,TE,PL],(e,t,r)=>ME(r.shared,e,t)),KE=e=>e.tooltip.settings.trigger,jm=e=>e.tooltip.settings.defaultIndex,pu=J([Ho,Sm,KE,jm],_E),Fi=J([pu,Wo],bm),YE=J([Fn,Fi],RE),qE=J([pu],e=>{if(e)return e.dataKey}),GE=J([Ho,Sm,KE,jm],$E),hz=J([_n,Bn,We,Rt,Fn,jm,GE,Ss],BE),gz=J([pu,hz],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),mz=J([pu],e=>e.active),vz=J([GE,Fi,hi,rE,YE,Ss,Sm],LE);J([vz],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){yz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yz(e,t,r){return(t=xz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xz(e){var t=bz(e,"string");return typeof t=="symbol"?t:t+""}function bz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wz=()=>Ae(Nt),Cz=()=>{var e=wz(),t=Ae(Fn),r=Ae(UE);return hg(Lb(Lb({},e),{},{scale:r}),t)},Sz=()=>Ae(Ug),Em=(e,t)=>t,XE=(e,t,r)=>r,Pm=(e,t,r,n)=>n,jz=J(Fn,e=>Lc(e,t=>t.coordinate)),Om=J([Ho,Em,XE,Pm],_E),ZE=J([Om,Wo],bm),Ez=(e,t,r)=>{if(t!=null){var n=Ho(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},QE=J([Ho,Em,XE,Pm],$E),gc=J([_n,Bn,We,Rt,Fn,Pm,QE,Ss],BE),Pz=J([Om,gc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),JE=J(Fn,ZE,RE),Oz=J([QE,ZE,hi,rE,JE,Ss,Em],LE),kz=J([Om],e=>({isActive:e.active,activeIndex:e.index})),Tz=(e,t,r,n,i,a,s,l)=>{if(!(!e||!t||!n||!i||!a)){var c=N6(e.chartX,e.chartY,t,r,l);if(c){var d=_6(c,t),u=w6(d,s,a,n,i),f=D6(t,a,u,c);return{activeIndex:String(u),activeCoordinate:f}}}};function mh(){return mh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mh.apply(null,arguments)}function zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){Mz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mz(e,t,r){return(t=Rz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rz(e){var t=Az(e,"string");return typeof t=="symbol"?t:t+""}function Az(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iz(e){var{coordinate:t,payload:r,index:n,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:c,chartName:d}=e,u=t,f=r,h=n;if(!l||!u||d!=="ScatterChart"&&c!=="axis")return null;var g,m;if(d==="ScatterChart")g=u,m=J3;else if(d==="BarChart")g=e5(s,u,i,a),m=Hj;else if(s==="radial"){var{cx:x,cy:y,radius:w,startAngle:b,endAngle:j}=Wj(u);g={cx:x,cy:y,startAngle:b,endAngle:j,innerRadius:w,outerRadius:w},m=Kj}else g={points:B5(s,u,i)},m=$j;var P=typeof l=="object"&&"className"in l?l.className:void 0,E=ml(ml(ml(ml({stroke:"#ccc",pointerEvents:"none"},i),g),za(l)),{},{payload:f,payloadIndex:h,className:Qe("recharts-tooltip-cursor",P)});return v.isValidElement(l)?v.cloneElement(l,E):v.createElement(m,E)}function Nz(e){var t=Cz(),r=Ij(),n=xg(),i=Sz();return C.createElement(Iz,mh({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var eP=v.createContext(null),Dz=()=>v.useContext(eP),Tf={exports:{}},Fb;function _z(){return Fb||(Fb=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,d,u){this.fn=c,this.context=d,this.once=u||!1}function a(c,d,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new i(u,f||c,h),m=r?r+d:d;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],g]:c._events[m].push(g):(c._events[m]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new n:delete c._events[d]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],u,f;if(this._eventsCount===0)return d;for(f in u=this._events)t.call(u,f)&&d.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},l.prototype.listeners=function(d){var u=r?r+d:d,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,g=f.length,m=new Array(g);h<g;h++)m[h]=f[h].fn;return m},l.prototype.listenerCount=function(d){var u=r?r+d:d,f=this._events[u];return f?f.fn?1:f.length:0},l.prototype.emit=function(d,u,f,h,g,m){var x=r?r+d:d;if(!this._events[x])return!1;var y=this._events[x],w=arguments.length,b,j;if(y.fn){switch(y.once&&this.removeListener(d,y.fn,void 0,!0),w){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,f),!0;case 4:return y.fn.call(y.context,u,f,h),!0;case 5:return y.fn.call(y.context,u,f,h,g),!0;case 6:return y.fn.call(y.context,u,f,h,g,m),!0}for(j=1,b=new Array(w-1);j<w;j++)b[j-1]=arguments[j];y.fn.apply(y.context,b)}else{var P=y.length,E;for(j=0;j<P;j++)switch(y[j].once&&this.removeListener(d,y[j].fn,void 0,!0),w){case 1:y[j].fn.call(y[j].context);break;case 2:y[j].fn.call(y[j].context,u);break;case 3:y[j].fn.call(y[j].context,u,f);break;case 4:y[j].fn.call(y[j].context,u,f,h);break;default:if(!b)for(E=1,b=new Array(w-1);E<w;E++)b[E-1]=arguments[E];y[j].fn.apply(y[j].context,b)}}return!0},l.prototype.on=function(d,u,f){return a(this,d,u,f,!1)},l.prototype.once=function(d,u,f){return a(this,d,u,f,!0)},l.prototype.removeListener=function(d,u,f,h){var g=r?r+d:d;if(!this._events[g])return this;if(!u)return s(this,g),this;var m=this._events[g];if(m.fn)m.fn===u&&(!h||m.once)&&(!f||m.context===f)&&s(this,g);else{for(var x=0,y=[],w=m.length;x<w;x++)(m[x].fn!==u||h&&!m[x].once||f&&m[x].context!==f)&&y.push(m[x]);y.length?this._events[g]=y.length===1?y[0]:y:s(this,g)}return this},l.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&s(this,u)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Tf)),Tf.exports}var Bz=_z();const $z=wr(Bz);var Ja=new $z,vh="recharts.syncEvent.tooltip",Vb="recharts.syncEvent.brush";function tP(e,t){if(t){var r=Number.parseInt(t,10);if(!Br(r))return e?.[r]}}var Lz={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},rP=Cr({name:"options",initialState:Lz,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),zz=rP.reducer,{createEventEmitter:Fz}=rP.actions;function Vz(e){return e.tooltip.syncInteraction}var Hz={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},nP=Cr({name:"chartData",initialState:Hz,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Hb,setDataStartEndIndexes:Wz}=nP.actions,Uz=nP.reducer,Kz=["x","y"];function Wb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function no(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wb(Object(r),!0).forEach(function(n){Yz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yz(e,t,r){return(t=qz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qz(e){var t=Gz(e,"string");return typeof t=="symbol"?t:t+""}function Gz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xz(e,t){if(e==null)return{};var r,n,i=Zz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iP=()=>{};function Qz(){var e=Ae(Kg),t=Ae(Yg),r=ut(),n=Ae(X2),i=Ae(Fn),a=xg(),s=Gc(),l=Ae(c=>c.rootProps.className);v.useEffect(()=>{if(e==null)return iP;var c=(d,u,f)=>{if(t!==f&&e===d){if(n==="index"){var h;if(s&&u!==null&&u!==void 0&&(h=u.payload)!==null&&h!==void 0&&h.coordinate&&u.payload.sourceViewBox){var g=u.payload.coordinate,{x:m,y:x}=g,y=Xz(g,Kz),{x:w,y:b,width:j,height:P}=u.payload.sourceViewBox,E=no(no({},y),{},{x:s.x+(j?(m-w)/j:0)*s.width,y:s.y+(P?(x-b)/P:0)*s.height});r(no(no({},u),{},{payload:no(no({},u.payload),{},{coordinate:E})}))}else r(u);return}if(i!=null){var S;if(typeof n=="function"){var O={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},k=n(i,O);S=i[k]}else n==="value"&&(S=i.find(N=>String(N.value)===u.payload.label));var{coordinate:M}=u.payload;if(S==null||u.payload.active===!1||M==null||s==null){r(hh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:A,y:_}=M,D=Math.min(A,s.x+s.width),B=Math.min(_,s.y+s.height),H={x:a==="horizontal"?S.coordinate:D,y:a==="horizontal"?B:S.coordinate},T=hh({active:u.payload.active,coordinate:H,dataKey:u.payload.dataKey,index:String(S.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox});r(T)}}};return Ja.on(vh,c),()=>{Ja.off(vh,c)}},[l,r,t,e,n,i,a,s])}function Jz(){var e=Ae(Kg),t=Ae(Yg),r=ut();v.useEffect(()=>{if(e==null)return iP;var n=(i,a,s)=>{t!==s&&e===i&&r(Wz(a))};return Ja.on(Vb,n),()=>{Ja.off(Vb,n)}},[r,t,e])}function eF(){var e=ut();v.useEffect(()=>{e(Fz())},[e]),Qz(),Jz()}function tF(e,t,r,n,i,a){var s=Ae(g=>Ez(g,e,t)),l=Ae(Yg),c=Ae(Kg),d=Ae(X2),u=Ae(Vz),f=u?.active,h=Gc();v.useEffect(()=>{if(!f&&c!=null&&l!=null){var g=hh({active:a,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h});Ja.emit(vh,c,g,l)}},[f,r,s,i,n,l,c,d,a,h])}function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){rF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rF(e,t,r){return(t=nF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=iF(e,"string");return typeof t=="symbol"?t:t+""}function iF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oF(e){return e.dataKey}function aF(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(R3,t)}var Yb=[],sF={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Ui.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function vl(e){var t=ir(e,sF),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:a,content:s,filterNull:l,isAnimationActive:c,offset:d,payloadUniqBy:u,position:f,reverseDirection:h,useTranslate3d:g,wrapperStyle:m,cursor:x,shared:y,trigger:w,defaultIndex:b,portal:j,axisId:P}=t,E=ut(),S=typeof b=="number"?String(b):b;v.useEffect(()=>{E(ML({shared:y,trigger:w,axisId:P,active:r,defaultIndex:S}))},[E,y,w,P,r,S]);var O=Gc(),k=Bj(),M=EL(y),{activeIndex:A,isActive:_}=Ae(ue=>kz(ue,M,w,S)),D=Ae(ue=>Oz(ue,M,w,S)),B=Ae(ue=>JE(ue,M,w,S)),H=Ae(ue=>Pz(ue,M,w,S)),T=D,N=Dz(),I=r??_,[R,$]=KS([T,I]),U=M==="axis"?B:void 0;tF(M,w,H,U,A,I);var V=j??N;if(V==null)return null;var F=T??Yb;I||(F=Yb),l&&F.length&&(F=zS(T.filter(ue=>ue.value!=null&&(ue.hide!==!0||t.includeHidden)),u,oF));var q=F.length>0,ie=C.createElement($3,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:c,active:I,coordinate:H,hasPayload:q,offset:d,position:f,reverseDirection:h,useTranslate3d:g,viewBox:O,wrapperStyle:m,lastBoundingBox:R,innerRef:$,hasPortalFromProps:!!j},aF(s,Kb(Kb({},t),{},{payload:F,label:U,active:I,coordinate:H,accessibilityLayer:k})));return C.createElement(C.Fragment,null,Oa.createPortal(ie,V),I&&C.createElement(Nz,{cursor:x,tooltipEventType:M,coordinate:H,payload:T,index:A}))}var oi=e=>null;oi.displayName="Cell";function lF(e,t,r){return(t=cF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cF(e){var t=uF(e,"string");return typeof t=="symbol"?t:t+""}function uF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class dF{constructor(t){lF(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){pF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pF(e,t,r){return(t=hF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mF={cacheSize:2e3,enableCache:!0},oP=fF({},mF),Gb=new dF(oP.cacheSize),vF={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Xb="recharts_measurement_span";function yF(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",s=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(s,"|").concat(l)}var Zb=(e,t)=>{try{var r=document.getElementById(Xb);r||(r=document.createElement("span"),r.setAttribute("id",Xb),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,vF,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},ja=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ui.isSsr)return{width:0,height:0};if(!oP.enableCache)return Zb(t,r);var n=yF(t,r),i=Gb.get(n);if(i)return i;var a=Zb(t,r);return Gb.set(n,a),a},Qb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Jb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xF=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bF=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aP={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},wF=Object.keys(aP),lo="NaN";function CF(e,t){return e*aP[t]}class sr{static parse(t){var r,[,n,i]=(r=bF.exec(t))!==null&&r!==void 0?r:[];return new sr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Br(t)&&(this.unit=""),r!==""&&!xF.test(r)&&(this.num=NaN,this.unit=""),wF.includes(r)&&(this.num=CF(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Br(this.num)}}function sP(e){if(e.includes(lo))return lo;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=Qb.exec(t))!==null&&r!==void 0?r:[],s=sr.parse(n??""),l=sr.parse(a??""),c=i==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return lo;t=t.replace(Qb,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,u,f,h]=(d=Jb.exec(t))!==null&&d!==void 0?d:[],g=sr.parse(u??""),m=sr.parse(h??""),x=f==="+"?g.add(m):g.subtract(m);if(x.isNaN())return lo;t=t.replace(Jb,x.toString())}return t}var e1=/\(([^()]*)\)/;function SF(e){for(var t=e,r;(r=e1.exec(t))!=null;){var[,n]=r;t=t.replace(e1,sP(n))}return t}function jF(e){var t=e.replace(/\s+/g,"");return t=SF(t),t=sP(t),t}function EF(e){try{return jF(e)}catch{return lo}}function Mf(e){var t=EF(e.slice(5,-1));return t===lo?"":t}var PF=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],OF=["dx","dy","angle","className","breakAll"];function yh(){return yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yh.apply(null,arguments)}function t1(e,t){if(e==null)return{};var r,n,i=kF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lP=/[ \f\n\r\t\v\u2028\u2029]+/,cP=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Ft(t)||(r?i=t.toString().split(""):i=t.toString().split(lP));var a=i.map(l=>({word:l,width:ja(l,n).width})),s=r?0:ja(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},TF=(e,t,r,n,i)=>{var{maxLines:a,children:s,style:l,breakAll:c}=e,d=Ne(a),u=s,f=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce((D,B)=>{var{word:H,width:T}=B,N=D[D.length-1];if(N&&(n==null||i||N.width+T+r<Number(n)))N.words.push(H),N.width+=T+r;else{var I={words:[H],width:T};D.push(I)}return D},[])},h=f(t),g=A=>A.reduce((_,D)=>_.width>D.width?_:D);if(!d||i)return h;var m=h.length>a||g(h).width>Number(n);if(!m)return h;for(var x="…",y=A=>{var _=u.slice(0,A),D=cP({breakAll:c,style:l,children:_+x}).wordsWithComputedWidth,B=f(D),H=B.length>a||g(B).width>Number(n);return[H,B]},w=0,b=u.length-1,j=0,P;w<=b&&j<=u.length-1;){var E=Math.floor((w+b)/2),S=E-1,[O,k]=y(S),[M]=y(E);if(!O&&!M&&(w=E+1),O&&M&&(b=E-1),!O&&M){P=k;break}j++}return P||h},r1=e=>{var t=Ft(e)?[]:e.toString().split(lP);return[{words:t}]},MF=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:s}=e;if((t||r)&&!Ui.isSsr){var l,c,d=cP({breakAll:a,children:n,style:i});if(d){var{wordsWithComputedWidth:u,spaceWidth:f}=d;l=u,c=f}else return r1(n);return TF({breakAll:a,children:n,maxLines:s,style:i},l,c,t,r)}return r1(n)},n1="#808080",hu=v.forwardRef((e,t)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:a="0.71em",scaleToFit:s=!1,textAnchor:l="start",verticalAnchor:c="end",fill:d=n1}=e,u=t1(e,PF),f=v.useMemo(()=>MF({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:s,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,s,u.style,u.width]),{dx:h,dy:g,angle:m,className:x,breakAll:y}=u,w=t1(u,OF);if(!pn(r)||!pn(n)||f.length===0)return null;var b=r+(Ne(h)?h:0),j=n+(Ne(g)?g:0),P;switch(c){case"start":P=Mf("calc(".concat(a,")"));break;case"middle":P=Mf("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:P=Mf("calc(".concat(f.length-1," * -").concat(i,")"));break}var E=[];if(s){var S=f[0].width,{width:O}=u;E.push("scale(".concat(Ne(O)?O/S:1,")"))}return m&&E.push("rotate(".concat(m,", ").concat(b,", ").concat(j,")")),E.length&&(w.transform=E.join(" ")),C.createElement("text",yh({},_r(w),{ref:t,x:b,y:j,className:Qe("recharts-text",x),textAnchor:l,fill:d.includes("url")?n1:d}),f.map((k,M)=>{var A=k.words.join(y?"":" ");return C.createElement("tspan",{x:b,dy:M===0?P:i,key:"".concat(A,"-").concat(M)},A)}))});hu.displayName="Text";var RF=["labelRef"];function AF(e,t){if(e==null)return{};var r,n,i=IF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function IF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function i1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i1(Object(r),!0).forEach(function(n){NF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NF(e,t,r){return(t=DF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DF(e){var t=_F(e,"string");return typeof t=="symbol"?t:t+""}function _F(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cn.apply(null,arguments)}var uP=v.createContext(null),BF=e=>{var{x:t,y:r,width:n,height:i,children:a}=e,s=v.useMemo(()=>({x:t,y:r,width:n,height:i}),[t,r,n,i]);return C.createElement(uP.Provider,{value:s},a)},dP=()=>{var e=v.useContext(uP),t=Gc();return e||t},$F=v.createContext(null),LF=()=>{var e=v.useContext($F),t=Ae(tE);return e||t},zF=e=>{var{value:t,formatter:r}=e,n=Ft(e.children)?t:e.children;return typeof r=="function"?r(n):n},km=e=>e!=null&&typeof e=="function",FF=(e,t)=>{var r=Lt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},VF=(e,t,r,n,i)=>{var{offset:a,className:s}=e,{cx:l,cy:c,innerRadius:d,outerRadius:u,startAngle:f,endAngle:h,clockWise:g}=i,m=(d+u)/2,x=FF(f,h),y=x>=0?1:-1,w,b;switch(t){case"insideStart":w=f+y*a,b=g;break;case"insideEnd":w=h-y*a,b=!g;break;case"end":w=h+y*a,b=g;break;default:throw new Error("Unsupported position ".concat(t))}b=x<=0?b:!b;var j=jt(l,c,m,w),P=jt(l,c,m,w+(b?1:-1)*359),E="M".concat(j.x,",").concat(j.y,`
1107
+ A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(P.x,",").concat(P.y,"Z")}else b+="L".concat(t,",").concat(r,"Z");return b},_5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Kj=e=>{var t=ir(e,_5),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:u,className:f}=t;if(a<i||d===u)return null;var h=Qe("recharts-sector",f),g=a-i,m=Zt(s,g,0,!0),x;return m>0&&Math.abs(d-u)<360?x=D5({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:u}):x=Uj({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:d,endAngle:u}),C.createElement("path",Jp({},_r(t),{className:h,d:x}))};function B5(e,t,r){var n,i,a,s;if(e==="horizontal")n=t.x,a=n,i=r.top,s=r.top+r.height;else if(e==="vertical")i=t.y,s=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:l,cy:c,innerRadius:d,outerRadius:u,angle:f}=t,h=jt(l,c,d,f),g=jt(l,c,u,f);n=h.x,i=h.y,a=g.x,s=g.y}else return Wj(t);return[{x:n,y:i},{x:a,y:s}]}var vf={},yf={},xf={},zx;function $5(){return zx||(zx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HS();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(xf)),xf}var Fx;function L5(){return Fx||(Fx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$5();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(yf)),yf}var Vx;function z5(){return Vx||(Vx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WS(),r=L5();function n(i,a,s){s&&typeof s!="number"&&t.isIterateeCall(i,a,s)&&(a=s=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),s=s===void 0?i<a?1:-1:r.toFinite(s);const l=Math.max(Math.ceil((a-i)/(s||1)),0),c=new Array(l);for(let d=0;d<l;d++)c[d]=i,i+=s;return c}e.range=n})(vf)),vf}var bf,Hx;function F5(){return Hx||(Hx=1,bf=z5().range),bf}var V5=F5();const Yj=wr(V5);function ai(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function H5(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wg(e){let t,r,n;e.length!==2?(t=ai,r=(l,c)=>ai(e(l),c),n=(l,c)=>e(l)-c):(t=e===ai||e===H5?e:W5,r=e,n=e);function i(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<0?d=f+1:u=f}while(d<u)}return d}function a(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<=0?d=f+1:u=f}while(d<u)}return d}function s(l,c,d=0,u=l.length){const f=i(l,c,d,u-1);return f>d&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:i,center:s,right:a}}function W5(){return 0}function qj(e){return e===null?NaN:+e}function*U5(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const K5=wg(ai),gs=K5.right;wg(qj).center;class Wx extends Map{constructor(t,r=G5){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Ux(this,t))}has(t){return super.has(Ux(this,t))}set(t,r){return super.set(Y5(this,t),r)}delete(t){return super.delete(q5(this,t))}}function Ux({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Y5({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function q5({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function G5(e){return e!==null&&typeof e=="object"?e.valueOf():e}function X5(e=ai){if(e===ai)return Gj;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function Gj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Z5=Math.sqrt(50),Q5=Math.sqrt(10),J5=Math.sqrt(2);function ac(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=Z5?10:a>=Q5?5:a>=J5?2:1;let l,c,d;return i<0?(d=Math.pow(10,-i)/s,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*s,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=r&&r<2?ac(e,t,r*2):[l,c,d]}function eh(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,s]=n?ac(t,e,r):ac(e,t,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(s<0)for(let d=0;d<l;++d)c[d]=(a-d)/-s;else for(let d=0;d<l;++d)c[d]=(a-d)*s;else if(s<0)for(let d=0;d<l;++d)c[d]=(i+d)/-s;else for(let d=0;d<l;++d)c[d]=(i+d)*s;return c}function th(e,t,r){return t=+t,e=+e,r=+r,ac(e,t,r)[2]}function rh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?th(t,e,r):th(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Kx(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Yx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Xj(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?Gj:X5(i);n>r;){if(n-r>600){const c=n-r+1,d=t-r+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(d-c/2<0?-1:1),g=Math.max(r,Math.floor(t-d*f/c+h)),m=Math.min(n,Math.floor(t+(c-d)*f/c+h));Xj(e,t,g,m,i)}const a=e[t];let s=r,l=n;for(ha(e,r,t),i(e[n],a)>0&&ha(e,r,n);s<l;){for(ha(e,s,l),++s,--l;i(e[s],a)<0;)++s;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?ha(e,r,l):(++l,ha(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function ha(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function e$(e,t,r){if(e=Float64Array.from(U5(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Yx(e);if(t>=1)return Kx(e);var n,i=(n-1)*t,a=Math.floor(i),s=Kx(Xj(e,a).subarray(0,a+1)),l=Yx(e.subarray(a+1));return s+(l-s)*(i-a)}}function t$(e,t,r=qj){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return s+(l-s)*(i-a)}}function r$(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function $n(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const nh=Symbol("implicit");function Cg(){var e=new Wx,t=[],r=[],n=nh;function i(a){let s=e.get(a);if(s===void 0){if(n!==nh)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Wx;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Cg(t,r).unknown(n)},Hr.apply(i,arguments),i}function Sg(){var e=Cg().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,l=!1,c=0,d=0,u=.5;delete e.unknown;function f(){var h=t().length,g=i<n,m=g?i:n,x=g?n:i;a=(x-m)/Math.max(1,h-c+d*2),l&&(a=Math.floor(a)),m+=(x-m-a*(h-c))*u,s=a*(1-c),l&&(m=Math.round(m),s=Math.round(s));var y=r$(h).map(function(w){return m+a*w});return r(g?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,l=!0,f()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(l=!!h,f()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,d=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(d=+h,f()):d},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},e.copy=function(){return Sg(t(),[n,i]).round(l).paddingInner(c).paddingOuter(d).align(u)},Hr.apply(f(),arguments)}function Zj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Zj(t())},e}function n$(){return Zj(Sg.apply(null,arguments).paddingInner(1))}function jg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Qj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ms(){}var Ka=.7,sc=1/Ka,fo="\\s*([+-]?\\d+)\\s*",Ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i$=/^#([0-9a-f]{3,8})$/,o$=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),a$=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),s$=new RegExp(`^rgba\\(${fo},${fo},${fo},${Ya}\\)$`),l$=new RegExp(`^rgba\\(${cn},${cn},${cn},${Ya}\\)$`),c$=new RegExp(`^hsl\\(${Ya},${cn},${cn}\\)$`),u$=new RegExp(`^hsla\\(${Ya},${cn},${cn},${Ya}\\)$`),qx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jg(ms,qa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gx,formatHex:Gx,formatHex8:d$,formatHsl:f$,formatRgb:Xx,toString:Xx});function Gx(){return this.rgb().formatHex()}function d$(){return this.rgb().formatHex8()}function f$(){return Jj(this).formatHsl()}function Xx(){return this.rgb().formatRgb()}function qa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=i$.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Zx(t):r===3?new cr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?dl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=o$.exec(e))?new cr(t[1],t[2],t[3],1):(t=a$.exec(e))?new cr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=s$.exec(e))?dl(t[1],t[2],t[3],t[4]):(t=l$.exec(e))?dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=c$.exec(e))?eb(t[1],t[2]/100,t[3]/100,1):(t=u$.exec(e))?eb(t[1],t[2]/100,t[3]/100,t[4]):qx.hasOwnProperty(e)?Zx(qx[e]):e==="transparent"?new cr(NaN,NaN,NaN,0):null}function Zx(e){return new cr(e>>16&255,e>>8&255,e&255,1)}function dl(e,t,r,n){return n<=0&&(e=t=r=NaN),new cr(e,t,r,n)}function p$(e){return e instanceof ms||(e=qa(e)),e?(e=e.rgb(),new cr(e.r,e.g,e.b,e.opacity)):new cr}function ih(e,t,r,n){return arguments.length===1?p$(e):new cr(e,t,r,n??1)}function cr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}jg(cr,ih,Qj(ms,{brighter(e){return e=e==null?sc:Math.pow(sc,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ka:Math.pow(Ka,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cr(Ni(this.r),Ni(this.g),Ni(this.b),lc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qx,formatHex:Qx,formatHex8:h$,formatRgb:Jx,toString:Jx}));function Qx(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}`}function h$(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}${Oi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jx(){const e=lc(this.opacity);return`${e===1?"rgb(":"rgba("}${Ni(this.r)}, ${Ni(this.g)}, ${Ni(this.b)}${e===1?")":`, ${e})`}`}function lc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ni(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oi(e){return e=Ni(e),(e<16?"0":"")+e.toString(16)}function eb(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xr(e,t,r,n)}function Jj(e){if(e instanceof Xr)return new Xr(e.h,e.s,e.l,e.opacity);if(e instanceof ms||(e=qa(e)),!e)return new Xr;if(e instanceof Xr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,l=a-i,c=(a+i)/2;return l?(t===a?s=(r-n)/l+(r<n)*6:r===a?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?a+i:2-a-i,s*=60):l=c>0&&c<1?0:s,new Xr(s,l,c,e.opacity)}function g$(e,t,r,n){return arguments.length===1?Jj(e):new Xr(e,t,r,n??1)}function Xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}jg(Xr,g$,Qj(ms,{brighter(e){return e=e==null?sc:Math.pow(sc,e),new Xr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ka:Math.pow(Ka,e),new Xr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new cr(wf(e>=240?e-240:e+120,i,n),wf(e,i,n),wf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Xr(tb(this.h),fl(this.s),fl(this.l),lc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lc(this.opacity);return`${e===1?"hsl(":"hsla("}${tb(this.h)}, ${fl(this.s)*100}%, ${fl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tb(e){return e=(e||0)%360,e<0?e+360:e}function fl(e){return Math.max(0,Math.min(1,e||0))}function wf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Eg=e=>()=>e;function m$(e,t){return function(r){return e+r*t}}function v$(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function y$(e){return(e=+e)==1?e2:function(t,r){return r-t?v$(t,r,e):Eg(isNaN(t)?r:t)}}function e2(e,t){var r=t-e;return r?m$(e,r):Eg(isNaN(e)?t:e)}const rb=(function e(t){var r=y$(t);function n(i,a){var s=r((i=ih(i)).r,(a=ih(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),d=e2(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=l(u),i.b=c(u),i.opacity=d(u),i+""}}return n.gamma=e,n})(1);function x$(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function b$(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function w$(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Do(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(l){for(s=0;s<n;++s)a[s]=i[s](l);return a}}function C$(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function cc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function S$(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Do(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var oh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cf=new RegExp(oh.source,"g");function j$(e){return function(){return e}}function E$(e){return function(t){return e(t)+""}}function P$(e,t){var r=oh.lastIndex=Cf.lastIndex=0,n,i,a,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=oh.exec(e))&&(i=Cf.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:cc(n,i)})),r=Cf.lastIndex;return r<t.length&&(a=t.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?c[0]?E$(c[0].x):j$(t):(t=c.length,function(d){for(var u=0,f;u<t;++u)l[(f=c[u]).i]=f.x(d);return l.join("")})}function Do(e,t){var r=typeof t,n;return t==null||r==="boolean"?Eg(t):(r==="number"?cc:r==="string"?(n=qa(t))?(t=n,rb):P$:t instanceof qa?rb:t instanceof Date?C$:b$(t)?x$:Array.isArray(t)?w$:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?S$:cc)(e,t)}function Pg(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function O$(e,t){t===void 0&&(t=e,e=Do);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[l](s-l)}}function k$(e){return function(){return e}}function uc(e){return+e}var nb=[0,1];function rr(e){return e}function ah(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:k$(isNaN(t)?NaN:.5)}function T$(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function M$(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=ah(i,n),a=r(s,a)):(n=ah(n,i),a=r(a,s)),function(l){return a(n(l))}}function R$(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=ah(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(l){var c=gs(e,l,1,n)-1;return a[c](i[c](l))}}function vs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eu(){var e=nb,t=nb,r=Do,n,i,a,s=rr,l,c,d;function u(){var h=Math.min(e.length,t.length);return s!==rr&&(s=T$(e[0],e[h-1])),l=h>2?R$:M$,c=d=null,f}function f(h){return h==null||isNaN(h=+h)?a:(c||(c=l(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(i((d||(d=l(t,e.map(n),cc)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,uc),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=Pg,u()},f.clamp=function(h){return arguments.length?(s=h?!0:rr,u()):s!==rr},f.interpolate=function(h){return arguments.length?(r=h,u()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,g){return n=h,i=g,u()}}function Og(){return eu()(rr,rr)}function A$(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function dc(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function jo(e){return e=dc(Math.abs(e)),e?e[1]:NaN}function I$(e,t){return function(r,n){for(var i=r.length,a=[],s=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return a.reverse().join(t)}}function N$(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var D$=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ga(e){if(!(t=D$.exec(e)))throw new Error("invalid format: "+e);var t;return new kg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ga.prototype=kg.prototype;function kg(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}kg.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _$(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var t2;function B$(e,t){var r=dc(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(t2=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+dc(e,Math.max(0,t+a-1))[0]}function ib(e,t){var r=dc(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const ob={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:A$,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ib(e*100,t),r:ib,s:B$,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ab(e){return e}var sb=Array.prototype.map,lb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $$(e){var t=e.grouping===void 0||e.thousands===void 0?ab:I$(sb.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?ab:N$(sb.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(f){f=Ga(f);var h=f.fill,g=f.align,m=f.sign,x=f.symbol,y=f.zero,w=f.width,b=f.comma,j=f.precision,P=f.trim,E=f.type;E==="n"?(b=!0,E="g"):ob[E]||(j===void 0&&(j=12),P=!0,E="g"),(y||h==="0"&&g==="=")&&(y=!0,h="0",g="=");var S=x==="$"?r:x==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",O=x==="$"?n:/[%p]/.test(E)?s:"",k=ob[E],M=/[defgprs%]/.test(E);j=j===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function A(_){var D=S,B=O,H,T,N;if(E==="c")B=k(_)+B,_="";else{_=+_;var I=_<0||1/_<0;if(_=isNaN(_)?c:k(Math.abs(_),j),P&&(_=_$(_)),I&&+_==0&&m!=="+"&&(I=!1),D=(I?m==="("?m:l:m==="-"||m==="("?"":m)+D,B=(E==="s"?lb[8+t2/3]:"")+B+(I&&m==="("?")":""),M){for(H=-1,T=_.length;++H<T;)if(N=_.charCodeAt(H),48>N||N>57){B=(N===46?i+_.slice(H+1):_.slice(H))+B,_=_.slice(0,H);break}}}b&&!y&&(_=t(_,1/0));var R=D.length+_.length+B.length,$=R<w?new Array(w-R+1).join(h):"";switch(b&&y&&(_=t($+_,$.length?w-B.length:1/0),$=""),g){case"<":_=D+_+B+$;break;case"=":_=D+$+_+B;break;case"^":_=$.slice(0,R=$.length>>1)+D+_+B+$.slice(R);break;default:_=$+D+_+B;break}return a(_)}return A.toString=function(){return f+""},A}function u(f,h){var g=d((f=Ga(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(jo(h)/3)))*3,x=Math.pow(10,-m),y=lb[8+m/3];return function(w){return g(x*w)+y}}return{format:d,formatPrefix:u}}var pl,Tg,r2;L$({thousands:",",grouping:[3],currency:["$",""]});function L$(e){return pl=$$(e),Tg=pl.format,r2=pl.formatPrefix,pl}function z$(e){return Math.max(0,-jo(Math.abs(e)))}function F$(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jo(t)/3)))*3-jo(Math.abs(e)))}function V$(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,jo(t)-jo(e))+1}function n2(e,t,r,n){var i=rh(e,t,r),a;switch(n=Ga(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=F$(i,s))&&(n.precision=a),r2(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=V$(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=z$(i))&&(n.precision=a-(n.type==="%")*2);break}}return Tg(n)}function fi(e){var t=e.domain;return e.ticks=function(r){var n=t();return eh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return n2(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],l=n[a],c,d,u=10;for(l<s&&(d=s,s=l,l=d,d=i,i=a,a=d);u-- >0;){if(d=th(s,l,r),d===c)return n[i]=s,n[a]=l,t(n);if(d>0)s=Math.floor(s/d)*d,l=Math.ceil(l/d)*d;else if(d<0)s=Math.ceil(s*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function i2(){var e=Og();return e.copy=function(){return vs(e,i2())},Hr.apply(e,arguments),fi(e)}function o2(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,uc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return o2(e).unknown(t)},e=arguments.length?Array.from(e,uc):[0,1],fi(r)}function a2(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),e[r]=t.floor(i),e[n]=t.ceil(a),e}function cb(e){return Math.log(e)}function ub(e){return Math.exp(e)}function H$(e){return-Math.log(-e)}function W$(e){return-Math.exp(-e)}function U$(e){return isFinite(e)?+("1e"+e):e<0?0:e}function K$(e){return e===10?U$:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Y$(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function db(e){return(t,r)=>-e(-t,r)}function Mg(e){const t=e(cb,ub),r=t.domain;let n=10,i,a;function s(){return i=Y$(n),a=K$(n),r()[0]<0?(i=db(i),a=db(a),e(H$,W$)):e(cb,ub),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let d=c[0],u=c[c.length-1];const f=u<d;f&&([d,u]=[u,d]);let h=i(d),g=i(u),m,x;const y=l==null?10:+l;let w=[];if(!(n%1)&&g-h<y){if(h=Math.floor(h),g=Math.ceil(g),d>0){for(;h<=g;++h)for(m=1;m<n;++m)if(x=h<0?m/a(-h):m*a(h),!(x<d)){if(x>u)break;w.push(x)}}else for(;h<=g;++h)for(m=n-1;m>=1;--m)if(x=h>0?m/a(-h):m*a(h),!(x<d)){if(x>u)break;w.push(x)}w.length*2<y&&(w=eh(d,u,y))}else w=eh(h,g,Math.min(g-h,y)).map(a);return f?w.reverse():w},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Ga(c)).precision==null&&(c.trim=!0),c=Tg(c)),l===1/0)return c;const d=Math.max(1,n*l/t.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*n<n-.5&&(f*=n),f<=d?c(u):""}},t.nice=()=>r(a2(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function s2(){const e=Mg(eu()).domain([1,10]);return e.copy=()=>vs(e,s2()).base(e.base()),Hr.apply(e,arguments),e}function fb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Rg(e){var t=1,r=e(fb(t),pb(t));return r.constant=function(n){return arguments.length?e(fb(t=+n),pb(t)):t},fi(r)}function l2(){var e=Rg(eu());return e.copy=function(){return vs(e,l2()).constant(e.constant())},Hr.apply(e,arguments)}function hb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function q$(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function G$(e){return e<0?-e*e:e*e}function Ag(e){var t=e(rr,rr),r=1;function n(){return r===1?e(rr,rr):r===.5?e(q$,G$):e(hb(r),hb(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},fi(t)}function Ig(){var e=Ag(eu());return e.copy=function(){return vs(e,Ig()).exponent(e.exponent())},Hr.apply(e,arguments),e}function X$(){return Ig.apply(null,arguments).exponent(.5)}function gb(e){return Math.sign(e)*e*e}function Z$(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function c2(){var e=Og(),t=[0,1],r=!1,n;function i(a){var s=Z$(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(gb(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,uc)).map(gb)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return c2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Hr.apply(i,arguments),fi(i)}function u2(){var e=[],t=[],r=[],n;function i(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=t$(e,s/l);return a}function a(s){return s==null||isNaN(s=+s)?n:t[gs(r,s)]}return a.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(ai),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return u2().domain(e).range(t).unknown(n)},Hr.apply(a,arguments)}function d2(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[gs(n,c,0,r)]:a}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},s.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,n[0]]:d>=r?[n[r-1],t]:[n[d-1],n[d]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return d2().domain([e,t]).range(i).unknown(a)},Hr.apply(fi(s),arguments)}function f2(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[gs(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return f2().domain(e).range(t).unknown(r)},Hr.apply(i,arguments)}const Sf=new Date,jf=new Date;function At(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),l=i.ceil(a);return a-s<l-a?s:l},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<s)||!(l>0))return c;let d;do c.push(d=new Date(+a)),t(a,l),e(a);while(d<a&&a<s);return c},i.filter=a=>At(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!a(s););else for(;--l>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(Sf.setTime(+a),jf.setTime(+s),e(Sf),e(jf),Math.floor(r(Sf,jf))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const sh=At(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?At(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):sh);const jn=1e3,Nr=jn*60,En=Nr*60,An=En*24,Ng=An*7,mb=An*30,Ef=An*365,so=At(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jn)},(e,t)=>(t-e)/jn,e=>e.getUTCSeconds()),p2=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jn)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getMinutes()),h2=At(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getUTCMinutes()),g2=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jn-e.getMinutes()*Nr)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getHours()),m2=At(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCHours()),tu=At(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nr)/An,e=>e.getDate()-1),Dg=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>e.getUTCDate()-1),Q$=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>Math.floor(e/An));function Ki(e){return At(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nr)/Ng)}const _g=Ki(0),lh=Ki(1);Ki(2);Ki(3);const Xa=Ki(4);Ki(5);Ki(6);function Yi(e){return At(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ng)}const Bg=Yi(0),ch=Yi(1);Yi(2);Yi(3);const Za=Yi(4);Yi(5);Yi(6);const v2=At(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),y2=At(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),si=At(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());si.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});const li=At(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});function x2(e,t,r,n,i,a){const s=[[so,1,jn],[so,5,5*jn],[so,15,15*jn],[so,30,30*jn],[a,1,Nr],[a,5,5*Nr],[a,15,15*Nr],[a,30,30*Nr],[i,1,En],[i,3,3*En],[i,6,6*En],[i,12,12*En],[n,1,An],[n,2,2*An],[r,1,Ng],[t,1,mb],[t,3,3*mb],[e,1,Ef]];function l(d,u,f){const h=u<d;h&&([d,u]=[u,d]);const g=f&&typeof f.range=="function"?f:c(d,u,f),m=g?g.range(d,+u+1):[];return h?m.reverse():m}function c(d,u,f){const h=Math.abs(u-d)/f,g=wg(([,,y])=>y).right(s,h);if(g===s.length)return e.every(rh(d/Ef,u/Ef,f));if(g===0)return sh.every(Math.max(rh(d,u,f),1));const[m,x]=s[h/s[g-1][2]<s[g][2]/h?g-1:g];return m.every(x)}return[l,c]}const[J$,e4]=x2(li,y2,Bg,Q$,m2,h2),[t4,r4]=x2(si,v2,_g,tu,g2,p2);function Pf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Of(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ga(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function n4(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,d=ma(i),u=va(i),f=ma(a),h=va(a),g=ma(s),m=va(s),x=ma(l),y=va(l),w=ma(c),b=va(c),j={a:I,A:R,b:$,B:U,c:null,d:Cb,e:Cb,f:P4,g:_4,G:$4,H:S4,I:j4,j:E4,L:b2,m:O4,M:k4,p:V,q:F,Q:Eb,s:Pb,S:T4,u:M4,U:R4,V:A4,w:I4,W:N4,x:null,X:null,y:D4,Y:B4,Z:L4,"%":jb},P={a:q,A:ie,b:ue,B:ge,c:null,d:Sb,e:Sb,f:H4,g:J4,G:t8,H:z4,I:F4,j:V4,L:C2,m:W4,M:U4,p:Ee,q:Pe,Q:Eb,s:Pb,S:K4,u:Y4,U:q4,V:G4,w:X4,W:Z4,x:null,X:null,y:Q4,Y:e8,Z:r8,"%":jb},E={a:A,A:_,b:D,B,c:H,d:bb,e:bb,f:x4,g:xb,G:yb,H:wb,I:wb,j:g4,L:y4,m:h4,M:m4,p:M,q:p4,Q:w4,s:C4,S:v4,u:l4,U:c4,V:u4,w:s4,W:d4,x:T,X:N,y:xb,Y:yb,Z:f4,"%":b4};j.x=S(r,j),j.X=S(n,j),j.c=S(t,j),P.x=S(r,P),P.X=S(n,P),P.c=S(t,P);function S(Z,ve){return function(fe){var z=[],ne=-1,Y=0,le=Z.length,pe,xe,je;for(fe instanceof Date||(fe=new Date(+fe));++ne<le;)Z.charCodeAt(ne)===37&&(z.push(Z.slice(Y,ne)),(xe=vb[pe=Z.charAt(++ne)])!=null?pe=Z.charAt(++ne):xe=pe==="e"?" ":"0",(je=ve[pe])&&(pe=je(fe,xe)),z.push(pe),Y=ne+1);return z.push(Z.slice(Y,ne)),z.join("")}}function O(Z,ve){return function(fe){var z=ga(1900,void 0,1),ne=k(z,Z,fe+="",0),Y,le;if(ne!=fe.length)return null;if("Q"in z)return new Date(z.Q);if("s"in z)return new Date(z.s*1e3+("L"in z?z.L:0));if(ve&&!("Z"in z)&&(z.Z=0),"p"in z&&(z.H=z.H%12+z.p*12),z.m===void 0&&(z.m="q"in z?z.q:0),"V"in z){if(z.V<1||z.V>53)return null;"w"in z||(z.w=1),"Z"in z?(Y=Of(ga(z.y,0,1)),le=Y.getUTCDay(),Y=le>4||le===0?ch.ceil(Y):ch(Y),Y=Dg.offset(Y,(z.V-1)*7),z.y=Y.getUTCFullYear(),z.m=Y.getUTCMonth(),z.d=Y.getUTCDate()+(z.w+6)%7):(Y=Pf(ga(z.y,0,1)),le=Y.getDay(),Y=le>4||le===0?lh.ceil(Y):lh(Y),Y=tu.offset(Y,(z.V-1)*7),z.y=Y.getFullYear(),z.m=Y.getMonth(),z.d=Y.getDate()+(z.w+6)%7)}else("W"in z||"U"in z)&&("w"in z||(z.w="u"in z?z.u%7:"W"in z?1:0),le="Z"in z?Of(ga(z.y,0,1)).getUTCDay():Pf(ga(z.y,0,1)).getDay(),z.m=0,z.d="W"in z?(z.w+6)%7+z.W*7-(le+5)%7:z.w+z.U*7-(le+6)%7);return"Z"in z?(z.H+=z.Z/100|0,z.M+=z.Z%100,Of(z)):Pf(z)}}function k(Z,ve,fe,z){for(var ne=0,Y=ve.length,le=fe.length,pe,xe;ne<Y;){if(z>=le)return-1;if(pe=ve.charCodeAt(ne++),pe===37){if(pe=ve.charAt(ne++),xe=E[pe in vb?ve.charAt(ne++):pe],!xe||(z=xe(Z,fe,z))<0)return-1}else if(pe!=fe.charCodeAt(z++))return-1}return z}function M(Z,ve,fe){var z=d.exec(ve.slice(fe));return z?(Z.p=u.get(z[0].toLowerCase()),fe+z[0].length):-1}function A(Z,ve,fe){var z=g.exec(ve.slice(fe));return z?(Z.w=m.get(z[0].toLowerCase()),fe+z[0].length):-1}function _(Z,ve,fe){var z=f.exec(ve.slice(fe));return z?(Z.w=h.get(z[0].toLowerCase()),fe+z[0].length):-1}function D(Z,ve,fe){var z=w.exec(ve.slice(fe));return z?(Z.m=b.get(z[0].toLowerCase()),fe+z[0].length):-1}function B(Z,ve,fe){var z=x.exec(ve.slice(fe));return z?(Z.m=y.get(z[0].toLowerCase()),fe+z[0].length):-1}function H(Z,ve,fe){return k(Z,t,ve,fe)}function T(Z,ve,fe){return k(Z,r,ve,fe)}function N(Z,ve,fe){return k(Z,n,ve,fe)}function I(Z){return s[Z.getDay()]}function R(Z){return a[Z.getDay()]}function $(Z){return c[Z.getMonth()]}function U(Z){return l[Z.getMonth()]}function V(Z){return i[+(Z.getHours()>=12)]}function F(Z){return 1+~~(Z.getMonth()/3)}function q(Z){return s[Z.getUTCDay()]}function ie(Z){return a[Z.getUTCDay()]}function ue(Z){return c[Z.getUTCMonth()]}function ge(Z){return l[Z.getUTCMonth()]}function Ee(Z){return i[+(Z.getUTCHours()>=12)]}function Pe(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ve=S(Z+="",j);return ve.toString=function(){return Z},ve},parse:function(Z){var ve=O(Z+="",!1);return ve.toString=function(){return Z},ve},utcFormat:function(Z){var ve=S(Z+="",P);return ve.toString=function(){return Z},ve},utcParse:function(Z){var ve=O(Z+="",!0);return ve.toString=function(){return Z},ve}}}var vb={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,i4=/^%/,o4=/[\\^$*+?|[\]().{}]/g;function He(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function a4(e){return e.replace(o4,"\\$&")}function ma(e){return new RegExp("^(?:"+e.map(a4).join("|")+")","i")}function va(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function s4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function l4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function c4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function u4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function d4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function yb(e,t,r){var n=Vt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function xb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function f4(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function p4(e,t,r){var n=Vt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function h4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function bb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function g4(e,t,r){var n=Vt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wb(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function m4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function v4(e,t,r){var n=Vt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function y4(e,t,r){var n=Vt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function x4(e,t,r){var n=Vt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function b4(e,t,r){var n=i4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function w4(e,t,r){var n=Vt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function C4(e,t,r){var n=Vt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Cb(e,t){return He(e.getDate(),t,2)}function S4(e,t){return He(e.getHours(),t,2)}function j4(e,t){return He(e.getHours()%12||12,t,2)}function E4(e,t){return He(1+tu.count(si(e),e),t,3)}function b2(e,t){return He(e.getMilliseconds(),t,3)}function P4(e,t){return b2(e,t)+"000"}function O4(e,t){return He(e.getMonth()+1,t,2)}function k4(e,t){return He(e.getMinutes(),t,2)}function T4(e,t){return He(e.getSeconds(),t,2)}function M4(e){var t=e.getDay();return t===0?7:t}function R4(e,t){return He(_g.count(si(e)-1,e),t,2)}function w2(e){var t=e.getDay();return t>=4||t===0?Xa(e):Xa.ceil(e)}function A4(e,t){return e=w2(e),He(Xa.count(si(e),e)+(si(e).getDay()===4),t,2)}function I4(e){return e.getDay()}function N4(e,t){return He(lh.count(si(e)-1,e),t,2)}function D4(e,t){return He(e.getFullYear()%100,t,2)}function _4(e,t){return e=w2(e),He(e.getFullYear()%100,t,2)}function B4(e,t){return He(e.getFullYear()%1e4,t,4)}function $4(e,t){var r=e.getDay();return e=r>=4||r===0?Xa(e):Xa.ceil(e),He(e.getFullYear()%1e4,t,4)}function L4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+He(t/60|0,"0",2)+He(t%60,"0",2)}function Sb(e,t){return He(e.getUTCDate(),t,2)}function z4(e,t){return He(e.getUTCHours(),t,2)}function F4(e,t){return He(e.getUTCHours()%12||12,t,2)}function V4(e,t){return He(1+Dg.count(li(e),e),t,3)}function C2(e,t){return He(e.getUTCMilliseconds(),t,3)}function H4(e,t){return C2(e,t)+"000"}function W4(e,t){return He(e.getUTCMonth()+1,t,2)}function U4(e,t){return He(e.getUTCMinutes(),t,2)}function K4(e,t){return He(e.getUTCSeconds(),t,2)}function Y4(e){var t=e.getUTCDay();return t===0?7:t}function q4(e,t){return He(Bg.count(li(e)-1,e),t,2)}function S2(e){var t=e.getUTCDay();return t>=4||t===0?Za(e):Za.ceil(e)}function G4(e,t){return e=S2(e),He(Za.count(li(e),e)+(li(e).getUTCDay()===4),t,2)}function X4(e){return e.getUTCDay()}function Z4(e,t){return He(ch.count(li(e)-1,e),t,2)}function Q4(e,t){return He(e.getUTCFullYear()%100,t,2)}function J4(e,t){return e=S2(e),He(e.getUTCFullYear()%100,t,2)}function e8(e,t){return He(e.getUTCFullYear()%1e4,t,4)}function t8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Za(e):Za.ceil(e),He(e.getUTCFullYear()%1e4,t,4)}function r8(){return"+0000"}function jb(){return"%"}function Eb(e){return+e}function Pb(e){return Math.floor(+e/1e3)}var hl,j2,E2;n8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function n8(e){return hl=n4(e),j2=hl.format,E2=hl.utcFormat,hl}function i8(e){return new Date(e)}function o8(e){return e instanceof Date?+e:+new Date(+e)}function $g(e,t,r,n,i,a,s,l,c,d){var u=Og(),f=u.invert,h=u.domain,g=d(".%L"),m=d(":%S"),x=d("%I:%M"),y=d("%I %p"),w=d("%a %d"),b=d("%b %d"),j=d("%B"),P=d("%Y");function E(S){return(c(S)<S?g:l(S)<S?m:s(S)<S?x:a(S)<S?y:n(S)<S?i(S)<S?w:b:r(S)<S?j:P)(S)}return u.invert=function(S){return new Date(f(S))},u.domain=function(S){return arguments.length?h(Array.from(S,o8)):h().map(i8)},u.ticks=function(S){var O=h();return e(O[0],O[O.length-1],S??10)},u.tickFormat=function(S,O){return O==null?E:d(O)},u.nice=function(S){var O=h();return(!S||typeof S.range!="function")&&(S=t(O[0],O[O.length-1],S??10)),S?h(a2(O,S)):u},u.copy=function(){return vs(u,$g(e,t,r,n,i,a,s,l,c,d))},u}function a8(){return Hr.apply($g(t4,r4,si,v2,_g,tu,g2,p2,so,j2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function s8(){return Hr.apply($g(J$,e4,li,y2,Bg,Dg,m2,h2,so,E2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ru(){var e=0,t=1,r,n,i,a,s=rr,l=!1,c;function d(f){return f==null||isNaN(f=+f)?c:s(i===0?.5:(f=(a(f)-r)*i,l?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),d):[e,t]},d.clamp=function(f){return arguments.length?(l=!!f,d):l},d.interpolator=function(f){return arguments.length?(s=f,d):s};function u(f){return function(h){var g,m;return arguments.length?([g,m]=h,s=f(g,m),d):[s(0),s(1)]}}return d.range=u(Do),d.rangeRound=u(Pg),d.unknown=function(f){return arguments.length?(c=f,d):c},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),d}}function pi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function P2(){var e=fi(ru()(rr));return e.copy=function(){return pi(e,P2())},$n.apply(e,arguments)}function O2(){var e=Mg(ru()).domain([1,10]);return e.copy=function(){return pi(e,O2()).base(e.base())},$n.apply(e,arguments)}function k2(){var e=Rg(ru());return e.copy=function(){return pi(e,k2()).constant(e.constant())},$n.apply(e,arguments)}function Lg(){var e=Ag(ru());return e.copy=function(){return pi(e,Lg()).exponent(e.exponent())},$n.apply(e,arguments)}function l8(){return Lg.apply(null,arguments).exponent(.5)}function T2(){var e=[],t=rr;function r(n){if(n!=null&&!isNaN(n=+n))return t((gs(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ai),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>e$(e,a/n))},r.copy=function(){return T2(t).domain(e)},$n.apply(r,arguments)}function nu(){var e=0,t=.5,r=1,n=1,i,a,s,l,c,d=rr,u,f=!1,h;function g(x){return isNaN(x=+x)?h:(x=.5+((x=+u(x))-a)*(n*x<n*a?l:c),d(f?Math.max(0,Math.min(1,x)):x))}g.domain=function(x){return arguments.length?([e,t,r]=x,i=u(e=+e),a=u(t=+t),s=u(r=+r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g):[e,t,r]},g.clamp=function(x){return arguments.length?(f=!!x,g):f},g.interpolator=function(x){return arguments.length?(d=x,g):d};function m(x){return function(y){var w,b,j;return arguments.length?([w,b,j]=y,d=O$(x,[w,b,j]),g):[d(0),d(.5),d(1)]}}return g.range=m(Do),g.rangeRound=m(Pg),g.unknown=function(x){return arguments.length?(h=x,g):h},function(x){return u=x,i=x(e),a=x(t),s=x(r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g}}function M2(){var e=fi(nu()(rr));return e.copy=function(){return pi(e,M2())},$n.apply(e,arguments)}function R2(){var e=Mg(nu()).domain([.1,1,10]);return e.copy=function(){return pi(e,R2()).base(e.base())},$n.apply(e,arguments)}function A2(){var e=Rg(nu());return e.copy=function(){return pi(e,A2()).constant(e.constant())},$n.apply(e,arguments)}function zg(){var e=Ag(nu());return e.copy=function(){return pi(e,zg()).exponent(e.exponent())},$n.apply(e,arguments)}function c8(){return zg.apply(null,arguments).exponent(.5)}const ba=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sg,scaleDiverging:M2,scaleDivergingLog:R2,scaleDivergingPow:zg,scaleDivergingSqrt:c8,scaleDivergingSymlog:A2,scaleIdentity:o2,scaleImplicit:nh,scaleLinear:i2,scaleLog:s2,scaleOrdinal:Cg,scalePoint:n$,scalePow:Ig,scaleQuantile:u2,scaleQuantize:d2,scaleRadial:c2,scaleSequential:P2,scaleSequentialLog:O2,scaleSequentialPow:Lg,scaleSequentialQuantile:T2,scaleSequentialSqrt:l8,scaleSequentialSymlog:k2,scaleSqrt:X$,scaleSymlog:l2,scaleThreshold:f2,scaleTime:a8,scaleUtc:s8,tickFormat:n2},Symbol.toStringTag,{value:"Module"}));var hi=e=>e.chartData,Fg=J([hi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Vg=(e,t,r,n)=>n?Fg(e):hi(e);function Li(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Qt(t)&&Qt(r))return!0}return!1}function Ob(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function I2(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Qt(r))i=r;else if(typeof r=="function")return;if(Qt(n))a=n;else if(typeof n=="function")return;var s=[i,a];if(Li(s))return s}}function u8(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Li(n))return Ob(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,s,l;if(i==="auto")t!=null&&(s=Math.min(...t));else if(Ne(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&ux.test(i)){var c=ux.exec(i);if(c==null||t==null)s=void 0;else{var d=+c[1];s=t[0]-d}}else s=t?.[0];if(a==="auto")t!=null&&(l=Math.max(...t));else if(Ne(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t?.[1]))}catch{}else if(typeof a=="string"&&dx.test(a)){var u=dx.exec(a);if(u==null||t==null)l=void 0;else{var f=+u[1];l=t[1]+f}}else l=t?.[1];var h=[s,l];if(Li(h))return t==null?h:Ob(h,t,r)}}}var _o=1e9,d8={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wg,lt=!0,Lr="[DecimalError] ",Di=Lr+"Invalid argument: ",Hg=Lr+"Exponent out of range: ",Bo=Math.floor,ji=Math.pow,f8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xr,$t=1e7,it=7,N2=9007199254740991,fc=Bo(N2/it),Oe={};Oe.absoluteValue=Oe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Oe.comparedTo=Oe.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Oe.decimalPlaces=Oe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*it;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Oe.dividedBy=Oe.div=function(e){return kn(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,r=t.constructor;return tt(kn(t,new r(e),0,1),r.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return Et(this)};Oe.greaterThan=Oe.gt=function(e){return this.cmp(e)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(e){return this.cmp(e)>=0};Oe.isInteger=Oe.isint=function(){return this.e>this.d.length-2};Oe.isNegative=Oe.isneg=function(){return this.s<0};Oe.isPositive=Oe.ispos=function(){return this.s>0};Oe.isZero=function(){return this.s===0};Oe.lessThan=Oe.lt=function(e){return this.cmp(e)<0};Oe.lessThanOrEqualTo=Oe.lte=function(e){return this.cmp(e)<1};Oe.logarithm=Oe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(xr))throw Error(Lr+"NaN");if(r.s<1)throw Error(Lr+(r.s?"NaN":"-Infinity"));return r.eq(xr)?new n(0):(lt=!1,t=kn(Qa(r,a),Qa(e,a),a),lt=!0,tt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?B2(t,e):D2(t,(e.s=-e.s,e))};Oe.modulo=Oe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Lr+"NaN");return r.s?(lt=!1,t=kn(r,e,0,1).times(e),lt=!0,r.minus(t)):tt(new n(r),i)};Oe.naturalExponential=Oe.exp=function(){return _2(this)};Oe.naturalLogarithm=Oe.ln=function(){return Qa(this)};Oe.negated=Oe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Oe.plus=Oe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D2(t,e):B2(t,(e.s=-e.s,e))};Oe.precision=Oe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Di+e);if(t=Et(i)+1,n=i.d.length-1,r=n*it+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Oe.squareRoot=Oe.sqrt=function(){var e,t,r,n,i,a,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Lr+"NaN")}for(e=Et(l),lt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=sn(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Bo((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(kn(l,a,s+2)).times(.5),sn(a.d).slice(0,s)===(t=sn(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(tt(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;s+=4}return lt=!0,tt(n,r)};Oe.times=Oe.mul=function(e){var t,r,n,i,a,s,l,c,d,u=this,f=u.constructor,h=u.d,g=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,c=h.length,d=g.length,c<d&&(a=h,h=g,g=a,s=c,c=d,d=s),a=[],s=c+d,n=s;n--;)a.push(0);for(n=d;--n>=0;){for(t=0,i=c+n;i>n;)l=a[i]+g[n]*h[i-n-1]+t,a[i--]=l%$t|0,t=l/$t|0;a[i]=(a[i]+t)%$t|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,lt?tt(e,f.precision):e};Oe.toDecimalPlaces=Oe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(hn(e,0,_o),t===void 0?t=n.rounding:hn(t,0,8),tt(r,e+Et(r)+1,t))};Oe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=zi(n,!0):(hn(e,0,_o),t===void 0?t=i.rounding:hn(t,0,8),n=tt(new i(n),e+1,t),r=zi(n,!0,e+1)),r};Oe.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?zi(i):(hn(e,0,_o),t===void 0?t=a.rounding:hn(t,0,8),n=tt(new a(i),e+Et(i)+1,t),r=zi(n.abs(),!1,e+Et(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return tt(new t(e),Et(e)+1,t.rounding)};Oe.toNumber=function(){return+this};Oe.toPower=Oe.pow=function(e){var t,r,n,i,a,s,l=this,c=l.constructor,d=12,u=+(e=new c(e));if(!e.s)return new c(xr);if(l=new c(l),!l.s){if(e.s<1)throw Error(Lr+"Infinity");return l}if(l.eq(xr))return l;if(n=c.precision,e.eq(xr))return tt(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=l.s,s){if((r=u<0?-u:u)<=N2){for(i=new c(xr),t=Math.ceil(n/it+4),lt=!1;r%2&&(i=i.times(l),Tb(i.d,t)),r=Bo(r/2),r!==0;)l=l.times(l),Tb(l.d,t);return lt=!0,e.s<0?new c(xr).div(i):tt(i,n)}}else if(a<0)throw Error(Lr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,lt=!1,i=e.times(Qa(l,n+d)),lt=!0,i=_2(i),i.s=a,i};Oe.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Et(i),n=zi(i,r<=a.toExpNeg||r>=a.toExpPos)):(hn(e,1,_o),t===void 0?t=a.rounding:hn(t,0,8),i=tt(new a(i),e,t),r=Et(i),n=zi(i,e<=r||r<=a.toExpNeg,e)),n};Oe.toSignificantDigits=Oe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(hn(e,1,_o),t===void 0?t=n.rounding:hn(t,0,8)),tt(new n(r),e,t)};Oe.toString=Oe.valueOf=Oe.val=Oe.toJSON=Oe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Et(e),r=e.constructor;return zi(e,t<=r.toExpNeg||t>=r.toExpPos)};function D2(e,t){var r,n,i,a,s,l,c,d,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),lt?tt(t,f):t;if(c=e.d,d=t.d,s=e.e,i=t.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,l=d.length):(n=d,i=s,l=c.length),s=Math.ceil(f/it),l=s>l?s+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=d.length,l-a<0&&(a=l,n=d,d=c,c=n),r=0;a;)r=(c[--a]=c[a]+d[a]+r)/$t|0,c[a]%=$t;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,lt?tt(t,f):t}function hn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Di+e)}function sn(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)n=e[t]+"",r=it-n.length,r&&(a+=ei(r)),a+=n;s=e[t],n=s+"",r=it-n.length,r&&(a+=ei(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var kn=(function(){function e(n,i){var a,s=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+s,n[l]=a%$t|0,s=a/$t|0;return s&&n.unshift(s),n}function t(n,i,a,s){var l,c;if(a!=s)c=a>s?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*$t+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var l,c,d,u,f,h,g,m,x,y,w,b,j,P,E,S,O,k,M=n.constructor,A=n.s==i.s?1:-1,_=n.d,D=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(Lr+"Division by zero");for(c=n.e-i.e,O=D.length,E=_.length,g=new M(A),m=g.d=[],d=0;D[d]==(_[d]||0);)++d;if(D[d]>(_[d]||0)&&--c,a==null?b=a=M.precision:s?b=a+(Et(n)-Et(i))+1:b=a,b<0)return new M(0);if(b=b/it+2|0,d=0,O==1)for(u=0,D=D[0],b++;(d<E||u)&&b--;d++)j=u*$t+(_[d]||0),m[d]=j/D|0,u=j%D|0;else{for(u=$t/(D[0]+1)|0,u>1&&(D=e(D,u),_=e(_,u),O=D.length,E=_.length),P=O,x=_.slice(0,O),y=x.length;y<O;)x[y++]=0;k=D.slice(),k.unshift(0),S=D[0],D[1]>=$t/2&&++S;do u=0,l=t(D,x,O,y),l<0?(w=x[0],O!=y&&(w=w*$t+(x[1]||0)),u=w/S|0,u>1?(u>=$t&&(u=$t-1),f=e(D,u),h=f.length,y=x.length,l=t(f,x,h,y),l==1&&(u--,r(f,O<h?k:D,h))):(u==0&&(l=u=1),f=D.slice()),h=f.length,h<y&&f.unshift(0),r(x,f,y),l==-1&&(y=x.length,l=t(D,x,O,y),l<1&&(u++,r(x,O<y?k:D,y))),y=x.length):l===0&&(u++,x=[0]),m[d++]=u,l&&x[0]?x[y++]=_[P]||0:(x=[_[P]],y=1);while((P++<E||x[0]!==void 0)&&b--)}return m[0]||m.shift(),g.e=c,tt(g,s?a+Et(g)+1:a)}})();function _2(e,t){var r,n,i,a,s,l,c=0,d=0,u=e.constructor,f=u.precision;if(Et(e)>16)throw Error(Hg+Et(e));if(!e.s)return new u(xr);for(lt=!1,l=f,s=new u(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(n=Math.log(ji(2,d))/Math.LN10*2+5|0,l+=n,r=i=a=new u(xr),u.precision=l;;){if(i=tt(i.times(e),l),r=r.times(++c),s=a.plus(kn(i,r,l)),sn(s.d).slice(0,l)===sn(a.d).slice(0,l)){for(;d--;)a=tt(a.times(a),l);return u.precision=f,t==null?(lt=!0,tt(a,f)):a}a=s}}function Et(e){for(var t=e.e*it,r=e.d[0];r>=10;r/=10)t++;return t}function kf(e,t,r){if(t>e.LN10.sd())throw lt=!0,r&&(e.precision=r),Error(Lr+"LN10 precision limit exceeded");return tt(new e(e.LN10),t)}function ei(e){for(var t="";e--;)t+="0";return t}function Qa(e,t){var r,n,i,a,s,l,c,d,u,f=1,h=10,g=e,m=g.d,x=g.constructor,y=x.precision;if(g.s<1)throw Error(Lr+(g.s?"NaN":"-Infinity"));if(g.eq(xr))return new x(0);if(t==null?(lt=!1,d=y):d=t,g.eq(10))return t==null&&(lt=!0),kf(x,d);if(d+=h,x.precision=d,r=sn(m),n=r.charAt(0),a=Et(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=sn(g.d),n=r.charAt(0),f++;a=Et(g),n>1?(g=new x("0."+r),a++):g=new x(n+"."+r.slice(1))}else return c=kf(x,d+2,y).times(a+""),g=Qa(new x(n+"."+r.slice(1)),d-h).plus(c),x.precision=y,t==null?(lt=!0,tt(g,y)):g;for(l=s=g=kn(g.minus(xr),g.plus(xr),d),u=tt(g.times(g),d),i=3;;){if(s=tt(s.times(u),d),c=l.plus(kn(s,new x(i),d)),sn(c.d).slice(0,d)===sn(l.d).slice(0,d))return l=l.times(2),a!==0&&(l=l.plus(kf(x,d+2,y).times(a+""))),l=kn(l,new x(f),d),x.precision=y,t==null?(lt=!0,tt(l,y)):l;l=c,i+=2}}function kb(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Bo(r/it),e.d=[],n=(r+1)%it,r<0&&(n+=it),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=it;n<i;)e.d.push(+t.slice(n,n+=it));t=t.slice(n),n=it-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),lt&&(e.e>fc||e.e<-fc))throw Error(Hg+r)}else e.s=0,e.e=0,e.d=[0];return e}function tt(e,t,r){var n,i,a,s,l,c,d,u,f=e.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=it,i=t,d=f[u=0];else{if(u=Math.ceil((n+1)/it),a=f.length,u>=a)return e;for(d=a=f[u],s=1;a>=10;a/=10)s++;n%=it,i=n-it+s}if(r!==void 0&&(a=ji(10,s-i-1),l=d/a%10|0,c=t<0||f[u+1]!==void 0||d%a,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?d/ji(10,s-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(a=Et(e),f.length=1,t=t-a-1,f[0]=ji(10,(it-t%it)%it),e.e=Bo(-t/it)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,a=1,u--):(f.length=u+1,a=ji(10,it-n),f[u]=i>0?(d/ji(10,s-i)%ji(10,i)|0)*a:0),c)for(;;)if(u==0){(f[0]+=a)==$t&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=$t)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(lt&&(e.e>fc||e.e<-fc))throw Error(Hg+Et(e));return e}function B2(e,t){var r,n,i,a,s,l,c,d,u,f,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),lt?tt(t,g):t;if(c=e.d,f=t.d,n=t.e,d=e.e,c=c.slice(),s=d-n,s){for(u=s<0,u?(r=c,s=-s,l=f.length):(r=f,n=d,l=c.length),i=Math.max(Math.ceil(g/it),l)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=f.length,u=i<l,u&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){u=c[i]<f[i];break}s=0}for(u&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>s;){if(c[--i]<f[i]){for(a=i;a&&c[--a]===0;)c[a]=$t-1;--c[a],c[i]+=$t}c[i]-=f[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,lt?tt(t,g):t):new h(0)}function zi(e,t,r){var n,i=Et(e),a=sn(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+ei(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ei(-i-1)+a,r&&(n=r-s)>0&&(a+=ei(n))):i>=s?(a+=ei(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+ei(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=ei(n))),e.s<0?"-"+a:a}function Tb(e,t){if(e.length>t)return e.length=t,!0}function $2(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Di+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return kb(s,a.toString())}else if(typeof a!="string")throw Error(Di+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,f8.test(a))kb(s,a);else throw Error(Di+a)}if(i.prototype=Oe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=$2,i.config=i.set=p8,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function p8(e){if(!e||typeof e!="object")throw Error(Lr+"Object expected");var t,r,n,i=["precision",1,_o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Bo(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Di+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Di+r+": "+n);return this}var Wg=$2(d8);xr=new Wg(1);const Xe=Wg;var h8=e=>e,L2={},z2=e=>e===L2,Mb=e=>function t(){return arguments.length===0||arguments.length===1&&z2(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},F2=(e,t)=>e===1?t:Mb(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(s=>s!==L2).length;return a>=e?t(...n):F2(e-a,Mb(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=n.map(u=>z2(u)?l.shift():u);return t(...d,...l)}))}),g8=e=>F2(e.length,e),uh=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},m8=g8((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),v8=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return h8;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce((l,c)=>c(l),a(...arguments))}},dh=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),V2=e=>{var t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t&&i.every((s,l)=>{var c;return s===((c=t)===null||c===void 0?void 0:c[l])})||(t=i,r=e(...i)),r}};function H2(e){var t;return e===0?t=1:t=Math.floor(new Xe(e).abs().log(10).toNumber())+1,t}function W2(e,t,r){for(var n=new Xe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var U2=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},K2=(e,t,r)=>{if(e.lte(0))return new Xe(0);var n=H2(e.toNumber()),i=new Xe(10).pow(n),a=e.div(i),s=n!==1?.05:.1,l=new Xe(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=l.mul(i);return t?new Xe(c.toNumber()):new Xe(Math.ceil(c.toNumber()))},y8=(e,t,r)=>{var n=new Xe(1),i=new Xe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Xe(10).pow(H2(e)-1),i=new Xe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):r||(i=new Xe(Math.floor(e)));var s=Math.floor((t-1)/2),l=v8(m8(c=>i.add(new Xe(c-s).mul(n)).toNumber()),uh);return l(0,t)},Y2=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var s=K2(new Xe(r).sub(t).div(n-1),i,a),l;t<=0&&r>=0?l=new Xe(0):(l=new Xe(t).add(r).div(2),l=l.sub(new Xe(l).mod(s)));var c=Math.ceil(l.sub(t).div(s).toNumber()),d=Math.ceil(new Xe(r).sub(l).div(s).toNumber()),u=c+d+1;return u>n?Y2(t,r,n,i,a+1):(u<n&&(d=r>0?d+(n-u):d,c=r>0?c:c+(n-u)),{step:s,tickMin:l.sub(new Xe(c).mul(s)),tickMax:l.add(new Xe(d).mul(s))})};function x8(e){var[t,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(n,2),[s,l]=U2([t,r]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...uh(0,n-1).map(()=>1/0)]:[...uh(0,n-1).map(()=>-1/0),l];return t>r?dh(c):c}if(s===l)return y8(s,n,i);var{step:d,tickMin:u,tickMax:f}=Y2(s,l,a,i,0),h=W2(u,f.add(new Xe(.1).mul(d)),d);return t>r?dh(h):h}function b8(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=U2([r,n]);if(a===-1/0||s===1/0)return[r,n];if(a===s)return[a];var l=Math.max(t,2),c=K2(new Xe(s).sub(a).div(l-1),i,0),d=[...W2(new Xe(a),new Xe(s),c),s];return i===!1&&(d=d.map(u=>Math.round(u))),r>n?dh(d):d}var w8=V2(x8),C8=V2(b8),q2=e=>e.rootProps.maxBarSize,S8=e=>e.rootProps.barGap,G2=e=>e.rootProps.barCategoryGap,j8=e=>e.rootProps.barSize,ys=e=>e.rootProps.stackOffset,Ug=e=>e.options.chartName,Kg=e=>e.rootProps.syncId,X2=e=>e.rootProps.syncMethod,Yg=e=>e.options.eventEmitter,wn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},vr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},iu=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},E8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:wn.angleAxisId,includeHidden:!1,name:void 0,reversed:wn.reversed,scale:wn.scale,tick:wn.tick,tickCount:void 0,ticks:void 0,type:wn.type,unit:void 0},P8={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:vr.type,unit:void 0},O8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:wn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:wn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:wn.scale,tick:wn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},k8={allowDataOverflow:vr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:vr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:vr.scale,tick:vr.tick,tickCount:vr.tickCount,ticks:void 0,type:"category",unit:void 0},qg=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?O8:E8,Gg=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?k8:P8,ou=e=>e.polarOptions,Xg=J([_n,Bn,Rt],Sj),Z2=J([ou,Xg],(e,t)=>{if(e!=null)return Zt(e.innerRadius,t,0)}),Q2=J([ou,Xg],(e,t)=>{if(e!=null)return Zt(e.outerRadius,t,t*.8)}),T8=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},J2=J([ou],T8);J([qg,J2],iu);var eE=J([Xg,Z2,Q2],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});J([Gg,eE],iu);var tE=J([We,ou,Z2,Q2,_n,Bn],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:s,cy:l,startAngle:c,endAngle:d}=t;return{cx:Zt(s,i,i/2),cy:Zt(l,a,a/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:d,clockWise:!1}}}),dt=(e,t)=>t,xs=(e,t,r)=>r;function Zg(e){return e?.id}var It=e=>{var t=We(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},$o=e=>e.tooltip.settings.axisId,Nt=e=>{var t=It(e),r=$o(e);return bs(e,t,r)},rE=J([Nt],e=>e?.dataKey);function nE(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,s=new Map;return e.forEach(l=>{var c,d=(c=l.data)!==null&&c!==void 0?c:n;if(!(d==null||d.length===0)){var u=Zg(l);d.forEach((f,h)=>{var g=a==null||i?h:String(ht(f,a,null)),m=ht(f,l.dataKey,0),x;s.has(g)?x=s.get(g):x={},Object.assign(x,{[u]:m}),s.set(g,x)})}}),Array.from(s.values())}function au(e){return e.stackId!=null&&e.dataKey!=null}var su=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function lu(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){M8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M8(e,t,r){return(t=R8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R8(e){var t=A8(e,"string");return typeof t=="symbol"?t:t+""}function A8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fh=[0,"auto"],gr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},iE=(e,t)=>e.cartesianAxis.xAxis[t],Ln=(e,t)=>{var r=iE(e,t);return r??gr},mr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:fh,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:hs},oE=(e,t)=>e.cartesianAxis.yAxis[t],zn=(e,t)=>{var r=oE(e,t);return r??mr},I8={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Qg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??I8},gt=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);case"zAxis":return Qg(e,r);case"angleAxis":return qg(e,r);case"radiusAxis":return Gg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},N8=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},bs=(e,t,r)=>{switch(t){case"xAxis":return Ln(e,r);case"yAxis":return zn(e,r);case"angleAxis":return qg(e,r);case"radiusAxis":return Gg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},aE=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Jg(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var em=e=>e.graphicalItems.cartesianItems,D8=J([dt,xs],Jg),tm=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),ws=J([em,gt,D8],tm,{memoizeOptions:{resultEqualityCheck:lu}}),sE=J([ws],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(au)),lE=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),_8=J([ws],lE),rm=e=>e.map(t=>t.data).filter(Boolean).flat(1),B8=J([ws],rm,{memoizeOptions:{resultEqualityCheck:lu}}),nm=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},im=J([B8,Vg],nm),om=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:ht(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:ht(i,n)}))):e.map(n=>({value:n})),cu=J([im,gt,ws],om);function cE(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function kl(e){if(pn(e)||e instanceof Date){var t=Number(e);if(Qt(t))return t}}function Ab(e){if(Array.isArray(e)){var t=[kl(e[0]),kl(e[1])];return Li(t)?t:void 0}var r=kl(e);if(r!=null)return[r,r]}function Lo(e){return e.map(kl).filter(a5)}function $8(e,t,r){return!r||typeof t!="number"||Br(t)?[]:r.length?Lo(r.flatMap(n=>{var i=ht(e,n.dataKey),a,s;if(Array.isArray(i)?[a,s]=i:a=s=i,!(!Qt(a)||!Qt(s)))return[t-a,t+s]})):[]}var L8=J([sE,Vg,Nt],nE),uE=(e,t,r)=>{var n={},i=t.reduce((a,s)=>(s.stackId==null||(a[s.stackId]==null&&(a[s.stackId]=[]),a[s.stackId].push(s)),a),n);return Object.fromEntries(Object.entries(i).map(a=>{var[s,l]=a,c=l.map(Zg);return[s,{stackedData:kB(e,c,r),graphicalItems:l}]}))},ph=J([L8,sE,ys],uE),dE=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var s=IB(e,i,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},z8=J([gt],e=>e.allowDataOverflow),am=e=>{var t;if(e==null||!("domain"in e))return fh;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Lo(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:fh},sm=J([gt],am),lm=J([sm,z8],I2),F8=J([ph,hi,dt,lm],dE,{memoizeOptions:{resultEqualityCheck:su}}),uu=e=>e.errorBars,V8=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>cE(r,n)),hc=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),s=Math.min(...a),l=Math.max(...a);return[s,l]}},cm=(e,t,r,n,i)=>{var a,s;if(r.length>0&&e.forEach(l=>{r.forEach(c=>{var d,u,f=(d=n[c.id])===null||d===void 0?void 0:d.filter(w=>cE(i,w)),h=ht(l,(u=t.dataKey)!==null&&u!==void 0?u:c.dataKey),g=$8(l,h,f);if(g.length>=2){var m=Math.min(...g),x=Math.max(...g);(a==null||m<a)&&(a=m),(s==null||x>s)&&(s=x)}var y=Ab(h);y!=null&&(a=a==null?y[0]:Math.min(a,y[0]),s=s==null?y[1]:Math.max(s,y[1]))})}),t?.dataKey!=null&&e.forEach(l=>{var c=Ab(ht(l,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),s=s==null?c[1]:Math.max(s,c[1]))}),Qt(a)&&Qt(s))return[a,s]},H8=J([im,gt,_8,uu,dt],cm,{memoizeOptions:{resultEqualityCheck:su}});function W8(e){var{value:t}=e;if(pn(t)||t instanceof Date)return t}var U8=(e,t,r)=>{var n=e.map(W8).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&TS(n))?Yj(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},fE=e=>e.referenceElements.dots,zo=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),K8=J([fE,dt,xs],zo),pE=e=>e.referenceElements.areas,Y8=J([pE,dt,xs],zo),hE=e=>e.referenceElements.lines,q8=J([hE,dt,xs],zo),gE=(e,t)=>{var r=Lo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},G8=J(K8,dt,gE),mE=(e,t)=>{var r=Lo(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},X8=J([Y8,dt],mE),vE=(e,t)=>{var r=Lo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Z8=J(q8,dt,vE),Q8=J(G8,Z8,X8,(e,t,r)=>hc(e,r,t)),um=(e,t,r,n,i,a,s,l)=>{if(r!=null)return r;var c=s==="vertical"&&l==="xAxis"||s==="horizontal"&&l==="yAxis",d=c?hc(n,a,i):hc(a,i);return u8(t,d,e.allowDataOverflow)},J8=J([gt,sm,lm,F8,H8,Q8,We,dt],um,{memoizeOptions:{resultEqualityCheck:su}}),eL=[0,1],dm=(e,t,r,n,i,a,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var{dataKey:l,type:c}=e,d=Wi(t,a);return d&&l==null?Yj(0,r.length):c==="category"?U8(n,e,d):i==="expand"?eL:s}},fm=J([gt,We,im,cu,ys,dt,J8],dm),yE=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:s}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":s==="category"?"band":"linear";if(typeof a=="string"){var l="scale".concat(ls(a));return l in ba?l:"point"}}},Fo=J([gt,We,aE,Ug,dt],yE);function tL(e){if(e!=null){if(e in ba)return ba[e]();var t="scale".concat(ls(e));if(t in ba)return ba[t]()}}function pm(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=tL(t);if(i!=null){var a=i.domain(r).range(n);return SB(a),a}}}var hm=(e,t,r)=>{var n=am(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Li(e))return w8(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Li(e))return C8(e,t.tickCount,t.allowDecimals)}},gm=J([fm,bs,Fo],hm),mm=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Li(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],s=t[1],l=r[r.length-1];return[Math.min(i,a),Math.max(s,l)]}return t},rL=J([gt,fm,gm,dt],mm),nL=J(cu,gt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Lo(e.map(l=>l.value))).sort((l,c)=>l-c);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var s=n[a+1]-n[a];r=Math.min(r,s)}return r/i}}),xE=J(nL,We,G2,Rt,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!Qt(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=Zt(r,e*a),l=e*a/2;return l-s-(l-s)/a*s}return 0}),iL=(e,t)=>{var r=Ln(e,t);return r==null||typeof r.padding!="string"?0:xE(e,"xAxis",t,r.padding)},oL=(e,t)=>{var r=zn(e,t);return r==null||typeof r.padding!="string"?0:xE(e,"yAxis",t,r.padding)},aL=J(Ln,iL,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),sL=J(zn,oL,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),lL=J([Rt,aL,qc,Yc,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),cL=J([Rt,We,sL,qc,Yc,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:s}=i;return a?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Cs=(e,t,r,n)=>{var i;switch(t){case"xAxis":return lL(e,r,n);case"yAxis":return cL(e,r,n);case"zAxis":return(i=Qg(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return J2(e);case"radiusAxis":return eE(e,r);default:return}},bE=J([gt,Cs],iu),Vo=J([gt,Fo,rL,bE],pm);J([ws,uu,dt],V8);function wE(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var du=(e,t)=>t,fu=(e,t,r)=>r,uL=J(Uc,du,fu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(wE)),dL=J(Kc,du,fu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(wE)),CE=(e,t)=>({width:e.width,height:t.height}),fL=(e,t)=>{var r=typeof t.width=="number"?t.width:hs;return{width:r,height:e.height}},SE=J(Rt,Ln,CE),pL=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},hL=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},gL=J(Bn,Rt,uL,du,fu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=CE(t,l);s==null&&(s=pL(t,n,e));var d=n==="top"&&!i||n==="bottom"&&i;a[l.id]=s-Number(d)*c.height,s+=(d?-1:1)*c.height}),a}),mL=J(_n,Rt,dL,du,fu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=fL(t,l);s==null&&(s=hL(t,n,e));var d=n==="left"&&!i||n==="right"&&i;a[l.id]=s-Number(d)*c.width,s+=(d?-1:1)*c.width}),a}),vL=(e,t)=>{var r=Ln(e,t);if(r!=null)return gL(e,r.orientation,r.mirror)},yL=J([Rt,Ln,vL,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),xL=(e,t)=>{var r=zn(e,t);if(r!=null)return mL(e,r.orientation,r.mirror)},bL=J([Rt,zn,xL,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),jE=J(Rt,zn,(e,t)=>{var r=typeof t.width=="number"?t.width:hs;return{width:r,height:e.height}}),Ib=(e,t,r)=>{switch(t){case"xAxis":return SE(e,r).width;case"yAxis":return jE(e,r).height;default:return}},EE=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=r,l=Wi(e,n),c=t.map(d=>d.value);if(s&&l&&a==="category"&&i&&TS(c))return c}},vm=J([We,cu,gt,dt],EE),PE=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,s=Wi(e,n);if(s&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},ym=J([We,cu,bs,dt],PE),Nb=J([We,N8,Fo,Vo,vm,ym,Cs,gm,dt],(e,t,r,n,i,a,s,l,c)=>{if(t==null)return null;var d=Wi(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:d,niceTicks:l,range:s,realScaleType:r,scale:n}}),wL=(e,t,r,n,i,a,s,l,c)=>{if(!(t==null||n==null)){var d=Wi(e,c),{type:u,ticks:f,tickCount:h}=t,g=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,m=u==="category"&&n.bandwidth?n.bandwidth()/g:0;m=c==="angleAxis"&&a!=null&&a.length>=2?Lt(a[0]-a[1])*2*m:m;var x=f||i;if(x){var y=x.map((w,b)=>{var j=s?s.indexOf(w):w;return{index:b,coordinate:n(j)+m,value:w,offset:m}});return y.filter(w=>!Br(w.coordinate))}return d&&l?l.map((w,b)=>({coordinate:n(w)+m,value:w,index:b,offset:m})):n.ticks?n.ticks(h).map(w=>({coordinate:n(w)+m,value:w,offset:m})):n.domain().map((w,b)=>({coordinate:n(w)+m,value:s?s[w]:w,index:b,offset:m}))}},OE=J([We,bs,Fo,Vo,gm,Cs,vm,ym,dt],wL),CL=(e,t,r,n,i,a,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Wi(e,s),{tickCount:c}=t,d=0;return d=s==="angleAxis"&&n?.length>=2?Lt(n[0]-n[1])*2*d:d,l&&a?a.map((u,f)=>({coordinate:r(u)+d,value:u,index:f,offset:d})):r.ticks?r.ticks(c).map(u=>({coordinate:r(u)+d,value:u,offset:d})):r.domain().map((u,f)=>({coordinate:r(u)+d,value:i?i[u]:u,index:f,offset:d}))}},Eo=J([We,bs,Vo,Cs,vm,ym,dt],CL),Po=J(gt,Vo,(e,t)=>{if(!(e==null||t==null))return pc(pc({},e),{},{scale:t})}),SL=J([gt,Fo,fm,bE],pm);J((e,t,r)=>Qg(e,r),SL,(e,t)=>{if(!(e==null||t==null))return pc(pc({},e),{},{scale:t})});var jL=J([We,Uc,Kc],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),kE=e=>e.options.defaultTooltipEventType,TE=e=>e.options.validateTooltipEventTypes;function ME(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function xm(e,t){var r=kE(e),n=TE(e);return ME(t,r,n)}function EL(e){return Ae(t=>xm(t,e))}var RE=(e,t)=>{var r,n=Number(t);if(!(Br(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},PL=e=>e.tooltip.settings,ri={active:!1,index:null,dataKey:void 0,coordinate:void 0},OL={itemInteraction:{click:ri,hover:ri},axisInteraction:{click:ri,hover:ri},keyboardInteraction:ri,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},AE=Cr({name:"tooltip",initialState:OL,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:er()},removeTooltipEntrySettings:{reducer(e,t){var r=On(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:er()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:kL,removeTooltipEntrySettings:TL,setTooltipSettingsState:ML,setActiveMouseOverItemIndex:IE,mouseLeaveItem:RL,mouseLeaveChart:NE,setActiveClickItemIndex:AL,setMouseOverAxisIndex:DE,setMouseClickAxisIndex:IL,setSyncInteraction:hh,setKeyboardInteraction:gh}=AE.actions,NL=AE.reducer;function Db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(r),!0).forEach(function(n){DL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DL(e,t,r){return(t=_L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _L(e){var t=BL(e,"string");return typeof t=="symbol"?t:t+""}function BL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $L(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function LL(e){return e.index!=null}var _E=(e,t,r,n)=>{if(t==null)return ri;var i=$L(e,t,r);if(i==null)return ri;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(LL(i)){if(a)return gl(gl({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return gl(gl({},ri),{},{coordinate:i.coordinate})},bm=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!Qt(n))return r;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(n,a)))},BE=(e,t,r,n,i,a,s,l)=>{if(!(a==null||l==null)){var c=s[0],d=c==null?void 0:l(c.positions,a);if(d!=null)return d;var u=i?.[Number(a)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},$E=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.dataKey)===i})},Ss=e=>e.options.tooltipPayloadSearcher,Ho=e=>e.tooltip;function _b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_b(Object(r),!0).forEach(function(n){zL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zL(e,t,r){return(t=FL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FL(e){var t=VL(e,"string");return typeof t=="symbol"?t:t+""}function VL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e,t){return e??t}var LE=(e,t,r,n,i,a,s)=>{if(!(t==null||a==null)){var{chartData:l,computedData:c,dataStartIndex:d,dataEndIndex:u}=r,f=[];return e.reduce((h,g)=>{var m,{dataDefinedOnItem:x,settings:y}=g,w=HL(x,l),b=Array.isArray(w)?jj(w,d,u):w,j=(m=y?.dataKey)!==null&&m!==void 0?m:n,P=y?.nameKey,E;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&s==="axis"?E=zD(b,n,i):E=a(b,t,c,P),Array.isArray(E))E.forEach(O=>{var k=Bb(Bb({},y),{},{name:O.name,unit:O.unit,color:void 0,fill:void 0});h.push(fx({tooltipEntrySettings:k,dataKey:O.dataKey,payload:O.payload,value:ht(O.payload,O.dataKey),name:O.name}))});else{var S;h.push(fx({tooltipEntrySettings:y,dataKey:j,payload:E,value:ht(E,j),name:(S=ht(E,P))!==null&&S!==void 0?S:y?.name}))}return h},f)}},wm=J([Nt,We,aE,Ug,It],yE),WL=J([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),UL=J([It,$o],Jg),js=J([WL,Nt,UL],tm,{memoizeOptions:{resultEqualityCheck:lu}}),KL=J([js],e=>e.filter(au)),YL=J([js],rm,{memoizeOptions:{resultEqualityCheck:lu}}),Wo=J([YL,hi],nm),qL=J([KL,hi,Nt],nE),Cm=J([Wo,Nt,js],om),zE=J([Nt],am),GL=J([Nt],e=>e.allowDataOverflow),FE=J([zE,GL],I2),XL=J([js],e=>e.filter(au)),ZL=J([qL,XL,ys],uE),QL=J([ZL,hi,It,FE],dE),JL=J([js],lE),ez=J([Wo,Nt,JL,uu,It],cm,{memoizeOptions:{resultEqualityCheck:su}}),tz=J([fE,It,$o],zo),rz=J([tz,It],gE),nz=J([pE,It,$o],zo),iz=J([nz,It],mE),oz=J([hE,It,$o],zo),az=J([oz,It],vE),sz=J([rz,az,iz],hc),lz=J([Nt,zE,FE,QL,ez,sz,We,It],um),VE=J([Nt,We,Wo,Cm,ys,It,lz],dm),cz=J([VE,Nt,wm],hm),uz=J([Nt,VE,cz,It],mm),HE=e=>{var t=It(e),r=$o(e),n=!1;return Cs(e,t,r,n)},WE=J([Nt,HE],iu),UE=J([Nt,wm,uz,WE],pm),dz=J([We,Cm,Nt,It],EE),fz=J([We,Cm,Nt,It],PE),pz=(e,t,r,n,i,a,s,l)=>{if(t){var{type:c}=t,d=Wi(e,l);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=c==="category"&&n.bandwidth?n.bandwidth()/u:0;return f=l==="angleAxis"&&i!=null&&i?.length>=2?Lt(i[0]-i[1])*2*f:f,d&&s?s.map((h,g)=>({coordinate:n(h)+f,value:h,index:g,offset:f})):n.domain().map((h,g)=>({coordinate:n(h)+f,value:a?a[h]:h,index:g,offset:f}))}}},Fn=J([We,Nt,wm,UE,HE,dz,fz,It],pz),Sm=J([kE,TE,PL],(e,t,r)=>ME(r.shared,e,t)),KE=e=>e.tooltip.settings.trigger,jm=e=>e.tooltip.settings.defaultIndex,pu=J([Ho,Sm,KE,jm],_E),Fi=J([pu,Wo],bm),YE=J([Fn,Fi],RE),qE=J([pu],e=>{if(e)return e.dataKey}),GE=J([Ho,Sm,KE,jm],$E),hz=J([_n,Bn,We,Rt,Fn,jm,GE,Ss],BE),gz=J([pu,hz],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),mz=J([pu],e=>e.active),vz=J([GE,Fi,hi,rE,YE,Ss,Sm],LE);J([vz],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){yz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yz(e,t,r){return(t=xz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xz(e){var t=bz(e,"string");return typeof t=="symbol"?t:t+""}function bz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wz=()=>Ae(Nt),Cz=()=>{var e=wz(),t=Ae(Fn),r=Ae(UE);return hg(Lb(Lb({},e),{},{scale:r}),t)},Sz=()=>Ae(Ug),Em=(e,t)=>t,XE=(e,t,r)=>r,Pm=(e,t,r,n)=>n,jz=J(Fn,e=>Lc(e,t=>t.coordinate)),Om=J([Ho,Em,XE,Pm],_E),ZE=J([Om,Wo],bm),Ez=(e,t,r)=>{if(t!=null){var n=Ho(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},QE=J([Ho,Em,XE,Pm],$E),gc=J([_n,Bn,We,Rt,Fn,Pm,QE,Ss],BE),Pz=J([Om,gc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),JE=J(Fn,ZE,RE),Oz=J([QE,ZE,hi,rE,JE,Ss,Em],LE),kz=J([Om],e=>({isActive:e.active,activeIndex:e.index})),Tz=(e,t,r,n,i,a,s,l)=>{if(!(!e||!t||!n||!i||!a)){var c=NB(e.chartX,e.chartY,t,r,l);if(c){var d=_B(c,t),u=wB(d,s,a,n,i),f=DB(t,a,u,c);return{activeIndex:String(u),activeCoordinate:f}}}};function mh(){return mh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mh.apply(null,arguments)}function zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){Mz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mz(e,t,r){return(t=Rz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rz(e){var t=Az(e,"string");return typeof t=="symbol"?t:t+""}function Az(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iz(e){var{coordinate:t,payload:r,index:n,offset:i,tooltipAxisBandSize:a,layout:s,cursor:l,tooltipEventType:c,chartName:d}=e,u=t,f=r,h=n;if(!l||!u||d!=="ScatterChart"&&c!=="axis")return null;var g,m;if(d==="ScatterChart")g=u,m=J3;else if(d==="BarChart")g=e5(s,u,i,a),m=Hj;else if(s==="radial"){var{cx:x,cy:y,radius:w,startAngle:b,endAngle:j}=Wj(u);g={cx:x,cy:y,startAngle:b,endAngle:j,innerRadius:w,outerRadius:w},m=Kj}else g={points:B5(s,u,i)},m=$j;var P=typeof l=="object"&&"className"in l?l.className:void 0,E=ml(ml(ml(ml({stroke:"#ccc",pointerEvents:"none"},i),g),za(l)),{},{payload:f,payloadIndex:h,className:Qe("recharts-tooltip-cursor",P)});return v.isValidElement(l)?v.cloneElement(l,E):v.createElement(m,E)}function Nz(e){var t=Cz(),r=Ij(),n=xg(),i=Sz();return C.createElement(Iz,mh({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var eP=v.createContext(null),Dz=()=>v.useContext(eP),Tf={exports:{}},Fb;function _z(){return Fb||(Fb=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,d,u){this.fn=c,this.context=d,this.once=u||!1}function a(c,d,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new i(u,f||c,h),m=r?r+d:d;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],g]:c._events[m].push(g):(c._events[m]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new n:delete c._events[d]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],u,f;if(this._eventsCount===0)return d;for(f in u=this._events)t.call(u,f)&&d.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},l.prototype.listeners=function(d){var u=r?r+d:d,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,g=f.length,m=new Array(g);h<g;h++)m[h]=f[h].fn;return m},l.prototype.listenerCount=function(d){var u=r?r+d:d,f=this._events[u];return f?f.fn?1:f.length:0},l.prototype.emit=function(d,u,f,h,g,m){var x=r?r+d:d;if(!this._events[x])return!1;var y=this._events[x],w=arguments.length,b,j;if(y.fn){switch(y.once&&this.removeListener(d,y.fn,void 0,!0),w){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,f),!0;case 4:return y.fn.call(y.context,u,f,h),!0;case 5:return y.fn.call(y.context,u,f,h,g),!0;case 6:return y.fn.call(y.context,u,f,h,g,m),!0}for(j=1,b=new Array(w-1);j<w;j++)b[j-1]=arguments[j];y.fn.apply(y.context,b)}else{var P=y.length,E;for(j=0;j<P;j++)switch(y[j].once&&this.removeListener(d,y[j].fn,void 0,!0),w){case 1:y[j].fn.call(y[j].context);break;case 2:y[j].fn.call(y[j].context,u);break;case 3:y[j].fn.call(y[j].context,u,f);break;case 4:y[j].fn.call(y[j].context,u,f,h);break;default:if(!b)for(E=1,b=new Array(w-1);E<w;E++)b[E-1]=arguments[E];y[j].fn.apply(y[j].context,b)}}return!0},l.prototype.on=function(d,u,f){return a(this,d,u,f,!1)},l.prototype.once=function(d,u,f){return a(this,d,u,f,!0)},l.prototype.removeListener=function(d,u,f,h){var g=r?r+d:d;if(!this._events[g])return this;if(!u)return s(this,g),this;var m=this._events[g];if(m.fn)m.fn===u&&(!h||m.once)&&(!f||m.context===f)&&s(this,g);else{for(var x=0,y=[],w=m.length;x<w;x++)(m[x].fn!==u||h&&!m[x].once||f&&m[x].context!==f)&&y.push(m[x]);y.length?this._events[g]=y.length===1?y[0]:y:s(this,g)}return this},l.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&s(this,u)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Tf)),Tf.exports}var Bz=_z();const $z=wr(Bz);var Ja=new $z,vh="recharts.syncEvent.tooltip",Vb="recharts.syncEvent.brush";function tP(e,t){if(t){var r=Number.parseInt(t,10);if(!Br(r))return e?.[r]}}var Lz={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},rP=Cr({name:"options",initialState:Lz,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),zz=rP.reducer,{createEventEmitter:Fz}=rP.actions;function Vz(e){return e.tooltip.syncInteraction}var Hz={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},nP=Cr({name:"chartData",initialState:Hz,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Hb,setDataStartEndIndexes:Wz}=nP.actions,Uz=nP.reducer,Kz=["x","y"];function Wb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function no(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wb(Object(r),!0).forEach(function(n){Yz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yz(e,t,r){return(t=qz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qz(e){var t=Gz(e,"string");return typeof t=="symbol"?t:t+""}function Gz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xz(e,t){if(e==null)return{};var r,n,i=Zz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iP=()=>{};function Qz(){var e=Ae(Kg),t=Ae(Yg),r=ut(),n=Ae(X2),i=Ae(Fn),a=xg(),s=Gc(),l=Ae(c=>c.rootProps.className);v.useEffect(()=>{if(e==null)return iP;var c=(d,u,f)=>{if(t!==f&&e===d){if(n==="index"){var h;if(s&&u!==null&&u!==void 0&&(h=u.payload)!==null&&h!==void 0&&h.coordinate&&u.payload.sourceViewBox){var g=u.payload.coordinate,{x:m,y:x}=g,y=Xz(g,Kz),{x:w,y:b,width:j,height:P}=u.payload.sourceViewBox,E=no(no({},y),{},{x:s.x+(j?(m-w)/j:0)*s.width,y:s.y+(P?(x-b)/P:0)*s.height});r(no(no({},u),{},{payload:no(no({},u.payload),{},{coordinate:E})}))}else r(u);return}if(i!=null){var S;if(typeof n=="function"){var O={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},k=n(i,O);S=i[k]}else n==="value"&&(S=i.find(N=>String(N.value)===u.payload.label));var{coordinate:M}=u.payload;if(S==null||u.payload.active===!1||M==null||s==null){r(hh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:A,y:_}=M,D=Math.min(A,s.x+s.width),B=Math.min(_,s.y+s.height),H={x:a==="horizontal"?S.coordinate:D,y:a==="horizontal"?B:S.coordinate},T=hh({active:u.payload.active,coordinate:H,dataKey:u.payload.dataKey,index:String(S.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox});r(T)}}};return Ja.on(vh,c),()=>{Ja.off(vh,c)}},[l,r,t,e,n,i,a,s])}function Jz(){var e=Ae(Kg),t=Ae(Yg),r=ut();v.useEffect(()=>{if(e==null)return iP;var n=(i,a,s)=>{t!==s&&e===i&&r(Wz(a))};return Ja.on(Vb,n),()=>{Ja.off(Vb,n)}},[r,t,e])}function eF(){var e=ut();v.useEffect(()=>{e(Fz())},[e]),Qz(),Jz()}function tF(e,t,r,n,i,a){var s=Ae(g=>Ez(g,e,t)),l=Ae(Yg),c=Ae(Kg),d=Ae(X2),u=Ae(Vz),f=u?.active,h=Gc();v.useEffect(()=>{if(!f&&c!=null&&l!=null){var g=hh({active:a,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h});Ja.emit(vh,c,g,l)}},[f,r,s,i,n,l,c,d,a,h])}function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){rF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rF(e,t,r){return(t=nF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=iF(e,"string");return typeof t=="symbol"?t:t+""}function iF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oF(e){return e.dataKey}function aF(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(R3,t)}var Yb=[],sF={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Ui.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function vl(e){var t=ir(e,sF),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:a,content:s,filterNull:l,isAnimationActive:c,offset:d,payloadUniqBy:u,position:f,reverseDirection:h,useTranslate3d:g,wrapperStyle:m,cursor:x,shared:y,trigger:w,defaultIndex:b,portal:j,axisId:P}=t,E=ut(),S=typeof b=="number"?String(b):b;v.useEffect(()=>{E(ML({shared:y,trigger:w,axisId:P,active:r,defaultIndex:S}))},[E,y,w,P,r,S]);var O=Gc(),k=Bj(),M=EL(y),{activeIndex:A,isActive:_}=Ae(ue=>kz(ue,M,w,S)),D=Ae(ue=>Oz(ue,M,w,S)),B=Ae(ue=>JE(ue,M,w,S)),H=Ae(ue=>Pz(ue,M,w,S)),T=D,N=Dz(),I=r??_,[R,$]=KS([T,I]),U=M==="axis"?B:void 0;tF(M,w,H,U,A,I);var V=j??N;if(V==null)return null;var F=T??Yb;I||(F=Yb),l&&F.length&&(F=zS(T.filter(ue=>ue.value!=null&&(ue.hide!==!0||t.includeHidden)),u,oF));var q=F.length>0,ie=C.createElement($3,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:c,active:I,coordinate:H,hasPayload:q,offset:d,position:f,reverseDirection:h,useTranslate3d:g,viewBox:O,wrapperStyle:m,lastBoundingBox:R,innerRef:$,hasPortalFromProps:!!j},aF(s,Kb(Kb({},t),{},{payload:F,label:U,active:I,coordinate:H,accessibilityLayer:k})));return C.createElement(C.Fragment,null,Oa.createPortal(ie,V),I&&C.createElement(Nz,{cursor:x,tooltipEventType:M,coordinate:H,payload:T,index:A}))}var oi=e=>null;oi.displayName="Cell";function lF(e,t,r){return(t=cF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cF(e){var t=uF(e,"string");return typeof t=="symbol"?t:t+""}function uF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class dF{constructor(t){lF(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){pF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pF(e,t,r){return(t=hF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mF={cacheSize:2e3,enableCache:!0},oP=fF({},mF),Gb=new dF(oP.cacheSize),vF={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Xb="recharts_measurement_span";function yF(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",s=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(s,"|").concat(l)}var Zb=(e,t)=>{try{var r=document.getElementById(Xb);r||(r=document.createElement("span"),r.setAttribute("id",Xb),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,vF,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},ja=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ui.isSsr)return{width:0,height:0};if(!oP.enableCache)return Zb(t,r);var n=yF(t,r),i=Gb.get(n);if(i)return i;var a=Zb(t,r);return Gb.set(n,a),a},Qb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Jb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xF=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bF=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aP={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},wF=Object.keys(aP),lo="NaN";function CF(e,t){return e*aP[t]}class sr{static parse(t){var r,[,n,i]=(r=bF.exec(t))!==null&&r!==void 0?r:[];return new sr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Br(t)&&(this.unit=""),r!==""&&!xF.test(r)&&(this.num=NaN,this.unit=""),wF.includes(r)&&(this.num=CF(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Br(this.num)}}function sP(e){if(e.includes(lo))return lo;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=Qb.exec(t))!==null&&r!==void 0?r:[],s=sr.parse(n??""),l=sr.parse(a??""),c=i==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return lo;t=t.replace(Qb,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,u,f,h]=(d=Jb.exec(t))!==null&&d!==void 0?d:[],g=sr.parse(u??""),m=sr.parse(h??""),x=f==="+"?g.add(m):g.subtract(m);if(x.isNaN())return lo;t=t.replace(Jb,x.toString())}return t}var e1=/\(([^()]*)\)/;function SF(e){for(var t=e,r;(r=e1.exec(t))!=null;){var[,n]=r;t=t.replace(e1,sP(n))}return t}function jF(e){var t=e.replace(/\s+/g,"");return t=SF(t),t=sP(t),t}function EF(e){try{return jF(e)}catch{return lo}}function Mf(e){var t=EF(e.slice(5,-1));return t===lo?"":t}var PF=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],OF=["dx","dy","angle","className","breakAll"];function yh(){return yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yh.apply(null,arguments)}function t1(e,t){if(e==null)return{};var r,n,i=kF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lP=/[ \f\n\r\t\v\u2028\u2029]+/,cP=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Ft(t)||(r?i=t.toString().split(""):i=t.toString().split(lP));var a=i.map(l=>({word:l,width:ja(l,n).width})),s=r?0:ja(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},TF=(e,t,r,n,i)=>{var{maxLines:a,children:s,style:l,breakAll:c}=e,d=Ne(a),u=s,f=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce((D,B)=>{var{word:H,width:T}=B,N=D[D.length-1];if(N&&(n==null||i||N.width+T+r<Number(n)))N.words.push(H),N.width+=T+r;else{var I={words:[H],width:T};D.push(I)}return D},[])},h=f(t),g=A=>A.reduce((_,D)=>_.width>D.width?_:D);if(!d||i)return h;var m=h.length>a||g(h).width>Number(n);if(!m)return h;for(var x="…",y=A=>{var _=u.slice(0,A),D=cP({breakAll:c,style:l,children:_+x}).wordsWithComputedWidth,B=f(D),H=B.length>a||g(B).width>Number(n);return[H,B]},w=0,b=u.length-1,j=0,P;w<=b&&j<=u.length-1;){var E=Math.floor((w+b)/2),S=E-1,[O,k]=y(S),[M]=y(E);if(!O&&!M&&(w=E+1),O&&M&&(b=E-1),!O&&M){P=k;break}j++}return P||h},r1=e=>{var t=Ft(e)?[]:e.toString().split(lP);return[{words:t}]},MF=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:s}=e;if((t||r)&&!Ui.isSsr){var l,c,d=cP({breakAll:a,children:n,style:i});if(d){var{wordsWithComputedWidth:u,spaceWidth:f}=d;l=u,c=f}else return r1(n);return TF({breakAll:a,children:n,maxLines:s,style:i},l,c,t,r)}return r1(n)},n1="#808080",hu=v.forwardRef((e,t)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:a="0.71em",scaleToFit:s=!1,textAnchor:l="start",verticalAnchor:c="end",fill:d=n1}=e,u=t1(e,PF),f=v.useMemo(()=>MF({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:s,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,s,u.style,u.width]),{dx:h,dy:g,angle:m,className:x,breakAll:y}=u,w=t1(u,OF);if(!pn(r)||!pn(n)||f.length===0)return null;var b=r+(Ne(h)?h:0),j=n+(Ne(g)?g:0),P;switch(c){case"start":P=Mf("calc(".concat(a,")"));break;case"middle":P=Mf("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:P=Mf("calc(".concat(f.length-1," * -").concat(i,")"));break}var E=[];if(s){var S=f[0].width,{width:O}=u;E.push("scale(".concat(Ne(O)?O/S:1,")"))}return m&&E.push("rotate(".concat(m,", ").concat(b,", ").concat(j,")")),E.length&&(w.transform=E.join(" ")),C.createElement("text",yh({},_r(w),{ref:t,x:b,y:j,className:Qe("recharts-text",x),textAnchor:l,fill:d.includes("url")?n1:d}),f.map((k,M)=>{var A=k.words.join(y?"":" ");return C.createElement("tspan",{x:b,dy:M===0?P:i,key:"".concat(A,"-").concat(M)},A)}))});hu.displayName="Text";var RF=["labelRef"];function AF(e,t){if(e==null)return{};var r,n,i=IF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function IF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function i1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i1(Object(r),!0).forEach(function(n){NF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NF(e,t,r){return(t=DF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DF(e){var t=_F(e,"string");return typeof t=="symbol"?t:t+""}function _F(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cn.apply(null,arguments)}var uP=v.createContext(null),BF=e=>{var{x:t,y:r,width:n,height:i,children:a}=e,s=v.useMemo(()=>({x:t,y:r,width:n,height:i}),[t,r,n,i]);return C.createElement(uP.Provider,{value:s},a)},dP=()=>{var e=v.useContext(uP),t=Gc();return e||t},$F=v.createContext(null),LF=()=>{var e=v.useContext($F),t=Ae(tE);return e||t},zF=e=>{var{value:t,formatter:r}=e,n=Ft(e.children)?t:e.children;return typeof r=="function"?r(n):n},km=e=>e!=null&&typeof e=="function",FF=(e,t)=>{var r=Lt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},VF=(e,t,r,n,i)=>{var{offset:a,className:s}=e,{cx:l,cy:c,innerRadius:d,outerRadius:u,startAngle:f,endAngle:h,clockWise:g}=i,m=(d+u)/2,x=FF(f,h),y=x>=0?1:-1,w,b;switch(t){case"insideStart":w=f+y*a,b=g;break;case"insideEnd":w=h-y*a,b=!g;break;case"end":w=h+y*a,b=g;break;default:throw new Error("Unsupported position ".concat(t))}b=x<=0?b:!b;var j=jt(l,c,m,w),P=jt(l,c,m,w+(b?1:-1)*359),E="M".concat(j.x,",").concat(j.y,`
1108
1108
  A`).concat(m,",").concat(m,",0,1,").concat(b?0:1,`,
1109
- `).concat(P.x,",").concat(P.y),S=Ft(e.id)?Fa("recharts-radial-line-"):e.id;return C.createElement("text",Cn({},n,{dominantBaseline:"central",className:Qe("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:S,d:E})),C.createElement("textPath",{xlinkHref:"#".concat(S)},r))},HF=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:l,endAngle:c}=e,d=(l+c)/2;if(r==="outside"){var{x:u,y:f}=jt(n,i,s+t,d);return{x:u,y:f,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var h=(a+s)/2,{x:g,y:m}=jt(n,i,h,d);return{x:g,y:m,textAnchor:"middle",verticalAnchor:"middle"}},fP=e=>"cx"in e&&Ne(e.cx),WF=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!fP(r)&&(a=r);var{x:s,y:l,width:c,height:d}=t,u=d>=0?1:-1,f=u*n,h=u>0?"end":"start",g=u>0?"start":"end",m=c>=0?1:-1,x=m*n,y=m>0?"end":"start",w=m>0?"start":"end";if(i==="top"){var b={x:s+c/2,y:l-u*n,textAnchor:"middle",verticalAnchor:h};return bt(bt({},b),a?{height:Math.max(l-a.y,0),width:c}:{})}if(i==="bottom"){var j={x:s+c/2,y:l+d+f,textAnchor:"middle",verticalAnchor:g};return bt(bt({},j),a?{height:Math.max(a.y+a.height-(l+d),0),width:c}:{})}if(i==="left"){var P={x:s-x,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return bt(bt({},P),a?{width:Math.max(P.x-a.x,0),height:d}:{})}if(i==="right"){var E={x:s+c+x,y:l+d/2,textAnchor:w,verticalAnchor:"middle"};return bt(bt({},E),a?{width:Math.max(a.x+a.width-E.x,0),height:d}:{})}var S=a?{width:c,height:d}:{};return i==="insideLeft"?bt({x:s+x,y:l+d/2,textAnchor:w,verticalAnchor:"middle"},S):i==="insideRight"?bt({x:s+c-x,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},S):i==="insideTop"?bt({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:g},S):i==="insideBottom"?bt({x:s+c/2,y:l+d-f,textAnchor:"middle",verticalAnchor:h},S):i==="insideTopLeft"?bt({x:s+x,y:l+f,textAnchor:w,verticalAnchor:g},S):i==="insideTopRight"?bt({x:s+c-x,y:l+f,textAnchor:y,verticalAnchor:g},S):i==="insideBottomLeft"?bt({x:s+x,y:l+d-f,textAnchor:w,verticalAnchor:h},S):i==="insideBottomRight"?bt({x:s+c-x,y:l+d-f,textAnchor:y,verticalAnchor:h},S):i&&typeof i=="object"&&(Ne(i.x)||Mn(i.x))&&(Ne(i.y)||Mn(i.y))?bt({x:s+Zt(i.x,c),y:l+Zt(i.y,d),textAnchor:"end",verticalAnchor:"end"},S):bt({x:s+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},S)},UF={offset:5};function ti(e){var t=ir(e,UF),{viewBox:r,position:n,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:d}=t,u=LF(),f=dP(),h=n==="center"?f:u??f,g=r||h;if(!g||Ft(i)&&Ft(a)&&!v.isValidElement(s)&&typeof s!="function")return null;var m=bt(bt({},t),{},{viewBox:g});if(v.isValidElement(s)){var x=AF(m,RF);return v.cloneElement(s,x)}var y;if(typeof s=="function"){if(y=v.createElement(s,m),v.isValidElement(y))return y}else y=zF(t);var w=fP(g),b=_r(t);if(w&&(n==="insideStart"||n==="insideEnd"||n==="end"))return VF(t,n,y,b,g);var j=w?HF(g,t.offset,t.position):WF(t,g);return C.createElement(hu,Cn({ref:d,className:Qe("recharts-label",l)},b,j,{breakAll:c}),y)}ti.displayName="Label";var KF=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?C.createElement(ti,Cn({key:"label-implicit"},n)):pn(e)?C.createElement(ti,Cn({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===ti?v.cloneElement(e,bt({key:"label-implicit"},n)):C.createElement(ti,Cn({key:"label-implicit",content:e},n)):km(e)?C.createElement(ti,Cn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?C.createElement(ti,Cn({},e,{key:"label-implicit"},n)):null};function YF(e){var{label:t,labelRef:r}=e,n=dP();return KF(t,n,r)||null}var Rf={},Af={},o1;function qF(){return o1||(o1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Af)),Af}var If={},a1;function GF(){return a1||(a1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(If)),If}var s1;function XF(){return s1||(s1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qF(),r=GF(),n=sg();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Rf)),Rf}var Nf,l1;function ZF(){return l1||(l1=1,Nf=XF().last),Nf}var QF=ZF();const JF=wr(QF);var e9=["valueAccessor"],t9=["dataKey","clockWise","id","textBreakAll"];function mc(){return mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mc.apply(null,arguments)}function c1(e,t){if(e==null)return{};var r,n,i=r9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function r9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var n9=e=>Array.isArray(e.value)?JF(e.value):e.value,pP=v.createContext(void 0),i9=pP.Provider,hP=v.createContext(void 0),o9=hP.Provider;function a9(){return v.useContext(pP)}function s9(){return v.useContext(hP)}function Tl(e){var{valueAccessor:t=n9}=e,r=c1(e,e9),{dataKey:n,id:i,textBreakAll:a}=r,s=c1(r,t9),l=a9(),c=s9(),d=l||c;return!d||!d.length?null:C.createElement(ur,{className:"recharts-label-list"},d.map((u,f)=>{var h,g=Ft(n)?t(u,f):ht(u&&u.payload,n),m=Ft(i)?{}:{id:"".concat(i,"-").concat(f)};return C.createElement(ti,mc({key:"label-".concat(f)},_r(u),s,m,{fill:(h=r.fill)!==null&&h!==void 0?h:u.fill,parentViewBox:u.parentViewBox,value:g,textBreakAll:a,viewBox:u.viewBox,index:f}))}))}Tl.displayName="LabelList";function gP(e){var{label:t}=e;return t?t===!0?C.createElement(Tl,{key:"labelList-implicit"}):C.isValidElement(t)||km(t)?C.createElement(Tl,{key:"labelList-implicit",content:t}):typeof t=="object"?C.createElement(Tl,mc({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var mP=e=>e.graphicalItems.polarItems,l9=J([dt,xs],Jg),gu=J([mP,gt,l9],tm),c9=J([gu],rm),mu=J([c9,Fg],nm),u9=J([mu,gt,gu],om);J([mu,gt,gu],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,s=ht(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:ht(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var u1=()=>{},d9=J([mu,gt,gu,uu,dt],cm),f9=J([gt,sm,lm,u1,d9,u1,We,dt],um),vP=J([gt,We,mu,u9,ys,dt,f9],dm),p9=J([vP,gt,Fo],hm);J([gt,vP,p9,dt],mm);var h9={radiusAxis:{},angleAxis:{}},g9=Cr({name:"polarAxis",initialState:h9,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),m9=g9.reducer;function d1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function f1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d1(Object(r),!0).forEach(function(n){v9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v9(e,t,r){return(t=y9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y9(e){var t=x9(e,"string");return typeof t=="symbol"?t:t+""}function x9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b9=(e,t)=>t,Tm=J([mP,b9],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),w9=[],Mm=(e,t,r)=>r?.length===0?w9:r,yP=J([Fg,Tm,Mm],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>f1(f1({},t.presentationProps),a.props))),i!=null)return i}}),C9=J([yP,Tm,Mm],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,s=ht(n,t.nameKey,t.name),l;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?l=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?l=n.fill:l=t.fill,{value:Wc(s,t.dataKey),color:l,payload:n,type:t.legendType}})}),S9=J([yP,Tm,Mm,Rt],(e,t,r,n)=>{if(!(t==null||e==null))return C7({offset:n,pieSettings:t,displayedData:e,cells:r})}),p1=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",h1=null,Df=null,xP=e=>{if(e===h1&&Array.isArray(Df))return Df;var t=[];return v.Children.forEach(e,r=>{Ft(r)||(wl.isFragment(r)?t=t.concat(xP(r.props.children)):t.push(r))}),Df=t,h1=e,t};function Rm(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>p1(i)):n=[p1(t)],xP(e).forEach(i=>{var a=_i(i,"type.displayName")||_i(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var _f={},g1;function j9(){return g1||(g1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(_f)),_f}var Bf,m1;function E9(){return m1||(m1=1,Bf=j9().isPlainObject),Bf}var P9=E9();const O9=wr(P9);function v1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function y1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){k9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k9(e,t,r){return(t=T9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T9(e){var t=M9(e,"string");return typeof t=="symbol"?t:t+""}function M9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vc(){return vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vc.apply(null,arguments)}var x1=(e,t,r,n,i)=>{var a=r-n,s;return s="M ".concat(e,",").concat(t),s+="L ".concat(e+r,",").concat(t),s+="L ".concat(e+r-a/2,",").concat(t+i),s+="L ".concat(e+r-a/2-n,",").concat(t+i),s+="L ".concat(e,",").concat(t," Z"),s},R9={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},A9=e=>{var t=ir(e,R9),{x:r,y:n,upperWidth:i,lowerWidth:a,height:s,className:l}=t,{animationEasing:c,animationDuration:d,animationBegin:u,isUpdateAnimationActive:f}=t,h=v.useRef(null),[g,m]=v.useState(-1),x=v.useRef(i),y=v.useRef(a),w=v.useRef(s),b=v.useRef(r),j=v.useRef(n),P=Jc(e,"trapezoid-");if(v.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var H=h.current.getTotalLength();H&&m(H)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||s!==+s||i===0&&a===0||s===0)return null;var E=Qe("recharts-trapezoid",l);if(!f)return C.createElement("g",null,C.createElement("path",vc({},_r(t),{className:E,d:x1(r,n,i,a,s)})));var S=x.current,O=y.current,k=w.current,M=b.current,A=j.current,_="0px ".concat(g===-1?1:g,"px"),D="".concat(g,"px 0px"),B=Lj(["strokeDasharray"],d,c);return C.createElement(Qc,{animationId:P,key:P,canBegin:g>0,duration:d,easing:c,isActive:f,begin:u},H=>{var T=qt(S,i,H),N=qt(O,a,H),I=qt(k,s,H),R=qt(M,r,H),$=qt(A,n,H);h.current&&(x.current=T,y.current=N,w.current=I,b.current=R,j.current=$);var U=H>0?{transition:B,strokeDasharray:D}:{strokeDasharray:_};return C.createElement("path",vc({},_r(t),{className:E,d:x1(R,$,T,N,I),ref:h,style:y1(y1({},U),t.style)}))})},I9=["option","shapeType","propTransformer","activeClassName","isActive"];function N9(e,t){if(e==null)return{};var r,n,i=D9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function D9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function b1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(r),!0).forEach(function(n){_9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _9(e,t,r){return(t=B9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B9(e){var t=$9(e,"string");return typeof t=="symbol"?t:t+""}function $9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L9(e,t){return yc(yc({},t),e)}function z9(e,t){return e==="symbols"}function w1(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return C.createElement(Hj,r);case"trapezoid":return C.createElement(A9,r);case"sector":return C.createElement(Kj,r);case"symbols":if(z9(t))return C.createElement(ig,r);break;default:return null}}function F9(e){return v.isValidElement(e)?e.props:e}function bP(e){var{option:t,shapeType:r,propTransformer:n=L9,activeClassName:i="recharts-active-shape",isActive:a}=e,s=N9(e,I9),l;if(v.isValidElement(t))l=v.cloneElement(t,yc(yc({},s),F9(t)));else if(typeof t=="function")l=t(s);else if(O9(t)&&typeof t!="boolean"){var c=n(t,s);l=C.createElement(w1,{shapeType:r,elementProps:c})}else{var d=s;l=C.createElement(w1,{shapeType:r,elementProps:d})}return a?C.createElement(ur,{className:i},l):l}var Am=(e,t)=>{var r=ut();return(n,i)=>a=>{e?.(n,i,a),r(IE({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},Im=e=>{var t=ut();return(r,n)=>i=>{e?.(r,n,i),t(RL())}},Nm=(e,t)=>{var r=ut();return(n,i)=>a=>{e?.(n,i,a),r(AL({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function wP(e){var{fn:t,args:r}=e,n=ut(),i=Sr();return v.useLayoutEffect(()=>{if(!i){var a=t(r);return n(kL(a)),()=>{n(TL(a))}}},[t,r,n,i]),null}var CP=()=>{};function V9(e){var{legendPayload:t}=e,r=ut(),n=Sr();return v.useLayoutEffect(()=>n?CP:(r(Dj(t)),()=>{r(_j(t))}),[r,n,t]),null}function H9(e){var{legendPayload:t}=e,r=ut(),n=Ae(We);return v.useLayoutEffect(()=>n!=="centric"&&n!=="radial"?CP:(r(Dj(t)),()=>{r(_j(t))}),[r,n,t]),null}var $f,W9=()=>{var[e]=C.useState(()=>Fa("uid-"));return e},U9=($f=C.useId)!==null&&$f!==void 0?$f:W9;function K9(e,t){var r=U9();return t||(e?"".concat(e,"-").concat(r):r)}var Y9=v.createContext(void 0),SP=e=>{var{id:t,type:r,children:n}=e,i=K9("recharts-".concat(r),t);return C.createElement(Y9.Provider,{value:i},n(i))},q9={cartesianItems:[],polarItems:[]},jP=Cr({name:"graphicalItems",initialState:q9,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:er()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:er()},removeCartesianGraphicalItem:{reducer(e,t){var r=On(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:er()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:er()},removePolarGraphicalItem:{reducer(e,t){var r=On(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:er()}}}),{addCartesianGraphicalItem:G9,replaceCartesianGraphicalItem:X9,removeCartesianGraphicalItem:Z9,addPolarGraphicalItem:Q9,removePolarGraphicalItem:J9}=jP.actions,e7=jP.reducer;function t7(e){var t=ut(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(G9(e)):r.current!==e&&t(X9({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(Z9(r.current)),r.current=null)},[t]),null}function r7(e){var t=ut();return v.useLayoutEffect(()=>(t(Q9(e)),()=>{t(J9(e))}),[t,e]),null}var n7=["onMouseEnter","onClick","onMouseLeave"],i7=["id"],o7=["id"];function Dm(e,t){if(e==null)return{};var r,n,i=a7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function a7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function C1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(r),!0).forEach(function(n){s7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s7(e,t,r){return(t=l7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l7(e){var t=c7(e,"string");return typeof t=="symbol"?t:t+""}function c7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ci.apply(null,arguments)}function u7(e){var t=v.useMemo(()=>Rm(e.children,oi),[e.children]),r=Ae(n=>C9(n,e.id,t));return r==null?null:C.createElement(H9,{legendPayload:r})}function d7(e){var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:s,name:l,hide:c,tooltipType:d}=e;return{dataDefinedOnItem:n.map(u=>u.tooltipPayload),positions:n.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:s,dataKey:t,nameKey:r,name:Wc(l,t),hide:c,type:d,color:s,unit:""}}}var f7=(e,t)=>e>t?"start":e<t?"end":"middle",p7=(e,t,r)=>Zt(typeof t=="function"?t(e):t,r,r*.8),h7=(e,t,r)=>{var{top:n,left:i,width:a,height:s}=t,l=Sj(a,s),c=i+Zt(e.cx,a,a/2),d=n+Zt(e.cy,s,s/2),u=Zt(e.innerRadius,l,0),f=p7(r,e.outerRadius,l),h=e.maxRadius||Math.sqrt(a*a+s*s)/2;return{cx:c,cy:d,innerRadius:u,outerRadius:f,maxRadius:h}},g7=(e,t)=>{var r=Lt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function m7(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var v7=(e,t)=>{if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return e(t);var r=Qe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return C.createElement($j,ci({},t,{type:"linear",className:r}))},y7=(e,t,r)=>{if(C.isValidElement(e))return C.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),C.isValidElement(n)))return n;var i=Qe("recharts-pie-label-text",m7(e));return C.createElement(hu,ci({},t,{alignmentBaseline:"middle",className:i}),n)};function x7(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:s}=r;if(!n||!i||!t)return null;var l=Qr(r),c=za(i),d=za(a),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((h,g)=>{var m=(h.startAngle+h.endAngle)/2,x=jt(h.cx,h.cy,h.outerRadius+u,m),y=st(st(st(st({},l),h),{},{stroke:"none"},c),{},{index:g,textAnchor:f7(x.x,h.cx)},x),w=st(st(st(st({},l),h),{},{fill:"none",stroke:h.fill},d),{},{index:g,points:[jt(h.cx,h.cy,h.outerRadius,m),x],key:"line"});return C.createElement(ur,{key:"label-".concat(h.startAngle,"-").concat(h.endAngle,"-").concat(h.midAngle,"-").concat(g)},a&&v7(a,w),y7(i,y,ht(h,s)))});return C.createElement(ur,{className:"recharts-pie-labels"},f)}function b7(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?C.createElement(gP,{label:i}):C.createElement(x7,{sectors:t,props:r,showLabels:n})}function w7(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=Ae(Fi),{onMouseEnter:s,onClick:l,onMouseLeave:c}=i,d=Dm(i,n7),u=Am(s,i.dataKey),f=Im(c),h=Nm(l,i.dataKey);return t==null||t.length===0?null:C.createElement(C.Fragment,null,t.map((g,m)=>{if(g?.startAngle===0&&g?.endAngle===0&&t.length!==1)return null;var x=r&&String(m)===a,y=a?n:null,w=x?r:y,b=st(st({},g),{},{stroke:g.stroke,tabIndex:-1,[kj]:m,[Tj]:i.dataKey});return C.createElement(ur,ci({key:"sector-".concat(g?.startAngle,"-").concat(g?.endAngle,"-").concat(g.midAngle,"-").concat(m),tabIndex:-1,className:"recharts-pie-sector"},cs(d,g,m),{onMouseEnter:u(g,m),onMouseLeave:f(g,m),onClick:h(g,m)}),C.createElement(bP,ci({option:w,isActive:x,shapeType:"sector"},b)))}))}function C7(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:s,startAngle:l,endAngle:c,dataKey:d,nameKey:u,tooltipType:f}=r,h=Math.abs(r.minAngle),g=g7(l,c),m=Math.abs(g),x=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,y=n.filter(S=>ht(S,d,0)!==0).length,w=(m>=360?y:y-1)*x,b=m-y*h-w,j=n.reduce((S,O)=>{var k=ht(O,d,0);return S+(Ne(k)?k:0)},0),P;if(j>0){var E;P=n.map((S,O)=>{var k=ht(S,d,0),M=ht(S,u,O),A=h7(r,a,S),_=(Ne(k)?k:0)/j,D,B=st(st({},S),i&&i[O]&&i[O].props);O?D=E.endAngle+Lt(g)*x*(k!==0?1:0):D=l;var H=D+Lt(g)*((k!==0?h:0)+_*b),T=(D+H)/2,N=(A.innerRadius+A.outerRadius)/2,I=[{name:M,value:k,payload:B,dataKey:d,type:f}],R=jt(A.cx,A.cy,N,T);return E=st(st(st(st({},r.presentationProps),{},{percent:_,cornerRadius:s,name:M,tooltipPayload:I,midAngle:T,middleRadius:N,tooltipPosition:R},B),A),{},{value:k,startAngle:D,endAngle:H,payload:B,paddingAngle:Lt(g)*x}),E})}return P}function S7(e){var{showLabels:t,sectors:r,children:n}=e,i=v.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return C.createElement(o9,{value:t?i:void 0},n)}function j7(e){var{props:t,previousSectorsRef:r}=e,{sectors:n,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,activeShape:c,inactiveShape:d,onAnimationStart:u,onAnimationEnd:f}=t,h=Jc(t,"recharts-pie-"),g=r.current,[m,x]=v.useState(!1),y=v.useCallback(()=>{typeof f=="function"&&f(),x(!1)},[f]),w=v.useCallback(()=>{typeof u=="function"&&u(),x(!0)},[u]);return C.createElement(S7,{showLabels:!m,sectors:n},C.createElement(Qc,{animationId:h,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:w,onAnimationEnd:y,key:h},b=>{var j=[],P=n&&n[0],E=P?.startAngle;return n?.forEach((S,O)=>{var k=g&&g[O],M=O>0?_i(S,"paddingAngle",0):0;if(k){var A=qt(k.endAngle-k.startAngle,S.endAngle-S.startAngle,b),_=st(st({},S),{},{startAngle:E+M,endAngle:E+A+M});j.push(_),E=_.endAngle}else{var{endAngle:D,startAngle:B}=S,H=qt(0,D-B,b),T=st(st({},S),{},{startAngle:E+M,endAngle:E+H+M});j.push(T),E=T.endAngle}}),r.current=j,C.createElement(ur,null,C.createElement(w7,{sectors:j,activeShape:c,inactiveShape:d,allOtherPieProps:t}))}),C.createElement(b7,{showLabels:!m,sectors:n,props:t}),t.children)}var E7={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!Ui.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function P7(e){var{id:t}=e,r=Dm(e,i7),{hide:n,className:i,rootTabIndex:a}=e,s=v.useMemo(()=>Rm(e.children,oi),[e.children]),l=Ae(u=>S9(u,t,s)),c=v.useRef(null),d=Qe("recharts-pie",i);return n||l==null?(c.current=null,C.createElement(ur,{tabIndex:a,className:d})):C.createElement(C.Fragment,null,C.createElement(wP,{fn:d7,args:st(st({},e),{},{sectors:l})}),C.createElement(ur,{tabIndex:a,className:d},C.createElement(j7,{props:st(st({},r),{},{sectors:l}),previousSectorsRef:c})))}function EP(e){var t=ir(e,E7),{id:r}=t,n=Dm(t,o7),i=Qr(n);return C.createElement(SP,{id:r,type:"pie"},a=>C.createElement(C.Fragment,null,C.createElement(r7,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),C.createElement(u7,ci({},n,{id:a})),C.createElement(P7,ci({},n,{id:a}))))}EP.displayName="Pie";function S1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function j1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S1(Object(r),!0).forEach(function(n){O7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O7(e,t,r){return(t=k7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k7(e){var t=T7(e,"string");return typeof t=="symbol"?t:t+""}function T7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M7={xAxis:{},yAxis:{},zAxis:{}},PP=Cr({name:"cartesianAxis",initialState:M7,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:er()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:er()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:er()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:er()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:er()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:er()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a=i.widthHistory||[];if(a.length===3&&a[0]===a[2]&&n===a[1]&&n!==i.width&&Math.abs(n-a[0])<=1)return;var s=[...a,n].slice(-3);e.yAxis[r]=j1(j1({},e.yAxis[r]),{},{width:n,widthHistory:s})}}}}),{addXAxis:R7,removeXAxis:A7,addYAxis:I7,removeYAxis:N7,updateYAxisWidth:D7}=PP.actions,_7=PP.reducer,B7=J([Rt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),$7=J([B7,_n,Bn],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),OP=()=>Ae($7),L7=process.env.NODE_ENV==="production",Lf="Invariant failed";function E1(e,t){if(L7)throw new Error(Lf);var r=typeof t=="function"?t():t,n=r?"".concat(Lf,": ").concat(r):Lf;throw new Error(n)}var z7=["x","y"];function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xh.apply(null,arguments)}function P1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ya(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P1(Object(r),!0).forEach(function(n){F7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F7(e,t,r){return(t=V7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V7(e){var t=H7(e,"string");return typeof t=="symbol"?t:t+""}function H7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W7(e,t){if(e==null)return{};var r,n,i=U7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function U7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function K7(e,t){var{x:r,y:n}=e,i=W7(e,z7),a="".concat(r),s=parseInt(a,10),l="".concat(n),c=parseInt(l,10),d="".concat(t.height||i.height),u=parseInt(d,10),f="".concat(t.width||i.width),h=parseInt(f,10);return ya(ya(ya(ya(ya({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function _m(e){return C.createElement(bP,xh({shapeType:"rectangle",propTransformer:K7,activeClassName:"recharts-active-bar"},e))}var Y7=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(Ne(t))return t;var a=Ne(n)||Ft(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?E1(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):E1()),r)}},q7={},G7=Cr({name:"errorBars",initialState:q7,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),X7=G7.reducer,Z7=["children"];function Q7(e,t){if(e==null)return{};var r,n,i=J7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function J7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var eV={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},tV=v.createContext(eV);function rV(e){var{children:t}=e,r=Q7(e,Z7);return C.createElement(tV.Provider,{value:r},t)}function kP(e,t){var r,n,i=Ae(d=>Ln(d,e)),a=Ae(d=>zn(d,t)),s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:gr.allowDataOverflow,l=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:mr.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function nV(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=OP(),{needClipX:a,needClipY:s,needClip:l}=kP(t,r);if(!l)return null;var{x:c,y:d,width:u,height:f}=i;return C.createElement("clipPath",{id:"clipPath-".concat(n)},C.createElement("rect",{x:a?c:c-u/2,y:s?d:d-f/2,width:a?u:u*2,height:s?f:f*2}))}var iV=["onMouseEnter","onMouseLeave","onClick"],oV=["value","background","tooltipPosition"],aV=["id"],sV=["onMouseEnter","onClick","onMouseLeave"];function ui(){return ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ui.apply(null,arguments)}function O1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O1(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=cV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cV(e){var t=uV(e,"string");return typeof t=="symbol"?t:t+""}function uV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xc(e,t){if(e==null)return{};var r,n,i=dV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function dV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var fV=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Wc(r,t),payload:e}]};function pV(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:Wc(a,t),hide:s,type:e.tooltipType,color:e.fill,unit:l}}}function hV(e){var t=Ae(Fi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,d=xc(a,iV),u=Am(s,n),f=Im(l),h=Nm(c,n);if(!i||r==null)return null;var g=za(i);return C.createElement(C.Fragment,null,r.map((m,x)=>{var{background:y}=m,w=xc(m,oV);if(!y)return null;var b=u(m,x),j=f(m,x),P=h(m,x),E=tr(tr(tr(tr(tr({option:i,isActive:String(x)===t},w),{},{fill:"#eee"},y),g),cs(d,m,x)),{},{onMouseEnter:b,onMouseLeave:j,onClick:P,dataKey:n,index:x,className:"recharts-bar-background-rectangle"});return C.createElement(_m,ui({key:"background-bar-".concat(x)},E))}))}function gV(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var s={x:a.x,y:a.y,width:a.width,height:a.height};return tr(tr({},s),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:s,fill:a.fill})});return C.createElement(i9,{value:t?i:void 0},r)}function mV(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:s}=e,l=Ae(Fi),c=Ae(qE),d=r&&String(a)===l&&(c==null||s===c),u=d?r:t;return C.createElement(_m,ui({},n,{name:String(n.name)},i,{isActive:d,option:u,index:a,dataKey:s}))}function vV(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return C.createElement(_m,ui({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function yV(e){var{data:t,props:r}=e,n=Qr(r),i=xc(n,aV),{shape:a,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:d,onMouseLeave:u}=r,f=xc(r,sV),h=Am(c,s),g=Im(u),m=Nm(d,s);return t?C.createElement(C.Fragment,null,t.map((x,y)=>C.createElement(ur,ui({key:"rectangle-".concat(x?.x,"-").concat(x?.y,"-").concat(x?.value,"-").concat(y),className:"recharts-bar-rectangle"},cs(f,x,y),{onMouseEnter:h(x,y),onMouseLeave:g(x,y),onClick:m(x,y)}),l?C.createElement(mV,{shape:a,activeBar:l,baseProps:i,entry:x,index:y,dataKey:s}):C.createElement(vV,{shape:a,baseProps:i,entry:x,index:y,dataKey:s})))):null}function xV(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:d,onAnimationStart:u}=t,f=r.current,h=Jc(t,"recharts-bar-"),[g,m]=v.useState(!1),x=!g,y=v.useCallback(()=>{typeof d=="function"&&d(),m(!1)},[d]),w=v.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return C.createElement(gV,{showLabels:x,rects:n},C.createElement(Qc,{animationId:h,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:y,onAnimationStart:w,key:h},b=>{var j=b===1?n:n?.map((P,E)=>{var S=f&&f[E];if(S)return tr(tr({},P),{},{x:qt(S.x,P.x,b),y:qt(S.y,P.y,b),width:qt(S.width,P.width,b),height:qt(S.height,P.height,b)});if(i==="horizontal"){var O=qt(0,P.height,b);return tr(tr({},P),{},{y:P.y+P.height-O,height:O})}var k=qt(0,P.width,b);return tr(tr({},P),{},{width:k})});return b>0&&(r.current=j??null),j==null?null:C.createElement(ur,null,C.createElement(yV,{props:t,data:j}))}),C.createElement(gP,{label:t.label}),t.children)}function bV(e){var t=v.useRef(null);return C.createElement(xV,{previousRectanglesRef:t,props:e})}var TP=0,wV=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:ht(e,t)}};class CV extends v.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:s,needClip:l,background:c,id:d}=this.props;if(t||r==null)return null;var u=Qe("recharts-bar",i),f=d;return C.createElement(ur,{className:u,id:d},l&&C.createElement("defs",null,C.createElement(nV,{clipPathId:f,xAxisId:a,yAxisId:s})),C.createElement(ur,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(f,")"):void 0},C.createElement(hV,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),C.createElement(bV,this.props)))}}var SV={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!Ui.isSsr,legendType:"rect",minPointSize:TP,xAxisId:0,yAxisId:0};function jV(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:u}=e,{needClip:f}=kP(t,r),h=xg(),g=Sr(),m=Rm(e.children,oi),x=Ae(b=>QV(b,t,r,g,e.id,m));if(h!=="vertical"&&h!=="horizontal")return null;var y,w=x?.[0];return w==null||w.height==null||w.width==null?y=0:y=h==="vertical"?w.height/2:w.width/2,C.createElement(rV,{xAxisId:t,yAxisId:r,data:x,dataPointFormatter:wV,errorBarOffset:y},C.createElement(CV,ui({},e,{layout:h,needClip:f,data:x,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:u})))}function EV(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:d,stackedData:u,displayedData:f,offset:h,cells:g,parentViewBox:m}=e,x=t==="horizontal"?l:s,y=u?x.scale.domain():null,w=M6({numericAxis:x});return f.map((b,j)=>{var P,E,S,O,k,M;u?P=j6(u[j],y):(P=ht(b,r),Array.isArray(P)||(P=[w,P]));var A=Y7(n,TP)(P[1],j);if(t==="horizontal"){var _,[D,B]=[l.scale(P[0]),l.scale(P[1])];E=cx({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:b,index:j}),S=(_=B??D)!==null&&_!==void 0?_:void 0,O=i.size;var H=D-B;if(k=Br(H)?0:H,M={x:E,y:h.top,width:O,height:h.height},Math.abs(A)>0&&Math.abs(k)<Math.abs(A)){var T=Lt(k||A)*(Math.abs(A)-Math.abs(k));S-=T,k+=T}}else{var[N,I]=[s.scale(P[0]),s.scale(P[1])];if(E=N,S=cx({axis:l,ticks:d,bandSize:a,offset:i.offset,entry:b,index:j}),O=I-N,k=i.size,M={x:h.left,y:S,width:h.width,height:k},Math.abs(A)>0&&Math.abs(O)<Math.abs(A)){var R=Lt(O||A)*(Math.abs(A)-Math.abs(O));O+=R}}if(E==null||S==null||O==null||k==null)return null;var $=tr(tr({},b),{},{x:E,y:S,width:O,height:k,value:u?P:P[1],payload:b,background:M,tooltipPosition:{x:E+O/2,y:S+k/2},parentViewBox:m},g&&g[j]&&g[j].props);return $}).filter(Boolean)}function PV(e){var t=ir(e,SV),r=Sr();return C.createElement(SP,{id:t.id,type:"bar"},n=>C.createElement(C.Fragment,null,C.createElement(V9,{legendPayload:fV(t)}),C.createElement(wP,{fn:pV,args:t}),C.createElement(t7,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:T6(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),C.createElement(jV,ui({},t,{id:n}))))}var Ml=C.memo(PV);Ml.displayName="Bar";function k1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(r),!0).forEach(function(n){OV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OV(e,t,r){return(t=kV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kV(e){var t=TV(e,"string");return typeof t=="symbol"?t:t+""}function TV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MV=(e,t)=>t,RV=(e,t,r)=>r,AV=(e,t,r,n)=>n,IV=(e,t,r,n,i)=>i,Es=J([em,IV],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),NV=J([Es],e=>e?.maxBarSize),DV=(e,t,r,n,i,a)=>a,T1=(e,t,r)=>{var n=r??e;if(!Ft(n))return Zt(n,t,0)},_V=J([We,em,MV,RV,AV],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),BV=(e,t,r,n)=>{var i=We(e);return i==="horizontal"?ph(e,"yAxis",r,n):ph(e,"xAxis",t,n)},$V=(e,t,r)=>{var n=We(e);return n==="horizontal"?Ib(e,"xAxis",t):Ib(e,"yAxis",r)},LV=(e,t,r)=>{var n={},i=e.filter(au),a=e.filter(d=>d.stackId==null),s=i.reduce((d,u)=>(d[u.stackId]||(d[u.stackId]=[]),d[u.stackId].push(u),d),n),l=Object.entries(s).map(d=>{var[u,f]=d,h=f.map(m=>m.dataKey),g=T1(t,r,f[0].barSize);return{stackId:u,dataKeys:h,barSize:g}}),c=a.map(d=>{var u=[d.dataKey].filter(h=>h!=null),f=T1(t,r,d.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...l,...c]},zV=J([_V,j8,$V],LV),FV=(e,t,r,n,i)=>{var a,s,l=Es(e,t,r,n,i);if(l!=null){var c=We(e),d=q2(e),{maxBarSize:u}=l,f=Ft(u)?d:u,h,g;return c==="horizontal"?(h=Po(e,"xAxis",t,n),g=Eo(e,"xAxis",t,n)):(h=Po(e,"yAxis",r,n),g=Eo(e,"yAxis",r,n)),(a=(s=hg(h,g,!0))!==null&&s!==void 0?s:f)!==null&&a!==void 0?a:0}},MP=(e,t,r,n)=>{var i=We(e),a,s;return i==="horizontal"?(a=Po(e,"xAxis",t,n),s=Eo(e,"xAxis",t,n)):(a=Po(e,"yAxis",r,n),s=Eo(e,"yAxis",r,n)),hg(a,s)};function VV(e,t,r,n,i){var a=n.length;if(!(a<1)){var s=Zt(e,r,0,!0),l,c=[];if(Qt(n[0].barSize)){var d=!1,u=r/a,f=n.reduce((w,b)=>w+(b.barSize||0),0);f+=(a-1)*s,f>=r&&(f-=(a-1)*s,s=0),f>=r&&u>0&&(d=!0,u*=.9,f=a*u);var h=(r-f)/2>>0,g={offset:h-s,size:0};l=n.reduce((w,b)=>{var j,P={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:g.offset+g.size+s,size:d?u:(j=b.barSize)!==null&&j!==void 0?j:0}},E=[...w,P];return g=E[E.length-1].position,E},c)}else{var m=Zt(t,r,0,!0);r-2*m-(a-1)*s<=0&&(s=0);var x=(r-2*m-(a-1)*s)/a;x>1&&(x>>=0);var y=Qt(i)?Math.min(x,i):x;l=n.reduce((w,b,j)=>[...w,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:m+(x+s)*j+(x-y)/2,size:y}}],c)}return l}}var HV=(e,t,r,n,i,a,s)=>{var l=Ft(s)?t:s,c=VV(r,n,i!==a?i:a,e,l);return i!==a&&c!=null&&(c=c.map(d=>yl(yl({},d),{},{position:yl(yl({},d.position),{},{offset:d.position.offset-i/2})}))),c},WV=J([zV,q2,S8,G2,FV,MP,NV],HV),UV=(e,t,r,n)=>Po(e,"xAxis",t,n),KV=(e,t,r,n)=>Po(e,"yAxis",r,n),YV=(e,t,r,n)=>Eo(e,"xAxis",t,n),qV=(e,t,r,n)=>Eo(e,"yAxis",r,n),GV=J([WV,Es],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),XV=(e,t)=>{var r=Zg(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(s=>s.key===r)}}}},ZV=J([BV,Es],XV),QV=J([Rt,gg,UV,KV,YV,qV,GV,We,Vg,MP,ZV,Es,DV],(e,t,r,n,i,a,s,l,c,d,u,f,h)=>{var{chartData:g,dataStartIndex:m,dataEndIndex:x}=c;if(!(f==null||s==null||t==null||l!=="horizontal"&&l!=="vertical"||r==null||n==null||i==null||a==null||d==null)){var{data:y}=f,w;if(y!=null&&y.length>0?w=y:w=g?.slice(m,x+1),w!=null)return EV({layout:l,barSettings:f,pos:s,parentViewBox:t,bandSize:d,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:w,offset:e,cells:h})}}),RP=e=>{var{chartData:t}=e,r=ut(),n=Sr();return v.useEffect(()=>n?()=>{}:(r(Hb(t)),()=>{r(Hb(void 0))}),[t,r,n]),null},M1={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},JV=Cr({name:"brush",initialState:M1,reducers:{setBrushSettings(e,t){return t.payload==null?M1:t.payload}}}),eH=JV.reducer;function tH(e,t,r){return(t=rH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rH(e){var t=nH(e,"string");return typeof t=="symbol"?t:t+""}function nH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Bm{static create(t){return new Bm(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}tH(Bm,"EPS",1e-4);function iH(e){return(e%180+180)%180}var oH=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=iH(i),s=a*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},aH={dots:[],areas:[],lines:[]},sH=Cr({name:"referenceElements",initialState:aH,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=On(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=On(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=On(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),lH=sH.reducer,cH=v.createContext(void 0),uH=e=>{var{children:t}=e,[r]=v.useState("".concat(Fa("recharts"),"-clip")),n=OP();if(n==null)return null;var{x:i,y:a,width:s,height:l}=n;return C.createElement(cH.Provider,{value:r},C.createElement("defs",null,C.createElement("clipPath",{id:r},C.createElement("rect",{x:i,y:a,height:l,width:s}))),t)};function Oo(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function AP(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function dH(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return oH(n,r)}function fH(e,t,r){var n=r==="width",{x:i,y:a,width:s,height:l}=e;return t===1?{start:n?i:a,end:n?i+s:a+l}:{start:n?i+s:a+l,end:n?i:a}}function bc(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function pH(e,t){return AP(e,t+1)}function hH(e,t,r,n,i){for(var a=(n||[]).slice(),{start:s,end:l}=t,c=0,d=1,u=s,f=function(){var m=n?.[c];if(m===void 0)return{v:AP(n,d)};var x=c,y,w=()=>(y===void 0&&(y=r(m,x)),y),b=m.coordinate,j=c===0||bc(e,b,w,u,l);j||(c=0,u=s,d+=1),j&&(u=b+e*(w()/2+i),c+=d)},h;d<=a.length;)if(h=f(),h)return h.v;return[]}function R1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R1(Object(r),!0).forEach(function(n){gH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gH(e,t,r){return(t=mH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mH(e){var t=vH(e,"string");return typeof t=="symbol"?t:t+""}function vH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yH(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,{start:l}=t,{end:c}=t,d=function(h){var g=a[h],m,x=()=>(m===void 0&&(m=r(g,h)),m);if(h===s-1){var y=e*(g.coordinate+e*x()/2-c);a[h]=g=Gt(Gt({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else a[h]=g=Gt(Gt({},g),{},{tickCoord:g.coordinate});var w=bc(e,g.tickCoord,x,l,c);w&&(c=g.tickCoord-e*(x()/2+i),a[h]=Gt(Gt({},g),{},{isShow:!0}))},u=s-1;u>=0;u--)d(u);return a}function xH(e,t,r,n,i,a){var s=(n||[]).slice(),l=s.length,{start:c,end:d}=t;if(a){var u=n[l-1],f=r(u,l-1),h=e*(u.coordinate+e*f/2-d);s[l-1]=u=Gt(Gt({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var g=bc(e,u.tickCoord,()=>f,c,d);g&&(d=u.tickCoord-e*(f/2+i),s[l-1]=Gt(Gt({},u),{},{isShow:!0}))}for(var m=a?l-1:l,x=function(b){var j=s[b],P,E=()=>(P===void 0&&(P=r(j,b)),P);if(b===0){var S=e*(j.coordinate-e*E()/2-c);s[b]=j=Gt(Gt({},j),{},{tickCoord:S<0?j.coordinate-S*e:j.coordinate})}else s[b]=j=Gt(Gt({},j),{},{tickCoord:j.coordinate});var O=bc(e,j.tickCoord,E,c,d);O&&(c=j.tickCoord+e*(E()/2+i),s[b]=Gt(Gt({},j),{},{isShow:!0}))},y=0;y<m;y++)x(y);return s}function $m(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:d,unit:u,angle:f}=e;if(!i||!i.length||!n)return[];if(Ne(c)||Ui.isSsr){var h;return(h=pH(i,Ne(c)?c:0))!==null&&h!==void 0?h:[]}var g=[],m=l==="top"||l==="bottom"?"width":"height",x=u&&m==="width"?ja(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(j,P)=>{var E=typeof d=="function"?d(j.value,P):j.value;return m==="width"?dH(ja(E,{fontSize:t,letterSpacing:r}),x,f):ja(E,{fontSize:t,letterSpacing:r})[m]},w=i.length>=2?Lt(i[1].coordinate-i[0].coordinate):1,b=fH(a,w,m);return c==="equidistantPreserveStart"?hH(w,b,y,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=xH(w,b,y,i,s,c==="preserveStartEnd"):g=yH(w,b,y,i,s),g.filter(j=>j.isShow))}var bH=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,s=0;if(t){Array.from(t).forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>s&&(s=f.width)}});var l=r?r.getBoundingClientRect().width:0,c=i+a,d=s+c+l+(r?n:0);return Math.round(d)}return 0},wH=["axisLine","width","height","className","hide","ticks"],CH=["viewBox"],SH=["viewBox"];function bh(e,t){if(e==null)return{};var r,n,i=jH(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vi.apply(null,arguments)}function A1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(r),!0).forEach(function(n){EH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EH(e,t,r){return(t=PH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PH(e){var t=OH(e,"string");return typeof t=="symbol"?t:t+""}function OH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lm={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function kH(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var d=Ot(Ot(Ot({},c),Qr(l)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!s||a==="bottom"&&s);d=Ot(Ot({},d),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!s||a==="right"&&s);d=Ot(Ot({},d),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return C.createElement("line",Vi({},d,{className:Qe("recharts-cartesian-axis-line",_i(l,"className"))}))}function TH(e,t,r,n,i,a,s,l,c){var d,u,f,h,g,m,x=l?-1:1,y=e.tickSize||s,w=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":d=u=e.coordinate,h=r+ +!l*i,f=h-x*y,m=f-x*c,g=w;break;case"left":f=h=e.coordinate,u=t+ +!l*n,d=u-x*y,g=d-x*c,m=w;break;case"right":f=h=e.coordinate,u=t+ +l*n,d=u+x*y,g=d+x*c,m=w;break;default:d=u=e.coordinate,h=r+ +l*i,f=h+x*y,m=f+x*c,g=w;break}return{line:{x1:d,y1:f,x2:u,y2:h},tick:{x:g,y:m}}}function MH(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function RH(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function AH(e){var{option:t,tickProps:r,value:n}=e,i,a=Qe(r.className,"recharts-cartesian-axis-tick-value");if(C.isValidElement(t))i=C.cloneElement(t,Ot(Ot({},r),{},{className:a}));else if(typeof t=="function")i=t(Ot(Ot({},r),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Qe(s,t?.className)),i=C.createElement(hu,Vi({},r,{className:s}),n)}return i}function IH(e){var{ticks:t=[],tick:r,tickLine:n,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:c,orientation:d,mirror:u,x:f,y:h,width:g,height:m,tickSize:x,tickMargin:y,fontSize:w,letterSpacing:b,getTicksConfig:j,events:P}=e,E=$m(Ot(Ot({},j),{},{ticks:t}),w,b),S=MH(d,u),O=RH(d,u),k=Qr(j),M=za(r),A={};typeof n=="object"&&(A=n);var _=Ot(Ot({},k),{},{fill:"none"},A),D=E.map((B,H)=>{var{line:T,tick:N}=TH(B,f,h,g,m,d,x,u,y),I=Ot(Ot(Ot(Ot({textAnchor:S,verticalAnchor:O},k),{},{stroke:"none",fill:i},M),N),{},{index:H,payload:B,visibleTicksCount:E.length,tickFormatter:a,padding:l},c);return C.createElement(ur,Vi({className:"recharts-cartesian-axis-tick",key:"tick-".concat(B.value,"-").concat(B.coordinate,"-").concat(B.tickCoord)},cs(P,B,H)),n&&C.createElement("line",Vi({},_,T,{className:Qe("recharts-cartesian-axis-tick-line",_i(n,"className"))})),r&&C.createElement(AH,{option:r,tickProps:I,value:"".concat(typeof a=="function"?a(B.value,H):B.value).concat(s||"")}))});return D.length>0?C.createElement("g",{className:"recharts-cartesian-axis-ticks"},D):null}var NH=v.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:s,ticks:l}=e,c=bh(e,wH),[d,u]=v.useState(""),[f,h]=v.useState(""),g=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var x;return bH({ticks:g.current,label:(x=e.labelRef)===null||x===void 0?void 0:x.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=v.useCallback(x=>{if(x){var y=x.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=y;var w=y[0];if(w){var b=window.getComputedStyle(w),j=b.fontSize,P=b.letterSpacing;(j!==d||P!==f)&&(u(j),h(P))}}},[d,f]);return s||n!=null&&n<=0||i!=null&&i<=0?null:C.createElement(ur,{className:Qe("recharts-cartesian-axis",a),ref:m},C.createElement(kH,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Qr(e)}),C.createElement(IH,{ticks:l,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:d,letterSpacing:f,getTicksConfig:e,events:c}),C.createElement(BF,{x:e.x,y:e.y,width:e.width,height:e.height},C.createElement(YF,{label:e.label,labelRef:e.labelRef}),e.children))}),DH=C.memo(NH,(e,t)=>{var{viewBox:r}=e,n=bh(e,CH),{viewBox:i}=t,a=bh(t,SH);return Oo(r,i)&&Oo(n,a)}),zm=C.forwardRef((e,t)=>{var r=ir(e,Lm);return C.createElement(DH,Vi({},r,{ref:t}))});zm.displayName="CartesianAxis";var _H=["x1","y1","x2","y2","key"],BH=["offset"],$H=["xAxisId","yAxisId"],LH=["xAxisId","yAxisId"];function I1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(r),!0).forEach(function(n){zH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zH(e,t,r){return(t=FH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FH(e){var t=VH(e,"string");return typeof t=="symbol"?t:t+""}function VH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ki.apply(null,arguments)}function wc(e,t){if(e==null)return{};var r,n,i=HH(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function HH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var WH=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:s,ry:l}=e;return C.createElement("rect",{x:n,y:i,ry:l,width:a,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function IP(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var{x1:n,y1:i,x2:a,y2:s,key:l}=t,c=wc(t,_H),d=Qr(c),u=wc(d,BH);r=C.createElement("line",ki({},u,{x1:n,y1:i,x2:a,y2:s,fill:"none",key:l}))}return r}function UH(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var a=wc(e,$H),s=i.map((l,c)=>{var d=Xt(Xt({},a),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return IP(n,d)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function KH(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var a=wc(e,LH),s=i.map((l,c)=>{var d=Xt(Xt({},a),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return IP(n,d)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function YH(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length)return null;var d=l.map(f=>Math.round(f+i-i)).sort((f,h)=>f-h);i!==d[0]&&d.unshift(0);var u=d.map((f,h)=>{var g=!d[h+1],m=g?i+s-f:d[h+1]-f;if(m<=0)return null;var x=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:f,x:n,height:m,width:a,stroke:"none",fill:t[x],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function qH(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:s,height:l,verticalPoints:c}=e;if(!t||!r||!r.length)return null;var d=c.map(f=>Math.round(f+i-i)).sort((f,h)=>f-h);i!==d[0]&&d.unshift(0);var u=d.map((f,h)=>{var g=!d[h+1],m=g?i+s-f:d[h+1]-f;if(m<=0)return null;var x=h%r.length;return C.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:m,height:l,stroke:"none",fill:r[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var GH=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return Ej($m(Xt(Xt(Xt({},Lm),r),{},{ticks:Pj(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},XH=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return Ej($m(Xt(Xt(Xt({},Lm),r),{},{ticks:Pj(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},ZH={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Rl(e){var t=vg(),r=yg(),n=Ij(),i=Xt(Xt({},ir(e,ZH)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:d,height:u,syncWithTicks:f,horizontalValues:h,verticalValues:g}=i,m=Sr(),x=Ae(M=>Nb(M,"xAxis",a,m)),y=Ae(M=>Nb(M,"yAxis",s,m));if(!Ne(d)||d<=0||!Ne(u)||u<=0||!Ne(l)||l!==+l||!Ne(c)||c!==+c)return null;var w=i.verticalCoordinatesGenerator||GH,b=i.horizontalCoordinatesGenerator||XH,{horizontalPoints:j,verticalPoints:P}=i;if((!j||!j.length)&&typeof b=="function"){var E=h&&h.length,S=b({yAxis:y?Xt(Xt({},y),{},{ticks:E?h:y.ticks}):void 0,width:t,height:r,offset:n},E?!0:f);rc(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(j=S)}if((!P||!P.length)&&typeof w=="function"){var O=g&&g.length,k=w({xAxis:x?Xt(Xt({},x),{},{ticks:O?g:x.ticks}):void 0,width:t,height:r,offset:n},O?!0:f);rc(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(P=k)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(WH,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),C.createElement(YH,ki({},i,{horizontalPoints:j})),C.createElement(qH,ki({},i,{verticalPoints:P})),C.createElement(UH,ki({},i,{offset:n,horizontalPoints:j,xAxis:x,yAxis:y})),C.createElement(KH,ki({},i,{offset:n,verticalPoints:P,xAxis:x,yAxis:y})))}Rl.displayName="CartesianGrid";var QH=["dangerouslySetInnerHTML","ticks"],JH=["id"],eW=["domain"],tW=["domain"];function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wh.apply(null,arguments)}function Cc(e,t){if(e==null)return{};var r,n,i=rW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function nW(e){var t=ut();return v.useLayoutEffect(()=>(t(R7(e)),()=>{t(A7(e))}),[e,t]),null}var iW=e=>{var{xAxisId:t,className:r}=e,n=Ae(gg),i=Sr(),a="xAxis",s=Ae(g=>Vo(g,a,t,i)),l=Ae(g=>OE(g,a,t,i)),c=Ae(g=>SE(g,t)),d=Ae(g=>yL(g,t)),u=Ae(g=>iE(g,t));if(c==null||d==null||u==null)return null;var f=Cc(e,QH),h=Cc(u,JH);return C.createElement(zm,wh({},f,h,{scale:s,x:d.x,y:d.y,width:c.width,height:c.height,className:Qe("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:l}))},oW={allowDataOverflow:gr.allowDataOverflow,allowDecimals:gr.allowDecimals,allowDuplicatedCategory:gr.allowDuplicatedCategory,height:gr.height,hide:!1,mirror:gr.mirror,orientation:gr.orientation,padding:gr.padding,reversed:gr.reversed,scale:gr.scale,tickCount:gr.tickCount,type:gr.type,xAxisId:0},aW=e=>{var t,r,n,i,a,s=ir(e,oW);return C.createElement(C.Fragment,null,C.createElement(nW,{interval:(t=s.interval)!==null&&t!==void 0?t:"preserveEnd",id:s.xAxisId,scale:s.scale,type:s.type,padding:s.padding,allowDataOverflow:s.allowDataOverflow,domain:s.domain,dataKey:s.dataKey,allowDuplicatedCategory:s.allowDuplicatedCategory,allowDecimals:s.allowDecimals,tickCount:s.tickCount,includeHidden:(r=s.includeHidden)!==null&&r!==void 0?r:!1,reversed:s.reversed,ticks:s.ticks,height:s.height,orientation:s.orientation,mirror:s.mirror,hide:s.hide,unit:s.unit,name:s.name,angle:(n=s.angle)!==null&&n!==void 0?n:0,minTickGap:(i=s.minTickGap)!==null&&i!==void 0?i:5,tick:(a=s.tick)!==null&&a!==void 0?a:!0,tickFormatter:s.tickFormatter}),C.createElement(iW,s))},sW=(e,t)=>{var{domain:r}=e,n=Cc(e,eW),{domain:i}=t,a=Cc(t,tW);return Oo(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Oo({domain:r},{domain:i}):!1},Al=C.memo(aW,sW);Al.displayName="XAxis";var lW=["dangerouslySetInnerHTML","ticks"],cW=["id"],uW=["domain"],dW=["domain"];function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ch.apply(null,arguments)}function Sc(e,t){if(e==null)return{};var r,n,i=fW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function pW(e){var t=ut();return v.useLayoutEffect(()=>(t(I7(e)),()=>{t(N7(e))}),[e,t]),null}var hW=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=v.useRef(null),s=v.useRef(null),l=Ae(gg),c=Sr(),d=ut(),u="yAxis",f=Ae(b=>Vo(b,u,t,c)),h=Ae(b=>jE(b,t)),g=Ae(b=>bL(b,t)),m=Ae(b=>OE(b,u,t,c)),x=Ae(b=>oE(b,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!h||km(i)||v.isValidElement(i)||x==null)){var b=a.current;if(b){var j=b.getCalculatedWidth();Math.round(h.width)!==Math.round(j)&&d(D7({id:t,width:j}))}}},[m,h,d,i,t,n,x]),h==null||g==null||x==null)return null;var y=Sc(e,lW),w=Sc(x,cW);return C.createElement(zm,Ch({},y,w,{ref:a,labelRef:s,scale:f,x:g.x,y:g.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:h.width,height:h.height,className:Qe("recharts-".concat(u," ").concat(u),r),viewBox:l,ticks:m}))},gW={allowDataOverflow:mr.allowDataOverflow,allowDecimals:mr.allowDecimals,allowDuplicatedCategory:mr.allowDuplicatedCategory,hide:!1,mirror:mr.mirror,orientation:mr.orientation,padding:mr.padding,reversed:mr.reversed,scale:mr.scale,tickCount:mr.tickCount,type:mr.type,width:mr.width,yAxisId:0},mW=e=>{var t,r,n,i,a,s=ir(e,gW);return C.createElement(C.Fragment,null,C.createElement(pW,{interval:(t=s.interval)!==null&&t!==void 0?t:"preserveEnd",id:s.yAxisId,scale:s.scale,type:s.type,domain:s.domain,allowDataOverflow:s.allowDataOverflow,dataKey:s.dataKey,allowDuplicatedCategory:s.allowDuplicatedCategory,allowDecimals:s.allowDecimals,tickCount:s.tickCount,padding:s.padding,includeHidden:(r=s.includeHidden)!==null&&r!==void 0?r:!1,reversed:s.reversed,ticks:s.ticks,width:s.width,orientation:s.orientation,mirror:s.mirror,hide:s.hide,unit:s.unit,name:s.name,angle:(n=s.angle)!==null&&n!==void 0?n:0,minTickGap:(i=s.minTickGap)!==null&&i!==void 0?i:5,tick:(a=s.tick)!==null&&a!==void 0?a:!0,tickFormatter:s.tickFormatter}),C.createElement(hW,s))},vW=(e,t)=>{var{domain:r}=e,n=Sc(e,uW),{domain:i}=t,a=Sc(t,dW);return Oo(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Oo({domain:r},{domain:i}):!1},Il=C.memo(mW,vW);Il.displayName="YAxis";function yW(e){e()}function xW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yW(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var N1={notify(){},get:()=>[]};function bW(e,t){let r,n=N1,i=0,a=!1;function s(x){u();const y=n.subscribe(x);let w=!1;return()=>{w||(w=!0,y(),f())}}function l(){n.notify()}function c(){m.onStateChange&&m.onStateChange()}function d(){return a}function u(){i++,r||(r=e.subscribe(c),n=xW())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=N1)}function h(){a||(a=!0,u())}function g(){a&&(a=!1,f())}const m={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:h,tryUnsubscribe:g,getListeners:()=>n};return m}var wW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CW=wW(),SW=()=>typeof navigator<"u"&&navigator.product==="ReactNative",jW=SW(),EW=()=>CW||jW?C.useLayoutEffect:C.useEffect,PW=EW(),OW=Symbol.for("react-redux-context"),kW=typeof globalThis<"u"?globalThis:{};function TW(){if(!C.createContext)return{};const e=kW[OW]??=new Map;let t=e.get(C.createContext);return t||(t=C.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(C.createContext,t)),t}var MW=TW();function RW(e){const{children:t,context:r,serverState:n,store:i}=e,a=C.useMemo(()=>{const c=bW(i),d={store:i,subscription:c,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return d;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(d,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),s=C.useMemo(()=>i.getState(),[i]);PW(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=r||MW;return C.createElement(l.Provider,{value:a},t)}var AW=RW,IW=(e,t)=>t,Fm=J([IW,We,tE,It,WE,Fn,jz,Rt],Tz),Vm=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},NP=$r("mouseClick"),DP=ps();DP.startListening({actionCreator:NP,effect:(e,t)=>{var r=e.payload,n=Fm(t.getState(),Vm(r));n?.activeIndex!=null&&t.dispatch(IL({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Sh=$r("mouseMove"),_P=ps();_P.startListening({actionCreator:Sh,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=xm(n,n.tooltip.settings.shared),a=Fm(n,Vm(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(DE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(NE()))}});var D1={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},BP=Cr({name:"rootProps",initialState:D1,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:D1.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),NW=BP.reducer,{updateOptions:DW}=BP.actions,$P=Cr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:_W}=$P.actions,BW=$P.reducer,LP=$r("keyDown"),zP=$r("focus"),Hm=ps();Hm.startListening({actionCreator:LP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var s=Number(bm(i,Wo(r))),l=Fn(r);if(a==="Enter"){var c=gc(r,"axis","hover",String(i.index));t.dispatch(gh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:c}));return}var d=jL(r),u=d==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,h=s+f*u;if(!(l==null||h>=l.length||h<0)){var g=gc(r,"axis","hover",String(h));t.dispatch(gh({active:!0,activeIndex:h.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}});Hm.startListening({actionCreator:zP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",s=gc(r,"axis","hover",String(a));t.dispatch(gh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:s}))}}}});var Ar=$r("externalEvent"),FP=ps();FP.startListening({actionCreator:Ar,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:gz(r),activeDataKey:qE(r),activeIndex:Fi(r),activeLabel:YE(r),activeTooltipIndex:Fi(r),isTooltipActive:mz(r)};e.payload.handler(n,e.payload.reactEvent)}}});var $W=J([Ho],e=>e.tooltipItemPayloads),LW=J([$W,Ss,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(l=>l.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var s=t(a,r);return s}}}),VP=$r("touchMove"),HP=ps();HP.startListening({actionCreator:VP,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=xm(n,n.tooltip.settings.shared);if(i==="axis"){var a=Fm(n,Vm({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(DE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var s,l=r.touches[0],c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var d=c.getAttribute(kj),u=(s=c.getAttribute(Tj))!==null&&s!==void 0?s:void 0,f=LW(t.getState(),d,u);t.dispatch(IE({activeDataKey:u,activeIndex:d,activeCoordinate:f}))}}});var zW=qS({brush:eH,cartesianAxis:_7,chartData:Uz,errorBars:X7,graphicalItems:e7,layout:l6,legend:g3,options:zz,polarAxis:m9,polarOptions:BW,referenceElements:lH,rootProps:NW,tooltip:NL}),FW=function(t){return IB({reducer:zW,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([DP.middleware,_P.middleware,Hm.middleware,FP.middleware,HP.middleware]),enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(uj({type:"raf"}))},devTools:Ui.devToolsEnabled})};function WP(e){var{preloadedState:t,children:r}=e,n=Sr(),i=v.useRef(null);if(n)return r;i.current==null&&(i.current=FW(t));var a=lg;return C.createElement(AW,{context:a,store:i.current},r)}function UP(e){var{layout:t,margin:r}=e,n=ut(),i=Sr();return v.useEffect(()=>{i||(n(o6(t)),n(i6(r)))},[n,i,t,r]),null}function KP(e){var t=ut();return v.useEffect(()=>{t(DW(e))},[t,e]),null}var VW=["children"];function HW(e,t){if(e==null)return{};var r,n,i=WW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jc.apply(null,arguments)}var UW={width:"100%",height:"100%",display:"block"},KW=v.forwardRef((e,t)=>{var r=vg(),n=yg(),i=Bj();if(!Co(r)||!Co(n))return null;var{children:a,otherAttributes:s,title:l,desc:c}=e,d,u;return typeof s.tabIndex=="number"?d=s.tabIndex:d=i?0:void 0,typeof s.role=="string"?u=s.role:u=i?"application":void 0,C.createElement(Zh,jc({},s,{title:l,desc:c,role:u,tabIndex:d,width:r,height:n,style:UW,ref:t}),a)}),YW=e=>{var{children:t}=e,r=Ae(qc);if(!r)return null;var{width:n,height:i,y:a,x:s}=r;return C.createElement(Zh,{width:n,height:i,x:s,y:a},t)},_1=v.forwardRef((e,t)=>{var{children:r}=e,n=HW(e,VW),i=Sr();return i?C.createElement(YW,null,r):C.createElement(KW,jc({ref:t},n),r)});function qW(){var e=ut(),[t,r]=v.useState(null),n=Ae(B6);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Qt(a)&&a!==n&&e(s6(a))}},[t,e,n]),r}function B1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B1(Object(r),!0).forEach(function(n){XW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XW(e,t,r){return(t=ZW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=QW(e,"string");return typeof t=="symbol"?t:t+""}function QW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hi.apply(null,arguments)}var JW=()=>(eF(),null);function Ec(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var eU=v.forwardRef((e,t)=>{var r,n,i=v.useRef(null),[a,s]=v.useState({containerWidth:Ec((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Ec((n=e.style)===null||n===void 0?void 0:n.height)}),l=v.useCallback((d,u)=>{s(f=>{var h=Math.round(d),g=Math.round(u);return f.containerWidth===h&&f.containerHeight===g?f:{containerWidth:h,containerHeight:g}})},[]),c=v.useCallback(d=>{if(typeof t=="function"&&t(d),d!=null){var{width:u,height:f}=d.getBoundingClientRect();l(u,f);var h=m=>{var{width:x,height:y}=m[0].contentRect;l(x,y)},g=new ResizeObserver(h);g.observe(d),i.current=g}},[t,l]);return v.useEffect(()=>()=>{var d=i.current;d?.disconnect()},[l]),C.createElement(C.Fragment,null,C.createElement(Xc,{width:a.containerWidth,height:a.containerHeight}),C.createElement("div",Hi({ref:c},e)))}),tU=v.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=v.useState({containerWidth:Ec(r),containerHeight:Ec(n)}),s=v.useCallback((c,d)=>{a(u=>{var f=Math.round(c),h=Math.round(d);return u.containerWidth===f&&u.containerHeight===h?u:{containerWidth:f,containerHeight:h}})},[]),l=v.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:u}=c.getBoundingClientRect();s(d,u)}},[t,s]);return C.createElement(C.Fragment,null,C.createElement(Xc,{width:i.containerWidth,height:i.containerHeight}),C.createElement("div",Hi({ref:l},e)))}),rU=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return C.createElement(C.Fragment,null,C.createElement(Xc,{width:r,height:n}),C.createElement("div",Hi({ref:t},e)))}),nU=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return Mn(r)||Mn(n)?C.createElement(tU,Hi({},e,{ref:t})):C.createElement(rU,Hi({},e,{ref:t}))});function iU(e){return e===!0?eU:nU}var oU=v.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:s,onDoubleClick:l,onMouseDown:c,onMouseEnter:d,onMouseLeave:u,onMouseMove:f,onMouseUp:h,onTouchEnd:g,onTouchMove:m,onTouchStart:x,style:y,width:w,responsive:b,dispatchTouchEvents:j=!0}=e,P=v.useRef(null),E=ut(),[S,O]=v.useState(null),[k,M]=v.useState(null),A=qW(),_=mg(),D=_?.width>0?_.width:w,B=_?.height>0?_.height:i,H=v.useCallback(Z=>{A(Z),typeof t=="function"&&t(Z),O(Z),M(Z),Z!=null&&(P.current=Z)},[A,t,O,M]),T=v.useCallback(Z=>{E(NP(Z)),E(Ar({handler:a,reactEvent:Z}))},[E,a]),N=v.useCallback(Z=>{E(Sh(Z)),E(Ar({handler:d,reactEvent:Z}))},[E,d]),I=v.useCallback(Z=>{E(NE()),E(Ar({handler:u,reactEvent:Z}))},[E,u]),R=v.useCallback(Z=>{E(Sh(Z)),E(Ar({handler:f,reactEvent:Z}))},[E,f]),$=v.useCallback(()=>{E(zP())},[E]),U=v.useCallback(Z=>{E(LP(Z.key))},[E]),V=v.useCallback(Z=>{E(Ar({handler:s,reactEvent:Z}))},[E,s]),F=v.useCallback(Z=>{E(Ar({handler:l,reactEvent:Z}))},[E,l]),q=v.useCallback(Z=>{E(Ar({handler:c,reactEvent:Z}))},[E,c]),ie=v.useCallback(Z=>{E(Ar({handler:h,reactEvent:Z}))},[E,h]),ue=v.useCallback(Z=>{E(Ar({handler:x,reactEvent:Z}))},[E,x]),ge=v.useCallback(Z=>{j&&E(VP(Z)),E(Ar({handler:m,reactEvent:Z}))},[E,j,m]),Ee=v.useCallback(Z=>{E(Ar({handler:g,reactEvent:Z}))},[E,g]),Pe=iU(b);return C.createElement(eP.Provider,{value:S},C.createElement(dS.Provider,{value:k},C.createElement(Pe,{width:D??y?.width,height:B??y?.height,className:Qe("recharts-wrapper",n),style:GW({position:"relative",cursor:"default",width:D,height:B},y),onClick:T,onContextMenu:V,onDoubleClick:F,onFocus:$,onKeyDown:U,onMouseDown:q,onMouseEnter:N,onMouseLeave:I,onMouseMove:R,onMouseUp:ie,onTouchEnd:Ee,onTouchMove:ge,onTouchStart:ue,ref:H},C.createElement(JW,null),r)))}),aU=["width","height","responsive","children","className","style","compact","title","desc"];function sU(e,t){if(e==null)return{};var r,n,i=lU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var YP=v.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:s,style:l,compact:c,title:d,desc:u}=e,f=sU(e,aU),h=Qr(f);return c?C.createElement(C.Fragment,null,C.createElement(Xc,{width:r,height:n}),C.createElement(_1,{otherAttributes:h,title:d,desc:u},a)):C.createElement(oU,{className:s,style:l,width:r,height:n,responsive:i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},C.createElement(_1,{otherAttributes:h,title:d,desc:u,ref:t},C.createElement(uH,null,a)))});function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jh.apply(null,arguments)}var cU={top:5,right:5,bottom:5,left:5},uU={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:cU,reverseStackOrder:!1,syncMethod:"index",responsive:!1},dU=v.forwardRef(function(t,r){var n,i=ir(t.categoricalChartProps,uU),{chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,u={chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return C.createElement(WP,{preloadedState:{options:u},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:a},C.createElement(RP,{chartData:d.data}),C.createElement(UP,{layout:i.layout,margin:i.margin}),C.createElement(KP,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),C.createElement(YP,jh({},i,{ref:r})))}),fU=["axis","item"],zf=v.forwardRef((e,t)=>C.createElement(dU,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:fU,tooltipPayloadSearcher:tP,categoricalChartProps:e,ref:t}));function pU(e){var t=ut();return v.useEffect(()=>{t(_W(e))},[t,e]),null}var hU=["layout"];function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eh.apply(null,arguments)}function gU(e,t){if(e==null)return{};var r,n,i=mU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var vU={top:5,right:5,bottom:5,left:5},yU={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:vU,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},xU=v.forwardRef(function(t,r){var n,i=ir(t.categoricalChartProps,yU),{layout:a}=i,s=gU(i,hU),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u}=t,f={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return C.createElement(WP,{preloadedState:{options:f},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:l},C.createElement(RP,{chartData:i.data}),C.createElement(UP,{layout:a,margin:i.margin}),C.createElement(KP,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),C.createElement(pU,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),C.createElement(YP,Eh({},s,{ref:r})))}),bU=["item"],wU={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},CU=v.forwardRef((e,t)=>{var r=ir(e,wU);return C.createElement(xU,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:bU,tooltipPayloadSearcher:tP,categoricalChartProps:r,ref:t})});const Zn=["#4285F4","#34A853","#FBBC05","#EA4335","#9C27B0","#00ACC1","#8D6E63"],$1="28%",SU=({sysCd:e,appItCd:t,appCd:r})=>{const{getFormData:n}=ct.useSearchBox(),i=it.useCodeStore(),a=it.useSystemStore(),[s,l]=v.useState(""),[c,d]=v.useState(null),[u,f]=v.useState(!1),[h,g]=v.useState(!1),[m,x]=v.useState(!1),[y,w]=v.useState(!1),[b,j]=v.useState(null),[P,E]=v.useState([]),[S,O]=v.useState(null),[k,M]=v.useState(!1),[A,_]=v.useState({}),[D,B]=v.useState(!1),[H,T]=v.useState({}),N=v.useRef(null),I=v.useRef(null);v.useRef(null);const R=v.useRef(null),$=v.useRef(null),U=v.useRef(null),V=v.useRef({}),F=v.useMemo(()=>async K=>{const ee=K.target.value?.trim();h||!ee||(U.current&&clearTimeout(U.current),U.current=setTimeout(async()=>{M(!0),B(!1);try{const Q=R.current?.getFieldValue("sysCd"),de=R.current?.getFieldValue("appItCd"),ce=R.current?.getFieldValue("appCd");if(!Q||!de||!ce){M(!1);return}await se.SCMCODE00104({crprCd:R.current?.getFieldValue("crprCd")||"100",sysCd:Q,appItCd:de,appCd:ce,grpCd:ee})?(R.current?.setFields([{name:"grpCd",errors:["이미 사용중인 그룹코드입니다."]}]),p.message.error("이미 사용중인 그룹코드입니다."),B(!1)):(R.current?.setFields([{name:"grpCd",errors:[]}]),p.message.success("사용 가능한 그룹코드입니다."),B(!0))}catch(Q){console.error("그룹코드 중복 체크 실패:",Q),p.message.error("중복 체크 중 오류가 발생했습니다."),B(!1)}finally{M(!1)}},200))},[h]),q=v.useMemo(()=>async(K,ee)=>{const Q=K.target.value?.trim();if(y){const de=Q;if(!de)return;V.current[-1]&&clearTimeout(V.current[-1]),V.current[-1]=setTimeout(async()=>{_(ce=>({...ce,[-1]:!0})),T(ce=>{const ye={...ce};return delete ye[-1],ye});try{await se.SCMCODE00105({crprCd:$.current?.getFieldValue("crprCd")||"100",sysCd:$.current?.getFieldValue("sysCd")||"",appItCd:$.current?.getFieldValue("appItCd")||b?.appItCd||"CM",appCd:$.current?.getFieldValue("appCd")||b?.appCd||"CM",grpCd:$.current?.getFieldValue("grpCd")||"",dtlCd:de})?($.current?.setFields([{name:"dtlCd",errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),T(ye=>{const be={...ye};return delete be[-1],be})):($.current?.setFields([{name:"dtlCd",errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),T(ye=>({...ye,[-1]:!0})))}catch(ce){console.error("상세코드 중복 체크 실패:",ce),p.message.error("중복 체크 중 오류가 발생했습니다."),T(ye=>{const be={...ye};return delete be[-1],be})}finally{_(ce=>({...ce,[-1]:!1}))}},200);return}!Q||!b||(V.current[ee]&&clearTimeout(V.current[ee]),V.current[ee]=setTimeout(async()=>{_(de=>({...de,[ee]:!0})),T(de=>{const ce={...de};return delete ce[ee],ce});try{if(($.current?.getFieldValue("details")||[]).some((be,Ie)=>Ie!==ee&&be.dtlCd?.trim()===Q)){$.current?.setFields([{name:["details",ee,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("같은 상세코드가 이미 입력되었습니다."),T(be=>{const Ie={...be};return delete Ie[ee],Ie}),_(be=>({...be,[ee]:!1}));return}await se.SCMCODE00105({crprCd:b.crprCd||"100",sysCd:b.sysCd||"",appItCd:b.appItCd||"CM",appCd:b.appCd||"CM",grpCd:b.grpCd||"",dtlCd:Q})?($.current?.setFields([{name:["details",ee,"dtlCd"],errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),T(be=>{const Ie={...be};return delete Ie[ee],Ie})):($.current?.setFields([{name:["details",ee,"dtlCd"],errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),T(be=>({...be,[ee]:!0})))}catch(de){console.error("상세코드 중복 체크 실패:",de),p.message.error("중복 체크 중 오류가 발생했습니다."),T(ce=>{const ye={...ce};return delete ye[ee],ye})}finally{_(de=>({...de,[ee]:!1}))}},500))},[y,b]),ie=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{const ye=ee.index?.itemIndex;if(K.getValue(ye,"metaYn")==="Y"){ce.render(o.jsx("div",{}));return}const Ie=()=>{if(ye===void 0||ye<0)return;const me=N.current?.dp?.getJsonRow(ye);me&&(g(!0),B(!1),f(!0),setTimeout(()=>{R.current?.setFieldsValue({crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",grpNm:me.grpNm||"",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""})},100))},Re=()=>{if(ye===void 0||ye<0)return;const me=N.current?.dp?.getJsonRow(ye);me&&p.Modal.confirm({title:"삭제 확인",content:`그룹코드 '${me.grpCd} - ${me.grpNm}'을(를) 삭제하시겠습니까?`,okText:"확인",cancelText:"취소",onOk(){const Se={crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",grpNm:me.grpNm||"",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""};se.SCMCODE00202(Se)}})};ce.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(L.BwgButton,{icon:o.jsx(X.EditOutlined,{}),onClick:Ie}),o.jsx(L.BwgButton,{icon:o.jsx(X.DeleteOutlined,{style:{color:"red"}}),onClick:Re})]}))}),[]),ue=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{const ye=ee.index?.itemIndex;if(K.getValue(ye,"sysLockYn")==="Y"){ce.render(o.jsx("div",{}));return}const Ie=()=>{if(ye===void 0||ye<0)return;const me=I.current?.dp?.getJsonRow(ye);me&&(w(!0),x(!0),T({}),setTimeout(()=>{$.current?.setFieldsValue({crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",dtlCd:me.dtlCd||"",cmmnCd:me.cmmnCd||"",cmmnCdNm:me.cmmnCdNm||"",cmmnCdClr:me.cmmnCdClr||"",cmmnAbrv:me.cmmnAbrv||"",sysLockYn:me.sysLockYn||"N",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""})},100))},Re=()=>{if(ye===void 0||ye<0)return;const me=I.current?.dp?.getJsonRow(ye);me&&p.Modal.confirm({title:"삭제 확인",content:o.jsxs("div",{children:[o.jsx("div",{children:`정말 "${me.cmmnCdNm} [${me.dtlCd}]" 을(를) 삭제하시겠습니까?`}),o.jsx("div",{style:{marginTop:8,fontSize:"12px",color:"#999"},children:"해당 작업이 진행되면 다시 되돌릴 수 없습니다."})]}),centered:!0,okText:"확인",cancelText:"취소",onOk(){const Se={crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",dtlCd:me.dtlCd||"",cmmnCd:me.cmmnCd||"",cmmnCdNm:me.cmmnCdNm||"",cmmnCdClr:me.cmmnCdClr||"",cmmnAbrv:me.cmmnAbrv||"",sysLockYn:me.sysLockYn||"N",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""};se.SCMCODE00204(Se)}})};ce.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(p.Button,{icon:o.jsx(X.EditOutlined,{}),onClick:Ie}),o.jsx(p.Button,{icon:o.jsx(X.DeleteOutlined,{style:{color:"red"}}),onClick:Re})]}))}),[]),ge=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{K.getValue(ee.index?.itemIndex,"sysLockYn")==="Y"?ce.render(o.jsx(X.LockOutlined,{})):ce.render(o.jsx(X.UnlockOutlined,{}))}),[]),Ee=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"metaYn",header:{text:"메타"},width:80,styleName:"center"},{fieldName:"sysCd",header:{text:"시스템코드"},width:80},{fieldName:"appItCd",header:{text:"앱 통합코드"},width:80},{fieldName:"appCd",header:{text:"앱 코드"},width:120},{fieldName:"grpCd",header:{text:"그룹코드"},width:140},{fieldName:"grpNm",header:{text:"그룹명칭"},width:220,styleName:"left"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center",renderer:oe.realFormat.checkYdisabled},{fieldName:"sortOrd",visible:!1},{fieldName:"rmrk",visible:!1},{fieldName:"inptDt",visible:!1},{fieldName:"inptId",visible:!1},{fieldName:"chngDt",visible:!1},{fieldName:"chngId",visible:!1},{fieldName:"moreActions",header:{text:"액션"},renderer:"moreActions"}],[]),Pe=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appItCd",visible:!1},{fieldName:"appCd",visible:!1},{fieldName:"grpCd",visible:!1},{fieldName:"dtlCd",header:{text:"상세코드"},width:140,styleName:"left",footer:{valueCallback:K=>{const ee=K.getDataSource();return ee?ee.getRowCount()+"건":"0"}}},{fieldName:"cmmnCd",header:{text:"공통코드"},width:160,styleName:"left"},{fieldName:"cmmnCdNm",header:{text:"공통코드명"},width:220,styleName:"left"},{fieldName:"cmmnCdClr",visible:!1},{fieldName:"cmmnAbrv",header:{text:"약어"},width:120,styleName:"left"},{fieldName:"sysLockYn",header:{text:"시스템잠금"},width:110,styleName:"center",renderer:"sysLockYn"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center",renderer:oe.realFormat.checkYdisabled},{fieldName:"sortOrd",visible:!1},{fieldName:"rmrk",visible:!1},{fieldName:"inptDt",visible:!1},{fieldName:"inptId",visible:!1},{fieldName:"chngDt",visible:!1},{fieldName:"chngId",visible:!1},{fieldName:"moreActions",header:{text:"액션"},renderer:"moreActions"}],[]),Z=v.useMemo(()=>({container:{indicator:!0,check:!0,page:!0},display:{rowHeight:30}}),[]),ve=v.useMemo(()=>({container:{indicator:!0,page:!0},display:{rowHeight:20}}),[]);v.useMemo(()=>[{fieldName:"crprCd",header:{text:"회사코드"},width:120,styleName:"left"},{fieldName:"sysCd",header:{text:"시스템코드"},width:120,styleName:"left"},{fieldName:"appItCd",header:{text:"앱 통합코드"},width:140,styleName:"left"},{fieldName:"appCd",header:{text:"앱 코드"},width:120,styleName:"left"},{fieldName:"cmmnCd",header:{text:"공통코드"},width:140,styleName:"left"},{fieldName:"optnCd",header:{text:"옵션코드"},width:140,styleName:"left"},{fieldName:"optnNm",header:{text:"옵션명"},width:200,styleName:"left"},{fieldName:"optnDesc",header:{text:"옵션설명"},width:250,styleName:"left"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center"},{fieldName:"sortOrd",header:{text:"정렬순서"},width:100,styleName:"right"},{fieldName:"inptDt",header:{text:"입력일시"},width:150,styleName:"center"},{fieldName:"inptId",header:{text:"입력자"},width:120,styleName:"left"},{fieldName:"chngDt",header:{text:"변경일시"},width:150,styleName:"center"},{fieldName:"chngId",header:{text:"변경자"},width:120,styleName:"left"}],[]),v.useMemo(()=>({container:{indicator:!0,footer:!0}}),[]);const fe=K=>{const ee=i.getAvailableGroupCodes(),Q=[];ee.forEach(ce=>{const ye=i.getCodeList(ce,{enabledOnly:!1,systemCodeOnly:K==="Y",sortByOrder:!1});let be=!1;if(K==="")be=ye.length>0;else if(K==="Y")be=ye.length>0;else if(K==="N"){const Ie=i.codeData;Ie&&Ie[ce]&&(be=Object.values(Ie[ce]).some(Re=>Re.systemCodeYn!=="Y"))}be&&Q.push({grpCd:ce,grpNm:""})});const de=s?Q.filter(ce=>ce.grpCd.toLowerCase().includes(s.toLowerCase())):Q;N.current?.addAllData(de)},z=(K,ee)=>{if(!K){I.current?.addAllData([]);return}const Q=i.codeData;if(!Q||!Q[K]){I.current?.addAllData([]);return}const ye=Object.values(Q[K]).filter(be=>!(ee==="Y"&&be.systemCodeYn!=="Y"||ee==="N"&&be.systemCodeYn==="Y")).sort((be,Ie)=>be.sortOrder!==Ie.sortOrder?be.sortOrder-Ie.sortOrder:be.codeValue.localeCompare(Ie.codeValue)).map(be=>({commonCode:be.commonCode,codeNm:be.codeNm,codeValue:be.codeValue,labelColor:be.labelColor,sortOrder:be.sortOrder,enblYn:be.enabled?"Y":"N",systemCodeYn:be.systemCodeYn,rmrk:be.originalData?.rmrk??null}));I.current?.addAllData(ye)};v.useRef(!1),v.useEffect(()=>{console.log("SystemCodeManage useEffect"),se.SCMCODE00101()},[]),v.useEffect(()=>{const K=n()?.sysLockYn||"";fe(K),z(c,K)},[s]);const ne=async()=>{se.SCMCODE00101()},Y=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.sysCd))).slice(0,6),[a.systemMap]),le=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.appItCd))).slice(0,8),[a.systemMap]),pe=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.appCd))).slice(0,8),[a.systemMap]),xe=K=>{if(K<=0)return[];const ee=Array.from({length:K},()=>Math.random()+.2),Q=ee.reduce((de,ce)=>de+ce,0);return ee.map(de=>Math.round(de/Q*100))},je=v.useMemo(()=>{const K=Math.max(30,Math.round(Math.random()*70)),ee=100-K;return[{name:"시스템코드",value:K},{name:"사용자코드",value:ee}]},[]),Me=v.useMemo(()=>{const K=xe(Y.length);return Y.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[Y]),W=v.useMemo(()=>{const K=xe(le.length);return le.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[le]),te=v.useMemo(()=>{const K=xe(pe.length);return pe.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[pe]),ae=v.useMemo(()=>{const ee=[{sysCd:"KE",sysNm:"K-ERP"},{sysCd:"CH",sysNm:"파트너관리"},{sysCd:"HR",sysNm:"K-HR"},{sysCd:"YT",sysNm:"연말정산"},{sysCd:"CM",sysNm:"공통"},{sysCd:"PA",sysNm:"평정"},{sysCd:"KS",sysNm:"K-업무지원"},{sysCd:"DE",sysNm:"온통"}].map(Q=>({label:Q.sysNm,value:Q.sysCd}));return[{label:"전체",value:""},...ee]},[]),re=v.useMemo(()=>{const ee=[{code:"KERP",name:""},{code:"KHR",name:"인사"},{code:"KHYT",name:"연말정산"},{code:"KCM",name:"공통"},{code:"KHPE",name:"평정"},{code:"EAUD",name:"감사 01"},{code:"INR",name:"감사 02"},{code:"ITAM",name:"자산 01"},{code:"CMM",name:"자산 02"},{code:"OAM",name:"자산 03"},{code:"KSGA",name:"총무"},{code:"HIS",name:"문헌"},{code:"WFAX",name:"IT서비스 0"},{code:"SMS",name:"IT서비스 0"},{code:"BID",name:"기타업무서비스 01"},{code:"PAM",name:"기타업무서비스 02"},{code:"DAC",name:"기타업무서비스 03"},{code:"IPR",name:"기타업무서비스 04"},{code:"ISB",name:"정보공유게시판"},{code:"ITSM",name:"ITSM"},{code:"BCOM",name:"소통"}].map(Q=>({label:Q.name?`${Q.code} (${Q.name})`:Q.code,value:Q.code}));return[{label:"전체",value:""},...ee]},[]),G=v.useMemo(()=>{const ee=[{code:"FI",name:"재무회계"},{code:"FM",name:"예산관리"},{code:"MM",name:"구매계약"},{code:"SD",name:"영업관리"},{code:"PMN",name:"파트너관리"},{code:"HR",name:"HR 솔루션"},{code:"YT",name:"연말정산"},{code:"CM",name:"프레임워크 공통"},{code:"PE",name:"평정"},{code:"EAUD",name:"e-감사"},{code:"INR",name:"청렴신고"},{code:"ITAM",name:"ITAM"},{code:"CMM",name:"차량/회의실"},{code:"OAM",name:"OA전산물품 관리"},{code:"GAM",name:"총무관리"},{code:"ACM",name:"출입관리"},{code:"IVM",name:"비품관리"},{code:"SGS",name:"인장서비스"},{code:"HIS",name:"사료관리"},{code:"ITSM",name:"ITSM"},{code:"WFAX",name:"웹펙스서비스"},{code:"SMS",name:"메시지서비스"},{code:"BID",name:"경영공시"},{code:"PAM",name:"언론미디어"},{code:"DAC",name:"심의자문위원회"},{code:"IPR",name:"지식재산권 신청"},{code:"ISB",name:"정보공유게시판"},{code:"BCOM",name:"온통"}].map(Q=>({label:`${Q.code} (${Q.name})`,value:Q.code}));return[{label:"전체",value:""},...ee]},[]),se=v.useMemo(()=>({SCMCODE00101:()=>{const K=n(),ee={crprCd:K?.crprCd||"100",sysCd:K?.sysCd||"",appItCd:K?.appItCd||"",appCd:K?.appCd||"",sysLockYn:K?.sysLockYn||"",keyword:K?.keyword||""};oe.callService("SCMCODE00101",ee).then(Q=>{N.current?.addAllData(Q.data||[])}).catch(Q=>{p.message.error("그룹코드 조회에 실패했습니다.")})},SCMCODE00102:K=>{oe.callService("SCMCODE00102",K,{showLoading:!1}).then(ee=>{I.current?.addAllData(ee.data||[])}).catch(ee=>{p.message.error("상세코드 조회에 실패했습니다.")})},SCMCODE00104:K=>{const ee={grp:K};return oe.callService("SCMCODE00104",ee,{showLoading:!1}).then(Q=>Q.dup===!0).catch(Q=>(console.error("그룹코드 중복 체크 실패:",Q),!1))},SCMCODE00105:K=>{const ee={dtl:K};return oe.callService("SCMCODE00105",ee,{showLoading:!1}).then(Q=>Q.dup===!0).catch(Q=>(console.error("상세코드 중복 체크 실패:",Q),!1))},SCMCODE00201:(K,ee)=>{const Q={flag:K,grp:ee};return oe.callService("SCMCODE00201",Q).then(de=>(p.message.success(K==="I"?"그룹코드가 등록되었습니다.":"그룹코드가 수정되었습니다."),se.SCMCODE00101(),de)).catch(de=>{throw console.error("그룹코드 저장 실패:",de),de})},SCMCODE00202:K=>{const ee={grp:K};return oe.callService("SCMCODE00202",ee).then(Q=>(p.message.success("그룹코드가 삭제되었습니다."),se.SCMCODE00101(),Q)).catch(Q=>{throw p.message.error("그룹코드 삭제에 실패했습니다."),Q})},SCMCODE00203:(K,ee,Q)=>{const de={flag:K,dtlCnt:ee,dtl:Q};return oe.callService("SCMCODE00203",de).then(ce=>(p.message.success(K==="I"?"상세코드가 등록되었습니다.":"상세코드가 수정되었습니다."),b&&se.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),ce)).catch(ce=>{throw console.error("상세코드 저장 실패:",ce),p.message.error(K==="I"?"상세코드 등록에 실패했습니다.":"상세코드 수정에 실패했습니다."),ce})},SCMCODE00204:K=>{const ee={dtl:K};return oe.callService("SCMCODE00204",ee).then(Q=>(p.message.success("상세코드가 삭제되었습니다."),b&&se.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),Q)).catch(Q=>{throw p.message.error("상세코드 삭제에 실패했습니다."),Q})}}),[]);return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:ne}]},searchBox:{reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:[16,8],style:{marginBottom:8},children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",initialValue:""},selectProps:{placeholder:"시스템코드를 선택하세요",options:ae}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"통합코드",name:"appItCd",initialValue:""},selectProps:{placeholder:"통합코드를 선택하세요",options:re}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱코드",name:"appCd",initialValue:""},selectProps:{placeholder:"앱코드를 선택하세요",options:G}})})]}),o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"코드구분",name:"sysLockYn",initialValue:""},selectProps:{options:[{label:"전체",value:""},{label:"시스템코드",value:"Y"},{label:"업무코드",value:"N"}]}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"검색어",name:"keyword",initialValue:""},inputProps:{placeholder:"검색어를 입력하세요."}})})]})]})},children:[o.jsxs(ze,{type:"horizontal",style:{height:"calc(100vh - 120px)",gap:12,overflow:"hidden"},children:[o.jsxs(De,{border:!0,style:{flex:`0 0 ${$1}`,maxWidth:$1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[o.jsx(Le,{title:"공통코드 현황"}),o.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",padding:"8px 0"},size:12,children:[o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"시스템코드 대비 사용자코드"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(CU,{children:[o.jsx(EP,{data:je,dataKey:"value",nameKey:"name",outerRadius:65,label:!0,children:je.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c1-${ee}`))}),o.jsx(vl,{}),o.jsx(Zc,{})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"시스템코드별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:Me,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:Me.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c2-${ee}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"통합코드별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:W,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:W.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c3-${ee}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"앱별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:te,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:te.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c4-${ee}`))})]})})]})]})})]}),o.jsxs(De,{border:!0,style:{flex:"1 1 auto",height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:[o.jsx(Le,{title:"그룹코드",children:o.jsx(L.BwgButton,{type:"primary",onClick:()=>{g(!1),B(!1),f(!0),setTimeout(()=>{R.current?.resetFields(),R.current?.setFieldsValue({crprCd:"100",sysCd:__SYS_CD__||"",appItCd:"CM",appCd:"CM",enblYn:"Y",sortOrd:0})},100)},children:"그룹코드 등록"})}),o.jsx("div",{style:{flex:"0 0 45%",overflow:"hidden",display:"flex",flexDirection:"column"},children:o.jsx(Fe,{ref:N,gridColumns:Ee,gridOptions:Z,gridEvents:v.useMemo(()=>({onCurrentRowChanged:(K,ee,Q)=>{if(Q<0){j(null);return}const de=N.current?.dp?.getValue(Q,"sysCd")||"",ce=N.current?.dp?.getValue(Q,"appItCd")||"",ye=N.current?.dp?.getValue(Q,"appCd")||"",be=N.current?.dp?.getValue(Q,"grpCd")||"",Ie=N.current?.dp?.getJsonRow(Q);j(Ie),be&&se.SCMCODE00102({sysCd:de,appItCd:ce,appCd:ye,grpCd:be})}}),[se]),renderers:[{name:"moreActions",renderer:ie}]})}),o.jsxs("div",{style:{flex:"1 1 auto",overflow:"hidden",display:"flex",flexDirection:"column",marginTop:12},children:[o.jsx(Le,{title:"상세코드",children:o.jsx(L.BwgButton,{type:"primary",onClick:()=>{if(!b){p.message.warning("그룹코드를 먼저 선택하세요.");return}w(!1),x(!0),O(null),T({}),E([{dtlCd:"",cmmnCd:"",cmmnCdNm:"",cmmnCdClr:"",cmmnAbrv:"",enblYn:"Y",sortOrd:0,rmrk:""}])},disabled:!b,children:"상세코드 등록"})}),o.jsx("div",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:o.jsx(Fe,{ref:I,gridColumns:Pe,gridOptions:ve,renderers:[{name:"moreActions",renderer:ue},{name:"sysLockYn",renderer:ge}]})})]})]})]}),o.jsx(un,{title:h?"그룹코드 수정":"그룹코드 등록",open:u,placement:"right",width:"40%",onClose:()=>{f(!1),g(!1),B(!1),R.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{f(!1),g(!1),B(!1),R.current?.resetFields()},children:"취소"}),o.jsx(p.Button,{type:"primary",disabled:!h&&!D,onClick:async()=>{try{const K=await R.current?.validateFields();if(!K)return;const ee={crprCd:K.crprCd||"100",sysCd:K.sysCd||"",appItCd:K.appItCd||"CM",appCd:K.appCd||"CM",grpCd:K.grpCd||"",grpNm:K.grpNm||"",enblYn:K.enblYn==="Y"?"Y":"N",sortOrd:K.sortOrd||0,rmrk:K.rmrk||""};if(!h&&!D){p.message.warning("그룹코드 중복체크를 먼저 완료해주세요.");return}await se.SCMCODE00201(h?"U":"I",ee),f(!1),g(!1),B(!1),R.current?.resetFields()}catch(K){console.error(h?"그룹코드 수정 실패:":"그룹코드 등록 실패:",K)}},children:"저장"})]}),children:o.jsxs(L.BwgForm,{ref:R,style:{padding:"10px 20px"},initialValues:{crprCd:"100",sysCd:__SYS_CD__||"",appItCd:"CM",appCd:"CM",enblYn:"Y",sortOrd:0},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",rules:[{required:!0,message:"시스템코드를 선택하세요."}]},selectProps:{placeholder:"시스템코드를 선택하세요",options:ae.filter(K=>K.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱 통합코드",name:"appItCd",rules:[{required:!0,message:"앱 통합코드를 선택하세요."}]},selectProps:{placeholder:"앱 통합코드를 선택하세요",options:re.filter(K=>K.value!==""),disabled:h}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱 코드",name:"appCd",rules:[{required:!0,message:"앱 코드를 선택하세요."}]},selectProps:{placeholder:"앱 코드를 선택하세요",options:G.filter(K=>K.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹코드",name:"grpCd",rules:[{required:!0,message:"그룹코드를 입력하세요."},{max:5,message:"그룹코드는 5자 이하여야 합니다."}]},inputProps:{placeholder:"그룹코드를 입력하세요",maxLength:5,showCount:!0,count:{max:5},disabled:h,suffix:k?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):D&&!h?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onKeyDown:K=>{if(h){K.preventDefault();return}K.target.value.length>=5&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter"].includes(K.key)&&(K.preventDefault(),p.message.warning("입력은 다섯글자까지입니다."))},onChange:K=>{if(h){K.preventDefault();return}K.target.value.length>5&&(p.message.warning("입력은 다섯글자까지입니다."),K.target.value=K.target.value.slice(0,5)),D&&B(!1),R.current?.getFieldError("grpCd")?.length&&R.current?.setFields([{name:"grpCd",errors:[]}])},onBlur:F}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹명칭",name:"grpNm",rules:[{required:!0,message:"그룹명칭을 입력하세요."}]},inputProps:{placeholder:"그룹명칭을 입력하세요"}})})}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:K=>({checked:K==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:"sortOrd"},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]})}),o.jsx(un,{title:y?"상세코드 수정":"상세코드 등록",open:m,placement:"right",width:"50%",onClose:()=>{x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()},children:"취소"}),o.jsx(p.Form.Item,{shouldUpdate:!0,children:()=>{const K=$.current?.getFieldValue("details")||[];let ee=!1;if(y)ee=!0;else if(K.length>0){const Q=K.every(ce=>ce?.dtlCd?.trim()),de=K.every((ce,ye)=>ce?.dtlCd?.trim()&&H[ye]===!0);ee=Q&&de}return o.jsx(p.Button,{type:"primary",disabled:!ee,onClick:async()=>{try{const Q=await $.current?.validateFields();if(!Q)return;if(!y&&Q.details){if(!Q.details.every((ye,be)=>!ye.dtlCd?.trim()||H[be]===!0)){p.message.warning("모든 상세코드의 중복체크를 완료해주세요.");return}for(let ye=0;ye<Q.details.length;ye++){const Ie=Q.details[ye].dtlCd?.trim();if(!Ie)continue;if(Q.details.some((me,Se)=>Se!==ye&&me.dtlCd?.trim()===Ie)){$.current?.setFields([{name:["details",ye,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("중복된 상세코드가 있습니다.");return}}}const de=y?[{...Q,crprCd:Q.crprCd||"100",sysCd:Q.sysCd||"",appItCd:Q.appItCd||b?.appItCd||"CM",appCd:Q.appCd||b?.appCd||"CM",grpCd:Q.grpCd||"",enblYn:Q.enblYn==="Y"?"Y":"N",sysLockYn:Q.sysLockYn==="Y"?"Y":"N"}]:(Q.details||[]).map(ce=>{const ye=b?.sysCd||"",be=b?.grpCd||"",Ie=ce.dtlCd||"",Re=`${ye}${be}${Ie}`;return{...ce,crprCd:b?.crprCd||"100",sysCd:ye,appItCd:b?.appItCd||"CM",appCd:b?.appCd||"CM",grpCd:be,cmmnCd:Re,enblYn:ce.enblYn==="Y"?"Y":"N",sysLockYn:ce.sysLockYn==="Y"?"Y":"N",sortOrd:ce.sortOrd||0}});await se.SCMCODE00203(y?"U":"I",de.length,de),x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()}catch(Q){console.error(y?"상세코드 수정 실패:":"상세코드 등록 실패:",Q)}},children:"저장"})}})]}),children:o.jsxs(L.BwgForm,{ref:$,style:{padding:"10px 20px"},children:[b&&o.jsx(p.Card,{style:{marginBottom:16,background:"#f5f5f5"},children:o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"시스템코드:"})," ",b.sysCd||""]})}),o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"그룹코드:"})," ",b.grpCd||""]})}),o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"그룹명칭:"})," ",b.grpNm||""]})})]})}),y?o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"시스템코드",name:"sysCd"},inputProps:{disabled:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹코드",name:"grpCd"},inputProps:{disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"상세코드",name:"dtlCd",rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",disabled:!0,suffix:A[-1]?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):H[-1]?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드",name:"cmmnCd",rules:[{required:!0,message:"공통코드를 입력하세요."}]},inputProps:{placeholder:"공통코드를 입력하세요",disabled:!0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드명",name:"cmmnCdNm",rules:[{required:!0,message:"공통코드명을 입력하세요."}]},inputProps:{placeholder:"공통코드명을 입력하세요"}})})}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"색상",name:"cmmnCdClr",getValueFromEvent:K=>K&&typeof K.toHexString=="function"?K.toHexString():K||"",children:o.jsx(p.ColorPicker,{format:"hex",showText:!0,presets:[{label:"추천 색상",colors:["#FF4D4F","#FF7A45","#FFA940","#FFC53D","#FFEC3D","#BAE637","#73D13D","#36CFC9","#40A9FF","#1890FF","#2F54EB","#722ED1","#EB2F96","#F5222D","#FA541C","#FA8C16","#FADB14","#A0D911","#13C2C2","#096DD9","#0050B3","#531DAB","#C41D7F","#CF1322","#D4380D","#D46B08","#D4B106","#7CB305","#08979C","#0050B3"]}]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"약어",name:"cmmnAbrv"},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:K=>({checked:K==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:"sortOrd"},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]}):o.jsx(p.Form.List,{name:"details",initialValue:P,children:(K,{add:ee,remove:Q})=>o.jsxs(o.Fragment,{children:[K.map((de,ce)=>{const ye=S===ce,be=b?.sysCd||"",Ie=b?.grpCd||"";return o.jsx(p.Card,{style:{marginBottom:16},children:o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:20,children:o.jsx(p.Form.Item,{noStyle:!0,shouldUpdate:(Re,me)=>{const Se=Re?.details?.[de.name]?.dtlCd,Te=me?.details?.[de.name]?.dtlCd;return Se!==Te},children:({getFieldValue:Re})=>{const me=Re(["details",de.name,"dtlCd"])||"",Se=`${be}${Ie}${me}`;return me&&$.current&&Re(["details",de.name,"cmmnCd"])!==Se&&setTimeout(()=>{$.current?.setFieldValue(["details",de.name,"cmmnCd"],Se)},0),o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"상세코드",name:[de.name,"dtlCd"],rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",suffix:A[ce]?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):H[ce]?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onChange:Te=>{H[ce]&&T(ft=>{const jr={...ft};return delete jr[ce],jr}),$.current?.getFieldError(["details",ce,"dtlCd"])?.length&&$.current?.setFields([{name:["details",ce,"dtlCd"],errors:[]}])},onBlur:Te=>q(Te,ce)}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드",name:[de.name,"cmmnCd"]},inputProps:{disabled:!0,placeholder:"자동 생성됩니다",value:Se}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드명",name:[de.name,"cmmnCdNm"],rules:[{required:!0,message:"공통코드명을 입력하세요."}]},inputProps:{placeholder:"공통코드명을 입력하세요"}})})}),ye&&o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"색상",name:[de.name,"cmmnCdClr"],getValueFromEvent:Te=>Te&&typeof Te.toHexString=="function"?Te.toHexString():Te||"",children:o.jsx(p.ColorPicker,{format:"hex",showText:!0,presets:[{label:"추천 색상",colors:["#FF4D4F","#FF7A45","#FFA940","#FFC53D","#FFEC3D","#BAE637","#73D13D","#36CFC9","#40A9FF","#1890FF","#2F54EB","#722ED1","#EB2F96","#F5222D","#FA541C","#FA8C16","#FADB14","#A0D911","#13C2C2","#096DD9","#0050B3","#531DAB","#C41D7F","#CF1322","#D4380D","#D46B08","#D4B106","#7CB305","#08979C","#0050B3"]}]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"약어",name:[de.name,"cmmnAbrv"]},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:[de.name,"enblYn"],getValueProps:Te=>({checked:Te==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:[de.name,"sortOrd"]},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:[de.name,"rmrk"]},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]})]})}})}),o.jsx(p.Col,{span:4,style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-end",paddingTop:30},children:o.jsxs(p.Space,{size:"small",children:[o.jsx(p.Button,{type:"link",size:"small",icon:ye?o.jsx(X.UpOutlined,{}):o.jsx(X.DownOutlined,{}),onClick:()=>{O(ye?null:ce)},style:{fontSize:"12px",padding:0},children:ye?"간단입력":"추가입력"}),K.length>1&&o.jsx(p.Button,{type:"link",danger:!0,size:"small",icon:o.jsx(X.DeleteOutlined,{}),onClick:()=>{Q(de.name),S===ce&&O(null)},style:{fontSize:"12px",padding:0},children:"삭제"})]})})]})},de.key)}),o.jsx(p.Button,{type:"dashed",onClick:()=>{ee({dtlCd:"",cmmnCd:"",cmmnCdNm:"",cmmnCdClr:"",cmmnAbrv:"",enblYn:"Y",sortOrd:0,rmrk:""})},block:!0,style:{marginTop:16},children:"+ 행 추가"})]})})]})})]})},jU=e=>{const t=v.useRef(null),r=v.useMemo(()=>[{fieldName:"userId",header:{text:"아이디"}},{fieldName:"userName",header:{text:"이름"}},{fieldName:"email",header:{text:"이메일"}},{fieldName:"createdAt",header:{text:"생성일"}}],[]);return o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{}}]},searchBox:{},children:o.jsx(ze,{children:o.jsx(De,{style:{height:"300px"},children:o.jsx(Fe,{ref:t,gridColumns:r})})})})},{TextArea:EU}=p.Input,Wm=({boardMstrId:e,isCompleted:t=!1})=>{const{user:r}=it.useUserStore(),[n,i]=v.useState(!1),[a,s]=v.useState(!1),[l,c]=v.useState(15),[d,u]=v.useState([]),[f,h]=v.useState(""),g=v.useRef(null),m=b=>{i(!0),oe.callService("SCMBoardDtls0001",{boardMstrId:b},{isPopup:!0,showLoading:!1}).then(j=>{if(j&&j.subList){const P=j.subList.map(E=>({id:E.seq,author:E.userNm||E.regUserId,regUserId:E.regUserId,content:E.content,regDt:E.regDt}));u(P)}else u([])}).catch(j=>{console.error("게시글 댓글 목록 조회 실패:",j)}).finally(()=>{i(!1),c(15)})},x=()=>{e&&m(e)},y=()=>{if(!f.trim()){p.message.warning("댓글 상세내용 작성");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),oe.callService("SCMBoardDtls0002",{boardMstrId:e,content:f.trim()},{isPopup:!0,showLoading:!1}).then(b=>{b&&b.result===1?(console.log("댓글이 등록되었습니다."),h(""),m(e),setTimeout(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},100)):console.error("댓글 등록에 실패했습니다.",b)}).catch(b=>{console.error("댓글 등록 중 오류가 발생했습니다.",b)}).finally(()=>{i(!1)})},w=b=>{const j=d.find(P=>P.id===b);if(j&&j.regUserId!==r?.userId){p.message.error("본인이 작성한 댓글만 삭제할 수 있습니다.");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),oe.callService("SCMBoardDtls0003",{boardMstrId:e,seq:b},{isPopup:!0,showLoading:!1}).then(P=>{P&&P.result===1?(console.log("댓글이 삭제되었습니다."),m(e)):console.error("댓글 삭제에 실패했습니다.",P)}).catch(P=>{console.error("댓글 삭제 중 오류가 발생했습니다.",P)}).finally(()=>{i(!1)})};return v.useEffect(()=>{e?m(e):u([])},[e]),o.jsxs(De,{style:{flex:"0 0 400px",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{borderBottom:"1px solid #e8e8e8",paddingBottom:"12px",marginBottom:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:"#262626"},children:"댓글"}),o.jsxs("div",{style:{position:"relative",display:"inline-block"},children:[o.jsx(p.Button,{type:"text",icon:o.jsx(X.ReloadOutlined,{spin:a||n}),onClick:x,disabled:a||n,size:"small",style:{fontSize:"12px",color:t?"#d9d9d9":n?"#8c8c8c":"#595959",height:"24px",padding:"0 8px"}}),!t&&o.jsx("span",{style:{position:"absolute",top:"-4px",right:"-4px",fontSize:"10px",fontWeight:"700",color:a?"#8c8c8c":"#1890ff",minWidth:"14px",height:"14px",lineHeight:"14px",textAlign:"center",borderRadius:"50%",pointerEvents:"none"},children:l})]})]}),o.jsx("div",{ref:g,style:{flex:1,overflowY:"auto",marginBottom:"16px",minHeight:0,position:"relative"},children:n?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:[o.jsx("div",{style:{marginBottom:"12px"},children:o.jsx(X.ReloadOutlined,{spin:!0,style:{fontSize:"24px"}})}),o.jsx("div",{style:{fontSize:"13px"},children:"댓글을 불러오는 중..."})]}):d.length===0?o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:o.jsx("div",{style:{fontSize:"13px"},children:"등록된 댓글이 없습니다."})}):o.jsx(p.List,{dataSource:d,renderItem:b=>o.jsxs(p.List.Item,{style:{position:"relative",paddingRight:"20px",padding:"12px 20px 12px 12px",borderBottom:"1px solid #f0f0f0"},children:[o.jsx(p.List.Item.Meta,{avatar:o.jsx(p.Avatar,{size:32,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:b.author[0]}),title:o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"4px"},children:[o.jsx("span",{style:{fontWeight:"500",fontSize:"13px",color:"#262626"},children:b.author}),o.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:b.regDt})]}),description:o.jsx("span",{style:{fontSize:"13px",color:"#595959",lineHeight:"1.5"},children:b.content})}),b.regUserId===r?.userId&&o.jsx(p.Button,{type:"text",danger:!0,icon:o.jsx(X.DeleteOutlined,{style:{fontSize:"12px"}}),size:"small",onClick:()=>w(b.id),disabled:n,style:{position:"absolute",right:"8px",top:"62%",transform:"translateY(-50%)",opacity:n?.3:.5,height:"24px",width:"24px",padding:0},onMouseEnter:j=>{n||(j.currentTarget.style.opacity="1")},onMouseLeave:j=>{j.currentTarget.style.opacity=n?"0.3":"0.5"}})]},b.id)})}),o.jsx("div",{style:{padding:"12px",borderTop:"1px solid #e8e8e8",backgroundColor:t?"#f5f5f5":"#fafafa",flexShrink:0,marginTop:"auto"},children:t?o.jsxs("div",{style:{textAlign:"center",padding:"20px",color:"#8c8c8c",fontSize:"13px",backgroundColor:"#ffffff",borderRadius:"6px",border:"1px solid #e8e8e8"},children:[o.jsx("div",{style:{marginBottom:"8px"},children:o.jsx(X.AlertTwoTone,{twoToneColor:"#faad14"})}),o.jsx("div",{children:"이미 완료처리된 게시글입니다."}),o.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"댓글을 작성할 수 없습니다."})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{marginBottom:"8px"},children:o.jsx(EU,{rows:2,placeholder:n?"댓글 처리 중...":"댓글을 입력하세요...",value:f,onChange:b=>h(b.target.value),maxLength:300,disabled:n,style:{borderRadius:"6px",border:"1px solid #d9d9d9",resize:"none",fontSize:"13px",backgroundColor:n?"#f5f5f5":"#ffffff",color:n?"#8c8c8c":"#000000"},onFocus:b=>{n||(b.currentTarget.style.borderColor="#1890ff",b.currentTarget.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.05)")},onBlur:b=>{b.target.style.borderColor="#d9d9d9",b.target.style.boxShadow="none"}})}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:n?"처리 중...":`${f.length} / 300자`}),o.jsx(p.Button,{type:"primary",onClick:y,size:"small",loading:n,style:{borderRadius:"4px",fontSize:"12px",height:"28px",padding:"0 16px",fontWeight:"500"},disabled:!f.trim()||n,children:n?"등록 중...":"등록"})]})]})})]})},Ff=[{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],L1=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],PU={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},z1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},OU={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},kU=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n]=p.Form.useForm(),[i,a]=v.useState(!1),{searchBoxRef:s}=ct.useSearchBox(),{openTabByMenuId:l}=it.useMenuViewStore(),{openCorePopup:c}=ct.usePopup(),d=v.useRef(null),[u,f]=v.useState(n.getFieldValue("status")),h=u==="COMPLETED",g=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,button:!0,styleName:"center"},{fieldName:"menuNm",header:{text:"메뉴명"},width:120,styleName:"left"},{fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType",styleName:"center"},{fieldName:"title",header:{text:"제목"},width:200,styleName:"left"},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{fieldName:"status",header:{text:"상태"},width:90,renderer:"statusTag",styleName:"center"},{fieldName:"rgstUserId",visible:!1},{fieldName:"rgstUserNm",header:{text:"작성자"},width:60,styleName:"left"},{fieldName:"rgstDt",header:{text:"등록일자"},width:100,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:100,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert",styleName:"center"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:60,styleName:"left"},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right",visible:!1}],[]),m=v.useMemo(()=>({container:{indicator:!1}}),[]),x={onCellDblClicked(A,_){const D=_.itemIndex??-1;if(D<0)return;const B=A.getValues(D);n.setFieldsValue(B),f(B.status),a(!0)},onCellClicked(A,_){if(_.fieldName==="menuId"){if((_.itemIndex??-1)<0)return;_.value&&l(_.value)}}},y=v.useMemo(()=>({SCMBoardMstr0001:async(A,_)=>{const D=A||d.current?.currentPage||1,B=_||d.current?.pageSize||20,H={...s?.current?.getFormData(),sysCd:e,appCd:t,pageNum:D,pageCount:B};console.log("🔍 서버 모드 페이징 요청:",H);try{const T=await oe.callService("SCMBoardMstr0001",H,{isPopup:!0});if(console.log("🔍 서버 모드 페이징 응답:",T),T&&T.pageList){const N=T.pageCnt||0;d.current?.setTotalData(N),r.current?.addAllData(T.pageList)}else d.current?.setTotalData(0),r.current?.addAllData([]),console.log("📭 서버 모드 페이징 데이터 없음")}catch(T){console.error("❌ SCMBoardMstr0001 호출 실패:",T)}},SCMBoardMstr0004:A=>{oe.callService("SCMBoardMstr0004",{...A,boardMstrId:n.getFieldValue("boardMstrId"),sysCd:e,appCd:t},{isPopup:!0}).then(_=>{n.resetFields(),y.SCMBoardMstr0001()}).catch(_=>{console.error("문의/신고 변경 실패:",_)})}}),[s,n]),w=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{const T=A.getValue(_.index?.itemIndex,"type");H.render(o.jsx(p.Tag,{color:OU[T],children:Ff.find(N=>N.value===T)?.label}))}),[]),b=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{const T=A.getValue(_.index?.itemIndex,"status");H.render(o.jsx(p.Tag,{color:PU[T],children:L1.find(N=>N.value===T)?.label}))}),[]),j=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{A.getValue(_.index?.itemIndex,"urgentYn")==="Y"?H.render(o.jsx(X.AlertTwoTone,{twoToneColor:"red"})):H.render(o.jsx(o.Fragment,{}))}),[]),P=()=>{try{n.validateFields().then(A=>{p.Modal.confirm({title:"변경 확인",content:"게시물 정보를 변경하시겠습니까?",okText:"변경",cancelText:"취소",onOk:()=>{y.SCMBoardMstr0004(A),a(!1)}})})}catch(A){console.error("게시물 정보 변경 실패:",A)}},E=()=>{c("CORE_ORGANIZATION_01",{onSelect:A=>{console.log("처리담당자 선택:",A),n.setFieldsValue({prcsUserId:A.empNo,prcsUserNm:A.empNm,status:"ASSIGNED"}),f("ASSIGNED")}})},S=()=>{c("CORE_PRGR_02",{callback:A=>{s?.current?.setFormData({menuId:A.menuId,menuNm:A.menuNm})}})},O=A=>{if(n.setFieldValue("status",A),f(A),A==="COMPLETED"||A==="REJECTED"){const _=oe.format(oe.now(),"yyyy-mm-dd");n.setFieldsValue({prcsDt:_})}else n.setFieldsValue({prcsDt:""})};v.useEffect(()=>{setTimeout(()=>{y.SCMBoardMstr0001()},100)},[y]);const k={ref:s,reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:7,children:o.jsx(L.BwgRangePicker,{itemProps:{label:"등록일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Ff,placeholder:"전체"}})}),o.jsx($e,{span:6,children:o.jsx(L.BwgSearch,{itemProps:{label:"작성자",name:["rgstUserId","rgstUserNm"]},onSearch:()=>{c("CORE_ORGANIZATION_01",{onSelect:A=>{s?.current?.setFormData({rgstUserId:A.empNo,rgstUserNm:A.empNm})}})}})}),o.jsx($e,{span:6,style:{marginLeft:"12px"},children:o.jsx(L.BwgSwitch,{itemProps:{name:"myPrcs",label:"나의 처리건만"},inputProps:{format:"YN"}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:7,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:S})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:L1,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},M=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{y.SCMBoardMstr0001(d.current?.currentPage,d.current?.pageSize)}},{id:"edit",label:"변경",onClick:()=>{const A=r.current?.getCurrentIndex?.()??-1;if(A<0)return;const _=r.current?.vw?.getValues(A);_&&(n.setFieldsValue(_),f(n.getFieldValue("status")),a(!0))}}]}),[d,y,n,r]);return o.jsx(kt,{searchBox:k,buttons:M,children:o.jsx(ze,{children:o.jsxs(De,{children:[o.jsx(Fe,{ref:r,type:"nrml",gridColumns:g,gridOptions:m,gridEvents:x,renderers:[{name:"tagType",renderer:w},{name:"statusTag",renderer:b},{name:"alert",renderer:j}]}),o.jsx(un,{title:"게시물 상세",open:i,onClose:()=>{a(!1),n.resetFields(),y.SCMBoardMstr0001()},showCloseButton:!0,showEyesButton:!0,size:"large",placement:"right",width:1200,maskClosable:!0,extra:o.jsx(p.ConfigProvider,{theme:{components:{Button:{fontSize:13}}},children:o.jsx(p.Space,{children:o.jsx(p.Button,{type:"primary",onClick:P,children:"변경"})})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:"70%",min:"60%",max:"80%",style:{paddingRight:"15px",overflowX:"hidden",overflowY:"hidden"},children:o.jsx(De,{children:o.jsxs(L.BwgForm,{form:n,children:[o.jsx(wt,{gutter:[12,8],style:{marginBottom:"20px"},children:o.jsx($e,{span:24,children:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"0 5px"},children:[o.jsx(p.Avatar,{size:40,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:n.getFieldValue("rgstUserNm")?.[0]??""}),o.jsx("div",{style:{flex:1},children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px",marginTop:"2px"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[o.jsx("span",{style:{fontWeight:500,fontSize:"16px",color:"#262626"},children:n.getFieldValue("rgstUserNm")??n.getFieldValue("rgstUserId")??""}),o.jsx("span",{style:{fontSize:"13px",color:"#8c8c8c",marginTop:"3px",marginLeft:"4px"},children:n.getFieldValue("rgstDt")?oe.format(n.getFieldValue("rgstDt"),"YYYY-MM-DD"):""})]}),o.jsx("span",{style:{fontSize:"12px",color:"#8c8c8c",marginLeft:"1px"},children:n.getFieldValue("rgstUserId")??""})]})})]})})}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(L.BwgInput,{itemProps:{name:"title"},inputProps:{size:"large",placeholder:"제목을 입력하세요",style:{fontWeight:"bold"},variant:"borderless"}})})}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"15px"},children:o.jsx($e,{span:24,children:o.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",marginBottom:"8px"}})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"10px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{disabled:!0,options:Ff}})}),o.jsx($e,{span:10,children:o.jsx(L.BwgFormItem,{label:"메뉴 정보",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:o.jsx(p.Input,{disabled:!0})}),o.jsx(p.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:o.jsx(p.Input,{disabled:!0})})]})})}),o.jsx($e,{span:6,children:o.jsx(L.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"}})})]}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"10px"},children:o.jsx($e,{span:24,children:o.jsx(L.BwgFormItem,{label:"상태",name:"status",children:o.jsxs(p.Space,{children:[o.jsx(p.Button,{icon:o.jsx(X.ReloadOutlined,{}),type:u==="READY"?"primary":"default",onClick:()=>O("READY"),children:"대기"}),o.jsx(p.Button,{icon:o.jsx(X.UserAddOutlined,{}),onClick:E,type:u==="ASSIGNED"?"primary":"default",children:"담당자 지정"}),o.jsx(p.Button,{icon:o.jsx(X.ClockCircleOutlined,{}),type:u==="PROCESSING"?"primary":"default",onClick:()=>O("PROCESSING"),children:"처리중"}),o.jsx(p.Button,{icon:o.jsx(X.CheckOutlined,{}),onClick:()=>O("COMPLETED"),type:u==="COMPLETED"?"primary":"default",children:"처리완료"}),o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:()=>O("REJECTED"),type:u==="REJECTED"?"primary":"default",children:"반려"})]})})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"마감요청일자",name:"dueDt"},inputProps:{disabled:!0,format:"YYYY-MM-DD"}})}),o.jsx($e,{span:12,children:o.jsxs(p.Flex,{vertical:!0,gap:3,children:[o.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),o.jsx(p.Progress,{percent:z1[n.getFieldValue("status")],status:z1[n.getFieldValue("status")]>0?"active":"normal",size:"small",format:A=>`${A}%`})]})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgSearch,{itemProps:{label:"처리담당자",name:["prcsUserId","prcsUserNm"]},onSearch:E})}),o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"처리일자",name:"prcsDt"},inputProps:{disabled:!0,format:"YYYY-MM-DD"}})})]}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(Ph,{itemProps:{label:"내용",name:"content"}})})})]})})}),o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Wm,{boardMstrId:n.getFieldValue("boardMstrId"),isCompleted:h})})]})}),o.jsx(To,{ref:d,mode:"server",onServerPageChange:(A,_)=>{y.SCMBoardMstr0001(A,_)},pageSizeOptions:[10,20,50]})]})})})},Vf=[{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],Hf=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],F1={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},V1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},TU={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},MU=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n,i]=v.useState(!1),{searchBoxRef:a}=ct.useSearchBox(),{user:s}=it.useUserStore(),[l]=p.Form.useForm(),{openCorePopup:c}=ct.usePopup(),d=v.useRef(null),[u,f]=v.useState(!1),g=p.Form.useWatch("status",l)??l.getFieldValue("status")??"READY",m=u||g==="READY",[x,y]=v.useState(!1),w=g==="COMPLETED"||g==="REJECTED",b=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"글 번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,styleName:"center"},{fieldName:"menuNm",header:{text:"메뉴명"},width:100,styleName:"left"},{fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType",styleName:"center"},{fieldName:"title",header:{text:"제목"},width:200,styleName:"left"},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{fieldName:"status",header:{text:"상태"},width:80,renderer:"statusTag",styleName:"center"},{fieldName:"rgstUserId",header:{text:"작성자ID"},visible:!1},{fieldName:"rgstDt",header:{text:"작성일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert",styleName:"center"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:100,styleName:"left"},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"}],[]),j=v.useMemo(()=>({container:{indicator:!1}}),[]),P={onCellDblClicked(B,H){const T=H.itemIndex??-1;if(T<0)return;const N=B.getValues(T);N&&(l.setFieldsValue({...N}),f(!1),i(!0))}},E=v.useMemo(()=>({SCMBoardMstr0001:async(B,H)=>{const T=B||d.current?.currentPage||1,N=H||d.current?.pageSize||20,I={...a?.current?.getFormData(),sysCd:e,appCd:t,myArticle:"Y",pageNum:T,pageCount:N},R=await oe.callService("SCMBoardMstr0001",I,{isPopup:!0});R&&R.pageList&&(d.current?.setTotalData(R.pageCnt||0),r.current?.addAllData(R.pageList))},SCMBoardMstr0003:B=>{oe.callService("SCMBoardMstr0003",{sysCd:e,appCd:t,...B,status:"READY",rgstUserId:s?.userId,rgstUserNm:s?.userNm},{isPopup:!0}).then(H=>{l.resetFields(),E.SCMBoardMstr0001()}).catch(H=>{console.error("게시물 제출 실패:",H)})},SCMBoardMstr0004:B=>{oe.callService("SCMBoardMstr0004",{sysCd:e,appCd:t,boardMstrId:l.getFieldValue("boardMstrId"),...B},{isPopup:!0}).then(()=>{l.resetFields(),E.SCMBoardMstr0001()}).catch(H=>{console.error("게시물 변경 실패:",H)})}}),[a,l]),S=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{const R=B.getValue(H.index?.itemIndex,"type");I.render(o.jsx(p.Tag,{color:TU[R],children:Vf.find($=>$.value===R)?.label}))}),[]),O=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{const R=B.getValue(H.index?.itemIndex,"status");I.render(o.jsx(p.Tag,{color:F1[R],children:Hf.find($=>$.value===R)?.label}))}),[]),k=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{B.getValue(H.index?.itemIndex,"urgentYn")==="Y"?I.render(o.jsx(X.AlertTwoTone,{twoToneColor:"red"})):I.render(o.jsx(o.Fragment,{}))}),[]),M=()=>{try{l.validateFields().then(B=>{p.Modal.confirm({title:u?"등록 확인":"변경 확인",content:u?"게시물 내용 등록하시겠습니까?":"게시물 내용 변경하시겠습니까?",okText:u?"등록":"변경",cancelText:"취소",onOk:()=>{u?E.SCMBoardMstr0003(B):E.SCMBoardMstr0004(B),i(!1)}})})}catch(B){console.error("게시물 제출 실패:",B)}},A=()=>{c("CORE_PRGR_02",{callback:B=>{l.setFieldsValue({menuId:B.menuId,menuNm:B.menuNm})}})};v.useEffect(()=>{setTimeout(()=>{E.SCMBoardMstr0001()},100)},[E]);const _={ref:a,reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgRangePicker,{itemProps:{label:"작성일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:()=>{c("CORE_PRGR_02",{callback:B=>{a?.current?.setFormData({menuId:B.menuId,menuNm:B.menuNm})}})}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Vf,placeholder:"전체"}})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:Hf,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},D=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{E.SCMBoardMstr0001()}},{id:"new",label:"등록",onClick:()=>{f(!0),l.resetFields(),l.setFieldsValue({rgstUserId:s?.userId,rgstUserNm:s?.userNm,rgstDt:oe.now().format(),status:"READY"}),i(!0)}},{id:"edit",label:"변경",onClick:()=>{const B=r.current?.getCurrentIndex?.()??-1;if(B<0)return;const H=r.current?.vw?.getValues(B);H&&(l.setFieldsValue({...H}),f(!1),i(!0))}}]}),[E,l,r,s]);return o.jsx(kt,{searchBox:_,buttons:D,children:o.jsx(ze,{children:o.jsxs(De,{children:[o.jsx(Fe,{ref:r,type:"nrml",gridColumns:b,gridOptions:j,gridEvents:P,renderers:[{name:"tagType",renderer:S},{name:"statusTag",renderer:O},{name:"alert",renderer:k}]}),o.jsx(un,{title:`게시물 ${u?"등록":"변경"}`,open:n,onClose:()=>i(!1),showCloseButton:!1,size:"large",placement:"right",width:u?800:1200,extra:o.jsx(p.ConfigProvider,{theme:{components:{Button:{fontSize:13}}},children:o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:()=>i(!1),children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:M,children:u?"등록":"변경"})]})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:u?"100%":"70%",min:u?"100%":"60%",max:u?"100%":"80%",style:{paddingRight:u?"0px":"15px",overflowX:"hidden",overflowY:"hidden"},children:o.jsx(De,{children:o.jsxs(L.BwgForm,{form:l,onFinish:M,initialValues:{rgstUserId:s?.userId||"",rgstUserNm:s?.userNm||""},children:[o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(L.BwgInput,{itemProps:{name:"title"},inputProps:{size:"large",placeholder:"제목을 입력하세요",style:{fontWeight:"bold"},variant:"borderless"}})})}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"15px"},children:o.jsx($e,{span:24,children:o.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",marginBottom:"8px"}})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type",rules:[{required:!0}]},selectProps:{options:Vf,disabled:!m}})}),o.jsx($e,{span:16,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"],rules:[{required:!0}]},onSearch:A,readOnly:!m})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[!u&&o.jsx($e,{span:12,children:o.jsx(L.BwgFormItem,{label:"상태",children:o.jsx("div",{style:{marginBottom:4},children:l.getFieldValue("status")&&o.jsx(p.Tag,{color:F1[l.getFieldValue("status")],children:Hf.find(B=>B.value===l.getFieldValue("status"))?.label})})})}),o.jsx($e,{span:u?24:12,children:o.jsx(L.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"},inputProps:{disabled:!m}})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"마감요청일자",name:"dueDt",rules:[{required:!0}]},inputProps:{disabled:!m,format:"YYYY-MM-DD"}})}),!u&&o.jsx($e,{span:12,children:o.jsxs(p.Flex,{vertical:!0,gap:3,children:[o.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),o.jsx(p.Progress,{percent:V1[l.getFieldValue("status")],status:V1[l.getFieldValue("status")]>0?"active":"normal",size:"small",format:B=>`${B}%`})]})})]}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:o.jsx($e,{span:24,children:o.jsx(Ph,{border:!1,itemProps:{name:"content",rules:[{required:!0}]},editorProps:{isEditing:m&&!x,title:{title:o.jsxs(o.Fragment,{children:[o.jsx(X.EditOutlined,{style:{marginRight:"5px"}})," ","상세내용 작성"]}),children:m&&o.jsx(p.Button,{icon:o.jsx(X.EyeFilled,{}),onClick:()=>y(!x),children:"미리보기"})}}})})})]})})}),!u&&o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Wm,{boardMstrId:l.getFieldValue("boardMstrId"),isCompleted:w})})]})}),o.jsx(To,{ref:d,mode:"server",onServerPageChange:(B,H)=>{E.SCMBoardMstr0001(B,H)},pageSizeOptions:[10,20,50]})]})})})},RU=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Wf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Ea(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:RU(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Wf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Wf(e.orgSortOrd,0),orgOtptOrd:Wf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function AU(e){const t=new Set,r=e.map(Ea).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>t.has(l.deptCd)?!1:(t.add(l.deptCd),!0));r.sort((l,c)=>(l.deptLvl||0)-(c.deptLvl||0)||(l.orgSortOrd||0)-(c.orgSortOrd||0)||l.deptCd.localeCompare(c.deptCd));const n=new Map;for(const l of r)n.set(l.deptCd,{...l,children:[]});const i=[];for(const l of r){const c=n.get(l.deptCd),d=l.hrnkDeptCd;d&&n.has(d)?n.get(d).children.push(c):i.push(c)}const a=l=>{!l||l.length===0||(l.sort((c,d)=>c.deptCd.localeCompare(d.deptCd)),l.forEach(c=>a(c.children)))};a(i);const s=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(s)};if(i.forEach(s),i.length>1){const l=i.find(c=>c.deptCd==="D00");if(l)return[l]}return i}function IU(e){const t=e.map(Ea),r=t.filter(n=>n.isLeaf!=="Y").map(n=>n.deptCd);return r.length>200?t.filter(n=>(n.deptLvl||0)<=2).map(n=>n.deptCd):r}const qP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState([]),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState(!1),h=v.useCallback(async S=>{try{f(!0);const O=await oe.callService("SCMUTIL00103",{...e?.popupParams,...S}),k=Array.isArray(O?.data)?O.data:Array.isArray(O?.deptList)?O.deptList:Array.isArray(O)?O:[],M=AU(k);d(M);const A=IU(k);a(A);const _=M[0]?.deptCd||Ea(k.find(D=>Ea(D).deptLvl===1)||{}).deptCd||Ea(k[0]||{}).deptCd||"";l(_?[_]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{f(!1)}},[e?.popupParams]);v.useEffect(()=>{h()},[h]);const g=v.useCallback((S,O)=>{for(const k of S){if(k.deptCd===O)return k;if(k.children){const M=g(k.children,O);if(M)return M}}return null},[]),m=v.useMemo(()=>{const S=s[0];return S?g(c,S):null},[s,c,g]),x=v.useMemo(()=>{const S=k=>k.map(M=>({title:M.deptNm,key:M.deptCd,meta:M,children:M.children?S(M.children):void 0}));return S(c)},[c]),y=v.useMemo(()=>{const S=r.trim().toLowerCase();if(!S)return x;const O=k=>k.map(M=>{const A=M.meta,_=(A?.deptNm||"").toLowerCase().includes(S)||(A?.deptCd||"").toLowerCase().includes(S),D=M.children?O(M.children):void 0;return _||D&&D.length?{...M,children:D}:null}).filter(Boolean);return O(x)},[x,r]),w=v.useCallback(S=>{l(S.slice(0,1).map(String))},[]),b=v.useCallback(S=>a(S.map(String)),[]),j=v.useCallback((S,O)=>{if(S.stopPropagation(),!O.children||O.children.length===0)return;const k=i.includes(O.key);a(M=>k?M.filter(A=>A!==O.key):[...M,O.key])},[i]),P=v.useCallback(()=>l([]),[]),E={confirm:()=>{if(!m){p.message.error("부서를 선택해주세요.");return}const S={deptCd:m.deptCd,deptNm:m.deptNm,hrnkDeptCd:m.hrnkDeptCd,hrnkDeptNm:m.hrnkDeptNm,deptLvl:m.deptLvl,orgSortOrd:m.orgSortOrd},O=e?.config;O?.onSelect?O.onSelect(S):e?.config?.callback&&e.config.callback(JSON.stringify(S)),O?.onClose&&O.onClose(),e?.close?.()},cancel:()=>{const S=e?.config;S?.onCancel&&S.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{E.confirm()}}],popupEvent:E,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"70%",min:"70%",max:"75%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx(p.Row,{gutter:[16,16],children:o.jsx(p.Col,{span:24,children:o.jsx(p.Input,{placeholder:"부서명, 부서코드 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:S=>n(S.target.value)})})})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:u,children:o.jsx(p.Tree,{treeData:y,expandedKeys:i,selectedKeys:s,onSelect:w,onExpand:b,onDoubleClick:j,showLine:!0,showIcon:!1,selectable:!0,style:{overflow:"hidden"},titleRender:S=>{const O=S.meta;return o.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%",fontWeight:s.includes(S.key)?"bold":"normal"},children:[o.jsx("span",{children:O.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:O.deptCd})]})}})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,overflowY:"hidden",height:"100%"},children:[o.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:16,fontWeight:700},children:"선택된 부서"}),m?o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:14,border:"1px solid #e0e0e0",borderRadius:12,background:"#fafafa"},children:[o.jsx("div",{style:{width:42,height:42,borderRadius:"50%",border:"1px solid #e6e6e6",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:18,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:o.jsx(X.TeamOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:15,fontWeight:700,marginBottom:4},children:[m.deptNm," ",o.jsxs("span",{style:{color:"#8c8c8c",fontSize:12},children:["(",m.deptCd,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:2},children:["상위부서: ",m.hrnkDeptNm||"-"]})]}),o.jsx(p.Button,{type:"text",onClick:P,icon:o.jsx(X.RestOutlined,{style:{fontSize:24,color:"#FF6363"}})})]}):o.jsx("div",{style:{color:"#999",fontSize:14},children:"부서를 선택해주세요."})]})})]})})})})},NU=Object.freeze(Object.defineProperty({__proto__:null,default:qP},Symbol.toStringTag,{value:"Module"})),DU=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Uf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Pa(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:DU(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Uf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Uf(e.orgSortOrd,0),orgOtptOrd:Uf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function _U(e){const t=new Set,r=e.map(Pa).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>t.has(l.deptCd)?!1:(t.add(l.deptCd),!0));r.sort((l,c)=>(l.deptLvl||0)-(c.deptLvl||0)||(l.orgSortOrd||0)-(c.orgSortOrd||0)||l.deptCd.localeCompare(c.deptCd));const n=new Map;for(const l of r)n.set(l.deptCd,{...l,children:[]});const i=[];for(const l of r){const c=n.get(l.deptCd),d=l.hrnkDeptCd;d&&n.has(d)?n.get(d).children.push(c):i.push(c)}const a=l=>{!l||l.length===0||(l.sort((c,d)=>c.deptCd.localeCompare(d.deptCd)),l.forEach(c=>a(c.children)))};a(i);const s=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(s)};if(i.forEach(s),i.length>1){const l=i.find(c=>c.deptCd==="D00");if(l)return[l]}return i}function BU(e){const t=e.map(Pa),r=t.filter(n=>n.isLeaf!=="Y").map(n=>n.deptCd);return r.length>200?t.filter(n=>(n.deptLvl||0)<=2).map(n=>n.deptCd):r}const GP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState([]),[h,g]=v.useState(!1),[m,x]=v.useState([]),[y,w]=v.useState(!1),b=v.useCallback(async T=>{try{w(!0);const N=await oe.callService("SCMUTIL00103",{...e?.popupParams,...T}),I=Array.isArray(N?.data)?N.data:Array.isArray(N?.deptList)?N.deptList:Array.isArray(N)?N:[],R=_U(I);x(R);const $=BU(I);l($);const U=R[0]?.deptCd||Pa(I.find(V=>Pa(V).deptLvl===1)||{}).deptCd||Pa(I[0]||{}).deptCd||"";d(U?[U]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{w(!1)}},[e?.popupParams]);v.useEffect(()=>{b()},[b]);const j=v.useCallback((T,N)=>{for(const I of T){if(I.deptCd===N)return I;if(I.children){const R=j(I.children,N);if(R)return R}}return null},[m]),P=v.useMemo(()=>u.map(T=>{const N=j(m,T);if(!N)return null;const{children:I,...R}=N;return R}).filter(Boolean),[u,m,j]),E=v.useMemo(()=>{const T=N=>N.map(I=>({title:I.deptNm,key:I.deptCd,meta:I,children:I.children?T(I.children):void 0,isLeaf:!I.children||I.children.length===0}));return T(m)},[m]),S=v.useMemo(()=>{const T=r.trim().toLowerCase();if(!T)return E;const N=I=>I.map(R=>{const $=R.meta,U=($?.deptNm||"").toLowerCase().includes(T)||($?.deptCd||"").toLowerCase().includes(T),V=R.children?N(R.children):void 0;return U||V&&V.length>0?{...R,children:V}:null}).filter(Boolean);return N(E)},[E,r]),O=v.useCallback(T=>{const N=[],I=R=>{for(const $ of R)if($.deptCd===T&&$.children){const U=V=>{for(const F of V)N.push(F.deptCd),F.children&&U(F.children)};U($.children)}else $.children&&I($.children)};return I(m),N},[m]),k=v.useCallback((T,N)=>{let I=Array.isArray(T)?T:T?.checked??[];if(h&&N?.node?.key){const R=N.node.key,$=O(R);if(N.checked){const U=new Set(I);for(const V of $)U.add(V);I=Array.from(U)}else{const U=new Set([R,...$]);I=I.filter(V=>!U.has(V))}}f(I)},[h,O]),M=v.useCallback(T=>{const N=T.map(String);if(d(N),N.length>0){const I=N[0],R=(U,V)=>{for(const F of U){if(F.deptCd===V)return F.deptNm;if(F.children){const q=R(F.children,V);if(q)return q}}return null},$=R(m,I);$&&a($)}},[m]),A=v.useCallback(T=>l(T.map(String)),[]),_=v.useCallback((T,N)=>{if(T.stopPropagation(),N.children&&N.children.length>0){const I=s.includes(N.key);l(R=>I?R.filter($=>$!==N.key):[...R,N.key])}},[s]),D=v.useCallback(T=>{f(N=>N.filter(I=>I!==T))},[]),B=v.useCallback(()=>{f([])},[]),H={confirm:()=>{if(u.length===0){p.message.error("부서를 선택해주세요.");return}const N=Array.from(new Set(u)).map(R=>{const $=j(m,R);return $?{deptCd:$.deptCd,deptNm:$.deptNm,hrnkDeptCd:$.hrnkDeptCd,hrnkDeptNm:$.hrnkDeptNm}:null}).filter(Boolean),I=e?.config;I?.onSelect?I.onSelect(N):e?.config?.callback&&e.config.callback(JSON.stringify(N)),I?.onClose&&I.onClose(),e?.close?.()},cancel:()=>{const T=e?.config;T?.onCancel&&T.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{H.confirm()}}],popupEvent:H,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx("div",{style:{fontSize:14,color:"#666",padding:8,backgroundColor:"#f8f8f8",borderRadius:4},children:i}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:18,children:o.jsx(p.Input,{placeholder:"부서명, 부서장명, 부서코드 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:T=>n(T.target.value)})}),o.jsx(p.Col,{span:6,style:{justifyContent:"center",display:"flex",alignItems:"center"},children:o.jsx(p.Checkbox,{checked:h,onChange:T=>g(T.target.checked),children:"하위까지 선택"})})]})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:y,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:S,expandedKeys:s,selectedKeys:c,checkedKeys:u,checkable:!0,checkStrictly:!0,showLine:!0,showIcon:!1,selectable:!0,onSelect:M,onExpand:A,onCheck:k,onDoubleClick:_,style:{overflow:"hidden"},titleRender:T=>{const N=T.meta;return o.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%"},children:[o.jsx("span",{style:{fontWeight:c.includes(T.key)?"bold":"normal"},children:N.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:N.deptCd})]})}})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,overflowY:"hidden"},children:[o.jsxs("div",{style:{marginBottom:12,display:"flex",alignItems:"center",gap:8},children:[o.jsxs("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:["선택된 부서 (",P.length,"개)"]}),P.length>0&&o.jsx("button",{onClick:B,style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",fontSize:12,padding:4},title:"전체 해제",children:"전체 해제"})]}),o.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"flex-start",minHeight:48},children:P.length===0?o.jsx("div",{style:{color:"#999",fontSize:14},children:"선택된 부서가 없습니다."}):P.map(T=>o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,padding:"4px 8px",borderRadius:999,border:"1px solid #e6e6e6",background:"#fafafa",lineHeight:1.1,cursor:"default",maxWidth:260},title:`${T.deptNm}`,children:[o.jsx("span",{style:{width:18,height:18,borderRadius:"50%",border:"1px solid #e6e6e6",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:o.jsx(X.TeamOutlined,{})}),o.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",gap:2,overflow:"hidden"},children:[o.jsx("span",{style:{fontSize:13,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:T.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#8c8c8c",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:T.deptCd})]}),o.jsx("button",{onClick:()=>D(T.deptCd),style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",padding:2,lineHeight:0},"aria-label":`${T.deptNm} 선택 해제`,title:"선택 해제",children:"×"})]},T.deptCd))})]})})]})})})})},$U=Object.freeze(Object.defineProperty({__proto__:null,default:GP},Symbol.toStringTag,{value:"Module"})),XP=({popup:e,onClose:t})=>{const[r,n]=v.useState([]),[i,a]=v.useState([]),[s,l]=v.useState([]),[c,d]=v.useState(!1),[u,f]=v.useState([]),[h,g]=v.useState(null),m=v.useRef(null),[x,y]=v.useState(""),[w,b]=v.useState([]),[j,P]=v.useState(!1),[E,S]=v.useState([]),O=v.useCallback(R=>{const $=[...R].sort((q,ie)=>q.deptLvl-ie.deptLvl||q.orgSortOrd-ie.orgSortOrd||q.deptCd.localeCompare(ie.deptCd)),U=new Map;$.forEach(q=>U.set(q.deptCd,{...q,children:[]}));const V=[];$.forEach(q=>{const ie=U.get(q.deptCd),ue=q.hrnkDeptCd;ue&&U.has(ue)?U.get(ue).children.push(ie):V.push(ie)});const F=q=>{!q.children||q.children.length===0?delete q.children:q.children.forEach(F)};return V.forEach(F),V},[]),k=v.useCallback(async R=>{if(R)try{const $=await oe.callService("SCMUTIL00106",{...e?.popupParams,deptCds:R},{showLoading:!1}),U=Array.isArray($?.empList)&&$.empList||[];f(U)}catch($){console.error("직원 목록 로딩 실패:",$),p.message.error("직원 목록을 불러오는 중 오류가 발생했습니다.")}},[e?.popupParams]);v.useEffect(()=>{m.current=k},[k]);const M=v.useCallback(async(R,$)=>{try{const U={...e?.popupParams,showLoading:!1};R&&(U.keyword=R),$&&$.length>0&&(U.deptCds=$);const V=await oe.callService("SCMUTIL00106",U,{showLoading:!1});b(V?.empList||[])}catch(U){console.error("검색 실패:",U),p.message.error("검색 중 오류가 발생했습니다."),b([])}},[e?.popupParams]),A=v.useCallback(async()=>{d(!0);try{const R=await oe.callService("SCMUTIL00103",{...e?.popupParams},{showLoading:!1}),$=Array.isArray(R?.deptList)&&R.deptList||[];if($.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const U=O($);l(U);const V=$.filter(q=>Number(q.deptLvl)<=2).map(q=>String(q.deptCd));n(V);const F=U[1];F&&m.current&&(a([F.deptCd]),m.current([F.deptCd]))}catch(R){console.error("부서 목록 로딩 실패:",R),p.message.error("부서 목록을 불러오는 중 오류가 발생했습니다.")}finally{d(!1)}},[O,e?.popupParams]);v.useEffect(()=>{A()},[A]);const _=v.useMemo(()=>{const R=$=>$.map(U=>({title:U.deptNm,key:U.deptCd,children:U.children?R(U.children):void 0,isLeaf:!U.children||U.children.length===0}));return R(s)},[s]),D=v.useCallback(R=>{h&&h.empNo===R.empNo?g(null):g(R)},[h]),B=v.useCallback(R=>{const $=R.map(String);a($);const U=(F,q)=>{for(const ie of F){if(ie.deptCd===q)return{deptCd:ie.deptCd,deptNm:ie.deptNm};if(ie.children){const ue=U(ie.children,q);if(ue)return ue}}return null};if(!$[0])return;const V=U(s,$[0]);if(V&&(k([V.deptCd]),j)){if(E.some(q=>q.deptCd===V.deptCd))return;if(E.length>=5){p.message.warning("부서는 최대 5개까지 선택할 수 있습니다.");return}S(q=>[...q,V])}},[s,k,j,E]),H=v.useCallback(R=>{n(R.map(String))},[]),T=v.useCallback(async R=>{const $=R.trim();y($);const U=j&&E.length>0?E.map(V=>V.deptCd):[];await M($,U)},[M,j,E]),N=v.useCallback(R=>{S($=>$.filter(U=>U.deptCd!==R))},[]),I={confirm:()=>{if(h){const R=e?.config;R?.onSelect?R.onSelect(h):e?.popupParams?.onSelect?e.popupParams.onSelect(h):e?.config?.callback&&e.config.callback(JSON.stringify(h,null,2)),R?.onClose&&R.onClose(),e?.close?.()}else p.message.error("사원을 선택해주세요.")},cancel:()=>{const R=e?.config;R?.onCancel&&R.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{I.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"55%",min:"20%",max:"80%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:o.jsxs(p.Flex,{gap:12,vertical:!0,children:[o.jsx(Le,{title:"조직도",marginBottom:0}),o.jsx(p.Input.Search,{placeholder:"이름, 소속, 전화번호 검색",prefix:o.jsx(X.SearchOutlined,{}),value:x,allowClear:!0,enterButton:"검색",onChange:R=>{y(R.target.value)},onSearch:T}),o.jsxs(p.Flex,{gap:8,align:"center",style:{marginLeft:6},children:[o.jsx(p.Switch,{checked:j,onChange:R=>{P(R),R||S([])}}),o.jsx("span",{style:{fontSize:"14px"},children:"부서 안에서 검색하기"})]}),j&&o.jsx(p.Flex,{gap:4,wrap:"wrap",style:{margin:4},children:E.length>0?o.jsx(o.Fragment,{children:E.slice(0,5).map(R=>o.jsx(p.Tag,{closable:!0,onClose:()=>N(R.deptCd),children:R.deptNm},R.deptCd))}):o.jsx("span",{style:{fontSize:"12px",color:"#999"},children:"트리에서 부서를 선택하면 조건에 추가됩니다."})})]})}),o.jsx("div",{style:{padding:"16px",overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:c,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:_,expandedKeys:r,selectedKeys:i,onSelect:B,onExpand:H,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:R=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontWeight:i.includes(R.key)?"bold":"normal",display:"inline-block",width:"100%"},children:R.title})})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:"16px",overflowY:"hidden"},children:[o.jsx("div",{style:{marginBottom:"16px"},children:o.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px",fontWeight:"bold"},children:x?"검색 결과":""})}),o.jsxs("div",{style:{overflow:"hidden",height:"100%"},children:[(x?w:u).map(R=>o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"12px",border:"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:h&&h.crprCd===R.crprCd&&h.wkplCd===R.wkplCd&&h.empNo===R.empNo&&h.jbpsCd===R.jbpsCd&&h.jbgdCd===R.jbgdCd&&h.empMarkOrd===R.empMarkOrd?"#efebff":"white"},onClick:()=>D(R),children:[o.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"},onClick:$=>{$.stopPropagation(),D(R)},children:h&&h.crprCd===R.crprCd&&h.wkplCd===R.wkplCd&&h.empNo===R.empNo&&h.jbpsCd===R.jbpsCd&&h.jbgdCd===R.jbgdCd&&h.empMarkOrd===R.empMarkOrd?o.jsx(X.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),o.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",fontSize:"18px",color:"#666"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px"},children:[R.empNm,o.jsxs("span",{style:{fontSize:"12px",fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",R.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"2px"},children:[R.deptNm," (",R.deptCd,") | 직급:"," ",R.jbpsCd," | 등급: ",R.jbgdCd]})]})]},`emp-${R.crprCd}-${R.wkplCd}-${R.empNo}-${R.jbpsCd}-${R.jbgdCd}-${R.empMarkOrd}`)),(x?w:u).length===0&&o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:x?"검색버튼이나 엔터키를 눌러주세요.":"해당 부서에 직원이 없습니다."})]})]})})]})})})})},LU=Object.freeze(Object.defineProperty({__proto__:null,default:XP},Symbol.toStringTag,{value:"Module"})),ZP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState([]),[h,g]=v.useState(!1),[m,x]=v.useState({}),y=v.useCallback(async()=>{try{g(!0);const T=await oe.callService("SCMUTIL00105",{...e?.popupParams});console.log("📊 조직도 API 응답:",T);const N=Array.isArray(T?.data)?T.data:Array.isArray(T?.orgnList)?T.orgnList:Array.isArray(T)?T:[];if(N.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const I=w(N);console.log("🌳 구성된 조직도 트리:",I),f(I);const R=N.filter($=>$.deptLvl<=2).map($=>$.deptCd);if(l(R),I.length>0){const $=I[0];d([$.deptCd]),a($.deptNm)}console.log("✅ 조직도 데이터 로딩 완료")}catch(T){console.error("❌ 조직도 데이터 로딩 실패:",T),p.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{g(!1)}},[e?.popupParams]),w=v.useCallback(T=>{const N=[...T].sort((U,V)=>U.deptLvl-V.deptLvl||U.orgSortOrd-V.orgSortOrd||U.deptCd.localeCompare(V.deptCd)),I=new Map;for(const U of N)I.set(U.deptCd,{...U,children:[]});const R=[];for(const U of N){const V=I.get(U.deptCd),F=U.hrnkDeptCd;F&&I.has(F)?I.get(F).children.push(V):R.push(V)}const $=U=>{if(!U.children||U.children.length===0){delete U.children;return}U.children.forEach($)};return R.forEach($),R},[]);v.useEffect(()=>{y()},[y]);const b=v.useMemo(()=>{const T=R=>{let $=[];return R.forEach(U=>{U.employees&&($=$.concat(U.employees)),U.children&&($=$.concat(T(U.children)))}),$},N=T(u),I=N.filter((R,$,U)=>$===U.findIndex(V=>V.empNo===R.empNo));return console.log(`👥 전체 사원 수: ${N.length}, 중복 제거 후: ${I.length}`),I},[u]),j=v.useMemo(()=>{const T=N=>N.map(I=>({title:I.deptNm,key:I.deptCd,children:I.children?T(I.children):void 0,isLeaf:!I.children||I.children.length===0}));return T(u)},[u]),P=v.useMemo(()=>{if(!r.trim())return j;const T=N=>N.map(I=>{const R=I.title.toLowerCase().includes(r.toLowerCase()),$=I.children?T(I.children):void 0;return R||$&&$.length>0?{...I,children:$}:null}).filter(Boolean);return T(j)},[j,r]),E=v.useMemo(()=>{if(!r.trim()){const T=U=>{let V=[];return U.forEach(F=>{F.employees&&(V=V.concat(F.employees)),F.children&&(V=V.concat(T(F.children)))}),V},N=(U,V)=>{for(const F of U){if(F.deptCd===V){let q=[...F.employees||[]];return F.children&&(q=q.concat(T(F.children))),q}if(F.children){const q=N(F.children,V);if(q.length>0)return q}}return[]},I=c[0];if(!I)return[];const R=N(u,I),$=R.filter((U,V,F)=>V===F.findIndex(q=>q.empNo===U.empNo));return console.log(`🔍 선택된 부서: ${I}, 반환된 사원 수: ${R.length}, 중복 제거 후: ${$.length}`),$}return b.filter(T=>T.empNm.toLowerCase().includes(r.toLowerCase())||T.empNo.toLowerCase().includes(r.toLowerCase())||T.deptNm.toLowerCase().includes(r.toLowerCase())||T.jbpsCd.includes(r)||T.jbgdCd.includes(r)||T.emplyStCd.includes(r))},[r,c,b,u]),S=v.useCallback(T=>{x(N=>{const I={...N};return I[T.empNo]?delete I[T.empNo]:I[T.empNo]=T,I})},[]),O=v.useCallback(T=>{x(N=>{const I={...N};return delete I[T],I})},[]),k=v.useCallback(()=>x({}),[]),M=v.useCallback(()=>{x(T=>{const N={...T};for(const I of E)N[I.empNo]=I;return N})},[E]),A=v.useCallback(()=>{x(T=>{const N={...T};for(const I of E)delete N[I.empNo];return N})},[E]),_=v.useCallback(T=>{const N=T.map(String);if(console.log(`🌳 트리 선택: ${N.join(", ")}`),d(N),N.length>0){const I=N[0],R=(U,V)=>{for(const F of U){if(F.deptCd===V)return F.deptNm;if(F.children){const q=R(F.children,V);if(q)return q}}return null},$=R(u,I);$&&a($)}},[u]),D=v.useCallback(T=>{l(T.map(String))},[]),B=v.useCallback((T,N)=>{if(T.stopPropagation(),!N.children||!N.children.length)return;const I=s.includes(N.key);l(R=>I?R.filter($=>$!==N.key):[...R,N.key])},[s]),H={confirm:()=>{const T=Object.values(m).map(I=>({crprCd:I.crprCd,wkplCd:I.wkplCd,empNo:I.empNo,deptCd:I.deptCd,deptNm:I.deptNm,empNm:I.empNm,jbpsCd:I.jbpsCd,jbgdCd:I.jbgdCd,empMarkOrd:I.empMarkOrd,emplyStCd:I.emplyStCd}));if(T.length===0){p.message.error("직원을 선택해주세요.");return}const N=e?.config;N?.onSelect?N.onSelect(T):e?.config?.callback&&e.config.callback(JSON.stringify(T)),N?.onClose&&N.onClose(),e?.close?.()},cancel:()=>{const T=e?.config;T?.onCancel&&T.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{H.confirm()}}],popupEvent:H,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{style:{height:"100%"},children:[o.jsx(p.Splitter.Panel,{defaultSize:"50%",min:"50%",max:"70%",children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"35%",max:"75%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx(p.Input,{placeholder:"이름, 소속, 직급/직위, 사번 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:T=>n(T.target.value)})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:h,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:P,expandedKeys:s,selectedKeys:c,onSelect:_,onExpand:D,onDoubleClick:B,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:T=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:4,fontWeight:c.includes(T.key)?"bold":"normal",display:"inline-block",width:"100%"},children:T.title})})})})]}),o.jsx(p.Splitter.Panel,{children:o.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:r?"검색 결과":`${i} 사용자`}),o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx(p.Button,{size:"small",onClick:M,children:"현재 목록 전체 선택"}),o.jsx(p.Button,{size:"small",onClick:A,children:"현재 목록 전체 해제"})]})]}),o.jsx(p.Divider,{style:{margin:"8px 0"}}),o.jsxs("div",{style:{overflowY:"auto"},children:[E.map(T=>{const N=!!m[T.empNo];return o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,cursor:"pointer",background:N?"#efebff":"#fff"},onClick:()=>S(T),children:[o.jsx("div",{style:{marginRight:12,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"},onClick:I=>{I.stopPropagation(),S(T)},children:N?o.jsx(X.CheckCircleFilled,{style:{fontSize:20,color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:20,color:"#d9d9d9"}})}),o.jsx("div",{style:{width:36,height:36,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:16,color:"#666",flex:"0 0 auto"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:14,fontWeight:600,marginBottom:2},children:[T.empNm,o.jsxs("span",{style:{fontSize:12,fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",T.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[T.deptNm," (",T.deptCd,") | 직급: ",T.jbpsCd," ","| 등급: ",T.jbgdCd]})]})]},`emp-${T.crprCd}-${T.wkplCd}-${T.empNo}-${T.jbpsCd}-${T.jbgdCd}-${T.empMarkOrd}`)}),E.length===0&&o.jsx("div",{style:{textAlign:"center",padding:32,color:"#999",fontSize:14},children:r?"검색 결과가 없습니다.":"해당 부서에 사용자 없음"})]})]})})]})}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx(Le,{title:`선택된 사용자 (${Object.keys(m).length})`}),o.jsx(p.Button,{type:"link",size:"small",onClick:k,children:"전체 해제"})]}),o.jsx(p.Divider,{style:{margin:"8px 0"}}),o.jsxs("div",{style:{overflowY:"auto",flex:1},children:[Object.values(m).map(T=>o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,background:"#fafafa"},children:[o.jsx("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:10,color:"#666"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:[T.empNm,o.jsxs("span",{style:{fontSize:11,fontWeight:"normal",color:"#666",marginLeft:"6px"},children:["(",T.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[T.deptNm," (",T.deptCd,") | 직급: ",T.jbpsCd," | 등급: ",T.jbgdCd]})]}),o.jsx(p.Button,{type:"text",shape:"circle",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>O(T.empNo)})]},`selected-${T.crprCd}-${T.wkplCd}-${T.empNo}-${T.jbpsCd}-${T.jbgdCd}-${T.empMarkOrd}`)),Object.keys(m).length===0&&o.jsx("div",{style:{color:"#999",fontSize:14,textAlign:"center",padding:24},children:"선택된 사용자가 없습니다."})]})]})})]})})})})},zU=Object.freeze(Object.defineProperty({__proto__:null,default:ZP},Symbol.toStringTag,{value:"Module"})),{Text:H1,Title:FU}=p.Typography,QP=({popup:e})=>{const[t,r]=v.useState(xl()),[n,i]=v.useState(xl()),[a,s]=v.useState([]),[l,c]=v.useState([]),[d,u]=v.useState("month");it.useCodeStore();const{token:f}=p.theme.useToken(),h=(w,b,j=d)=>{const P=b.filter(E=>{if(j==="year"){const S=E.stndYmd.substring(0,6),O=w.format("YYYYMM");return S===O}else{const S=w.format("YYYYMMDD");return E.stndYmd===S}});s(P)},g=w=>{r(w),h(w,l,d)},m=(w,b)=>{i(w),u(b),y.SCMHLDY00101(b,w)};v.useEffect(()=>{y.SCMHLDY00101()},[]);const x=w=>{const b=l.filter(j=>{if(d==="year"){const P=j.stndYmd.substring(0,6),E=w.format("YYYYMM");return P===E}else{const P=w.format("YYYYMMDD");return j.stndYmd===P}});return b.length>0?o.jsx("div",{style:{position:"absolute",bottom:"1px",left:"1px",right:"1px",height:"3px",display:"flex",gap:"1px"},children:b.map((j,P)=>o.jsx("div",{style:{flex:1,height:"3px",background:j.hldyYn==="Y"?f.colorError:f.colorSuccess,borderRadius:"1px"}},P))}):null},y={SCMHLDY00101:async(w=d,b=t)=>{try{let j;w==="year"?j=b.format("YYYY"):j=b.format("YYYYMM");const P=await oe.callService("SCMHLDY00101",{crprCd:oe.getUserInfo()?.crprCd||"",sysCd:__SYS_CD__,stndYmd:j});c(P.sub||[]),h(b,P.sub||[],w)}catch(j){console.error("휴일 데이터 로드 실패:",j),p.message.error("휴일 데이터를 불러오는데 실패했습니다.")}}};return o.jsx(di,{popup:e,children:o.jsx(ze,{children:o.jsx(De,{children:o.jsxs(p.Row,{gutter:f.padding,style:{marginTop:f.padding},children:[o.jsx(p.Col,{span:12,children:o.jsx(p.Card,{title:o.jsxs(p.Space,{children:[o.jsx(X.CalendarOutlined,{}),o.jsx("span",{children:"휴일 달력"})]}),style:{height:"500px"},children:o.jsx(p.Calendar,{fullscreen:!1,value:t,onSelect:g,onPanelChange:m,cellRender:x,style:{height:"400px"},mode:d})})}),o.jsx(p.Col,{span:12,children:o.jsx(p.Card,{title:o.jsxs(p.Space,{children:[o.jsx(X.CalendarOutlined,{}),o.jsx("span",{children:d==="year"?`${t.format("YYYY년 MM월")} 휴일 목록`:`${t.format("YYYY년 MM월 DD일")} 휴일 목록`})]}),style:{height:"500px"},children:o.jsx("div",{style:{height:"400px",overflowY:"auto"},children:a.length>0?o.jsx(p.Space,{direction:"vertical",style:{width:"100%"},size:"small",children:a.map((w,b)=>o.jsx(p.Card,{size:"small",style:{border:`${f.lineWidth}px solid ${f.colorBorder}`,borderRadius:f.borderRadiusLG},children:o.jsxs("div",{style:{padding:`${f.paddingXS}px 0`},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:f.paddingXS},children:[o.jsx(FU,{level:5,style:{margin:0,color:f.colorPrimary},children:w.hldyDscr||"휴일명 미입력"}),w.hldyYn==="Y"&&o.jsx(p.Tag,{color:f.colorSuccess,children:"휴일"})]}),o.jsx("div",{style:{marginBottom:f.paddingXXS},children:o.jsx(H1,{type:"secondary",style:{fontSize:f.fontSizeSM},children:xl(w.stndYmd).format("YYYY년 MM월 DD일 dddd")})}),w.hldyDscr&&o.jsx("div",{children:o.jsx(H1,{style:{fontSize:f.fontSizeSM+1},children:w.hldyDscr})})]})},b))}):o.jsx(p.Empty,{description:"선택된 날짜에 등록된 휴일이 없습니다.",style:{marginTop:"100px"}})})})})]})})})})},VU=Object.freeze(Object.defineProperty({__proto__:null,default:QP},Symbol.toStringTag,{value:"Module"})),JP=({popup:e})=>{const t=v.useRef(null),[r,n]=v.useState(""),{menuList:i}=it.useMenuModelStore(),[a,s]=v.useState(void 0),[l,c]=v.useState(null),d=v.useCallback(b=>{const j=[],P=E=>{E.forEach(S=>{S.children&&S.children.length>0&&(j.push(S.menuId),P(S.children))})};return P(b),j},[]),[u,f]=v.useState(()=>d([])),h=v.useCallback((b,j,P)=>{const E=(j||"").trim().toLowerCase(),S=k=>{const M=!E||k.menuNm?.toLowerCase().includes(E)||k.menuId?.toLowerCase().includes(E),A=!P||k.sysCd===P;return M&&A},O=k=>k.map(M=>{const A=M.children?O(M.children):[];return S(M)||A.length>0?{...M,children:A}:null}).filter(Boolean);return O(b||[])},[]),g=v.useMemo(()=>h(i,r,a),[i,r,a,h]),m=v.useCallback(b=>b.map(j=>({key:j.menuId,label:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(!j.children||j.children.length===0)&&o.jsx(p.Tag,{color:"blue",style:{margin:0},children:j.menuId}),o.jsx("span",{children:j.menuNm})]}),children:j.children&&j.children.length>0?m(j.children):void 0,icon:x(j.iconCd,j.menuGbCd)})),[]),x=(b,j)=>{if(b){const P=Ti[b];if(P)return o.jsx(P,{})}if(j)switch(j){case"CMPRGRM":return o.jsx(Ti.HomeOutlined,{});case"CMPRGRS":return null;case"CMPRGRP":return null;default:return null}return null},y=v.useCallback((b,j)=>{for(const P of b){if(P.menuId===j)return P;if(P.children&&P.children.length>0){const E=y(P.children,j);if(E)return E}}return null},[]);v.useEffect(()=>{r&&f(d(g))},[r,g,d]);const w=[{id:"confirm",label:"확인",onClick:()=>{if(!l)return;const b=y(g,l);b&&(e?.config?.callback?.({menuId:b.menuId,menuNm:b.menuNm}),e?.close?.())}}];return o.jsx(di,{popup:e,buttons:w,children:o.jsx(ze,{children:o.jsxs(De,{border:!1,children:[o.jsx(ko,{ref:t,reqRows:o.jsx(o.Fragment,{children:o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템 코드"},selectProps:{options:[{label:"공통",value:"CM"},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"HR"},{label:"K-업무지원",value:"KS"}],onChange:b=>s(b),placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(p.Input,{placeholder:"메뉴 이름, ID 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:b=>{n(b.target.value)}})})]})})}),o.jsx(p.Menu,{mode:"inline",theme:"light",items:m(g),openKeys:u,onOpenChange:f,onClick:({key:b})=>{c(String(b))},style:{overflow:"auto"}})]})})})},HU=Object.freeze(Object.defineProperty({__proto__:null,default:JP},Symbol.toStringTag,{value:"Module"})),WU=[{label:"정확도 우선",value:"none"},{label:"도로명 포함",value:"road"},{label:"지번 포함",value:"location"}],UU=["SELECT","INSERT","UPDATE","DELETE","DROP","CREATE","ALTER","TRUNCATE","EXEC","EXECUTE","UNION","OR","AND","WHERE","FROM","JOIN","INNER","OUTER","LEFT","RIGHT","FULL","ON","AS","IS","NULL","NOT","IN","LIKE","BETWEEN","EXISTS","HAVING","GROUP","BY","ORDER","ASC","DESC","DISTINCT","TOP","LIMIT","OFFSET","CASE","WHEN","THEN","ELSE","END","IF","WHILE","FOR","DECLARE","SET","BEGIN","COMMIT","ROLLBACK","TRANSACTION","GRANT","REVOKE","DENY","TABLE","VIEW","INDEX","PROCEDURE","FUNCTION","TRIGGER","DATABASE","SCHEMA","USER","ROLE","BACKUP","RESTORE"],eO=({popup:e,onClose:t})=>{const r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState(null),[u,f]=v.useState(!1),[h,g]=v.useState(0),[m,x]=v.useState("none"),[y,w]=v.useState(!1),b=v.useMemo(()=>o.jsxs("div",{style:{maxWidth:"400px"},children:[o.jsx(p.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"검색 가이드"}),o.jsxs(p.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 방법"}),o.jsx("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:"도로명, 지번, 건물명, 우편번호로 검색할 수 있습니다."})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 예시"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:['- 도로명: "논현로", "강남대로"',o.jsx("br",{}),'- 지번: "논현동 234", "역삼동 123"',o.jsx("br",{}),'- 건물명: "태성빌딩", "강남역"',o.jsx("br",{}),'- 우편번호: "06234", "12345"']})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 정렬 옵션"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 정확도 우선: 검색어와 가장 유사한 결과 우선",o.jsx("br",{}),"- 도로명 포함: 도로명 주소를 포함한 결과 우선",o.jsx("br",{}),"- 지번 포함: 지번 주소를 포함한 결과 우선"]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 팁"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 검색어는 최소 2글자 이상 입력해주세요.",o.jsx("br",{}),"- 공백은 자동으로 제거됩니다.",o.jsx("br",{}),"- 검색 결과를 클릭하여 주소를 선택하세요.",o.jsx("br",{}),"- 검색하기 위해 검색 버튼이나 엔터키를 눌러주세요."]})]})]})]}),[]),j=v.useMemo(()=>o.jsxs("div",{style:{maxWidth:"420px",maxHeight:"600px",overflowY:"auto"},children:[o.jsx(p.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"에러 메시지 안내"}),o.jsxs(p.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[o.jsxs("div",{style:{fontSize:"12px",color:"#666"},children:[o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0005"}),": 검색어가 입력되지 않았습니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0006"}),": 주소를 상세히 입력해 주시기 바랍니다.",o.jsx("div",{style:{marginLeft:40,fontSize:"11px",color:"#999"},children:"(예시: 여의나루로 76, 문현금융로 40)"})]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0008"}),": 검색어는 한글자 이상 입력되어야 합니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0009"}),": 검색어는 문자와 숫자 같이 입력되어야 합니다. (숫자만 검색 불가)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0010"}),": 검색어가 너무 깁니다. (한글40자, 영문,숫자 80자 이하)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0011"}),": 검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자10자 이하)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0012"}),": 특수문자+숫자만으로는 검색이 불가능 합니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0013"}),": SQL 예약어 또는 특수문자( %,=,",">",",","<",",[,] )는 검색이 불가능 합니다."]})]}),o.jsxs("div",{style:{marginTop:12,paddingTop:8,borderTop:"1px solid #f0f0f0"},children:[o.jsx(p.Typography.Text,{type:"warning",style:{fontSize:"12px",fontWeight:"bold"},children:"관리자 문의 바랍니다"}),o.jsxs("div",{style:{marginTop:6,fontSize:"11px",color:"#999"},children:["-999: 시스템에러",o.jsx("br",{}),"E0001: 승인되지 않은 KEY 입니다.",o.jsx("br",{}),"E0002: 승인되지 않은 사이트 입니다.",o.jsx("br",{}),"E0003: 정상적인 경로로 접속하시기 바랍니다.",o.jsx("br",{}),"E0014: 개발승인키 기간이 만료되어 서비스를 이용하실 수 없습니다."]})]})]})]}),[]);v.useEffect(()=>{(async()=>{try{const M=await oe.callService("SCMUTIL00202",{},{showLoading:!1});w(M?.result===1)}catch{w(!1)}})()},[]);const P=v.useCallback(async(k,M)=>{if(i.trim().length<2){p.message.warning("검색어는 2글자 이상 입력해주세요.");return}const A=i.replace(/(시|도|구|군)(?=[가-힣0-9])/g,"$1 ").replace(/\s+/g," ").trim(),_=A.split(/\s+/).filter(N=>N.length>0);if(_.length===1&&/[시도구군]$/.test(_[0])){p.message.warning("주소를 상세히 입력해 주시기 바랍니다.");return}const B=/[가-힣]/.test(A)?40:80,H=/^\d+$/.test(A);if(A.length>B){p.message.warning("검색어가 너무 깁니다. (한글 40자, 영문/숫자 80자 이하)");return}if(/\d{11,}/.test(A)){p.message.warning("검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자 10자 이하)");return}if(H&&A.length!==5||/^[0-9\W_]+$/.test(A)&&/\d/.test(A)&&!/[A-Za-z가-힣]/.test(A)&&!H){p.message.warning("특수문자+숫자만으로는 검색이 불가능 합니다.");return}if(UU.some(N=>new RegExp(`\\b${N}\\b`,"i").test(A))||/[[\]%=><]/.test(A)){p.message.warning("SQL 예약어 또는 특수문자( %,=,>,<,[,] )는 검색이 불가능 합니다.");return}f(!0);try{const N=k||r.current?.currentPage||1,I=M||r.current?.pageSize||10,R={keyword:A,currentPage:N,countPerPage:I,firstSort:m,...e?.popupParams},$=await oe.callService("SCMUTIL00201",R,{showLoading:!1});if($.errorCode!=="0"){p.message.error($.errorCode+" : "+$.errorMessage);return}const U=$?.pageList&&Array.isArray($.pageList)&&$.pageList||[],V=$?.pageCnt||0;l(U),g(V),r.current?.setTotalData(V),setTimeout(()=>{n.current&&(n.current.scrollTop=0)},0),(U.length===0||V===0)&&p.message.info("검색 결과가 없습니다.")}catch(N){console.error("주소 검색 실패:",N),p.message.error("주소 검색 중 오류가 발생했습니다."),l([]),g(0),r.current?.setTotalData(0)}finally{f(!1)}},[i,m,e?.popupParams]),E=v.useCallback(()=>{r.current?r.current.setPage(1):P(1,10)},[P]),S=v.useCallback(k=>{c&&c.bdMgtSn===k.bdMgtSn?d(null):d(k)},[c]),O=v.useMemo(()=>({confirm:()=>{if(!c){p.message.error("주소를 선택해주세요.");return}const k={...c},M=e?.config;M?.onSelect?M.onSelect(k):e?.popupParams?.onSelect?e.popupParams.onSelect(k):e?.config?.callback&&e.config.callback(k),M?.onClose&&M.onClose(),e?.close?.()}}),[c,e]);return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{O.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsxs(De,{border:!1,style:{paddingBottom:10},children:[o.jsx("div",{style:{paddingInline:"16px"},children:o.jsxs(p.Flex,{gap:12,vertical:!0,style:{marginBottom:"6px"},children:[o.jsxs(p.Flex,{gap:16,align:"center",justify:"space-between",wrap:!0,style:{width:"100%"},children:[y&&o.jsx(p.Radio.Group,{value:m,onChange:k=>{x(k.target.value)},children:WU.map(k=>o.jsx(p.Radio,{value:k.value,children:k.label},k.value))}),o.jsxs(p.Flex,{gap:16,wrap:!0,align:"center",justify:"flex-end",children:[o.jsx(p.Popover,{content:b,title:null,trigger:"click",placement:"right",children:o.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#1890ff",cursor:"pointer",fontSize:"13px"},children:[o.jsx(X.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"검색 가이드"]})}),o.jsx(p.Popover,{content:j,title:null,trigger:"click",placement:"right",children:o.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#fa8c16",cursor:"pointer",fontSize:"13px"},children:[o.jsx(X.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"에러 메시지 안내"]})})]})]}),o.jsx(p.Input.Search,{placeholder:"도로명, 지번, 건물명, 우편번호로 검색",prefix:o.jsx(X.SearchOutlined,{}),value:i,allowClear:!0,enterButton:"검색",onChange:k=>{a(k.target.value)},onSearch:E,style:{flex:1}})]})}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[s.length>0&&o.jsx("div",{style:{padding:"16px 16px 12px 16px"},children:o.jsxs("h3",{style:{fontSize:"16px",fontWeight:"bold"},children:["검색 결과 (",h,"개)"]})}),o.jsx("div",{ref:n,style:{paddingInline:"15px",overflowY:"auto",flex:1},children:o.jsx(p.Spin,{spinning:u,children:s.length>0?o.jsx("div",{children:s.map((k,M)=>{const A=c?.bdMgtSn===k.bdMgtSn;return o.jsxs("div",{style:{display:"flex",alignItems:"flex-start",padding:"12px",border:A?"2px solid #6449fc":"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:A?"#efebff":"white",transition:"all 0.2s ease"},onClick:()=>S(k),children:[o.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginTop:"2px"},onClick:_=>{_.stopPropagation(),S(k)},children:A?o.jsx(X.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:["[",k.zipNo,"]"]}),o.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px",lineHeight:"1.4",color:"#333"},children:k.roadAddr}),k.detBdNmList&&o.jsx("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:k.detBdNmList}),o.jsx("div",{style:{fontSize:"12px",color:"#999",lineHeight:"1.3"},children:k.jibunAddr})]})]},`addr-${k.bdMgtSn}-${M}`)})}):o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:i?"검색 버튼이나 엔터키를 눌러 검색해주세요.":"주소를 검색해주세요."})})}),o.jsx(To,{ref:r,mode:"server",onServerPageChange:(k,M)=>{P(k,M)},pageSizeOptions:[10,20,50]})]})]})})})},KU=Object.freeze(Object.defineProperty({__proto__:null,default:eO},Symbol.toStringTag,{value:"Module"}));exports.ButtonAccessController=Kf;exports.BwgButtonGroup=Yf;exports.BwgCmptArea=sO;exports.BwgCol=$e;exports.BwgComponentGuideM01=ON;exports.BwgConfigProvider=X1;exports.BwgDetail=xO;exports.BwgDeveloperGuideM01=MN;exports.BwgDrawer=un;exports.BwgEditor=Ph;exports.BwgGrid=Fe;exports.BwgInfoArea=dn;exports.BwgPagination=To;exports.BwgPopup=di;exports.BwgReactGuideM01=DN;exports.BwgRow=wt;exports.BwgSpace=Oc;exports.BwgTable=AO;exports.BwgTabs=ar;exports.BwgTitleBox=Le;exports.BwgView=kt;exports.CMAdminBoardM01=kU;exports.CMAuthMstrM01=CN;exports.CMBoardCommentS01=Wm;exports.CMFileMstrM01=_N;exports.CMHldyCfg=WN;exports.CMMenuMstrM01=$N;exports.CMMenuPrgrSelectModal=aS;exports.CMMenuPrntSelectModal=sS;exports.CMMyBoardM01=MU;exports.CMPopuMstrM01=LN;exports.CMPrgrMstrM01=HN;exports.CMPrgrMstrP02=JP;exports.CMPrgrMstrP02$1=HU;exports.CMRoleMstrM01=SN;exports.CMSystCfgM01=UN;exports.CMSystCodeM01=KN;exports.CMUserMstrM01=jU;exports.ContentBox=De;exports.ContentLayOut=ze;exports.GlobalConfigProvider=mN;exports.QuickServiceToggle=bN;exports.SSOHandler=wN;exports.SearchAddressP01=eO;exports.SearchAddressP01$1=KU;exports.SearchBox=ko;exports.SearchDepartmentP01=qP;exports.SearchDepartmentP01$1=NU;exports.SearchDepartmentP02=GP;exports.SearchDepartmentP02$1=$U;exports.SearchHolidayP01=QP;exports.SearchHolidayP01$1=VU;exports.SearchOrganizationP01=XP;exports.SearchOrganizationP01$1=LU;exports.SearchOrganizationP02=ZP;exports.SearchOrganizationP02$1=zU;exports.SystemCodeManage=SU;exports.commonjsGlobal=oO;exports.getAugmentedNamespace=aO;exports.getDefaultExportFromCjs=wr;
1109
+ `).concat(P.x,",").concat(P.y),S=Ft(e.id)?Fa("recharts-radial-line-"):e.id;return C.createElement("text",Cn({},n,{dominantBaseline:"central",className:Qe("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:S,d:E})),C.createElement("textPath",{xlinkHref:"#".concat(S)},r))},HF=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:l,endAngle:c}=e,d=(l+c)/2;if(r==="outside"){var{x:u,y:f}=jt(n,i,s+t,d);return{x:u,y:f,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var h=(a+s)/2,{x:g,y:m}=jt(n,i,h,d);return{x:g,y:m,textAnchor:"middle",verticalAnchor:"middle"}},fP=e=>"cx"in e&&Ne(e.cx),WF=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!fP(r)&&(a=r);var{x:s,y:l,width:c,height:d}=t,u=d>=0?1:-1,f=u*n,h=u>0?"end":"start",g=u>0?"start":"end",m=c>=0?1:-1,x=m*n,y=m>0?"end":"start",w=m>0?"start":"end";if(i==="top"){var b={x:s+c/2,y:l-u*n,textAnchor:"middle",verticalAnchor:h};return bt(bt({},b),a?{height:Math.max(l-a.y,0),width:c}:{})}if(i==="bottom"){var j={x:s+c/2,y:l+d+f,textAnchor:"middle",verticalAnchor:g};return bt(bt({},j),a?{height:Math.max(a.y+a.height-(l+d),0),width:c}:{})}if(i==="left"){var P={x:s-x,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return bt(bt({},P),a?{width:Math.max(P.x-a.x,0),height:d}:{})}if(i==="right"){var E={x:s+c+x,y:l+d/2,textAnchor:w,verticalAnchor:"middle"};return bt(bt({},E),a?{width:Math.max(a.x+a.width-E.x,0),height:d}:{})}var S=a?{width:c,height:d}:{};return i==="insideLeft"?bt({x:s+x,y:l+d/2,textAnchor:w,verticalAnchor:"middle"},S):i==="insideRight"?bt({x:s+c-x,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},S):i==="insideTop"?bt({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:g},S):i==="insideBottom"?bt({x:s+c/2,y:l+d-f,textAnchor:"middle",verticalAnchor:h},S):i==="insideTopLeft"?bt({x:s+x,y:l+f,textAnchor:w,verticalAnchor:g},S):i==="insideTopRight"?bt({x:s+c-x,y:l+f,textAnchor:y,verticalAnchor:g},S):i==="insideBottomLeft"?bt({x:s+x,y:l+d-f,textAnchor:w,verticalAnchor:h},S):i==="insideBottomRight"?bt({x:s+c-x,y:l+d-f,textAnchor:y,verticalAnchor:h},S):i&&typeof i=="object"&&(Ne(i.x)||Mn(i.x))&&(Ne(i.y)||Mn(i.y))?bt({x:s+Zt(i.x,c),y:l+Zt(i.y,d),textAnchor:"end",verticalAnchor:"end"},S):bt({x:s+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},S)},UF={offset:5};function ti(e){var t=ir(e,UF),{viewBox:r,position:n,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:d}=t,u=LF(),f=dP(),h=n==="center"?f:u??f,g=r||h;if(!g||Ft(i)&&Ft(a)&&!v.isValidElement(s)&&typeof s!="function")return null;var m=bt(bt({},t),{},{viewBox:g});if(v.isValidElement(s)){var x=AF(m,RF);return v.cloneElement(s,x)}var y;if(typeof s=="function"){if(y=v.createElement(s,m),v.isValidElement(y))return y}else y=zF(t);var w=fP(g),b=_r(t);if(w&&(n==="insideStart"||n==="insideEnd"||n==="end"))return VF(t,n,y,b,g);var j=w?HF(g,t.offset,t.position):WF(t,g);return C.createElement(hu,Cn({ref:d,className:Qe("recharts-label",l)},b,j,{breakAll:c}),y)}ti.displayName="Label";var KF=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?C.createElement(ti,Cn({key:"label-implicit"},n)):pn(e)?C.createElement(ti,Cn({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===ti?v.cloneElement(e,bt({key:"label-implicit"},n)):C.createElement(ti,Cn({key:"label-implicit",content:e},n)):km(e)?C.createElement(ti,Cn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?C.createElement(ti,Cn({},e,{key:"label-implicit"},n)):null};function YF(e){var{label:t,labelRef:r}=e,n=dP();return KF(t,n,r)||null}var Rf={},Af={},o1;function qF(){return o1||(o1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Af)),Af}var If={},a1;function GF(){return a1||(a1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(If)),If}var s1;function XF(){return s1||(s1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qF(),r=GF(),n=sg();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Rf)),Rf}var Nf,l1;function ZF(){return l1||(l1=1,Nf=XF().last),Nf}var QF=ZF();const JF=wr(QF);var e9=["valueAccessor"],t9=["dataKey","clockWise","id","textBreakAll"];function mc(){return mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mc.apply(null,arguments)}function c1(e,t){if(e==null)return{};var r,n,i=r9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function r9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var n9=e=>Array.isArray(e.value)?JF(e.value):e.value,pP=v.createContext(void 0),i9=pP.Provider,hP=v.createContext(void 0),o9=hP.Provider;function a9(){return v.useContext(pP)}function s9(){return v.useContext(hP)}function Tl(e){var{valueAccessor:t=n9}=e,r=c1(e,e9),{dataKey:n,id:i,textBreakAll:a}=r,s=c1(r,t9),l=a9(),c=s9(),d=l||c;return!d||!d.length?null:C.createElement(ur,{className:"recharts-label-list"},d.map((u,f)=>{var h,g=Ft(n)?t(u,f):ht(u&&u.payload,n),m=Ft(i)?{}:{id:"".concat(i,"-").concat(f)};return C.createElement(ti,mc({key:"label-".concat(f)},_r(u),s,m,{fill:(h=r.fill)!==null&&h!==void 0?h:u.fill,parentViewBox:u.parentViewBox,value:g,textBreakAll:a,viewBox:u.viewBox,index:f}))}))}Tl.displayName="LabelList";function gP(e){var{label:t}=e;return t?t===!0?C.createElement(Tl,{key:"labelList-implicit"}):C.isValidElement(t)||km(t)?C.createElement(Tl,{key:"labelList-implicit",content:t}):typeof t=="object"?C.createElement(Tl,mc({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var mP=e=>e.graphicalItems.polarItems,l9=J([dt,xs],Jg),gu=J([mP,gt,l9],tm),c9=J([gu],rm),mu=J([c9,Fg],nm),u9=J([mu,gt,gu],om);J([mu,gt,gu],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,s=ht(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:ht(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var u1=()=>{},d9=J([mu,gt,gu,uu,dt],cm),f9=J([gt,sm,lm,u1,d9,u1,We,dt],um),vP=J([gt,We,mu,u9,ys,dt,f9],dm),p9=J([vP,gt,Fo],hm);J([gt,vP,p9,dt],mm);var h9={radiusAxis:{},angleAxis:{}},g9=Cr({name:"polarAxis",initialState:h9,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),m9=g9.reducer;function d1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function f1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d1(Object(r),!0).forEach(function(n){v9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v9(e,t,r){return(t=y9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y9(e){var t=x9(e,"string");return typeof t=="symbol"?t:t+""}function x9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b9=(e,t)=>t,Tm=J([mP,b9],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),w9=[],Mm=(e,t,r)=>r?.length===0?w9:r,yP=J([Fg,Tm,Mm],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>f1(f1({},t.presentationProps),a.props))),i!=null)return i}}),C9=J([yP,Tm,Mm],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,s=ht(n,t.nameKey,t.name),l;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?l=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?l=n.fill:l=t.fill,{value:Wc(s,t.dataKey),color:l,payload:n,type:t.legendType}})}),S9=J([yP,Tm,Mm,Rt],(e,t,r,n)=>{if(!(t==null||e==null))return C7({offset:n,pieSettings:t,displayedData:e,cells:r})}),p1=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",h1=null,Df=null,xP=e=>{if(e===h1&&Array.isArray(Df))return Df;var t=[];return v.Children.forEach(e,r=>{Ft(r)||(wl.isFragment(r)?t=t.concat(xP(r.props.children)):t.push(r))}),Df=t,h1=e,t};function Rm(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>p1(i)):n=[p1(t)],xP(e).forEach(i=>{var a=_i(i,"type.displayName")||_i(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var _f={},g1;function j9(){return g1||(g1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(_f)),_f}var Bf,m1;function E9(){return m1||(m1=1,Bf=j9().isPlainObject),Bf}var P9=E9();const O9=wr(P9);function v1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function y1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){k9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k9(e,t,r){return(t=T9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T9(e){var t=M9(e,"string");return typeof t=="symbol"?t:t+""}function M9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vc(){return vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vc.apply(null,arguments)}var x1=(e,t,r,n,i)=>{var a=r-n,s;return s="M ".concat(e,",").concat(t),s+="L ".concat(e+r,",").concat(t),s+="L ".concat(e+r-a/2,",").concat(t+i),s+="L ".concat(e+r-a/2-n,",").concat(t+i),s+="L ".concat(e,",").concat(t," Z"),s},R9={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},A9=e=>{var t=ir(e,R9),{x:r,y:n,upperWidth:i,lowerWidth:a,height:s,className:l}=t,{animationEasing:c,animationDuration:d,animationBegin:u,isUpdateAnimationActive:f}=t,h=v.useRef(null),[g,m]=v.useState(-1),x=v.useRef(i),y=v.useRef(a),w=v.useRef(s),b=v.useRef(r),j=v.useRef(n),P=Jc(e,"trapezoid-");if(v.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var H=h.current.getTotalLength();H&&m(H)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||s!==+s||i===0&&a===0||s===0)return null;var E=Qe("recharts-trapezoid",l);if(!f)return C.createElement("g",null,C.createElement("path",vc({},_r(t),{className:E,d:x1(r,n,i,a,s)})));var S=x.current,O=y.current,k=w.current,M=b.current,A=j.current,_="0px ".concat(g===-1?1:g,"px"),D="".concat(g,"px 0px"),B=Lj(["strokeDasharray"],d,c);return C.createElement(Qc,{animationId:P,key:P,canBegin:g>0,duration:d,easing:c,isActive:f,begin:u},H=>{var T=qt(S,i,H),N=qt(O,a,H),I=qt(k,s,H),R=qt(M,r,H),$=qt(A,n,H);h.current&&(x.current=T,y.current=N,w.current=I,b.current=R,j.current=$);var U=H>0?{transition:B,strokeDasharray:D}:{strokeDasharray:_};return C.createElement("path",vc({},_r(t),{className:E,d:x1(R,$,T,N,I),ref:h,style:y1(y1({},U),t.style)}))})},I9=["option","shapeType","propTransformer","activeClassName","isActive"];function N9(e,t){if(e==null)return{};var r,n,i=D9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function D9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function b1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(r),!0).forEach(function(n){_9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _9(e,t,r){return(t=B9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B9(e){var t=$9(e,"string");return typeof t=="symbol"?t:t+""}function $9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L9(e,t){return yc(yc({},t),e)}function z9(e,t){return e==="symbols"}function w1(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return C.createElement(Hj,r);case"trapezoid":return C.createElement(A9,r);case"sector":return C.createElement(Kj,r);case"symbols":if(z9(t))return C.createElement(ig,r);break;default:return null}}function F9(e){return v.isValidElement(e)?e.props:e}function bP(e){var{option:t,shapeType:r,propTransformer:n=L9,activeClassName:i="recharts-active-shape",isActive:a}=e,s=N9(e,I9),l;if(v.isValidElement(t))l=v.cloneElement(t,yc(yc({},s),F9(t)));else if(typeof t=="function")l=t(s);else if(O9(t)&&typeof t!="boolean"){var c=n(t,s);l=C.createElement(w1,{shapeType:r,elementProps:c})}else{var d=s;l=C.createElement(w1,{shapeType:r,elementProps:d})}return a?C.createElement(ur,{className:i},l):l}var Am=(e,t)=>{var r=ut();return(n,i)=>a=>{e?.(n,i,a),r(IE({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},Im=e=>{var t=ut();return(r,n)=>i=>{e?.(r,n,i),t(RL())}},Nm=(e,t)=>{var r=ut();return(n,i)=>a=>{e?.(n,i,a),r(AL({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function wP(e){var{fn:t,args:r}=e,n=ut(),i=Sr();return v.useLayoutEffect(()=>{if(!i){var a=t(r);return n(kL(a)),()=>{n(TL(a))}}},[t,r,n,i]),null}var CP=()=>{};function V9(e){var{legendPayload:t}=e,r=ut(),n=Sr();return v.useLayoutEffect(()=>n?CP:(r(Dj(t)),()=>{r(_j(t))}),[r,n,t]),null}function H9(e){var{legendPayload:t}=e,r=ut(),n=Ae(We);return v.useLayoutEffect(()=>n!=="centric"&&n!=="radial"?CP:(r(Dj(t)),()=>{r(_j(t))}),[r,n,t]),null}var $f,W9=()=>{var[e]=C.useState(()=>Fa("uid-"));return e},U9=($f=C.useId)!==null&&$f!==void 0?$f:W9;function K9(e,t){var r=U9();return t||(e?"".concat(e,"-").concat(r):r)}var Y9=v.createContext(void 0),SP=e=>{var{id:t,type:r,children:n}=e,i=K9("recharts-".concat(r),t);return C.createElement(Y9.Provider,{value:i},n(i))},q9={cartesianItems:[],polarItems:[]},jP=Cr({name:"graphicalItems",initialState:q9,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:er()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:er()},removeCartesianGraphicalItem:{reducer(e,t){var r=On(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:er()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:er()},removePolarGraphicalItem:{reducer(e,t){var r=On(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:er()}}}),{addCartesianGraphicalItem:G9,replaceCartesianGraphicalItem:X9,removeCartesianGraphicalItem:Z9,addPolarGraphicalItem:Q9,removePolarGraphicalItem:J9}=jP.actions,e7=jP.reducer;function t7(e){var t=ut(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(G9(e)):r.current!==e&&t(X9({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(Z9(r.current)),r.current=null)},[t]),null}function r7(e){var t=ut();return v.useLayoutEffect(()=>(t(Q9(e)),()=>{t(J9(e))}),[t,e]),null}var n7=["onMouseEnter","onClick","onMouseLeave"],i7=["id"],o7=["id"];function Dm(e,t){if(e==null)return{};var r,n,i=a7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function a7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function C1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(r),!0).forEach(function(n){s7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s7(e,t,r){return(t=l7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l7(e){var t=c7(e,"string");return typeof t=="symbol"?t:t+""}function c7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ci.apply(null,arguments)}function u7(e){var t=v.useMemo(()=>Rm(e.children,oi),[e.children]),r=Ae(n=>C9(n,e.id,t));return r==null?null:C.createElement(H9,{legendPayload:r})}function d7(e){var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:s,name:l,hide:c,tooltipType:d}=e;return{dataDefinedOnItem:n.map(u=>u.tooltipPayload),positions:n.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:s,dataKey:t,nameKey:r,name:Wc(l,t),hide:c,type:d,color:s,unit:""}}}var f7=(e,t)=>e>t?"start":e<t?"end":"middle",p7=(e,t,r)=>Zt(typeof t=="function"?t(e):t,r,r*.8),h7=(e,t,r)=>{var{top:n,left:i,width:a,height:s}=t,l=Sj(a,s),c=i+Zt(e.cx,a,a/2),d=n+Zt(e.cy,s,s/2),u=Zt(e.innerRadius,l,0),f=p7(r,e.outerRadius,l),h=e.maxRadius||Math.sqrt(a*a+s*s)/2;return{cx:c,cy:d,innerRadius:u,outerRadius:f,maxRadius:h}},g7=(e,t)=>{var r=Lt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function m7(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var v7=(e,t)=>{if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return e(t);var r=Qe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return C.createElement($j,ci({},t,{type:"linear",className:r}))},y7=(e,t,r)=>{if(C.isValidElement(e))return C.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),C.isValidElement(n)))return n;var i=Qe("recharts-pie-label-text",m7(e));return C.createElement(hu,ci({},t,{alignmentBaseline:"middle",className:i}),n)};function x7(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:s}=r;if(!n||!i||!t)return null;var l=Qr(r),c=za(i),d=za(a),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((h,g)=>{var m=(h.startAngle+h.endAngle)/2,x=jt(h.cx,h.cy,h.outerRadius+u,m),y=st(st(st(st({},l),h),{},{stroke:"none"},c),{},{index:g,textAnchor:f7(x.x,h.cx)},x),w=st(st(st(st({},l),h),{},{fill:"none",stroke:h.fill},d),{},{index:g,points:[jt(h.cx,h.cy,h.outerRadius,m),x],key:"line"});return C.createElement(ur,{key:"label-".concat(h.startAngle,"-").concat(h.endAngle,"-").concat(h.midAngle,"-").concat(g)},a&&v7(a,w),y7(i,y,ht(h,s)))});return C.createElement(ur,{className:"recharts-pie-labels"},f)}function b7(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?C.createElement(gP,{label:i}):C.createElement(x7,{sectors:t,props:r,showLabels:n})}function w7(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=Ae(Fi),{onMouseEnter:s,onClick:l,onMouseLeave:c}=i,d=Dm(i,n7),u=Am(s,i.dataKey),f=Im(c),h=Nm(l,i.dataKey);return t==null||t.length===0?null:C.createElement(C.Fragment,null,t.map((g,m)=>{if(g?.startAngle===0&&g?.endAngle===0&&t.length!==1)return null;var x=r&&String(m)===a,y=a?n:null,w=x?r:y,b=st(st({},g),{},{stroke:g.stroke,tabIndex:-1,[kj]:m,[Tj]:i.dataKey});return C.createElement(ur,ci({key:"sector-".concat(g?.startAngle,"-").concat(g?.endAngle,"-").concat(g.midAngle,"-").concat(m),tabIndex:-1,className:"recharts-pie-sector"},cs(d,g,m),{onMouseEnter:u(g,m),onMouseLeave:f(g,m),onClick:h(g,m)}),C.createElement(bP,ci({option:w,isActive:x,shapeType:"sector"},b)))}))}function C7(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:s,startAngle:l,endAngle:c,dataKey:d,nameKey:u,tooltipType:f}=r,h=Math.abs(r.minAngle),g=g7(l,c),m=Math.abs(g),x=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,y=n.filter(S=>ht(S,d,0)!==0).length,w=(m>=360?y:y-1)*x,b=m-y*h-w,j=n.reduce((S,O)=>{var k=ht(O,d,0);return S+(Ne(k)?k:0)},0),P;if(j>0){var E;P=n.map((S,O)=>{var k=ht(S,d,0),M=ht(S,u,O),A=h7(r,a,S),_=(Ne(k)?k:0)/j,D,B=st(st({},S),i&&i[O]&&i[O].props);O?D=E.endAngle+Lt(g)*x*(k!==0?1:0):D=l;var H=D+Lt(g)*((k!==0?h:0)+_*b),T=(D+H)/2,N=(A.innerRadius+A.outerRadius)/2,I=[{name:M,value:k,payload:B,dataKey:d,type:f}],R=jt(A.cx,A.cy,N,T);return E=st(st(st(st({},r.presentationProps),{},{percent:_,cornerRadius:s,name:M,tooltipPayload:I,midAngle:T,middleRadius:N,tooltipPosition:R},B),A),{},{value:k,startAngle:D,endAngle:H,payload:B,paddingAngle:Lt(g)*x}),E})}return P}function S7(e){var{showLabels:t,sectors:r,children:n}=e,i=v.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return C.createElement(o9,{value:t?i:void 0},n)}function j7(e){var{props:t,previousSectorsRef:r}=e,{sectors:n,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:l,activeShape:c,inactiveShape:d,onAnimationStart:u,onAnimationEnd:f}=t,h=Jc(t,"recharts-pie-"),g=r.current,[m,x]=v.useState(!1),y=v.useCallback(()=>{typeof f=="function"&&f(),x(!1)},[f]),w=v.useCallback(()=>{typeof u=="function"&&u(),x(!0)},[u]);return C.createElement(S7,{showLabels:!m,sectors:n},C.createElement(Qc,{animationId:h,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:w,onAnimationEnd:y,key:h},b=>{var j=[],P=n&&n[0],E=P?.startAngle;return n?.forEach((S,O)=>{var k=g&&g[O],M=O>0?_i(S,"paddingAngle",0):0;if(k){var A=qt(k.endAngle-k.startAngle,S.endAngle-S.startAngle,b),_=st(st({},S),{},{startAngle:E+M,endAngle:E+A+M});j.push(_),E=_.endAngle}else{var{endAngle:D,startAngle:B}=S,H=qt(0,D-B,b),T=st(st({},S),{},{startAngle:E+M,endAngle:E+H+M});j.push(T),E=T.endAngle}}),r.current=j,C.createElement(ur,null,C.createElement(w7,{sectors:j,activeShape:c,inactiveShape:d,allOtherPieProps:t}))}),C.createElement(b7,{showLabels:!m,sectors:n,props:t}),t.children)}var E7={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!Ui.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function P7(e){var{id:t}=e,r=Dm(e,i7),{hide:n,className:i,rootTabIndex:a}=e,s=v.useMemo(()=>Rm(e.children,oi),[e.children]),l=Ae(u=>S9(u,t,s)),c=v.useRef(null),d=Qe("recharts-pie",i);return n||l==null?(c.current=null,C.createElement(ur,{tabIndex:a,className:d})):C.createElement(C.Fragment,null,C.createElement(wP,{fn:d7,args:st(st({},e),{},{sectors:l})}),C.createElement(ur,{tabIndex:a,className:d},C.createElement(j7,{props:st(st({},r),{},{sectors:l}),previousSectorsRef:c})))}function EP(e){var t=ir(e,E7),{id:r}=t,n=Dm(t,o7),i=Qr(n);return C.createElement(SP,{id:r,type:"pie"},a=>C.createElement(C.Fragment,null,C.createElement(r7,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),C.createElement(u7,ci({},n,{id:a})),C.createElement(P7,ci({},n,{id:a}))))}EP.displayName="Pie";function S1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function j1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S1(Object(r),!0).forEach(function(n){O7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O7(e,t,r){return(t=k7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k7(e){var t=T7(e,"string");return typeof t=="symbol"?t:t+""}function T7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M7={xAxis:{},yAxis:{},zAxis:{}},PP=Cr({name:"cartesianAxis",initialState:M7,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:er()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:er()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:er()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:er()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:er()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:er()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a=i.widthHistory||[];if(a.length===3&&a[0]===a[2]&&n===a[1]&&n!==i.width&&Math.abs(n-a[0])<=1)return;var s=[...a,n].slice(-3);e.yAxis[r]=j1(j1({},e.yAxis[r]),{},{width:n,widthHistory:s})}}}}),{addXAxis:R7,removeXAxis:A7,addYAxis:I7,removeYAxis:N7,updateYAxisWidth:D7}=PP.actions,_7=PP.reducer,B7=J([Rt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),$7=J([B7,_n,Bn],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),OP=()=>Ae($7),L7=process.env.NODE_ENV==="production",Lf="Invariant failed";function E1(e,t){if(L7)throw new Error(Lf);var r=typeof t=="function"?t():t,n=r?"".concat(Lf,": ").concat(r):Lf;throw new Error(n)}var z7=["x","y"];function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xh.apply(null,arguments)}function P1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ya(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P1(Object(r),!0).forEach(function(n){F7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F7(e,t,r){return(t=V7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V7(e){var t=H7(e,"string");return typeof t=="symbol"?t:t+""}function H7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W7(e,t){if(e==null)return{};var r,n,i=U7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function U7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function K7(e,t){var{x:r,y:n}=e,i=W7(e,z7),a="".concat(r),s=parseInt(a,10),l="".concat(n),c=parseInt(l,10),d="".concat(t.height||i.height),u=parseInt(d,10),f="".concat(t.width||i.width),h=parseInt(f,10);return ya(ya(ya(ya(ya({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function _m(e){return C.createElement(bP,xh({shapeType:"rectangle",propTransformer:K7,activeClassName:"recharts-active-bar"},e))}var Y7=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(Ne(t))return t;var a=Ne(n)||Ft(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?E1(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):E1()),r)}},q7={},G7=Cr({name:"errorBars",initialState:q7,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),X7=G7.reducer,Z7=["children"];function Q7(e,t){if(e==null)return{};var r,n,i=J7(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function J7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var eV={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},tV=v.createContext(eV);function rV(e){var{children:t}=e,r=Q7(e,Z7);return C.createElement(tV.Provider,{value:r},t)}function kP(e,t){var r,n,i=Ae(d=>Ln(d,e)),a=Ae(d=>zn(d,t)),s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:gr.allowDataOverflow,l=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:mr.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function nV(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=OP(),{needClipX:a,needClipY:s,needClip:l}=kP(t,r);if(!l)return null;var{x:c,y:d,width:u,height:f}=i;return C.createElement("clipPath",{id:"clipPath-".concat(n)},C.createElement("rect",{x:a?c:c-u/2,y:s?d:d-f/2,width:a?u:u*2,height:s?f:f*2}))}var iV=["onMouseEnter","onMouseLeave","onClick"],oV=["value","background","tooltipPosition"],aV=["id"],sV=["onMouseEnter","onClick","onMouseLeave"];function ui(){return ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ui.apply(null,arguments)}function O1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O1(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=cV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cV(e){var t=uV(e,"string");return typeof t=="symbol"?t:t+""}function uV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xc(e,t){if(e==null)return{};var r,n,i=dV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function dV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var fV=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Wc(r,t),payload:e}]};function pV(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:Wc(a,t),hide:s,type:e.tooltipType,color:e.fill,unit:l}}}function hV(e){var t=Ae(Fi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,d=xc(a,iV),u=Am(s,n),f=Im(l),h=Nm(c,n);if(!i||r==null)return null;var g=za(i);return C.createElement(C.Fragment,null,r.map((m,x)=>{var{background:y}=m,w=xc(m,oV);if(!y)return null;var b=u(m,x),j=f(m,x),P=h(m,x),E=tr(tr(tr(tr(tr({option:i,isActive:String(x)===t},w),{},{fill:"#eee"},y),g),cs(d,m,x)),{},{onMouseEnter:b,onMouseLeave:j,onClick:P,dataKey:n,index:x,className:"recharts-bar-background-rectangle"});return C.createElement(_m,ui({key:"background-bar-".concat(x)},E))}))}function gV(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var s={x:a.x,y:a.y,width:a.width,height:a.height};return tr(tr({},s),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:s,fill:a.fill})});return C.createElement(i9,{value:t?i:void 0},r)}function mV(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:s}=e,l=Ae(Fi),c=Ae(qE),d=r&&String(a)===l&&(c==null||s===c),u=d?r:t;return C.createElement(_m,ui({},n,{name:String(n.name)},i,{isActive:d,option:u,index:a,dataKey:s}))}function vV(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return C.createElement(_m,ui({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function yV(e){var{data:t,props:r}=e,n=Qr(r),i=xc(n,aV),{shape:a,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:d,onMouseLeave:u}=r,f=xc(r,sV),h=Am(c,s),g=Im(u),m=Nm(d,s);return t?C.createElement(C.Fragment,null,t.map((x,y)=>C.createElement(ur,ui({key:"rectangle-".concat(x?.x,"-").concat(x?.y,"-").concat(x?.value,"-").concat(y),className:"recharts-bar-rectangle"},cs(f,x,y),{onMouseEnter:h(x,y),onMouseLeave:g(x,y),onClick:m(x,y)}),l?C.createElement(mV,{shape:a,activeBar:l,baseProps:i,entry:x,index:y,dataKey:s}):C.createElement(vV,{shape:a,baseProps:i,entry:x,index:y,dataKey:s})))):null}function xV(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:d,onAnimationStart:u}=t,f=r.current,h=Jc(t,"recharts-bar-"),[g,m]=v.useState(!1),x=!g,y=v.useCallback(()=>{typeof d=="function"&&d(),m(!1)},[d]),w=v.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return C.createElement(gV,{showLabels:x,rects:n},C.createElement(Qc,{animationId:h,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:y,onAnimationStart:w,key:h},b=>{var j=b===1?n:n?.map((P,E)=>{var S=f&&f[E];if(S)return tr(tr({},P),{},{x:qt(S.x,P.x,b),y:qt(S.y,P.y,b),width:qt(S.width,P.width,b),height:qt(S.height,P.height,b)});if(i==="horizontal"){var O=qt(0,P.height,b);return tr(tr({},P),{},{y:P.y+P.height-O,height:O})}var k=qt(0,P.width,b);return tr(tr({},P),{},{width:k})});return b>0&&(r.current=j??null),j==null?null:C.createElement(ur,null,C.createElement(yV,{props:t,data:j}))}),C.createElement(gP,{label:t.label}),t.children)}function bV(e){var t=v.useRef(null);return C.createElement(xV,{previousRectanglesRef:t,props:e})}var TP=0,wV=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:ht(e,t)}};class CV extends v.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:s,needClip:l,background:c,id:d}=this.props;if(t||r==null)return null;var u=Qe("recharts-bar",i),f=d;return C.createElement(ur,{className:u,id:d},l&&C.createElement("defs",null,C.createElement(nV,{clipPathId:f,xAxisId:a,yAxisId:s})),C.createElement(ur,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(f,")"):void 0},C.createElement(hV,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),C.createElement(bV,this.props)))}}var SV={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!Ui.isSsr,legendType:"rect",minPointSize:TP,xAxisId:0,yAxisId:0};function jV(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:u}=e,{needClip:f}=kP(t,r),h=xg(),g=Sr(),m=Rm(e.children,oi),x=Ae(b=>QV(b,t,r,g,e.id,m));if(h!=="vertical"&&h!=="horizontal")return null;var y,w=x?.[0];return w==null||w.height==null||w.width==null?y=0:y=h==="vertical"?w.height/2:w.width/2,C.createElement(rV,{xAxisId:t,yAxisId:r,data:x,dataPointFormatter:wV,errorBarOffset:y},C.createElement(CV,ui({},e,{layout:h,needClip:f,data:x,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:u})))}function EV(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:d,stackedData:u,displayedData:f,offset:h,cells:g,parentViewBox:m}=e,x=t==="horizontal"?l:s,y=u?x.scale.domain():null,w=MB({numericAxis:x});return f.map((b,j)=>{var P,E,S,O,k,M;u?P=jB(u[j],y):(P=ht(b,r),Array.isArray(P)||(P=[w,P]));var A=Y7(n,TP)(P[1],j);if(t==="horizontal"){var _,[D,B]=[l.scale(P[0]),l.scale(P[1])];E=cx({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:b,index:j}),S=(_=B??D)!==null&&_!==void 0?_:void 0,O=i.size;var H=D-B;if(k=Br(H)?0:H,M={x:E,y:h.top,width:O,height:h.height},Math.abs(A)>0&&Math.abs(k)<Math.abs(A)){var T=Lt(k||A)*(Math.abs(A)-Math.abs(k));S-=T,k+=T}}else{var[N,I]=[s.scale(P[0]),s.scale(P[1])];if(E=N,S=cx({axis:l,ticks:d,bandSize:a,offset:i.offset,entry:b,index:j}),O=I-N,k=i.size,M={x:h.left,y:S,width:h.width,height:k},Math.abs(A)>0&&Math.abs(O)<Math.abs(A)){var R=Lt(O||A)*(Math.abs(A)-Math.abs(O));O+=R}}if(E==null||S==null||O==null||k==null)return null;var $=tr(tr({},b),{},{x:E,y:S,width:O,height:k,value:u?P:P[1],payload:b,background:M,tooltipPosition:{x:E+O/2,y:S+k/2},parentViewBox:m},g&&g[j]&&g[j].props);return $}).filter(Boolean)}function PV(e){var t=ir(e,SV),r=Sr();return C.createElement(SP,{id:t.id,type:"bar"},n=>C.createElement(C.Fragment,null,C.createElement(V9,{legendPayload:fV(t)}),C.createElement(wP,{fn:pV,args:t}),C.createElement(t7,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:TB(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),C.createElement(jV,ui({},t,{id:n}))))}var Ml=C.memo(PV);Ml.displayName="Bar";function k1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(r),!0).forEach(function(n){OV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OV(e,t,r){return(t=kV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kV(e){var t=TV(e,"string");return typeof t=="symbol"?t:t+""}function TV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MV=(e,t)=>t,RV=(e,t,r)=>r,AV=(e,t,r,n)=>n,IV=(e,t,r,n,i)=>i,Es=J([em,IV],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),NV=J([Es],e=>e?.maxBarSize),DV=(e,t,r,n,i,a)=>a,T1=(e,t,r)=>{var n=r??e;if(!Ft(n))return Zt(n,t,0)},_V=J([We,em,MV,RV,AV],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),BV=(e,t,r,n)=>{var i=We(e);return i==="horizontal"?ph(e,"yAxis",r,n):ph(e,"xAxis",t,n)},$V=(e,t,r)=>{var n=We(e);return n==="horizontal"?Ib(e,"xAxis",t):Ib(e,"yAxis",r)},LV=(e,t,r)=>{var n={},i=e.filter(au),a=e.filter(d=>d.stackId==null),s=i.reduce((d,u)=>(d[u.stackId]||(d[u.stackId]=[]),d[u.stackId].push(u),d),n),l=Object.entries(s).map(d=>{var[u,f]=d,h=f.map(m=>m.dataKey),g=T1(t,r,f[0].barSize);return{stackId:u,dataKeys:h,barSize:g}}),c=a.map(d=>{var u=[d.dataKey].filter(h=>h!=null),f=T1(t,r,d.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...l,...c]},zV=J([_V,j8,$V],LV),FV=(e,t,r,n,i)=>{var a,s,l=Es(e,t,r,n,i);if(l!=null){var c=We(e),d=q2(e),{maxBarSize:u}=l,f=Ft(u)?d:u,h,g;return c==="horizontal"?(h=Po(e,"xAxis",t,n),g=Eo(e,"xAxis",t,n)):(h=Po(e,"yAxis",r,n),g=Eo(e,"yAxis",r,n)),(a=(s=hg(h,g,!0))!==null&&s!==void 0?s:f)!==null&&a!==void 0?a:0}},MP=(e,t,r,n)=>{var i=We(e),a,s;return i==="horizontal"?(a=Po(e,"xAxis",t,n),s=Eo(e,"xAxis",t,n)):(a=Po(e,"yAxis",r,n),s=Eo(e,"yAxis",r,n)),hg(a,s)};function VV(e,t,r,n,i){var a=n.length;if(!(a<1)){var s=Zt(e,r,0,!0),l,c=[];if(Qt(n[0].barSize)){var d=!1,u=r/a,f=n.reduce((w,b)=>w+(b.barSize||0),0);f+=(a-1)*s,f>=r&&(f-=(a-1)*s,s=0),f>=r&&u>0&&(d=!0,u*=.9,f=a*u);var h=(r-f)/2>>0,g={offset:h-s,size:0};l=n.reduce((w,b)=>{var j,P={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:g.offset+g.size+s,size:d?u:(j=b.barSize)!==null&&j!==void 0?j:0}},E=[...w,P];return g=E[E.length-1].position,E},c)}else{var m=Zt(t,r,0,!0);r-2*m-(a-1)*s<=0&&(s=0);var x=(r-2*m-(a-1)*s)/a;x>1&&(x>>=0);var y=Qt(i)?Math.min(x,i):x;l=n.reduce((w,b,j)=>[...w,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:m+(x+s)*j+(x-y)/2,size:y}}],c)}return l}}var HV=(e,t,r,n,i,a,s)=>{var l=Ft(s)?t:s,c=VV(r,n,i!==a?i:a,e,l);return i!==a&&c!=null&&(c=c.map(d=>yl(yl({},d),{},{position:yl(yl({},d.position),{},{offset:d.position.offset-i/2})}))),c},WV=J([zV,q2,S8,G2,FV,MP,NV],HV),UV=(e,t,r,n)=>Po(e,"xAxis",t,n),KV=(e,t,r,n)=>Po(e,"yAxis",r,n),YV=(e,t,r,n)=>Eo(e,"xAxis",t,n),qV=(e,t,r,n)=>Eo(e,"yAxis",r,n),GV=J([WV,Es],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),XV=(e,t)=>{var r=Zg(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(s=>s.key===r)}}}},ZV=J([BV,Es],XV),QV=J([Rt,gg,UV,KV,YV,qV,GV,We,Vg,MP,ZV,Es,DV],(e,t,r,n,i,a,s,l,c,d,u,f,h)=>{var{chartData:g,dataStartIndex:m,dataEndIndex:x}=c;if(!(f==null||s==null||t==null||l!=="horizontal"&&l!=="vertical"||r==null||n==null||i==null||a==null||d==null)){var{data:y}=f,w;if(y!=null&&y.length>0?w=y:w=g?.slice(m,x+1),w!=null)return EV({layout:l,barSettings:f,pos:s,parentViewBox:t,bandSize:d,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:w,offset:e,cells:h})}}),RP=e=>{var{chartData:t}=e,r=ut(),n=Sr();return v.useEffect(()=>n?()=>{}:(r(Hb(t)),()=>{r(Hb(void 0))}),[t,r,n]),null},M1={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},JV=Cr({name:"brush",initialState:M1,reducers:{setBrushSettings(e,t){return t.payload==null?M1:t.payload}}}),eH=JV.reducer;function tH(e,t,r){return(t=rH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rH(e){var t=nH(e,"string");return typeof t=="symbol"?t:t+""}function nH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Bm{static create(t){return new Bm(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}tH(Bm,"EPS",1e-4);function iH(e){return(e%180+180)%180}var oH=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=iH(i),s=a*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},aH={dots:[],areas:[],lines:[]},sH=Cr({name:"referenceElements",initialState:aH,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=On(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=On(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=On(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),lH=sH.reducer,cH=v.createContext(void 0),uH=e=>{var{children:t}=e,[r]=v.useState("".concat(Fa("recharts"),"-clip")),n=OP();if(n==null)return null;var{x:i,y:a,width:s,height:l}=n;return C.createElement(cH.Provider,{value:r},C.createElement("defs",null,C.createElement("clipPath",{id:r},C.createElement("rect",{x:i,y:a,height:l,width:s}))),t)};function Oo(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function AP(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function dH(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return oH(n,r)}function fH(e,t,r){var n=r==="width",{x:i,y:a,width:s,height:l}=e;return t===1?{start:n?i:a,end:n?i+s:a+l}:{start:n?i+s:a+l,end:n?i:a}}function bc(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function pH(e,t){return AP(e,t+1)}function hH(e,t,r,n,i){for(var a=(n||[]).slice(),{start:s,end:l}=t,c=0,d=1,u=s,f=function(){var m=n?.[c];if(m===void 0)return{v:AP(n,d)};var x=c,y,w=()=>(y===void 0&&(y=r(m,x)),y),b=m.coordinate,j=c===0||bc(e,b,w,u,l);j||(c=0,u=s,d+=1),j&&(u=b+e*(w()/2+i),c+=d)},h;d<=a.length;)if(h=f(),h)return h.v;return[]}function R1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R1(Object(r),!0).forEach(function(n){gH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gH(e,t,r){return(t=mH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mH(e){var t=vH(e,"string");return typeof t=="symbol"?t:t+""}function vH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yH(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,{start:l}=t,{end:c}=t,d=function(h){var g=a[h],m,x=()=>(m===void 0&&(m=r(g,h)),m);if(h===s-1){var y=e*(g.coordinate+e*x()/2-c);a[h]=g=Gt(Gt({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else a[h]=g=Gt(Gt({},g),{},{tickCoord:g.coordinate});var w=bc(e,g.tickCoord,x,l,c);w&&(c=g.tickCoord-e*(x()/2+i),a[h]=Gt(Gt({},g),{},{isShow:!0}))},u=s-1;u>=0;u--)d(u);return a}function xH(e,t,r,n,i,a){var s=(n||[]).slice(),l=s.length,{start:c,end:d}=t;if(a){var u=n[l-1],f=r(u,l-1),h=e*(u.coordinate+e*f/2-d);s[l-1]=u=Gt(Gt({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var g=bc(e,u.tickCoord,()=>f,c,d);g&&(d=u.tickCoord-e*(f/2+i),s[l-1]=Gt(Gt({},u),{},{isShow:!0}))}for(var m=a?l-1:l,x=function(b){var j=s[b],P,E=()=>(P===void 0&&(P=r(j,b)),P);if(b===0){var S=e*(j.coordinate-e*E()/2-c);s[b]=j=Gt(Gt({},j),{},{tickCoord:S<0?j.coordinate-S*e:j.coordinate})}else s[b]=j=Gt(Gt({},j),{},{tickCoord:j.coordinate});var O=bc(e,j.tickCoord,E,c,d);O&&(c=j.tickCoord+e*(E()/2+i),s[b]=Gt(Gt({},j),{},{isShow:!0}))},y=0;y<m;y++)x(y);return s}function $m(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:d,unit:u,angle:f}=e;if(!i||!i.length||!n)return[];if(Ne(c)||Ui.isSsr){var h;return(h=pH(i,Ne(c)?c:0))!==null&&h!==void 0?h:[]}var g=[],m=l==="top"||l==="bottom"?"width":"height",x=u&&m==="width"?ja(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(j,P)=>{var E=typeof d=="function"?d(j.value,P):j.value;return m==="width"?dH(ja(E,{fontSize:t,letterSpacing:r}),x,f):ja(E,{fontSize:t,letterSpacing:r})[m]},w=i.length>=2?Lt(i[1].coordinate-i[0].coordinate):1,b=fH(a,w,m);return c==="equidistantPreserveStart"?hH(w,b,y,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=xH(w,b,y,i,s,c==="preserveStartEnd"):g=yH(w,b,y,i,s),g.filter(j=>j.isShow))}var bH=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,s=0;if(t){Array.from(t).forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>s&&(s=f.width)}});var l=r?r.getBoundingClientRect().width:0,c=i+a,d=s+c+l+(r?n:0);return Math.round(d)}return 0},wH=["axisLine","width","height","className","hide","ticks"],CH=["viewBox"],SH=["viewBox"];function bh(e,t){if(e==null)return{};var r,n,i=jH(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vi.apply(null,arguments)}function A1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(r),!0).forEach(function(n){EH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EH(e,t,r){return(t=PH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PH(e){var t=OH(e,"string");return typeof t=="symbol"?t:t+""}function OH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lm={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function kH(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var d=Ot(Ot(Ot({},c),Qr(l)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!s||a==="bottom"&&s);d=Ot(Ot({},d),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!s||a==="right"&&s);d=Ot(Ot({},d),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return C.createElement("line",Vi({},d,{className:Qe("recharts-cartesian-axis-line",_i(l,"className"))}))}function TH(e,t,r,n,i,a,s,l,c){var d,u,f,h,g,m,x=l?-1:1,y=e.tickSize||s,w=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":d=u=e.coordinate,h=r+ +!l*i,f=h-x*y,m=f-x*c,g=w;break;case"left":f=h=e.coordinate,u=t+ +!l*n,d=u-x*y,g=d-x*c,m=w;break;case"right":f=h=e.coordinate,u=t+ +l*n,d=u+x*y,g=d+x*c,m=w;break;default:d=u=e.coordinate,h=r+ +l*i,f=h+x*y,m=f+x*c,g=w;break}return{line:{x1:d,y1:f,x2:u,y2:h},tick:{x:g,y:m}}}function MH(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function RH(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function AH(e){var{option:t,tickProps:r,value:n}=e,i,a=Qe(r.className,"recharts-cartesian-axis-tick-value");if(C.isValidElement(t))i=C.cloneElement(t,Ot(Ot({},r),{},{className:a}));else if(typeof t=="function")i=t(Ot(Ot({},r),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Qe(s,t?.className)),i=C.createElement(hu,Vi({},r,{className:s}),n)}return i}function IH(e){var{ticks:t=[],tick:r,tickLine:n,stroke:i,tickFormatter:a,unit:s,padding:l,tickTextProps:c,orientation:d,mirror:u,x:f,y:h,width:g,height:m,tickSize:x,tickMargin:y,fontSize:w,letterSpacing:b,getTicksConfig:j,events:P}=e,E=$m(Ot(Ot({},j),{},{ticks:t}),w,b),S=MH(d,u),O=RH(d,u),k=Qr(j),M=za(r),A={};typeof n=="object"&&(A=n);var _=Ot(Ot({},k),{},{fill:"none"},A),D=E.map((B,H)=>{var{line:T,tick:N}=TH(B,f,h,g,m,d,x,u,y),I=Ot(Ot(Ot(Ot({textAnchor:S,verticalAnchor:O},k),{},{stroke:"none",fill:i},M),N),{},{index:H,payload:B,visibleTicksCount:E.length,tickFormatter:a,padding:l},c);return C.createElement(ur,Vi({className:"recharts-cartesian-axis-tick",key:"tick-".concat(B.value,"-").concat(B.coordinate,"-").concat(B.tickCoord)},cs(P,B,H)),n&&C.createElement("line",Vi({},_,T,{className:Qe("recharts-cartesian-axis-tick-line",_i(n,"className"))})),r&&C.createElement(AH,{option:r,tickProps:I,value:"".concat(typeof a=="function"?a(B.value,H):B.value).concat(s||"")}))});return D.length>0?C.createElement("g",{className:"recharts-cartesian-axis-ticks"},D):null}var NH=v.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:s,ticks:l}=e,c=bh(e,wH),[d,u]=v.useState(""),[f,h]=v.useState(""),g=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var x;return bH({ticks:g.current,label:(x=e.labelRef)===null||x===void 0?void 0:x.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=v.useCallback(x=>{if(x){var y=x.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=y;var w=y[0];if(w){var b=window.getComputedStyle(w),j=b.fontSize,P=b.letterSpacing;(j!==d||P!==f)&&(u(j),h(P))}}},[d,f]);return s||n!=null&&n<=0||i!=null&&i<=0?null:C.createElement(ur,{className:Qe("recharts-cartesian-axis",a),ref:m},C.createElement(kH,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Qr(e)}),C.createElement(IH,{ticks:l,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:d,letterSpacing:f,getTicksConfig:e,events:c}),C.createElement(BF,{x:e.x,y:e.y,width:e.width,height:e.height},C.createElement(YF,{label:e.label,labelRef:e.labelRef}),e.children))}),DH=C.memo(NH,(e,t)=>{var{viewBox:r}=e,n=bh(e,CH),{viewBox:i}=t,a=bh(t,SH);return Oo(r,i)&&Oo(n,a)}),zm=C.forwardRef((e,t)=>{var r=ir(e,Lm);return C.createElement(DH,Vi({},r,{ref:t}))});zm.displayName="CartesianAxis";var _H=["x1","y1","x2","y2","key"],BH=["offset"],$H=["xAxisId","yAxisId"],LH=["xAxisId","yAxisId"];function I1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(r),!0).forEach(function(n){zH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zH(e,t,r){return(t=FH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FH(e){var t=VH(e,"string");return typeof t=="symbol"?t:t+""}function VH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ki.apply(null,arguments)}function wc(e,t){if(e==null)return{};var r,n,i=HH(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function HH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var WH=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:s,ry:l}=e;return C.createElement("rect",{x:n,y:i,ry:l,width:a,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function IP(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var{x1:n,y1:i,x2:a,y2:s,key:l}=t,c=wc(t,_H),d=Qr(c),u=wc(d,BH);r=C.createElement("line",ki({},u,{x1:n,y1:i,x2:a,y2:s,fill:"none",key:l}))}return r}function UH(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var a=wc(e,$H),s=i.map((l,c)=>{var d=Xt(Xt({},a),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return IP(n,d)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function KH(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var a=wc(e,LH),s=i.map((l,c)=>{var d=Xt(Xt({},a),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return IP(n,d)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function YH(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length)return null;var d=l.map(f=>Math.round(f+i-i)).sort((f,h)=>f-h);i!==d[0]&&d.unshift(0);var u=d.map((f,h)=>{var g=!d[h+1],m=g?i+s-f:d[h+1]-f;if(m<=0)return null;var x=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:f,x:n,height:m,width:a,stroke:"none",fill:t[x],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function qH(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:s,height:l,verticalPoints:c}=e;if(!t||!r||!r.length)return null;var d=c.map(f=>Math.round(f+i-i)).sort((f,h)=>f-h);i!==d[0]&&d.unshift(0);var u=d.map((f,h)=>{var g=!d[h+1],m=g?i+s-f:d[h+1]-f;if(m<=0)return null;var x=h%r.length;return C.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:m,height:l,stroke:"none",fill:r[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var GH=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return Ej($m(Xt(Xt(Xt({},Lm),r),{},{ticks:Pj(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},XH=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return Ej($m(Xt(Xt(Xt({},Lm),r),{},{ticks:Pj(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},ZH={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Rl(e){var t=vg(),r=yg(),n=Ij(),i=Xt(Xt({},ir(e,ZH)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:d,height:u,syncWithTicks:f,horizontalValues:h,verticalValues:g}=i,m=Sr(),x=Ae(M=>Nb(M,"xAxis",a,m)),y=Ae(M=>Nb(M,"yAxis",s,m));if(!Ne(d)||d<=0||!Ne(u)||u<=0||!Ne(l)||l!==+l||!Ne(c)||c!==+c)return null;var w=i.verticalCoordinatesGenerator||GH,b=i.horizontalCoordinatesGenerator||XH,{horizontalPoints:j,verticalPoints:P}=i;if((!j||!j.length)&&typeof b=="function"){var E=h&&h.length,S=b({yAxis:y?Xt(Xt({},y),{},{ticks:E?h:y.ticks}):void 0,width:t,height:r,offset:n},E?!0:f);rc(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(j=S)}if((!P||!P.length)&&typeof w=="function"){var O=g&&g.length,k=w({xAxis:x?Xt(Xt({},x),{},{ticks:O?g:x.ticks}):void 0,width:t,height:r,offset:n},O?!0:f);rc(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(P=k)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(WH,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),C.createElement(YH,ki({},i,{horizontalPoints:j})),C.createElement(qH,ki({},i,{verticalPoints:P})),C.createElement(UH,ki({},i,{offset:n,horizontalPoints:j,xAxis:x,yAxis:y})),C.createElement(KH,ki({},i,{offset:n,verticalPoints:P,xAxis:x,yAxis:y})))}Rl.displayName="CartesianGrid";var QH=["dangerouslySetInnerHTML","ticks"],JH=["id"],eW=["domain"],tW=["domain"];function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wh.apply(null,arguments)}function Cc(e,t){if(e==null)return{};var r,n,i=rW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function nW(e){var t=ut();return v.useLayoutEffect(()=>(t(R7(e)),()=>{t(A7(e))}),[e,t]),null}var iW=e=>{var{xAxisId:t,className:r}=e,n=Ae(gg),i=Sr(),a="xAxis",s=Ae(g=>Vo(g,a,t,i)),l=Ae(g=>OE(g,a,t,i)),c=Ae(g=>SE(g,t)),d=Ae(g=>yL(g,t)),u=Ae(g=>iE(g,t));if(c==null||d==null||u==null)return null;var f=Cc(e,QH),h=Cc(u,JH);return C.createElement(zm,wh({},f,h,{scale:s,x:d.x,y:d.y,width:c.width,height:c.height,className:Qe("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:l}))},oW={allowDataOverflow:gr.allowDataOverflow,allowDecimals:gr.allowDecimals,allowDuplicatedCategory:gr.allowDuplicatedCategory,height:gr.height,hide:!1,mirror:gr.mirror,orientation:gr.orientation,padding:gr.padding,reversed:gr.reversed,scale:gr.scale,tickCount:gr.tickCount,type:gr.type,xAxisId:0},aW=e=>{var t,r,n,i,a,s=ir(e,oW);return C.createElement(C.Fragment,null,C.createElement(nW,{interval:(t=s.interval)!==null&&t!==void 0?t:"preserveEnd",id:s.xAxisId,scale:s.scale,type:s.type,padding:s.padding,allowDataOverflow:s.allowDataOverflow,domain:s.domain,dataKey:s.dataKey,allowDuplicatedCategory:s.allowDuplicatedCategory,allowDecimals:s.allowDecimals,tickCount:s.tickCount,includeHidden:(r=s.includeHidden)!==null&&r!==void 0?r:!1,reversed:s.reversed,ticks:s.ticks,height:s.height,orientation:s.orientation,mirror:s.mirror,hide:s.hide,unit:s.unit,name:s.name,angle:(n=s.angle)!==null&&n!==void 0?n:0,minTickGap:(i=s.minTickGap)!==null&&i!==void 0?i:5,tick:(a=s.tick)!==null&&a!==void 0?a:!0,tickFormatter:s.tickFormatter}),C.createElement(iW,s))},sW=(e,t)=>{var{domain:r}=e,n=Cc(e,eW),{domain:i}=t,a=Cc(t,tW);return Oo(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Oo({domain:r},{domain:i}):!1},Al=C.memo(aW,sW);Al.displayName="XAxis";var lW=["dangerouslySetInnerHTML","ticks"],cW=["id"],uW=["domain"],dW=["domain"];function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ch.apply(null,arguments)}function Sc(e,t){if(e==null)return{};var r,n,i=fW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function pW(e){var t=ut();return v.useLayoutEffect(()=>(t(I7(e)),()=>{t(N7(e))}),[e,t]),null}var hW=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=v.useRef(null),s=v.useRef(null),l=Ae(gg),c=Sr(),d=ut(),u="yAxis",f=Ae(b=>Vo(b,u,t,c)),h=Ae(b=>jE(b,t)),g=Ae(b=>bL(b,t)),m=Ae(b=>OE(b,u,t,c)),x=Ae(b=>oE(b,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!h||km(i)||v.isValidElement(i)||x==null)){var b=a.current;if(b){var j=b.getCalculatedWidth();Math.round(h.width)!==Math.round(j)&&d(D7({id:t,width:j}))}}},[m,h,d,i,t,n,x]),h==null||g==null||x==null)return null;var y=Sc(e,lW),w=Sc(x,cW);return C.createElement(zm,Ch({},y,w,{ref:a,labelRef:s,scale:f,x:g.x,y:g.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:h.width,height:h.height,className:Qe("recharts-".concat(u," ").concat(u),r),viewBox:l,ticks:m}))},gW={allowDataOverflow:mr.allowDataOverflow,allowDecimals:mr.allowDecimals,allowDuplicatedCategory:mr.allowDuplicatedCategory,hide:!1,mirror:mr.mirror,orientation:mr.orientation,padding:mr.padding,reversed:mr.reversed,scale:mr.scale,tickCount:mr.tickCount,type:mr.type,width:mr.width,yAxisId:0},mW=e=>{var t,r,n,i,a,s=ir(e,gW);return C.createElement(C.Fragment,null,C.createElement(pW,{interval:(t=s.interval)!==null&&t!==void 0?t:"preserveEnd",id:s.yAxisId,scale:s.scale,type:s.type,domain:s.domain,allowDataOverflow:s.allowDataOverflow,dataKey:s.dataKey,allowDuplicatedCategory:s.allowDuplicatedCategory,allowDecimals:s.allowDecimals,tickCount:s.tickCount,padding:s.padding,includeHidden:(r=s.includeHidden)!==null&&r!==void 0?r:!1,reversed:s.reversed,ticks:s.ticks,width:s.width,orientation:s.orientation,mirror:s.mirror,hide:s.hide,unit:s.unit,name:s.name,angle:(n=s.angle)!==null&&n!==void 0?n:0,minTickGap:(i=s.minTickGap)!==null&&i!==void 0?i:5,tick:(a=s.tick)!==null&&a!==void 0?a:!0,tickFormatter:s.tickFormatter}),C.createElement(hW,s))},vW=(e,t)=>{var{domain:r}=e,n=Sc(e,uW),{domain:i}=t,a=Sc(t,dW);return Oo(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Oo({domain:r},{domain:i}):!1},Il=C.memo(mW,vW);Il.displayName="YAxis";function yW(e){e()}function xW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yW(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var N1={notify(){},get:()=>[]};function bW(e,t){let r,n=N1,i=0,a=!1;function s(x){u();const y=n.subscribe(x);let w=!1;return()=>{w||(w=!0,y(),f())}}function l(){n.notify()}function c(){m.onStateChange&&m.onStateChange()}function d(){return a}function u(){i++,r||(r=e.subscribe(c),n=xW())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=N1)}function h(){a||(a=!0,u())}function g(){a&&(a=!1,f())}const m={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:h,tryUnsubscribe:g,getListeners:()=>n};return m}var wW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CW=wW(),SW=()=>typeof navigator<"u"&&navigator.product==="ReactNative",jW=SW(),EW=()=>CW||jW?C.useLayoutEffect:C.useEffect,PW=EW(),OW=Symbol.for("react-redux-context"),kW=typeof globalThis<"u"?globalThis:{};function TW(){if(!C.createContext)return{};const e=kW[OW]??=new Map;let t=e.get(C.createContext);return t||(t=C.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(C.createContext,t)),t}var MW=TW();function RW(e){const{children:t,context:r,serverState:n,store:i}=e,a=C.useMemo(()=>{const c=bW(i),d={store:i,subscription:c,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return d;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(d,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),s=C.useMemo(()=>i.getState(),[i]);PW(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=r||MW;return C.createElement(l.Provider,{value:a},t)}var AW=RW,IW=(e,t)=>t,Fm=J([IW,We,tE,It,WE,Fn,jz,Rt],Tz),Vm=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},NP=$r("mouseClick"),DP=ps();DP.startListening({actionCreator:NP,effect:(e,t)=>{var r=e.payload,n=Fm(t.getState(),Vm(r));n?.activeIndex!=null&&t.dispatch(IL({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Sh=$r("mouseMove"),_P=ps();_P.startListening({actionCreator:Sh,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=xm(n,n.tooltip.settings.shared),a=Fm(n,Vm(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(DE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(NE()))}});var D1={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},BP=Cr({name:"rootProps",initialState:D1,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:D1.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),NW=BP.reducer,{updateOptions:DW}=BP.actions,$P=Cr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:_W}=$P.actions,BW=$P.reducer,LP=$r("keyDown"),zP=$r("focus"),Hm=ps();Hm.startListening({actionCreator:LP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var s=Number(bm(i,Wo(r))),l=Fn(r);if(a==="Enter"){var c=gc(r,"axis","hover",String(i.index));t.dispatch(gh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:c}));return}var d=jL(r),u=d==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,h=s+f*u;if(!(l==null||h>=l.length||h<0)){var g=gc(r,"axis","hover",String(h));t.dispatch(gh({active:!0,activeIndex:h.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}});Hm.startListening({actionCreator:zP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",s=gc(r,"axis","hover",String(a));t.dispatch(gh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:s}))}}}});var Ar=$r("externalEvent"),FP=ps();FP.startListening({actionCreator:Ar,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:gz(r),activeDataKey:qE(r),activeIndex:Fi(r),activeLabel:YE(r),activeTooltipIndex:Fi(r),isTooltipActive:mz(r)};e.payload.handler(n,e.payload.reactEvent)}}});var $W=J([Ho],e=>e.tooltipItemPayloads),LW=J([$W,Ss,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(l=>l.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var s=t(a,r);return s}}}),VP=$r("touchMove"),HP=ps();HP.startListening({actionCreator:VP,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=xm(n,n.tooltip.settings.shared);if(i==="axis"){var a=Fm(n,Vm({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(DE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var s,l=r.touches[0],c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var d=c.getAttribute(kj),u=(s=c.getAttribute(Tj))!==null&&s!==void 0?s:void 0,f=LW(t.getState(),d,u);t.dispatch(IE({activeDataKey:u,activeIndex:d,activeCoordinate:f}))}}});var zW=qS({brush:eH,cartesianAxis:_7,chartData:Uz,errorBars:X7,graphicalItems:e7,layout:lB,legend:g3,options:zz,polarAxis:m9,polarOptions:BW,referenceElements:lH,rootProps:NW,tooltip:NL}),FW=function(t){return I6({reducer:zW,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([DP.middleware,_P.middleware,Hm.middleware,FP.middleware,HP.middleware]),enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(uj({type:"raf"}))},devTools:Ui.devToolsEnabled})};function WP(e){var{preloadedState:t,children:r}=e,n=Sr(),i=v.useRef(null);if(n)return r;i.current==null&&(i.current=FW(t));var a=lg;return C.createElement(AW,{context:a,store:i.current},r)}function UP(e){var{layout:t,margin:r}=e,n=ut(),i=Sr();return v.useEffect(()=>{i||(n(oB(t)),n(iB(r)))},[n,i,t,r]),null}function KP(e){var t=ut();return v.useEffect(()=>{t(DW(e))},[t,e]),null}var VW=["children"];function HW(e,t){if(e==null)return{};var r,n,i=WW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jc.apply(null,arguments)}var UW={width:"100%",height:"100%",display:"block"},KW=v.forwardRef((e,t)=>{var r=vg(),n=yg(),i=Bj();if(!Co(r)||!Co(n))return null;var{children:a,otherAttributes:s,title:l,desc:c}=e,d,u;return typeof s.tabIndex=="number"?d=s.tabIndex:d=i?0:void 0,typeof s.role=="string"?u=s.role:u=i?"application":void 0,C.createElement(Zh,jc({},s,{title:l,desc:c,role:u,tabIndex:d,width:r,height:n,style:UW,ref:t}),a)}),YW=e=>{var{children:t}=e,r=Ae(qc);if(!r)return null;var{width:n,height:i,y:a,x:s}=r;return C.createElement(Zh,{width:n,height:i,x:s,y:a},t)},_1=v.forwardRef((e,t)=>{var{children:r}=e,n=HW(e,VW),i=Sr();return i?C.createElement(YW,null,r):C.createElement(KW,jc({ref:t},n),r)});function qW(){var e=ut(),[t,r]=v.useState(null),n=Ae(BB);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Qt(a)&&a!==n&&e(sB(a))}},[t,e,n]),r}function B1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B1(Object(r),!0).forEach(function(n){XW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XW(e,t,r){return(t=ZW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=QW(e,"string");return typeof t=="symbol"?t:t+""}function QW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hi.apply(null,arguments)}var JW=()=>(eF(),null);function Ec(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var eU=v.forwardRef((e,t)=>{var r,n,i=v.useRef(null),[a,s]=v.useState({containerWidth:Ec((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Ec((n=e.style)===null||n===void 0?void 0:n.height)}),l=v.useCallback((d,u)=>{s(f=>{var h=Math.round(d),g=Math.round(u);return f.containerWidth===h&&f.containerHeight===g?f:{containerWidth:h,containerHeight:g}})},[]),c=v.useCallback(d=>{if(typeof t=="function"&&t(d),d!=null){var{width:u,height:f}=d.getBoundingClientRect();l(u,f);var h=m=>{var{width:x,height:y}=m[0].contentRect;l(x,y)},g=new ResizeObserver(h);g.observe(d),i.current=g}},[t,l]);return v.useEffect(()=>()=>{var d=i.current;d?.disconnect()},[l]),C.createElement(C.Fragment,null,C.createElement(Xc,{width:a.containerWidth,height:a.containerHeight}),C.createElement("div",Hi({ref:c},e)))}),tU=v.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=v.useState({containerWidth:Ec(r),containerHeight:Ec(n)}),s=v.useCallback((c,d)=>{a(u=>{var f=Math.round(c),h=Math.round(d);return u.containerWidth===f&&u.containerHeight===h?u:{containerWidth:f,containerHeight:h}})},[]),l=v.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:u}=c.getBoundingClientRect();s(d,u)}},[t,s]);return C.createElement(C.Fragment,null,C.createElement(Xc,{width:i.containerWidth,height:i.containerHeight}),C.createElement("div",Hi({ref:l},e)))}),rU=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return C.createElement(C.Fragment,null,C.createElement(Xc,{width:r,height:n}),C.createElement("div",Hi({ref:t},e)))}),nU=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return Mn(r)||Mn(n)?C.createElement(tU,Hi({},e,{ref:t})):C.createElement(rU,Hi({},e,{ref:t}))});function iU(e){return e===!0?eU:nU}var oU=v.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:s,onDoubleClick:l,onMouseDown:c,onMouseEnter:d,onMouseLeave:u,onMouseMove:f,onMouseUp:h,onTouchEnd:g,onTouchMove:m,onTouchStart:x,style:y,width:w,responsive:b,dispatchTouchEvents:j=!0}=e,P=v.useRef(null),E=ut(),[S,O]=v.useState(null),[k,M]=v.useState(null),A=qW(),_=mg(),D=_?.width>0?_.width:w,B=_?.height>0?_.height:i,H=v.useCallback(Z=>{A(Z),typeof t=="function"&&t(Z),O(Z),M(Z),Z!=null&&(P.current=Z)},[A,t,O,M]),T=v.useCallback(Z=>{E(NP(Z)),E(Ar({handler:a,reactEvent:Z}))},[E,a]),N=v.useCallback(Z=>{E(Sh(Z)),E(Ar({handler:d,reactEvent:Z}))},[E,d]),I=v.useCallback(Z=>{E(NE()),E(Ar({handler:u,reactEvent:Z}))},[E,u]),R=v.useCallback(Z=>{E(Sh(Z)),E(Ar({handler:f,reactEvent:Z}))},[E,f]),$=v.useCallback(()=>{E(zP())},[E]),U=v.useCallback(Z=>{E(LP(Z.key))},[E]),V=v.useCallback(Z=>{E(Ar({handler:s,reactEvent:Z}))},[E,s]),F=v.useCallback(Z=>{E(Ar({handler:l,reactEvent:Z}))},[E,l]),q=v.useCallback(Z=>{E(Ar({handler:c,reactEvent:Z}))},[E,c]),ie=v.useCallback(Z=>{E(Ar({handler:h,reactEvent:Z}))},[E,h]),ue=v.useCallback(Z=>{E(Ar({handler:x,reactEvent:Z}))},[E,x]),ge=v.useCallback(Z=>{j&&E(VP(Z)),E(Ar({handler:m,reactEvent:Z}))},[E,j,m]),Ee=v.useCallback(Z=>{E(Ar({handler:g,reactEvent:Z}))},[E,g]),Pe=iU(b);return C.createElement(eP.Provider,{value:S},C.createElement(dS.Provider,{value:k},C.createElement(Pe,{width:D??y?.width,height:B??y?.height,className:Qe("recharts-wrapper",n),style:GW({position:"relative",cursor:"default",width:D,height:B},y),onClick:T,onContextMenu:V,onDoubleClick:F,onFocus:$,onKeyDown:U,onMouseDown:q,onMouseEnter:N,onMouseLeave:I,onMouseMove:R,onMouseUp:ie,onTouchEnd:Ee,onTouchMove:ge,onTouchStart:ue,ref:H},C.createElement(JW,null),r)))}),aU=["width","height","responsive","children","className","style","compact","title","desc"];function sU(e,t){if(e==null)return{};var r,n,i=lU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var YP=v.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:s,style:l,compact:c,title:d,desc:u}=e,f=sU(e,aU),h=Qr(f);return c?C.createElement(C.Fragment,null,C.createElement(Xc,{width:r,height:n}),C.createElement(_1,{otherAttributes:h,title:d,desc:u},a)):C.createElement(oU,{className:s,style:l,width:r,height:n,responsive:i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},C.createElement(_1,{otherAttributes:h,title:d,desc:u,ref:t},C.createElement(uH,null,a)))});function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jh.apply(null,arguments)}var cU={top:5,right:5,bottom:5,left:5},uU={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:cU,reverseStackOrder:!1,syncMethod:"index",responsive:!1},dU=v.forwardRef(function(t,r){var n,i=ir(t.categoricalChartProps,uU),{chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,u={chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return C.createElement(WP,{preloadedState:{options:u},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:a},C.createElement(RP,{chartData:d.data}),C.createElement(UP,{layout:i.layout,margin:i.margin}),C.createElement(KP,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),C.createElement(YP,jh({},i,{ref:r})))}),fU=["axis","item"],zf=v.forwardRef((e,t)=>C.createElement(dU,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:fU,tooltipPayloadSearcher:tP,categoricalChartProps:e,ref:t}));function pU(e){var t=ut();return v.useEffect(()=>{t(_W(e))},[t,e]),null}var hU=["layout"];function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eh.apply(null,arguments)}function gU(e,t){if(e==null)return{};var r,n,i=mU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var vU={top:5,right:5,bottom:5,left:5},yU={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:vU,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},xU=v.forwardRef(function(t,r){var n,i=ir(t.categoricalChartProps,yU),{layout:a}=i,s=gU(i,hU),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u}=t,f={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return C.createElement(WP,{preloadedState:{options:f},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:l},C.createElement(RP,{chartData:i.data}),C.createElement(UP,{layout:a,margin:i.margin}),C.createElement(KP,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),C.createElement(pU,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),C.createElement(YP,Eh({},s,{ref:r})))}),bU=["item"],wU={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},CU=v.forwardRef((e,t)=>{var r=ir(e,wU);return C.createElement(xU,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:bU,tooltipPayloadSearcher:tP,categoricalChartProps:r,ref:t})});const Zn=["#4285F4","#34A853","#FBBC05","#EA4335","#9C27B0","#00ACC1","#8D6E63"],$1="28%",SU=({sysCd:e,appItCd:t,appCd:r})=>{const{getFormData:n}=ct.useSearchBox(),i=et.useCodeStore(),a=et.useSystemStore(),[s,l]=v.useState(""),[c,d]=v.useState(null),[u,f]=v.useState(!1),[h,g]=v.useState(!1),[m,x]=v.useState(!1),[y,w]=v.useState(!1),[b,j]=v.useState(null),[P,E]=v.useState([]),[S,O]=v.useState(null),[k,M]=v.useState(!1),[A,_]=v.useState({}),[D,B]=v.useState(!1),[H,T]=v.useState({}),N=v.useRef(null),I=v.useRef(null);v.useRef(null);const R=v.useRef(null),$=v.useRef(null),U=v.useRef(null),V=v.useRef({}),F=v.useMemo(()=>async K=>{const ee=K.target.value?.trim();h||!ee||(U.current&&clearTimeout(U.current),U.current=setTimeout(async()=>{M(!0),B(!1);try{const Q=R.current?.getFieldValue("sysCd"),de=R.current?.getFieldValue("appItCd"),ce=R.current?.getFieldValue("appCd");if(!Q||!de||!ce){M(!1);return}await se.SCMCODE00104({crprCd:R.current?.getFieldValue("crprCd")||"100",sysCd:Q,appItCd:de,appCd:ce,grpCd:ee})?(R.current?.setFields([{name:"grpCd",errors:["이미 사용중인 그룹코드입니다."]}]),p.message.error("이미 사용중인 그룹코드입니다."),B(!1)):(R.current?.setFields([{name:"grpCd",errors:[]}]),p.message.success("사용 가능한 그룹코드입니다."),B(!0))}catch(Q){console.error("그룹코드 중복 체크 실패:",Q),p.message.error("중복 체크 중 오류가 발생했습니다."),B(!1)}finally{M(!1)}},200))},[h]),q=v.useMemo(()=>async(K,ee)=>{const Q=K.target.value?.trim();if(y){const de=Q;if(!de)return;V.current[-1]&&clearTimeout(V.current[-1]),V.current[-1]=setTimeout(async()=>{_(ce=>({...ce,[-1]:!0})),T(ce=>{const ye={...ce};return delete ye[-1],ye});try{await se.SCMCODE00105({crprCd:$.current?.getFieldValue("crprCd")||"100",sysCd:$.current?.getFieldValue("sysCd")||"",appItCd:$.current?.getFieldValue("appItCd")||b?.appItCd||"CM",appCd:$.current?.getFieldValue("appCd")||b?.appCd||"CM",grpCd:$.current?.getFieldValue("grpCd")||"",dtlCd:de})?($.current?.setFields([{name:"dtlCd",errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),T(ye=>{const be={...ye};return delete be[-1],be})):($.current?.setFields([{name:"dtlCd",errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),T(ye=>({...ye,[-1]:!0})))}catch(ce){console.error("상세코드 중복 체크 실패:",ce),p.message.error("중복 체크 중 오류가 발생했습니다."),T(ye=>{const be={...ye};return delete be[-1],be})}finally{_(ce=>({...ce,[-1]:!1}))}},200);return}!Q||!b||(V.current[ee]&&clearTimeout(V.current[ee]),V.current[ee]=setTimeout(async()=>{_(de=>({...de,[ee]:!0})),T(de=>{const ce={...de};return delete ce[ee],ce});try{if(($.current?.getFieldValue("details")||[]).some((be,Ie)=>Ie!==ee&&be.dtlCd?.trim()===Q)){$.current?.setFields([{name:["details",ee,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("같은 상세코드가 이미 입력되었습니다."),T(be=>{const Ie={...be};return delete Ie[ee],Ie}),_(be=>({...be,[ee]:!1}));return}await se.SCMCODE00105({crprCd:b.crprCd||"100",sysCd:b.sysCd||"",appItCd:b.appItCd||"CM",appCd:b.appCd||"CM",grpCd:b.grpCd||"",dtlCd:Q})?($.current?.setFields([{name:["details",ee,"dtlCd"],errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),T(be=>{const Ie={...be};return delete Ie[ee],Ie})):($.current?.setFields([{name:["details",ee,"dtlCd"],errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),T(be=>({...be,[ee]:!0})))}catch(de){console.error("상세코드 중복 체크 실패:",de),p.message.error("중복 체크 중 오류가 발생했습니다."),T(ce=>{const ye={...ce};return delete ye[ee],ye})}finally{_(de=>({...de,[ee]:!1}))}},500))},[y,b]),ie=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{const ye=ee.index?.itemIndex;if(K.getValue(ye,"metaYn")==="Y"){ce.render(o.jsx("div",{}));return}const Ie=()=>{if(ye===void 0||ye<0)return;const me=N.current?.dp?.getJsonRow(ye);me&&(g(!0),B(!1),f(!0),setTimeout(()=>{R.current?.setFieldsValue({crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",grpNm:me.grpNm||"",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""})},100))},Re=()=>{if(ye===void 0||ye<0)return;const me=N.current?.dp?.getJsonRow(ye);me&&p.Modal.confirm({title:"삭제 확인",content:`그룹코드 '${me.grpCd} - ${me.grpNm}'을(를) 삭제하시겠습니까?`,okText:"확인",cancelText:"취소",onOk(){const Se={crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",grpNm:me.grpNm||"",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""};se.SCMCODE00202(Se)}})};ce.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(L.BwgButton,{icon:o.jsx(X.EditOutlined,{}),onClick:Ie}),o.jsx(L.BwgButton,{icon:o.jsx(X.DeleteOutlined,{style:{color:"red"}}),onClick:Re})]}))}),[]),ue=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{const ye=ee.index?.itemIndex;if(K.getValue(ye,"sysLockYn")==="Y"){ce.render(o.jsx("div",{}));return}const Ie=()=>{if(ye===void 0||ye<0)return;const me=I.current?.dp?.getJsonRow(ye);me&&(w(!0),x(!0),T({}),setTimeout(()=>{$.current?.setFieldsValue({crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",dtlCd:me.dtlCd||"",cmmnCd:me.cmmnCd||"",cmmnCdNm:me.cmmnCdNm||"",cmmnCdClr:me.cmmnCdClr||"",cmmnAbrv:me.cmmnAbrv||"",sysLockYn:me.sysLockYn||"N",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""})},100))},Re=()=>{if(ye===void 0||ye<0)return;const me=I.current?.dp?.getJsonRow(ye);me&&p.Modal.confirm({title:"삭제 확인",content:o.jsxs("div",{children:[o.jsx("div",{children:`정말 "${me.cmmnCdNm} [${me.dtlCd}]" 을(를) 삭제하시겠습니까?`}),o.jsx("div",{style:{marginTop:8,fontSize:"12px",color:"#999"},children:"해당 작업이 진행되면 다시 되돌릴 수 없습니다."})]}),centered:!0,okText:"확인",cancelText:"취소",onOk(){const Se={crprCd:me.crprCd||"100",sysCd:me.sysCd||"",appItCd:me.appItCd||"CM",appCd:me.appCd||"CM",grpCd:me.grpCd||"",dtlCd:me.dtlCd||"",cmmnCd:me.cmmnCd||"",cmmnCdNm:me.cmmnCdNm||"",cmmnCdClr:me.cmmnCdClr||"",cmmnAbrv:me.cmmnAbrv||"",sysLockYn:me.sysLockYn||"N",enblYn:me.enblYn||"N",sortOrd:me.sortOrd||0,rmrk:me.rmrk||""};se.SCMCODE00204(Se)}})};ce.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(p.Button,{icon:o.jsx(X.EditOutlined,{}),onClick:Ie}),o.jsx(p.Button,{icon:o.jsx(X.DeleteOutlined,{style:{color:"red"}}),onClick:Re})]}))}),[]),ge=v.useMemo(()=>oe.createBwgGridRenderer((K,ee,Q,de,ce)=>{K.getValue(ee.index?.itemIndex,"sysLockYn")==="Y"?ce.render(o.jsx(X.LockOutlined,{})):ce.render(o.jsx(X.UnlockOutlined,{}))}),[]),Ee=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"metaYn",header:{text:"메타"},width:80,styleName:"center"},{fieldName:"sysCd",header:{text:"시스템코드"},width:80},{fieldName:"appItCd",header:{text:"앱 통합코드"},width:80},{fieldName:"appCd",header:{text:"앱 코드"},width:120},{fieldName:"grpCd",header:{text:"그룹코드"},width:140},{fieldName:"grpNm",header:{text:"그룹명칭"},width:220,styleName:"left"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center",renderer:oe.realFormat.checkYdisabled},{fieldName:"sortOrd",visible:!1},{fieldName:"rmrk",visible:!1},{fieldName:"inptDt",visible:!1},{fieldName:"inptId",visible:!1},{fieldName:"chngDt",visible:!1},{fieldName:"chngId",visible:!1},{fieldName:"moreActions",header:{text:"액션"},renderer:"moreActions"}],[]),Pe=v.useMemo(()=>[{fieldName:"crprCd",visible:!1},{fieldName:"sysCd",visible:!1},{fieldName:"appItCd",visible:!1},{fieldName:"appCd",visible:!1},{fieldName:"grpCd",visible:!1},{fieldName:"dtlCd",header:{text:"상세코드"},width:140,styleName:"left",footer:{valueCallback:K=>{const ee=K.getDataSource();return ee?ee.getRowCount()+"건":"0"}}},{fieldName:"cmmnCd",header:{text:"공통코드"},width:160,styleName:"left"},{fieldName:"cmmnCdNm",header:{text:"공통코드명"},width:220,styleName:"left"},{fieldName:"cmmnCdClr",visible:!1},{fieldName:"cmmnAbrv",header:{text:"약어"},width:120,styleName:"left"},{fieldName:"sysLockYn",header:{text:"시스템잠금"},width:110,styleName:"center",renderer:"sysLockYn"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center",renderer:oe.realFormat.checkYdisabled},{fieldName:"sortOrd",visible:!1},{fieldName:"rmrk",visible:!1},{fieldName:"inptDt",visible:!1},{fieldName:"inptId",visible:!1},{fieldName:"chngDt",visible:!1},{fieldName:"chngId",visible:!1},{fieldName:"moreActions",header:{text:"액션"},renderer:"moreActions"}],[]),Z=v.useMemo(()=>({container:{indicator:!0,check:!0,page:!0},display:{rowHeight:30}}),[]),ve=v.useMemo(()=>({container:{indicator:!0,page:!0},display:{rowHeight:20}}),[]);v.useMemo(()=>[{fieldName:"crprCd",header:{text:"회사코드"},width:120,styleName:"left"},{fieldName:"sysCd",header:{text:"시스템코드"},width:120,styleName:"left"},{fieldName:"appItCd",header:{text:"앱 통합코드"},width:140,styleName:"left"},{fieldName:"appCd",header:{text:"앱 코드"},width:120,styleName:"left"},{fieldName:"cmmnCd",header:{text:"공통코드"},width:140,styleName:"left"},{fieldName:"optnCd",header:{text:"옵션코드"},width:140,styleName:"left"},{fieldName:"optnNm",header:{text:"옵션명"},width:200,styleName:"left"},{fieldName:"optnDesc",header:{text:"옵션설명"},width:250,styleName:"left"},{fieldName:"enblYn",header:{text:"사용여부"},width:100,styleName:"center"},{fieldName:"sortOrd",header:{text:"정렬순서"},width:100,styleName:"right"},{fieldName:"inptDt",header:{text:"입력일시"},width:150,styleName:"center"},{fieldName:"inptId",header:{text:"입력자"},width:120,styleName:"left"},{fieldName:"chngDt",header:{text:"변경일시"},width:150,styleName:"center"},{fieldName:"chngId",header:{text:"변경자"},width:120,styleName:"left"}],[]),v.useMemo(()=>({container:{indicator:!0,footer:!0}}),[]);const fe=K=>{const ee=i.getAvailableGroupCodes(),Q=[];ee.forEach(ce=>{const ye=i.getCodeList(ce,{enabledOnly:!1,systemCodeOnly:K==="Y",sortByOrder:!1});let be=!1;if(K==="")be=ye.length>0;else if(K==="Y")be=ye.length>0;else if(K==="N"){const Ie=i.codeData;Ie&&Ie[ce]&&(be=Object.values(Ie[ce]).some(Re=>Re.systemCodeYn!=="Y"))}be&&Q.push({grpCd:ce,grpNm:""})});const de=s?Q.filter(ce=>ce.grpCd.toLowerCase().includes(s.toLowerCase())):Q;N.current?.addAllData(de)},z=(K,ee)=>{if(!K){I.current?.addAllData([]);return}const Q=i.codeData;if(!Q||!Q[K]){I.current?.addAllData([]);return}const ye=Object.values(Q[K]).filter(be=>!(ee==="Y"&&be.systemCodeYn!=="Y"||ee==="N"&&be.systemCodeYn==="Y")).sort((be,Ie)=>be.sortOrder!==Ie.sortOrder?be.sortOrder-Ie.sortOrder:be.codeValue.localeCompare(Ie.codeValue)).map(be=>({commonCode:be.commonCode,codeNm:be.codeNm,codeValue:be.codeValue,labelColor:be.labelColor,sortOrder:be.sortOrder,enblYn:be.enabled?"Y":"N",systemCodeYn:be.systemCodeYn,rmrk:be.originalData?.rmrk??null}));I.current?.addAllData(ye)};v.useRef(!1),v.useEffect(()=>{console.log("SystemCodeManage useEffect"),se.SCMCODE00101()},[]),v.useEffect(()=>{const K=n()?.sysLockYn||"";fe(K),z(c,K)},[s]);const ne=async()=>{se.SCMCODE00101()},Y=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.sysCd))).slice(0,6),[a.systemMap]),le=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.appItCd))).slice(0,8),[a.systemMap]),pe=v.useMemo(()=>Array.from(new Set(a.systemMap.map(K=>K.appCd))).slice(0,8),[a.systemMap]),xe=K=>{if(K<=0)return[];const ee=Array.from({length:K},()=>Math.random()+.2),Q=ee.reduce((de,ce)=>de+ce,0);return ee.map(de=>Math.round(de/Q*100))},je=v.useMemo(()=>{const K=Math.max(30,Math.round(Math.random()*70)),ee=100-K;return[{name:"시스템코드",value:K},{name:"사용자코드",value:ee}]},[]),Me=v.useMemo(()=>{const K=xe(Y.length);return Y.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[Y]),W=v.useMemo(()=>{const K=xe(le.length);return le.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[le]),te=v.useMemo(()=>{const K=xe(pe.length);return pe.map((ee,Q)=>({name:ee,value:K[Q]??0}))},[pe]),ae=v.useMemo(()=>{const ee=[{sysCd:"KE",sysNm:"K-ERP"},{sysCd:"CH",sysNm:"파트너관리"},{sysCd:"HR",sysNm:"K-HR"},{sysCd:"YT",sysNm:"연말정산"},{sysCd:"CM",sysNm:"공통"},{sysCd:"PA",sysNm:"평정"},{sysCd:"KS",sysNm:"K-업무지원"},{sysCd:"DE",sysNm:"온통"}].map(Q=>({label:Q.sysNm,value:Q.sysCd}));return[{label:"전체",value:""},...ee]},[]),re=v.useMemo(()=>{const ee=[{code:"KERP",name:""},{code:"KHR",name:"인사"},{code:"KHYT",name:"연말정산"},{code:"KCM",name:"공통"},{code:"KHPE",name:"평정"},{code:"EAUD",name:"감사 01"},{code:"INR",name:"감사 02"},{code:"ITAM",name:"자산 01"},{code:"CMM",name:"자산 02"},{code:"OAM",name:"자산 03"},{code:"KSGA",name:"총무"},{code:"HIS",name:"문헌"},{code:"WFAX",name:"IT서비스 0"},{code:"SMS",name:"IT서비스 0"},{code:"BID",name:"기타업무서비스 01"},{code:"PAM",name:"기타업무서비스 02"},{code:"DAC",name:"기타업무서비스 03"},{code:"IPR",name:"기타업무서비스 04"},{code:"ISB",name:"정보공유게시판"},{code:"ITSM",name:"ITSM"},{code:"BCOM",name:"소통"}].map(Q=>({label:Q.name?`${Q.code} (${Q.name})`:Q.code,value:Q.code}));return[{label:"전체",value:""},...ee]},[]),G=v.useMemo(()=>{const ee=[{code:"FI",name:"재무회계"},{code:"FM",name:"예산관리"},{code:"MM",name:"구매계약"},{code:"SD",name:"영업관리"},{code:"PMN",name:"파트너관리"},{code:"HR",name:"HR 솔루션"},{code:"YT",name:"연말정산"},{code:"CM",name:"프레임워크 공통"},{code:"PE",name:"평정"},{code:"EAUD",name:"e-감사"},{code:"INR",name:"청렴신고"},{code:"ITAM",name:"ITAM"},{code:"CMM",name:"차량/회의실"},{code:"OAM",name:"OA전산물품 관리"},{code:"GAM",name:"총무관리"},{code:"ACM",name:"출입관리"},{code:"IVM",name:"비품관리"},{code:"SGS",name:"인장서비스"},{code:"HIS",name:"사료관리"},{code:"ITSM",name:"ITSM"},{code:"WFAX",name:"웹펙스서비스"},{code:"SMS",name:"메시지서비스"},{code:"BID",name:"경영공시"},{code:"PAM",name:"언론미디어"},{code:"DAC",name:"심의자문위원회"},{code:"IPR",name:"지식재산권 신청"},{code:"ISB",name:"정보공유게시판"},{code:"BCOM",name:"온통"}].map(Q=>({label:`${Q.code} (${Q.name})`,value:Q.code}));return[{label:"전체",value:""},...ee]},[]),se=v.useMemo(()=>({SCMCODE00101:()=>{const K=n(),ee={crprCd:K?.crprCd||"100",sysCd:K?.sysCd||"",appItCd:K?.appItCd||"",appCd:K?.appCd||"",sysLockYn:K?.sysLockYn||"",keyword:K?.keyword||""};oe.callService("SCMCODE00101",ee).then(Q=>{N.current?.addAllData(Q.data||[])}).catch(Q=>{p.message.error("그룹코드 조회에 실패했습니다.")})},SCMCODE00102:K=>{oe.callService("SCMCODE00102",K,{showLoading:!1}).then(ee=>{I.current?.addAllData(ee.data||[])}).catch(ee=>{p.message.error("상세코드 조회에 실패했습니다.")})},SCMCODE00104:K=>{const ee={grp:K};return oe.callService("SCMCODE00104",ee,{showLoading:!1}).then(Q=>Q.dup===!0).catch(Q=>(console.error("그룹코드 중복 체크 실패:",Q),!1))},SCMCODE00105:K=>{const ee={dtl:K};return oe.callService("SCMCODE00105",ee,{showLoading:!1}).then(Q=>Q.dup===!0).catch(Q=>(console.error("상세코드 중복 체크 실패:",Q),!1))},SCMCODE00201:(K,ee)=>{const Q={flag:K,grp:ee};return oe.callService("SCMCODE00201",Q).then(de=>(p.message.success(K==="I"?"그룹코드가 등록되었습니다.":"그룹코드가 수정되었습니다."),se.SCMCODE00101(),de)).catch(de=>{throw console.error("그룹코드 저장 실패:",de),de})},SCMCODE00202:K=>{const ee={grp:K};return oe.callService("SCMCODE00202",ee).then(Q=>(p.message.success("그룹코드가 삭제되었습니다."),se.SCMCODE00101(),Q)).catch(Q=>{throw p.message.error("그룹코드 삭제에 실패했습니다."),Q})},SCMCODE00203:(K,ee,Q)=>{const de={flag:K,dtlCnt:ee,dtl:Q};return oe.callService("SCMCODE00203",de).then(ce=>(p.message.success(K==="I"?"상세코드가 등록되었습니다.":"상세코드가 수정되었습니다."),b&&se.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),ce)).catch(ce=>{throw console.error("상세코드 저장 실패:",ce),p.message.error(K==="I"?"상세코드 등록에 실패했습니다.":"상세코드 수정에 실패했습니다."),ce})},SCMCODE00204:K=>{const ee={dtl:K};return oe.callService("SCMCODE00204",ee).then(Q=>(p.message.success("상세코드가 삭제되었습니다."),b&&se.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),Q)).catch(Q=>{throw p.message.error("상세코드 삭제에 실패했습니다."),Q})}}),[]);return o.jsxs(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:ne}]},searchBox:{reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:[16,8],style:{marginBottom:8},children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",initialValue:""},selectProps:{placeholder:"시스템코드를 선택하세요",options:ae}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"통합코드",name:"appItCd",initialValue:""},selectProps:{placeholder:"통합코드를 선택하세요",options:re}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱코드",name:"appCd",initialValue:""},selectProps:{placeholder:"앱코드를 선택하세요",options:G}})})]}),o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:6,children:o.jsx(L.BwgSelect,{itemProps:{label:"코드구분",name:"sysLockYn",initialValue:""},selectProps:{options:[{label:"전체",value:""},{label:"시스템코드",value:"Y"},{label:"업무코드",value:"N"}]}})}),o.jsx(p.Col,{span:6,children:o.jsx(L.BwgInput,{itemProps:{label:"검색어",name:"keyword",initialValue:""},inputProps:{placeholder:"검색어를 입력하세요."}})})]})]})},children:[o.jsxs(ze,{type:"horizontal",style:{height:"calc(100vh - 120px)",gap:12,overflow:"hidden"},children:[o.jsxs(De,{border:!0,style:{flex:`0 0 ${$1}`,maxWidth:$1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[o.jsx(Le,{title:"공통코드 현황"}),o.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%",padding:"8px 0"},size:12,children:[o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"시스템코드 대비 사용자코드"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(CU,{children:[o.jsx(EP,{data:je,dataKey:"value",nameKey:"name",outerRadius:65,label:!0,children:je.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c1-${ee}`))}),o.jsx(vl,{}),o.jsx(Zc,{})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"시스템코드별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:Me,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:Me.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c2-${ee}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"통합코드별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:W,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:W.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c3-${ee}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"앱별 백분율"}),o.jsx(sl,{width:"100%",height:160,children:o.jsxs(zf,{data:te,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Rl,{strokeDasharray:"3 3"}),o.jsx(Al,{dataKey:"name",hide:!0}),o.jsx(Il,{hide:!0,domain:[0,100]}),o.jsx(vl,{}),o.jsx(Ml,{dataKey:"value",children:te.map((K,ee)=>o.jsx(oi,{fill:Zn[ee%Zn.length]},`c4-${ee}`))})]})})]})]})})]}),o.jsxs(De,{border:!0,style:{flex:"1 1 auto",height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:[o.jsx(Le,{title:"그룹코드",children:o.jsx(L.BwgButton,{type:"primary",onClick:()=>{g(!1),B(!1),f(!0),setTimeout(()=>{R.current?.resetFields(),R.current?.setFieldsValue({crprCd:"100",sysCd:__SYS_CD__||"",appItCd:"CM",appCd:"CM",enblYn:"Y",sortOrd:0})},100)},children:"그룹코드 등록"})}),o.jsx("div",{style:{flex:"0 0 45%",overflow:"hidden",display:"flex",flexDirection:"column"},children:o.jsx(Fe,{ref:N,gridColumns:Ee,gridOptions:Z,gridEvents:v.useMemo(()=>({onCurrentRowChanged:(K,ee,Q)=>{if(Q<0){j(null);return}const de=N.current?.dp?.getValue(Q,"sysCd")||"",ce=N.current?.dp?.getValue(Q,"appItCd")||"",ye=N.current?.dp?.getValue(Q,"appCd")||"",be=N.current?.dp?.getValue(Q,"grpCd")||"",Ie=N.current?.dp?.getJsonRow(Q);j(Ie),be&&se.SCMCODE00102({sysCd:de,appItCd:ce,appCd:ye,grpCd:be})}}),[se]),renderers:[{name:"moreActions",renderer:ie}]})}),o.jsxs("div",{style:{flex:"1 1 auto",overflow:"hidden",display:"flex",flexDirection:"column",marginTop:12},children:[o.jsx(Le,{title:"상세코드",children:o.jsx(L.BwgButton,{type:"primary",onClick:()=>{if(!b){p.message.warning("그룹코드를 먼저 선택하세요.");return}w(!1),x(!0),O(null),T({}),E([{dtlCd:"",cmmnCd:"",cmmnCdNm:"",cmmnCdClr:"",cmmnAbrv:"",enblYn:"Y",sortOrd:0,rmrk:""}])},disabled:!b,children:"상세코드 등록"})}),o.jsx("div",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:o.jsx(Fe,{ref:I,gridColumns:Pe,gridOptions:ve,renderers:[{name:"moreActions",renderer:ue},{name:"sysLockYn",renderer:ge}]})})]})]})]}),o.jsx(un,{title:h?"그룹코드 수정":"그룹코드 등록",open:u,placement:"right",width:"40%",onClose:()=>{f(!1),g(!1),B(!1),R.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{f(!1),g(!1),B(!1),R.current?.resetFields()},children:"취소"}),o.jsx(p.Button,{type:"primary",disabled:!h&&!D,onClick:async()=>{try{const K=await R.current?.validateFields();if(!K)return;const ee={crprCd:K.crprCd||"100",sysCd:K.sysCd||"",appItCd:K.appItCd||"CM",appCd:K.appCd||"CM",grpCd:K.grpCd||"",grpNm:K.grpNm||"",enblYn:K.enblYn==="Y"?"Y":"N",sortOrd:K.sortOrd||0,rmrk:K.rmrk||""};if(!h&&!D){p.message.warning("그룹코드 중복체크를 먼저 완료해주세요.");return}await se.SCMCODE00201(h?"U":"I",ee),f(!1),g(!1),B(!1),R.current?.resetFields()}catch(K){console.error(h?"그룹코드 수정 실패:":"그룹코드 등록 실패:",K)}},children:"저장"})]}),children:o.jsxs(L.BwgForm,{ref:R,style:{padding:"10px 20px"},initialValues:{crprCd:"100",sysCd:__SYS_CD__||"",appItCd:"CM",appCd:"CM",enblYn:"Y",sortOrd:0},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",rules:[{required:!0,message:"시스템코드를 선택하세요."}]},selectProps:{placeholder:"시스템코드를 선택하세요",options:ae.filter(K=>K.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱 통합코드",name:"appItCd",rules:[{required:!0,message:"앱 통합코드를 선택하세요."}]},selectProps:{placeholder:"앱 통합코드를 선택하세요",options:re.filter(K=>K.value!==""),disabled:h}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgSelect,{itemProps:{label:"앱 코드",name:"appCd",rules:[{required:!0,message:"앱 코드를 선택하세요."}]},selectProps:{placeholder:"앱 코드를 선택하세요",options:G.filter(K=>K.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹코드",name:"grpCd",rules:[{required:!0,message:"그룹코드를 입력하세요."},{max:5,message:"그룹코드는 5자 이하여야 합니다."}]},inputProps:{placeholder:"그룹코드를 입력하세요",maxLength:5,showCount:!0,count:{max:5},disabled:h,suffix:k?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):D&&!h?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onKeyDown:K=>{if(h){K.preventDefault();return}K.target.value.length>=5&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter"].includes(K.key)&&(K.preventDefault(),p.message.warning("입력은 다섯글자까지입니다."))},onChange:K=>{if(h){K.preventDefault();return}K.target.value.length>5&&(p.message.warning("입력은 다섯글자까지입니다."),K.target.value=K.target.value.slice(0,5)),D&&B(!1),R.current?.getFieldError("grpCd")?.length&&R.current?.setFields([{name:"grpCd",errors:[]}])},onBlur:F}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹명칭",name:"grpNm",rules:[{required:!0,message:"그룹명칭을 입력하세요."}]},inputProps:{placeholder:"그룹명칭을 입력하세요"}})})}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:K=>({checked:K==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:"sortOrd"},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]})}),o.jsx(un,{title:y?"상세코드 수정":"상세코드 등록",open:m,placement:"right",width:"50%",onClose:()=>{x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()},children:"취소"}),o.jsx(p.Form.Item,{shouldUpdate:!0,children:()=>{const K=$.current?.getFieldValue("details")||[];let ee=!1;if(y)ee=!0;else if(K.length>0){const Q=K.every(ce=>ce?.dtlCd?.trim()),de=K.every((ce,ye)=>ce?.dtlCd?.trim()&&H[ye]===!0);ee=Q&&de}return o.jsx(p.Button,{type:"primary",disabled:!ee,onClick:async()=>{try{const Q=await $.current?.validateFields();if(!Q)return;if(!y&&Q.details){if(!Q.details.every((ye,be)=>!ye.dtlCd?.trim()||H[be]===!0)){p.message.warning("모든 상세코드의 중복체크를 완료해주세요.");return}for(let ye=0;ye<Q.details.length;ye++){const Ie=Q.details[ye].dtlCd?.trim();if(!Ie)continue;if(Q.details.some((me,Se)=>Se!==ye&&me.dtlCd?.trim()===Ie)){$.current?.setFields([{name:["details",ye,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("중복된 상세코드가 있습니다.");return}}}const de=y?[{...Q,crprCd:Q.crprCd||"100",sysCd:Q.sysCd||"",appItCd:Q.appItCd||b?.appItCd||"CM",appCd:Q.appCd||b?.appCd||"CM",grpCd:Q.grpCd||"",enblYn:Q.enblYn==="Y"?"Y":"N",sysLockYn:Q.sysLockYn==="Y"?"Y":"N"}]:(Q.details||[]).map(ce=>{const ye=b?.sysCd||"",be=b?.grpCd||"",Ie=ce.dtlCd||"",Re=`${ye}${be}${Ie}`;return{...ce,crprCd:b?.crprCd||"100",sysCd:ye,appItCd:b?.appItCd||"CM",appCd:b?.appCd||"CM",grpCd:be,cmmnCd:Re,enblYn:ce.enblYn==="Y"?"Y":"N",sysLockYn:ce.sysLockYn==="Y"?"Y":"N",sortOrd:ce.sortOrd||0}});await se.SCMCODE00203(y?"U":"I",de.length,de),x(!1),w(!1),E([]),O(null),T({}),$.current?.resetFields()}catch(Q){console.error(y?"상세코드 수정 실패:":"상세코드 등록 실패:",Q)}},children:"저장"})}})]}),children:o.jsxs(L.BwgForm,{ref:$,style:{padding:"10px 20px"},children:[b&&o.jsx(p.Card,{style:{marginBottom:16,background:"#f5f5f5"},children:o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"시스템코드:"})," ",b.sysCd||""]})}),o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"그룹코드:"})," ",b.grpCd||""]})}),o.jsx(p.Col,{span:8,children:o.jsxs("div",{children:[o.jsx("strong",{children:"그룹명칭:"})," ",b.grpNm||""]})})]})}),y?o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"시스템코드",name:"sysCd"},inputProps:{disabled:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"그룹코드",name:"grpCd"},inputProps:{disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"상세코드",name:"dtlCd",rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",disabled:!0,suffix:A[-1]?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):H[-1]?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드",name:"cmmnCd",rules:[{required:!0,message:"공통코드를 입력하세요."}]},inputProps:{placeholder:"공통코드를 입력하세요",disabled:!0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드명",name:"cmmnCdNm",rules:[{required:!0,message:"공통코드명을 입력하세요."}]},inputProps:{placeholder:"공통코드명을 입력하세요"}})})}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"색상",name:"cmmnCdClr",getValueFromEvent:K=>K&&typeof K.toHexString=="function"?K.toHexString():K||"",children:o.jsx(p.ColorPicker,{format:"hex",showText:!0,presets:[{label:"추천 색상",colors:["#FF4D4F","#FF7A45","#FFA940","#FFC53D","#FFEC3D","#BAE637","#73D13D","#36CFC9","#40A9FF","#1890FF","#2F54EB","#722ED1","#EB2F96","#F5222D","#FA541C","#FA8C16","#FADB14","#A0D911","#13C2C2","#096DD9","#0050B3","#531DAB","#C41D7F","#CF1322","#D4380D","#D46B08","#D4B106","#7CB305","#08979C","#0050B3"]}]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"약어",name:"cmmnAbrv"},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:K=>({checked:K==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:"sortOrd"},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]}):o.jsx(p.Form.List,{name:"details",initialValue:P,children:(K,{add:ee,remove:Q})=>o.jsxs(o.Fragment,{children:[K.map((de,ce)=>{const ye=S===ce,be=b?.sysCd||"",Ie=b?.grpCd||"";return o.jsx(p.Card,{style:{marginBottom:16},children:o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:20,children:o.jsx(p.Form.Item,{noStyle:!0,shouldUpdate:(Re,me)=>{const Se=Re?.details?.[de.name]?.dtlCd,Te=me?.details?.[de.name]?.dtlCd;return Se!==Te},children:({getFieldValue:Re})=>{const me=Re(["details",de.name,"dtlCd"])||"",Se=`${be}${Ie}${me}`;return me&&$.current&&Re(["details",de.name,"cmmnCd"])!==Se&&setTimeout(()=>{$.current?.setFieldValue(["details",de.name,"cmmnCd"],Se)},0),o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"상세코드",name:[de.name,"dtlCd"],rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",suffix:A[ce]?o.jsx(X.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):H[ce]?o.jsx(X.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onChange:Te=>{H[ce]&&T(ft=>{const jr={...ft};return delete jr[ce],jr}),$.current?.getFieldError(["details",ce,"dtlCd"])?.length&&$.current?.setFields([{name:["details",ce,"dtlCd"],errors:[]}])},onBlur:Te=>q(Te,ce)}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드",name:[de.name,"cmmnCd"]},inputProps:{disabled:!0,placeholder:"자동 생성됩니다",value:Se}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgInput,{itemProps:{label:"공통코드명",name:[de.name,"cmmnCdNm"],rules:[{required:!0,message:"공통코드명을 입력하세요."}]},inputProps:{placeholder:"공통코드명을 입력하세요"}})})}),ye&&o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgFormItem,{label:"색상",name:[de.name,"cmmnCdClr"],getValueFromEvent:Te=>Te&&typeof Te.toHexString=="function"?Te.toHexString():Te||"",children:o.jsx(p.ColorPicker,{format:"hex",showText:!0,presets:[{label:"추천 색상",colors:["#FF4D4F","#FF7A45","#FFA940","#FFC53D","#FFEC3D","#BAE637","#73D13D","#36CFC9","#40A9FF","#1890FF","#2F54EB","#722ED1","#EB2F96","#F5222D","#FA541C","#FA8C16","#FADB14","#A0D911","#13C2C2","#096DD9","#0050B3","#531DAB","#C41D7F","#CF1322","#D4380D","#D46B08","#D4B106","#7CB305","#08979C","#0050B3"]}]})})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgInput,{itemProps:{label:"약어",name:[de.name,"cmmnAbrv"]},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(L.BwgCheck,{itemProps:{label:"사용여부",name:[de.name,"enblYn"],getValueProps:Te=>({checked:Te==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(L.BwgNumber,{itemProps:{label:"정렬순서",name:[de.name,"sortOrd"]},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(L.BwgTextArea,{itemProps:{label:"비고",name:[de.name,"rmrk"]},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]})]})}})}),o.jsx(p.Col,{span:4,style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-end",paddingTop:30},children:o.jsxs(p.Space,{size:"small",children:[o.jsx(p.Button,{type:"link",size:"small",icon:ye?o.jsx(X.UpOutlined,{}):o.jsx(X.DownOutlined,{}),onClick:()=>{O(ye?null:ce)},style:{fontSize:"12px",padding:0},children:ye?"간단입력":"추가입력"}),K.length>1&&o.jsx(p.Button,{type:"link",danger:!0,size:"small",icon:o.jsx(X.DeleteOutlined,{}),onClick:()=>{Q(de.name),S===ce&&O(null)},style:{fontSize:"12px",padding:0},children:"삭제"})]})})]})},de.key)}),o.jsx(p.Button,{type:"dashed",onClick:()=>{ee({dtlCd:"",cmmnCd:"",cmmnCdNm:"",cmmnCdClr:"",cmmnAbrv:"",enblYn:"Y",sortOrd:0,rmrk:""})},block:!0,style:{marginTop:16},children:"+ 행 추가"})]})})]})})]})},jU=e=>{const t=v.useRef(null),r=v.useMemo(()=>[{fieldName:"userId",header:{text:"아이디"}},{fieldName:"userName",header:{text:"이름"}},{fieldName:"email",header:{text:"이메일"}},{fieldName:"createdAt",header:{text:"생성일"}}],[]);return o.jsx(kt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{}}]},searchBox:{},children:o.jsx(ze,{children:o.jsx(De,{style:{height:"300px"},children:o.jsx(Fe,{ref:t,gridColumns:r})})})})},{TextArea:EU}=p.Input,Wm=({boardMstrId:e,isCompleted:t=!1})=>{const{user:r}=et.useUserStore(),[n,i]=v.useState(!1),[a,s]=v.useState(!1),[l,c]=v.useState(15),[d,u]=v.useState([]),[f,h]=v.useState(""),g=v.useRef(null),m=b=>{i(!0),oe.callService("SCMBoardDtls0001",{boardMstrId:b},{isPopup:!0,showLoading:!1}).then(j=>{if(j&&j.subList){const P=j.subList.map(E=>({id:E.seq,author:E.userNm||E.regUserId,regUserId:E.regUserId,content:E.content,regDt:E.regDt}));u(P)}else u([])}).catch(j=>{console.error("게시글 댓글 목록 조회 실패:",j)}).finally(()=>{i(!1),c(15)})},x=()=>{e&&m(e)},y=()=>{if(!f.trim()){p.message.warning("댓글 상세내용 작성");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),oe.callService("SCMBoardDtls0002",{boardMstrId:e,content:f.trim()},{isPopup:!0,showLoading:!1}).then(b=>{b&&b.result===1?(console.log("댓글이 등록되었습니다."),h(""),m(e),setTimeout(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},100)):console.error("댓글 등록에 실패했습니다.",b)}).catch(b=>{console.error("댓글 등록 중 오류가 발생했습니다.",b)}).finally(()=>{i(!1)})},w=b=>{const j=d.find(P=>P.id===b);if(j&&j.regUserId!==r?.userId){p.message.error("본인이 작성한 댓글만 삭제할 수 있습니다.");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),oe.callService("SCMBoardDtls0003",{boardMstrId:e,seq:b},{isPopup:!0,showLoading:!1}).then(P=>{P&&P.result===1?(console.log("댓글이 삭제되었습니다."),m(e)):console.error("댓글 삭제에 실패했습니다.",P)}).catch(P=>{console.error("댓글 삭제 중 오류가 발생했습니다.",P)}).finally(()=>{i(!1)})};return v.useEffect(()=>{e?m(e):u([])},[e]),o.jsxs(De,{style:{flex:"0 0 400px",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{borderBottom:"1px solid #e8e8e8",paddingBottom:"12px",marginBottom:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:"#262626"},children:"댓글"}),o.jsxs("div",{style:{position:"relative",display:"inline-block"},children:[o.jsx(p.Button,{type:"text",icon:o.jsx(X.ReloadOutlined,{spin:a||n}),onClick:x,disabled:a||n,size:"small",style:{fontSize:"12px",color:t?"#d9d9d9":n?"#8c8c8c":"#595959",height:"24px",padding:"0 8px"}}),!t&&o.jsx("span",{style:{position:"absolute",top:"-4px",right:"-4px",fontSize:"10px",fontWeight:"700",color:a?"#8c8c8c":"#1890ff",minWidth:"14px",height:"14px",lineHeight:"14px",textAlign:"center",borderRadius:"50%",pointerEvents:"none"},children:l})]})]}),o.jsx("div",{ref:g,style:{flex:1,overflowY:"auto",marginBottom:"16px",minHeight:0,position:"relative"},children:n?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:[o.jsx("div",{style:{marginBottom:"12px"},children:o.jsx(X.ReloadOutlined,{spin:!0,style:{fontSize:"24px"}})}),o.jsx("div",{style:{fontSize:"13px"},children:"댓글을 불러오는 중..."})]}):d.length===0?o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:o.jsx("div",{style:{fontSize:"13px"},children:"등록된 댓글이 없습니다."})}):o.jsx(p.List,{dataSource:d,renderItem:b=>o.jsxs(p.List.Item,{style:{position:"relative",paddingRight:"20px",padding:"12px 20px 12px 12px",borderBottom:"1px solid #f0f0f0"},children:[o.jsx(p.List.Item.Meta,{avatar:o.jsx(p.Avatar,{size:32,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:b.author[0]}),title:o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"4px"},children:[o.jsx("span",{style:{fontWeight:"500",fontSize:"13px",color:"#262626"},children:b.author}),o.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:b.regDt})]}),description:o.jsx("span",{style:{fontSize:"13px",color:"#595959",lineHeight:"1.5"},children:b.content})}),b.regUserId===r?.userId&&o.jsx(p.Button,{type:"text",danger:!0,icon:o.jsx(X.DeleteOutlined,{style:{fontSize:"12px"}}),size:"small",onClick:()=>w(b.id),disabled:n,style:{position:"absolute",right:"8px",top:"62%",transform:"translateY(-50%)",opacity:n?.3:.5,height:"24px",width:"24px",padding:0},onMouseEnter:j=>{n||(j.currentTarget.style.opacity="1")},onMouseLeave:j=>{j.currentTarget.style.opacity=n?"0.3":"0.5"}})]},b.id)})}),o.jsx("div",{style:{padding:"12px",borderTop:"1px solid #e8e8e8",backgroundColor:t?"#f5f5f5":"#fafafa",flexShrink:0,marginTop:"auto"},children:t?o.jsxs("div",{style:{textAlign:"center",padding:"20px",color:"#8c8c8c",fontSize:"13px",backgroundColor:"#ffffff",borderRadius:"6px",border:"1px solid #e8e8e8"},children:[o.jsx("div",{style:{marginBottom:"8px"},children:o.jsx(X.AlertTwoTone,{twoToneColor:"#faad14"})}),o.jsx("div",{children:"이미 완료처리된 게시글입니다."}),o.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"댓글을 작성할 수 없습니다."})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{marginBottom:"8px"},children:o.jsx(EU,{rows:2,placeholder:n?"댓글 처리 중...":"댓글을 입력하세요...",value:f,onChange:b=>h(b.target.value),maxLength:300,disabled:n,style:{borderRadius:"6px",border:"1px solid #d9d9d9",resize:"none",fontSize:"13px",backgroundColor:n?"#f5f5f5":"#ffffff",color:n?"#8c8c8c":"#000000"},onFocus:b=>{n||(b.currentTarget.style.borderColor="#1890ff",b.currentTarget.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.05)")},onBlur:b=>{b.target.style.borderColor="#d9d9d9",b.target.style.boxShadow="none"}})}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:n?"처리 중...":`${f.length} / 300자`}),o.jsx(p.Button,{type:"primary",onClick:y,size:"small",loading:n,style:{borderRadius:"4px",fontSize:"12px",height:"28px",padding:"0 16px",fontWeight:"500"},disabled:!f.trim()||n,children:n?"등록 중...":"등록"})]})]})})]})},Ff=[{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],L1=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],PU={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},z1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},OU={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},kU=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n]=p.Form.useForm(),[i,a]=v.useState(!1),{searchBoxRef:s}=ct.useSearchBox(),{openTabByMenuId:l}=et.useMenuViewStore(),{openCorePopup:c}=ct.usePopup(),d=v.useRef(null),[u,f]=v.useState(n.getFieldValue("status")),h=u==="COMPLETED",g=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,button:!0,styleName:"center"},{fieldName:"menuNm",header:{text:"메뉴명"},width:120,styleName:"left"},{fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType",styleName:"center"},{fieldName:"title",header:{text:"제목"},width:200,styleName:"left"},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{fieldName:"status",header:{text:"상태"},width:90,renderer:"statusTag",styleName:"center"},{fieldName:"rgstUserId",visible:!1},{fieldName:"rgstUserNm",header:{text:"작성자"},width:60,styleName:"left"},{fieldName:"rgstDt",header:{text:"등록일자"},width:100,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:100,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert",styleName:"center"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:60,styleName:"left"},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right",visible:!1}],[]),m=v.useMemo(()=>({container:{indicator:!1}}),[]),x={onCellDblClicked(A,_){const D=_.itemIndex??-1;if(D<0)return;const B=A.getValues(D);n.setFieldsValue(B),f(B.status),a(!0)},onCellClicked(A,_){if(_.fieldName==="menuId"){if((_.itemIndex??-1)<0)return;_.value&&l(_.value)}}},y=v.useMemo(()=>({SCMBoardMstr0001:async(A,_)=>{const D=A||d.current?.currentPage||1,B=_||d.current?.pageSize||20,H={...s?.current?.getFormData(),sysCd:e,appCd:t,pageNum:D,pageCount:B};console.log("🔍 서버 모드 페이징 요청:",H);try{const T=await oe.callService("SCMBoardMstr0001",H,{isPopup:!0});if(console.log("🔍 서버 모드 페이징 응답:",T),T&&T.pageList){const N=T.pageCnt||0;d.current?.setTotalData(N),r.current?.addAllData(T.pageList)}else d.current?.setTotalData(0),r.current?.addAllData([]),console.log("📭 서버 모드 페이징 데이터 없음")}catch(T){console.error("❌ SCMBoardMstr0001 호출 실패:",T)}},SCMBoardMstr0004:A=>{oe.callService("SCMBoardMstr0004",{...A,boardMstrId:n.getFieldValue("boardMstrId"),sysCd:e,appCd:t},{isPopup:!0}).then(_=>{n.resetFields(),y.SCMBoardMstr0001()}).catch(_=>{console.error("문의/신고 변경 실패:",_)})}}),[s,n]),w=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{const T=A.getValue(_.index?.itemIndex,"type");H.render(o.jsx(p.Tag,{color:OU[T],children:Ff.find(N=>N.value===T)?.label}))}),[]),b=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{const T=A.getValue(_.index?.itemIndex,"status");H.render(o.jsx(p.Tag,{color:PU[T],children:L1.find(N=>N.value===T)?.label}))}),[]),j=v.useMemo(()=>oe.createBwgGridRenderer((A,_,D,B,H)=>{A.getValue(_.index?.itemIndex,"urgentYn")==="Y"?H.render(o.jsx(X.AlertTwoTone,{twoToneColor:"red"})):H.render(o.jsx(o.Fragment,{}))}),[]),P=()=>{try{n.validateFields().then(A=>{p.Modal.confirm({title:"변경 확인",content:"게시물 정보를 변경하시겠습니까?",okText:"변경",cancelText:"취소",onOk:()=>{y.SCMBoardMstr0004(A),a(!1)}})})}catch(A){console.error("게시물 정보 변경 실패:",A)}},E=()=>{c("CORE_ORGANIZATION_01",{onSelect:A=>{console.log("처리담당자 선택:",A),n.setFieldsValue({prcsUserId:A.empNo,prcsUserNm:A.empNm,status:"ASSIGNED"}),f("ASSIGNED")}})},S=()=>{c("CORE_PRGR_02",{callback:A=>{s?.current?.setFormData({menuId:A.menuId,menuNm:A.menuNm})}})},O=A=>{if(n.setFieldValue("status",A),f(A),A==="COMPLETED"||A==="REJECTED"){const _=oe.format(oe.now(),"yyyy-mm-dd");n.setFieldsValue({prcsDt:_})}else n.setFieldsValue({prcsDt:""})};v.useEffect(()=>{setTimeout(()=>{y.SCMBoardMstr0001()},100)},[y]);const k={ref:s,reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:7,children:o.jsx(L.BwgRangePicker,{itemProps:{label:"등록일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Ff,placeholder:"전체"}})}),o.jsx($e,{span:6,children:o.jsx(L.BwgSearch,{itemProps:{label:"작성자",name:["rgstUserId","rgstUserNm"]},onSearch:()=>{c("CORE_ORGANIZATION_01",{onSelect:A=>{s?.current?.setFormData({rgstUserId:A.empNo,rgstUserNm:A.empNm})}})}})}),o.jsx($e,{span:6,style:{marginLeft:"12px"},children:o.jsx(L.BwgSwitch,{itemProps:{name:"myPrcs",label:"나의 처리건만"},inputProps:{format:"YN"}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:7,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:S})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:L1,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},M=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{y.SCMBoardMstr0001(d.current?.currentPage,d.current?.pageSize)}},{id:"edit",label:"변경",onClick:()=>{const A=r.current?.getCurrentIndex?.()??-1;if(A<0)return;const _=r.current?.vw?.getValues(A);_&&(n.setFieldsValue(_),f(n.getFieldValue("status")),a(!0))}}]}),[d,y,n,r]);return o.jsx(kt,{searchBox:k,buttons:M,children:o.jsx(ze,{children:o.jsxs(De,{children:[o.jsx(Fe,{ref:r,type:"nrml",gridColumns:g,gridOptions:m,gridEvents:x,renderers:[{name:"tagType",renderer:w},{name:"statusTag",renderer:b},{name:"alert",renderer:j}]}),o.jsx(un,{title:"게시물 상세",open:i,onClose:()=>{a(!1),n.resetFields(),y.SCMBoardMstr0001()},showCloseButton:!0,showEyesButton:!0,size:"large",placement:"right",width:1200,maskClosable:!0,extra:o.jsx(p.ConfigProvider,{theme:{components:{Button:{fontSize:13}}},children:o.jsx(p.Space,{children:o.jsx(p.Button,{type:"primary",onClick:P,children:"변경"})})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:"70%",min:"60%",max:"80%",style:{paddingRight:"15px",overflowX:"hidden",overflowY:"hidden"},children:o.jsx(De,{children:o.jsxs(L.BwgForm,{form:n,children:[o.jsx(wt,{gutter:[12,8],style:{marginBottom:"20px"},children:o.jsx($e,{span:24,children:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"0 5px"},children:[o.jsx(p.Avatar,{size:40,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:n.getFieldValue("rgstUserNm")?.[0]??""}),o.jsx("div",{style:{flex:1},children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px",marginTop:"2px"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[o.jsx("span",{style:{fontWeight:500,fontSize:"16px",color:"#262626"},children:n.getFieldValue("rgstUserNm")??n.getFieldValue("rgstUserId")??""}),o.jsx("span",{style:{fontSize:"13px",color:"#8c8c8c",marginTop:"3px",marginLeft:"4px"},children:n.getFieldValue("rgstDt")?oe.format(n.getFieldValue("rgstDt"),"YYYY-MM-DD"):""})]}),o.jsx("span",{style:{fontSize:"12px",color:"#8c8c8c",marginLeft:"1px"},children:n.getFieldValue("rgstUserId")??""})]})})]})})}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(L.BwgInput,{itemProps:{name:"title"},inputProps:{size:"large",placeholder:"제목을 입력하세요",style:{fontWeight:"bold"},variant:"borderless"}})})}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"15px"},children:o.jsx($e,{span:24,children:o.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",marginBottom:"8px"}})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"10px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{disabled:!0,options:Ff}})}),o.jsx($e,{span:10,children:o.jsx(L.BwgFormItem,{label:"메뉴 정보",children:o.jsxs(p.Space.Compact,{style:{width:"100%"},children:[o.jsx(p.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:o.jsx(p.Input,{disabled:!0})}),o.jsx(p.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:o.jsx(p.Input,{disabled:!0})})]})})}),o.jsx($e,{span:6,children:o.jsx(L.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"}})})]}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"10px"},children:o.jsx($e,{span:24,children:o.jsx(L.BwgFormItem,{label:"상태",name:"status",children:o.jsxs(p.Space,{children:[o.jsx(p.Button,{icon:o.jsx(X.ReloadOutlined,{}),type:u==="READY"?"primary":"default",onClick:()=>O("READY"),children:"대기"}),o.jsx(p.Button,{icon:o.jsx(X.UserAddOutlined,{}),onClick:E,type:u==="ASSIGNED"?"primary":"default",children:"담당자 지정"}),o.jsx(p.Button,{icon:o.jsx(X.ClockCircleOutlined,{}),type:u==="PROCESSING"?"primary":"default",onClick:()=>O("PROCESSING"),children:"처리중"}),o.jsx(p.Button,{icon:o.jsx(X.CheckOutlined,{}),onClick:()=>O("COMPLETED"),type:u==="COMPLETED"?"primary":"default",children:"처리완료"}),o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:()=>O("REJECTED"),type:u==="REJECTED"?"primary":"default",children:"반려"})]})})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"마감요청일자",name:"dueDt"},inputProps:{disabled:!0,format:"YYYY-MM-DD"}})}),o.jsx($e,{span:12,children:o.jsxs(p.Flex,{vertical:!0,gap:3,children:[o.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),o.jsx(p.Progress,{percent:z1[n.getFieldValue("status")],status:z1[n.getFieldValue("status")]>0?"active":"normal",size:"small",format:A=>`${A}%`})]})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgSearch,{itemProps:{label:"처리담당자",name:["prcsUserId","prcsUserNm"]},onSearch:E})}),o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"처리일자",name:"prcsDt"},inputProps:{disabled:!0,format:"YYYY-MM-DD"}})})]}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(Ph,{itemProps:{label:"내용",name:"content"}})})})]})})}),o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Wm,{boardMstrId:n.getFieldValue("boardMstrId"),isCompleted:h})})]})}),o.jsx(To,{ref:d,mode:"server",onServerPageChange:(A,_)=>{y.SCMBoardMstr0001(A,_)},pageSizeOptions:[10,20,50]})]})})})},Vf=[{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],Hf=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],F1={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},V1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},TU={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},MU=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n,i]=v.useState(!1),{searchBoxRef:a}=ct.useSearchBox(),{user:s}=et.useUserStore(),[l]=p.Form.useForm(),{openCorePopup:c}=ct.usePopup(),d=v.useRef(null),[u,f]=v.useState(!1),g=p.Form.useWatch("status",l)??l.getFieldValue("status")??"READY",m=u||g==="READY",[x,y]=v.useState(!1),w=g==="COMPLETED"||g==="REJECTED",b=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"글 번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,styleName:"center"},{fieldName:"menuNm",header:{text:"메뉴명"},width:100,styleName:"left"},{fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType",styleName:"center"},{fieldName:"title",header:{text:"제목"},width:200,styleName:"left"},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{fieldName:"status",header:{text:"상태"},width:80,renderer:"statusTag",styleName:"center"},{fieldName:"rgstUserId",header:{text:"작성자ID"},visible:!1},{fieldName:"rgstDt",header:{text:"작성일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert",styleName:"center"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:100,styleName:"left"},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:oe.realFormat.formatYmd,styleName:"right"}],[]),j=v.useMemo(()=>({container:{indicator:!1}}),[]),P={onCellDblClicked(B,H){const T=H.itemIndex??-1;if(T<0)return;const N=B.getValues(T);N&&(l.setFieldsValue({...N}),f(!1),i(!0))}},E=v.useMemo(()=>({SCMBoardMstr0001:async(B,H)=>{const T=B||d.current?.currentPage||1,N=H||d.current?.pageSize||20,I={...a?.current?.getFormData(),sysCd:e,appCd:t,myArticle:"Y",pageNum:T,pageCount:N},R=await oe.callService("SCMBoardMstr0001",I,{isPopup:!0});R&&R.pageList&&(d.current?.setTotalData(R.pageCnt||0),r.current?.addAllData(R.pageList))},SCMBoardMstr0003:B=>{oe.callService("SCMBoardMstr0003",{sysCd:e,appCd:t,...B,status:"READY",rgstUserId:s?.userId,rgstUserNm:s?.userNm},{isPopup:!0}).then(H=>{l.resetFields(),E.SCMBoardMstr0001()}).catch(H=>{console.error("게시물 제출 실패:",H)})},SCMBoardMstr0004:B=>{oe.callService("SCMBoardMstr0004",{sysCd:e,appCd:t,boardMstrId:l.getFieldValue("boardMstrId"),...B},{isPopup:!0}).then(()=>{l.resetFields(),E.SCMBoardMstr0001()}).catch(H=>{console.error("게시물 변경 실패:",H)})}}),[a,l]),S=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{const R=B.getValue(H.index?.itemIndex,"type");I.render(o.jsx(p.Tag,{color:TU[R],children:Vf.find($=>$.value===R)?.label}))}),[]),O=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{const R=B.getValue(H.index?.itemIndex,"status");I.render(o.jsx(p.Tag,{color:F1[R],children:Hf.find($=>$.value===R)?.label}))}),[]),k=v.useMemo(()=>oe.createBwgGridRenderer((B,H,T,N,I)=>{B.getValue(H.index?.itemIndex,"urgentYn")==="Y"?I.render(o.jsx(X.AlertTwoTone,{twoToneColor:"red"})):I.render(o.jsx(o.Fragment,{}))}),[]),M=()=>{try{l.validateFields().then(B=>{p.Modal.confirm({title:u?"등록 확인":"변경 확인",content:u?"게시물 내용 등록하시겠습니까?":"게시물 내용 변경하시겠습니까?",okText:u?"등록":"변경",cancelText:"취소",onOk:()=>{u?E.SCMBoardMstr0003(B):E.SCMBoardMstr0004(B),i(!1)}})})}catch(B){console.error("게시물 제출 실패:",B)}},A=()=>{c("CORE_PRGR_02",{callback:B=>{l.setFieldsValue({menuId:B.menuId,menuNm:B.menuNm})}})};v.useEffect(()=>{setTimeout(()=>{E.SCMBoardMstr0001()},100)},[E]);const _={ref:a,reqRows:o.jsxs(o.Fragment,{children:[o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgRangePicker,{itemProps:{label:"작성일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:()=>{c("CORE_PRGR_02",{callback:B=>{a?.current?.setFormData({menuId:B.menuId,menuNm:B.menuNm})}})}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Vf,placeholder:"전체"}})}),o.jsx($e,{span:4,children:o.jsx(L.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:Hf,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(L.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},D=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{E.SCMBoardMstr0001()}},{id:"new",label:"등록",onClick:()=>{f(!0),l.resetFields(),l.setFieldsValue({rgstUserId:s?.userId,rgstUserNm:s?.userNm,rgstDt:oe.now().format(),status:"READY"}),i(!0)}},{id:"edit",label:"변경",onClick:()=>{const B=r.current?.getCurrentIndex?.()??-1;if(B<0)return;const H=r.current?.vw?.getValues(B);H&&(l.setFieldsValue({...H}),f(!1),i(!0))}}]}),[E,l,r,s]);return o.jsx(kt,{searchBox:_,buttons:D,children:o.jsx(ze,{children:o.jsxs(De,{children:[o.jsx(Fe,{ref:r,type:"nrml",gridColumns:b,gridOptions:j,gridEvents:P,renderers:[{name:"tagType",renderer:S},{name:"statusTag",renderer:O},{name:"alert",renderer:k}]}),o.jsx(un,{title:`게시물 ${u?"등록":"변경"}`,open:n,onClose:()=>i(!1),showCloseButton:!1,size:"large",placement:"right",width:u?800:1200,extra:o.jsx(p.ConfigProvider,{theme:{components:{Button:{fontSize:13}}},children:o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:()=>i(!1),children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:M,children:u?"등록":"변경"})]})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:u?"100%":"70%",min:u?"100%":"60%",max:u?"100%":"80%",style:{paddingRight:u?"0px":"15px",overflowX:"hidden",overflowY:"hidden"},children:o.jsx(De,{children:o.jsxs(L.BwgForm,{form:l,onFinish:M,initialValues:{rgstUserId:s?.userId||"",rgstUserNm:s?.userNm||""},children:[o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(L.BwgInput,{itemProps:{name:"title"},inputProps:{size:"large",placeholder:"제목을 입력하세요",style:{fontWeight:"bold"},variant:"borderless"}})})}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"15px"},children:o.jsx($e,{span:24,children:o.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",marginBottom:"8px"}})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{label:"구분",name:"type",rules:[{required:!0}]},selectProps:{options:Vf,disabled:!m}})}),o.jsx($e,{span:16,children:o.jsx(L.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"],rules:[{required:!0}]},onSearch:A,readOnly:!m})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[!u&&o.jsx($e,{span:12,children:o.jsx(L.BwgFormItem,{label:"상태",children:o.jsx("div",{style:{marginBottom:4},children:l.getFieldValue("status")&&o.jsx(p.Tag,{color:F1[l.getFieldValue("status")],children:Hf.find(B=>B.value===l.getFieldValue("status"))?.label})})})}),o.jsx($e,{span:u?24:12,children:o.jsx(L.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"},inputProps:{disabled:!m}})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(L.BwgDatePicker,{itemProps:{label:"마감요청일자",name:"dueDt",rules:[{required:!0}]},inputProps:{disabled:!m,format:"YYYY-MM-DD"}})}),!u&&o.jsx($e,{span:12,children:o.jsxs(p.Flex,{vertical:!0,gap:3,children:[o.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),o.jsx(p.Progress,{percent:V1[l.getFieldValue("status")],status:V1[l.getFieldValue("status")]>0?"active":"normal",size:"small",format:B=>`${B}%`})]})})]}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:o.jsx($e,{span:24,children:o.jsx(Ph,{border:!1,itemProps:{name:"content",rules:[{required:!0}]},editorProps:{isEditing:m&&!x,title:{title:o.jsxs(o.Fragment,{children:[o.jsx(X.EditOutlined,{style:{marginRight:"5px"}})," ","상세내용 작성"]}),children:m&&o.jsx(p.Button,{icon:o.jsx(X.EyeFilled,{}),onClick:()=>y(!x),children:"미리보기"})}}})})})]})})}),!u&&o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Wm,{boardMstrId:l.getFieldValue("boardMstrId"),isCompleted:w})})]})}),o.jsx(To,{ref:d,mode:"server",onServerPageChange:(B,H)=>{E.SCMBoardMstr0001(B,H)},pageSizeOptions:[10,20,50]})]})})})},RU=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Wf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Ea(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:RU(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Wf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Wf(e.orgSortOrd,0),orgOtptOrd:Wf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function AU(e){const t=new Set,r=e.map(Ea).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>t.has(l.deptCd)?!1:(t.add(l.deptCd),!0));r.sort((l,c)=>(l.deptLvl||0)-(c.deptLvl||0)||(l.orgSortOrd||0)-(c.orgSortOrd||0)||l.deptCd.localeCompare(c.deptCd));const n=new Map;for(const l of r)n.set(l.deptCd,{...l,children:[]});const i=[];for(const l of r){const c=n.get(l.deptCd),d=l.hrnkDeptCd;d&&n.has(d)?n.get(d).children.push(c):i.push(c)}const a=l=>{!l||l.length===0||(l.sort((c,d)=>c.deptCd.localeCompare(d.deptCd)),l.forEach(c=>a(c.children)))};a(i);const s=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(s)};if(i.forEach(s),i.length>1){const l=i.find(c=>c.deptCd==="D00");if(l)return[l]}return i}function IU(e){const t=e.map(Ea),r=t.filter(n=>n.isLeaf!=="Y").map(n=>n.deptCd);return r.length>200?t.filter(n=>(n.deptLvl||0)<=2).map(n=>n.deptCd):r}const qP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState([]),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState(!1),h=v.useCallback(async S=>{try{f(!0);const O=await oe.callService("SCMUTIL00103",{...e?.popupParams,...S}),k=Array.isArray(O?.data)?O.data:Array.isArray(O?.deptList)?O.deptList:Array.isArray(O)?O:[],M=AU(k);d(M);const A=IU(k);a(A);const _=M[0]?.deptCd||Ea(k.find(D=>Ea(D).deptLvl===1)||{}).deptCd||Ea(k[0]||{}).deptCd||"";l(_?[_]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{f(!1)}},[e?.popupParams]);v.useEffect(()=>{h()},[h]);const g=v.useCallback((S,O)=>{for(const k of S){if(k.deptCd===O)return k;if(k.children){const M=g(k.children,O);if(M)return M}}return null},[]),m=v.useMemo(()=>{const S=s[0];return S?g(c,S):null},[s,c,g]),x=v.useMemo(()=>{const S=k=>k.map(M=>({title:M.deptNm,key:M.deptCd,meta:M,children:M.children?S(M.children):void 0}));return S(c)},[c]),y=v.useMemo(()=>{const S=r.trim().toLowerCase();if(!S)return x;const O=k=>k.map(M=>{const A=M.meta,_=(A?.deptNm||"").toLowerCase().includes(S)||(A?.deptCd||"").toLowerCase().includes(S),D=M.children?O(M.children):void 0;return _||D&&D.length?{...M,children:D}:null}).filter(Boolean);return O(x)},[x,r]),w=v.useCallback(S=>{l(S.slice(0,1).map(String))},[]),b=v.useCallback(S=>a(S.map(String)),[]),j=v.useCallback((S,O)=>{if(S.stopPropagation(),!O.children||O.children.length===0)return;const k=i.includes(O.key);a(M=>k?M.filter(A=>A!==O.key):[...M,O.key])},[i]),P=v.useCallback(()=>l([]),[]),E={confirm:()=>{if(!m){p.message.error("부서를 선택해주세요.");return}const S={deptCd:m.deptCd,deptNm:m.deptNm,hrnkDeptCd:m.hrnkDeptCd,hrnkDeptNm:m.hrnkDeptNm,deptLvl:m.deptLvl,orgSortOrd:m.orgSortOrd},O=e?.config;O?.onSelect?O.onSelect(S):e?.config?.callback&&e.config.callback(JSON.stringify(S)),O?.onClose&&O.onClose(),e?.close?.()},cancel:()=>{const S=e?.config;S?.onCancel&&S.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{E.confirm()}}],popupEvent:E,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"70%",min:"70%",max:"75%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx(p.Row,{gutter:[16,16],children:o.jsx(p.Col,{span:24,children:o.jsx(p.Input,{placeholder:"부서명, 부서코드 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:S=>n(S.target.value)})})})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:u,children:o.jsx(p.Tree,{treeData:y,expandedKeys:i,selectedKeys:s,onSelect:w,onExpand:b,onDoubleClick:j,showLine:!0,showIcon:!1,selectable:!0,style:{overflow:"hidden"},titleRender:S=>{const O=S.meta;return o.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%",fontWeight:s.includes(S.key)?"bold":"normal"},children:[o.jsx("span",{children:O.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:O.deptCd})]})}})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,overflowY:"hidden",height:"100%"},children:[o.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:16,fontWeight:700},children:"선택된 부서"}),m?o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:14,border:"1px solid #e0e0e0",borderRadius:12,background:"#fafafa"},children:[o.jsx("div",{style:{width:42,height:42,borderRadius:"50%",border:"1px solid #e6e6e6",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:18,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:o.jsx(X.TeamOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:15,fontWeight:700,marginBottom:4},children:[m.deptNm," ",o.jsxs("span",{style:{color:"#8c8c8c",fontSize:12},children:["(",m.deptCd,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:2},children:["상위부서: ",m.hrnkDeptNm||"-"]})]}),o.jsx(p.Button,{type:"text",onClick:P,icon:o.jsx(X.RestOutlined,{style:{fontSize:24,color:"#FF6363"}})})]}):o.jsx("div",{style:{color:"#999",fontSize:14},children:"부서를 선택해주세요."})]})})]})})})})},NU=Object.freeze(Object.defineProperty({__proto__:null,default:qP},Symbol.toStringTag,{value:"Module"})),DU=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Uf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Pa(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:DU(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Uf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Uf(e.orgSortOrd,0),orgOtptOrd:Uf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function _U(e){const t=new Set,r=e.map(Pa).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>t.has(l.deptCd)?!1:(t.add(l.deptCd),!0));r.sort((l,c)=>(l.deptLvl||0)-(c.deptLvl||0)||(l.orgSortOrd||0)-(c.orgSortOrd||0)||l.deptCd.localeCompare(c.deptCd));const n=new Map;for(const l of r)n.set(l.deptCd,{...l,children:[]});const i=[];for(const l of r){const c=n.get(l.deptCd),d=l.hrnkDeptCd;d&&n.has(d)?n.get(d).children.push(c):i.push(c)}const a=l=>{!l||l.length===0||(l.sort((c,d)=>c.deptCd.localeCompare(d.deptCd)),l.forEach(c=>a(c.children)))};a(i);const s=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(s)};if(i.forEach(s),i.length>1){const l=i.find(c=>c.deptCd==="D00");if(l)return[l]}return i}function BU(e){const t=e.map(Pa),r=t.filter(n=>n.isLeaf!=="Y").map(n=>n.deptCd);return r.length>200?t.filter(n=>(n.deptLvl||0)<=2).map(n=>n.deptCd):r}const GP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState([]),[h,g]=v.useState(!1),[m,x]=v.useState([]),[y,w]=v.useState(!1),b=v.useCallback(async T=>{try{w(!0);const N=await oe.callService("SCMUTIL00103",{...e?.popupParams,...T}),I=Array.isArray(N?.data)?N.data:Array.isArray(N?.deptList)?N.deptList:Array.isArray(N)?N:[],R=_U(I);x(R);const $=BU(I);l($);const U=R[0]?.deptCd||Pa(I.find(V=>Pa(V).deptLvl===1)||{}).deptCd||Pa(I[0]||{}).deptCd||"";d(U?[U]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{w(!1)}},[e?.popupParams]);v.useEffect(()=>{b()},[b]);const j=v.useCallback((T,N)=>{for(const I of T){if(I.deptCd===N)return I;if(I.children){const R=j(I.children,N);if(R)return R}}return null},[m]),P=v.useMemo(()=>u.map(T=>{const N=j(m,T);if(!N)return null;const{children:I,...R}=N;return R}).filter(Boolean),[u,m,j]),E=v.useMemo(()=>{const T=N=>N.map(I=>({title:I.deptNm,key:I.deptCd,meta:I,children:I.children?T(I.children):void 0,isLeaf:!I.children||I.children.length===0}));return T(m)},[m]),S=v.useMemo(()=>{const T=r.trim().toLowerCase();if(!T)return E;const N=I=>I.map(R=>{const $=R.meta,U=($?.deptNm||"").toLowerCase().includes(T)||($?.deptCd||"").toLowerCase().includes(T),V=R.children?N(R.children):void 0;return U||V&&V.length>0?{...R,children:V}:null}).filter(Boolean);return N(E)},[E,r]),O=v.useCallback(T=>{const N=[],I=R=>{for(const $ of R)if($.deptCd===T&&$.children){const U=V=>{for(const F of V)N.push(F.deptCd),F.children&&U(F.children)};U($.children)}else $.children&&I($.children)};return I(m),N},[m]),k=v.useCallback((T,N)=>{let I=Array.isArray(T)?T:T?.checked??[];if(h&&N?.node?.key){const R=N.node.key,$=O(R);if(N.checked){const U=new Set(I);for(const V of $)U.add(V);I=Array.from(U)}else{const U=new Set([R,...$]);I=I.filter(V=>!U.has(V))}}f(I)},[h,O]),M=v.useCallback(T=>{const N=T.map(String);if(d(N),N.length>0){const I=N[0],R=(U,V)=>{for(const F of U){if(F.deptCd===V)return F.deptNm;if(F.children){const q=R(F.children,V);if(q)return q}}return null},$=R(m,I);$&&a($)}},[m]),A=v.useCallback(T=>l(T.map(String)),[]),_=v.useCallback((T,N)=>{if(T.stopPropagation(),N.children&&N.children.length>0){const I=s.includes(N.key);l(R=>I?R.filter($=>$!==N.key):[...R,N.key])}},[s]),D=v.useCallback(T=>{f(N=>N.filter(I=>I!==T))},[]),B=v.useCallback(()=>{f([])},[]),H={confirm:()=>{if(u.length===0){p.message.error("부서를 선택해주세요.");return}const N=Array.from(new Set(u)).map(R=>{const $=j(m,R);return $?{deptCd:$.deptCd,deptNm:$.deptNm,hrnkDeptCd:$.hrnkDeptCd,hrnkDeptNm:$.hrnkDeptNm}:null}).filter(Boolean),I=e?.config;I?.onSelect?I.onSelect(N):e?.config?.callback&&e.config.callback(JSON.stringify(N)),I?.onClose&&I.onClose(),e?.close?.()},cancel:()=>{const T=e?.config;T?.onCancel&&T.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{H.confirm()}}],popupEvent:H,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx("div",{style:{fontSize:14,color:"#666",padding:8,backgroundColor:"#f8f8f8",borderRadius:4},children:i}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:18,children:o.jsx(p.Input,{placeholder:"부서명, 부서장명, 부서코드 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:T=>n(T.target.value)})}),o.jsx(p.Col,{span:6,style:{justifyContent:"center",display:"flex",alignItems:"center"},children:o.jsx(p.Checkbox,{checked:h,onChange:T=>g(T.target.checked),children:"하위까지 선택"})})]})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:y,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:S,expandedKeys:s,selectedKeys:c,checkedKeys:u,checkable:!0,checkStrictly:!0,showLine:!0,showIcon:!1,selectable:!0,onSelect:M,onExpand:A,onCheck:k,onDoubleClick:_,style:{overflow:"hidden"},titleRender:T=>{const N=T.meta;return o.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%"},children:[o.jsx("span",{style:{fontWeight:c.includes(T.key)?"bold":"normal"},children:N.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:N.deptCd})]})}})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,overflowY:"hidden"},children:[o.jsxs("div",{style:{marginBottom:12,display:"flex",alignItems:"center",gap:8},children:[o.jsxs("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:["선택된 부서 (",P.length,"개)"]}),P.length>0&&o.jsx("button",{onClick:B,style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",fontSize:12,padding:4},title:"전체 해제",children:"전체 해제"})]}),o.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"flex-start",minHeight:48},children:P.length===0?o.jsx("div",{style:{color:"#999",fontSize:14},children:"선택된 부서가 없습니다."}):P.map(T=>o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,padding:"4px 8px",borderRadius:999,border:"1px solid #e6e6e6",background:"#fafafa",lineHeight:1.1,cursor:"default",maxWidth:260},title:`${T.deptNm}`,children:[o.jsx("span",{style:{width:18,height:18,borderRadius:"50%",border:"1px solid #e6e6e6",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:o.jsx(X.TeamOutlined,{})}),o.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",gap:2,overflow:"hidden"},children:[o.jsx("span",{style:{fontSize:13,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:T.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#8c8c8c",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:T.deptCd})]}),o.jsx("button",{onClick:()=>D(T.deptCd),style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",padding:2,lineHeight:0},"aria-label":`${T.deptNm} 선택 해제`,title:"선택 해제",children:"×"})]},T.deptCd))})]})})]})})})})},$U=Object.freeze(Object.defineProperty({__proto__:null,default:GP},Symbol.toStringTag,{value:"Module"})),XP=({popup:e,onClose:t})=>{const[r,n]=v.useState([]),[i,a]=v.useState([]),[s,l]=v.useState([]),[c,d]=v.useState(!1),[u,f]=v.useState([]),[h,g]=v.useState(null),m=v.useRef(null),[x,y]=v.useState(""),[w,b]=v.useState([]),[j,P]=v.useState(!1),[E,S]=v.useState([]),O=v.useCallback(R=>{const $=[...R].sort((q,ie)=>q.deptLvl-ie.deptLvl||q.orgSortOrd-ie.orgSortOrd||q.deptCd.localeCompare(ie.deptCd)),U=new Map;$.forEach(q=>U.set(q.deptCd,{...q,children:[]}));const V=[];$.forEach(q=>{const ie=U.get(q.deptCd),ue=q.hrnkDeptCd;ue&&U.has(ue)?U.get(ue).children.push(ie):V.push(ie)});const F=q=>{!q.children||q.children.length===0?delete q.children:q.children.forEach(F)};return V.forEach(F),V},[]),k=v.useCallback(async R=>{if(R)try{const $=await oe.callService("SCMUTIL00106",{...e?.popupParams,deptCds:R},{showLoading:!1}),U=Array.isArray($?.empList)&&$.empList||[];f(U)}catch($){console.error("직원 목록 로딩 실패:",$),p.message.error("직원 목록을 불러오는 중 오류가 발생했습니다.")}},[e?.popupParams]);v.useEffect(()=>{m.current=k},[k]);const M=v.useCallback(async(R,$)=>{try{const U={...e?.popupParams,showLoading:!1};R&&(U.keyword=R),$&&$.length>0&&(U.deptCds=$);const V=await oe.callService("SCMUTIL00106",U,{showLoading:!1});b(V?.empList||[])}catch(U){console.error("검색 실패:",U),p.message.error("검색 중 오류가 발생했습니다."),b([])}},[e?.popupParams]),A=v.useCallback(async()=>{d(!0);try{const R=await oe.callService("SCMUTIL00103",{...e?.popupParams},{showLoading:!1}),$=Array.isArray(R?.deptList)&&R.deptList||[];if($.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const U=O($);l(U);const V=$.filter(q=>Number(q.deptLvl)<=2).map(q=>String(q.deptCd));n(V);const F=U[1];F&&m.current&&(a([F.deptCd]),m.current([F.deptCd]))}catch(R){console.error("부서 목록 로딩 실패:",R),p.message.error("부서 목록을 불러오는 중 오류가 발생했습니다.")}finally{d(!1)}},[O,e?.popupParams]);v.useEffect(()=>{A()},[A]);const _=v.useMemo(()=>{const R=$=>$.map(U=>({title:U.deptNm,key:U.deptCd,children:U.children?R(U.children):void 0,isLeaf:!U.children||U.children.length===0}));return R(s)},[s]),D=v.useCallback(R=>{h&&h.empNo===R.empNo?g(null):g(R)},[h]),B=v.useCallback(R=>{const $=R.map(String);a($);const U=(F,q)=>{for(const ie of F){if(ie.deptCd===q)return{deptCd:ie.deptCd,deptNm:ie.deptNm};if(ie.children){const ue=U(ie.children,q);if(ue)return ue}}return null};if(!$[0])return;const V=U(s,$[0]);if(V&&(k([V.deptCd]),j)){if(E.some(q=>q.deptCd===V.deptCd))return;if(E.length>=5){p.message.warning("부서는 최대 5개까지 선택할 수 있습니다.");return}S(q=>[...q,V])}},[s,k,j,E]),H=v.useCallback(R=>{n(R.map(String))},[]),T=v.useCallback(async R=>{const $=R.trim();y($);const U=j&&E.length>0?E.map(V=>V.deptCd):[];await M($,U)},[M,j,E]),N=v.useCallback(R=>{S($=>$.filter(U=>U.deptCd!==R))},[]),I={confirm:()=>{if(h){const R=e?.config;R?.onSelect?R.onSelect(h):e?.popupParams?.onSelect?e.popupParams.onSelect(h):e?.config?.callback&&e.config.callback(JSON.stringify(h,null,2)),R?.onClose&&R.onClose(),e?.close?.()}else p.message.error("사원을 선택해주세요.")},cancel:()=>{const R=e?.config;R?.onCancel&&R.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{I.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"55%",min:"20%",max:"80%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:o.jsxs(p.Flex,{gap:12,vertical:!0,children:[o.jsx(Le,{title:"조직도",marginBottom:0}),o.jsx(p.Input.Search,{placeholder:"이름, 소속, 전화번호 검색",prefix:o.jsx(X.SearchOutlined,{}),value:x,allowClear:!0,enterButton:"검색",onChange:R=>{y(R.target.value)},onSearch:T}),o.jsxs(p.Flex,{gap:8,align:"center",style:{marginLeft:6},children:[o.jsx(p.Switch,{checked:j,onChange:R=>{P(R),R||S([])}}),o.jsx("span",{style:{fontSize:"14px"},children:"부서 안에서 검색하기"})]}),j&&o.jsx(p.Flex,{gap:4,wrap:"wrap",style:{margin:4},children:E.length>0?o.jsx(o.Fragment,{children:E.slice(0,5).map(R=>o.jsx(p.Tag,{closable:!0,onClose:()=>N(R.deptCd),children:R.deptNm},R.deptCd))}):o.jsx("span",{style:{fontSize:"12px",color:"#999"},children:"트리에서 부서를 선택하면 조건에 추가됩니다."})})]})}),o.jsx("div",{style:{padding:"16px",overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:c,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:_,expandedKeys:r,selectedKeys:i,onSelect:B,onExpand:H,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:R=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontWeight:i.includes(R.key)?"bold":"normal",display:"inline-block",width:"100%"},children:R.title})})})})]}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:"16px",overflowY:"hidden"},children:[o.jsx("div",{style:{marginBottom:"16px"},children:o.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px",fontWeight:"bold"},children:x?"검색 결과":""})}),o.jsxs("div",{style:{overflow:"hidden",height:"100%"},children:[(x?w:u).map(R=>o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"12px",border:"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:h&&h.crprCd===R.crprCd&&h.wkplCd===R.wkplCd&&h.empNo===R.empNo&&h.jbpsCd===R.jbpsCd&&h.jbgdCd===R.jbgdCd&&h.empMarkOrd===R.empMarkOrd?"#efebff":"white"},onClick:()=>D(R),children:[o.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"},onClick:$=>{$.stopPropagation(),D(R)},children:h&&h.crprCd===R.crprCd&&h.wkplCd===R.wkplCd&&h.empNo===R.empNo&&h.jbpsCd===R.jbpsCd&&h.jbgdCd===R.jbgdCd&&h.empMarkOrd===R.empMarkOrd?o.jsx(X.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),o.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",fontSize:"18px",color:"#666"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px"},children:[R.empNm,o.jsxs("span",{style:{fontSize:"12px",fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",R.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"2px"},children:[R.deptNm," (",R.deptCd,") | 직급:"," ",R.jbpsCd," | 등급: ",R.jbgdCd]})]})]},`emp-${R.crprCd}-${R.wkplCd}-${R.empNo}-${R.jbpsCd}-${R.jbgdCd}-${R.empMarkOrd}`)),(x?w:u).length===0&&o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:x?"검색버튼이나 엔터키를 눌러주세요.":"해당 부서에 직원이 없습니다."})]})]})})]})})})})},LU=Object.freeze(Object.defineProperty({__proto__:null,default:XP},Symbol.toStringTag,{value:"Module"})),ZP=({popup:e,onClose:t})=>{const[r,n]=v.useState(""),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState([]),[u,f]=v.useState([]),[h,g]=v.useState(!1),[m,x]=v.useState({}),y=v.useCallback(async()=>{try{g(!0);const T=await oe.callService("SCMUTIL00105",{...e?.popupParams});console.log("📊 조직도 API 응답:",T);const N=Array.isArray(T?.data)?T.data:Array.isArray(T?.orgnList)?T.orgnList:Array.isArray(T)?T:[];if(N.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const I=w(N);console.log("🌳 구성된 조직도 트리:",I),f(I);const R=N.filter($=>$.deptLvl<=2).map($=>$.deptCd);if(l(R),I.length>0){const $=I[0];d([$.deptCd]),a($.deptNm)}console.log("✅ 조직도 데이터 로딩 완료")}catch(T){console.error("❌ 조직도 데이터 로딩 실패:",T),p.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{g(!1)}},[e?.popupParams]),w=v.useCallback(T=>{const N=[...T].sort((U,V)=>U.deptLvl-V.deptLvl||U.orgSortOrd-V.orgSortOrd||U.deptCd.localeCompare(V.deptCd)),I=new Map;for(const U of N)I.set(U.deptCd,{...U,children:[]});const R=[];for(const U of N){const V=I.get(U.deptCd),F=U.hrnkDeptCd;F&&I.has(F)?I.get(F).children.push(V):R.push(V)}const $=U=>{if(!U.children||U.children.length===0){delete U.children;return}U.children.forEach($)};return R.forEach($),R},[]);v.useEffect(()=>{y()},[y]);const b=v.useMemo(()=>{const T=R=>{let $=[];return R.forEach(U=>{U.employees&&($=$.concat(U.employees)),U.children&&($=$.concat(T(U.children)))}),$},N=T(u),I=N.filter((R,$,U)=>$===U.findIndex(V=>V.empNo===R.empNo));return console.log(`👥 전체 사원 수: ${N.length}, 중복 제거 후: ${I.length}`),I},[u]),j=v.useMemo(()=>{const T=N=>N.map(I=>({title:I.deptNm,key:I.deptCd,children:I.children?T(I.children):void 0,isLeaf:!I.children||I.children.length===0}));return T(u)},[u]),P=v.useMemo(()=>{if(!r.trim())return j;const T=N=>N.map(I=>{const R=I.title.toLowerCase().includes(r.toLowerCase()),$=I.children?T(I.children):void 0;return R||$&&$.length>0?{...I,children:$}:null}).filter(Boolean);return T(j)},[j,r]),E=v.useMemo(()=>{if(!r.trim()){const T=U=>{let V=[];return U.forEach(F=>{F.employees&&(V=V.concat(F.employees)),F.children&&(V=V.concat(T(F.children)))}),V},N=(U,V)=>{for(const F of U){if(F.deptCd===V){let q=[...F.employees||[]];return F.children&&(q=q.concat(T(F.children))),q}if(F.children){const q=N(F.children,V);if(q.length>0)return q}}return[]},I=c[0];if(!I)return[];const R=N(u,I),$=R.filter((U,V,F)=>V===F.findIndex(q=>q.empNo===U.empNo));return console.log(`🔍 선택된 부서: ${I}, 반환된 사원 수: ${R.length}, 중복 제거 후: ${$.length}`),$}return b.filter(T=>T.empNm.toLowerCase().includes(r.toLowerCase())||T.empNo.toLowerCase().includes(r.toLowerCase())||T.deptNm.toLowerCase().includes(r.toLowerCase())||T.jbpsCd.includes(r)||T.jbgdCd.includes(r)||T.emplyStCd.includes(r))},[r,c,b,u]),S=v.useCallback(T=>{x(N=>{const I={...N};return I[T.empNo]?delete I[T.empNo]:I[T.empNo]=T,I})},[]),O=v.useCallback(T=>{x(N=>{const I={...N};return delete I[T],I})},[]),k=v.useCallback(()=>x({}),[]),M=v.useCallback(()=>{x(T=>{const N={...T};for(const I of E)N[I.empNo]=I;return N})},[E]),A=v.useCallback(()=>{x(T=>{const N={...T};for(const I of E)delete N[I.empNo];return N})},[E]),_=v.useCallback(T=>{const N=T.map(String);if(console.log(`🌳 트리 선택: ${N.join(", ")}`),d(N),N.length>0){const I=N[0],R=(U,V)=>{for(const F of U){if(F.deptCd===V)return F.deptNm;if(F.children){const q=R(F.children,V);if(q)return q}}return null},$=R(u,I);$&&a($)}},[u]),D=v.useCallback(T=>{l(T.map(String))},[]),B=v.useCallback((T,N)=>{if(T.stopPropagation(),!N.children||!N.children.length)return;const I=s.includes(N.key);l(R=>I?R.filter($=>$!==N.key):[...R,N.key])},[s]),H={confirm:()=>{const T=Object.values(m).map(I=>({crprCd:I.crprCd,wkplCd:I.wkplCd,empNo:I.empNo,deptCd:I.deptCd,deptNm:I.deptNm,empNm:I.empNm,jbpsCd:I.jbpsCd,jbgdCd:I.jbgdCd,empMarkOrd:I.empMarkOrd,emplyStCd:I.emplyStCd}));if(T.length===0){p.message.error("직원을 선택해주세요.");return}const N=e?.config;N?.onSelect?N.onSelect(T):e?.config?.callback&&e.config.callback(JSON.stringify(T)),N?.onClose&&N.onClose(),e?.close?.()},cancel:()=>{const T=e?.config;T?.onCancel&&T.onCancel(),e?.close?.()}};return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{H.confirm()}}],popupEvent:H,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(De,{border:!1,style:{paddingBottom:20},children:o.jsxs(p.Splitter,{style:{height:"100%"},children:[o.jsx(p.Splitter.Panel,{defaultSize:"50%",min:"50%",max:"70%",children:o.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[o.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"35%",max:"75%",children:[o.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:o.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[o.jsx(Le,{title:"조직도"}),o.jsx(p.Input,{placeholder:"이름, 소속, 직급/직위, 사번 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:T=>n(T.target.value)})]})}),o.jsx("div",{style:{padding:16,overflowY:"hidden"},children:o.jsx(p.Spin,{spinning:h,children:o.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:P,expandedKeys:s,selectedKeys:c,onSelect:_,onExpand:D,onDoubleClick:B,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:T=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:4,fontWeight:c.includes(T.key)?"bold":"normal",display:"inline-block",width:"100%"},children:T.title})})})})]}),o.jsx(p.Splitter.Panel,{children:o.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:r?"검색 결과":`${i} 사용자`}),o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx(p.Button,{size:"small",onClick:M,children:"현재 목록 전체 선택"}),o.jsx(p.Button,{size:"small",onClick:A,children:"현재 목록 전체 해제"})]})]}),o.jsx(p.Divider,{style:{margin:"8px 0"}}),o.jsxs("div",{style:{overflowY:"auto"},children:[E.map(T=>{const N=!!m[T.empNo];return o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,cursor:"pointer",background:N?"#efebff":"#fff"},onClick:()=>S(T),children:[o.jsx("div",{style:{marginRight:12,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"},onClick:I=>{I.stopPropagation(),S(T)},children:N?o.jsx(X.CheckCircleFilled,{style:{fontSize:20,color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:20,color:"#d9d9d9"}})}),o.jsx("div",{style:{width:36,height:36,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:16,color:"#666",flex:"0 0 auto"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:14,fontWeight:600,marginBottom:2},children:[T.empNm,o.jsxs("span",{style:{fontSize:12,fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",T.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[T.deptNm," (",T.deptCd,") | 직급: ",T.jbpsCd," ","| 등급: ",T.jbgdCd]})]})]},`emp-${T.crprCd}-${T.wkplCd}-${T.empNo}-${T.jbpsCd}-${T.jbgdCd}-${T.empMarkOrd}`)}),E.length===0&&o.jsx("div",{style:{textAlign:"center",padding:32,color:"#999",fontSize:14},children:r?"검색 결과가 없습니다.":"해당 부서에 사용자 없음"})]})]})})]})}),o.jsx(p.Splitter.Panel,{collapsible:!0,children:o.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o.jsx(Le,{title:`선택된 사용자 (${Object.keys(m).length})`}),o.jsx(p.Button,{type:"link",size:"small",onClick:k,children:"전체 해제"})]}),o.jsx(p.Divider,{style:{margin:"8px 0"}}),o.jsxs("div",{style:{overflowY:"auto",flex:1},children:[Object.values(m).map(T=>o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,background:"#fafafa"},children:[o.jsx("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:10,color:"#666"},children:o.jsx(X.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:[T.empNm,o.jsxs("span",{style:{fontSize:11,fontWeight:"normal",color:"#666",marginLeft:"6px"},children:["(",T.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[T.deptNm," (",T.deptCd,") | 직급: ",T.jbpsCd," | 등급: ",T.jbgdCd]})]}),o.jsx(p.Button,{type:"text",shape:"circle",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>O(T.empNo)})]},`selected-${T.crprCd}-${T.wkplCd}-${T.empNo}-${T.jbpsCd}-${T.jbgdCd}-${T.empMarkOrd}`)),Object.keys(m).length===0&&o.jsx("div",{style:{color:"#999",fontSize:14,textAlign:"center",padding:24},children:"선택된 사용자가 없습니다."})]})]})})]})})})})},zU=Object.freeze(Object.defineProperty({__proto__:null,default:ZP},Symbol.toStringTag,{value:"Module"})),{Text:H1,Title:FU}=p.Typography,QP=({popup:e})=>{const[t,r]=v.useState(xl()),[n,i]=v.useState(xl()),[a,s]=v.useState([]),[l,c]=v.useState([]),[d,u]=v.useState("month");et.useCodeStore();const{token:f}=p.theme.useToken(),h=(w,b,j=d)=>{const P=b.filter(E=>{if(j==="year"){const S=E.stndYmd.substring(0,6),O=w.format("YYYYMM");return S===O}else{const S=w.format("YYYYMMDD");return E.stndYmd===S}});s(P)},g=w=>{r(w),h(w,l,d)},m=(w,b)=>{i(w),u(b),y.SCMHLDY00101(b,w)};v.useEffect(()=>{y.SCMHLDY00101()},[]);const x=w=>{const b=l.filter(j=>{if(d==="year"){const P=j.stndYmd.substring(0,6),E=w.format("YYYYMM");return P===E}else{const P=w.format("YYYYMMDD");return j.stndYmd===P}});return b.length>0?o.jsx("div",{style:{position:"absolute",bottom:"1px",left:"1px",right:"1px",height:"3px",display:"flex",gap:"1px"},children:b.map((j,P)=>o.jsx("div",{style:{flex:1,height:"3px",background:j.hldyYn==="Y"?f.colorError:f.colorSuccess,borderRadius:"1px"}},P))}):null},y={SCMHLDY00101:async(w=d,b=t)=>{try{let j;w==="year"?j=b.format("YYYY"):j=b.format("YYYYMM");const P=await oe.callService("SCMHLDY00101",{crprCd:oe.getUserInfo()?.crprCd||"",sysCd:__SYS_CD__,stndYmd:j});c(P.sub||[]),h(b,P.sub||[],w)}catch(j){console.error("휴일 데이터 로드 실패:",j),p.message.error("휴일 데이터를 불러오는데 실패했습니다.")}}};return o.jsx(di,{popup:e,children:o.jsx(ze,{children:o.jsx(De,{children:o.jsxs(p.Row,{gutter:f.padding,style:{marginTop:f.padding},children:[o.jsx(p.Col,{span:12,children:o.jsx(p.Card,{title:o.jsxs(p.Space,{children:[o.jsx(X.CalendarOutlined,{}),o.jsx("span",{children:"휴일 달력"})]}),style:{height:"500px"},children:o.jsx(p.Calendar,{fullscreen:!1,value:t,onSelect:g,onPanelChange:m,cellRender:x,style:{height:"400px"},mode:d})})}),o.jsx(p.Col,{span:12,children:o.jsx(p.Card,{title:o.jsxs(p.Space,{children:[o.jsx(X.CalendarOutlined,{}),o.jsx("span",{children:d==="year"?`${t.format("YYYY년 MM월")} 휴일 목록`:`${t.format("YYYY년 MM월 DD일")} 휴일 목록`})]}),style:{height:"500px"},children:o.jsx("div",{style:{height:"400px",overflowY:"auto"},children:a.length>0?o.jsx(p.Space,{direction:"vertical",style:{width:"100%"},size:"small",children:a.map((w,b)=>o.jsx(p.Card,{size:"small",style:{border:`${f.lineWidth}px solid ${f.colorBorder}`,borderRadius:f.borderRadiusLG},children:o.jsxs("div",{style:{padding:`${f.paddingXS}px 0`},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:f.paddingXS},children:[o.jsx(FU,{level:5,style:{margin:0,color:f.colorPrimary},children:w.hldyDscr||"휴일명 미입력"}),w.hldyYn==="Y"&&o.jsx(p.Tag,{color:f.colorSuccess,children:"휴일"})]}),o.jsx("div",{style:{marginBottom:f.paddingXXS},children:o.jsx(H1,{type:"secondary",style:{fontSize:f.fontSizeSM},children:xl(w.stndYmd).format("YYYY년 MM월 DD일 dddd")})}),w.hldyDscr&&o.jsx("div",{children:o.jsx(H1,{style:{fontSize:f.fontSizeSM+1},children:w.hldyDscr})})]})},b))}):o.jsx(p.Empty,{description:"선택된 날짜에 등록된 휴일이 없습니다.",style:{marginTop:"100px"}})})})})]})})})})},VU=Object.freeze(Object.defineProperty({__proto__:null,default:QP},Symbol.toStringTag,{value:"Module"})),JP=({popup:e})=>{const t=v.useRef(null),[r,n]=v.useState(""),{menuList:i}=et.useMenuModelStore(),[a,s]=v.useState(void 0),[l,c]=v.useState(null),d=v.useCallback(b=>{const j=[],P=E=>{E.forEach(S=>{S.children&&S.children.length>0&&(j.push(S.menuId),P(S.children))})};return P(b),j},[]),[u,f]=v.useState(()=>d([])),h=v.useCallback((b,j,P)=>{const E=(j||"").trim().toLowerCase(),S=k=>{const M=!E||k.menuNm?.toLowerCase().includes(E)||k.menuId?.toLowerCase().includes(E),A=!P||k.sysCd===P;return M&&A},O=k=>k.map(M=>{const A=M.children?O(M.children):[];return S(M)||A.length>0?{...M,children:A}:null}).filter(Boolean);return O(b||[])},[]),g=v.useMemo(()=>h(i,r,a),[i,r,a,h]),m=v.useCallback(b=>b.map(j=>({key:j.menuId,label:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(!j.children||j.children.length===0)&&o.jsx(p.Tag,{color:"blue",style:{margin:0},children:j.menuId}),o.jsx("span",{children:j.menuNm})]}),children:j.children&&j.children.length>0?m(j.children):void 0,icon:x(j.iconCd,j.menuGbCd)})),[]),x=(b,j)=>{if(b){const P=Ti[b];if(P)return o.jsx(P,{})}if(j)switch(j){case"CMPRGRM":return o.jsx(Ti.HomeOutlined,{});case"CMPRGRS":return null;case"CMPRGRP":return null;default:return null}return null},y=v.useCallback((b,j)=>{for(const P of b){if(P.menuId===j)return P;if(P.children&&P.children.length>0){const E=y(P.children,j);if(E)return E}}return null},[]);v.useEffect(()=>{r&&f(d(g))},[r,g,d]);const w=[{id:"confirm",label:"확인",onClick:()=>{if(!l)return;const b=y(g,l);b&&(e?.config?.callback?.({menuId:b.menuId,menuNm:b.menuNm}),e?.close?.())}}];return o.jsx(di,{popup:e,buttons:w,children:o.jsx(ze,{children:o.jsxs(De,{border:!1,children:[o.jsx(ko,{ref:t,reqRows:o.jsx(o.Fragment,{children:o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:8,children:o.jsx(L.BwgSelect,{itemProps:{name:"sysCd",label:"시스템 코드"},selectProps:{options:[{label:"공통",value:"CM"},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"HR"},{label:"K-업무지원",value:"KS"}],onChange:b=>s(b),placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(p.Input,{placeholder:"메뉴 이름, ID 검색",prefix:o.jsx(X.SearchOutlined,{}),value:r,allowClear:!0,onChange:b=>{n(b.target.value)}})})]})})}),o.jsx(p.Menu,{mode:"inline",theme:"light",items:m(g),openKeys:u,onOpenChange:f,onClick:({key:b})=>{c(String(b))},style:{overflow:"auto"}})]})})})},HU=Object.freeze(Object.defineProperty({__proto__:null,default:JP},Symbol.toStringTag,{value:"Module"})),WU=[{label:"정확도 우선",value:"none"},{label:"도로명 포함",value:"road"},{label:"지번 포함",value:"location"}],UU=["SELECT","INSERT","UPDATE","DELETE","DROP","CREATE","ALTER","TRUNCATE","EXEC","EXECUTE","UNION","OR","AND","WHERE","FROM","JOIN","INNER","OUTER","LEFT","RIGHT","FULL","ON","AS","IS","NULL","NOT","IN","LIKE","BETWEEN","EXISTS","HAVING","GROUP","BY","ORDER","ASC","DESC","DISTINCT","TOP","LIMIT","OFFSET","CASE","WHEN","THEN","ELSE","END","IF","WHILE","FOR","DECLARE","SET","BEGIN","COMMIT","ROLLBACK","TRANSACTION","GRANT","REVOKE","DENY","TABLE","VIEW","INDEX","PROCEDURE","FUNCTION","TRIGGER","DATABASE","SCHEMA","USER","ROLE","BACKUP","RESTORE"],eO=({popup:e,onClose:t})=>{const r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState(""),[s,l]=v.useState([]),[c,d]=v.useState(null),[u,f]=v.useState(!1),[h,g]=v.useState(0),[m,x]=v.useState("none"),[y,w]=v.useState(!1),b=v.useMemo(()=>o.jsxs("div",{style:{maxWidth:"400px"},children:[o.jsx(p.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"검색 가이드"}),o.jsxs(p.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 방법"}),o.jsx("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:"도로명, 지번, 건물명, 우편번호로 검색할 수 있습니다."})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 예시"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:['- 도로명: "논현로", "강남대로"',o.jsx("br",{}),'- 지번: "논현동 234", "역삼동 123"',o.jsx("br",{}),'- 건물명: "태성빌딩", "강남역"',o.jsx("br",{}),'- 우편번호: "06234", "12345"']})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 정렬 옵션"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 정확도 우선: 검색어와 가장 유사한 결과 우선",o.jsx("br",{}),"- 도로명 포함: 도로명 주소를 포함한 결과 우선",o.jsx("br",{}),"- 지번 포함: 지번 주소를 포함한 결과 우선"]})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Text,{strong:!0,children:"• 검색 팁"}),o.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 검색어는 최소 2글자 이상 입력해주세요.",o.jsx("br",{}),"- 공백은 자동으로 제거됩니다.",o.jsx("br",{}),"- 검색 결과를 클릭하여 주소를 선택하세요.",o.jsx("br",{}),"- 검색하기 위해 검색 버튼이나 엔터키를 눌러주세요."]})]})]})]}),[]),j=v.useMemo(()=>o.jsxs("div",{style:{maxWidth:"420px",maxHeight:"600px",overflowY:"auto"},children:[o.jsx(p.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"에러 메시지 안내"}),o.jsxs(p.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[o.jsxs("div",{style:{fontSize:"12px",color:"#666"},children:[o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0005"}),": 검색어가 입력되지 않았습니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0006"}),": 주소를 상세히 입력해 주시기 바랍니다.",o.jsx("div",{style:{marginLeft:40,fontSize:"11px",color:"#999"},children:"(예시: 여의나루로 76, 문현금융로 40)"})]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0008"}),": 검색어는 한글자 이상 입력되어야 합니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0009"}),": 검색어는 문자와 숫자 같이 입력되어야 합니다. (숫자만 검색 불가)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0010"}),": 검색어가 너무 깁니다. (한글40자, 영문,숫자 80자 이하)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0011"}),": 검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자10자 이하)"]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0012"}),": 특수문자+숫자만으로는 검색이 불가능 합니다."]}),o.jsxs("div",{style:{marginBottom:6},children:[o.jsx(p.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0013"}),": SQL 예약어 또는 특수문자( %,=,",">",",","<",",[,] )는 검색이 불가능 합니다."]})]}),o.jsxs("div",{style:{marginTop:12,paddingTop:8,borderTop:"1px solid #f0f0f0"},children:[o.jsx(p.Typography.Text,{type:"warning",style:{fontSize:"12px",fontWeight:"bold"},children:"관리자 문의 바랍니다"}),o.jsxs("div",{style:{marginTop:6,fontSize:"11px",color:"#999"},children:["-999: 시스템에러",o.jsx("br",{}),"E0001: 승인되지 않은 KEY 입니다.",o.jsx("br",{}),"E0002: 승인되지 않은 사이트 입니다.",o.jsx("br",{}),"E0003: 정상적인 경로로 접속하시기 바랍니다.",o.jsx("br",{}),"E0014: 개발승인키 기간이 만료되어 서비스를 이용하실 수 없습니다."]})]})]})]}),[]);v.useEffect(()=>{(async()=>{try{const M=await oe.callService("SCMUTIL00202",{},{showLoading:!1});w(M?.result===1)}catch{w(!1)}})()},[]);const P=v.useCallback(async(k,M)=>{if(i.trim().length<2){p.message.warning("검색어는 2글자 이상 입력해주세요.");return}const A=i.replace(/(시|도|구|군)(?=[가-힣0-9])/g,"$1 ").replace(/\s+/g," ").trim(),_=A.split(/\s+/).filter(N=>N.length>0);if(_.length===1&&/[시도구군]$/.test(_[0])){p.message.warning("주소를 상세히 입력해 주시기 바랍니다.");return}const B=/[가-힣]/.test(A)?40:80,H=/^\d+$/.test(A);if(A.length>B){p.message.warning("검색어가 너무 깁니다. (한글 40자, 영문/숫자 80자 이하)");return}if(/\d{11,}/.test(A)){p.message.warning("검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자 10자 이하)");return}if(H&&A.length!==5||/^[0-9\W_]+$/.test(A)&&/\d/.test(A)&&!/[A-Za-z가-힣]/.test(A)&&!H){p.message.warning("특수문자+숫자만으로는 검색이 불가능 합니다.");return}if(UU.some(N=>new RegExp(`\\b${N}\\b`,"i").test(A))||/[[\]%=><]/.test(A)){p.message.warning("SQL 예약어 또는 특수문자( %,=,>,<,[,] )는 검색이 불가능 합니다.");return}f(!0);try{const N=k||r.current?.currentPage||1,I=M||r.current?.pageSize||10,R={keyword:A,currentPage:N,countPerPage:I,firstSort:m,...e?.popupParams},$=await oe.callService("SCMUTIL00201",R,{showLoading:!1});if($.errorCode!=="0"){p.message.error($.errorCode+" : "+$.errorMessage);return}const U=$?.pageList&&Array.isArray($.pageList)&&$.pageList||[],V=$?.pageCnt||0;l(U),g(V),r.current?.setTotalData(V),setTimeout(()=>{n.current&&(n.current.scrollTop=0)},0),(U.length===0||V===0)&&p.message.info("검색 결과가 없습니다.")}catch(N){console.error("주소 검색 실패:",N),p.message.error("주소 검색 중 오류가 발생했습니다."),l([]),g(0),r.current?.setTotalData(0)}finally{f(!1)}},[i,m,e?.popupParams]),E=v.useCallback(()=>{r.current?r.current.setPage(1):P(1,10)},[P]),S=v.useCallback(k=>{c&&c.bdMgtSn===k.bdMgtSn?d(null):d(k)},[c]),O=v.useMemo(()=>({confirm:()=>{if(!c){p.message.error("주소를 선택해주세요.");return}const k={...c},M=e?.config;M?.onSelect?M.onSelect(k):e?.popupParams?.onSelect?e.popupParams.onSelect(k):e?.config?.callback&&e.config.callback(k),M?.onClose&&M.onClose(),e?.close?.()}}),[c,e]);return o.jsx(di,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{O.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsxs(De,{border:!1,style:{paddingBottom:10},children:[o.jsx("div",{style:{paddingInline:"16px"},children:o.jsxs(p.Flex,{gap:12,vertical:!0,style:{marginBottom:"6px"},children:[o.jsxs(p.Flex,{gap:16,align:"center",justify:"space-between",wrap:!0,style:{width:"100%"},children:[y&&o.jsx(p.Radio.Group,{value:m,onChange:k=>{x(k.target.value)},children:WU.map(k=>o.jsx(p.Radio,{value:k.value,children:k.label},k.value))}),o.jsxs(p.Flex,{gap:16,wrap:!0,align:"center",justify:"flex-end",children:[o.jsx(p.Popover,{content:b,title:null,trigger:"click",placement:"right",children:o.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#1890ff",cursor:"pointer",fontSize:"13px"},children:[o.jsx(X.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"검색 가이드"]})}),o.jsx(p.Popover,{content:j,title:null,trigger:"click",placement:"right",children:o.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#fa8c16",cursor:"pointer",fontSize:"13px"},children:[o.jsx(X.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"에러 메시지 안내"]})})]})]}),o.jsx(p.Input.Search,{placeholder:"도로명, 지번, 건물명, 우편번호로 검색",prefix:o.jsx(X.SearchOutlined,{}),value:i,allowClear:!0,enterButton:"검색",onChange:k=>{a(k.target.value)},onSearch:E,style:{flex:1}})]})}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[s.length>0&&o.jsx("div",{style:{padding:"16px 16px 12px 16px"},children:o.jsxs("h3",{style:{fontSize:"16px",fontWeight:"bold"},children:["검색 결과 (",h,"개)"]})}),o.jsx("div",{ref:n,style:{paddingInline:"15px",overflowY:"auto",flex:1},children:o.jsx(p.Spin,{spinning:u,children:s.length>0?o.jsx("div",{children:s.map((k,M)=>{const A=c?.bdMgtSn===k.bdMgtSn;return o.jsxs("div",{style:{display:"flex",alignItems:"flex-start",padding:"12px",border:A?"2px solid #6449fc":"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:A?"#efebff":"white",transition:"all 0.2s ease"},onClick:()=>S(k),children:[o.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginTop:"2px"},onClick:_=>{_.stopPropagation(),S(k)},children:A?o.jsx(X.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(X.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:["[",k.zipNo,"]"]}),o.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px",lineHeight:"1.4",color:"#333"},children:k.roadAddr}),k.detBdNmList&&o.jsx("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:k.detBdNmList}),o.jsx("div",{style:{fontSize:"12px",color:"#999",lineHeight:"1.3"},children:k.jibunAddr})]})]},`addr-${k.bdMgtSn}-${M}`)})}):o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:i?"검색 버튼이나 엔터키를 눌러 검색해주세요.":"주소를 검색해주세요."})})}),o.jsx(To,{ref:r,mode:"server",onServerPageChange:(k,M)=>{P(k,M)},pageSizeOptions:[10,20,50]})]})]})})})},KU=Object.freeze(Object.defineProperty({__proto__:null,default:eO},Symbol.toStringTag,{value:"Module"}));exports.ButtonAccessController=Kf;exports.BwgButtonGroup=Yf;exports.BwgCmptArea=sO;exports.BwgCol=$e;exports.BwgComponentGuideM01=ON;exports.BwgConfigProvider=X1;exports.BwgDetail=xO;exports.BwgDeveloperGuideM01=MN;exports.BwgDrawer=un;exports.BwgEditor=Ph;exports.BwgGrid=Fe;exports.BwgInfoArea=dn;exports.BwgPagination=To;exports.BwgPopup=di;exports.BwgReactGuideM01=DN;exports.BwgRow=wt;exports.BwgSpace=Oc;exports.BwgTable=AO;exports.BwgTabs=ar;exports.BwgTitleBox=Le;exports.BwgView=kt;exports.CMAdminBoardM01=kU;exports.CMAuthMstrM01=CN;exports.CMBoardCommentS01=Wm;exports.CMFileMstrM01=_N;exports.CMHldyCfg=WN;exports.CMMenuMstrM01=$N;exports.CMMenuPrgrSelectModal=aS;exports.CMMenuPrntSelectModal=sS;exports.CMMyBoardM01=MU;exports.CMPopuMstrM01=LN;exports.CMPrgrMstrM01=HN;exports.CMPrgrMstrP02=JP;exports.CMPrgrMstrP02$1=HU;exports.CMRoleMstrM01=SN;exports.CMSystCfgM01=UN;exports.CMSystCodeM01=KN;exports.CMUserMstrM01=jU;exports.ContentBox=De;exports.ContentLayOut=ze;exports.GlobalConfigProvider=mN;exports.QuickServiceToggle=bN;exports.SSOHandler=wN;exports.SearchAddressP01=eO;exports.SearchAddressP01$1=KU;exports.SearchBox=ko;exports.SearchDepartmentP01=qP;exports.SearchDepartmentP01$1=NU;exports.SearchDepartmentP02=GP;exports.SearchDepartmentP02$1=$U;exports.SearchHolidayP01=QP;exports.SearchHolidayP01$1=VU;exports.SearchOrganizationP01=XP;exports.SearchOrganizationP01$1=LU;exports.SearchOrganizationP02=ZP;exports.SearchOrganizationP02$1=zU;exports.SystemCodeManage=SU;exports.commonjsGlobal=oO;exports.getAugmentedNamespace=aO;exports.getDefaultExportFromCjs=wr;