@bwg-ui/core 1.1.25 → 1.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/chunks/AuthContext-BQ3gHLbr.cjs +2 -0
  2. package/dist/chunks/{AuthContext-CXng9fj0.cjs.map → AuthContext-BQ3gHLbr.cjs.map} +1 -1
  3. package/dist/chunks/{AuthContext-DrEpBrpB.js → AuthContext-CVizgYxY.js} +9 -9
  4. package/dist/chunks/{AuthContext-DrEpBrpB.js.map → AuthContext-CVizgYxY.js.map} +1 -1
  5. package/dist/chunks/{BwgSpace-CnLM4qcg.js → BwgSpace-BPJARdOc.js} +4 -4
  6. package/dist/chunks/{BwgSpace-CnLM4qcg.js.map → BwgSpace-BPJARdOc.js.map} +1 -1
  7. package/dist/chunks/BwgSpace-Cw27d-XU.cjs +2 -0
  8. package/dist/chunks/{BwgSpace-b0hmM1Ht.cjs.map → BwgSpace-Cw27d-XU.cjs.map} +1 -1
  9. package/dist/chunks/BwgSwitch-BLtVdW44.cjs +2 -0
  10. package/dist/chunks/BwgSwitch-BLtVdW44.cjs.map +1 -0
  11. package/dist/chunks/{BwgSwitch-D_scwi9_.js → BwgSwitch-DdHo4gYR.js} +57 -57
  12. package/dist/chunks/BwgSwitch-DdHo4gYR.js.map +1 -0
  13. package/dist/chunks/{BwgUploader-DBFF9BPF.js → BwgUploader-BUmFmeuS.js} +801 -801
  14. package/dist/chunks/{BwgUploader-DBFF9BPF.js.map → BwgUploader-BUmFmeuS.js.map} +1 -1
  15. package/dist/chunks/BwgUploader-Djhl4lIt.cjs +3 -0
  16. package/dist/chunks/{BwgUploader-CkXwkcUL.cjs.map → BwgUploader-Djhl4lIt.cjs.map} +1 -1
  17. package/dist/chunks/LoadingOverlay-Uf6xy04v.js +19 -0
  18. package/dist/chunks/{LoadingOverlay-DAZJF5wg.js.map → LoadingOverlay-Uf6xy04v.js.map} +1 -1
  19. package/dist/chunks/LoadingOverlay-jdMzdB-z.cjs +2 -0
  20. package/dist/chunks/{LoadingOverlay-DcmKvoZA.cjs.map → LoadingOverlay-jdMzdB-z.cjs.map} +1 -1
  21. package/dist/chunks/{SSOHandler-CxvxEBaH.js → SSOHandler-CR0nR3rJ.js} +8252 -8252
  22. package/dist/chunks/{SSOHandler-CxvxEBaH.js.map → SSOHandler-CR0nR3rJ.js.map} +1 -1
  23. package/dist/chunks/{SSOHandler-BY6LXMLc.cjs → SSOHandler-DQG0Jp4V.cjs} +53 -53
  24. package/dist/chunks/{SSOHandler-BY6LXMLc.cjs.map → SSOHandler-DQG0Jp4V.cjs.map} +1 -1
  25. package/dist/chunks/ScreenProtectContext-BMsPPcTX.js +154 -0
  26. package/dist/chunks/{ScreenProtectContext-3my4PHFa.js.map → ScreenProtectContext-BMsPPcTX.js.map} +1 -1
  27. package/dist/chunks/ScreenProtectContext-DrCGlcTs.cjs +2 -0
  28. package/dist/chunks/{ScreenProtectContext-CVuXrJm6.cjs.map → ScreenProtectContext-DrCGlcTs.cjs.map} +1 -1
  29. package/dist/chunks/SearchBoxContext-DY6lES-W.cjs +2 -0
  30. package/dist/chunks/{SearchBoxContext-DwFDOyYG.cjs.map → SearchBoxContext-DY6lES-W.cjs.map} +1 -1
  31. package/dist/chunks/{SearchBoxContext-gWM7FHIw.js → SearchBoxContext-Dtzo_rJd.js} +24 -24
  32. package/dist/chunks/{SearchBoxContext-gWM7FHIw.js.map → SearchBoxContext-Dtzo_rJd.js.map} +1 -1
  33. package/dist/chunks/ViewContainer-BfiTFvLP.cjs +36 -0
  34. package/dist/chunks/{ViewContainer-Bhq22_B3.cjs.map → ViewContainer-BfiTFvLP.cjs.map} +1 -1
  35. package/dist/chunks/{ViewContainer-D9SKBnrn.js → ViewContainer-CTl3_56W.js} +115 -115
  36. package/dist/chunks/{ViewContainer-D9SKBnrn.js.map → ViewContainer-CTl3_56W.js.map} +1 -1
  37. package/dist/chunks/apiUtils-D9Vn1gwZ.cjs +3 -0
  38. package/dist/chunks/{apiUtils-BZ6s0_NI.cjs.map → apiUtils-D9Vn1gwZ.cjs.map} +1 -1
  39. package/dist/chunks/{apiUtils-DSwE62oG.js → apiUtils-DPUgfmKk.js} +46 -46
  40. package/dist/chunks/{apiUtils-DSwE62oG.js.map → apiUtils-DPUgfmKk.js.map} +1 -1
  41. package/dist/chunks/{codeStore-vPj4Y0TK.js → codeStore-BrCfe9K3.js} +2 -2
  42. package/dist/chunks/{codeStore-vPj4Y0TK.js.map → codeStore-BrCfe9K3.js.map} +1 -1
  43. package/dist/chunks/{codeStore-il4-kZPe.cjs → codeStore-_b2fDZtD.cjs} +2 -2
  44. package/dist/chunks/{codeStore-il4-kZPe.cjs.map → codeStore-_b2fDZtD.cjs.map} +1 -1
  45. package/dist/chunks/{core-Dl0PdDdT.js → core-BBMCFpHx.js} +2 -2
  46. package/dist/chunks/{core-Dl0PdDdT.js.map → core-BBMCFpHx.js.map} +1 -1
  47. package/dist/chunks/{core-BHejg5iS.cjs → core-CM9MsJRf.cjs} +2 -2
  48. package/dist/chunks/{core-BHejg5iS.cjs.map → core-CM9MsJRf.cjs.map} +1 -1
  49. package/dist/chunks/{enc-base64-D7t4BoUA.js → enc-base64-DAsYWbA2.js} +3 -3
  50. package/dist/chunks/{enc-base64-D7t4BoUA.js.map → enc-base64-DAsYWbA2.js.map} +1 -1
  51. package/dist/chunks/{enc-base64-BkBtNBQV.cjs → enc-base64-DbK5VBfD.cjs} +2 -2
  52. package/dist/chunks/{enc-base64-BkBtNBQV.cjs.map → enc-base64-DbK5VBfD.cjs.map} +1 -1
  53. package/dist/chunks/{favoriteStore-CcKg_nEH.cjs → favoriteStore-BnQ2u-sa.cjs} +2 -2
  54. package/dist/chunks/{favoriteStore-CcKg_nEH.cjs.map → favoriteStore-BnQ2u-sa.cjs.map} +1 -1
  55. package/dist/chunks/{favoriteStore-Bh1FuZm9.js → favoriteStore-SyAjqLG8.js} +2 -2
  56. package/dist/chunks/{favoriteStore-Bh1FuZm9.js.map → favoriteStore-SyAjqLG8.js.map} +1 -1
  57. package/dist/chunks/{popupStore-BRRmB4zH.js → popupStore-BrKcPw7K.js} +2 -2
  58. package/dist/chunks/{popupStore-BRRmB4zH.js.map → popupStore-BrKcPw7K.js.map} +1 -1
  59. package/dist/chunks/{popupStore-DUApUBF2.cjs → popupStore-ChbYTqy1.cjs} +2 -2
  60. package/dist/chunks/{popupStore-DUApUBF2.cjs.map → popupStore-ChbYTqy1.cjs.map} +1 -1
  61. package/dist/chunks/{sha256-DiIRoCQ8.cjs → sha256-BnWVPP1K.cjs} +2 -2
  62. package/dist/chunks/{sha256-DiIRoCQ8.cjs.map → sha256-BnWVPP1K.cjs.map} +1 -1
  63. package/dist/chunks/{sha256-C2-s1oZe.js → sha256-D80RpYO2.js} +3 -3
  64. package/dist/chunks/{sha256-C2-s1oZe.js.map → sha256-D80RpYO2.js.map} +1 -1
  65. package/dist/chunks/{usePopup-DarKTbRC.js → usePopup-DnfKRiYs.js} +27 -27
  66. package/dist/chunks/{usePopup-DarKTbRC.js.map → usePopup-DnfKRiYs.js.map} +1 -1
  67. package/dist/chunks/usePopup-Domnpg55.cjs +2 -0
  68. package/dist/chunks/{usePopup-D2JEuDrO.cjs.map → usePopup-Domnpg55.cjs.map} +1 -1
  69. package/dist/components/common/index.cjs +1 -1
  70. package/dist/components/common/index.js +2 -2
  71. package/dist/components/core/BwgFormItem.d.ts +2 -2
  72. package/dist/components/core/BwgFormItem.d.ts.map +1 -1
  73. package/dist/components/core/BwgInput.d.ts.map +1 -1
  74. package/dist/components/core/index.cjs +1 -1
  75. package/dist/components/core/index.js +2 -2
  76. package/dist/components/guide/index.cjs +1 -1
  77. package/dist/components/guide/index.cjs.map +1 -1
  78. package/dist/components/guide/index.js +3 -3
  79. package/dist/components/guide/index.js.map +1 -1
  80. package/dist/components/layout/index.cjs +1 -1
  81. package/dist/components/layout/index.js +2 -2
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.js +14 -14
  84. package/dist/provider/index.cjs +1 -1
  85. package/dist/provider/index.js +4 -4
  86. package/dist/stores/index.cjs +1 -1
  87. package/dist/stores/index.js +6 -6
  88. package/dist/utils/index.cjs +1 -1
  89. package/dist/utils/index.js +2 -2
  90. package/package.json +2 -3
  91. package/dist/chunks/AuthContext-CXng9fj0.cjs +0 -2
  92. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs +0 -2
  93. package/dist/chunks/BwgSwitch-DOlc57wi.cjs +0 -2
  94. package/dist/chunks/BwgSwitch-DOlc57wi.cjs.map +0 -1
  95. package/dist/chunks/BwgSwitch-D_scwi9_.js.map +0 -1
  96. package/dist/chunks/BwgUploader-CkXwkcUL.cjs +0 -3
  97. package/dist/chunks/LoadingOverlay-DAZJF5wg.js +0 -19
  98. package/dist/chunks/LoadingOverlay-DcmKvoZA.cjs +0 -2
  99. package/dist/chunks/ScreenProtectContext-3my4PHFa.js +0 -154
  100. package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs +0 -2
  101. package/dist/chunks/SearchBoxContext-DwFDOyYG.cjs +0 -2
  102. package/dist/chunks/ViewContainer-Bhq22_B3.cjs +0 -36
  103. package/dist/chunks/apiUtils-BZ6s0_NI.cjs +0 -3
  104. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs +0 -31
  105. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs.map +0 -1
  106. package/dist/chunks/jsx-runtime-Dpn_P65e.js +0 -634
  107. package/dist/chunks/jsx-runtime-Dpn_P65e.js.map +0 -1
  108. package/dist/chunks/usePopup-D2JEuDrO.cjs +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/apiUtils-BZ6s0_NI.cjs"),i=require("antd"),g=require("../chunks/realFormat-Cha7OTd9.cjs"),d=(o,t,r="text/plain")=>{const s=new Blob([o],{type:r}),a=URL.createObjectURL(s),l=document.createElement("a");l.href=a,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a)};async function u(o){try{return await e.callService("SCMFILE00101",{crprCd:e.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileKey:o}).then(r=>{let s;if(r.sub&&(s=r.sub[0]),console.log(r),console.log(s),!s.lgclFileNm)throw console.error("논리파일명이 없습니다."),new Error("논리 파일명 누락");if(!s.filePath)throw console.error("파일 경로가 없습니다."),new Error("파일 경로 누락");const a=`api/download?filePath=${encodeURIComponent(s.filePath)}&logicalName=${encodeURIComponent(s.lgclFileNm)}`;return window.open(a,"_blank"),{success:!0,message:"파일 다운로드 요청 성공"}})}catch(t){throw console.error("downloadByFileKey 함수 실행 중 오류 발생:",t),t}}const p=Object.freeze(Object.defineProperty({__proto__:null,downloadByFileKey:u,downloadFile:d},Symbol.toStringTag,{value:"Module"})),c=(o,t=3)=>{i.message.success({content:o,duration:t})},n=(o,t=5)=>{i.message.error({content:o,duration:t})},m=(o,t=4)=>{i.message.warning({content:o,duration:t})},S=(o,t=3)=>{i.message.info({content:o,duration:t})},U=(o="처리중...")=>i.message.loading({content:o,duration:0}),C=o=>{i.message.destroy(o)},f=()=>{i.message.destroy()},v=(o,t="처리 중 오류가 발생했습니다.")=>{const r=o?.response?.data?.message||o?.message||t;n(r)},h=(o="저장")=>{c(`${o}이 완료되었습니다.`)},w=(o="저장")=>{n(`${o} 중 오류가 발생했습니다.`)},y=o=>{n(`이미 사용중인 ${o}입니다.`)},E=o=>{n(`${o}을(를) 입력해주세요.`)},M=Object.freeze(Object.defineProperty({__proto__:null,closeAllMessages:f,closeMessage:C,showApiError:v,showDuplicateError:y,showError:n,showInfo:S,showLoading:U,showRequiredError:E,showSaveError:w,showSaveSuccess:h,showSuccess:c,showWarning:m},Symbol.toStringTag,{value:"Module"})),D=e.apiUtilsModule,I=e.commonUtilsModule,R=e.envUtilsModule,N=p,_=M,A=e.notificationUtilsModule,O=e.serviceConfigModule,P=e.userUtilsModule,b={...e.apiUtilsModule,...e.commonUtilsModule,...e.envUtilsModule,...p,...M,...e.notificationUtilsModule,...e.serviceConfigModule,...e.userUtilsModule,realFormat:g.realFormat};exports.ApiError=e.ApiError;exports.THEME_COOKIE_NAME=e.THEME_COOKIE_NAME;exports.apiDelete=e.apiDelete;exports.apiGet=e.apiGet;exports.apiPatch=e.apiPatch;exports.apiPost=e.apiPost;exports.apiPut=e.apiPut;exports.arrAverage=e.arrAverage;exports.arrCount=e.arrCount;exports.arrMax=e.arrMax;exports.arrMin=e.arrMin;exports.arrReverse=e.arrReverse;exports.arrSum=e.arrSum;exports.arrUnique=e.arrUnique;exports.callService=e.callService;exports.callService_SYSCD=e.callService_SYSCD;exports.clamp=e.clamp;exports.clearSessionStorage=e.clearSessionStorage;exports.closeNotification=e.closeNotification;exports.configureEnvUtils=e.configureEnvUtils;exports.copyToClipboard=e.copyToClipboard;exports.debounce=e.debounce;exports.deleteCookie=e.deleteCookie;exports.destroyNotifications=e.destroyNotifications;exports.duplicates=e.duplicates;exports.encryptSha256=e.encryptSha256;exports.generateRandomColor=e.generateRandomColor;exports.generateRandomString=e.generateRandomString;exports.generateUID=e.generateUID;exports.getAllServiceCodes=e.getAllServiceCodes;exports.getClientIp=e.getClientIp;exports.getCookie=e.getCookie;exports.getCrprCd=e.getCrprCd;exports.getCurrentDate=e.getCurrentDate;exports.getCurrentDateString=e.getCurrentDateString;exports.getDepartmentInfo=e.getDepartmentInfo;exports.getDeviceType=e.getDeviceType;exports.getDisplayName=e.getDisplayName;exports.getDprtCd=e.getDprtCd;exports.getDprtNm=e.getDprtNm;exports.getEmplNo=e.getEmplNo;exports.getEnvCode=e.getEnvCode;exports.getPermissionService=e.getPermissionService;exports.getRoleList=e.getRoleList;exports.getServiceCode=e.getServiceCode;exports.getSessionStorage=e.getSessionStorage;exports.getUserDvsn=e.getUserDvsn;exports.getUserId=e.getUserId;exports.getUserInfo=e.getUserInfo;exports.getUserNm=e.getUserNm;exports.hasAllRoles=e.hasAllRoles;exports.hasAnyRole=e.hasAnyRole;exports.hasRole=e.hasRole;exports.hasUserInfo=e.hasUserInfo;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isDesktop=e.isDesktop;exports.isDev=e.isDev;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isFunction=e.isFunction;exports.isLocal=e.isLocal;exports.isLoggedIn=e.isLoggedIn;exports.isMobile=e.isMobile;exports.isNull=e.isNull;exports.isNullOrUndefined=e.isNullOrUndefined;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isProd=e.isProd;exports.isSafeEmpty=e.isSafeEmpty;exports.isString=e.isString;exports.isTablet=e.isTablet;exports.isUndefined=e.isUndefined;exports.isValidEmail=e.isValidEmail;exports.isValidUrl=e.isValidUrl;exports.logServiceCodeConfig=e.logServiceCodeConfig;exports.notiBwgError=e.notiBwgError;exports.notiError=e.notiError;exports.notiInfo=e.notiInfo;exports.notiSuccess=e.notiSuccess;exports.notiWarning=e.notiWarning;exports.notificationService=e.notificationService;exports.padLeft=e.padLeft;exports.padRight=e.padRight;exports.random=e.random;exports.removeSessionStorage=e.removeSessionStorage;exports.round=e.round;exports.setClientIp=e.setClientIp;exports.setCookie=e.setCookie;exports.setServiceCodeOverrides=e.setServiceCodeOverrides;exports.setSessionStorage=e.setSessionStorage;exports.throttle=e.throttle;exports.toCamelCase=e.toCamelCase;exports.verifyClientIp=e.verifyClientIp;exports.realFormat=g.realFormat;exports.apiUtils=D;exports.bwgUtils=b;exports.closeAllMessages=f;exports.closeMessage=C;exports.commonUtils=I;exports.default=b;exports.downloadByFileKey=u;exports.downloadFile=d;exports.envUtils=R;exports.fileUtils=N;exports.messageUtils=_;exports.notificationUtils=A;exports.serviceUtils=O;exports.showApiError=v;exports.showDuplicateError=y;exports.showError=n;exports.showInfo=S;exports.showLoading=U;exports.showRequiredError=E;exports.showSaveError=w;exports.showSaveSuccess=h;exports.showSuccess=c;exports.showWarning=m;exports.userUtils=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/apiUtils-D9Vn1gwZ.cjs"),i=require("antd"),g=require("../chunks/realFormat-Cha7OTd9.cjs"),d=(o,t,r="text/plain")=>{const s=new Blob([o],{type:r}),a=URL.createObjectURL(s),l=document.createElement("a");l.href=a,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a)};async function u(o){try{return await e.callService("SCMFILE00101",{crprCd:e.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileKey:o}).then(r=>{let s;if(r.sub&&(s=r.sub[0]),console.log(r),console.log(s),!s.lgclFileNm)throw console.error("논리파일명이 없습니다."),new Error("논리 파일명 누락");if(!s.filePath)throw console.error("파일 경로가 없습니다."),new Error("파일 경로 누락");const a=`api/download?filePath=${encodeURIComponent(s.filePath)}&logicalName=${encodeURIComponent(s.lgclFileNm)}`;return window.open(a,"_blank"),{success:!0,message:"파일 다운로드 요청 성공"}})}catch(t){throw console.error("downloadByFileKey 함수 실행 중 오류 발생:",t),t}}const p=Object.freeze(Object.defineProperty({__proto__:null,downloadByFileKey:u,downloadFile:d},Symbol.toStringTag,{value:"Module"})),c=(o,t=3)=>{i.message.success({content:o,duration:t})},n=(o,t=5)=>{i.message.error({content:o,duration:t})},m=(o,t=4)=>{i.message.warning({content:o,duration:t})},S=(o,t=3)=>{i.message.info({content:o,duration:t})},U=(o="처리중...")=>i.message.loading({content:o,duration:0}),C=o=>{i.message.destroy(o)},f=()=>{i.message.destroy()},v=(o,t="처리 중 오류가 발생했습니다.")=>{const r=o?.response?.data?.message||o?.message||t;n(r)},h=(o="저장")=>{c(`${o}이 완료되었습니다.`)},w=(o="저장")=>{n(`${o} 중 오류가 발생했습니다.`)},y=o=>{n(`이미 사용중인 ${o}입니다.`)},E=o=>{n(`${o}을(를) 입력해주세요.`)},M=Object.freeze(Object.defineProperty({__proto__:null,closeAllMessages:f,closeMessage:C,showApiError:v,showDuplicateError:y,showError:n,showInfo:S,showLoading:U,showRequiredError:E,showSaveError:w,showSaveSuccess:h,showSuccess:c,showWarning:m},Symbol.toStringTag,{value:"Module"})),D=e.apiUtilsModule,I=e.commonUtilsModule,R=e.envUtilsModule,N=p,_=M,A=e.notificationUtilsModule,O=e.serviceConfigModule,P=e.userUtilsModule,b={...e.apiUtilsModule,...e.commonUtilsModule,...e.envUtilsModule,...p,...M,...e.notificationUtilsModule,...e.serviceConfigModule,...e.userUtilsModule,realFormat:g.realFormat};exports.ApiError=e.ApiError;exports.THEME_COOKIE_NAME=e.THEME_COOKIE_NAME;exports.apiDelete=e.apiDelete;exports.apiGet=e.apiGet;exports.apiPatch=e.apiPatch;exports.apiPost=e.apiPost;exports.apiPut=e.apiPut;exports.arrAverage=e.arrAverage;exports.arrCount=e.arrCount;exports.arrMax=e.arrMax;exports.arrMin=e.arrMin;exports.arrReverse=e.arrReverse;exports.arrSum=e.arrSum;exports.arrUnique=e.arrUnique;exports.callService=e.callService;exports.callService_SYSCD=e.callService_SYSCD;exports.clamp=e.clamp;exports.clearSessionStorage=e.clearSessionStorage;exports.closeNotification=e.closeNotification;exports.configureEnvUtils=e.configureEnvUtils;exports.copyToClipboard=e.copyToClipboard;exports.debounce=e.debounce;exports.deleteCookie=e.deleteCookie;exports.destroyNotifications=e.destroyNotifications;exports.duplicates=e.duplicates;exports.encryptSha256=e.encryptSha256;exports.generateRandomColor=e.generateRandomColor;exports.generateRandomString=e.generateRandomString;exports.generateUID=e.generateUID;exports.getAllServiceCodes=e.getAllServiceCodes;exports.getClientIp=e.getClientIp;exports.getCookie=e.getCookie;exports.getCrprCd=e.getCrprCd;exports.getCurrentDate=e.getCurrentDate;exports.getCurrentDateString=e.getCurrentDateString;exports.getDepartmentInfo=e.getDepartmentInfo;exports.getDeviceType=e.getDeviceType;exports.getDisplayName=e.getDisplayName;exports.getDprtCd=e.getDprtCd;exports.getDprtNm=e.getDprtNm;exports.getEmplNo=e.getEmplNo;exports.getEnvCode=e.getEnvCode;exports.getPermissionService=e.getPermissionService;exports.getRoleList=e.getRoleList;exports.getServiceCode=e.getServiceCode;exports.getSessionStorage=e.getSessionStorage;exports.getUserDvsn=e.getUserDvsn;exports.getUserId=e.getUserId;exports.getUserInfo=e.getUserInfo;exports.getUserNm=e.getUserNm;exports.hasAllRoles=e.hasAllRoles;exports.hasAnyRole=e.hasAnyRole;exports.hasRole=e.hasRole;exports.hasUserInfo=e.hasUserInfo;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isDesktop=e.isDesktop;exports.isDev=e.isDev;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isFunction=e.isFunction;exports.isLocal=e.isLocal;exports.isLoggedIn=e.isLoggedIn;exports.isMobile=e.isMobile;exports.isNull=e.isNull;exports.isNullOrUndefined=e.isNullOrUndefined;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isProd=e.isProd;exports.isSafeEmpty=e.isSafeEmpty;exports.isString=e.isString;exports.isTablet=e.isTablet;exports.isUndefined=e.isUndefined;exports.isValidEmail=e.isValidEmail;exports.isValidUrl=e.isValidUrl;exports.logServiceCodeConfig=e.logServiceCodeConfig;exports.notiBwgError=e.notiBwgError;exports.notiError=e.notiError;exports.notiInfo=e.notiInfo;exports.notiSuccess=e.notiSuccess;exports.notiWarning=e.notiWarning;exports.notificationService=e.notificationService;exports.padLeft=e.padLeft;exports.padRight=e.padRight;exports.random=e.random;exports.removeSessionStorage=e.removeSessionStorage;exports.round=e.round;exports.setClientIp=e.setClientIp;exports.setCookie=e.setCookie;exports.setServiceCodeOverrides=e.setServiceCodeOverrides;exports.setSessionStorage=e.setSessionStorage;exports.throttle=e.throttle;exports.toCamelCase=e.toCamelCase;exports.verifyClientIp=e.verifyClientIp;exports.realFormat=g.realFormat;exports.apiUtils=D;exports.bwgUtils=b;exports.closeAllMessages=f;exports.closeMessage=C;exports.commonUtils=I;exports.default=b;exports.downloadByFileKey=u;exports.downloadFile=d;exports.envUtils=R;exports.fileUtils=N;exports.messageUtils=_;exports.notificationUtils=A;exports.serviceUtils=O;exports.showApiError=v;exports.showDuplicateError=y;exports.showError=n;exports.showInfo=S;exports.showLoading=U;exports.showRequiredError=E;exports.showSaveError=w;exports.showSaveSuccess=h;exports.showSuccess=c;exports.showWarning=m;exports.userUtils=P;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { c as C, aA as U, aK as l, aL as c, aM as d, aN as g, aO as p, aP as u } from "../chunks/apiUtils-DSwE62oG.js";
2
- import { A as W, T as Y, f as G, b as H, h as J, d as Q, e as X, H as Z, J as ss, F as es, G as as, K as os, I as ts, E as rs, a as is, N as ns, S as ls, aj as cs, a8 as ds, w as gs, u as ps, W as us, ai as ms, L as fs, a4 as Ss, C as Cs, a2 as Us, a3 as hs, am as vs, g as ws, V as ys, ao as bs, a5 as Es, a6 as Ms, aD as Ds, x as Rs, aC as _s, at as Is, au as Ns, as as Os, ab as As, i as Ls, av as Ps, al as ks, Q as js, ar as Fs, ap as Bs, aq as Ts, ay as $s, ax as xs, aw as Ks, aB as qs, o as zs, l as Vs, B as Ws, a9 as Ys, X as Gs, D as Hs, m as Js, a7 as Qs, az as Xs, y as Zs, p as se, r as ee, k as ae, n as oe, aa as te, Y as re, j as ie, z as ne, q as le, _ as ce, $ as de, an as ge, ad as pe, ah as ue, af as me, ae as fe, ag as Se, ac as Ce, a0 as Ue, a1 as he, M as ve, R as we, O as ye, s as be, U as Ee, ak as Me, P as De, t as Re, Z as _e, v as Ie } from "../chunks/apiUtils-DSwE62oG.js";
1
+ import { c as C, aA as U, aK as l, aL as c, aM as d, aN as g, aO as p, aP as u } from "../chunks/apiUtils-DPUgfmKk.js";
2
+ import { A as W, T as Y, f as G, b as H, h as J, d as Q, e as X, H as Z, J as ss, F as es, G as as, K as os, I as ts, E as rs, a as is, N as ns, S as ls, aj as cs, a8 as ds, w as gs, u as ps, W as us, ai as ms, L as fs, a4 as Ss, C as Cs, a2 as Us, a3 as hs, am as vs, g as ws, V as ys, ao as bs, a5 as Es, a6 as Ms, aD as Ds, x as Rs, aC as _s, at as Is, au as Ns, as as Os, ab as As, i as Ls, av as Ps, al as ks, Q as js, ar as Fs, ap as Bs, aq as Ts, ay as $s, ax as xs, aw as Ks, aB as qs, o as zs, l as Vs, B as Ws, a9 as Ys, X as Gs, D as Hs, m as Js, a7 as Qs, az as Xs, y as Zs, p as se, r as ee, k as ae, n as oe, aa as te, Y as re, j as ie, z as ne, q as le, _ as ce, $ as de, an as ge, ad as pe, ah as ue, af as me, ae as fe, ag as Se, ac as Ce, a0 as Ue, a1 as he, M as ve, R as we, O as ye, s as be, U as Ee, ak as Me, P as De, t as Re, Z as _e, v as Ie } from "../chunks/apiUtils-DPUgfmKk.js";
3
3
  import { message as t } from "antd";
4
4
  import { r as h } from "../chunks/realFormat-DRGLFabQ.js";
5
5
  const v = (s, e, o = "text/plain") => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwg-ui/core",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "bankwareglobal UI 라이브러리입니다.",
5
5
  "author": "kyeongdon.park",
6
6
  "license": "ISC",
@@ -12,8 +12,7 @@
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
14
  "import": "./dist/index.js",
15
- "require": "./dist/index.cjs",
16
- "default": "./dist/index.js"
15
+ "require": "./dist/index.cjs"
17
16
  },
18
17
  "./common": {
19
18
  "types": "./dist/components/common/index.d.ts",
@@ -1,2 +0,0 @@
1
- "use strict";const y=require("./jsx-runtime-CeSfJrVB.cjs"),r=require("react"),h=r.createContext(null),w=()=>{const o=r.useContext(h);if(!o)throw new Error("useAuth must be used within AuthProvider");return o},x=({children:o})=>{const[c,u]=r.useState(!1),[a,n]=r.useState(!1),i=async s=>{const e=(await s.text()).trim().toLowerCase();try{const t=JSON.parse(e);if(typeof t=="object"&&t&&(t.ok===!0||t.success===!0))return!0}catch{}return!!["true","ok","1","y"].includes(e)},d=async s=>{n(!0);try{const e=await fetch("/serviceEndpoint/sso_check.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"token="+encodeURIComponent(s)}),t=e.ok&&await i(e);return u(t),t}catch{return!1}finally{n(!1)}},l=async s=>{n(!0);try{const e=await fetch("/serviceEndpoint/sso_reauth.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"pin="+encodeURIComponent(s)});return e.ok&&await i(e)?(u(!0),!0):!1}catch{return!1}finally{n(!1)}},f=()=>{u(!1)},p=r.useMemo(()=>({authed:c,busy:a,verifyWithToken:d,reauthWithPin:l,logout:f}),[c,a]);return y.jsxRuntimeExports.jsx(h.Provider,{value:p,children:o})};exports.AuthProvider=x;exports.useAuth=w;
2
- //# sourceMappingURL=AuthContext-CXng9fj0.cjs.map
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("./jsx-runtime-CeSfJrVB.cjs"),t=({children:s})=>e.jsxRuntimeExports.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:e.jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:s})});exports.BwgSpace=t;
2
- //# sourceMappingURL=BwgSpace-b0hmM1Ht.cjs.map
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("./jsx-runtime-CeSfJrVB.cjs"),l=require("antd"),u=require("dayjs"),Y=require("react"),c=Y.memo(({children:a,label:t,name:o,rules:i,initialValue:e,style:m,...x})=>{const r={fontWeight:"bold"},d=Array.isArray(i)&&i.some(f=>f.required===!0),n=()=>typeof t=="string"?s.jsxRuntimeExports.jsxs("span",{style:r,children:[t,d&&s.jsxRuntimeExports.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}):s.jsxRuntimeExports.jsx("span",{style:r,children:t});return s.jsxRuntimeExports.jsx(l.Form.Item,{className:"bwg-form-item",label:t?n():void 0,labelAlign:"left",name:o,rules:i,colon:!1,initialValue:e,style:m,...x,children:a})}),F=({itemProps:a,inputProps:t={format:"YN"}})=>{const o=l.Form.useFormInstance(),i=e=>{t.format==="boolean"?o.setFieldValue(a?.name,e.target.checked):o.setFieldValue(a?.name,e.target.checked?"Y":"N"),t.onChange&&t.onChange(e)};return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:e=>({checked:t.format==="boolean"?!!e:e==="Y"}),normalize:e=>typeof e=="boolean"?t.format==="boolean"?e:e?"Y":"N":t.format==="boolean"?!!e:e?"Y":"N",children:s.jsxRuntimeExports.jsx(l.Checkbox,{...t,onChange:i,children:t?.title})})},g={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"},time:{displayFormat:"HH:mm",outputFormat:"HHmm"},datetime:{displayFormat:"YYYY-MM-DD HH:mm",outputFormat:"YYYYMMDDHHmm"}},p=({itemProps:a,inputProps:t,type:o="date",returnType:i="string"})=>{const{displayFormat:e,outputFormat:m}=Y.useMemo(()=>g[o],[o]),x=Y.useMemo(()=>Object.values(g).map(r=>r.outputFormat).sort((r,d)=>{if(r.length===d.length){if(r===m)return-1;if(d===m)return 1}return d.length-r.length}),[m]);return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:r=>({value:r?u.isDayjs(r)?r:u(r,x):null}),normalize:r=>r?i==="dayjs"?r:r.format(m):null,children:s.jsxRuntimeExports.jsx(l.DatePicker,{...t,picker:o==="datetime"?"date":o,showTime:t?.showTime??(o==="datetime"||o==="time"),format:e})})},j=Y.forwardRef(({children:a,labelCol:t,style:o,className:i,...e},m)=>s.jsxRuntimeExports.jsx(l.ConfigProvider,{form:{validateMessages:{required:"'${label}을(를) 입력해주세요.'"}},children:s.jsxRuntimeExports.jsx(l.Form,{ref:m,...e,requiredMark:!1,labelCol:t||{flex:"100px"},style:{padding:"10px",...o},className:`bwg-form ${i??""}`,children:a})}));j.displayName="BwgForm";const w=({itemProps:a,inputProps:t})=>s.jsxRuntimeExports.jsx(c,{...a,children:s.jsxRuntimeExports.jsx(l.Input,{...t})}),{RangePicker:M}=l.DatePicker,h={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"},time:{displayFormat:"HH:mm",outputFormat:"HHmm"},datetime:{displayFormat:"YYYY-MM-DD HH:mm",outputFormat:"YYYYMMDDHHmm"}},y=({itemProps:a,inputProps:t,type:o="date",minDate:i,maxDate:e,returnType:m="string"})=>{const{displayFormat:x,outputFormat:r}=Y.useMemo(()=>h[o],[o]),d=Y.useMemo(()=>Object.values(h).map(n=>n.outputFormat).sort((n,f)=>{if(n.length===f.length){if(n===r)return-1;if(f===r)return 1}return f.length-n.length}),[r]);return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:n=>({value:n&&n.length>0?[n[0]?u.isDayjs(n[0])?n[0]:u(n[0],d):null,n[1]?u.isDayjs(n[1])?n[1]:u(n[1],d):null]:null}),normalize:n=>n?m==="dayjs"?[n[0]??void 0,n[1]??void 0]:[n[0]?n[0].format(r):void 0,n[1]?n[1].format(r):void 0]:[void 0,void 0],children:s.jsxRuntimeExports.jsx(M,{...t,order:!0,minDate:i?u(i,d):void 0,maxDate:e?u(e,d):void 0,picker:o==="datetime"?"date":o,showTime:t?.showTime??(o==="datetime"||o==="time"),format:x})})},R=({itemProps:a,selectProps:t={options:[],allowClear:!0}})=>{const o=l.Form.useFormInstance(),i=!!o,e=Y.useMemo(()=>t?.addField==="ALL"?[{label:"전체",value:""},...t?.options||[]]:t?.addField==="NULL"?[{label:"",value:""},...t?.options||[]]:t?.options||[],[t.options,t.addField]),m=d=>{t.onChange?.(d)},x={...t,allowClear:t.allowClear??!0,options:e,onChange:m,variant:t.variant},r=s.jsxRuntimeExports.jsx(l.Select,{...x,disabled:t.disabled});return t.copyable&&!i&&console.warn("BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."),t.copyable?s.jsxRuntimeExports.jsx(c,{...a,name:void 0,children:s.jsxRuntimeExports.jsxs(l.Space.Compact,{block:!0,children:[s.jsxRuntimeExports.jsx(l.Form.Item,{name:a?.name,rules:a?.rules,style:{width:"100%",marginBottom:0},validateStatus:"",help:"",children:r}),s.jsxRuntimeExports.jsx(l.Typography.Paragraph,{copyable:{text:i&&o?.getFieldValue(a?.name)?.toString()||"",tooltips:["코드복사","코드복사됨"]},style:{margin:0,backgroundColor:"#f5f5f5",borderRadius:"4px",border:"1px solid #d9d9d9",fontSize:"12px",color:"#666",display:"flex",alignItems:"center",height:"30px",padding:"0 8px"}})]})}):s.jsxRuntimeExports.jsx(c,{...a,children:r})},b=({itemProps:a,inputProps:t={format:"YN"}})=>{const o=l.Form.useFormInstance(),i=(e,m)=>{t.format==="boolean"?o.setFieldValue(a?.name,e):o.setFieldValue(a?.name,e?"Y":"N"),t.onChange&&t.onChange(e,m)};return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:e=>({checked:t.format==="boolean"?!!e:e==="Y"}),normalize:e=>typeof e=="boolean"?t.format==="boolean"?e:e?"Y":"N":t.format==="boolean"?!!e:e?"Y":"N",children:s.jsxRuntimeExports.jsx(l.Switch,{...t,onChange:(e,m)=>i(e,m)})})};exports.BwgCheck=F;exports.BwgDatePicker=p;exports.BwgForm=j;exports.BwgFormItem=c;exports.BwgInput=w;exports.BwgRangePicker=y;exports.BwgSelect=R;exports.BwgSwitch=b;
2
- //# sourceMappingURL=BwgSwitch-DOlc57wi.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSwitch-DOlc57wi.cjs","sources":["../../src/components/core/BwgFormItem.tsx","../../src/components/core/BwgCheck.tsx","../../src/components/core/BwgDatePicker.tsx","../../src/components/core/BwgForm.tsx","../../src/components/core/BwgInput.tsx","../../src/components/core/BwgRangePicker.tsx","../../src/components/core/BwgSelect.tsx","../../src/components/core/BwgSwitch.tsx"],"sourcesContent":["import { Form, FormItemProps } from 'antd';\r\nimport React, { memo, ReactNode } from 'react';\r\n\r\nexport interface BwgFormItemProps extends FormItemProps {\r\n /** 폼 아이템 이름 */\r\n name?: string | string[];\r\n /** 폼 아이템 라벨 */\r\n label?: string | ReactNode;\r\n /** 폼 아이템 규칙 */\r\n rules?: any;\r\n /** 폼 아이템 초기값 */\r\n initialValue?: any;\r\n /** 폼 아이템 자식 컴포넌트 */\r\n children?: ReactNode;\r\n}\r\n\r\n/** 입력 폼 아이템 컴포넌트 */\r\nconst BwgFormItem = memo(\r\n ({\r\n children,\r\n label,\r\n name,\r\n rules,\r\n initialValue,\r\n style,\r\n ...rest\r\n }: BwgFormItemProps) => {\r\n const labelStyle = {\r\n fontWeight: 'bold',\r\n };\r\n\r\n // rules에서 required 필드 확인\r\n const isRequired =\r\n Array.isArray(rules) && rules.some((rule: any) => rule.required === true);\r\n\r\n // 라벨 렌더링 함수\r\n const renderLabel = () => {\r\n if (typeof label === 'string') {\r\n return (\r\n <span style={labelStyle}>\r\n {label}\r\n {isRequired && (\r\n <span style={{ color: '#ff4d4f', marginLeft: '4px' }}>*</span>\r\n )}\r\n </span>\r\n );\r\n }\r\n return <span style={labelStyle}>{label}</span>;\r\n };\r\n\r\n return (\r\n <Form.Item\r\n className='bwg-form-item'\r\n label={label ? renderLabel() : undefined}\r\n labelAlign='left'\r\n name={name}\r\n rules={rules}\r\n colon={false}\r\n initialValue={initialValue}\r\n style={style}\r\n {...rest}\r\n >\r\n {children}\r\n </Form.Item>\r\n );\r\n }\r\n);\r\n\r\nexport default BwgFormItem;\r\n","import { Checkbox, CheckboxProps, Form } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type BwgCheckBoxProps = CheckboxProps & {\r\n format?: 'boolean' | 'YN';\r\n};\r\n\r\nexport interface BwgCheckProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgCheckBoxProps;\r\n}\r\n\r\n/**\r\n * 체크박스 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgCheckBoxProps\r\n * @returns \r\n * @example\r\n * <BwgCheck\r\n * itemProps={{ name: 'check' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n */\r\nconst BwgCheck = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgCheckProps) => {\r\n const form = Form.useFormInstance();\r\n\r\n const handleChange = (e: any) => {\r\n //console.log('handleChange :: ', e.target.checked);\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, e.target.checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, e.target.checked ? 'Y' : 'N');\r\n }\r\n\r\n inputProps.onChange && inputProps.onChange(e);\r\n };\r\n\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => {\r\n //console.log('getValueProps :: ', value);\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked }; // ✅ 수정: value 대신 checked 반환\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Checkbox {...inputProps} onChange={handleChange}>\r\n {inputProps?.title}\r\n </Checkbox>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgCheck;\r\n","import { DatePicker } from 'antd';\r\nimport { DatePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgDatePickerProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: DatePickerProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgDatePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n returnType = 'string',\r\n}: BwgDatePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환\r\n value: value\r\n ? dayjs.isDayjs(value)\r\n ? (value as Dayjs)\r\n : dayjs(value as any, allOutputFormats)\r\n : null,\r\n })}\r\n normalize={value => {\r\n // DatePicker에서 넘어온 Dayjs를 returnType에 따라 반환\r\n if (!value) return null;\r\n if (returnType === 'dayjs') return value as Dayjs;\r\n return value.format(outputFormat);\r\n }}\r\n >\r\n <DatePicker\r\n {...inputProps}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 중복되는 handleChange를 제거합니다.\r\n ></DatePicker>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgDatePicker;\r\n","import { ConfigProvider, Form, FormProps } from 'antd';\r\nimport { forwardRef, ReactNode } from 'react';\r\n\r\nexport interface BwgFormProps extends FormProps {\r\n children: ReactNode;\r\n}\r\n\r\nconst BwgForm = forwardRef<any, BwgFormProps>(\r\n ({ children, labelCol, style, className, ...props }, ref) => {\r\n return (\r\n <ConfigProvider\r\n form={{\r\n //기존 rule.message의 default message인 $name을를 입력해주세요를 변경\r\n validateMessages: { required: \"'${label}을(를) 입력해주세요.'\" },\r\n }}\r\n >\r\n <Form\r\n ref={ref}\r\n {...props}\r\n requiredMark={false}\r\n labelCol={labelCol || { flex: '100px' }}\r\n style={{ padding: '10px', ...style }}\r\n className={`bwg-form ${className ?? ''}`}\r\n >\r\n {children}\r\n </Form>\r\n </ConfigProvider>\r\n );\r\n }\r\n);\r\n\r\nBwgForm.displayName = 'BwgForm';\r\n\r\nexport default BwgForm;\r\n","import React, { FC } from 'react';\r\nimport { Input, InputProps } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgInputProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: InputProps;\r\n}\r\n\r\nconst BwgInput: FC<BwgInputProps> = ({ itemProps, inputProps }) => {\r\n return (\r\n <BwgFormItem {...itemProps}>\r\n <Input {...inputProps} />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgInput;\r\n","import { DatePicker } from 'antd';\r\nimport { RangePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nconst { RangePicker } = DatePicker;\r\n\r\nexport interface BwgRangePickerProps {\r\n inputProps?: RangePickerProps;\r\n itemProps?: BwgFormItemProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n minDate?: string;\r\n maxDate?: string;\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgRangePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n minDate,\r\n maxDate,\r\n returnType = 'string',\r\n}: BwgRangePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환\r\n value:\r\n value && value.length > 0\r\n ? [\r\n value[0]\r\n ? dayjs.isDayjs(value[0])\r\n ? (value[0] as Dayjs)\r\n : dayjs(value[0] as any, allOutputFormats)\r\n : null,\r\n value[1]\r\n ? dayjs.isDayjs(value[1])\r\n ? (value[1] as Dayjs)\r\n : dayjs(value[1] as any, allOutputFormats)\r\n : null,\r\n ]\r\n : null,\r\n })}\r\n normalize={(value: [Dayjs, Dayjs] | null) => {\r\n // RangePicker에서 넘어온 dayjs 객체 배열을 현재 type에 맞는 outputFormat으로 변환합니다.\r\n if (!value) {\r\n return [undefined, undefined];\r\n }\r\n if (returnType === 'dayjs') {\r\n return [value[0] ?? undefined, value[1] ?? undefined];\r\n }\r\n return [\r\n value[0] ? value[0].format(outputFormat) : undefined,\r\n value[1] ? value[1].format(outputFormat) : undefined,\r\n ];\r\n }}\r\n >\r\n <RangePicker\r\n {...inputProps}\r\n order={true}\r\n // minDate/maxDate도 모든 포맷으로 파싱하도록 수정\r\n minDate={minDate ? dayjs(minDate, allOutputFormats) : undefined}\r\n maxDate={maxDate ? dayjs(maxDate, allOutputFormats) : undefined}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 제거합니다.\r\n />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgRangePicker;\r\n","import { Form, Select, Space, Typography } from 'antd';\r\nimport { SelectProps } from 'antd/es/select';\r\nimport { useMemo } from 'react';\r\nimport { SimpleCodeItem } from '../../stores/codeStore';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type SelectBoxProps = SelectProps & {\r\n addField?: 'ALL' | 'NULL';\r\n options: SimpleCodeItem[];\r\n copyable?: boolean;\r\n};\r\n\r\nexport interface BwgSelectProps {\r\n /** 폼 아이템 속성 */\r\n itemProps?: BwgFormItemProps;\r\n selectProps?: SelectBoxProps;\r\n}\r\n\r\nconst BwgSelect = ({\r\n itemProps,\r\n selectProps = {\r\n options: [],\r\n allowClear: true,\r\n },\r\n}: BwgSelectProps) => {\r\n // Form 컨텍스트 체크\r\n const form = Form.useFormInstance();\r\n const isFormContext = !!form;\r\n\r\n // 옵션 리스트 메모이제이션\r\n const optionList = useMemo(() => {\r\n if (selectProps?.addField === 'ALL') {\r\n return [{ label: '전체', value: '' }, ...(selectProps?.options || [])];\r\n } else if (selectProps?.addField === 'NULL') {\r\n return [{ label: '', value: '' }, ...(selectProps?.options || [])];\r\n } else {\r\n return selectProps?.options || [];\r\n }\r\n }, [selectProps.options, selectProps.addField]);\r\n\r\n const handleChange = (newValue: string) => {\r\n selectProps.onChange?.(newValue);\r\n };\r\n\r\n // Select 컴포넌트에 전달할 props\r\n const selectComponentProps = {\r\n ...selectProps,\r\n allowClear: selectProps.allowClear ?? true,\r\n options: optionList,\r\n onChange: handleChange,\r\n variant: selectProps.variant,\r\n };\r\n\r\n // console.log(\"selectComponentProps :: \", selectComponentProps);\r\n\r\n const selectComponent = (\r\n <Select {...selectComponentProps} disabled={selectProps.disabled} />\r\n );\r\n\r\n // copyable일 때 Form 컨텍스트 체크\r\n if (selectProps.copyable && !isFormContext) {\r\n console.warn(\r\n 'BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다.'\r\n );\r\n }\r\n\r\n if (selectProps.copyable) {\r\n return (\r\n <BwgFormItem {...itemProps} name={undefined}>\r\n <Space.Compact block>\r\n <Form.Item\r\n name={itemProps?.name}\r\n rules={itemProps?.rules}\r\n style={{ width: '100%', marginBottom: 0 }}\r\n validateStatus=''\r\n help=''\r\n >\r\n {selectComponent}\r\n </Form.Item>\r\n <Typography.Paragraph\r\n copyable={{\r\n text: isFormContext\r\n ? form?.getFieldValue(itemProps?.name)?.toString() || ''\r\n : '',\r\n tooltips: ['코드복사', '코드복사됨'],\r\n }}\r\n style={{\r\n margin: 0,\r\n backgroundColor: '#f5f5f5',\r\n borderRadius: '4px',\r\n border: '1px solid #d9d9d9',\r\n fontSize: '12px',\r\n color: '#666',\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '30px',\r\n padding: '0 8px',\r\n }}\r\n />\r\n </Space.Compact>\r\n </BwgFormItem>\r\n );\r\n } else {\r\n return <BwgFormItem {...itemProps}>{selectComponent}</BwgFormItem>;\r\n }\r\n};\r\n\r\nexport default BwgSelect;\r\n","import { Form, Switch, SwitchProps } from \"antd\";\r\nimport BwgFormItem, { BwgFormItemProps } from \"./BwgFormItem\";\r\n\r\nexport type BwgSwitchItemProps = SwitchProps & {\r\n format?: 'boolean' | 'YN';\r\n };\r\n \r\n export interface BwgSwitchProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgSwitchItemProps;\r\n }\r\n\r\n/**\r\n * 스위치 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgSwitchItemProps\r\n * @returns \r\n * @example\r\n * <BwgSwitch\r\n * itemProps={{ name: 'switch' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n * @returns \r\n */\r\nconst BwgSwitch = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgSwitchProps) => {\r\n const form = Form.useFormInstance();\r\n \r\n const handleChange = (checked: boolean, e: any) => {\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, checked ? 'Y' : 'N');\r\n }\r\n \r\n inputProps.onChange && inputProps.onChange(checked, e as any);\r\n };\r\n\r\n return <BwgFormItem {...itemProps} \r\n getValueProps={value => {\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked };\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Switch {...inputProps} onChange={(checked: boolean, e: any) => handleChange(checked, e)} />\r\n </BwgFormItem>;\r\n};\r\n\r\nexport default BwgSwitch;"],"names":["BwgFormItem","memo","children","label","name","rules","initialValue","style","rest","labelStyle","isRequired","rule","renderLabel","jsxs","jsx","Form","BwgCheck","itemProps","inputProps","form","handleChange","value","Checkbox","formatMap","BwgDatePicker","type","returnType","displayFormat","outputFormat","useMemo","allOutputFormats","f","a","b","dayjs","DatePicker","BwgForm","forwardRef","labelCol","className","props","ref","ConfigProvider","BwgInput","Input","RangePicker","BwgRangePicker","minDate","maxDate","BwgSelect","selectProps","isFormContext","optionList","newValue","selectComponentProps","selectComponent","Select","Space","Typography","BwgSwitch","checked","e","Switch"],"mappings":"mHAiBMA,EAAcC,EAAAA,KAClB,CAAC,CACC,SAAAC,EACA,MAAAC,EACA,KAAAC,EACA,MAAAC,EACA,aAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,IACmB,CACtB,MAAMC,EAAa,CACjB,WAAY,MAAA,EAIRC,EACJ,MAAM,QAAQL,CAAK,GAAKA,EAAM,KAAMM,GAAcA,EAAK,WAAa,EAAI,EAGpEC,EAAc,IACd,OAAOT,GAAU,SAEjBU,EAAAA,kBAAAA,KAAC,OAAA,CAAK,MAAOJ,EACV,SAAA,CAAAN,EACAO,GACCI,EAAAA,kBAAAA,IAAC,OAAA,CAAK,MAAO,CAAE,MAAO,UAAW,WAAY,OAAS,SAAA,GAAA,CAAC,CAAA,EAE3D,EAGGA,EAAAA,kBAAAA,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AcF,GAAW,KAAM2C,CAAO,EAE3CzC,EAAK,cAAcF,GAAW,KAAM2C,EAAU,IAAM,GAAG,EAGzD1C,EAAW,UAAYA,EAAW,SAAS0C,EAASC,CAAQ,CAChE,EAEE,OAAO/C,EAAAA,kBAAAA,IAACd,EAAA,CAAa,GAAGiB,EACxB,cAAeI,IAOJ,CAAE,QALPH,EAAW,SAAW,UAClB,EAAQG,EACRA,IAAU,GAGP,GAEX,UAAWA,GAGL,OAAOA,GAAU,UACfH,EAAW,SAAW,UACjBG,EAEFA,EAAQ,IAAM,IAGnBH,EAAW,SAAW,UACjB,CAAC,CAACG,EAEJA,EAAQ,IAAM,IAGrB,SAAAP,EAAAA,kBAAAA,IAACgD,SAAA,CAAQ,GAAG5C,EAAY,SAAU,CAAC0C,EAAkBC,IAAWzC,EAAawC,EAASC,CAAC,CAAA,CAAG,CAAA,CAAA,CAElG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSwitch-D_scwi9_.js","sources":["../../src/components/core/BwgFormItem.tsx","../../src/components/core/BwgCheck.tsx","../../src/components/core/BwgDatePicker.tsx","../../src/components/core/BwgForm.tsx","../../src/components/core/BwgInput.tsx","../../src/components/core/BwgRangePicker.tsx","../../src/components/core/BwgSelect.tsx","../../src/components/core/BwgSwitch.tsx"],"sourcesContent":["import { Form, FormItemProps } from 'antd';\r\nimport React, { memo, ReactNode } from 'react';\r\n\r\nexport interface BwgFormItemProps extends FormItemProps {\r\n /** 폼 아이템 이름 */\r\n name?: string | string[];\r\n /** 폼 아이템 라벨 */\r\n label?: string | ReactNode;\r\n /** 폼 아이템 규칙 */\r\n rules?: any;\r\n /** 폼 아이템 초기값 */\r\n initialValue?: any;\r\n /** 폼 아이템 자식 컴포넌트 */\r\n children?: ReactNode;\r\n}\r\n\r\n/** 입력 폼 아이템 컴포넌트 */\r\nconst BwgFormItem = memo(\r\n ({\r\n children,\r\n label,\r\n name,\r\n rules,\r\n initialValue,\r\n style,\r\n ...rest\r\n }: BwgFormItemProps) => {\r\n const labelStyle = {\r\n fontWeight: 'bold',\r\n };\r\n\r\n // rules에서 required 필드 확인\r\n const isRequired =\r\n Array.isArray(rules) && rules.some((rule: any) => rule.required === true);\r\n\r\n // 라벨 렌더링 함수\r\n const renderLabel = () => {\r\n if (typeof label === 'string') {\r\n return (\r\n <span style={labelStyle}>\r\n {label}\r\n {isRequired && (\r\n <span style={{ color: '#ff4d4f', marginLeft: '4px' }}>*</span>\r\n )}\r\n </span>\r\n );\r\n }\r\n return <span style={labelStyle}>{label}</span>;\r\n };\r\n\r\n return (\r\n <Form.Item\r\n className='bwg-form-item'\r\n label={label ? renderLabel() : undefined}\r\n labelAlign='left'\r\n name={name}\r\n rules={rules}\r\n colon={false}\r\n initialValue={initialValue}\r\n style={style}\r\n {...rest}\r\n >\r\n {children}\r\n </Form.Item>\r\n );\r\n }\r\n);\r\n\r\nexport default BwgFormItem;\r\n","import { Checkbox, CheckboxProps, Form } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type BwgCheckBoxProps = CheckboxProps & {\r\n format?: 'boolean' | 'YN';\r\n};\r\n\r\nexport interface BwgCheckProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgCheckBoxProps;\r\n}\r\n\r\n/**\r\n * 체크박스 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgCheckBoxProps\r\n * @returns \r\n * @example\r\n * <BwgCheck\r\n * itemProps={{ name: 'check' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n */\r\nconst BwgCheck = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgCheckProps) => {\r\n const form = Form.useFormInstance();\r\n\r\n const handleChange = (e: any) => {\r\n //console.log('handleChange :: ', e.target.checked);\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, e.target.checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, e.target.checked ? 'Y' : 'N');\r\n }\r\n\r\n inputProps.onChange && inputProps.onChange(e);\r\n };\r\n\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => {\r\n //console.log('getValueProps :: ', value);\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked }; // ✅ 수정: value 대신 checked 반환\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Checkbox {...inputProps} onChange={handleChange}>\r\n {inputProps?.title}\r\n </Checkbox>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgCheck;\r\n","import { DatePicker } from 'antd';\r\nimport { DatePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgDatePickerProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: DatePickerProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgDatePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n returnType = 'string',\r\n}: BwgDatePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환\r\n value: value\r\n ? dayjs.isDayjs(value)\r\n ? (value as Dayjs)\r\n : dayjs(value as any, allOutputFormats)\r\n : null,\r\n })}\r\n normalize={value => {\r\n // DatePicker에서 넘어온 Dayjs를 returnType에 따라 반환\r\n if (!value) return null;\r\n if (returnType === 'dayjs') return value as Dayjs;\r\n return value.format(outputFormat);\r\n }}\r\n >\r\n <DatePicker\r\n {...inputProps}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 중복되는 handleChange를 제거합니다.\r\n ></DatePicker>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgDatePicker;\r\n","import { ConfigProvider, Form, FormProps } from 'antd';\r\nimport { forwardRef, ReactNode } from 'react';\r\n\r\nexport interface BwgFormProps extends FormProps {\r\n children: ReactNode;\r\n}\r\n\r\nconst BwgForm = forwardRef<any, BwgFormProps>(\r\n ({ children, labelCol, style, className, ...props }, ref) => {\r\n return (\r\n <ConfigProvider\r\n form={{\r\n //기존 rule.message의 default message인 $name을를 입력해주세요를 변경\r\n validateMessages: { required: \"'${label}을(를) 입력해주세요.'\" },\r\n }}\r\n >\r\n <Form\r\n ref={ref}\r\n {...props}\r\n requiredMark={false}\r\n labelCol={labelCol || { flex: '100px' }}\r\n style={{ padding: '10px', ...style }}\r\n className={`bwg-form ${className ?? ''}`}\r\n >\r\n {children}\r\n </Form>\r\n </ConfigProvider>\r\n );\r\n }\r\n);\r\n\r\nBwgForm.displayName = 'BwgForm';\r\n\r\nexport default BwgForm;\r\n","import React, { FC } from 'react';\r\nimport { Input, InputProps } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgInputProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: InputProps;\r\n}\r\n\r\nconst BwgInput: FC<BwgInputProps> = ({ itemProps, inputProps }) => {\r\n return (\r\n <BwgFormItem {...itemProps}>\r\n <Input {...inputProps} />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgInput;\r\n","import { DatePicker } from 'antd';\r\nimport { RangePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nconst { RangePicker } = DatePicker;\r\n\r\nexport interface BwgRangePickerProps {\r\n inputProps?: RangePickerProps;\r\n itemProps?: BwgFormItemProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n minDate?: string;\r\n maxDate?: string;\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgRangePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n minDate,\r\n maxDate,\r\n returnType = 'string',\r\n}: BwgRangePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환\r\n value:\r\n value && value.length > 0\r\n ? [\r\n value[0]\r\n ? dayjs.isDayjs(value[0])\r\n ? (value[0] as Dayjs)\r\n : dayjs(value[0] as any, allOutputFormats)\r\n : null,\r\n value[1]\r\n ? dayjs.isDayjs(value[1])\r\n ? (value[1] as Dayjs)\r\n : dayjs(value[1] as any, allOutputFormats)\r\n : null,\r\n ]\r\n : null,\r\n })}\r\n normalize={(value: [Dayjs, Dayjs] | null) => {\r\n // RangePicker에서 넘어온 dayjs 객체 배열을 현재 type에 맞는 outputFormat으로 변환합니다.\r\n if (!value) {\r\n return [undefined, undefined];\r\n }\r\n if (returnType === 'dayjs') {\r\n return [value[0] ?? undefined, value[1] ?? undefined];\r\n }\r\n return [\r\n value[0] ? value[0].format(outputFormat) : undefined,\r\n value[1] ? value[1].format(outputFormat) : undefined,\r\n ];\r\n }}\r\n >\r\n <RangePicker\r\n {...inputProps}\r\n order={true}\r\n // minDate/maxDate도 모든 포맷으로 파싱하도록 수정\r\n minDate={minDate ? dayjs(minDate, allOutputFormats) : undefined}\r\n maxDate={maxDate ? dayjs(maxDate, allOutputFormats) : undefined}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 제거합니다.\r\n />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgRangePicker;\r\n","import { Form, Select, Space, Typography } from 'antd';\r\nimport { SelectProps } from 'antd/es/select';\r\nimport { useMemo } from 'react';\r\nimport { SimpleCodeItem } from '../../stores/codeStore';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type SelectBoxProps = SelectProps & {\r\n addField?: 'ALL' | 'NULL';\r\n options: SimpleCodeItem[];\r\n copyable?: boolean;\r\n};\r\n\r\nexport interface BwgSelectProps {\r\n /** 폼 아이템 속성 */\r\n itemProps?: BwgFormItemProps;\r\n selectProps?: SelectBoxProps;\r\n}\r\n\r\nconst BwgSelect = ({\r\n itemProps,\r\n selectProps = {\r\n options: [],\r\n allowClear: true,\r\n },\r\n}: BwgSelectProps) => {\r\n // Form 컨텍스트 체크\r\n const form = Form.useFormInstance();\r\n const isFormContext = !!form;\r\n\r\n // 옵션 리스트 메모이제이션\r\n const optionList = useMemo(() => {\r\n if (selectProps?.addField === 'ALL') {\r\n return [{ label: '전체', value: '' }, ...(selectProps?.options || [])];\r\n } else if (selectProps?.addField === 'NULL') {\r\n return [{ label: '', value: '' }, ...(selectProps?.options || [])];\r\n } else {\r\n return selectProps?.options || [];\r\n }\r\n }, [selectProps.options, selectProps.addField]);\r\n\r\n const handleChange = (newValue: string) => {\r\n selectProps.onChange?.(newValue);\r\n };\r\n\r\n // Select 컴포넌트에 전달할 props\r\n const selectComponentProps = {\r\n ...selectProps,\r\n allowClear: selectProps.allowClear ?? true,\r\n options: optionList,\r\n onChange: handleChange,\r\n variant: selectProps.variant,\r\n };\r\n\r\n // console.log(\"selectComponentProps :: \", selectComponentProps);\r\n\r\n const selectComponent = (\r\n <Select {...selectComponentProps} disabled={selectProps.disabled} />\r\n );\r\n\r\n // copyable일 때 Form 컨텍스트 체크\r\n if (selectProps.copyable && !isFormContext) {\r\n console.warn(\r\n 'BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다.'\r\n );\r\n }\r\n\r\n if (selectProps.copyable) {\r\n return (\r\n <BwgFormItem {...itemProps} name={undefined}>\r\n <Space.Compact block>\r\n <Form.Item\r\n name={itemProps?.name}\r\n rules={itemProps?.rules}\r\n style={{ width: '100%', marginBottom: 0 }}\r\n validateStatus=''\r\n help=''\r\n >\r\n {selectComponent}\r\n </Form.Item>\r\n <Typography.Paragraph\r\n copyable={{\r\n text: isFormContext\r\n ? form?.getFieldValue(itemProps?.name)?.toString() || ''\r\n : '',\r\n tooltips: ['코드복사', '코드복사됨'],\r\n }}\r\n style={{\r\n margin: 0,\r\n backgroundColor: '#f5f5f5',\r\n borderRadius: '4px',\r\n border: '1px solid #d9d9d9',\r\n fontSize: '12px',\r\n color: '#666',\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '30px',\r\n padding: '0 8px',\r\n }}\r\n />\r\n </Space.Compact>\r\n </BwgFormItem>\r\n );\r\n } else {\r\n return <BwgFormItem {...itemProps}>{selectComponent}</BwgFormItem>;\r\n }\r\n};\r\n\r\nexport default BwgSelect;\r\n","import { Form, Switch, SwitchProps } from \"antd\";\r\nimport BwgFormItem, { BwgFormItemProps } from \"./BwgFormItem\";\r\n\r\nexport type BwgSwitchItemProps = SwitchProps & {\r\n format?: 'boolean' | 'YN';\r\n };\r\n \r\n export interface BwgSwitchProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgSwitchItemProps;\r\n }\r\n\r\n/**\r\n * 스위치 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgSwitchItemProps\r\n * @returns \r\n * @example\r\n * <BwgSwitch\r\n * itemProps={{ name: 'switch' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n * @returns \r\n */\r\nconst BwgSwitch = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgSwitchProps) => {\r\n const form = Form.useFormInstance();\r\n \r\n const handleChange = (checked: boolean, e: any) => {\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, checked ? 'Y' : 'N');\r\n }\r\n \r\n inputProps.onChange && inputProps.onChange(checked, e as any);\r\n };\r\n\r\n return <BwgFormItem {...itemProps} \r\n getValueProps={value => {\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked };\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Switch {...inputProps} onChange={(checked: boolean, e: any) => handleChange(checked, e)} />\r\n </BwgFormItem>;\r\n};\r\n\r\nexport default BwgSwitch;"],"names":["BwgFormItem","memo","children","label","name","rules","initialValue","style","rest","labelStyle","isRequired","rule","renderLabel","jsxs","jsx","Form","BwgCheck","itemProps","inputProps","form","handleChange","value","Checkbox","formatMap","BwgDatePicker","type","returnType","displayFormat","outputFormat","useMemo","allOutputFormats","f","a","b","dayjs","DatePicker","BwgForm","forwardRef","labelCol","className","props","ref","ConfigProvider","BwgInput","Input","RangePicker","BwgRangePicker","minDate","maxDate","BwgSelect","selectProps","isFormContext","optionList","newValue","selectComponentProps","selectComponent","Select","Space","Typography","BwgSwitch","checked","e","Switch"],"mappings":";;;;AAiBA,MAAMA,IAAcC;AAAA,EAClB,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MACmB;AACtB,UAAMC,IAAa;AAAA,MACjB,YAAY;AAAA,IAAA,GAIRC,IACJ,MAAM,QAAQL,CAAK,KAAKA,EAAM,KAAK,CAACM,MAAcA,EAAK,aAAa,EAAI,GAGpEC,IAAc,MACd,OAAOT,KAAU,WAEjBU,gBAAAA,EAAAA,KAAC,QAAA,EAAK,OAAOJ,GACV,UAAA;AAAA,MAAAN;AAAA,MACAO,KACCI,gBAAAA,EAAAA,IAAC,QAAA,EAAK,OAAO,EAAE,OAAO,WAAW,YAAY,SAAS,UAAA,IAAA,CAAC;AAAA,IAAA,GAE3D,IAGGA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,OAAOL,GAAa,UAAAN,GAAM;AAGzC,WACEW,gBAAAA,EAAAA;AAAAA,MAACC,EAAK;AAAA,MAAL;AAAA,QACC,WAAU;AAAA,QACV,OAAOZ,IAAQS,EAAA,IAAgB;AAAA,QAC/B,YAAW;AAAA,QACX,MAAAR;AAAA,QACA,OAAAC;AAAA,QACA,OAAO;AAAA,QACP,cAAAC;AAAA,QACA,OAAAC;AAAA,QACC,GAAGC;AAAA,QAEH,UAAAN;AAAA,MAA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Q,MAAM;AAAA,MAGrB,UAAAP,gBAAAA,EAAAA,IAACgD,GAAA,EAAQ,GAAG5C,GAAY,UAAU,CAAC0C,GAAkBC,MAAWzC,EAAawC,GAASC,CAAC,EAAA,CAAG;AAAA,IAAA;AAAA,EAAA;AAElG;"}
@@ -1,3 +0,0 @@
1
- "use strict";const c=require("./jsx-runtime-CeSfJrVB.cjs"),u=require("antd"),k=require("./BwgSwitch-DOlc57wi.cjs"),f=require("react"),F=require("@ant-design/icons"),A=require("lodash"),_=require("./apiUtils-BZ6s0_NI.cjs"),et=require("jszip"),Me=require("imask"),z=require("dayjs"),tt=require("./popupStore-DUApUBF2.cjs"),rt=t=>c.jsxRuntimeExports.jsx(u.Button,{...t,className:"bwg-btn"}),nt=({itemProps:t,inputProps:e})=>{const r=u.Form.useFormInstance(),[n,s]=f.useState(t?.initialValue??[]),[i,a]=f.useState([]),o=i.length>0&&i.length==n?.length,l=n?.length>0&&n.length<i.length;f.useEffect(()=>{a(d(e?.options))},[e?.options]),f.useEffect(()=>{s(n)},[n]);const d=p=>{const g=[];return(p||[]).map((T,S)=>{g.push(T.value)}),g},v=p=>{s(p.target.checked?i:[]),r.setFieldValue(t?.name,p.target.checked?i:[])},D=p=>{s(p),r.setFieldValue(t?.name,p),e?.onChange&&typeof e?.onChange=="function"&&e?.onChange(p)};return c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,children:c.jsxRuntimeExports.jsxs(u.ConfigProvider,{theme:{components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)"}}},children:[e?.allCheck&&c.jsxRuntimeExports.jsx(u.Checkbox,{indeterminate:l,checked:o,onChange:v,children:"전체선택"}),c.jsxRuntimeExports.jsx(u.Checkbox.Group,{options:e?.options,value:n,onChange:D})]})})},st=({fileGrpKey:t,onFetchFilesTrxCd:e="SCMFILE00101",readOnly:r=!1,sysCd:n=__SYS_CD__})=>{const[s,i]=f.useState([]);f.useEffect(()=>{t&&e?n!=__SYS_CD__?_.callService_SYSCD(n,e,{crprCd:_.getUserInfo()?.crprCd,sysCd:n,fileGrpKey:t}).then(o=>{if(o?.sub){const l=o.sub.map(d=>({uid:d.fileKey,name:d.lgclFileNm,filePath:d.filePath}));i(l)}}).catch(o=>{console.error("파일 목록 조회 서비스 호출에 실패했습니다.",o),u.message.error("파일 목록을 불러오는 중 오류가 발생했습니다.")}):_.callService(e,{crprCd:_.getUserInfo()?.crprCd,sysCd:n,fileGrpKey:t}).then(o=>{if(o?.sub){const l=o.sub.map(d=>({uid:d.fileKey,name:d.lgclFileNm,filePath:d.filePath}));i(l)}}).catch(o=>{console.error("파일 목록 조회 서비스 호출에 실패했습니다.",o),u.message.error("파일 목록을 불러오는 중 오류가 발생했습니다.")}):i([])},[t,e]);const a=async o=>{try{let l;n!=__SYS_CD__?l="/api/download/"+n:l="/api/download";const d=await fetch(l,{method:"POST",headers:{SYSCD:__SYS_CD__,"Content-Type":"application/json"},body:JSON.stringify({filePath:o.filePath,logicalName:o.name,fileKey:o.uid})});if(!d.ok){const T=(await d.json().catch(()=>null))?.message||"파일 다운로드에 실패했습니다.";throw new Error(T)}const v=await d.blob(),D=window.URL.createObjectURL(v),p=document.createElement("a");p.href=D,p.setAttribute("download",o.name),document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(D)}catch(l){console.error(l),u.message.error(l.message||"파일을 다운로드하는 중 오류가 발생했습니다.")}};return A.isEmpty(s)?null:c.jsxRuntimeExports.jsx(u.Card,{title:"파일 목록",children:c.jsxRuntimeExports.jsx(u.List,{dataSource:s,renderItem:o=>c.jsxRuntimeExports.jsx(u.List.Item,{actions:r?[]:[c.jsxRuntimeExports.jsx(u.Button,{type:"text",icon:c.jsxRuntimeExports.jsx(F.DownloadOutlined,{}),onClick:()=>a(o)},"download")],children:c.jsxRuntimeExports.jsx(u.List.Item.Meta,{avatar:c.jsxRuntimeExports.jsx(F.PaperClipOutlined,{}),title:o.name})})})})},{Text:G,Link:kn}=u.Typography,{Dragger:it}=u.Upload,ot=[".pdf",".xlsx",".xls",".docx",".doc",".pptx",".ppt",".hwp",".txt",".csv",".jpg",".jpeg",".png",".gif",".zip"],at=(t,e=2)=>{if(t===0)return"0 Bytes";const r=1024,n=e<0?0:e,s=["Bytes","KB","MB","GB","TB"],i=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,i)).toFixed(n))+" "+s[i]},ct=({title:t="첨부파일",fileGrpKey:e,onUploadComplete:r,onSuccessTrxCd:n="SCMFILE00102",anotherServiceTrxCd:s="SCMFILE00105",allowedExtensions:i=ot,maxFileSize:a=2048})=>{const[o,l]=f.useState([]),[d,v]=f.useState(!1),[D,p]=f.useState(!1),[g,T]=f.useState(0),S=m=>{if(i&&i.length>0){const h=(I=>{const x=I.lastIndexOf(".");return x===-1?"":I.substring(x).toLowerCase()})(m.name);if(!i.includes(h))return u.message.error(`${m.name} 파일은 허용되지 않는 확장자입니다. (${i.join(", ")}만 가능)`),!1}return!0},w=async()=>{const m=o.filter(O=>O.status!=="done"),b=m.reduce((O,j)=>O+(j.size||0),0),h=2*1024*1024*1024;if(b>h){u.notification.error({message:"업로드 용량 초과",description:"한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."});return}if(m.length===0){u.message.warning("업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다.");return}p(!0);let I;try{const O=new et;m.forEach(j=>{j.originFileObj&&O.file(j.name,j.originFileObj)}),I=await O.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}})}catch(O){p(!1),u.message.error("파일을 압축하는 중 오류가 발생했습니다."),console.error("Zipping error:",O);return}p(!1);const x=new FormData;x.append("file",I,"upload.zip"),v(!0),T(0);try{const O=await new Promise((C,N)=>{const P=new XMLHttpRequest;P.open("POST","/api/upload-large",!0),P.upload.onprogress=R=>{if(R.lengthComputable){const B=Math.round(R.loaded/R.total*100);T(B)}},P.onload=()=>{if(P.status>=200&&P.status<300)try{const R=JSON.parse(P.responseText);R.success?C(R):N(new Error(R.message||"파일 업로드에 실패했습니다."))}catch{N(new Error("잘못된 서버 응답입니다."))}else try{const R=JSON.parse(P.responseText);N(new Error(R.message||`서버 오류: ${P.status}`))}catch{N(new Error(`서버 오류: ${P.status}`))}},P.onerror=()=>{N(new Error("네트워크 오류가 발생했습니다."))},P.send(x)});u.message.success(O.message||"압축 파일이 성공적으로 업로드되었습니다.");const j=o.map(C=>m.find(N=>N.uid===C.uid)?{...C,status:"done"}:C);if(l(j),n&&O.uploadedFiles&&Array.isArray(O.uploadedFiles)){const C=_.getUserInfo();O.uploadedFiles.forEach(N=>{const P={crprCd:C?.crprCd,sysCd:__SYS_CD__,fileGrpKey:e,sub:[{crprCd:C?.crprCd,sysCd:__SYS_CD__,fileGrpKey:e,physFileNm:N.fileNameP,lgclFileNm:N.fileNameL,filePath:N.filePath,fileExtn:N.fileExt,fileSize:N.fileSize,mltpYn:"Y"}]};_.callService(n,P).then(R=>{const B=o.map(H=>({crprCd:C?.crprCd,sysCd:__SYS_CD__,fileGrpKey:R.sub[0].fileGrpKey,fileKey:R.sub[0].fileKey,lgclFileNm:H.name,fileSize:H.size,fileExtn:H.name.split(".").pop(),fileType:H.type}));_.callService(s,{sub:B})}).catch(R=>{console.error("후처리 서비스 호출 실패:",R),u.message.error(`${N.fileNameL} 파일의 후처리 작업에 실패했습니다.`)}),r&&r({fileNameP:N.fileNameP,fileNameL:N.fileNameL})})}}catch(O){u.message.error(O.message||"파일 업로드 중 오류가 발생했습니다.");const j=o.map(C=>m.find(N=>N.uid===C.uid)?{...C,status:"error",response:O.message||"파일 업로드 중 오류가 발생했습니다."}:C);l(j)}finally{v(!1)}},y={multiple:!0,fileList:o,beforeUpload:m=>S(m)?a&&m.size>=a*1024*1024?(u.message.error(`대용량 첨부 파일 최대 크기는 ${(a/1024).toFixed(1)}GB입니다.`),u.Upload.LIST_IGNORE):!1:u.Upload.LIST_IGNORE,onChange:({fileList:m})=>{const b=new Map(o.map(h=>[h.uid,h]));m.forEach(h=>{b.set(h.uid,h)}),l(Array.from(b.values()))},onRemove:m=>{const b=o.filter(h=>h.uid!==m.uid);l(b)},showUploadList:!1};return c.jsxRuntimeExports.jsx(u.Spin,{spinning:d||D,tip:D?"파일 압축 중...":`파일 업로드 중... ${g}%`,children:c.jsxRuntimeExports.jsxs("div",{className:"bwg-large-uploader-container",children:[c.jsxRuntimeExports.jsx(u.Card,{title:c.jsxRuntimeExports.jsx(G,{strong:!0,children:t}),extra:c.jsxRuntimeExports.jsx(u.Upload,{...y,children:c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(F.UploadOutlined,{}),children:"파일 선택"})}),bodyStyle:{padding:0},children:c.jsxRuntimeExports.jsx(it,{...y,style:{border:"none",background:"transparent",padding:0},children:c.jsxRuntimeExports.jsx("div",{className:"upload-list-container",children:o.length>0?c.jsxRuntimeExports.jsx(u.List,{style:{textAlign:"left"},dataSource:o,renderItem:m=>{const b=m.status==="done",h=m.status==="error";let I;return b?I=c.jsxRuntimeExports.jsx(F.CheckCircleOutlined,{style:{color:"#52c41a",fontSize:14}}):h?I=c.jsxRuntimeExports.jsx(u.Tooltip,{title:typeof m.response=="string"?m.response:"업로드 실패",children:c.jsxRuntimeExports.jsx(F.CloseCircleOutlined,{style:{color:"#ff4d4f",fontSize:14}})}):I=c.jsxRuntimeExports.jsx(F.FileTextOutlined,{style:{fontSize:14}}),c.jsxRuntimeExports.jsx(u.List.Item,{actions:[c.jsxRuntimeExports.jsx(G,{type:"secondary",children:at(m.size||0)},"size"),c.jsxRuntimeExports.jsx(u.Button,{type:"text",icon:c.jsxRuntimeExports.jsx(F.DeleteOutlined,{}),onClick:x=>{x.stopPropagation(),y.onRemove?.(m)},disabled:d||D},"delete")],children:c.jsxRuntimeExports.jsx(u.List.Item.Meta,{avatar:I,title:c.jsxRuntimeExports.jsx(G,{type:h?"danger":void 0,children:m.name})})},m.uid)}}):c.jsxRuntimeExports.jsxs(u.Flex,{gap:"middle",align:"center",justify:"center",vertical:!0,style:{padding:"20px 0",minHeight:"120px"},children:[c.jsxRuntimeExports.jsx(F.InboxOutlined,{style:{fontSize:"32px",color:"#999"}}),c.jsxRuntimeExports.jsx(G,{type:"secondary",children:"업로드할 파일을 선택하거나 이 영역으로 드래그하세요."})]})})})}),o.length>0&&c.jsxRuntimeExports.jsxs(u.Flex,{justify:"flex-end",align:"center",gap:"large",style:{marginTop:16},children:[d&&c.jsxRuntimeExports.jsx("div",{style:{width:"250px"},children:c.jsxRuntimeExports.jsx(u.Progress,{percent:g,size:"small"})}),c.jsxRuntimeExports.jsx(u.Button,{type:"primary",onClick:w,disabled:d||D||o.filter(m=>m.status!=="done").length===0,icon:c.jsxRuntimeExports.jsx(F.CloudUploadOutlined,{}),children:"일괄 업로드"})]})]})})},ut=t=>{if(typeof t=="string")return t.replace(/0/g,"_");if(Array.isArray(t))return t[0].replace(/0/g,"_");if(typeof t=="object"&&"mask"in t&&"blocks"in t){const{mask:e,blocks:r}=t;return e.split(".").map(n=>{const i=r?.[n]?.maxLength??3;return"_".repeat(i)}).join(".")}return""},lt=({itemProps:t,inputProps:e,mask:r})=>{const n=f.useRef(null),s=u.Form.useFormInstance(),i=f.useMemo(()=>ut(r),[r]);return f.useEffect(()=>{if(!n.current?.input)return;const a=typeof r=="string"||Array.isArray(r)?{mask:r}:r,o=Me(n.current.input,a);return o.on("accept",()=>{s&&t?.name&&s.setFieldValue(t.name,o.value)}),()=>{o.destroy()}},[r,s,t?.name]),c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,children:c.jsxRuntimeExports.jsx(u.Input,{...e,ref:n,placeholder:i})})},dt=t=>{switch(t){case"year":return{format:"YYYY",mask:"0000",outputFormat:"YYYY"};case"month":return{format:"YYYY-MM",mask:"0000-00",outputFormat:"YYYYMM"};case"date":default:return{format:"YYYY-MM-DD",mask:"0000-00-00",outputFormat:"YYYYMMDD"}}},gt=({type:t="date",itemProps:e={name:"calendar"},inputProps:r})=>{const{format:n,mask:s,outputFormat:i}=dt(t),a=f.useRef(null),o=f.useRef(null),l=u.Form.useFormInstance(),[d,v]=f.useState(!1),[D,p]=f.useState(!1),g=e?.name,[T,S]=f.useState(null);f.useEffect(()=>{if(!a.current?.input)return;const y=Me(a.current.input,{mask:s,lazy:!1});return o.current=y,y.on("accept",()=>{console.log("input :: ",y.value);const m=y.value,b=z(m,n,!0);console.log("input :: ",b),m.length===n.length&&b.isValid()&&(console.log("parsed :: ",b.format(i)),l.setFieldValue(g,b.format(i)),o.current?.updateValue(),v(!1))}),()=>{y.destroy()}},[n,s]),f.useEffect(()=>{S(z(l.getFieldValue(g)))},[l.getFieldValue(g)]);const w=y=>{if(!y){o.current?.updateValue();return}const m=y.format(i);console.log("formatted :: ",m),o.current&&(o.current.value=m,o.current.updateValue()),p(!1)};return c.jsxRuntimeExports.jsx(k.BwgFormItem,{...e,name:void 0,validateStatus:D?"warning":void 0,help:D?"유효하지 않은 날짜입니다":void 0,children:c.jsxRuntimeExports.jsxs("div",{style:{position:"relative"},children:[c.jsxRuntimeExports.jsx(u.Form.Item,{name:g,getValueProps:y=>({value:y?z(y).format(n):void 0}),normalize:y=>y?z(y).format(i):void 0,noStyle:!0,children:c.jsxRuntimeExports.jsx(u.Input,{...r,ref:a,onFocus:()=>{v(!d),o.current?.updateValue()},onKeyDown:y=>{y.key==="Backspace"&&v(!0),y.key==="Tab"&&v(!1)},allowClear:!0,placeholder:s.replace(/0/g,"_"),autoComplete:"off"})}),c.jsxRuntimeExports.jsx(u.DatePicker,{open:d,picker:t,format:n,value:T,onChange:w,getPopupContainer:y=>y.parentElement,style:{position:"absolute",top:0,left:0,pointerEvents:"none",opacity:0,width:"100%"}})]})})},{Option:De}=u.Select,ft=({itemProps:t,inputProps:e})=>{const[r,n]=f.useState([]);return f.useEffect(()=>{e?.addField==="ALL"?n([{label:"전체",value:""},...e?.list||[]]):e?.addField==="NULL"?n([{label:"",value:""},...e?.list||[]]):n(e?.list||[])},[e?.list]),c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,getValueProps:s=>s?{value:s&&s.indexOf(",")>0?s.split(","):[s]}:{value:[]},normalize:s=>s!=null&&s!=null&&s.length>0?s.toString():"",children:c.jsxRuntimeExports.jsx(u.Select,{...e,mode:"multiple",children:r.map(s=>{const{value:i,label:a}=s;return e?.printCode?c.jsxRuntimeExports.jsx(De,{value:i,label:a,children:c.jsxRuntimeExports.jsx(u.Space,{children:`[${i}] ${a}`})},i):c.jsxRuntimeExports.jsx(De,{value:i,label:a,children:c.jsxRuntimeExports.jsx(u.Space,{children:`${a}`})},i)})})})},ht=({itemProps:t,inputProps:e})=>{const r=s=>{let i=s.toString().split(".");return e?.decimalPoint!=null&&i[1]!=null&&e?.decimalPoint>0?i[1].length>e?.decimalPoint?i[1]="."+i[1].substring(0,e?.decimalPoint):i[1]="."+i[1]:i[1]="",i[0].replace(/\B(?=(\d{3})+(?!\d))/g,",")+i[1]},n=s=>{let i=s.toString().split(".");return e?.decimalPoint!=null&&i[1]!=null&&e?.decimalPoint>0?i[1].length>e?.decimalPoint?i[1]="."+i[1].substring(0,e?.decimalPoint):i[1]="."+i[1]:i[1]="",i[0].replace(/\$\s?|(,*)/g,"")+i[1]};return c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,children:c.jsxRuntimeExports.jsx(u.InputNumber,{...e,formatter:s=>r(s),parser:s=>n(s)})})},pt=({itemProps:t,inputProps:e})=>c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,children:c.jsxRuntimeExports.jsx(u.Radio.Group,{...e})}),ye=u.Input.Search,mt=t=>{const e=u.Form.useFormInstance(),{openPopup:r}=tt.usePopupStore(),n=t.itemProps?.name||[],s=t.popupConfig||{callback(a){console.log("callback data :: ",a),n.length>1?(e.setFieldValue(n[0],a.code),e.setFieldValue(n[1],a.name)):e.setFieldValue(n,a.code)}},i={...t,placeholder:typeof t.placeholder=="string"?t.placeholder:t.placeholder?.[0]||"",onChange:a=>{n.length>1&&e.setFieldValue(n[0],""),t.onChange?.(a)},onSearch:a=>{t.popuCd?r(t.popuCd,t.popupParams,s):t.onSearch?.(a)}};return n.length>1?c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t.itemProps,name:void 0,children:c.jsxRuntimeExports.jsxs(u.Space.Compact,{block:!0,children:[c.jsxRuntimeExports.jsx(u.Form.Item,{name:n[0],rules:t.itemProps?.rules,style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:c.jsxRuntimeExports.jsx(u.Input,{style:{color:"#999",backgroundColor:"#f5f5f5"},placeholder:t.placeholder?.[0]||"",readOnly:!0})}),c.jsxRuntimeExports.jsx(u.Form.Item,{name:n[1],style:{width:"60%",marginBottom:0},children:c.jsxRuntimeExports.jsx(ye,{readOnly:t.readOnly,enterButton:c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(F.SearchOutlined,{}),disabled:t.readOnly}),...i})})]})}):c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t.itemProps,children:c.jsxRuntimeExports.jsx(ye,{...i})})},{TextArea:vt}=u.Input,Dt=({itemProps:t,inputProps:e})=>c.jsxRuntimeExports.jsx(k.BwgFormItem,{...t,children:c.jsxRuntimeExports.jsx(vt,{...e})}),Fe=f.createContext({dragDropManager:void 0});function L(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Se=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ee=function(){return Math.random().toString(36).substring(7).split("").join(".")},xe={INIT:"@@redux/INIT"+Ee(),REPLACE:"@@redux/REPLACE"+Ee()};function yt(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function St(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Ot(t))return"date";if(xt(t))return"error";var r=Et(t);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Et(t){return typeof t.constructor=="function"?t.constructor.name:null}function xt(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Ot(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Y(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=St(t)),e}function ke(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?L(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 e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?L(1):"Expected the enhancer to be a function. Instead, received: '"+Y(r)+"'");return r(ke)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?L(2):"Expected the root reducer to be a function. Instead, received: '"+Y(t)+"'");var s=t,i=e,a=[],o=a,l=!1;function d(){o===a&&(o=a.slice())}function v(){if(l)throw new Error(process.env.NODE_ENV==="production"?L(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 D(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?L(4):"Expected the listener to be a function. Instead, received: '"+Y(S)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?L(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.");var w=!0;return d(),o.push(S),function(){if(w){if(l)throw new Error(process.env.NODE_ENV==="production"?L(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();var m=o.indexOf(S);o.splice(m,1),a=null}}}function p(S){if(!yt(S))throw new Error(process.env.NODE_ENV==="production"?L(7):"Actions must be plain objects. Instead, the actual type was: '"+Y(S)+"'. 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 S.type>"u")throw new Error(process.env.NODE_ENV==="production"?L(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?L(9):"Reducers may not dispatch actions.");try{l=!0,i=s(i,S)}finally{l=!1}for(var w=a=o,y=0;y<w.length;y++){var m=w[y];m()}return S}function g(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?L(10):"Expected the nextReducer to be a function. Instead, received: '"+Y(S));s=S,p({type:xe.REPLACE})}function T(){var S,w=D;return S={subscribe:function(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?L(11):"Expected the observer to be an object. Instead, received: '"+Y(m)+"'");function b(){m.next&&m.next(v())}b();var h=w(b);return{unsubscribe:h}}},S[Se]=function(){return this},S}return p({type:xe.INIT}),n={dispatch:p,subscribe:D,getState:v,replaceReducer:g},n[Se]=T,n}function E(t,e,...r){if(It()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let n;if(e===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(e.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function It(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function Tt(t,e,r){return e.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,t)}function bt(t,e){return t.filter(r=>r!==e)}function Ae(t){return typeof t=="object"}function wt(t,e){const r=new Map,n=i=>{r.set(i,r.has(i)?r.get(i)+1:1)};t.forEach(n),e.forEach(n);const s=[];return r.forEach((i,a)=>{i===1&&s.push(a)}),s}function Ct(t,e){return t.filter(r=>e.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",K="dnd-core/BEGIN_DRAG",fe="dnd-core/PUBLISH_DRAG_SOURCE",J="dnd-core/HOVER",Z="dnd-core/DROP",Q="dnd-core/END_DRAG";function Oe(t,e){return{type:ge,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Rt={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function jt(t){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=n,o=t.getMonitor(),l=t.getRegistry();t.dispatch(Oe(i)),Nt(r,o,l);const d=Lt(r,o);if(d==null){t.dispatch(Rt);return}let v=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Pt(a),v=a(d)}t.dispatch(Oe(i,v));const p=l.getSource(d).beginDrag(o,d);if(p==null)return;_t(p),l.pinSource(d);const g=l.getSourceType(d);return{type:K,payload:{itemType:g,item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:v||null,isSourcePublic:!!s}}}}function Nt(t,e,r){E(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){E(r.getSource(n),"Expected sourceIds to be registered.")})}function Pt(t){E(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function _t(t){E(Ae(t),"Item must be an object.")}function Lt(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function Mt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ft(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Mt(t,s,r[s])})}return t}function kt(t){return function(r={}){const n=t.getMonitor(),s=t.getRegistry();At(n),Ht(n).forEach((a,o)=>{const l=Ut(a,o,s,n),d={type:Z,payload:{dropResult:Ft({},r,l)}};t.dispatch(d)})}}function At(t){E(t.isDragging(),"Cannot call drop while not dragging."),E(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ut(t,e,r,n){const s=r.getTarget(t);let i=s?s.drop(n,t):void 0;return Bt(i),typeof i>"u"&&(i=e===0?{}:n.getDropResult()),i}function Bt(t){E(typeof t>"u"||Ae(t),"Drop result must either be an object or undefined.")}function Ht(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Yt(t){return function(){const r=t.getMonitor(),n=t.getRegistry();$t(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:Q}}}function $t(t){E(t.isDragging(),"Cannot call endDrag while not dragging.")}function ae(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function Vt(t){return function(r,{clientOffset:n}={}){qt(r);const s=r.slice(0),i=t.getMonitor(),a=t.getRegistry(),o=i.getItemType();return Gt(s,a,o),zt(s,i,a),Xt(s,i,a),{type:J,payload:{targetIds:s,clientOffset:n||null}}}}function qt(t){E(Array.isArray(t),"Expected targetIds to be an array.")}function zt(t,e,r){E(e.isDragging(),"Cannot call hover while not dragging."),E(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const s=t[n];E(t.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const i=r.getTarget(s);E(i,"Expected targetIds to be registered.")}}function Gt(t,e,r){for(let n=t.length-1;n>=0;n--){const s=t[n],i=e.getTargetType(s);ae(i,r)||t.splice(n,1)}}function Xt(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function Wt(t){return function(){if(t.getMonitor().isDragging())return{type:fe}}}function Kt(t){return{beginDrag:jt(t),publishDragSource:Wt(t),hover:Vt(t),drop:kt(t),endDrag:Yt(t)}}class Jt{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(i){return(...a)=>{const o=i.apply(e,a);typeof o<"u"&&r(o)}}const s=Kt(this);return Object.keys(s).reduce((i,a)=>{const o=s[a];return i[a]=n(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function Zt(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Ue(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qt(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:Ue(Zt(e,n),r)}function er(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:Ue(e,r)}const q=[],he=[];q.__IS_NONE__=!0;he.__IS_ALL__=!0;function tr(t,e){return t===q?!1:t===he||typeof e>"u"?!0:Ct(e,t).length>0}class rr{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;E(typeof e=="function","listener must be a function."),E(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),o=a.stateId;try{o===s||o===s+1&&!tr(a.dirtyHandlerIds,n)||e()}finally{s=o}};return this.store.subscribe(i)}subscribeToOffsetChange(e){E(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return E(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(E(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),s=this.getItemType();return ae(n,s)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(E(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),s=this.getItemType();return n!==s?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ae(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Qt(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return er(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const Ie=typeof global<"u"?global:self,Be=Ie.MutationObserver||Ie.WebKitMutationObserver;function He(t){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),t()}}}function nr(t){let e=1;const r=new Be(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}const sr=typeof Be=="function"?nr:He;class ir{enqueueTask(e){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const r=this.index;if(this.index++,e[r].call(),this.index>this.capacity){for(let n=0,s=e.length-this.index;n<s;n++)e[n]=e[n+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=sr(this.flush),this.requestErrorThrow=He(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class or{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,r){this.onError=e,this.release=r,this.task=null}}class ar{create(e){const r=this.freeTasks,n=r.length?r.pop():new or(this.onError,s=>r[r.length]=s);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}const Ye=new ir,cr=new ar(Ye.registerPendingError);function ur(t){Ye.enqueueTask(cr.create(t))}const pe="dnd-core/ADD_SOURCE",me="dnd-core/ADD_TARGET",ve="dnd-core/REMOVE_SOURCE",ee="dnd-core/REMOVE_TARGET";function lr(t){return{type:pe,payload:{sourceId:t}}}function dr(t){return{type:me,payload:{targetId:t}}}function gr(t){return{type:ve,payload:{sourceId:t}}}function fr(t){return{type:ee,payload:{targetId:t}}}function hr(t){E(typeof t.canDrag=="function","Expected canDrag to be a function."),E(typeof t.beginDrag=="function","Expected beginDrag to be a function."),E(typeof t.endDrag=="function","Expected endDrag to be a function.")}function pr(t){E(typeof t.canDrop=="function","Expected canDrop to be a function."),E(typeof t.hover=="function","Expected hover to be a function."),E(typeof t.drop=="function","Expected beginDrag to be a function.")}function ce(t,e){if(e&&Array.isArray(t)){t.forEach(r=>ce(r,!1));return}E(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var M;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(M||(M={}));let mr=0;function vr(){return mr++}function Dr(t){const e=vr().toString();switch(t){case M.SOURCE:return`S${e}`;case M.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Te(t){switch(t[0]){case"S":return M.SOURCE;case"T":return M.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function be(t,e){const r=t.entries();let n=!1;do{const{done:s,value:[,i]}=r.next();if(i===e)return!0;n=!!s}while(!n);return!1}class yr{addSource(e,r){ce(e),hr(r);const n=this.addHandler(M.SOURCE,e,r);return this.store.dispatch(lr(n)),n}addTarget(e,r){ce(e,!0),pr(r);const n=this.addHandler(M.TARGET,e,r);return this.store.dispatch(dr(n)),n}containsHandler(e){return be(this.dragSources,e)||be(this.dropTargets,e)}getSource(e,r=!1){return E(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return E(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return E(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return E(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Te(e)===M.SOURCE}isTargetId(e){return Te(e)===M.TARGET}removeSource(e){E(this.getSource(e),"Expected an existing source."),this.store.dispatch(gr(e)),ur(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){E(this.getTarget(e),"Expected an existing target."),this.store.dispatch(fr(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);E(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){E(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const s=Dr(e);return this.types.set(s,r),e===M.SOURCE?this.dragSources.set(s,n):e===M.TARGET&&this.dropTargets.set(s,n),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Sr=(t,e)=>t===e;function Er(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function xr(t,e,r=Sr){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function Or(t=q,e){switch(e.type){case J:break;case pe:case me:case ee:case ve:return q;case K:case fe:case Q:case Z:default:return he}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,s=wt(r,n);if(!(s.length>0||!xr(r,n)))return q;const a=n[n.length-1],o=r[r.length-1];return a!==o&&(a&&s.push(a),o&&s.push(o)),s}function Ir(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Ir(t,s,r[s])})}return t}const we={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function br(t=we,e){const{payload:r}=e;switch(e.type){case ge:case K:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case J:return Er(t.clientOffset,r.clientOffset)?t:Tr({},t,{clientOffset:r.clientOffset});case Q:case Z:return we;default:return t}}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){wr(t,s,r[s])})}return t}const Cr={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Rr(t=Cr,e){const{payload:r}=e;switch(e.type){case K:return $({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case fe:return $({},t,{isSourcePublic:!0});case J:return $({},t,{targetIds:r.targetIds});case ee:return t.targetIds.indexOf(r.targetId)===-1?t:$({},t,{targetIds:bt(t.targetIds,r.targetId)});case Z:return $({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Q:return $({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function jr(t=0,e){switch(e.type){case pe:case me:return t+1;case ve:case ee:return t-1;default:return t}}function Nr(t=0){return t+1}function Pr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Pr(t,s,r[s])})}return t}function Lr(t={},e){return{dirtyHandlerIds:Or(t.dirtyHandlerIds,{type:e.type,payload:_r({},e.payload,{prevTargetIds:Tt(t,"dragOperation.targetIds",[])})}),dragOffset:br(t.dragOffset,e),refCount:jr(t.refCount,e),dragOperation:Rr(t.dragOperation,e),stateId:Nr(t.stateId)}}function Mr(t,e=void 0,r={},n=!1){const s=Fr(n),i=new rr(s,new yr(s)),a=new Jt(s,i),o=t(a,e,r);return a.receiveBackend(o),a}function Fr(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return ke(Lr,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function kr(t,e){if(t==null)return{};var r=Ar(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)n=i[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ar(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}let Ce=0;const W=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ur=f.memo(function(e){var{children:r}=e,n=kr(e,["children"]);const[s,i]=Br(n);return f.useEffect(()=>{if(i){const a=$e();return++Ce,()=>{--Ce===0&&(a[W]=null)}}},[]),c.jsxRuntimeExports.jsx(Fe.Provider,{value:s,children:r})});function Br(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Hr(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}function Hr(t,e=$e(),r,n){const s=e;return s[W]||(s[W]={dragDropManager:Mr(t,e,r,n)}),s[W]}function $e(){return typeof global<"u"?global:window}var te,Re;function Yr(){return Re||(Re=1,te=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),te}var $r=Yr();const Vr=_.getDefaultExportFromCjs($r),U=typeof window<"u"?f.useLayoutEffect:f.useEffect;function qr(t,e,r){const[n,s]=f.useState(()=>e(t)),i=f.useCallback(()=>{const a=e(t);Vr(n,a)||(s(a),r&&r())},[n,t,r]);return U(i),[n,i]}function zr(t,e,r){const[n,s]=qr(t,e,r);return U(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(s,{handlerIds:[a]})},[t,s]),n}function Ve(t,e,r){return zr(e,t||(()=>({})),()=>r.reconnect())}function qe(t,e){const r=[];return typeof t!="function"&&r.push(t),f.useMemo(()=>typeof t=="function"?t():t,r)}function Gr(t){return f.useMemo(()=>t.hooks.dragSource(),[t])}function Xr(t){return f.useMemo(()=>t.hooks.dragPreview(),[t])}let re=!1,ne=!1;class Wr{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){E(!re,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return re=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{re=!1}}isDragging(){if(!this.sourceId)return!1;E(!ne,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ne=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ne=!1}}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,r){return this.internalMonitor.isOverTarget(e,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let se=!1;class Kr{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,r){return this.internalMonitor.subscribeToStateChange(e,r)}canDrop(){if(!this.targetId)return!1;E(!se,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return se=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{se=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Jr(t,e,r){const n=r.getRegistry(),s=n.addTarget(t,e);return[s,()=>n.removeTarget(s)]}function Zr(t,e,r){const n=r.getRegistry(),s=n.addSource(t,e);return[s,()=>n.removeSource(s)]}function ue(t,e,r,n){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const o=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l<i.length;l++){const d=i[l];if(!o(d))return!1;const v=t[d],D=e[d];if(s=void 0,s===!1||s===void 0&&v!==D)return!1}return!0}function le(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Qr(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function en(t){return(e=null,r=null)=>{if(!f.isValidElement(e)){const i=e;return t(i,r),i}const n=e;return Qr(n),tn(n,r?i=>t(i,r):t)}}function ze(t){const e={};return Object.keys(t).forEach(r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const s=en(n);e[r]=()=>s}}),e}function je(t,e){typeof t=="function"?t(e):t.current=e}function tn(t,e){const r=t.ref;return E(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?f.cloneElement(t,{ref:n=>{je(r,n),je(e,n)}}):f.cloneElement(t,{ref:e})}class rn{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?e?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),r):(this.lastConnectedDragSource=e,r):r}reconnectDragPreview(e=!1){const r=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ue(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ue(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ze({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,le(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,le(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class nn{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ue(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ze({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,le(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function V(){const{dragDropManager:t}=f.useContext(Fe);return E(t!=null,"Expected drag drop context"),t}function sn(t,e){const r=V(),n=f.useMemo(()=>new rn(r.getBackend()),[r]);return U(()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource()),[n,t]),U(()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,e]),n}function on(){const t=V();return f.useMemo(()=>new Wr(t),[t])}class an{beginDrag(){const e=this.spec,r=this.monitor;let n=null;return typeof e.item=="object"?n=e.item:typeof e.item=="function"?n=e.item(r):n={},n??null}canDrag(){const e=this.spec,r=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(r):!0}isDragging(e,r){const n=this.spec,s=this.monitor,{isDragging:i}=n;return i?i(s):r===e.getSourceId()}endDrag(){const e=this.spec,r=this.monitor,n=this.connector,{end:s}=e;s&&s(r.getItem(),r),n.reconnect()}constructor(e,r,n){this.spec=e,this.monitor=r,this.connector=n}}function cn(t,e,r){const n=f.useMemo(()=>new an(t,e,r),[e,r]);return f.useEffect(()=>{n.spec=t},[t]),n}function un(t){return f.useMemo(()=>{const e=t.type;return E(e!=null,"spec.type must be defined"),e},[t])}function ln(t,e,r){const n=V(),s=cn(t,e,r),i=un(t);U(function(){if(i!=null){const[o,l]=Zr(i,s,n);return e.receiveHandlerId(o),r.receiveHandlerId(o),l}},[n,e,r,s,i])}function dn(t,e){const r=qe(t);E(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=on(),s=sn(r.options,r.previewOptions);return ln(r,n,s),[Ve(r.collect,n,s),Gr(s),Xr(s)]}function gn(t){return f.useMemo(()=>t.hooks.dropTarget(),[t])}function fn(t){const e=V(),r=f.useMemo(()=>new nn(e.getBackend()),[e]);return U(()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget()),[t]),r}function hn(){const t=V();return f.useMemo(()=>new Kr(t),[t])}function pn(t){const{accept:e}=t;return f.useMemo(()=>(E(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class mn{canDrop(){const e=this.spec,r=this.monitor;return e.canDrop?e.canDrop(r.getItem(),r):!0}hover(){const e=this.spec,r=this.monitor;e.hover&&e.hover(r.getItem(),r)}drop(){const e=this.spec,r=this.monitor;if(e.drop)return e.drop(r.getItem(),r)}constructor(e,r){this.spec=e,this.monitor=r}}function vn(t,e){const r=f.useMemo(()=>new mn(t,e),[e]);return f.useEffect(()=>{r.spec=t},[t]),r}function Dn(t,e,r){const n=V(),s=vn(t,e),i=pn(t);U(function(){const[o,l]=Jr(i,s,n);return e.receiveHandlerId(o),r.receiveHandlerId(o),l},[n,e,s,r,i.map(a=>a.toString()).join("|")])}function yn(t,e){const r=qe(t),n=hn(),s=fn(r.options);return Dn(r,n,s),[Ve(r.collect,n,s),gn(s)]}function Ge(t){let e=null;return()=>(e==null&&(e=t()),e)}function Sn(t,e){return t.filter(r=>r!==e)}function En(t,e){const r=new Set,n=i=>r.add(i);t.forEach(n),e.forEach(n);const s=[];return r.forEach(i=>s.push(i)),s}class xn{enter(e){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=En(this.entered.filter(n),[e]),r===0&&this.entered.length>0}leave(e){const r=this.entered.length;return this.entered=Sn(this.entered.filter(this.isNodeInDocument),e),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class On{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,r){return r===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Xe="__NATIVE_FILE__",We="__NATIVE_URL__",Ke="__NATIVE_TEXT__",Je="__NATIVE_HTML__",Ne=Object.freeze(Object.defineProperty({__proto__:null,FILE:Xe,HTML:Je,TEXT:Ke,URL:We},Symbol.toStringTag,{value:"Module"}));function ie(t,e,r){const n=e.reduce((s,i)=>s||t.getData(i),"");return n??r}const de={[Xe]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Je]:{exposeProperties:{html:(t,e)=>ie(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[We]:{exposeProperties:{urls:(t,e)=>ie(t,e,"").split(`
2
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Ke]:{exposeProperties:{text:(t,e)=>ie(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function In(t,e){const r=de[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new On(r);return n.loadDataTransfer(e),n}function oe(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(de).filter(r=>{const n=de[r];return n?.matchesTypes?n.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Tn=Ge(()=>/firefox/i.test(navigator.userAgent)),Ze=Ge(()=>!!window.safari);class Pe{interpolate(e){const{xs:r,ys:n,c1s:s,c2s:i,c3s:a}=this;let o=r.length-1;if(e===r[o])return n[o];let l=0,d=a.length-1,v;for(;l<=d;){v=Math.floor(.5*(l+d));const g=r[v];if(g<e)l=v+1;else if(g>e)d=v-1;else return n[v]}o=Math.max(0,d);const D=e-r[o],p=D*D;return n[o]+s[o]*D+i[o]*p+a[o]*D*p}constructor(e,r){const{length:n}=e,s=[];for(let g=0;g<n;g++)s.push(g);s.sort((g,T)=>e[g]<e[T]?-1:1);const i=[],a=[];let o,l;for(let g=0;g<n-1;g++)o=e[g+1]-e[g],l=r[g+1]-r[g],i.push(o),a.push(l/o);const d=[a[0]];for(let g=0;g<i.length-1;g++){const T=a[g],S=a[g+1];if(T*S<=0)d.push(0);else{o=i[g];const w=i[g+1],y=o+w;d.push(3*y/((y+w)/T+(y+o)/S))}}d.push(a[a.length-1]);const v=[],D=[];let p;for(let g=0;g<d.length-1;g++){p=a[g];const T=d[g],S=1/i[g],w=T+d[g+1]-p-p;v.push((p-T-w)*S),D.push(w*S*S)}this.xs=e,this.ys=r,this.c1s=d,this.c2s=v,this.c3s=D}}const bn=1;function Qe(t){const e=t.nodeType===bn?t:t.parentElement;if(!e)return null;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}function X(t){return{x:t.clientX,y:t.clientY}}function wn(t){var e;return t.nodeName==="IMG"&&(Tn()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function Cn(t,e,r,n){let s=t?e.width:r,i=t?e.height:n;return Ze()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function Rn(t,e,r,n,s){const i=wn(e),o=Qe(i?t:e),l={x:r.x-o.x,y:r.y-o.y},{offsetWidth:d,offsetHeight:v}=t,{anchorX:D,anchorY:p}=n,{dragPreviewWidth:g,dragPreviewHeight:T}=Cn(i,e,d,v),S=()=>{let x=new Pe([0,.5,1],[l.y,l.y/v*T,l.y+T-v]).interpolate(p);return Ze()&&i&&(x+=(window.devicePixelRatio-1)*T),x},w=()=>new Pe([0,.5,1],[l.x,l.x/d*g,l.x+g-d]).interpolate(D),{offsetX:y,offsetY:m}=s,b=y===0||y,h=m===0||m;return{x:b?y:w(),y:h?m:S()}}class jn{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,r){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=r}}function Nn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Nn(t,s,r[s])})}return t}class Pn{profile(){var e,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,r,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,r),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,r,n){this.sourceNodes.set(e,r),this.sourceNodeOptions.set(e,n);const s=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",i),r.setAttribute("draggable","false")}}connectDropTarget(e,r){const n=a=>this.handleDragEnter(a,e),s=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",i),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(e);return _e({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(e);return _e({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Ne).some(r=>Ne[r]===e)}beginDragNativeItem(e,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=In(e,r),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,r){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(e,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(e,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(e,r){this.dropTargetIds.unshift(r)}constructor(e,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Qe(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=X(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:o}=s,l=oe(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){const v=this.monitor.getSourceId(),D=this.sourceNodes.get(v),p=this.sourcePreviewNodes.get(v)||D;if(p){const{anchorX:g,anchorY:T,offsetX:S,offsetY:w}=this.getCurrentSourcePreviewNodeOptions(),b=Rn(D,p,a,{anchorX:g,anchorY:T},{offsetX:S,offsetY:w});o.setDragImage(p,b.x,b.y)}}try{o?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(o&&!o.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:o}=s,l=oe(o);l&&this.beginDragNativeItem(l,o)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:X(s)}),i.some(o=>this.monitor.canDropOnTarget(o))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=X(s),this.scheduleHover(i),(i||[]).some(o=>this.monitor.canDropOnTarget(o))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else oe(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:X(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new jn(r,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new xn(this.isNodeInDocument)}}const _n=function(e,r,n){return new Pn(e,r,n)},Ln=[".pdf",".xlsx",".xls",".docx",".doc",".pptx",".ppt",".hwp",".txt",".csv",".jpg",".jpeg",".png",".gif",".zip"],Le={FILE:"file"},Mn=({originNode:t,file:e,fileList:r,moveFile:n,onDrop:s})=>{const i=f.useRef(null),[{handlerId:a},o]=yn({accept:Le.FILE,collect:D=>({handlerId:D.getHandlerId()}),hover(D,p){if(!i.current)return;const g=D.uid,T=e.uid;if(g===T)return;const S=A.findIndex(r,{uid:T}),w=A.findIndex(r,{uid:g});if(w===-1||S===-1)return;const y=i.current.getBoundingClientRect(),m=p.getClientOffset();if(!m)return;const b=(y.bottom-y.top)/2,h=m.y-y.top;w<S&&h<b||w>S&&h>b||n(g,T)},drop(){s()}}),[{isDragging:l},d]=dn({type:Le.FILE,item:()=>({uid:e.uid,index:A.findIndex(r,{uid:e.uid})}),collect:D=>({isDragging:D.isDragging()})}),v=l?0:1;return d(o(i)),c.jsxRuntimeExports.jsx("div",{ref:i,style:{opacity:v},"data-handler-id":a,children:t})},Fn=({fileGrpKey:t,onUploadComplete:e,onFetchFilesTrxCd:r="SCMFILE00101",onSuccessTrxCd:n="SCMFILE00102",onDeleteFileTrxCd:s="SCMFILE00103",onReorderFilesTrxCd:i="SCMFILE00104",allowedExtensions:a=Ln,maxFileSize:o=200,showButton:l=!0,multiple:d=!1})=>{const[v,D]=f.useState([]),p=f.useRef(t),g=f.useRef([]),T=()=>{if(g.current.length===0)return;const h=[...g.current];if(g.current=[],n){const I=h.map(x=>({crprCd:_.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:p.current,physFileNm:x.fileNameP,lgclFileNm:x.fileNameL,filePath:x.filePath,fileExtn:x.fileExt,fileSize:x.fileSize,mltpYn:"N"}));_.callService(n,{crprCd:_.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:p.current,sub:I}).then(x=>{if(x?.sub&&x.sub.length>0){const O=x.sub[0].fileGrpKey;p.current||(p.current=O);const j=new Map;x.sub.forEach(C=>{const N=h.find(P=>P.fileNameL===C.lgclFileNm);N&&j.set(N.tempId,C)}),D(C=>C.map(P=>{const R=j.get(P.uid);if(R){const B=h.find(H=>H.tempId===P.uid);return e&&B&&e({...B,fileGrpKey:O,fileKey:R.fileKey}),{...P,name:R.lgclFileNm,fileGrpKey:O,fileKey:R.fileKey,uid:R.fileKey,status:"done",url:`/api/download?filePath=${R.filePath}&logicalName=${R.lgclFileNm}`}}return P}))}}).catch(x=>{console.error("업로드 후처리 서비스 호출 실패:",x),u.message.error("파일 후처리 중 오류가 발생했습니다.");const O=new Set(h.map(j=>j.tempId));D(j=>j.map(C=>O.has(C.uid)?{...C,status:"error",error:"후처리 실패"}:C))})}},S=f.useRef(A.debounce(T,500)).current;f.useEffect(()=>()=>{S.cancel()},[S]),f.useEffect(()=>{p.current=t},[t]),f.useEffect(()=>{t&&r&&_.callService(r,{crprCd:_.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:t}).then(h=>{if(h?.sub){const I=h.sub.map(x=>({uid:x.fileKey,name:x.lgclFileNm,status:"done",url:`/api/download?filePath=${x.filePath}&logicalName=${x.lgclFileNm}`}));D(I)}}).catch(h=>{console.error("파일 목록 조회 서비스 호출에 실패했습니다.",h),u.message.error("파일 목록을 불러오는 중 오류가 발생했습니다.")})},[t,r]);const w=(h,I)=>{const x=A.findIndex(v,{uid:h}),O=A.findIndex(v,{uid:I});if(x<0||O<0)return;const j=[...v],[C]=j.splice(x,1);j.splice(O,0,C),D(j)},y=()=>{if(t&&i){const h=v.map(I=>I.uid);_.callService(i,{crprCd:_.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:t,reorderedFileKeys:h}).then(()=>{u.message.success("파일 순서가 성공적으로 저장되었습니다.")}).catch(I=>{console.error("파일 순서 저장 서비스 호출 실패:",I),u.message.error("파일 순서 저장 중 오류가 발생했습니다.")})}},b={name:"file",multiple:d,action:"/api/upload",fileList:v,beforeUpload:h=>{if(!d&&v.length>0)return u.message.error("하나의 파일만 업로드할 수 있습니다."),u.Upload.LIST_IGNORE;if(a&&a.length>0){const I=`.${h.name.split(".").pop()?.toLowerCase()}`;if(!a.includes(I))return u.message.error(`${h.name} 파일은 허용되지 않는 확장자입니다. (${a.join(", ")})`),u.Upload.LIST_IGNORE}return o&&!(h.size/1024/1024<o)?(u.message.error(`일반업로드의 최대용량은 ${o}MB입니다.`),u.Upload.LIST_IGNORE):!0},showUploadList:{showRemoveIcon:l},onChange(h){const{status:I,uid:x}=h.file;if(I==="removed"){s?_.callService(s,{crprCd:_.getUserInfo()?.crprCd,sysCd:__SYS_CD__,fileGrpKey:p.current,fileKey:x}).then(()=>{u.message.success("파일이 성공적으로 삭제되었습니다."),D(h.fileList)}).catch(O=>{console.error("파일 삭제 서비스 호출에 실패했습니다.",O),u.message.error("파일 삭제 중 오류가 발생했습니다.")}):D(h.fileList);return}if(D(h.fileList),I==="done")if(h.file.response?.success){const{uploadedFiles:O}=h.file.response;O&&Array.isArray(O)&&O.length>0&&(O.forEach(j=>{j.tempId=h.file.uid,g.current.push(j)}),S()),u.message.success(h.file.response.message||`${h.file.name} 파일이 성공적으로 업로드되었습니다.`)}else u.message.error(h.file.response?.message||`${h.file.name} 파일 업로드에 실패했습니다.`);else I==="error"&&u.message.error(h.file.response?.message||`${h.file.name} 파일 업로드 중 오류가 발생했습니다.`)},itemRender(h,I,x){const O=f.cloneElement(h,{href:I.url||void 0,title:void 0});return c.jsxRuntimeExports.jsx(Mn,{originNode:O,file:I,fileList:x,moveFile:w,onDrop:y},I.uid)}};return c.jsxRuntimeExports.jsx(Ur,{backend:_n,children:c.jsxRuntimeExports.jsx(u.Upload,{headers:{SYSCD:__SYS_CD__},...b,listType:"picture",children:l&&(d||v.length===0)&&c.jsxRuntimeExports.jsx(u.Button,{icon:c.jsxRuntimeExports.jsx(F.UploadOutlined,{}),children:"파일 선택"})})})};exports.BwgButton=rt;exports.BwgCheckList=nt;exports.BwgDownload=st;exports.BwgLargeUploader=ct;exports.BwgMaskedInput=lt;exports.BwgMaskedPicker=gt;exports.BwgMultiSelect=ft;exports.BwgNumber=ht;exports.BwgRadio=pt;exports.BwgSearch=mt;exports.BwgTextArea=Dt;exports.BwgUploader=Fn;
3
- //# sourceMappingURL=BwgUploader-CkXwkcUL.cjs.map
@@ -1,19 +0,0 @@
1
- import { j as s } from "./jsx-runtime-Dpn_P65e.js";
2
- function e({
3
- title: d = "로딩 중...",
4
- subTitle: a
5
- }) {
6
- return /* @__PURE__ */ s.jsxs("div", { className: "bwg-load-indicator", children: [
7
- /* @__PURE__ */ s.jsxs("div", { className: "bwg-load-wave", children: [
8
- /* @__PURE__ */ s.jsx("span", {}),
9
- /* @__PURE__ */ s.jsx("span", {}),
10
- /* @__PURE__ */ s.jsx("span", {})
11
- ] }),
12
- /* @__PURE__ */ s.jsx("div", { className: "bwg-load-title", children: d }),
13
- a && /* @__PURE__ */ s.jsx("div", { className: "bwg-load-sub", children: a })
14
- ] });
15
- }
16
- export {
17
- e as L
18
- };
19
- //# sourceMappingURL=LoadingOverlay-DAZJF5wg.js.map
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("./jsx-runtime-CeSfJrVB.cjs");function n({title:i="로딩 중...",subTitle:e}){return s.jsxRuntimeExports.jsxs("div",{className:"bwg-load-indicator",children:[s.jsxRuntimeExports.jsxs("div",{className:"bwg-load-wave",children:[s.jsxRuntimeExports.jsx("span",{}),s.jsxRuntimeExports.jsx("span",{}),s.jsxRuntimeExports.jsx("span",{})]}),s.jsxRuntimeExports.jsx("div",{className:"bwg-load-title",children:i}),e&&s.jsxRuntimeExports.jsx("div",{className:"bwg-load-sub",children:e})]})}exports.LoadingOverlay=n;
2
- //# sourceMappingURL=LoadingOverlay-DcmKvoZA.cjs.map
@@ -1,154 +0,0 @@
1
- import { j as t } from "./jsx-runtime-Dpn_P65e.js";
2
- import { Input as F } from "antd";
3
- import { useContext as R, createContext as T, useState as v, useRef as D, useEffect as E, useMemo as M } from "react";
4
- const L = T(null), V = () => {
5
- const i = R(L);
6
- if (!i)
7
- throw new Error("useLock must be used within ScreenProtectProvider");
8
- return i;
9
- }, W = ({
10
- children: i,
11
- idleMs: x = 1e4,
12
- onUnlock: m,
13
- persistLocked: n = !0,
14
- storageKey: s = "inactivityLocked",
15
- eventTarget: a,
16
- overlayScope: f = "global",
17
- overlayId: r = "lock-overlay-root",
18
- overlayPosition: b = "fixed"
19
- }) => {
20
- const I = n && typeof window < "u" && window.localStorage.getItem(s) === "1", [o, k] = v(I), [p, P] = v(x), h = Number.isFinite(p) && p > 0, l = D(null), S = () => {
21
- try {
22
- n && window.localStorage.setItem(s, "1");
23
- } catch {
24
- }
25
- k(!0);
26
- }, g = async (c) => {
27
- if (!(m && !await m(c))) {
28
- try {
29
- n && window.localStorage.removeItem(s);
30
- } catch {
31
- }
32
- k(!1), h && y();
33
- }
34
- }, N = () => {
35
- try {
36
- n && window.localStorage.setItem(s, "1");
37
- } catch {
38
- }
39
- k(!0);
40
- }, y = () => {
41
- h && (l.current && window.clearTimeout(l.current), l.current = window.setTimeout(() => {
42
- N();
43
- }, p));
44
- };
45
- E(() => {
46
- if (!h) return;
47
- const c = () => {
48
- o || y();
49
- }, d = { passive: !0 }, u = [
50
- "pointermove",
51
- "pointerdown",
52
- "keydown",
53
- "wheel",
54
- "touchstart"
55
- ], w = a ?? window;
56
- return u.forEach((e) => w.addEventListener(e, c, d)), y(), () => {
57
- l.current && window.clearTimeout(l.current), u.forEach((e) => w.removeEventListener(e, c));
58
- };
59
- }, [p, o, a, h]), E(() => {
60
- if (!o) return;
61
- const c = (e) => {
62
- const j = document.getElementById(r);
63
- j && j.contains(e.target) || (e.stopPropagation(), e.preventDefault());
64
- }, d = { capture: !0 }, u = [
65
- "pointerdown",
66
- "pointerup",
67
- "pointermove",
68
- "click",
69
- "wheel",
70
- "keydown",
71
- "keyup",
72
- "touchstart",
73
- "touchmove"
74
- ], w = f === "scoped" ? a ?? window : window;
75
- return u.forEach((e) => w.addEventListener(e, c, d)), () => u.forEach((e) => w.removeEventListener(e, c, d));
76
- }, [o, f, r, a]);
77
- const C = M(
78
- () => ({ locked: o, lock: S, unlock: g, setIdleMs: P }),
79
- [o]
80
- );
81
- return /* @__PURE__ */ t.jsxs(L.Provider, { value: C, children: [
82
- /* @__PURE__ */ t.jsx(
83
- "div",
84
- {
85
- style: { width: "100%", height: "100%" },
86
- ...o ? { inert: "" } : {},
87
- ...o ? { "aria-hidden": !0 } : {},
88
- children: i
89
- }
90
- ),
91
- o && /* @__PURE__ */ t.jsx(
92
- O,
93
- {
94
- onUnlock: g,
95
- overlayId: r,
96
- overlayPosition: b
97
- }
98
- )
99
- ] });
100
- }, O = ({
101
- onUnlock: i,
102
- overlayId: x = "lock-overlay-root",
103
- overlayPosition: m = "fixed"
104
- }) => {
105
- const [n] = v(4), [s, a] = v("");
106
- return /* @__PURE__ */ t.jsx(
107
- "div",
108
- {
109
- id: x,
110
- "aria-modal": "true",
111
- role: "dialog",
112
- "aria-label": "Locked screen",
113
- style: {
114
- position: m,
115
- inset: 0,
116
- background: "rgba(12, 14, 18, 0.85)",
117
- backdropFilter: "blur(4px)",
118
- display: "grid",
119
- placeItems: "center",
120
- zIndex: 9999
121
- },
122
- children: /* @__PURE__ */ t.jsxs("div", { className: "lockscreen-form", style: { width: 420, maxWidth: "92vw" }, children: [
123
- /* @__PURE__ */ t.jsx("div", { className: "lock-icon-wrap", children: /* @__PURE__ */ t.jsx("span", { className: "lock-icon-box" }) }),
124
- /* @__PURE__ */ t.jsx("h2", { children: "잠금됨" }),
125
- /* @__PURE__ */ t.jsx("p", { children: "PIN 번호를 입력하세요" }),
126
- /* @__PURE__ */ t.jsx(
127
- "div",
128
- {
129
- className: "lock-ipt-wrap",
130
- style: { display: "flex", justifyContent: "center" },
131
- children: /* @__PURE__ */ t.jsx(
132
- F.OTP,
133
- {
134
- mask: "*",
135
- autoFocus: !0,
136
- length: n,
137
- value: s,
138
- onChange: (f) => {
139
- const r = (f ?? "").replace(/\D/g, "").slice(0, n);
140
- a(r), r.length === n && i(r);
141
- }
142
- }
143
- )
144
- }
145
- )
146
- ] })
147
- }
148
- );
149
- };
150
- export {
151
- W as S,
152
- V as u
153
- };
154
- //# sourceMappingURL=ScreenProtectContext-3my4PHFa.js.map