@bwg-ui/core 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{CMSearchIntfGwP01-CuGDAfFM.cjs → CMSearchIntfGwP01-0t3umcc_.cjs} +1 -1
- package/dist/chunks/{CMSearchIntfGwP01-DBpDpgQr.js → CMSearchIntfGwP01-DCHZJn2H.js} +1 -1
- package/dist/chunks/{MenuReport-yw8tZDUk.cjs → MenuReport-C70mGz2g.cjs} +1 -1
- package/dist/chunks/{MenuReport-CCbCy7yt.js → MenuReport-IBdoU2S3.js} +2 -2
- package/dist/chunks/common-components-DNgQR-Ge.cjs +1109 -0
- package/dist/chunks/{common-components-DtzVj5lz.js → common-components-DeYL3J6X.js} +13058 -13574
- package/dist/chunks/layout-components-Bf9IsLUS.cjs +38 -0
- package/dist/chunks/{layout-components-ljht1sHh.js → layout-components-DnuV2Psp.js} +831 -759
- package/dist/chunks/provider-Bi5OYngn.cjs +1 -0
- package/dist/chunks/{provider-Kxea5IoZ.js → provider-Bx4VpaFf.js} +90 -74
- package/dist/components/common/BwgGrid.d.ts +31 -8
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgEmpSearch.d.ts +2 -2
- package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedDate.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedRange.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +211 -208
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +2 -2
- package/dist/components/layout/AppWrapper.d.ts +5 -1
- package/dist/components/layout/AppWrapper.d.ts.map +1 -1
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +1 -1
- package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +273 -271
- package/dist/provider/contexts/PageContentContext.d.ts +23 -0
- package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
- package/dist/provider/contexts/index.d.ts +1 -0
- package/dist/provider/contexts/index.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +21 -19
- package/dist/public/realgrid/css/realgrid-style-custom.css +6 -10
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/styles/assets/images/backgrounds/kiam_login_bg.png +0 -0
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/components_02.css +35 -0
- package/dist/styles/global.css +9 -1
- package/dist/styles/index.css +3 -0
- package/dist/styles/layout.css +14 -4
- package/dist/styles/layout_02.css +99 -0
- package/dist/styles/login.css +7 -44
- package/dist/styles/login_02.css +35 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +16 -22
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1253 -1222
- package/dist/utils/messageUtils.d.ts +36 -48
- package/dist/utils/messageUtils.d.ts.map +1 -1
- package/dist/utils/modalUtils.d.ts +68 -0
- package/dist/utils/modalUtils.d.ts.map +1 -0
- package/dist/utils/notificationUtils.d.ts +50 -41
- package/dist/utils/notificationUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/common-components-CbkWoYfX.cjs +0 -1111
- package/dist/chunks/layout-components-BzLAGXiu.cjs +0 -38
- package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
|
@@ -1,1111 +0,0 @@
|
|
|
1
|
-
"use strict";const le=require("../utils/index.cjs"),tt=require("../stores/index.cjs"),o=require("react/jsx-runtime"),G=require("@ant-design/icons"),p=require("antd"),v=require("react"),B=require("../components/core/index.cjs"),st=require("./provider-r4mkv5Zs.cjs"),gO=require("dompurify"),tw=require("quill"),vO=require("react-quill"),Xg=require("quill-image-resize-module-react"),St=require("realgrid"),Zg=require("realgrid-react"),yO=require("react-rnd"),xo=require("react-dom"),xO=require("./layout-components-BzLAGXiu.cjs"),Qg=require("react-router-dom"),Cl=require("dayjs");function rw(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 Ri=rw(G),C=rw(v),ep=({checkAuth:e=!1,buttons:t,gap:r=8})=>{const{user:n,getButtonAuth:i,setButtonAuth:a}=tt.useUserStore(),s=st.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}le.callService(s,{crprCd:n?.crprCd,userId:n?.userId,grpId:f.toUpperCase(),menuId:u}).then(m=>{const g=Array.isArray(m?.data)?m.data:Array.isArray(m)?m:[],x={};(g||[]).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(m=>{console.error(m),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(B.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 g=!(Object.prototype.hasOwnProperty.call(l,u.id)?!!l[u.id]:!1),x=f||g,y=o.jsx(B.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(g){const w=o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o.jsx(G.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 bO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wO(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 tp=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:i="middle",style:a,className:s,onButtonClick:l})=>{const c=st.useServiceCodeValue("AUTH_BTNS"),{user:d}=tt.useUserStore(),[u,f]=v.useState([]),[h,m]=v.useState(!0),[g,x]=v.useState(null),[y,w]=v.useState({}),b=async()=>{try{m(!0),x(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const j=await le.callService(c,{userId:d?.userId,crprCd:d?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",j),j?.data&&Array.isArray(j.data)){const S=j.data.sort((O,k)=>O.btnSq-k.btnSq);f(S)}else f([])}catch(j){console.error("버튼 권한 조회 실패:",j),x("버튼 권한을 조회하는 중 오류가 발생했습니다."),f([])}finally{m(!1)}};v.useEffect(()=>{b()},[e,t]);const E=async(j,S)=>{w(O=>({...O,[j]:{loading:!0}}));try{const O=r?.[j];O?await O():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${j}`),l&&l(j,S,e)}catch(O){console.error("버튼 이벤트 실행 실패:",O),p.message.error("작업 중 오류가 발생했습니다.")}finally{w(O=>({...O,[j]:{loading:!1}}))}},P=j=>{const S=y[j.btnId]||{loading:!1};return o.jsxs(p.Button,{size:i,loading:S.loading,onClick:()=>E(j.btnId,j.btnNm),className:"bwg-btn",style:{...j.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[j.iconVal&&o.jsxs(o.Fragment,{children:[j.iconType==="ANTD"&&Ri[j.iconVal]&&v.createElement(Ri[j.iconVal],{style:{fontSize:"14px"}}),j.iconType!=="ANTD"&&o.jsx("span",{className:j.iconVal,style:{fontSize:"14px"}})]}),j.btnNm]},j.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:"권한 조회 중..."})})}):g?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"권한 오류",description:g,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)})})},CO=({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(m=>m&&m.length>0),d=v.useMemo(()=>{const m=c[0];if(!m||m.length===0)return{totalCols:0,baseWidth:0};let g=0;const x=[];m.forEach(w=>{const b=w,E=b?.props?.["data-colspan"]?parseInt(String(b.props["data-colspan"])):1;g+=E,x.push(E)});const y=g>0?100/g:0;return{totalCols:g,baseWidth:y,componentWidths:x}},[c]),u=(m,g,x)=>{const y=m,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=m=>{if(!m||typeof m!="object")return m;const g=m;if(!g.props)return m;const y={...g.props.style||{},width:"100%"};return v.cloneElement(g,{...g.props,style:y})},h=(m,g)=>{if(!m||m.length===0)return null;const x=m.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:m.map((y,w)=>{const b=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1,E=f(y);return o.jsx("div",{style:{gridColumn:`span ${b}`,minWidth:`${n}px`},className:"form-component-wrapper",children:E},`row-${g}-col-${w}`)})},`row-${g}`):o.jsx(p.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:m.map((y,w)=>{const b=u(y,w,x),E=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:E},`row-${g}-col-${w}`)})},`row-${g}`)};return o.jsx(p.Flex,{gap:"small",vertical:!0,style:a,className:s,children:c.map((m,g)=>h(m,g+1))})},$e=({children:e,className:t,style:r,...n})=>o.jsx(p.Col,{...n,className:`bwg-col ${t}`,style:r,children:e});var na={},Lu={exports:{}},Jg;function Ac(){return Jg||(Jg=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})(Lu)),Lu.exports}var ia={},ev;function SO(){if(ev)return ia;ev=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.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 ia.default=e,ia}var oa={},aa={},sa={},zu={exports:{}},Fu={exports:{}},Vu={exports:{}},Hu={exports:{}},tv;function nw(){return tv||(tv=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})(Hu)),Hu.exports}var Wu={exports:{}},rv;function jO(){return rv||(rv=1,(function(e){var t=nw().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})(Wu)),Wu.exports}var nv;function EO(){return nv||(nv=1,(function(e){var t=nw().default,r=jO();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})(Vu)),Vu.exports}var iv;function PO(){return iv||(iv=1,(function(e){var t=EO();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})(Fu)),Fu.exports}var ov;function OO(){return ov||(ov=1,(function(e){var t=PO();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})(zu)),zu.exports}var la={},av;function kO(){return av||(av=1,Object.defineProperty(la,"__esModule",{value:!0}),la.commonLocale=void 0,la.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),la}var sv;function TO(){if(sv)return sa;sv=1;var e=Ac().default;Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0;var t=e(OO()),r=kO(),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 sa.default=n,sa}var ca={},lv;function iw(){if(lv)return ca;lv=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return ca.default=e,ca}var cv;function ow(){if(cv)return aa;cv=1;var e=Ac().default;Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;var t=e(TO()),r=e(iw());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 aa.default=n,aa}var uv;function IO(){if(uv)return oa;uv=1;var e=Ac().default;Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=void 0;var t=e(ow());return oa.default=t.default,oa}var dv;function MO(){if(dv)return na;dv=1;var e=Ac().default;Object.defineProperty(na,"__esModule",{value:!0}),na.default=void 0;var t=e(SO()),r=e(IO()),n=e(ow()),i=e(iw());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 na.default=s,na}var Uu,fv;function RO(){return fv||(fv=1,Uu=MO()),Uu}var AO=RO();const aw=jr(AO),Nh=({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:aw,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})},NO=({children:e})=>{const{activeDetailItem:t,openTabByMenuId:r}=tt.useMenuViewStore();tt.useMenuModelStore();const{componentSize:n}=tt.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]})})})},DO=5,_O=0,Le=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:i,marginBottom:a,children:s})=>{const l=Ri.AppstoreTwoTone,{componentSize:c}=tt.useUserStore(),d=v.useMemo(()=>({0:5,1:4,2:3})[c],[c]);v.useMemo(()=>t?.type==="antd"&&t.icon&&Ri[t.icon]||l,[t?.type,t?.icon]);const u=(m,g)=>(m??g).toString().padStart(2,"0"),f=`pb${u(i,_O)}`,h=`mb${u(a,DO)}`;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(Ri.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),o.jsx("div",{className:"bwg-title-box-right",children:o.jsx(p.Flex,{gap:6,children:s})})]})})},{Panel:pv}=p.Collapse,No=v.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:i},a)=>{const[s]=p.Form.useForm(),[l,c]=v.useState("1"),[d,u]=v.useState(void 0),{componentSize:f}=tt.useUserStore(),h=v.useMemo(()=>{const x={0:12,1:14,2:16},y={0:"small",1:"middle",2:"large"};return{fontSize:x[f],componentSize:y[f]}},[f]),m=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};v.useEffect(()=>{d&&s.setFieldsValue(d)},[d,s]),v.useImperativeHandle(a,()=>({getFormData:()=>s.getFieldsValue(),setFormData:x=>{s.setFieldsValue(x)},setDefaultValue:x=>{u(x),s.setFieldsValue(x)},resetForm:()=>{d?s.setFieldsValue(d):s.resetFields()},validateForm:async()=>{try{return{success:!0,data:await s.validateFields()}}catch(x){return{success:!1,error:x}}}}));const g=()=>{c(x=>x.includes("subRows")?x.filter(y=>y!=="subRows"):[...x,"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:h.componentSize,theme:{token:{fontSize:h.fontSize},components:{Collapse:{}}},children:o.jsx(p.Form,{form:s,layout:"inline",initialValues:d,style:{width:"100%",fontSize:`${h.fontSize}px`},labelCol:m(),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:g,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:g,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(pv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&o.jsx(pv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})]})})})]})}),fn=({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),g=(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:{...g?.wrapper,...a?.wrapper},content:{...g?.content,...a?.content},header:{...g?.header,...a?.header}},y=()=>{const w=[];if(i){const b=[{key:"top",label:"상단",icon:o.jsx(G.CaretUpOutlined,{})},{key:"right",label:"우측",icon:o.jsx(G.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:o.jsx(G.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:o.jsx(G.CaretLeftOutlined,{})}],E=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:E,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(G.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(G.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(G.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(No,{...t.searchBox}),o.jsx(p.Divider,{}),e]}):e})},Ae=({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}),sw=Xg?.default??Xg;try{tw.register("modules/imageResize",sw)}catch(e){console.warn("quill-image-resize-module-react 로드 실패:",e)}const Bl=e=>gO.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}),$l=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),m=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 sw?{...P,imageResize:{parchment:tw.import("parchment"),modules:["Resize","DisplaySize","Toolbar"],displayStyles:{backgroundColor:"black",border:"none",color:"white"}}}:P},[d]),g=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,E=v.useCallback((P,j,S,O)=>{const k=Bl(P??"");x||w(k),i?.(k,j,S,O)},[x,i]);return v.useImperativeHandle(c,()=>({getHTML:()=>b??"",getText:()=>h.current?.getEditor()?.getText()??"",insertHTML:P=>{const j=h.current?.getEditor();if(!j)return;const S=j.getSelection(!0),O=Bl(P??"");j.clipboard.dangerouslyPasteHTML(S?S.index:j.getLength(),O)},insertImage:(P,j)=>{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(Ae,{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(vO,{ref:h,theme:d?"snow":"bubble",readOnly:!d,value:b,onChange:E,onBlur:a,modules:m,formats:g,style:{width:"100%",display:"flex",flexDirection:"column",minHeight:0,flex:"1"},placeholder:l},d?"snow":"bubble")]})})}),BO=(e,t,r,n)=>Bl(e??""),$O=({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:BO,normalize:l=>l??"",rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s,children:o.jsx($l,{...t})})},LO=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($l,{...i,editorProps:n,value:a.getFieldValue(s)??"",onChange:(l,c,d,u)=>{const f=Bl(l??"");a.setFieldValue(s,f),r?.(f,c,d,u)},onBlur:()=>{a.validateFields([s]).catch(()=>{})}})]})}return o.jsx($l,{...e})},Dh=Object.assign(LO,{FormItem:$O,Core:$l}),Do=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,m]=v.useState(1),[g,x]=v.useState(r),[y,w]=v.useState(0);v.useEffect(()=>{f(r)},[r]),v.useEffect(()=>{f(r)},[]),v.useImperativeHandle(d,()=>({currentPage:h,pageSize:g,totalData:y,totalPages:Math.ceil(y/g),setPage:R=>{m(R),c?.(R,g)},setPageSize:R=>{x(R),m(1),c?.(1,R)},setTotalData:R=>{w(R)},reset:()=>{m(1),x(r),w(0)}}),[h,g,y,c,r]);const b=l==="client",E=b?(e||0)+1:h,P=b?(t||0)>0:y>0,S=b?P?Math.ceil((n||0)/u):0:Math.ceil(y/g),O=b?P&&n||0:y,k=Math.min(E,S||1),I=`${u}-${S}-${k}`,_=R=>{b?i?.(R-1):(m(R),c?.(R,g))},$=R=>{if(b){f(R);try{s?.current?.gridView?(s.current.gridView.setPaging(!0,R),s.current.gridView.setPage(0)):i?.(0)}catch(z){console.warn("페이지 사이즈 변경 중 오류:",z),i?.(0)}}else x(R),m(1),c?.(1,R)};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:g,onChange:R=>$(Number(R.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(R=>o.jsxs("option",{value:R,children:[R,"개"]},R))}),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:()=>_(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:()=>_(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 R=5;let z=1,F=Math.min(R,S);k>3&&S>R&&(z=Math.max(1,k-2),F=Math.min(S,z+R-1),F===S&&(z=Math.max(1,F-R+1)));const M=[];for(let D=z;D<=F;D++)M.push(o.jsx(p.Button,{onClick:()=>_(D),style:{width:"26px",height:"26px",background:k===D?"var(--primary-color)":"#ffffff",color:k===D?"#ffffff":"#333333",cursor:"pointer"},children:D},D));return M})()},I),o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>_(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:()=>_(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"})]})})]})]})})]})});Do.displayName="BwgPagination";const zO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",FO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC";let Ku=null;const VO=[{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"}],HO=[{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"}],WO=({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(UO,{onError:a=>{console.error("BwgGrid 에러:",a),i(a),r(!0)},children:e})};class UO 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 Ve=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),m=v.useRef(new Map),g=v.useRef(null),{gridSize:x}=tt.useUserStore(),y=st.useGridSizeConfig(),b=st.useBwgView()?.menuId||"",E=v.useRef(`${b||"NO_MENU"}__${u||"NO_GRID"}__${le.generateUID(16)}
|
|
2
|
-
.toString(36)
|
|
3
|
-
.slice(2)}`),P=(W,ne,re,X)=>{let te=[],de=[];const Y="treeNode";for(let Q in W){let Z=W[Q];te[Z[re]]=W[Q];let ce=te[Z[ne]];if(ce==null||ce=="-"){de.push(Z);continue}ce[Y]==null&&(ce[Y]=[]),ce[Y].push(Z)}return de},j=v.useCallback(W=>{const ne=X=>{const te=[];return X.forEach(de=>{de.children&&de.children.length>0?te.push(...ne(de.children)):te.push(de)}),te};return ne(W).map(X=>({fieldName:X.fieldName,dataType:X.dataType||"text"}))},[]),S=v.useCallback(W=>{const ne=X=>{const te=[];return X.forEach(de=>{de.children&&de.children.length>0?te.push(...ne(de.children)):te.push(de)}),te};return ne(W).map(X=>({...X,header:{...X.header,template:X.required?`<img src='${FO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:X.editable?`<img src='${zO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:X.header?.text??""},text:X.header?.text||""},styleName:X.dataType==="number"?"right":X.styleName||"center"}))},[]);v.useImperativeHandle(f,()=>({addAllData(W,ne){const re=h.current?.gridView.getCurrent().dataRow;if(h.current?.dataProvider instanceof St.LocalDataProvider){h.current.dataProvider.clearRows();try{h.current?.gridView.showLoading(),h.current.dataProvider.setRows(W)}catch(X){console.error("fillJsonData 오류:",X)}finally{h.current?.gridView.closeLoading()}}if(h.current?.dataProvider instanceof St.LocalTreeDataProvider){if(h.current.dataProvider.clearRows(),ne?.treeOption?.dataField==null||ne?.treeOption?.parentField==null)return;const X={rows:"treeNode"};try{h.current?.gridView.showLoading();let te=P(W,ne.treeOption?.parentField,ne.treeOption?.dataField);h.current.dataProvider.fillJsonData({treeNode:te},X),ne.treeOption.isExpand&&h.current.gridView?.expandAll()}catch(te){console.error("fillJsonData 오류:",te)}finally{h.current?.gridView.closeLoading()}}ne?.isCurrent?h.current?.gridView.setCurrent({dataRow:re}):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 ne=[];if(W.created!==void 0&&W.created.length>0)for(const re in W.created){let X=h.current?.dataProvider?.getJsonRow(W.created[re]);X={...X,iudFlag:"I"},ne.push(X)}if(W.updated!==void 0&&W.updated.length>0)for(const re in W.updated){let X=h.current?.dataProvider?.getJsonRow(W.updated[re]);X={...X,iudFlag:"U"},ne.push(X)}if(W.deleted!==void 0&&W.deleted.length>0)for(const re in W.deleted){let X=h.current?.dataProvider?.getJsonRow(W.deleted[re]);X={...X,iudFlag:"D"},ne.push(X)}return ne},deleteGridData:()=>{h?.current?.gridView?.getCheckedItems()?.map(ne=>{let re=h?.current?.gridView?.getDataRow(ne)??-1;const X=h?.current?.dataProvider?.getRowState(re);X==St.RowState.DELETED?(h?.current?.dataProvider?.setRowState(re,m.current.get(ne)??St.RowState.NONE),m.current.delete(ne)):X==St.RowState.CREATED?h?.current?.dataProvider?.setRowState(re,St.RowState.CREATE_AND_DELETED):X==St.RowState.CREATE_AND_DELETED?h?.current?.dataProvider?.setRowState(re,St.RowState.CREATED):(m.current.set(ne,X??St.RowState.NONE),h?.current?.dataProvider?.setRowState(re,St.RowState.DELETED)),h?.current?.gridView?.checkItem(ne,!1)})},_oriRowState:[{}],dp:h.current?.dataProvider??null,vw:h.current?.gridView??null}));const O=v.useCallback((W,ne,re)=>{if(s!==void 0&&re>=0){let X=W.getDataSource().getJsonRow(re);s?.current?.setFieldsValue(X)}else s!==void 0&&re<0&&s?.current?.resetFields();W.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(W,ne,re)},[s,a]),k=v.useCallback((W,ne,re)=>{const X=ne.fieldName??"";s?.current?.getFieldInstance(X)&&s?.current.setFieldValue(X,re),a?.onEditChange&&a?.onEditChange(W,ne,re)},[s,a]),I=v.useCallback((W,ne,re)=>{const X=W.getOrgFieldName(re),te=W.getValue(ne,re);s?.current?.setFieldValue(X,te)},[s]),_=v.useCallback((W,ne,re,X)=>{const te=W.getColumn(X).name??"",de=W.getValue(ne,X);s?.current?.getFieldInstance(te)&&s?.current.setFieldValue(te,de),a?.onCellEdited&&a?.onCellEdited(W,ne,re,X)},[s,a]),$=v.useCallback((W,ne,re,X)=>{if(typeof ne.dataRow=="number"&&ne.dataRow!=-1){var te=W.getDataSource().getRowState(ne.dataRow);if(te=="deleted"||te=="createAndDeleted")return!1}return a?.onShowEditor!=null&&a?.onShowEditor(W,ne,re,X),!0},[s,a]),R=v.useCallback(W=>{if(!h.current)return;const ne=h.current.gridView,re=ne.getDataSource();if(i?.container?.page){const X=ne.getPage(),te=ne.getPageCount(),de=re.getRowCount();ye({currentPage:X,totalPages:te,totalData:de})}},[i?.container?.page]),z=v.useCallback(()=>{if(!h.current)return;const W=h.current.gridView,ne=W.getDataSource();__SYS_CD__;const re=["onKeyDown"],X=["onRowInserted"];Object.keys(a??{}).map(te=>{re.includes(te)?W[te+"Add"]=a?.[te]:W[te]=a?.[te],X.includes(te)?ne[te+"Add"]=a?.[te]:ne[te]=a?.[te]}),ne instanceof St.LocalDataProvider&&(ne.onRowInserted=(te,de)=>{de<0||(setTimeout(function(){W?.setCurrent({dataRow:de})},1),te.onRowInsertedAdd!==void 0&&te.onRowInsertedAdd(te,de))}),W.onKeyDown=function(te,de){if(de.code=="Space"){let Y=te.getSelectedItems(!0);for(const Q in Y)te.isCheckable(Y[Q])&&(te.isCheckedItem(Y[Q])?te.checkItem(Y[Q],!1,!1):te.checkItem(Y[Q],!0,!1))}return te.onKeyDownAdd!==void 0&&te.onKeyDownAdd(te,de),!0},h.current.gridView.onCurrentRowChanged=O,h.current.gridView.onEditChange=k,h.current.gridView.getDataSource().onValueChanged=I,h.current.gridView.onCellEdited=_,h.current.gridView.onShowEditor=$,h.current.gridView.onDataLoadComplated=R,h.current.gridView.onLayoutPropertyChanged=function(te,de,Y,Q,Z){const ce=de?.column||"알 수 없음";console.log("🔵 [BwgGrid] 레이아웃 속성 변경 감지:",{columnName:ce,property:Y,oldValue:Q,newValue:Z,layout:de}),Y==="visible"&&console.log(`📌 컬럼 "${ce}" ${Z?"표시":"숨김"}`),(Y==="order"||Y==="index")&&console.log(`📌 컬럼 "${ce}" 위치 변경: ${Q} → ${Z}`),a?.onLayoutPropertyChanged&&a.onLayoutPropertyChanged(te,de,Y,Q,Z)}},[O,k,I,_,$,R,u,b]),F=v.useCallback(W=>{if(!W)return;const ne=u,re=b,X=__SYS_CD__;try{W.gridView.setSortingOptions({enabled:!0}),W.gridView.sortMode=St.SortMode.EXPLICIT,W.gridView.editorOptions.viewGridInside=!0,W.gridView instanceof St.TreeView&&W.gridView.setTreeOptions({expandWhenSetData:St.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:St.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0});const te=()=>({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:te(),rowChangeDelay:i?.display?.rowChangeDelay||0,selectionStyle:i?.display?.selectionStyle||St.SelectionStyle.ROWS,fitStyle:i?.display?.fitStyle||St.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 St.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(te){console.log("그리드 옵션 설정 중 오류:",te)}try{W.gridView instanceof St.TreeView?W.gridView.setContextMenu(HO):W.gridView.setContextMenu(VO),W.gridView.onContextMenuItemClicked=function(te,de,Y){if(!(!Y||!Y.column)){if(de.tag=="excel")U(te,{isTitle:!1},l?.excel);else if(de.tag=="showIndentExcel")U(te,{isTitle:!1,treeBlank:!0},l?.excel);else if(de.tag=="withTitleExcel")U(te,{isTitle:!0,treeBlank:!1},l?.excel);else if(de.tag=="filter")H(te,de);else if(de.tag=="fixedCol"){const Z=te.getDataSource().getFieldIndex(Y.column);te.setFixedOptions({colCount:Z})}else if(de.tag=="fixedRow")te.setFixedOptions({rowCount:(Y.itemIndex||0)+1});else if(de.tag=="fixedCancel")te.setFixedOptions({colCount:0,rowCount:0});else if(de.tag=="hide")te.layoutByName(Y.column).visible=!1,te._hideCols||(te._hideCols=[]),te._hideCols[te._hideCols.length]=Y.column;else if(de.tag=="hideClear"){if(te._hideCols&&te._hideCols.length>0){for(var Q=0;Q<te._hideCols.length;Q++)te.layoutByName(te._hideCols[Q]).visible=!0;te._hideCols=[]}}else if(de.tag=="initLayout"){if(ne&&re)try{le.removeGridLayout(X,re,ne)}catch(Z){console.warn("[BwgGrid] 레이아웃 삭제 실패:",Z)}if(n){te.setColumns(n);const Z=n.filter(ce=>ce.visible!==!1).map(ce=>ce.fieldName||ce.name);Z.length>0&&te.setColumnLayout(Z)}}}}}catch(te){console.log("컨텍스트 설정 중 오류:",te)}},[i,x,u,b]),M=W=>{if(!(!c||c.length===0))try{c.forEach(ne=>{const{name:re,renderer:X}=ne;if(re&&X){const te=typeof X=="function"?new X:X;W.gridView.registerCustomRenderer(re,te)}})}catch(ne){console.error("커스텀 렌더러 초기화 중 오류:",ne)}},D=W=>{W.onPageChanged=(ne,re)=>{ye(X=>({...X,currentPage:re}))},W.onPageCountChanged=(ne,re)=>{ye(X=>({...X,totalPages:re}))}},A=W=>{h.current?.gridView&&h.current.gridView.setPage(W)},T=W=>{if(i?.layout?.colspan&&i.layout.colspan.length>0&&i?.layout?.colspan.forEach(ne=>{const re=W.gridView.layoutByColumn(ne.fieldName);if(re){const X=ne.span;re.spanCallback=function(te,de,Y){return X}}}),n&&n.length>0&&n.some(re=>re.children&&re.children.length>0))try{(()=>{const X=JSON.parse(JSON.stringify(n)),te=[],de=Y=>{const Q=[];return Y.children.map(Z=>{if(Z.children&&Z.children.length>0){const ce=de(Z),ie=Z.header?.text||Z.fieldName,fe=W.gridView.getColumnProperty(Z.fieldName,"header");delete Z.children,delete Z.header;let ge={name:Z.fieldName,header:{text:fe?.text||ie,template:fe?.template,values:fe?.values,visible:fe?.visible??!0},items:ce,...Z};Q.push(ge)}else Q.push(Z.fieldName)}),Q};X.map(Y=>{if(Y.children&&Y.children.length>0){const Q=de(Y),Z=Y.header?.text||Y.fieldName,ce=Y.header?.visible??!0,ie=W.gridView.getColumnProperty(Y.fieldName,"header");delete Y.children,delete Y.header;const fe={name:Y.fieldName,header:{text:ie?.text||Z,template:ie?.template,values:ie?.values,visible:ie?.visible||ce},items:Q,...Y};te.push(fe)}else te.push(Y.fieldName)}),console.log("Final Layout!!",te),W.gridView.setColumnLayout(te)})()}catch(re){console.error("컬럼 레이아웃 설정 오류:",re)}},N=()=>{if(h.current){if(e==="nrml"){const W=h.current;if(F(W),M(W),n&&n.length>0){const ne=j(n),re=S(n);W.gridView.getDataSource().setFields(ne),W.gridView.setColumns(re)}if(T(W),i?.container?.page){const ne=i?.pagingOption?.pageSize||10;W.gridView.setPaging(!0,ne),D(W.gridView)}}else{const W=h.current;if(F(W),M(W),n&&n.length>0){const ne=j(n),re=S(n);W.gridView.getDataSource().setFields(ne),W.gridView.setColumns(re)}T(h.current)}setTimeout(()=>{if(d){const W=typeof f=="object"&&f!==null?f.current:null;d(W)}},0)}},U=(W,ne,re)=>{const X=W.getDataSource();let te=re?.footer==null?"default":re.footer;X.getRowCount()<1&&(te="hidden");let de={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!ne?.treeBlank,footer:te,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:re?.fileName||"sample.xlsx"};X instanceof St.LocalTreeDataProvider&&(de.indenting=!!ne?.treeBlank),re?.isCellMerge==!0&&(de.separateRows=!1),le.isEmpty(re?.sheetName)==!1&&(de.sheetName=re?.sheetName),ne?.isTitle&&(de.documentTitle={message:le.isSafeEmpty(re?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},le.isEmpty(re?.subTitle)==!1&&(de.documentSubtitle={message:re?.subTitle,visible:!0,styleName:"center",height:20}),le.isEmpty(re?.tailTitle)==!1&&(de.documentTail={message:re?.tailTitle,visible:!0,styleName:"documentStyle"})),W.exportGrid(de)},H=(W,ne)=>{const re=W.getDataSource(),X=re.getOrgFieldNames();if(ne.checked)for(var te=0;te<X.length;te++){let Y=[],Q=re.getDistinctValues(X[te])??[];if(Q.length==0)continue;let Z=W.columnByName(X[te]);for(var de=0;de<Q.length;de++){if(Q[de]==null)continue;let ce=Z.values!=null&&Z.values.indexOf(Q[de])!=-1?Z?.labels?.[Z.values.indexOf(Q[de])]:Q[de];le.isEmpty(ce)&&(le.isEmpty(Q[de])?ce=" ":ce=Q[de]);let ie="";Q[de]==null?ie="value="+Q[de]:ie="value='"+Q[de]+"'",Y.push({name:ce,criteria:ie})}W.setColumnFilters(X[te],Y)}else for(var te=0;te<X.length;te++)W.clearColumnFilters(X[te]),W.activateAllColumnFilters(X[te],!1),W.clearColumnFilters(X[te])};v.useEffect(()=>{if(!h.current?.gridView)return;const W=()=>({0:25,1:30,2:43})[x],ne=()=>({0:12,1:13,2:14})[x];h.current.gridView.setDisplayOptions({rowHeight:W()}),g.current&&g.current.style.setProperty("--bwg-grid-font-size",`${ne()}px`)},[x,i?.display?.rowHeight]),v.useEffect(()=>{if(h.current&&h.current.gridView)if(e==="nrml"){const W=h.current;F(W)}else{const W=h.current;F(W)}},[e,i,F]),v.useEffect(()=>{!h.current||!n||n.length===0||N()},[n]),v.useEffect(()=>{h.current&&z()},[a,z]),v.useLayoutEffect(()=>{if(!(!u||!b||!h.current?.gridView))try{const W=le.getGridLayout(__SYS_CD__,b,u);if(W){const ne=Array.isArray(W)?W:W.layout||W;ne&&(h.current.gridView.setColumnLayout(ne),console.log(`[BwgGrid] 저장된 레이아웃 로드 완료: ${__SYS_CD__}/${b}/${u}`))}}catch(W){console.warn("[BwgGrid] 레이아웃 로드 실패:",W)}},[u,b]),v.useEffect(()=>{const W=ne=>{const re=ne.ctrlKey||ne.metaKey;Ku===E.current&&(re&&(ne.key==="f"||ne.key==="F")&&(ne.preventDefault(),Pe(X=>X&&!1),pe(""),K(X=>!X)),re&&(ne.key==="g"||ne.key==="G")&&(ne.preventDefault(),K(X=>X&&!1),Pe(X=>!X)))};return window.addEventListener("keydown",W,{capture:!0}),()=>{window.removeEventListener("keydown",W,!0)}},[]);const[V,K]=v.useState(!1),[oe,pe]=v.useState(""),ve=v.useRef(null),[Ce,Pe]=v.useState(!1),[J,ye]=v.useState({currentPage:0,totalPages:0,totalData:0});v.useEffect(()=>{ye({currentPage:0,totalPages:0,totalData:0})},[]),v.useEffect(()=>{V&&setTimeout(()=>{ve.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 me=v.useCallback(()=>{const W=oe;console.log("@@ handleSearchEnter:",W);const ne=h.current?.gridView;if(!ne)return;if(ne.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(ne.commit(),le.isEmpty(W))return;const re=ne.getCurrent().itemIndex??-1;if(re<0)return;const X={value:W,startIndex:re+1,wrap:!0,caseSensitive:!1,partialMatch:!0},te=ne.searchCell(X);ne.setCurrent(te)},[oe]),L=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),K(!1))},[]),ae=v.useCallback(()=>{pe(""),K(!V)},[V]),q=v.useCallback(()=>{Pe(!Ce)},[Ce]),ue=v.useCallback(W=>{W.key==="Escape"&&(W.preventDefault(),Pe(!1))},[]),he=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 저장 실패: gridId 또는 menuId가 없습니다.");return}try{const ne=h.current.gridView.saveColumnLayout();ne&&(le.saveGridLayout(__SYS_CD__,b,u,ne),Pe(!1))}catch(W){console.warn("[BwgGrid] 레이아웃 저장 실패:",W)}},[u,b]),we=v.useCallback(()=>{if(!u||!b||!h.current?.gridView){console.warn("[BwgGrid] 레이아웃 초기화 실패: gridId 또는 menuId가 없습니다.");return}try{if(le.removeGridLayout(__SYS_CD__,b,u),n){const W=S(n);h.current.gridView.setColumns(W);const ne=n.filter(re=>re.visible!==!1).map(re=>re.fieldName||re.name);ne.length>0&&h.current.gridView.setColumnLayout(ne)}console.log(`[BwgGrid] 레이아웃 초기화 완료: ${__SYS_CD__}/${b}/${u}`),Pe(!1)}catch(W){console.warn("[BwgGrid] 레이아웃 초기화 실패:",W)}},[u,b,n,S]),je={searchEnter:me,handleCloseKeyword:L,handleSearch:ae,handleLayoutManager:q,handleCloseLayoutManager:ue,handleSaveLayout:he,handleResetLayout:we},Te=v.useMemo(()=>({0:12,1:13,2:14})[x],[x]),Ne=v.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%","--bwg-grid-font-size":`${Te}px`}),[t,Te]);return o.jsxs(WO,{children:[o.jsxs("div",{ref:g,style:Ne,className:r,onClick:()=>{Ku=E.current},onFocusCapture:()=>{Ku=E.current},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:ve,value:oe,name:"srchField",autoComplete:"off",placeholder:"검색어를 입력하세요.",onKeyUp:W=>je.handleCloseKeyword(W),onChange:W=>pe(W.target.value),onPressEnter:()=>je.searchEnter()}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(G.CloseOutlined,{}),onClick:()=>K(!1)})]})})}),Ce&&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=>je.handleCloseLayoutManager(W),children:o.jsx(p.ConfigProvider,{componentSize:y.componentSize,theme:{token:{fontSize:y.fontSize}},children:o.jsxs(p.Flex,{vertical:!0,gap:10,children:[o.jsxs(p.Flex,{gap:6,style:{width:"100%",position:"relative"},children:[o.jsx(p.Button,{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:"M11.25 15V11.25H6.75V15M13.5 15H4.5C3.67157 15 3 14.3284 3 13.5V4.5C3 3.67157 3.67157 3 4.5 3H10.6287C11.0265 3 11.408 3.15804 11.6893 3.43934L14.5607 6.31066C14.842 6.59197 15 6.9735 15 7.37132V13.5C15 14.3284 14.3284 15 13.5 15Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),onClick:je.handleSaveLayout,disabled:!u||!b,children:"레이아웃 저장"}),o.jsx(p.Button,{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.jsx("g",{"clip-path":"url(#clip0_1427_1188)",children:o.jsx("path",{d:"M14.7003 11.34C14.2603 12.58 13.4403 13.64 12.3503 14.36C11.2603 15.09 9.96032 15.44 8.66032 15.36C7.35032 15.28 6.11032 14.79 5.11032 13.94C4.11032 13.09 3.41032 11.95 3.12032 10.67C2.83032 9.39 2.96032 8.06 3.50032 6.86C4.04032 5.66 4.94032 4.68 6.09032 4.04C7.24032 3.41 8.56032 3.16 9.85032 3.35C12.0403 3.66 13.4903 5.24 15.0503 6.65M15.0403 2.63V6.65H11.0103",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1427_1188",children:o.jsx("rect",{width:"18",height:"18",fill:"white"})})})]}),onClick:je.handleResetLayout,disabled:!u||!b,children:"레이아웃 초기화"}),o.jsx("div",{style:{position:"absolute",right:0},children:o.jsx(p.Button,{type:"text",icon:o.jsx(G.CloseOutlined,{}),style:{width:30,height:30},onClick:()=>Pe(!1)})})]}),(!u||!b)&&o.jsx(p.Alert,{message:"그리드 설정정보가 완료되지 않았습니다. 관리자에게 문의하십시오",type:"warning",showIcon:!0,style:{fontSize:y.fontSize,border:0,background:le.colorFormat.site.yellow01,color:"var(--text-primary)",padding:"4px 10px",borderRadius:4}})]})})}),e==="nrml"?o.jsx(Zg.RealGridReact,{ref:h,autoGenerateField:!0,onInitialized:N}):o.jsx(Zg.RealTreeReact,{ref:h,autoGenerateField:!1,onInitialized:N})]}),i?.container?.page&&o.jsx(Do,{currentPage:J.currentPage,totalPages:J.totalPages,pageSize:i?.pagingOption?.pageSize,totalData:J.totalData,onPageChange:A,pageSizeOptions:i?.pagingOption?.pageSizeOptions,gridRef:h})]})}),pn=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(Ae,{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}),hv=(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)}},KO=({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:"닫기"})]})},mi=({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),m=v.useMemo(()=>{const P=Math.max(0,(window.innerWidth-l)/2),j=Math.max(0,(window.innerHeight-c)/2);return{x:Math.round(P),y:Math.round(j)}},[l,c]),[g,x]=v.useState(m),y=(P,j)=>{const S=hv({x:j.x,y:j.y},{width:d,height:f});x(S)},w=(P,j,S,O,k)=>{const I={width:Math.round(parseInt(S.style.width,10)),height:Math.round(parseInt(S.style.height,10))},_=hv(k,I);u(I.width),h(I.height),x(_)},b=()=>a.current??document.body,E=typeof e?.zIndex=="number"?e.zIndex:3e3;return o.jsxs("div",{style:{position:"fixed",inset:0,zIndex:E},children:[o.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),o.jsxs(yO.Rnd,{className:"bwg-popup",size:{width:d,height:f},position:g,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(Nh,{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(KO,{buttons:i,onClose:()=>e?.close?.()||r?.()}),children:o.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:o.jsx(st.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}),Nc=({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})}),qO=({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}),lr=e=>{const{type:t="card",animated:r=!0,...n}=e;return o.jsx(p.Tabs,{type:t,animated:r,...n})};function rp(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 YO(e){if(Array.isArray(e))return rp(e)}function lw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _h(e,t){if(e){if(typeof e=="string")return rp(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)?rp(e,t):void 0}}function GO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wt(e){return YO(e)||lw(e)||_h(e)||GO()}function Nt(){return Nt=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},Nt.apply(null,arguments)}var XO={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 cw(e){if(Array.isArray(e))return e}function ZO(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 uw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ee(e,t){return cw(e)||ZO(e,t)||_h(e,t)||uw()}function He(e){"@babel/helpers - typeof";return He=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},He(e)}function QO(e,t){if(He(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(He(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dw(e){var t=QO(e,"string");return He(t)=="symbol"?t:t+""}function Se(e,t,r){return(t=dw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JO(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=JO(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 qu={exports:{}};/*!
|
|
6
|
-
Copyright (c) 2018 Jed Watson.
|
|
7
|
-
Licensed under the MIT License (MIT), see
|
|
8
|
-
http://jedwatson.github.io/classnames
|
|
9
|
-
*/var mv;function ek(){return mv||(mv=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=i(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)t.call(a,l)&&a[l]&&(s=i(s,l));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(qu)),qu.exports}var tk=ek();const _e=jr(tk),zt=Math.round;function Yu(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const gv=(e,t,r)=>r===0?e:e/100;function ua(e,t){const r=t||255;return e>r?r:e<0?0:e}let At=class fw{constructor(t){Se(this,"isValid",!0),Se(this,"r",0),Se(this,"g",0),Se(this,"b",0),Se(this,"a",1),Se(this,"_h",void 0),Se(this,"_s",void 0),Se(this,"_l",void 0),Se(this,"_v",void 0),Se(this,"_max",void 0),Se(this,"_min",void 0),Se(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(a){return n.startsWith(a)};const n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof fw)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=ua(t.r),this.g=ua(t.g),this.b=ua(t.b),this.a=typeof t.a=="number"?ua(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=zt(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,a=l=>(n[l]-this[l])*i+this[l],s={r:zt(a("r")),g:zt(a("g")),b:zt(a("b")),a:zt(a("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=a=>zt((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=zt(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=zt(this.getSaturation()*100),n=zt(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=ua(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,a){return parseInt(r[i]+r[a||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const h=zt(n*255);this.r=h,this.g=h,this.b=h}let a=0,s=0,l=0;const c=t/60,d=(1-Math.abs(2*n-1))*r,u=d*(1-Math.abs(c%2-1));c>=0&&c<1?(a=d,s=u):c>=1&&c<2?(a=u,s=d):c>=2&&c<3?(s=d,l=u):c>=3&&c<4?(s=u,l=d):c>=4&&c<5?(a=u,l=d):c>=5&&c<6&&(a=d,l=u);const f=n-d/2;this.r=zt((a+f)*255),this.g=zt((s+f)*255),this.b=zt((l+f)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const a=zt(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const s=t/60,l=Math.floor(s),c=s-l,d=zt(n*(1-r)*255),u=zt(n*(1-r*c)*255),f=zt(n*(1-r*(1-c))*255);switch(l){case 0:this.g=f,this.b=d;break;case 1:this.r=u,this.b=d;break;case 2:this.r=d,this.b=f;break;case 3:this.r=d,this.g=u;break;case 4:this.r=f,this.g=d;break;case 5:default:this.g=d,this.b=u;break}}fromHsvString(t){const r=Yu(t,gv);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=Yu(t,gv);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=Yu(t,(n,i)=>i.includes("%")?zt(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var Vs=2,vv=.16,rk=.05,nk=.05,ik=.15,pw=5,hw=4,ok=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function yv(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Vs*t:Math.round(e.h)+Vs*t:n=r?Math.round(e.h)+Vs*t:Math.round(e.h)-Vs*t,n<0?n+=360:n>=360&&(n-=360),n}function xv(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-vv*t:t===hw?n=e.s+vv:n=e.s+rk*t,n>1&&(n=1),r&&t===pw&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function bv(e,t,r){var n;return r?n=e.v+nk*t:n=e.v-ik*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Ra(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new At(e),i=n.toHsv(),a=pw;a>0;a-=1){var s=new At({h:yv(i,a,!0),s:xv(i,a,!0),v:bv(i,a,!0)});r.push(s)}r.push(n);for(var l=1;l<=hw;l+=1){var c=new At({h:yv(i,l),s:xv(i,l),v:bv(i,l)});r.push(c)}return t.theme==="dark"?ok.map(function(d){var u=d.index,f=d.amount;return new At(t.backgroundColor||"#141414").mix(r[u],f).toHexString()}):r.map(function(d){return d.toHexString()})}var Gu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},np=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];np.primary=np[5];var ip=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ip.primary=ip[5];var op=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];op.primary=op[5];var Ll=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ll.primary=Ll[5];var ap=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];ap.primary=ap[5];var sp=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];sp.primary=sp[5];var lp=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];lp.primary=lp[5];var cp=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];cp.primary=cp[5];var zl=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];zl.primary=zl[5];var up=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];up.primary=up[5];var dp=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];dp.primary=dp[5];var fp=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];fp.primary=fp[5];var pp=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];pp.primary=pp[5];var Xu={red:np,volcano:ip,orange:op,gold:Ll,yellow:ap,lime:sp,green:lp,cyan:cp,blue:zl,geekblue:up,purple:dp,magenta:fp,grey:pp},Bh=v.createContext({});function wv(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 xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wv(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function or(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ak(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var Cv="data-rc-order",Sv="data-rc-priority",sk="rc-util-key",hp=new Map;function mw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):sk}function Dc(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function lk(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function $h(e){return Array.from((hp.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function gw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!or())return null;var r=t.csp,n=t.prepend,i=t.priority,a=i===void 0?0:i,s=lk(n),l=s==="prependQueue",c=document.createElement("style");c.setAttribute(Cv,s),l&&a&&c.setAttribute(Sv,"".concat(a)),r!=null&&r.nonce&&(c.nonce=r?.nonce),c.innerHTML=e;var d=Dc(t),u=d.firstChild;if(n){if(l){var f=(t.styles||$h(d)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(Cv)))return!1;var m=Number(h.getAttribute(Sv)||0);return a>=m});if(f.length)return d.insertBefore(c,f[f.length-1].nextSibling),c}d.insertBefore(c,u)}else d.appendChild(c);return c}function vw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Dc(t);return(t.styles||$h(r)).find(function(n){return n.getAttribute(mw(t))===e})}function Aa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=vw(e,t);if(r){var n=Dc(t);n.removeChild(r)}}function ck(e,t){var r=hp.get(e);if(!r||!ak(document,r)){var n=gw("",t),i=n.parentNode;hp.set(e,i),e.removeChild(n)}}function Tn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Dc(r),i=$h(n),a=xe(xe({},r),{},{styles:i});ck(n,a);var s=vw(t,a);if(s){var l,c;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((c=a.csp)===null||c===void 0?void 0:c.nonce)){var d;s.nonce=(d=a.csp)===null||d===void 0?void 0:d.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var u=gw(e,a);return u.setAttribute(mw(a),t),u}function yw(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function uk(e){return yw(e)instanceof ShadowRoot}function Fl(e){return uk(e)?yw(e):null}var mp={},Lh=[],dk=function(t){Lh.push(t)};function bo(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Lh.reduce(function(n,i){return i(n??"","warning")},t);r&&console.error("Warning: ".concat(r))}}function fk(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Lh.reduce(function(n,i){return i(n??"","note")},t);r&&console.warn("Note: ".concat(r))}}function xw(){mp={}}function bw(e,t,r){!t&&!mp[r]&&(e(!1,r),mp[r]=!0)}function $n(e,t){bw(bo,e,t)}function pk(e,t){bw(fk,e,t)}$n.preMessage=dk;$n.resetWarned=xw;$n.noteOnce=pk;function hk(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function mk(e,t){$n(e,"[@ant-design/icons] ".concat(t))}function jv(e){return He(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(He(e.icon)==="object"||typeof e.icon=="function")}function Ev(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[hk(r)]=n}return t},{})}function gp(e,t,r){return r?v.createElement(e.tag,xe(xe({key:t},Ev(e.attrs)),r),(e.children||[]).map(function(n,i){return gp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):v.createElement(e.tag,xe({key:t},Ev(e.attrs)),(e.children||[]).map(function(n,i){return gp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function ww(e){return Ra(e)[0]}function Cw(e){return e?Array.isArray(e)?e:[e]:[]}var gk=`
|
|
10
|
-
.anticon {
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
color: inherit;
|
|
14
|
-
font-style: normal;
|
|
15
|
-
line-height: 0;
|
|
16
|
-
text-align: center;
|
|
17
|
-
text-transform: none;
|
|
18
|
-
vertical-align: -0.125em;
|
|
19
|
-
text-rendering: optimizeLegibility;
|
|
20
|
-
-webkit-font-smoothing: antialiased;
|
|
21
|
-
-moz-osx-font-smoothing: grayscale;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.anticon > * {
|
|
25
|
-
line-height: 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.anticon svg {
|
|
29
|
-
display: inline-block;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.anticon::before {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.anticon .anticon-icon {
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.anticon[tabindex] {
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.anticon-spin::before,
|
|
45
|
-
.anticon-spin {
|
|
46
|
-
display: inline-block;
|
|
47
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
48
|
-
animation: loadingCircle 1s infinite linear;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@-webkit-keyframes loadingCircle {
|
|
52
|
-
100% {
|
|
53
|
-
-webkit-transform: rotate(360deg);
|
|
54
|
-
transform: rotate(360deg);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@keyframes loadingCircle {
|
|
59
|
-
100% {
|
|
60
|
-
-webkit-transform: rotate(360deg);
|
|
61
|
-
transform: rotate(360deg);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`,vk=function(t){var r=v.useContext(Bh),n=r.csp,i=r.prefixCls,a=r.layer,s=gk;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
|
|
65
|
-
`).concat(s,`
|
|
66
|
-
}`)),v.useEffect(function(){var l=t.current,c=Fl(l);Tn(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:c})},[])},yk=["icon","className","onClick","style","primaryColor","secondaryColor"],Pa={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function xk(e){var t=e.primaryColor,r=e.secondaryColor;Pa.primaryColor=t,Pa.secondaryColor=r||ww(t),Pa.calculated=!!r}function bk(){return xe({},Pa)}var _o=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,s=t.primaryColor,l=t.secondaryColor,c=Jr(t,yk),d=C.useRef(),u=Pa;if(s&&(u={primaryColor:s,secondaryColor:l||ww(s)}),vk(d),mk(jv(r),"icon should be icon definiton, but got ".concat(r)),!jv(r))return null;var f=r;return f&&typeof f.icon=="function"&&(f=xe(xe({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),gp(f.icon,"svg-".concat(f.name),xe(xe({className:n,onClick:i,style:a,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:d}))};_o.displayName="IconReact";_o.getTwoToneColors=bk;_o.setTwoToneColors=xk;function Sw(e){var t=Cw(e),r=Ee(t,2),n=r[0],i=r[1];return _o.setTwoToneColors({primaryColor:n,secondaryColor:i})}function wk(){var e=_o.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Ck=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Sw(zl.primary);var Ln=C.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,d=Jr(e,Ck),u=C.useContext(Bh),f=u.prefixCls,h=f===void 0?"anticon":f,m=u.rootClassName,g=_e(m,h,Se(Se({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),r),x=s;x===void 0&&l&&(x=-1);var y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,w=Cw(c),b=Ee(w,2),E=b[0],P=b[1];return C.createElement("span",Nt({role:"img","aria-label":n.name},d,{ref:t,tabIndex:x,onClick:l,className:g}),C.createElement(_o,{icon:n,primaryColor:E,secondaryColor:P,style:y}))});Ln.displayName="AntdIcon";Ln.getTwoToneColor=wk;Ln.setTwoToneColor=Sw;var Sk=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:XO}))},jw=C.forwardRef(Sk);process.env.NODE_ENV!=="production"&&(jw.displayName="EditOutlined");var jk=Symbol.for("react.element"),Ek=Symbol.for("react.transitional.element"),Pk=Symbol.for("react.fragment");function Ew(e){return e&&He(e)==="object"&&(e.$$typeof===jk||e.$$typeof===Ek)&&e.type===Pk}function Na(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return v.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Na(n)):Ew(n)&&n.props?r=r.concat(Na(n.props.children,t)):r.push(n))}),r}function Da(e){return e instanceof HTMLElement||e instanceof SVGElement}function Ok(e){return e&&He(e)==="object"&&Da(e.nativeElement)?e.nativeElement:Da(e)?e:null}function Sl(e){var t=Ok(e);if(t)return t;if(e instanceof v.Component){var r;return(r=xo.findDOMNode)===null||r===void 0?void 0:r.call(xo,e)}return null}var Hs={exports:{}},Ye={};/**
|
|
67
|
-
* @license React
|
|
68
|
-
* react-is.production.min.js
|
|
69
|
-
*
|
|
70
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the MIT license found in the
|
|
73
|
-
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var Pv;function kk(){if(Pv)return Ye;Pv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function x(y){if(typeof y=="object"&&y!==null){var w=y.$$typeof;switch(w){case e:switch(y=y.type,y){case r:case i:case n:case d:case u:return y;default:switch(y=y&&y.$$typeof,y){case l:case s:case c:case h:case f:case a:return y;default:return w}}case t:return w}}}return Ye.ContextConsumer=s,Ye.ContextProvider=a,Ye.Element=e,Ye.ForwardRef=c,Ye.Fragment=r,Ye.Lazy=h,Ye.Memo=f,Ye.Portal=t,Ye.Profiler=i,Ye.StrictMode=n,Ye.Suspense=d,Ye.SuspenseList=u,Ye.isAsyncMode=function(){return!1},Ye.isConcurrentMode=function(){return!1},Ye.isContextConsumer=function(y){return x(y)===s},Ye.isContextProvider=function(y){return x(y)===a},Ye.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Ye.isForwardRef=function(y){return x(y)===c},Ye.isFragment=function(y){return x(y)===r},Ye.isLazy=function(y){return x(y)===h},Ye.isMemo=function(y){return x(y)===f},Ye.isPortal=function(y){return x(y)===t},Ye.isProfiler=function(y){return x(y)===i},Ye.isStrictMode=function(y){return x(y)===n},Ye.isSuspense=function(y){return x(y)===d},Ye.isSuspenseList=function(y){return x(y)===u},Ye.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===n||y===d||y===u||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===a||y.$$typeof===s||y.$$typeof===c||y.$$typeof===g||y.getModuleId!==void 0)},Ye.typeOf=x,Ye}var Ge={};/**
|
|
75
|
-
* @license React
|
|
76
|
-
* react-is.development.js
|
|
77
|
-
*
|
|
78
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the MIT license found in the
|
|
81
|
-
* LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/var Ov;function Tk(){return Ov||(Ov=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=!1,x=!1,y=!1,w=!1,b=!1,E;E=Symbol.for("react.module.reference");function P(q){return!!(typeof q=="string"||typeof q=="function"||q===r||q===i||b||q===n||q===d||q===u||w||q===m||g||x||y||typeof q=="object"&&q!==null&&(q.$$typeof===h||q.$$typeof===f||q.$$typeof===a||q.$$typeof===s||q.$$typeof===c||q.$$typeof===E||q.getModuleId!==void 0))}function j(q){if(typeof q=="object"&&q!==null){var ue=q.$$typeof;switch(ue){case e:var he=q.type;switch(he){case r:case i:case n:case d:case u:return he;default:var we=he&&he.$$typeof;switch(we){case l:case s:case c:case h:case f:case a:return we;default:return ue}}case t:return ue}}}var S=s,O=a,k=e,I=c,_=r,$=h,R=f,z=t,F=i,M=n,D=d,A=u,T=!1,N=!1;function U(q){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(q){return N||(N=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(q){return j(q)===s}function K(q){return j(q)===a}function oe(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function pe(q){return j(q)===c}function ve(q){return j(q)===r}function Ce(q){return j(q)===h}function Pe(q){return j(q)===f}function J(q){return j(q)===t}function ye(q){return j(q)===i}function me(q){return j(q)===n}function L(q){return j(q)===d}function ae(q){return j(q)===u}Ge.ContextConsumer=S,Ge.ContextProvider=O,Ge.Element=k,Ge.ForwardRef=I,Ge.Fragment=_,Ge.Lazy=$,Ge.Memo=R,Ge.Portal=z,Ge.Profiler=F,Ge.StrictMode=M,Ge.Suspense=D,Ge.SuspenseList=A,Ge.isAsyncMode=U,Ge.isConcurrentMode=H,Ge.isContextConsumer=V,Ge.isContextProvider=K,Ge.isElement=oe,Ge.isForwardRef=pe,Ge.isFragment=ve,Ge.isLazy=Ce,Ge.isMemo=Pe,Ge.isPortal=J,Ge.isProfiler=ye,Ge.isStrictMode=me,Ge.isSuspense=L,Ge.isSuspenseList=ae,Ge.isValidElementType=P,Ge.typeOf=j})()),Ge}var kv;function Ik(){return kv||(kv=1,process.env.NODE_ENV==="production"?Hs.exports=kk():Hs.exports=Tk()),Hs.exports}var jl=Ik();function zh(e,t,r){var n=C.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var Mk=Number(v.version.split(".")[0]),Fh=function(t,r){typeof t=="function"?t(r):He(t)==="object"&&t&&"current"in t&&(t.current=r)},is=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(a){r.forEach(function(s){Fh(s,a)})}},Vh=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zh(function(){return is.apply(void 0,r)},r,function(i,a){return i.length!==a.length||i.every(function(s,l){return s!==a[l]})})},_c=function(t){var r,n;if(!t)return!1;if(Pw(t)&&Mk>=19)return!0;var i=jl.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==jl.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==jl.ForwardRef)};function Pw(e){return v.isValidElement(e)&&!Ew(e)}var Hh=function(t){if(t&&Pw(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},vp=C.createContext(null);function Rk(e){var t=e.children,r=e.onBatchResize,n=C.useRef(0),i=C.useRef([]),a=C.useContext(vp),s=C.useCallback(function(l,c,d){n.current+=1;var u=n.current;i.current.push({size:l,element:c,data:d}),Promise.resolve().then(function(){u===n.current&&(r?.(i.current),i.current=[])}),a?.(l,c,d)},[r,a]);return C.createElement(vp.Provider,{value:s},t)}var Ow=(function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var s=a[i];r.call(n,s[1],s[0])}},t})()})(),yp=typeof window<"u"&&typeof document<"u"&&window.document===document,Vl=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),Ak=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Vl):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Nk=2;function Dk(e,t){var r=!1,n=!1,i=0;function a(){r&&(r=!1,e()),n&&l()}function s(){Ak(a)}function l(){var c=Date.now();if(r){if(c-i<Nk)return;n=!0}else r=!0,n=!1,setTimeout(s,t);i=c}return l}var _k=20,Bk=["top","right","bottom","left","width","height","size","weight"],$k=typeof MutationObserver<"u",Lk=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Dk(this.refresh.bind(this),_k)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!yp||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$k?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!yp||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=Bk.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),kw=(function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),wo=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Vl}),Tw=Bc(0,0,0,0);function Hl(e){return parseFloat(e)||0}function Tv(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var a=e["border-"+i+"-width"];return n+Hl(a)},0)}function zk(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var a=i[n],s=e["padding-"+a];r[a]=Hl(s)}return r}function Fk(e){var t=e.getBBox();return Bc(0,0,t.width,t.height)}function Vk(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return Tw;var n=wo(e).getComputedStyle(e),i=zk(n),a=i.left+i.right,s=i.top+i.bottom,l=Hl(n.width),c=Hl(n.height);if(n.boxSizing==="border-box"&&(Math.round(l+a)!==t&&(l-=Tv(n,"left","right")+a),Math.round(c+s)!==r&&(c-=Tv(n,"top","bottom")+s)),!Wk(e)){var d=Math.round(l+a)-t,u=Math.round(c+s)-r;Math.abs(d)!==1&&(l-=d),Math.abs(u)!==1&&(c-=u)}return Bc(i.left,i.top,l,c)}var Hk=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof wo(e).SVGGraphicsElement}:function(e){return e instanceof wo(e).SVGElement&&typeof e.getBBox=="function"}})();function Wk(e){return e===wo(e).document.documentElement}function Uk(e){return yp?Hk(e)?Fk(e):Vk(e):Tw}function Kk(e){var t=e.x,r=e.y,n=e.width,i=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(a.prototype);return kw(s,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),s}function Bc(e,t,r,n){return{x:e,y:t,width:r,height:n}}var qk=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Bc(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Uk(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),Yk=(function(){function e(t,r){var n=Kk(r);kw(this,{target:t,contentRect:n})}return e})(),Gk=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new Ow,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof wo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new qk(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof wo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Yk(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),Iw=typeof WeakMap<"u"?new WeakMap:new Ow,Mw=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Lk.getInstance(),n=new Gk(t,r,this);Iw.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){Mw.prototype[e]=function(){var t;return(t=Iw.get(this))[e].apply(t,arguments)}});var Xk=(function(){return typeof Vl.ResizeObserver<"u"?Vl.ResizeObserver:Mw})(),Pn=new Map;function Rw(e){e.forEach(function(t){var r,n=t.target;(r=Pn.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var Aw=new Xk(Rw);process.env.NODE_ENV;process.env.NODE_ENV;function Zk(e,t){Pn.has(e)||(Pn.set(e,new Set),Aw.observe(e)),Pn.get(e).add(t)}function Qk(e,t){Pn.has(e)&&(Pn.get(e).delete(t),Pn.get(e).size||(Aw.unobserve(e),Pn.delete(e)))}function $r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dw(n.key),n)}}function Lr(e,t,r){return t&&Jk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xp(e,t){return xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},xp(e,t)}function os(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xp(e,t)}function Wl(e){return Wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wl(e)}function Nw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nw=function(){return!!e})()}function Oa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eT(e,t){if(t&&(He(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oa(e)}function as(e){var t=Nw();return function(){var r,n=Wl(e);if(t){var i=Wl(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eT(this,r)}}var tT=(function(e){os(r,e);var t=as(r);function r(){return $r(this,r),t.apply(this,arguments)}return Lr(r,[{key:"render",value:function(){return this.props.children}}]),r})(C.Component);function rT(e,t){var r=e.children,n=e.disabled,i=C.useRef(null),a=C.useRef(null),s=C.useContext(vp),l=typeof r=="function",c=l?r(i):r,d=C.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!l&&C.isValidElement(c)&&_c(c),f=u?Hh(c):null,h=Vh(f,i),m=function(){var w;return Sl(i.current)||(i.current&&He(i.current)==="object"?Sl((w=i.current)===null||w===void 0?void 0:w.nativeElement):null)||Sl(a.current)};C.useImperativeHandle(t,function(){return m()});var g=C.useRef(e);g.current=e;var x=C.useCallback(function(y){var w=g.current,b=w.onResize,E=w.data,P=y.getBoundingClientRect(),j=P.width,S=P.height,O=y.offsetWidth,k=y.offsetHeight,I=Math.floor(j),_=Math.floor(S);if(d.current.width!==I||d.current.height!==_||d.current.offsetWidth!==O||d.current.offsetHeight!==k){var $={width:I,height:_,offsetWidth:O,offsetHeight:k};d.current=$;var R=O===Math.round(j)?j:O,z=k===Math.round(S)?S:k,F=xe(xe({},$),{},{offsetWidth:R,offsetHeight:z});s?.(F,y,E),b&&Promise.resolve().then(function(){b(F,y)})}},[]);return C.useEffect(function(){var y=m();return y&&!n&&Zk(y,x),function(){return Qk(y,x)}},[i.current,n]),C.createElement(tT,{ref:a},u?C.cloneElement(c,{ref:h}):c)}var Dw=C.forwardRef(rT);process.env.NODE_ENV!=="production"&&(Dw.displayName="SingleObserver");var nT="rc-observer-key";function iT(e,t){var r=e.children,n=typeof r=="function"?[r]:Na(r);return process.env.NODE_ENV!=="production"&&(n.length>1?bo(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):n.length===0&&bo(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),n.map(function(i,a){var s=i?.key||"".concat(nT,"-").concat(a);return C.createElement(Dw,Nt({},e,{key:s,ref:a===0?t:void 0}),i)})}var Bo=C.forwardRef(iT);process.env.NODE_ENV!=="production"&&(Bo.displayName="ResizeObserver");Bo.Collection=Rk;var Iv=process.env.NODE_ENV!=="test"&&or()?C.useLayoutEffect:C.useEffect,pt=function(t,r){var n=C.useRef(!0);Iv(function(){return t(n.current)},r),Iv(function(){return n.current=!1,function(){n.current=!0}},[])},Mv=function(t,r){pt(function(n){if(!n)return t()},r)};function wr(e){var t=C.useRef();t.current=e;var r=C.useCallback(function(){for(var n,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return r}function _a(e){var t=C.useRef(!1),r=C.useState(e),n=Ee(r,2),i=n[0],a=n[1];C.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function s(l,c){c&&t.current||a(l)}return[i,s]}function Zu(e){return e!==void 0}function Co(e,t){var r=t||{},n=r.defaultValue,i=r.value,a=r.onChange,s=r.postState,l=_a(function(){return Zu(i)?i:Zu(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),c=Ee(l,2),d=c[0],u=c[1],f=i!==void 0?i:d,h=s?s(f):f,m=wr(a),g=_a([f]),x=Ee(g,2),y=x[0],w=x[1];Mv(function(){var E=y[0];d!==E&&m(d,E)},[y]),Mv(function(){Zu(i)||u(i)},[i]);var b=wr(function(E,P){u(E,P),w([f],P)});return[h,b]}function _w(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var oT=function(t){if(or()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1};function Rv(e,t){return oT(e)}function Ba(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function aT(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=n.has(a);if($n(!c,"Warning: There may be circular references"),c)return!1;if(a===s)return!0;if(r&&l>1)return!1;n.add(a);var d=l+1;if(Array.isArray(a)){if(!Array.isArray(s)||a.length!==s.length)return!1;for(var u=0;u<a.length;u++)if(!i(a[u],s[u],d))return!1;return!0}if(a&&s&&He(a)==="object"&&He(s)==="object"){var f=Object.keys(a);return f.length!==Object.keys(s).length?!1:f.every(function(h){return i(a[h],s[h],d)})}return!1}return i(e,t)}var sT="%";function bp(e){return e.join(sT)}var lT=(function(){function e(t){$r(this,e),Se(this,"instanceId",void 0),Se(this,"cache",new Map),Se(this,"extracted",new Set),this.instanceId=t}return Lr(e,[{key:"get",value:function(r){return this.opGet(bp(r))}},{key:"opGet",value:function(r){return this.cache.get(r)||null}},{key:"update",value:function(r,n){return this.opUpdate(bp(r),n)}},{key:"opUpdate",value:function(r,n){var i=this.cache.get(r),a=n(i);a===null?this.cache.delete(r):this.cache.set(r,a)}}]),e})(),$a="data-token-hash",un="data-css-hash",cT="data-cache-path",li="__cssinjs_instance__";function uT(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(un,"]"))||[],r=document.head.firstChild;Array.from(t).forEach(function(i){i[li]=i[li]||e,i[li]===e&&document.head.insertBefore(i,r)});var n={};Array.from(document.querySelectorAll("style[".concat(un,"]"))).forEach(function(i){var a=i.getAttribute(un);if(n[a]){if(i[li]===e){var s;(s=i.parentNode)===null||s===void 0||s.removeChild(i)}}else n[a]=!0})}return new lT(e)}var ss=C.createContext({hashPriority:"low",cache:uT(),defaultCache:!0});function dT(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Wh=(function(){function e(){$r(this,e),Se(this,"cache",void 0),Se(this,"keys",void 0),Se(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Lr(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(r){var n,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s={map:this.cache};return r.forEach(function(l){if(!s)s=void 0;else{var c;s=(c=s)===null||c===void 0||(c=c.map)===null||c===void 0?void 0:c.get(l)}}),(n=s)!==null&&n!==void 0&&n.value&&a&&(s.value[1]=this.cacheCallTimes++),(i=s)===null||i===void 0?void 0:i.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var i=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(d,u){var f=Ee(d,2),h=f[1];return i.internalGet(u)[1]<h?[u,i.internalGet(u)[1]]:d},[this.keys[0],this.cacheCallTimes]),s=Ee(a,1),l=s[0];this.delete(l)}this.keys.push(r)}var c=this.cache;r.forEach(function(d,u){if(u===r.length-1)c.set(d,{value:[n,i.cacheCallTimes++]});else{var f=c.get(d);f?f.map||(f.map=new Map):c.set(d,{map:new Map}),c=c.get(d).map}})}},{key:"deleteByPath",value:function(r,n){var i=r.get(n[0]);if(n.length===1){var a;return i.map?r.set(n[0],{map:i.map}):r.delete(n[0]),(a=i.value)===null||a===void 0?void 0:a[0]}var s=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&r.delete(n[0]),s}},{key:"delete",value:function(r){if(this.has(r))return this.keys=this.keys.filter(function(n){return!dT(n,r)}),this.deleteByPath(this.cache,r)}}]),e})();Se(Wh,"MAX_CACHE_SIZE",20);Se(Wh,"MAX_CACHE_OFFSET",5);var Av=0,Bw=(function(){function e(t){$r(this,e),Se(this,"derivatives",void 0),Se(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Av,t.length===0&&bo(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Av+=1}return Lr(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,i){return i(r,n)},void 0)}}]),e})(),Qu=new Wh;function wp(e){var t=Array.isArray(e)?e:[e];return Qu.has(t)||Qu.set(t,new Bw(t)),Qu.get(t)}var fT=new WeakMap,Ju={};function pT(e,t){for(var r=fT,n=0;n<t.length;n+=1){var i=t[n];r.has(i)||r.set(i,new WeakMap),r=r.get(i)}return r.has(Ju)||r.set(Ju,e()),r.get(Ju)}var Nv=new WeakMap;function ka(e){var t=Nv.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof Bw?t+=n.id:n&&He(n)==="object"?t+=ka(n):t+=n}),t=Ba(t),Nv.set(e,t)),t}function Dv(e,t){return Ba("".concat(t,"_").concat(ka(e)))}var Cp=or();function Qe(e){return typeof e=="number"?"".concat(e,"px"):e}var El=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},hT=function(t,r,n){return Object.keys(t).length?".".concat(r).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(t).map(function(i){var a=Ee(i,2),s=a[0],l=a[1];return"".concat(s,":").concat(l,";")}).join(""),"}"):""},$w=function(t,r,n){var i={},a={};return Object.entries(t).forEach(function(s){var l,c,d=Ee(s,2),u=d[0],f=d[1];if(n!=null&&(l=n.preserve)!==null&&l!==void 0&&l[u])a[u]=f;else if((typeof f=="string"||typeof f=="number")&&!(n!=null&&(c=n.ignore)!==null&&c!==void 0&&c[u])){var h,m=El(u,n?.prefix);i[m]=typeof f=="number"&&!(n!=null&&(h=n.unitless)!==null&&h!==void 0&&h[u])?"".concat(f,"px"):String(f),a[u]="var(".concat(m,")")}}),[a,hT(i,r,{scope:n?.scope})]},mT=xe({},C),_v=mT.useInsertionEffect,gT=function(t,r,n){C.useMemo(t,n),pt(function(){return r(!0)},n)},vT=_v?function(e,t,r){return _v(function(){return e(),t()},r)}:gT,yT=xe({},C),xT=yT.useInsertionEffect,bT=function(t){var r=[],n=!1;function i(a){if(n){process.env.NODE_ENV!=="production"&&bo(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}r.push(a)}return C.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(a){return a()})}},t),i},wT=function(){return function(t){t()}},CT=typeof xT<"u"?bT:wT;function ST(){return!1}var Sp=!1;function jT(){return Sp}const ET=process.env.NODE_ENV==="production"?ST:jT;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var Ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(Ws&&typeof Ws.webpackHotUpdate=="function"){var PT=Ws.webpackHotUpdate;Ws.webpackHotUpdate=function(){return Sp=!0,setTimeout(function(){Sp=!1},0),PT.apply(void 0,arguments)}}}function Uh(e,t,r,n,i){var a=C.useContext(ss),s=a.cache,l=[e].concat(Wt(t)),c=bp(l),d=CT([c]),u=ET(),f=function(x){s.opUpdate(c,function(y){var w=y||[void 0,void 0],b=Ee(w,2),E=b[0],P=E===void 0?0:E,j=b[1],S=j;process.env.NODE_ENV!=="production"&&j&&u&&(n?.(S,u),S=null);var O=S||r(),k=[P,O];return x?x(k):k})};C.useMemo(function(){f()},[c]);var h=s.opGet(c);process.env.NODE_ENV!=="production"&&!h&&(f(),h=s.opGet(c));var m=h[1];return vT(function(){i?.(m)},function(g){return f(function(x){var y=Ee(x,2),w=y[0],b=y[1];return g&&w===0&&i?.(m),[w+1,b]}),function(){s.opUpdate(c,function(x){var y=x||[],w=Ee(y,2),b=w[0],E=b===void 0?0:b,P=w[1],j=E-1;return j===0?(d(function(){(g||!s.opGet(c))&&n?.(P,!1)}),null):[E-1,P]})}},[c]),m}var OT={},kT=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",ki=new Map;function TT(e){ki.set(e,(ki.get(e)||0)+1)}function IT(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat($a,'="').concat(e,'"]'));r.forEach(function(n){if(n[li]===t){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var MT=0;function RT(e,t){ki.set(e,(ki.get(e)||0)-1);var r=new Set;ki.forEach(function(n,i){n<=0&&r.add(i)}),ki.size-r.size>MT&&r.forEach(function(n){IT(n,t),ki.delete(n)})}var AT=function(t,r,n,i){var a=n.getDerivativeToken(t),s=xe(xe({},a),r);return i&&(s=i(s)),s},NT="token";function DT(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=v.useContext(ss),i=n.cache.instanceId,a=n.container,s=r.salt,l=s===void 0?"":s,c=r.override,d=c===void 0?OT:c,u=r.formatToken,f=r.getComputedToken,h=r.cssVar,m=pT(function(){return Object.assign.apply(Object,[{}].concat(Wt(t)))},t),g=ka(m),x=ka(d),y=h?ka(h):"",w=Uh(NT,[l,e.id,g,x,y],function(){var b,E=f?f(m,d,e):AT(m,d,e,u),P=xe({},E),j="";if(h){var S=$w(E,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),O=Ee(S,2);E=O[0],j=O[1]}var k=Dv(E,l);E._tokenKey=k,P._tokenKey=Dv(P,l);var I=(b=h?.key)!==null&&b!==void 0?b:k;E._themeKey=I,TT(I);var _="".concat(kT,"-").concat(Ba(k));return E._hashId=_,[E,_,P,j,h?.key||""]},function(b){RT(b[0]._themeKey,i)},function(b){var E=Ee(b,4),P=E[0],j=E[3];if(h&&j){var S=Tn(j,Ba("css-variables-".concat(P._themeKey)),{mark:un,prepend:"queue",attachTo:a,priority:-999});S[li]=i,S.setAttribute($a,P._themeKey)}});return w}var _T={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Lw="comm",zw="rule",Fw="decl",BT="@import",$T="@namespace",LT="@keyframes",zT="@layer",Vw=Math.abs,Kh=String.fromCharCode;function Hw(e){return e.trim()}function Pl(e,t,r){return e.replace(t,r)}function FT(e,t,r){return e.indexOf(t,r)}function go(e,t){return e.charCodeAt(t)|0}function So(e,t,r){return e.slice(t,r)}function ln(e){return e.length}function VT(e){return e.length}function Us(e,t){return t.push(e),e}var $c=1,jo=1,Ww=0,Nr=0,Et=0,$o="";function qh(e,t,r,n,i,a,s,l){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:$c,column:jo,length:s,return:"",siblings:l}}function HT(){return Et}function WT(){return Et=Nr>0?go($o,--Nr):0,jo--,Et===10&&(jo=1,$c--),Et}function Xr(){return Et=Nr<Ww?go($o,Nr++):0,jo++,Et===10&&(jo=1,$c++),Et}function ci(){return go($o,Nr)}function Ol(){return Nr}function Lc(e,t){return So($o,e,t)}function La(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function UT(e){return $c=jo=1,Ww=ln($o=e),Nr=0,[]}function KT(e){return $o="",e}function ed(e){return Hw(Lc(Nr-1,jp(e===91?e+2:e===40?e+1:e)))}function qT(e){for(;(Et=ci())&&Et<33;)Xr();return La(e)>2||La(Et)>3?"":" "}function YT(e,t){for(;--t&&Xr()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return Lc(e,Ol()+(t<6&&ci()==32&&Xr()==32))}function jp(e){for(;Xr();)switch(Et){case e:return Nr;case 34:case 39:e!==34&&e!==39&&jp(Et);break;case 40:e===41&&jp(e);break;case 92:Xr();break}return Nr}function GT(e,t){for(;Xr()&&e+Et!==57;)if(e+Et===84&&ci()===47)break;return"/*"+Lc(t,Nr-1)+"*"+Kh(e===47?e:Xr())}function XT(e){for(;!La(ci());)Xr();return Lc(e,Nr)}function ZT(e){return KT(kl("",null,null,null,[""],e=UT(e),0,[0],e))}function kl(e,t,r,n,i,a,s,l,c){for(var d=0,u=0,f=s,h=0,m=0,g=0,x=1,y=1,w=1,b=0,E="",P=i,j=a,S=n,O=E;y;)switch(g=b,b=Xr()){case 40:if(g!=108&&go(O,f-1)==58){FT(O+=Pl(ed(b),"&","&\f"),"&\f",Vw(d?l[d-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:O+=ed(b);break;case 9:case 10:case 13:case 32:O+=qT(g);break;case 92:O+=YT(Ol()-1,7);continue;case 47:switch(ci()){case 42:case 47:Us(QT(GT(Xr(),Ol()),t,r,c),c),(La(g||1)==5||La(ci()||1)==5)&&ln(O)&&So(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*x:l[d++]=ln(O)*w;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:w==-1&&(O=Pl(O,/\f/g,"")),m>0&&(ln(O)-f||x===0&&g===47)&&Us(m>32?$v(O+";",n,r,f-1,c):$v(Pl(O," ","")+";",n,r,f-2,c),c);break;case 59:O+=";";default:if(Us(S=Bv(O,t,r,d,u,i,l,E,P=[],j=[],f,a),a),b===123)if(u===0)kl(O,t,S,S,P,a,f,l,j);else{switch(h){case 99:if(go(O,3)===110)break;case 108:if(go(O,2)===97)break;default:u=0;case 100:case 109:case 115:}u?kl(e,S,S,n&&Us(Bv(e,S,S,0,0,i,l,E,i,P=[],f,j),j),i,j,f,l,n?P:j):kl(O,S,S,S,[""],j,0,l,j)}}d=u=m=0,x=w=1,E=O="",f=s;break;case 58:f=1+ln(O),m=g;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&WT()==125)continue}switch(O+=Kh(b),b*x){case 38:w=u>0?1:(O+="\f",-1);break;case 44:l[d++]=(ln(O)-1)*w,w=1;break;case 64:ci()===45&&(O+=ed(Xr())),h=ci(),u=f=ln(E=O+=XT(Ol())),b++;break;case 45:g===45&&ln(O)==2&&(x=0)}}return a}function Bv(e,t,r,n,i,a,s,l,c,d,u,f){for(var h=i-1,m=i===0?a:[""],g=VT(m),x=0,y=0,w=0;x<n;++x)for(var b=0,E=So(e,h+1,h=Vw(y=s[x])),P=e;b<g;++b)(P=Hw(y>0?m[b]+" "+E:Pl(E,/&\f/g,m[b])))&&(c[w++]=P);return qh(e,t,r,i===0?zw:l,c,d,u,f)}function QT(e,t,r,n){return qh(e,t,r,Lw,Kh(HT()),So(e,2,-2),0,n)}function $v(e,t,r,n,i){return qh(e,t,r,Fw,So(e,0,n),So(e,n+1,-1),n,i)}function Ep(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function JT(e,t,r,n){switch(e.type){case zT:if(e.children.length)break;case BT:case $T:case Fw:return e.return=e.return||e.value;case Lw:return"";case LT:return e.return=e.value+"{"+Ep(e.children,n)+"}";case zw:if(!ln(e.value=e.props.join(",")))return""}return ln(r=Ep(e.children,n))?e.return=e.value+"{"+r+"}":""}function Uw(e,t){var r=t.path,n=t.parentSelectors;$n(!1,"[Ant Design CSS-in-JS] ".concat(r?"Error in ".concat(r,": "):"").concat(e).concat(n.length?" Selector: ".concat(n.join(" | ")):""))}var eI=function(t,r,n){if(t==="content"){var i=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof r!="string"||a.indexOf(r)===-1&&!i.test(r)&&(r.charAt(0)!==r.charAt(r.length-1)||r.charAt(0)!=='"'&&r.charAt(0)!=="'"))&&Uw("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(r,"\"'`."),n)}},tI=function(t,r,n){t==="animation"&&n.hashId&&r!=="none"&&Uw("You seem to be using hashed animation '".concat(r,"', in which case 'animationName' with Keyframe as value is recommended."),n)},Lv="data-ant-cssinjs-cache-path",Kw="_FILE_STYLE__",Ai,qw=!0;function rI(){if(!Ai&&(Ai={},or())){var e=document.createElement("div");e.className=Lv,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(i){var a=i.split(":"),s=Ee(a,2),l=s[0],c=s[1];Ai[l]=c});var r=document.querySelector("style[".concat(Lv,"]"));if(r){var n;qw=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function nI(e){return rI(),!!Ai[e]}function iI(e){var t=Ai[e],r=null;if(t&&or())if(qw)r=Kw;else{var n=document.querySelector("style[".concat(un,'="').concat(Ai[e],'"]'));n?r=n.innerHTML:delete Ai[e]}return[r,t]}var Yw="_skip_check_",Gw="_multi_value_";function td(e){var t=Ep(ZT(e),JT);return t.replace(/\{%%%\:[^;];}/g,";")}function oI(e){return He(e)==="object"&&e&&(Yw in e||Gw in e)}function zv(e,t,r){if(!t)return e;var n=".".concat(t),i=r==="low"?":where(".concat(n,")"):n,a=e.split(",").map(function(s){var l,c=s.trim().split(/\s+/),d=c[0]||"",u=((l=d.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return d="".concat(u).concat(i).concat(d.slice(u.length)),[d].concat(Wt(c.slice(1))).join(" ")});return a.join(",")}var aI=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,a=n.injectHash,s=n.parentSelectors,l=r.hashId,c=r.layer,d=r.path,u=r.hashPriority,f=r.transformers,h=f===void 0?[]:f,m=r.linters,g=m===void 0?[]:m,x="",y={};function w(P){var j=P.getName(l);if(!y[j]){var S=e(P.style,r,{root:!1,parentSelectors:s}),O=Ee(S,1),k=O[0];y[j]="@keyframes ".concat(P.getName(l)).concat(k)}}function b(P){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return P.forEach(function(S){Array.isArray(S)?b(S,j):S&&j.push(S)}),j}var E=b(Array.isArray(t)?t:[t]);return E.forEach(function(P){var j=typeof P=="string"&&!i?{}:P;if(typeof j=="string")x+="".concat(j,`
|
|
83
|
-
`);else if(j._keyframe)w(j);else{var S=h.reduce(function(O,k){var I;return(k==null||(I=k.visit)===null||I===void 0?void 0:I.call(k,O))||O},j);Object.keys(S).forEach(function(O){var k=S[O];if(He(k)==="object"&&k&&(O!=="animationName"||!k._keyframe)&&!oI(k)){var I=!1,_=O.trim(),$=!1;(i||a)&&l?_.startsWith("@")?I=!0:_==="&"?_=zv("",l,u):_=zv(O,l,u):i&&!l&&(_==="&"||_==="")&&(_="",$=!0);var R=e(k,r,{root:$,injectHash:I,parentSelectors:[].concat(Wt(s),[_])}),z=Ee(R,2),F=z[0],M=z[1];y=xe(xe({},y),M),x+="".concat(_).concat(F)}else{let T=function(N,U){process.env.NODE_ENV!=="production"&&(He(k)!=="object"||!(k!=null&&k[Yw]))&&[eI,tI].concat(Wt(g)).forEach(function(K){return K(N,U,{path:d,hashId:l,parentSelectors:s})});var H=N.replace(/[A-Z]/g,function(K){return"-".concat(K.toLowerCase())}),V=U;!_T[N]&&typeof V=="number"&&V!==0&&(V="".concat(V,"px")),N==="animationName"&&U!==null&&U!==void 0&&U._keyframe&&(w(U),V=U.getName(l)),x+="".concat(H,":").concat(V,";")};var D,A=(D=k?.value)!==null&&D!==void 0?D:k;He(k)==="object"&&k!==null&&k!==void 0&&k[Gw]&&Array.isArray(A)?A.forEach(function(N){T(O,N)}):T(O,A)}})}}),i?c&&(x&&(x="@layer ".concat(c.name," {").concat(x,"}")),c.dependencies&&(y["@layer ".concat(c.name)]=c.dependencies.map(function(P){return"@layer ".concat(P,", ").concat(c.name,";")}).join(`
|
|
84
|
-
`))):x="{".concat(x,"}"),[x,y]};function Xw(e,t){return Ba("".concat(e.join("%")).concat(t))}function sI(){return null}var lI="style";function Pp(e,t){var r=e.token,n=e.path,i=e.hashId,a=e.layer,s=e.nonce,l=e.clientOnly,c=e.order,d=c===void 0?0:c,u=C.useContext(ss),f=u.autoClear,h=u.mock,m=u.defaultCache,g=u.hashPriority,x=u.container,y=u.ssrInline,w=u.transformers,b=u.linters,E=u.cache,P=u.layer,j=r._tokenKey,S=[j];P&&S.push("layer"),S.push.apply(S,Wt(n));var O=Cp;process.env.NODE_ENV!=="production"&&h!==void 0&&(O=h==="client");var k=Uh(lI,S,function(){var z=S.join("|");if(nI(z)){var F=iI(z),M=Ee(F,2),D=M[0],A=M[1];if(D)return[D,j,A,{},l,d]}var T=t(),N=aI(T,{hashId:i,hashPriority:g,layer:P?a:void 0,path:n.join("-"),transformers:w,linters:b}),U=Ee(N,2),H=U[0],V=U[1],K=td(H),oe=Xw(S,K);return[K,j,oe,V,l,d]},function(z,F){var M=Ee(z,3),D=M[2];(F||f)&&Cp&&Aa(D,{mark:un,attachTo:x})},function(z){var F=Ee(z,4),M=F[0],D=F[2],A=F[3];if(O&&M!==Kw){var T={mark:un,prepend:P?!1:"queue",attachTo:x,priority:d},N=typeof s=="function"?s():s;N&&(T.csp={nonce:N});var U=[],H=[];Object.keys(A).forEach(function(K){K.startsWith("@layer")?U.push(K):H.push(K)}),U.forEach(function(K){Tn(td(A[K]),"_layer-".concat(K),xe(xe({},T),{},{prepend:!0}))});var V=Tn(M,D,T);V[li]=E.instanceId,V.setAttribute($a,j),process.env.NODE_ENV!=="production"&&V.setAttribute(cT,S.join("|")),H.forEach(function(K){Tn(td(A[K]),"_effect-".concat(K),T)})}}),I=Ee(k,3),_=I[0],$=I[1],R=I[2];return function(z){var F;return!y||O||!m?F=C.createElement(sI,null):F=C.createElement("style",Nt({},Se(Se({},$a,$),un,R),{dangerouslySetInnerHTML:{__html:_}})),C.createElement(C.Fragment,null,F,z)}}var cI="cssVar",uI=function(t,r){var n=t.key,i=t.prefix,a=t.unitless,s=t.ignore,l=t.token,c=t.scope,d=c===void 0?"":c,u=v.useContext(ss),f=u.cache.instanceId,h=u.container,m=l._tokenKey,g=[].concat(Wt(t.path),[n,d,m]),x=Uh(cI,g,function(){var y=r(),w=$w(y,n,{prefix:i,unitless:a,ignore:s,scope:d}),b=Ee(w,2),E=b[0],P=b[1],j=Xw(g,P);return[E,P,j,n]},function(y){var w=Ee(y,3),b=w[2];Cp&&Aa(b,{mark:un,attachTo:h})},function(y){var w=Ee(y,3),b=w[1],E=w[2];if(b){var P=Tn(b,E,{mark:un,prepend:"queue",attachTo:h,priority:-999});P[li]=f,P.setAttribute($a,n)}});return x},zr=(function(){function e(t,r){$r(this,e),Se(this,"name",void 0),Se(this,"style",void 0),Se(this,"_keyframe",!0),this.name=t,this.style=r}return Lr(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e})();function dI(e){return cw(e)||lw(e)||_h(e)||uw()}function Op(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function Zw(e,t,r,n){if(!t.length)return r;var i=dI(t),a=i[0],s=i.slice(1),l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=Wt(e):l=xe({},e),n&&r===void 0&&s.length===1?delete l[a][s[0]]:l[a]=Zw(l[a],s,r,n),l}function rd(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!Op(e,t.slice(0,-1))?e:Zw(e,t,r,n)}function fI(e){return He(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Fv(e){return Array.isArray(e)?[]:{}}var pI=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function hI(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Fv(t[0]);return t.forEach(function(i){function a(s,l){var c=new Set(l),d=Op(i,s),u=Array.isArray(d);if(u||fI(d)){if(!c.has(d)){c.add(d);var f=Op(n,s);u?n=rd(n,s,[]):(!f||He(f)!=="object")&&(n=rd(n,s,Fv(d))),pI(d).forEach(function(h){a([].concat(Wt(s),[h]),c)})}}else n=rd(n,s,d)}a([])}),n}function Qw(){}let Cn=null;function mI(){Cn=null,xw()}let Jw=Qw;process.env.NODE_ENV!=="production"&&(Jw=(e,t,r)=>{$n(e,`[antd: ${t}] ${r}`),process.env.NODE_ENV==="test"&&mI()});const ls=Jw,eC=C.createContext({}),hn=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=C.useContext(eC),r=(n,i,a)=>{if(!n)if(t===!1&&i==="deprecated"){const s=Cn;Cn||(Cn={}),Cn[e]=Cn[e]||[],Cn[e].includes(a||"")||Cn[e].push(a||""),s||console.warn("[antd] There exists deprecated usage in your code:",Cn)}else process.env.NODE_ENV!=="production"&&ls(n,e,a)};return r.deprecated=(n,i,a,s)=>{r(n,"deprecated",`\`${i}\` is deprecated. Please use \`${a}\` instead.${s?` ${s}`:""}`)},r}:()=>{const e=()=>{};return e.deprecated=Qw,e},gI=v.createContext(void 0);var vI={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},yI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},xI=xe(xe({},yI),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const tC={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Vv={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},xI),timePickerLocale:Object.assign({},tC)},hr="${label} is not a valid ${type}",Eo={locale:"en",Pagination:vI,DatePicker:Vv,TimePicker:tC,Calendar:Vv,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:hr,method:hr,array:hr,object:hr,number:hr,date:hr,boolean:hr,integer:hr,float:hr,regexp:hr,email:hr,url:hr,hex:hr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},Eo.Modal);let Tl=[];const Hv=()=>Tl.reduce((e,t)=>Object.assign(Object.assign({},e),t),Eo.Modal);function bI(e){if(e){const t=Object.assign({},e);return Tl.push(t),Hv(),()=>{Tl=Tl.filter(r=>r!==t),Hv()}}Object.assign({},Eo.Modal)}const Yh=v.createContext(void 0),wI=(e,t)=>{const r=C.useContext(Yh),n=C.useMemo(()=>{var a;const s=Eo[e],l=(a=r?.[e])!==null&&a!==void 0?a:{};return Object.assign(Object.assign({},typeof s=="function"?s():s),l||{})},[e,t,r]),i=C.useMemo(()=>{const a=r?.locale;return r?.exist&&!a?Eo.locale:a},[r]);return[n,i]},rC="internalMark",nC=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;if(process.env.NODE_ENV!=="production"){const a=hn("LocaleProvider");process.env.NODE_ENV!=="production"&&a(n===rC,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}C.useEffect(()=>bI(t?.Modal),[t]);const i=C.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return C.createElement(Yh.Provider,{value:i},r)};process.env.NODE_ENV!=="production"&&(nC.displayName="LocaleProvider");const iC={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},za=Object.assign(Object.assign({},iC),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
85
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
86
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});function CI(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:d}=e,u=t(l),f=t(n),h=t(i),m=t(a),g=t(s),x=r(c,d),y=e.colorLink||e.colorInfo,w=t(y),b=new At(m[1]).mix(new At(m[3]),50).toHexString();return Object.assign(Object.assign({},x),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:b,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new At("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const SI=e=>{let t=e,r=e,n=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}};function jI(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1},SI(n))}const EI=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function PI(e){return(e+8)/e}function OI(e){const t=Array.from({length:10}).map((r,n)=>{const i=n-1,a=e*Math.pow(Math.E,i/5),s=n>1?Math.floor(a):Math.ceil(a);return Math.floor(s/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:PI(r)}))}const kI=e=>{const t=OI(e),r=t.map(u=>u.size),n=t.map(u=>u.lineHeight),i=r[1],a=r[0],s=r[2],l=n[1],c=n[0],d=n[2];return{fontSizeSM:a,fontSize:i,fontSizeLG:s,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:l,lineHeightLG:d,lineHeightSM:c,fontHeight:Math.round(l*i),fontHeightLG:Math.round(d*s),fontHeightSM:Math.round(c*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function TI(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const Or=(e,t)=>new At(e).setA(t).toRgbString(),da=(e,t)=>new At(e).darken(t).toHexString(),II=e=>{const t=Ra(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},MI=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Or(n,.88),colorTextSecondary:Or(n,.65),colorTextTertiary:Or(n,.45),colorTextQuaternary:Or(n,.25),colorFill:Or(n,.15),colorFillSecondary:Or(n,.06),colorFillTertiary:Or(n,.04),colorFillQuaternary:Or(n,.02),colorBgSolid:Or(n,1),colorBgSolidHover:Or(n,.75),colorBgSolidActive:Or(n,.95),colorBgLayout:da(r,4),colorBgContainer:da(r,0),colorBgElevated:da(r,0),colorBgSpotlight:Or(n,.85),colorBgBlur:"transparent",colorBorder:da(r,15),colorBorderSecondary:da(r,6)}};function RI(e){Gu.pink=Gu.magenta,Xu.pink=Xu.magenta;const t=Object.keys(iC).map(r=>{const n=e[r]===Gu[r]?Xu[r]:Ra(e[r]);return Array.from({length:10},()=>1).reduce((i,a,s)=>(i[`${r}-${s+1}`]=n[s],i[`${r}${s+1}`]=n[s],i),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),CI(e,{generateColorPalettes:II,generateNeutralColorPalettes:MI})),kI(e.fontSize)),TI(e)),EI(e)),jI(e))}const oC=wp(RI),kp={token:za,override:{override:za},hashed:!0},aC=v.createContext(kp),Tp="ant",Gh="anticon",AI=["outlined","borderless","filled","underlined"],NI=(e,t)=>t||(e?`${Tp}-${e}`:Tp),Rn=C.createContext({getPrefixCls:NI,iconPrefixCls:Gh}),Wv={};function zc(e){const t=C.useContext(Rn),{getPrefixCls:r,direction:n,getPopupContainer:i}=t,a=t[e];return Object.assign(Object.assign({classNames:Wv,styles:Wv},a),{getPrefixCls:r,direction:n,getPopupContainer:i})}const DI=`-ant-${Date.now()}-${Math.random()}`;function _I(e,t){const r={},n=(s,l)=>{let c=s.clone();return c=l?.(c)||c,c.toRgbString()},i=(s,l)=>{const c=new At(s),d=Ra(c.toRgbString());r[`${l}-color`]=n(c),r[`${l}-color-disabled`]=d[1],r[`${l}-color-hover`]=d[4],r[`${l}-color-active`]=d[6],r[`${l}-color-outline`]=c.clone().setA(.2).toRgbString(),r[`${l}-color-deprecated-bg`]=d[0],r[`${l}-color-deprecated-border`]=d[2]};if(t.primaryColor){i(t.primaryColor,"primary");const s=new At(t.primaryColor),l=Ra(s.toRgbString());l.forEach((d,u)=>{r[`primary-${u+1}`]=d}),r["primary-color-deprecated-l-35"]=n(s,d=>d.lighten(35)),r["primary-color-deprecated-l-20"]=n(s,d=>d.lighten(20)),r["primary-color-deprecated-t-20"]=n(s,d=>d.tint(20)),r["primary-color-deprecated-t-50"]=n(s,d=>d.tint(50)),r["primary-color-deprecated-f-12"]=n(s,d=>d.setA(d.a*.12));const c=new At(l[0]);r["primary-color-active-deprecated-f-30"]=n(c,d=>d.setA(d.a*.3)),r["primary-color-active-deprecated-d-02"]=n(c,d=>d.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
|
|
87
|
-
:root {
|
|
88
|
-
${Object.keys(r).map(s=>`--${e}-${s}: ${r[s]};`).join(`
|
|
89
|
-
`)}
|
|
90
|
-
}
|
|
91
|
-
`.trim()}function BI(e,t){const r=_I(e,t);or()?Tn(r,`${DI}-dynamic-theme`):process.env.NODE_ENV!=="production"&&ls(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Fa=C.createContext(!1),$I=({children:e,disabled:t})=>{const r=C.useContext(Fa);return C.createElement(Fa.Provider,{value:t??r},e)},Po=C.createContext(void 0),LI=({children:e,size:t})=>{const r=C.useContext(Po);return C.createElement(Po.Provider,{value:t||r},e)};function zI(){const e=v.useContext(Fa),t=v.useContext(Po);return{componentDisabled:e,componentSize:t}}var sC=Lr(function e(){$r(this,e)}),lC="CALC_UNIT",FI=new RegExp(lC,"g");function nd(e){return typeof e=="number"?"".concat(e).concat(lC):e}var VI=(function(e){os(r,e);var t=as(r);function r(n,i){var a;$r(this,r),a=t.call(this),Se(Oa(a),"result",""),Se(Oa(a),"unitlessCssVar",void 0),Se(Oa(a),"lowPriority",void 0);var s=He(n);return a.unitlessCssVar=i,n instanceof r?a.result="(".concat(n.result,")"):s==="number"?a.result=nd(n):s==="string"&&(a.result=n),a}return Lr(r,[{key:"add",value:function(i){return i instanceof r?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(nd(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof r?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(nd(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var a=this,s=i||{},l=s.unit,c=!0;return typeof l=="boolean"?c=l:Array.from(this.unitlessCssVar).some(function(d){return a.result.includes(d)})&&(c=!1),this.result=this.result.replace(FI,c?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(sC),HI=(function(e){os(r,e);var t=as(r);function r(n){var i;return $r(this,r),i=t.call(this),Se(Oa(i),"result",0),n instanceof r?i.result=n.result:typeof n=="number"&&(i.result=n),i}return Lr(r,[{key:"add",value:function(i){return i instanceof r?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof r?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof r?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof r?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),r})(sC),WI=function(t,r){var n=t==="css"?VI:HI;return function(i){return new n(i,r)}},Uv=function(t,r){return"".concat([r,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Kv(e,t,r,n){var i=xe({},t[e]);if(n!=null&&n.deprecatedTokens){var a=n.deprecatedTokens;a.forEach(function(l){var c=Ee(l,2),d=c[0],u=c[1];if(process.env.NODE_ENV!=="production"&&$n(!(i!=null&&i[d]),"Component Token `".concat(String(d),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),i!=null&&i[d]||i!=null&&i[u]){var f;(f=i[u])!==null&&f!==void 0||(i[u]=i?.[d])}})}var s=xe(xe({},r),i);return Object.keys(s).forEach(function(l){s[l]===t[l]&&delete s[l]}),s}var cC=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Ip=!0;function zn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!cC)return Object.assign.apply(Object,[{}].concat(t));Ip=!1;var n={};return t.forEach(function(i){if(He(i)==="object"){var a=Object.keys(i);a.forEach(function(s){Object.defineProperty(n,s,{configurable:!0,enumerable:!0,get:function(){return i[s]}})})}}),Ip=!0,n}var qv={};function UI(){}var KI=function(t){var r,n=t,i=UI;return cC&&typeof Proxy<"u"&&(r=new Set,n=new Proxy(t,{get:function(s,l){if(Ip){var c;(c=r)===null||c===void 0||c.add(l)}return s[l]}}),i=function(s,l){var c;qv[s]={global:Array.from(r),component:xe(xe({},(c=qv[s])===null||c===void 0?void 0:c.component),l)}}),{token:n,keys:r,flush:i}};function Yv(e,t,r){if(typeof r=="function"){var n;return r(zn(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}function qI(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"max(".concat(n.map(function(a){return Qe(a)}).join(","),")")},min:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"min(".concat(n.map(function(a){return Qe(a)}).join(","),")")}}}var YI=1e3*60*10,GI=(function(){function e(){$r(this,e),Se(this,"map",new Map),Se(this,"objectIDMap",new WeakMap),Se(this,"nextID",0),Se(this,"lastAccessBeat",new Map),Se(this,"accessBeat",0)}return Lr(e,[{key:"set",value:function(r,n){this.clear();var i=this.getCompositeKey(r);this.map.set(i,n),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(r){var n=this.getCompositeKey(r),i=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(r){var n=this,i=r.map(function(a){return a&&He(a)==="object"?"obj_".concat(n.getObjectID(a)):"".concat(He(a),"_").concat(a)});return i.join("|")}},{key:"getObjectID",value:function(r){if(this.objectIDMap.has(r))return this.objectIDMap.get(r);var n=this.nextID;return this.objectIDMap.set(r,n),this.nextID+=1,n}},{key:"clear",value:function(){var r=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(i,a){n-i>YI&&(r.map.delete(a),r.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),Gv=new GI;function XI(e,t){return v.useMemo(function(){var r=Gv.get(t);if(r)return r;var n=e();return Gv.set(t,n),n},t)}var ZI=function(){return{}};function QI(e){var t=e.useCSP,r=t===void 0?ZI:t,n=e.useToken,i=e.usePrefix,a=e.getResetStyles,s=e.getCommonStyle,l=e.getCompUnitless;function c(h,m,g,x){var y=Array.isArray(h)?h[0]:h;function w(k){return"".concat(String(y)).concat(k.slice(0,1).toUpperCase()).concat(k.slice(1))}var b=x?.unitless||{},E=typeof l=="function"?l(h):{},P=xe(xe({},E),{},Se({},w("zIndexPopup"),!0));Object.keys(b).forEach(function(k){P[w(k)]=b[k]});var j=xe(xe({},x),{},{unitless:P,prefixToken:w}),S=u(h,m,g,j),O=d(y,g,j);return function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,_=S(k,I),$=Ee(_,2),R=$[1],z=O(I),F=Ee(z,2),M=F[0],D=F[1];return[M,R,D]}}function d(h,m,g){var x=g.unitless,y=g.injectStyle,w=y===void 0?!0:y,b=g.prefixToken,E=g.ignore,P=function(O){var k=O.rootCls,I=O.cssVar,_=I===void 0?{}:I,$=n(),R=$.realToken;return uI({path:[h],prefix:_.prefix,key:_.key,unitless:x,ignore:E,token:R,scope:k},function(){var z=Yv(h,R,m),F=Kv(h,R,z,{deprecatedTokens:g?.deprecatedTokens});return Object.keys(z).forEach(function(M){F[b(M)]=F[M],delete F[M]}),F}),null},j=function(O){var k=n(),I=k.cssVar;return[function(_){return w&&I?v.createElement(v.Fragment,null,v.createElement(P,{rootCls:O,cssVar:I,component:h}),_):_},I?.key]};return j}function u(h,m,g){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(h)?h:[h,h],w=Ee(y,1),b=w[0],E=y.join("-"),P=e.layer||{name:"antd"};return function(j){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j,O=n(),k=O.theme,I=O.realToken,_=O.hashId,$=O.token,R=O.cssVar,z=i(),F=z.rootPrefixCls,M=z.iconPrefixCls,D=r(),A=R?"css":"js",T=XI(function(){var oe=new Set;return R&&Object.keys(x.unitless||{}).forEach(function(pe){oe.add(El(pe,R.prefix)),oe.add(El(pe,Uv(b,R.prefix)))}),WI(A,oe)},[A,b,R?.prefix]),N=qI(A),U=N.max,H=N.min,V={theme:k,token:$,hashId:_,nonce:function(){return D.nonce},clientOnly:x.clientOnly,layer:P,order:x.order||-999};typeof a=="function"&&Pp(xe(xe({},V),{},{clientOnly:!1,path:["Shared",F]}),function(){return a($,{prefix:{rootPrefixCls:F,iconPrefixCls:M},csp:D})});var K=Pp(xe(xe({},V),{},{path:[E,j,M]}),function(){if(x.injectStyle===!1)return[];var oe=KI($),pe=oe.token,ve=oe.flush,Ce=Yv(b,I,g),Pe=".".concat(j),J=Kv(b,I,Ce,{deprecatedTokens:x.deprecatedTokens});R&&Ce&&He(Ce)==="object"&&Object.keys(Ce).forEach(function(ae){Ce[ae]="var(".concat(El(ae,Uv(b,R.prefix)),")")});var ye=zn(pe,{componentCls:Pe,prefixCls:j,iconCls:".".concat(M),antCls:".".concat(F),calc:T,max:U,min:H},R?Ce:J),me=m(ye,{hashId:_,prefixCls:j,rootPrefixCls:F,iconPrefixCls:M});ve(b,J);var L=typeof s=="function"?s(ye,j,S,x.resetFont):null;return[x.resetStyle===!1?null:L,me]});return[K,_]}}function f(h,m,g){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=u(h,m,g,xe({resetStyle:!1,order:-998},x)),w=function(E){var P=E.prefixCls,j=E.rootCls,S=j===void 0?P:j;return y(P,S),null};return process.env.NODE_ENV!=="production"&&(w.displayName="SubStyle_".concat(String(Array.isArray(h)?h.join("."):h))),w}return{genStyleHooks:c,genSubStyleComponent:f,genComponentStyleHook:u}}const Ul=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],JI="5.27.1";function id(e){return e>=0&&e<=255}function Ks(e,t){const{r,g:n,b:i,a}=new At(e).toRgb();if(a<1)return e;const{r:s,g:l,b:c}=new At(t).toRgb();for(let d=.01;d<=1;d+=.01){const u=Math.round((r-s*(1-d))/d),f=Math.round((n-l*(1-d))/d),h=Math.round((i-c*(1-d))/d);if(id(u)&&id(f)&&id(h))return new At({r:u,g:f,b:h,a:Math.round(d*100)/100}).toRgbString()}return new At({r,g:n,b:i,a:1}).toRgbString()}var eM=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 uC(e){const{override:t}=e,r=eM(e,["override"]),n=Object.assign({},t);Object.keys(za).forEach(h=>{delete n[h]});const i=Object.assign(Object.assign({},r),n),a=480,s=576,l=768,c=992,d=1200,u=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Ks(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Ks(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Ks(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Ks(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
|
|
92
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
93
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
94
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
95
|
-
`,boxShadowSecondary:`
|
|
96
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
97
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
98
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
99
|
-
`,boxShadowTertiary:`
|
|
100
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
101
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
102
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
103
|
-
`,screenXS:a,screenXSMin:a,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:c-1,screenLG:c,screenLGMin:c,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
104
|
-
0 1px 2px -2px ${new At("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
105
|
-
0 3px 6px 0 ${new At("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
106
|
-
0 5px 12px 4px ${new At("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
107
|
-
`,boxShadowDrawerRight:`
|
|
108
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
109
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
110
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
111
|
-
`,boxShadowDrawerLeft:`
|
|
112
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
113
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
114
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
115
|
-
`,boxShadowDrawerUp:`
|
|
116
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
117
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
118
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
119
|
-
`,boxShadowDrawerDown:`
|
|
120
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
121
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
122
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
123
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var Xv=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 dC={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},tM={motionBase:!0,motionUnit:!0},rM={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},fC=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:i}=t,a=Xv(t,["override"]);let s=Object.assign(Object.assign({},n),{override:i});return s=uC(s),a&&Object.entries(a).forEach(([l,c])=>{const{theme:d}=c,u=Xv(c,["theme"]);let f=u;d&&(f=fC(Object.assign(Object.assign({},s),u),{override:u},d)),s[l]=f}),s};function Lo(){const{token:e,hashed:t,theme:r,override:n,cssVar:i}=v.useContext(aC),a=`${JI}-${t||""}`,s=r||oC,[l,c,d]=DT(s,[za,e],{salt:a,override:n,getComputedToken:fC,formatToken:uC,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:dC,ignore:tM,preserve:rM}});return[s,d,t?c:"",l,i]}const Xh=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),nM=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),iM=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),oM=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),aM=(e,t,r,n)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,a=r?`.${r}`:i,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return n!==!1&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},l),s),{[i]:s})}},sM=(e,t)=>({outline:`${Qe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),lM=(e,t)=>({"&:focus-visible":sM(e,t)}),pC=e=>({[`.${e}`]:Object.assign(Object.assign({},nM()),{[`.${e} .${e}-icon`]:{display:"block"}})}),hC=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},lM(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),{genStyleHooks:cs}=QI({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=v.useContext(Rn);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,i]=Lo();return{theme:e,realToken:t,hashId:r,token:n,cssVar:i}},useCSP:()=>{const{csp:e}=v.useContext(Rn);return e??{}},getResetStyles:(e,t)=>{var r;const n=oM(e);return[n,{"&":n},pC((r=t?.prefix.iconPrefixCls)!==null&&r!==void 0?r:Gh)]},getCommonStyle:aM,getCompUnitless:()=>dC});function cM(e,t){return Ul.reduce((r,n)=>{const i=e[`${n}1`],a=e[`${n}3`],s=e[`${n}6`],l=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:i,lightBorderColor:a,darkColor:s,textColor:l}))},{})}const uM=(e,t)=>{const[r,n]=Lo();return Pp({token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>pC(e))},dM=Object.assign({},C),{useId:Zv}=dM,fM=()=>"",pM=typeof Zv>"u"?fM:Zv;function hM(e,t,r){var n,i;const a=hn("ConfigProvider"),s=e||{},l=s.inherit===!1||!t?Object.assign(Object.assign({},kp),{hashed:(n=t?.hashed)!==null&&n!==void 0?n:kp.hashed,cssVar:t?.cssVar}):t,c=pM();if(process.env.NODE_ENV!=="production"){const d=s.cssVar||l.cssVar,u=!!(typeof s.cssVar=="object"&&(!((i=s.cssVar)===null||i===void 0)&&i.key)||c);process.env.NODE_ENV!=="production"&&a(!d||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return zh(()=>{var d,u;if(!e)return t;const f=Object.assign({},l.components);Object.keys(e.components||{}).forEach(g=>{f[g]=Object.assign(Object.assign({},f[g]),e.components[g])});const h=`css-var-${c.replace(/:/g,"")}`,m=((d=s.cssVar)!==null&&d!==void 0?d:l.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r?.prefixCls},typeof l.cssVar=="object"?l.cssVar:{}),typeof s.cssVar=="object"?s.cssVar:{}),{key:typeof s.cssVar=="object"&&((u=s.cssVar)===null||u===void 0?void 0:u.key)||h});return Object.assign(Object.assign(Object.assign({},l),s),{token:Object.assign(Object.assign({},l.token),s.token),components:f,cssVar:m})},[s,l],(d,u)=>d.some((f,h)=>{const m=u[h];return!aT(f,m,!0)}))}var mM=["children"],mC=C.createContext({});function gM(e){var t=e.children,r=Jr(e,mM);return C.createElement(mC.Provider,{value:r},t)}var vM=(function(e){os(r,e);var t=as(r);function r(){return $r(this,r),t.apply(this,arguments)}return Lr(r,[{key:"render",value:function(){return this.props.children}}]),r})(C.Component);function yM(e){var t=C.useReducer(function(l){return l+1},0),r=Ee(t,2),n=r[1],i=C.useRef(e),a=wr(function(){return i.current}),s=wr(function(l){i.current=typeof l=="function"?l(i.current):l,n()});return[a,s]}var ni="none",qs="appear",Ys="enter",Gs="leave",Qv="none",Yr="prepare",co="start",uo="active",Zh="end",gC="prepared";function Jv(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function xM(e,t){var r={animationend:Jv("Animation","AnimationEnd"),transitionend:Jv("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var bM=xM(or(),typeof window<"u"?window:{}),vC={};if(or()){var wM=document.createElement("div");vC=wM.style}var Xs={};function yC(e){if(Xs[e])return Xs[e];var t=bM[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i<n;i+=1){var a=r[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in vC)return Xs[e]=t[a],Xs[e]}return""}var xC=yC("animationend"),bC=yC("transitionend"),CM=!!(xC&&bC),e0=xC||"animationend",t0=bC||"transitionend";function r0(e,t){if(!e)return null;if(He(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}const SM=(function(e){var t=v.useRef();function r(i){i&&(i.removeEventListener(t0,e),i.removeEventListener(e0,e))}function n(i){t.current&&t.current!==i&&r(t.current),i&&i!==t.current&&(i.addEventListener(t0,e),i.addEventListener(e0,e),t.current=i)}return C.useEffect(function(){return function(){r(t.current)}},[]),[n,r]});var wC=or()?v.useLayoutEffect:v.useEffect,CC=function(t){return+setTimeout(t,16)},SC=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(CC=function(t){return window.requestAnimationFrame(t)},SC=function(t){return window.cancelAnimationFrame(t)});var n0=0,Fc=new Map;function jC(e){Fc.delete(e)}var Oo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;n0+=1;var n=n0;function i(a){if(a===0)jC(n),t();else{var s=CC(function(){i(a-1)});Fc.set(n,s)}}return i(r),n};Oo.cancel=function(e){var t=Fc.get(e);return jC(e),SC(t)};process.env.NODE_ENV!=="production"&&(Oo.ids=function(){return Fc});const jM=(function(){var e=C.useRef(null);function t(){Oo.cancel(e.current)}function r(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Oo(function(){i<=1?n({isCanceled:function(){return a!==e.current}}):r(n,i-1)});e.current=a}return C.useEffect(function(){return function(){t()}},[]),[r,t]});var EM=[Yr,co,uo,Zh],PM=[Yr,gC],EC=!1,OM=!0;function PC(e){return e===uo||e===Zh}const kM=(function(e,t,r){var n=_a(Qv),i=Ee(n,2),a=i[0],s=i[1],l=jM(),c=Ee(l,2),d=c[0],u=c[1];function f(){s(Yr,!0)}var h=t?PM:EM;return wC(function(){if(a!==Qv&&a!==Zh){var m=h.indexOf(a),g=h[m+1],x=r(a);x===EC?s(g,!0):g&&d(function(y){function w(){y.isCanceled()||s(g,!0)}x===!0?w():Promise.resolve(x).then(w)})}},[e,a]),C.useEffect(function(){return function(){u()}},[]),[f,a]});function TM(e,t,r,n){var i=n.motionEnter,a=i===void 0?!0:i,s=n.motionAppear,l=s===void 0?!0:s,c=n.motionLeave,d=c===void 0?!0:c,u=n.motionDeadline,f=n.motionLeaveImmediately,h=n.onAppearPrepare,m=n.onEnterPrepare,g=n.onLeavePrepare,x=n.onAppearStart,y=n.onEnterStart,w=n.onLeaveStart,b=n.onAppearActive,E=n.onEnterActive,P=n.onLeaveActive,j=n.onAppearEnd,S=n.onEnterEnd,O=n.onLeaveEnd,k=n.onVisibleChanged,I=_a(),_=Ee(I,2),$=_[0],R=_[1],z=yM(ni),F=Ee(z,2),M=F[0],D=F[1],A=_a(null),T=Ee(A,2),N=T[0],U=T[1],H=M(),V=v.useRef(!1),K=v.useRef(null);function oe(){return r()}var pe=v.useRef(!1);function ve(){D(ni),U(null,!0)}var Ce=wr(function(W){var ne=M();if(ne!==ni){var re=oe();if(!(W&&!W.deadline&&W.target!==re)){var X=pe.current,te;ne===qs&&X?te=j?.(re,W):ne===Ys&&X?te=S?.(re,W):ne===Gs&&X&&(te=O?.(re,W)),X&&te!==!1&&ve()}}}),Pe=SM(Ce),J=Ee(Pe,1),ye=J[0],me=function(ne){switch(ne){case qs:return Se(Se(Se({},Yr,h),co,x),uo,b);case Ys:return Se(Se(Se({},Yr,m),co,y),uo,E);case Gs:return Se(Se(Se({},Yr,g),co,w),uo,P);default:return{}}},L=C.useMemo(function(){return me(H)},[H]),ae=kM(H,!e,function(W){if(W===Yr){var ne=L[Yr];return ne?ne(oe()):EC}if(he in L){var re;U(((re=L[he])===null||re===void 0?void 0:re.call(L,oe(),null))||null)}return he===uo&&H!==ni&&(ye(oe()),u>0&&(clearTimeout(K.current),K.current=setTimeout(function(){Ce({deadline:!0})},u))),he===gC&&ve(),OM}),q=Ee(ae,2),ue=q[0],he=q[1],we=PC(he);pe.current=we;var je=v.useRef(null);wC(function(){if(!(V.current&&je.current===t)){R(t);var W=V.current;V.current=!0;var ne;!W&&t&&l&&(ne=qs),W&&t&&a&&(ne=Ys),(W&&!t&&d||!W&&f&&!t&&d)&&(ne=Gs);var re=me(ne);ne&&(e||re[Yr])?(D(ne),ue()):D(ni),je.current=t}},[t]),v.useEffect(function(){(H===qs&&!l||H===Ys&&!a||H===Gs&&!d)&&D(ni)},[l,a,d]),v.useEffect(function(){return function(){V.current=!1,clearTimeout(K.current)}},[]);var Te=C.useRef(!1);v.useEffect(function(){$&&(Te.current=!0),$!==void 0&&H===ni&&((Te.current||$)&&k?.($),Te.current=!0)},[$,H]);var Ne=N;return L[Yr]&&he===co&&(Ne=xe({transition:"none"},Ne)),[H,he,Ne,$??t]}function IM(e){var t=e;He(e)==="object"&&(t=e.transitionSupport);function r(i,a){return!!(i.motionName&&t&&a!==!1)}var n=C.forwardRef(function(i,a){var s=i.visible,l=s===void 0?!0:s,c=i.removeOnLeave,d=c===void 0?!0:c,u=i.forceRender,f=i.children,h=i.motionName,m=i.leavedClassName,g=i.eventProps,x=C.useContext(mC),y=x.motion,w=r(i,y),b=v.useRef(),E=v.useRef();function P(){try{return b.current instanceof HTMLElement?b.current:Sl(E.current)}catch{return null}}var j=TM(w,l,P,i),S=Ee(j,4),O=S[0],k=S[1],I=S[2],_=S[3],$=C.useRef(_);_&&($.current=!0);var R=C.useCallback(function(T){b.current=T,Fh(a,T)},[a]),z,F=xe(xe({},g),{},{visible:l});if(!f)z=null;else if(O===ni)_?z=f(xe({},F),R):!d&&$.current&&m?z=f(xe(xe({},F),{},{className:m}),R):u||!d&&!m?z=f(xe(xe({},F),{},{style:{display:"none"}}),R):z=null;else{var M;k===Yr?M="prepare":PC(k)?M="active":k===co&&(M="start");var D=r0(h,"".concat(O,"-").concat(M));z=f(xe(xe({},F),{},{className:_e(r0(h,O),Se(Se({},D,D&&M),h,typeof h=="string")),style:I}),R)}if(C.isValidElement(z)&&_c(z)){var A=Hh(z);A||(z=C.cloneElement(z,{ref:R}))}return C.createElement(vM,{ref:E},z)});return n.displayName="CSSMotion",n}const OC=IM(CM),Mp=C.createContext(!0);process.env.NODE_ENV!=="production"&&(Mp.displayName="MotionCacheContext");function MM(e){const t=C.useContext(Mp),{children:r}=e,[,n]=Lo(),{motion:i}=n,a=C.useRef(!1);return a.current||(a.current=t!==i),a.current?C.createElement(Mp.Provider,{value:i},C.createElement(gM,{motion:i},r)):r}const kC=C.memo(({dropdownMatchSelectWidth:e})=>(hn("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));process.env.NODE_ENV!=="production"&&(kC.displayName="PropWarning");const RM=process.env.NODE_ENV!=="production"?kC:()=>null;var AM=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};let Rp=!1;process.env.NODE_ENV;const NM=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let TC;function DM(){return TC||Tp}function _M(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const BM=e=>{const{prefixCls:t,theme:r}=e;t!==void 0&&(TC=t),r&&_M(r)&&(process.env.NODE_ENV!=="production"&&ls(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),BI(DM(),r))},$M=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:i,anchor:a,form:s,locale:l,componentSize:c,direction:d,space:u,splitter:f,virtual:h,dropdownMatchSelectWidth:m,popupMatchSelectWidth:g,popupOverflow:x,legacyLocale:y,parentContext:w,iconPrefixCls:b,theme:E,componentDisabled:P,segmented:j,statistic:S,spin:O,calendar:k,carousel:I,cascader:_,collapse:$,typography:R,checkbox:z,descriptions:F,divider:M,drawer:D,skeleton:A,steps:T,image:N,layout:U,list:H,mentions:V,modal:K,progress:oe,result:pe,slider:ve,breadcrumb:Ce,menu:Pe,pagination:J,input:ye,textArea:me,empty:L,badge:ae,radio:q,rate:ue,switch:he,transfer:we,avatar:je,message:Te,tag:Ne,table:W,card:ne,tabs:re,timeline:X,timePicker:te,upload:de,notification:Y,tree:Q,colorPicker:Z,datePicker:ce,rangePicker:ie,flex:fe,wave:ge,dropdown:be,warning:Be,tour:se,tooltip:Ie,popover:Fe,popconfirm:Vr,floatButton:rn,floatButtonGroup:Qi,variant:Xo,inputNumber:Ji,treeSelect:Hr}=e,Yt=C.useCallback((et,xt)=>{const{prefixCls:rr}=e;if(xt)return xt;const Xt=rr||w.getPrefixCls("");return et?`${Xt}-${et}`:Xt},[w.getPrefixCls,e.prefixCls]),yt=b||w.iconPrefixCls||Gh,yn=r||w.csp;uM(yt,yn);const Gt=hM(E,w.theme,{prefixCls:Yt("")});process.env.NODE_ENV!=="production"&&(Rp=Rp||!!Gt);const Xe={csp:yn,autoInsertSpaceInButton:n,alert:i,anchor:a,locale:l||y,direction:d,space:u,splitter:f,virtual:h,popupMatchSelectWidth:g??m,popupOverflow:x,getPrefixCls:Yt,iconPrefixCls:yt,theme:Gt,segmented:j,statistic:S,spin:O,calendar:k,carousel:I,cascader:_,collapse:$,typography:R,checkbox:z,descriptions:F,divider:M,drawer:D,skeleton:A,steps:T,image:N,input:ye,textArea:me,layout:U,list:H,mentions:V,modal:K,progress:oe,result:pe,slider:ve,breadcrumb:Ce,menu:Pe,pagination:J,empty:L,badge:ae,radio:q,rate:ue,switch:he,transfer:we,avatar:je,message:Te,tag:Ne,table:W,card:ne,tabs:re,timeline:X,timePicker:te,upload:de,notification:Y,tree:Q,colorPicker:Z,datePicker:ce,rangePicker:ie,flex:fe,wave:ge,dropdown:be,warning:Be,tour:se,tooltip:Ie,popover:Fe,popconfirm:Vr,floatButton:rn,floatButtonGroup:Qi,variant:Xo,inputNumber:Ji,treeSelect:Hr};process.env.NODE_ENV!=="production"&&hn("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const qe=Object.assign({},w);Object.keys(Xe).forEach(et=>{Xe[et]!==void 0&&(qe[et]=Xe[et])}),NM.forEach(et=>{const xt=e[et];xt&&(qe[et]=xt)}),typeof n<"u"&&(qe.button=Object.assign({autoInsertSpace:n},qe.button));const Lt=zh(()=>qe,qe,(et,xt)=>{const rr=Object.keys(et),Xt=Object.keys(xt);return rr.length!==Xt.length||rr.some(on=>et[on]!==xt[on])}),{layer:nn}=C.useContext(ss),sr=C.useMemo(()=>({prefixCls:yt,csp:yn,layer:nn?"antd":void 0}),[yt,yn,nn]);let gt=C.createElement(C.Fragment,null,C.createElement(RM,{dropdownMatchSelectWidth:m}),t);const qn=C.useMemo(()=>{var et,xt,rr,Xt;return hI(((et=Eo.Form)===null||et===void 0?void 0:et.defaultValidateMessages)||{},((rr=(xt=Lt.locale)===null||xt===void 0?void 0:xt.Form)===null||rr===void 0?void 0:rr.defaultValidateMessages)||{},((Xt=Lt.form)===null||Xt===void 0?void 0:Xt.validateMessages)||{},s?.validateMessages||{})},[Lt,s?.validateMessages]);Object.keys(qn).length>0&&(gt=C.createElement(gI.Provider,{value:qn},gt)),l&&(gt=C.createElement(nC,{locale:l,_ANT_MARK__:rC},gt)),gt=C.createElement(Bh.Provider,{value:sr},gt),c&&(gt=C.createElement(LI,{size:c},gt)),gt=C.createElement(MM,null,gt);const xn=C.useMemo(()=>{const et=Gt||{},{algorithm:xt,token:rr,components:Xt,cssVar:on}=et,eo=AM(et,["algorithm","token","components","cssVar"]),Wr=xt&&(!Array.isArray(xt)||xt.length>0)?wp(xt):oC,Er={};Object.entries(Xt||{}).forEach(([Ur,to])=>{const lt=Object.assign({},to);"algorithm"in lt&&(lt.algorithm===!0?lt.theme=Wr:(Array.isArray(lt.algorithm)||typeof lt.algorithm=="function")&&(lt.theme=wp(lt.algorithm)),delete lt.algorithm),Er[Ur]=lt});const an=Object.assign(Object.assign({},za),rr);return Object.assign(Object.assign({},eo),{theme:Wr,token:an,components:Er,override:Object.assign({override:an},Er),cssVar:on})},[Gt]);return E&&(gt=C.createElement(aC.Provider,{value:xn},gt)),Lt.warning&&(gt=C.createElement(eC.Provider,{value:Lt.warning},gt)),P!==void 0&&(gt=C.createElement($I,{disabled:P},gt)),C.createElement(Rn.Provider,{value:Lt},gt)},zo=e=>{const t=C.useContext(Rn),r=C.useContext(Yh);return C.createElement($M,Object.assign({parentContext:t,legacyLocale:r},e))};zo.ConfigContext=Rn;zo.SizeContext=Po;zo.config=BM;zo.useConfig=zI;Object.defineProperty(zo,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&ls(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Po)});process.env.NODE_ENV!=="production"&&(zo.displayName="ConfigProvider");function IC(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,a=e.bodyClassName,s=e.className,l=e.style;return C.createElement("div",{className:_e("".concat(r,"-content"),s),style:l},C.createElement("div",{className:_e("".concat(r,"-inner"),a),id:n,role:"tooltip",style:i},typeof t=="function"?t():t))}var MC=C.createContext(null),i0=[];function LM(e,t){var r=C.useState(function(){if(!or())return null;var g=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&g.setAttribute("data-debug",t),g}),n=Ee(r,1),i=n[0],a=C.useRef(!1),s=C.useContext(MC),l=C.useState(i0),c=Ee(l,2),d=c[0],u=c[1],f=s||(a.current?void 0:function(g){u(function(x){var y=[g].concat(Wt(x));return y})});function h(){i.parentElement||document.body.appendChild(i),a.current=!0}function m(){var g;(g=i.parentElement)===null||g===void 0||g.removeChild(i),a.current=!1}return pt(function(){return e?s?s(h):h():m(),m},[e]),pt(function(){d.length&&(d.forEach(function(g){return g()}),u(i0))},[d]),[i,f]}function zM(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var i,a;if(e){var s=getComputedStyle(e);n.scrollbarColor=s.scrollbarColor,n.scrollbarWidth=s.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),c=parseInt(l.width,10),d=parseInt(l.height,10);try{var u=c?"width: ".concat(l.width,";"):"",f=d?"height: ".concat(l.height,";"):"";Tn(`
|
|
124
|
-
#`.concat(t,`::-webkit-scrollbar {
|
|
125
|
-
`).concat(u,`
|
|
126
|
-
`).concat(f,`
|
|
127
|
-
}`),t)}catch(g){console.error(g),i=c,a=d}}document.body.appendChild(r);var h=e&&i&&!isNaN(i)?i:r.offsetWidth-r.clientWidth,m=e&&a&&!isNaN(a)?a:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Aa(t),{width:h,height:m}}function FM(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:zM(e)}function VM(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var HM="rc-util-locker-".concat(Date.now()),o0=0;function WM(e){var t=!!e,r=C.useState(function(){return o0+=1,"".concat(HM,"_").concat(o0)}),n=Ee(r,1),i=n[0];pt(function(){if(t){var a=FM(document.body).width,s=VM();Tn(`
|
|
128
|
-
html body {
|
|
129
|
-
overflow-y: hidden;
|
|
130
|
-
`.concat(s?"width: calc(100% - ".concat(a,"px);"):"",`
|
|
131
|
-
}`),i)}else Aa(i);return function(){Aa(i)}},[t,i])}var UM=!1;function KM(e){return UM}var a0=function(t){return t===!1?!1:!or()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Qh=C.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer,a=e.debug,s=e.autoDestroy,l=s===void 0?!0:s,c=e.children,d=C.useState(r),u=Ee(d,2),f=u[0],h=u[1],m=f||r;process.env.NODE_ENV!=="production"&&$n(or()||!r,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),C.useEffect(function(){(l||r)&&h(r)},[r,l]);var g=C.useState(function(){return a0(i)}),x=Ee(g,2),y=x[0],w=x[1];C.useEffect(function(){var R=a0(i);w(R??null)});var b=LM(m&&!y,a),E=Ee(b,2),P=E[0],j=E[1],S=y??P;WM(n&&r&&or()&&(S===P||S===document.body));var O=null;if(c&&_c(c)&&t){var k=c;O=k.ref}var I=Vh(O,t);if(!m||!or()||y===void 0)return null;var _=S===!1||KM(),$=c;return t&&($=C.cloneElement(c,{ref:I})),C.createElement(MC.Provider,{value:j},_?$:xo.createPortal($,S))});process.env.NODE_ENV!=="production"&&(Qh.displayName="Portal");function qM(){var e=xe({},C);return e.useId}var s0=0,l0=qM();const RC=l0?function(t){var r=l0();return t||(process.env.NODE_ENV==="test"?"test-id":r)}:function(t){var r=C.useState("ssr-id"),n=Ee(r,2),i=n[0],a=n[1];return C.useEffect(function(){var s=s0;s0+=1,a("rc_unique_".concat(s))},[]),t||(process.env.NODE_ENV==="test"?"test-id":i)},YM=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))});function GM(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos,a=n||{},s=a.className,l=a.content,c=i.x,d=c===void 0?0:c,u=i.y,f=u===void 0?0:u,h=C.useRef();if(!r||!r.points)return null;var m={position:"absolute"};if(r.autoArrow!==!1){var g=r.points[0],x=r.points[1],y=g[0],w=g[1],b=x[0],E=x[1];y===b||!["t","b"].includes(y)?m.top=f:y==="t"?m.top=0:m.bottom=0,w===E||!["l","r"].includes(w)?m.left=d:w==="l"?m.left=0:m.right=0}return C.createElement("div",{ref:h,className:_e("".concat(t,"-arrow"),s),style:m},l)}function XM(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,a=e.motion;return i?C.createElement(OC,Nt({},a,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(s){var l=s.className;return C.createElement("div",{style:{zIndex:n},className:_e("".concat(t,"-mask"),l)})}):null}var AC=C.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(AC.displayName="PopupContent");var NC=C.forwardRef(function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,a=e.style,s=e.target,l=e.onVisibleChanged,c=e.open,d=e.keepDom,u=e.fresh,f=e.onClick,h=e.mask,m=e.arrow,g=e.arrowPos,x=e.align,y=e.motion,w=e.maskMotion,b=e.forceRender,E=e.getPopupContainer,P=e.autoDestroy,j=e.portal,S=e.zIndex,O=e.onMouseEnter,k=e.onMouseLeave,I=e.onPointerEnter,_=e.onPointerDownCapture,$=e.ready,R=e.offsetX,z=e.offsetY,F=e.offsetR,M=e.offsetB,D=e.onAlign,A=e.onPrepare,T=e.stretch,N=e.targetWidth,U=e.targetHeight,H=typeof r=="function"?r():r,V=c||d,K=E?.length>0,oe=C.useState(!E||!K),pe=Ee(oe,2),ve=pe[0],Ce=pe[1];if(pt(function(){!ve&&K&&s&&Ce(!0)},[ve,K,s]),!ve)return null;var Pe="auto",J={left:"-1000vw",top:"-1000vh",right:Pe,bottom:Pe};if($||!c){var ye,me=x.points,L=x.dynamicInset||((ye=x._experimental)===null||ye===void 0?void 0:ye.dynamicInset),ae=L&&me[0][1]==="r",q=L&&me[0][0]==="b";ae?(J.right=F,J.left=Pe):(J.left=R,J.right=Pe),q?(J.bottom=M,J.top=Pe):(J.top=z,J.bottom=Pe)}var ue={};return T&&(T.includes("height")&&U?ue.height=U:T.includes("minHeight")&&U&&(ue.minHeight=U),T.includes("width")&&N?ue.width=N:T.includes("minWidth")&&N&&(ue.minWidth=N)),c||(ue.pointerEvents="none"),C.createElement(j,{open:b||V,getContainer:E&&function(){return E(s)},autoDestroy:P},C.createElement(XM,{prefixCls:i,open:c,zIndex:S,mask:h,motion:w}),C.createElement(Bo,{onResize:D,disabled:!c},function(he){return C.createElement(OC,Nt({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},y,{onAppearPrepare:A,onEnterPrepare:A,visible:c,onVisibleChanged:function(je){var Te;y==null||(Te=y.onVisibleChanged)===null||Te===void 0||Te.call(y,je),l(je)}}),function(we,je){var Te=we.className,Ne=we.style,W=_e(i,Te,n);return C.createElement("div",{ref:is(he,t,je),className:W,style:xe(xe(xe(xe({"--arrow-x":"".concat(g.x||0,"px"),"--arrow-y":"".concat(g.y||0,"px")},J),ue),Ne),{},{boxSizing:"border-box",zIndex:S},a),onMouseEnter:O,onMouseLeave:k,onPointerEnter:I,onClick:f,onPointerDownCapture:_},m&&C.createElement(GM,{prefixCls:i,arrow:m,arrowPos:g,align:x}),C.createElement(AC,{cache:!c&&!u},H))})}))});process.env.NODE_ENV!=="production"&&(NC.displayName="Popup");var DC=C.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=_c(r),a=C.useCallback(function(l){Fh(t,n?n(l):l)},[n]),s=Vh(a,Hh(r));return i?C.cloneElement(r,{ref:s}):r});process.env.NODE_ENV!=="production"&&(DC.displayName="TriggerWrapper");var c0=C.createContext(null);function u0(e){return e?Array.isArray(e)?e:[e]:[]}function ZM(e,t,r,n){return C.useMemo(function(){var i=u0(r??t),a=u0(n??t),s=new Set(i),l=new Set(a);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[s,l]},[e,t,r,n])}const QM=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),a=i.width,s=i.height;if(a||s)return!0}}return!1});function JM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function eR(e,t,r,n){for(var i=r.points,a=Object.keys(e),s=0;s<a.length;s+=1){var l,c=a[s];if(JM((l=e[c])===null||l===void 0?void 0:l.points,i,n))return"".concat(t,"-placement-").concat(c)}return""}function d0(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function us(e){return e.ownerDocument.defaultView}function Ap(e){for(var t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];r;){var i=us(r).getComputedStyle(r),a=i.overflowX,s=i.overflowY,l=i.overflow;[a,s,l].some(function(c){return n.includes(c)})&&t.push(r),r=r.parentElement}return t}function Va(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function fa(e){return Va(parseFloat(e),0)}function f0(e,t){var r=xe({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var i=us(n).getComputedStyle(n),a=i.overflow,s=i.overflowClipMargin,l=i.borderTopWidth,c=i.borderBottomWidth,d=i.borderLeftWidth,u=i.borderRightWidth,f=n.getBoundingClientRect(),h=n.offsetHeight,m=n.clientHeight,g=n.offsetWidth,x=n.clientWidth,y=fa(l),w=fa(c),b=fa(d),E=fa(u),P=Va(Math.round(f.width/g*1e3)/1e3),j=Va(Math.round(f.height/h*1e3)/1e3),S=(g-x-b-E)*P,O=(h-m-y-w)*j,k=y*j,I=w*j,_=b*P,$=E*P,R=0,z=0;if(a==="clip"){var F=fa(s);R=F*P,z=F*j}var M=f.x+_-R,D=f.y+k-z,A=M+f.width+2*R-_-$-S,T=D+f.height+2*z-k-I-O;r.left=Math.max(r.left,M),r.top=Math.max(r.top,D),r.right=Math.min(r.right,A),r.bottom=Math.min(r.bottom,T)}}),r}function p0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function h0(e,t){var r=t||[],n=Ee(r,2),i=n[0],a=n[1];return[p0(e.width,i),p0(e.height,a)]}function m0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function io(e,t){var r=t[0],n=t[1],i,a;return r==="t"?a=e.y:r==="b"?a=e.y+e.height:a=e.y+e.height/2,n==="l"?i=e.x:n==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:a}}function Qn(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,i){return i===t?r[n]||"c":n}).join("")}function tR(e,t,r,n,i,a,s){var l=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),c=Ee(l,2),d=c[0],u=c[1],f=C.useRef(0),h=C.useMemo(function(){return t?Ap(t):[]},[t]),m=C.useRef({}),g=function(){m.current={}};e||g();var x=wr(function(){if(t&&r&&e){let Pr=function(ta,bn){var Zn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:te,ra=V.x+ta,Ls=V.y+bn,Du=ra+q,_u=Ls+ae,Bu=Math.max(ra,Zn.left),ke=Math.max(Ls,Zn.top),De=Math.min(Du,Zn.right),ct=Math.min(_u,Zn.bottom);return Math.max(0,(De-Bu)*(ct-ke))},no=function(){Wr=V.y+qe,Er=Wr+ae,an=V.x+Xe,Ur=an+q};var b,E,P,j,S=t,O=S.ownerDocument,k=us(S),I=k.getComputedStyle(S),_=I.position,$=S.style.left,R=S.style.top,z=S.style.right,F=S.style.bottom,M=S.style.overflow,D=xe(xe({},i[n]),a),A=O.createElement("div");(b=S.parentElement)===null||b===void 0||b.appendChild(A),A.style.left="".concat(S.offsetLeft,"px"),A.style.top="".concat(S.offsetTop,"px"),A.style.position=_,A.style.height="".concat(S.offsetHeight,"px"),A.style.width="".concat(S.offsetWidth,"px"),S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";var T;if(Array.isArray(r))T={x:r[0],y:r[1],width:0,height:0};else{var N,U,H=r.getBoundingClientRect();H.x=(N=H.x)!==null&&N!==void 0?N:H.left,H.y=(U=H.y)!==null&&U!==void 0?U:H.top,T={x:H.x,y:H.y,width:H.width,height:H.height}}var V=S.getBoundingClientRect(),K=k.getComputedStyle(S),oe=K.height,pe=K.width;V.x=(E=V.x)!==null&&E!==void 0?E:V.left,V.y=(P=V.y)!==null&&P!==void 0?P:V.top;var ve=O.documentElement,Ce=ve.clientWidth,Pe=ve.clientHeight,J=ve.scrollWidth,ye=ve.scrollHeight,me=ve.scrollTop,L=ve.scrollLeft,ae=V.height,q=V.width,ue=T.height,he=T.width,we={left:0,top:0,right:Ce,bottom:Pe},je={left:-L,top:-me,right:J-L,bottom:ye-me},Te=D.htmlRegion,Ne="visible",W="visibleFirst";Te!=="scroll"&&Te!==W&&(Te=Ne);var ne=Te===W,re=f0(je,h),X=f0(we,h),te=Te===Ne?X:re,de=ne?X:te;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";var Y=S.getBoundingClientRect();S.style.left=$,S.style.top=R,S.style.right=z,S.style.bottom=F,S.style.overflow=M,(j=S.parentElement)===null||j===void 0||j.removeChild(A);var Q=Va(Math.round(q/parseFloat(pe)*1e3)/1e3),Z=Va(Math.round(ae/parseFloat(oe)*1e3)/1e3);if(Q===0||Z===0||Da(r)&&!QM(r))return;var ce=D.offset,ie=D.targetOffset,fe=h0(V,ce),ge=Ee(fe,2),be=ge[0],Be=ge[1],se=h0(T,ie),Ie=Ee(se,2),Fe=Ie[0],Vr=Ie[1];T.x-=Fe,T.y-=Vr;var rn=D.points||[],Qi=Ee(rn,2),Xo=Qi[0],Ji=Qi[1],Hr=m0(Ji),Yt=m0(Xo),yt=io(T,Hr),yn=io(V,Yt),Gt=xe({},D),Xe=yt.x-yn.x+be,qe=yt.y-yn.y+Be,Lt=Pr(Xe,qe),nn=Pr(Xe,qe,X),sr=io(T,["t","l"]),gt=io(V,["t","l"]),qn=io(T,["b","r"]),xn=io(V,["b","r"]),et=D.overflow||{},xt=et.adjustX,rr=et.adjustY,Xt=et.shiftX,on=et.shiftY,eo=function(bn){return typeof bn=="boolean"?bn:bn>=0},Wr,Er,an,Ur;no();var to=eo(rr),lt=Yt[0]===Hr[0];if(to&&Yt[0]==="t"&&(Er>de.bottom||m.current.bt)){var xi=qe;lt?xi-=ae-ue:xi=sr.y-xn.y-Be;var Is=Pr(Xe,xi),ju=Pr(Xe,xi,X);Is>Lt||Is===Lt&&(!ne||ju>=nn)?(m.current.bt=!0,qe=xi,Be=-Be,Gt.points=[Qn(Yt,0),Qn(Hr,0)]):m.current.bt=!1}if(to&&Yt[0]==="b"&&(Wr<de.top||m.current.tb)){var bi=qe;lt?bi+=ae-ue:bi=qn.y-gt.y-Be;var Ms=Pr(Xe,bi),Eu=Pr(Xe,bi,X);Ms>Lt||Ms===Lt&&(!ne||Eu>=nn)?(m.current.tb=!0,qe=bi,Be=-Be,Gt.points=[Qn(Yt,0),Qn(Hr,0)]):m.current.tb=!1}var Rs=eo(xt),As=Yt[1]===Hr[1];if(Rs&&Yt[1]==="l"&&(Ur>de.right||m.current.rl)){var wi=Xe;As?wi-=q-he:wi=sr.x-xn.x-be;var Ci=Pr(wi,qe),Zo=Pr(wi,qe,X);Ci>Lt||Ci===Lt&&(!ne||Zo>=nn)?(m.current.rl=!0,Xe=wi,be=-be,Gt.points=[Qn(Yt,1),Qn(Hr,1)]):m.current.rl=!1}if(Rs&&Yt[1]==="r"&&(an<de.left||m.current.lr)){var Si=Xe;As?Si+=q-he:Si=qn.x-gt.x-be;var Qo=Pr(Si,qe),ro=Pr(Si,qe,X);Qo>Lt||Qo===Lt&&(!ne||ro>=nn)?(m.current.lr=!0,Xe=Si,be=-be,Gt.points=[Qn(Yt,1),Qn(Hr,1)]):m.current.lr=!1}no();var Kr=Xt===!0?0:Xt;typeof Kr=="number"&&(an<X.left&&(Xe-=an-X.left-be,T.x+he<X.left+Kr&&(Xe+=T.x-X.left+he-Kr)),Ur>X.right&&(Xe-=Ur-X.right-be,T.x>X.right-Kr&&(Xe+=T.x-X.right+Kr)));var Yn=on===!0?0:on;typeof Yn=="number"&&(Wr<X.top&&(qe-=Wr-X.top-Be,T.y+ue<X.top+Yn&&(qe+=T.y-X.top+ue-Yn)),Er>X.bottom&&(qe-=Er-X.bottom-Be,T.y>X.bottom-Yn&&(qe+=T.y-X.bottom+Yn)));var Gn=V.x+Xe,Xn=Gn+q,Jo=V.y+qe,Pu=Jo+ae,Ns=T.x,Ds=Ns+he,_s=T.y,Ou=_s+ue,ku=Math.max(Gn,Ns),Bs=Math.min(Xn,Ds),Tu=(ku+Bs)/2,Iu=Tu-Gn,$s=Math.max(Jo,_s),Mu=Math.min(Pu,Ou),Ru=($s+Mu)/2,Au=Ru-Jo;s?.(t,Gt);var sn=Y.right-V.x-(Xe+V.width),ea=Y.bottom-V.y-(qe+V.height);Q===1&&(Xe=Math.round(Xe),sn=Math.round(sn)),Z===1&&(qe=Math.round(qe),ea=Math.round(ea));var Nu={ready:!0,offsetX:Xe/Q,offsetY:qe/Z,offsetR:sn/Q,offsetB:ea/Z,arrowX:Iu/Q,arrowY:Au/Z,scaleX:Q,scaleY:Z,align:Gt};u(Nu)}}),y=function(){f.current+=1;var E=f.current;Promise.resolve().then(function(){f.current===E&&x()})},w=function(){u(function(E){return xe(xe({},E),{},{ready:!1})})};return pt(w,[n]),pt(function(){e||w()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,y]}function rR(e,t,r,n,i){pt(function(){if(e&&t&&r){let f=function(){n(),i()};var a=t,s=r,l=Ap(a),c=Ap(s),d=us(s),u=new Set([d].concat(Wt(l),Wt(c)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),d.addEventListener("resize",f,{passive:!0}),n(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),d.removeEventListener("resize",f)})}}},[e,t,r])}function nR(e,t,r,n,i,a,s,l){var c=C.useRef(e);c.current=e;var d=C.useRef(!1);C.useEffect(function(){if(t&&n&&(!i||a)){var f=function(){d.current=!1},h=function(P){var j;c.current&&!s(((j=P.composedPath)===null||j===void 0||(j=j.call(P))===null||j===void 0?void 0:j[0])||P.target)&&!d.current&&l(!1)},m=us(n);m.addEventListener("pointerdown",f,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);var g=Fl(r);if(g&&(g.addEventListener("mousedown",h,!0),g.addEventListener("contextmenu",h,!0)),process.env.NODE_ENV!=="production"){var x,y,w=r==null||(x=r.getRootNode)===null||x===void 0?void 0:x.call(r),b=(y=n.getRootNode)===null||y===void 0?void 0:y.call(n);bo(w===b,"trigger element and popup element should in same shadow root.")}return function(){m.removeEventListener("pointerdown",f,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),g&&(g.removeEventListener("mousedown",h,!0),g.removeEventListener("contextmenu",h,!0))}}},[t,r,n,i,a]);function u(){d.current=!0}return u}var iR=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function oR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qh,t=C.forwardRef(function(r,n){var i=r.prefixCls,a=i===void 0?"rc-trigger-popup":i,s=r.children,l=r.action,c=l===void 0?"hover":l,d=r.showAction,u=r.hideAction,f=r.popupVisible,h=r.defaultPopupVisible,m=r.onPopupVisibleChange,g=r.afterPopupVisibleChange,x=r.mouseEnterDelay,y=r.mouseLeaveDelay,w=y===void 0?.1:y,b=r.focusDelay,E=r.blurDelay,P=r.mask,j=r.maskClosable,S=j===void 0?!0:j,O=r.getPopupContainer,k=r.forceRender,I=r.autoDestroy,_=r.destroyPopupOnHide,$=r.popup,R=r.popupClassName,z=r.popupStyle,F=r.popupPlacement,M=r.builtinPlacements,D=M===void 0?{}:M,A=r.popupAlign,T=r.zIndex,N=r.stretch,U=r.getPopupClassNameFromAlign,H=r.fresh,V=r.alignPoint,K=r.onPopupClick,oe=r.onPopupAlign,pe=r.arrow,ve=r.popupMotion,Ce=r.maskMotion,Pe=r.popupTransitionName,J=r.popupAnimation,ye=r.maskTransitionName,me=r.maskAnimation,L=r.className,ae=r.getTriggerDOMNode,q=Jr(r,iR),ue=I||_||!1,he=C.useState(!1),we=Ee(he,2),je=we[0],Te=we[1];pt(function(){Te(YM())},[]);var Ne=C.useRef({}),W=C.useContext(c0),ne=C.useMemo(function(){return{registerSubPopup:function(De,ct){Ne.current[De]=ct,W?.registerSubPopup(De,ct)}}},[W]),re=RC(),X=C.useState(null),te=Ee(X,2),de=te[0],Y=te[1],Q=C.useRef(null),Z=wr(function(ke){Q.current=ke,Da(ke)&&de!==ke&&Y(ke),W?.registerSubPopup(re,ke)}),ce=C.useState(null),ie=Ee(ce,2),fe=ie[0],ge=ie[1],be=C.useRef(null),Be=wr(function(ke){Da(ke)&&fe!==ke&&(ge(ke),be.current=ke)}),se=C.Children.only(s),Ie=se?.props||{},Fe={},Vr=wr(function(ke){var De,ct,kt=fe;return kt?.contains(ke)||((De=Fl(kt))===null||De===void 0?void 0:De.host)===ke||ke===kt||de?.contains(ke)||((ct=Fl(de))===null||ct===void 0?void 0:ct.host)===ke||ke===de||Object.values(Ne.current).some(function(vt){return vt?.contains(ke)||ke===vt})}),rn=d0(a,ve,J,Pe),Qi=d0(a,Ce,me,ye),Xo=C.useState(h||!1),Ji=Ee(Xo,2),Hr=Ji[0],Yt=Ji[1],yt=f??Hr,yn=wr(function(ke){f===void 0&&Yt(ke)});pt(function(){Yt(f||!1)},[f]);var Gt=C.useRef(yt);Gt.current=yt;var Xe=C.useRef([]);Xe.current=[];var qe=wr(function(ke){var De;yn(ke),((De=Xe.current[Xe.current.length-1])!==null&&De!==void 0?De:yt)!==ke&&(Xe.current.push(ke),m?.(ke))}),Lt=C.useRef(),nn=function(){clearTimeout(Lt.current)},sr=function(De){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;nn(),ct===0?qe(De):Lt.current=setTimeout(function(){qe(De)},ct*1e3)};C.useEffect(function(){return nn},[]);var gt=C.useState(!1),qn=Ee(gt,2),xn=qn[0],et=qn[1];pt(function(ke){(!ke||yt)&&et(!0)},[yt]);var xt=C.useState(null),rr=Ee(xt,2),Xt=rr[0],on=rr[1],eo=C.useState(null),Wr=Ee(eo,2),Er=Wr[0],an=Wr[1],Ur=function(De){an([De.clientX,De.clientY])},to=tR(yt,de,V&&Er!==null?Er:fe,F,D,A,oe),lt=Ee(to,11),xi=lt[0],Is=lt[1],ju=lt[2],bi=lt[3],Ms=lt[4],Eu=lt[5],Rs=lt[6],As=lt[7],wi=lt[8],Ci=lt[9],Zo=lt[10],Si=ZM(je,c,d,u),Qo=Ee(Si,2),ro=Qo[0],Kr=Qo[1],Yn=ro.has("click"),Gn=Kr.has("click")||Kr.has("contextMenu"),Xn=wr(function(){xn||Zo()}),Jo=function(){Gt.current&&V&&Gn&&sr(!1)};rR(yt,fe,de,Xn,Jo),pt(function(){Xn()},[Er,F]),pt(function(){yt&&!(D!=null&&D[F])&&Xn()},[JSON.stringify(A)]);var Pu=C.useMemo(function(){var ke=eR(D,a,Ci,V);return _e(ke,U?.(Ci))},[Ci,U,D,a,V]);C.useImperativeHandle(n,function(){return{nativeElement:be.current,popupElement:Q.current,forceAlign:Xn}});var Ns=C.useState(0),Ds=Ee(Ns,2),_s=Ds[0],Ou=Ds[1],ku=C.useState(0),Bs=Ee(ku,2),Tu=Bs[0],Iu=Bs[1],$s=function(){if(N&&fe){var De=fe.getBoundingClientRect();Ou(De.width),Iu(De.height)}},Mu=function(){$s(),Xn()},Ru=function(De){et(!1),Zo(),g?.(De)},Au=function(){return new Promise(function(De){$s(),on(function(){return De})})};pt(function(){Xt&&(Zo(),Xt(),on(null))},[Xt]);function sn(ke,De,ct,kt){Fe[ke]=function(vt){var zs;kt?.(vt),sr(De,ct);for(var $u=arguments.length,Gg=new Array($u>1?$u-1:0),Fs=1;Fs<$u;Fs++)Gg[Fs-1]=arguments[Fs];(zs=Ie[ke])===null||zs===void 0||zs.call.apply(zs,[Ie,vt].concat(Gg))}}(Yn||Gn)&&(Fe.onClick=function(ke){var De;Gt.current&&Gn?sr(!1):!Gt.current&&Yn&&(Ur(ke),sr(!0));for(var ct=arguments.length,kt=new Array(ct>1?ct-1:0),vt=1;vt<ct;vt++)kt[vt-1]=arguments[vt];(De=Ie.onClick)===null||De===void 0||De.call.apply(De,[Ie,ke].concat(kt))});var ea=nR(yt,Gn,fe,de,P,S,Vr,sr),Nu=ro.has("hover"),Pr=Kr.has("hover"),no,ta;Nu&&(sn("onMouseEnter",!0,x,function(ke){Ur(ke)}),sn("onPointerEnter",!0,x,function(ke){Ur(ke)}),no=function(De){(yt||xn)&&de!==null&&de!==void 0&&de.contains(De.target)&&sr(!0,x)},V&&(Fe.onMouseMove=function(ke){var De;(De=Ie.onMouseMove)===null||De===void 0||De.call(Ie,ke)})),Pr&&(sn("onMouseLeave",!1,w),sn("onPointerLeave",!1,w),ta=function(){sr(!1,w)}),ro.has("focus")&&sn("onFocus",!0,b),Kr.has("focus")&&sn("onBlur",!1,E),ro.has("contextMenu")&&(Fe.onContextMenu=function(ke){var De;Gt.current&&Kr.has("contextMenu")?sr(!1):(Ur(ke),sr(!0)),ke.preventDefault();for(var ct=arguments.length,kt=new Array(ct>1?ct-1:0),vt=1;vt<ct;vt++)kt[vt-1]=arguments[vt];(De=Ie.onContextMenu)===null||De===void 0||De.call.apply(De,[Ie,ke].concat(kt))}),L&&(Fe.className=_e(Ie.className,L));var bn=C.useRef(!1);bn.current||(bn.current=k||yt||xn);var Zn=xe(xe({},Ie),Fe),ra={},Ls=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ls.forEach(function(ke){q[ke]&&(ra[ke]=function(){for(var De,ct=arguments.length,kt=new Array(ct),vt=0;vt<ct;vt++)kt[vt]=arguments[vt];(De=Zn[ke])===null||De===void 0||De.call.apply(De,[Zn].concat(kt)),q[ke].apply(q,kt)})});var Du=C.cloneElement(se,xe(xe({},Zn),ra)),_u={x:Eu,y:Rs},Bu=pe?xe({},pe!==!0?pe:{}):null;return C.createElement(C.Fragment,null,C.createElement(Bo,{disabled:!yt,ref:Be,onResize:Mu},C.createElement(DC,{getTriggerDOMNode:ae},Du)),bn.current&&C.createElement(c0.Provider,{value:ne},C.createElement(NC,{portal:e,ref:Z,prefixCls:a,popup:$,className:_e(R,Pu),style:z,target:fe,onMouseEnter:no,onMouseLeave:ta,onPointerEnter:no,zIndex:T,open:yt,keepDom:xn,fresh:H,onClick:K,onPointerDownCapture:ea,mask:P,motion:rn,maskMotion:Qi,onVisibleChanged:Ru,onPrepare:Au,forceRender:k,autoDestroy:ue,getPopupContainer:O,align:Ci,arrow:Bu,arrowPos:_u,ready:xi,offsetX:Is,offsetY:ju,offsetR:bi,offsetB:Ms,onAlign:Xn,stretch:N,targetWidth:_s/As,targetHeight:Tu/wi})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const aR=oR(Qh);var oo={shiftX:64,adjustY:1},ao={adjustX:1,shiftY:!0},kr=[0,0],sR={left:{points:["cr","cl"],overflow:ao,offset:[-4,0],targetOffset:kr},right:{points:["cl","cr"],overflow:ao,offset:[4,0],targetOffset:kr},top:{points:["bc","tc"],overflow:oo,offset:[0,-4],targetOffset:kr},bottom:{points:["tc","bc"],overflow:oo,offset:[0,4],targetOffset:kr},topLeft:{points:["bl","tl"],overflow:oo,offset:[0,-4],targetOffset:kr},leftTop:{points:["tr","tl"],overflow:ao,offset:[-4,0],targetOffset:kr},topRight:{points:["br","tr"],overflow:oo,offset:[0,-4],targetOffset:kr},rightTop:{points:["tl","tr"],overflow:ao,offset:[4,0],targetOffset:kr},bottomRight:{points:["tr","br"],overflow:oo,offset:[0,4],targetOffset:kr},rightBottom:{points:["bl","br"],overflow:ao,offset:[4,0],targetOffset:kr},bottomLeft:{points:["tl","bl"],overflow:oo,offset:[0,4],targetOffset:kr},leftBottom:{points:["br","bl"],overflow:ao,offset:[-4,0],targetOffset:kr}},lR=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],cR=function(t,r){var n=t.overlayClassName,i=t.trigger,a=i===void 0?["hover"]:i,s=t.mouseEnterDelay,l=s===void 0?0:s,c=t.mouseLeaveDelay,d=c===void 0?.1:c,u=t.overlayStyle,f=t.prefixCls,h=f===void 0?"rc-tooltip":f,m=t.children,g=t.onVisibleChange,x=t.afterVisibleChange,y=t.transitionName,w=t.animation,b=t.motion,E=t.placement,P=E===void 0?"right":E,j=t.align,S=j===void 0?{}:j,O=t.destroyTooltipOnHide,k=O===void 0?!1:O,I=t.defaultVisible,_=t.getTooltipContainer,$=t.overlayInnerStyle,R=t.overlay,z=t.id,F=t.showArrow,M=F===void 0?!0:F,D=t.classNames,A=t.styles,T=Jr(t,lR),N=RC(z),U=v.useRef(null);v.useImperativeHandle(r,function(){return U.current});var H=xe({},T);"visible"in t&&(H.popupVisible=t.visible);var V=function(){return C.createElement(IC,{key:"content",prefixCls:h,id:N,bodyClassName:D?.body,overlayInnerStyle:xe(xe({},$),A?.body)},R)},K=function(){var pe=C.Children.only(m),ve=pe?.props||{},Ce=xe(xe({},ve),{},{"aria-describedby":R?N:null});return C.cloneElement(m,Ce)};return C.createElement(aR,Nt({popupClassName:_e(n,D?.root),prefixCls:h,popup:V,action:a,builtinPlacements:sR,popupPlacement:P,ref:U,popupAlign:S,getPopupContainer:_,onPopupVisibleChange:g,afterPopupVisibleChange:x,popupTransitionName:y,popupAnimation:w,popupMotion:b,defaultPopupVisible:I,autoDestroy:k,mouseLeaveDelay:d,popupStyle:xe(xe({},u),A?.root),mouseEnterDelay:l,arrow:M},H),K())};const uR=v.forwardRef(cR),Ha=C.createContext({});process.env.NODE_ENV!=="production"&&(Ha.displayName="FormItemInputContext");const dR=({children:e,status:t,override:r})=>{const n=C.useContext(Ha),i=C.useMemo(()=>{const a=Object.assign({},n);return r&&delete a.isFormItemInput,t&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[t,r,n]);return C.createElement(Ha.Provider,{value:i},e)},fR=C.createContext(void 0),_C=e=>{const t=v.useContext(Po);return v.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},BC=C.createContext(null),$C=(e,t)=>{const r=C.useContext(BC),n=C.useMemo(()=>{if(!r)return"";const{compactDirection:i,isFirstItem:a,isLastItem:s}=r,l=i==="vertical"?"-vertical-":"-";return _e(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:a,[`${e}-compact${l}last-item`]:s,[`${e}-compact${l}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},pR=e=>{const{children:t}=e;return C.createElement(BC.Provider,{value:null},t)},Np=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let i=n;return r&&(i=v.createElement(dR,{override:!0,status:!0},i)),t&&(i=v.createElement(pR,null,i)),i},Jh=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jh.displayName="zIndexContext");const Sn=100,hR=10,mR=Sn*hR,gR=mR+Sn,LC={Modal:Sn,Drawer:Sn,Popover:Sn,Popconfirm:Sn,Tooltip:Sn,Tour:Sn,FloatButton:Sn},vR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function yR(e){return e in LC}const xR=(e,t)=>{const[,r]=Lo(),n=v.useContext(Jh),i=yR(e);let a;if(t!==void 0)a=[t,t];else{let s=n??0;i?s+=(n?0:r.zIndexPopupBase)+LC[e]:s+=vR[e],a=[n===void 0?t:s,s]}if(process.env.NODE_ENV!=="production"){const s=hn(e),l=r.zIndexPopupBase+gR,c=a[0]||0;process.env.NODE_ENV!=="production"&&s(t!==void 0||c<=l,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return a},bR=(e,t,r)=>r!==void 0?r:`${e}-${t}`;function wR(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,a=0,s=i,l=n*1/Math.sqrt(2),c=i-n*(1-1/Math.sqrt(2)),d=i-r*(1/Math.sqrt(2)),u=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*i-d,h=u,m=2*i-l,g=c,x=2*i-a,y=s,w=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),b=n*(Math.sqrt(2)-1),E=`polygon(${b}px 100%, 50% ${b}px, ${2*i-b}px 100%, ${b}px 100%)`,P=`path('M ${a} ${s} A ${n} ${n} 0 0 0 ${l} ${c} L ${d} ${u} A ${r} ${r} 0 0 1 ${f} ${h} L ${m} ${g} A ${n} ${n} 0 0 0 ${x} ${y} Z')`;return{arrowShadowWidth:w,arrowPath:P,arrowPolygon:E}}const CR=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:a,arrowShadowWidth:s,borderRadiusXS:l,calc:c}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:c(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Qe(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},zC=8;function FC(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?zC:n}}function Zs(e,t){return e?t:{}}function SR(e,t,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:s}=e,{arrowDistance:l=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}={};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},CR(e,t,i)),{"&:before":{background:t}})]},Zs(!!c.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${Qe(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),Zs(!!c.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${Qe(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),Zs(!!c.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:a},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:a}})),Zs(!!c.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:a},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:a}}))}}function jR(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},a={};switch(e){case"top":case"bottom":a.shiftX=t.arrowOffsetHorizontal*2+r,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=t.arrowOffsetVertical*2+r,a.shiftX=!0,a.adjustX=!0;break}const s=Object.assign(Object.assign({},a),i);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}const g0={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ER={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},PR=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function OR(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:a}=e,s=t/2,l={},c=FC({contentRadius:a,limitVerticalRadius:!0});return Object.keys(g0).forEach(d=>{const u=n&&ER[d]||g0[d],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[d]=f,PR.has(d)&&(f.autoArrow=!1),d){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}if(n)switch(d){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=jR(d,c,t,r),f.htmlRegion="visibleFirst"}),l}function kR(e){return e&&v.isValidElement(e)&&e.type===v.Fragment}const TR=(e,t,r)=>v.isValidElement(e)?v.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function VC(e,t){return TR(e,e,t)}const IR=e=>({animationDuration:e,animationFillMode:"both"}),MR=e=>({animationDuration:e,animationFillMode:"both"}),RR=(e,t,r,n,i=!1)=>{const a=i?"&":"";return{[`
|
|
132
|
-
${a}${e}-enter,
|
|
133
|
-
${a}${e}-appear
|
|
134
|
-
`]:Object.assign(Object.assign({},IR(n)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:Object.assign(Object.assign({},MR(n)),{animationPlayState:"paused"}),[`
|
|
135
|
-
${a}${e}-enter${e}-enter-active,
|
|
136
|
-
${a}${e}-appear${e}-appear-active
|
|
137
|
-
`]:{animationName:t,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},AR=new zr("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),NR=new zr("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),v0=new zr("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),y0=new zr("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),DR=new zr("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),_R=new zr("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),BR=new zr("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),$R=new zr("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),LR=new zr("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),zR=new zr("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),FR=new zr("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),VR=new zr("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),HR={zoom:{inKeyframes:AR,outKeyframes:NR},"zoom-big":{inKeyframes:v0,outKeyframes:y0},"zoom-big-fast":{inKeyframes:v0,outKeyframes:y0},"zoom-left":{inKeyframes:BR,outKeyframes:$R},"zoom-right":{inKeyframes:LR,outKeyframes:zR},"zoom-up":{inKeyframes:DR,outKeyframes:_R},"zoom-down":{inKeyframes:FR,outKeyframes:VR}},WR=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:a}=HR[t];return[RR(n,i,a,e.motionDurationFast),{[`
|
|
138
|
-
${n}-enter,
|
|
139
|
-
${n}-appear
|
|
140
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},UR=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:s,zIndexPopup:l,controlHeight:c,boxShadowSecondary:d,paddingSM:u,paddingXS:f,arrowOffsetHorizontal:h,sizePopupArrow:m}=e,g=t(s).add(m).add(h).equal(),x=t(s).mul(2).add(m).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Xh(e)),{position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":a,[`${r}-inner`]:{minWidth:x,minHeight:c,padding:`${Qe(e.calc(u).div(2).equal())} ${Qe(f)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:s,boxShadow:d,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:g},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(s,zC)}},[`${r}-content`]:{position:"relative"}}),cM(e,(y,{darkColor:w})=>({[`&${r}-${y}`]:{[`${r}-inner`]:{backgroundColor:w},[`${r}-arrow`]:{"--antd-arrow-background-color":w}}}))),{"&-rtl":{direction:"rtl"}})},SR(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},KR=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},FC({contentRadius:e.borderRadius,limitVerticalRadius:!0})),wR(zn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),HC=(e,t=!0)=>cs("Tooltip",n=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:s}=n,l=zn(n,{tooltipMaxWidth:250,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:s});return[UR(l),WR(n,"zoom-big-fast")]},KR,{resetStyle:!1,injectStyle:t})(e),qR=Ul.map(e=>`${e}-inverse`);function YR(e,t=!0){return t?[].concat(Wt(qR),Wt(Ul)).includes(e):Ul.includes(e)}const Ft=Math.round;function od(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const x0=(e,t,r)=>r===0?e:e/100;function pa(e,t){const r=t||255;return e>r?r:e<0?0:e}class Vc{constructor(t){Se(this,"isValid",!0),Se(this,"r",0),Se(this,"g",0),Se(this,"b",0),Se(this,"a",1),Se(this,"_h",void 0),Se(this,"_s",void 0),Se(this,"_l",void 0),Se(this,"_v",void 0),Se(this,"_max",void 0),Se(this,"_min",void 0),Se(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(a){return n.startsWith(a)};const n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof Vc)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=pa(t.r),this.g=pa(t.g),this.b=pa(t.b),this.a=typeof t.a=="number"?pa(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,a=l=>(n[l]-this[l])*i+this[l],s={r:Ft(a("r")),g:Ft(a("g")),b:Ft(a("b")),a:Ft(a("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=a=>Ft((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Ft(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Ft(this.getSaturation()*100),n=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=pa(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,a){return parseInt(r[i]+r[a||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const h=Ft(n*255);this.r=h,this.g=h,this.b=h}let a=0,s=0,l=0;const c=t/60,d=(1-Math.abs(2*n-1))*r,u=d*(1-Math.abs(c%2-1));c>=0&&c<1?(a=d,s=u):c>=1&&c<2?(a=u,s=d):c>=2&&c<3?(s=d,l=u):c>=3&&c<4?(s=u,l=d):c>=4&&c<5?(a=u,l=d):c>=5&&c<6&&(a=d,l=u);const f=n-d/2;this.r=Ft((a+f)*255),this.g=Ft((s+f)*255),this.b=Ft((l+f)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const a=Ft(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const s=t/60,l=Math.floor(s),c=s-l,d=Ft(n*(1-r)*255),u=Ft(n*(1-r*c)*255),f=Ft(n*(1-r*(1-c))*255);switch(l){case 0:this.g=f,this.b=d;break;case 1:this.r=u,this.b=d;break;case 2:this.r=d,this.b=f;break;case 3:this.r=d,this.g=u;break;case 4:this.r=f,this.g=d;break;case 5:default:this.g=d,this.b=u;break}}fromHsvString(t){const r=od(t,x0);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=od(t,x0);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=od(t,(n,i)=>i.includes("%")?Ft(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var GR=["b"],XR=["v"],ad=function(t){return Math.round(Number(t||0))},ZR=function(t){if(t instanceof Vc)return t;if(t&&He(t)==="object"&&"h"in t&&"b"in t){var r=t,n=r.b,i=Jr(r,GR);return xe(xe({},i),{},{v:n})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},b0=(function(e){os(r,e);var t=as(r);function r(n){return $r(this,r),t.call(this,ZR(n))}return Lr(r,[{key:"toHsbString",value:function(){var i=this.toHsb(),a=ad(i.s*100),s=ad(i.b*100),l=ad(i.h),c=i.a,d="hsb(".concat(l,", ").concat(a,"%, ").concat(s,"%)"),u="hsba(".concat(l,", ").concat(a,"%, ").concat(s,"%, ").concat(c.toFixed(c===0?0:2),")");return c===1?d:u}},{key:"toHsb",value:function(){var i=this.toHsv(),a=i.v,s=Jr(i,XR);return xe(xe({},s),{},{b:a,a:this.a})}}]),r})(Vc);const QR=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",JR=(e,t)=>e?QR(e,t):"";let w0=(function(){function e(t){$r(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(i=>({color:new e(i.color),percent:i.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:i,percent:a})=>({color:new e(i),percent:a})),this.metaColor=new b0(this.colors[0].color.metaColor)):this.metaColor=new b0(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Lr(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return JR(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((n,i)=>{const a=r.colors[i];return n.percent===a.percent&&n.color.equals(a.color)}):this.toHexString()===r.toHexString()}}])})();const eA=e=>e instanceof w0?e:new w0(e);function WC(e,t){const r=YR(t),n=_e({[`${e}-${t}`]:t&&r}),i={},a={},s=eA(t).toRgb(),c=(.299*s.r+.587*s.g+.114*s.b)/255<.5?"#FFF":"#000";return t&&!r&&(i.background=t,i["--ant-tooltip-color"]=c,a["--antd-arrow-background-color"]=t),{className:n,overlayStyle:i,arrowStyle:a}}const tA=e=>{const{prefixCls:t,className:r,placement:n="top",title:i,color:a,overlayInnerStyle:s}=e,{getPrefixCls:l}=C.useContext(Rn),c=l("tooltip",t),[d,u,f]=HC(c),h=WC(c,a),m=h.arrowStyle,g=Object.assign(Object.assign({},s),h.overlayStyle),x=_e(u,f,c,`${c}-pure`,`${c}-placement-${n}`,r,h.className);return d(C.createElement("div",{className:x,style:m},C.createElement("div",{className:`${c}-arrow`}),C.createElement(IC,Object.assign({},e,{className:u,prefixCls:c,overlayInnerStyle:g}),i)))};var rA=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 nA=C.forwardRef((e,t)=>{var r,n;const{prefixCls:i,openClassName:a,getTooltipContainer:s,color:l,overlayInnerStyle:c,children:d,afterOpenChange:u,afterVisibleChange:f,destroyTooltipOnHide:h,destroyOnHidden:m,arrow:g=!0,title:x,overlay:y,builtinPlacements:w,arrowPointAtCenter:b=!1,autoAdjustOverflow:E=!0,getPopupContainer:P,placement:j="top",mouseEnterDelay:S=.1,mouseLeaveDelay:O=.1,overlayStyle:k,rootClassName:I,overlayClassName:_,styles:$,classNames:R}=e,z=rA(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),F=!!g,[,M]=Lo(),{getPopupContainer:D,getPrefixCls:A,direction:T,className:N,style:U,classNames:H,styles:V}=zc("tooltip"),K=hn("Tooltip"),oe=C.useRef(null),pe=()=>{var ce;(ce=oe.current)===null||ce===void 0||ce.forceAlign()};C.useImperativeHandle(t,()=>{var ce,ie;return{forceAlign:pe,forcePopupAlign:()=>{K.deprecated(!1,"forcePopupAlign","forceAlign"),pe()},nativeElement:(ce=oe.current)===null||ce===void 0?void 0:ce.nativeElement,popupElement:(ie=oe.current)===null||ie===void 0?void 0:ie.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["destroyTooltipOnHide","destroyOnHidden"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(([ce,ie])=>{K.deprecated(!(ce in e),ce,ie)}),process.env.NODE_ENV!=="production"&&K(!h||typeof h=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&K(!g||typeof g=="boolean"||!("arrowPointAtCenter"in g),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[ve,Ce]=Co(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),Pe=!x&&!y&&x!==0,J=ce=>{var ie,fe;Ce(Pe?!1:ce),Pe||((ie=e.onOpenChange)===null||ie===void 0||ie.call(e,ce),(fe=e.onVisibleChange)===null||fe===void 0||fe.call(e,ce))},ye=C.useMemo(()=>{var ce,ie;let fe=b;return typeof g=="object"&&(fe=(ie=(ce=g.pointAtCenter)!==null&&ce!==void 0?ce:g.arrowPointAtCenter)!==null&&ie!==void 0?ie:b),w||OR({arrowPointAtCenter:fe,autoAdjustOverflow:E,arrowWidth:F?M.sizePopupArrow:0,borderRadius:M.borderRadius,offset:M.marginXXS})},[b,g,w,M]),me=C.useMemo(()=>x===0?x:y||x||"",[y,x]),L=C.createElement(Np,{space:!0},typeof me=="function"?me():me),ae=A("tooltip",i),q=A(),ue=e["data-popover-inject"];let he=ve;!("open"in e)&&!("visible"in e)&&Pe&&(he=!1);const we=C.isValidElement(d)&&!kR(d)?d:C.createElement("span",null,d),je=we.props,Te=!je.className||typeof je.className=="string"?_e(je.className,a||`${ae}-open`):je.className,[Ne,W,ne]=HC(ae,!ue),re=WC(ae,l),X=re.arrowStyle,te=_e(_,{[`${ae}-rtl`]:T==="rtl"},re.className,I,W,ne,N,H.root,R?.root),de=_e(H.body,R?.body),[Y,Q]=xR("Tooltip",z.zIndex),Z=C.createElement(uR,Object.assign({},z,{zIndex:Y,showArrow:F,placement:j,mouseEnterDelay:S,mouseLeaveDelay:O,prefixCls:ae,classNames:{root:te,body:de},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},X),V.root),U),k),$?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},V.body),c),$?.body),re.overlayStyle)},getTooltipContainer:P||s||D,ref:oe,builtinPlacements:ye,overlay:L,visible:he,onVisibleChange:J,afterVisibleChange:u??f,arrowContent:C.createElement("span",{className:`${ae}-arrow-content`}),motion:{motionName:bR(q,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:m??!!h}),he?VC(we,{className:Te}):we);return Ne(C.createElement(Jh.Provider,{value:Q},Z))}),ds=nA;process.env.NODE_ENV!=="production"&&(ds.displayName="Tooltip");ds._InternalPanelDoNotUseOrYouWillBeFired=tA;var iA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},oA=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:iA}))},UC=C.forwardRef(oA);process.env.NODE_ENV!=="production"&&(UC.displayName="EnterOutlined");var C0={ENTER:13,ESC:27};function aA(e){return!!(e.addonBefore||e.addonAfter)}function sA(e){return!!(e.prefix||e.suffix||e.allowClear)}function S0(e,t,r){var n=t.cloneNode(!0),i=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Kl(e,t,r,n){if(r){var i=t;if(t.type==="click"){i=S0(t,e,""),r(i);return}if(e.type!=="file"&&n!==void 0){i=S0(t,e,n),r(i);return}r(i)}}function KC(e,t){if(e){e.focus(t);var r=t||{},n=r.cursor;if(n){var i=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var qC=v.forwardRef(function(e,t){var r,n,i,a=e.inputElement,s=e.children,l=e.prefixCls,c=e.prefix,d=e.suffix,u=e.addonBefore,f=e.addonAfter,h=e.className,m=e.style,g=e.disabled,x=e.readOnly,y=e.focused,w=e.triggerFocus,b=e.allowClear,E=e.value,P=e.handleReset,j=e.hidden,S=e.classes,O=e.classNames,k=e.dataAttrs,I=e.styles,_=e.components,$=e.onClear,R=s??a,z=_?.affixWrapper||"span",F=_?.groupWrapper||"span",M=_?.wrapper||"span",D=_?.groupAddon||"span",A=v.useRef(null),T=function(ue){var he;(he=A.current)!==null&&he!==void 0&&he.contains(ue.target)&&w?.()},N=sA(e),U=v.cloneElement(R,{value:E,className:_e((r=R.props)===null||r===void 0?void 0:r.className,!N&&O?.variant)||null}),H=v.useRef(null);if(v.useImperativeHandle(t,function(){return{nativeElement:H.current||A.current}}),N){var V=null;if(b){var K=!g&&!x&&E,oe="".concat(l,"-clear-icon"),pe=He(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";V=v.createElement("button",{type:"button",tabIndex:-1,onClick:function(ue){P?.(ue),$?.()},onMouseDown:function(ue){return ue.preventDefault()},className:_e(oe,Se(Se({},"".concat(oe,"-hidden"),!K),"".concat(oe,"-has-suffix"),!!d))},pe)}var ve="".concat(l,"-affix-wrapper"),Ce=_e(ve,Se(Se(Se(Se(Se({},"".concat(l,"-disabled"),g),"".concat(ve,"-disabled"),g),"".concat(ve,"-focused"),y),"".concat(ve,"-readonly"),x),"".concat(ve,"-input-with-clear-btn"),d&&b&&E),S?.affixWrapper,O?.affixWrapper,O?.variant),Pe=(d||b)&&v.createElement("span",{className:_e("".concat(l,"-suffix"),O?.suffix),style:I?.suffix},V,d);U=v.createElement(z,Nt({className:Ce,style:I?.affixWrapper,onClick:T},k?.affixWrapper,{ref:A}),c&&v.createElement("span",{className:_e("".concat(l,"-prefix"),O?.prefix),style:I?.prefix},c),U,Pe)}if(aA(e)){var J="".concat(l,"-group"),ye="".concat(J,"-addon"),me="".concat(J,"-wrapper"),L=_e("".concat(l,"-wrapper"),J,S?.wrapper,O?.wrapper),ae=_e(me,Se({},"".concat(me,"-disabled"),g),S?.group,O?.groupWrapper);U=v.createElement(F,{className:ae,ref:H},v.createElement(M,{className:L},u&&v.createElement(D,{className:ye},u),U,f&&v.createElement(D,{className:ye},f)))}return v.cloneElement(U,{className:_e((n=U.props)===null||n===void 0?void 0:n.className,h)||null,style:xe(xe({},(i=U.props)===null||i===void 0?void 0:i.style),m),hidden:j})}),lA=["show"];function YC(e,t){return C.useMemo(function(){var r={};t&&(r.show=He(t)==="object"&&t.formatter?t.formatter:!!t),r=xe(xe({},r),e);var n=r,i=n.show,a=Jr(n,lA);return xe(xe({},a),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:a.strategy||function(s){return s.length}})},[e,t])}var cA=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],uA=v.forwardRef(function(e,t){var r=e.autoComplete,n=e.onChange,i=e.onFocus,a=e.onBlur,s=e.onPressEnter,l=e.onKeyDown,c=e.onKeyUp,d=e.prefixCls,u=d===void 0?"rc-input":d,f=e.disabled,h=e.htmlSize,m=e.className,g=e.maxLength,x=e.suffix,y=e.showCount,w=e.count,b=e.type,E=b===void 0?"text":b,P=e.classes,j=e.classNames,S=e.styles,O=e.onCompositionStart,k=e.onCompositionEnd,I=Jr(e,cA),_=v.useState(!1),$=Ee(_,2),R=$[0],z=$[1],F=v.useRef(!1),M=v.useRef(!1),D=v.useRef(null),A=v.useRef(null),T=function(X){D.current&&KC(D.current,X)},N=Co(e.defaultValue,{value:e.value}),U=Ee(N,2),H=U[0],V=U[1],K=H==null?"":String(H),oe=v.useState(null),pe=Ee(oe,2),ve=pe[0],Ce=pe[1],Pe=YC(w,y),J=Pe.max||g,ye=Pe.strategy(K),me=!!J&&ye>J;v.useImperativeHandle(t,function(){var re;return{focus:T,blur:function(){var te;(te=D.current)===null||te===void 0||te.blur()},setSelectionRange:function(te,de,Y){var Q;(Q=D.current)===null||Q===void 0||Q.setSelectionRange(te,de,Y)},select:function(){var te;(te=D.current)===null||te===void 0||te.select()},input:D.current,nativeElement:((re=A.current)===null||re===void 0?void 0:re.nativeElement)||D.current}}),v.useEffect(function(){M.current&&(M.current=!1),z(function(re){return re&&f?!1:re})},[f]);var L=function(X,te,de){var Y=te;if(!F.current&&Pe.exceedFormatter&&Pe.max&&Pe.strategy(te)>Pe.max){if(Y=Pe.exceedFormatter(te,{max:Pe.max}),te!==Y){var Q,Z;Ce([((Q=D.current)===null||Q===void 0?void 0:Q.selectionStart)||0,((Z=D.current)===null||Z===void 0?void 0:Z.selectionEnd)||0])}}else if(de.source==="compositionEnd")return;V(Y),D.current&&Kl(D.current,X,n,Y)};v.useEffect(function(){if(ve){var re;(re=D.current)===null||re===void 0||re.setSelectionRange.apply(re,Wt(ve))}},[ve]);var ae=function(X){L(X,X.target.value,{source:"change"})},q=function(X){F.current=!1,L(X,X.currentTarget.value,{source:"compositionEnd"}),k?.(X)},ue=function(X){s&&X.key==="Enter"&&!M.current&&(M.current=!0,s(X)),l?.(X)},he=function(X){X.key==="Enter"&&(M.current=!1),c?.(X)},we=function(X){z(!0),i?.(X)},je=function(X){M.current&&(M.current=!1),z(!1),a?.(X)},Te=function(X){V(""),T(),D.current&&Kl(D.current,X,n)},Ne=me&&"".concat(u,"-out-of-range"),W=function(){var X=_w(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return v.createElement("input",Nt({autoComplete:r},X,{onChange:ae,onFocus:we,onBlur:je,onKeyDown:ue,onKeyUp:he,className:_e(u,Se({},"".concat(u,"-disabled"),f),j?.input),style:S?.input,ref:D,size:h,type:E,onCompositionStart:function(de){F.current=!0,O?.(de)},onCompositionEnd:q}))},ne=function(){var X=Number(J)>0;if(x||Pe.show){var te=Pe.showFormatter?Pe.showFormatter({value:K,count:ye,maxLength:J}):"".concat(ye).concat(X?" / ".concat(J):"");return v.createElement(v.Fragment,null,Pe.show&&v.createElement("span",{className:_e("".concat(u,"-show-count-suffix"),Se({},"".concat(u,"-show-count-has-suffix"),!!x),j?.count),style:xe({},S?.count)},te),x)}return null};return v.createElement(qC,Nt({},I,{prefixCls:u,className:_e(m,Ne),handleReset:Te,value:K,focused:R,triggerFocus:T,suffix:ne(),disabled:f,classes:P,classNames:j,styles:S,ref:A}),W())}),dA=`
|
|
141
|
-
min-height:0 !important;
|
|
142
|
-
max-height:none !important;
|
|
143
|
-
height:0 !important;
|
|
144
|
-
visibility:hidden !important;
|
|
145
|
-
overflow:hidden !important;
|
|
146
|
-
position:absolute !important;
|
|
147
|
-
z-index:-1000 !important;
|
|
148
|
-
top:0 !important;
|
|
149
|
-
right:0 !important;
|
|
150
|
-
pointer-events: none !important;
|
|
151
|
-
`,fA=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],sd={},mr;function pA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&sd[r])return sd[r];var n=window.getComputedStyle(e),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),s=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),l=fA.map(function(d){return"".concat(d,":").concat(n.getPropertyValue(d))}).join(";"),c={sizingStyle:l,paddingSize:a,borderSize:s,boxSizing:i};return t&&r&&(sd[r]=c),c}function hA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;mr||(mr=document.createElement("textarea"),mr.setAttribute("tab-index","-1"),mr.setAttribute("aria-hidden","true"),mr.setAttribute("name","hiddenTextarea"),document.body.appendChild(mr)),e.getAttribute("wrap")?mr.setAttribute("wrap",e.getAttribute("wrap")):mr.removeAttribute("wrap");var i=pA(e,t),a=i.paddingSize,s=i.borderSize,l=i.boxSizing,c=i.sizingStyle;mr.setAttribute("style","".concat(c,";").concat(dA)),mr.value=e.value||e.placeholder||"";var d=void 0,u=void 0,f,h=mr.scrollHeight;if(l==="border-box"?h+=s:l==="content-box"&&(h-=a),r!==null||n!==null){mr.value=" ";var m=mr.scrollHeight-a;r!==null&&(d=m*r,l==="border-box"&&(d=d+a+s),h=Math.max(d,h)),n!==null&&(u=m*n,l==="border-box"&&(u=u+a+s),f=h>u?"":"hidden",h=Math.min(u,h))}var g={height:h,overflowY:f,resize:"none"};return d&&(g.minHeight=d),u&&(g.maxHeight=u),g}var mA=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ld=0,cd=1,ud=2,gA=C.forwardRef(function(e,t){var r=e,n=r.prefixCls,i=r.defaultValue,a=r.value,s=r.autoSize,l=r.onResize,c=r.className,d=r.style,u=r.disabled,f=r.onChange,h=r.onInternalAutoSize,m=Jr(r,mA),g=Co(i,{value:a,postState:function(oe){return oe??""}}),x=Ee(g,2),y=x[0],w=x[1],b=function(oe){w(oe.target.value),f?.(oe)},E=C.useRef();C.useImperativeHandle(t,function(){return{textArea:E.current}});var P=C.useMemo(function(){return s&&He(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),j=Ee(P,2),S=j[0],O=j[1],k=!!s,I=C.useState(ud),_=Ee(I,2),$=_[0],R=_[1],z=C.useState(),F=Ee(z,2),M=F[0],D=F[1],A=function(){R(ld),process.env.NODE_ENV==="test"&&h?.()};pt(function(){k&&A()},[a,S,O,k]),pt(function(){if($===ld)R(cd);else if($===cd){var K=hA(E.current,!1,S,O);R(ud),D(K)}},[$]);var T=C.useRef(),N=function(){Oo.cancel(T.current)},U=function(oe){$===ud&&(l?.(oe),s&&(N(),T.current=Oo(function(){A()})))};C.useEffect(function(){return N},[]);var H=k?M:null,V=xe(xe({},d),H);return($===ld||$===cd)&&(V.overflowY="hidden",V.overflowX="hidden"),C.createElement(Bo,{onResize:U,disabled:!(s||l)},C.createElement("textarea",Nt({},m,{ref:E,style:V,className:_e(n,c,Se({},"".concat(n,"-disabled"),u)),disabled:u,value:y,onChange:b})))}),vA=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],yA=v.forwardRef(function(e,t){var r,n=e.defaultValue,i=e.value,a=e.onFocus,s=e.onBlur,l=e.onChange,c=e.allowClear,d=e.maxLength,u=e.onCompositionStart,f=e.onCompositionEnd,h=e.suffix,m=e.prefixCls,g=m===void 0?"rc-textarea":m,x=e.showCount,y=e.count,w=e.className,b=e.style,E=e.disabled,P=e.hidden,j=e.classNames,S=e.styles,O=e.onResize,k=e.onClear,I=e.onPressEnter,_=e.readOnly,$=e.autoSize,R=e.onKeyDown,z=Jr(e,vA),F=Co(n,{value:i,defaultValue:n}),M=Ee(F,2),D=M[0],A=M[1],T=D==null?"":String(D),N=v.useState(!1),U=Ee(N,2),H=U[0],V=U[1],K=v.useRef(!1),oe=v.useState(null),pe=Ee(oe,2),ve=pe[0],Ce=pe[1],Pe=v.useRef(null),J=v.useRef(null),ye=function(){var be;return(be=J.current)===null||be===void 0?void 0:be.textArea},me=function(){ye().focus()};v.useImperativeHandle(t,function(){var ge;return{resizableTextArea:J.current,focus:me,blur:function(){ye().blur()},nativeElement:((ge=Pe.current)===null||ge===void 0?void 0:ge.nativeElement)||ye()}}),v.useEffect(function(){V(function(ge){return!E&&ge})},[E]);var L=v.useState(null),ae=Ee(L,2),q=ae[0],ue=ae[1];v.useEffect(function(){if(q){var ge;(ge=ye()).setSelectionRange.apply(ge,Wt(q))}},[q]);var he=YC(y,x),we=(r=he.max)!==null&&r!==void 0?r:d,je=Number(we)>0,Te=he.strategy(T),Ne=!!we&&Te>we,W=function(be,Be){var se=Be;!K.current&&he.exceedFormatter&&he.max&&he.strategy(Be)>he.max&&(se=he.exceedFormatter(Be,{max:he.max}),Be!==se&&ue([ye().selectionStart||0,ye().selectionEnd||0])),A(se),Kl(be.currentTarget,be,l,se)},ne=function(be){K.current=!0,u?.(be)},re=function(be){K.current=!1,W(be,be.currentTarget.value),f?.(be)},X=function(be){W(be,be.target.value)},te=function(be){be.key==="Enter"&&I&&I(be),R?.(be)},de=function(be){V(!0),a?.(be)},Y=function(be){V(!1),s?.(be)},Q=function(be){A(""),me(),Kl(ye(),be,l)},Z=h,ce;he.show&&(he.showFormatter?ce=he.showFormatter({value:T,count:Te,maxLength:we}):ce="".concat(Te).concat(je?" / ".concat(we):""),Z=v.createElement(v.Fragment,null,Z,v.createElement("span",{className:_e("".concat(g,"-data-count"),j?.count),style:S?.count},ce)));var ie=function(be){var Be;O?.(be),(Be=ye())!==null&&Be!==void 0&&Be.style.height&&Ce(!0)},fe=!$&&!x&&!c;return v.createElement(qC,{ref:Pe,value:T,allowClear:c,handleReset:Q,suffix:Z,prefixCls:g,classNames:xe(xe({},j),{},{affixWrapper:_e(j?.affixWrapper,Se(Se({},"".concat(g,"-show-count"),x),"".concat(g,"-textarea-allow-clear"),c))}),disabled:E,focused:H,className:_e(w,Ne&&"".concat(g,"-out-of-range")),style:xe(xe({},b),ve&&!fe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ce=="string"?ce:void 0}},hidden:P,readOnly:_,onClear:k},v.createElement(gA,Nt({},z,{autoSize:$,maxLength:d,onKeyDown:te,onChange:X,onFocus:de,onBlur:Y,onCompositionStart:ne,onCompositionEnd:re,className:_e(j?.textarea),style:xe(xe({},S?.textarea),{},{resize:b?.resize}),disabled:E,prefixCls:g,onResize:ie,ref:J,readOnly:_})))}),xA={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},bA=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:xA}))},GC=C.forwardRef(bA);process.env.NODE_ENV!=="production"&&(GC.displayName="CloseCircleFilled");const XC=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:v.createElement(GC,null)}),t};function Dp(e,t,r){return _e({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const ZC=(e,t)=>t||e,QC=e=>{const[,,,,t]=Lo();return t?`${e}-css-var`:""},JC=(e,t,r=void 0)=>{var n,i;const{variant:a,[e]:s}=C.useContext(Rn),l=C.useContext(fR),c=s?.variant;let d;typeof t<"u"?d=t:r===!1?d="borderless":d=(i=(n=l??c)!==null&&n!==void 0?n:a)!==null&&i!==void 0?i:"outlined";const u=AI.includes(d);return[d,u]};function wA(e,t){const r=v.useRef([]),n=()=>{r.current.push(setTimeout(()=>{var i,a,s,l;!((i=e.current)===null||i===void 0)&&i.input&&((a=e.current)===null||a===void 0?void 0:a.input.getAttribute("type"))==="password"&&(!((s=e.current)===null||s===void 0)&&s.input.hasAttribute("value"))&&((l=e.current)===null||l===void 0||l.input.removeAttribute("value"))}))};return v.useEffect(()=>(n(),()=>r.current.forEach(i=>{i&&clearTimeout(i)})),[]),n}function CA(e,t,r,n){const{focusElCls:i,focus:a,borderElCls:s}=r,l=s?"> *":"",c=["hover",a?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${l}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[c]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function SA(e,t,r){const{borderElCls:n}=r,i=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function jA(e,t={focus:!0}){const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},CA(e,n,t,r)),SA(r,n,t))}}function em(e){return zn(e,{inputAffixPadding:e.paddingXXS})}const tm=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:a,controlHeightLG:s,fontSizeLG:l,lineHeightLG:c,paddingSM:d,controlPaddingHorizontalSM:u,controlPaddingHorizontal:f,colorFillAlter:h,colorPrimaryHover:m,colorPrimary:g,controlOutlineWidth:x,controlOutline:y,colorErrorOutline:w,colorWarningOutline:b,colorBgContainer:E,inputFontSize:P,inputFontSizeLG:j,inputFontSizeSM:S}=e,O=P||r,k=S||O,I=j||l,_=Math.round((t-O*n)/2*10)/10-i,$=Math.round((a-k*n)/2*10)/10-i,R=Math.ceil((s-I*c)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max($,0),paddingBlockLG:Math.max(R,0),paddingInline:d-i,paddingInlineSM:u-i,paddingInlineLG:f-i,addonBg:h,activeBorderColor:g,hoverBorderColor:m,activeShadow:`0 0 0 ${x}px ${y}`,errorActiveShadow:`0 0 0 ${x}px ${w}`,warningActiveShadow:`0 0 0 ${x}px ${b}`,hoverBg:E,activeBg:E,inputFontSize:O,inputFontSizeLG:I,inputFontSizeSM:k}},EA=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),rm=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},EA(zn(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),eS=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),j0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},eS(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),PA=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},eS(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},rm(e))}),j0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),j0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),E0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),OA=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},E0(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),E0(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},rm(e))}})}),kA=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},tS=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t?.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},P0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},tS(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),TA=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},tS(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},rm(e))}),P0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),P0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),O0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),IA=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},O0(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),O0(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${Qe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),rS=(e,t)=>({background:e.colorBgContainer,borderWidth:`${Qe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),k0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},rS(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),MA=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rS(e,{borderColor:e.colorBorder,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),k0(e,{status:"error",borderColor:e.colorError,activeBorderColor:e.colorError,affixColor:e.colorError})),k0(e,{status:"warning",borderColor:e.colorWarning,activeBorderColor:e.colorWarning,affixColor:e.colorWarning})),t)}),RA=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),nS=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${Qe(t)} ${Qe(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},iS=e=>({padding:`${Qe(e.paddingBlockSM)} ${Qe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),oS=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Qe(e.paddingBlock)} ${Qe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},RA(e.colorTextPlaceholder)),{"&-lg":Object.assign({},nS(e)),"&-sm":Object.assign({},iS(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),AA=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},nS(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},iS(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Qe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${Qe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${Qe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${Qe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${Qe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},iM()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
152
|
-
& > ${t}-affix-wrapper,
|
|
153
|
-
& > ${t}-number-affix-wrapper,
|
|
154
|
-
& > ${r}-picker-range
|
|
155
|
-
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select > ${r}-select-selector,
|
|
156
|
-
& > ${r}-select-auto-complete ${t},
|
|
157
|
-
& > ${r}-cascader-picker ${t},
|
|
158
|
-
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
159
|
-
& > ${r}-select:first-child > ${r}-select-selector,
|
|
160
|
-
& > ${r}-select-auto-complete:first-child ${t},
|
|
161
|
-
& > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
162
|
-
& > ${r}-select:last-child > ${r}-select-selector,
|
|
163
|
-
& > ${r}-cascader-picker:last-child ${t},
|
|
164
|
-
& > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},NA=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:i}=e,s=i(r).sub(i(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Xh(e)),oS(e)),PA(e)),TA(e)),kA(e)),MA(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},DA=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Qe(e.inputAffixPadding)}`}}}},_A=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:i,colorIcon:a,colorIconHover:s,iconCls:l}=e,c=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},oS(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),DA(e)),{[`${l}${t}-password-icon`]:{color:a,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:s}}}),[`${t}-underlined`]:{borderRadius:0},[d]:{[`${l}${t}-password-icon`]:{color:a,cursor:"not-allowed","&:hover":{color:a}}}}},BA=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Xh(e)),AA(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}}},OA(e)),IA(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},$A=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${n}-button:not(${r}-btn-color-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
|
|
165
|
-
> ${t},
|
|
166
|
-
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},LA=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},aS=cs(["Input","Shared"],e=>{const t=zn(e,em(e));return[NA(t),_A(t)]},tm,{resetFont:!1}),zA=cs(["Input","Component"],e=>{const t=zn(e,em(e));return[BA(t),$A(t),LA(t),jA(t)]},tm,{resetFont:!1});function FA(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var VA=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 HA=v.forwardRef((e,t)=>{const{prefixCls:r,bordered:n=!0,status:i,size:a,disabled:s,onBlur:l,onFocus:c,suffix:d,allowClear:u,addonAfter:f,addonBefore:h,className:m,style:g,styles:x,rootClassName:y,onChange:w,classNames:b,variant:E}=e,P=VA(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Te}=hn("Input");Te(!("bordered"in e),"bordered","variant")}const{getPrefixCls:j,direction:S,allowClear:O,autoComplete:k,className:I,style:_,classNames:$,styles:R}=zc("input"),z=j("input",r),F=v.useRef(null),M=QC(z),[D,A,T]=aS(z,y),[N]=zA(z,M),{compactSize:U,compactItemClassnames:H}=$C(z,S),V=_C(Te=>{var Ne;return(Ne=a??U)!==null&&Ne!==void 0?Ne:Te}),K=v.useContext(Fa),oe=s??K,{status:pe,hasFeedback:ve,feedbackIcon:Ce}=v.useContext(Ha),Pe=ZC(pe,i),J=FA(e)||!!ve,ye=v.useRef(J);if(process.env.NODE_ENV!=="production"){const Te=hn("Input");v.useEffect(()=>{var Ne;J&&!ye.current&&process.env.NODE_ENV!=="production"&&Te(document.activeElement===((Ne=F.current)===null||Ne===void 0?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ye.current=J},[J])}const me=wA(F),L=Te=>{me(),l?.(Te)},ae=Te=>{me(),c?.(Te)},q=Te=>{me(),w?.(Te)},ue=(ve||d)&&v.createElement(v.Fragment,null,d,ve&&Ce),he=XC(u??O),[we,je]=JC("input",E,n);return D(N(v.createElement(uA,Object.assign({ref:is(t,F),prefixCls:z,autoComplete:k},P,{disabled:oe,onBlur:L,onFocus:ae,style:Object.assign(Object.assign({},_),g),styles:Object.assign(Object.assign({},R),x),suffix:ue,allowClear:he,className:_e(m,y,T,M,H,I),onChange:q,addonBefore:h&&v.createElement(Np,{form:!0,space:!0},h),addonAfter:f&&v.createElement(Np,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},b),$),{input:_e({[`${z}-sm`]:V==="small",[`${z}-lg`]:V==="large",[`${z}-rtl`]:S==="rtl"},b?.input,$.input,A),variant:_e({[`${z}-${we}`]:je},Dp(z,Pe)),affixWrapper:_e({[`${z}-affix-wrapper-sm`]:V==="small",[`${z}-affix-wrapper-lg`]:V==="large",[`${z}-affix-wrapper-rtl`]:S==="rtl"},A),wrapper:_e({[`${z}-group-rtl`]:S==="rtl"},A),groupWrapper:_e({[`${z}-group-wrapper-sm`]:V==="small",[`${z}-group-wrapper-lg`]:V==="large",[`${z}-group-wrapper-rtl`]:S==="rtl",[`${z}-group-wrapper-${we}`]:je},Dp(`${z}-group-wrapper`,Pe,ve),A)})}))))});process.env.NODE_ENV!=="production"&&(HA.displayName="Input");const WA=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
167
|
-
&-allow-clear > ${t},
|
|
168
|
-
&-affix-wrapper${n}-has-feedback ${t}
|
|
169
|
-
`]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},UA=cs(["Input","TextArea"],e=>{const t=zn(e,em(e));return WA(t)},tm,{resetFont:!1});var KA=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 qA=v.forwardRef((e,t)=>{var r;const{prefixCls:n,bordered:i=!0,size:a,disabled:s,status:l,allowClear:c,classNames:d,rootClassName:u,className:f,style:h,styles:m,variant:g,showCount:x,onMouseDown:y,onResize:w}=e,b=KA(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:he}=hn("TextArea");he(!("bordered"in e),"bordered","variant")}const{getPrefixCls:E,direction:P,allowClear:j,autoComplete:S,className:O,style:k,classNames:I,styles:_}=zc("textArea"),$=C.useContext(Fa),R=s??$,{status:z,hasFeedback:F,feedbackIcon:M}=C.useContext(Ha),D=ZC(z,l),A=C.useRef(null);C.useImperativeHandle(t,()=>{var he;return{resizableTextArea:(he=A.current)===null||he===void 0?void 0:he.resizableTextArea,focus:we=>{var je,Te;KC((Te=(je=A.current)===null||je===void 0?void 0:je.resizableTextArea)===null||Te===void 0?void 0:Te.textArea,we)},blur:()=>{var we;return(we=A.current)===null||we===void 0?void 0:we.blur()}}});const T=E("input",n),N=QC(T),[U,H,V]=aS(T,u),[K]=UA(T,N),{compactSize:oe,compactItemClassnames:pe}=$C(T,P),ve=_C(he=>{var we;return(we=a??oe)!==null&&we!==void 0?we:he}),[Ce,Pe]=JC("textArea",g,i),J=XC(c??j),[ye,me]=C.useState(!1),[L,ae]=C.useState(!1),q=he=>{me(!0),y?.(he);const we=()=>{me(!1),document.removeEventListener("mouseup",we)};document.addEventListener("mouseup",we)},ue=he=>{var we,je;if(w?.(he),ye&&typeof getComputedStyle=="function"){const Te=(je=(we=A.current)===null||we===void 0?void 0:we.nativeElement)===null||je===void 0?void 0:je.querySelector("textarea");Te&&getComputedStyle(Te).resize==="both"&&ae(!0)}};return U(K(C.createElement(yA,Object.assign({autoComplete:S},b,{style:Object.assign(Object.assign({},k),h),styles:Object.assign(Object.assign({},_),m),disabled:R,allowClear:J,className:_e(V,N,f,u,pe,O,L&&`${T}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),I),{textarea:_e({[`${T}-sm`]:ve==="small",[`${T}-lg`]:ve==="large"},H,d?.textarea,I.textarea,ye&&`${T}-mouse-active`),variant:_e({[`${T}-${Ce}`]:Pe},Dp(T,D)),affixWrapper:_e(`${T}-textarea-affix-wrapper`,{[`${T}-affix-wrapper-rtl`]:P==="rtl",[`${T}-affix-wrapper-sm`]:ve==="small",[`${T}-affix-wrapper-lg`]:ve==="large",[`${T}-textarea-show-count`]:x||((r=e.count)===null||r===void 0?void 0:r.show)},H)}),prefixCls:T,suffix:F&&C.createElement("span",{className:`${T}-textarea-suffix`},M),showCount:x,ref:A,onResize:ue,onMouseDown:q}))))}),YA=(e,t,r,n)=>{const{titleMarginBottom:i,fontWeightStrong:a}=n;return{marginBottom:i,color:r,fontWeight:a,fontSize:e,lineHeight:t}},GA=e=>{const t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
|
|
170
|
-
h${n}&,
|
|
171
|
-
div&-h${n},
|
|
172
|
-
div&-h${n} > textarea,
|
|
173
|
-
h${n}
|
|
174
|
-
`]=YA(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},XA=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},hC(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},ZA=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Ll[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),QA=e=>{const{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),marginTop:e.calc(n).mul(-1).equal(),marginBottom:`calc(1em - ${Qe(n)})`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},JA=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),eN=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),tN=e=>{const{componentCls:t,titleMarginTop:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},GA(e)),{[`
|
|
175
|
-
& + h1${t},
|
|
176
|
-
& + h2${t},
|
|
177
|
-
& + h3${t},
|
|
178
|
-
& + h4${t},
|
|
179
|
-
& + h5${t}
|
|
180
|
-
`]:{marginTop:r},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:r}}}),ZA(e)),XA(e)),{[`
|
|
181
|
-
${t}-expand,
|
|
182
|
-
${t}-collapse,
|
|
183
|
-
${t}-edit,
|
|
184
|
-
${t}-copy
|
|
185
|
-
`]:Object.assign(Object.assign({},hC(e)),{marginInlineStart:e.marginXXS})}),QA(e)),JA(e)),eN()),{"&-rtl":{direction:"rtl"}})}},rN=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),sS=cs("Typography",tN,rN),nN=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:m=C.createElement(UC,null)}=e,g=C.useRef(null),x=C.useRef(!1),y=C.useRef(null),[w,b]=C.useState(c);C.useEffect(()=>{b(c)},[c]),C.useEffect(()=>{var F;if(!((F=g.current)===null||F===void 0)&&F.resizableTextArea){const{textArea:M}=g.current.resizableTextArea;M.focus();const{length:D}=M.value;M.setSelectionRange(D,D)}},[]);const E=({target:F})=>{b(F.value.replace(/[\n\r]/g,""))},P=()=>{x.current=!0},j=()=>{x.current=!1},S=({keyCode:F})=>{x.current||(y.current=F)},O=()=>{d(w.trim())},k=({keyCode:F,ctrlKey:M,altKey:D,metaKey:A,shiftKey:T})=>{y.current!==F||x.current||M||D||A||T||(F===C0.ENTER?(O(),f?.()):F===C0.ESC&&u())},I=()=>{O()},[_,$,R]=sS(t),z=_e(t,`${t}-edit-content`,{[`${t}-rtl`]:a==="rtl",[`${t}-${h}`]:!!h},n,$,R);return _(C.createElement("div",{className:z,style:i},C.createElement(qA,{ref:g,maxLength:s,value:w,onChange:E,onKeyDown:S,onKeyUp:k,onCompositionStart:P,onCompositionEnd:j,onBlur:I,"aria-label":r,rows:1,autoSize:l}),m!==null?VC(m,{className:`${t}-edit-content-confirm`}):null))};var dd,T0;function iN(){return T0||(T0=1,dd=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()}}),dd}var fd,I0;function lS(){if(I0)return fd;I0=1;var e=iN(),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,m=!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 g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");m=!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),m=!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 m}return fd=i,fd}var oN=lS();const aN=jr(oN),sN=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];var lN=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 cN=({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=wr(u=>lN(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;aN(h||sN(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 pd(e,t){return C.useMemo(()=>{const r=!!e;return[r,Object.assign(Object.assign({},t),r&&typeof e=="object"?e:null)]},[e])}const uN=e=>{const t=v.useRef(void 0);return v.useEffect(()=>{t.current=e}),t.current},dN=(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 fN=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 cS=C.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:i,rootClassName:a,setContentRef:s,children:l,direction:c,style:d}=e,u=fN(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:f,direction:h,className:m,style:g}=zc("typography"),x=c??h,y=s?is(t,s):t,w=f("typography",r);process.env.NODE_ENV!=="production"&&hn("Typography").deprecated(!s,"setContentRef","ref");const[b,E,P]=sS(w),j=_e(w,m,{[`${w}-rtl`]:x==="rtl"},i,a,E,P),S=Object.assign(Object.assign({},g),d);return b(C.createElement(n,Object.assign({className:j,style:S,ref:y},u),l))});process.env.NODE_ENV!=="production"&&(cS.displayName="Typography");var pN={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"},hN=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:pN}))},uS=C.forwardRef(hN);process.env.NODE_ENV!=="production"&&(uS.displayName="CheckOutlined");var mN={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"},gN=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:mN}))},dS=C.forwardRef(gN);process.env.NODE_ENV!=="production"&&(dS.displayName="CopyOutlined");var vN={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"},yN=function(t,r){return C.createElement(Ln,Nt({},t,{ref:r,icon:vN}))},fS=C.forwardRef(yN);process.env.NODE_ENV!=="production"&&(fS.displayName="LoadingOutlined");function M0(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function hd(e,t,r){return e===!0||e===void 0?t:e||r&&t}function xN(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 nm=e=>["string","number"].includes(typeof e),bN=({prefixCls:e,copied:t,locale:r,iconOnly:n,tooltips:i,icon:a,tabIndex:s,onCopy:l,loading:c})=>{const d=M0(i),u=M0(a),{copied:f,copy:h}=r??{},m=t?f:h,g=hd(d[t?1:0],m),x=typeof g=="string"?g:m;return C.createElement(ds,{title:g,getPopupContainer:y=>y.parentNode},C.createElement("button",{type:"button",className:_e(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:n}),onClick:l,"aria-label":x,tabIndex:s},t?hd(u[1],C.createElement(uS,null),!0):hd(u[0],c?C.createElement(fS,null):C.createElement(dS,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)}),wN=e=>e.reduce((t,r)=>t+(nm(r)?String(r).length:1),0);function R0(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=nm(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 md=0,gd=1,vd=2,yd=3,A0=4,Js={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function CN(e){const{enableMeasure:t,width:r,text:n,children:i,rows:a,expanded:s,miscDeps:l,onEllipsis:c}=e,d=C.useMemo(()=>Na(n),[n]),u=C.useMemo(()=>wN(d),[n]),f=C.useMemo(()=>i(d,!1),[n]),[h,m]=C.useState(null),g=C.useRef(null),x=C.useRef(null),y=C.useRef(null),w=C.useRef(null),b=C.useRef(null),[E,P]=C.useState(!1),[j,S]=C.useState(md),[O,k]=C.useState(0),[I,_]=C.useState(null);pt(()=>{S(t&&r&&u?gd:md)},[r,n,a,t,d]),pt(()=>{var F,M,D,A;if(j===gd){S(vd);const T=x.current&&getComputedStyle(x.current).whiteSpace;_(T)}else if(j===vd){const T=!!(!((F=y.current)===null||F===void 0)&&F.isExceed());S(T?yd:A0),m(T?[0,u]:null),P(T);const N=((M=y.current)===null||M===void 0?void 0:M.getHeight())||0,U=a===1?0:((D=w.current)===null||D===void 0?void 0:D.getHeight())||0,H=((A=b.current)===null||A===void 0?void 0:A.getHeight())||0,V=Math.max(N,U+H);k(V+1),c(T)}},[j]);const $=h?Math.ceil((h[0]+h[1])/2):0;pt(()=>{var F;const[M,D]=h||[0,0];if(M!==D){const T=(((F=g.current)===null||F===void 0?void 0:F.getHeight())||0)>O;let N=$;D-M===1&&(N=T?M:D),m(T?[M,N]:[N,D])}},[h,$]);const R=C.useMemo(()=>{if(!t)return i(d,!1);if(j!==yd||!h||h[0]!==h[1]){const F=i(d,!1);return[A0,md].includes(j)?F:C.createElement("span",{style:Object.assign(Object.assign({},Js),{WebkitLineClamp:a})},F)}return i(s?d:R0(d,h[0]),E)},[s,j,h,d].concat(Wt(l))),z={width:r,margin:0,padding:0,whiteSpace:I==="nowrap"?"normal":"inherit"};return C.createElement(C.Fragment,null,R,j===vd&&C.createElement(C.Fragment,null,C.createElement(Qs,{style:Object.assign(Object.assign(Object.assign({},z),Js),{WebkitLineClamp:a}),ref:y},f),C.createElement(Qs,{style:Object.assign(Object.assign(Object.assign({},z),Js),{WebkitLineClamp:a-1}),ref:w},f),C.createElement(Qs,{style:Object.assign(Object.assign(Object.assign({},z),Js),{WebkitLineClamp:1}),ref:b},i([],!0))),j===yd&&h&&h[0]!==h[1]&&C.createElement(Qs,{style:Object.assign(Object.assign({},z),{top:400}),ref:g},i(R0(d,$),!0)),j===gd&&C.createElement("span",{style:{whiteSpace:"inherit"},ref:x}))}const pS=({enableEllipsis:e,isEllipsis:t,children:r,tooltipProps:n})=>!n?.title||!e?r:C.createElement(ds,Object.assign({open:t?void 0:!1},n),r);process.env.NODE_ENV!=="production"&&(pS.displayName="EllipsisTooltip");var SN=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 jN({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 EN="...",N0=["delete","mark","code","underline","strong","keyboard","italic"],PN=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:m}=e,g=SN(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:x,direction:y}=C.useContext(Rn),[w]=wI("Text"),b=C.useRef(null),E=C.useRef(null),P=x("typography",n),j=_w(g,N0),[S,O]=pd(u),[k,I]=Co(!1,{value:O.editing}),{triggerType:_=["icon"]}=O,$=se=>{var Ie;se&&((Ie=O.onStart)===null||Ie===void 0||Ie.call(O)),I(se)},R=uN(k);pt(()=>{var se;!k&&R&&((se=E.current)===null||se===void 0||se.focus())},[k]);const z=se=>{se?.preventDefault(),$(!0)},F=se=>{var Ie;(Ie=O.onChange)===null||Ie===void 0||Ie.call(O,se),$(!1)},M=()=>{var se;(se=O.onCancel)===null||se===void 0||se.call(O),$(!1)},[D,A]=pd(f),{copied:T,copyLoading:N,onClick:U}=cN({copyConfig:A,children:c}),[H,V]=C.useState(!1),[K,oe]=C.useState(!1),[pe,ve]=C.useState(!1),[Ce,Pe]=C.useState(!1),[J,ye]=C.useState(!0),[me,L]=pd(d,{expandable:!1,symbol:se=>se?w?.collapse:w?.expand}),[ae,q]=Co(L.defaultExpanded||!1,{value:L.expanded}),ue=me&&(!ae||L.expandable==="collapsible"),{rows:he=1}=L,we=C.useMemo(()=>ue&&(L.suffix!==void 0||L.onEllipsis||L.expandable||S||D),[ue,L,S,D]);pt(()=>{me&&!we&&(V(Rv("webkitLineClamp")),oe(Rv("textOverflow")))},[we,me]);const[je,Te]=C.useState(ue),Ne=C.useMemo(()=>we?!1:he===1?K:H,[we,K,H]);pt(()=>{Te(Ne&&ue)},[Ne,ue]);const W=ue&&(je?Ce:pe),ne=ue&&he===1&&je,re=ue&&he>1&&je,X=(se,Ie)=>{var Fe;q(Ie.expanded),(Fe=L.onExpand)===null||Fe===void 0||Fe.call(L,se,Ie)},[te,de]=C.useState(0),Y=({offsetWidth:se})=>{de(se)},Q=se=>{var Ie;ve(se),pe!==se&&((Ie=L.onEllipsis)===null||Ie===void 0||Ie.call(L,se))};C.useEffect(()=>{const se=b.current;if(me&&je&&se){const Ie=xN(se);Ce!==Ie&&Pe(Ie)}},[me,je,c,re,J,te]),C.useEffect(()=>{const se=b.current;if(typeof IntersectionObserver>"u"||!se||!je||!ue)return;const Ie=new IntersectionObserver(()=>{ye(!!se.offsetParent)});return Ie.observe(se),()=>{Ie.disconnect()}},[je,ue]);const Z=dN(L.tooltip,O.text,c),ce=C.useMemo(()=>{if(!(!me||je))return[O.text,c,m,Z.title].find(nm)},[me,je,m,Z.title,W]);if(k)return C.createElement(nN,{value:(r=O.text)!==null&&r!==void 0?r:typeof c=="string"?c:"",onSave:F,onCancel:M,onEnd:O.onEnd,prefixCls:P,className:i,style:a,direction:y,component:h,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const ie=()=>{const{expandable:se,symbol:Ie}=L;return se?C.createElement("button",{type:"button",key:"expand",className:`${P}-${ae?"collapse":"expand"}`,onClick:Fe=>X(Fe,{expanded:!ae}),"aria-label":ae?w.collapse:w?.expand},typeof Ie=="function"?Ie(ae):Ie):null},fe=()=>{if(!S)return;const{icon:se,tooltip:Ie,tabIndex:Fe}=O,Vr=Na(Ie)[0]||w?.edit,rn=typeof Vr=="string"?Vr:"";return _.includes("icon")?C.createElement(ds,{key:"edit",title:Ie===!1?"":Vr},C.createElement("button",{type:"button",ref:E,className:`${P}-edit`,onClick:z,"aria-label":rn,tabIndex:Fe},se||C.createElement(jw,{role:"button"}))):null},ge=()=>D?C.createElement(bN,Object.assign({key:"copy"},A,{prefixCls:P,copied:T,locale:w,onCopy:U,loading:N,iconOnly:c==null})):null,be=se=>[se&&ie(),fe(),ge()],Be=se=>[se&&!ae&&C.createElement("span",{"aria-hidden":!0,key:"ellipsis"},EN),L.suffix,be(se)];return C.createElement(Bo,{onResize:Y,disabled:!ue},se=>C.createElement(pS,{tooltipProps:Z,enableEllipsis:ue,isEllipsis:W},C.createElement(cS,Object.assign({className:_e({[`${P}-${s}`]:s,[`${P}-disabled`]:l,[`${P}-ellipsis`]:me,[`${P}-ellipsis-single-line`]:ne,[`${P}-ellipsis-multiple-line`]:re},i),prefixCls:n,style:Object.assign(Object.assign({},a),{WebkitLineClamp:re?he:void 0}),component:h,ref:is(se,b,t),direction:y,onClick:_.includes("text")?z:void 0,"aria-label":ce?.toString(),title:m},j),C.createElement(CN,{enableMeasure:ue&&!je,text:c,rows:he,width:te,onEllipsis:Q,expanded:ae,miscDeps:[T,ae,N,S,D,w].concat(Wt(N0.map(Ie=>e[Ie])))},(Ie,Fe)=>jN(e,C.createElement(C.Fragment,null,Ie.length>0&&Fe&&!ae&&ce?C.createElement("span",{key:"show-content","aria-hidden":!0},Ie):Ie,Be(Fe)))))))}),ON=C.forwardRef((e,t)=>C.createElement(PN,Object.assign({ref:t},e,{component:"div"}))),hS=(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=hS(i.children,t,i);if(a.node)return a}}return{node:null,ctx:null}},mS=(e,t)=>{if(!e.children)return!1;for(const r of e.children)if(r.key===t||mS(r,t))return!0;return!1};function kN({open:e,onClose:t}){const{nodes:r,rootIds:n,addFolder:i,editFolder:a,removeFolder:s,removeMenu:l,moveNode:c}=tt.useFavoriteStore(),d=v.useRef(null),[u,f]=v.useState([]),[h,m]=v.useState([]),[g,x]=v.useState(""),[y,w]=v.useState("ADD"),[b,E]=v.useState(!1),[P,j]=v.useState("");v.useEffect(()=>{e&&m(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"&&m(k=>[...k,P]),!b&&d.current&&(j("-"),d.current.resetFields())},[b,y,P,r]);const S=(k,I)=>{const _=($,R="-")=>{const z=k[$];if(!z)return null;const F={key:z.bkmkId,type:z.type,title:z.type==="F"?z.bkmkNm:z.menuNm?`${z.menuNm} (${z.menuId})`:z.menuId,parentId:R,sortOrdr:z.sortOrdr??0};if(z.type==="F"){const D=(z.children??[]).map(A=>_(A,z.bkmkId)).filter(Boolean);return{...F,children:D}}return F};return I.map($=>_($,"-")).filter(Boolean)},O=()=>{if(w("ADD"),!g){j("-"),E(!0);return}const k=r[g];if(!k){j("-"),E(!0);return}k.type==="F"?j(k.bkmkId):j(k.prntBkmkId),E(!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(I=>I.type==="F").map(I=>I.bkmkId);m(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:()=>m([])})})]})})]}),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:I})=>{const _=k.type==="F";return I===0?_:!0},onDrop:k=>{const{dragNode:I,node:_,dropPosition:$,dropToGap:R}=k;if(I.key===_.key||mS(I,_.key))return;let z,F;if(R){const D=hS(u,_.key).ctx,A=D.index;z=D.parent?D.parent.key:"-",F=$>0?A+1:A}else{if(_.type!=="F")return;const D=_.children||[];z=_.key,F=D.length}const M=le.getUserId();if(I.type==="F")c({bkmkId:I.key,newPrntBkmkId:z,sortOrdr:F,userId:M}).catch(()=>{p.Modal.error({title:"이동 실패",content:"폴더 이동 중 오류가 발생했어요."})});else{if(z==="-"){p.Modal.warning({title:"이동 불가",content:"메뉴는 최상위로 이동할 수 없어요."});return}c({bkmkId:I.key,newPrntBkmkId:z,sortOrdr:F,userId:M}).catch(()=>{p.Modal.error({title:"이동 실패",content:"메뉴 이동 중 오류가 발생했어요."})})}R===!1&&m(D=>Array.from(new Set([...D,_.key])))},showLine:!0,treeData:u,selectedKeys:[g],expandedKeys:h,onExpand:m,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(G.PlusOutlined,{style:{opacity:.8},onClick:()=>{w("ADD"),j(k.key),E(!0)}}),o.jsx(G.EditOutlined,{style:{opacity:.8},onClick:()=>{w("EDIT"),j(k.key),E(!0)}})]}),o.jsx(G.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"),I=le.getUserId();if(y==="ADD"){const _=__SYS_CD__??"KH",$=d.current.getFieldValue("prntBkmkId");i(k,$,_,I).then(()=>{E(!1)})}else{const _=d.current.getFieldValue("bkmkId");a(_,I,k).then(()=>{E(!1)})}},centered:!0,width:400,onCancel:()=>E(!1),okButtonProps:{className:"bwg-btn"},cancelButtonProps:{className:"bwg-btn"},styles:{body:{padding:20}},children:o.jsxs(B.BwgForm,{ref:d,style:{padding:0},children:[o.jsx(B.BwgInput,{itemProps:{name:y==="EDIT"?"bkmkId":"prntBkmkId",hidden:!0}}),o.jsx(B.BwgInput,{itemProps:{label:"상위 폴더명",name:"prntBkmkNm",hidden:P==="-"||y==="EDIT"},inputProps:{disabled:!0}}),o.jsx(B.BwgInput,{itemProps:{label:"폴더명",name:"bkmkNm"}})]})})})]})}function TN({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),[m,g]=v.useState(!1),[x,y]=v.useState(!1),[w,b]=v.useState(null);tt.useFavoriteStore(N=>N.treeNodes);const{nodes:E,getPrntBkmkIdByMenuId:P,getNodeByMenuId:j,isMenuBookmarked:S,removeMenuByMenuId:O,addMenuToFolder:k,convertToAntTreeData:I}=tt.useFavoriteStore(),_=tt.useFavoriteStore(N=>N.rootIds),$=v.useMemo(()=>I(E,_,n,!0),[E,_,n]),R=tt.useMenuViewStore(N=>N.activeMenuItem??{menuId:"",menuNm:""}),z=v.useMemo(()=>{if(!R?.menuId)return"";const N=j(R.menuId);if(!N)return"";if(N.fullPath)return N.fullPath;const U=H=>{const V=E[H];if(!V)return"";if(V.prntBkmkId==="-")return`${V.bkmkNm||R?.menuNm}`;const K=U(V.prntBkmkId);return K?`${K} > ${V.bkmkNm||R?.menuNm}`:V.bkmkNm||R?.menuNm};return console.log("bookmarkNode ::::: ",N),console.log(U(N.bkmkId)),U(N.bkmkId)},[R?.menuId,j,E]);v.useEffect(()=>{t&&R?.menuId&&S(R.menuId)?u([P(R.menuId)]):t&&R?.menuId&&!S(R.menuId)?u(_):(u([]),c([]),b(null),y(!1))},[t,R?.menuId,S,P]),v.useEffect(()=>{if(!x||!R?.menuId)return;const N=P(R.menuId);!N||!E[N]||(i(""),c([N]),b(N))},[x,R?.menuId,E,P]);const F=(N,U)=>{k(N,U).then(H=>{console.log("AddMenuToFolder ::::: ",H),H||u(V=>V.includes(N)?V:[...V,N])})},M=N=>{O(N)},D=async N=>{R?.menuId&&(await O(R.menuId),await k(N,R),y(!1),b(null),u(U=>U.includes(N)?U:[...U,N]))},A=()=>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(G.ArrowLeftOutlined,{}),onClick:()=>y(!1),style:{width:26,height:26}}),"폴더 변경"]}),R&&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:R.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",R.menuId,")"]})]})]})}),T(),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&&D(String(w)),children:"이동"})]})]}),T=()=>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(G.SearchOutlined,{}),allowClear:!0,value:n,onChange:N=>i(N.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 N=Object.values(E).filter(U=>U.type==="F").map(U=>U.bkmkId);u(N)},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:N=>{c(N),b(N[0])},autoExpandParent:!0,titleRender:N=>{const U=String(N.key),H=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:N.title}),!S(R?.menuId)&&R&&H&&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:V=>{V.stopPropagation(),F(U,R)},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?A():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(R?.menuId)?"saved":"add"}`}),"북마크"," ",S(R?.menuId)?"저장됨":"추가"]}),R&&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:R.menuNm})," ",o.jsxs("span",{style:{color:"#939393"},children:["(",R.menuId,")"]})]})]})}),S(R?.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:`📁 > ${z}`||"알 수 없음"})]}):T(),o.jsxs(ze,{style:{padding:"15px 20px",borderTop:"1px solid #eeeeee"},layoutAlign:"right",children:[R&&!S(R.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 N=String(l[0]);let U="-";N&&E[N]&&(U=E[N].type=="M"?E[N].prntBkmkId:N),F(U,R)},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:()=>M(R.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:()=>{g(t),h(!0)},children:"관리"})]})]}),children:o.jsx("span",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center"},children:e})}),o.jsx(kN,{open:f,onClose:()=>{h(!1),m&&r(!0)}})]})}const IN=e=>{const{searchBoxRef:t}=st.useSearchBox();return o.jsx(No,{ref:t,...e})},Rt=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}=tt.useUserStore(),{activeMenuItem:m}=tt.useMenuViewStore(),{loadFavoritesIfNeeded:g,isMenuBookmarked:x}=tt.useFavoriteStore(),{loading:y}=tt.useLoadingStore(),{resetForm:w,setDefaultValue:b,searchBoxRef:E}=st.useSearchBox(),P=st.useSizeConfig();v.useImperativeHandle(u,()=>({menuId:m?.menuId}),[m?.menuId]);const[j,S]=v.useState({isInitialized:!1,isReady:!1,error:null,loading:!0,preRenderComplete:!1,postRenderComplete:!1}),{openCorePopup:O}=st.usePopup(),k=async()=>{if(n.length===0){S(T=>({...T,preRenderComplete:!0}));return}try{for(const T of n)await T();S(T=>({...T,preRenderComplete:!0}))}catch(T){S(N=>({...N,error:T instanceof Error?T.message:"사전 렌더링 실패",preRenderComplete:!0}))}},I=async()=>{if(i.length===0){S(T=>({...T,postRenderComplete:!0}));return}try{for(const T of i)await T();S(T=>({...T,postRenderComplete:!0}))}catch(T){S(N=>({...N,error:T instanceof Error?T.message:"사후 렌더링 실패",postRenderComplete:!0}))}};v.useEffect(()=>{if(j.isInitialized)return;(async()=>{try{await k(),S(N=>({...N,isInitialized:!0,loading:!1}))}catch(N){console.error("BwgView 초기화 실패:",N),S(U=>({...U,isInitialized:!0,loading:!1}))}})()},[]),v.useEffect(()=>{f?.userId&&g(f.userId)},[g,f?.userId]);const _=v.useMemo(()=>m?.menuId?{menuId:m.menuId,grpId:"CUSTOM"}:!1,[m?.menuId]),$=v.useMemo(()=>m?.menuId?{menuId:m.menuId,grpId:"DEFAULT"}:!1,[m?.menuId]);v.useEffect(()=>{j.isInitialized&&j.preRenderComplete&&!j.isReady&&setTimeout(async()=>{await I(),S(N=>({...N,isReady:!0}))},100)},[j.isInitialized,j.preRenderComplete,j.isReady]),v.useEffect(()=>{s&&S(T=>({...T,error:s}))},[s]),v.useEffect(()=>{t&&t.defaultValue&&E?.current&&b(t.defaultValue)},[t,E,b]),v.useEffect(()=>{if(!t)return;const T=N=>{N.ctrlKey&&(N.key==="d"||N.key==="D")&&(N.preventDefault(),N.stopPropagation(),w())};return window.addEventListener("keydown",T),()=>{window.removeEventListener("keydown",T)}},[t,w]);const R=()=>o.jsxs("div",{className:"bwgview-header-container",children:[o.jsxs("div",{className:"bwgview-header",children:[o.jsx("div",{className:"bwgview-header-left",children:A.LEFT}),o.jsx("div",{className:"bwgview-header-right",children:A.RIGHT})]}),t&&o.jsx(IN,{reqRows:t.reqRows,subRows:t.subRows,border:t.border,labelDisplay:t.labelDisplay,header:t.header})]});if(v.useEffect(()=>{},[f,m]),j.error||s)return o.jsx("div",{style:{padding:"24px"},children:o.jsx(p.Alert,{message:"오류 발생",description:j.error||s,type:"error",showIcon:!0})});const z=()=>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"})}),F=()=>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"})}),M=T=>o.jsx(G,{component:z,...T}),D=T=>o.jsx(G,{component:F,...T}),A={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:[m&&o.jsx(TN,{triggerIcon:x(m.menuId)?o.jsx(M,{className:"bookmark-icon",style:{color:"#faad14"}}):o.jsx(D,{className:"bookmark-icon"})}),o.jsxs(p.Space.Compact,{style:{alignItems:"center"},children:[o.jsx("span",{className:"pageMenuNm",children:(()=>{let T="";return r?.useMenuTitle&&m?T=m.menuNm:r?.text?T=r.text:m&&(T=m.menuPrntId==="CM00"?m.menuNm.substring(m.menuNm.indexOf(" ")+1):m.menuNm),r?.prefix&&(T=`${r.prefix} ${T}`),r?.suffix&&(T=`${T} ${r.suffix}`),T})()}),m?.menuNo&&o.jsx(p.Tag,{className:"page-num-tag",children:m?.menuNo}),o.jsx(p.Tooltip,{title:"도움말",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",className:"menu-help-btn",icon:o.jsx(G.QuestionCircleTwoTone,{twoToneColor:"orange"})})}),o.jsx(p.Tooltip,{title:"게시판",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",onClick:()=>O("CORE_REPORT"),icon:o.jsx(G.BugFilled,{style:{color:"#1890ff"}})})})]})]}),m?.scrnId&&le.isLocal&&o.jsx(p.Tag,{style:{marginLeft:8,fontSize:13,fontWeight:500,display:"flex"},children:o.jsx(ON,{copyable:!0,style:{display:"inherit",justifyContent:"center",alignItems:"center",marginBottom:0},children:m?.scrnId})})]})}),RIGHT:o.jsx("div",{className:"bwgview-header-right",children:o.jsx(p.ConfigProvider,{theme:{components:{Space:{padding:8},Divider:{verticalMarginInline:0}}},children:o.jsxs(p.Space,{children:[o.jsx(p.Flex,{gap:8,children:o.jsx(ep,{checkAuth:_,buttons:d?.custom||[],gap:8})}),o.jsx(p.Divider,{type:"vertical"}),o.jsx(p.Flex,{gap:8,className:"permission-buttons",children:o.jsx(ep,{checkAuth:$,buttons:d?.grant||[],gap:8})}),o.jsx(p.Divider,{type:"vertical"}),o.jsx(p.Tooltip,{placement:"bottom",color:le.colorFormat.default.gray05,title:o.jsxs(o.Fragment,{children:["검색영역 초기화",o.jsx("br",{}),"단축키 : ",o.jsx(p.Tag,{children:"Ctrl"})," + ",o.jsx(p.Tag,{children:"D"})]}),children:o.jsx(B.BwgButton,{icon:o.jsx(G.ClearOutlined,{style:{color:le.colorFormat.site.purple05}}),onClick:()=>{t&&w()}})})]})})})};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:[R(),o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{className:"bwgview-content",children:[o.jsx(p.ConfigProvider,{componentSize:P.componentSize,theme:{token:{fontSize:P.fontSize}},children:o.jsx(st.BwgViewProvider,{menuId:m?.menuId,children:o.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",fontSize:`${P.fontSize}px`},children:e})})}),(j.loading||a||y)&&o.jsx(xO.LoadingContainer,{dimStyle:"light",text:y?"처리 중...":"화면 로드 중..."})]})})]})});Rt.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:aw,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})},RN="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",AN="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",NN="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",DN=({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:NN,alt:"시간외근무신청",className:"quick-overtime"}),color:"#722ed1",onClick:()=>{console.log("시간 외 근무 신청 클릭")}},{id:"business-trip",title:"출장신청",icon:o.jsx("img",{src:RN,alt:"출장신청",className:"quick-business-trip"}),color:"#1890ff",onClick:()=>{console.log("출장 신청 클릭")}},{id:"vacation",title:"휴가신청",icon:o.jsx("img",{src:AN,alt:"휴가신청",className:"quick-holiday"}),color:"#eb2f96",onClick:()=>{console.log("휴가 신청 클릭")}},{id:"document",title:"문서신청",icon:o.jsx(G.FileTextOutlined,{}),color:"#52c41a",onClick:()=>{console.log("문서 신청 클릭")}},{id:"profile",title:"인사정보",icon:o.jsx(G.UserOutlined,{}),color:"#fa8c16",onClick:()=>{console.log("인사 정보 클릭")}},{id:"settings",title:"설정",icon:o.jsx(G.SettingOutlined,{}),color:"#13c2c2",onClick:()=>{console.log("설정 클릭")}}];v.useEffect(()=>{const b=()=>{const E=window.innerHeight,j=Math.max(64,(E-300)/3);r({x:0,y:j});const S=E/2;u(j<S)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const m=b=>{if(b.preventDefault(),b.stopPropagation(),f.current){const E=f.current.getBoundingClientRect();s({x:b.clientX-E.left,y:b.clientY-E.top}),i(!0)}},g=b=>{if(n){const E=b.clientY-a.y,P=window.innerHeight-24,S=Math.max(64,Math.min(P,E));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",g),document.addEventListener("mouseup",x),()=>{document.removeEventListener("mousemove",g),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:E=>{},onMouseLeave:E=>{},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(G.PlusOutlined,{style:{color:"#CDC4FF",fontSize:"15px"}})})})]}),o.jsx("div",{className:"quick-tab-drag-btn",style:{cursor:n?"grabbing":"grab",zIndex:1001},onMouseDown:b=>m(b)}),o.jsx(p.Button,{className:`quick-tab-toggle-btn ${l?"expanded":""}`,type:"default",style:{border:"0",backgroundColor:"transparent"},onClick:y})]})},_N=()=>{const{verifyWithToken:e}=st.useAuth(),t=Qg.useNavigate(),r=Qg.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:"인증중..."})})},BN=e=>{const{showPopup:t}=st.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:m,getCodeList:g}=st.useCommonCode(),x=v.useMemo(()=>le.createBwgGridRenderer((A,T,N,U,H)=>{const V=T.value,K=h?.(V)||"blue",oe=m?.(V)||V,pe=V?o.jsx(p.Tag,{color:K,style:{fontSize:"11px"},children:oe}):null;H.render(o.jsx("div",{style:{padding:"4px"},children:pe}))}),[h,m]),[y,w]=v.useState({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),[b,E]=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"}}],[]),j={container:{check:!0,indicator:!0,footer:!0}},S={onCurrentRowChanged(A,T,N){console.log("공통 버튼 그리드 - 현재 행 변경:",{oldRow:T,newRow:N,activeTabKey:u})}},O={onCurrentRowChanged(A,T,N){console.log("커스텀 버튼 그리드 - 현재 행 변경:",{oldRow:T,newRow:N,activeTabKey:u})}},k=A=>{f(A)};v.useEffect(()=>{},[]),v.useEffect(()=>{const A=n.current?.vw?.getCurrent().itemIndex??-1;if(A<0)return;const T=n.current?.vw?.getValues(A);$.SCMAUTH00201({crprCd:T.crprCd,systId:T.systId,authId:T.authId,menuId:T.authMenu,grpId:u==="common"?"DEFAULT":"CUSTOM"})},[u]);const I=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}],[]),_={onCurrentRowChanged(A,T,N){if(N<0)return;const U=A.getValues(N);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:()=>{le.callService("SCMAUTH00101",{crprCd:le.getCrprCd()},{}).then(A=>{n.current?.addAllData(A.data)})},SCMAUTH00102:A=>{le.callService("SCMAUTH00102",{...A},{}).then(T=>{T.result||r.current?.setFields([{name:"authId",errors:[T.message]}])})},SCMAUTH00201:A=>{le.callService("SCMAUTH00201",{...A},{}).then(T=>{u==="common"?i.current?.addAllData(T.data):a.current?.addAllData(T.data)}).catch(T=>{console.error("SCMAUTH00201 호출 실패:",T)})},SCMAUTH00301:async A=>{try{const T=await le.callService("SCMAUTH00301",{...A,crprCd:le.getCrprCd()},{});return console.log("권한 정보 저장 성공:",T),E(!1),$.SCMAUTH00101(),T}catch(T){throw console.error("권한 정보 저장 실패:",T),T}},SCMAUTH00401:async A=>{try{const T=await le.callService("SCMAUTH00401",{...A,crprCd:le.getCrprCd()},{});return console.log("권한 정보 수정 성공:",T),E(!1),$.SCMAUTH00101(),T}catch(T){throw console.error("권한 정보 수정 실패:",T),T}}},R={search:()=>{$.SCMAUTH00101()},new:()=>{E(!1),w({crprCd:String(le.getCrprCd()||""),systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),l(!0)},edit:()=>{const A=n.current?.getCurrentRow();A&&typeof A=="object"&&(E(!0),w({crprCd:A.crprCd||String(le.getCrprCd()||""),systId:A.systId||"",authId:A.authId||"",authNm:A.authNm||"",authDscr:A.authDscr||"",authMenu:A.authMenu||"",enblYn:A.enblYn||"Y"}),l(!0))}},z={test:()=>{console.log("test")}},F={openPopup:A=>{t("CMDprtSrchP02",{isDefault:A})},add:()=>{console.log("add")},modify:()=>{console.log("edit")},delete:()=>{console.log("delete")}},M=(A,T)=>{w(N=>({...N,[A]:T}))},D=async()=>{try{b||await $.SCMAUTH00102({auth:r.current?.getFieldsValue()})}catch(A){console.error("권한 정보 처리 실패:",A)}};return v.useEffect(()=>{$.SCMAUTH00101()},[]),v.useEffect(()=>{},[n.current?.getGridInstance()?.gridView]),o.jsx(Rt,{grantEvent:R,customEvent:z,children:o.jsxs(ze,{children:[o.jsxs(Ae,{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:()=>F.openPopup(!0),children:"공통권한버튼"}),o.jsx(p.Button,{onClick:()=>F.openPopup(!1),children:"커스텀 버튼"})]}),placement:"bottom",children:o.jsx(p.Button,{icon:o.jsx(G.SettingTwoTone,{}),title:"버튼관리",children:"버튼관리"})})}),o.jsx(Ve,{type:"nrml",ref:n,gridColumns:I,renderers:[{name:"tag",renderer:x}],gridOptions:{container:{indicator:!0,check:!0,checkAll:!0}},gridEvents:_})]}),o.jsx(Ae,{className:"w60",border:!0,children:o.jsxs(pn,{title:"권한 상세",children:[o.jsxs(B.BwgForm,{ref:r,style:{padding:"10px 20px"},children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:8,children:o.jsx(B.BwgSelect,{itemProps:{label:"업무분류",name:"systId"},selectProps:{variant:"borderless",options:g("SYST"),copyable:!0,disabled:!0}})}),o.jsx(p.Col,{span:8,children:o.jsx(B.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(B.BwgFormItem,{label:"권한ID",name:"authId",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:16,children:o.jsx(B.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(B.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(B.BwgFormItem,{label:"권한설명",name:"authDscr",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0})})})})]}),o.jsx(lr,{size:"small",activeKey:u,onChange:k,items:[{key:"common",label:"공통버튼",children:o.jsxs(Ae,{children:[o.jsx(Le,{title:"공통 버튼 매핑",children:o.jsx(tp,{grpId:"AUTH",menuId:"CM010303",btnEvent:F})}),o.jsx(Ve,{ref:i,type:"nrml",gridColumns:P,gridOptions:j,gridEvents:S})]})},{key:"custom",label:"커스텀",children:o.jsxs(Ae,{children:[o.jsx(Le,{title:"커스텀 버튼 매핑",children:o.jsx(tp,{grpId:"AUTH2",menuId:"CM010303"})}),o.jsx(Ve,{ref:a,type:"nrml",gridColumns:P,gridOptions:j,gridEvents:O})]})}],tabPosition:"left"})]})}),o.jsx(fn,{title:`권한별 메뉴 관리 - ${c?.authNm||""}`,open:s,placement:"right",onClose:()=>{l(!1),w({crprCd:"",systId:"",authId:"",authNm:"",authDscr:"",authMenu:"",enblYn:"Y"}),E(!1)},width:"40%",size:"large",afterOpenChange:A=>{console.log("afterOpenChange:",A)},footer:o.jsxs("div",{className:"drawer-footer-btn-group",children:[o.jsx(p.Button,{onClick:()=>{l(!1),r.current?.resetFields(),E(!1)},className:"bwg-btn",children:"취소"}),o.jsx(p.Button,{type:"primary",onClick:D,className:"bwg-btn",children:"저장"})]}),children:o.jsxs(B.BwgForm,{ref:r,initialValues:y,children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{itemProps:{name:["crprCd","crprNm"],label:"회사 코드"},placeholder:["회사 코드","회사 명칭"],popuCd:"CMAuthMstrP01"})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{name:"systId",label:"시스템 ID"},selectProps:{variant:"borderless",options:g("SYST"),copyable:!0,disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgFormItem,{name:"authId",label:"권한 ID",children:o.jsx(p.Input,{onChange:A=>M("authId",A.target.value),placeholder:"권한 ID를 입력하세요",disabled:b})})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgFormItem,{name:"enblYn",label:"사용여부",children:o.jsx(p.Select,{onChange:A=>M("enblYn",A),options:[{value:"Y",label:"사용"},{value:"N",label:"미사용"}]})})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgFormItem,{name:"authNm",label:"권한 명칭",children:o.jsx(p.Input,{onChange:A=>M("authNm",A.target.value),placeholder:"권한 명칭을 입력하세요"})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgFormItem,{name:"authDscr",label:"권한 설명",children:o.jsx(p.Input.TextArea,{onChange:A=>M("authDscr",A.target.value),placeholder:"권한 설명을 입력하세요",rows:2})})})}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgSearch,{itemProps:{name:["authMenu","authMenuNm"],label:"권한 메뉴"},placeholder:["메뉴ID","메뉴명명"],popuCd:"CMMenuMstrP01"})})})]})})]})})},$N=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),[i,a]=v.useState("menu"),s=v.useMemo(()=>le.createBwgGridRenderer((g,x,y,w,b)=>{const E=g.getValue(x.index?.itemIndex,"systId"),P=g.getValue(x.index?.itemIndex,"roleId"),j=g.getValue(x.index?.itemIndex,"roleNm"),S=g.getValue(x.index?.itemIndex,"enblYn"),O=g.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(Ae,{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:E})}),o.jsx("div",{style:{position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"16px",fontWeight:"bold",color:"#262626",textAlign:"center"},children:j}),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(G.CheckCircleOutlined,{style:{color:"#52c41a"}}):o.jsx(G.CloseCircleOutlined,{style:{color:"#ff4d4f"}})})]}),o.jsx(p.Divider,{type:"vertical",style:{height:"95px"}}),o.jsx(Ae,{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(g,x,y){if(y<0)return;const w=g.getValues(y);switch(i){case"menu":break;case"dept":h.SCMROLE00103(w.roleId);break;case"user":h.SCMROLE00104(w.roleId);break}}},h={SCMROLE00101:()=>{le.callService("SCMROLE00101",{crprCd:le.getCrprCd()}).then(g=>{console.log("SCMROLE00101:",g),t.current?.addAllData(g.data)})},SCMROLE00102:g=>{le.callService("SCMROLE00102",{crprCd:le.getCrprCd(),roleId:g}).then(x=>{console.log("SCMROLE00102:",x)})},SCMROLE00103:g=>{le.callService("SCMROLE00103",{crprCd:le.getCrprCd(),roleId:g}).then(x=>{console.log("SCMROLE00103:",x),r.current?.addAllData(x.data)})},SCMROLE00104:g=>{le.callService("SCMROLE00104",{crprCd:le.getCrprCd(),roleId:g}).then(x=>{console.log("SCMROLE00104:",x),n.current?.addAllData(x.data)})}},m={search:()=>{h.SCMROLE00101()}};return v.useEffect(()=>{const g=t.current?.getCurrentIndex()??-1;if(g<0)return;const x=t.current?.vw?.getValue(g,"roleId");switch(i){case"menu":break;case"dept":h.SCMROLE00103(x);break;case"user":h.SCMROLE00104(x);break}},[i]),o.jsx(Rt,{grantEvent:m,children:o.jsxs(ze,{children:[o.jsxs(Ae,{className:"w40",children:[o.jsx(Le,{title:"역할 목록",icons:{type:"antd"}}),o.jsx(Ve,{ref:t,type:"nrml",gridColumns:l,gridOptions:u,gridEvents:f,renderers:[{name:"systCard",renderer:s}]})]}),o.jsxs(Ae,{className:"w60",children:[o.jsx(Le,{title:"역할별 관리"}),o.jsx(p.Tabs,{className:"bwg-tab",activeKey:i,onChange:g=>a(g),items:[{key:"menu",label:"역할별 메뉴",icon:o.jsx(G.MenuOutlined,{}),children:o.jsx(Ve,{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(G.TeamOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(Ae,{className:"w50",children:o.jsx(Ve,{ref:r,type:"nrml",gridColumns:c,gridOptions:{display:{rowHeight:40}}})}),o.jsx(Ae,{className:"w50",border:!0,children:o.jsx(pn,{title:"부서정보",children:"123"})})]})},{key:"user",label:"역할별 사용자",icon:o.jsx(G.UserOutlined,{}),children:o.jsxs(ze,{children:[o.jsx(Ae,{className:"w50",children:o.jsx(Ve,{ref:n,type:"nrml",gridColumns:d,gridOptions:{display:{rowHeight:40}}})}),o.jsx(Ae,{className:"w50",border:!0,children:o.jsx(pn,{title:"사용자정보",children:"123"})})]})}]})]})]})})};var ha={},D0;function LN(){if(D0)return ha;D0=1;function e(j){"@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(j)}Object.defineProperty(ha,"__esModule",{value:!0}),ha.CopyToClipboard=void 0;var t=i(v),r=i(lS()),n=["text","onCopy","options","children"];function i(j){return j&&j.__esModule?j:{default:j}}function a(j,S){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(j);S&&(k=k.filter(function(I){return Object.getOwnPropertyDescriptor(j,I).enumerable})),O.push.apply(O,k)}return O}function s(j){for(var S=1;S<arguments.length;S++){var O=arguments[S]!=null?arguments[S]:{};S%2?a(Object(O),!0).forEach(function(k){E(j,k,O[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):a(Object(O)).forEach(function(k){Object.defineProperty(j,k,Object.getOwnPropertyDescriptor(O,k))})}return j}function l(j,S){if(j==null)return{};var O=c(j,S),k,I;if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(j);for(I=0;I<_.length;I++)k=_[I],!(S.indexOf(k)>=0)&&Object.prototype.propertyIsEnumerable.call(j,k)&&(O[k]=j[k])}return O}function c(j,S){if(j==null)return{};var O={},k=Object.keys(j),I,_;for(_=0;_<k.length;_++)I=k[_],!(S.indexOf(I)>=0)&&(O[I]=j[I]);return O}function d(j,S){if(!(j instanceof S))throw new TypeError("Cannot call a class as a function")}function u(j,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(j,k.key,k)}}function f(j,S,O){return S&&u(j.prototype,S),Object.defineProperty(j,"prototype",{writable:!1}),j}function h(j,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");j.prototype=Object.create(S&&S.prototype,{constructor:{value:j,writable:!0,configurable:!0}}),Object.defineProperty(j,"prototype",{writable:!1}),S&&m(j,S)}function m(j,S){return m=Object.setPrototypeOf||function(k,I){return k.__proto__=I,k},m(j,S)}function g(j){var S=w();return function(){var k=b(j),I;if(S){var _=b(this).constructor;I=Reflect.construct(k,arguments,_)}else I=k.apply(this,arguments);return x(this,I)}}function x(j,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(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}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(j){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},b(j)}function E(j,S,O){return S in j?Object.defineProperty(j,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[S]=O,j}var P=(function(j){h(O,j);var S=g(O);function O(){var k;d(this,O);for(var I=arguments.length,_=new Array(I),$=0;$<I;$++)_[$]=arguments[$];return k=S.call.apply(S,[this].concat(_)),E(y(k),"onClick",function(R){var z=k.props,F=z.text,M=z.onCopy,D=z.children,A=z.options,T=t.default.Children.only(D),N=(0,r.default)(F,A);M&&M(F,N),T&&T.props&&typeof T.props.onClick=="function"&&T.props.onClick(R)}),k}return f(O,[{key:"render",value:function(){var I=this.props,_=I.children,$=l(I,n),R=t.default.Children.only(_);return t.default.cloneElement(R,s(s({},$),{},{onClick:this.onClick}))}}]),O})(t.default.PureComponent);return ha.CopyToClipboard=P,E(P,"defaultProps",{onCopy:void 0,options:void 0}),ha}var xd,_0;function zN(){if(_0)return xd;_0=1;var e=LN(),t=e.CopyToClipboard;return t.CopyToClipboard=t,xd=t,xd}var FN=zN();const im=jr(FN),gr=({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})]})},vr=({importText:e,onCopy:t})=>o.jsx(im,{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(G.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(`,
|
|
186
|
-
`),l=`<${r}
|
|
187
|
-
itemProps={{
|
|
188
|
-
${s}
|
|
189
|
-
}}
|
|
190
|
-
// ... other props
|
|
191
|
-
/>`;navigator.clipboard.writeText(l),p.message.success("선택된 속성으로 코드가 복사되었습니다!")};return o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsx(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:"BwgFormItem 컴포넌트의 모든 속성을 지원합니다. Ant Design의 Form.Item의 속성을 상속받으며, Form과 함께 사용할 때 폼 필드를 제어하는 데 사용됩니다."}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[e.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:i,disabled:e.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:e,onChange:(a,s)=>{t(a)}},rowKey:"property",pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center",width:"20%"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center",width:"25%"}],dataSource:n})]})},VN=()=>{const e=v.useRef(null),[t,r]=v.useState("ex_bwg_input"),[n,i]=v.useState([]),[a,s]=v.useState([]),[l,c]=v.useState([]),[d,u]=v.useState([]),[f,h]=v.useState([]),[m,g]=v.useState([]),[x,y]=v.useState([]),[w,b]=v.useState([]),[E,P]=v.useState([]),[j,S]=v.useState([]),[O,k]=v.useState([]),[I,_]=v.useState([]),[$,R]=v.useState([]),[z,F]=v.useState([]),[M,D]=v.useState([]),[A,T]=v.useState([]),[N,U]=v.useState([]),[H,V]=v.useState([]),[K,oe]=v.useState([]),[pe,ve]=v.useState([]),[Ce,Pe]=v.useState([]),[J,ye]=v.useState([]);v.useState([]),v.useState([]);const me=L=>{const ae=document.getElementById(L);ae&&e.current&&(e.current.scrollTo({top:ae.offsetTop-20,behavior:"smooth"}),r(L))};return o.jsx(Nc,{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:"컴포넌트 목록"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(gr,{onClick:()=>me("ex_bwg_input"),isActive:t==="ex_bwg_input",children:"BwgInput"}),o.jsx(gr,{onClick:()=>me("ex_bwg_textarea"),isActive:t==="ex_bwg_textarea",children:"BwgTextArea"}),o.jsx(gr,{onClick:()=>me("ex_bwg_number"),isActive:t==="ex_bwg_number",children:"BwgNumber"}),o.jsx(gr,{onClick:()=>me("ex_bwg_search"),isActive:t==="ex_bwg_search",children:"BwgSearch"}),o.jsx(gr,{onClick:()=>me("ex_bwg_select"),isActive:t==="ex_bwg_select",children:"BwgSelect"}),o.jsx(gr,{onClick:()=>me("ex_bwg_multiselect"),isActive:t==="ex_bwg_multiselect",children:"BwgMultiSelect"}),o.jsx(gr,{onClick:()=>me("ex_bwg_datepicker"),isActive:t==="ex_bwg_datepicker",children:"BwgDatePicker"}),o.jsx(gr,{onClick:()=>me("ex_bwg_rangepicker"),isActive:t==="ex_bwg_rangepicker",children:"BwgRangePicker"}),o.jsx(gr,{onClick:()=>me("ex_bwg_check"),isActive:t==="ex_bwg_check",children:"BwgCheck"}),o.jsx(gr,{onClick:()=>me("ex_bwg_checklist"),isActive:t==="ex_bwg_checklist",children:"BwgCheckList"}),o.jsx(gr,{onClick:()=>me("ex_bwg_radio"),isActive:t==="ex_bwg_radio",children:"BwgRadio"}),o.jsx(gr,{onClick:()=>me("ex_bwg_uploader"),isActive:t==="ex_bwg_uploader",children:"BwgUploader"}),o.jsx(gr,{onClick:()=>me("ex_bwg_largeuploader"),isActive:t==="ex_bwg_largeuploader",children:"BwgLargeUploader"})]})]}),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:"ex_bwg_input",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgInput"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgInput 컴포넌트는 기본적인 텍스트 입력을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgInput } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"기본 속성 적용"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"allowClear 속성 적용, 입력 후 클리어 버튼 표시",allowClear:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"maxLength 속성 적용 ( 10자 제한 )",maxLength:10}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{inputProps:{variant:"outlined",placeholder:"variant 속성 적용 ( outlined )"}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{inputProps:{variant:"filled",placeholder:"variant 속성 적용 ( filled )"}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{inputProps:{variant:"borderless",placeholder:"variant 속성 적용 ( borderless )"}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{inputProps:{variant:"underlined",placeholder:"variant 속성 적용 ( underlined )"}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"status 속성 적용 ( warning )",status:"warning"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{inputProps:{placeholder:"status 속성 적용 ( error )",status:"error"}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"일반"},inputProps:{placeholder:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Input 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[I.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(I.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'텍스트를 입력하세요'",disabled:"false",allowClear:"true",maxLength:"10",variant:"'outlined'",status:"'warning'"},q=`<BwgInput
|
|
192
|
-
inputProps={{
|
|
193
|
-
${I.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
194
|
-
`)}
|
|
195
|
-
}}
|
|
196
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:I.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:I,onChange:(L,ae)=>{_(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"입력 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"입력 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"maxLength",type:"number",description:"최대 입력 길이 제한"},{property:"variant",type:"outlined | filled | borderless | underlined",description:"스타일 변형"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:n,onSelectionChange:i,componentName:"BwgInput"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_textarea",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgTextArea"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgTextArea 컴포넌트는 여러 줄의 텍스트 입력을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgTextArea } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"기본 속성 적용"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"allowClear 속성 적용, 입력 후 클리어 버튼 표시",allowClear:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"maxLength 속성 적용 ( 100자 제한 )",maxLength:100}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"rows 속성 적용 ( 4줄 )",rows:4}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"autoSize 속성 적용",autoSize:{minRows:2,maxRows:6}}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"status 속성 적용 ( warning )",status:"warning"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{inputProps:{placeholder:"status 속성 적용 ( error )",status:"error"}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{itemProps:{label:"일반"},inputProps:{placeholder:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgTextArea,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Input.TextArea 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[$.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[$.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if($.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'텍스트를 입력하세요'",disabled:"false",allowClear:"true",maxLength:"100",rows:"4",autoSize:"{ minRows: 2, maxRows: 6 }",status:"'warning'"},q=`<BwgTextArea
|
|
197
|
-
inputProps={{
|
|
198
|
-
${$.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
199
|
-
`)}
|
|
200
|
-
}}
|
|
201
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:$.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:$,onChange:(L,ae)=>{R(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"입력 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"입력 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"maxLength",type:"number",description:"최대 입력 길이 제한"},{property:"rows",type:"number",description:"기본 행 수"},{property:"autoSize",type:"{ minRows: 2, maxRows: 6 } | boolean",description:"자동 크기 조절"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:a,onSelectionChange:s,componentName:"BwgTextArea"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_number",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgNumber"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgNumber 컴포넌트는 숫자 입력을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgNumber } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"기본 속성 적용"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"min, max 속성 적용 (0-100)",min:0,max:100}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"step 속성 적용 (0.5씩 증가)",step:.5}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"precision 속성 적용 (소수점 2자리)",precision:2}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"formatter 속성 적용 (원화 표시)",formatter:L=>`₩ ${L}`.replace(/\B(?=(\d{3})+(?!\d))/g,","),parser:L=>L.replace(/\₩\s?|(,*)/g,"")}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"status 속성 적용 ( warning )",status:"warning"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{inputProps:{placeholder:"status 속성 적용 ( error )",status:"error"}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{itemProps:{label:"일반"},inputProps:{placeholder:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd InputNumber 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[z.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[z.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(z.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'숫자를 입력하세요'",disabled:"false",min:"0",max:"100",step:"1",precision:"2",formatter:"value => `₩ ${value}`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')",parser:"value => value!.replace(/₩\\s?|(,*)/g, '')",status:"'warning'"},q=`<BwgNumber
|
|
202
|
-
inputProps={{
|
|
203
|
-
${z.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
204
|
-
`)}
|
|
205
|
-
}}
|
|
206
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:z.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:z,onChange:(L,ae)=>{F(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"입력 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"입력 필드 비활성화"},{property:"min",type:"number",description:"최소값"},{property:"max",type:"number",description:"최대값"},{property:"step",type:"number",description:"증감 단위"},{property:"precision",type:"number",description:"소수점 자릿수"},{property:"formatter",type:"function",description:"표시 형식 변환 함수"},{property:"parser",type:"function",description:"입력값 파싱 함수"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:l,onSelectionChange:c,componentName:"BwgNumber"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_search",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgSearch"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgSearch 컴포넌트는 검색 기능을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgSearch } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{placeholder:"기본 검색"})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{placeholder:"disabled 속성 적용",disabled:!0})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{placeholder:"allowClear 속성 적용",allowClear:!0})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{placeholder:"팝업 검색 기능",popuCd:"example"})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSearch,{placeholder:"기본 검색"})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSearch,{placeholder:"클리어 가능",allowClear:!0})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSearch,{placeholder:"비활성화",disabled:!0})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSearch,{placeholder:"warning 상태",status:"warning"})})]}),o.jsx(p.Divider,{orientation:"left",children:"Code/Value 팝업 검색"}),o.jsx(p.Typography.Text,{type:"secondary",style:{display:"block",marginBottom:"16px"},children:"`popupConfig`를 사용하면 팝업 검색창을 열 수 있습니다. `name` 속성으로 코드 필드를, `valueName` 속성으로 값(이름) 필드를 지정하여 선택된 값을 Form의 다른 필드에 자동으로 채울 수 있습니다."}),o.jsx(p.Form,{children:o.jsx(p.Row,{gutter:[8,16],align:"bottom",children:o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{itemProps:{label:"사용자",name:"user_cd"},popupConfig:!0})})})}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{itemProps:{label:"일반"},placeholder:"일반"})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSearch,{itemProps:{label:"필수",rules:[{required:!0}]},placeholder:"필수"})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Input.Search 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[M.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[M.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(M.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'검색어를 입력하세요'",disabled:"false",allowClear:"true",onSearch:"value => message.info(`검색: ${value}`)",status:"'warning'"},q=`<BwgSearch
|
|
207
|
-
${M.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
208
|
-
`)}
|
|
209
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:M.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:M,onChange:(L,ae)=>{D(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"검색 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"검색 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"onSearch",type:"function",description:"검색 버튼 클릭 시 실행되는 함수"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:d,onSelectionChange:u,componentName:"BwgSearch"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_select",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgSelect"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgSelect 컴포넌트는 드롭다운 선택을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgSelect } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:"기본 선택",options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:"disabled 속성 적용",disabled:!0,options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:"allowClear 속성 적용",allowClear:!0,options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:'mode="multiple" 속성 적용',mode:"multiple",options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:"showSearch 속성 적용",showSearch:!0,options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{selectProps:{placeholder:"status 속성 적용 (warning)",status:"warning",options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{label:"일반"},selectProps:{placeholder:"일반",options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{label:"필수",rules:[{required:!0}]},selectProps:{placeholder:"필수",options:[{label:"옵션 1",value:"1"}]}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"선택 속성",key:"selectProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Select 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[A.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(A.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'옵션을 선택하세요'",disabled:"false",allowClear:"true",mode:"'multiple'",status:"'warning'",options:"[{ label: '옵션 1', value: '1' }, { label: '옵션 2', value: '2' }]"},q=`<BwgSelect
|
|
210
|
-
selectProps={{
|
|
211
|
-
${A.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
212
|
-
`)}
|
|
213
|
-
}}
|
|
214
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:A.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:A,onChange:(L,ae)=>{T(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"선택 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"선택 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"mode",type:"multiple | tags",description:"다중 선택 모드"},{property:"status",type:"error | warning",description:"상태 표시"},{property:"options",type:"Array<{label, value}>",description:"선택 옵션 목록"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:f,onSelectionChange:h,componentName:"BwgSelect"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_multiselect",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgMultiSelect"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgMultiSelect 컴포넌트는 다중 선택을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgMultiSelect } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:"기본 다중 선택",list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0,list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:"allowClear 속성 적용",allowClear:!0,list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0,list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:"maxTagCount 속성 적용",maxTagCount:2,list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"},{label:"옵션 4",value:"4"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{inputProps:{placeholder:'addField="ALL" 속성 적용',addField:"ALL",list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{itemProps:{label:"일반"},inputProps:{placeholder:"일반",list:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgMultiSelect,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:"필수",list:[{label:"옵션 1",value:"1"}]}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Select 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[N.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[N.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(N.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'다중 선택하세요'",disabled:"false",allowClear:"true",maxTagCount:"3",addField:"'ALL'",list:"[{ label: '옵션 1', value: '1' }, { label: '옵션 2', value: '2' }]"},q=`<BwgMultiSelect
|
|
215
|
-
inputProps={{
|
|
216
|
-
${N.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
217
|
-
`)}
|
|
218
|
-
}}
|
|
219
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:N.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:N,onChange:(L,ae)=>{U(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"선택 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"선택 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"maxTagCount",type:"number",description:"표시할 태그 최대 개수"},{property:"addField",type:"ALL | NULL",description:"추가 필드 옵션"},{property:"list",type:"Array<{label, value}>",description:"선택 옵션 목록"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:m,onSelectionChange:g,componentName:"BwgMultiSelect"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_datepicker",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgDatePicker"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgDatePicker 컴포넌트는 날짜 선택을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgDatePicker } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"기본 날짜 선택"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"disabled 속성 적용",disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"allowClear 속성 적용",allowClear:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"showToday 속성 적용",showToday:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"format 속성 적용",format:"YYYY-MM-DD"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{inputProps:{placeholder:"showTime 속성 적용",showTime:!0}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{itemProps:{label:"일반"},inputProps:{placeholder:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgDatePicker,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"날짜 선택 속성",key:"datePickerProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd DatePicker 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[H.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[H.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(H.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"'날짜를 선택하세요'",disabled:"false",allowClear:"true",format:"'YYYY-MM-DD'",showTime:"false"},q=`<BwgDatePicker
|
|
220
|
-
inputProps={{
|
|
221
|
-
${H.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
222
|
-
`)}
|
|
223
|
-
}}
|
|
224
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:H.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:H,onChange:(L,ae)=>{V(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"날짜 선택 필드의 힌트 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"날짜 선택 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"format",type:"string",description:"날짜 형식 (예: YYYY-MM-DD)"},{property:"showTime",type:"boolean",description:"시간 선택 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:x,onSelectionChange:y,componentName:"BwgDatePicker"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_rangepicker",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgRangePicker"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgRangePicker 컴포넌트는 날짜 범위 선택을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgRangePicker } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"],disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"],allowClear:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"],disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"],format:"YYYY-MM-DD"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{inputProps:{placeholder:["시작일","종료일"],showTime:!0}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{itemProps:{label:"일반"},inputProps:{placeholder:["시작일","종료일"]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRangePicker,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{placeholder:["시작일","종료일"]}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"범위 선택 속성",key:"rangePickerProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd RangePicker 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[K.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[K.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(K.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={placeholder:"['시작일', '종료일']",disabled:"false",allowClear:"true",format:"'YYYY-MM-DD'",showTime:"false"},q=`<BwgRangePicker
|
|
225
|
-
inputProps={{
|
|
226
|
-
${K.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
227
|
-
`)}
|
|
228
|
-
}}
|
|
229
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:K.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:K,onChange:(L,ae)=>{oe(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"placeholder",description:"날짜 범위 선택 필드의 힌트 텍스트",type:"string[]"},{property:"disabled",type:"boolean",description:"날짜 범위 선택 필드 비활성화"},{property:"allowClear",type:"boolean",description:"클리어 버튼 표시"},{property:"format",type:"string",description:"날짜 형식 (예: YYYY-MM-DD)"},{property:"showTime",type:"boolean",description:"시간 선택 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:w,onSelectionChange:b,componentName:"BwgRangePicker"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_check",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgCheck"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgCheck 컴포넌트는 체크박스를 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgCheck } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"기본 체크박스"}),o.jsx(B.BwgCheck,{inputProps:{children:"체크박스"}})]}),o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"disabled: true"}),o.jsx(B.BwgCheck,{inputProps:{children:"비활성화된 체크박스",disabled:!0}})]})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"indeterminate: true"}),o.jsx(B.BwgCheck,{inputProps:{children:"부분 선택 체크박스",indeterminate:!0}})]}),o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"status: 'warning'"}),o.jsx(B.BwgCheck,{inputProps:{children:"경고 상태 체크박스"}})]})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheck,{itemProps:{label:"일반"},inputProps:{children:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheck,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{children:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Checkbox 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[pe.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[pe.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(pe.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={children:"'체크박스 라벨'",disabled:"false",indeterminate:"true",status:"'warning'"},q=`<BwgCheck
|
|
230
|
-
inputProps={{
|
|
231
|
-
${pe.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
232
|
-
`)}
|
|
233
|
-
}}
|
|
234
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:pe.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:pe,onChange:(L,ae)=>{ve(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"children",description:"체크박스 라벨 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"체크박스 비활성화"},{property:"indeterminate",type:"boolean",description:"부분 선택 상태"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:E,onSelectionChange:P,componentName:"BwgCheck"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_checklist",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgCheckList"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgCheckList 컴포넌트는 체크리스트를 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgCheckList } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}],disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"},{label:"옵션 3",value:"3"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{itemProps:{label:"일반"},inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheckList,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{options:[{label:"옵션 1",value:"1"},{label:"옵션 2",value:"2"}]}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Checkbox.Group 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Ce.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[Ce.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(Ce.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={options:"[{ label: '옵션 1', value: '1' }, { label: '옵션 2', value: '2' }]",disabled:"false",direction:"'horizontal'",status:"'warning'"},q=`<BwgCheckList
|
|
235
|
-
inputProps={{
|
|
236
|
-
${Ce.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
237
|
-
`)}
|
|
238
|
-
}}
|
|
239
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:Ce.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:Ce,onChange:(L,ae)=>{Pe(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"options",description:"체크박스 옵션 목록",type:"Array<{label, value}>"},{property:"disabled",type:"boolean",description:"체크박스 그룹 비활성화"},{property:"direction",type:"horizontal | vertical",description:"배치 방향"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:j,onSelectionChange:S,componentName:"BwgCheckList"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_radio",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgRadio"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgRadio 컴포넌트는 라디오 버튼을 위한 컴포넌트입니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgRadio } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{inputProps:{children:"기본 라디오 버튼"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{inputProps:{children:"disabled 속성 적용",disabled:!0}})})]}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{inputProps:{children:"status 속성 적용 (warning)"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{inputProps:{children:"disabled 속성 적용",disabled:!0}})})]}),o.jsx(p.Divider,{orientation:"left",children:"라벨 사용하기"}),o.jsxs(p.Row,{gutter:[16,16],children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{itemProps:{label:"일반"},inputProps:{children:"일반"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgRadio,{itemProps:{label:"필수",rules:[{required:!0}]},inputProps:{children:"필수"}})})]})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(lr,{items:[{label:"입력 속성",key:"inputProps",children:o.jsxs(p.Card,{children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["Antd Radio 컴포넌트의 모든 속성을 지원합니다.",o.jsx("br",{}),"아래는 대표 속성들입니다. 그 외의 속성은 Ant Design 공식 문서를 참고하세요."]}),o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[J.length>0&&o.jsxs(p.Typography.Text,{style:{color:"#52c41a",fontSize:"13px",whiteSpace:"nowrap",fontWeight:500},children:[J.length,"개 속성 선택됨"]}),o.jsx(p.Button,{onClick:()=>{if(J.length===0){p.message.warning("선택된 속성이 없습니다!");return}const L={children:"'라디오 버튼 라벨'",disabled:"false",status:"'warning'"},q=`<BwgRadio
|
|
240
|
-
inputProps={{
|
|
241
|
-
${J.map(ue=>` ${ue}: ${L[ue]||"true"}`).join(`,
|
|
242
|
-
`)}
|
|
243
|
-
}}
|
|
244
|
-
/>`;navigator.clipboard.writeText(q),p.message.success("선택된 속성으로 코드가 복사되었습니다!")},disabled:J.length===0,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"선택된 속성으로 코드 생성 복사"})]})]}),o.jsx(p.Table,{rowSelection:{type:"checkbox",selectedRowKeys:J,onChange:(L,ae)=>{ye(L),console.log(`selectedRowKeys: ${L}`,"selectedRows: ",ae)}},rowKey:L=>L.property,pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"children",description:"라디오 버튼 라벨 텍스트",type:"string"},{property:"disabled",type:"boolean",description:"라디오 버튼 비활성화"},{property:"status",type:"error | warning",description:"상태 표시"}]})]})},{label:"폼 속성",key:"itemProps",children:o.jsx(qr,{selectedRowKeys:O,onSelectionChange:k,componentName:"BwgRadio"})}]})})]})]})}),o.jsx("div",{id:"ex_bwg_uploader",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgUploader"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgUploader 컴포넌트는 단일 또는 다중 파일을 개별적으로 업로드하기 위한 컴포넌트입니다. 파일 선택 즉시 업로드가 시작됩니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgUploader } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsxs(p.Flex,{vertical:!0,gap:"16",children:[o.jsxs(p.Row,{gutter:[16,16],children:[o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"기본 업로더"}),o.jsx(B.BwgUploader,{onUploadComplete:L=>{p.message.success(`[onUploadComplete] ${L.fileNameL} 업로드 완료`)}})]}),o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"거래코드(trxCd)와 함께 업로드"}),o.jsx(B.BwgUploader,{})]})]}),o.jsx(p.Row,{gutter:[16,16],children:o.jsxs(p.Col,{span:12,children:[o.jsx(p.Typography.Text,{strong:!0,children:"확장자 및 파일 크기 제한"}),o.jsx(B.BwgUploader,{allowedExtensions:[".jpg",".png"],maxFileSize:1,onUploadComplete:L=>{p.message.success(`[onUploadComplete] ${L.fileNameL} 업로드 완료`)}})]})})]})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(p.Card,{children:o.jsx(p.Table,{pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"onUploadComplete",description:"파일 업로드 성공 시 호출되는 콜백 함수",type:"(fileDetails: { fileNameP: string, fileNameL: string }) => void"},{property:"trxCd",description:"파일 업로드 시 함께 전송할 거래코드",type:"string"},{property:"allowedExtensions",description:"허용할 파일 확장자 배열. (기본값: 여러 일반적인 확장자)",type:"string[]"},{property:"maxFileSize",description:"최대 파일 크기 (MB 단위)",type:"number"}]})})})]})]})}),o.jsx("div",{id:"ex_bwg_largeuploader",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx("div",{style:{fontSize:"20px",fontWeight:600,color:"#262626"},children:"BwgLargeUploader"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ReadOutlined,{}),"설명"]}),o.jsx(p.Typography.Paragraph,{style:{fontSize:"14px",color:"#595959",lineHeight:1.5},children:o.jsx("blockquote",{children:"BwgLargeUploader 컴포넌트는 대용량 파일을 포함한 여러 파일을 일괄적으로 업로드하기 위한 컴포넌트입니다. 드래그 앤 드롭을 지원하며, 파일 목록을 확인하고 '일괄 업로드' 버튼으로 한 번에 업로드합니다."})})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.RocketOutlined,{}),"Import 하기"]}),o.jsx(vr,{importText:"import { BwgLargeUploader } from '@bwg/ui/core';"})]}),o.jsxs("div",{style:{marginBottom:"32px"},children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"16px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.ExperimentOutlined,{}),"사용 방법"]}),o.jsx("div",{style:{background:"#ffffff",border:"1px solid #e1e4e8",borderRadius:"8px",padding:"24px"},children:o.jsx(p.Flex,{vertical:!0,gap:"16",children:o.jsx(p.Row,{gutter:[16,16],children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgLargeUploader,{title:"대용량 파일 업로더",onUploadComplete:L=>{p.message.success(`[onUploadComplete] ${L.fileNameL} 업로드 완료`)}})})})})})]}),o.jsxs("div",{children:[o.jsxs(p.Typography.Title,{level:5,style:{marginBottom:"12px",color:"#262626",fontSize:"16px"},children:[o.jsx(G.UnorderedListOutlined,{}),"속성 설명"]}),o.jsx("div",{style:{background:"#fafbfc",border:"1px solid #e1e4e8",borderRadius:"6px",padding:"16px"},children:o.jsx(p.Card,{children:o.jsx(p.Table,{pagination:!1,columns:[{title:"속성",dataIndex:"property",align:"center"},{title:"설명",dataIndex:"description"},{title:"타입",dataIndex:"type",align:"center"}],dataSource:[{property:"title",description:"업로더 카드의 제목",type:"string"},{property:"onUploadComplete",description:"개별 파일 업로드 성공 시 호출되는 콜백 함수",type:"(fileDetails: { fileNameP: string, fileNameL: string }) => void"},{property:"trxCd",description:"파일 업로드 시 함께 전송할 거래코드",type:"string"},{property:"allowedExtensions",description:"허용할 파일 확장자 배열. (기본값: 여러 일반적인 확장자)",type:"string[]"}]})})})]})]})})]})]})})},el=({importText:e,onCopy:t})=>o.jsx(im,{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:"flex-start",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("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",flex:1,lineHeight:"1.5"},children:o.jsx("code",{children:e})}),o.jsx(G.CopyOutlined,{style:{color:"#858585",fontSize:"14px",marginLeft:"12px",flexShrink:0}})]})}),wn=({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})]})},HN=({visible:e,onCancel:t,onOk:r})=>{const[n,i]=v.useState([]),[a,s]=v.useState("100%"),l=[{value:"BwgInput",label:"BwgInput - 입력 필드"},{value:"BwgSelect",label:"BwgSelect - 선택 박스"},{value:"BwgSearch",label:"BwgSearch - 검색 필드"},{value:"BwgDatePicker",label:"BwgDatePicker - 날짜 선택"},{value:"BwgRangePicker",label:"BwgRangePicker - 날짜 범위 선택"},{value:"BwgRadio",label:"BwgRadio - 라디오 버튼"},{value:"BwgCheck",label:"BwgCheck - 체크박스"},{value:"BwgCheckList",label:"BwgCheckList - 체크박스 그룹"},{value:"BwgTextArea",label:"BwgTextArea - 텍스트 영역"},{value:"BwgNumber",label:"BwgNumber - 숫자 입력"},{value:"BwgMultiSelect",label:"BwgMultiSelect - 다중 선택"},{value:"BwgMaskedInput",label:"BwgMaskedInput - 마스크 입력"},{value:"BwgMaskedDate",label:"BwgMaskedDate - 마스크 날짜 선택"},{value:"BwgButton",label:"BwgButton - 버튼"},{value:"BwgUploader",label:"BwgUploader - 파일 업로드"},{value:"BwgLargeUploader",label:"BwgLargeUploader - 대용량 파일 업로드"}],c=[{label:"100%",value:"100%"},{label:"50%",value:"50%"},{label:"33%",value:"33%"},{label:"25%",value:"25%"}],d=()=>{n.length>0&&r(n,a)},f=(g=>{switch(g){case"100%":return 1;case"50%":return 2;case"33%":return 3;case"25%":return 4;default:return 1}})(a),h=n.length>f,m=()=>{i([]),s("100%"),t()};return o.jsx(p.Modal,{title:"필수검색 행 추가",open:e,onOk:d,onCancel:m,centered:!0,okText:"추가",cancelText:"취소",okButtonProps:{disabled:n.length===0||h},width:600,zIndex:1500,destroyOnHidden:!0,children:o.jsxs("div",{style:{padding:"20px 0"},children:[o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{marginBottom:"8px",fontWeight:500},children:"사이즈 선택"}),o.jsx(p.Radio.Group,{value:a,onChange:g=>s(g.target.value),optionType:"button",buttonStyle:"solid",children:c.map(g=>o.jsx(p.Radio.Button,{value:g.value,children:g.label},g.value))})]}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{marginBottom:"8px",fontWeight:500},children:"컴포넌트 선택"}),o.jsx(p.Select,{mode:"multiple",style:{width:"100%"},placeholder:`사용할 컴포넌트를 선택하세요 (최대 ${f}개)`,value:n,onChange:i,options:l,showSearch:!0,filterOption:(g,x)=>(x?.label??"").toLowerCase().includes(g.toLowerCase()),maxTagCount:"responsive",maxCount:f}),h&&o.jsxs("div",{style:{color:"#ff4d4f",fontSize:"12px",marginTop:"4px"},children:[a," 사이즈는 최대 ",f,"개까지만 선택 가능합니다."]})]})]})})},WN=({visible:e,onCancel:t,onOk:r})=>{const[n,i]=v.useState([]),[a,s]=v.useState("100%"),l=[{value:"BwgInput",label:"BwgInput - 입력 필드"},{value:"BwgSelect",label:"BwgSelect - 선택 박스"},{value:"BwgSearch",label:"BwgSearch - 검색 필드"},{value:"BwgDatePicker",label:"BwgDatePicker - 날짜 선택"},{value:"BwgRangePicker",label:"BwgRangePicker - 날짜 범위 선택"},{value:"BwgRadio",label:"BwgRadio - 라디오 버튼"},{value:"BwgCheck",label:"BwgCheck - 체크박스"},{value:"BwgCheckList",label:"BwgCheckList - 체크박스 그룹"},{value:"BwgTextArea",label:"BwgTextArea - 텍스트 영역"},{value:"BwgNumber",label:"BwgNumber - 숫자 입력"},{value:"BwgMultiSelect",label:"BwgMultiSelect - 다중 선택"},{value:"BwgMaskedInput",label:"BwgMaskedInput - 마스크 입력"},{value:"BwgMaskedDate",label:"BwgMaskedDate - 마스크 날짜 선택"},{value:"BwgButton",label:"BwgButton - 버튼"},{value:"BwgUploader",label:"BwgUploader - 파일 업로드"},{value:"BwgLargeUploader",label:"BwgLargeUploader - 대용량 파일 업로드"}],c=[{label:"100%",value:"100%"},{label:"50%",value:"50%"},{label:"33%",value:"33%"},{label:"25%",value:"25%"}],d=()=>{n.length>0&&r(n,a)},f=(g=>{switch(g){case"100%":return 1;case"50%":return 2;case"33%":return 3;case"25%":return 4;default:return 1}})(a),h=n.length>f,m=()=>{i([]),s("100%"),t()};return o.jsx(p.Modal,{title:"일반검색 행 추가",open:e,onOk:d,onCancel:m,centered:!0,okText:"추가",cancelText:"취소",okButtonProps:{disabled:n.length===0||h},width:600,zIndex:1500,destroyOnHidden:!0,children:o.jsxs("div",{style:{padding:"20px 0"},children:[o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{marginBottom:"8px",fontWeight:500},children:"사이즈 선택"}),o.jsx(p.Radio.Group,{value:a,onChange:g=>s(g.target.value),optionType:"button",buttonStyle:"solid",children:c.map(g=>o.jsx(p.Radio.Button,{value:g.value,children:g.label},g.value))})]}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{marginBottom:"8px",fontWeight:500},children:"컴포넌트 선택"}),o.jsx(p.Select,{mode:"multiple",style:{width:"100%"},placeholder:`사용할 컴포넌트를 선택하세요 (최대 ${f}개)`,value:n,onChange:i,options:l,showSearch:!0,filterOption:(g,x)=>(x?.label??"").toLowerCase().includes(g.toLowerCase()),maxTagCount:"responsive",maxCount:f}),h&&o.jsxs("div",{style:{color:"#ff4d4f",fontSize:"12px",marginTop:"4px"},children:[a," 사이즈는 최대 ",f,"개까지만 선택 가능합니다."]})]})]})})},ji=({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})]}),ma=({onReset:e=()=>{},onAddRequiredSearch:t=()=>{},onAddGeneralSearch:r=()=>{},onCopyCode:n=()=>{},copyButtonDisabled:i=!1})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx(p.Button,{icon:o.jsx(G.UndoOutlined,{}),onClick:e,type:"default",danger:!0,children:"초기화"}),o.jsx(p.Popover,{content:o.jsx("div",{style:{padding:"12px 0"},children:o.jsxs(p.Space,{direction:"vertical",style:{width:"100%"},children:[o.jsx(p.Button,{icon:o.jsx(G.PlusOutlined,{}),style:{width:"100%"},onClick:t,children:"필수검색 행 추가"}),o.jsx(p.Button,{icon:o.jsx(G.PlusOutlined,{}),style:{width:"100%"},onClick:r,children:"일반검색 행 추가"})]})}),title:"편집 옵션",placement:"bottom",trigger:"click",children:o.jsx(p.Button,{icon:o.jsx(G.SettingOutlined,{}),children:"편집"})}),o.jsx(p.Button,{onClick:n,disabled:i,type:"primary",icon:o.jsx(G.CopyOutlined,{}),children:"코드 복사"})]}),Jn=[{fieldName:"id",header:{text:"사번"}},{fieldName:"name",header:{text:"이름"}},{fieldName:"age",header:{text:"나이"}},{fieldName:"gender",header:{text:"성별"}}],UN=()=>{const{showPopup:e}=st.usePopup(),t=v.useRef(null),[r,n]=v.useState("readme"),[i,a]=v.useState(!1),[s,l]=v.useState(!1),[c,d]=v.useState(""),[u,f]=v.useState({}),h=v.useRef(null),m=v.useRef(null),g=v.useRef(null),x=v.useRef(null),y=v.useRef(null),w=v.useRef(null),b=v.useRef(null),[E,P]=v.useState(null),j=v.useRef(null),S=v.useRef(null),O=v.useRef(null),k=v.useRef(null),[I,_]=v.useState(!1),[$,R]=v.useState(!1),[z,F]=v.useState(!1),[M,D]=v.useState(!1),A=L=>{const ae=document.getElementById(L);ae&&t.current&&(t.current.scrollTo({top:ae.offsetTop-20,behavior:"smooth"}),n(L))},T=L=>{d(L),a(!0)},N=L=>{d(L),l(!0)},U=(L,ae)=>{console.log(`템플릿 ${c}에 필수검색으로 ${L.join(", ")} 컴포넌트들을 ${ae} 사이즈로 추가`),f(q=>({...q,[c]:{...q[c],required:{components:L,size:ae}}})),a(!1)},H=(L,ae)=>{console.log(`템플릿 ${c}에 일반검색으로 ${L.join(", ")} 컴포넌트들을 ${ae} 사이즈로 추가`),f(q=>({...q,[c]:{...q[c],general:{components:L,size:ae}}})),l(!1)},V=(L,ae)=>{const q={itemProps:{label:"예제",name:"exam"},key:`${L}_${ae}`};switch(L){case"BwgInput":return o.jsx(B.BwgInput,{...q});case"BwgSelect":return o.jsx(B.BwgSelect,{...q});case"BwgSearch":return o.jsx(B.BwgSearch,{...q});case"BwgDatePicker":return o.jsx(B.BwgDatePicker,{...q});case"BwgRangePicker":return o.jsx(B.BwgRangePicker,{...q});case"BwgRadio":return o.jsx(B.BwgRadio,{...q});case"BwgCheck":return o.jsx(B.BwgCheck,{...q});case"BwgCheckList":return o.jsx(B.BwgCheckList,{...q});case"BwgTextArea":return o.jsx(B.BwgTextArea,{...q});case"BwgNumber":return o.jsx(B.BwgNumber,{...q});case"BwgMultiSelect":return o.jsx(B.BwgMultiSelect,{...q});case"BwgMaskedInput":return o.jsx(B.BwgMaskedInput,{...q,mask:"0000-00-00"});case"BwgMaskedDate":return o.jsx(B.BwgMaskedDate,{...q});case"BwgButton":return o.jsx(B.BwgButton,{...q,children:"버튼"});case"BwgUploader":return o.jsx(B.BwgUploader,{...q});case"BwgLargeUploader":return o.jsx(B.BwgLargeUploader,{...q});default:return o.jsx(B.BwgInput,{...q})}},K=L=>{const ae=u[L];if(!ae)return{};const q={};if(ae.required){const{components:ue,size:he}=ae.required,we=he==="100%"?1:he==="50%"?2:he==="33%"?3:4,je=ue.map((Te,Ne)=>V(Te,Ne));for(;je.length<we;)je.push(o.jsx(o.Fragment,{}));q.reqArea={row1:je}}else q.reqArea={row1:[o.jsx(B.BwgInput,{itemProps:{label:"입력예제",name:"keyword"}})]};if(ae.general){const{components:ue,size:he}=ae.general,we=he==="100%"?1:he==="50%"?2:he==="33%"?3:4,je=ue.map((Te,Ne)=>V(Te,Ne));for(;je.length<we;)je.push(o.jsx(o.Fragment,{}));q.subArea={row1:je}}return q},oe=()=>{a(!1)},pe=()=>{l(!1)},ve=L=>{f(ae=>({...ae,[L]:void 0}))},Ce=L=>{const ae=u[L];let q="";if(ae?.required||ae?.general){if(q=`searchBox={{
|
|
245
|
-
`,ae.required){const{components:we,size:je}=ae.required,Te=je==="100%"?1:je==="50%"?2:je==="33%"?3:4;q+=` reqArea: {
|
|
246
|
-
`,q+=` row1: [
|
|
247
|
-
`,we.forEach((Ne,W)=>{q+=` <${Ne} itemProps={{ label: '예제', name: 'exam' }} />,
|
|
248
|
-
`});for(let Ne=we.length;Ne<Te;Ne++)q+=` <></>,
|
|
249
|
-
`;q+=` ]
|
|
250
|
-
`,q+=" }"}if(ae.general){ae.required&&(q+=`,
|
|
251
|
-
`);const{components:we,size:je}=ae.general,Te=je==="100%"?1:je==="50%"?2:je==="33%"?3:4;q+=` subArea: {
|
|
252
|
-
`,q+=` row1: [
|
|
253
|
-
`,we.forEach((Ne,W)=>{q+=` <${Ne} itemProps={{ label: '예제', name: 'exam' }} />,
|
|
254
|
-
`});for(let Ne=we.length;Ne<Te;Ne++)q+=` <></>,
|
|
255
|
-
`;q+=` ]
|
|
256
|
-
`,q+=" }"}q+=`
|
|
257
|
-
}}`}let ue="";switch(L){case"bwgpageTmpl01":ue=` <ContentLayOut>
|
|
258
|
-
<ContentBox style={{ height: '300px' }}>
|
|
259
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
260
|
-
</ContentBox>
|
|
261
|
-
</ContentLayOut>`;break;case"bwgpageTmpl02":ue=` <ContentLayOut>
|
|
262
|
-
<ContentBox className="w50 mr20" style={{ height: '300px' }}>
|
|
263
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
264
|
-
</ContentBox>
|
|
265
|
-
<ContentBox className="w50" style={{ height: '300px' }}>
|
|
266
|
-
<BwgInfoArea title="상세정보">
|
|
267
|
-
<div>이곳에 각종 컴포넌트들을 구현하세요.</div>
|
|
268
|
-
</BwgInfoArea>
|
|
269
|
-
</ContentBox>
|
|
270
|
-
</ContentLayOut>`;break;case"bwgpageTmpl03":ue=` <ContentLayOut type="vertical">
|
|
271
|
-
<ContentBox style={{ height: '300px' }} className="mb20">
|
|
272
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
273
|
-
</ContentBox>
|
|
274
|
-
<ContentBox style={{ height: '300px' }}>
|
|
275
|
-
<BwgInfoArea title="상세정보">
|
|
276
|
-
<div>이곳에 각종 컴포넌트들을 구현하세요.</div>
|
|
277
|
-
</BwgInfoArea>
|
|
278
|
-
</ContentBox>
|
|
279
|
-
</ContentLayOut>`;break;case"bwgpageTmpl04":ue=` <ContentLayOut>
|
|
280
|
-
<ContentBox className="w50 mr20" style={{ height: '300px' }}>
|
|
281
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
282
|
-
</ContentBox>
|
|
283
|
-
<ContentBox className="w50" style={{ height: '300px' }}>
|
|
284
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
285
|
-
</ContentBox>
|
|
286
|
-
</ContentLayOut>`;break;case"bwgpageTmpl05":ue=` <ContentLayOut type="vertical">
|
|
287
|
-
<ContentBox style={{ height: '300px' }} className="mb20">
|
|
288
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
289
|
-
</ContentBox>
|
|
290
|
-
<ContentBox style={{ height: '300px' }}>
|
|
291
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
292
|
-
</ContentBox>
|
|
293
|
-
</ContentLayOut>`;break;default:ue=` <ContentLayOut>
|
|
294
|
-
<ContentBox style={{ height: '300px' }}>
|
|
295
|
-
<BwgGrid ref={gridRef} gridColumns={gridColumns}></BwgGrid>
|
|
296
|
-
</ContentBox>
|
|
297
|
-
</ContentLayOut>`}return`// 아래 코드를 return 영역에 붙여 넣으시기 바랍니다.
|
|
298
|
-
<BwgView${q?" "+q:""}>
|
|
299
|
-
${ue}
|
|
300
|
-
</BwgView>`},Pe=L=>{const ae=Ce(L);navigator.clipboard.writeText(ae).then(()=>{p.message.success("코드가 클립보드에 복사되었습니다!")}).catch(()=>{const q=document.createElement("textarea");q.value=ae,q.select(),document.execCommand("copy"),document.body.removeChild(q),p.message.success("코드가 클립보드에 복사되었습니다!")})},J=[{title:"공통버튼 영역",description:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx("p",{style:{marginBottom:"16px",fontSize:"14px",lineHeight:"1.6",color:"#262626"},children:"공통버튼 영역은 권한 등록을 통해 자동으로 생성됩니다."}),o.jsxs("div",{style:{background:"#f8f9fa",padding:"16px",borderRadius:"8px",border:"1px solid #e9ecef"},children:[o.jsx("h4",{style:{margin:"0 0 12px 0",fontSize:"14px",fontWeight:600,color:"#495057"},children:"※ 공통버튼 사용하기"}),o.jsxs("ol",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",lineHeight:"1.8",color:"#495057"},children:[o.jsx("li",{children:"메뉴등록"}),o.jsx("li",{children:"권한등록"}),o.jsx("li",{children:"권한별 버튼 등록"}),o.jsx("li",{children:"역할에 권한 부여"})]})]})]}),target:()=>j.current},{title:"공통(조회)버튼 사용",description:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsxs("p",{style:{marginBottom:"16px",fontSize:"14px",lineHeight:"1.6",color:"#262626"},children:["BwgView 컴포넌트의 grantEvent 속성을 사용하여 이벤트 매핑을 합니다.",o.jsx("br",{}),"이벤트 객체 생성시, 함수명과 버튼ID로 매핑되어 버튼에 적용됩니다."]}),o.jsxs("div",{style:{marginBottom:"20px"},children:[o.jsxs("h4",{style:{margin:"0 0 12px 0",fontSize:"14px",fontWeight:600,color:"#495057",display:"flex",alignItems:"center"},children:[o.jsx("span",{style:{background:"#007bff",color:"white",borderRadius:"50%",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",marginRight:"8px"},children:"1"}),"객체 선언 예시"]}),o.jsx(el,{importText:`const grantEvent = {
|
|
301
|
-
search: () => {
|
|
302
|
-
// getFormData() 함수는 searchBox의 모든 컴포넌트의 값을 가져옵니다.
|
|
303
|
-
console.log('search :: ', getFormData());
|
|
304
|
-
},
|
|
305
|
-
};`})]}),o.jsxs("div",{children:[o.jsxs("h4",{style:{margin:"0 0 12px 0",fontSize:"14px",fontWeight:600,color:"#495057",display:"flex",alignItems:"center"},children:[o.jsx("span",{style:{background:"#28a745",color:"white",borderRadius:"50%",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",marginRight:"8px"},children:"2"}),"적용 예시"]}),o.jsx(el,{importText:"<BwgView grantEvent={grantEvent}></BwgView>"})]})]}),target:()=>S.current}],ye=[{title:"팝업 사용하기",description:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsxs("p",{style:{marginBottom:"16px",fontSize:"14px",lineHeight:"1.6",color:"#262626"},children:["usePopup 훅을 사용하여 팝업을 쉽게 열 수 있습니다.",o.jsx("br",{}),"팝업 ID와 파라미터를 전달하여 동적으로 팝업을 호출합니다."]}),o.jsxs("div",{style:{background:"#f8f9fa",padding:"16px",borderRadius:"8px",border:"1px solid #e9ecef"},children:[o.jsx("h4",{style:{margin:"0 0 12px 0",fontSize:"14px",fontWeight:600,color:"#495057"},children:"※ 팝업 사용 방법"}),o.jsxs("ol",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",lineHeight:"1.8",color:"#495057"},children:[o.jsx("li",{children:"usePopup 훅 import"}),o.jsx("li",{children:"showPopup 함수로 팝업 호출"}),o.jsx("li",{children:"팝업 ID와 파라미터 전달"})]})]}),o.jsx("div",{style:{marginTop:"16px",textAlign:"center"},children:o.jsx(p.Button,{type:"primary",size:"small",onClick:()=>{e("CMTestP01",{})},style:{background:"#007bff",borderColor:"#007bff",borderRadius:"6px",fontSize:"13px",padding:"6px 16px",height:"auto"},children:"예제팝업 열어보기"})})]}),target:()=>O.current}],me=[{title:"드로어 사용하기",description:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsxs("p",{style:{marginBottom:"16px",fontSize:"14px",lineHeight:"1.6",color:"#262626"},children:["BwgDrawer 컴포넌트를 사용하여 사이드 패널을 구현할 수 있습니다.",o.jsx("br",{}),"상태 관리와 함께 사용하여 드로어의 열림/닫힘을 제어합니다."]}),o.jsxs("div",{style:{background:"#f8f9fa",padding:"16px",borderRadius:"8px",border:"1px solid #e9ecef"},children:[o.jsx("h4",{style:{margin:"0 0 12px 0",fontSize:"14px",fontWeight:600,color:"#495057"},children:"※ 드로어 사용 방법"}),o.jsxs("ol",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",lineHeight:"1.8",color:"#495057"},children:[o.jsx("li",{children:"드로어 상태 관리 (useState)"}),o.jsx("li",{children:"BwgDrawer 컴포넌트 추가"}),o.jsx("li",{children:"open, onClose 속성 설정"})]})]}),o.jsx("div",{style:{marginTop:"16px",textAlign:"center"},children:o.jsx(p.Button,{type:"primary",size:"small",onClick:()=>{D(!0)},style:{background:"#28a745",borderColor:"#28a745",borderRadius:"6px",fontSize:"13px",padding:"6px 16px",height:"auto"},children:"예제드로어 열어보기"})})]}),target:()=>k.current}];return o.jsxs(Nc,{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:"개요"})})}),o.jsx("div",{id:"nav-container",style:{padding:"10px"},children:o.jsx(wn,{id:"readmeBtn",onClick:()=>{P("readmeBtn"),A("readme")},isActive:r==="readme",children:"준비하기"})}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"템플릿 목록"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(wn,{id:"bwgpageTmpl01Btn",onClick:()=>{P("bwgpageTmpl01Btn"),A("bwgpageTmpl01")},isActive:r==="bwgpageTmpl01",children:"검색+그리드"}),o.jsx(wn,{id:"bwgpageTmpl02Btn",onClick:()=>{P("bwgpageTmpl02Btn"),A("bwgpageTmpl02")},isActive:r==="bwgpageTmpl02",children:"검색+그리드(좌)+상세(우)"}),o.jsx(wn,{id:"bwgpageTmpl03Btn",onClick:()=>{P("bwgpageTmpl03Btn"),A("bwgpageTmpl03")},isActive:r==="bwgpageTmpl03",children:"검색+그리드(상)+상세(하)"}),o.jsx(wn,{id:"bwgpageTmpl04Btn",onClick:()=>{P("bwgpageTmpl04Btn"),A("bwgpageTmpl04")},isActive:r==="bwgpageTmpl04",children:"검색+그리드(좌)+그리드(우)"}),o.jsx(wn,{id:"bwgpageTmpl05Btn",onClick:()=>{P("bwgpageTmpl05Btn"),A("bwgpageTmpl05")},isActive:r==="bwgpageTmpl05",children:"검색+그리드(상)+그리드(하)"})]}),o.jsx("div",{style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(Le,{title:o.jsx("div",{children:"공통기능 활용"})})}),o.jsxs("div",{id:"nav-container",style:{padding:"10px"},children:[o.jsx(wn,{id:"buttonsBtn",onClick:()=>{P("buttonsBtn"),A("application"),_(!0)},isActive:r==="buttons",children:"공통버튼 활용하기"}),o.jsx(wn,{id:"popupBtn",onClick:()=>{P("popupBtn"),A("application"),R(!0)},isActive:r==="popup",children:"팝업 활용하기"}),o.jsx(wn,{id:"drawerBtn",onClick:()=>{P("drawerBtn"),A("application"),F(!0)},isActive:r==="drawer",children:"드로어 활용하기"})]})]}),o.jsxs(p.Col,{ref:t,id:"content-container",span:20,style:{height:"100%",background:"#f0f0f0",overflow:"auto",padding:"20px"},children:[o.jsx("div",{id:"readme",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ji,{title:"준비사항",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.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"12px",padding:"12px 16px",background:"#f5f5f5",borderRadius:"6px",border:"1px solid #e8e8e8",fontSize:"15px",fontWeight:600,color:"#262626"},children:"1. @bwg/ui 패키지 설치 확인"}),o.jsxs("div",{style:{padding:"16px",background:"#fafafa",borderRadius:"6px",border:"1px solid #f0f0f0",marginLeft:"16px"},children:[o.jsx("div",{style:{color:"#595959",fontSize:"14px",fontWeight:500,marginBottom:"8px"},children:"설치방법:"}),o.jsx("code",{style:{background:"#f0f0f0",padding:"6px 10px",borderRadius:"4px",fontSize:"13px",color:"#262626",fontFamily:'Monaco, Consolas, "Courier New", monospace'},children:"npm install @bwg/ui"})]})]}),o.jsxs("div",{style:{marginBottom:"24px"},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"12px",padding:"12px 16px",background:"#f5f5f5",borderRadius:"6px",border:"1px solid #e8e8e8",fontSize:"15px",fontWeight:600,color:"#262626"},children:"2. VS Code 스니펫 설정 확인"}),o.jsxs("div",{style:{padding:"16px",background:"#fafafa",borderRadius:"6px",border:"1px solid #f0f0f0",marginLeft:"16px"},children:[o.jsx("div",{style:{color:"#595959",fontSize:"14px",fontWeight:500,marginBottom:"12px"},children:"확인방법:"}),o.jsxs("div",{style:{marginBottom:"8px"},children:[o.jsx("span",{style:{display:"inline-block",width:"18px",height:"18px",background:"#8c8c8c",color:"white",borderRadius:"50%",textAlign:"center",lineHeight:"18px",fontSize:"11px",fontWeight:"bold",marginRight:"8px"},children:"1"}),o.jsxs("span",{style:{color:"#595959",fontSize:"14px"},children:["프로젝트 루트 디렉토리에"," ",o.jsx("code",{style:{background:"#f0f0f0",padding:"2px 6px",borderRadius:"3px",fontSize:"12px"},children:".vscode"})," ","폴더 확인"]})]}),o.jsxs("div",{children:[o.jsx("span",{style:{display:"inline-block",width:"18px",height:"18px",background:"#8c8c8c",color:"white",borderRadius:"50%",textAlign:"center",lineHeight:"18px",fontSize:"11px",fontWeight:"bold",marginRight:"8px"},children:"2"}),o.jsxs("span",{style:{color:"#595959",fontSize:"14px"},children:[o.jsx("code",{style:{background:"#f0f0f0",padding:"2px 6px",borderRadius:"3px",fontSize:"12px"},children:"bwg-code-assist.code-snippets"})," ","파일 유무 확인"]})]})]})]}),o.jsx("div",{style:{padding:"12px 16px",background:"#f6ffed",borderRadius:"6px",border:"1px solid #b7eb8f",textAlign:"center"},children:o.jsx("div",{style:{color:"#52c41a",fontSize:"14px",fontWeight:500},children:"💡 위 준비사항을 모두 확인하신 후 템플릿을 사용하시기 바랍니다!"})})]})})}),o.jsx("div",{id:"bwgpageTmpl01",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx(ji,{title:"템플릿01",subtitle:"검색조건 + 그리드"}),style:{borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.06)"},children:[o.jsxs("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["검색과 그리드 영역으로 이루어진 기본 템플릿입니다.",o.jsx("br",{}),"예약어 코드 : ",o.jsx("code",{children:"bwgpageTmpl01"})]}),o.jsx(ma,{onReset:()=>ve("bwgpageTmpl01"),onAddRequiredSearch:()=>T("bwgpageTmpl01"),onAddGeneralSearch:()=>N("bwgpageTmpl01"),onCopyCode:()=>Pe("bwgpageTmpl01")})]}),o.jsx(Rt,{searchBox:K("bwgpageTmpl01"),children:o.jsx(ze,{children:o.jsx(Ae,{style:{height:"300px"},children:o.jsx(Ve,{ref:h,gridColumns:Jn})})})})]})}),o.jsx("div",{id:"bwgpageTmpl02",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx(ji,{title:"템플릿02",subtitle:"검색조건 + 그리드(좌) + 상세(우)"}),children:[o.jsxs("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["그리드 + 상세 영역이 좌/우 로 이루어진 기본 템플릿입니다.",o.jsx("br",{}),"예약어 코드 : ",o.jsx("code",{children:"bwgpageTmpl02"})]}),o.jsx(ma,{onReset:()=>ve("bwgpageTmpl02"),onAddRequiredSearch:()=>T("bwgpageTmpl02"),onAddGeneralSearch:()=>N("bwgpageTmpl02"),onAddPermissionButton:()=>{console.log("템플릿02 - 권한버튼 추가")},onCopyCode:()=>Pe("bwgpageTmpl02")})]}),o.jsx(Rt,{searchBox:K("bwgpageTmpl02"),children:o.jsxs(ze,{children:[o.jsx(Ae,{className:"w50 mr20",style:{height:"300px"},children:o.jsx(Ve,{ref:m,gridColumns:Jn})}),o.jsx(Ae,{className:"w50",style:{height:"300px"},children:o.jsx(pn,{title:"상세정보",children:o.jsx("div",{children:"이곳에 각종 컴포넌트들을 구현하세요."})})})]})})]})}),o.jsx("div",{id:"bwgpageTmpl03",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx(ji,{title:"템플릿03",subtitle:"검색조건 + 그리드(상) + 상세(하)"}),children:[o.jsxs("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["그리드 + 상세 영역이 상/하 로 이루어진 기본 템플릿입니다.",o.jsx("br",{}),"예약어 코드 : ",o.jsx("code",{children:"bwgpageTmpl03"})]}),o.jsx(ma,{onReset:()=>ve("bwgpageTmpl03"),onAddRequiredSearch:()=>T("bwgpageTmpl03"),onAddGeneralSearch:()=>N("bwgpageTmpl03"),onAddPermissionButton:()=>{console.log("템플릿03 - 권한버튼 추가")},onCopyCode:()=>Pe("bwgpageTmpl03")})]}),o.jsx(Rt,{searchBox:K("bwgpageTmpl03"),children:o.jsxs(ze,{type:"vertical",children:[o.jsx(Ae,{style:{height:"300px"},className:"mb20",children:o.jsx(Ve,{ref:g,gridColumns:Jn})}),o.jsx(Ae,{style:{height:"300px"},children:o.jsx(pn,{title:"상세정보",children:o.jsx("div",{children:"이곳에 각종 컴포넌트들을 구현하세요."})})})]})})]})}),o.jsx("div",{id:"bwgpageTmpl04",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx(ji,{title:"템플릿04",subtitle:"검색조건 + 그리드(좌) + 그리드(우)"}),children:[o.jsxs("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["그리드 + 그리드 영역이 좌/우 로 이루어진 기본 템플릿입니다.",o.jsx("br",{}),"예약어 코드 : ",o.jsx("code",{children:"bwgpageTmpl04"})]}),o.jsx(ma,{onReset:()=>ve("bwgpageTmpl04"),onAddRequiredSearch:()=>T("bwgpageTmpl04"),onAddGeneralSearch:()=>N("bwgpageTmpl04"),onAddPermissionButton:()=>{console.log("템플릿04 - 권한버튼 추가")},onCopyCode:()=>Pe("bwgpageTmpl04")})]}),o.jsx(Rt,{searchBox:K("bwgpageTmpl04"),children:o.jsxs(ze,{children:[o.jsx(Ae,{className:"w50 mr20",style:{height:"300px"},children:o.jsx(Ve,{ref:x,gridColumns:Jn})}),o.jsx(Ae,{className:"w50",style:{height:"300px"},children:o.jsx(Ve,{ref:x,gridColumns:Jn})})]})})]})}),o.jsx("div",{id:"bwgpageTmpl05",style:{marginBottom:"60px"},children:o.jsxs(p.Card,{title:o.jsx(ji,{title:"템플릿05",subtitle:"검색조건 + 그리드(상) + 그리드(하)"}),children:[o.jsxs("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[o.jsxs(p.Typography.Text,{style:{color:"#656d76",fontSize:"13px",flex:1,marginRight:"16px"},children:["그리드 + 그리드 영역이 상/하 로 이루어진 기본 템플릿입니다.",o.jsx("br",{}),"예약어 코드 : ",o.jsx("code",{children:"bwgpageTmpl05"})]}),o.jsx(ma,{onReset:()=>ve("bwgpageTmpl05"),onAddRequiredSearch:()=>T("bwgpageTmpl05"),onAddGeneralSearch:()=>N("bwgpageTmpl05"),onAddPermissionButton:()=>{console.log("템플릿05 - 권한버튼 추가")},onCopyCode:()=>Pe("bwgpageTmpl05")})]}),o.jsx(Rt,{searchBox:K("bwgpageTmpl05"),children:o.jsxs(ze,{type:"vertical",children:[o.jsx(Ae,{style:{height:"300px"},className:"mb20",children:o.jsx(Ve,{ref:y,gridColumns:Jn})}),o.jsx(Ae,{style:{height:"300px"},children:o.jsx(Ve,{ref:y,gridColumns:Jn})})]})})]})}),o.jsx("div",{id:"application",children:o.jsx(p.Card,{title:o.jsx(ji,{title:"공통기능 활용",subtitle:"공통버튼 / 팝업 / 드로어"}),children:o.jsx("div",{style:{padding:"0px 30px",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:o.jsxs("div",{className:"bwg-view main-view",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[o.jsx("div",{className:"bwgview-header-container",children:o.jsxs("div",{className:"bwgview-header",children:[o.jsx("div",{className:"bwgview-header-left",children:o.jsx(p.ConfigProvider,{theme:{components:{Tag:{controlHeight:28,controlHeightLG:28,controlHeightSM:28,controlHeightXS:28}}},children:o.jsxs(p.Space,{children:[o.jsx(G.StarFilled,{style:{color:"#faad14"}}),o.jsxs(p.Space.Compact,{style:{alignItems:"center"},children:[o.jsx("span",{className:"pageMenuNm",children:"임시메뉴"}),o.jsx(p.Tag,{className:"page-num-tag",children:"0000"}),o.jsx(p.Tooltip,{title:"도움말",color:"geekblue",children:o.jsx(p.Button,{variant:"text",type:"text",className:"menu-help-btn",icon:o.jsx("span",{className:"bwgHelpIcon"})})})]})]})})}),o.jsx("div",{className:"bwgview-header-right",children:o.jsx(p.ConfigProvider,{theme:{components:{Space:{padding:8}}},children:o.jsxs(p.Space,{children:[o.jsxs(p.Flex,{gap:8,children:[o.jsx(p.Button,{ref:O,className:"bwg-btn",children:"팝업열기"}),o.jsx(p.Button,{ref:k,className:"bwg-btn",onClick:()=>{D(!0)},children:"드로어열기"})]}),o.jsx(p.ConfigProvider,{theme:{components:{Divider:{verticalMarginInline:0}}},children:o.jsx(p.Divider,{type:"vertical"})}),o.jsxs(p.Flex,{ref:j,gap:8,className:"permission-buttons",children:[o.jsx(p.Button,{ref:S,className:"bwg-btn",onClick:()=>{},children:"조회"}),o.jsx(p.Button,{ref:b,className:"bwg-btn",onClick:()=>{},children:"신규"})]})]})})})]})}),o.jsx("div",{className:"bwgview-content",children:o.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:o.jsx(ze,{children:o.jsx(Ae,{style:{height:"300px"},children:o.jsx(Ve,{ref:w,gridColumns:Jn})})})})})]})})})})]})]}),o.jsx(p.Tour,{open:I,onClose:()=>_(!1),steps:J}),o.jsx(p.Tour,{open:$,onClose:()=>R(!1),steps:ye}),o.jsx(p.Tour,{open:z,onClose:()=>F(!1),steps:me}),o.jsx(HN,{visible:i,onCancel:oe,onOk:U}),o.jsx(WN,{visible:s,onCancel:pe,onOk:H}),o.jsx(fn,{title:"드로어 예제",width:600,open:M,onClose:()=>{D(!1),F(!1)},placement:"right",zIndex:1500,children:o.jsxs(ze,{type:"vertical",children:[o.jsxs(p.Card,{className:"w100 mb20",children:[o.jsx(Le,{title:"예제 코드 : 컴포넌트 안에 입력하세요."}),o.jsx(el,{importText:"const [drawerOpen, setDrawerOpen] = useState<boolean>(false);"})]}),o.jsxs(p.Card,{className:"w100",children:[o.jsx(Le,{title:"예제 코드 : BwgView 안에 입력하세요."}),o.jsx(el,{importText:`<BwgDrawer
|
|
306
|
-
title="드로어 예제"
|
|
307
|
-
open={drawerOpen}
|
|
308
|
-
onClose={() => {
|
|
309
|
-
setDrawerOpen(false);
|
|
310
|
-
}}
|
|
311
|
-
placement="right"
|
|
312
|
-
><div>드로어 영역</div></BwgDrawer>`})]})]})})]})},nt=({importText:e,onCopy:t})=>o.jsx(im,{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(G.CopyOutlined,{style:{color:"#858585",fontSize:"14px",marginLeft:"12px",flexShrink:0}})]})}),ei=({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})]})},ti=({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})]}),B0=()=>{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,"님!"]})]})]})]})},$0=()=>{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 카운트 증가"})]})]})]})]})},L0=()=>{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 재계산 안됨)"})]})]})]})},z0=()=>{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"}})]})]})]})},F0=()=>{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:"(브라우저 창 크기를 조절해보세요)"})]})]})]})},KN=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]})]})}),qN=()=>{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(KN,{ref:e,placeholder:"이 입력 필드는 ref가 전달됩니다"}),o.jsxs(p.Space,{children:[o.jsx(p.Button,{onClick:t,children:"포커스"}),o.jsx(p.Button,{onClick:r,children:"전체 선택"})]})]})]})},YN=()=>{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(GN,{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:"값 가져오기"})]})]})]})},GN=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:"부모에서 제어되는 입력 필드"})}),XN=()=>{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(Nc,{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(ei,{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(ei,{id:"useStateBtn",onClick:()=>{n("useState")},isActive:t==="useState",children:"useState"}),o.jsx(ei,{id:"useRefBtn",onClick:()=>{n("useRef")},isActive:t==="useRef",children:"useRef"}),o.jsx(ei,{id:"useMemoBtn",onClick:()=>{n("useMemo")},isActive:t==="useMemo",children:"useMemo"}),o.jsx(ei,{id:"useCallbackBtn",onClick:()=>{n("useCallback")},isActive:t==="useCallback",children:"useCallback"}),o.jsx(ei,{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(ei,{id:"forwardRefBtn",onClick:()=>{n("forwardRef")},isActive:t==="forwardRef",children:"forwardRef"}),o.jsx(ei,{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(ti,{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(ti,{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(nt,{importText:`import React, { useState } from 'react';
|
|
313
|
-
|
|
314
|
-
const MyComponent = () => {
|
|
315
|
-
// [현재값, 값을변경하는함수] = useState(초기값)
|
|
316
|
-
const [count, setCount] = useState(0);
|
|
317
|
-
const [name, setName] = useState('');
|
|
318
|
-
const [isVisible, setIsVisible] = useState(true);
|
|
319
|
-
|
|
320
|
-
return (
|
|
321
|
-
<div>
|
|
322
|
-
<div>카운트: {count}</div>
|
|
323
|
-
<button onClick={() => setCount(count + 1)}>증가</button>
|
|
324
|
-
</div>
|
|
325
|
-
);
|
|
326
|
-
};`})]}),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(B0,{}),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(nt,{importText:`// 검색어와 활성 세그먼트 상태 관리
|
|
327
|
-
const [searchValue, setSearchValue] = useState('');
|
|
328
|
-
const [activeSegment, setActiveSegment] = useState<'category' | 'favorite'>(
|
|
329
|
-
'category'
|
|
330
|
-
);
|
|
331
|
-
|
|
332
|
-
// 세그먼트 변경 처리
|
|
333
|
-
const handleSegmentChange = (value: 'category' | 'favorite') => {
|
|
334
|
-
setActiveSegment(value);
|
|
335
|
-
// 카테고리로 변경 시 검색값 초기화
|
|
336
|
-
if (value === 'category') {
|
|
337
|
-
setSearchValue('');
|
|
338
|
-
}
|
|
339
|
-
};`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 시스템 코드 관리 (CMSystCodeM01.tsx)"}),o.jsx(nt,{importText:`// 선택된 시스템과 탭 상태 관리
|
|
340
|
-
const [selectedSystem, setSelectedSystem] = useState<SystemInfo | null>(null);
|
|
341
|
-
const [activeTab, setActiveTab] = useState<'group' | 'detail'>('group');
|
|
342
|
-
|
|
343
|
-
// 시스템 카드 클릭 처리
|
|
344
|
-
const handleSystemClick = (system: SystemInfo) => {
|
|
345
|
-
setSelectedSystem(system);
|
|
346
|
-
// 시스템 변경 시 그룹 탭으로 초기화
|
|
347
|
-
setActiveTab('group');
|
|
348
|
-
};`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 로딩 상태 관리 (Main.tsx)"}),o.jsx(nt,{importText:`// 전역 로딩 상태 관리
|
|
349
|
-
const [loading, setLoading] = useState(false);
|
|
350
|
-
|
|
351
|
-
// API 호출 시 로딩 상태 제어
|
|
352
|
-
const loadData = async () => {
|
|
353
|
-
setLoading(true);
|
|
354
|
-
try {
|
|
355
|
-
await fetchMenu({ crprCd, userId, prntGbcd: 1 });
|
|
356
|
-
await fetchCommonCodes();
|
|
357
|
-
} finally {
|
|
358
|
-
setLoading(false);
|
|
359
|
-
}
|
|
360
|
-
};`})]})]}),o.jsx(B0,{})]})})}),o.jsx("div",{id:"useRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { useRef } from 'react';
|
|
361
|
-
|
|
362
|
-
const MyComponent = () => {
|
|
363
|
-
// DOM 참조용
|
|
364
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
365
|
-
|
|
366
|
-
// 값 저장용 (리렌더링 시에도 유지됨)
|
|
367
|
-
const countRef = useRef(0);
|
|
368
|
-
|
|
369
|
-
const focusInput = () => {
|
|
370
|
-
inputRef.current?.focus(); // DOM 요소에 접근
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
const incrementCount = () => {
|
|
374
|
-
countRef.current += 1; // 값 변경 (리렌더링 안됨)
|
|
375
|
-
console.log(countRef.current);
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
return (
|
|
379
|
-
<div>
|
|
380
|
-
<input ref={inputRef} />
|
|
381
|
-
<button onClick={focusInput}>포커스</button>
|
|
382
|
-
</div>
|
|
383
|
-
);
|
|
384
|
-
};`})]}),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($0,{}),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(nt,{importText:`// 여러 그리드 컴포넌트에 대한 ref 관리
|
|
385
|
-
const roleGridRef = useRef<BwgGridRef>(null);
|
|
386
|
-
const dprtGridRef = useRef<BwgGridRef>(null);
|
|
387
|
-
const userGridRef = useRef<BwgGridRef>(null);
|
|
388
|
-
|
|
389
|
-
// 그리드 데이터 조작
|
|
390
|
-
const serviceEvent = {
|
|
391
|
-
SCMROLE00101: () => {
|
|
392
|
-
callService('SCMROLE00101', { crprCd: getCrprCd() }).then(response => {
|
|
393
|
-
// ref를 통해 그리드에 데이터 추가
|
|
394
|
-
roleGridRef.current?.addAllData(response.data);
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
};`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 컴포넌트 캐싱 (Main.tsx)"}),o.jsx(nt,{importText:`// 컴포넌트 인스턴스를 캐싱하여 성능 최적화
|
|
398
|
-
const componentCache = useRef<Map<string, React.ComponentType>>(new Map());
|
|
399
|
-
const componentInstances = useRef<Map<string, React.ReactElement>>(new Map());
|
|
400
|
-
|
|
401
|
-
// 동적 컴포넌트 로딩 시 캐시 활용
|
|
402
|
-
const createViewLoader = (scrnPath: string) => {
|
|
403
|
-
// 캐시된 컴포넌트가 있으면 재사용
|
|
404
|
-
if (componentCache.current.has(scrnPath)) {
|
|
405
|
-
return componentCache.current.get(scrnPath);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
// 새 컴포넌트 로드 후 캐시에 저장
|
|
409
|
-
const component = views[globKey];
|
|
410
|
-
componentCache.current.set(scrnPath, component);
|
|
411
|
-
return component;
|
|
412
|
-
};`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 스크롤 제어 (BwgReactGuideM01.tsx)"}),o.jsx(nt,{importText:`// 콘텐츠 영역 스크롤 제어
|
|
413
|
-
const contentRef = useRef<HTMLDivElement>(null);
|
|
414
|
-
|
|
415
|
-
const scrollToSection = (id: string) => {
|
|
416
|
-
const element = document.getElementById(id);
|
|
417
|
-
if (element && contentRef.current) {
|
|
418
|
-
// ref를 통해 스크롤 위치 제어
|
|
419
|
-
contentRef.current.scrollTo({
|
|
420
|
-
top: element.offsetTop - 20,
|
|
421
|
-
behavior: 'smooth',
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
};`})]})]}),o.jsx($0,{})]})})}),o.jsx("div",{id:"useMemo",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { useMemo, useState } from 'react';
|
|
425
|
-
|
|
426
|
-
const MyComponent = () => {
|
|
427
|
-
const [count, setCount] = useState(0);
|
|
428
|
-
const [todos, setTodos] = useState([]);
|
|
429
|
-
|
|
430
|
-
// 비싼 계산을 메모이제이션
|
|
431
|
-
const expensiveValue = useMemo(() => {
|
|
432
|
-
console.log('비싼 계산 실행!');
|
|
433
|
-
return count * 1000; // 실제로는 복잡한 계산
|
|
434
|
-
}, [count]); // count가 변경될 때만 재계산
|
|
435
|
-
|
|
436
|
-
return (
|
|
437
|
-
<div>
|
|
438
|
-
<div>결과: {expensiveValue}</div>
|
|
439
|
-
<button onClick={() => setCount(count + 1)}>
|
|
440
|
-
카운트 증가
|
|
441
|
-
</button>
|
|
442
|
-
</div>
|
|
443
|
-
);
|
|
444
|
-
};`})]}),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(L0,{}),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(nt,{importText:`// 메뉴 검색 옵션을 메모이제이션하여 성능 최적화
|
|
445
|
-
const menuSearchOptions = useMemo(() => {
|
|
446
|
-
if (!menuList || menuList.length === 0) {
|
|
447
|
-
return [];
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
const options: MenuSearchOption[] = [];
|
|
451
|
-
|
|
452
|
-
const addMenuOptions = (menus: MenuItem[], parentPath = '') => {
|
|
453
|
-
menus.forEach(menu => {
|
|
454
|
-
if (menu.menuNm && menu.scrnId) {
|
|
455
|
-
options.push({
|
|
456
|
-
value: menu.menuId,
|
|
457
|
-
label: parentPath ? \`\${parentPath} > \${menu.menuNm}\` : menu.menuNm,
|
|
458
|
-
menuItem: menu,
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
if (menu.children && menu.children.length > 0) {
|
|
463
|
-
const newParentPath = parentPath
|
|
464
|
-
? \`\${parentPath} > \${menu.menuNm}\`
|
|
465
|
-
: menu.menuNm;
|
|
466
|
-
addMenuOptions(menu.children, newParentPath);
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
addMenuOptions(menuList);
|
|
472
|
-
return options;
|
|
473
|
-
}, [menuList]); // menuList가 변경될 때만 재계산`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 필터링된 데이터 최적화 예제"}),o.jsx(nt,{importText:`// 대용량 데이터 필터링 시 useMemo 활용
|
|
474
|
-
const FilteredDataExample = () => {
|
|
475
|
-
const [searchTerm, setSearchTerm] = useState('');
|
|
476
|
-
const [data] = useState(largeDataSet); // 큰 데이터셋
|
|
477
|
-
|
|
478
|
-
// 검색어가 변경될 때만 필터링 재실행
|
|
479
|
-
const filteredData = useMemo(() => {
|
|
480
|
-
if (!searchTerm) return data;
|
|
481
|
-
|
|
482
|
-
return data.filter(item =>
|
|
483
|
-
item.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
|
484
|
-
item.description.toLowerCase().includes(searchTerm.toLowerCase())
|
|
485
|
-
);
|
|
486
|
-
}, [data, searchTerm]);
|
|
487
|
-
|
|
488
|
-
// 통계 계산도 메모이제이션
|
|
489
|
-
const statistics = useMemo(() => {
|
|
490
|
-
return {
|
|
491
|
-
total: filteredData.length,
|
|
492
|
-
active: filteredData.filter(item => item.status === 'active').length,
|
|
493
|
-
inactive: filteredData.filter(item => item.status === 'inactive').length,
|
|
494
|
-
};
|
|
495
|
-
}, [filteredData]);
|
|
496
|
-
|
|
497
|
-
return (
|
|
498
|
-
<div>
|
|
499
|
-
<div>총 {statistics.total}개 항목</div>
|
|
500
|
-
<div>활성: {statistics.active}, 비활성: {statistics.inactive}</div>
|
|
501
|
-
</div>
|
|
502
|
-
);
|
|
503
|
-
};`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 복잡한 계산 최적화 예제"}),o.jsx(nt,{importText:`// 복잡한 차트 데이터 가공 시 useMemo 활용
|
|
504
|
-
const ChartDataExample = () => {
|
|
505
|
-
const [rawData, setRawData] = useState([]);
|
|
506
|
-
const [dateRange, setDateRange] = useState({ start: '', end: '' });
|
|
507
|
-
|
|
508
|
-
// 차트 데이터 가공 - 복잡한 계산이므로 메모이제이션
|
|
509
|
-
const chartData = useMemo(() => {
|
|
510
|
-
if (!rawData.length) return [];
|
|
511
|
-
|
|
512
|
-
// 날짜 필터링
|
|
513
|
-
const filteredData = rawData.filter(item => {
|
|
514
|
-
const itemDate = new Date(item.date);
|
|
515
|
-
const startDate = new Date(dateRange.start);
|
|
516
|
-
const endDate = new Date(dateRange.end);
|
|
517
|
-
return itemDate >= startDate && itemDate <= endDate;
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
// 데이터 그룹화 및 집계
|
|
521
|
-
const groupedData = filteredData.reduce((acc, item) => {
|
|
522
|
-
const key = item.category;
|
|
523
|
-
if (!acc[key]) {
|
|
524
|
-
acc[key] = { total: 0, count: 0, items: [] };
|
|
525
|
-
}
|
|
526
|
-
acc[key].total += item.value;
|
|
527
|
-
acc[key].count += 1;
|
|
528
|
-
acc[key].items.push(item);
|
|
529
|
-
return acc;
|
|
530
|
-
}, {});
|
|
531
|
-
|
|
532
|
-
// 차트용 형태로 변환
|
|
533
|
-
return Object.entries(groupedData).map(([category, data]) => ({
|
|
534
|
-
category,
|
|
535
|
-
value: data.total,
|
|
536
|
-
average: data.total / data.count,
|
|
537
|
-
count: data.count,
|
|
538
|
-
}));
|
|
539
|
-
}, [rawData, dateRange]); // rawData나 dateRange가 변경될 때만 재계산
|
|
540
|
-
|
|
541
|
-
return <Chart data={chartData} />;
|
|
542
|
-
};`})]})]}),o.jsx(L0,{})]})})}),o.jsx("div",{id:"useCallback",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { useCallback, useState } from 'react';
|
|
543
|
-
|
|
544
|
-
const MyComponent = () => {
|
|
545
|
-
const [count, setCount] = useState(0);
|
|
546
|
-
const [name, setName] = useState('');
|
|
547
|
-
|
|
548
|
-
// 함수를 메모이제이션
|
|
549
|
-
const handleIncrement = useCallback(() => {
|
|
550
|
-
setCount(prev => prev + 1);
|
|
551
|
-
}, []); // 의존성이 없으므로 한 번만 생성
|
|
552
|
-
|
|
553
|
-
const handleNameChange = useCallback((newName: string) => {
|
|
554
|
-
setName(newName);
|
|
555
|
-
}, []); // 의존성이 없으므로 한 번만 생성
|
|
556
|
-
|
|
557
|
-
return (
|
|
558
|
-
<div>
|
|
559
|
-
<ChildComponent
|
|
560
|
-
onIncrement={handleIncrement}
|
|
561
|
-
onNameChange={handleNameChange}
|
|
562
|
-
/>
|
|
563
|
-
</div>
|
|
564
|
-
);
|
|
565
|
-
};`})]}),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(z0,{}),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(nt,{importText:`// 즐겨찾기 토글 함수를 메모이제이션하여 불필요한 리렌더링 방지
|
|
566
|
-
const handleFavoriteToggle = useCallback(async (menuItem: MenuItem) => {
|
|
567
|
-
try {
|
|
568
|
-
// 메뉴 아이템 유효성 검증
|
|
569
|
-
if (!menuItem || !menuItem.menuId || !menuItem.menuNm) {
|
|
570
|
-
console.warn('Invalid menu item for favorite toggle:', menuItem);
|
|
571
|
-
return;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
// 메뉴 ID 형식 검증
|
|
575
|
-
if (!/^[a-zA-Z0-9_-]+$/.test(menuItem.menuId)) {
|
|
576
|
-
console.warn('Invalid menu ID format:', menuItem.menuId);
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (isFavorite(menuItem.menuId)) {
|
|
581
|
-
await removeFavorite(menuItem.menuId, 'testUser');
|
|
582
|
-
} else {
|
|
583
|
-
await addFavorite(menuItem, 'testUser');
|
|
584
|
-
}
|
|
585
|
-
} catch (error) {
|
|
586
|
-
console.error('즐겨찾기 토글 실패:', error);
|
|
587
|
-
}
|
|
588
|
-
}, [isFavorite, removeFavorite, addFavorite]); // 의존성 함수들이 변경될 때만 재생성`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 이벤트 핸들러 최적화 예제"}),o.jsx(nt,{importText:`// 자식 컴포넌트에 전달되는 이벤트 핸들러 최적화
|
|
589
|
-
const OptimizedParent = () => {
|
|
590
|
-
const [items, setItems] = useState([]);
|
|
591
|
-
const [filter, setFilter] = useState('');
|
|
592
|
-
|
|
593
|
-
// 아이템 추가 핸들러 - 의존성 없이 안전하게 구현
|
|
594
|
-
const handleAddItem = useCallback((newItem: Item) => {
|
|
595
|
-
setItems(prev => [...prev, { ...newItem, id: Date.now() }]);
|
|
596
|
-
}, []); // 의존성 없음 - 함수형 업데이트 사용
|
|
597
|
-
|
|
598
|
-
// 아이템 삭제 핸들러
|
|
599
|
-
const handleDeleteItem = useCallback((itemId: number) => {
|
|
600
|
-
setItems(prev => prev.filter(item => item.id !== itemId));
|
|
601
|
-
}, []); // 의존성 없음 - 함수형 업데이트 사용
|
|
602
|
-
|
|
603
|
-
// 아이템 수정 핸들러
|
|
604
|
-
const handleUpdateItem = useCallback((itemId: number, updates: Partial<Item>) => {
|
|
605
|
-
setItems(prev => prev.map(item =>
|
|
606
|
-
item.id === itemId ? { ...item, ...updates } : item
|
|
607
|
-
));
|
|
608
|
-
}, []); // 의존성 없음 - 함수형 업데이트 사용
|
|
609
|
-
|
|
610
|
-
return (
|
|
611
|
-
<div>
|
|
612
|
-
<ItemList
|
|
613
|
-
items={items}
|
|
614
|
-
onAdd={handleAddItem}
|
|
615
|
-
onDelete={handleDeleteItem}
|
|
616
|
-
onUpdate={handleUpdateItem}
|
|
617
|
-
/>
|
|
618
|
-
</div>
|
|
619
|
-
);
|
|
620
|
-
};`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. API 호출 함수 최적화"}),o.jsx(nt,{importText:`// API 호출 함수를 메모이제이션하여 useEffect 의존성 안정화
|
|
621
|
-
const DataComponent = () => {
|
|
622
|
-
const [data, setData] = useState([]);
|
|
623
|
-
const [loading, setLoading] = useState(false);
|
|
624
|
-
const [params, setParams] = useState({ page: 1, size: 10 });
|
|
625
|
-
|
|
626
|
-
// API 호출 함수 메모이제이션
|
|
627
|
-
const fetchData = useCallback(async (requestParams: RequestParams) => {
|
|
628
|
-
setLoading(true);
|
|
629
|
-
try {
|
|
630
|
-
const response = await callService('FETCH_DATA', requestParams);
|
|
631
|
-
setData(response.data);
|
|
632
|
-
} catch (error) {
|
|
633
|
-
console.error('데이터 로드 실패:', error);
|
|
634
|
-
} finally {
|
|
635
|
-
setLoading(false);
|
|
636
|
-
}
|
|
637
|
-
}, []); // API 호출 로직은 변하지 않으므로 의존성 없음
|
|
638
|
-
|
|
639
|
-
// params가 변경될 때마다 데이터 다시 로드
|
|
640
|
-
useEffect(() => {
|
|
641
|
-
fetchData(params);
|
|
642
|
-
}, [params, fetchData]); // fetchData가 메모이제이션되어 안정적
|
|
643
|
-
|
|
644
|
-
// 페이지 변경 핸들러
|
|
645
|
-
const handlePageChange = useCallback((page: number) => {
|
|
646
|
-
setParams(prev => ({ ...prev, page }));
|
|
647
|
-
}, []);
|
|
648
|
-
|
|
649
|
-
return (
|
|
650
|
-
<div>
|
|
651
|
-
{loading ? <Spinner /> : <DataTable data={data} />}
|
|
652
|
-
<Pagination onPageChange={handlePageChange} />
|
|
653
|
-
</div>
|
|
654
|
-
);
|
|
655
|
-
};`})]})]}),o.jsx(z0,{})]})})}),o.jsx("div",{id:"useEffect",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { useEffect, useState } from 'react';
|
|
656
|
-
|
|
657
|
-
const MyComponent = () => {
|
|
658
|
-
const [count, setCount] = useState(0);
|
|
659
|
-
|
|
660
|
-
// 1. 매 렌더링마다 실행 (권장하지 않음)
|
|
661
|
-
useEffect(() => {
|
|
662
|
-
console.log('매번 실행됨');
|
|
663
|
-
});
|
|
664
|
-
|
|
665
|
-
// 2. 마운트/언마운트 시에만 실행
|
|
666
|
-
useEffect(() => {
|
|
667
|
-
console.log('컴포넌트 마운트됨');
|
|
668
|
-
|
|
669
|
-
return () => {
|
|
670
|
-
console.log('컴포넌트 언마운트됨');
|
|
671
|
-
};
|
|
672
|
-
}, []); // 빈 배열 = 한 번만 실행
|
|
673
|
-
|
|
674
|
-
// 3. count가 변경될 때만 실행
|
|
675
|
-
useEffect(() => {
|
|
676
|
-
document.title = \`카운트: \${count}\`;
|
|
677
|
-
}, [count]); // count가 의존성
|
|
678
|
-
|
|
679
|
-
return <div>카운트: {count}</div>;
|
|
680
|
-
};`})]}),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(nt,{importText:`useEffect(() => {
|
|
681
|
-
// 이벤트 리스너 등록
|
|
682
|
-
const handleResize = () => {
|
|
683
|
-
console.log('윈도우 크기 변경됨');
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
window.addEventListener('resize', handleResize);
|
|
687
|
-
|
|
688
|
-
// 정리 함수 - 컴포넌트 언마운트 시 실행
|
|
689
|
-
return () => {
|
|
690
|
-
window.removeEventListener('resize', handleResize);
|
|
691
|
-
};
|
|
692
|
-
}, []);`})]}),o.jsx(F0,{}),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(nt,{importText:`// 사용자 인증 확인 및 메뉴 데이터 가져오기
|
|
693
|
-
useEffect(() => {
|
|
694
|
-
const loadData = async () => {
|
|
695
|
-
if (!user?.userId) {
|
|
696
|
-
console.warn('사용자 정보가 없습니다. 로그인 페이지로 이동합니다.');
|
|
697
|
-
navigate('/login');
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
console.log('사용자 인증 확인됨 - 메뉴 데이터 가져오기');
|
|
702
|
-
|
|
703
|
-
// 먼저 메뉴 데이터 가져오기
|
|
704
|
-
await fetchMenu({
|
|
705
|
-
crprCd: String(user.crprCd || '100'),
|
|
706
|
-
userId: user.userId,
|
|
707
|
-
prntGbcd: 1,
|
|
708
|
-
});
|
|
709
|
-
|
|
710
|
-
// 새로고침 시 공통코드가 없으면 다시 가져오기
|
|
711
|
-
if (!codeData) {
|
|
712
|
-
console.log('새로고침 감지 - 공통코드 다시 가져오기');
|
|
713
|
-
fetchCommonCodes();
|
|
714
|
-
}
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
loadData();
|
|
718
|
-
}, [
|
|
719
|
-
user?.userId,
|
|
720
|
-
user?.crprCd,
|
|
721
|
-
navigate,
|
|
722
|
-
fetchMenu,
|
|
723
|
-
fetchCommonCodes,
|
|
724
|
-
codeData,
|
|
725
|
-
]); // 의존성 배열에 필요한 모든 값 포함`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 탭 변경에 따른 데이터 로딩 (CMSystCodeM01.tsx)"}),o.jsx(nt,{importText:`// 선택된 시스템 변경 시 앱 데이터 로드
|
|
726
|
-
useEffect(() => {
|
|
727
|
-
if (selectedSystem) {
|
|
728
|
-
callService('SCMAPP00101', {
|
|
729
|
-
crprCd: getCrprCd(),
|
|
730
|
-
systId: selectedSystem.systId,
|
|
731
|
-
}).then(response => {
|
|
732
|
-
console.log('SCMAPP00101:', response);
|
|
733
|
-
appGridRef.current?.addAllData(response.data);
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
}, [selectedSystem]); // selectedSystem이 변경될 때만 실행
|
|
737
|
-
|
|
738
|
-
// 탭 변경 시 공통코드 데이터 로드
|
|
739
|
-
useEffect(() => {
|
|
740
|
-
if (selectedSystem) {
|
|
741
|
-
callService('SCMCODE00101', {
|
|
742
|
-
crprCd: getCrprCd(),
|
|
743
|
-
srchGb: activeTab === 'group' ? 'group' : 'detail',
|
|
744
|
-
}).then(response => {
|
|
745
|
-
console.log({ SCMCODE00101: response.data });
|
|
746
|
-
activeTab === 'group'
|
|
747
|
-
? groupGridRef.current?.addAllData(response.data)
|
|
748
|
-
: detailGridRef.current?.addAllData(response.data);
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
}, [activeTab, selectedSystem]); // activeTab과 selectedSystem 변경 시 실행`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 팝업 데이터 초기화 (CMAuthMstrP01.tsx)"}),o.jsx(nt,{importText:`// 팝업 열릴 때 데이터 로드 및 초기화
|
|
752
|
-
useEffect(() => {
|
|
753
|
-
// 팝업 데이터에서 기존 선택된 메뉴 가져오기
|
|
754
|
-
const currentPopup: any = popups.find(p => p.popupId === activePopupId);
|
|
755
|
-
if (currentPopup?.data?.selectedMenus) {
|
|
756
|
-
setSelectedMenus(currentPopup.data.selectedMenus);
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
// 메뉴 데이터 로드
|
|
760
|
-
loadMenuData();
|
|
761
|
-
}, [popups, activePopupId]); // popups나 activePopupId 변경 시 실행
|
|
762
|
-
|
|
763
|
-
// 메뉴 데이터 로드 함수
|
|
764
|
-
const loadMenuData = async () => {
|
|
765
|
-
try {
|
|
766
|
-
const response = await callService('SCMMENU00101', {});
|
|
767
|
-
console.log('메뉴 데이터:', response.menus);
|
|
768
|
-
|
|
769
|
-
menuTreeRef.current?.addAllData(response.menus, {
|
|
770
|
-
treeOption: {
|
|
771
|
-
isExpand: true,
|
|
772
|
-
dataField: 'menuId',
|
|
773
|
-
parentField: 'menuPrntId',
|
|
774
|
-
},
|
|
775
|
-
});
|
|
776
|
-
} catch (error) {
|
|
777
|
-
console.error('메뉴 데이터 로드 실패:', error);
|
|
778
|
-
}
|
|
779
|
-
};`})]})]}),o.jsx(F0,{})]})})}),o.jsx("div",{id:"forwardRef",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { forwardRef, useRef } from 'react';
|
|
780
|
-
|
|
781
|
-
// forwardRef를 사용한 컴포넌트 정의
|
|
782
|
-
const MyInput = forwardRef<HTMLInputElement, { placeholder?: string }>(
|
|
783
|
-
(props, ref) => {
|
|
784
|
-
return (
|
|
785
|
-
<input
|
|
786
|
-
ref={ref}
|
|
787
|
-
placeholder={props.placeholder}
|
|
788
|
-
style={{ padding: '8px', border: '1px solid #ccc' }}
|
|
789
|
-
/>
|
|
790
|
-
);
|
|
791
|
-
}
|
|
792
|
-
);
|
|
793
|
-
|
|
794
|
-
// 부모 컴포넌트에서 사용
|
|
795
|
-
const Parent = () => {
|
|
796
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
797
|
-
|
|
798
|
-
const focusInput = () => {
|
|
799
|
-
inputRef.current?.focus();
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
return (
|
|
803
|
-
<div>
|
|
804
|
-
<MyInput ref={inputRef} placeholder="포커스될 입력 필드" />
|
|
805
|
-
<button onClick={focusInput}>포커스</button>
|
|
806
|
-
</div>
|
|
807
|
-
);
|
|
808
|
-
};`})]}),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(qN,{}),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(nt,{importText:`// 그리드 컴포넌트에 forwardRef와 useImperativeHandle 적용
|
|
809
|
-
interface GridRef {
|
|
810
|
-
addAllData: (data: any[]) => void;
|
|
811
|
-
getCurrentIndex: () => number;
|
|
812
|
-
clearData: () => void;
|
|
813
|
-
refresh: () => void;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
const CustomGrid = forwardRef<GridRef, { columns: any[]; options?: any }>(
|
|
817
|
-
({ columns, options }, ref) => {
|
|
818
|
-
const [data, setData] = useState([]);
|
|
819
|
-
const [currentIndex, setCurrentIndex] = useState(-1);
|
|
820
|
-
const gridInstanceRef = useRef(null);
|
|
821
|
-
|
|
822
|
-
useImperativeHandle(ref, () => ({
|
|
823
|
-
addAllData: (newData: any[]) => {
|
|
824
|
-
setData(newData);
|
|
825
|
-
setCurrentIndex(newData.length > 0 ? 0 : -1);
|
|
826
|
-
},
|
|
827
|
-
getCurrentIndex: () => currentIndex,
|
|
828
|
-
clearData: () => {
|
|
829
|
-
setData([]);
|
|
830
|
-
setCurrentIndex(-1);
|
|
831
|
-
},
|
|
832
|
-
refresh: () => {
|
|
833
|
-
// 그리드 새로고침 로직
|
|
834
|
-
gridInstanceRef.current?.refresh?.();
|
|
835
|
-
},
|
|
836
|
-
}), [currentIndex]);
|
|
837
|
-
|
|
838
|
-
return (
|
|
839
|
-
<div className="custom-grid">
|
|
840
|
-
{/* 실제 그리드 렌더링 로직 */}
|
|
841
|
-
<table ref={gridInstanceRef}>
|
|
842
|
-
{/* 그리드 내용 */}
|
|
843
|
-
</table>
|
|
844
|
-
</div>
|
|
845
|
-
);
|
|
846
|
-
}
|
|
847
|
-
);`})]}),o.jsxs("div",{style:{marginBottom:"16px"},children:[o.jsx(p.Typography.Title,{level:5,children:"2. 복합 입력 컴포넌트 (검색 필드)"}),o.jsx(nt,{importText:`// 검색 기능이 포함된 복합 입력 컴포넌트
|
|
848
|
-
interface SearchInputRef {
|
|
849
|
-
focus: () => void;
|
|
850
|
-
clear: () => void;
|
|
851
|
-
getValue: () => string;
|
|
852
|
-
search: () => void;
|
|
853
|
-
setSearchTerm: (term: string) => void;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
const SearchInput = forwardRef<
|
|
857
|
-
SearchInputRef,
|
|
858
|
-
{
|
|
859
|
-
onSearch?: (term: string) => void;
|
|
860
|
-
placeholder?: string;
|
|
861
|
-
defaultValue?: string;
|
|
862
|
-
}
|
|
863
|
-
>(({ onSearch, placeholder, defaultValue = '' }, ref) => {
|
|
864
|
-
const [value, setValue] = useState(defaultValue);
|
|
865
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
866
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
867
|
-
|
|
868
|
-
const handleSearch = async () => {
|
|
869
|
-
if (!value.trim()) return;
|
|
870
|
-
|
|
871
|
-
setIsLoading(true);
|
|
872
|
-
try {
|
|
873
|
-
await onSearch?.(value);
|
|
874
|
-
} finally {
|
|
875
|
-
setIsLoading(false);
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
|
|
879
|
-
useImperativeHandle(ref, () => ({
|
|
880
|
-
focus: () => inputRef.current?.focus(),
|
|
881
|
-
clear: () => {
|
|
882
|
-
setValue('');
|
|
883
|
-
inputRef.current?.focus();
|
|
884
|
-
},
|
|
885
|
-
getValue: () => value,
|
|
886
|
-
search: handleSearch,
|
|
887
|
-
setSearchTerm: (term: string) => setValue(term),
|
|
888
|
-
}), [value, onSearch]);
|
|
889
|
-
|
|
890
|
-
return (
|
|
891
|
-
<div className="search-input-container">
|
|
892
|
-
<input
|
|
893
|
-
ref={inputRef}
|
|
894
|
-
value={value}
|
|
895
|
-
onChange={(e) => setValue(e.target.value)}
|
|
896
|
-
placeholder={placeholder}
|
|
897
|
-
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
|
|
898
|
-
/>
|
|
899
|
-
<button
|
|
900
|
-
onClick={handleSearch}
|
|
901
|
-
disabled={isLoading}
|
|
902
|
-
>
|
|
903
|
-
{isLoading ? '검색중...' : '검색'}
|
|
904
|
-
</button>
|
|
905
|
-
</div>
|
|
906
|
-
);
|
|
907
|
-
});`})]}),o.jsxs("div",{children:[o.jsx(p.Typography.Title,{level:5,children:"3. 모달 컴포넌트 제어 (팝업 스타일)"}),o.jsx(nt,{importText:`// 팝업/모달 컴포넌트의 외부 제어 인터페이스
|
|
908
|
-
interface ModalRef {
|
|
909
|
-
open: () => void;
|
|
910
|
-
close: () => void;
|
|
911
|
-
isOpen: () => boolean;
|
|
912
|
-
setTitle: (title: string) => void;
|
|
913
|
-
setContent: (content: React.ReactNode) => void;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
const CustomModal = forwardRef<
|
|
917
|
-
ModalRef,
|
|
918
|
-
{
|
|
919
|
-
defaultTitle?: string;
|
|
920
|
-
onClose?: () => void;
|
|
921
|
-
children?: React.ReactNode;
|
|
922
|
-
}
|
|
923
|
-
>(({ defaultTitle = '', onClose, children }, ref) => {
|
|
924
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
925
|
-
const [title, setTitle] = useState(defaultTitle);
|
|
926
|
-
const [content, setContent] = useState<React.ReactNode>(children);
|
|
927
|
-
|
|
928
|
-
const handleClose = () => {
|
|
929
|
-
setIsVisible(false);
|
|
930
|
-
onClose?.();
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
useImperativeHandle(ref, () => ({
|
|
934
|
-
open: () => setIsVisible(true),
|
|
935
|
-
close: handleClose,
|
|
936
|
-
isOpen: () => isVisible,
|
|
937
|
-
setTitle: (newTitle: string) => setTitle(newTitle),
|
|
938
|
-
setContent: (newContent: React.ReactNode) => setContent(newContent),
|
|
939
|
-
}), [isVisible, onClose]);
|
|
940
|
-
|
|
941
|
-
if (!isVisible) return null;
|
|
942
|
-
|
|
943
|
-
return (
|
|
944
|
-
<div className="modal-overlay" onClick={handleClose}>
|
|
945
|
-
<div className="modal-content" onClick={(e) => e.stopPropagation()}>
|
|
946
|
-
<div className="modal-header">
|
|
947
|
-
<h3>{title}</h3>
|
|
948
|
-
<button onClick={handleClose}>×</button>
|
|
949
|
-
</div>
|
|
950
|
-
<div className="modal-body">
|
|
951
|
-
{content}
|
|
952
|
-
</div>
|
|
953
|
-
</div>
|
|
954
|
-
</div>
|
|
955
|
-
);
|
|
956
|
-
});
|
|
957
|
-
|
|
958
|
-
// 사용 예시
|
|
959
|
-
const ParentComponent = () => {
|
|
960
|
-
const modalRef = useRef<ModalRef>(null);
|
|
961
|
-
|
|
962
|
-
const openModal = () => {
|
|
963
|
-
modalRef.current?.setTitle('동적 제목');
|
|
964
|
-
modalRef.current?.setContent(<div>동적 콘텐츠</div>);
|
|
965
|
-
modalRef.current?.open();
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
return (
|
|
969
|
-
<div>
|
|
970
|
-
<button onClick={openModal}>모달 열기</button>
|
|
971
|
-
<CustomModal ref={modalRef} />
|
|
972
|
-
</div>
|
|
973
|
-
);
|
|
974
|
-
};`})]})]})]})})}),o.jsx("div",{id:"useImperativeHandle",style:{marginBottom:"60px"},children:o.jsx(p.Card,{title:o.jsx(ti,{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(nt,{importText:`import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
975
|
-
|
|
976
|
-
// 자식 컴포넌트
|
|
977
|
-
const CustomInput = forwardRef<
|
|
978
|
-
{ focus: () => void; clear: () => void; getValue: () => string },
|
|
979
|
-
{ defaultValue?: string }
|
|
980
|
-
>((props, ref) => {
|
|
981
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
982
|
-
const [value, setValue] = useState(props.defaultValue || '');
|
|
983
|
-
|
|
984
|
-
// 부모에게 노출할 메서드들을 정의
|
|
985
|
-
useImperativeHandle(ref, () => ({
|
|
986
|
-
focus: () => {
|
|
987
|
-
inputRef.current?.focus();
|
|
988
|
-
},
|
|
989
|
-
clear: () => {
|
|
990
|
-
setValue('');
|
|
991
|
-
inputRef.current?.focus();
|
|
992
|
-
},
|
|
993
|
-
getValue: () => {
|
|
994
|
-
return value;
|
|
995
|
-
}
|
|
996
|
-
}));
|
|
997
|
-
|
|
998
|
-
return (
|
|
999
|
-
<input
|
|
1000
|
-
ref={inputRef}
|
|
1001
|
-
value={value}
|
|
1002
|
-
onChange={(e) => setValue(e.target.value)}
|
|
1003
|
-
/>
|
|
1004
|
-
);
|
|
1005
|
-
});
|
|
1006
|
-
|
|
1007
|
-
// 부모 컴포넌트
|
|
1008
|
-
const Parent = () => {
|
|
1009
|
-
const customInputRef = useRef<{
|
|
1010
|
-
focus: () => void;
|
|
1011
|
-
clear: () => void;
|
|
1012
|
-
getValue: () => string;
|
|
1013
|
-
}>(null);
|
|
1014
|
-
|
|
1015
|
-
const handleFocus = () => customInputRef.current?.focus();
|
|
1016
|
-
const handleClear = () => customInputRef.current?.clear();
|
|
1017
|
-
const handleGetValue = () => {
|
|
1018
|
-
const value = customInputRef.current?.getValue();
|
|
1019
|
-
alert(\`현재 값: \${value}\`);
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
return (
|
|
1023
|
-
<div>
|
|
1024
|
-
<CustomInput ref={customInputRef} />
|
|
1025
|
-
<button onClick={handleFocus}>포커스</button>
|
|
1026
|
-
<button onClick={handleClear}>클리어</button>
|
|
1027
|
-
<button onClick={handleGetValue}>값 가져오기</button>
|
|
1028
|
-
</div>
|
|
1029
|
-
);
|
|
1030
|
-
};`})]}),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(YN,{})]})})})]})]})})},ZN=e=>{v.useEffect(()=>{m({sysCd:__SYS_CD__,fileGrpKey:null}),E.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:m}=st.useSearchBox(),g=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,j,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,_)).toFixed(2))+" "+I[_]}},{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,j,S)=>{if(!S)return"0 Bytes";const O=Number(S);if(isNaN(O)||O===0)return"0 Bytes";const k=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(O)/Math.log(k));return parseFloat((O/Math.pow(k,_)).toFixed(2))+" "+I[_]}},{fieldName:"filePath",header:{text:"파일 경로"},width:100,styleName:"right"}],[]),y={onCurrentRowChanged(P,j,S){if(S<0)return;let O=P.getDataSource().getJsonRow(S);a(O.fileGrpKey),O.mltpYn=="Y"?le.callEndpoint({trxCd:"SCMFILE00106",appCd:e.appCd},{crprCd:le.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:()=>{le.callEndpoint({trxCd:"SCMFILE00101",appCd:e.appCd},{crprCd:le.getUserInfo()?.crprCd,...h()}).then(P=>{r.current?.addAllData(P.sub)}).catch(P=>{console.error("오류:",P)})}},E={search:()=>{b.SCMFILE00101()},download:()=>{console.log("download");let P=r.current?.dp?.getJsonRow(r.current?.getCurrentRow());le.downloadByFileKey(P.fileKey)}};return o.jsx(Rt,{searchBox:{reqRows:[o.jsxs(wt,{children:[o.jsx($e,{span:6,children:o.jsx(B.BwgInput,{itemProps:{label:"시스템 코드",name:"sysCd"}})}),o.jsx($e,{span:6,children:o.jsx(B.BwgInput,{itemProps:{label:"파일 그룹키",name:"fileGrpKey"}})})]})]},buttons:{grant:[{id:"search",label:"조회",onClick:()=>{E.search()}},{id:"download",label:"다운로드",onClick:()=>{E.download()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(Ae,{className:"w60",children:[o.jsx(Le,{title:"파일 목록",children:o.jsx("div",{style:{float:"right"},children:o.jsx(p.Space,{children:o.jsx(B.BwgButton,{onClick:()=>E.download(),children:"다운로드"})})})}),o.jsx(Ve,{ref:r,gridColumns:x,gridOptions:w,gridEvents:y})]}),o.jsx(Ae,{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(Ve,{ref:n,gridColumns:g})]})},{label:"파일 샘플",key:"2",children:o.jsx("div",{style:{height:"100%",overflowY:"auto",padding:"10px"},children:o.jsx(pn,{title:"샘플 업로드",children:o.jsxs(p.Form,{layout:"vertical",ref:t,children:[o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"그리드 onCurrentRowChanged연동"}),o.jsx(B.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:i,onChange:P=>a(P.target.value)}}),o.jsx(B.BwgUploader,{fileGrpKey:i}),o.jsx(p.Divider,{orientation:"left",style:{borderColor:"#7cb305"},children:"파일업로드시 fileGrpKey 채번 및 연동"}),o.jsx(B.BwgInput,{itemProps:{label:"채번 그룹키 (fileGrpKey2)"},inputProps:{value:s,disabled:!0}}),o.jsx(B.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(B.BwgLargeUploader,{fileGrpKey:s})]})})})},{label:"파일 다운로드",key:"3",children:o.jsxs("div",{children:[o.jsx(B.BwgInput,{itemProps:{label:"파일 그룹키 (fileGrpKey)"},inputProps:{value:c,onChange:P=>d(P.target.value)}}),o.jsx(B.BwgInput,{itemProps:{label:"앱코드 (appCd)"},inputProps:{value:u,onChange:P=>f(P.target.value)}}),o.jsx(B.BwgDownload,{fileGrpKey:c,appCd:u})]})}]})})]})})},gS=({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}),g.SCMPRGR00101())},[t?.sysCd]);const u=()=>{g.SCMPRGR00101()},f=y=>{y.key==="Enter"&&u()},h=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},m=()=>{i.onCancel?.(),n?.()},g=v.useMemo(()=>({SCMPRGR00101:()=>{const y={...a.current?.getFormData()};le.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 E=s.current?.vw?.getItemIndex(b),P=s.current?.vw?.getValues(E||0);c([P])}},onCellDblClicked:(y,w)=>{const b=w.itemIndex;if(b>=0){const E=s.current?.vw?.getValues(b);console.log(E),c([E]),r?.(E)}}};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:m,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(No,{ref:a,reqRows:o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:8,children:o.jsx(B.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:g.SCMPRGR00101}})}),o.jsx(p.Col,{span:16,children:o.jsx(B.BwgInput,{itemProps:{name:"keyword",label:"검색어",style:{marginBottom:0},labelCol:{flex:"90px"}},inputProps:{placeholder:"프로그램ID 또는 프로그램명을 입력하세요",suffix:o.jsx(G.SearchOutlined,{style:{color:"#1890ff",cursor:"pointer"},onClick:u}),onKeyPress:f}})})]})}),o.jsx(Ve,{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,")"]})]})})})},vS=({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,E,P){const j=b.getValue(E.index,"menuGbCd");if(j==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(j==="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:""})},m=()=>{console.log("selectedRows:",l),l.length>0?r?.(l[0]):r?.({})},g=()=>{i.onCancel?.(),n?.()},x=v.useMemo(()=>({SCMMENU00104:()=>{const w={crprCd:le.getCrprCd(),...a.current?.getFormData()};le.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,E)=>{if(E>=0){const P=s.current?.vw?.getItemIndex(E),j=s?.current?.vw?.getValues(P||0);c([j])}},onCellDblClicked:(w,b)=>{const E=b.itemIndex;if(E>=0){const P=s.current?.vw?.getValues(E);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:m,onCancel:g,children:o.jsxs("div",{style:{padding:"8px 0"},children:[o.jsx(No,{border:!0,header:{title:"메뉴 선택",buttons:[o.jsx(B.BwgButton,{onClick:()=>x.SCMMENU00104(),style:{marginRight:8},children:"검색"},"search"),o.jsx(B.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(B.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(B.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(B.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(Ve,{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,")"]})]})})})},fo={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"}]},QN={container:{check:!0,checkAll:!0,indicator:!0,footer:!0}},V0=({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),[m,g]=v.useState(!1),[x,y]=v.useState({}),[w,b]=v.useState(!1),[E,P]=v.useState({});v.useEffect(()=>{const I=r.getFieldValue("sysCd"),_=r.getFieldValue("appCd"),$=r.getFieldValue("menuGbCd"),R=r.getFieldValue("deftMenuNo");i(I??null),s(_??null),u($??"CMPRGRP"),h(R??!0),I&&fo[I]?c(fo[I]):c([])},[r]);const j=I=>{i(I),I&&fo[I]?c(fo[I]):c([]),r.resetFields(["appCd","scrnId","scrnNm","menuPrntId","menuPrntNm"])},S=I=>{h(I),I&&r.setFieldsValue({menuNo:""})},O=I=>{I&&r.setFieldsValue({menuPrntId:I.menuId,menuPrntNm:I.menuNm}),g(!1),y({})},k=I=>{I&&r.setFieldsValue({scrnId:I.prgrId,scrnNm:I.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(B.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:I=>{u(I.target.value)}}})})}),o.jsxs(p.Row,{gutter:12,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{name:"sysCd",label:"시스템"},selectProps:{options:[{label:"K-ERP",value:"KE"},{label:"K-HR",value:"KH"},{label:"K-업무지원",value:"KS"}],onChange:j,disabled:e||t==="EDIT",placeholder:"시스템을 선택하세요"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.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(B.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(B.BwgSearch,{itemProps:{label:"프로그램ID",name:["scrnId","scrnNm"]},readOnly:e,popupConfig:!0,onSearch:()=>{n?(b(!0),P({sysCd:n,keyword:r.getFieldValue("scrnNm")})):le.showWarning("시스템을 선택하세요")}})})}),d!=="CMPRGRM"&&o.jsx(p.Row,{gutter:24,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgSearch,{itemProps:{label:"상위 메뉴",name:["menuPrntId","menuPrntNm"]},readOnly:e,onSearch:()=>{console.log("formSysCd:",n),n?(g(!0),y({sysCd:n,keyword:r.getFieldValue("menuPrntNm")})):le.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(B.BwgFormItem,{name:"menuNo",label:"메뉴번호",children:o.jsx(p.Input.OTP,{length:4,formatter:I=>I.replace(/\D/g,""),disabled:t=="NEW"?f:e,style:{width:"180px"}})})}),t=="NEW"&&o.jsx(p.Col,{span:3,offset:1,children:o.jsx(B.BwgCheck,{itemProps:{name:"isAutoMenuNo",label:"자동채번"},inputProps:{defaultChecked:!0,onChange:I=>S(I.target.checked)}})})]}),o.jsx(p.Col,{span:6,children:o.jsx(B.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(B.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(B.BwgInput,{itemProps:{name:"iconCd",label:"아이콘명"},inputProps:{readOnly:e,variant:e?"borderless":"outlined"}})})]}),o.jsx(B.BwgTextArea,{itemProps:{name:"menuDscr",label:"메뉴 설명"},inputProps:{disabled:e,rows:3}}),o.jsx(gS,{open:w,searchContext:E,onOk:k,onClose:()=>{b(!1),P({})}}),o.jsx(vS,{open:m,searchContext:x,onOk:O,onClose:()=>{g(!1),y({})}})]})},JN=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=tt.useCodeStore(),{getFormData:a,setFormData:s}=st.useSearchBox(),[l,c]=v.useState([]),[d,u]=v.useState(!1),[f,h]=v.useState(""),[m,g]=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 I=n.current?.vw?.getValues(k);r.current?.setFieldsValue(I)}}else r.current?.resetFields()},[f]),v.useEffect(()=>{setTimeout(()=>{n.current?.vw&&n.current.vw.setRowStyleCallback(function(I,_,$){const R=I.getValue(_.index,"menuGbCd");if(R==="CMPRGRM")return{style:{background:"#e8f0ff"}};if(R==="CMPRGRS")return{style:{background:"#f0f8ff"}};if(R==="CMPRGRP")return{style:{background:"#fff"}}})},200)},[]);const E=k=>{k&&fo[k]?c([{label:"전체",value:""},...fo[k]]):c([{label:"전체",value:""}]),s({appCd:""}),j.SCMMENU00101()},P=()=>{r.current?.validateFields().then(k=>{console.log("Form values:",k),(f==="NEW"||f==="EDIT")&&j.SCMMENU00102()}).catch(k=>{console.log("Validation failed:",k)})},j={SCMMENU00101:()=>{const k={crprCd:le.getCrprCd(),...a()};console.log("Search data:",k),le.callService("SCMMENU00101",k,{}).then(I=>{n.current?.addAllData(I.menus,{treeOption:{isExpand:!0,dataField:"menuId",parentField:"menuPrntId"}})}).catch(I=>{console.error("오류:",I)})},SCMMENU00102:()=>{const k={iudFlag:f==="EDIT"?"U":"I",crprCd:le.getCrprCd(),...r?.current?.getFieldsValue()};delete k.scrnNm,delete k.menuPrntNm,le.callService("SCMMENU00102",k,{}).then(I=>{console.log("Save response:",I),I.result>0&&(y(),j.SCMMENU00101())}).catch(I=>{console.error("저장 오류:",I)})},SCMMENU00103:()=>{const k={},I=n.current?.vw?.getCheckedRows(!1),_=[];I?.forEach($=>{const R=n.current?.dp?.getJsonRow($);_.push({crprCd:R.crprCd,sysCd:R.sysCd,appCd:R.appCd,menuId:R.menuId,menuGbCd:R.menuGbCd})}),k.sub=_,le.callService("SCMMENU00103",k,{}).then($=>{console.log($),$?.result>0&&j.SCMMENU00101()})}},S={search:()=>{j.SCMMENU00101()},new:()=>{x("NEW")},delete:()=>{const k=n.current?.vw?.getCheckedRows(!1);if(k?.length==0){le.showWarning("삭제할 행을 체크하세요");return}else{let I=0,_=0,$=0;k?.forEach(R=>{const z=n.current?.dp?.getValue(R,"menuGbCd");z==="CMPRGRM"?I++:z==="CMPRGRS"?_++:z==="CMPRGRP"&&$++}),p.Modal.confirm({title:"삭제 안내",content:o.jsxs(o.Fragment,{children:[I>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"blue",children:["메인메뉴: ",I,"개"]})}),_>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"green",children:["서브메뉴: ",_,"개"]})}),$>0&&o.jsx(o.Fragment,{children:o.jsxs(p.Tag,{color:"orange",children:["프로그램: ",$,"개"]})}),"를 삭제하시겠습니까?"]}),onOk:()=>{j.SCMMENU00103()},onCancel:()=>{}})}}},O=v.useMemo(()=>({onCurrentRowChanged:(k,I,_)=>{g(_)},onItemChecked:(k,I,_)=>{if(!k._isUpdatingChildren)try{k._isUpdatingChildren=!0;const $=(R,z)=>{const F=k.getChildren(R);F&&F.length>0&&F.forEach(M=>{k.isCheckedItem(M)!==z&&(k.checkItem(M,z),$(M,z))})};$(I,_)}finally{setTimeout(()=>{k._isUpdatingChildren=!1},0)}}}),[]);return o.jsxs(Rt,{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(B.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:E}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션",initialValue:""},selectProps:{options:l,placeholder:"시스템코드를 먼저 선택해주세요",onChange:S.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{itemProps:{name:"keyword",label:"검색어"},inputProps:{placeholder:"메뉴ID/메뉴명을 입력하세요.",onPressEnter:S.search}})})]})},children:[o.jsxs(ze,{type:"horizontal",children:[o.jsxs(Ae,{className:"w65 mr20",children:[o.jsx(Le,{title:"메뉴 트리"}),o.jsx(Ve,{ref:n,type:"tree",gridColumns:b,gridOptions:QN,gridEvents:O,bindRef:t})]}),o.jsx(Ae,{className:"w35",border:!0,overflow:{x:"auto",y:"auto"},children:o.jsx(pn,{title:"메뉴 상세",titleChildren:o.jsx(o.Fragment,{children:m>=0&&o.jsx(B.BwgButton,{color:"gold",onClick:()=>x("EDIT"),children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:t,children:o.jsx(V0,{readOnly:!0})})})})]}),o.jsx(fn,{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(V0,{readOnly:!1,drawerMode:f})})})]})},eD=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),i=tt.useCodeStore(),{showPopup:a}=st.usePopup(),{getFormData:s}=st.useSearchBox(),[l,c]=v.useState(!1),[d,u]=v.useState("new"),[f,h]=v.useState(null),[m,g]=v.useState([]),[x,y]=v.useState(""),[w,b]=v.useState(!1),[E,P]=v.useState(["조회","닫기"]),[j,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),g([]),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}},I={SCMPOPU00101:()=>{le.callService("SCMPOPU00101",{},{}).then(H=>{console.log("SCMPOPU00101:",H.data)}).catch(H=>{console.error("오류:",H)})},SCMPOPU00102:H=>{le.callService("SCMPOPU00102",H,{}).then(V=>{console.log("SCMPOPU00102:",V.data),t.current?.addAllData(V.data)}).catch(V=>{console.error("오류:",V)})},SCMPOPU00103:H=>{console.log("save params:",H),le.callService("SCMPOPU00103",H,{}).then(V=>{console.log("response:",V),V.result?(le.showSuccess(d==="new"?"팝업이 등록되었습니다.":"팝업이 수정되었습니다."),c(!1),h(null),g([]),y(""),n.current?.resetFields(),I.SCMPOPU00102()):(le.showDuplicateError("팝업코드"),n.current?.setFields([{name:"popuCd",errors:["이미 사용중인 팝업코드입니다."]}]))}).catch(V=>{console.error("오류:",V),le.showError("저장 중 오류가 발생했습니다.")})}},_={formFinish:async()=>{try{const H=await n.current?.validateFields();if(m.length>0&&m.filter(K=>!K.btnId||K.btnId.trim()==="").length>0){S("버튼ID가 입력되지 않은 버튼이 있습니다. 모든 버튼의 버튼ID를 입력해주세요.");return}S(""),I.SCMPOPU00103({edit:d!=="new",info:{crprCd:le.getUserInfo()?.crprCd||"100",systId:H.systId,popuCd:H.popuCd,popuNm:H.popuNm,popuUrl:H.popuUrl,popuWdth:H.popuWdth,wdthUnit:H.wdthUnit,popuHght:H.popuHght,hghtUnit:H.hghtUnit,enblYn:H.enblYn,rmrk:H.rmrk,dtlsInfo:m}})}catch(H){console.error("폼 유효성 검사 실패:",H)}},addButton:()=>{const H=m.length>0?Math.max(...m.map(K=>K.btnSq||0)):0,V={key:Date.now().toString(),btnSq:H+1,btnId:"",btnNm:"",iconType:"ANTD",iconVal:"",enblYn:"Y"};g(K=>[...K,V]),y(V.key)},openDefaultModal:()=>{b(!0)},applyDefaultButtons:()=>{const H={조회:{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"}},V=m.length>0?Math.max(...m.map(oe=>oe.btnSq||0)):0,K=E.map((oe,pe)=>({key:"btn_"+le.generateUID(),btnSq:V+pe+1,...H[oe]}));g(oe=>[...oe,...K]),b(!1)},previewPopup:async()=>{let H=f;if(!H){const V=t.current?.getCurrentRow();if(V===void 0||V<0){le.showError("미리보기할 팝업을 선택해주세요.");return}if(H=t.current?.vw?.getDataSource()?.getJsonRow(V),!H){le.showError("팝업 데이터를 가져올 수 없습니다.");return}}try{console.log("미리보기 팝업 실행:",H.popuCd),await a(H.popuCd,{popupData:H,isPreview:!0}),console.log("미리보기 팝업 열기 완료")}catch(V){console.error("미리보기 팝업 열기 실패:",V),le.showError("미리보기 팝업을 열 수 없습니다.")}}},$={onCurrentRowChanged(H,V,K){if(K<0)return;const oe=H.getValues(K);console.log("onCurrentRowChanged rowData:",oe),r.current?.setFieldsValue(oe),h(oe)}},R={search:async()=>{try{const H=s();console.log("SearchBox FormData:",H);const V={...H,userId:le.getUserInfo()?.userId};console.log("검색 파라미터:",V),I.SCMPOPU00102(V)}catch(H){console.error("SearchBox formData 접근 오류:",H),I.SCMPOPU00102()}},new:()=>{u("new"),h(null),g([]),c(!0),setTimeout(()=>{n.current?.resetFields()},100)},update:()=>{const H=t.current?.getCurrentRow();if(H===void 0||H<0){console.log("선택된 행이 없습니다.");return}const V=t.current?.vw?.getDataSource()?.getJsonRow(H);if(V){if(u("update"),h(V),c(!0),console.log("전체 rowData:",V),console.log("rowData.dtlsInfo 존재 여부:",!!V.dtlsInfo),console.log("rowData.dtlsInfo 타입:",typeof V.dtlsInfo),console.log("rowData.dtlsInfo 값:",V.dtlsInfo),V.dtlsInfo){console.log("rowData.dtlsInfo 원본:",V.dtlsInfo);let K;if(Array.isArray(V.dtlsInfo)?(K=V.dtlsInfo,console.log("dtlsInfo가 배열입니다:",K)):typeof V.dtlsInfo=="object"?(K=[V.dtlsInfo],console.log("dtlsInfo가 객체입니다. 배열로 변환:",K)):(K=[],console.log("dtlsInfo가 다른 타입입니다:",typeof V.dtlsInfo)),K&&K.length>0){console.log("최종 buttonListData:",K);const oe=K.map((pe,ve)=>({...pe,key:pe.key||`btn_${Date.now()}_${ve}`,btnSq:pe.btnSq||ve+1}));console.log("처리된 buttonListWithKeys:",oe),g(oe)}else console.log("buttonListData가 비어있음, 빈 배열로 설정"),g([])}else console.log("dtlsInfo가 없음, 빈 배열로 설정"),g([]);setTimeout(()=>{const K={...V,popuUrl:V.popuUrl?.startsWith("/popup/")?V.popuUrl.substring(8):V.popuUrl};n.current?.setFieldsValue(K)},100)}}},z={previewPopup:_.previewPopup},F=[{title:"순서",key:"order",width:80,align:"center",render:(H,V)=>{const K=m.findIndex(oe=>oe.key===V.key);return o.jsxs(p.Space,{direction:"vertical",size:"small",children:[o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(G.UpOutlined,{}),disabled:K===0,onClick:()=>N(V.key)}),o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(G.DownOutlined,{}),disabled:K===m.length-1,onClick:()=>U(V.key)})]})}},{title:"순번",dataIndex:"btnSq",key:"btnSq",width:60,align:"center",render:H=>H||"-"},{title:"버튼ID",dataIndex:"btnId",key:"btnId",width:120,render:(H,V)=>{const K=V.key===x,oe=!H||H.trim()==="",pe=j&&oe;return K?o.jsx(p.Input,{value:H,status:pe?"error":void 0,onChange:ve=>{const Ce=[...m],Pe=Ce.find(J=>V.key===J.key);Pe&&(Pe.btnId=ve.target.value,g(Ce),ve.target.value.trim()!==""&&S(""))}}):o.jsx("span",{style:{color:pe?"#cf1322":"inherit",fontWeight:pe?"bold":"normal"},children:H||(pe?"입력 필요":"")})}},{title:"버튼명",dataIndex:"btnNm",key:"btnNm",width:150,render:(H,V)=>V.key===x?o.jsx(p.Input,{value:H,onChange:oe=>{const pe=[...m],ve=pe.find(Ce=>V.key===Ce.key);ve&&(ve.btnNm=oe.target.value,g(pe))}}):H},{title:"아이콘타입",dataIndex:"iconType",align:"center",key:"iconType",width:100,render:(H,V)=>V.key===x?o.jsx(p.Select,{value:H,style:{width:"100%"},onChange:oe=>{const pe=[...m],ve=pe.find(Ce=>V.key===Ce.key);ve&&(ve.iconType=oe,g(pe))},options:[{label:"ANTD",value:"ANTD"},{label:"CSS",value:"CSS"},{label:"SVG",value:"SVG"}]}):o.jsx(p.Tag,{color:H==="ANTD"?"blue":H==="CSS"?"green":"orange",children:H})},{title:"아이콘값",dataIndex:"iconVal",key:"iconVal",width:120,render:(H,V)=>V.key===x?o.jsx(p.Input,{value:H,onChange:oe=>{const pe=[...m],ve=pe.find(Ce=>V.key===Ce.key);ve&&(ve.iconVal=oe.target.value,g(pe))}}):H},{title:"사용여부",dataIndex:"enblYn",align:"center",key:"enblYn",width:80,render:(H,V)=>V.key===x?o.jsx(p.Switch,{checked:H==="Y",onChange:oe=>{const pe=[...m],ve=pe.find(Ce=>V.key===Ce.key);ve&&(ve.enblYn=oe?"Y":"N",g(pe))}}):o.jsx(p.Tag,{color:H==="Y"?"green":"red",children:H==="Y"?"사용":"미사용"})},{title:"작업",key:"action",align:"center",width:120,render:(H,V)=>V.key===x?o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"저장",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(G.SaveOutlined,{}),onClick:()=>A()})}),o.jsx(p.Tooltip,{title:"취소",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(G.RedoOutlined,{}),onClick:D})})]}):o.jsxs(p.Space,{children:[o.jsx(p.Tooltip,{title:"편집",children:o.jsx(p.Button,{type:"link",size:"small",icon:o.jsx(G.EditOutlined,{}),onClick:()=>M(V)})}),o.jsx(p.Tooltip,{title:"삭제",children:o.jsx(p.Button,{type:"link",size:"small",danger:!0,icon:o.jsx(G.RestOutlined,{}),onClick:()=>T(V.key)})})]})}],M=H=>{y(H.key)},D=()=>{y("")},A=H=>{y("")},T=H=>{g(V=>V.filter(K=>K.key!==H))},N=H=>{g(V=>{const K=V.findIndex(oe=>oe.key===H);if(K>0){const oe=[...V];return[oe[K],oe[K-1]]=[oe[K-1],oe[K]],oe.forEach((pe,ve)=>{pe.btnSq=ve+1}),oe}return V})},U=H=>{g(V=>{const K=V.findIndex(oe=>oe.key===H);if(K<V.length-1){const oe=[...V];return[oe[K],oe[K+1]]=[oe[K+1],oe[K]],oe.forEach((pe,ve)=>{pe.btnSq=ve+1}),oe}return V})};return console.log("CMPopuMstrM01 grantEvent:",R),console.log("CMPopuMstrM01 customEvent:",z),console.log("grantEvent.update 함수 존재 여부:",!!R.update),o.jsx(Rt,{buttons:{grant:[{id:"search",label:"조회",onClick:R.search},{id:"new",label:"신규",onClick:R.new},{id:"update",label:"변경",onClick:R.update}],custom:[{id:"preview",label:"미리보기",onClick:z.previewPopup}]},searchBox:{reqRows:[o.jsx(B.BwgFormItem,{name:"systId",label:"시스템ID",children:o.jsx(p.Select,{options:i.getCodeList("SYST"),placeholder:"검색어를 입력하세요",allowClear:!0},"input1")}),o.jsx(B.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(Ae,{className:"w60",children:[o.jsx(Le,{title:"팝업 목록",icons:{type:"antd"}}),o.jsx(Ve,{type:"nrml",gridColumns:O,gridOptions:k,gridEvents:$,ref:t})]}),o.jsx(Ae,{className:"w40",border:!0,children:o.jsx(pn,{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(B.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(B.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(B.BwgFormItem,{label:"팝업코드",name:"popuCd",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.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(B.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(B.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",children:o.jsx(p.Input,{variant:"borderless",readOnly:!0})}),o.jsx(B.BwgFormItem,{label:"비고",name:"rmrk",children:o.jsx(p.Input.TextArea,{variant:"borderless",readOnly:!0,rows:3})}),o.jsx(B.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((H,V)=>o.jsx(p.Col,{span:6,children:o.jsx(p.Button,{disabled:H.enblYn!=="Y",style:{width:"100%",marginBottom:"8px"},children:H.btnNm})},V)):o.jsx(p.Col,{span:24,children:o.jsx("div",{style:{textAlign:"center",color:"#999",padding:"20px"},children:"등록된 버튼이 없습니다."})})})})})]})})}),o.jsx(fn,{title:d==="new"?"팝업 등록":"팝업 수정",open:l,placement:"right",width:"40%",onClose:()=>{c(!1),h(null),g([]),y("")},children:o.jsxs(B.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(B.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(B.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(B.BwgFormItem,{label:"팝업코드",name:"popuCd",rules:[{required:!0,message:"팝업코드를 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업코드를 입력하세요"})})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.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(B.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(B.BwgFormItem,{label:"팝업호출URL",name:"popuUrl",rules:[{required:!0,message:"팝업호출URL을 입력하세요"}],children:o.jsx(p.Input,{placeholder:"팝업 URL을 입력하세요 (예: cm/TestPopup)",addonBefore:"popup/"})}),o.jsx(B.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(G.SettingTwoTone,{}),onClick:_.openDefaultModal,children:"기본값"}),o.jsx(p.Button,{icon:o.jsx(G.PlusOutlined,{}),onClick:_.addButton,children:"추가"})]}),o.jsx(p.Table,{columns:F,dataSource:m,pagination:!1,size:"small",bordered:!0,scroll:{x:600},rowKey:"key"}),j&&o.jsxs("div",{style:{marginTop:"8px",padding:"8px 12px",backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"6px",color:"#cf1322",fontSize:"14px"},children:["⚠️ ",j]}),o.jsxs("div",{style:{textAlign:"right",marginTop:"16px"},children:[o.jsx(p.Button,{type:"primary",onClick:_.formFinish,style:{marginRight:"8px"},children:"저장"}),o.jsx(p.Button,{onClick:()=>{c(!1),h(null)},children:"취소"})]})]})}),o.jsxs(p.Modal,{title:"기본 버튼 선택",open:w,onOk:_.applyDefaultButtons,onCancel:()=>b(!1),okText:"적용",cancelText:"취소",children:[o.jsx("p",{children:"추가할 기본 버튼을 선택하세요:"}),o.jsx(p.Checkbox.Group,{value:E,onChange:H=>P(H),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:tD}=p.Modal,Ti={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"}]},rD=[{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}],nD={display:{},edit:{editable:!1},copy:{singleMode:!0},container:{state:!0,check:!0,checkAll:!0,indicator:!0}},H0=({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&&Ti[c]?s(Ti[c]):s([])},[r]);const l=c=>{i(c??null),c&&Ti[c]?s(Ti[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(B.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(B.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(B.BwgInput,{itemProps:{name:"prgrId",label:"프로그램 코드"},inputProps:{disabled:t==="EDIT",readOnly:e,variant:e?"borderless":"outlined"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.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(B.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(B.BwgInput,{itemProps:{name:"prgrUrl",label:"프로그램 URL"},inputProps:{readOnly:e,variant:e?"borderless":"outlined",placeholder:"/cm/rsrc/파일명 (.tsx 생략)"}}),o.jsx(B.BwgTextArea,{itemProps:{name:"prgrDscr",label:"프로그램 설명"},inputProps:{readOnly:e,rows:4,variant:e?"borderless":"outlined"}})]})},iD=e=>{const t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),{getFormData:i,setFormData:a}=st.useSearchBox(),[s,l]=v.useState([]),[c,d]=v.useState(!1),[u,f]=v.useState(""),[h,m]=v.useState(-1),g=v.useCallback(S=>{d(!0),f(S)},[]),x=v.useCallback(()=>{d(!1),f("")},[]);v.useEffect(()=>{const S=tt.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(Ti).flat();l(O)}else S&&Ti[S]?l(Ti[S]):l([]);a({appCd:null}),b.search()},[a]),w=v.useCallback(()=>{E.SCMPRGR00102()},[u]),b={search:()=>{E.SCMPRGR00101()},new:()=>{g("NEW")},delete:()=>{const S=t.current?.vw?.getCheckedRows(!1)??[];if(S.length==0){le.showWarning("삭제할 행을 체크하세요");return}tD({title:"삭제 안내",content:`${S.length}개 행을 삭제하시겠습니까?`,onOk:()=>{E.SCMPRGR00103()}})}},E={SCMPRGR00101:()=>{le.callService("SCMPRGR00101",i(),{}).then(S=>{t.current?.addAllData(S.data)})},SCMPRGR00102:()=>{const S={iudFlag:u==="EDIT"?"U":"I",...n.current?.getFieldsValue()??{}};le.callService("SCMPRGR00102",S,{}).then(O=>{O.result>0?(x(),E.SCMPRGR00101()):le.showError(O.message)}).catch(O=>{console.error("오류:",O)})},SCMPRGR00103:()=>{const S={},O=t.current?.vw?.getCheckedRows(!1)??[],k=[];O.forEach(I=>{const _=t.current?.dp?.getJsonRow(I);k.push({sysCd:_.sysCd,appCd:_.appCd,prgrId:_.prgrId})}),S.sub=k,le.callService("SCMPRGR00103",S).then(I=>{I.result>0&&E.SCMPRGR00101()}).catch(I=>{console.error("오류:",I)})}},P={editForm:()=>{if((t.current?.getCurrentRow()??-1)<0){le.showWarning("행 선택 후 변경 가능합니다.");return}g("EDIT")}},j={onCurrentRowChanged(S,O,k){m(k)}};return o.jsxs(Rt,{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(B.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(B.BwgSelect,{itemProps:{name:"appCd",label:"애플리케이션"},selectProps:{options:s,placeholder:"시스템코드를 먼저 선택해주세요",onChange:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgInput,{itemProps:{name:"keyword",label:"프로그램명"},inputProps:{placeholder:"프로그램ID/프로그램명을 입력하세요.",onPressEnter:b.search}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.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(Ae,{className:"w60 mr20",children:[o.jsx(Le,{title:"프로그램 목록",icons:{type:"antd"}}),o.jsx(Ve,{ref:t,gridColumns:rD,gridOptions:nD,gridEvents:j,bindRef:r})]}),o.jsx(Ae,{className:"w40",border:!0,children:o.jsx(pn,{title:"프로그램 상세",titleChildren:o.jsx(o.Fragment,{children:h>=0&&o.jsx(B.BwgButton,{type:"dashed",onClick:P.editForm,children:"변경"})}),children:o.jsx(p.Form,{layout:"vertical",ref:r,className:"sub-form pd10",children:o.jsx(H0,{readOnly:!0})})})})]}),o.jsx(fn,{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(H0,{readOnly:!1,drawerMode:u})})})]})},oD=()=>{const e=v.useRef(null),t=v.useRef(null),r=v.useRef(null),{openCorePopup:n}=st.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:Cl().format("YYYY")}),c.search()},[]);const d={SCMHLDY00101:()=>{le.callService("SCMHLDY00101",{...r.current?.getFormData()||{},crprCd:le.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();le.callService("SCMHLDY00102",{sub:u,crprCd:le.getCrprCd(),sysCd:__SYS_CD__}).then(f=>{c.search()})}};return o.jsx(Rt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{c.search()}},{id:"edit",label:"수정",onClick:()=>{c.edit()}}]},children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(Ae,{className:"w50",children:[o.jsx(Le,{title:"국경일/공휴일 API"}),o.jsx(Ve,{ref:e,type:"nrml",gridColumns:i,gridOptions:s})]}),o.jsxs(Ae,{className:"w50",border:!0,children:[o.jsxs(Le,{title:"사업장 휴일",children:[o.jsx(B.BwgButton,{type:"primary",onClick:()=>{t.current?.dp?.addRow?.({iudFlag:"I"})},children:"추가"}),o.jsx(B.BwgButton,{type:"primary",onClick:()=>{t.current?.deleteGridData()},children:"삭제"}),o.jsx(B.BwgButton,{onClick:()=>{n("CORE_HOLIDAY_01")},children:"조회팝업"})]}),o.jsx(Ve,{ref:t,type:"nrml",gridColumns:a,gridOptions:l})]})]})})},aD=e=>o.jsx("div",{children:"CMSystCfgM01"}),sD=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(G.UserOutlined,{}),color:"blue",status:"active"},{id:"KE",name:"K-ERP 서비스",description:"전사적 자원 관리 시스템",icon:o.jsx(G.DatabaseOutlined,{}),color:"green",status:"active"},{id:"KS",name:"K-업무지원",description:"경영 지원 시스템",icon:o.jsx(G.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"}}],[]),m=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"}}],[]),g={container:{indicator:!0}},x=w=>{r(w)},y=w=>{i(w),w==="group"&&s(null)};return v.useEffect(()=>{t&&le.callService("SCMSYST00101",{crprCd:le.getCrprCd(),applCd:t},{}).then(w=>{console.log({SCMSYST00101:w.data}),l.current?.addAllData(w.data)})},[t]),v.useEffect(()=>{t&&le.callService("SCMCODE00101",{crprCd:le.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(Rt,{children:[o.jsx(Ae,{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(Ae,{border:!0,children:o.jsxs(ze,{type:"horizontal",children:[o.jsxs(Ae,{className:"w40",children:[o.jsxs(Le,{title:"업무코드 목록",children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(Ve,{ref:l,type:"nrml",gridColumns:f,gridOptions:g})]}),o.jsxs(Ae,{className:"w60",children:[o.jsxs(Le,{title:"시스템 공통코드 목록",tooltip:{title:"시스템 전역에 배포될 코드 목록입니다."},children:[o.jsx(p.Button,{children:"신규"}),o.jsx(p.Button,{children:"변경"})]}),o.jsx(lr,{defaultActiveKey:"group",size:"small",tabPosition:"left",style:{height:"100%"},activeKey:n,onChange:y,items:[{key:"group",label:"그룹코드",icon:o.jsx(G.GroupOutlined,{}),children:o.jsx(ze,{children:o.jsx(Ae,{children:o.jsx(Ve,{ref:c,type:"nrml",gridColumns:h,gridOptions:g})})})},{key:"detail",label:"상세코드",icon:o.jsx(G.UngroupOutlined,{}),children:o.jsx(Ve,{ref:d,type:"nrml",gridColumns:m,gridOptions:g})}]})]})]})})]})};function yS(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=yS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Je(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=yS(e))&&(n&&(n+=" "),n+=t);return n}var lD=["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 om(e){if(typeof e!="string")return!1;var t=lD;return t.includes(e)}var cD=["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 xS(e){if(typeof e!="string")return!1;var t=cD;return t.includes(e)}function bS(e){return typeof e=="string"&&e.startsWith("data-")}function Zr(e){var t=Object.entries(e).filter(r=>{var[n]=r;return xS(n)||bS(n)});return Object.fromEntries(t)}function Wa(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Zr(t)}return typeof e=="object"&&!Array.isArray(e)?Zr(e):null}function Dr(e){var t=Object.entries(e).filter(r=>{var[n]=r;return xS(n)||bS(n)||om(n)});return Object.fromEntries(t)}var uD=["children","width","height","viewBox","className","style","title","desc"];function _p(){return _p=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},_p.apply(null,arguments)}function dD(e,t){if(e==null)return{};var r,n,i=fD(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 fD(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 am=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:s,style:l,title:c,desc:d}=e,u=dD(e,uD),f=a||{width:n,height:i,x:0,y:0},h=Je("recharts-surface",s);return C.createElement("svg",_p({},Dr(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)}),pD=["children","className"];function Bp(){return Bp=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},Bp.apply(null,arguments)}function hD(e,t){if(e==null)return{};var r,n,i=mD(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 mD(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 ar=C.forwardRef((e,t)=>{var{children:r,className:n}=e,i=hD(e,pD),a=Je("recharts-layer",n);return C.createElement("g",Bp({className:a},Dr(i),{ref:t}),r)}),wS=v.createContext(null),gD=()=>v.useContext(wS);function it(e){return function(){return e}}const CS=Math.cos,ql=Math.sin,en=Math.sqrt,Yl=Math.PI,Hc=2*Yl,$p=Math.PI,Lp=2*$p,Ei=1e-6,vD=Lp-Ei;function SS(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function yD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return SS;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 xD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?SS:yD(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>Ei)if(!(Math.abs(f*c-d*u)>Ei)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-s,g=i-l,x=c*c+d*d,y=m*m+g*g,w=Math.sqrt(x),b=Math.sqrt(h),E=a*Math.tan(($p-Math.acos((x+h-y)/(2*w*b)))/2),P=E/b,j=E/w;Math.abs(P-1)>Ei&&this._append`L${t+P*u},${r+P*f}`,this._append`A${a},${a},0,0,${+(f*m>u*g)},${this._x1=t+j*c},${this._y1=r+j*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)>Ei||Math.abs(this._y1-u)>Ei)&&this._append`L${d},${u}`,n&&(h<0&&(h=h%Lp+Lp),h>vD?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>Ei&&this._append`A${n},${n},0,${+(h>=$p)},${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 sm(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 xD(t)}function lm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jS(e){this._context=e}jS.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 Wc(e){return new jS(e)}function ES(e){return e[0]}function PS(e){return e[1]}function OS(e,t){var r=it(!0),n=null,i=Wc,a=null,s=sm(l);e=typeof e=="function"?e:e===void 0?ES:it(e),t=typeof t=="function"?t:t===void 0?PS:it(t);function l(c){var d,u=(c=lm(c)).length,f,h=!1,m;for(n==null&&(a=i(m=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(m)return a=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:it(!!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 tl(e,t,r){var n=null,i=it(!0),a=null,s=Wc,l=null,c=sm(d);e=typeof e=="function"?e:e===void 0?ES:it(+e),t=typeof t=="function"?t:it(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?PS:it(+r);function d(f){var h,m,g,x=(f=lm(f)).length,y,w=!1,b,E=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)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=h-1;g>=m;--g)l.point(E[g],P[g]);l.lineEnd(),l.areaEnd()}w&&(E[h]=+e(y,h,f),P[h]=+t(y,h,f),l.point(n?+n(y,h,f):E[h],r?+r(y,h,f):P[h]))}if(b)return l=null,b+""||null}function u(){return OS().defined(i).curve(s).context(a)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),n=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),d):e},d.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:it(+f),d):n},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),r=null,d):t},d.y0=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),d):t},d.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:it(+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:it(!!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 kS{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 bD(e){return new kS(e,!0)}function wD(e){return new kS(e,!1)}const cm={draw(e,t){const r=en(t/Yl);e.moveTo(r,0),e.arc(0,0,r,0,Hc)}},CD={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()}},TS=en(1/3),SD=TS*2,jD={draw(e,t){const r=en(t/SD),n=r*TS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},ED={draw(e,t){const r=en(t),n=-r/2;e.rect(n,n,r,r)}},PD=.8908130915292852,IS=ql(Yl/10)/ql(7*Yl/10),OD=ql(Hc/10)*IS,kD=-CS(Hc/10)*IS,TD={draw(e,t){const r=en(t*PD),n=OD*r,i=kD*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=Hc*a/5,l=CS(s),c=ql(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},bd=en(3),ID={draw(e,t){const r=-en(t/(bd*3));e.moveTo(0,r*2),e.lineTo(-bd*r,-r),e.lineTo(bd*r,-r),e.closePath()}},Tr=-.5,Ir=en(3)/2,zp=1/en(12),MD=(zp/2+1)*3,RD={draw(e,t){const r=en(t/MD),n=r/2,i=r*zp,a=n,s=r*zp+r,l=-a,c=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(l,c),e.lineTo(Tr*n-Ir*i,Ir*n+Tr*i),e.lineTo(Tr*a-Ir*s,Ir*a+Tr*s),e.lineTo(Tr*l-Ir*c,Ir*l+Tr*c),e.lineTo(Tr*n+Ir*i,Tr*i-Ir*n),e.lineTo(Tr*a+Ir*s,Tr*s-Ir*a),e.lineTo(Tr*l+Ir*c,Tr*c-Ir*l),e.closePath()}};function AD(e,t){let r=null,n=sm(i);e=typeof e=="function"?e:it(e||cm),t=typeof t=="function"?t:it(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:it(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:it(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Gl(){}function Xl(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 MS(e){this._context=e}MS.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:Xl(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:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ND(e){return new MS(e)}function RS(e){this._context=e}RS.prototype={areaStart:Gl,areaEnd:Gl,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:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DD(e){return new RS(e)}function AS(e){this._context=e}AS.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:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _D(e){return new AS(e)}function NS(e){this._context=e}NS.prototype={areaStart:Gl,areaEnd:Gl,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 BD(e){return new NS(e)}function W0(e){return e<0?-1:1}function U0(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(W0(a)+W0(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function K0(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wd(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 Zl(e){this._context=e}Zl.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:wd(this,this._t0,K0(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,wd(this,K0(this,r=U0(this,e,t)),r);break;default:wd(this,this._t0,r=U0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function DS(e){this._context=new _S(e)}(DS.prototype=Object.create(Zl.prototype)).point=function(e,t){Zl.prototype.point.call(this,t,e)};function _S(e){this._context=e}_S.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 $D(e){return new Zl(e)}function LD(e){return new DS(e)}function BS(e){this._context=e}BS.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=q0(e),i=q0(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 q0(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 zD(e){return new BS(e)}function Uc(e,t){this._context=e,this._t=t}Uc.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 FD(e){return new Uc(e,.5)}function VD(e){return new Uc(e,0)}function HD(e){return new Uc(e,1)}function ko(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 Fp(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function WD(e,t){return e[t]}function UD(e){const t=[];return t.key=e,t}function KD(){var e=it([]),t=Fp,r=ko,n=WD;function i(a){var s=Array.from(e.apply(this,arguments),UD),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=lm(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:it(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:it(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Fp:typeof a=="function"?a:it(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ko,i):r},i}function qD(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}ko(e,t)}}function YD(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}ko(e,t)}}function GD(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,m=(f-h)/2,g=0;g<l;++g){var x=e[t[g]],y=x[n][1]||0,w=x[n-1][1]||0;m+=y-w}c+=f,d+=m*f}i[n-1][1]+=i[n-1][0]=r,c&&(r-=d/c)}i[n-1][1]+=i[n-1][0]=r,ko(e,t)}}var Cd={},Sd={},Y0;function XD(){return Y0||(Y0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Sd)),Sd}var jd={},G0;function $S(){return G0||(G0=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})(jd)),jd}var Ed={},X0;function um(){return X0||(X0=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})(Ed)),Ed}var Pd={},Od={},Z0;function ZD(){return Z0||(Z0=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})(Od)),Od}var Q0;function dm(){return Q0||(Q0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZD(),r=um();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})(Pd)),Pd}var J0;function fm(){return J0||(J0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XD(),r=$S(),n=um(),i=dm();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})(Cd)),Cd}var kd,ey;function QD(){return ey||(ey=1,kd=fm().get),kd}var JD=QD();const Li=jr(JD);var Ht=e=>e===0?0:e>0?1:-1,Qr=e=>typeof e=="number"&&e!=+e,An=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Re=e=>(typeof e=="number"||e instanceof Number)&&!Qr(e),mn=e=>Re(e)||typeof e=="string",e_=0,Ua=e=>{var t=++e_;return"".concat(e||"").concat(t)},tr=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(!Re(t)&&typeof t!="string")return n;var a;if(An(t)){if(r==null)return n;var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Qr(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},LS=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 Tt(e,t,r){return Re(e)&&Re(t)?e+r*(t-e):t}function t_(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Li(n,t))===r)}var Ut=e=>e===null||typeof e>"u",fs=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function r_(e){return e!=null}function qi(){}var n_=["type","size","sizeType"];function Vp(){return Vp=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},Vp.apply(null,arguments)}function ty(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 ry(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ty(Object(r),!0).forEach(function(n){i_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i_(e,t,r){return(t=o_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o_(e){var t=a_(e,"string");return typeof t=="symbol"?t:t+""}function a_(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 s_(e,t){if(e==null)return{};var r,n,i=l_(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 l_(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 zS={symbolCircle:cm,symbolCross:CD,symbolDiamond:jD,symbolSquare:ED,symbolStar:TD,symbolTriangle:ID,symbolWye:RD},c_=Math.PI/180,u_=e=>{var t="symbol".concat(fs(e));return zS[t]||cm},d_=(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*c_;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}},f_=(e,t)=>{zS["symbol".concat(fs(e))]=t},pm=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=s_(e,n_),a=ry(ry({},i),{},{type:t,size:r,sizeType:n}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var h=u_(s),m=AD().type(h).size(d_(r,n,s)),g=m();if(g!==null)return g},{className:c,cx:d,cy:u}=a,f=Dr(a);return Re(d)&&Re(u)&&Re(r)?C.createElement("path",Vp({},f,{className:Je("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(u,")"),d:l()})):null};pm.registerSymbol=f_;var FS=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,p_=(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=>{om(i)&&(n[i]=(a=>r[i](r,a)))}),n},h_=(e,t,r)=>n=>(e(t,r,n),null),ps=(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];om(i)&&typeof a=="function"&&(n||(n={}),n[i]=h_(a,t,r))}),n};function ny(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 m_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(r),!0).forEach(function(n){g_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g_(e,t,r){return(t=v_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v_(e){var t=y_(e,"string");return typeof t=="symbol"?t:t+""}function y_(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 Kt(e,t){var r=m_({},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 Ql(){return Ql=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},Ql.apply(null,arguments)}function iy(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 x_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iy(Object(r),!0).forEach(function(n){b_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b_(e,t,r){return(t=w_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w_(e){var t=C_(e,"string");return typeof t=="symbol"?t:t+""}function C_(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,S_={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function j_(e){var{data:t,iconType:r,inactiveColor:n}=e,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"){var d;return C.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:(d=t.payload)===null||d===void 0?void 0:d.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,`
|
|
1031
|
-
A`).concat(a,",").concat(a,",0,1,1,").concat(2*s,",").concat(i,`
|
|
1032
|
-
H`).concat(Rr,"M").concat(2*s,",").concat(i,`
|
|
1033
|
-
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 u=x_({},t);return delete u.legendIcon,C.cloneElement(t.legendIcon,u)}return C.createElement(pm,{fill:l,cx:i,cy:i,size:Rr,sizeType:"diameter",type:c})}function E_(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:s}=e,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,m=Je({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:u.inactive});if(u.type==="none")return null;var g=u.inactive?a:u.color,x=h?h(u.value,u,f):u.value;return C.createElement("li",Ql({className:m,style:c,key:"legend-item-".concat(f)},ps(e,u,f)),C.createElement(am,{width:r,height:r,viewBox:l,style:d,"aria-label":"".concat(x," legend icon")},C.createElement(j_,{data:u,iconType:s,inactiveColor:a})),C.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},x))})}var P_=e=>{var t=Kt(e,S_),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:a},C.createElement(E_,Ql({},t,{payload:r})))},Td={},Id={},oy;function O_(){return oy||(oy=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})(Id)),Id}var Md={},ay;function VS(){return ay||(ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Md)),Md}var Rd={},Ad={},Nd={},sy;function k_(){return sy||(sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Nd)),Nd}var ly;function hm(){return ly||(ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k_();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Ad)),Ad}var Dd={},cy;function T_(){return cy||(cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Dd)),Dd}var uy;function I_(){return uy||(uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hm(),r=T_();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Rd)),Rd}var _d={},Bd={},dy;function M_(){return dy||(dy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fm();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Bd)),Bd}var $d={},Ld={},zd={},Fd={},fy;function HS(){return fy||(fy=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})(Fd)),Fd}var Vd={},py;function WS(){return py||(py=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})(Vd)),Vd}var Hd={},hy;function US(){return hy||(hy=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})(Hd)),Hd}var my;function R_(){return my||(my=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HS(),r=WS(),n=US();function i(u,f,h){return typeof h!="function"?i(u,f,()=>{}):a(u,f,function m(g,x,y,w,b,E){const P=h(g,x,y,w,b,E);return P!==void 0?!!P:a(g,x,m,E)},new Map)}function a(u,f,h,m){if(f===u)return!0;switch(typeof f){case"object":return s(u,f,h,m);case"function":return Object.keys(f).length>0?a(u,{...f},h,m):n.eq(u,f);default:return t.isObject(u)?typeof f=="string"?f==="":!0:n.eq(u,f)}}function s(u,f,h,m){if(f==null)return!0;if(Array.isArray(f))return c(u,f,h,m);if(f instanceof Map)return l(u,f,h,m);if(f instanceof Set)return d(u,f,h,m);const g=Object.keys(f);if(u==null)return g.length===0;if(g.length===0)return!0;if(m?.has(f))return m.get(f)===u;m?.set(f,u);try{for(let x=0;x<g.length;x++){const y=g[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,m))return!1}return!0}finally{m?.delete(f)}}function l(u,f,h,m){if(f.size===0)return!0;if(!(u instanceof Map))return!1;for(const[g,x]of f.entries()){const y=u.get(g);if(h(y,x,g,u,f,m)===!1)return!1}return!0}function c(u,f,h,m){if(f.length===0)return!0;if(!Array.isArray(u))return!1;const g=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(g.has(b))continue;const E=u[b];let P=!1;if(h(E,y,x,u,f,m)&&(P=!0),P){g.add(b),w=!0;break}}if(!w)return!1}return!0}function d(u,f,h,m){return f.size===0?!0:u instanceof Set?c([...u],[...f],h,m):!1}e.isMatchWith=i,e.isSetMatch=d})(zd)),zd}var gy;function KS(){return gy||(gy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=R_();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Ld)),Ld}var Wd={},Ud={},Kd={},vy;function A_(){return vy||(vy=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})(Kd)),Kd}var qd={},yy;function qS(){return yy||(yy=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})(qd)),qd}var Yd={},xy;function YS(){return xy||(xy=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]",m="[object Object]",g="[object Error]",x="[object DataView]",y="[object Uint8Array]",w="[object Uint8ClampedArray]",b="[object Uint16Array]",E="[object Uint32Array]",P="[object BigUint64Array]",j="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",k="[object BigInt64Array]",I="[object Float32Array]",_="[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=g,e.float32ArrayTag=I,e.float64ArrayTag=_,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=O,e.int8ArrayTag=j,e.mapTag=c,e.numberTag=n,e.objectTag=m,e.regexpTag=t,e.setTag=d,e.stringTag=r,e.symbolTag=s,e.uint16ArrayTag=b,e.uint32ArrayTag=E,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=w})(Yd)),Yd}var Gd={},by;function N_(){return by||(by=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Gd)),Gd}var wy;function GS(){return wy||(wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=A_(),r=qS(),n=YS(),i=WS(),a=N_();function s(u,f){return l(u,void 0,u,new Map,f)}function l(u,f,h,m=new Map,g=void 0){const x=g?.(u,f,h,m);if(x!==void 0)return x;if(i.isPrimitive(u))return u;if(m.has(u))return m.get(u);if(Array.isArray(u)){const y=new Array(u.length);m.set(u,y);for(let w=0;w<u.length;w++)y[w]=l(u[w],w,h,m,g);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;m.set(u,y);for(const[w,b]of u)y.set(w,l(b,w,h,m,g));return y}if(u instanceof Set){const y=new Set;m.set(u,y);for(const w of u)y.add(l(w,void 0,h,m,g));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);m.set(u,y);for(let w=0;w<u.length;w++)y[w]=l(u[w],w,h,m,g);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 m.set(u,y),c(y,u,h,m,g),y}if(typeof File<"u"&&u instanceof File){const y=new File([u],u.name,{type:u.type});return m.set(u,y),c(y,u,h,m,g),y}if(typeof Blob<"u"&&u instanceof Blob){const y=new Blob([u],{type:u.type});return m.set(u,y),c(y,u,h,m,g),y}if(u instanceof Error){const y=new u.constructor;return m.set(u,y),y.message=u.message,y.name=u.name,y.stack=u.stack,y.cause=u.cause,c(y,u,h,m,g),y}if(u instanceof Boolean){const y=new Boolean(u.valueOf());return m.set(u,y),c(y,u,h,m,g),y}if(u instanceof Number){const y=new Number(u.valueOf());return m.set(u,y),c(y,u,h,m,g),y}if(u instanceof String){const y=new String(u.valueOf());return m.set(u,y),c(y,u,h,m,g),y}if(typeof u=="object"&&d(u)){const y=Object.create(Object.getPrototypeOf(u));return m.set(u,y),c(y,u,h,m,g),y}return u}function c(u,f,h=u,m,g){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,m,g))}}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})(Ud)),Ud}var Cy;function D_(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GS();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Wd)),Wd}var Sy;function __(){return Sy||(Sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KS(),r=D_();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})($d)),$d}var Xd={},Zd={},Qd={},jy;function B_(){return jy||(jy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GS(),r=YS();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})(Qd)),Qd}var Ey;function $_(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=B_();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Zd)),Zd}var Jd={},ef={},Py;function XS(){return Py||(Py=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})(ef)),ef}var tf={},Oy;function L_(){return Oy||(Oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qS();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(tf)),tf}var ky;function z_(){return ky||(ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$S(),r=XS(),n=L_(),i=dm();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})(Jd)),Jd}var Ty;function F_(){return Ty||(Ty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KS(),r=um(),n=$_(),i=fm(),a=z_();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})(Xd)),Xd}var Iy;function V_(){return Iy||(Iy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VS(),r=M_(),n=__(),i=F_();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})(_d)),_d}var My;function H_(){return My||(My=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=O_(),r=VS(),n=I_(),i=V_();function a(s,l=r.identity){return n.isArrayLikeObject(s)?t.uniqBy(Array.from(s),i.iteratee(l)):[]}e.uniqBy=a})(Td)),Td}var rf,Ry;function W_(){return Ry||(Ry=1,rf=H_().uniqBy),rf}var U_=W_();const Ay=jr(U_);function ZS(e,t,r){return t===!0?Ay(e,r):typeof t=="function"?Ay(e,t):e}var rl={exports:{}},nf={},nl={exports:{}},of={};/**
|
|
1034
|
-
* @license React
|
|
1035
|
-
* use-sync-external-store-shim.production.js
|
|
1036
|
-
*
|
|
1037
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1038
|
-
*
|
|
1039
|
-
* This source code is licensed under the MIT license found in the
|
|
1040
|
-
* LICENSE file in the root directory of this source tree.
|
|
1041
|
-
*/var Ny;function K_(){if(Ny)return of;Ny=1;var e=v;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function l(f,h){var m=h(),g=n({inst:{value:m,getSnapshot:h}}),x=g[0].inst,y=g[1];return a(function(){x.value=m,x.getSnapshot=h,c(x)&&y({inst:x})},[f,m,h]),i(function(){return c(x)&&y({inst:x}),f(function(){c(x)&&y({inst:x})})},[f]),s(m),m}function c(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!r(f,m)}catch{return!0}}function d(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return of.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,of}var af={};/**
|
|
1042
|
-
* @license React
|
|
1043
|
-
* use-sync-external-store-shim.development.js
|
|
1044
|
-
*
|
|
1045
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1046
|
-
*
|
|
1047
|
-
* This source code is licensed under the MIT license found in the
|
|
1048
|
-
* LICENSE file in the root directory of this source tree.
|
|
1049
|
-
*/var Dy;function q_(){return Dy||(Dy=1,process.env.NODE_ENV!=="production"&&(function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=g();if(!f){var y=g();a(x,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=s({inst:{value:x,getSnapshot:g}});var w=y[0].inst,b=y[1];return c(function(){w.value=x,w.getSnapshot=g,r(w)&&b({inst:w})},[m,x,g]),l(function(){return r(w)&&b({inst:w}),m(function(){r(w)&&b({inst:w})})},[m]),d(x),x}function r(m){var g=m.getSnapshot;m=m.value;try{var x=g();return!a(m,x)}catch{return!0}}function n(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=v,a=typeof Object.is=="function"?Object.is:e,s=i.useState,l=i.useEffect,c=i.useLayoutEffect,d=i.useDebugValue,u=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;af.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),af}var _y;function QS(){return _y||(_y=1,process.env.NODE_ENV==="production"?nl.exports=K_():nl.exports=q_()),nl.exports}/**
|
|
1050
|
-
* @license React
|
|
1051
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
1052
|
-
*
|
|
1053
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1054
|
-
*
|
|
1055
|
-
* This source code is licensed under the MIT license found in the
|
|
1056
|
-
* LICENSE file in the root directory of this source tree.
|
|
1057
|
-
*/var By;function Y_(){if(By)return nf;By=1;var e=v,t=QS();function r(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return nf.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var g=a(null);if(g.current===null){var x={hasValue:!1,value:null};g.current=x}else x=g.current;g=l(function(){function w(S){if(!b){if(b=!0,E=S,S=h(S),m!==void 0&&x.hasValue){var O=x.value;if(m(O,S))return P=O}return P=S}if(O=P,n(E,S))return O;var k=h(S);return m!==void 0&&m(O,k)?(E=S,O):(E=S,P=k)}var b=!1,E,P,j=f===void 0?null:f;return[function(){return w(u())},j===null?void 0:function(){return w(j())}]},[u,f,h,m]);var y=i(d,g[0],g[1]);return s(function(){x.hasValue=!0,x.value=y},[y]),c(y),y},nf}var sf={};/**
|
|
1058
|
-
* @license React
|
|
1059
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
1060
|
-
*
|
|
1061
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1062
|
-
*
|
|
1063
|
-
* This source code is licensed under the MIT license found in the
|
|
1064
|
-
* LICENSE file in the root directory of this source tree.
|
|
1065
|
-
*/var $y;function G_(){return $y||($y=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=v,r=QS(),n=typeof Object.is=="function"?Object.is:e,i=r.useSyncExternalStore,a=t.useRef,s=t.useEffect,l=t.useMemo,c=t.useDebugValue;sf.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var g=a(null);if(g.current===null){var x={hasValue:!1,value:null};g.current=x}else x=g.current;g=l(function(){function w(S){if(!b){if(b=!0,E=S,S=h(S),m!==void 0&&x.hasValue){var O=x.value;if(m(O,S))return P=O}return P=S}if(O=P,n(E,S))return O;var k=h(S);return m!==void 0&&m(O,k)?(E=S,O):(E=S,P=k)}var b=!1,E,P,j=f===void 0?null:f;return[function(){return w(u())},j===null?void 0:function(){return w(j())}]},[u,f,h,m]);var y=i(d,g[0],g[1]);return s(function(){x.hasValue=!0,x.value=y},[y]),c(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),sf}var Ly;function X_(){return Ly||(Ly=1,process.env.NODE_ENV==="production"?rl.exports=Y_():rl.exports=G_()),rl.exports}var Z_=X_(),mm=v.createContext(null),Q_=e=>e,ot=()=>{var e=v.useContext(mm);return e?e.store.dispatch:Q_},Il=()=>{},J_=()=>Il,e6=(e,t)=>e===t;function Me(e){var t=v.useContext(mm);return Z_.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:J_,t?t.store.getState:Il,t?t.store.getState:Il,t?e:Il,e6)}var t6=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const i={};e(i)===i&&(n=!0)}catch{}if(n){let i;try{throw new Error}catch(a){({stack:i}=a)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
1066
|
-
\`createSelector([state => state.todos], todos => todos)\`
|
|
1067
|
-
This could lead to inefficient memoization and unnecessary re-renders.
|
|
1068
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},r6=(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.
|
|
1069
|
-
This means your output selector will likely run more frequently than intended.
|
|
1070
|
-
Avoid returning a new reference inside your input selector, e.g.
|
|
1071
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:s,stack:d})}},n6={inputStabilityCheck:"once",identityFunctionCheck:"once"};function i6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function o6(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function a6(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 zy=e=>Array.isArray(e)?e:[e];function s6(e){const t=Array.isArray(e[0])?e[0]:e;return a6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Fy(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var l6=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...n6,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:t6},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:r6}}},c6=class{constructor(e){this.value=e}deref(){return this.value}},u6=typeof WeakRef<"u"?WeakRef:c6,d6=0,Vy=1;function il(){return{s:d6,v:void 0,o:null,p:null}}function JS(e,t={}){let r=il();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 m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=l.o;g===null&&(l.o=g=new WeakMap);const x=g.get(m);x===void 0?(l=il(),g.set(m,l)):l=x}else{let g=l.p;g===null&&(l.p=g=new Map);const x=g.get(m);x===void 0?(l=il(),g.set(m,l)):l=x}}const d=l;let u;if(l.s===Vy)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 u6(u):u}return d.s=Vy,d.v=u,u}return s.clearCache=()=>{r=il(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function f6(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()),i6(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const u={...r,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:m=JS,argsMemoizeOptions:g=[],devModeChecks:x={}}=u,y=zy(h),w=zy(g),b=s6(i),E=f(function(){return a++,d.apply(null,arguments)},...y);let P=!0;const j=m(function(){s++;const O=Fy(b,arguments);if(l=E.apply(null,O),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:I}=l6(P,x);if(k.shouldRun&&k.run(d,O,l),I.shouldRun){const _=Fy(b,arguments);I.run({inputSelectorResults:O,inputSelectorResultsCopy:_},{memoize:f,memoizeOptions:y},arguments)}P&&(P=!1)}return l},...w);return Object.assign(j,{resultFunc:d,memoizedResultFunc:E,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var ee=f6(JS),p6=Object.assign((e,t=ee)=>{o6(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:()=>p6}),lf={},cf={},uf={},Hy;function h6(){return Hy||(Hy=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})(uf)),uf}var df={},ff={},Wy;function ej(){return Wy||(Wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ff)),ff}var Uy;function m6(){return Uy||(Uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ej(),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})(df)),df}var Ky;function g6(){return Ky||(Ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h6(),r=m6(),n=dm();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(m=>String(m));const d=(m,g)=>{let x=m;for(let y=0;y<g.length&&x!=null;++y)x=x[g[y]];return x},u=(m,g)=>g==null||m==null?g:typeof m=="object"&&"key"in m?Object.hasOwn(g,m.key)?g[m.key]:d(g,m.path):typeof m=="function"?m(g):Array.isArray(m)?d(g,m):typeof g=="object"?g[m]:g,f=s.map(m=>(Array.isArray(m)&&m.length===1&&(m=m[0]),m==null||typeof m=="function"||Array.isArray(m)||r.isKey(m)?m:{key:m,path:n.toPath(m)}));return a.map(m=>({original:m,criteria:f.map(g=>u(g,m))})).slice().sort((m,g)=>{for(let x=0;x<f.length;x++){const y=t.compareValues(m.criteria[x],g.criteria[x],l[x]);if(y!==0)return y}return 0}).map(m=>m.original)}e.orderBy=i})(cf)),cf}var pf={},qy;function v6(){return qy||(qy=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})(pf)),pf}var hf={},Yy;function tj(){return Yy||(Yy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XS(),r=hm(),n=HS(),i=US();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})(hf)),hf}var Gy;function y6(){return Gy||(Gy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g6(),r=v6(),n=tj();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})(lf)),lf}var mf,Xy;function x6(){return Xy||(Xy=1,mf=y6().sortBy),mf}var b6=x6();const Kc=jr(b6);var rj=e=>e.legend.settings,w6=e=>e.legend.size,C6=e=>e.legend.payload,S6=ee([C6,rj],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Kc(n,r):n});function j6(){return Me(S6)}var ol=1;function nj(){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)>ol||Math.abs(s.left-t.left)>ol||Math.abs(s.top-t.top)>ol||Math.abs(s.width-t.width)>ol)&&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 Zt(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",Zy=E6,gf=()=>Math.random().toString(36).substring(7).split("").join("."),P6={INIT:`@@redux/INIT${gf()}`,REPLACE:`@@redux/REPLACE${gf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${gf()}`},Ni=P6;function hs(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 O6(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(I6(e))return"date";if(T6(e))return"error";const r=k6(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 k6(e){return typeof e.constructor=="function"?e.constructor.name:null}function T6(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function I6(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ii(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=O6(e)),t}function ij(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Zt(2):`Expected the root reducer to be a function. Instead, received: '${ii(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Zt(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"?Zt(1):`Expected the enhancer to be a function. Instead, received: '${ii(r)}'`);return r(ij)(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"?Zt(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"?Zt(4):`Expected the listener to be a function. Instead, received: '${ii(y)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?Zt(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"?Zt(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(!hs(y))throw new Error(process.env.NODE_ENV==="production"?Zt(7):`Actions must be plain objects. Instead, the actual type was: '${ii(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"?Zt(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"?Zt(17):`Action "type" property must be a string. Instead, the actual type was: '${ii(y.type)}'. Value was: '${y.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?Zt(9):"Reducers may not dispatch actions.");try{c=!0,i=n(i,y)}finally{c=!1}return(a=s).forEach(b=>{b()}),y}function m(y){if(typeof y!="function")throw new Error(process.env.NODE_ENV==="production"?Zt(10):`Expected the nextReducer to be a function. Instead, received: '${ii(y)}`);n=y,h({type:Ni.REPLACE})}function g(){const y=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?Zt(11):`Expected the observer to be an object. Instead, received: '${ii(w)}'`);function b(){const P=w;P.next&&P.next(u())}return b(),{unsubscribe:y(b)}},[Zy](){return this}}}return h({type:Ni.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:m,[Zy]:g}}function Qy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function M6(e,t,r,n){const i=Object.keys(t),a=r&&r.type===Ni.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(!hs(e))return`The ${a} has unexpected type of "${ii(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===Ni.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 R6(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ni.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Zt(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:Ni.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Zt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Ni.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 oj(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"&&Qy(`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{R6(r)}catch(s){a=s}return function(l={},c){if(a)throw a;if(process.env.NODE_ENV!=="production"){const f=M6(l,r,c,i);f&&Qy(f)}let d=!1;const u={};for(let f=0;f<n.length;f++){const h=n[f],m=r[h],g=l[h],x=m(g,c);if(typeof x>"u"){const y=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?Zt(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!==g}return d=d||n.length!==Object.keys(l).length,d?u:l}}function Jl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function A6(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(process.env.NODE_ENV==="production"?Zt(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=Jl(...l)(i.dispatch),{...i,dispatch:a}}}function gm(e){return hs(e)&&"type"in e&&typeof e.type=="string"}var aj=Symbol.for("immer-nothing"),Jy=Symbol.for("immer-draftable"),Sr=Symbol.for("immer-state"),N6=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 ur(e,...t){if(process.env.NODE_ENV!=="production"){const r=N6[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 Ka=Object.getPrototypeOf;function zi(e){return!!e&&!!e[Sr]}function Nn(e){return e?sj(e)||Array.isArray(e)||!!e[Jy]||!!e.constructor?.[Jy]||ms(e)||Yc(e):!1}var D6=Object.prototype.constructor.toString(),ex=new WeakMap;function sj(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=ex.get(r);return n===void 0&&(n=Function.toString.call(r),ex.set(r,n)),n===D6}function ec(e,t,r=!0){qc(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 qc(e){const t=e[Sr];return t?t.type_:Array.isArray(e)?1:ms(e)?2:Yc(e)?3:0}function Hp(e,t){return qc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lj(e,t,r){const n=qc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function _6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ms(e){return e instanceof Map}function Yc(e){return e instanceof Set}function Pi(e){return e.copy_||e.base_}function Wp(e,t){if(ms(e))return new Map(e);if(Yc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=sj(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Sr];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(Ka(e),n)}else{const n=Ka(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function vm(e,t=!1){return Gc(e)||zi(e)||!Nn(e)||(qc(e)>1&&Object.defineProperties(e,{set:al,add:al,clear:al,delete:al}),Object.freeze(e),t&&Object.values(e).forEach(r=>vm(r,!0))),e}function B6(){ur(2)}var al={value:B6};function Gc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var $6={};function Fi(e){const t=$6[e];return t||ur(0,e),t}var qa;function cj(){return qa}function L6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tx(e,t){t&&(Fi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Up(e){Kp(e),e.drafts_.forEach(z6),e.drafts_=null}function Kp(e){e===qa&&(qa=e.parent_)}function rx(e){return qa=L6(qa,e)}function z6(e){const t=e[Sr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nx(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Sr].modified_&&(Up(t),ur(4)),Nn(e)&&(e=tc(t,e),t.parent_||rc(t,e)),t.patches_&&Fi("Patches").generateReplacementPatches_(r[Sr].base_,e,t.patches_,t.inversePatches_)):e=tc(t,r,[]),Up(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aj?e:void 0}function tc(e,t,r){if(Gc(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Sr];if(!i)return ec(t,(a,s)=>ix(e,i,t,a,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return rc(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),ec(s,(c,d)=>ix(e,i,a,c,d,r,l),n),rc(e,a,!1),r&&e.patches_&&Fi("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function ix(e,t,r,n,i,a,s){if(i==null||typeof i!="object"&&!s)return;const l=Gc(i);if(!(l&&!s)){if(process.env.NODE_ENV!=="production"&&i===r&&ur(5),zi(i)){const c=a&&t&&t.type_!==3&&!Hp(t.assigned_,n)?a.concat(n):void 0,d=tc(e,i,c);if(lj(r,n,d),zi(d))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Nn(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&l)return;tc(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(ms(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&rc(e,i)}}}function rc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vm(t,r)}function F6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:cj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=ym;r&&(i=[n],a=Ya);const{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,l}var ym={get(e,t){if(t===Sr)return e;const r=Pi(e);if(!Hp(r,t))return V6(e,r,t);const n=r[t];return e.finalized_||!Nn(n)?n:n===vf(e.base_,t)?(yf(e),e.copy_[t]=Yp(n,e)):n},has(e,t){return t in Pi(e)},ownKeys(e){return Reflect.ownKeys(Pi(e))},set(e,t,r){const n=uj(Pi(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=vf(Pi(e),t),a=i?.[Sr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(_6(r,i)&&(r!==void 0||Hp(e.base_,t)))return!0;yf(e),qp(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 vf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,yf(e),qp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Pi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return Ka(e.base_)},setPrototypeOf(){ur(12)}},Ya={};ec(ym,(e,t)=>{Ya[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ya.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ur(13),Ya.set.call(this,e,t,void 0)};Ya.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ur(14),ym.set.call(this,e[0],t,r,e[0])};function vf(e,t){const r=e[Sr];return(r?Pi(r):e)[t]}function V6(e,t,r){const n=uj(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function uj(e,t){if(!(t in e))return;let r=Ka(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ka(r)}}function qp(e){e.modified_||(e.modified_=!0,e.parent_&&qp(e.parent_))}function yf(e){e.copy_||(e.copy_=Wp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var H6=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"&&ur(6),n!==void 0&&typeof n!="function"&&ur(7);let i;if(Nn(t)){const a=rx(this),s=Yp(t,void 0);let l=!0;try{i=r(s),l=!1}finally{l?Up(a):Kp(a)}return tx(a,n),nx(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===aj&&(i=void 0),this.autoFreeze_&&vm(i,!0),n){const a=[],s=[];Fi("Patches").generateReplacementPatches_(t,i,a,s),n(a,s)}return i}else ur(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){Nn(e)||ur(8),zi(e)&&(e=In(e));const t=rx(this),r=Yp(e,void 0);return r[Sr].isManual_=!0,Kp(t),r}finishDraft(e,t){const r=e&&e[Sr];(!r||!r.isManual_)&&ur(9);const{scope_:n}=r;return tx(n,t),nx(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=Fi("Patches").applyPatches_;return zi(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Yp(e,t){const r=ms(e)?Fi("MapSet").proxyMap_(e,t):Yc(e)?Fi("MapSet").proxySet_(e,t):F6(e,t);return(t?t.scope_:cj()).drafts_.push(r),r}function In(e){return zi(e)||ur(10,e),dj(e)}function dj(e){if(!Nn(e)||Gc(e))return e;const t=e[Sr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Wp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Wp(e,!0);return ec(r,(i,a)=>{lj(r,i,dj(a))},n),t&&(t.finalized_=!1),r}var Gp=new H6,fj=Gp.produce,W6=Gp.setUseStrictIteration.bind(Gp);function pj(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var U6=pj(),K6=pj,q6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jl:Jl.apply(null,arguments)},Y6=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"?Ke(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=>gm(n)&&n.type===e,r}function G6(e){return typeof e=="function"&&"type"in e&&Y6(e)}function X6(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
1072
|
-
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 Z6(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=G6}=e;return()=>r=>n=>(t(n)&&console.warn(X6(n.type)),r(n))}function hj(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.
|
|
1073
|
-
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.
|
|
1074
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var mj=class ja extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ja.prototype)}static get[Symbol.species](){return ja}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ja(...t[0].concat(this)):new ja(...t.concat(this))}};function ox(e){return Nn(e)?fj(e,()=>{}):e}function sl(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Q6(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function J6(e,t,r){const n=gj(e,t,r);return{detectMutations(){return vj(e,t,n,r)}}}function gj(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]=gj(e,t,r[s],l))}}return a}function vj(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(g=>g instanceof RegExp?g.test(f):f===g))continue;const h=vj(e,t,r.children[u],n[u],l,f);if(h.wasMutated)return h}return{wasMutated:!1}}function eB(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 m=d.indexOf(this);~m?d.splice(m+1):d.push(this),~m?u.splice(m,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=Q6,ignoredPaths:i,warnAfter:a=32}=e;const s=J6.bind(null,n,i);return({getState:l})=>{let c=l(),d=s(c),u;return f=>h=>{const m=hj(a,"ImmutableStateInvariantMiddleware");m.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ke(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 g=f(h);return m.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ke(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)`)}),m.warnIfExceeded(),g}}}}function yj(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||hs(e)}function Xp(e,t="",r=yj,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(m=>m instanceof RegExp?m.test(f):f===m))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=Xp(u,f,r,n,i,a),s))return s}}return a&&xj(e)&&a.add(e),!1}function xj(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!xj(t))return!1;return!0}function tB(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=yj,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=>m=>{if(!gm(m))return h(m);const g=h(m),x=hj(s,"SerializableStateInvariantMiddleware");return!c&&!(n.length&&n.indexOf(m.type)!==-1)&&x.measureTime(()=>{const y=Xp(m,"",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,`
|
|
1075
|
-
Take a look at the logic that dispatched this action: `,m,`
|
|
1076
|
-
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
1077
|
-
(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=Xp(y,"",t,r,a,u);if(w){const{keyPath:b,value:E}=w;console.error(`A non-serializable value was detected in the state, in the path: \`${b}\`. Value:`,E,`
|
|
1078
|
-
Take a look at the reducer(s) handling this action type: ${m.type}.
|
|
1079
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),x.warnIfExceeded()),g}}}function ll(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 mj;if(r&&(ll(r)?s.push(U6):s.push(K6(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let l={};ll(n)||(l=n),s.unshift(eB(l))}if(i){let l={};ll(i)||(l=i),s.push(tB(l))}if(a){let l={};ll(a)||(l=a),s.unshift(Z6(l))}}return s},bj="RTK_autoBatch",Mt=()=>e=>({payload:e,meta:{[bj]:!0}}),ax=e=>t=>{setTimeout(t,e)},wj=(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:ax(10):e.type==="callback"?e.queueNotification:ax(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?.[bj],a=!i,a&&(s||(s=!0,c(d))),n.dispatch(u)}finally{i=!0}}})},nB=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new mj(e);return n&&i.push(wj(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(hs(r))c=oj(r);else throw new Error(process.env.NODE_ENV==="production"?Ke(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"?Ke(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"?Ke(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"?Ke(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"?Ke(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");x.add(y)})}let u=Jl;i&&(u=q6({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=A6(...d),h=nB(f);if(process.env.NODE_ENV!=="production"&&l&&typeof l!="function")throw new Error(process.env.NODE_ENV==="production"?Ke(5):"`enhancers` field must be a callback");let m=typeof l=="function"?l(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(m))throw new Error(process.env.NODE_ENV==="production"?Ke(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&m.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Ke(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!m.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const g=u(...m);return ij(c,s,g)}function Cj(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"?Ke(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Ke(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"?Ke(28):"`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error(process.env.NODE_ENV==="production"?Ke(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"?Ke(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"?Ke(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"?Ke(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}W6(!1);function oB(e){return typeof e=="function"}function aB(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Ke(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]=Cj(t),a;if(oB(e))a=()=>ox(e());else{const l=ox(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(zi(u)){const m=f(u,c);return m===void 0?u:m}else{if(Nn(u))return fj(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 sB="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",lB=(e=21)=>{let t="",r=e;for(;r--;)t+=sB[Math.random()*64|0];return t},cB=Symbol.for("rtk-slice-createasyncthunk");function uB(e,t){return`${e}/${t}`}function dB({creators:e}={}){const t=e?.asyncThunk?.[cB];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?Ke(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(pB()):n.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(E,P){const j=typeof E=="string"?E:E.type;if(!j)throw new Error(process.env.NODE_ENV==="production"?Ke(12):"`context.addCase` cannot be called with an empty action type");if(j in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Ke(13):"`context.addCase` cannot be called with two reducers for the same action type: "+j);return c.sliceCaseReducersByType[j]=P,d},addMatcher(E,P){return c.sliceMatchers.push({matcher:E,reducer:P}),d},exposeAction(E,P){return c.actionCreators[E]=P,d},exposeCaseReducer(E,P){return c.sliceCaseReducersByName[E]=P,d}};l.forEach(E=>{const P=s[E],j={reducerName:E,type:uB(i,E),createNotation:typeof n.reducers=="function"};mB(P)?vB(j,P,d,t):hB(j,P,d)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Ke(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[E={},P=[],j=void 0]=typeof n.extraReducers=="function"?Cj(n.extraReducers):[n.extraReducers],S={...E,...c.sliceCaseReducersByType};return aB(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);j&&O.addDefaultCase(j)})}const f=E=>E,h=new Map,m=new WeakMap;let g;function x(E,P){return g||(g=u()),g(E,P)}function y(){return g||(g=u()),g.getInitialState()}function w(E,P=!1){function j(O){let k=O[E];if(typeof k>"u"){if(P)k=sl(m,j,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ke(15):"selectSlice returned undefined for an uninjected slice reducer")}return k}function S(O=f){const k=sl(h,P,()=>new WeakMap);return sl(k,O,()=>{const I={};for(const[_,$]of Object.entries(n.selectors??{}))I[_]=fB($,O,()=>sl(m,O,y),P);return I})}return{reducerPath:E,getSelectors:S,get selectors(){return S(j)},selectSlice:j}}const b={name:i,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...w(a),injectInto(E,{reducerPath:P,...j}={}){const S=P??a;return E.inject({reducerPath:S,reducer:x},j),{...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"?Ke(16):"selectState returned undefined for an uninjected slice reducer")}return e(l,...s)}return i.unwrapped=e,i}var fr=dB();function pB(){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&&!gB(n))throw new Error(process.env.NODE_ENV==="production"?Ke(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 mB(e){return e._reducerDefinitionType==="asyncThunk"}function gB(e){return e._reducerDefinitionType==="reducerWithPrepare"}function vB({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Ke(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||cl,pending:l||cl,rejected:c||cl,settled:d||cl})}function cl(){}var yB="task",Sj="listener",jj="completed",xm="cancelled",xB=`task-${xm}`,bB=`task-${jj}`,Zp=`${Sj}-${xm}`,wB=`${Sj}-${jj}`,Xc=class{constructor(e){this.code=e,this.message=`${yB} ${xm} (reason: ${e})`}name="TaskAbortError";message},bm=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Ke(32):`${t} is not a function`)},nc=()=>{},Ej=(e,t=nc)=>(e.catch(t),e),Pj=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Di=(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))},_i=e=>{if(e.aborted){const{reason:t}=e;throw new Xc(t)}};function Oj(e,t){let r=nc;return new Promise((n,i)=>{const a=()=>i(new Xc(e.reason));if(e.aborted){a();return}r=Pj(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=nc})}var CB=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Xc?"cancelled":"rejected",error:r}}finally{t?.()}},ic=e=>t=>Ej(Oj(e,t).then(r=>(_i(e),r))),kj=e=>{const t=ic(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:vo}=Object,sx={},gs="listenerMiddleware",SB=(e,t)=>{const r=n=>Pj(e,()=>Di(n,e.reason));return(n,i)=>{bm(n,"taskExecutor");const a=new AbortController;r(a);const s=CB(async()=>{_i(e),_i(a.signal);const l=await n({pause:ic(a.signal),delay:kj(a.signal),signal:a.signal});return _i(a.signal),l},()=>Di(a,bB));return i?.autoJoin&&t.push(s.catch(nc)),{result:ic(e)(s),cancel(){Di(a,xB)}}}},jB=(e,t)=>{const r=async(n,i)=>{_i(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 Oj(t,Promise.race(l));return _i(t),c}finally{a()}};return(n,i)=>Ej(r(n,i))},Tj=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"?Ke(21):"Creating or removing a listener requires one of the known fields for matching an action");return bm(a,"options.listener"),{predicate:i,type:t,effect:a}},Ij=vo(e=>{const{type:t,predicate:r,effect:n}=Tj(e);return{id:lB(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Ke(22):"Unsubscribe not initialized")}}},{withTypes:()=>Ij}),lx=(e,t)=>{const{type:r,effect:n,predicate:i}=Tj(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Qp=e=>{e.pending.forEach(t=>{Di(t,Zp)})},EB=(e,t)=>()=>{for(const r of t.keys())Qp(r);e.clear()},cx=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Mj=vo(_r(`${gs}/add`),{withTypes:()=>Mj}),PB=_r(`${gs}/removeAll`),Rj=vo(_r(`${gs}/remove`),{withTypes:()=>Rj}),OB=(...e)=>{console.error(`${gs}/error`,...e)},vs=(e={})=>{const t=new Map,r=new Map,n=m=>{const g=r.get(m)??0;r.set(m,g+1)},i=m=>{const g=r.get(m)??1;g===1?r.delete(m):r.set(m,g-1)},{extra:a,onError:s=OB}=e;bm(s,"onError");const l=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),g=>{m.unsubscribe(),g?.cancelActive&&Qp(m)}),c=m=>{const g=lx(t,m)??Ij(m);return l(g)};vo(c,{withTypes:()=>c});const d=m=>{const g=lx(t,m);return g&&(g.unsubscribe(),m.cancelActive&&Qp(g)),!!g};vo(d,{withTypes:()=>d});const u=async(m,g,x,y)=>{const w=new AbortController,b=jB(c,w.signal),E=[];try{m.pending.add(w),n(m),await Promise.resolve(m.effect(g,vo({},x,{getOriginalState:y,condition:(P,j)=>b(P,j).then(Boolean),take:b,delay:kj(w.signal),pause:ic(w.signal),extra:a,signal:w.signal,fork:SB(w.signal,E),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((P,j,S)=>{P!==w&&(Di(P,Zp),S.delete(P))})},cancel:()=>{Di(w,Zp),m.pending.delete(w)},throwIfCancelled:()=>{_i(w.signal)}})))}catch(P){P instanceof Xc||cx(s,P,{raisedBy:"effect"})}finally{await Promise.all(E),Di(w,wB),i(m),m.pending.delete(w)}},f=EB(t,r);return{middleware:m=>g=>x=>{if(!gm(x))return g(x);if(Mj.match(x))return c(x.payload);if(PB.match(x)){f();return}if(Rj.match(x))return d(x.payload);let y=m.getState();const w=()=>{if(y===sx)throw new Error(process.env.NODE_ENV==="production"?Ke(23):`${gs}: getOriginalState can only be called synchronously`);return y};let b;try{if(b=g(x),t.size>0){const E=m.getState(),P=Array.from(t.values());for(const j of P){let S=!1;try{S=j.predicate(x,E,y)}catch(O){S=!1,cx(s,O,{raisedBy:"predicate"})}S&&u(j,x,m,w)}}}finally{y=sx}return b},startListening:c,stopListening:d,clearListeners:f}};function Ke(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 kB={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Aj=fr({name:"chartLayout",initialState:kB,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:TB,setLayout:IB,setChartSize:MB,setScale:RB}=Aj.actions,AB=Aj.reducer;function Nj(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ux(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 po(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ux(Object(r),!0).forEach(function(n){NB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ux(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NB(e,t,r){return(t=DB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DB(e){var t=_B(e,"string");return typeof t=="symbol"?t:t+""}function _B(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 Ut(e)||Ut(t)?r:mn(t)?Li(e,t,r):typeof t=="function"?t(e):r}var BB=(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"&&Re(e[a]))return po(po({},e),{},{[a]:e[a]+(n||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&s!=="middle"&&Re(e[s]))return po(po({},e),{},{[s]:e[s]+(i||0)})}return e},Yi=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",Dj=(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},_j=(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:m}=e;if(!s)return null;var g=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=i==="category"&&s.bandwidth?s.bandwidth()/g:0;if(x=m==="angleAxis"&&a&&a.length>=2?Ht(a[0]-a[1])*2*x:x,f||h){var y=(f||h||[]).map((w,b)=>{var E=n?n.indexOf(w):w;return{coordinate:s(E)+x,value:w,offset:x,index:b}});return y.filter(w=>!Qr(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}))},dx=1e-4,$B=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-dx,a=Math.max(n[0],n[1])+dx,s=e(t[0]),l=e(t[r-1]);(s<i||s>a||l<i||l>a)&&e.domain([t[0],t[r-1]])}},LB=(e,t)=>{if(!t||t.length!==2||!Re(t[0])||!Re(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(!Re(e[0])||e[0]<r)&&(i[0]=r),(!Re(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},zB=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=Qr(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])}},FB=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=Qr(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)}},VB={sign:zB,expand:qD,none:ko,silhouette:YD,wiggle:GD,positive:FB},HB=(e,t,r)=>{var n=VB[r],i=KD().keys(t).value((a,s)=>Number(ht(a,s,0))).order(Fp).offset(n);return i(e)};function WB(e){return e==null?void 0:String(e)}var fx=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 Ut(l)?null:t.scale(l)-i/2+n},UB=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]},KB=e=>{var t=e.flat(2).filter(Re);return[Math.min(...t),Math.max(...t)]},qB=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],YB=(e,t,r)=>{if(e!=null)return qB(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:s}=a,l=s.reduce((c,d)=>{var u=Nj(d,t,r),f=KB(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]))},px=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hx=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oc=(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=Kc(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 mx(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return po(po({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Zc(e,t){if(e)return String(e);if(typeof t=="string")return t}var GB=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},XB=(e,t)=>t==="centric"?e.angle:e.radius,Fn=e=>e.layout.width,Vn=e=>e.layout.height,ZB=e=>e.layout.scale,Bj=e=>e.layout.margin,Qc=ee(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Jc=ee(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),$j="data-recharts-item-index",Lj="data-recharts-item-data-key",ys=60;function gx(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 ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gx(Object(r),!0).forEach(function(n){QB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QB(e,t,r){return(t=JB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JB(e){var t=e3(e,"string");return typeof t=="symbol"?t:t+""}function e3(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 t3=e=>e.brush.height;function r3(e){var t=Jc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ys;return r+i}return r},0)}function n3(e){var t=Jc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ys;return r+i}return r},0)}function i3(e){var t=Qc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function o3(e){var t=Qc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Dt=ee([Fn,Vn,Bj,t3,r3,n3,i3,o3,rj,w6],(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=ul(ul({},f),u),m=h.bottom;h.bottom+=n,h=BB(h,c,d);var g=e-h.left-h.right,x=t-h.top-h.bottom;return ul(ul({brushBottom:m},h),{},{width:Math.max(g,0),height:Math.max(x,0)})}),a3=ee(Dt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),wm=ee(Fn,Vn,(e,t)=>({x:0,y:0,width:e,height:t})),s3=v.createContext(null),pr=()=>v.useContext(s3)!=null,eu=e=>e.brush,tu=ee([eu,Dt,Bj],(e,t,r)=>({height:e.height,x:Re(e.x)?e.x:t.left,y:Re(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Re(e.width)?e.width:t.width})),xf={},bf={},wf={},vx;function l3(){return vx||(vx=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 m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},n)},g=()=>{h!==null&&(clearTimeout(h),h=null)},x=()=>{g(),s=void 0,l=null},y=()=>{u()},w=function(...b){if(i?.aborted)return;s=this,l=b;const E=h==null;m(),c&&E&&u()};return w.schedule=m,w.cancel=x,w.flush=y,i?.addEventListener("abort",x,{once:!0}),w}e.debounce=t})(wf)),wf}var yx;function c3(){return yx||(yx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l3();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}),m=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)},g=()=>(h.flush(),u);return m.cancel=h.cancel,m.flush=g,m}e.debounce=r})(bf)),bf}var xx;function u3(){return xx||(xx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c3();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})(xf)),xf}var Cf,bx;function d3(){return bx||(bx=1,Cf=u3().throttle),Cf}var f3=d3();const p3=jr(f3);var h3=process.env.NODE_ENV!=="production",ac=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(h3&&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++]))}},zj=(e,t,r)=>{var{width:n="100%",height:i="100%",aspect:a,maxHeight:s}=r,l=An(n)?e:Number(n),c=An(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),s&&c!=null&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},m3={width:0,height:0,overflow:"visible"},g3={width:0,overflowX:"visible"},v3={height:0,overflowY:"visible"},y3={},x3=e=>{var{width:t,height:r}=e,n=An(t),i=An(r);return n&&i?m3:n?g3:i?v3:y3};function b3(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 Ct(e){return Number.isFinite(e)}function gn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Jp(){return Jp=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},Jp.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 Cx(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){w3(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 w3(e,t,r){return(t=C3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C3(e){var t=S3(e,"string");return typeof t=="symbol"?t:t+""}function S3(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 Fj=v.createContext({width:-1,height:-1});function j3(e){return gn(e.width)&&gn(e.height)}function Vj(e){var{children:t,width:r,height:n}=e,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return j3(i)?C.createElement(Fj.Provider,{value:i},t):null}var Cm=()=>v.useContext(Fj),E3=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:m,style:g={}}=e,x=v.useRef(null),y=v.useRef();y.current=m,v.useImperativeHandle(t,()=>x.current);var[w,b]=v.useState({containerWidth:n.width,containerHeight:n.height}),E=v.useCallback((k,I)=>{b(_=>{var $=Math.round(k),R=Math.round(I);return _.containerWidth===$&&_.containerHeight===R?_:{containerWidth:$,containerHeight:R}})},[]);v.useEffect(()=>{if(x.current==null||typeof ResizeObserver>"u")return qi;var k=R=>{var z,{width:F,height:M}=R[0].contentRect;E(F,M),(z=y.current)===null||z===void 0||z.call(y,F,M)};u>0&&(k=p3(k,u,{trailing:!0,leading:!1}));var I=new ResizeObserver(k),{width:_,height:$}=x.current.getBoundingClientRect();return E(_,$),I.observe(x.current),()=>{I.disconnect()}},[E,u]);var{containerWidth:P,containerHeight:j}=w;ac(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:O}=zj(P,j,{width:i,height:a,aspect:r,maxHeight:c});return ac(S!=null&&S>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
1080
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
1081
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
1082
|
-
height and width.`,S,O,i,a,s,l,r),C.createElement("div",{id:f?"".concat(f):void 0,className:Je("recharts-responsive-container",h),style:Cx(Cx({},g),{},{width:i,height:a,minWidth:s,minHeight:l,maxHeight:c}),ref:x},C.createElement("div",{style:x3({width:i,height:a})},C.createElement(Vj,{width:S,height:O},d)))}),dl=v.forwardRef((e,t)=>{var r=Cm();if(gn(r.width)&&gn(r.height))return e.children;var{width:n,height:i}=b3({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=zj(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Re(a)&&Re(s)?C.createElement(Vj,{width:a,height:s},e.children):C.createElement(E3,Jp({},e,{width:n,height:i,ref:t}))});function Hj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var ru=()=>{var e,t=pr(),r=Me(a3),n=Me(tu),i=(e=Me(eu))===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}},P3={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Wj=()=>{var e;return(e=Me(Dt))!==null&&e!==void 0?e:P3},Sm=()=>Me(Fn),jm=()=>Me(Vn),O3=()=>Me(e=>e.layout.margin),Ue=e=>e.layout.layoutType,nu=()=>Me(Ue),k3=()=>{var e=nu();return e!==void 0},iu=e=>{var t=ot(),r=pr(),{width:n,height:i}=e,a=Cm(),s=n,l=i;return a&&(s=a.width>0?a.width:n,l=a.height>0?a.height:i),v.useEffect(()=>{!r&&gn(s)&&gn(l)&&t(MB({width:s,height:l}))},[t,r,s,l]),null},T3={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Uj=fr({name:"legend",initialState:T3,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:Mt()},removeLegendPayload:{reducer(e,t){var r=In(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Mt()}}}),{setLegendSize:Sx,setLegendSettings:I3,addLegendPayload:Kj,removeLegendPayload:qj}=Uj.actions,M3=Uj.reducer,R3=["contextPayload"];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 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 To(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){A3(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 A3(e,t,r){return(t=N3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N3(e){var t=D3(e,"string");return typeof t=="symbol"?t:t+""}function D3(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 _3(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 $3(e){return e.value}function L3(e){var{contextPayload:t}=e,r=_3(e,R3),n=ZS(t,e.payloadUniqBy,$3),i=To(To({},r),{},{payload:n});return C.isValidElement(e.content)?C.cloneElement(e.content,i):typeof e.content=="function"?C.createElement(e.content,i):C.createElement(P_,i)}function z3(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}),To(To({},d),u)}function F3(e){var t=ot();return v.useEffect(()=>{t(I3(e))},[t,e]),null}function V3(e){var t=ot();return v.useEffect(()=>(t(Sx(e)),()=>{t(Sx({width:0,height:0}))}),[t,e]),null}function H3(e,t,r,n){return e==="vertical"&&Re(t)?{height:t}:e==="horizontal"?{width:r||n}:null}var W3={align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Yj(e){var t=Kt(e,W3),r=j6(),n=gD(),i=O3(),{width:a,height:s,wrapperStyle:l,portal:c}=t,[d,u]=nj([r]),f=Sm(),h=jm();if(f==null||h==null)return null;var m=f-(i?.left||0)-(i?.right||0),g=H3(t.layout,s,a,m),x=c?l:To(To({position:"absolute",width:g?.width||a||"auto",height:g?.height||s||"auto"},z3(l,t,i,f,h,d)),l),y=c??n;if(y==null||r==null)return null;var w=C.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:u},C.createElement(F3,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),C.createElement(V3,{width:d.width,height:d.height}),C.createElement(L3,eh({},t,g,{margin:i,chartWidth:f,chartHeight:h,contextPayload:r})));return xo.createPortal(w,y)}Yj.displayName="Legend";function th(){return th=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},th.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 Sf(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){U3(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 U3(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=q3(e,"string");return typeof t=="symbol"?t:t+""}function q3(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 Y3(e){return Array.isArray(e)&&mn(e[0])&&mn(e[1])?e.join(" ~ "):e}var G3=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,m=()=>{if(a&&a.length){var j={padding:0,margin:0},S=(l?Kc(a,l):a).map((O,k)=>{if(O.type==="none")return null;var I=O.formatter||s||Y3,{value:_,name:$}=O,R=_,z=$;if(I){var F=I(_,$,O,k,a);if(Array.isArray(F))[R,z]=F;else if(F!=null)R=F;else return null}var M=Sf({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:M},mn(z)?C.createElement("span",{className:"recharts-tooltip-item-name"},z):null,mn(z)?C.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,C.createElement("span",{className:"recharts-tooltip-item-value"},R),C.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:j},S)}return null},g=Sf({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),x=Sf({margin:0},i),y=!Ut(u),w=y?u:"",b=Je("recharts-default-tooltip",c),E=Je("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",th({className:b,style:g},P),C.createElement("p",{className:E,style:x},C.isValidElement(w)?w:"".concat(w)),m())},ga="recharts-tooltip-wrapper",X3={visibility:"hidden"};function Z3(e){var{coordinate:t,translateX:r,translateY:n}=e;return Je(ga,{["".concat(ga,"-right")]:Re(r)&&t&&Re(t.x)&&r>=t.x,["".concat(ga,"-left")]:Re(r)&&t&&Re(t.x)&&r<t.x,["".concat(ga,"-bottom")]:Re(n)&&t&&Re(t.y)&&n>=t.y,["".concat(ga,"-top")]:Re(n)&&t&&Re(t.y)&&n<t.y})}function Px(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:s,tooltipDimension:l,viewBox:c,viewBoxDimension:d}=e;if(a&&Re(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 m=u,g=h;return m<g?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 Q3(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 J3(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=Px({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=Px({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=Q3({translateX:u,translateY:f,useTranslate3d:l})):d=X3,{cssProperties:d,cssClasses:Z3({translateX:u,translateY:f,coordinate:r})}}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 fl(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){rh(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 rh(e,t,r){return(t=e5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e5(e){var t=t5(e,"string");return typeof t=="symbol"?t:t+""}function t5(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 r5 extends v.PureComponent{constructor(){super(...arguments),rh(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),rh(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:m,wrapperStyle:g,lastBoundingBox:x,innerRef:y,hasPortalFromProps:w}=this.props,{cssClasses:b,cssProperties:E}=J3({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:d,position:u,reverseDirection:f,tooltipBox:{height:x.height,width:x.width},useTranslate3d:h,viewBox:m}),P=w?{}:fl(fl({transition:c&&t?"transform ".concat(n,"ms ").concat(i):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),j=fl(fl({},P),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},g);return C.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:j,ref:y},a)}}var n5=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Gi={devToolsEnabled:!1,isSsr:n5()},Gj=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function nh(){return nh=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},nh.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 Tx(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){i5(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 i5(e,t,r){return(t=o5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o5(e){var t=a5(e,"string");return typeof t=="symbol"?t:t+""}function a5(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 Ix={curveBasisClosed:DD,curveBasisOpen:_D,curveBasis:ND,curveBumpX:bD,curveBumpY:wD,curveLinearClosed:BD,curveLinear:Wc,curveMonotoneX:$D,curveMonotoneY:LD,curveNatural:zD,curveStep:FD,curveStepAfter:HD,curveStepBefore:VD},sc=e=>Ct(e.x)&&Ct(e.y),Mx=e=>e.base!=null&&sc(e.base)&&sc(e),va=e=>e.x,ya=e=>e.y,s5=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(fs(e));return(r==="curveMonotone"||r==="curveBump")&&t?Ix["".concat(r).concat(t==="vertical"?"Y":"X")]:Ix[r]||Wc},l5=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,s=s5(t,i),l=a?r.filter(sc):r,c;if(Array.isArray(n)){var d=r.map((m,g)=>Tx(Tx({},m),{},{base:n[g]}));i==="vertical"?c=tl().y(ya).x1(va).x0(m=>m.base.x):c=tl().x(va).y1(ya).y0(m=>m.base.y);var u=c.defined(Mx).curve(s),f=a?d.filter(Mx):d;return u(f)}i==="vertical"&&Re(n)?c=tl().y(ya).x1(va).x0(n):Re(n)?c=tl().x(va).y1(ya).y0(n):c=OS().x(va).y(ya);var h=c.defined(sc).curve(s);return h(l)},Em=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?l5(e):n;return C.createElement("path",nh({},Zr(e),p_(e),{className:Je("recharts-curve",t),d:a===null?void 0:a,ref:i}))},c5=["x","y","top","left","width","height","className"];function ih(){return ih=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},ih.apply(null,arguments)}function Rx(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 u5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rx(Object(r),!0).forEach(function(n){d5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d5(e,t,r){return(t=f5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f5(e){var t=p5(e,"string");return typeof t=="symbol"?t:t+""}function p5(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 h5(e,t){if(e==null)return{};var r,n,i=m5(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 m5(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 g5=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),v5=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=h5(e,c5),d=u5({x:t,y:r,top:n,left:i,width:a,height:s},c);return!Re(t)||!Re(r)||!Re(a)||!Re(s)||!Re(n)||!Re(i)?null:C.createElement("path",ih({},Dr(d),{className:Je("recharts-cross",l),d:g5(t,r,a,s,n,i)}))};function y5(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 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 Nx(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){x5(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 x5(e,t,r){return(t=b5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b5(e){var t=w5(e,"string");return typeof t=="symbol"?t:t+""}function w5(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 C5=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Xj=(e,t,r)=>e.map(n=>"".concat(C5(n)," ").concat(t,"ms ").concat(r)).join(","),S5=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Ga=(e,t)=>Object.keys(t).reduce((r,n)=>Nx(Nx({},r),{},{[n]:e(n,t[n])}),{});function Dx(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 It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dx(Object(r),!0).forEach(function(n){j5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j5(e,t,r){return(t=E5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E5(e){var t=P5(e,"string");return typeof t=="symbol"?t:t+""}function P5(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 lc=(e,t,r)=>e+(t-e)*r,oh=e=>{var{from:t,to:r}=e;return t!==r},Zj=(e,t,r)=>{var n=Ga((i,a)=>{if(oh(a)){var[s,l]=e(a.from,a.to,a.velocity);return It(It({},a),{},{from:s,velocity:l})}return a},t);return r<1?Ga((i,a)=>oh(a)?It(It({},a),{},{velocity:lc(a.velocity,n[i].velocity,r),from:lc(a.from,n[i].from,r)}):a,t):Zj(e,n,r-1)};function O5(e,t,r,n,i,a){var s,l=n.reduce((h,m)=>It(It({},h),{},{[m]:{from:e[m],velocity:0,to:t[m]}}),{}),c=()=>Ga((h,m)=>m.from,l),d=()=>!Object.values(l).filter(oh).length,u=null,f=h=>{s||(s=h);var m=h-s,g=m/r.dt;l=Zj(r,l,g),i(It(It(It({},e),t),c())),s=h,d()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{var h;(h=u)===null||h===void 0||h()})}function k5(e,t,r,n,i,a,s){var l=null,c=i.reduce((f,h)=>It(It({},f),{},{[h]:[e[h],t[h]]}),{}),d,u=f=>{d||(d=f);var h=(f-d)/n,m=Ga((x,y)=>lc(...y,r(h)),c);if(a(It(It(It({},e),t),m)),h<1)l=s.setTimeout(u);else{var g=Ga((x,y)=>lc(...y,r(1)),c);a(It(It(It({},e),t),g))}};return()=>(l=s.setTimeout(u),()=>{var f;(f=l)===null||f===void 0||f()})}const T5=(e,t,r,n,i,a)=>{var s=S5(e,t);return r==null?()=>(i(It(It({},e),t)),()=>{}):r.isStepper===!0?O5(e,t,r,s,i,a):k5(e,t,r,n,s,i,a)};var cc=1e-4,Qj=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Jj=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),_x=(e,t)=>r=>{var n=Qj(e,t);return Jj(n,r)},I5=(e,t)=>r=>{var n=Qj(e,t),i=[...n.map((a,s)=>a*s).slice(1),0];return Jj(i,r)},M5=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i,a=r[0].split("(");if(a[0]==="cubic-bezier"&&((i=a[1])===null||i===void 0?void 0:i.split(")")[0].split(",").length)===4){var s=a[1].split(")")[0].split(",").map(l=>parseFloat(l));return[s[0],s[1],s[2],s[3]]}}}return r.length===4?r:[0,0,1,1]},R5=(e,t,r,n)=>{var i=_x(e,r),a=_x(t,n),s=I5(e,r),l=d=>d>1?1:d<0?0:d,c=d=>{for(var u=d>1?1:d,f=u,h=0;h<8;++h){var m=i(f)-u,g=s(f);if(Math.abs(m-u)<cc||g<cc)return a(f);f=l(f-m/g)}return a(f)};return c.isStepper=!1,c},Bx=function(){return R5(...M5(...arguments))},A5=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)<cc&&Math.abs(f)<cc?[l,0]:[h,f]};return a.isStepper=!0,a.dt=i,a},N5=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Bx(e);case"spring":return A5();default:if(e.split("(")[0]==="cubic-bezier")return Bx(e)}return typeof e=="function"?e:null};function D5(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 _5{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),()=>{i!=null&&cancelAnimationFrame(i)}}}function B5(){return D5(new _5)}var $5=v.createContext(B5);function L5(e,t){var r=v.useContext($5);return v.useMemo(()=>t??r(e),[e,t,r])}var z5={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},$x={t:0},jf={t:1};function ou(e){var t=Kt(e,z5),{isActive:r,canBegin:n,duration:i,easing:a,begin:s,onAnimationEnd:l,onAnimationStart:c,children:d}=t,u=L5(t.animationId,t.animationManager),[f,h]=v.useState(r?$x:jf),m=v.useRef(null);return v.useEffect(()=>{r||h(jf)},[r]),v.useEffect(()=>{if(!r||!n)return qi;var g=T5($x,jf,N5(a),i,h,u.getTimeoutController()),x=()=>{m.current=g()};return u.start([c,s,x,i,l]),()=>{u.stop(),m.current&&m.current(),l()}},[r,n,i,a,s,c,l,u]),d(f.t)}function au(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Ua(t)),n=v.useRef(e);return n.current!==e&&(r.current=Ua(t),n.current=e),r.current}var F5=["radius"],V5=["radius"];function Lx(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 zx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lx(Object(r),!0).forEach(function(n){H5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H5(e,t,r){return(t=W5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W5(e){var t=U5(e,"string");return typeof t=="symbol"?t:t+""}function U5(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 uc(){return uc=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},uc.apply(null,arguments)}function Fx(e,t){if(e==null)return{};var r,n,i=K5(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 K5(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 Vx=(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,`,
|
|
1083
|
-
`).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,`,
|
|
1084
|
-
`).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,`,
|
|
1085
|
-
`).concat(e,",").concat(t+n-s*u[3])),d+="Z"}else if(a>0&&i===+i&&i>0){var m=Math.min(a,i);d="M ".concat(e,",").concat(t+s*m,`
|
|
1086
|
-
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+l*m,",").concat(t,`
|
|
1087
|
-
L `).concat(e+r-l*m,",").concat(t,`
|
|
1088
|
-
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+r,",").concat(t+s*m,`
|
|
1089
|
-
L `).concat(e+r,",").concat(t+n-s*m,`
|
|
1090
|
-
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+r-l*m,",").concat(t+n,`
|
|
1091
|
-
L `).concat(e+l*m,",").concat(t+n,`
|
|
1092
|
-
A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e,",").concat(t+n-s*m," Z")}else d="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return d},Hx={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},e2=e=>{var t=Kt(e,Hx),r=v.useRef(null),[n,i]=v.useState(-1);v.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var D=r.current.getTotalLength();D&&i(D)}catch{}},[]);var{x:a,y:s,width:l,height:c,radius:d,className:u}=t,{animationEasing:f,animationDuration:h,animationBegin:m,isAnimationActive:g,isUpdateAnimationActive:x}=t,y=v.useRef(l),w=v.useRef(c),b=v.useRef(a),E=v.useRef(s),P=v.useMemo(()=>({x:a,y:s,width:l,height:c,radius:d}),[a,s,l,c,d]),j=au(P,"rectangle-");if(a!==+a||s!==+s||l!==+l||c!==+c||l===0||c===0)return null;var S=Je("recharts-rectangle",u);if(!x){var O=Dr(t),k=Fx(O,F5);return C.createElement("path",uc({},k,{radius:typeof d=="number"?d:void 0,className:S,d:Vx(a,s,l,c,d)}))}var I=y.current,_=w.current,$=b.current,R=E.current,z="0px ".concat(n===-1?1:n,"px"),F="".concat(n,"px 0px"),M=Xj(["strokeDasharray"],h,typeof f=="string"?f:Hx.animationEasing);return C.createElement(ou,{animationId:j,key:j,canBegin:n>0,duration:h,easing:f,isActive:x,begin:m},D=>{var A=Tt(I,l,D),T=Tt(_,c,D),N=Tt($,a,D),U=Tt(R,s,D);r.current&&(y.current=A,w.current=T,b.current=N,E.current=U);var H;g?D>0?H={transition:M,strokeDasharray:F}:H={strokeDasharray:z}:H={strokeDasharray:F};var V=Dr(t),K=Fx(V,V5);return C.createElement("path",uc({},K,{radius:typeof d=="number"?d:void 0,className:S,d:Vx(N,U,A,T,d),ref:r,style:zx(zx({},H),t.style)}))})};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 Ux(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){q5(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 q5(e,t,r){return(t=Y5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y5(e){var t=G5(e,"string");return typeof t=="symbol"?t:t+""}function G5(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 dc=Math.PI/180,X5=e=>e*180/Math.PI,Pt=(e,t,r,n)=>({x:e+Math.cos(-dc*n)*r,y:t+Math.sin(-dc*n)*r}),t2=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},Z5=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},Q5=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,s=Z5({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:X5(c),angleInRadian:c}},J5=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}},e$=(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},t$=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:i,angle:a}=Q5({x:r,y:n},t),{innerRadius:s,outerRadius:l}=t;if(i<s||i>l||i===0)return null;var{startAngle:c,endAngle:d}=J5(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?Ux(Ux({},t),{},{radius:i,angle:e$(u,t)}):null};function r2(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,s=Pt(t,r,n,i),l=Pt(t,r,n,a);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function ah(){return ah=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},ah.apply(null,arguments)}var r$=(e,t)=>{var r=Ht(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},pl=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:s,cornerRadius:l,cornerIsExternal:c}=e,d=l*(s?1:-1)+n,u=Math.asin(l/d)/dc,f=c?i:i+a*u,h=Pt(t,r,d,f),m=Pt(t,r,n,f),g=c?i-a*u:i,x=Pt(t,r,d*Math.cos(u*dc),g);return{center:h,circleTangency:m,lineTangency:x,theta:u}},n2=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:s}=e,l=r$(a,s),c=a+l,d=Pt(t,r,i,a),u=Pt(t,r,i,c),f="M ".concat(d.x,",").concat(d.y,`
|
|
1093
|
-
A `).concat(i,",").concat(i,`,0,
|
|
1094
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(a>c),`,
|
|
1095
|
-
`).concat(u.x,",").concat(u.y,`
|
|
1096
|
-
`);if(n>0){var h=Pt(t,r,n,a),m=Pt(t,r,n,c);f+="L ".concat(m.x,",").concat(m.y,`
|
|
1097
|
-
A `).concat(n,",").concat(n,`,0,
|
|
1098
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`,
|
|
1099
|
-
`).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(t,",").concat(r," Z");return f},n$=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}=e,u=Ht(d-c),{circleTangency:f,lineTangency:h,theta:m}=pl({cx:t,cy:r,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:l}),{circleTangency:g,lineTangency:x,theta:y}=pl({cx:t,cy:r,radius:i,angle:d,sign:-u,cornerRadius:a,cornerIsExternal:l}),w=l?Math.abs(c-d):Math.abs(c-d)-m-y;if(w<0)return s?"M ".concat(h.x,",").concat(h.y,`
|
|
1100
|
-
a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
|
|
1101
|
-
a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
|
|
1102
|
-
`):n2({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:c,endAngle:d});var b="M ".concat(h.x,",").concat(h.y,`
|
|
1103
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,`
|
|
1104
|
-
A`).concat(i,",").concat(i,",0,").concat(+(w>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,`
|
|
1105
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,`
|
|
1106
|
-
`);if(n>0){var{circleTangency:E,lineTangency:P,theta:j}=pl({cx:t,cy:r,radius:n,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),{circleTangency:S,lineTangency:O,theta:k}=pl({cx:t,cy:r,radius:n,angle:d,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),I=l?Math.abs(c-d):Math.abs(c-d)-j-k;if(I<0&&a===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+="L".concat(O.x,",").concat(O.y,`
|
|
1107
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,`
|
|
1108
|
-
A`).concat(n,",").concat(n,",0,").concat(+(I>180),",").concat(+(u>0),",").concat(E.x,",").concat(E.y,`
|
|
1109
|
-
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},i$={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},i2=e=>{var t=Kt(e,i$),{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=Je("recharts-sector",f),m=a-i,g=tr(s,m,0,!0),x;return g>0&&Math.abs(d-u)<360?x=n$({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:u}):x=n2({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:d,endAngle:u}),C.createElement("path",ah({},Dr(t),{className:h,d:x}))};function o$(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(FS(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:s,angle:l}=t,c=Pt(n,i,a,l),d=Pt(n,i,s,l);return[{x:c.x,y:c.y},{x:d.x,y:d.y}]}return r2(t)}}var Ef={},Pf={},Of={},Kx;function a$(){return Kx||(Kx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ej();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Of)),Of}var qx;function s$(){return qx||(qx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a$();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})(Pf)),Pf}var Yx;function l$(){return Yx||(Yx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tj(),r=s$();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})(Ef)),Ef}var kf,Gx;function c$(){return Gx||(Gx=1,kf=l$().range),kf}var u$=c$();const o2=jr(u$);function di(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d$(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Pm(e){let t,r,n;e.length!==2?(t=di,r=(l,c)=>di(e(l),c),n=(l,c)=>e(l)-c):(t=e===di||e===d$?e:f$,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 f$(){return 0}function a2(e){return e===null?NaN:+e}function*p$(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const h$=Pm(di),xs=h$.right;Pm(a2).center;class Xx extends Map{constructor(t,r=v$){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(Zx(this,t))}has(t){return super.has(Zx(this,t))}set(t,r){return super.set(m$(this,t),r)}delete(t){return super.delete(g$(this,t))}}function Zx({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function m$({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function g$({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function v$(e){return e!==null&&typeof e=="object"?e.valueOf():e}function y$(e=di){if(e===di)return s2;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 s2(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const x$=Math.sqrt(50),b$=Math.sqrt(10),w$=Math.sqrt(2);function fc(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>=x$?10:a>=b$?5:a>=w$?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?fc(e,t,r*2):[l,c,d]}function sh(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?fc(t,e,r):fc(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 lh(e,t,r){return t=+t,e=+e,r=+r,fc(e,t,r)[2]}function ch(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?lh(t,e,r):lh(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Qx(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Jx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function l2(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?s2:y$(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),m=Math.max(r,Math.floor(t-d*f/c+h)),g=Math.min(n,Math.floor(t+(c-d)*f/c+h));l2(e,t,m,g,i)}const a=e[t];let s=r,l=n;for(xa(e,r,t),i(e[n],a)>0&&xa(e,r,n);s<l;){for(xa(e,s,l),++s,--l;i(e[s],a)<0;)++s;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?xa(e,r,l):(++l,xa(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function xa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C$(e,t,r){if(e=Float64Array.from(p$(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Jx(e);if(t>=1)return Qx(e);var n,i=(n-1)*t,a=Math.floor(i),s=Qx(l2(e,a).subarray(0,a+1)),l=Jx(e.subarray(a+1));return s+(l-s)*(i-a)}}function S$(e,t,r=a2){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 j$(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 Fr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Hn(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 uh=Symbol("implicit");function Om(){var e=new Xx,t=[],r=[],n=uh;function i(a){let s=e.get(a);if(s===void 0){if(n!==uh)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 Xx;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 Om(t,r).unknown(n)},Fr.apply(i,arguments),i}function km(){var e=Om().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,m=i<n,g=m?i:n,x=m?n:i;a=(x-g)/Math.max(1,h-c+d*2),l&&(a=Math.floor(a)),g+=(x-g-a*(h-c))*u,s=a*(1-c),l&&(g=Math.round(g),s=Math.round(s));var y=j$(h).map(function(w){return g+a*w});return r(m?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 km(t(),[n,i]).round(l).paddingInner(c).paddingOuter(d).align(u)},Fr.apply(f(),arguments)}function c2(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return c2(t())},e}function E$(){return c2(km.apply(null,arguments).paddingInner(1))}function Tm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function u2(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function bs(){}var Xa=.7,pc=1/Xa,yo="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",P$=/^#([0-9a-f]{3,8})$/,O$=new RegExp(`^rgb\\(${yo},${yo},${yo}\\)$`),k$=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),T$=new RegExp(`^rgba\\(${yo},${yo},${yo},${Za}\\)$`),I$=new RegExp(`^rgba\\(${dn},${dn},${dn},${Za}\\)$`),M$=new RegExp(`^hsl\\(${Za},${dn},${dn}\\)$`),R$=new RegExp(`^hsla\\(${Za},${dn},${dn},${Za}\\)$`),eb={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};Tm(bs,Qa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tb,formatHex:tb,formatHex8:A$,formatHsl:N$,formatRgb:rb,toString:rb});function tb(){return this.rgb().formatHex()}function A$(){return this.rgb().formatHex8()}function N$(){return d2(this).formatHsl()}function rb(){return this.rgb().formatRgb()}function Qa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=P$.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?nb(t):r===3?new dr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?hl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?hl(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 dr(t[1],t[2],t[3],1):(t=k$.exec(e))?new dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=T$.exec(e))?hl(t[1],t[2],t[3],t[4]):(t=I$.exec(e))?hl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=M$.exec(e))?ab(t[1],t[2]/100,t[3]/100,1):(t=R$.exec(e))?ab(t[1],t[2]/100,t[3]/100,t[4]):eb.hasOwnProperty(e)?nb(eb[e]):e==="transparent"?new dr(NaN,NaN,NaN,0):null}function nb(e){return new dr(e>>16&255,e>>8&255,e&255,1)}function hl(e,t,r,n){return n<=0&&(e=t=r=NaN),new dr(e,t,r,n)}function D$(e){return e instanceof bs||(e=Qa(e)),e?(e=e.rgb(),new dr(e.r,e.g,e.b,e.opacity)):new dr}function dh(e,t,r,n){return arguments.length===1?D$(e):new dr(e,t,r,n??1)}function dr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Tm(dr,dh,u2(bs,{brighter(e){return e=e==null?pc:Math.pow(pc,e),new dr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xa:Math.pow(Xa,e),new dr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dr(Bi(this.r),Bi(this.g),Bi(this.b),hc(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:ib,formatHex:ib,formatHex8:_$,formatRgb:ob,toString:ob}));function ib(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function _$(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function ob(){const e=hc(this.opacity);return`${e===1?"rgb(":"rgba("}${Bi(this.r)}, ${Bi(this.g)}, ${Bi(this.b)}${e===1?")":`, ${e})`}`}function hc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Bi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Bi(e),(e<16?"0":"")+e.toString(16)}function ab(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Gr(e,t,r,n)}function d2(e){if(e instanceof Gr)return new Gr(e.h,e.s,e.l,e.opacity);if(e instanceof bs||(e=Qa(e)),!e)return new Gr;if(e instanceof Gr)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 Gr(s,l,c,e.opacity)}function B$(e,t,r,n){return arguments.length===1?d2(e):new Gr(e,t,r,n??1)}function Gr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Tm(Gr,B$,u2(bs,{brighter(e){return e=e==null?pc:Math.pow(pc,e),new Gr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xa:Math.pow(Xa,e),new Gr(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 dr(Tf(e>=240?e-240:e+120,i,n),Tf(e,i,n),Tf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Gr(sb(this.h),ml(this.s),ml(this.l),hc(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=hc(this.opacity);return`${e===1?"hsl(":"hsla("}${sb(this.h)}, ${ml(this.s)*100}%, ${ml(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sb(e){return e=(e||0)%360,e<0?e+360:e}function ml(e){return Math.max(0,Math.min(1,e||0))}function Tf(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 Im=e=>()=>e;function $$(e,t){return function(r){return e+r*t}}function L$(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 z$(e){return(e=+e)==1?f2:function(t,r){return r-t?L$(t,r,e):Im(isNaN(t)?r:t)}}function f2(e,t){var r=t-e;return r?$$(e,r):Im(isNaN(e)?t:e)}const lb=(function e(t){var r=z$(t);function n(i,a){var s=r((i=dh(i)).r,(a=dh(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),d=f2(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 F$(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 V$(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function H$(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]=Fo(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 W$(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function mc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function U$(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]=Fo(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var fh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,If=new RegExp(fh.source,"g");function K$(e){return function(){return e}}function q$(e){return function(t){return e(t)+""}}function Y$(e,t){var r=fh.lastIndex=If.lastIndex=0,n,i,a,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=fh.exec(e))&&(i=If.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:mc(n,i)})),r=If.lastIndex;return r<t.length&&(a=t.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?c[0]?q$(c[0].x):K$(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 Fo(e,t){var r=typeof t,n;return t==null||r==="boolean"?Im(t):(r==="number"?mc:r==="string"?(n=Qa(t))?(t=n,lb):Y$:t instanceof Qa?lb:t instanceof Date?W$:V$(t)?F$:Array.isArray(t)?H$:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?U$:mc)(e,t)}function Mm(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function G$(e,t){t===void 0&&(t=e,e=Fo);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 X$(e){return function(){return e}}function gc(e){return+e}var cb=[0,1];function ir(e){return e}function ph(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:X$(isNaN(t)?NaN:.5)}function Z$(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Q$(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=ph(i,n),a=r(s,a)):(n=ph(n,i),a=r(a,s)),function(l){return a(n(l))}}function J$(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]=ph(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(l){var c=xs(e,l,1,n)-1;return a[c](i[c](l))}}function ws(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function su(){var e=cb,t=cb,r=Fo,n,i,a,s=ir,l,c,d;function u(){var h=Math.min(e.length,t.length);return s!==ir&&(s=Z$(e[0],e[h-1])),l=h>2?J$:Q$,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),mc)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,gc),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=Mm,u()},f.clamp=function(h){return arguments.length?(s=h?!0:ir,u()):s!==ir},f.interpolate=function(h){return arguments.length?(r=h,u()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,m){return n=h,i=m,u()}}function Rm(){return su()(ir,ir)}function e4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vc(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 Io(e){return e=vc(Math.abs(e)),e?e[1]:NaN}function t4(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 r4(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var n4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ja(e){if(!(t=n4.exec(e)))throw new Error("invalid format: "+e);var t;return new Am({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]})}Ja.prototype=Am.prototype;function Am(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+""}Am.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 i4(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 p2;function o4(e,t){var r=vc(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(p2=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")+vc(e,Math.max(0,t+a-1))[0]}function ub(e,t){var r=vc(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 db={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:e4,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)=>ub(e*100,t),r:ub,s:o4,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fb(e){return e}var pb=Array.prototype.map,hb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function a4(e){var t=e.grouping===void 0||e.thousands===void 0?fb:t4(pb.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?fb:r4(pb.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=Ja(f);var h=f.fill,m=f.align,g=f.sign,x=f.symbol,y=f.zero,w=f.width,b=f.comma,E=f.precision,P=f.trim,j=f.type;j==="n"?(b=!0,j="g"):db[j]||(E===void 0&&(E=12),P=!0,j="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var S=x==="$"?r:x==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",O=x==="$"?n:/[%p]/.test(j)?s:"",k=db[j],I=/[defgprs%]/.test(j);E=E===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function _($){var R=S,z=O,F,M,D;if(j==="c")z=k($)+z,$="";else{$=+$;var A=$<0||1/$<0;if($=isNaN($)?c:k(Math.abs($),E),P&&($=i4($)),A&&+$==0&&g!=="+"&&(A=!1),R=(A?g==="("?g:l:g==="-"||g==="("?"":g)+R,z=(j==="s"?hb[8+p2/3]:"")+z+(A&&g==="("?")":""),I){for(F=-1,M=$.length;++F<M;)if(D=$.charCodeAt(F),48>D||D>57){z=(D===46?i+$.slice(F+1):$.slice(F))+z,$=$.slice(0,F);break}}}b&&!y&&($=t($,1/0));var T=R.length+$.length+z.length,N=T<w?new Array(w-T+1).join(h):"";switch(b&&y&&($=t(N+$,N.length?w-z.length:1/0),N=""),m){case"<":$=R+$+z+N;break;case"=":$=R+N+$+z;break;case"^":$=N.slice(0,T=N.length>>1)+R+$+z+N.slice(T);break;default:$=N+R+$+z;break}return a($)}return _.toString=function(){return f+""},_}function u(f,h){var m=d((f=Ja(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Io(h)/3)))*3,x=Math.pow(10,-g),y=hb[8+g/3];return function(w){return m(x*w)+y}}return{format:d,formatPrefix:u}}var gl,Nm,h2;s4({thousands:",",grouping:[3],currency:["$",""]});function s4(e){return gl=a4(e),Nm=gl.format,h2=gl.formatPrefix,gl}function l4(e){return Math.max(0,-Io(Math.abs(e)))}function c4(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Io(t)/3)))*3-Io(Math.abs(e)))}function u4(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Io(t)-Io(e))+1}function m2(e,t,r,n){var i=ch(e,t,r),a;switch(n=Ja(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=c4(i,s))&&(n.precision=a),h2(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=u4(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=l4(i))&&(n.precision=a-(n.type==="%")*2);break}}return Nm(n)}function gi(e){var t=e.domain;return e.ticks=function(r){var n=t();return sh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return m2(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=lh(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 g2(){var e=Rm();return e.copy=function(){return ws(e,g2())},Fr.apply(e,arguments),gi(e)}function v2(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,gc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return v2(e).unknown(t)},e=arguments.length?Array.from(e,gc):[0,1],gi(r)}function y2(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 mb(e){return Math.log(e)}function gb(e){return Math.exp(e)}function d4(e){return-Math.log(-e)}function f4(e){return-Math.exp(-e)}function p4(e){return isFinite(e)?+("1e"+e):e<0?0:e}function h4(e){return e===10?p4:e===Math.E?Math.exp:t=>Math.pow(e,t)}function m4(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 vb(e){return(t,r)=>-e(-t,r)}function Dm(e){const t=e(mb,gb),r=t.domain;let n=10,i,a;function s(){return i=m4(n),a=h4(n),r()[0]<0?(i=vb(i),a=vb(a),e(d4,f4)):e(mb,gb),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),m=i(u),g,x;const y=l==null?10:+l;let w=[];if(!(n%1)&&m-h<y){if(h=Math.floor(h),m=Math.ceil(m),d>0){for(;h<=m;++h)for(g=1;g<n;++g)if(x=h<0?g/a(-h):g*a(h),!(x<d)){if(x>u)break;w.push(x)}}else for(;h<=m;++h)for(g=n-1;g>=1;--g)if(x=h>0?g/a(-h):g*a(h),!(x<d)){if(x>u)break;w.push(x)}w.length*2<y&&(w=sh(d,u,y))}else w=sh(h,m,Math.min(m-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=Ja(c)).precision==null&&(c.trim=!0),c=Nm(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(y2(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function x2(){const e=Dm(su()).domain([1,10]);return e.copy=()=>ws(e,x2()).base(e.base()),Fr.apply(e,arguments),e}function yb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function xb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _m(e){var t=1,r=e(yb(t),xb(t));return r.constant=function(n){return arguments.length?e(yb(t=+n),xb(t)):t},gi(r)}function b2(){var e=_m(su());return e.copy=function(){return ws(e,b2()).constant(e.constant())},Fr.apply(e,arguments)}function bb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function g4(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function v4(e){return e<0?-e*e:e*e}function Bm(e){var t=e(ir,ir),r=1;function n(){return r===1?e(ir,ir):r===.5?e(g4,v4):e(bb(r),bb(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},gi(t)}function $m(){var e=Bm(su());return e.copy=function(){return ws(e,$m()).exponent(e.exponent())},Fr.apply(e,arguments),e}function y4(){return $m.apply(null,arguments).exponent(.5)}function wb(e){return Math.sign(e)*e*e}function x4(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function w2(){var e=Rm(),t=[0,1],r=!1,n;function i(a){var s=x4(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(wb(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,gc)).map(wb)),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 w2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Fr.apply(i,arguments),gi(i)}function C2(){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]=S$(e,s/l);return a}function a(s){return s==null||isNaN(s=+s)?n:t[xs(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(di),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 C2().domain(e).range(t).unknown(n)},Fr.apply(a,arguments)}function S2(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[xs(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 S2().domain([e,t]).range(i).unknown(a)},Fr.apply(gi(s),arguments)}function j2(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[xs(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 j2().domain(e).range(t).unknown(r)},Fr.apply(i,arguments)}const Mf=new Date,Rf=new Date;function _t(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=>_t(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)=>(Mf.setTime(+a),Rf.setTime(+s),e(Mf),e(Rf),Math.floor(r(Mf,Rf))),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 hh=_t(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?_t(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):hh);const On=1e3,Ar=On*60,kn=Ar*60,Dn=kn*24,Lm=Dn*7,Cb=Dn*30,Af=Dn*365,ho=_t(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*On)},(e,t)=>(t-e)/On,e=>e.getUTCSeconds()),E2=_t(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*On)},(e,t)=>{e.setTime(+e+t*Ar)},(e,t)=>(t-e)/Ar,e=>e.getMinutes()),P2=_t(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ar)},(e,t)=>(t-e)/Ar,e=>e.getUTCMinutes()),O2=_t(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*On-e.getMinutes()*Ar)},(e,t)=>{e.setTime(+e+t*kn)},(e,t)=>(t-e)/kn,e=>e.getHours()),k2=_t(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*kn)},(e,t)=>(t-e)/kn,e=>e.getUTCHours()),lu=_t(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ar)/Dn,e=>e.getDate()-1),zm=_t(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Dn,e=>e.getUTCDate()-1),b4=_t(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Dn,e=>Math.floor(e/Dn));function Xi(e){return _t(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())*Ar)/Lm)}const Fm=Xi(0),mh=Xi(1);Xi(2);Xi(3);const es=Xi(4);Xi(5);Xi(6);function Zi(e){return _t(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)/Lm)}const Vm=Zi(0),gh=Zi(1);Zi(2);Zi(3);const ts=Zi(4);Zi(5);Zi(6);const T2=_t(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()),I2=_t(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()),fi=_t(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());fi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:_t(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 pi=_t(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());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:_t(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 M2(e,t,r,n,i,a){const s=[[ho,1,On],[ho,5,5*On],[ho,15,15*On],[ho,30,30*On],[a,1,Ar],[a,5,5*Ar],[a,15,15*Ar],[a,30,30*Ar],[i,1,kn],[i,3,3*kn],[i,6,6*kn],[i,12,12*kn],[n,1,Dn],[n,2,2*Dn],[r,1,Lm],[t,1,Cb],[t,3,3*Cb],[e,1,Af]];function l(d,u,f){const h=u<d;h&&([d,u]=[u,d]);const m=f&&typeof f.range=="function"?f:c(d,u,f),g=m?m.range(d,+u+1):[];return h?g.reverse():g}function c(d,u,f){const h=Math.abs(u-d)/f,m=Pm(([,,y])=>y).right(s,h);if(m===s.length)return e.every(ch(d/Af,u/Af,f));if(m===0)return hh.every(Math.max(ch(d,u,f),1));const[g,x]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return g.every(x)}return[l,c]}const[w4,C4]=M2(pi,I2,Vm,b4,k2,P2),[S4,j4]=M2(fi,T2,Fm,lu,O2,E2);function Nf(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 Df(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 ba(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function E4(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=wa(i),u=Ca(i),f=wa(a),h=Ca(a),m=wa(s),g=Ca(s),x=wa(l),y=Ca(l),w=wa(c),b=Ca(c),E={a:A,A:T,b:N,B:U,c:null,d:kb,e:kb,f:Y4,g:i8,G:a8,H:U4,I:K4,j:q4,L:R2,m:G4,M:X4,p:H,q:V,Q:Mb,s:Rb,S:Z4,u:Q4,U:J4,V:e8,w:t8,W:r8,x:null,X:null,y:n8,Y:o8,Z:s8,"%":Ib},P={a:K,A:oe,b:pe,B:ve,c:null,d:Tb,e:Tb,f:d8,g:w8,G:S8,H:l8,I:c8,j:u8,L:N2,m:f8,M:p8,p:Ce,q:Pe,Q:Mb,s:Rb,S:h8,u:m8,U:g8,V:v8,w:y8,W:x8,x:null,X:null,y:b8,Y:C8,Z:j8,"%":Ib},j={a:_,A:$,b:R,B:z,c:F,d:Pb,e:Pb,f:F4,g:Eb,G:jb,H:Ob,I:Ob,j:B4,L:z4,m:_4,M:$4,p:I,q:D4,Q:H4,s:W4,S:L4,u:I4,U:M4,V:R4,w:T4,W:A4,x:M,X:D,y:Eb,Y:jb,Z:N4,"%":V4};E.x=S(r,E),E.X=S(n,E),E.c=S(t,E),P.x=S(r,P),P.X=S(n,P),P.c=S(t,P);function S(J,ye){return function(me){var L=[],ae=-1,q=0,ue=J.length,he,we,je;for(me instanceof Date||(me=new Date(+me));++ae<ue;)J.charCodeAt(ae)===37&&(L.push(J.slice(q,ae)),(we=Sb[he=J.charAt(++ae)])!=null?he=J.charAt(++ae):we=he==="e"?" ":"0",(je=ye[he])&&(he=je(me,we)),L.push(he),q=ae+1);return L.push(J.slice(q,ae)),L.join("")}}function O(J,ye){return function(me){var L=ba(1900,void 0,1),ae=k(L,J,me+="",0),q,ue;if(ae!=me.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(ye&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(q=Df(ba(L.y,0,1)),ue=q.getUTCDay(),q=ue>4||ue===0?gh.ceil(q):gh(q),q=zm.offset(q,(L.V-1)*7),L.y=q.getUTCFullYear(),L.m=q.getUTCMonth(),L.d=q.getUTCDate()+(L.w+6)%7):(q=Nf(ba(L.y,0,1)),ue=q.getDay(),q=ue>4||ue===0?mh.ceil(q):mh(q),q=lu.offset(q,(L.V-1)*7),L.y=q.getFullYear(),L.m=q.getMonth(),L.d=q.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),ue="Z"in L?Df(ba(L.y,0,1)).getUTCDay():Nf(ba(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(ue+5)%7:L.w+L.U*7-(ue+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Df(L)):Nf(L)}}function k(J,ye,me,L){for(var ae=0,q=ye.length,ue=me.length,he,we;ae<q;){if(L>=ue)return-1;if(he=ye.charCodeAt(ae++),he===37){if(he=ye.charAt(ae++),we=j[he in Sb?ye.charAt(ae++):he],!we||(L=we(J,me,L))<0)return-1}else if(he!=me.charCodeAt(L++))return-1}return L}function I(J,ye,me){var L=d.exec(ye.slice(me));return L?(J.p=u.get(L[0].toLowerCase()),me+L[0].length):-1}function _(J,ye,me){var L=m.exec(ye.slice(me));return L?(J.w=g.get(L[0].toLowerCase()),me+L[0].length):-1}function $(J,ye,me){var L=f.exec(ye.slice(me));return L?(J.w=h.get(L[0].toLowerCase()),me+L[0].length):-1}function R(J,ye,me){var L=w.exec(ye.slice(me));return L?(J.m=b.get(L[0].toLowerCase()),me+L[0].length):-1}function z(J,ye,me){var L=x.exec(ye.slice(me));return L?(J.m=y.get(L[0].toLowerCase()),me+L[0].length):-1}function F(J,ye,me){return k(J,t,ye,me)}function M(J,ye,me){return k(J,r,ye,me)}function D(J,ye,me){return k(J,n,ye,me)}function A(J){return s[J.getDay()]}function T(J){return a[J.getDay()]}function N(J){return c[J.getMonth()]}function U(J){return l[J.getMonth()]}function H(J){return i[+(J.getHours()>=12)]}function V(J){return 1+~~(J.getMonth()/3)}function K(J){return s[J.getUTCDay()]}function oe(J){return a[J.getUTCDay()]}function pe(J){return c[J.getUTCMonth()]}function ve(J){return l[J.getUTCMonth()]}function Ce(J){return i[+(J.getUTCHours()>=12)]}function Pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var ye=S(J+="",E);return ye.toString=function(){return J},ye},parse:function(J){var ye=O(J+="",!1);return ye.toString=function(){return J},ye},utcFormat:function(J){var ye=S(J+="",P);return ye.toString=function(){return J},ye},utcParse:function(J){var ye=O(J+="",!0);return ye.toString=function(){return J},ye}}}var Sb={"-":"",_:" ",0:"0"},qt=/^\s*\d+/,P4=/^%/,O4=/[\\^$*+?|[\]().{}]/g;function We(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 k4(e){return e.replace(O4,"\\$&")}function wa(e){return new RegExp("^(?:"+e.map(k4).join("|")+")","i")}function Ca(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function T4(e,t,r){var n=qt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function I4(e,t,r){var n=qt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function M4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function R4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function A4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function jb(e,t,r){var n=qt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Eb(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function N4(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 D4(e,t,r){var n=qt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function _4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Pb(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function B4(e,t,r){var n=qt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Ob(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function L4(e,t,r){var n=qt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function z4(e,t,r){var n=qt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function F4(e,t,r){var n=qt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function V4(e,t,r){var n=P4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function H4(e,t,r){var n=qt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function W4(e,t,r){var n=qt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function kb(e,t){return We(e.getDate(),t,2)}function U4(e,t){return We(e.getHours(),t,2)}function K4(e,t){return We(e.getHours()%12||12,t,2)}function q4(e,t){return We(1+lu.count(fi(e),e),t,3)}function R2(e,t){return We(e.getMilliseconds(),t,3)}function Y4(e,t){return R2(e,t)+"000"}function G4(e,t){return We(e.getMonth()+1,t,2)}function X4(e,t){return We(e.getMinutes(),t,2)}function Z4(e,t){return We(e.getSeconds(),t,2)}function Q4(e){var t=e.getDay();return t===0?7:t}function J4(e,t){return We(Fm.count(fi(e)-1,e),t,2)}function A2(e){var t=e.getDay();return t>=4||t===0?es(e):es.ceil(e)}function e8(e,t){return e=A2(e),We(es.count(fi(e),e)+(fi(e).getDay()===4),t,2)}function t8(e){return e.getDay()}function r8(e,t){return We(mh.count(fi(e)-1,e),t,2)}function n8(e,t){return We(e.getFullYear()%100,t,2)}function i8(e,t){return e=A2(e),We(e.getFullYear()%100,t,2)}function o8(e,t){return We(e.getFullYear()%1e4,t,4)}function a8(e,t){var r=e.getDay();return e=r>=4||r===0?es(e):es.ceil(e),We(e.getFullYear()%1e4,t,4)}function s8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+We(t/60|0,"0",2)+We(t%60,"0",2)}function Tb(e,t){return We(e.getUTCDate(),t,2)}function l8(e,t){return We(e.getUTCHours(),t,2)}function c8(e,t){return We(e.getUTCHours()%12||12,t,2)}function u8(e,t){return We(1+zm.count(pi(e),e),t,3)}function N2(e,t){return We(e.getUTCMilliseconds(),t,3)}function d8(e,t){return N2(e,t)+"000"}function f8(e,t){return We(e.getUTCMonth()+1,t,2)}function p8(e,t){return We(e.getUTCMinutes(),t,2)}function h8(e,t){return We(e.getUTCSeconds(),t,2)}function m8(e){var t=e.getUTCDay();return t===0?7:t}function g8(e,t){return We(Vm.count(pi(e)-1,e),t,2)}function D2(e){var t=e.getUTCDay();return t>=4||t===0?ts(e):ts.ceil(e)}function v8(e,t){return e=D2(e),We(ts.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function y8(e){return e.getUTCDay()}function x8(e,t){return We(gh.count(pi(e)-1,e),t,2)}function b8(e,t){return We(e.getUTCFullYear()%100,t,2)}function w8(e,t){return e=D2(e),We(e.getUTCFullYear()%100,t,2)}function C8(e,t){return We(e.getUTCFullYear()%1e4,t,4)}function S8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ts(e):ts.ceil(e),We(e.getUTCFullYear()%1e4,t,4)}function j8(){return"+0000"}function Ib(){return"%"}function Mb(e){return+e}function Rb(e){return Math.floor(+e/1e3)}var vl,_2,B2;E8({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 E8(e){return vl=E4(e),_2=vl.format,B2=vl.utcFormat,vl}function P8(e){return new Date(e)}function O8(e){return e instanceof Date?+e:+new Date(+e)}function Hm(e,t,r,n,i,a,s,l,c,d){var u=Rm(),f=u.invert,h=u.domain,m=d(".%L"),g=d(":%S"),x=d("%I:%M"),y=d("%I %p"),w=d("%a %d"),b=d("%b %d"),E=d("%B"),P=d("%Y");function j(S){return(c(S)<S?m:l(S)<S?g:s(S)<S?x:a(S)<S?y:n(S)<S?i(S)<S?w:b:r(S)<S?E: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(P8)},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?j: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(y2(O,S)):u},u.copy=function(){return ws(u,Hm(e,t,r,n,i,a,s,l,c,d))},u}function k8(){return Fr.apply(Hm(S4,j4,fi,T2,Fm,lu,O2,E2,ho,_2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function T8(){return Fr.apply(Hm(w4,C4,pi,I2,Vm,zm,k2,P2,ho,B2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cu(){var e=0,t=1,r,n,i,a,s=ir,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 m,g;return arguments.length?([m,g]=h,s=f(m,g),d):[s(0),s(1)]}}return d.range=u(Fo),d.rangeRound=u(Mm),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 vi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function $2(){var e=gi(cu()(ir));return e.copy=function(){return vi(e,$2())},Hn.apply(e,arguments)}function L2(){var e=Dm(cu()).domain([1,10]);return e.copy=function(){return vi(e,L2()).base(e.base())},Hn.apply(e,arguments)}function z2(){var e=_m(cu());return e.copy=function(){return vi(e,z2()).constant(e.constant())},Hn.apply(e,arguments)}function Wm(){var e=Bm(cu());return e.copy=function(){return vi(e,Wm()).exponent(e.exponent())},Hn.apply(e,arguments)}function I8(){return Wm.apply(null,arguments).exponent(.5)}function F2(){var e=[],t=ir;function r(n){if(n!=null&&!isNaN(n=+n))return t((xs(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(di),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)=>C$(e,a/n))},r.copy=function(){return F2(t).domain(e)},Hn.apply(r,arguments)}function uu(){var e=0,t=.5,r=1,n=1,i,a,s,l,c,d=ir,u,f=!1,h;function m(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))}m.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,m):[e,t,r]},m.clamp=function(x){return arguments.length?(f=!!x,m):f},m.interpolator=function(x){return arguments.length?(d=x,m):d};function g(x){return function(y){var w,b,E;return arguments.length?([w,b,E]=y,d=G$(x,[w,b,E]),m):[d(0),d(.5),d(1)]}}return m.range=g(Fo),m.rangeRound=g(Mm),m.unknown=function(x){return arguments.length?(h=x,m):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,m}}function V2(){var e=gi(uu()(ir));return e.copy=function(){return vi(e,V2())},Hn.apply(e,arguments)}function H2(){var e=Dm(uu()).domain([.1,1,10]);return e.copy=function(){return vi(e,H2()).base(e.base())},Hn.apply(e,arguments)}function W2(){var e=_m(uu());return e.copy=function(){return vi(e,W2()).constant(e.constant())},Hn.apply(e,arguments)}function Um(){var e=Bm(uu());return e.copy=function(){return vi(e,Um()).exponent(e.exponent())},Hn.apply(e,arguments)}function M8(){return Um.apply(null,arguments).exponent(.5)}const Ea=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:km,scaleDiverging:V2,scaleDivergingLog:H2,scaleDivergingPow:Um,scaleDivergingSqrt:M8,scaleDivergingSymlog:W2,scaleIdentity:v2,scaleImplicit:uh,scaleLinear:g2,scaleLog:x2,scaleOrdinal:Om,scalePoint:E$,scalePow:$m,scaleQuantile:C2,scaleQuantize:S2,scaleRadial:w2,scaleSequential:$2,scaleSequentialLog:L2,scaleSequentialPow:Wm,scaleSequentialQuantile:F2,scaleSequentialSqrt:I8,scaleSequentialSymlog:z2,scaleSqrt:y4,scaleSymlog:b2,scaleThreshold:j2,scaleTime:k8,scaleUtc:T8,tickFormat:m2},Symbol.toStringTag,{value:"Module"}));var yi=e=>e.chartData,Km=ee([yi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),qm=(e,t,r,n)=>n?Km(e):yi(e);function Vi(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ct(t)&&Ct(r))return!0}return!1}function Ab(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function U2(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Ct(r))i=r;else if(typeof r=="function")return;if(Ct(n))a=n;else if(typeof n=="function")return;var s=[i,a];if(Vi(s))return s}}function R8(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Vi(n))return Ab(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(Re(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&px.test(i)){var c=px.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(Re(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t?.[1]))}catch{}else if(typeof a=="string"&&hx.test(a)){var u=hx.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(Vi(h))return t==null?h:Ab(h,t,r)}}}var Vo=1e9,A8={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Gm,dt=!0,Br="[DecimalError] ",$i=Br+"Invalid argument: ",Ym=Br+"Exponent out of range: ",Ho=Math.floor,Oi=Math.pow,N8=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Cr,Vt=1e7,at=7,K2=9007199254740991,yc=Ho(K2/at),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)*at;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 Mn(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,r=t.constructor;return rt(Mn(t,new r(e),0,1),r.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return Ot(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(Cr))throw Error(Br+"NaN");if(r.s<1)throw Error(Br+(r.s?"NaN":"-Infinity"));return r.eq(Cr)?new n(0):(dt=!1,t=Mn(rs(r,a),rs(e,a),a),dt=!0,rt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?G2(t,e):q2(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(Br+"NaN");return r.s?(dt=!1,t=Mn(r,e,0,1).times(e),dt=!0,r.minus(t)):rt(new n(r),i)};Oe.naturalExponential=Oe.exp=function(){return Y2(this)};Oe.naturalLogarithm=Oe.ln=function(){return rs(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?q2(t,e):G2(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($i+e);if(t=Ot(i)+1,n=i.d.length-1,r=n*at+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(Br+"NaN")}for(e=Ot(l),dt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=cn(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ho((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(Mn(l,a,s+2)).times(.5),cn(a.d).slice(0,s)===(t=cn(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(rt(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;s+=4}return dt=!0,rt(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,m=(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=m.length,c<d&&(a=h,h=m,m=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]+m[n]*h[i-n-1]+t,a[i--]=l%Vt|0,t=l/Vt|0;a[i]=(a[i]+t)%Vt|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,dt?rt(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:(vn(e,0,Vo),t===void 0?t=n.rounding:vn(t,0,8),rt(r,e+Ot(r)+1,t))};Oe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Hi(n,!0):(vn(e,0,Vo),t===void 0?t=i.rounding:vn(t,0,8),n=rt(new i(n),e+1,t),r=Hi(n,!0,e+1)),r};Oe.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Hi(i):(vn(e,0,Vo),t===void 0?t=a.rounding:vn(t,0,8),n=rt(new a(i),e+Ot(i)+1,t),r=Hi(n.abs(),!1,e+Ot(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return rt(new t(e),Ot(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(Cr);if(l=new c(l),!l.s){if(e.s<1)throw Error(Br+"Infinity");return l}if(l.eq(Cr))return l;if(n=c.precision,e.eq(Cr))return rt(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=l.s,s){if((r=u<0?-u:u)<=K2){for(i=new c(Cr),t=Math.ceil(n/at+4),dt=!1;r%2&&(i=i.times(l),Db(i.d,t)),r=Ho(r/2),r!==0;)l=l.times(l),Db(l.d,t);return dt=!0,e.s<0?new c(Cr).div(i):rt(i,n)}}else if(a<0)throw Error(Br+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,dt=!1,i=e.times(rs(l,n+d)),dt=!0,i=Y2(i),i.s=a,i};Oe.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Ot(i),n=Hi(i,r<=a.toExpNeg||r>=a.toExpPos)):(vn(e,1,Vo),t===void 0?t=a.rounding:vn(t,0,8),i=rt(new a(i),e,t),r=Ot(i),n=Hi(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):(vn(e,1,Vo),t===void 0?t=n.rounding:vn(t,0,8)),rt(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=Ot(e),r=e.constructor;return Hi(e,t<=r.toExpNeg||t>=r.toExpPos)};function q2(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)),dt?rt(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/at),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)/Vt|0,c[a]%=Vt;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,dt?rt(t,f):t}function vn(e,t,r){if(e!==~~e||e<t||e>r)throw Error($i+e)}function cn(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=at-n.length,r&&(a+=oi(r)),a+=n;s=e[t],n=s+"",r=at-n.length,r&&(a+=oi(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var Mn=(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%Vt|0,s=a/Vt|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*Vt+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,m,g,x,y,w,b,E,P,j,S,O,k,I=n.constructor,_=n.s==i.s?1:-1,$=n.d,R=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(Br+"Division by zero");for(c=n.e-i.e,O=R.length,j=$.length,m=new I(_),g=m.d=[],d=0;R[d]==($[d]||0);)++d;if(R[d]>($[d]||0)&&--c,a==null?b=a=I.precision:s?b=a+(Ot(n)-Ot(i))+1:b=a,b<0)return new I(0);if(b=b/at+2|0,d=0,O==1)for(u=0,R=R[0],b++;(d<j||u)&&b--;d++)E=u*Vt+($[d]||0),g[d]=E/R|0,u=E%R|0;else{for(u=Vt/(R[0]+1)|0,u>1&&(R=e(R,u),$=e($,u),O=R.length,j=$.length),P=O,x=$.slice(0,O),y=x.length;y<O;)x[y++]=0;k=R.slice(),k.unshift(0),S=R[0],R[1]>=Vt/2&&++S;do u=0,l=t(R,x,O,y),l<0?(w=x[0],O!=y&&(w=w*Vt+(x[1]||0)),u=w/S|0,u>1?(u>=Vt&&(u=Vt-1),f=e(R,u),h=f.length,y=x.length,l=t(f,x,h,y),l==1&&(u--,r(f,O<h?k:R,h))):(u==0&&(l=u=1),f=R.slice()),h=f.length,h<y&&f.unshift(0),r(x,f,y),l==-1&&(y=x.length,l=t(R,x,O,y),l<1&&(u++,r(x,O<y?k:R,y))),y=x.length):l===0&&(u++,x=[0]),g[d++]=u,l&&x[0]?x[y++]=$[P]||0:(x=[$[P]],y=1);while((P++<j||x[0]!==void 0)&&b--)}return g[0]||g.shift(),m.e=c,rt(m,s?a+Ot(m)+1:a)}})();function Y2(e,t){var r,n,i,a,s,l,c=0,d=0,u=e.constructor,f=u.precision;if(Ot(e)>16)throw Error(Ym+Ot(e));if(!e.s)return new u(Cr);for(dt=!1,l=f,s=new u(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(n=Math.log(Oi(2,d))/Math.LN10*2+5|0,l+=n,r=i=a=new u(Cr),u.precision=l;;){if(i=rt(i.times(e),l),r=r.times(++c),s=a.plus(Mn(i,r,l)),cn(s.d).slice(0,l)===cn(a.d).slice(0,l)){for(;d--;)a=rt(a.times(a),l);return u.precision=f,t==null?(dt=!0,rt(a,f)):a}a=s}}function Ot(e){for(var t=e.e*at,r=e.d[0];r>=10;r/=10)t++;return t}function _f(e,t,r){if(t>e.LN10.sd())throw dt=!0,r&&(e.precision=r),Error(Br+"LN10 precision limit exceeded");return rt(new e(e.LN10),t)}function oi(e){for(var t="";e--;)t+="0";return t}function rs(e,t){var r,n,i,a,s,l,c,d,u,f=1,h=10,m=e,g=m.d,x=m.constructor,y=x.precision;if(m.s<1)throw Error(Br+(m.s?"NaN":"-Infinity"));if(m.eq(Cr))return new x(0);if(t==null?(dt=!1,d=y):d=t,m.eq(10))return t==null&&(dt=!0),_f(x,d);if(d+=h,x.precision=d,r=cn(g),n=r.charAt(0),a=Ot(m),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(e),r=cn(m.d),n=r.charAt(0),f++;a=Ot(m),n>1?(m=new x("0."+r),a++):m=new x(n+"."+r.slice(1))}else return c=_f(x,d+2,y).times(a+""),m=rs(new x(n+"."+r.slice(1)),d-h).plus(c),x.precision=y,t==null?(dt=!0,rt(m,y)):m;for(l=s=m=Mn(m.minus(Cr),m.plus(Cr),d),u=rt(m.times(m),d),i=3;;){if(s=rt(s.times(u),d),c=l.plus(Mn(s,new x(i),d)),cn(c.d).slice(0,d)===cn(l.d).slice(0,d))return l=l.times(2),a!==0&&(l=l.plus(_f(x,d+2,y).times(a+""))),l=Mn(l,new x(f),d),x.precision=y,t==null?(dt=!0,rt(l,y)):l;l=c,i+=2}}function Nb(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=Ho(r/at),e.d=[],n=(r+1)%at,r<0&&(n+=at),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=at;n<i;)e.d.push(+t.slice(n,n+=at));t=t.slice(n),n=at-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),dt&&(e.e>yc||e.e<-yc))throw Error(Ym+r)}else e.s=0,e.e=0,e.d=[0];return e}function rt(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+=at,i=t,d=f[u=0];else{if(u=Math.ceil((n+1)/at),a=f.length,u>=a)return e;for(d=a=f[u],s=1;a>=10;a/=10)s++;n%=at,i=n-at+s}if(r!==void 0&&(a=Oi(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/Oi(10,s-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(a=Ot(e),f.length=1,t=t-a-1,f[0]=Oi(10,(at-t%at)%at),e.e=Ho(-t/at)||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=Oi(10,at-n),f[u]=i>0?(d/Oi(10,s-i)%Oi(10,i)|0)*a:0),c)for(;;)if(u==0){(f[0]+=a)==Vt&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=Vt)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(dt&&(e.e>yc||e.e<-yc))throw Error(Ym+Ot(e));return e}function G2(e,t){var r,n,i,a,s,l,c,d,u,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),dt?rt(t,m):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(m/at),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]=Vt-1;--c[a],c[i]+=Vt}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,dt?rt(t,m):t):new h(0)}function Hi(e,t,r){var n,i=Ot(e),a=cn(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+oi(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+oi(-i-1)+a,r&&(n=r-s)>0&&(a+=oi(n))):i>=s?(a+=oi(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+oi(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=oi(n))),e.s<0?"-"+a:a}function Db(e,t){if(e.length>t)return e.length=t,!0}function X2(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($i+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 Nb(s,a.toString())}else if(typeof a!="string")throw Error($i+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,N8.test(a))Nb(s,a);else throw Error($i+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=X2,i.config=i.set=D8,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 D8(e){if(!e||typeof e!="object")throw Error(Br+"Object expected");var t,r,n,i=["precision",1,Vo,"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(Ho(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error($i+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error($i+r+": "+n);return this}var Gm=X2(A8);Cr=new Gm(1);const Ze=Gm;var _8=e=>e,Z2={},Q2=e=>e===Z2,_b=e=>function t(){return arguments.length===0||arguments.length===1&&Q2(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},J2=(e,t)=>e===1?t:_b(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!==Z2).length;return a>=e?t(...n):J2(e-a,_b(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=n.map(u=>Q2(u)?l.shift():u);return t(...d,...l)}))}),B8=e=>J2(e.length,e),vh=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},$8=B8((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),L8=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return _8;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce((l,c)=>c(l),a(...arguments))}},yh=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),eE=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 tE(e){var t;return e===0?t=1:t=Math.floor(new Ze(e).abs().log(10).toNumber())+1,t}function rE(e,t,r){for(var n=new Ze(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var nE=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},iE=(e,t,r)=>{if(e.lte(0))return new Ze(0);var n=tE(e.toNumber()),i=new Ze(10).pow(n),a=e.div(i),s=n!==1?.05:.1,l=new Ze(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=l.mul(i);return t?new Ze(c.toNumber()):new Ze(Math.ceil(c.toNumber()))},z8=(e,t,r)=>{var n=new Ze(1),i=new Ze(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ze(10).pow(tE(e)-1),i=new Ze(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ze(Math.floor(e)))}else e===0?i=new Ze(Math.floor((t-1)/2)):r||(i=new Ze(Math.floor(e)));var s=Math.floor((t-1)/2),l=L8($8(c=>i.add(new Ze(c-s).mul(n)).toNumber()),vh);return l(0,t)},oE=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 Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var s=iE(new Ze(r).sub(t).div(n-1),i,a),l;t<=0&&r>=0?l=new Ze(0):(l=new Ze(t).add(r).div(2),l=l.sub(new Ze(l).mod(s)));var c=Math.ceil(l.sub(t).div(s).toNumber()),d=Math.ceil(new Ze(r).sub(l).div(s).toNumber()),u=c+d+1;return u>n?oE(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 Ze(c).mul(s)),tickMax:l.add(new Ze(d).mul(s))})};function F8(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]=nE([t,r]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...vh(0,n-1).map(()=>1/0)]:[...vh(0,n-1).map(()=>-1/0),l];return t>r?yh(c):c}if(s===l)return z8(s,n,i);var{step:d,tickMin:u,tickMax:f}=oE(s,l,a,i,0),h=rE(u,f.add(new Ze(.1).mul(d)),d);return t>r?yh(h):h}function V8(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=nE([r,n]);if(a===-1/0||s===1/0)return[r,n];if(a===s)return[a];var l=Math.max(t,2),c=iE(new Ze(s).sub(a).div(l-1),i,0),d=[...rE(new Ze(a),new Ze(s),c),s];return i===!1&&(d=d.map(u=>Math.round(u))),r>n?yh(d):d}var H8=eE(F8),W8=eE(V8),aE=e=>e.rootProps.maxBarSize,U8=e=>e.rootProps.barGap,sE=e=>e.rootProps.barCategoryGap,K8=e=>e.rootProps.barSize,Cs=e=>e.rootProps.stackOffset,Xm=e=>e.options.chartName,Zm=e=>e.rootProps.syncId,lE=e=>e.rootProps.syncMethod,Qm=e=>e.options.eventEmitter,Qt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},jn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},br={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},du=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},q8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:jn.angleAxisId,includeHidden:!1,name:void 0,reversed:jn.reversed,scale:jn.scale,tick:jn.tick,tickCount:void 0,ticks:void 0,type:jn.type,unit:void 0},Y8={allowDataOverflow:br.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:br.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:br.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:br.scale,tick:br.tick,tickCount:br.tickCount,ticks:void 0,type:br.type,unit:void 0},G8={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:jn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:jn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:jn.scale,tick:jn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},X8={allowDataOverflow:br.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:br.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:br.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:br.scale,tick:br.tick,tickCount:br.tickCount,ticks:void 0,type:"category",unit:void 0},Jm=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?G8:q8,eg=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?X8:Y8,fu=e=>e.polarOptions,tg=ee([Fn,Vn,Dt],t2),cE=ee([fu,tg],(e,t)=>{if(e!=null)return tr(e.innerRadius,t,0)}),uE=ee([fu,tg],(e,t)=>{if(e!=null)return tr(e.outerRadius,t,t*.8)}),Z8=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},dE=ee([fu],Z8);ee([Jm,dE],du);var fE=ee([tg,cE,uE],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});ee([eg,fE],du);var pE=ee([Ue,fu,cE,uE,Fn,Vn],(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:tr(s,i,i/2),cy:tr(l,a,a/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:d,clockWise:!1}}}),ft=(e,t)=>t,Ss=(e,t,r)=>r;function rg(e){return e?.id}function hE(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=rg(l);d.forEach((f,h)=>{var m=a==null||i?h:String(ht(f,a,null)),g=ht(f,l.dataKey,0),x;s.has(m)?x=s.get(m):x={},Object.assign(x,{[u]:g}),s.set(m,x)})}}),Array.from(s.values())}function pu(e){return e.stackId!=null&&e.dataKey!=null}var hu=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function mu(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Q8(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Bt=e=>{var t=Ue(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Wo=e=>e.tooltip.settings.axisId;function Bb(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 xc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(r),!0).forEach(function(n){J8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J8(e,t,r){return(t=eL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eL(e){var t=tL(e,"string");return typeof t=="symbol"?t:t+""}function tL(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 xh=[0,"auto"],yr={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},mE=(e,t)=>e.cartesianAxis.xAxis[t],Wn=(e,t)=>{var r=mE(e,t);return r??yr},xr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:xh,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:ys},gE=(e,t)=>e.cartesianAxis.yAxis[t],Un=(e,t)=>{var r=gE(e,t);return r??xr},rL={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:""},ng=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??rL},mt=(e,t,r)=>{switch(t){case"xAxis":return Wn(e,r);case"yAxis":return Un(e,r);case"zAxis":return ng(e,r);case"angleAxis":return Jm(e,r);case"radiusAxis":return eg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},nL=(e,t,r)=>{switch(t){case"xAxis":return Wn(e,r);case"yAxis":return Un(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},js=(e,t,r)=>{switch(t){case"xAxis":return Wn(e,r);case"yAxis":return Un(e,r);case"angleAxis":return Jm(e,r);case"radiusAxis":return eg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},vE=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function ig(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 og=e=>e.graphicalItems.cartesianItems,iL=ee([ft,Ss],ig),ag=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),Es=ee([og,mt,iL],ag,{memoizeOptions:{resultEqualityCheck:mu}}),yE=ee([Es],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(pu)),xE=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),oL=ee([Es],xE),sg=e=>e.map(t=>t.data).filter(Boolean).flat(1),aL=ee([Es],sg,{memoizeOptions:{resultEqualityCheck:mu}}),lg=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},cg=ee([aL,qm],lg),ug=(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})),gu=ee([cg,mt,Es],ug);function bE(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Ml(e){if(mn(e)||e instanceof Date){var t=Number(e);if(Ct(t))return t}}function $b(e){if(Array.isArray(e)){var t=[Ml(e[0]),Ml(e[1])];return Vi(t)?t:void 0}var r=Ml(e);if(r!=null)return[r,r]}function _n(e){return e.map(Ml).filter(r_)}function sL(e,t,r){return!r||typeof t!="number"||Qr(t)?[]:r.length?_n(r.flatMap(n=>{var i=ht(e,n.dataKey),a,s;if(Array.isArray(i)?[a,s]=i:a=s=i,!(!Ct(a)||!Ct(s)))return[t-a,t+s]})):[]}var $t=e=>{var t=Bt(e),r=Wo(e);return js(e,t,r)},wE=ee([$t],e=>e?.dataKey),lL=ee([yE,qm,$t],hE),CE=(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(rg);return[s,{stackedData:HB(e,c,r),graphicalItems:l}]}))},bh=ee([lL,yE,Cs],CE),SE=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var s=YB(e,i,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},cL=ee([mt],e=>e.allowDataOverflow),dg=e=>{var t;if(e==null||!("domain"in e))return xh;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=_n(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:xh},fg=ee([mt],dg),pg=ee([fg,cL],U2),uL=ee([bh,yi,ft,pg],SE,{memoizeOptions:{resultEqualityCheck:hu}}),vu=e=>e.errorBars,dL=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>bE(r,n)),bc=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]}},hg=(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=>bE(i,w)),h=ht(l,(u=t.dataKey)!==null&&u!==void 0?u:c.dataKey),m=sL(l,h,f);if(m.length>=2){var g=Math.min(...m),x=Math.max(...m);(a==null||g<a)&&(a=g),(s==null||x>s)&&(s=x)}var y=$b(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=$b(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]))}),Ct(a)&&Ct(s))return[a,s]},fL=ee([cg,mt,oL,vu,ft],hg,{memoizeOptions:{resultEqualityCheck:hu}});function pL(e){var{value:t}=e;if(mn(t)||t instanceof Date)return t}var hL=(e,t,r)=>{var n=e.map(pL).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&LS(n))?o2(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},jE=e=>e.referenceElements.dots,Uo=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),mL=ee([jE,ft,Ss],Uo),EE=e=>e.referenceElements.areas,gL=ee([EE,ft,Ss],Uo),PE=e=>e.referenceElements.lines,vL=ee([PE,ft,Ss],Uo),OE=(e,t)=>{var r=_n(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},yL=ee(mL,ft,OE),kE=(e,t)=>{var r=_n(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)]},xL=ee([gL,ft],kE);function bL(e){var t;if(e.x!=null)return _n([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:_n(r)}function wL(e){var t;if(e.y!=null)return _n([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:_n(r)}var TE=(e,t)=>{var r=e.flatMap(n=>t==="xAxis"?bL(n):wL(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},CL=ee([vL,ft],TE),SL=ee(yL,CL,xL,(e,t,r)=>bc(e,r,t)),mg=(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?bc(n,a,i):bc(a,i);return R8(t,d,e.allowDataOverflow)},jL=ee([mt,fg,pg,uL,fL,SL,Ue,ft],mg,{memoizeOptions:{resultEqualityCheck:hu}}),EL=[0,1],gg=(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=Yi(t,a);if(d&&l==null){var u;return o2(0,(u=r?.length)!==null&&u!==void 0?u:0)}return c==="category"?hL(n,e,d):i==="expand"?EL:s}},vg=ee([mt,Ue,cg,gu,Cs,ft,jL],gg),IE=(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(fs(a));return l in Ea?l:"point"}}},Ko=ee([mt,Ue,vE,Xm,ft],IE);function PL(e){if(e!=null){if(e in Ea)return Ea[e]();var t="scale".concat(fs(e));if(t in Ea)return Ea[t]()}}function yg(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=PL(t);if(i!=null){var a=i.domain(r).range(n);return $B(a),a}}}var xg=(e,t,r)=>{var n=dg(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Vi(e))return H8(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Vi(e))return W8(e,t.tickCount,t.allowDecimals)}},bg=ee([vg,js,Ko],xg),wg=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Vi(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},OL=ee([mt,vg,bg,ft],wg),kL=ee(gu,mt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(_n(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}}),ME=ee(kL,Ue,sE,Dt,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!Ct(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=tr(r,e*a),l=e*a/2;return l-s-(l-s)/a*s}return 0}),TL=(e,t)=>{var r=Wn(e,t);return r==null||typeof r.padding!="string"?0:ME(e,"xAxis",t,r.padding)},IL=(e,t)=>{var r=Un(e,t);return r==null||typeof r.padding!="string"?0:ME(e,"yAxis",t,r.padding)},ML=ee(Wn,TL,(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}}),RL=ee(Un,IL,(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}}),AL=ee([Dt,ML,tu,eu,(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]}),NL=ee([Dt,Ue,RL,tu,eu,(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]}),Ps=(e,t,r,n)=>{var i;switch(t){case"xAxis":return AL(e,r,n);case"yAxis":return NL(e,r,n);case"zAxis":return(i=ng(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return dE(e);case"radiusAxis":return fE(e,r);default:return}},RE=ee([mt,Ps],du),qo=ee([mt,Ko,OL,RE],yg);ee([Es,vu,ft],dL);function AE(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var yu=(e,t)=>t,xu=(e,t,r)=>r,DL=ee(Qc,yu,xu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(AE)),_L=ee(Jc,yu,xu,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(AE)),NE=(e,t)=>({width:e.width,height:t.height}),BL=(e,t)=>{var r=typeof t.width=="number"?t.width:ys;return{width:r,height:e.height}},DE=ee(Dt,Wn,NE),$L=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},LL=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},zL=ee(Vn,Dt,DL,yu,xu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=NE(t,l);s==null&&(s=$L(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}),FL=ee(Fn,Dt,_L,yu,xu,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=BL(t,l);s==null&&(s=LL(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=Wn(e,t);if(r!=null)return zL(e,r.orientation,r.mirror)},HL=ee([Dt,Wn,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}}}),WL=(e,t)=>{var r=Un(e,t);if(r!=null)return FL(e,r.orientation,r.mirror)},UL=ee([Dt,Un,WL,(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}}}),_E=ee(Dt,Un,(e,t)=>{var r=typeof t.width=="number"?t.width:ys;return{width:r,height:e.height}}),Lb=(e,t,r)=>{switch(t){case"xAxis":return DE(e,r).width;case"yAxis":return _E(e,r).height;default:return}},BE=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=r,l=Yi(e,n),c=t.map(d=>d.value);if(s&&l&&a==="category"&&i&&LS(c))return c}},Cg=ee([Ue,gu,mt,ft],BE),$E=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,s=Yi(e,n);if(s&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},Sg=ee([Ue,gu,js,ft],$E),zb=ee([Ue,nL,Ko,qo,Cg,Sg,Ps,bg,ft],(e,t,r,n,i,a,s,l,c)=>{if(t!=null){var d=Yi(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}}}),KL=(e,t,r,n,i,a,s,l,c)=>{if(!(t==null||n==null)){var d=Yi(e,c),{type:u,ticks:f,tickCount:h}=t,m=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,g=u==="category"&&n.bandwidth?n.bandwidth()/m:0;g=c==="angleAxis"&&a!=null&&a.length>=2?Ht(a[0]-a[1])*2*g:g;var x=f||i;if(x){var y=x.map((w,b)=>{var E=s?s.indexOf(w):w;return{index:b,coordinate:n(E)+g,value:w,offset:g}});return y.filter(w=>Ct(w.coordinate))}return d&&l?l.map((w,b)=>({coordinate:n(w)+g,value:w,index:b,offset:g})).filter(w=>Ct(w.coordinate)):n.ticks?n.ticks(h).map(w=>({coordinate:n(w)+g,value:w,offset:g})):n.domain().map((w,b)=>({coordinate:n(w)+g,value:s?s[w]:w,index:b,offset:g}))}},LE=ee([Ue,js,Ko,qo,bg,Ps,Cg,Sg,ft],KL),qL=(e,t,r,n,i,a,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Yi(e,s),{tickCount:c}=t,d=0;return d=s==="angleAxis"&&n?.length>=2?Ht(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}))}},Mo=ee([Ue,js,qo,Ps,Cg,Sg,ft],qL),Ro=ee(mt,qo,(e,t)=>{if(!(e==null||t==null))return xc(xc({},e),{},{scale:t})}),YL=ee([mt,Ko,vg,RE],yg);ee((e,t,r)=>ng(e,r),YL,(e,t)=>{if(!(e==null||t==null))return xc(xc({},e),{},{scale:t})});var GL=ee([Ue,Qc,Jc],(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}}),zE=e=>e.options.defaultTooltipEventType,FE=e=>e.options.validateTooltipEventTypes;function VE(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function jg(e,t){var r=zE(e),n=FE(e);return VE(t,r,n)}function XL(e){return Me(t=>jg(t,e))}var HE=(e,t)=>{var r,n=Number(t);if(!(Qr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},ZL=e=>e.tooltip.settings,si={active:!1,index:null,dataKey:void 0,coordinate:void 0},QL={itemInteraction:{click:si,hover:si},axisInteraction:{click:si,hover:si},keyboardInteraction:si,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}},WE=fr({name:"tooltip",initialState:QL,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Mt()},removeTooltipEntrySettings:{reducer(e,t){var r=In(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Mt()},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:JL,removeTooltipEntrySettings:ez,setTooltipSettingsState:tz,setActiveMouseOverItemIndex:UE,mouseLeaveItem:rz,mouseLeaveChart:KE,setActiveClickItemIndex:nz,setMouseOverAxisIndex:qE,setMouseClickAxisIndex:iz,setSyncInteraction:wh,setKeyboardInteraction:Ch}=WE.actions,oz=WE.reducer;function Fb(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?Fb(Object(r),!0).forEach(function(n){az(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function az(e,t,r){return(t=sz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sz(e){var t=lz(e,"string");return typeof t=="symbol"?t:t+""}function lz(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 cz(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function uz(e){return e.index!=null}var YE=(e,t,r,n)=>{if(t==null)return si;var i=cz(e,t,r);if(i==null)return si;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(uz(i)){if(a)return yl(yl({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return yl(yl({},si),{},{coordinate:i.coordinate})},Eg=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!Ct(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)))},GE=(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}}}},XE=(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})},Os=e=>e.options.tooltipPayloadSearcher,Yo=e=>e.tooltip;function Vb(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 Hb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vb(Object(r),!0).forEach(function(n){dz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dz(e,t,r){return(t=fz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fz(e){var t=pz(e,"string");return typeof t=="symbol"?t:t+""}function pz(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 hz(e,t){return e??t}var ZE=(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,m)=>{var g,{dataDefinedOnItem:x,settings:y}=m,w=hz(x,l),b=Array.isArray(w)?Nj(w,d,u):w,E=(g=y?.dataKey)!==null&&g!==void 0?g:n,P=y?.nameKey,j;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&s==="axis"?j=t_(b,n,i):j=a(b,t,c,P),Array.isArray(j))j.forEach(O=>{var k=Hb(Hb({},y),{},{name:O.name,unit:O.unit,color:void 0,fill:void 0});h.push(mx({tooltipEntrySettings:k,dataKey:O.dataKey,payload:O.payload,value:ht(O.payload,O.dataKey),name:O.name}))});else{var S;h.push(mx({tooltipEntrySettings:y,dataKey:E,payload:j,value:ht(j,E),name:(S=ht(j,P))!==null&&S!==void 0?S:y?.name}))}return h},f)}},Pg=ee([$t,Ue,vE,Xm,Bt],IE),mz=ee([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),gz=ee([Bt,Wo],ig),ks=ee([mz,$t,gz],ag,{memoizeOptions:{resultEqualityCheck:mu}}),vz=ee([ks],e=>e.filter(pu)),yz=ee([ks],sg,{memoizeOptions:{resultEqualityCheck:mu}}),Go=ee([yz,yi],lg),xz=ee([vz,yi,$t],hE),Og=ee([Go,$t,ks],ug),QE=ee([$t],dg),bz=ee([$t],e=>e.allowDataOverflow),JE=ee([QE,bz],U2),wz=ee([ks],e=>e.filter(pu)),Cz=ee([xz,wz,Cs],CE),Sz=ee([Cz,yi,Bt,JE],SE),jz=ee([ks],xE),Ez=ee([Go,$t,jz,vu,Bt],hg,{memoizeOptions:{resultEqualityCheck:hu}}),Pz=ee([jE,Bt,Wo],Uo),Oz=ee([Pz,Bt],OE),kz=ee([EE,Bt,Wo],Uo),Tz=ee([kz,Bt],kE),Iz=ee([PE,Bt,Wo],Uo),Mz=ee([Iz,Bt],TE),Rz=ee([Oz,Mz,Tz],bc),Az=ee([$t,QE,JE,Sz,Ez,Rz,Ue,Bt],mg),eP=ee([$t,Ue,Go,Og,Cs,Bt,Az],gg),Nz=ee([eP,$t,Pg],xg),Dz=ee([$t,eP,Nz,Bt],wg),tP=e=>{var t=Bt(e),r=Wo(e),n=!1;return Ps(e,t,r,n)},rP=ee([$t,tP],du),nP=ee([$t,Pg,Dz,rP],yg),_z=ee([Ue,Og,$t,Bt],BE),Bz=ee([Ue,Og,$t,Bt],$E),$z=(e,t,r,n,i,a,s,l)=>{if(t){var{type:c}=t,d=Yi(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?Ht(i[0]-i[1])*2*f:f,d&&s?s.map((h,m)=>({coordinate:n(h)+f,value:h,index:m,offset:f})):n.domain().map((h,m)=>({coordinate:n(h)+f,value:a?a[h]:h,index:m,offset:f}))}}},Kn=ee([Ue,$t,Pg,nP,tP,_z,Bz,Bt],$z),kg=ee([zE,FE,ZL],(e,t,r)=>VE(r.shared,e,t)),iP=e=>e.tooltip.settings.trigger,Tg=e=>e.tooltip.settings.defaultIndex,bu=ee([Yo,kg,iP,Tg],YE),Wi=ee([bu,Go],Eg),oP=ee([Kn,Wi],HE),aP=ee([bu],e=>{if(e)return e.dataKey}),sP=ee([Yo,kg,iP,Tg],XE),Lz=ee([Fn,Vn,Ue,Dt,Kn,Tg,sP,Os],GE),zz=ee([bu,Lz],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Fz=ee([bu],e=>e.active),Vz=ee([sP,Wi,yi,wE,oP,Os,kg],ZE);ee([Vz],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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 Ub(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){Hz(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 Hz(e,t,r){return(t=Wz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wz(e){var t=Uz(e,"string");return typeof t=="symbol"?t:t+""}function Uz(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 Kz=()=>Me($t),qz=()=>{var e=Kz(),t=Me(Kn),r=Me(nP);return oc(!e||!r?void 0:Ub(Ub({},e),{},{scale:r}),t)};function Kb(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?Kb(Object(r),!0).forEach(function(n){Yz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yz(e,t,r){return(t=Gz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gz(e){var t=Xz(e,"string");return typeof t=="symbol"?t:t+""}function Xz(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 Zz=(e,t,r,n)=>{var i=t.find(a=>a&&a.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}},Qz=(e,t,r,n)=>{var i=t.find(d=>d&&d.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:s}=n;return so(so(so({},n),Pt(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,{angle:c}=n;return so(so(so({},n),Pt(n.cx,n.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Jz(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var lP=(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(Ht(u-d)!==Ht(f-u)){var m=[];if(Ht(f-u)===Ht(i[1]-i[0])){h=f;var g=u+i[1]-i[0];m[0]=Math.min(g,(g+d)/2),m[1]=Math.max(g,(g+d)/2)}else{h=d;var x=f+i[1]-i[0];m[0]=Math.min(u,(x+u)/2),m[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>=m[0]&&e<=m[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 E=0;E<l;E++)if(E===0&&e<=(t[E].coordinate+t[E+1].coordinate)/2||E>0&&E<l-1&&e>(t[E].coordinate+t[E-1].coordinate)/2&&e<=(t[E].coordinate+t[E+1].coordinate)/2||E===l-1&&e>(t[E].coordinate+t[E-1].coordinate)/2){({index:s}=t[E]);break}}return s},eF=()=>Me(Xm),Ig=(e,t)=>t,cP=(e,t,r)=>r,Mg=(e,t,r,n)=>n,tF=ee(Kn,e=>Kc(e,t=>t.coordinate)),Rg=ee([Yo,Ig,cP,Mg],YE),uP=ee([Rg,Go],Eg),rF=(e,t,r)=>{if(t!=null){var n=Yo(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},dP=ee([Yo,Ig,cP,Mg],XE),wc=ee([Fn,Vn,Ue,Dt,Kn,Mg,dP,Os],GE),nF=ee([Rg,wc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),fP=ee([Kn,uP],HE),iF=ee([dP,uP,yi,wE,fP,Os,Ig],ZE),oF=ee([Rg],e=>({isActive:e.active,activeIndex:e.index})),aF=(e,t,r,n,i,a,s)=>{if(!(!e||!r||!n||!i)&&Jz(e,s)){var l=GB(e,t),c=lP(l,a,i,r,n),d=Zz(t,i,c,e);return{activeIndex:String(c),activeCoordinate:d}}},sF=(e,t,r,n,i,a,s)=>{if(!(!e||!n||!i||!a||!r)){var l=t$(e,r);if(l){var c=XB(l,t),d=lP(c,s,a,n,i),u=Qz(t,a,d,l);return{activeIndex:String(d),activeCoordinate:u}}}},lF=(e,t,r,n,i,a,s,l)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?aF(e,t,n,i,a,s,l):sF(e,t,r,n,i,a,s)},cF=ee(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElementId:n.elementId}}),uF=ee(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Qt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:Q8}});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 Yb(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){dF(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 dF(e,t,r){return(t=fF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fF(e){var t=pF(e,"string");return typeof t=="symbol"?t:t+""}function pF(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 hF={},mF={zIndexMap:Object.values(Qt).reduce((e,t)=>Yb(Yb({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),hF)},gF=new Set(Object.values(Qt));function vF(e){return gF.has(e)}var pP=fr({name:"zIndex",initialState:mF,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:Mt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!vF(r)&&delete e.zIndexMap[r])},prepare:Mt()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r,elementId:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElementId=n:e.zIndexMap[r].elementId=n:e.zIndexMap[r]={consumers:0,elementId:i?void 0:n,panoramaElementId:i?n:void 0}},prepare:Mt()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElementId=void 0:e.zIndexMap[r].elementId=void 0)},prepare:Mt()}}}),{registerZIndexPortal:yF,unregisterZIndexPortal:xF,registerZIndexPortalId:bF,unregisterZIndexPortalId:wF}=pP.actions,CF=pP.reducer;function tn(e){var{zIndex:t,children:r}=e,n=k3(),i=n&&t!==void 0&&t!==0,a=pr(),s=ot();v.useLayoutEffect(()=>i?(s(yF({zIndex:t})),()=>{s(xF({zIndex:t}))}):qi,[s,t,i]);var l=Me(d=>cF(d,t,a));if(!i)return r;if(!l)return null;var c=document.getElementById(l);return c?xo.createPortal(r,c):null}function Sh(){return Sh=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},Sh.apply(null,arguments)}function Gb(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 xl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gb(Object(r),!0).forEach(function(n){SF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SF(e,t,r){return(t=jF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jF(e){var t=EF(e,"string");return typeof t=="symbol"?t:t+""}function EF(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 PF(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return v.isValidElement(t)?v.cloneElement(t,n):v.createElement(r,n)}function OF(e){var t,{coordinate:r,payload:n,index:i,offset:a,tooltipAxisBandSize:s,layout:l,cursor:c,tooltipEventType:d,chartName:u}=e,f=r,h=n,m=i;if(!c||!f||u!=="ScatterChart"&&d!=="axis")return null;var g,x,y;if(u==="ScatterChart")g=f,x=v5,y=Qt.cursorLine;else if(u==="BarChart")g=y5(l,f,a,s),x=e2,y=Qt.cursorRectangle;else if(l==="radial"&&FS(f)){var{cx:w,cy:b,radius:E,startAngle:P,endAngle:j}=r2(f);g={cx:w,cy:b,startAngle:P,endAngle:j,innerRadius:E,outerRadius:E},x=i2,y=Qt.cursorLine}else g={points:o$(l,f,a)},x=Em,y=Qt.cursorLine;var S=typeof c=="object"&&"className"in c?c.className:void 0,O=xl(xl(xl(xl({stroke:"#ccc",pointerEvents:"none"},a),g),Wa(c)),{},{payload:h,payloadIndex:m,className:Je("recharts-tooltip-cursor",S)});return C.createElement(tn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},C.createElement(PF,{cursor:c,cursorComp:x,cursorProps:O}))}function kF(e){var t=qz(),r=Wj(),n=nu(),i=eF();return t==null||r==null||n==null||i==null?null:C.createElement(OF,Sh({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var hP=v.createContext(null),TF=()=>v.useContext(hP),Bf={exports:{}},Xb;function IF(){return Xb||(Xb=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 m=new i(u,f||c,h),g=r?r+d:d;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],m]:c._events[g].push(m):(c._events[g]=m,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,m=f.length,g=new Array(m);h<m;h++)g[h]=f[h].fn;return g},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,m,g){var x=r?r+d:d;if(!this._events[x])return!1;var y=this._events[x],w=arguments.length,b,E;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,m),!0;case 6:return y.fn.call(y.context,u,f,h,m,g),!0}for(E=1,b=new Array(w-1);E<w;E++)b[E-1]=arguments[E];y.fn.apply(y.context,b)}else{var P=y.length,j;for(E=0;E<P;E++)switch(y[E].once&&this.removeListener(d,y[E].fn,void 0,!0),w){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,u);break;case 3:y[E].fn.call(y[E].context,u,f);break;case 4:y[E].fn.call(y[E].context,u,f,h);break;default:if(!b)for(j=1,b=new Array(w-1);j<w;j++)b[j-1]=arguments[j];y[E].fn.apply(y[E].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 m=r?r+d:d;if(!this._events[m])return this;if(!u)return s(this,m),this;var g=this._events[m];if(g.fn)g.fn===u&&(!h||g.once)&&(!f||g.context===f)&&s(this,m);else{for(var x=0,y=[],w=g.length;x<w;x++)(g[x].fn!==u||h&&!g[x].once||f&&g[x].context!==f)&&y.push(g[x]);y.length?this._events[m]=y.length===1?y[0]:y:s(this,m)}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})(Bf)),Bf.exports}var MF=IF();const RF=jr(MF);var ns=new RF,jh="recharts.syncEvent.tooltip",Zb="recharts.syncEvent.brush";function mP(e,t){if(t){var r=Number.parseInt(t,10);if(!Qr(r))return e?.[r]}}var AF={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},gP=fr({name:"options",initialState:AF,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),NF=gP.reducer,{createEventEmitter:DF}=gP.actions;function _F(e){return e.tooltip.syncInteraction}var BF={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},vP=fr({name:"chartData",initialState:BF,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:Qb,setDataStartEndIndexes:$F}=vP.actions,LF=vP.reducer,zF=["x","y"];function Jb(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 lo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(r),!0).forEach(function(n){FF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FF(e,t,r){return(t=VF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VF(e){var t=HF(e,"string");return typeof t=="symbol"?t:t+""}function HF(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 WF(e,t){if(e==null)return{};var r,n,i=UF(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 UF(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 KF(){var e=Me(Zm),t=Me(Qm),r=ot(),n=Me(lE),i=Me(Kn),a=nu(),s=ru(),l=Me(c=>c.rootProps.className);v.useEffect(()=>{if(e==null)return qi;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 m=u.payload.coordinate,{x:g,y:x}=m,y=WF(m,zF),{x:w,y:b,width:E,height:P}=u.payload.sourceViewBox,j=lo(lo({},y),{},{x:s.x+(E?(g-w)/E:0)*s.width,y:s.y+(P?(x-b)/P:0)*s.height});r(lo(lo({},u),{},{payload:lo(lo({},u.payload),{},{coordinate:j})}))}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(D=>String(D.value)===u.payload.label));var{coordinate:I}=u.payload;if(S==null||u.payload.active===!1||I==null||s==null){r(wh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:_,y:$}=I,R=Math.min(_,s.x+s.width),z=Math.min($,s.y+s.height),F={x:a==="horizontal"?S.coordinate:R,y:a==="horizontal"?z:S.coordinate},M=wh({active:u.payload.active,coordinate:F,dataKey:u.payload.dataKey,index:String(S.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox});r(M)}}};return ns.on(jh,c),()=>{ns.off(jh,c)}},[l,r,t,e,n,i,a,s])}function qF(){var e=Me(Zm),t=Me(Qm),r=ot();v.useEffect(()=>{if(e==null)return qi;var n=(i,a,s)=>{t!==s&&e===i&&r($F(a))};return ns.on(Zb,n),()=>{ns.off(Zb,n)}},[r,t,e])}function YF(){var e=ot();v.useEffect(()=>{e(DF())},[e]),KF(),qF()}function GF(e,t,r,n,i,a){var s=Me(m=>rF(m,e,t)),l=Me(Qm),c=Me(Zm),d=Me(lE),u=Me(_F),f=u?.active,h=ru();v.useEffect(()=>{if(!f&&c!=null&&l!=null){var m=wh({active:a,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h});ns.emit(jh,c,m,l)}},[f,r,s,i,n,l,c,d,a,h])}function e1(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 t1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e1(Object(r),!0).forEach(function(n){XF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XF(e,t,r){return(t=ZF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZF(e){var t=QF(e,"string");return typeof t=="symbol"?t:t+""}function QF(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 JF(e){return e.dataKey}function e9(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(G3,t)}var r1=[],t9={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Gi.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function bl(e){var t,r,n=Kt(e,t9),{active:i,allowEscapeViewBox:a,animationDuration:s,animationEasing:l,content:c,filterNull:d,isAnimationActive:u,offset:f,payloadUniqBy:h,position:m,reverseDirection:g,useTranslate3d:x,wrapperStyle:y,cursor:w,shared:b,trigger:E,defaultIndex:P,portal:j,axisId:S}=n,O=ot(),k=typeof P=="number"?String(P):P;v.useEffect(()=>{O(tz({shared:b,trigger:E,axisId:S,active:i,defaultIndex:k}))},[O,b,E,S,i,k]);var I=ru(),_=Gj(),$=XL(b),{activeIndex:R,isActive:z}=(t=Me(Ce=>oF(Ce,$,E,k)))!==null&&t!==void 0?t:{},F=Me(Ce=>iF(Ce,$,E,k)),M=Me(Ce=>fP(Ce,$,E,k)),D=Me(Ce=>nF(Ce,$,E,k)),A=F,T=TF(),N=(r=i??z)!==null&&r!==void 0?r:!1,[U,H]=nj([A,N]),V=$==="axis"?M:void 0;GF($,E,D,V,R,N);var K=j??T;if(K==null||I==null||$==null)return null;var oe=A??r1;N||(oe=r1),d&&oe.length&&(oe=ZS(oe.filter(Ce=>Ce.value!=null&&(Ce.hide!==!0||n.includeHidden)),h,JF));var pe=oe.length>0,ve=C.createElement(r5,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:u,active:N,coordinate:D,hasPayload:pe,offset:f,position:m,reverseDirection:g,useTranslate3d:x,viewBox:I,wrapperStyle:y,lastBoundingBox:U,innerRef:H,hasPortalFromProps:!!j},e9(c,t1(t1({},n),{},{payload:oe,label:V,active:N,activeIndex:R,coordinate:D,accessibilityLayer:_})));return C.createElement(C.Fragment,null,xo.createPortal(ve,K),N&&C.createElement(kF,{cursor:w,tooltipEventType:$,coordinate:D,payload:oe,index:R}))}var ui=e=>null;ui.displayName="Cell";function r9(e,t,r){return(t=n9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n9(e){var t=i9(e,"string");return typeof t=="symbol"?t:t+""}function i9(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 o9{constructor(t){r9(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 n1(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 a9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n1(Object(r),!0).forEach(function(n){s9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s9(e,t,r){return(t=l9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l9(e){var t=c9(e,"string");return typeof t=="symbol"?t:t+""}function c9(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 u9={cacheSize:2e3,enableCache:!0},yP=a9({},u9),i1=new o9(yP.cacheSize),d9={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},o1="recharts_measurement_span";function f9(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 a1=(e,t)=>{try{var r=document.getElementById(o1);r||(r=document.createElement("span"),r.setAttribute("id",o1),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,d9,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ta=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Gi.isSsr)return{width:0,height:0};if(!yP.enableCache)return a1(t,r);var n=f9(t,r),i=i1.get(n);if(i)return i;var a=a1(t,r);return i1.set(n,a),a},s1=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,l1=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,p9=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,h9=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,xP={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},m9=Object.keys(xP),mo="NaN";function g9(e,t){return e*xP[t]}class cr{static parse(t){var r,[,n,i]=(r=h9.exec(t))!==null&&r!==void 0?r:[];return new cr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Qr(t)&&(this.unit=""),r!==""&&!p9.test(r)&&(this.num=NaN,this.unit=""),m9.includes(r)&&(this.num=g9(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new cr(NaN,""):new cr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new cr(NaN,""):new cr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new cr(NaN,""):new cr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new cr(NaN,""):new cr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Qr(this.num)}}function bP(e){if(e.includes(mo))return mo;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=s1.exec(t))!==null&&r!==void 0?r:[],s=cr.parse(n??""),l=cr.parse(a??""),c=i==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return mo;t=t.replace(s1,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,u,f,h]=(d=l1.exec(t))!==null&&d!==void 0?d:[],m=cr.parse(u??""),g=cr.parse(h??""),x=f==="+"?m.add(g):m.subtract(g);if(x.isNaN())return mo;t=t.replace(l1,x.toString())}return t}var c1=/\(([^()]*)\)/;function v9(e){for(var t=e,r;(r=c1.exec(t))!=null;){var[,n]=r;t=t.replace(c1,bP(n))}return t}function y9(e){var t=e.replace(/\s+/g,"");return t=v9(t),t=bP(t),t}function x9(e){try{return y9(e)}catch{return mo}}function $f(e){var t=x9(e.slice(5,-1));return t===mo?"":t}var b9=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],w9=["dx","dy","angle","className","breakAll"];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 u1(e,t){if(e==null)return{};var r,n,i=C9(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 C9(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 wP=/[ \f\n\r\t\v\u2028\u2029]+/,CP=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Ut(t)||(r?i=t.toString().split(""):i=t.toString().split(wP));var a=i.map(l=>({word:l,width:Ta(l,n).width})),s=r?0:Ta(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}};function S9(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var SP=(e,t,r,n)=>e.reduce((i,a)=>{var{word:s,width:l}=a,c=i[i.length-1];if(c&&l!=null&&(t==null||n||c.width+l+r<Number(t)))c.words.push(s),c.width+=l+r;else{var d={words:[s],width:l};i.push(d)}return i},[]),jP=e=>e.reduce((t,r)=>t.width>r.width?t:r),j9="…",d1=(e,t,r,n,i,a,s,l)=>{var c=e.slice(0,t),d=CP({breakAll:r,style:n,children:c+j9});if(!d)return[!1,[]];var u=SP(d.wordsWithComputedWidth,a,s,l),f=u.length>i||jP(u).width>Number(a);return[f,u]},E9=(e,t,r,n,i)=>{var{maxLines:a,children:s,style:l,breakAll:c}=e,d=Re(a),u=String(s),f=SP(t,n,r,i);if(!d||i)return f;var h=f.length>a||jP(f).width>Number(n);if(!h)return f;for(var m=0,g=u.length-1,x=0,y;m<=g&&x<=u.length-1;){var w=Math.floor((m+g)/2),b=w-1,[E,P]=d1(u,b,c,l,a,n,r,i),[j]=d1(u,w,c,l,a,n,r,i);if(!E&&!j&&(m=w+1),E&&j&&(g=w-1),!E&&j){y=P;break}x++}return y||f},f1=e=>{var t=Ut(e)?[]:e.toString().split(wP);return[{words:t,width:void 0}]},P9=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:s}=e;if((t||r)&&!Gi.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 f1(n);return E9({breakAll:a,children:n,maxLines:s,style:i},l,c,t,!!r)}return f1(n)},EP="#808080",O9={breakAll:!1,capHeight:"0.71em",fill:EP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},wu=v.forwardRef((e,t)=>{var r=Kt(e,O9),{x:n,y:i,lineHeight:a,capHeight:s,fill:l,scaleToFit:c,textAnchor:d,verticalAnchor:u}=r,f=u1(r,b9),h=v.useMemo(()=>P9({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:c,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,c,f.style,f.width]),{dx:m,dy:g,angle:x,className:y,breakAll:w}=f,b=u1(f,w9);if(!mn(n)||!mn(i)||h.length===0)return null;var E=Number(n)+(Re(m)?m:0),P=Number(i)+(Re(g)?g:0);if(!Ct(E)||!Ct(P))return null;var j;switch(u){case"start":j=$f("calc(".concat(s,")"));break;case"middle":j=$f("calc(".concat((h.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:j=$f("calc(".concat(h.length-1," * -").concat(a,")"));break}var S=[];if(c){var O=h[0].width,{width:k}=f;S.push("scale(".concat(Re(k)&&Re(O)?k/O:1,")"))}return x&&S.push("rotate(".concat(x,", ").concat(E,", ").concat(P,")")),S.length&&(b.transform=S.join(" ")),C.createElement("text",Eh({},Dr(b),{ref:t,x:E,y:P,className:Je("recharts-text",y),textAnchor:d,fill:l.includes("url")?EP:l}),h.map((I,_)=>{var $=I.words.join(w?"":" ");return C.createElement("tspan",{x:E,dy:_===0?j:a,key:"".concat($,"-").concat(_)},$)}))});wu.displayName="Text";var k9=["labelRef"];function T9(e,t){if(e==null)return{};var r,n,i=I9(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 I9(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 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 bt(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){M9(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 M9(e,t,r){return(t=R9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R9(e){var t=A9(e,"string");return typeof t=="symbol"?t:t+""}function A9(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 En(){return En=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},En.apply(null,arguments)}var PP=v.createContext(null),N9=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s,children:l}=e,c=v.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s}),[t,r,n,i,a,s]);return C.createElement(PP.Provider,{value:c},l)},OP=()=>{var e=v.useContext(PP),t=ru();return e||Hj(t)},D9=v.createContext(null),_9=()=>{var e=v.useContext(D9),t=Me(pE);return e||t},B9=e=>{var{value:t,formatter:r}=e,n=Ut(e.children)?t:e.children;return typeof r=="function"?r(n):n},Ag=e=>e!=null&&typeof e=="function",$9=(e,t)=>{var r=Ht(t-e),n=Math.min(Math.abs(t-e),360);return r*n},L9=(e,t,r,n,i)=>{var{offset:a,className:s}=e,{cx:l,cy:c,innerRadius:d,outerRadius:u,startAngle:f,endAngle:h,clockWise:m}=i,g=(d+u)/2,x=$9(f,h),y=x>=0?1:-1,w,b;switch(t){case"insideStart":w=f+y*a,b=m;break;case"insideEnd":w=h-y*a,b=!m;break;case"end":w=h+y*a,b=m;break;default:throw new Error("Unsupported position ".concat(t))}b=x<=0?b:!b;var E=Pt(l,c,g,w),P=Pt(l,c,g,w+(b?1:-1)*359),j="M".concat(E.x,",").concat(E.y,`
|
|
1110
|
-
A`).concat(g,",").concat(g,",0,1,").concat(b?0:1,`,
|
|
1111
|
-
`).concat(P.x,",").concat(P.y),S=Ut(e.id)?Ua("recharts-radial-line-"):e.id;return C.createElement("text",En({},n,{dominantBaseline:"central",className:Je("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:S,d:j})),C.createElement("textPath",{xlinkHref:"#".concat(S)},r))},z9=(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}=Pt(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:m,y:g}=Pt(n,i,h,d);return{x:m,y:g,textAnchor:"middle",verticalAnchor:"middle"}},Ph=e=>"cx"in e&&Re(e.cx),F9=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!Ph(r)&&(a=r);var{x:s,y:l,upperWidth:c,lowerWidth:d,height:u}=t,f=s,h=s+(c-d)/2,m=(f+h)/2,g=(c+d)/2,x=f+c/2,y=u>=0?1:-1,w=y*n,b=y>0?"end":"start",E=y>0?"start":"end",P=c>=0?1:-1,j=P*n,S=P>0?"end":"start",O=P>0?"start":"end";if(i==="top"){var k={x:f+c/2,y:l-w,textAnchor:"middle",verticalAnchor:b};return bt(bt({},k),a?{height:Math.max(l-a.y,0),width:c}:{})}if(i==="bottom"){var I={x:h+d/2,y:l+u+w,textAnchor:"middle",verticalAnchor:E};return bt(bt({},I),a?{height:Math.max(a.y+a.height-(l+u),0),width:d}:{})}if(i==="left"){var _={x:m-j,y:l+u/2,textAnchor:S,verticalAnchor:"middle"};return bt(bt({},_),a?{width:Math.max(_.x-a.x,0),height:u}:{})}if(i==="right"){var $={x:m+g+j,y:l+u/2,textAnchor:O,verticalAnchor:"middle"};return bt(bt({},$),a?{width:Math.max(a.x+a.width-$.x,0),height:u}:{})}var R=a?{width:g,height:u}:{};return i==="insideLeft"?bt({x:m+j,y:l+u/2,textAnchor:O,verticalAnchor:"middle"},R):i==="insideRight"?bt({x:m+g-j,y:l+u/2,textAnchor:S,verticalAnchor:"middle"},R):i==="insideTop"?bt({x:f+c/2,y:l+w,textAnchor:"middle",verticalAnchor:E},R):i==="insideBottom"?bt({x:h+d/2,y:l+u-w,textAnchor:"middle",verticalAnchor:b},R):i==="insideTopLeft"?bt({x:f+j,y:l+w,textAnchor:O,verticalAnchor:E},R):i==="insideTopRight"?bt({x:f+c-j,y:l+w,textAnchor:S,verticalAnchor:E},R):i==="insideBottomLeft"?bt({x:h+j,y:l+u-w,textAnchor:O,verticalAnchor:b},R):i==="insideBottomRight"?bt({x:h+d-j,y:l+u-w,textAnchor:S,verticalAnchor:b},R):i&&typeof i=="object"&&(Re(i.x)||An(i.x))&&(Re(i.y)||An(i.y))?bt({x:s+tr(i.x,g),y:l+tr(i.y,u),textAnchor:"end",verticalAnchor:"end"},R):bt({x,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},R)},V9={offset:5,zIndex:Qt.label};function ai(e){var t=Kt(e,V9),{viewBox:r,position:n,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:d}=t,u=_9(),f=OP(),h=n==="center"?f:u??f,m,g,x;if(r==null?m=h:Ph(r)?m=r:m=Hj(r),!m||Ut(i)&&Ut(a)&&!v.isValidElement(s)&&typeof s!="function")return null;var y=bt(bt({},t),{},{viewBox:m});if(v.isValidElement(s)){var w=T9(y,k9);return v.cloneElement(s,w)}if(typeof s=="function"){if(g=v.createElement(s,y),v.isValidElement(g))return g}else g=B9(t);var b=Dr(t);if(Ph(m)){if(n==="insideStart"||n==="insideEnd"||n==="end")return L9(t,n,g,b,m);x=z9(m,t.offset,t.position)}else x=F9(t,m);return C.createElement(tn,{zIndex:t.zIndex},C.createElement(wu,En({ref:d,className:Je("recharts-label",l)},b,x,{textAnchor:S9(b.textAnchor)?b.textAnchor:x.textAnchor,breakAll:c}),g))}ai.displayName="Label";var H9=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?C.createElement(ai,En({key:"label-implicit"},n)):mn(e)?C.createElement(ai,En({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===ai?v.cloneElement(e,bt({key:"label-implicit"},n)):C.createElement(ai,En({key:"label-implicit",content:e},n)):Ag(e)?C.createElement(ai,En({key:"label-implicit",content:e},n)):e&&typeof e=="object"?C.createElement(ai,En({},e,{key:"label-implicit"},n)):null};function W9(e){var{label:t,labelRef:r}=e,n=OP();return H9(t,n,r)||null}var Lf={},zf={},h1;function U9(){return h1||(h1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(zf)),zf}var Ff={},m1;function K9(){return m1||(m1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Ff)),Ff}var g1;function q9(){return g1||(g1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U9(),r=K9(),n=hm();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Lf)),Lf}var Vf,v1;function Y9(){return v1||(v1=1,Vf=q9().last),Vf}var G9=Y9();const X9=jr(G9);var Z9=["valueAccessor"],Q9=["dataKey","clockWise","id","textBreakAll","zIndex"];function Cc(){return Cc=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},Cc.apply(null,arguments)}function y1(e,t){if(e==null)return{};var r,n,i=J9(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 J9(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 e7=e=>Array.isArray(e.value)?X9(e.value):e.value,kP=v.createContext(void 0),t7=kP.Provider,TP=v.createContext(void 0),r7=TP.Provider;function n7(){return v.useContext(kP)}function i7(){return v.useContext(TP)}function Rl(e){var{valueAccessor:t=e7}=e,r=y1(e,Z9),{dataKey:n,id:i,textBreakAll:a,zIndex:s}=r,l=y1(r,Q9),c=n7(),d=i7(),u=c||d;return!u||!u.length?null:C.createElement(tn,{zIndex:s??Qt.label},C.createElement(ar,{className:"recharts-label-list"},u.map((f,h)=>{var m,g=Ut(n)?t(f,h):ht(f&&f.payload,n),x=Ut(i)?{}:{id:"".concat(i,"-").concat(h)};return C.createElement(ai,Cc({key:"label-".concat(h)},Dr(f),l,x,{fill:(m=r.fill)!==null&&m!==void 0?m:f.fill,parentViewBox:f.parentViewBox,value:g,textBreakAll:a,viewBox:f.viewBox,index:h,zIndex:0}))})))}Rl.displayName="LabelList";function IP(e){var{label:t}=e;return t?t===!0?C.createElement(Rl,{key:"labelList-implicit"}):C.isValidElement(t)||Ag(t)?C.createElement(Rl,{key:"labelList-implicit",content:t}):typeof t=="object"?C.createElement(Rl,Cc({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var MP=e=>e.graphicalItems.polarItems,o7=ee([ft,Ss],ig),Cu=ee([MP,mt,o7],ag),a7=ee([Cu],sg),Su=ee([a7,Km],lg),s7=ee([Su,mt,Cu],ug);ee([Su,mt,Cu],(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 x1=()=>{},l7=ee([Su,mt,Cu,vu,ft],hg),c7=ee([mt,fg,pg,x1,l7,x1,Ue,ft],mg),RP=ee([mt,Ue,Su,s7,Cs,ft,c7],gg),u7=ee([RP,mt,Ko],xg);ee([mt,RP,u7,ft],wg);var d7={radiusAxis:{},angleAxis:{}},f7=fr({name:"polarAxis",initialState:d7,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]}}}),p7=f7.reducer;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 w1(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){h7(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 h7(e,t,r){return(t=m7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=g7(e,"string");return typeof t=="symbol"?t:t+""}function g7(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 v7=(e,t)=>t,Ng=ee([MP,v7],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),y7=[],Dg=(e,t,r)=>r?.length===0?y7:r,AP=ee([Km,Ng,Dg],(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=>w1(w1({},t.presentationProps),a.props))),i!=null)return i}}),x7=ee([AP,Ng,Dg],(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:Zc(s,t.dataKey),color:l,payload:n,type:t.legendType}})}),b7=ee([AP,Ng,Dg,Dt],(e,t,r,n)=>{if(!(t==null||e==null))return yV({offset:n,pieSettings:t,displayedData:e,cells:r})}),C1=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",S1=null,Hf=null,NP=e=>{if(e===S1&&Array.isArray(Hf))return Hf;var t=[];return v.Children.forEach(e,r=>{Ut(r)||(jl.isFragment(r)?t=t.concat(NP(r.props.children)):t.push(r))}),Hf=t,S1=e,t};function _g(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>C1(i)):n=[C1(t)],NP(e).forEach(i=>{var a=Li(i,"type.displayName")||Li(i,"type.name");a&&n.indexOf(a)!==-1&&r.push(i)}),r}var Wf={},j1;function w7(){return j1||(j1=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})(Wf)),Wf}var Uf,E1;function C7(){return E1||(E1=1,Uf=w7().isPlainObject),Uf}var S7=C7();const j7=jr(S7);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 O1(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){E7(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 E7(e,t,r){return(t=P7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P7(e){var t=O7(e,"string");return typeof t=="symbol"?t:t+""}function O7(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 Sc(){return Sc=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},Sc.apply(null,arguments)}var k1=(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},k7={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},T7=e=>{var t=Kt(e,k7),{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),[m,g]=v.useState(-1),x=v.useRef(i),y=v.useRef(a),w=v.useRef(s),b=v.useRef(r),E=v.useRef(n),P=au(e,"trapezoid-");if(v.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var F=h.current.getTotalLength();F&&g(F)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||s!==+s||i===0&&a===0||s===0)return null;var j=Je("recharts-trapezoid",l);if(!f)return C.createElement("g",null,C.createElement("path",Sc({},Dr(t),{className:j,d:k1(r,n,i,a,s)})));var S=x.current,O=y.current,k=w.current,I=b.current,_=E.current,$="0px ".concat(m===-1?1:m,"px"),R="".concat(m,"px 0px"),z=Xj(["strokeDasharray"],d,c);return C.createElement(ou,{animationId:P,key:P,canBegin:m>0,duration:d,easing:c,isActive:f,begin:u},F=>{var M=Tt(S,i,F),D=Tt(O,a,F),A=Tt(k,s,F),T=Tt(I,r,F),N=Tt(_,n,F);h.current&&(x.current=M,y.current=D,w.current=A,b.current=T,E.current=N);var U=F>0?{transition:z,strokeDasharray:R}:{strokeDasharray:$};return C.createElement("path",Sc({},Dr(t),{className:j,d:k1(T,N,M,D,A),ref:h,style:O1(O1({},U),t.style)}))})},I7=["option","shapeType","propTransformer","activeClassName","isActive"];function M7(e,t){if(e==null)return{};var r,n,i=R7(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 R7(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 T1(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 jc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){A7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A7(e,t,r){return(t=N7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N7(e){var t=D7(e,"string");return typeof t=="symbol"?t:t+""}function D7(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 _7(e,t){return jc(jc({},t),e)}function B7(e,t){return e==="symbols"}function I1(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return C.createElement(e2,r);case"trapezoid":return C.createElement(T7,r);case"sector":return C.createElement(i2,r);case"symbols":if(B7(t))return C.createElement(pm,r);break;case"curve":return C.createElement(Em,r);default:return null}}function $7(e){return v.isValidElement(e)?e.props:e}function DP(e){var{option:t,shapeType:r,propTransformer:n=_7,activeClassName:i="recharts-active-shape",isActive:a}=e,s=M7(e,I7),l;if(v.isValidElement(t))l=v.cloneElement(t,jc(jc({},s),$7(t)));else if(typeof t=="function")l=t(s);else if(j7(t)&&typeof t!="boolean"){var c=n(t,s);l=C.createElement(I1,{shapeType:r,elementProps:c})}else{var d=s;l=C.createElement(I1,{shapeType:r,elementProps:d})}return a?C.createElement(ar,{className:i},l):l}var Bg=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(UE({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},$g=e=>{var t=ot();return(r,n)=>i=>{e?.(r,n,i),t(rz())}},Lg=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(nz({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function _P(e){var{fn:t,args:r}=e,n=ot(),i=pr();return v.useLayoutEffect(()=>{if(!i){var a=t(r);return n(JL(a)),()=>{n(ez(a))}}},[t,r,n,i]),null}function L7(e){var{legendPayload:t}=e,r=ot(),n=pr();return v.useLayoutEffect(()=>n?qi:(r(Kj(t)),()=>{r(qj(t))}),[r,n,t]),null}function z7(e){var{legendPayload:t}=e,r=ot(),n=Me(Ue);return v.useLayoutEffect(()=>n!=="centric"&&n!=="radial"?qi:(r(Kj(t)),()=>{r(qj(t))}),[r,n,t]),null}var Kf,F7=()=>{var[e]=C.useState(()=>Ua("uid-"));return e},V7=(Kf=C.useId)!==null&&Kf!==void 0?Kf:F7;function BP(e,t){var r=V7();return t||(e?"".concat(e,"-").concat(r):r)}var H7=v.createContext(void 0),$P=e=>{var{id:t,type:r,children:n}=e,i=BP("recharts-".concat(r),t);return C.createElement(H7.Provider,{value:i},n(i))},W7={cartesianItems:[],polarItems:[]},LP=fr({name:"graphicalItems",initialState:W7,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Mt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=In(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:Mt()},removeCartesianGraphicalItem:{reducer(e,t){var r=In(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Mt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Mt()},removePolarGraphicalItem:{reducer(e,t){var r=In(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Mt()}}}),{addCartesianGraphicalItem:U7,replaceCartesianGraphicalItem:K7,removeCartesianGraphicalItem:q7,addPolarGraphicalItem:Y7,removePolarGraphicalItem:G7}=LP.actions,X7=LP.reducer;function Z7(e){var t=ot(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(U7(e)):r.current!==e&&t(K7({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(q7(r.current)),r.current=null)},[t]),null}function Q7(e){var t=ot();return v.useLayoutEffect(()=>(t(Y7(e)),()=>{t(G7(e))}),[t,e]),null}var J7=["onMouseEnter","onClick","onMouseLeave"],eV=["id"],tV=["id"];function zg(e,t){if(e==null)return{};var r,n,i=rV(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 rV(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 M1(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 ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M1(Object(r),!0).forEach(function(n){nV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nV(e,t,r){return(t=iV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iV(e){var t=oV(e,"string");return typeof t=="symbol"?t:t+""}function oV(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)}function aV(e){var t=v.useMemo(()=>_g(e.children,ui),[e.children]),r=Me(n=>x7(n,e.id,t));return r==null?null:C.createElement(z7,{legendPayload:r})}function sV(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:Zc(l,t),hide:c,type:d,color:s,unit:""}}}var lV=(e,t)=>e>t?"start":e<t?"end":"middle",cV=(e,t,r)=>tr(typeof t=="function"?t(e):t,r,r*.8),uV=(e,t,r)=>{var{top:n,left:i,width:a,height:s}=t,l=t2(a,s),c=i+tr(e.cx,a,a/2),d=n+tr(e.cy,s,s/2),u=tr(e.innerRadius,l,0),f=cV(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}},dV=(e,t)=>{var r=Ht(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function fV(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var pV=(e,t)=>{if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return e(t);var r=Je("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return C.createElement(Em,hi({},t,{type:"linear",className:r}))},hV=(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=Je("recharts-pie-label-text",fV(e));return C.createElement(wu,hi({},t,{alignmentBaseline:"middle",className:i}),n)};function mV(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:s}=r;if(!n||!i||!t)return null;var l=Zr(r),c=Wa(i),d=Wa(a),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((h,m)=>{var g=(h.startAngle+h.endAngle)/2,x=Pt(h.cx,h.cy,h.outerRadius+u,g),y=ut(ut(ut(ut({},l),h),{},{stroke:"none"},c),{},{index:m,textAnchor:lV(x.x,h.cx)},x),w=ut(ut(ut(ut({},l),h),{},{fill:"none",stroke:h.fill},d),{},{index:m,points:[Pt(h.cx,h.cy,h.outerRadius,g),x],key:"line"});return C.createElement(tn,{zIndex:Qt.label,key:"label-".concat(h.startAngle,"-").concat(h.endAngle,"-").concat(h.midAngle,"-").concat(m)},C.createElement(ar,null,a&&pV(a,w),hV(i,y,ht(h,s))))});return C.createElement(ar,{className:"recharts-pie-labels"},f)}function gV(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?C.createElement(IP,{label:i}):C.createElement(mV,{sectors:t,props:r,showLabels:n})}function vV(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=Me(Wi),{onMouseEnter:s,onClick:l,onMouseLeave:c}=i,d=zg(i,J7),u=Bg(s,i.dataKey),f=$g(c),h=Lg(l,i.dataKey);return t==null||t.length===0?null:C.createElement(C.Fragment,null,t.map((m,g)=>{if(m?.startAngle===0&&m?.endAngle===0&&t.length!==1)return null;var x=r&&String(g)===a,y=a?n:null,w=x?r:y,b=ut(ut({},m),{},{stroke:m.stroke,tabIndex:-1,[$j]:g,[Lj]:i.dataKey});return C.createElement(ar,hi({key:"sector-".concat(m?.startAngle,"-").concat(m?.endAngle,"-").concat(m.midAngle,"-").concat(g),tabIndex:-1,className:"recharts-pie-sector"},ps(d,m,g),{onMouseEnter:u(m,g),onMouseLeave:f(m,g),onClick:h(m,g)}),C.createElement(DP,hi({option:w,isActive:x,shapeType:"sector"},b)))}))}function yV(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),m=dV(l,c),g=Math.abs(m),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=(g>=360?y:y-1)*x,b=g-y*h-w,E=n.reduce((S,O)=>{var k=ht(O,d,0);return S+(Re(k)?k:0)},0),P;if(E>0){var j;P=n.map((S,O)=>{var k=ht(S,d,0),I=ht(S,u,O),_=uV(r,a,S),$=(Re(k)?k:0)/E,R,z=ut(ut({},S),i&&i[O]&&i[O].props);O?R=j.endAngle+Ht(m)*x*(k!==0?1:0):R=l;var F=R+Ht(m)*((k!==0?h:0)+$*b),M=(R+F)/2,D=(_.innerRadius+_.outerRadius)/2,A=[{name:I,value:k,payload:z,dataKey:d,type:f}],T=Pt(_.cx,_.cy,D,M);return j=ut(ut(ut(ut({},r.presentationProps),{},{percent:$,cornerRadius:typeof s=="string"?parseFloat(s):s,name:I,tooltipPayload:A,midAngle:M,middleRadius:D,tooltipPosition:T},z),_),{},{value:k,startAngle:R,endAngle:F,payload:z,paddingAngle:Ht(m)*x}),j})}return P}function xV(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(r7,{value:t?i:void 0},n)}function bV(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=au(t,"recharts-pie-"),m=r.current,[g,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(xV,{showLabels:!g,sectors:n},C.createElement(ou,{animationId:h,begin:a,duration:s,isActive:i,easing:l,onAnimationStart:w,onAnimationEnd:y,key:h},b=>{var E=[],P=n&&n[0],j=P?.startAngle;return n?.forEach((S,O)=>{var k=m&&m[O],I=O>0?Li(S,"paddingAngle",0):0;if(k){var _=Tt(k.endAngle-k.startAngle,S.endAngle-S.startAngle,b),$=ut(ut({},S),{},{startAngle:j+I,endAngle:j+_+I});E.push($),j=$.endAngle}else{var{endAngle:R,startAngle:z}=S,F=Tt(0,R-z,b),M=ut(ut({},S),{},{startAngle:j+I,endAngle:j+F+I});E.push(M),j=M.endAngle}}),r.current=E,C.createElement(ar,null,C.createElement(vV,{sectors:E,activeShape:c,inactiveShape:d,allOtherPieProps:t}))}),C.createElement(gV,{showLabels:!g,sectors:n,props:t}),t.children)}var wV={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!Gi.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Qt.area};function CV(e){var{id:t}=e,r=zg(e,eV),{hide:n,className:i,rootTabIndex:a}=e,s=v.useMemo(()=>_g(e.children,ui),[e.children]),l=Me(u=>b7(u,t,s)),c=v.useRef(null),d=Je("recharts-pie",i);return n||l==null?(c.current=null,C.createElement(ar,{tabIndex:a,className:d})):C.createElement(tn,{zIndex:e.zIndex},C.createElement(_P,{fn:sV,args:ut(ut({},e),{},{sectors:l})}),C.createElement(ar,{tabIndex:a,className:d},C.createElement(bV,{props:ut(ut({},r),{},{sectors:l}),previousSectorsRef:c})))}function zP(e){var t=Kt(e,wV),{id:r}=t,n=zg(t,tV),i=Zr(n);return C.createElement($P,{id:r,type:"pie"},a=>C.createElement(C.Fragment,null,C.createElement(Q7,{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(aV,hi({},n,{id:a})),C.createElement(CV,hi({},n,{id:a}))))}zP.displayName="Pie";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 A1(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){SV(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 SV(e,t,r){return(t=jV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jV(e){var t=EV(e,"string");return typeof t=="symbol"?t:t+""}function EV(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 PV={xAxis:{},yAxis:{},zAxis:{}},FP=fr({name:"cartesianAxis",initialState:PV,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Mt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Mt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Mt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Mt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Mt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Mt()},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]=A1(A1({},e.yAxis[r]),{},{width:n,widthHistory:s})}}}}),{addXAxis:OV,removeXAxis:kV,addYAxis:TV,removeYAxis:IV,updateYAxisWidth:MV}=FP.actions,RV=FP.reducer,AV=ee([Dt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),NV=ee([AV,Fn,Vn],(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)}}),VP=()=>Me(NV),DV=process.env.NODE_ENV==="production",qf="Invariant failed";function N1(e,t){if(DV)throw new Error(qf);var r=typeof t=="function"?t():t,n=r?"".concat(qf,": ").concat(r):qf;throw new Error(n)}var _V=["x","y"];function Oh(){return Oh=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},Oh.apply(null,arguments)}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 Sa(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){BV(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 BV(e,t,r){return(t=$V(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $V(e){var t=LV(e,"string");return typeof t=="symbol"?t:t+""}function LV(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 zV(e,t){if(e==null)return{};var r,n,i=FV(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 FV(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 VV(e,t){var{x:r,y:n}=e,i=zV(e,_V),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 Sa(Sa(Sa(Sa(Sa({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function Ec(e){return C.createElement(DP,Oh({shapeType:"rectangle",propTransformer:VV,activeClassName:"recharts-active-bar"},e))}var HV=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(Re(t))return t;var a=Re(n)||Ut(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?N1(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):N1()),r)}},WV={},UV=fr({name:"errorBars",initialState:WV,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))}}}),KV=UV.reducer,qV=["children"];function YV(e,t){if(e==null)return{};var r,n,i=GV(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 GV(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 XV={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},ZV=v.createContext(XV);function QV(e){var{children:t}=e,r=YV(e,qV);return C.createElement(ZV.Provider,{value:r},t)}function HP(e,t){var r,n,i=Me(d=>Wn(d,e)),a=Me(d=>Un(d,t)),s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:yr.allowDataOverflow,l=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:xr.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function JV(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=VP(),{needClipX:a,needClipY:s,needClip:l}=HP(t,r);if(!l||!i)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}))}function eH(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ct(e.zIndex)?e.zIndex:t}var tH=["onMouseEnter","onMouseLeave","onClick"],rH=["value","background","tooltipPosition"],nH=["id"],iH=["onMouseEnter","onClick","onMouseLeave"];function Bn(){return Bn=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},Bn.apply(null,arguments)}function _1(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 nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_1(Object(r),!0).forEach(function(n){oH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oH(e,t,r){return(t=aH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aH(e){var t=sH(e,"string");return typeof t=="symbol"?t:t+""}function sH(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 Pc(e,t){if(e==null)return{};var r,n,i=lH(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 lH(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 cH=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Zc(r,t),payload:e}]};function uH(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:Zc(a,t),hide:s,type:e.tooltipType,color:e.fill,unit:l}}}function dH(e){var t=Me(Wi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,d=Pc(a,tH),u=Bg(s,n),f=$g(l),h=Lg(c,n);if(!i||r==null)return null;var m=Wa(i);return C.createElement(tn,{zIndex:eH(i,Qt.barBackground)},r.map((g,x)=>{var{background:y}=g,w=Pc(g,rH);if(!y)return null;var b=u(g,x),E=f(g,x),P=h(g,x),j=nr(nr(nr(nr(nr({option:i,isActive:String(x)===t},w),{},{fill:"#eee"},y),m),ps(d,g,x)),{},{onMouseEnter:b,onMouseLeave:E,onClick:P,dataKey:n,index:x,className:"recharts-bar-background-rectangle"});return C.createElement(Ec,Bn({key:"background-bar-".concat(x)},j))}))}function fH(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var s={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return nr(nr({},s),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:s,fill:a.fill})});return C.createElement(t7,{value:t?i:void 0},r)}function pH(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:s}=e,l=Me(Wi),c=Me(aP),d=r&&String(a)===l&&(c==null||s===c),u=d?r:t;return d?C.createElement(tn,{zIndex:Qt.activeBar},C.createElement(Ec,Bn({},n,{name:String(n.name)},i,{isActive:d,option:u,index:a,dataKey:s}))):C.createElement(Ec,Bn({},n,{name:String(n.name)},i,{isActive:d,option:u,index:a,dataKey:s}))}function hH(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return C.createElement(Ec,Bn({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function mH(e){var t,{data:r,props:n}=e,i=(t=Zr(n))!==null&&t!==void 0?t:{},a=Pc(i,nH),{shape:s,dataKey:l,activeBar:c}=n,{onMouseEnter:d,onClick:u,onMouseLeave:f}=n,h=Pc(n,iH),m=Bg(d,l),g=$g(f),x=Lg(u,l);return r?C.createElement(C.Fragment,null,r.map((y,w)=>C.createElement(ar,Bn({key:"rectangle-".concat(y?.x,"-").concat(y?.y,"-").concat(y?.value,"-").concat(w),className:"recharts-bar-rectangle"},ps(h,y,w),{onMouseEnter:m(y,w),onMouseLeave:g(y,w),onClick:x(y,w)}),c?C.createElement(pH,{shape:s,activeBar:c,baseProps:a,entry:y,index:w,dataKey:l}):C.createElement(hH,{shape:s,baseProps:a,entry:y,index:w,dataKey:l})))):null}function gH(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=au(t,"recharts-bar-"),[m,g]=v.useState(!1),x=!m,y=v.useCallback(()=>{typeof d=="function"&&d(),g(!1)},[d]),w=v.useCallback(()=>{typeof u=="function"&&u(),g(!0)},[u]);return C.createElement(fH,{showLabels:x,rects:n},C.createElement(ou,{animationId:h,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:y,onAnimationStart:w,key:h},b=>{var E=b===1?n:n?.map((P,j)=>{var S=f&&f[j];if(S)return nr(nr({},P),{},{x:Tt(S.x,P.x,b),y:Tt(S.y,P.y,b),width:Tt(S.width,P.width,b),height:Tt(S.height,P.height,b)});if(i==="horizontal"){var O=Tt(0,P.height,b),k=Tt(P.stackedBarStart,P.y,b);return nr(nr({},P),{},{y:k,height:O})}var I=Tt(0,P.width,b),_=Tt(P.stackedBarStart,P.x,b);return nr(nr({},P),{},{width:I,x:_})});return b>0&&(r.current=E??null),E==null?null:C.createElement(ar,null,C.createElement(mH,{props:t,data:E}))}),C.createElement(IP,{label:t.label}),t.children)}function vH(e){var t=v.useRef(null);return C.createElement(gH,{previousRectanglesRef:t,props:e})}var WP=0,yH=(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 xH 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=Je("recharts-bar",i),f=d;return C.createElement(ar,{className:u,id:d},l&&C.createElement("defs",null,C.createElement(JV,{clipPathId:f,xAxisId:a,yAxisId:s})),C.createElement(ar,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(f,")"):void 0},C.createElement(dH,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),C.createElement(vH,this.props)))}}var bH={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!Gi.isSsr,legendType:"rect",minPointSize:WP,xAxisId:0,yAxisId:0,zIndex:Qt.bar};function wH(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}=HP(t,r),h=nu(),m=pr(),g=_g(e.children,ui),x=Me(b=>GH(b,t,r,m,e.id,g));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(QV,{xAxisId:t,yAxisId:r,data:x,dataPointFormatter:yH,errorBarOffset:y},C.createElement(xH,Bn({},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 CH(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:m,parentViewBox:g,dataStartIndex:x}=e,y=t==="horizontal"?l:s,w=u?y.scale.domain():null,b=UB({numericAxis:y}),E=y.scale(b);return f.map((P,j)=>{var S,O,k,I,_,$;u?S=LB(u[j+x],w):(S=ht(P,r),Array.isArray(S)||(S=[b,S]));var R=HV(n,WP)(S[1],j);if(t==="horizontal"){var z,[F,M]=[l.scale(S[0]),l.scale(S[1])];O=fx({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:P,index:j}),k=(z=M??F)!==null&&z!==void 0?z:void 0,I=i.size;var D=F-M;if(_=Qr(D)?0:D,$={x:O,y:h.top,width:I,height:h.height},Math.abs(R)>0&&Math.abs(_)<Math.abs(R)){var A=Ht(_||R)*(Math.abs(R)-Math.abs(_));k-=A,_+=A}}else{var[T,N]=[s.scale(S[0]),s.scale(S[1])];if(O=T,k=fx({axis:l,ticks:d,bandSize:a,offset:i.offset,entry:P,index:j}),I=N-T,_=i.size,$={x:h.left,y:k,width:h.width,height:_},Math.abs(R)>0&&Math.abs(I)<Math.abs(R)){var U=Ht(I||R)*(Math.abs(R)-Math.abs(I));I+=U}}if(O==null||k==null||I==null||_==null)return null;var H=nr(nr({},P),{},{stackedBarStart:E,x:O,y:k,width:I,height:_,value:u?S:S[1],payload:P,background:$,tooltipPosition:{x:O+I/2,y:k+_/2},parentViewBox:g},m&&m[j]&&m[j].props);return H}).filter(Boolean)}function SH(e){var t=Kt(e,bH),r=pr();return C.createElement($P,{id:t.id,type:"bar"},n=>C.createElement(C.Fragment,null,C.createElement(L7,{legendPayload:cH(t)}),C.createElement(_P,{fn:uH,args:t}),C.createElement(Z7,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:WB(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),C.createElement(tn,{zIndex:t.zIndex},C.createElement(wH,Bn({},t,{id:n})))))}var Al=C.memo(SH);Al.displayName="Bar";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 wl(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){jH(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 jH(e,t,r){return(t=EH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EH(e){var t=PH(e,"string");return typeof t=="symbol"?t:t+""}function PH(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 OH=(e,t)=>t,kH=(e,t,r)=>r,TH=(e,t,r,n)=>n,IH=(e,t,r,n,i)=>i,Ts=ee([og,IH],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),MH=ee([Ts],e=>e?.maxBarSize),RH=(e,t,r,n,i,a)=>a,$1=(e,t,r)=>{var n=r??e;if(!Ut(n))return tr(n,t,0)},AH=ee([Ue,og,OH,kH,TH],(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")),NH=(e,t,r,n)=>{var i=Ue(e);return i==="horizontal"?bh(e,"yAxis",r,n):bh(e,"xAxis",t,n)},DH=(e,t,r)=>{var n=Ue(e);return n==="horizontal"?Lb(e,"xAxis",t):Lb(e,"yAxis",r)},_H=(e,t,r)=>{var n={},i=e.filter(pu),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(g=>g.dataKey),m=$1(t,r,f[0].barSize);return{stackId:u,dataKeys:h,barSize:m}}),c=a.map(d=>{var u=[d.dataKey].filter(h=>h!=null),f=$1(t,r,d.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...l,...c]},BH=ee([AH,K8,DH],_H),$H=(e,t,r,n,i)=>{var a,s,l=Ts(e,t,r,n,i);if(l!=null){var c=Ue(e),d=aE(e),{maxBarSize:u}=l,f=Ut(u)?d:u,h,m;return c==="horizontal"?(h=Ro(e,"xAxis",t,n),m=Mo(e,"xAxis",t,n)):(h=Ro(e,"yAxis",r,n),m=Mo(e,"yAxis",r,n)),(a=(s=oc(h,m,!0))!==null&&s!==void 0?s:f)!==null&&a!==void 0?a:0}},UP=(e,t,r,n)=>{var i=Ue(e),a,s;return i==="horizontal"?(a=Ro(e,"xAxis",t,n),s=Mo(e,"xAxis",t,n)):(a=Ro(e,"yAxis",r,n),s=Mo(e,"yAxis",r,n)),oc(a,s)};function LH(e,t,r,n,i){var a=n.length;if(!(a<1)){var s=tr(e,r,0,!0),l,c=[];if(Ct(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,m={offset:h-s,size:0};l=n.reduce((w,b)=>{var E,P={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:m.offset+m.size+s,size:d?u:(E=b.barSize)!==null&&E!==void 0?E:0}},j=[...w,P];return m=j[j.length-1].position,j},c)}else{var g=tr(t,r,0,!0);r-2*g-(a-1)*s<=0&&(s=0);var x=(r-2*g-(a-1)*s)/a;x>1&&(x>>=0);var y=Ct(i)?Math.min(x,i):x;l=n.reduce((w,b,E)=>[...w,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:g+(x+s)*E+(x-y)/2,size:y}}],c)}return l}}var zH=(e,t,r,n,i,a,s)=>{var l=Ut(s)?t:s,c=LH(r,n,i!==a?i:a,e,l);return i!==a&&c!=null&&(c=c.map(d=>wl(wl({},d),{},{position:wl(wl({},d.position),{},{offset:d.position.offset-i/2})}))),c},FH=ee([BH,aE,U8,sE,$H,UP,MH],zH),VH=(e,t,r,n)=>Ro(e,"xAxis",t,n),HH=(e,t,r,n)=>Ro(e,"yAxis",r,n),WH=(e,t,r,n)=>Mo(e,"xAxis",t,n),UH=(e,t,r,n)=>Mo(e,"yAxis",r,n),KH=ee([FH,Ts],(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}}),qH=(e,t)=>{var r=rg(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)}}}},YH=ee([NH,Ts],qH),GH=ee([Dt,wm,VH,HH,WH,UH,KH,Ue,qm,UP,YH,Ts,RH],(e,t,r,n,i,a,s,l,c,d,u,f,h)=>{var{chartData:m,dataStartIndex:g,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=m?.slice(g,x+1),w!=null)return CH({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,dataStartIndex:g})}}),KP=e=>{var{chartData:t}=e,r=ot(),n=pr();return v.useEffect(()=>n?()=>{}:(r(Qb(t)),()=>{r(Qb(void 0))}),[t,r,n]),null},L1={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},XH=fr({name:"brush",initialState:L1,reducers:{setBrushSettings(e,t){return t.payload==null?L1:t.payload}}}),ZH=XH.reducer;function QH(e,t,r){return(t=JH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JH(e){var t=eW(e,"string");return typeof t=="symbol"?t:t+""}function eW(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 Fg{static create(t){return new Fg(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}}QH(Fg,"EPS",1e-4);function tW(e){return(e%180+180)%180}var rW=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=tW(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)},nW={dots:[],areas:[],lines:[]},iW=fr({name:"referenceElements",initialState:nW,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=In(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=In(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=In(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),oW=iW.reducer,aW=v.createContext(void 0),sW=e=>{var{children:t}=e,[r]=v.useState("".concat(Ua("recharts"),"-clip")),n=VP();if(n==null)return null;var{x:i,y:a,width:s,height:l}=n;return C.createElement(aW.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 Ao(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 qP(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t)r.push(e[n]);return r}function lW(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return rW(n,r)}function cW(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 Oc(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 uW(e,t){return qP(e,t+1)}function dW(e,t,r,n,i){for(var a=(n||[]).slice(),{start:s,end:l}=t,c=0,d=1,u=s,f=function(){var g=n?.[c];if(g===void 0)return{v:qP(n,d)};var x=c,y,w=()=>(y===void 0&&(y=r(g,x)),y),b=g.coordinate,E=c===0||Oc(e,b,w,u,l);E||(c=0,u=s,d+=1),E&&(u=b+e*(w()/2+i),c+=d)},h;d<=a.length;)if(h=f(),h)return h.v;return[]}function z1(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 Jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z1(Object(r),!0).forEach(function(n){fW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fW(e,t,r){return(t=pW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pW(e){var t=hW(e,"string");return typeof t=="symbol"?t:t+""}function hW(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 mW(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,{start:l}=t,{end:c}=t,d=function(h){var m=a[h],g,x=()=>(g===void 0&&(g=r(m,h)),g);if(h===s-1){var y=e*(m.coordinate+e*x()/2-c);a[h]=m=Jt(Jt({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else a[h]=m=Jt(Jt({},m),{},{tickCoord:m.coordinate});if(m.tickCoord!=null){var w=Oc(e,m.tickCoord,x,l,c);w&&(c=m.tickCoord-e*(x()/2+i),a[h]=Jt(Jt({},m),{},{isShow:!0}))}},u=s-1;u>=0;u--)d(u);return a}function gW(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);if(s[l-1]=u=Jt(Jt({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate}),u.tickCoord!=null){var m=Oc(e,u.tickCoord,()=>f,c,d);m&&(d=u.tickCoord-e*(f/2+i),s[l-1]=Jt(Jt({},u),{},{isShow:!0}))}}for(var g=a?l-1:l,x=function(b){var E=s[b],P,j=()=>(P===void 0&&(P=r(E,b)),P);if(b===0){var S=e*(E.coordinate-e*j()/2-c);s[b]=E=Jt(Jt({},E),{},{tickCoord:S<0?E.coordinate-S*e:E.coordinate})}else s[b]=E=Jt(Jt({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var O=Oc(e,E.tickCoord,j,c,d);O&&(c=E.tickCoord+e*(j()/2+i),s[b]=Jt(Jt({},E),{},{isShow:!0}))}},y=0;y<g;y++)x(y);return s}function Vg(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(Re(c)||Gi.isSsr){var h;return(h=uW(i,Re(c)?c:0))!==null&&h!==void 0?h:[]}var m=[],g=l==="top"||l==="bottom"?"width":"height",x=u&&g==="width"?Ta(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(E,P)=>{var j=typeof d=="function"?d(E.value,P):E.value;return g==="width"?lW(Ta(j,{fontSize:t,letterSpacing:r}),x,f):Ta(j,{fontSize:t,letterSpacing:r})[g]},w=i.length>=2?Ht(i[1].coordinate-i[0].coordinate):1,b=cW(a,w,g);return c==="equidistantPreserveStart"?dW(w,b,y,i,s):(c==="preserveStart"||c==="preserveStartEnd"?m=gW(w,b,y,i,s,c==="preserveStartEnd"):m=mW(w,b,y,i,s),m.filter(E=>E.isShow))}var vW=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},yW=["axisLine","width","height","className","hide","ticks","axisType"],xW=["viewBox"],bW=["viewBox"];function kh(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 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 F1(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 jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F1(Object(r),!0).forEach(function(n){CW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CW(e,t,r){return(t=SW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SW(e){var t=jW(e,"string");return typeof t=="symbol"?t:t+""}function jW(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 Hg={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",zIndex:Qt.axis};function EW(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=jt(jt(jt({},c),Zr(l)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!s||a==="bottom"&&s);d=jt(jt({},d),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!s||a==="right"&&s);d=jt(jt({},d),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return C.createElement("line",Ui({},d,{className:Je("recharts-cartesian-axis-line",Li(l,"className"))}))}function PW(e,t,r,n,i,a,s,l,c){var d,u,f,h,m,g,x=l?-1:1,y=e.tickSize||s,w=Re(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":d=u=e.coordinate,h=r+ +!l*i,f=h-x*y,g=f-x*c,m=w;break;case"left":f=h=e.coordinate,u=t+ +!l*n,d=u-x*y,m=d-x*c,g=w;break;case"right":f=h=e.coordinate,u=t+ +l*n,d=u+x*y,m=d+x*c,g=w;break;default:d=u=e.coordinate,h=r+ +l*i,f=h+x*y,g=f+x*c,m=w;break}return{line:{x1:d,y1:f,x2:u,y2:h},tick:{x:m,y:g}}}function OW(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function kW(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function TW(e){var{option:t,tickProps:r,value:n}=e,i,a=Je(r.className,"recharts-cartesian-axis-tick-value");if(C.isValidElement(t))i=C.cloneElement(t,jt(jt({},r),{},{className:a}));else if(typeof t=="function")i=t(jt(jt({},r),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Je(s,t?.className)),i=C.createElement(wu,Ui({},r,{className:s}),n)}return i}var IW=v.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:d,orientation:u,mirror:f,x:h,y:m,width:g,height:x,tickSize:y,tickMargin:w,fontSize:b,letterSpacing:E,getTicksConfig:P,events:j,axisType:S}=e,O=Vg(jt(jt({},P),{},{ticks:r}),b,E),k=OW(u,f),I=kW(u,f),_=Zr(P),$=Wa(n),R={};typeof i=="object"&&(R=i);var z=jt(jt({},_),{},{fill:"none"},R),F=O.map(A=>jt({entry:A},PW(A,h,m,g,x,u,y,f,w))),M=F.map(A=>{var{entry:T,line:N}=A;return C.createElement(ar,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},i&&C.createElement("line",Ui({},z,N,{className:Je("recharts-cartesian-axis-tick-line",Li(i,"className"))})))}),D=F.map((A,T)=>{var{entry:N,tick:U}=A,H=jt(jt(jt(jt({textAnchor:k,verticalAnchor:I},_),{},{stroke:"none",fill:a},$),U),{},{index:T,payload:N,visibleTicksCount:O.length,tickFormatter:s,padding:c},d);return C.createElement(ar,Ui({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},ps(j,N,T)),n&&C.createElement(TW,{option:n,tickProps:H,value:"".concat(typeof s=="function"?s(N.value,T):N.value).concat(l||"")}))});return C.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(S,"-ticks")},D.length>0&&C.createElement(tn,{zIndex:Qt.label},C.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(S,"-tick-labels"),ref:t},D)),M.length>0&&C.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(S,"-tick-lines")},M))}),MW=v.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:s,ticks:l,axisType:c}=e,d=kh(e,yW),[u,f]=v.useState(""),[h,m]=v.useState(""),g=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return vW({ticks:g.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var x=v.useCallback(y=>{if(y){var w=y.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=w;var b=w[0];if(b){var E=window.getComputedStyle(b),P=E.fontSize,j=E.letterSpacing;(P!==u||j!==h)&&(f(P),m(j))}}},[u,h]);return s||n!=null&&n<=0||i!=null&&i<=0?null:C.createElement(tn,{zIndex:e.zIndex},C.createElement(ar,{className:Je("recharts-cartesian-axis",a)},C.createElement(EW,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Zr(e)}),C.createElement(IW,{ref:x,axisType:c,events:d,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y}),C.createElement(N9,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},C.createElement(W9,{label:e.label,labelRef:e.labelRef}),e.children)))}),RW=C.memo(MW,(e,t)=>{var{viewBox:r}=e,n=kh(e,xW),{viewBox:i}=t,a=kh(t,bW);return Ao(r,i)&&Ao(n,a)}),Wg=C.forwardRef((e,t)=>{var r=Kt(e,Hg);return C.createElement(RW,Ui({},r,{ref:t}))});Wg.displayName="CartesianAxis";var AW=["x1","y1","x2","y2","key"],NW=["offset"],DW=["xAxisId","yAxisId"],_W=["xAxisId","yAxisId"];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 er(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){BW(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 BW(e,t,r){return(t=$W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $W(e){var t=LW(e,"string");return typeof t=="symbol"?t:t+""}function LW(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 Mi(){return Mi=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},Mi.apply(null,arguments)}function kc(e,t){if(e==null)return{};var r,n,i=zW(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 zW(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 FW=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 YP(e){var{option:t,lineItemProps:r}=e,n;if(C.isValidElement(t))n=C.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:a,y1:s,x2:l,y2:c,key:d}=r,u=kc(r,AW),f=(i=Zr(u))!==null&&i!==void 0?i:{},h=kc(f,NW);n=C.createElement("line",Mi({},h,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:d}))}return n}function VW(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var a=kc(e,DW),s=i.map((l,c)=>{var d=er(er({},a),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return C.createElement(YP,{key:"line-".concat(c),option:n,lineItemProps:d})});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function HW(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var a=kc(e,_W),s=i.map((l,c)=>{var d=er(er({},a),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return C.createElement(YP,{option:n,lineItemProps:d,key:"line-".concat(c)})});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function WW(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||l==null)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 m=!d[h+1],g=m?i+s-f:d[h+1]-f;if(g<=0)return null;var x=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:f,x:n,height:g,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 UW(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 m=!d[h+1],g=m?i+s-f:d[h+1]-f;if(g<=0)return null;var x=h%r.length;return C.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:g,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 KW=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return Dj(Vg(er(er(er({},Hg),r),{},{ticks:_j(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},qW=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return Dj(Vg(er(er(er({},Hg),r),{},{ticks:_j(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},YW={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Qt.grid};function Nl(e){var t=Sm(),r=jm(),n=Wj(),i=er(er({},Kt(e,YW)),{},{x:Re(e.x)?e.x:n.left,y:Re(e.y)?e.y:n.top,width:Re(e.width)?e.width:n.width,height:Re(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:d,height:u,syncWithTicks:f,horizontalValues:h,verticalValues:m}=i,g=pr(),x=Me(I=>zb(I,"xAxis",a,g)),y=Me(I=>zb(I,"yAxis",s,g));if(!gn(d)||!gn(u)||!Re(l)||!Re(c))return null;var w=i.verticalCoordinatesGenerator||KW,b=i.horizontalCoordinatesGenerator||qW,{horizontalPoints:E,verticalPoints:P}=i;if((!E||!E.length)&&typeof b=="function"){var j=h&&h.length,S=b({yAxis:y?er(er({},y),{},{ticks:j?h:y.ticks}):void 0,width:t??d,height:r??u,offset:n},j?!0:f);ac(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof S,"]")),Array.isArray(S)&&(E=S)}if((!P||!P.length)&&typeof w=="function"){var O=m&&m.length,k=w({xAxis:x?er(er({},x),{},{ticks:O?m:x.ticks}):void 0,width:t??d,height:r??u,offset:n},O?!0:f);ac(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(P=k)}return C.createElement(tn,{zIndex:i.zIndex},C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(FW,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),C.createElement(WW,Mi({},i,{horizontalPoints:E})),C.createElement(UW,Mi({},i,{verticalPoints:P})),C.createElement(VW,Mi({},i,{offset:n,horizontalPoints:E,xAxis:x,yAxis:y})),C.createElement(HW,Mi({},i,{offset:n,verticalPoints:P,xAxis:x,yAxis:y}))))}Nl.displayName="CartesianGrid";var GW=["dangerouslySetInnerHTML","ticks"],XW=["id"],ZW=["domain"],QW=["domain"];function Th(){return Th=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},Th.apply(null,arguments)}function Tc(e,t){if(e==null)return{};var r,n,i=JW(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 JW(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 eU(e){var t=ot();return v.useLayoutEffect(()=>(t(OV(e)),()=>{t(kV(e))}),[e,t]),null}var tU=e=>{var{xAxisId:t,className:r}=e,n=Me(wm),i=pr(),a="xAxis",s=Me(m=>qo(m,a,t,i)),l=Me(m=>LE(m,a,t,i)),c=Me(m=>DE(m,t)),d=Me(m=>HL(m,t)),u=Me(m=>mE(m,t));if(c==null||d==null||u==null)return null;var f=Tc(e,GW),h=Tc(u,XW);return C.createElement(Wg,Th({},f,h,{scale:s,x:d.x,y:d.y,width:c.width,height:c.height,className:Je("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:l,axisType:a}))},rU={allowDataOverflow:yr.allowDataOverflow,allowDecimals:yr.allowDecimals,allowDuplicatedCategory:yr.allowDuplicatedCategory,height:yr.height,hide:!1,mirror:yr.mirror,orientation:yr.orientation,padding:yr.padding,reversed:yr.reversed,scale:yr.scale,tickCount:yr.tickCount,type:yr.type,xAxisId:0},nU=e=>{var t,r,n,i,a,s=Kt(e,rU);return C.createElement(C.Fragment,null,C.createElement(eU,{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(tU,s))},iU=(e,t)=>{var{domain:r}=e,n=Tc(e,ZW),{domain:i}=t,a=Tc(t,QW);return Ao(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ao({domain:r},{domain:i}):!1},Dl=C.memo(nU,iU);Dl.displayName="XAxis";var oU=["dangerouslySetInnerHTML","ticks"],aU=["id"],sU=["domain"],lU=["domain"];function Ih(){return Ih=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},Ih.apply(null,arguments)}function Ic(e,t){if(e==null)return{};var r,n,i=cU(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 cU(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 uU(e){var t=ot();return v.useLayoutEffect(()=>(t(TV(e)),()=>{t(IV(e))}),[e,t]),null}var dU=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=v.useRef(null),s=v.useRef(null),l=Me(wm),c=pr(),d=ot(),u="yAxis",f=Me(b=>qo(b,u,t,c)),h=Me(b=>_E(b,t)),m=Me(b=>UL(b,t)),g=Me(b=>LE(b,u,t,c)),x=Me(b=>gE(b,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!h||Ag(i)||v.isValidElement(i)||x==null)){var b=a.current;if(b){var E=b.getCalculatedWidth();Math.round(h.width)!==Math.round(E)&&d(MV({id:t,width:E}))}}},[g,h,d,i,t,n,x]),h==null||m==null||x==null)return null;var y=Ic(e,oU),w=Ic(x,aU);return C.createElement(Wg,Ih({},y,w,{ref:a,labelRef:s,scale:f,x:m.x,y:m.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:h.width,height:h.height,className:Je("recharts-".concat(u," ").concat(u),r),viewBox:l,ticks:g,axisType:u}))},fU={allowDataOverflow:xr.allowDataOverflow,allowDecimals:xr.allowDecimals,allowDuplicatedCategory:xr.allowDuplicatedCategory,hide:!1,mirror:xr.mirror,orientation:xr.orientation,padding:xr.padding,reversed:xr.reversed,scale:xr.scale,tickCount:xr.tickCount,type:xr.type,width:xr.width,yAxisId:0},pU=e=>{var t,r,n,i,a,s=Kt(e,fU);return C.createElement(C.Fragment,null,C.createElement(uU,{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(dU,s))},hU=(e,t)=>{var{domain:r}=e,n=Ic(e,sU),{domain:i}=t,a=Ic(t,lU);return Ao(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ao({domain:r},{domain:i}):!1},_l=C.memo(pU,hU);_l.displayName="YAxis";function mU(e){e()}function gU(){let e=null,t=null;return{clear(){e=null,t=null},notify(){mU(()=>{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 H1={notify(){},get:()=>[]};function vU(e,t){let r,n=H1,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(){g.onStateChange&&g.onStateChange()}function d(){return a}function u(){i++,r||(r=e.subscribe(c),n=gU())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=H1)}function h(){a||(a=!0,u())}function m(){a&&(a=!1,f())}const g={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:h,tryUnsubscribe:m,getListeners:()=>n};return g}var yU=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xU=yU(),bU=()=>typeof navigator<"u"&&navigator.product==="ReactNative",wU=bU(),CU=()=>xU||wU?C.useLayoutEffect:C.useEffect,SU=CU(),jU=Symbol.for("react-redux-context"),EU=typeof globalThis<"u"?globalThis:{};function PU(){if(!C.createContext)return{};const e=EU[jU]??=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 OU=PU();function kU(e){const{children:t,context:r,serverState:n,store:i}=e,a=C.useMemo(()=>{const c=vU(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]);SU(()=>{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||OU;return C.createElement(l.Provider,{value:a},t)}var TU=kU,IU=(e,t)=>t,Ug=ee([IU,Ue,pE,Bt,rP,Kn,tF,Dt],lF),Kg=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)}},GP=_r("mouseClick"),XP=vs();XP.startListening({actionCreator:GP,effect:(e,t)=>{var r=e.payload,n=Ug(t.getState(),Kg(r));n?.activeIndex!=null&&t.dispatch(iz({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Mh=_r("mouseMove"),ZP=vs();ZP.startListening({actionCreator:Mh,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=jg(n,n.tooltip.settings.shared),a=Ug(n,Kg(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(qE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(KE()))}});var W1={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0},QP=fr({name:"rootProps",initialState:W1,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:W1.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,e.baseValue=t.payload.baseValue}}}),MU=QP.reducer,{updateOptions:RU}=QP.actions,JP=fr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:AU}=JP.actions,NU=JP.reducer,eO=_r("keyDown"),tO=_r("focus"),qg=vs();qg.startListening({actionCreator:eO,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(Eg(i,Go(r))),l=Kn(r);if(a==="Enter"){var c=wc(r,"axis","hover",String(i.index));t.dispatch(Ch({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:c}));return}var d=GL(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 m=wc(r,"axis","hover",String(h));t.dispatch(Ch({active:!0,activeIndex:h.toString(),activeDataKey:void 0,activeCoordinate:m}))}}}}});qg.startListening({actionCreator:tO,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=wc(r,"axis","hover",String(a));t.dispatch(Ch({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:s}))}}}});var Mr=_r("externalEvent"),rO=vs();rO.startListening({actionCreator:Mr,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:zz(r),activeDataKey:aP(r),activeIndex:Wi(r),activeLabel:oP(r),activeTooltipIndex:Wi(r),isTooltipActive:Fz(r)};e.payload.handler(n,e.payload.reactEvent)}}});var DU=ee([Yo],e=>e.tooltipItemPayloads),_U=ee([DU,Os,(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}}}),nO=_r("touchMove"),iO=vs();iO.startListening({actionCreator:nO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),i=jg(n,n.tooltip.settings.shared);if(i==="axis"){var a=Ug(n,Kg({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(qE({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var s,l=r.touches[0];if(document.elementFromPoint==null)return;var c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var d=c.getAttribute($j),u=(s=c.getAttribute(Lj))!==null&&s!==void 0?s:void 0,f=_U(t.getState(),d,u);t.dispatch(UE({activeDataKey:u,activeIndex:d,activeCoordinate:f}))}}}});var BU=oj({brush:ZH,cartesianAxis:RV,chartData:LF,errorBars:KV,graphicalItems:X7,layout:AB,legend:M3,options:NF,polarAxis:p7,polarOptions:NU,referenceElements:oW,rootProps:MU,tooltip:oz,zIndex:CF}),$U=function(t){return iB({reducer:BU,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([XP.middleware,ZP.middleware,qg.middleware,rO.middleware,iO.middleware]),enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(wj({type:"raf"}))},devTools:Gi.devToolsEnabled})};function oO(e){var{preloadedState:t,children:r}=e,n=pr(),i=v.useRef(null);if(n)return r;i.current==null&&(i.current=$U(t));var a=mm;return C.createElement(TU,{context:a,store:i.current},r)}function aO(e){var{layout:t,margin:r}=e,n=ot(),i=pr();return v.useEffect(()=>{i||(n(IB(t)),n(TB(r)))},[n,i,t,r]),null}function sO(e){var t=ot();return v.useEffect(()=>{t(RU(e))},[t,e]),null}function U1(e){var{zIndex:t,isPanorama:r}=e,n=r?"recharts-zindex-panorama-":"recharts-zindex-",i=BP("".concat(n).concat(t)),a=ot();return v.useLayoutEffect(()=>(a(bF({zIndex:t,elementId:i,isPanorama:r})),()=>{a(wF({zIndex:t,isPanorama:r}))}),[a,t,i,r]),C.createElement("g",{id:i})}function K1(e){var{children:t,isPanorama:r}=e,n=Me(uF);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),a=n.filter(s=>s>0);return C.createElement(C.Fragment,null,i.map(s=>C.createElement(U1,{key:s,zIndex:s,isPanorama:r})),t,a.map(s=>C.createElement(U1,{key:s,zIndex:s,isPanorama:r})))}var LU=["children"];function zU(e,t){if(e==null)return{};var r,n,i=FU(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 FU(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 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)}var VU={width:"100%",height:"100%",display:"block"},HU=v.forwardRef((e,t)=>{var r=Sm(),n=jm(),i=Gj();if(!gn(r)||!gn(n))return null;var{children:a,otherAttributes:s,title:l,desc:c}=e,d,u;return s!=null&&(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(am,Mc({},s,{title:l,desc:c,role:u,tabIndex:d,width:r,height:n,style:VU,ref:t}),a)}),WU=e=>{var{children:t}=e,r=Me(tu);if(!r)return null;var{width:n,height:i,y:a,x:s}=r;return C.createElement(am,{width:n,height:i,x:s,y:a},t)},q1=v.forwardRef((e,t)=>{var{children:r}=e,n=zU(e,LU),i=pr();return i?C.createElement(WU,null,C.createElement(K1,{isPanorama:!0},r)):C.createElement(HU,Mc({ref:t},n),C.createElement(K1,{isPanorama:!1},r))});function UU(){var e=ot(),[t,r]=v.useState(null),n=Me(ZB);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Ct(a)&&a!==n&&e(RB(a))}},[t,e,n]),r}function Y1(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 KU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y1(Object(r),!0).forEach(function(n){qU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qU(e,t,r){return(t=YU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YU(e){var t=GU(e,"string");return typeof t=="symbol"?t:t+""}function GU(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)}var XU=()=>(YF(),null);function Rc(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var ZU=v.forwardRef((e,t)=>{var r,n,i=v.useRef(null),[a,s]=v.useState({containerWidth:Rc((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Rc((n=e.style)===null||n===void 0?void 0:n.height)}),l=v.useCallback((d,u)=>{s(f=>{var h=Math.round(d),m=Math.round(u);return f.containerWidth===h&&f.containerHeight===m?f:{containerWidth:h,containerHeight:m}})},[]),c=v.useCallback(d=>{if(typeof t=="function"&&t(d),d!=null&&typeof ResizeObserver<"u"){var{width:u,height:f}=d.getBoundingClientRect();l(u,f);var h=g=>{var{width:x,height:y}=g[0].contentRect;l(x,y)},m=new ResizeObserver(h);m.observe(d),i.current=m}},[t,l]);return v.useEffect(()=>()=>{var d=i.current;d?.disconnect()},[l]),C.createElement(C.Fragment,null,C.createElement(iu,{width:a.containerWidth,height:a.containerHeight}),C.createElement("div",Ki({ref:c},e)))}),QU=v.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=v.useState({containerWidth:Rc(r),containerHeight:Rc(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(iu,{width:i.containerWidth,height:i.containerHeight}),C.createElement("div",Ki({ref:l},e)))}),JU=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return C.createElement(C.Fragment,null,C.createElement(iu,{width:r,height:n}),C.createElement("div",Ki({ref:t},e)))}),eK=v.forwardRef((e,t)=>{var{width:r,height:n}=e;return An(r)||An(n)?C.createElement(QU,Ki({},e,{ref:t})):C.createElement(JU,Ki({},e,{ref:t}))});function tK(e){return e===!0?ZU:eK}var rK=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:m,onTouchMove:g,onTouchStart:x,style:y,width:w,responsive:b,dispatchTouchEvents:E=!0}=e,P=v.useRef(null),j=ot(),[S,O]=v.useState(null),[k,I]=v.useState(null),_=UU(),$=Cm(),R=$?.width>0?$.width:w,z=$?.height>0?$.height:i,F=v.useCallback(J=>{_(J),typeof t=="function"&&t(J),O(J),I(J),J!=null&&(P.current=J)},[_,t,O,I]),M=v.useCallback(J=>{j(GP(J)),j(Mr({handler:a,reactEvent:J}))},[j,a]),D=v.useCallback(J=>{j(Mh(J)),j(Mr({handler:d,reactEvent:J}))},[j,d]),A=v.useCallback(J=>{j(KE()),j(Mr({handler:u,reactEvent:J}))},[j,u]),T=v.useCallback(J=>{j(Mh(J)),j(Mr({handler:f,reactEvent:J}))},[j,f]),N=v.useCallback(()=>{j(tO())},[j]),U=v.useCallback(J=>{j(eO(J.key))},[j]),H=v.useCallback(J=>{j(Mr({handler:s,reactEvent:J}))},[j,s]),V=v.useCallback(J=>{j(Mr({handler:l,reactEvent:J}))},[j,l]),K=v.useCallback(J=>{j(Mr({handler:c,reactEvent:J}))},[j,c]),oe=v.useCallback(J=>{j(Mr({handler:h,reactEvent:J}))},[j,h]),pe=v.useCallback(J=>{j(Mr({handler:x,reactEvent:J}))},[j,x]),ve=v.useCallback(J=>{E&&j(nO(J)),j(Mr({handler:g,reactEvent:J}))},[j,E,g]),Ce=v.useCallback(J=>{j(Mr({handler:m,reactEvent:J}))},[j,m]),Pe=tK(b);return C.createElement(hP.Provider,{value:S},C.createElement(wS.Provider,{value:k},C.createElement(Pe,{width:R??y?.width,height:z??y?.height,className:Je("recharts-wrapper",n),style:KU({position:"relative",cursor:"default",width:R,height:z},y),onClick:M,onContextMenu:H,onDoubleClick:V,onFocus:N,onKeyDown:U,onMouseDown:K,onMouseEnter:D,onMouseLeave:A,onMouseMove:T,onMouseUp:oe,onTouchEnd:Ce,onTouchMove:ve,onTouchStart:pe,ref:F},C.createElement(XU,null),r)))}),nK=["width","height","responsive","children","className","style","compact","title","desc"];function iK(e,t){if(e==null)return{};var r,n,i=oK(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 oK(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 lO=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=iK(e,nK),h=Zr(f);return c?C.createElement(C.Fragment,null,C.createElement(iu,{width:r,height:n}),C.createElement(q1,{otherAttributes:h,title:d,desc:u},a)):C.createElement(rK,{className:s,style:l,width:r,height:n,responsive:i??!1,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(q1,{otherAttributes:h,title:d,desc:u,ref:t},C.createElement(sW,null,a)))});function Rh(){return Rh=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},Rh.apply(null,arguments)}var aK={top:5,right:5,bottom:5,left:5},sK={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:aK,reverseStackOrder:!1,syncMethod:"index",responsive:!1},lK=v.forwardRef(function(t,r){var n,i=Kt(t.categoricalChartProps,sK),{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(oO,{preloadedState:{options:u},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:a},C.createElement(KP,{chartData:d.data}),C.createElement(aO,{layout:i.layout,margin:i.margin}),C.createElement(sO,{baseValue:i.baseValue,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(lO,Rh({},i,{ref:r})))}),cK=["axis","item"],Yf=v.forwardRef((e,t)=>C.createElement(lK,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cK,tooltipPayloadSearcher:mP,categoricalChartProps:e,ref:t}));function uK(e){var t=ot();return v.useEffect(()=>{t(AU(e))},[t,e]),null}var dK=["layout"];function Ah(){return Ah=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},Ah.apply(null,arguments)}function fK(e,t){if(e==null)return{};var r,n,i=pK(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 pK(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 hK={top:5,right:5,bottom:5,left:5},mK={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:hK,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},gK=v.forwardRef(function(t,r){var n,i=Kt(t.categoricalChartProps,mK),{layout:a}=i,s=fK(i,dK),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u}=t,f={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return C.createElement(oO,{preloadedState:{options:f},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:l},C.createElement(KP,{chartData:i.data}),C.createElement(aO,{layout:a,margin:i.margin}),C.createElement(sO,{baseValue:void 0,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(uK,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),C.createElement(lO,Ah({},s,{ref:r})))}),vK=["item"],yK={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},xK=v.forwardRef((e,t)=>{var r=Kt(e,yK);return C.createElement(gK,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:vK,tooltipPayloadSearcher:mP,categoricalChartProps:r,ref:t})});const ri=["#4285F4","#34A853","#FBBC05","#EA4335","#9C27B0","#00ACC1","#8D6E63"],G1="28%",bK=({sysCd:e,appItCd:t,appCd:r})=>{const{getFormData:n}=st.useSearchBox(),i=tt.useCodeStore(),a=tt.useSystemStore(),[s,l]=v.useState(""),[c,d]=v.useState(null),[u,f]=v.useState(!1),[h,m]=v.useState(!1),[g,x]=v.useState(!1),[y,w]=v.useState(!1),[b,E]=v.useState(null),[P,j]=v.useState([]),[S,O]=v.useState(null),[k,I]=v.useState(!1),[_,$]=v.useState({}),[R,z]=v.useState(!1),[F,M]=v.useState({}),D=v.useRef(null),A=v.useRef(null);v.useRef(null);const T=v.useRef(null),N=v.useRef(null),U=v.useRef(null),H=v.useRef({}),V=v.useMemo(()=>async Y=>{const Q=Y.target.value?.trim();h||!Q||(U.current&&clearTimeout(U.current),U.current=setTimeout(async()=>{I(!0),z(!1);try{const Z=T.current?.getFieldValue("sysCd"),ce=T.current?.getFieldValue("appItCd"),ie=T.current?.getFieldValue("appCd");if(!Z||!ce||!ie){I(!1);return}await de.SCMCODE00104({crprCd:T.current?.getFieldValue("crprCd")||"100",sysCd:Z,appItCd:ce,appCd:ie,grpCd:Q})?(T.current?.setFields([{name:"grpCd",errors:["이미 사용중인 그룹코드입니다."]}]),p.message.error("이미 사용중인 그룹코드입니다."),z(!1)):(T.current?.setFields([{name:"grpCd",errors:[]}]),p.message.success("사용 가능한 그룹코드입니다."),z(!0))}catch(Z){console.error("그룹코드 중복 체크 실패:",Z),p.message.error("중복 체크 중 오류가 발생했습니다."),z(!1)}finally{I(!1)}},200))},[h]),K=v.useMemo(()=>async(Y,Q)=>{const Z=Y.target.value?.trim();if(y){const ce=Z;if(!ce)return;H.current[-1]&&clearTimeout(H.current[-1]),H.current[-1]=setTimeout(async()=>{$(ie=>({...ie,[-1]:!0})),M(ie=>{const fe={...ie};return delete fe[-1],fe});try{await de.SCMCODE00105({crprCd:N.current?.getFieldValue("crprCd")||"100",sysCd:N.current?.getFieldValue("sysCd")||"",appItCd:N.current?.getFieldValue("appItCd")||b?.appItCd||"CM",appCd:N.current?.getFieldValue("appCd")||b?.appCd||"CM",grpCd:N.current?.getFieldValue("grpCd")||"",dtlCd:ce})?(N.current?.setFields([{name:"dtlCd",errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),M(fe=>{const ge={...fe};return delete ge[-1],ge})):(N.current?.setFields([{name:"dtlCd",errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),M(fe=>({...fe,[-1]:!0})))}catch(ie){console.error("상세코드 중복 체크 실패:",ie),p.message.error("중복 체크 중 오류가 발생했습니다."),M(fe=>{const ge={...fe};return delete ge[-1],ge})}finally{$(ie=>({...ie,[-1]:!1}))}},200);return}!Z||!b||(H.current[Q]&&clearTimeout(H.current[Q]),H.current[Q]=setTimeout(async()=>{$(ce=>({...ce,[Q]:!0})),M(ce=>{const ie={...ce};return delete ie[Q],ie});try{if((N.current?.getFieldValue("details")||[]).some((ge,be)=>be!==Q&&ge.dtlCd?.trim()===Z)){N.current?.setFields([{name:["details",Q,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("같은 상세코드가 이미 입력되었습니다."),M(ge=>{const be={...ge};return delete be[Q],be}),$(ge=>({...ge,[Q]:!1}));return}await de.SCMCODE00105({crprCd:b.crprCd||"100",sysCd:b.sysCd||"",appItCd:b.appItCd||"CM",appCd:b.appCd||"CM",grpCd:b.grpCd||"",dtlCd:Z})?(N.current?.setFields([{name:["details",Q,"dtlCd"],errors:["이미 사용중인 상세코드입니다."]}]),p.message.error("이미 사용중인 상세코드입니다."),M(ge=>{const be={...ge};return delete be[Q],be})):(N.current?.setFields([{name:["details",Q,"dtlCd"],errors:[]}]),p.message.success("사용 가능한 상세코드입니다."),M(ge=>({...ge,[Q]:!0})))}catch(ce){console.error("상세코드 중복 체크 실패:",ce),p.message.error("중복 체크 중 오류가 발생했습니다."),M(ie=>{const fe={...ie};return delete fe[Q],fe})}finally{$(ce=>({...ce,[Q]:!1}))}},500))},[y,b]),oe=v.useMemo(()=>le.createBwgGridRenderer((Y,Q,Z,ce,ie)=>{const fe=Q.index?.itemIndex;if(Y.getValue(fe,"metaYn")==="Y"){ie.render(o.jsx("div",{}));return}const be=()=>{if(fe===void 0||fe<0)return;const se=D.current?.dp?.getJsonRow(fe);se&&(m(!0),z(!1),f(!0),setTimeout(()=>{T.current?.setFieldsValue({crprCd:se.crprCd||"100",sysCd:se.sysCd||"",appItCd:se.appItCd||"CM",appCd:se.appCd||"CM",grpCd:se.grpCd||"",grpNm:se.grpNm||"",enblYn:se.enblYn||"N",sortOrd:se.sortOrd||0,rmrk:se.rmrk||""})},100))},Be=()=>{if(fe===void 0||fe<0)return;const se=D.current?.dp?.getJsonRow(fe);se&&p.Modal.confirm({title:"삭제 확인",content:`그룹코드 '${se.grpCd} - ${se.grpNm}'을(를) 삭제하시겠습니까?`,okText:"확인",cancelText:"취소",onOk(){const Ie={crprCd:se.crprCd||"100",sysCd:se.sysCd||"",appItCd:se.appItCd||"CM",appCd:se.appCd||"CM",grpCd:se.grpCd||"",grpNm:se.grpNm||"",enblYn:se.enblYn||"N",sortOrd:se.sortOrd||0,rmrk:se.rmrk||""};de.SCMCODE00202(Ie)}})};ie.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(B.BwgButton,{icon:o.jsx(G.EditOutlined,{}),onClick:be}),o.jsx(B.BwgButton,{icon:o.jsx(G.DeleteOutlined,{style:{color:"red"}}),onClick:Be})]}))}),[]),pe=v.useMemo(()=>le.createBwgGridRenderer((Y,Q,Z,ce,ie)=>{const fe=Q.index?.itemIndex;if(Y.getValue(fe,"sysLockYn")==="Y"){ie.render(o.jsx("div",{}));return}const be=()=>{if(fe===void 0||fe<0)return;const se=A.current?.dp?.getJsonRow(fe);se&&(w(!0),x(!0),M({}),setTimeout(()=>{N.current?.setFieldsValue({crprCd:se.crprCd||"100",sysCd:se.sysCd||"",appItCd:se.appItCd||"CM",appCd:se.appCd||"CM",grpCd:se.grpCd||"",dtlCd:se.dtlCd||"",cmmnCd:se.cmmnCd||"",cmmnCdNm:se.cmmnCdNm||"",cmmnCdClr:se.cmmnCdClr||"",cmmnAbrv:se.cmmnAbrv||"",sysLockYn:se.sysLockYn||"N",enblYn:se.enblYn||"N",sortOrd:se.sortOrd||0,rmrk:se.rmrk||""})},100))},Be=()=>{if(fe===void 0||fe<0)return;const se=A.current?.dp?.getJsonRow(fe);se&&p.Modal.confirm({title:"삭제 확인",content:o.jsxs("div",{children:[o.jsx("div",{children:`정말 "${se.cmmnCdNm} [${se.dtlCd}]" 을(를) 삭제하시겠습니까?`}),o.jsx("div",{style:{marginTop:8,fontSize:"12px",color:"#999"},children:"해당 작업이 진행되면 다시 되돌릴 수 없습니다."})]}),centered:!0,okText:"확인",cancelText:"취소",onOk(){const Ie={crprCd:se.crprCd||"100",sysCd:se.sysCd||"",appItCd:se.appItCd||"CM",appCd:se.appCd||"CM",grpCd:se.grpCd||"",dtlCd:se.dtlCd||"",cmmnCd:se.cmmnCd||"",cmmnCdNm:se.cmmnCdNm||"",cmmnCdClr:se.cmmnCdClr||"",cmmnAbrv:se.cmmnAbrv||"",sysLockYn:se.sysLockYn||"N",enblYn:se.enblYn||"N",sortOrd:se.sortOrd||0,rmrk:se.rmrk||""};de.SCMCODE00204(Ie)}})};ie.render(o.jsxs(p.Flex,{style:{justifyContent:"center",alignItems:"center",gap:8},children:[o.jsx(p.Button,{icon:o.jsx(G.EditOutlined,{}),onClick:be}),o.jsx(p.Button,{icon:o.jsx(G.DeleteOutlined,{style:{color:"red"}}),onClick:Be})]}))}),[]),ve=v.useMemo(()=>le.createBwgGridRenderer((Y,Q,Z,ce,ie)=>{Y.getValue(Q.index?.itemIndex,"sysLockYn")==="Y"?ie.render(o.jsx(G.LockOutlined,{})):ie.render(o.jsx(G.UnlockOutlined,{}))}),[]),Ce=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:le.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:Y=>{const Q=Y.getDataSource();return Q?Q.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:le.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"}],[]),J=v.useMemo(()=>({container:{indicator:!0,check:!0,page:!0},display:{rowHeight:30}}),[]),ye=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 me=Y=>{const Q=i.getAvailableGroupCodes(),Z=[];Q.forEach(ie=>{const fe=i.getCodeList(ie,{enabledOnly:!1,systemCodeOnly:Y==="Y",sortByOrder:!1});let ge=!1;if(Y==="")ge=fe.length>0;else if(Y==="Y")ge=fe.length>0;else if(Y==="N"){const be=i.codeData;be&&be[ie]&&(ge=Object.values(be[ie]).some(Be=>Be.systemCodeYn!=="Y"))}ge&&Z.push({grpCd:ie,grpNm:""})});const ce=s?Z.filter(ie=>ie.grpCd.toLowerCase().includes(s.toLowerCase())):Z;D.current?.addAllData(ce)},L=(Y,Q)=>{if(!Y){A.current?.addAllData([]);return}const Z=i.codeData;if(!Z||!Z[Y]){A.current?.addAllData([]);return}const fe=Object.values(Z[Y]).filter(ge=>!(Q==="Y"&&ge.systemCodeYn!=="Y"||Q==="N"&&ge.systemCodeYn==="Y")).sort((ge,be)=>ge.sortOrder!==be.sortOrder?ge.sortOrder-be.sortOrder:ge.codeValue.localeCompare(be.codeValue)).map(ge=>({commonCode:ge.commonCode,codeNm:ge.codeNm,codeValue:ge.codeValue,labelColor:ge.labelColor,sortOrder:ge.sortOrder,enblYn:ge.enabled?"Y":"N",systemCodeYn:ge.systemCodeYn,rmrk:ge.originalData?.rmrk??null}));A.current?.addAllData(fe)};v.useRef(!1),v.useEffect(()=>{console.log("SystemCodeManage useEffect"),de.SCMCODE00101()},[]),v.useEffect(()=>{const Y=n()?.sysLockYn||"";me(Y),L(c,Y)},[s]);const ae=async()=>{de.SCMCODE00101()},q=v.useMemo(()=>Array.from(new Set(a.systemMap.map(Y=>Y.sysCd))).slice(0,6),[a.systemMap]),ue=v.useMemo(()=>Array.from(new Set(a.systemMap.map(Y=>Y.appItCd))).slice(0,8),[a.systemMap]),he=v.useMemo(()=>Array.from(new Set(a.systemMap.map(Y=>Y.appCd))).slice(0,8),[a.systemMap]),we=Y=>{let Q=0;for(let Z=0;Z<Y.length;Z++){const ce=Y.charCodeAt(Z);Q=(Q<<5)-Q+ce,Q=Q&Q}return Math.abs(Q)},je=Y=>{if(Y.length===0)return[];const Q=Y.reduce((Z,ce)=>Z+ce.count,0);return Q===0?Y.map((Z,ce)=>we((Z.label||"")+ce.toString())%30+20):Y.map(Z=>Math.round(Z.count/Q*100))},Te=v.useMemo(()=>{const Y=i.codeData;if(!Y){const be=we("systemCode")%40+30;return[{name:"시스템코드",value:be},{name:"사용자코드",value:100-be}]}let Q=0,Z=0;Object.values(Y).forEach(ge=>{Object.values(ge).forEach(be=>{be.systemCodeYn==="Y"?Q++:Z++})});const ce=Q+Z;if(ce===0){const be=we("systemCode")%40+30;return[{name:"시스템코드",value:be},{name:"사용자코드",value:100-be}]}const ie=Math.round(Q/ce*100),fe=100-ie;return[{name:"시스템코드",value:ie},{name:"사용자코드",value:fe}]},[i]),Ne=v.useMemo(()=>{const Y=i.codeData,Q={};Y&&Object.values(Y).forEach(ie=>{Object.values(ie).forEach(fe=>{const ge=fe.commonCode?.substring(0,2)||"";ge&&(Q[ge]=(Q[ge]||0)+1)})});const Z=q.filter(ie=>ie!=null).map(ie=>({label:ie,count:Q[ie]||0})),ce=je(Z);return q.filter(ie=>ie!=null).map((ie,fe)=>({name:ie,value:ce[fe]||0}))},[q,i]),W=v.useMemo(()=>{const Y=i.codeData,Q={};Y&&Object.values(Y).forEach(ie=>{Object.values(ie).forEach(fe=>{const be=(fe.commonCode||"").substring(0,2)||"";if(be&&ue.length>0){const Be=we(be+fe.groupCode),se=ue[Be%ue.length];se&&(Q[se]=(Q[se]||0)+1)}})});const Z=ue.filter(ie=>ie!=null).map(ie=>({label:ie,count:Q[ie]||0})),ce=je(Z);return ue.filter(ie=>ie!=null).map((ie,fe)=>({name:ie,value:ce[fe]||0}))},[ue,i]),ne=v.useMemo(()=>{const Y=i.codeData,Q={};Y&&Object.values(Y).forEach(ie=>{Object.values(ie).forEach(fe=>{const be=(fe.commonCode||"").substring(0,2)||"";if(be&&he.length>0){const Be=we(be+fe.groupCode),se=he[Be%he.length];se&&(Q[se]=(Q[se]||0)+1)}})});const Z=he.filter(ie=>ie!=null).map(ie=>({label:ie,count:Q[ie]||0})),ce=je(Z);return he.filter(ie=>ie!=null).map((ie,fe)=>({name:ie,value:ce[fe]||0}))},[he,i]),re=v.useMemo(()=>{const Q=[{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(Z=>({label:Z.sysNm,value:Z.sysCd}));return[{label:"전체",value:""},...Q]},[]),X=v.useMemo(()=>{const Q=[{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(Z=>({label:Z.name?`${Z.code} (${Z.name})`:Z.code,value:Z.code}));return[{label:"전체",value:""},...Q]},[]),te=v.useMemo(()=>{const Q=[{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(Z=>({label:`${Z.code} (${Z.name})`,value:Z.code}));return[{label:"전체",value:""},...Q]},[]),de=v.useMemo(()=>({SCMCODE00101:()=>{const Y=n(),Q={crprCd:Y?.crprCd||"100",sysCd:Y?.sysCd||"",appItCd:Y?.appItCd||"",appCd:Y?.appCd||"",sysLockYn:Y?.sysLockYn||"",keyword:Y?.keyword||""};le.callService("SCMCODE00101",Q).then(Z=>{D.current?.addAllData(Z.data||[])}).catch(Z=>{p.message.error("그룹코드 조회에 실패했습니다.")})},SCMCODE00102:Y=>{le.callService("SCMCODE00102",Y,{showLoading:!1}).then(Q=>{A.current?.addAllData(Q.data||[])}).catch(Q=>{p.message.error("상세코드 조회에 실패했습니다.")})},SCMCODE00104:Y=>{const Q={grp:Y};return le.callService("SCMCODE00104",Q,{showLoading:!1}).then(Z=>Z.dup===!0).catch(Z=>(console.error("그룹코드 중복 체크 실패:",Z),!1))},SCMCODE00105:Y=>{const Q={dtl:Y};return le.callService("SCMCODE00105",Q,{showLoading:!1}).then(Z=>Z.dup===!0).catch(Z=>(console.error("상세코드 중복 체크 실패:",Z),!1))},SCMCODE00201:(Y,Q)=>{const Z={flag:Y,grp:Q};return le.callService("SCMCODE00201",Z).then(ce=>(p.message.success(Y==="I"?"그룹코드가 등록되었습니다.":"그룹코드가 수정되었습니다."),de.SCMCODE00101(),ce)).catch(ce=>{throw console.error("그룹코드 저장 실패:",ce),ce})},SCMCODE00202:Y=>{const Q={grp:Y};return le.callService("SCMCODE00202",Q).then(Z=>(p.message.success("그룹코드가 삭제되었습니다."),de.SCMCODE00101(),Z)).catch(Z=>{throw p.message.error("그룹코드 삭제에 실패했습니다."),Z})},SCMCODE00203:(Y,Q,Z)=>{const ce={flag:Y,dtlCnt:Q,dtl:Z};return le.callService("SCMCODE00203",ce).then(ie=>(p.message.success(Y==="I"?"상세코드가 등록되었습니다.":"상세코드가 수정되었습니다."),b&&de.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),ie)).catch(ie=>{throw console.error("상세코드 저장 실패:",ie),p.message.error(Y==="I"?"상세코드 등록에 실패했습니다.":"상세코드 수정에 실패했습니다."),ie})},SCMCODE00204:Y=>{const Q={dtl:Y};return le.callService("SCMCODE00204",Q).then(Z=>(p.message.success("상세코드가 삭제되었습니다."),b&&de.SCMCODE00102({sysCd:b.sysCd,appItCd:b.appItCd,appCd:b.appCd,grpCd:b.grpCd}),Z)).catch(Z=>{throw p.message.error("상세코드 삭제에 실패했습니다."),Z})}}),[]);return o.jsxs(Rt,{buttons:{grant:[{id:"search",label:"조회",onClick:ae}]},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(B.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",initialValue:""},selectProps:{placeholder:"시스템코드를 선택하세요",options:re}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSelect,{itemProps:{label:"통합코드",name:"appItCd",initialValue:""},selectProps:{placeholder:"통합코드를 선택하세요",options:X}})}),o.jsx(p.Col,{span:6,children:o.jsx(B.BwgSelect,{itemProps:{label:"앱코드",name:"appCd",initialValue:""},selectProps:{placeholder:"앱코드를 선택하세요",options:te}})})]}),o.jsxs(p.Row,{gutter:[16,8],children:[o.jsx(p.Col,{span:6,children:o.jsx(B.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(B.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(Ae,{border:!0,style:{flex:`0 0 ${G1}`,maxWidth:G1,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(dl,{width:"100%",height:160,children:o.jsxs(xK,{children:[o.jsx(zP,{data:Te,dataKey:"value",nameKey:"name",outerRadius:65,label:!0,children:Te.map((Y,Q)=>o.jsx(ui,{fill:ri[Q%ri.length]},`c1-${Q}`))}),o.jsx(bl,{}),o.jsx(Yj,{})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"시스템코드별 백분율"}),o.jsx(dl,{width:"100%",height:160,children:o.jsxs(Yf,{data:Ne,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Nl,{strokeDasharray:"3 3"}),o.jsx(Dl,{dataKey:"name",hide:!0}),o.jsx(_l,{hide:!0,domain:[0,100]}),o.jsx(bl,{}),o.jsx(Al,{dataKey:"value",children:Ne.map((Y,Q)=>o.jsx(ui,{fill:ri[Q%ri.length]},`c2-${Q}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"통합코드별 백분율"}),o.jsx(dl,{width:"100%",height:160,children:o.jsxs(Yf,{data:W,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Nl,{strokeDasharray:"3 3"}),o.jsx(Dl,{dataKey:"name",hide:!0}),o.jsx(_l,{hide:!0,domain:[0,100]}),o.jsx(bl,{}),o.jsx(Al,{dataKey:"value",children:W.map((Y,Q)=>o.jsx(ui,{fill:ri[Q%ri.length]},`c3-${Q}`))})]})})]}),o.jsxs(p.Card,{bodyStyle:{height:200,padding:8,borderRadius:12},children:[o.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"앱별 백분율"}),o.jsx(dl,{width:"100%",height:160,children:o.jsxs(Yf,{data:ne,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsx(Nl,{strokeDasharray:"3 3"}),o.jsx(Dl,{dataKey:"name",hide:!0}),o.jsx(_l,{hide:!0,domain:[0,100]}),o.jsx(bl,{}),o.jsx(Al,{dataKey:"value",children:ne.map((Y,Q)=>o.jsx(ui,{fill:ri[Q%ri.length]},`c4-${Q}`))})]})})]})]})})]}),o.jsxs(Ae,{border:!0,style:{flex:"1 1 auto",height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:[o.jsx(Le,{title:"그룹코드",children:o.jsx(B.BwgButton,{type:"primary",onClick:()=>{m(!1),z(!1),f(!0),setTimeout(()=>{T.current?.resetFields(),T.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(Ve,{ref:D,gridColumns:Ce,gridOptions:J,gridEvents:v.useMemo(()=>({onCurrentRowChanged:(Y,Q,Z)=>{if(Z<0){E(null);return}const ce=D.current?.dp?.getValue(Z,"sysCd")||"",ie=D.current?.dp?.getValue(Z,"appItCd")||"",fe=D.current?.dp?.getValue(Z,"appCd")||"",ge=D.current?.dp?.getValue(Z,"grpCd")||"",be=D.current?.dp?.getJsonRow(Z);E(be),ge&&de.SCMCODE00102({sysCd:ce,appItCd:ie,appCd:fe,grpCd:ge})}}),[de]),renderers:[{name:"moreActions",renderer:oe}]})}),o.jsxs("div",{style:{flex:"1 1 auto",overflow:"hidden",display:"flex",flexDirection:"column",marginTop:12},children:[o.jsx(Le,{title:"상세코드",children:o.jsx(B.BwgButton,{type:"primary",onClick:()=>{if(!b){p.message.warning("그룹코드를 먼저 선택하세요.");return}w(!1),x(!0),O(null),M({}),j([{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(Ve,{ref:A,gridColumns:Pe,gridOptions:ye,renderers:[{name:"moreActions",renderer:pe},{name:"sysLockYn",renderer:ve}]})})]})]})]}),o.jsx(fn,{title:h?"그룹코드 수정":"그룹코드 등록",open:u,placement:"right",width:"40%",onClose:()=>{f(!1),m(!1),z(!1),T.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{f(!1),m(!1),z(!1),T.current?.resetFields()},children:"취소"}),o.jsx(p.Button,{type:"primary",disabled:!h&&!R,onClick:async()=>{try{const Y=await T.current?.validateFields();if(!Y)return;const Q={crprCd:Y.crprCd||"100",sysCd:Y.sysCd||"",appItCd:Y.appItCd||"CM",appCd:Y.appCd||"CM",grpCd:Y.grpCd||"",grpNm:Y.grpNm||"",enblYn:Y.enblYn==="Y"?"Y":"N",sortOrd:Y.sortOrd||0,rmrk:Y.rmrk||""};if(!h&&!R){p.message.warning("그룹코드 중복체크를 먼저 완료해주세요.");return}await de.SCMCODE00201(h?"U":"I",Q),f(!1),m(!1),z(!1),T.current?.resetFields()}catch(Y){console.error(h?"그룹코드 수정 실패:":"그룹코드 등록 실패:",Y)}},children:"저장"})]}),children:o.jsxs(B.BwgForm,{ref:T,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(B.BwgSelect,{itemProps:{label:"시스템코드",name:"sysCd",rules:[{required:!0,message:"시스템코드를 선택하세요."}]},selectProps:{placeholder:"시스템코드를 선택하세요",options:re.filter(Y=>Y.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{label:"앱 통합코드",name:"appItCd",rules:[{required:!0,message:"앱 통합코드를 선택하세요."}]},selectProps:{placeholder:"앱 통합코드를 선택하세요",options:X.filter(Y=>Y.value!==""),disabled:h}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgSelect,{itemProps:{label:"앱 코드",name:"appCd",rules:[{required:!0,message:"앱 코드를 선택하세요."}]},selectProps:{placeholder:"앱 코드를 선택하세요",options:te.filter(Y=>Y.value!==""),disabled:h}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(G.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):R&&!h?o.jsx(G.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onKeyDown:Y=>{if(h){Y.preventDefault();return}Y.target.value.length>=5&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter"].includes(Y.key)&&(Y.preventDefault(),p.message.warning("입력은 다섯글자까지입니다."))},onChange:Y=>{if(h){Y.preventDefault();return}Y.target.value.length>5&&(p.message.warning("입력은 다섯글자까지입니다."),Y.target.value=Y.target.value.slice(0,5)),R&&z(!1),T.current?.getFieldError("grpCd")?.length&&T.current?.setFields([{name:"grpCd",errors:[]}])},onBlur:V}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.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(B.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:Y=>({checked:Y==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]})}),o.jsx(fn,{title:y?"상세코드 수정":"상세코드 등록",open:g,placement:"right",width:"50%",onClose:()=>{x(!1),w(!1),j([]),O(null),M({}),N.current?.resetFields()},footer:o.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[o.jsx(p.Button,{onClick:()=>{x(!1),w(!1),j([]),O(null),M({}),N.current?.resetFields()},children:"취소"}),o.jsx(p.Form.Item,{shouldUpdate:!0,children:()=>{const Y=N.current?.getFieldValue("details")||[];let Q=!1;if(y)Q=!0;else if(Y.length>0){const Z=Y.every(ie=>ie?.dtlCd?.trim()),ce=Y.every((ie,fe)=>ie?.dtlCd?.trim()&&F[fe]===!0);Q=Z&&ce}return o.jsx(p.Button,{type:"primary",disabled:!Q,onClick:async()=>{try{const Z=await N.current?.validateFields();if(!Z)return;if(!y&&Z.details){if(!Z.details.every((fe,ge)=>!fe.dtlCd?.trim()||F[ge]===!0)){p.message.warning("모든 상세코드의 중복체크를 완료해주세요.");return}for(let fe=0;fe<Z.details.length;fe++){const be=Z.details[fe].dtlCd?.trim();if(!be)continue;if(Z.details.some((se,Ie)=>Ie!==fe&&se.dtlCd?.trim()===be)){N.current?.setFields([{name:["details",fe,"dtlCd"],errors:["같은 상세코드가 이미 입력되었습니다."]}]),p.message.error("중복된 상세코드가 있습니다.");return}}}const ce=y?[{...Z,crprCd:Z.crprCd||"100",sysCd:Z.sysCd||"",appItCd:Z.appItCd||b?.appItCd||"CM",appCd:Z.appCd||b?.appCd||"CM",grpCd:Z.grpCd||"",enblYn:Z.enblYn==="Y"?"Y":"N",sysLockYn:Z.sysLockYn==="Y"?"Y":"N"}]:(Z.details||[]).map(ie=>{const fe=b?.sysCd||"",ge=b?.grpCd||"",be=ie.dtlCd||"",Be=`${fe}${ge}${be}`;return{...ie,crprCd:b?.crprCd||"100",sysCd:fe,appItCd:b?.appItCd||"CM",appCd:b?.appCd||"CM",grpCd:ge,cmmnCd:Be,enblYn:ie.enblYn==="Y"?"Y":"N",sysLockYn:ie.sysLockYn==="Y"?"Y":"N",sortOrd:ie.sortOrd||0}});await de.SCMCODE00203(y?"U":"I",ce.length,ce),x(!1),w(!1),j([]),O(null),M({}),N.current?.resetFields()}catch(Z){console.error(y?"상세코드 수정 실패:":"상세코드 등록 실패:",Z)}},children:"저장"})}})]}),children:o.jsxs(B.BwgForm,{ref:N,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(B.BwgInput,{itemProps:{label:"시스템코드",name:"sysCd"},inputProps:{disabled:!0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"그룹코드",name:"grpCd"},inputProps:{disabled:!0}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"상세코드",name:"dtlCd",rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",disabled:!0,suffix:_[-1]?o.jsx(G.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):F[-1]?o.jsx(G.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.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(B.BwgFormItem,{label:"색상",name:"cmmnCdClr",getValueFromEvent:Y=>Y&&typeof Y.toHexString=="function"?Y.toHexString():Y||"",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(B.BwgInput,{itemProps:{label:"약어",name:"cmmnAbrv"},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheck,{itemProps:{label:"사용여부",name:"enblYn",getValueProps:Y=>({checked:Y==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.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(B.BwgTextArea,{itemProps:{label:"비고",name:"rmrk"},inputProps:{placeholder:"비고를 입력하세요",rows:3}})})})]}):o.jsx(p.Form.List,{name:"details",initialValue:P,children:(Y,{add:Q,remove:Z})=>o.jsxs(o.Fragment,{children:[Y.map((ce,ie)=>{const fe=S===ie,ge=b?.sysCd||"",be=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:(Be,se)=>{const Ie=Be?.details?.[ce.name]?.dtlCd,Fe=se?.details?.[ce.name]?.dtlCd;return Ie!==Fe},children:({getFieldValue:Be})=>{const se=Be(["details",ce.name,"dtlCd"])||"",Ie=`${ge}${be}${se}`;return se&&N.current&&Be(["details",ce.name,"cmmnCd"])!==Ie&&setTimeout(()=>{N.current?.setFieldValue(["details",ce.name,"cmmnCd"],Ie)},0),o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"상세코드",name:[ce.name,"dtlCd"],rules:[{required:!0,message:"상세코드를 입력하세요."}]},inputProps:{placeholder:"상세코드를 입력하세요",suffix:_[ie]?o.jsx(G.ReloadOutlined,{spin:!0,style:{color:"#1890ff"}}):F[ie]?o.jsx(G.CheckCircleOutlined,{style:{color:"#52c41a"}}):void 0,onChange:Fe=>{F[ie]&&M(Vr=>{const rn={...Vr};return delete rn[ie],rn}),N.current?.getFieldError(["details",ie,"dtlCd"])?.length&&N.current?.setFields([{name:["details",ie,"dtlCd"],errors:[]}])},onBlur:Fe=>K(Fe,ie)}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgInput,{itemProps:{label:"공통코드",name:[ce.name,"cmmnCd"]},inputProps:{disabled:!0,placeholder:"자동 생성됩니다",value:Ie}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgInput,{itemProps:{label:"공통코드명",name:[ce.name,"cmmnCdNm"],rules:[{required:!0,message:"공통코드명을 입력하세요."}]},inputProps:{placeholder:"공통코드명을 입력하세요"}})})}),fe&&o.jsxs(o.Fragment,{children:[o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgFormItem,{label:"색상",name:[ce.name,"cmmnCdClr"],getValueFromEvent:Fe=>Fe&&typeof Fe.toHexString=="function"?Fe.toHexString():Fe||"",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(B.BwgInput,{itemProps:{label:"약어",name:[ce.name,"cmmnAbrv"]},inputProps:{placeholder:"약어를 입력하세요"}})})]}),o.jsxs(p.Row,{gutter:16,children:[o.jsx(p.Col,{span:12,children:o.jsx(B.BwgCheck,{itemProps:{label:"사용여부",name:[ce.name,"enblYn"],getValueProps:Fe=>({checked:Fe==="Y"})},inputProps:{title:"사용",format:"YN"}})}),o.jsx(p.Col,{span:12,children:o.jsx(B.BwgNumber,{itemProps:{label:"정렬순서",name:[ce.name,"sortOrd"]},inputProps:{placeholder:"정렬순서를 입력하세요",min:0}})})]}),o.jsx(p.Row,{gutter:16,children:o.jsx(p.Col,{span:24,children:o.jsx(B.BwgTextArea,{itemProps:{label:"비고",name:[ce.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:fe?o.jsx(G.UpOutlined,{}):o.jsx(G.DownOutlined,{}),onClick:()=>{O(fe?null:ie)},style:{fontSize:"12px",padding:0},children:fe?"간단입력":"추가입력"}),Y.length>1&&o.jsx(p.Button,{type:"link",danger:!0,size:"small",icon:o.jsx(G.DeleteOutlined,{}),onClick:()=>{Z(ce.name),S===ie&&O(null)},style:{fontSize:"12px",padding:0},children:"삭제"})]})})]})},ce.key)}),o.jsx(p.Button,{type:"dashed",onClick:()=>{Q({dtlCd:"",cmmnCd:"",cmmnCdNm:"",cmmnCdClr:"",cmmnAbrv:"",enblYn:"Y",sortOrd:0,rmrk:""})},block:!0,style:{marginTop:16},children:"+ 행 추가"})]})})]})})]})},wK=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(Rt,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{}}]},searchBox:{},children:o.jsx(ze,{children:o.jsx(Ae,{style:{height:"300px"},children:o.jsx(Ve,{ref:t,gridColumns:r})})})})},{TextArea:CK}=p.Input,Yg=({boardMstrId:e,isCompleted:t=!1})=>{const{user:r}=tt.useUserStore(),[n,i]=v.useState(!1),[a,s]=v.useState(!1),[l,c]=v.useState(15),[d,u]=v.useState([]),[f,h]=v.useState(""),m=v.useRef(null),g=b=>{i(!0),le.callService("SCMBoardDtls0001",{boardMstrId:b},{isPopup:!0,showLoading:!1}).then(E=>{if(E&&E.subList){const P=E.subList.map(j=>({id:j.seq,author:j.userNm||j.regUserId,regUserId:j.regUserId,content:j.content,regDt:j.regDt}));u(P)}else u([])}).catch(E=>{console.error("게시글 댓글 목록 조회 실패:",E)}).finally(()=>{i(!1),c(15)})},x=()=>{e&&g(e)},y=()=>{if(!f.trim()){p.message.warning("댓글 상세내용 작성");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),le.callService("SCMBoardDtls0002",{boardMstrId:e,content:f.trim()},{isPopup:!0,showLoading:!1}).then(b=>{b&&b.result===1?(console.log("댓글이 등록되었습니다."),h(""),g(e),setTimeout(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight)},100)):console.error("댓글 등록에 실패했습니다.",b)}).catch(b=>{console.error("댓글 등록 중 오류가 발생했습니다.",b)}).finally(()=>{i(!1)})},w=b=>{const E=d.find(P=>P.id===b);if(E&&E.regUserId!==r?.userId){p.message.error("본인이 작성한 댓글만 삭제할 수 있습니다.");return}if(!e){p.message.error("게시글 정보가 없습니다.");return}i(!0),le.callService("SCMBoardDtls0003",{boardMstrId:e,seq:b},{isPopup:!0,showLoading:!1}).then(P=>{P&&P.result===1?(console.log("댓글이 삭제되었습니다."),g(e)):console.error("댓글 삭제에 실패했습니다.",P)}).catch(P=>{console.error("댓글 삭제 중 오류가 발생했습니다.",P)}).finally(()=>{i(!1)})};return v.useEffect(()=>{e?g(e):u([])},[e]),o.jsxs(Ae,{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(G.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:m,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(G.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(G.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:E=>{n||(E.currentTarget.style.opacity="1")},onMouseLeave:E=>{E.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(G.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(CK,{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?"등록 중...":"등록"})]})]})})]})},Gf=[{label:"전체",value:""},{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],X1=[{label:"전체",value:""},{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],SK={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},Z1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},jK={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},EK=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n]=p.Form.useForm(),[i,a]=v.useState(!1),{searchBoxRef:s}=st.useSearchBox(),{openTabByMenuId:l}=tt.useMenuViewStore(),{openCorePopup:c}=st.usePopup(),[d,u]=v.useState(!1),f=v.useRef(null),[h,m]=v.useState(n.getFieldValue("status")),g=h==="COMPLETED",x=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,button:!0,styleName:"left"},{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:"rgstUserDeptNm",header:{text:"작성자 부서"},visible:!1},{fieldName:"rgstDt",header:{text:"등록일자"},width:100,textFormat:le.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:100,textFormat:le.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:"prcsUserDeptNm",header:{text:"처리담당자 부서"},visible:!1},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:le.realFormat.formatYmd,styleName:"right",visible:!1}],[]),y=v.useMemo(()=>({container:{indicator:!1}}),[]),w={onCellDblClicked(R,z){const F=z.itemIndex??-1;if(F<0)return;const M=R.getValues(F);n.setFieldsValue(M),m(M.status),a(!0)},onCellClicked(R,z){if(z.fieldName==="menuId"){if((z.itemIndex??-1)<0)return;z.value&&l(z.value)}}},b=v.useMemo(()=>({SCMBoardMstr0001:async(R,z)=>{const F=R||f.current?.currentPage||1,M=z||f.current?.pageSize||20,D={...s?.current?.getFormData(),sysCd:e,appCd:t,pageNum:F,pageCount:M};console.log("🔍 서버 모드 페이징 요청:",D);try{const A=await le.callService("SCMBoardMstr0001",D,{isPopup:!0});if(A&&A.pageList){const T=A.pageCnt||0;f.current?.setTotalData(T),r.current?.addAllData(A.pageList)}else f.current?.setTotalData(0),r.current?.addAllData([])}catch(A){console.error("❌ SCMBoardMstr0001 호출 실패:",A)}},SCMBoardMstr0004:R=>{le.callService("SCMBoardMstr0004",{...R,boardMstrId:n.getFieldValue("boardMstrId"),sysCd:e,appCd:t},{isPopup:!0}).then(z=>{n.resetFields(),b.SCMBoardMstr0001()}).catch(z=>{console.error("문의/신고 변경 실패:",z)})}}),[s,n]),E=v.useMemo(()=>le.createBwgGridRenderer((R,z,F,M,D)=>{const A=R.getValue(z.index?.itemIndex,"type");D.render(o.jsx(p.Tag,{color:jK[A],children:Gf.find(T=>T.value===A)?.label}))}),[]),P=v.useMemo(()=>le.createBwgGridRenderer((R,z,F,M,D)=>{const A=R.getValue(z.index?.itemIndex,"status");D.render(o.jsx(p.Tag,{color:SK[A],children:X1.find(T=>T.value===A)?.label}))}),[]),j=v.useMemo(()=>le.createBwgGridRenderer((R,z,F,M,D)=>{R.getValue(z.index?.itemIndex,"urgentYn")==="Y"?D.render(o.jsx(G.AlertTwoTone,{twoToneColor:"red"})):D.render(o.jsx(o.Fragment,{}))}),[]),S=()=>{try{n.validateFields().then(R=>{p.Modal.confirm({title:"변경 확인",content:"게시물 정보를 변경하시겠습니까?",okText:"변경",cancelText:"취소",onOk:()=>{b.SCMBoardMstr0004({...R,prcsUserId:n.getFieldValue("prcsUserId")}),a(!1)}})})}catch(R){console.error("게시물 정보 변경 실패:",R)}},O=R=>{console.log("처리담당자 선택:",R),n.setFieldsValue({prcsUserId:R.empNo,prcsUserNm:R.empNm,prcsUserDeptNm:R.deptNm,status:"ASSIGNED"}),m("ASSIGNED")},k=()=>{c("CORE_PRGR_02",{callback:R=>{s?.current?.setFormData({menuId:R.menuId,menuNm:R.menuNm})}})},I=R=>{if(n.setFieldValue("status",R),m(R),R==="COMPLETED"||R==="REJECTED"){const z=le.format(le.now(),"yyyy-mm-dd");n.setFieldsValue({prcsDt:z})}else n.setFieldsValue({prcsDt:""})};v.useEffect(()=>{setTimeout(()=>{b.SCMBoardMstr0001()},100)},[b]);const _={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(B.BwgMaskedRange,{itemProps:{label:"등록일자",name:"rgstDt"},pickerProps:{allowEmpty:!0}})}),o.jsx($e,{span:4,children:o.jsx(B.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Gf,placeholder:"전체"}})}),o.jsx($e,{span:6,children:o.jsx(B.BwgEmpSearch,{label:"작성자",empNoFieldName:"rgstUserId",field1:{value:"deptNm",fieldName:"rgstUserDeptNm",placeholder:"부서명"},field2:{value:"empNm",fieldName:"rgstUserNm",placeholder:"사원명 입력"}})}),o.jsx($e,{span:6,style:{marginLeft:"12px"},children:o.jsx(B.BwgSwitch,{itemProps:{name:"myPrcs",label:"나의 처리건만"},inputProps:{format:"YN"}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:7,children:o.jsx(B.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:k})}),o.jsx($e,{span:4,children:o.jsx(B.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:X1,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(B.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},$=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{b.SCMBoardMstr0001(f.current?.currentPage,f.current?.pageSize)}},{id:"edit",label:"변경",onClick:()=>{const R=r.current?.getCurrentIndex?.()??-1;if(R<0)return;const z=r.current?.vw?.getValues(R);z&&(n.setFieldsValue(z),m(n.getFieldValue("status")),a(!0))}}]}),[f,b,n,r]);return o.jsx(Rt,{searchBox:_,buttons:$,children:o.jsx(ze,{children:o.jsxs(Ae,{children:[o.jsx(Ve,{gridId:"CMAdminBoardM0101",ref:r,type:"nrml",gridColumns:x,gridOptions:y,gridEvents:w,renderers:[{name:"tagType",renderer:E},{name:"statusTag",renderer:P},{name:"alert",renderer:j}]}),o.jsx(fn,{title:"게시물 상세",open:i,onClose:()=>{a(!1),n.resetFields(),b.SCMBoardMstr0001()},showCloseButton:!0,showEyesButton:!0,size:"large",placement:"right",width:1200,maskClosable:!0,extra:o.jsx(p.ConfigProvider,{children:o.jsx(p.Space,{children:o.jsx(p.Button,{className:"btn-primary .btn-primary:hover",onClick:S,children:"변경"})})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:"70%",min:"60%",max:"80%",style:{paddingRight:"15px",overflowX:"hidden"},children:o.jsx(Ae,{style:{overflowY:"auto"},children:o.jsxs(B.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:le.colorFormat.site.purple04,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("rgstUserDeptNm")??""}),o.jsx("span",{style:{fontSize:"13px",color:"#8c8c8c",marginTop:"3px",marginLeft:"4px"},children:n.getFieldValue("rgstDt")?le.format(n.getFieldValue("rgstDt"),"YYYY-MM-DD"):""})]}),o.jsx("span",{style:{fontSize:"12px",color:"#8c8c8c",marginLeft:"1px"},children:n.getFieldValue("rgstUserDeptNm")??""})]})})]})})}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(B.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(B.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{disabled:!0,options:Gf}})}),o.jsx($e,{span:10,children:o.jsx(B.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(B.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"},inputProps:{disabled:!0}})})]}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"10px"},children:o.jsx($e,{span:24,children:o.jsx(B.BwgFormItem,{label:"상태",name:"status",children:o.jsxs(p.Space,{children:[o.jsx(B.BwgButton,{icon:o.jsx(G.ReloadOutlined,{}),type:h==="READY"?"primary":"default",onClick:()=>I("READY"),children:"대기"}),o.jsx(B.BwgButton,{icon:o.jsx(G.UserAddOutlined,{}),onClick:O,type:h==="ASSIGNED"?"primary":"default",children:"담당자 지정"}),o.jsx(B.BwgButton,{icon:o.jsx(G.ClockCircleOutlined,{}),type:h==="PROCESSING"?"primary":"default",onClick:()=>I("PROCESSING"),children:"처리중"}),o.jsx(B.BwgButton,{icon:o.jsx(G.CheckOutlined,{}),onClick:()=>I("COMPLETED"),type:h==="COMPLETED"?"primary":"default",children:"처리완료"}),o.jsx(B.BwgButton,{icon:o.jsx(G.CloseOutlined,{}),onClick:()=>I("REJECTED"),type:h==="REJECTED"?"primary":"default",children:"반려"})]})})})}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(B.BwgMaskedDate,{itemProps:{label:"마감요청일자",name:"dueDt"},inputProps:{disabled:!0}})}),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:R=>`${R}%`})]})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[o.jsx($e,{span:12,children:o.jsx(B.BwgEmpSearch,{label:"처리담당자",empNoFieldName:"prcsUserId",field1:{value:"deptNm",fieldName:"prcsUserDeptNm",placeholder:"부서명"},field2:{value:"empNm",fieldName:"prcsUserNm",placeholder:"사원명 입력"},onFinish:()=>{n.setFieldValue("status","ASSIGNED"),m("ASSIGNED")}})}),o.jsx($e,{span:12,children:o.jsx(B.BwgMaskedDate,{itemProps:{label:"처리일자",name:"prcsDt"},inputProps:{disabled:!0}})})]}),o.jsx(p.Divider,{}),o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(Dh,{itemProps:{label:"내용",name:"content"},editorProps:{isEditing:!d,title:{title:o.jsxs(o.Fragment,{children:[o.jsx(G.EditOutlined,{style:{marginRight:"5px"}})," ","상세내용"]}),children:o.jsx(B.BwgButton,{icon:o.jsx(G.EyeFilled,{}),onClick:()=>u(!d),children:"미리보기"})}}})})})]})})}),o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Yg,{boardMstrId:n.getFieldValue("boardMstrId"),isCompleted:g})})]})}),o.jsx(Do,{ref:f,mode:"server",onServerPageChange:(R,z)=>{b.SCMBoardMstr0001(R,z)},pageSizeOptions:[10,20,50]})]})})})},Xf=[{label:"전체",value:""},{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],Zf=[{label:"전체",value:""},{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],Q1={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},J1={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},PK={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},OK=({sysCd:e=__SYS_CD__,appCd:t=__APP_CD__})=>{const r=v.useRef(null),[n,i]=v.useState(!1),{searchBoxRef:a}=st.useSearchBox(),{user:s,hrInfo:l}=tt.useUserStore(),[c]=p.Form.useForm(),{openCorePopup:d}=st.usePopup(),u=v.useRef(null),[f,h]=v.useState(!1),g=p.Form.useWatch("status",c)??c.getFieldValue("status")??"READY",x=f||g==="READY",[y,w]=v.useState(!1),b=g==="COMPLETED"||g==="REJECTED",E=v.useMemo(()=>[{fieldName:"boardMstrId",header:{text:"글 번호"},width:80},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,styleName:"left"},{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:"rgstUserDeptNm",header:{text:"작성자 부서"},visible:!1},{fieldName:"rgstDt",header:{text:"작성일자"},width:120,textFormat:le.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:120,textFormat:le.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:"prcsUserDeptNm",header:{text:"처리담당자 부서"},visible:!1},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:le.realFormat.formatYmd,styleName:"center"}],[]),P=v.useMemo(()=>({container:{indicator:!1}}),[]),j={onCellDblClicked(F,M){const D=M.itemIndex??-1;if(D<0)return;const A=F.getValues(D);A&&(c.setFieldsValue({...A}),h(!1),i(!0))}},S=v.useMemo(()=>({SCMBoardMstr0001:async(F,M)=>{const D=F||u.current?.currentPage||1,A=M||u.current?.pageSize||20,T={...a?.current?.getFormData(),sysCd:e,appCd:t,myArticle:"Y",pageNum:D,pageCount:A},N=await le.callService("SCMBoardMstr0001",T,{isPopup:!0});N&&N.pageList&&(u.current?.setTotalData(N.pageCnt||0),r.current?.addAllData(N.pageList))},SCMBoardMstr0003:F=>{le.callService("SCMBoardMstr0003",{sysCd:e,appCd:t,...F,status:"READY",rgstUserId:s?.userId,rgstUserNm:s?.userNm},{isPopup:!0}).then(M=>{c.resetFields(),S.SCMBoardMstr0001()}).catch(M=>{console.error("게시물 제출 실패:",M)})},SCMBoardMstr0004:F=>{le.callService("SCMBoardMstr0004",{sysCd:e,appCd:t,boardMstrId:c.getFieldValue("boardMstrId"),...F},{isPopup:!0}).then(()=>{c.resetFields(),S.SCMBoardMstr0001()}).catch(M=>{console.error("게시물 변경 실패:",M)})}}),[a,c]),O=v.useMemo(()=>le.createBwgGridRenderer((F,M,D,A,T)=>{const N=F.getValue(M.index?.itemIndex,"type");T.render(o.jsx(p.Tag,{color:PK[N],children:Xf.find(U=>U.value===N)?.label}))}),[]),k=v.useMemo(()=>le.createBwgGridRenderer((F,M,D,A,T)=>{const N=F.getValue(M.index?.itemIndex,"status");T.render(o.jsx(p.Tag,{color:Q1[N],children:Zf.find(U=>U.value===N)?.label}))}),[]),I=v.useMemo(()=>le.createBwgGridRenderer((F,M,D,A,T)=>{F.getValue(M.index?.itemIndex,"urgentYn")==="Y"?T.render(o.jsx(G.AlertTwoTone,{twoToneColor:"red"})):T.render(o.jsx(o.Fragment,{}))}),[]),_=()=>{try{c.validateFields().then(F=>{p.Modal.confirm({title:f?"등록 확인":"변경 확인",content:f?"게시물 내용 등록하시겠습니까?":"게시물 내용 변경하시겠습니까?",okText:f?"등록":"변경",cancelText:"취소",onOk:()=>{f?S.SCMBoardMstr0003(F):S.SCMBoardMstr0004(F),i(!1)}})})}catch(F){console.error("게시물 제출 실패:",F)}},$=()=>{d("CORE_PRGR_02",{callback:F=>{c.setFieldsValue({menuId:F.menuId,menuNm:F.menuNm})}})};v.useEffect(()=>{setTimeout(()=>{S.SCMBoardMstr0001()},100)},[S]);const R={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(B.BwgMaskedRange,{itemProps:{label:"작성일자",name:"rgstDt"},pickerProps:{allowEmpty:!0}})}),o.jsx($e,{span:8,children:o.jsx(B.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"]},onSearch:()=>{d("CORE_PRGR_02",{callback:F=>{a?.current?.setFormData({menuId:F.menuId,menuNm:F.menuNm})}})}})})]}),o.jsxs(wt,{gutter:[12,8],children:[o.jsx($e,{span:4,children:o.jsx(B.BwgSelect,{itemProps:{label:"구분",name:"type"},selectProps:{options:Xf,placeholder:"전체"}})}),o.jsx($e,{span:4,children:o.jsx(B.BwgSelect,{itemProps:{label:"상태",name:"status"},selectProps:{options:Zf,placeholder:"전체"}})}),o.jsx($e,{span:8,children:o.jsx(B.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})]})]})},z=v.useMemo(()=>({grant:[{id:"search",label:"조회",onClick:()=>{S.SCMBoardMstr0001()}},{id:"new",label:"등록",onClick:()=>{h(!0),c.resetFields(),c.setFieldsValue({rgstUserId:s?.userId,rgstUserNm:s?.userNm,rgstDt:le.now().format(),status:"READY"}),i(!0)}},{id:"edit",label:"변경",onClick:()=>{const F=r.current?.getCurrentIndex?.()??-1;if(F<0)return;const M=r.current?.vw?.getValues(F);M&&(c.setFieldsValue({...M}),h(!1),i(!0))}}]}),[S,c,r,s]);return o.jsx(Rt,{searchBox:R,buttons:z,children:o.jsx(ze,{children:o.jsxs(Ae,{children:[o.jsx(Ve,{gridId:"CMMyBoardM0101",ref:r,type:"nrml",gridColumns:E,gridOptions:P,gridEvents:j,renderers:[{name:"tagType",renderer:O},{name:"statusTag",renderer:k},{name:"alert",renderer:I}]}),o.jsx(fn,{title:`게시물 ${f?"등록":"변경"}`,open:n,onClose:()=>i(!1),showCloseButton:!1,size:"large",placement:"right",width:f?800:1200,extra:o.jsx(p.ConfigProvider,{children:o.jsxs(p.Space,{children:[o.jsx(p.Button,{className:"btn-primary .btn-primary:hover",onClick:()=>i(!1),children:"취소"}),f||c.getFieldValue("status")==="READY"?o.jsx(p.Button,{className:"btn-primary .btn-primary:hover",onClick:_,children:f?"등록":"변경"}):null]})}),children:o.jsxs(p.Splitter,{children:[o.jsx(p.Splitter.Panel,{defaultSize:f?"100%":"70%",min:f?"100%":"60%",max:f?"100%":"80%",style:{paddingRight:f?"0px":"15px",overflowX:"hidden"},children:o.jsx(Ae,{style:{overflowY:"auto"},children:o.jsxs(B.BwgForm,{form:c,onFinish:_,initialValues:{rgstUserNm:s?.userNm||"",rgstUserDeptNm:l?.deptNm||""},children:[o.jsx(wt,{gutter:[12,8],children:o.jsx($e,{span:24,children:o.jsx(B.BwgInput,{itemProps:{name:"title",rules:[{required:!0,message:"제목을 입력해주세요."}]},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(B.BwgSelect,{itemProps:{label:"구분",name:"type",rules:[{required:!0,message:"구분을 선택해주세요."}]},selectProps:{options:[...Xf].filter(F=>F.value!==""),disabled:!x}})}),o.jsx($e,{span:16,children:o.jsx(B.BwgSearch,{itemProps:{label:"메뉴",name:["menuId","menuNm"],rules:[{required:!0,message:"메뉴를 선택해주세요."}]},onSearch:$,readOnly:!x})})]}),o.jsxs(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:[!f&&o.jsx($e,{span:12,children:o.jsx(B.BwgFormItem,{label:"상태",children:o.jsx("div",{style:{marginBottom:4},children:c.getFieldValue("status")&&o.jsx(p.Tag,{color:Q1[c.getFieldValue("status")],children:Zf.find(F=>F.value===c.getFieldValue("status"))?.label})})})}),!f&&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:J1[c.getFieldValue("status")],status:J1[c.getFieldValue("status")]>0?"active":"normal",size:"small",format:F=>`${F}%`})]})})]}),!f&&o.jsx(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:o.jsx($e,{span:12,children:o.jsx(B.BwgEmpSearch,{label:"처리담당자",empNoFieldName:"prcsUserId",field1:{value:"deptNm",fieldName:"prcsUserDeptNm",placeholder:"부서명"},field2:{value:"empNm",fieldName:"prcsUserNm",placeholder:"사원명"},readOnly:!0})})}),o.jsx(p.Divider,{}),o.jsx(wt,{gutter:[12,8],style:{marginBottom:"8px"},children:o.jsx($e,{span:24,children:o.jsx(Dh,{border:!1,itemProps:{name:"content",rules:[{required:!0,message:"내용을 입력해주세요."}]},editorProps:{isEditing:x&&!y,title:{title:o.jsxs(o.Fragment,{children:[o.jsx(G.EditOutlined,{style:{marginRight:"5px"}})," ","상세내용 작성"]}),children:x&&o.jsx(p.Button,{icon:o.jsx(G.EyeFilled,{}),onClick:()=>w(!y),children:"미리보기"})}}})})})]})})}),!f&&o.jsx(p.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:o.jsx(Yg,{boardMstrId:c.getFieldValue("boardMstrId"),isCompleted:b})})]})}),o.jsx(Do,{ref:u,mode:"server",onServerPageChange:(F,M)=>{S.SCMBoardMstr0001(F,M)},pageSizeOptions:[10,20,50]})]})})})},kK=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Qf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Ia(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:kK(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Qf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Qf(e.orgSortOrd,0),orgOtptOrd:Qf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function TK(e){const t=new Set,r=e.map(Ia).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 IK(e){const t=e.map(Ia),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 cO=({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 le.callService("SCMUTIL00103",{...e?.popupParams,...S}),k=Array.isArray(O?.data)?O.data:Array.isArray(O?.deptList)?O.deptList:Array.isArray(O)?O:[],I=TK(k);d(I);const _=IK(k);a(_);const $=I[0]?.deptCd||Ia(k.find(R=>Ia(R).deptLvl===1)||{}).deptCd||Ia(k[0]||{}).deptCd||"";l($?[$]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{f(!1)}},[e?.popupParams]);v.useEffect(()=>{h()},[h]);const m=v.useCallback((S,O)=>{for(const k of S){if(k.deptCd===O)return k;if(k.children){const I=m(k.children,O);if(I)return I}}return null},[]),g=v.useMemo(()=>{const S=s[0];return S?m(c,S):null},[s,c,m]),x=v.useMemo(()=>{const S=k=>k.map(I=>({title:I.deptNm,key:I.deptCd,meta:I,children:I.children?S(I.children):void 0}));return S(c)},[c]),y=v.useMemo(()=>{const S=r.trim().toLowerCase();if(!S)return x;const O=k=>k.map(I=>{const _=I.meta,$=(_?.deptNm||"").toLowerCase().includes(S)||(_?.deptCd||"").toLowerCase().includes(S),R=I.children?O(I.children):void 0;return $||R&&R.length?{...I,children:R}: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)),[]),E=v.useCallback((S,O)=>{if(S.stopPropagation(),!O.children||O.children.length===0)return;const k=i.includes(O.key);a(I=>k?I.filter(_=>_!==O.key):[...I,O.key])},[i]),P=v.useCallback(()=>l([]),[]),j={confirm:()=>{if(!g){p.message.error("부서를 선택해주세요.");return}const S={deptCd:g.deptCd,deptNm:g.deptNm,hrnkDeptCd:g.hrnkDeptCd,hrnkDeptNm:g.hrnkDeptNm,deptLvl:g.deptLvl,orgSortOrd:g.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(mi,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{j.confirm()}}],popupEvent:j,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(Ae,{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(G.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:E,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:"선택된 부서"}),g?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(G.TeamOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:15,fontWeight:700,marginBottom:4},children:[g.deptNm," ",o.jsxs("span",{style:{color:"#8c8c8c",fontSize:12},children:["(",g.deptCd,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:2},children:["상위부서: ",g.hrnkDeptNm||"-"]})]}),o.jsx(p.Button,{type:"text",onClick:P,icon:o.jsx(G.RestOutlined,{style:{fontSize:24,color:"#FF6363"}})})]}):o.jsx("div",{style:{color:"#999",fontSize:14},children:"부서를 선택해주세요."})]})})]})})})})},MK=Object.freeze(Object.defineProperty({__proto__:null,default:cO},Symbol.toStringTag,{value:"Module"})),RK=e=>{if(e==null)return"";const t=String(e).trim();return!t||t.toUpperCase()==="NULL"?"":t.toUpperCase()},Jf=(e,t=0)=>{const r=Number(e);return Number.isFinite(r)?r:t};function Ma(e){return{crprCd:e.crprCd||void 0,wkplCd:e.wkplCd||void 0,deptCd:RK(e.deptCd),deptNm:(e.deptNm??"").toString().trim(),hrnkDeptCd:e.hrnkDeptCd||null,hrnkDeptNm:e.hrnkDeptNm||null,deptGbCd:e.deptGbCd||null,deptLvl:Jf(e.deptLvl,e.hrnkDeptCd?2:1),orgSortOrd:Jf(e.orgSortOrd,0),orgOtptOrd:Jf(e.orgOtptOrd,0),deptAbrv:e.deptAbrv||null,deptFullNm:e.deptFullNm||null,deptEnglNm:e.deptEnglNm||null,isLeaf:e.isLeaf||null}}function AK(e){const t=new Set,r=e.map(Ma).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 NK(e){const t=e.map(Ma),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 uO=({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,m]=v.useState(!1),[g,x]=v.useState([]),[y,w]=v.useState(!1),b=v.useCallback(async M=>{try{w(!0);const D=await le.callService("SCMUTIL00103",{...e?.popupParams,...M}),A=Array.isArray(D?.data)?D.data:Array.isArray(D?.deptList)?D.deptList:Array.isArray(D)?D:[],T=AK(A);x(T);const N=NK(A);l(N);const U=T[0]?.deptCd||Ma(A.find(H=>Ma(H).deptLvl===1)||{}).deptCd||Ma(A[0]||{}).deptCd||"";d(U?[U]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{w(!1)}},[e?.popupParams]);v.useEffect(()=>{b()},[b]);const E=v.useCallback((M,D)=>{for(const A of M){if(A.deptCd===D)return A;if(A.children){const T=E(A.children,D);if(T)return T}}return null},[g]),P=v.useMemo(()=>u.map(M=>{const D=E(g,M);if(!D)return null;const{children:A,...T}=D;return T}).filter(Boolean),[u,g,E]),j=v.useMemo(()=>{const M=D=>D.map(A=>({title:A.deptNm,key:A.deptCd,meta:A,children:A.children?M(A.children):void 0,isLeaf:!A.children||A.children.length===0}));return M(g)},[g]),S=v.useMemo(()=>{const M=r.trim().toLowerCase();if(!M)return j;const D=A=>A.map(T=>{const N=T.meta,U=(N?.deptNm||"").toLowerCase().includes(M)||(N?.deptCd||"").toLowerCase().includes(M),H=T.children?D(T.children):void 0;return U||H&&H.length>0?{...T,children:H}:null}).filter(Boolean);return D(j)},[j,r]),O=v.useCallback(M=>{const D=[],A=T=>{for(const N of T)if(N.deptCd===M&&N.children){const U=H=>{for(const V of H)D.push(V.deptCd),V.children&&U(V.children)};U(N.children)}else N.children&&A(N.children)};return A(g),D},[g]),k=v.useCallback((M,D)=>{let A=Array.isArray(M)?M:M?.checked??[];if(h&&D?.node?.key){const T=D.node.key,N=O(T);if(D.checked){const U=new Set(A);for(const H of N)U.add(H);A=Array.from(U)}else{const U=new Set([T,...N]);A=A.filter(H=>!U.has(H))}}f(A)},[h,O]),I=v.useCallback(M=>{const D=M.map(String);if(d(D),D.length>0){const A=D[0],T=(U,H)=>{for(const V of U){if(V.deptCd===H)return V.deptNm;if(V.children){const K=T(V.children,H);if(K)return K}}return null},N=T(g,A);N&&a(N)}},[g]),_=v.useCallback(M=>l(M.map(String)),[]),$=v.useCallback((M,D)=>{if(M.stopPropagation(),D.children&&D.children.length>0){const A=s.includes(D.key);l(T=>A?T.filter(N=>N!==D.key):[...T,D.key])}},[s]),R=v.useCallback(M=>{f(D=>D.filter(A=>A!==M))},[]),z=v.useCallback(()=>{f([])},[]),F={confirm:()=>{if(u.length===0){p.message.error("부서를 선택해주세요.");return}const D=Array.from(new Set(u)).map(T=>{const N=E(g,T);return N?{deptCd:N.deptCd,deptNm:N.deptNm,hrnkDeptCd:N.hrnkDeptCd,hrnkDeptNm:N.hrnkDeptNm}:null}).filter(Boolean),A=e?.config;A?.onSelect?A.onSelect(D):e?.config?.callback&&e.config.callback(JSON.stringify(D)),A?.onClose&&A.onClose(),e?.close?.()},cancel:()=>{const M=e?.config;M?.onCancel&&M.onCancel(),e?.close?.()}};return o.jsx(mi,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{F.confirm()}}],popupEvent:F,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(Ae,{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(G.SearchOutlined,{}),value:r,allowClear:!0,onChange:M=>n(M.target.value)})}),o.jsx(p.Col,{span:6,style:{justifyContent:"center",display:"flex",alignItems:"center"},children:o.jsx(p.Checkbox,{checked:h,onChange:M=>m(M.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:I,onExpand:_,onCheck:k,onDoubleClick:$,style:{overflow:"hidden"},titleRender:M=>{const D=M.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(M.key)?"bold":"normal"},children:D.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:D.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:z,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(M=>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:`${M.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(G.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:M.deptNm}),o.jsx("span",{style:{fontSize:11,color:"#8c8c8c",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:M.deptCd})]}),o.jsx("button",{onClick:()=>R(M.deptCd),style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",padding:2,lineHeight:0},"aria-label":`${M.deptNm} 선택 해제`,title:"선택 해제",children:"×"})]},M.deptCd))})]})})]})})})})},DK=Object.freeze(Object.defineProperty({__proto__:null,default:uO},Symbol.toStringTag,{value:"Module"})),dO=({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,m]=v.useState(null),g=v.useRef(null),[x,y]=v.useState(""),[w,b]=v.useState([]),[E,P]=v.useState(!1),[j,S]=v.useState([]),O=v.useCallback(T=>{const N=[...T].sort((K,oe)=>K.deptLvl-oe.deptLvl||K.orgSortOrd-oe.orgSortOrd||K.deptCd.localeCompare(oe.deptCd)),U=new Map;N.forEach(K=>U.set(K.deptCd,{...K,children:[]}));const H=[];N.forEach(K=>{const oe=U.get(K.deptCd),pe=K.hrnkDeptCd;pe&&U.has(pe)?U.get(pe).children.push(oe):H.push(oe)});const V=K=>{!K.children||K.children.length===0?delete K.children:K.children.forEach(V)};return H.forEach(V),H},[]),k=v.useCallback(async T=>{if(console.log("call fetchEmployees!!!!!!!!!!!!"),!!T)try{const N=await le.callService("SCMUTIL00106",{deptCds:T},{showLoading:!1}),U=Array.isArray(N?.empList)&&N.empList||[];f(U)}catch(N){console.error("직원 목록 로딩 실패:",N),p.message.error("직원 목록을 불러오는 중 오류가 발생했습니다.")}},[e?.popupParams]);v.useEffect(()=>{g.current=k},[k]);const I=v.useCallback(async(T,N)=>{try{const U={keyword:T,deptCds:N},H=await le.callService("SCMUTIL00106",U,{showLoading:!1});y(T),b(H?.empList||[])}catch(U){console.error("검색 실패:",U),p.message.error("검색 중 오류가 발생했습니다."),b([])}},[e?.popupParams]),_=v.useCallback(async()=>{d(!0);try{const T=await le.callService("SCMUTIL00103",{...e?.popupParams},{showLoading:!1}),N=Array.isArray(T?.deptList)&&T.deptList||[];if(N.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const U=O(N);l(U);const H=N.filter(K=>Number(K.deptLvl)<=2).map(K=>String(K.deptCd));if(n(H),e?.popupParams?.keyword){const K=e.popupParams.keyword;await I(K,[]);return}const V=U[1];V&&g.current&&(a([V.deptCd]),g.current([V.deptCd]))}catch(T){console.error("부서 목록 로딩 실패:",T),p.message.error("부서 목록을 불러오는 중 오류가 발생했습니다.")}finally{d(!1)}},[O,e?.popupParams]);v.useEffect(()=>{_()},[_]);const $=v.useMemo(()=>{const T=N=>N.map(U=>({title:o.jsxs(o.Fragment,{children:[o.jsxs("span",{style:{marginRight:4},children:[U.deptNm," "]}),o.jsx(p.Tag,{color:"default",icon:o.jsx(G.UserOutlined,{}),style:{borderRadius:"7px",fontSize:"11px"},children:U.empCnt},U.deptCd)]}),key:U.deptCd,children:U.children?T(U.children):void 0,isLeaf:!U.children||U.children.length===0}));return T(s)},[s]),R=v.useCallback(T=>{h&&h.empNo===T.empNo?m(null):m(T)},[h]),z=v.useCallback(T=>{const N=T.map(String);a(N);const U=(V,K)=>{for(const oe of V){if(oe.deptCd===K)return{deptCd:oe.deptCd,deptNm:oe.deptNm};if(oe.children){const pe=U(oe.children,K);if(pe)return pe}}return null};if(!N[0])return;const H=U(s,N[0]);if(H&&(k([H.deptCd]),E)){if(j.some(K=>K.deptCd===H.deptCd))return;if(j.length>=5){p.message.warning("부서는 최대 5개까지 선택할 수 있습니다.");return}S(K=>[...K,H])}},[s,k,E,j]),F=v.useCallback(T=>{n(T.map(String))},[]),M=v.useCallback(async T=>{const N=T.trim();y(N);const U=E&&j.length>0?j.map(H=>H.deptCd):[];await I(N,U)},[I,E,j]),D=v.useCallback(T=>{S(N=>N.filter(U=>U.deptCd!==T))},[]),A={confirm:()=>{if(h){const T=e?.config;T?.onSelect?T.onSelect(h):e?.popupParams?.onSelect?e.popupParams.onSelect(h):e?.config?.callback&&e.config.callback(JSON.stringify(h,null,2)),T?.onClose&&T.onClose(),e?.close?.()}else p.message.error("사원을 선택해주세요.")},cancel:()=>{const T=e?.config;T?.onCancel&&T.onCancel(),e?.close?.()}};return o.jsx(mi,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{A.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(Ae,{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:12,vertical:!0,children:[o.jsx(Le,{title:"조직도",marginBottom:0}),o.jsx(p.Input.Search,{placeholder:"이름, 소속, 전화번호 검색",prefix:o.jsx(G.SearchOutlined,{}),value:x,allowClear:!0,enterButton:o.jsx(p.Button,{children:"검색"}),onChange:T=>{y(T.target.value)},onSearch:M}),o.jsx(p.Flex,{gap:8,align:"center",style:{marginLeft:6},children:o.jsxs(Nh,{children:[o.jsx(p.Switch,{checked:E,onChange:T=>{P(T),T||S([])}}),o.jsx("span",{style:{fontSize:"14px"},children:"부서 안에서 검색하기"})]})}),E&&o.jsx(p.Flex,{gap:4,wrap:"wrap",style:{margin:4},children:j.length>0?o.jsx(o.Fragment,{children:j.slice(0,5).map(T=>o.jsx(p.Tag,{closable:!0,onClose:()=>D(T.deptCd),children:T.deptNm},T.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:z,onExpand:F,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:T=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontWeight:i.includes(T.key)?"bold":"normal",display:"inline-block",width:"100%"},children:T.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(T=>o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"12px",border:"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:h&&h.crprCd===T.crprCd&&h.wkplCd===T.wkplCd&&h.empNo===T.empNo?"#efebff":"white"},onClick:()=>R(T),children:[o.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"},onClick:N=>{N.stopPropagation(),R(T)},children:h&&h.crprCd===T.crprCd&&h.wkplCd===T.wkplCd&&h.empNo===T.empNo?o.jsx(G.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(G.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(G.UserOutlined,{})}),o.jsxs("div",{style:{flex:1},children:[o.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px"},children:T.empNm}),o.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"2px"},children:[T.deptNm," (",T.deptCd,") | 직급:"," ",T.jbpsCd," | 등급: ",T.jbgdCd]})]})]},`emp-${T.crprCd}-${T.wkplCd}-${T.empNo}-${T.jbpsCd}-${T.jbgdCd}-${T.empMarkOrd}`)),(x?w:u).length===0&&o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:x?"검색버튼이나 엔터키를 눌러주세요.":"해당 부서에 직원이 없습니다."})]})]})})]})})})})},_K=Object.freeze(Object.defineProperty({__proto__:null,default:dO},Symbol.toStringTag,{value:"Module"})),fO=({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,m]=v.useState(!1),[g,x]=v.useState({}),y=v.useCallback(async()=>{try{m(!0);const M=await le.callService("SCMUTIL00105",{...e?.popupParams});console.log("📊 조직도 API 응답:",M);const D=Array.isArray(M?.data)?M.data:Array.isArray(M?.orgnList)?M.orgnList:Array.isArray(M)?M:[];if(D.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const A=w(D);console.log("🌳 구성된 조직도 트리:",A),f(A);const T=D.filter(N=>N.deptLvl<=2).map(N=>N.deptCd);if(l(T),A.length>0){const N=A[0];d([N.deptCd]),a(N.deptNm)}console.log("✅ 조직도 데이터 로딩 완료")}catch(M){console.error("❌ 조직도 데이터 로딩 실패:",M),p.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{m(!1)}},[e?.popupParams]),w=v.useCallback(M=>{const D=[...M].sort((U,H)=>U.deptLvl-H.deptLvl||U.orgSortOrd-H.orgSortOrd||U.deptCd.localeCompare(H.deptCd)),A=new Map;for(const U of D)A.set(U.deptCd,{...U,children:[]});const T=[];for(const U of D){const H=A.get(U.deptCd),V=U.hrnkDeptCd;V&&A.has(V)?A.get(V).children.push(H):T.push(H)}const N=U=>{if(!U.children||U.children.length===0){delete U.children;return}U.children.forEach(N)};return T.forEach(N),T},[]);v.useEffect(()=>{y()},[y]);const b=v.useMemo(()=>{const M=T=>{let N=[];return T.forEach(U=>{U.employees&&(N=N.concat(U.employees)),U.children&&(N=N.concat(M(U.children)))}),N},D=M(u),A=D.filter((T,N,U)=>N===U.findIndex(H=>H.empNo===T.empNo));return console.log(`👥 전체 사원 수: ${D.length}, 중복 제거 후: ${A.length}`),A},[u]),E=v.useMemo(()=>{const M=D=>D.map(A=>({title:A.deptNm,key:A.deptCd,children:A.children?M(A.children):void 0,isLeaf:!A.children||A.children.length===0}));return M(u)},[u]),P=v.useMemo(()=>{if(!r.trim())return E;const M=D=>D.map(A=>{const T=A.title.toLowerCase().includes(r.toLowerCase()),N=A.children?M(A.children):void 0;return T||N&&N.length>0?{...A,children:N}:null}).filter(Boolean);return M(E)},[E,r]),j=v.useMemo(()=>{if(!r.trim()){const M=U=>{let H=[];return U.forEach(V=>{V.employees&&(H=H.concat(V.employees)),V.children&&(H=H.concat(M(V.children)))}),H},D=(U,H)=>{for(const V of U){if(V.deptCd===H){let K=[...V.employees||[]];return V.children&&(K=K.concat(M(V.children))),K}if(V.children){const K=D(V.children,H);if(K.length>0)return K}}return[]},A=c[0];if(!A)return[];const T=D(u,A),N=T.filter((U,H,V)=>H===V.findIndex(K=>K.empNo===U.empNo));return console.log(`🔍 선택된 부서: ${A}, 반환된 사원 수: ${T.length}, 중복 제거 후: ${N.length}`),N}return b.filter(M=>M.empNm.toLowerCase().includes(r.toLowerCase())||M.empNo.toLowerCase().includes(r.toLowerCase())||M.deptNm.toLowerCase().includes(r.toLowerCase())||M.jbpsCd.includes(r)||M.jbgdCd.includes(r)||M.emplyStCd.includes(r))},[r,c,b,u]),S=v.useCallback(M=>{x(D=>{const A={...D};return A[M.empNo]?delete A[M.empNo]:A[M.empNo]=M,A})},[]),O=v.useCallback(M=>{x(D=>{const A={...D};return delete A[M],A})},[]),k=v.useCallback(()=>x({}),[]),I=v.useCallback(()=>{x(M=>{const D={...M};for(const A of j)D[A.empNo]=A;return D})},[j]),_=v.useCallback(()=>{x(M=>{const D={...M};for(const A of j)delete D[A.empNo];return D})},[j]),$=v.useCallback(M=>{const D=M.map(String);if(console.log(`🌳 트리 선택: ${D.join(", ")}`),d(D),D.length>0){const A=D[0],T=(U,H)=>{for(const V of U){if(V.deptCd===H)return V.deptNm;if(V.children){const K=T(V.children,H);if(K)return K}}return null},N=T(u,A);N&&a(N)}},[u]),R=v.useCallback(M=>{l(M.map(String))},[]),z=v.useCallback((M,D)=>{if(M.stopPropagation(),!D.children||!D.children.length)return;const A=s.includes(D.key);l(T=>A?T.filter(N=>N!==D.key):[...T,D.key])},[s]),F={confirm:()=>{const M=Object.values(g).map(A=>({crprCd:A.crprCd,wkplCd:A.wkplCd,empNo:A.empNo,deptCd:A.deptCd,deptNm:A.deptNm,empNm:A.empNm,jbpsCd:A.jbpsCd,jbgdCd:A.jbgdCd,empMarkOrd:A.empMarkOrd,emplyStCd:A.emplyStCd}));if(M.length===0){p.message.error("직원을 선택해주세요.");return}const D=e?.config;D?.onSelect?D.onSelect(M):e?.config?.callback&&e.config.callback(JSON.stringify(M)),D?.onClose&&D.onClose(),e?.close?.()},cancel:()=>{const M=e?.config;M?.onCancel&&M.onCancel(),e?.close?.()}};return o.jsx(mi,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{F.confirm()}}],popupEvent:F,onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsx(Ae,{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(G.SearchOutlined,{}),value:r,allowClear:!0,onChange:M=>n(M.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:R,onDoubleClick:z,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:M=>o.jsx("span",{style:{padding:"4px 8px",borderRadius:4,fontWeight:c.includes(M.key)?"bold":"normal",display:"inline-block",width:"100%"},children:M.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:I,children:"현재 목록 전체 선택"}),o.jsx(p.Button,{size:"small",onClick:_,children:"현재 목록 전체 해제"})]})]}),o.jsx(p.Divider,{style:{margin:"8px 0"}}),o.jsxs("div",{style:{overflowY:"auto"},children:[j.map(M=>{const D=!!g[M.empNo];return o.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,cursor:"pointer",background:D?"#efebff":"#fff"},onClick:()=>S(M),children:[o.jsx("div",{style:{marginRight:12,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"},onClick:A=>{A.stopPropagation(),S(M)},children:D?o.jsx(G.CheckCircleFilled,{style:{fontSize:20,color:"#6449fc"}}):o.jsx(G.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(G.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:14,fontWeight:600,marginBottom:2},children:[M.empNm,o.jsxs("span",{style:{fontSize:12,fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",M.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[M.deptNm," (",M.deptCd,") | 직급: ",M.jbpsCd," ","| 등급: ",M.jbgdCd]})]})]},`emp-${M.crprCd}-${M.wkplCd}-${M.empNo}-${M.jbpsCd}-${M.jbgdCd}-${M.empMarkOrd}`)}),j.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(g).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(g).map(M=>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(G.UserOutlined,{})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:[M.empNm,o.jsxs("span",{style:{fontSize:11,fontWeight:"normal",color:"#666",marginLeft:"6px"},children:["(",M.empNo,")"]})]}),o.jsxs("div",{style:{fontSize:12,color:"#666"},children:[M.deptNm," (",M.deptCd,") | 직급: ",M.jbpsCd," | 등급: ",M.jbgdCd]})]}),o.jsx(p.Button,{type:"text",shape:"circle",icon:o.jsx(G.CloseOutlined,{}),onClick:()=>O(M.empNo)})]},`selected-${M.crprCd}-${M.wkplCd}-${M.empNo}-${M.jbpsCd}-${M.jbgdCd}-${M.empMarkOrd}`)),Object.keys(g).length===0&&o.jsx("div",{style:{color:"#999",fontSize:14,textAlign:"center",padding:24},children:"선택된 사용자가 없습니다."})]})]})})]})})})})},BK=Object.freeze(Object.defineProperty({__proto__:null,default:fO},Symbol.toStringTag,{value:"Module"})),{Text:ew,Title:$K}=p.Typography,pO=({popup:e})=>{const[t,r]=v.useState(Cl()),[n,i]=v.useState(Cl()),[a,s]=v.useState([]),[l,c]=v.useState([]),[d,u]=v.useState("month");tt.useCodeStore();const{token:f}=p.theme.useToken(),h=(w,b,E=d)=>{const P=b.filter(j=>{if(E==="year"){const S=j.stndYmd.substring(0,6),O=w.format("YYYYMM");return S===O}else{const S=w.format("YYYYMMDD");return j.stndYmd===S}});s(P)},m=w=>{r(w),h(w,l,d)},g=(w,b)=>{i(w),u(b),y.SCMHLDY00101(b,w)};v.useEffect(()=>{y.SCMHLDY00101()},[]);const x=w=>{const b=l.filter(E=>{if(d==="year"){const P=E.stndYmd.substring(0,6),j=w.format("YYYYMM");return P===j}else{const P=w.format("YYYYMMDD");return E.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((E,P)=>o.jsx("div",{style:{flex:1,height:"3px",background:E.hldyYn==="Y"?f.colorError:f.colorSuccess,borderRadius:"1px"}},P))}):null},y={SCMHLDY00101:async(w=d,b=t)=>{try{let E;w==="year"?E=b.format("YYYY"):E=b.format("YYYYMM");const P=await le.callService("SCMHLDY00101",{crprCd:le.getUserInfo()?.crprCd||"",sysCd:__SYS_CD__,stndYmd:E});c(P.sub||[]),h(b,P.sub||[],w)}catch(E){console.error("휴일 데이터 로드 실패:",E),p.message.error("휴일 데이터를 불러오는데 실패했습니다.")}}};return o.jsx(mi,{popup:e,children:o.jsx(ze,{children:o.jsx(Ae,{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(G.CalendarOutlined,{}),o.jsx("span",{children:"휴일 달력"})]}),style:{height:"500px"},children:o.jsx(p.Calendar,{fullscreen:!1,value:t,onSelect:m,onPanelChange:g,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(G.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($K,{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(ew,{type:"secondary",style:{fontSize:f.fontSizeSM},children:Cl(w.stndYmd).format("YYYY년 MM월 DD일 dddd")})}),w.hldyDscr&&o.jsx("div",{children:o.jsx(ew,{style:{fontSize:f.fontSizeSM+1},children:w.hldyDscr})})]})},b))}):o.jsx(p.Empty,{description:"선택된 날짜에 등록된 휴일이 없습니다.",style:{marginTop:"100px"}})})})})]})})})})},LK=Object.freeze(Object.defineProperty({__proto__:null,default:pO},Symbol.toStringTag,{value:"Module"})),hO=({popup:e})=>{const t=v.useRef(null),[r,n]=v.useState(""),{menuList:i}=tt.useMenuModelStore(),[a,s]=v.useState(void 0),[l,c]=v.useState(null),d=v.useCallback(b=>{const E=[],P=j=>{j.forEach(S=>{S.children&&S.children.length>0&&(E.push(S.menuId),P(S.children))})};return P(b),E},[]),[u,f]=v.useState(()=>d([])),h=v.useCallback((b,E,P)=>{const j=(E||"").trim().toLowerCase(),S=k=>{const I=!j||k.menuNm?.toLowerCase().includes(j)||k.menuId?.toLowerCase().includes(j),_=!P||k.sysCd===P;return I&&_},O=k=>k.map(I=>{const _=I.children?O(I.children):[];return S(I)||_.length>0?{...I,children:_}:null}).filter(Boolean);return O(b||[])},[]),m=v.useMemo(()=>h(i,r,a),[i,r,a,h]),g=v.useCallback(b=>b.map(E=>({key:E.menuId,label:o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(!E.children||E.children.length===0)&&o.jsx(p.Tag,{color:"blue",style:{margin:0},children:E.menuId}),o.jsx("span",{children:E.menuNm})]}),children:E.children&&E.children.length>0?g(E.children):void 0,icon:x(E.iconCd,E.menuGbCd)})),[]),x=(b,E)=>{if(b){const P=Ri[b];if(P)return o.jsx(P,{})}if(E)switch(E){case"CMPRGRM":return o.jsx(Ri.HomeOutlined,{});case"CMPRGRS":return null;case"CMPRGRP":return null;default:return null}return null},y=v.useCallback((b,E)=>{for(const P of b){if(P.menuId===E)return P;if(P.children&&P.children.length>0){const j=y(P.children,E);if(j)return j}}return null},[]);v.useEffect(()=>{r&&f(d(m))},[r,m,d]);const w=[{id:"confirm",label:"확인",onClick:()=>{if(!l)return;const b=y(m,l);b&&(e?.config?.callback?.({menuId:b.menuId,menuNm:b.menuNm}),e?.close?.())}}];return o.jsx(mi,{popup:e,buttons:w,children:o.jsx(ze,{children:o.jsxs(Ae,{border:!1,children:[o.jsx(No,{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(B.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(G.SearchOutlined,{}),value:r,allowClear:!0,onChange:b=>{n(b.target.value)}})})]})})}),o.jsx(p.Menu,{mode:"inline",theme:"light",items:g(m),openKeys:u,onOpenChange:f,onClick:({key:b})=>{c(String(b))},style:{overflow:"auto"}})]})})})},zK=Object.freeze(Object.defineProperty({__proto__:null,default:hO},Symbol.toStringTag,{value:"Module"})),FK=[{label:"정확도 우선",value:"none"},{label:"도로명 포함",value:"road"},{label:"지번 포함",value:"location"}],VK=["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"],mO=({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,m]=v.useState(0),[g,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",{}),"- 검색하기 위해 검색 버튼이나 엔터키를 눌러주세요."]})]})]})]}),[]),E=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 I=await le.callService("SCMUTIL00202",{},{showLoading:!1});w(I?.result===1)}catch{w(!1)}})()},[]);const P=v.useCallback(async(k,I)=>{if(i.trim().length<2){p.message.warning("검색어는 2글자 이상 입력해주세요.");return}const _=i.replace(/(시|도|구|군)(?=[가-힣0-9])/g,"$1 ").replace(/\s+/g," ").trim(),$=_.split(/\s+/).filter(D=>D.length>0);if($.length===1&&/[시도구군]$/.test($[0])){p.message.warning("주소를 상세히 입력해 주시기 바랍니다.");return}const z=/[가-힣]/.test(_)?40:80,F=/^\d+$/.test(_);if(_.length>z){p.message.warning("검색어가 너무 깁니다. (한글 40자, 영문/숫자 80자 이하)");return}if(/\d{11,}/.test(_)){p.message.warning("검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자 10자 이하)");return}if(F&&_.length!==5||/^[0-9\W_]+$/.test(_)&&/\d/.test(_)&&!/[A-Za-z가-힣]/.test(_)&&!F){p.message.warning("특수문자+숫자만으로는 검색이 불가능 합니다.");return}if(VK.some(D=>new RegExp(`\\b${D}\\b`,"i").test(_))||/[[\]%=><]/.test(_)){p.message.warning("SQL 예약어 또는 특수문자( %,=,>,<,[,] )는 검색이 불가능 합니다.");return}f(!0);try{const D=k||r.current?.currentPage||1,A=I||r.current?.pageSize||10,T={keyword:_,currentPage:D,countPerPage:A,firstSort:g,...e?.popupParams},N=await le.callService("SCMUTIL00201",T,{showLoading:!1});if(N.errorCode!=="0"){p.message.error(N.errorCode+" : "+N.errorMessage);return}const U=N?.pageList&&Array.isArray(N.pageList)&&N.pageList||[],H=N?.pageCnt||0;l(U),m(H),r.current?.setTotalData(H),setTimeout(()=>{n.current&&(n.current.scrollTop=0)},0),(U.length===0||H===0)&&p.message.info("검색 결과가 없습니다.")}catch(D){console.error("주소 검색 실패:",D),p.message.error("주소 검색 중 오류가 발생했습니다."),l([]),m(0),r.current?.setTotalData(0)}finally{f(!1)}},[i,g,e?.popupParams]),j=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},I=e?.config;I?.onSelect?I.onSelect(k):e?.popupParams?.onSelect?e.popupParams.onSelect(k):e?.config?.callback&&e.config.callback(k),I?.onClose&&I.onClose(),e?.close?.()}}),[c,e]);return o.jsx(mi,{popup:e,buttons:[{id:"confirm",label:"확인",onClick:()=>{O.confirm()}}],onClose:()=>{e?.close?.(),t?.()},children:o.jsx(ze,{children:o.jsxs(Ae,{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:g,onChange:k=>{x(k.target.value)},children:FK.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(G.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"검색 가이드"]})}),o.jsx(p.Popover,{content:E,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(G.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"에러 메시지 안내"]})})]})]}),o.jsx(p.Input.Search,{placeholder:"도로명, 지번, 건물명, 우편번호로 검색",prefix:o.jsx(G.SearchOutlined,{}),value:i,allowClear:!0,enterButton:"검색",onChange:k=>{a(k.target.value)},onSearch:j,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,I)=>{const _=c?.bdMgtSn===k.bdMgtSn;return o.jsxs("div",{style:{display:"flex",alignItems:"flex-start",padding:"12px",border:_?"2px solid #6449fc":"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:_?"#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:_?o.jsx(G.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):o.jsx(G.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}-${I}`)})}):o.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:i?"검색 버튼이나 엔터키를 눌러 검색해주세요.":"주소를 검색해주세요."})})}),o.jsx(Do,{ref:r,mode:"server",onServerPageChange:(k,I)=>{P(k,I)},pageSizeOptions:[10,20,50]})]})]})})})},HK=Object.freeze(Object.defineProperty({__proto__:null,default:mO},Symbol.toStringTag,{value:"Module"}));exports.ButtonAccessController=ep;exports.BwgButtonGroup=tp;exports.BwgCmptArea=CO;exports.BwgCol=$e;exports.BwgComponentGuideM01=VN;exports.BwgConfigProvider=Nh;exports.BwgDetail=NO;exports.BwgDeveloperGuideM01=UN;exports.BwgDrawer=fn;exports.BwgEditor=Dh;exports.BwgGrid=Ve;exports.BwgInfoArea=pn;exports.BwgPagination=Do;exports.BwgPopup=mi;exports.BwgReactGuideM01=XN;exports.BwgRow=wt;exports.BwgSpace=Nc;exports.BwgTable=qO;exports.BwgTabs=lr;exports.BwgTitleBox=Le;exports.BwgView=Rt;exports.CMAdminBoardM01=EK;exports.CMAuthMstrM01=BN;exports.CMBoardCommentS01=Yg;exports.CMFileMstrM01=ZN;exports.CMHldyCfg=oD;exports.CMMenuMstrM01=JN;exports.CMMenuPrgrSelectModal=gS;exports.CMMenuPrntSelectModal=vS;exports.CMMyBoardM01=OK;exports.CMPopuMstrM01=eD;exports.CMPrgrMstrM01=iD;exports.CMPrgrMstrP02=hO;exports.CMPrgrMstrP02$1=zK;exports.CMRoleMstrM01=$N;exports.CMSystCfgM01=aD;exports.CMSystCodeM01=sD;exports.CMUserMstrM01=wK;exports.ContentBox=Ae;exports.ContentLayOut=ze;exports.GlobalConfigProvider=MN;exports.QuickServiceToggle=DN;exports.SSOHandler=_N;exports.SearchAddressP01=mO;exports.SearchAddressP01$1=HK;exports.SearchBox=No;exports.SearchDepartmentP01=cO;exports.SearchDepartmentP01$1=MK;exports.SearchDepartmentP02=uO;exports.SearchDepartmentP02$1=DK;exports.SearchHolidayP01=pO;exports.SearchHolidayP01$1=LK;exports.SearchOrganizationP01=dO;exports.SearchOrganizationP01$1=_K;exports.SearchOrganizationP02=fO;exports.SearchOrganizationP02$1=BK;exports.SystemCodeManage=bK;exports.commonjsGlobal=bO;exports.getAugmentedNamespace=wO;exports.getDefaultExportFromCjs=jr;
|